diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..a19ade077d --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +CHANGELOG.md merge=union diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7bdb4ecab7..f8a51d9b71 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,3 +3,12 @@ # @temporalio/sdk will be requested for review when # someone opens a pull request. * @temporalio/sdk + + +# Below are owners for modules in the temporalio/contrib/ +# and tests/contrib/ directories that are owned by teams +# other than the SDK team. For each one, we add the owning team, +# as well as @temporalio/sdk, so the SDK team can continue to +# manage repo-wide concerns. +/temporalio/contrib/workflow_streams/ @temporalio/ai-sdk @temporalio/sdk +/tests/contrib/workflow_streams/ @temporalio/ai-sdk @temporalio/sdk diff --git a/.github/actions/alpine-package-smoke/action.yml b/.github/actions/alpine-package-smoke/action.yml new file mode 100644 index 0000000000..12291554fe --- /dev/null +++ b/.github/actions/alpine-package-smoke/action.yml @@ -0,0 +1,72 @@ +name: Alpine package smoke test +description: Install a local or published temporalio package in Alpine and run a minimal SDK workflow. +inputs: + wheel-dir: + description: "Directory containing local wheel files to install" + required: false + default: "" + version: + description: "Published package version to install and verify" + required: false + default: "" + index-url: + description: "Primary package index URL for published package installs" + required: false + default: "" + dependency-index-url: + description: "Optional dependency package index URL for published package installs" + required: false + default: "" + python-image: + description: "Alpine Python Docker image" + required: false + default: "python:3.11-alpine" +runs: + using: composite + steps: + - name: Install package and run SDK smoke test + shell: bash + env: + WHEEL_DIR: ${{ inputs.wheel-dir }} + VERSION: ${{ inputs.version }} + INDEX_URL: ${{ inputs.index-url }} + DEPENDENCY_INDEX_URL: ${{ inputs.dependency-index-url }} + PYTHON_IMAGE: ${{ inputs.python-image }} + run: | + set -euo pipefail + + if [[ -z "$WHEEL_DIR" && ( -z "$VERSION" || -z "$INDEX_URL" ) ]]; then + echo "Either wheel-dir or both version and index-url must be provided" >&2 + exit 1 + fi + + docker run --rm -v "$(pwd):/workspace" -w /tmp \ + -e WHEEL_DIR="$WHEEL_DIR" \ + -e VERSION="$VERSION" \ + -e INDEX_URL="$INDEX_URL" \ + -e DEPENDENCY_INDEX_URL="$DEPENDENCY_INDEX_URL" \ + "$PYTHON_IMAGE" sh -c ' + set -eu + python -m venv /tmp/alpine-smoke + /tmp/alpine-smoke/bin/python -m pip install --upgrade pip + + if [ -n "$WHEEL_DIR" ]; then + /tmp/alpine-smoke/bin/python -m pip install --prefer-binary /workspace/$WHEEL_DIR/*.whl + elif [ -n "$DEPENDENCY_INDEX_URL" ]; then + /tmp/alpine-smoke/bin/python /workspace/.github/scripts/install_release_package.py \ + --version "$VERSION" \ + --index-url "$INDEX_URL" \ + --dependency-index-url "$DEPENDENCY_INDEX_URL" + else + /tmp/alpine-smoke/bin/python /workspace/.github/scripts/install_release_package.py \ + --version "$VERSION" \ + --index-url "$INDEX_URL" + fi + + if [ -z "$VERSION" ]; then + VERSION=$(/tmp/alpine-smoke/bin/python -c "import importlib.metadata; print(importlib.metadata.version(\"temporalio\"))") + export VERSION + fi + + /tmp/alpine-smoke/bin/python /workspace/.github/scripts/release_smoke_package.py + ' diff --git a/.github/actions/release-smoke-package/action.yml b/.github/actions/release-smoke-package/action.yml new file mode 100644 index 0000000000..90bd722351 --- /dev/null +++ b/.github/actions/release-smoke-package/action.yml @@ -0,0 +1,43 @@ +name: Release package smoke test +description: Install a published temporalio package and run a minimal SDK workflow. +inputs: + version: + description: "Package version to install and verify" + required: true + index-url: + description: "Primary package index URL" + required: true + dependency-index-url: + description: "Optional dependency package index URL" + required: false + default: "" +runs: + using: composite + steps: + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: "3.11" + - name: Install package + shell: bash + env: + VERSION: ${{ inputs.version }} + INDEX_URL: ${{ inputs.index-url }} + DEPENDENCY_INDEX_URL: ${{ inputs.dependency-index-url }} + run: | + set -euo pipefail + python -m venv .venv + .venv/bin/python -m pip install --upgrade pip + + install_args=(--version "$VERSION" --index-url "$INDEX_URL") + if [[ -n "$DEPENDENCY_INDEX_URL" ]]; then + install_args+=(--dependency-index-url "$DEPENDENCY_INDEX_URL") + fi + + .venv/bin/python .github/scripts/install_release_package.py "${install_args[@]}" + - name: Run SDK smoke test + shell: bash + env: + VERSION: ${{ inputs.version }} + run: | + set -euo pipefail + .venv/bin/python .github/scripts/release_smoke_package.py diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..1f3a19d736 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: "uv" + directory: "/" + schedule: + interval: "weekly" + cooldown: + default-days: 14 + open-pull-requests-limit: 0 + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + cooldown: + default-days: 14 + open-pull-requests-limit: 0 diff --git a/.github/scripts/cloud_namespace.py b/.github/scripts/cloud_namespace.py new file mode 100644 index 0000000000..e4048cb76d --- /dev/null +++ b/.github/scripts/cloud_namespace.py @@ -0,0 +1,113 @@ +"""Create and delete an isolated Temporal Cloud namespace for CI.""" + +import asyncio +import os +import sys +import time +from pathlib import Path + +from temporalio.api.cloud.cloudservice.v1 import ( + CreateNamespaceRequest, + DeleteNamespaceRequest, + GetAsyncOperationRequest, + GetNamespaceRequest, +) +from temporalio.api.cloud.namespace.v1 import MtlsAuthSpec, NamespaceSpec +from temporalio.api.cloud.operation.v1 import AsyncOperation +from temporalio.client import CloudOperationsClient + + +async def wait_for_operation( + client: CloudOperationsClient, operation: AsyncOperation +) -> None: + deadline = time.monotonic() + 10 * 60 + while True: + operation = ( + await client.cloud_service.get_async_operation( + GetAsyncOperationRequest(async_operation_id=operation.id) + ) + ).async_operation + if operation.state == AsyncOperation.STATE_FULFILLED: + return + if operation.state in { + AsyncOperation.STATE_FAILED, + AsyncOperation.STATE_CANCELLED, + AsyncOperation.STATE_REJECTED, + }: + raise RuntimeError( + "Cloud operation " + f"{operation.id} {AsyncOperation.State.Name(operation.state).lower()}: " + f"{operation.failure_reason}" + ) + if time.monotonic() >= deadline: + raise TimeoutError(f"Timed out waiting for Cloud operation {operation.id}") + delay = max( + operation.check_duration.seconds + + operation.check_duration.nanos / 1_000_000_000, + 1, + ) + await asyncio.sleep(min(delay, deadline - time.monotonic())) + + +async def create() -> None: + client = await cloud_client() + namespace_name = "sdk-python-ci-{}-{}".format( + os.environ["GITHUB_RUN_ID"], os.environ["GITHUB_RUN_ATTEMPT"] + ) + result = await client.cloud_service.create_namespace( + CreateNamespaceRequest( + spec=NamespaceSpec( + name=namespace_name, + regions=["aws-ca-central-1"], + retention_days=1, + search_attributes={ + "python_test_keyword_list": NamespaceSpec.SEARCH_ATTRIBUTE_TYPE_KEYWORD_LIST, + }, + mtls_auth=MtlsAuthSpec( + accepted_client_ca=Path( + os.environ["TEMPORAL_CLOUD_CLIENT_CA_PATH"] + ).read_bytes(), + enabled=True, + ), + ) + ) + ) + # Make cleanup possible even if provisioning fails after Cloud accepts the request. + with open(os.environ["GITHUB_OUTPUT"], "a") as output: + output.write(f"namespace={result.namespace}\n") + await wait_for_operation(client, result.async_operation) + + +async def delete(namespace: str) -> None: + client = await cloud_client() + existing = await client.cloud_service.get_namespace( + GetNamespaceRequest(namespace=namespace) + ) + result = await client.cloud_service.delete_namespace( + DeleteNamespaceRequest( + namespace=namespace, + resource_version=existing.namespace.resource_version, + ) + ) + await wait_for_operation(client, result.async_operation) + + +async def cloud_client() -> CloudOperationsClient: + return await CloudOperationsClient.connect( + api_key=os.environ["TEMPORAL_CLIENT_CLOUD_API_KEY"], + version=os.environ["TEMPORAL_CLIENT_CLOUD_API_VERSION"], + ) + + +async def main() -> None: + match sys.argv[1:]: + case ["create"]: + await create() + case ["delete", namespace]: + await delete(namespace) + case _: + raise ValueError("Usage: cloud_namespace.py create|delete ") + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/.github/scripts/install_release_package.py b/.github/scripts/install_release_package.py new file mode 100644 index 0000000000..45f407c7fb --- /dev/null +++ b/.github/scripts/install_release_package.py @@ -0,0 +1,84 @@ +"""Install a release package for smoke testing.""" + +from __future__ import annotations + +import argparse +import importlib.metadata +import subprocess +import sys +import time +from collections.abc import Sequence + +RELEASE_INSTALL_ATTEMPTS = 31 +RELEASE_INSTALL_RETRY_SECONDS = 30 + + +def _pip_install(args: Sequence[str]) -> None: + subprocess.check_call([sys.executable, "-m", "pip", "install", *args]) + + +def _pip_install_with_retries(args: Sequence[str]) -> None: + for attempt in range(1, RELEASE_INSTALL_ATTEMPTS + 1): + try: + _pip_install(args) + return + except subprocess.CalledProcessError: + if attempt == RELEASE_INSTALL_ATTEMPTS: + raise + print( + "Package was not installable yet; retrying in " + f"{RELEASE_INSTALL_RETRY_SECONDS}s " + f"({attempt}/{RELEASE_INSTALL_ATTEMPTS})", + flush=True, + ) + time.sleep(RELEASE_INSTALL_RETRY_SECONDS) + + +def install_package(args: argparse.Namespace) -> None: + package = f"temporalio=={args.version}" + if args.dependency_index_url: + _pip_install_with_retries( + [ + "--prefer-binary", + "--no-cache-dir", + "--index-url", + args.index_url, + "--no-deps", + package, + ] + ) + + requirements = importlib.metadata.requires("temporalio") or [] + if requirements: + _pip_install( + [ + "--prefer-binary", + "--index-url", + args.dependency_index_url, + *requirements, + ] + ) + else: + _pip_install_with_retries( + [ + "--prefer-binary", + "--no-cache-dir", + "--index-url", + args.index_url, + package, + ] + ) + + subprocess.check_call([sys.executable, "-m", "pip", "check"]) + + +def main(argv: Sequence[str] | None = None) -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--version", required=True) + parser.add_argument("--index-url", required=True) + parser.add_argument("--dependency-index-url") + install_package(parser.parse_args(argv)) + + +if __name__ == "__main__": + main() diff --git a/.github/scripts/release_smoke_package.py b/.github/scripts/release_smoke_package.py new file mode 100644 index 0000000000..00a192e855 --- /dev/null +++ b/.github/scripts/release_smoke_package.py @@ -0,0 +1,59 @@ +"""Smoke test an installed temporalio release package.""" + +from __future__ import annotations + +import asyncio +import os +import uuid +from datetime import timedelta + +import temporalio +from temporalio import activity, workflow +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import UnsandboxedWorkflowRunner, Worker + + +@activity.defn +async def say_hello(name: str) -> str: + return f"Hello, {name}!" + + +@workflow.defn +class SmokeWorkflow: + @workflow.run + async def run(self, name: str) -> str: + return await workflow.execute_activity( + say_hello, + name, + start_to_close_timeout=timedelta(seconds=10), + ) + + +async def main() -> None: + expected_version = os.environ["VERSION"] + if temporalio.__version__ != expected_version: + raise RuntimeError( + f"Expected temporalio {expected_version}, got {temporalio.__version__}" + ) + + task_queue = f"release-smoke-{uuid.uuid4()}" + async with await WorkflowEnvironment.start_local() as env: + async with Worker( + env.client, + task_queue=task_queue, + workflows=[SmokeWorkflow], + activities=[say_hello], + workflow_runner=UnsandboxedWorkflowRunner(), + ): + result = await env.client.execute_workflow( + SmokeWorkflow.run, + "trusted publishing", + id=task_queue, + task_queue=task_queue, + ) + if result != "Hello, trusted publishing!": + raise RuntimeError(f"Unexpected workflow result: {result!r}") + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/.github/scripts/release_verify.py b/.github/scripts/release_verify.py new file mode 100644 index 0000000000..f895839bc5 --- /dev/null +++ b/.github/scripts/release_verify.py @@ -0,0 +1,162 @@ +"""Release workflow validation helpers.""" + +from __future__ import annotations + +import argparse +import ast +import pathlib +import re +import sys +from collections.abc import Sequence + +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[2])) +from scripts.changelog import run_tool + +try: + import tomllib +except ModuleNotFoundError: + import toml as tomllib # type: ignore[no-redef] + + +def _checked_in_version() -> str: + pyproject_version = tomllib.loads(pathlib.Path("pyproject.toml").read_text())[ + "project" + ]["version"] + service_tree = ast.parse(pathlib.Path("temporalio/service.py").read_text()) + service_version = None + for stmt in service_tree.body: + if ( + isinstance(stmt, ast.Assign) + and any( + isinstance(target, ast.Name) and target.id == "__version__" + for target in stmt.targets + ) + and isinstance(stmt.value, ast.Constant) + and isinstance(stmt.value.value, str) + ): + service_version = stmt.value.value + break + + if pyproject_version != service_version: + raise RuntimeError( + f"pyproject.toml version {pyproject_version!r} does not match " + f"temporalio/service.py version {service_version!r}" + ) + if pyproject_version.startswith("v"): + raise RuntimeError("Checked-in version must not start with 'v'") + if not re.fullmatch(r"[0-9]+(?:\.[0-9]+)+(?:[a-zA-Z0-9_.+-]+)?", pyproject_version): + raise RuntimeError(f"Invalid checked-in version: {pyproject_version!r}") + return pyproject_version + + +def _write_github_output(path: pathlib.Path, *, version: str, sha: str) -> None: + with path.open("a", encoding="utf-8") as output: + print(f"version={version}", file=output) + print(f"sha={sha}", file=output) + + +def validate_version(args: argparse.Namespace) -> None: + version = _checked_in_version() + if args.github_output: + _write_github_output( + pathlib.Path(args.github_output), + version=version, + sha=args.sha, + ) + else: + print(version) + + +def verify_dist(args: argparse.Namespace) -> None: + dist_dir = pathlib.Path(args.dist_dir) + files = sorted(path.name for path in dist_dir.iterdir() if path.is_file()) + wheels = [name for name in files if name.endswith(".whl")] + sdists = [name for name in files if name.endswith(".tar.gz")] + + if len(files) != len(set(files)): + raise RuntimeError("Duplicate distribution filenames found") + expected_sdist = f"temporalio-{args.version}.tar.gz" + if sdists != [expected_sdist]: + raise RuntimeError(f"Expected only sdist {expected_sdist!r}, found {sdists!r}") + if len(wheels) != 7: + raise RuntimeError( + f"Expected 7 platform wheels, found {len(wheels)}: {wheels!r}" + ) + + for name in files: + if not name.startswith(f"temporalio-{args.version}"): + raise RuntimeError( + f"Distribution filename does not match requested version " + f"{args.version!r}: {name}" + ) + + expected_platforms = { + "linux-x86_64": lambda name: "manylinux" in name and "x86_64" in name, + "linux-aarch64": lambda name: "manylinux" in name and "aarch64" in name, + "linux-musl-x86_64": lambda name: "musllinux" in name and "x86_64" in name, + "linux-musl-aarch64": lambda name: "musllinux" in name and "aarch64" in name, + "macos-x86_64": lambda name: "macosx" in name and "x86_64" in name, + "macos-arm64": lambda name: "macosx" in name and "arm64" in name, + "windows-amd64": lambda name: "win_amd64" in name, + } + missing = [ + platform + for platform, predicate in expected_platforms.items() + if not any(predicate(name) for name in wheels) + ] + if missing: + raise RuntimeError( + f"Missing expected platform wheels: {missing!r}; found {wheels!r}" + ) + + print("Verified release artifacts:") + for name in files: + print(f" {name}") + + +def changelog_notes(args: argparse.Namespace) -> None: + run_tool( + pathlib.Path.cwd(), + [ + "release-notes", + "--version", + args.version, + "--changelog", + args.changelog, + "--submodule", + args.sdk_core_path, + "--output", + args.output, + ], + ) + + +def main(argv: Sequence[str] | None = None) -> None: + parser = argparse.ArgumentParser() + subparsers = parser.add_subparsers(required=True) + + validate_parser = subparsers.add_parser("validate-version") + validate_parser.add_argument("--sha", required=True) + validate_parser.add_argument("--github-output") + validate_parser.set_defaults(func=validate_version) + + verify_parser = subparsers.add_parser("verify-dist") + verify_parser.add_argument("--version", required=True) + verify_parser.add_argument("--dist-dir", default="dist") + verify_parser.set_defaults(func=verify_dist) + + changelog_parser = subparsers.add_parser("changelog-notes") + changelog_parser.add_argument("--version", required=True) + changelog_parser.add_argument("--changelog", default="CHANGELOG.md") + changelog_parser.add_argument("--output", required=True) + changelog_parser.add_argument( + "--sdk-core-path", default="temporalio/bridge/sdk-core" + ) + changelog_parser.set_defaults(func=changelog_notes) + + args = parser.parse_args(argv) + args.func(args) + + +if __name__ == "__main__": + main() diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml deleted file mode 100644 index 0b647c2507..0000000000 --- a/.github/workflows/build-binaries.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Build Binaries -on: - push: - branches: - - main - - "releases/*" - - build-binaries-install-whl - -permissions: - contents: read - -jobs: - # Compile the binaries and upload artifacts - compile-binaries: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - package-suffix: linux-amd64 - - os: ubuntu-arm - package-suffix: linux-aarch64 - runsOn: ubuntu-24.04-arm64-2-core - - os: macos-intel - package-suffix: macos-amd64 - runsOn: macos-15-intel - - os: macos-arm - package-suffix: macos-aarch64 - runsOn: macos-14 - - os: windows-latest - package-suffix: windows-amd64 - runs-on: ${{ matrix.runsOn || matrix.os }} - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions/setup-python@v5 - with: - python-version: "3.14" - - # Install Rust locally for non-Linux (Linux uses an internal docker - # command to build with cibuildwheel which uses rustup install defined - # in pyproject.toml) - - if: ${{ runner.os != 'Linux' }} - uses: dtolnay/rust-toolchain@stable - - if: ${{ runner.os != 'Linux' }} - uses: Swatinem/rust-cache@v2 - with: - workspaces: temporalio/bridge -> target - - uses: astral-sh/setup-uv@v5 - - run: uv sync --all-extras - - # Add the source dist only for Linux x64 for now - - if: ${{ matrix.package-suffix == 'linux-amd64' }} - run: uv build --sdist - - # Build the wheel - - run: uv run cibuildwheel --output-dir dist - - # Install the wheel in a new venv and run a test - - name: Test wheel - shell: bash - run: | - mkdir __test_wheel__ - cd __test_wheel__ - cp -r ../tests . - python -m venv .venv - bindir=bin - if [ "$RUNNER_OS" = "Windows" ]; then - bindir=Scripts - fi - ./.venv/$bindir/pip install pytest pytest_asyncio grpcio pydantic opentelemetry-api opentelemetry-sdk python-dateutil 'openai-agents>=0.2.3,<=0.2.9' 'googleapis-common-protos==1.70.0' - ./.venv/$bindir/pip install --prefer-binary ../dist/*.whl - ./.venv/$bindir/python -m pytest -s -k test_workflow_hello - - # Upload dist - - uses: actions/upload-artifact@v4 - with: - name: packages-${{ matrix.package-suffix }} - path: dist diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000000..3b247f0102 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,16 @@ +name: Changelog + +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + +permissions: + contents: read + pull-requests: read + +jobs: + changelog-check: + name: Changelog checkpoint + uses: temporalio/.github/.github/workflows/changelog-fragments.yml@f2a689950aa8b18272aa57f6007fe9cec46b9f47 + with: + sdk-rust-path: temporalio/bridge/sdk-core diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af1f916e4d..9e3f5e2daa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,50 +16,42 @@ env: jobs: # Build and test the project build-lint-test: - timeout-minutes: 30 + timeout-minutes: 60 strategy: fail-fast: false matrix: - python: ["3.10", "3.14"] - os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest] + python: ["3.11", "3.15"] + os: [ubuntu-latest, ubuntu-arm, macos-arm, windows-latest] include: - os: ubuntu-latest - python: "3.14" + python: "3.15" docsTarget: true - cloudTestTarget: true - openaiTestTarget: true clippyLinter: true - - os: ubuntu-latest - python: "3.10" - protoCheckTarget: true - - python: "3.10" - pytestExtraArgs: "--reruns 3 --only-rerun \"RuntimeError: Failed validating workflow\"" - os: ubuntu-arm runsOn: ubuntu-24.04-arm64-2-core - - os: macos-intel - runsOn: macos-15-intel - os: macos-arm runsOn: macos-latest runs-on: ${{ matrix.runsOn || matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: submodules: recursive - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: components: "clippy" - - uses: Swatinem/rust-cache@v2 - with: - workspaces: temporalio/bridge -> target - - uses: actions/setup-python@v5 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: python-version: ${{ matrix.pythonOverride || matrix.python }} - - uses: arduino/setup-protoc@v3 + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: temporalio/bridge -> target + key: ${{ env.pythonLocation }} + - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # 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 + - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8 - run: uv tool install poethepoet - run: uv sync --all-extras - run: poe bridge-lint @@ -68,50 +60,17 @@ 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 - # 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 }} + timeout-minutes: 20 + - run: poe test ${{matrix.pytestExtraArgs}} -s --workflow-environment time-skipping-v2 --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping-v2.xml + timeout-minutes: 20 - name: "Upload junit-xml artifacts" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 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.10 "protobuf<4" - uv sync --all-extras - poe build-develop - poe gen-protos - [[ -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 }} @@ -124,50 +83,274 @@ jobs: run: npx vercel deploy build/apidocs -t ${{ secrets.VERCEL_TOKEN }} --prod --yes # Confirm README ToC is generated properly - - uses: actions/setup-node@v4 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 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: + + # Verify the optional FIPS build: the Rust core must link aws-lc-fips-sys + # (aws-lc-rs FIPS mode) and must NOT link `ring` (the cargo-tree guard, ported + # from sdk-ruby PR #466's `fips_tree` guard); then run the test suite against the + # FIPS binary and build the release wheel. + fips-build: + timeout-minutes: 45 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + submodules: recursive + - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: "3.11" + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: temporalio/bridge -> target + key: fips-${{ env.pythonLocation }} + # aws-lc-fips-sys builds the validated AWS-LC module from source, which + # needs Go, CMake, Perl and a C compiler (see the FIPS Compliance section + # in the README). + - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 + with: + go-version: "1.24" + - name: Verify FIPS linkage (aws-lc-fips-sys present, ring absent) + working-directory: temporalio/bridge + run: | + set -uo pipefail + # Resolve the FIPS build's dependency graph once and query it for a + # single crate. `cargo tree -i ` ("invert") prints the chain of + # packages that pull in , or nothing if is not in the + # graph at all. We capture that output and decide PRESENT/ABSENT by + # whether the string is empty -- NOT by the exit code, because + # `cargo tree -i` exits 0 either way (an absent crate just prints + # "nothing to print" to stderr). Ported from sdk-ruby PR #466. + links_in_fips_build() { + cargo tree -p temporal-sdk-bridge --no-default-features --features fips -i "$1" 2>/dev/null + } + echo "== aws-lc-fips-sys must be PRESENT ==" + aws_lc_fips="$(links_in_fips_build aws-lc-fips-sys)" + if [ -z "$aws_lc_fips" ]; then + echo "ERROR: aws-lc-fips-sys is absent from the FIPS dependency tree" >&2 + exit 1 + fi + echo "$aws_lc_fips" + echo "== ring must be ABSENT ==" + ring="$(links_in_fips_build ring)" + if [ -n "$ring" ]; then + echo "ERROR: 'ring' is still linked in the FIPS build" >&2 + echo "$ring" >&2 + exit 1 + fi + echo "FIPS linkage verified: aws-lc-fips-sys linked, ring absent." + - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 + with: + version: "23.x" + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8 + - run: uv tool install poethepoet + - run: uv sync --all-extras + # Develop build so the FIPS extension is importable, then run the suite + # against it to confirm the aws-lc-rs stack works end to end (not just links). + - run: poe build-develop-fips + - name: Confirm the FIPS build is loaded + run: uv run python -c "from temporalio.bridge import temporal_sdk_bridge; assert temporal_sdk_bridge.FIPS, 'not a FIPS build'" + - run: mkdir junit-xml + - name: Run tests against the FIPS build + run: | + poe test --reruns 3 --only-rerun "RuntimeError: Failed validating workflow" -s --junit-xml=junit-xml/fips.xml + timeout-minutes: 15 + - name: "Upload junit-xml artifacts" + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + if: always() + with: + name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--fips + path: junit-xml + retention-days: 14 + - name: Build FIPS wheel (proves the release feature set compiles) + run: uv run maturin build --release --no-default-features --features fips + env: + TEMPORALIO_FIPS: "1" + + alpine-package-test: + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - cibw-build: cp311-musllinux_x86_64 + runsOn: ubuntu-latest + - cibw-build: cp311-musllinux_aarch64 + runsOn: ubuntu-24.04-arm64-2-core + runs-on: ${{ matrix.runsOn }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + submodules: recursive + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: "3.14" + - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8 + - run: uv sync --all-extras + - name: Build Alpine wheel + run: uv run cibuildwheel --output-dir dist + env: + CIBW_BUILD: ${{ matrix.cibw-build }} + - name: Test Alpine wheel + uses: ./.github/actions/alpine-package-smoke + with: + wheel-dir: dist + + check-protos: timeout-minutes: 30 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: submodules: recursive - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: - components: "clippy" - - uses: Swatinem/rust-cache@v2 + python-version: "3.11" + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: workspaces: temporalio/bridge -> target - - uses: actions/setup-python@v5 + key: ${{ env.pythonLocation }} + - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # 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@cec208311dfd045dd5311c1add060b2062131d57 # v8 + - run: uv tool install poethepoet + - run: uv sync --all-extras + - run: cargo install --locked nexgen --version 0.2.8 --features advanced --force + - run: poe build-develop + - run: poe gen-protos + - name: Check generation unchanged + run: | + [[ -z $(git status --porcelain temporalio tests) ]] || (git diff temporalio tests; echo "Protos changed"; exit 1) + - run: uv add --dev --python 3.11 "googleapis-common-protos==1.70.0" + - run: uv add --python 3.11 "protobuf==4.21.12" + - run: uv sync --all-extras + - run: poe build-develop + - name: Test with minimum protobuf runtime + run: poe test -s + + test-latest-deps: + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + submodules: recursive + - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable + with: + components: "clippy" + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: python-version: "3.13" - - uses: arduino/setup-protoc@v3 + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: temporalio/bridge -> target + key: ${{ env.pythonLocation }} + - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # 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 + - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8 - run: uv tool install poethepoet - run: uv lock --upgrade - run: uv sync --all-extras - run: poe build-develop - run: poe lint - run: mkdir junit-xml - - run: poe test -s --junit-xml=junit-xml/latest-deps.xml - timeout-minutes: 10 + - run: poe test -s --junit-xml=junit-xml/latest-deps.xml + timeout-minutes: 15 - name: "Upload junit-xml artifacts" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 if: always() with: name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--latest-deps--time-skipping path: junit-xml retention-days: 14 + # Run the test suite against Temporal Cloud (skipped on forks and Dependabot-triggered runs) + cloud-test: + if: ${{ github.actor != 'dependabot[bot]' && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }} + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + submodules: recursive + - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: "3.14" + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: temporalio/bridge -> target + key: ${{ env.pythonLocation }} + - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # 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@cec208311dfd045dd5311c1add060b2062131d57 # v8 + - run: uv tool install poethepoet + - run: uv sync --all-extras + - run: poe build-develop + - name: Generate Cloud test certificates + run: | + cert_dir="$RUNNER_TEMP/cloud-test-certs" + mkdir "$cert_dir" + openssl req -x509 -newkey rsa:2048 -nodes -days 1 \ + -keyout "$cert_dir/ca.key" -out "$cert_dir/ca.pem" \ + -subj '/CN=Temporal Python SDK Cloud CI CA' + openssl req -newkey rsa:2048 -nodes \ + -keyout "$cert_dir/client.key" -out "$cert_dir/client.csr" \ + -subj '/CN=Temporal Python SDK Cloud CI' + openssl x509 -req -days 1 -in "$cert_dir/client.csr" \ + -CA "$cert_dir/ca.pem" -CAkey "$cert_dir/ca.key" -CAcreateserial \ + -out "$cert_dir/client.pem" -extfile <(printf 'extendedKeyUsage=clientAuth') + { + echo "TEMPORAL_CLOUD_CLIENT_CA_PATH=$cert_dir/ca.pem" + echo "TEMPORAL_TLS_CLIENT_CERT_PATH=$cert_dir/client.pem" + echo "TEMPORAL_TLS_CLIENT_KEY_PATH=$cert_dir/client.key" + } >> "$GITHUB_ENV" + - name: Create Cloud namespace + id: create-cloud-namespace + run: uv run python .github/scripts/cloud_namespace.py create + env: + TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }} + TEMPORAL_CLIENT_CLOUD_API_VERSION: v0.19.1 + - run: mkdir junit-xml + - run: poe test -s --workflow-environment envconfig --junit-xml=junit-xml/cloud.xml + timeout-minutes: 15 + env: + TEMPORAL_ADDRESS: ${{ steps.create-cloud-namespace.outputs.namespace }}.tmprl.cloud:7233 + TEMPORAL_NAMESPACE: ${{ steps.create-cloud-namespace.outputs.namespace }} + TEMPORAL_IS_CLOUD_TESTS: true + TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }} + TEMPORAL_CLIENT_CLOUD_API_VERSION: v0.19.1 + TEMPORAL_CLIENT_CLOUD_NAMESPACE: ${{ steps.create-cloud-namespace.outputs.namespace }} + - name: Delete Cloud namespace + if: ${{ always() && steps.create-cloud-namespace.outputs.namespace != '' }} + run: uv run python .github/scripts/cloud_namespace.py delete "${{ steps.create-cloud-namespace.outputs.namespace }}" + env: + TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }} + TEMPORAL_CLIENT_CLOUD_API_VERSION: v0.19.1 + - name: "Upload junit-xml artifacts" + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + if: always() + with: + name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--cloud + 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 @@ -175,3 +358,21 @@ jobs: python-repo-path: ${{github.event.pull_request.head.repo.full_name}} version: ${{github.event.pull_request.head.ref}} version-is-repo-ref: true + + # The single required status check for merging: a PR can merge only if every job in + # `needs` passed. + required-pr-checks: + name: Required PR Checks + # Without always(), this job would be skipped when a dependency fails, and GitHub + # treats a skipped required check as passing. + if: ${{ always() && github.event_name == 'pull_request' }} + needs: + - build-lint-test + - check-protos + - test-latest-deps + - cloud-test + runs-on: ubuntu-latest + steps: + - name: Fail if any check failed or was cancelled + if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} + run: exit 1 diff --git a/.github/workflows/label-issues.yml b/.github/workflows/label-issues.yml new file mode 100644 index 0000000000..ba3932e7be --- /dev/null +++ b/.github/workflows/label-issues.yml @@ -0,0 +1,12 @@ +name: Label issues with repository name + +on: + issues: + types: [opened] + +permissions: + issues: write + +jobs: + label: + uses: temporalio/.github/.github/workflows/label-issues.yml@main diff --git a/.github/workflows/nightly-throughput-stress.yml b/.github/workflows/nightly-throughput-stress.yml deleted file mode 100644 index b9a2314e0a..0000000000 --- a/.github/workflows/nightly-throughput-stress.yml +++ /dev/null @@ -1,220 +0,0 @@ -name: Nightly Throughput Stress - -on: - schedule: - # Run at 3 AM PST (11:00 UTC) - offset from existing nightly - - cron: '00 11 * * *' - workflow_dispatch: - inputs: - duration: - description: 'Test duration (e.g., 6h, 1h)' - required: false - default: '5h' - type: string - timeout: - description: 'Scenario timeout (should always be greater than duration)' - required: false - default: '5h30m' - type: string - job_timeout_minutes: - description: 'GitHub Actions job timeout in minutes' - required: false - default: 360 - type: number - is_experiment: - description: 'Mark this run as an experiment (excluded from nightly dashboards)' - required: false - default: false - type: boolean - -permissions: - contents: read - id-token: write - -env: - # Workflow configuration - TEST_DURATION: ${{ inputs.duration || vars.NIGHTLY_TEST_DURATION || '5h' }} - TEST_TIMEOUT: ${{ inputs.timeout || vars.NIGHTLY_TEST_TIMEOUT || '5h30m' }} - - # AWS S3 metrics upload ARN - AWS_S3_METRICS_UPLOAD_ROLE_ARN: ${{ vars.AWS_S3_METRICS_UPLOAD_ROLE_ARN }} - - # Logging and artifacts - WORKER_LOG_DIR: /tmp/throughput-stress-logs - - # Omes configuration - OMES_REPO: temporalio/omes - OMES_REF: main - RUN_ID: ${{ github.run_id }}-throughput-stress - - # Prometheus version - PROM_VERSION: "3.8.0" - - # Language - SDK_LANG: "python" - -jobs: - throughput-stress: - runs-on: ubuntu-latest-4-cores - timeout-minutes: ${{ fromJSON(inputs.job_timeout_minutes || vars.NIGHTLY_JOB_TIMEOUT_MINUTES || 360) }} - - steps: - - name: Print test configuration - run: | - echo "=== Throughput Stress Test Configuration ===" - echo "Duration: $TEST_DURATION" - echo "Timeout: $TEST_TIMEOUT" - echo "Run ID: $RUN_ID" - echo "==========================================" - - - name: Checkout SDK - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Checkout OMES - uses: actions/checkout@v4 - with: - repository: ${{ env.OMES_REPO }} - ref: ${{ env.OMES_REF }} - path: omes - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version-file: omes/go.mod - cache-dependency-path: omes/go.sum - - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - with: - workspaces: temporalio/bridge -> target - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.13" - - - name: Install protoc - uses: arduino/setup-protoc@v3 - with: - version: '23.x' - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup uv - uses: astral-sh/setup-uv@v5 - - - name: Install poethepoet - run: uv tool install poethepoet - - - name: Install dependencies - run: uv sync --all-extras - - - name: Build SDK - run: poe build-develop - - - name: Install Temporal CLI - uses: temporalio/setup-temporal@v0 - - - name: Install Prometheus - run: | - wget -q https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz - tar xzf prometheus-${PROM_VERSION}.linux-amd64.tar.gz - sudo mv prometheus-${PROM_VERSION}.linux-amd64/prometheus /usr/local/bin/ - prometheus --version - - - name: Setup log directory - run: mkdir -p $WORKER_LOG_DIR - - - name: Start Temporal Server - run: | - temporal server start-dev \ - --db-filename temporal-throughput-stress.sqlite \ - --sqlite-pragma journal_mode=WAL \ - --sqlite-pragma synchronous=OFF \ - --headless &> $WORKER_LOG_DIR/temporal-server.log & - - - name: Run throughput stress scenario with local SDK - working-directory: omes - run: | - # This makes the pipeline return the exit code of the first failing command - # Otherwise the output of the `tee` command will be used - # (which is troublesome when the scenario fails but the `tee` command succeeds) - set -o pipefail - - # Use run-scenario-with-worker to build and run in one step - # Pass the SDK directory as --version for local testing - # Note: The hardcoded values below match OMES defaults, except: - # - visibility-count-timeout: 5m (vs 3m default) - # to give CI a bit more time for visibility consistency - go run ./cmd run-scenario-with-worker \ - --scenario throughput_stress \ - --language $SDK_LANG \ - --version $(pwd)/.. \ - --run-id $RUN_ID \ - --duration $TEST_DURATION \ - --timeout $TEST_TIMEOUT \ - --max-concurrent 10 \ - --prom-listen-address 127.0.0.1:9091 \ - --worker-prom-listen-address 127.0.0.1:9092 \ - --prom-instance-addr 127.0.0.1:9090 \ - --prom-instance-config \ - --prom-export-worker-metrics $RUN_ID.parquet \ - --option internal-iterations=10 \ - --option continue-as-new-after-iterations=3 \ - --option sleep-time=1s \ - --option visibility-count-timeout=5m \ - --option min-throughput-per-hour=1000 \ - 2>&1 | tee $WORKER_LOG_DIR/scenario.log - - - name: Configure AWS credentials - if: always() - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ env.AWS_S3_METRICS_UPLOAD_ROLE_ARN }} - aws-region: us-west-2 - - - name: Upload metrics to S3 - if: always() - run: | - DATE=$(date +%Y-%m-%d) - IS_EXPERIMENT="false" - # Set as an experiment if we are not on the main branch or input as an experiment - if [[ "$GH_REF" != "refs/heads/main" || "$IS_EXPERIMENT_INPUT" == "true" ]]; then - IS_EXPERIMENT="true" - fi - echo "Uploading metrics: is_experiment=$IS_EXPERIMENT, language=$SDK_LANG, date=$DATE" - aws s3 cp omes/$RUN_ID.parquet \ - "s3://cloud-data-ingest-prod/github/sdk_load_test/is_experiment=$IS_EXPERIMENT/language=$SDK_LANG/date=$DATE/$RUN_ID.parquet" - - - name: Upload logs on failure - if: failure() || cancelled() - uses: actions/upload-artifact@v4 - with: - name: throughput-stress-logs - path: ${{ env.WORKER_LOG_DIR }} - retention-days: 30 - - - name: Notify Slack on failure - if: failure() || cancelled() - uses: slackapi/slack-github-action@v2 - with: - webhook-type: incoming-webhook - payload: | - { - "text": "Nightly Python throughput stress test failed", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Nightly Throughput Stress Failed* :x:\n\n*Repository:* ${{ github.repository }}\n*Duration:* ${{ env.TEST_DURATION }}\n*Run:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Logs>\n*Triggered by:* ${{ github.event_name == 'schedule' && 'Scheduled' || github.actor }}" - } - } - ] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_SDK_ALERTS_WEBHOOK }} diff --git a/.github/workflows/omes.yml b/.github/workflows/omes.yml deleted file mode 100644 index 6afa925e1f..0000000000 --- a/.github/workflows/omes.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Omes Testing -on: - push: - branches: - - main - - "releases/*" - -permissions: - contents: read - packages: write - -jobs: - omes-image-build: - uses: temporalio/omes/.github/workflows/docker-images.yml@main - secrets: inherit - with: - lang: python - sdk-repo-url: ${{ github.event.pull_request.head.repo.full_name || 'temporalio/sdk-python' }} - sdk-repo-ref: ${{ github.event.pull_request.head.ref || github.ref }} - # TODO: Remove once we have a good way of cleaning up sha-based pushed images - docker-tag-ext: ci-latest - do-push: true diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml new file mode 100644 index 0000000000..0909652f48 --- /dev/null +++ b/.github/workflows/release-publish.yml @@ -0,0 +1,363 @@ +name: Release Publish +run-name: Release from main + +on: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: release-publish-${{ github.ref }} + cancel-in-progress: false + +jobs: + build_binaries: + name: Build binaries (${{ matrix.package-suffix }}) + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + package-suffix: linux-amd64 + cibw-build: cp311-manylinux_x86_64 + - os: ubuntu-arm + package-suffix: linux-aarch64 + cibw-build: cp311-manylinux_aarch64 + runsOn: ubuntu-24.04-arm64-2-core + - os: ubuntu-latest + package-suffix: linux-musl-amd64 + cibw-build: cp311-musllinux_x86_64 + - os: ubuntu-arm + package-suffix: linux-musl-aarch64 + cibw-build: cp311-musllinux_aarch64 + runsOn: ubuntu-24.04-arm64-2-core + - os: macos-intel + package-suffix: macos-amd64 + cibw-build: cp311-macosx_x86_64 + runsOn: macos-15-intel + - os: macos-arm + package-suffix: macos-aarch64 + cibw-build: cp311-macosx_arm64 + runsOn: macos-15 + - os: windows-latest + package-suffix: windows-amd64 + cibw-build: cp311-win_amd64 + runs-on: ${{ matrix.runsOn || matrix.os }} + permissions: + contents: read + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + ref: ${{ github.sha }} + submodules: recursive + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: "3.14" + + # Install Rust locally for non-Linux (Linux uses an internal docker + # command to build with cibuildwheel which uses rustup install defined + # in pyproject.toml) + - if: ${{ runner.os != 'Linux' }} + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable + - if: ${{ runner.os != 'Linux' }} + uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + cache-bin: false + workspaces: temporalio/bridge -> target + key: ${{ env.pythonLocation }} + - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8 + - run: uv sync --all-extras + + # Add the source dist only for Linux x64 for now + - if: ${{ matrix.package-suffix == 'linux-amd64' }} + run: uv build --sdist + + # Build the wheel + - run: uv run cibuildwheel --output-dir dist + env: + CIBW_BUILD: ${{ matrix.cibw-build }} + + # Install the wheel in a new venv and run a test + - name: Test wheel + if: ${{ !contains(matrix.package-suffix, 'musl') }} + shell: bash + run: | + mkdir __test_wheel__ + cd __test_wheel__ + cp -r ../tests . + python -m venv .venv + bindir=bin + if [ "$RUNNER_OS" = "Windows" ]; then + bindir=Scripts + fi + ./.venv/$bindir/pip install pytest pytest_asyncio grpcio pydantic opentelemetry-api opentelemetry-sdk + ./.venv/$bindir/pip install --prefer-binary ../dist/*.whl + ./.venv/$bindir/python -m pytest -s tests/worker/test_workflow.py -k test_workflow_hello + + - name: Test Alpine wheel + if: ${{ contains(matrix.package-suffix, 'musl') }} + uses: ./.github/actions/alpine-package-smoke + with: + wheel-dir: dist + + # Upload dist + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: packages-${{ matrix.package-suffix }} + path: dist + + verify_artifacts: + name: Verify release artifacts + needs: build_binaries + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + actions: read + contents: read + outputs: + release_sha: ${{ steps.validate_versions.outputs.sha }} + version: ${{ steps.validate_versions.outputs.version }} + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + ref: ${{ github.sha }} + fetch-depth: 0 + submodules: recursive + - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable + - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 + with: + # Keep the generated Core protobuf code compatible with CI. + version: "23.x" + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: "3.11" + - name: Validate checked-in versions + id: validate_versions + run: | + set -euo pipefail + python .github/scripts/release_verify.py validate-version \ + --sha "$(git rev-parse HEAD)" \ + --github-output "$GITHUB_OUTPUT" + - name: Validate changelog release notes + run: | + set -euo pipefail + python .github/scripts/release_verify.py changelog-notes \ + --version "${{ steps.validate_versions.outputs.version }}" \ + --output /tmp/release-notes.md + - name: Download and flatten artifacts + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + mkdir artifacts dist + gh run download "$GITHUB_RUN_ID" \ + --repo "$GITHUB_REPOSITORY" \ + --dir artifacts \ + --pattern 'packages-*' + + while IFS= read -r -d '' file; do + dest="dist/$(basename "$file")" + if [[ -e "$dest" ]]; then + echo "Duplicate distribution filename: $(basename "$file")" >&2 + exit 1 + fi + cp "$file" "$dest" + done < <(find artifacts -type f \( -name '*.whl' -o -name '*.tar.gz' \) -print0) + - name: Verify release artifacts + env: + VERSION: ${{ steps.validate_versions.outputs.version }} + run: | + set -euo pipefail + python .github/scripts/release_verify.py verify-dist --version "$VERSION" + - name: Upload verified release artifact + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: release-dist-${{ steps.validate_versions.outputs.version }} + path: dist + if-no-files-found: error + retention-days: 14 + + publish_testpypi: + name: Publish to TestPyPI + needs: verify_artifacts + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: testpypi + permissions: + actions: read + contents: read + id-token: write + steps: + - name: Download verified release artifact + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ needs.verify_artifacts.outputs.version }} + run: | + set -euo pipefail + mkdir downloaded dist + gh run download "$GITHUB_RUN_ID" \ + --repo "$GITHUB_REPOSITORY" \ + --name "release-dist-$VERSION" \ + --dir downloaded + while IFS= read -r -d '' file; do + cp "$file" "dist/$(basename "$file")" + done < <(find downloaded -type f \( -name '*.whl' -o -name '*.tar.gz' \) -print0) + test "$(find dist -type f | wc -l)" -gt 0 + - name: Publish to TestPyPI + uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 + with: + packages-dir: dist/ + repository-url: https://test.pypi.org/legacy/ + skip-existing: true + + smoke_testpypi: + name: Smoke test TestPyPI package + needs: + - verify_artifacts + - publish_testpypi + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: ./.github/actions/release-smoke-package + with: + version: ${{ needs.verify_artifacts.outputs.version }} + index-url: https://test.pypi.org/simple/ + dependency-index-url: https://pypi.org/simple/ + + smoke_testpypi_alpine: + name: Smoke test TestPyPI package on Alpine (${{ matrix.arch }}) + needs: + - verify_artifacts + - publish_testpypi + strategy: + fail-fast: false + matrix: + include: + - arch: x64 + runsOn: ubuntu-latest + - arch: arm64 + runsOn: ubuntu-24.04-arm64-2-core + runs-on: ${{ matrix.runsOn }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - name: Install and load package + uses: ./.github/actions/alpine-package-smoke + with: + version: ${{ needs.verify_artifacts.outputs.version }} + index-url: https://test.pypi.org/simple/ + dependency-index-url: https://pypi.org/simple/ + + publish_pypi: + name: Publish to PyPI + needs: + - verify_artifacts + - smoke_testpypi + - smoke_testpypi_alpine + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: pypi + permissions: + actions: read + contents: read + id-token: write + steps: + - name: Download verified release artifact + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ needs.verify_artifacts.outputs.version }} + run: | + set -euo pipefail + mkdir downloaded dist + gh run download "$GITHUB_RUN_ID" \ + --repo "$GITHUB_REPOSITORY" \ + --name "release-dist-$VERSION" \ + --dir downloaded + while IFS= read -r -d '' file; do + cp "$file" "dist/$(basename "$file")" + done < <(find downloaded -type f \( -name '*.whl' -o -name '*.tar.gz' \) -print0) + test "$(find dist -type f | wc -l)" -gt 0 + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 + with: + packages-dir: dist/ + + smoke_pypi: + name: Smoke test PyPI package + needs: + - verify_artifacts + - publish_pypi + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: ./.github/actions/release-smoke-package + with: + version: ${{ needs.verify_artifacts.outputs.version }} + index-url: https://pypi.org/simple/ + + smoke_pypi_alpine: + name: Smoke test PyPI package on Alpine (${{ matrix.arch }}) + needs: + - verify_artifacts + - publish_pypi + strategy: + fail-fast: false + matrix: + include: + - arch: x64 + runsOn: ubuntu-latest + - arch: arm64 + runsOn: ubuntu-24.04-arm64-2-core + runs-on: ${{ matrix.runsOn }} + timeout-minutes: 10 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - name: Install and load package + uses: ./.github/actions/alpine-package-smoke + with: + version: ${{ needs.verify_artifacts.outputs.version }} + index-url: https://pypi.org/simple/ + + create_draft_release: + name: Create draft GitHub Release + needs: + - verify_artifacts + - smoke_pypi + - smoke_pypi_alpine + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: write + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + ref: ${{ needs.verify_artifacts.outputs.release_sha }} + fetch-depth: 0 + submodules: recursive + - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable + - name: Build changelog release notes + env: + VERSION: ${{ needs.verify_artifacts.outputs.version }} + run: | + set -euo pipefail + python3 .github/scripts/release_verify.py changelog-notes \ + --version "$VERSION" \ + --output release-notes.md + - name: Create draft release with generated notes + env: + GH_TOKEN: ${{ github.token }} + RELEASE_SHA: ${{ needs.verify_artifacts.outputs.release_sha }} + VERSION: ${{ needs.verify_artifacts.outputs.version }} + run: | + set -euo pipefail + gh release create "$VERSION" \ + --repo "$GITHUB_REPOSITORY" \ + --target "$RELEASE_SHA" \ + --title "$VERSION" \ + --draft \ + --notes-file release-notes.md \ + --generate-notes diff --git a/.github/workflows/run-bench.yml b/.github/workflows/run-bench.yml index 7f108e1db2..26e0b4759e 100644 --- a/.github/workflows/run-bench.yml +++ b/.github/workflows/run-bench.yml @@ -29,25 +29,27 @@ jobs: runs-on: ${{ matrix.os }} steps: # Prepare - - uses: actions/checkout@v4 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: submodules: recursive - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: stable - - uses: Swatinem/rust-cache@v2 - with: - workspaces: temporalio/bridge -> target - - uses: actions/setup-python@v5 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: python-version: "3.13" - - uses: arduino/setup-protoc@v3 + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + cache-bin: false + workspaces: temporalio/bridge -> target + key: ${{ env.pythonLocation }} + - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # 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 + - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8 # Build - run: uv tool install poethepoet - run: uv sync --all-extras diff --git a/.github/workflows/sdk-sentinel-pr-responder.yml b/.github/workflows/sdk-sentinel-pr-responder.yml new file mode 100644 index 0000000000..60c19a2ae4 --- /dev/null +++ b/.github/workflows/sdk-sentinel-pr-responder.yml @@ -0,0 +1,57 @@ +name: SDK Sentinel PR responder relay + +on: + issue_comment: + types: [created] + +permissions: {} + +jobs: + relay: + if: >- + github.event.issue.pull_request && + github.event.comment.user.login != 'sdk-sentinel-bot' && + contains(github.event.comment.body, '@sdk-sentinel-bot') && + contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association) + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Mint a Sentinel-only dispatch token from the Relay App + id: dispatch-token + uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2 + with: + app-id: ${{ vars.SDK_SENTINEL_RELAY_APP_ID }} + private-key: ${{ secrets.SDK_SENTINEL_RELAY_PRIVATE_KEY }} + owner: temporalio + repositories: sdk-sentinel + permission-actions: write + permission-metadata: read + - name: Verify the Sentinel Relay installation + env: + ACTUAL_APP_SLUG: ${{ steps.dispatch-token.outputs.app-slug }} + ACTUAL_INSTALLATION_ID: ${{ steps.dispatch-token.outputs.installation-id }} + EXPECTED_INSTALLATION_ID: ${{ vars.SDK_SENTINEL_RELAY_INSTALLATION_ID }} + run: | + test "$ACTUAL_APP_SLUG" = sdk-sentinel-relay + test "$ACTUAL_INSTALLATION_ID" = "$EXPECTED_INSTALLATION_ID" + - name: Dispatch the trusted central responder + env: + COMMENT_ID: ${{ github.event.comment.id }} + DISPATCH_TOKEN: ${{ steps.dispatch-token.outputs.token }} + PR_NUMBER: ${{ github.event.issue.number }} + TARGET_ID: python + run: | + payload="$( + jq -cn \ + --arg target "$TARGET_ID" \ + --arg pr_number "$PR_NUMBER" \ + --arg comment_id "$COMMENT_ID" \ + '{ref:"main",inputs:{target:$target,pr_number:$pr_number,comment_id:$comment_id}}' + )" + curl --fail --silent --show-error \ + --request POST \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: Bearer $DISPATCH_TOKEN" \ + --header "X-GitHub-Api-Version: 2022-11-28" \ + --data "$payload" \ + https://api.github.com/repos/temporalio/sdk-sentinel/actions/workflows/sdk-pr-responder.yml/dispatches diff --git a/.gitignore b/.gitignore index c3447e5d19..8cd439e052 100644 --- a/.gitignore +++ b/.gitignore @@ -2,12 +2,16 @@ __pycache__ /build /dist +temporalio/bridge/libtemporal_sdk_bridge.dylib.dSYM/ temporalio/bridge/target/ temporalio/bridge/temporal_sdk_bridge* /tests/helpers/golangserver/golangserver /tests/helpers/golangworker/golangworker /.idea /sdk-python.iml +**/CLAUDE.md /.zed *.DS_Store tags +/.claude +tmpclaude-* diff --git a/.gitmodules b/.gitmodules index ba2ba964af..a4c9116312 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "sdk-core"] path = temporalio/bridge/sdk-core - url = https://github.com/temporalio/sdk-core.git + url = https://github.com/temporalio/sdk-rust.git diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..07e2962ef3 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,137 @@ +# Contributor Guidance for `sdk-python` + +This repository provides the Temporal Python SDK, including Python packages, +tests, optional integrations, and the Rust bridge used by the SDK. Use this +document as a quick reference when submitting pull requests. + +## Requirements for coding agents + +* Prefer the repo's Poe tasks over invoking underlying tools directly. Use + `poe test`, `poe lint`, `poe format`, `poe build-develop`, and + `poe bridge-lint` unless there is a specific reason to run a lower-level + command. +* If you are about to run tests, you do not need to run a build separately first + unless Rust bridge changes need a fresh editable extension. For bridge changes, + run `poe build-develop` before Python tests that import `temporalio`. +* Use targeted tests while iterating. `poe test -s -k ` is preferred for + a small behavioral change; run broader tests only when the change affects + shared behavior. +* Do not use `--log-cli-level` by default. The pytest configuration shows logs + for failed tests at the end without streaming all logs for passing tests. +* Tests that use the workflow environment may start a local Temporal dev server + and may download a test server binary on first run. Unit tests that do not use + the workflow environment do not start a server. +* Time-skipping V1 tests are run with `poe test -s --workflow-environment + time-skipping-v1`. Time-skipping V1 does not work on Linux ARM or Windows ARM. +* Time-skipping V2 tests are run with `poe test -s --workflow-environment + time-skipping-v2`. Time-skipping V2 works on both Linux ARM and Windows ARM. +* It is extremely important that comments explain why something is necessary, + not what the code already says. Avoid comments unless they clarify nonobvious + behavior. +* Avoid broad refactors, style churn, or unrelated cleanups in behavior changes. +* Avoid unqualified imports from `temporalio` packages except `temporalio.types`. + Relative imports are acceptable for private packages. +* Do not commit `uv.lock` or `pyproject.toml` changes created only for temporary + protobuf downgrade workflows. Use `poe gen-protos` for generation; uv manages + its isolated tool environment. + +## Repo Specific Utilities + +* Poe tasks are defined in `pyproject.toml`: + * `poe build-develop` - build the Rust extension in editable debug mode. + * `poe test` - run pytest in parallel with the default workflow environment. + * `poe lint` - run import checks, formatting checks, type checks, and + docstyle. + * `poe lint-types` - run pyright, mypy, and basedpyright. + * `poe bridge-lint` - run clippy for the Rust bridge. + * `poe update-core` - update the Core pin and import its changelog fragments. + * `poe format` - run Ruff import sorting, Ruff formatting, and `cargo fmt` for + the bridge. + * `poe gen-protos` - regenerate protobuf-related files with a uv-managed tool + environment, as documented in `README.md`. + +## Building and Testing + +The common local commands are: + +```bash +uv sync --all-extras +poe build-develop +poe lint +poe test +poe test -s --workflow-environment time-skipping +``` + +For focused iteration, prefer: + +```bash +poe test -s -k +uv run pytest tests/path/test_file.py::test_name +``` + +For release artifacts, use `uv build`. Documentation can be generated with +`poe gen-docs`. + +## Expectations for Pull Requests + +* Format and lint code before submitting. +* Include tests for behavior changes. +* Update public API documentation or doc comments for public behavior changes. +* For user-facing changes, add a Markdown fragment under `changelog//` + for each applicable category. Use `stabilized/` for features that are no longer + experimental. Use fun, whimsical, unique lowercase kebab-case + filenames, such as `giggling-teapot.md`. The folder supplies the category; + write only the release-note body, without a leading list marker (`-`). Keep + entries concise, ideally one or two sentences. Write each entry entirely on + one line: release tooling turns each nonempty line into a separate list item. + A fragment may contain multiple entries. See `changelog/README.md` for + the convention. + `CHANGELOG.md` contains completed releases and is assembled by release tooling. +* Keep commit messages short and in the imperative mood. +* Provide a clear PR description outlining what changed, why it changed, and + what validation was run. + +## Review Checklist + +Reviewers will look for: + +* CI passing, including build, lint, type checks, unit tests, and workflow + environment tests. +* Tests covering behavior changes. +* Clear and concise code following existing style. +* Public API documentation updates when behavior changes. +* No unrelated generated files, lockfile churn, or broad rewrites. + +## Where Things Are + +* `temporalio/` - Python SDK source. + * `temporalio/worker/` - worker implementation. + * `temporalio/converter/` - payload and failure conversion. + * `temporalio/testing/` - testing utilities. + * `temporalio/nexus/` - Nexus support. + * `temporalio/contrib/` - optional integrations. + * `temporalio/bridge/` - Rust bridge and generated bridge bindings. +* `tests/` - pytest suites mirroring SDK areas. +* `scripts/` - generation, documentation, and helper scripts. +* `changelog/` - pending per-PR release notes in category folders. +* `build/apidocs/` - generated API documentation. +* `dist/` - built wheels and source distributions. +* `temporalio/bridge/target/` - Rust build output. You should not need to inspect + this directory. + +## Notes + +* The SDK supports Python 3.11 through 3.15. +* Generated protobuf and bridge files have specific regeneration workflows; see + `README.md` before changing them. +* The Rust bridge uses SDK Core from `temporalio/bridge/sdk-core`. +* Update Core with `poe update-core`, which invokes the shared command documented in + `CONTRIBUTING.md` under "Updating SDK Core". It updates the submodule and imports + Core's user-facing changelog entries into category fragments. Review and commit the new Core pin + and generated fragments together; do not update the pin and defer its notes + until release time. The Python task copies Core path dependency versions from the new checkout + and refreshes the bridge lockfile; review both and check Rust API compatibility as needed. + If Core protobuf definitions changed, run `poe gen-protos` and commit the + regenerated bindings with the pin update. +* `__pycache__`, `build`, `dist`, and Rust `target` outputs are generated + artifacts and should not be reviewed as source changes. diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..a4604c4b51 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,613 @@ + + +# Changelog + +## [1.36.1] - 2026-11-13 + +### Changed + +- Disable single-batch workflow activation processing (workflow logic flag 2) by default to preserve legacy signal, condition-wait, and cancellation behavior for unflagged workflows. Histories that already recorded flag 2 continue to use single-batch processing. + +## [1.36.0] - 2026-11-10 + +### Added + +- Add experimental Nexus Handler Callbacks for standalone Nexus operations through `NexusClient.start_operation`. Use `temporalio.nexus.create_completion_callback` to send the result or failure and source context to a Nexus handler. + +- Workers that don't configure poller behavior now auto-enroll in poller autoscaling when the server enables it (`frontend.pollerAutoscalingAutoEnroll`); otherwise they keep using a fixed 5-poller maximum. + +- Add experimental envconfig extensions: `ClientConfig.load_client_connect_config` accepts `extensions` that read their own config from `profile..ext.` TOML tables (exposed as `ClientConfigProfile.ext` and never rejected by strict mode) and env vars, and contribute client plugins to the returned config's `plugins`. + +- Core: A local activity's `ActivityTask.Start` has `workflow_task` (field 21), with the started event id, attempt and start time of the workflow task in which Core dispatched it. `workflow_task` also has `previous_started_event_id`, `previous_attempt` and `previous_started_time`, which name the run's last completed workflow task, and `failed_tasks`, the started event ids of the run's last 100 failed or timed out workflow tasks. Retries that Core runs locally keep the value. Core leaves it unset for other activities. +- Core: Client environment config profiles include the raw TOML tables under `profile..ext`, keyed by extension name, for SDK envconfig extensions. Strict mode accepts any content under `ext`. The C bridge's profile JSON includes them as an `ext` object, with TOML datetimes as strings. + +- Client and worker plugins have a new `Plugin.version()` method. Worker plugins report it in worker heartbeats; override it or pass `version` to `SimplePlugin`. + +- Add Python 3.15 support. + +- Nexus operation handlers now propagate their `NexusSerializationContext` to the workflow updates they send, which encode their result, failure and rejection with it. Update handles decode them with the context the server returns. Requires a server that propagates the context. + +- Nexus operation handlers now propagate their `NexusSerializationContext` to the workflows and standalone activities they start, which encode their results and failures (and a standalone activity's heartbeat details) with it because these are returned to the Nexus caller. Clients decode them with the context the server returns, including handles obtained by ID and standalone Nexus operation handles. Requires a server that propagates the context. +- Added `activity.Info.nexus_serialization_context`. To complete a Nexus-started standalone activity asynchronously, pass it to `AsyncActivityHandle.with_context`. + +- Warn when `asyncio.TaskGroup` is created in a sandboxed workflow because its non-deterministic task cancellation order can cause replay failures. + +### Changed + +- Core: Poller pools now report their poller target to the server on each poll and in the worker heartbeat: the current target for autoscaling pools, the configured maximum for fixed-size pools. (We'll use this count on the server side for now for load balancing pollers between workers, and for creating a per-worker poller count metric.) + +- Process workflow activation jobs as a single batch by default (workflow logic flag 2), so signal and update handlers no longer run before other jobs delivered in the same workflow task, such as the random seed update after a reset. Histories that record this flag replay with the new ordering only on SDK 1.31.0 or later. +- Cancelling a Nexus operation handle after its synchronous response has already arrived now raises `CancelledError` when the handle is awaited, matching activities, instead of returning the result. + +- Update the `langsmith` extra to require `temporalio-langsmith>=0.1.1`. + +### :boom: Breaking Changes + +- Drop Python 3.10 support; Python 3.11 or newer is now required. + +- The workflow sandbox now restricts `time.clock_gettime()` and `time.clock_gettime_ns()` at runtime, like `time.time()` and `time.monotonic()`. Calling them from workflow code raises `RestrictedWorkflowAccessError`. + +- Experimental: a Temporal operation handler can now send only one signal (including signal-with-start) per invocation; a second raises a `BAD_REQUEST` error, unless the first signal failed. Signals from other Nexus operation handlers are not limited. + +- Core: Core now rejects activation responses with a nondeterminism error if the activation contained only updates and the response rejects every update but also includes another workflow command. SDKs must return only update rejections when all validators reject an update-only activation. + +- Regenerate Python bindings with grpcio-tools 1.49.1. The SDK now requires protobuf >=4.21.12 (protobuf 3 is no longer supported), and the optional grpc extra requires grpcio >=1.49.1. + +### Fixed + +- `temporalio.contrib.pydantic`: setting `ToJsonOptions` on the Pydantic payload converter no longer drops field aliases or serializes `inf`/`nan` as `null`; the JSON output now matches the default converter apart from the options themselves. + +- Core: Downloading an ephemeral dev or test server binary now retries transient HTTP failures, such as a `503` returned while a release is rolling out, with backoff instead of failing on the first attempt. + +- Fix the payload converter and failure converter losing their serialization context when external storage is configured. A converter that implements WithSerializationContext now gets the workflow, activity or other context whether or not external storage is enabled. + +- `temporalio.contrib.aws.lambda_worker`: `shutdown_hooks` now run before configuration teardown when an invocation fails or is cancelled after configuration setup succeeds, including task queue validation failures. + +- `temporalio.contrib.aws.lambda_worker.otel.apply_defaults` now creates its tracer provider once per process, so warm Lambda invocations no longer leak an OTLP span exporter thread and gRPC channel each time. + +- Core: A workflow task failure reported with the cause `WORKFLOW_TASK_FAILED_CAUSE_EXTERNAL_STORAGE_FAILURE` is now counted on `workflow_task_execution_failed` with `failure_reason="ExternalStorageError"`, matching activity failures with the storage cause. It was previously counted as `WorkflowError`. +- Core: Ephemeral dev and test servers now complete the automatic port reservation handshake on Linux and macOS before starting, preventing intermittent address-in-use errors during TCP teardown. +- Core: Resource-based worker tuners now read CPU usage and quotas from standard cgroup v1 mounts. Workers on cgroup v1 systems no longer fall back to host CPU usage and admit work based on understated container load. + +- `asyncio.sleep()`, `asyncio.wait_for()` and other asyncio timers no longer reuse the `timeout_summary` and Event Groups of an earlier `workflow.wait_condition()` call in the same task. + +- Fix `contrib.opentelemetry` `MetricsExporter` recording a metric under another metric's instrument or another attribute set's labels when instruments or attributes are created per call. It cached them by `id()`, which Python reuses once an object is freed. + +- Calling `Worker.run()` again on the same worker now raises `RuntimeError("Already started")` instead of a bridge panic. + +- Keep an empty TLS table when `ClientConfigProfile` and `ClientConfig` are converted to and from dictionaries, so a profile that enables TLS with default settings does not lose it. + +- Workflow workers without a payload codec or external storage skip the payload codec passes and the per-command serialization-context lookups on every activation and completion, restoring the workflow task and replay performance lost since 1.23. + +- Fix OpenTelemetryPlugin dropping the worker-side span for a rejected update or a failed query. An exception from an update validator or query handler does not fail the workflow task, so its span is now ended and exported with an error status. + +- Experimental: signals and signal-with-start sent from a Temporal operation handler now reuse the Nexus operation request ID, so a retried Nexus task no longer delivers the same signal twice. + +- Fix OpenTelemetry logger attribute typing and logger-provider test collection with OpenTelemetry 1.45 and newer by accepting string-keyed mappings without restricting attribute value types. + +- Core: Preserve queued queries across workflow eviction so requests for the same run are answered instead of silently dropped. +- Core: Rejection-only update tasks no longer dispatch local activities resumed from replay before validation, allowing those tasks to remain unrecorded in workflow history. +- Core: Preparing a legacy query now remains in replay mode, preventing unrecorded local activity attempts that could execute twice or leave the workflow stuck. + +- Fix argument conversion for activity methods that annotate `self` with `Self`. + +## [1.35.0] - 2026-10-28 + +### Added + +- Nexus links now convert to and from `Link.Callback` instead of raising `NotImplementedError`. + +- Add an experimental Google Cloud Storage external payload storage driver with an optional async `gcloud-aio-storage` adapter. + +- Add experimental notification service models in `temporalio.nexus.notifications`. The SDK does not currently use these models. + +- Worker now warns when an activity method is registered from the class instead of from an instance (i.e. its first parameter is an unbound `self`). + +- Add experimental `versioning_override` to `workflow.start_child_workflow` and `workflow.execute_child_workflow` to override inherited parent versioning, and `common.OneTimeVersioningOverride` to route an execution to a deployment version until its first completed workflow task. Child overrides require Temporal Server 1.32 or newer; invalid child overrides raise `exceptions.InvalidVersioningOverrideError`. + +- Workers and clients can now read external storage reference payloads that were encoded with the configured payload codec and marked with `__temporal_external_storage_reference` metadata. This release does not write encoded references yet; a later release will, so upgrade all workers before then. + +- `WorkflowEnvironment.start_time_skipping_v2()` starts a Temporal CLI dev server with per-workflow virtual-clock time skipping, the eventual replacement to the global-clock Java test server returned by `start_time_skipping()`. +- `TimeSkipper(client, config=TimeSkippingConfig(...))` from `temporalio.testing` wraps an existing `Client` with per-workflow time skipping for use outside the test environment. + +- Core: Child workflow commands, including those submitted through the C bridge, support pinned, auto-upgrade, and one-time worker deployment versioning overrides on Temporal Server 1.32.0 or later. Child-start resolutions distinguish invalid versioning overrides and missing namespaces from other start failures. + +- Expose `connect_timeout` on `Client.connect` and `ConnectConfig` to bound TCP connection attempts independently of RPC timeouts. The default remains unset. + +- `workflow.new_random()` accepts an optional `name` that is mixed into the seed, so differently named generators, and `workflow.random()`, produce different sequences. + +- Add startup timeout options to `WorkflowEnvironment.start_local` and `WorkflowEnvironment.start_time_skipping` to configure how long to wait for the server to become ready after spawning. + +### Stabilized + +- Removed experimental labels from the core plugin APIs. + +### Changed + +- Payload converters exposed by data converters and workflow/activity accessors retain transfer type conversion, so direct use behaves consistently with SDK serialization. + +### :boom: Breaking Changes + +- `SchedulePolicy.catchup_window` now defaults to `None`. An unspecified window will use the server configured default. + +- **Experimental**: Nexus Workflow Updates now require `wait_for_stage` to be explicitly set to `ACCEPTED`. + +- The Deep Agents, Google ADK, Google GenAI, LangGraph, LangSmith, and Strands Agents integrations have moved to independently versioned packages in [`temporalio/ai-integrations`](https://github.com/temporalio/ai-integrations). The existing SDK extras install the corresponding standalone packages and public `temporalio.contrib` imports forward their APIs; new code should depend on the standalone packages and use their `temporalio.` imports directly. + +- The OpenAI Agents integration has moved to the independently versioned [`temporalio-openai-agents`](https://pypi.org/project/temporalio-openai-agents/) package. The existing `temporalio[openai-agents]` extra now installs that package, and the old public `temporalio.contrib.openai_agents` imports remain available at runtime and retain their static type information. New code should depend on `temporalio-openai-agents` directly and import `temporalio.openai_agents`. + +- `temporalio.contrib.google_adk_agents`: ADK-generated ids and retry jitter now draw from a workflow-private deterministic stream (a `workflow.new_random()` per run) instead of `workflow.random()`. A workflow started under 1.34.0 that generated ADK ids or jitter (for example one waiting on a HITL response) may not replay deterministically across this upgrade; drain such workflows or use worker versioning. + +- Decorating an `async def` function with `@update_method.validator` or passing one as `validator` to `workflow.set_update_handler`/`set_dynamic_update_handler` now raises `ValueError`. Previously the validator was silently never run, so every update was accepted. + +- `temporalio.contrib.opentelemetry`: removed `TemporalIdGenerator.seed_span_id()` and `seed_trace_id()`. + +### Fixed + +- Fix `contrib.opentelemetry` `ReplaySafeLoggerProvider.get_logger()` raising `TypeError` with opentelemetry-api 1.45, where `Logger.enabled` became abstract. `enabled()` now returns `False` while replaying history events, matching `emit()`. + +- `contrib.google_adk_agents`: agents with an `output_schema` no longer fail every workflow task when calling the model. The schema type is now sent to the model activity as its JSON schema. Custom Pydantic schema generation is preserved. Integer-valued output enums are normalized to strings to match Google GenAI. + +- Core: Worker heartbeats now report correct task-slot and poller counts when using buffered or custom metrics backends, including the Python SDK's `MetricBuffer`. Previously these counts could remain `0` because heartbeat accounting depended on reading labels from backend-owned attributes. + +- Decode enums that mix in `str` or `int` (for example `class Color(str, Enum)`) to the enum instead of a list of characters or an error, and decode `dict` keys typed as an `int` enum. + +- System Nexus operations without an operation-specific serialization context no longer give custom payload and failure converters the calling workflow's context. + +- `temporalio.contrib.strands` activity and MCP tools now give the model the Activity's failure message and expose its exception to after-tool hooks. + +- Cancelling a workflow, or the task awaiting `ExternalWorkflowHandle.cancel()`, before the external cancel request resolves no longer fails every following workflow task with `InvalidStateError`. + +- Preserve the result of augmented assignments such as `path /= "child"` in the workflow sandbox, while retaining restrictions on replacement objects. + +- Fixed Pydantic constraints being silently ignored inside or outside workflow sandboxes by passing through `annotated_types` by default. + +- Fix S3 external storage object names by preserving empty namespace segments and using namespace-scoped hash keys when names exceed 1,024 bytes. Document the read and bucket-listing permissions required for uploads. + +- Encoding a datetime search attribute without a timezone now raises `ValueError("Timezone must be present on all search attribute dates")` on the typed path, matching the deprecated untyped encoder, instead of sending a naive ISO string that the server rejects with `BadSearchAttributes`. + +- Core: A workflow task that arrives while a workflow waits on a local activity, such as a legacy query, now waits until the current workflow task is reported. Previously it replaced that workflow task ("Trying to send a new WFT for a run which already has one!"), which then timed out on the server and could leave the workflow stuck on a nondeterminism error. + +- Activity heartbeats are now recorded in the order they were sent. With a payload codec that is slow to encode, an older heartbeat could be recorded after a newer one, so a retried activity resumed from stale heartbeat details. + +- Fix `Worker.shutdown()` and `async with Worker(...)` hanging forever when worker validation fails, for example on a namespace that does not exist. `async with` now raises the validation error. + +- Exiting `async with Worker(...)` now waits for the code that plugins run after the Worker stops in `run_worker`, up to the new `plugin_shutdown_timeout` Worker option, instead of cancelling the task that entered the block. + +- A deserialized `ApplicationError` without a next retry delay now has `next_retry_delay` set to `None` instead of a zero `timedelta`. + +- Core: Workers now replay workflows paused before a scheduled task starts, allowing those workflows to make progress after unpause. + +- `temporalio.contrib.opentelemetry`: `TracingInterceptor` and `OpenTelemetryInterceptor` no longer log `Failed to detach context` when a context is torn down on a different thread while OpenTelemetry's threading instrumentation (enabled by strands, among others) is active; a context is now detached exactly when its token is still valid in the current `contextvars.Context`, which it stays when a workflow resumes on another pool thread. + +- Reject unsupported `InterpreterPoolExecutor` activity executors when creating a worker instead of failing during activity execution. + +- Setting `Worker.client` no longer raises "New client is not on the same runtime as the existing client" when both clients connected without a `runtime`, since both use the default runtime. The check now compares the runtime each client actually connected with. + +- Heartbeating an async activity through a task-token `AsyncActivityHandle` now raises `AsyncActivityCancelledError` with `reset=True` when the activity was reset, as handles created from IDs already did. + +- Keep whole-number `Double` values in typed search attributes returned by `list_workflows()` and other visibility results, instead of silently dropping them. + +- Stop `SandboxImportNotificationPolicy.WARN_ON_UNINTENTIONAL_PASSTHROUGH` and `RAISE_ON_UNINTENTIONAL_PASSTHROUGH` from flagging the module that defines the workflow, which the sandbox reloads on purpose. + +- Experimental Workflow Streams background publishing now retries transient signal delivery failures without delaying payload conversion errors. + +- Workflow wait conditions are no longer evaluated in a workflow task that only delivers updates and rejects all of them. + +- Preserve retained Workflow Stream items after workflow completion, failure, cancellation, termination, or timeout by draining them through read-only queries before subscriptions finish. +- Preserve the original Workflow Streams poll error when the follow-up execution description fails with an RPC error. + +- Prevent pending Nexus operations from logging "Task was destroyed but it is pending!" when a worker stops or evicts a workflow. + +- Cancelling a workflow or local activity while the local activity waits on its retry backoff timer now cancels the timer, instead of failing every workflow task with a `Missing associated machine for LocalActivity` nondeterminism error. + +- `WorkflowStreamClient.subscribe` now propagates task cancellation instead of ending the subscription normally. + +- Fix worker shutdown hanging when a Nexus task is cancelled while its failure is still being encoded. + +- Dropping a client or worker no longer stops log forwarding for the other clients and workers that share its `Runtime`. + +- If enabled, time skipping is applied to workflows started through `Client.start_update_with_start_workflow()` or `Client.execute_update_with_start_workflow()`. + +- `ActivityHandle.describe()` now returns `None` as the `expiration_time` of a Standalone Activity that has no schedule-to-close timeout, instead of a naive `datetime.min`. + +- Send a request ID when terminating a standalone activity, so a retried `ActivityHandle.terminate()` call no longer fails after the first attempt already terminated the activity. + +- Evicting a workflow while an activity or local activity cancellation is still unresolved no longer leaves the eviction retrying forever and worker shutdown hung, a regression in 1.33.0. + +- Fix Nexus worker shutdown hanging forever, and the task slot never being released, when a Nexus handler failure can not be converted or encoded, for example when the payload codec raises or the error details are not serializable. The worker now completes the task with an internal handler error. + +- A cancel that arrives while an activity's result or failure is still being encoded no longer interrupts the reporting, so the completion is still sent. + +- `GoogleAdkPlugin`'s deterministic providers now work in read-only contexts (query handlers, update validators), returning the workflow's deterministic time and fresh entropy without touching the workflow's random state. + +- Decoding a dataclass with `field(init=False)` fields no longer raises `TypeError`; those fields are left out of the constructor call and their serialized values are restored afterwards, including on frozen dataclasses. + +### Security + +- Updated Rust bridge dependencies, including `rustls` to 0.23.45 and `ringbuf` to 0.5.2 to address RUSTSEC-2026-0285 and RUSTSEC-2026-0293. + +- Core: Ephemeral server downloads now use `zip` 9.0 for ZIP extraction, replacing the 8.x dependency [yanked upstream for security issues](https://github.com/zip-rs/zip2/issues/1075#issuecomment-6209381974). + +## [1.34.0] - 2026-09-30 + +### Added + +- Added `WorkflowAlreadyStartedError.first_run_id` for the first execution run + ID when provided by the server. +- **Experimental**: `temporalio.contrib.google_adk_agents` now supports ADK v2 + graph workflows, dynamic `@node` workflows, and durable HITL. +- **Experimental**: Experimental support for _Event Groups_. **Event Groups** is a new form of + Workflow-level metadata that allows for improved visibility into a Workflow execution's history + by grouping logically related Events together based on user-defined or system-inferred criteria. + `workflow.create_event_group(...)` takes the Event Group's ID as its first and only required + argument; the user-provided ID is used verbatim and should not contain sensitive information. + The label is optional and passed as a keyword argument; it is a codec-encoded Payload. + +- Added `workflow.Info.original_execution_run_id`, the run ID recorded on the workflow + execution started event. Unlike `run_id`, this value is preserved across workflow resets. + +- **Experimental**: `temporalio.contrib.strands` now supports durable, + Workflow-isolated Strands sandboxes through `TemporalSandbox` and + worker-side factories registered with `StrandsPlugin(sandboxes=...)`. + +- Added the `temporalio.contrib.gcp.cloud_run.id` module with the `CloudRunIdPlugin` client plugin to set the worker identity on Cloud Run. + +### Changed + +- The `deepagents` extra now requires `deepagents>=0.7,<0.8` (was `<0.7`). Because + deepagents 0.7 requires `langsmith>=0.10.9`, the `langsmith` extra now allows + `langsmith<0.13` (was `<0.9`). + +### :boom: Breaking Changes + +- The `google-adk` extra now requires `google-adk>=2.8.0,<3`, up from `>=2.2.0`. +- `temporalio.contrib.google_adk_agents`: ADK-generated ids and retry jitter now draw from the + workflow's deterministic random stream. A workflow started under an earlier release that calls + `workflow.random()` or `workflow.uuid4()` after ADK code may not replay deterministically + across the upgrade; drain such workflows or use worker versioning. + +### Fixed + +- `temporalio.contrib.deepagents` now preserves model binding options such as + `response_format` and `tool_choice` when tools are also bound. +- Workflow handles returned when a start attaches to a running workflow now use + the server-provided first execution run ID with Temporal Server 1.32.0 or + later. +- Restore `frozenset` values when decoding JSON payloads with a `frozenset` type hint, + including nested frozen sets. + +- Ordinary absolute imports of already-loaded modules in sandboxed workflows no longer go through + importlib's module locks, fixing intermittent `Failed validating workflow` errors on Python 3.10 + caused by a `KeyError` in `importlib._bootstrap._ModuleLock.acquire` when a garbage-collection + finalizer imported `warnings` during a workflow load + ([#585](https://github.com/temporalio/sdk-python/issues/585)). +- `temporalio.contrib.deepagents.TemporalBackend` is fixed for deepagents 0.7 compatibility + (e.g., adding `delete` / `adelete`). +- `temporalio.contrib.deepagents.TemporalBackend` now forwards the per-command `timeout` of + deepagents' `execute` tool for a wrapped sandbox backend such as `LocalShellBackend`. +- `GoogleAdkPlugin` now passes the optional `anthropic`, `litellm`, and `openai` SDKs through + the workflow sandbox. +- `GoogleAdkPlugin` now passes OpenTelemetry modules through the workflow sandbox so ADK 2.9 + graph workflows can load their context support during execution. +- `contrib.deepagents`: prevent duplicate input messages after continue-as-new. +- `DataConverter.payload_converter` and current workflow and activity payload converter accessors + now return the configured converter without SDK-internal transfer type conversion. +- Restore pickling of Pydantic data converters, preserving the type adapter cache + size limit while excluding cached adapters. +- Current workflow and activity payload converter accessors now return the configured converter + without SDK-internal transfer type conversion. +- A Nexus operation's user metadata is now serialized with `NexusSerializationContext`, the same way + workflow and activity user metadata are serialized with theirs. This covers the static summary + sent when starting an operation, and the summary and details read back from a description. + +## [1.33.0] - 2026-09-14 + +### Added + +#### Standalone Activity operator commands + +- `ActivityHandle` now supports operator commands for standalone activities: `pause`, + `unpause`, `update_options` and `restore_original_options`. +- Added GCP Cloud Run serverless-worker OpenTelemetry plugin in `temporalio.contrib.opentelemetry`. +- Added new options to ActivityHandle.describe() to retrieve associated payloads, such as activity input and outcome. +- New properties and methods in ActivityExecution and ActivityExecutionDescription. +- Added experimental `temporalio.converter.NexusSerializationContext` support for Nexus callers + and handlers. Callers use it for inputs, results, and failures; handlers use it for inputs, + synchronous results, and failures. Asynchronous handler results and detached standalone handles + are not yet supported. Standalone `USE_EXISTING` handles use their start request's context. + +### Changed + +- Standalone Activities are now generally available (GA). (Standalone Activities as Nexus operations + and Standalone Activities operator commands remain experimental. Operator commands are `pause`, + `unpause`, `updateOptions`, `restoreOriginal`.) +- System Nexus Signal-with-Start Workflow operations now use the typed + `WorkflowOutboundInterceptor.start_signal_with_start_workflow` interception point instead of + the generic `WorkflowOutboundInterceptor.start_nexus_operation` method. +- System Nexus Signal-with-Start Workflow operations now invoke + `WorkflowOutboundInterceptor.start_system_nexus_operation` after their typed interception + point. They continue not to invoke `WorkflowOutboundInterceptor.start_nexus_operation`. +- The experimental `GetNexusOperationResultInput` now includes the Nexus endpoint, service, and + operation. + +### :boom: Breaking Changes + +- Experimental external storage: `ExternalStorage.driver_selector` is now called with a + `StorageDriverSelectContext` instead of a `StorageDriverStoreContext`. Update the annotation; + the new type carries the same `target` field. Since selectors are plain callables, a stale + annotation fails type checking rather than at runtime. +- `client.ActivityExecution` and `client.ActivityExecutionDescription` had some fields removed or renamed + to match RPC API. + - Dataclass parameters for these types were changed to `frozen=True, eq=False, kw_only=True`. + - `scheduled_time` was renamed `schedule_time`. + - `last_failure` was changed from field to method that runs data converter on demand. + - `state_transition_count`, `eager_execution_requested`, `paused` and `long_poll_token` were removed. +- ActivityHandle.describe() long-poll token was removed. The functionality can still be used manually + through raw gRPC API. + +### Fixed + +- `temporalio.contrib.google_genai` now requires `google-genai` 2.21.0 or later + and supports its file download API, including video inputs and download + destinations. +- `temporalio.contrib.deepagents` no longer dedups repeated identical tool, + model, and backend-op calls: each dispatch runs its own Activity, and the + continue-as-new result cache is retired for new executions (a continued run + resumes from the carried transcript and never re-executes prior dispatches, + so a carried cache entry could only serve stale results). Patch-gated + (`deepagents.retire-result-cache`), so histories recorded before this change + replay unchanged; note that deferring the patch keeps the full legacy dedup + cache — including the stale-result behavior this entry describes — and that + a chain upgraded mid-continue-as-new re-executes rather than reuses a + repeated identical call (the conservative direction). +- `contrib.deepagents`: summarization middleware configured with a model name string now routes its LLM calls through Activities instead of running them in the Workflow. + +- **Experimental**: External storage metrics now report the wall-clock time storage was in flight. + Previously each batch's duration was summed, over-reporting the time whenever storage operations + ran concurrently. +- System Nexus Signal-with-Start workflow operations now give custom payload + converters the target workflow's serialization context when encoding their + inner request payloads. +- Cancelling an activity from a signal while the workflow itself is cancelled + no longer causes a nondeterminism error from duplicate activity-cancellation + commands. +- `StrandsPlugin` now disables Botocore retries for its default Bedrock model so + model request retries are handled exclusively by Temporal. +- `temporalio.contrib.openai_agents` now honors the `retry-after-ms` and + `retry-after` headers when OpenAI returns `x-should-retry: true`. Previously + the delay the server asked for was discarded on that path and the activity + retried on its configured interval instead. +- Nexus-context workflow/activity starts no longer set `on_conflict_options` when there are no links + or callbacks to attach. +- The workflow sandbox now passes `pydantic_core` through by default, alongside `pydantic`. + +## [1.32.0] - 2026-08-24 + +### Added + +- Added `temporalio.converter.create_payload_validation_error` to create the + non-retryable application error used when a converted payload fails validation. +- Added experimental `temporalio.contrib.opentelemetry.ReplaySafeMeterProvider` and + `ReplaySafeLoggerProvider` (and exported `ReplaySafeTracerProvider`): wrap an + OpenTelemetry provider so metrics and log events recorded from workflow code (e.g. by + Google ADK) are not duplicated on replay. `GoogleAdkPlugin` warns when a global OTel + provider is not replay-safe. +- Added `LoggingConfig.format` to select compact, pretty, or newline-delimited JSON output for + Core logs written to the console. + +- Added the `Runtime(disable_environment_info=...)` option to control whether + runtime, hosting, and platform information is included in worker heartbeats. + +- `temporalio.workflow.uuid7()` generates a determinism-safe, time-sortable + UUIDv7 (RFC 9562) from workflow time and the workflow's deterministic random + generator, complementing the existing `workflow.uuid4()` + ([#1450](https://github.com/temporalio/sdk-python/issues/1450)). The + workflow sandbox now also restricts the non-deterministic `uuid.uuid7()` + added to the standard library in Python 3.14, matching the existing + `uuid.uuid1()`/`uuid.uuid4()` restrictions. +- **Experimental**: `TemporalOperationHandler` can now use Standalone Activities as asynchronous + Nexus Operation backing executions through `TemporalNexusClient.start_activity`. +- **Experimental**: `temporalio.contrib.openai_agents.temporal_worker_env_ref` names an environment + variable the worker reads for a hosted tool credential, keeping it out of workflow history. +- **Experimental**: `temporalio.contrib.openai_agents.TemporalWorkerEnvValue` names an environment + variable the worker reads for a sandbox environment value, keeping it out of workflow history. +- **Experimental**: `OpenAIAgentsPlugin(resolvable_worker_env_vars=...)` allowlists the environment + variable names a worker will read. +- **Experimental**: `temporalio.contrib.openai_agents.AllowAllWorkerEnvVars` allowlists every + environment variable name on the worker. +- Added Nexus operation link propagation for Workflow Queries issued from operation handlers. The + queried Workflow link returned by the server is attached to the caller's Nexus operation event. + +### Changed + +- The `opentelemetry` and `lambda-worker-otel` extras now require + `opentelemetry-api`/`opentelemetry-sdk` `>= 1.26`, matching what + `temporalio.contrib.opentelemetry` already required in practice. +- `temporalio.contrib.pydantic` converters now reuse Pydantic type adapters + for repeated type hints instead of rebuilding their schemas for every + payload, greatly speeding up decode of non-model hints such as discriminated + unions ([#1695](https://github.com/temporalio/sdk-python/issues/1695)). Up + to 1024 type adapters are cached per converter instance by default, with + least-recently-used eviction. To change the bound, pass + ``max_cached_type_adapters`` to ``PydanticPayloadConverter`` (or + ``PydanticJSONPlainPayloadConverter``) from a nullary subclass used as the + ``DataConverter.payload_converter_class``; ``None`` makes the cache + unbounded and zero disables caching. +- A data converter can now report that it understood a Nexus operation's input + but considers it invalid by raising a non-retryable `ApplicationError` of type + `PayloadValidationError` while decoding it. Such a failure is reported to the + caller as a `BAD_REQUEST` Nexus handler error with the message + `Invalid operation input`, retaining the original error as its cause. Raised + from a payload codec, that replaces a handler-side `INTERNAL` error; raised + from a payload converter, the type was already `BAD_REQUEST` and only the + message becomes specific to validation. Any other decode failure, and a + retryable `PayloadValidationError`, keep their existing treatment. + +### :boom: Breaking Changes + +- The `openai-agents` extra now requires `openai-agents>=0.19.2,<0.20`, up from `>=0.17.5` with no + upper bound. +- `temporalio.contrib.openai_agents` now rejects a sandbox `SandboxPathGrant` bound to a + `host_path`. +- `temporalio.contrib.openai_agents` now rejects `run_config.sandbox.session`. + +### Fixed + +- `create_payload_validation_error(None)` now creates an application error with no + details instead of encoding `None` as a detail. +- Client header encoding no longer mutates interceptor-provided payloads, preventing + update-with-start from encoding a shared header twice when + `HeaderCodecBehavior.CODEC` is enabled ([#1769](https://github.com/temporalio/sdk-python/issues/1769)). +- `temporalio.contrib.opentelemetry` replay-safe spans now delegate + `Span.add_link` to the wrapped span. Previously the wrapper inherited + OpenTelemetry's non-abstract no-op default, silently dropping links added + after span creation. +- Standalone activity start requests now include a unique request ID so RPC retries are deduplicated. +- OpenTelemetry trace and span IDs propagated by concurrent workers no longer + interfere with each other, preserving the correct parent-child hierarchy. +- The `google-adk` extra now depends on `mcp`, so fresh installs of + `temporalio[google-adk]` can import `temporalio.contrib.google_adk_agents` + without separately installing `mcp`. Previously the import failed with an + `ImportError` because `google.adk.tools.mcp_tool` only exports `McpToolset` + when `mcp` is installed. +- `temporalio.contrib.openai_agents` no longer crashes when a plain `dict` + is passed for `run_config`. (openai-agents >= 0.19.0 accepts `dict` run + configs at its public runner API) + +## [1.31.0] - 2026-07-29 + +### Added + +- Added the `Worker` `max_eager_activity_reservations_per_workflow_task` option for configuring + the number of activity slots reserved for eager execution per workflow task. Configured values + must be positive; use `disable_eager_activity_execution` to disable eager activity execution. +- Added experimental SDK payload converter support for values and type hints + decorated with `@transfer_type_convertible(...)` using a `TransferTypeConverter` class. + This lets types with transfer type converters delegate their wire representation to the + configured payload converter, preserving SDK behavior such as serialization + contexts. +- Added `temporalio.contrib.opentelemetry.MetricsExporter`, which drains a + `temporalio.runtime.MetricBuffer` on a fixed interval and exports through a + real OpenTelemetry `MeterProvider`, giving SDK/Core metrics access to + standard OTel features (views, resource, exemplars). Experimental. +- Added `TLSConfig.verification_server_name` to verify the server certificate against a fixed name + instead of the connection's server name. Unlike `domain`, it does not change the TLS SNI or + HTTP/2 authority values, which keep following the connected host, so it can be used when the + server's certificate does not carry the dialed name but on-path infrastructure (e.g. an + SNI-inspecting egress proxy) needs the SNI to remain resolvable. Requires + `server_root_ca_cert`. + +- Added the experimental `Worker` `patch_activation_callback` option, allowing workers + to decide whether a first non-replay `workflow.patched` call should activate a patch + during rolling deployments. +- Added external storage support to Nexus task handling. + +### Changed + +- Prepared replay-safe workflow activation scheduling that prevents cancellation + from being lost when another event becomes ready in the same workflow task. The + behavior is guarded by internal workflow logic flag 2 and remains disabled by + default during its compatibility rollout. + **Maintainer reminder:** keep flag 2 default-disabled for the first two published + SDK releases that recognize it; enable it in the third release, remove the explicit + overrides for this flag from `tests/worker/test_workflow.py`, and replace this rollout + note with a `Fixed` entry announcing the behavior change. + +### :boom: Breaking Changes + +- Custom workflow runners that construct `WorkflowInstanceDetails` must now pass + `payload_converter_factory` instead of `payload_converter_class`. The factory + returns the already wrapped payload converter that workflow instances should + use. +- System Nexus payload converter helpers added for generated bindings are now + private implementation details, and the remaining public `temporalio.nexus.system` + APIs are marked experimental and subject to change. +- Payload size limits have moved from `DataConverter` to `Client.connect`. Pass + `payload_limits=PayloadLimitsConfig(...)` (now exported from + `temporalio.client`) instead of setting `payload_limits` on `DataConverter`. + Config fields were renamed to `payloads_warn_size` and `memo_warn_size`, and + the deprecated `PayloadSizeWarning` was removed. + +### Fixed + +- Continue-as-new requests from workflow update handlers now fail the workflow + task instead of leaving the update unresolved. +- Marked system Nexus envelope payloads so nested payloads can be detected and + visited after the envelope is already stored as a payload. + +## [1.30.0] - 2026-07-01 + +### Added + +- Nexus operation link propagation for signals. When a Nexus operation handler signals a workflow + (including signal-with-start), the inbound Nexus request links are now forwarded onto the signaled + workflow so its history events link back to the caller, and the link the server returns for the + signaled event is attached to the caller workflow's Nexus operation history event. This makes the + caller and callee mutually navigable in the UI for signal-based Nexus operations. +- Exposed `backoff_start_interval` for continue-as-new, to allow the new workflow to start after a delay. + +### Changed + +- AWS Lambda worker `configure` parameter supports sync, async, and async + generator style functions. This callback is invoked on the asyncio event + loop. +- Relaxed the protobuf dependency bounds to allow protobuf 7 where compatible + with the selected optional dependencies. +- Standalone Nexus operation links are now forwarded on start workflow and signal requests. + +### :boom: Breaking Changes + +- AWS Lambda worker `configure` parameter has been changed to be invoked + per-invocation of the worker instead of only at startup. It is advised that + any shared, heavy-weight operations are performed outside of the callback + before `run_worker` is invoked. + +## [1.29.0] - 2026-06-17 + +### Added + +- Added experimental `temporalio.workflow.signal_with_start_workflow`, backed by + generated system Nexus bindings for + `WorkflowService.SignalWithStartWorkflowExecution`. +- Added OpenAI Agents plugin support for `CustomTool` dispatch, including lazy + tool discovery through `defer_loading`. + +### Changed + +- Client connections now use gzip transport-level gRPC compression by default. + Pass `grpc_compression=GrpcCompression.NONE` to `Client.connect` or + `CloudOperationsClient.connect` to disable it. + +### :boom: Breaking Changes + +- `StartWorkflowUpdateWithStartInput` now owns the authoritative + `rpc_metadata` and `rpc_timeout` fields for + `OutboundInterceptor.start_update_with_start_workflow`. These fields were + removed from the nested update-with-start input objects, so custom + interceptors that accessed them there should read or update the top-level + fields instead. + +### Fixed + +- Fixed `breakpoint()` and `pdb.set_trace()` inside workflow code when a worker + runs with `debug_mode=True` or `TEMPORAL_DEBUG=1`; sandboxed workflows without + debug mode now get a clearer error pointing to `debug_mode=True`. +- Fixed `start_update_with_start_workflow` interceptor handling so RPC metadata + and timeouts are forwarded to the underlying `execute_multi_operation` call. +- Fixed OpenAI Agents plugin streamed event serialization when pydantic had not + yet built deferred schemas, and fixed terminal sandbox errors retrying + forever. +- Removed the lazy-connect lock from the per-RPC hot path. It was previously + acquired on every RPC, putting an event-loop-bound primitive on the hot path; + it is now skipped once the client is connected. This reduces the client's + coupling to the event loop it connected on, which can help when reusing a + single long-lived `Client` across event loops or threads (e.g. the + dedicated-loop pattern used with gevent/gunicorn and synchronous services). + Note this does not make a `Client` fully thread- or loop-agnostic; reusing one + long-lived loop is still the recommended pattern. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..b3c1ad28b8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,187 @@ +# Contributing to Temporal SDKs + +Thanks for your interest in contributing to Temporal SDKs. + +This guide describes expectations that apply across Temporal SDK repositories. Each +repository may have additional local conventions, but the guidance below should help +you open issues and pull requests that maintainers can evaluate efficiently. + +> [!IMPORTANT] +> Non-Temporal contributors must not solicit user or customer information, including but not limited to workload, use-case, or failure information. Doing so will result in a ban from all Temporal repositories at Temporal's sole discretion. + +## Before You Open an Issue + +Search the existing issues first. If you find an issue that describes the same bug, +feature request, or design topic, add any relevant details there instead of opening a +duplicate. Use an upvote on the issue to show that it affects you too. + +Issues are assigned to people when they are actively working on them. Before taking +on an issue, check whether it is already assigned so you do not duplicate someone +else's work. + +Use GitHub issues for actionable bugs and feature work. For usage questions, help +debugging an application, or general discussion, join the relevant +language-specific channel in the +[Temporal community Slack](https://temporal.io/slack) or use the support channel +available to you. + +## Bug Reports + +When reporting a bug, include enough detail for someone else to reproduce or +understand the problem: + +* A short summary of the problem. +* A minimal reproduction, preferably as code that can be copied into a small + project or test. +* What you expected to happen and what actually happened. +* The SDK version. +* The language runtime version. +* The operating system and architecture. +* Temporal Server or Temporal Cloud details, if the issue depends on service + behavior. +* Logs, stack traces, workflow histories, or other diagnostics that show the + failure. +* Whether the behavior is a regression, and the last version where it worked if + known. + +## Feature Requests and Design Changes + +Open or join a GitHub issue before starting substantial feature work, behavior +changes, or API design changes. This gives maintainers and other SDK users a chance +to discuss the approach before you invest in a larger implementation. + +The relevant language-specific channel in Temporal community Slack is also a good +place for early discussion, but important decisions should still be captured in a +GitHub issue so they are visible and searchable. + +Small bug fixes, documentation fixes, and narrowly scoped maintenance changes can go +straight to a pull request. + +## Pull Requests + +Good pull requests are focused and easy to review: + +* Keep each pull request scoped to one logical change. +* Include tests for behavior changes. +* Update public API documentation or doc comments when public behavior changes. +* For user-facing changes, add a Markdown fragment in each applicable + `changelog//` folder. Use `stabilized/` for features that are no longer + experimental. Choose fun, whimsical, unique lowercase + kebab-case filenames, such as `giggling-teapot.md`. Include only the release-note + body without a leading list marker; the folder supplies its category. Keep + entries concise, ideally one or two sentences. Write each entry entirely on + one line: release tooling turns each nonempty line into a separate list item. + A fragment may contain multiple entries. See [the fragment guide](changelog/README.md). + Release tooling assembles `CHANGELOG.md` from these fragments. +* Describe what changed, why it changed, and what validation you ran. + +Run the relevant local checks when practical. CI must pass before a pull request can +be merged. + +## Updating SDK Core + +Initialize the checked-in submodule, then use the shared update command: + +```bash +git submodule update --init +poe update-core +``` + +This fetches and updates Core to the head of `origin/main`, importing user-facing +entries from `crates/sdk-core/CHANGELOG.md` over the old-to-new revision range. +Use `poe update-core --latest-tag` to fetch tags and select the highest stable +`core-vX.Y.Z` version, or `poe update-core --revision ` to select a particular +locally available revision. These two options are mutually exclusive. +Each affected category gets a fragment with an automatically generated whimsical +filename. Core entries join the language entries in the same categories with a +`Core: ` prefix. Wrapped Core prose becomes one line per entry; unsupported block +Markdown must be rewritten before importing. + +Start with a clean Core checkout. Backward and divergent updates are rejected. +Repeated updates import only the range since the previous checkout; an unchanged +pin creates no fragments. Review and commit the updated pin and generated fragments +together with the bridge manifest and lockfile. Python copies Core path dependency +versions from the updated checkout into `temporalio/bridge/Cargo.toml` and runs +`cargo update` to refresh all bridge dependencies in `Cargo.lock` to the latest +versions allowed by their requirements. +The command does not stage or commit changes or resolve Rust API +compatibility issues. If dependency refresh fails, inspect the updated pin, +fragments, and manifest before retrying. + +The command then runs `poe gen-protos`. Include regenerated bindings in the update +PR. + +## Preparing a Release + +Run `poe prepare-release ` (optionally with `--date YYYY-MM-DD`) from a +clean worktree. This creates `chore/release-` from `origin/main`, runs the +Core update with `--latest-tag`, and then prepares the Python versions, lockfile, and +changelog. It commits the Core and Python changes together, pushes the release +branch, and opens a PR. A failed Core update or proto generation stops preparation +before changelog fragments are consumed. Review any partial changes before retrying. +Rerunning for the same version rebuilds the local release branch from `origin/main`, +replacing prior release-branch commits, and updates the remote branch using an +explicit force-with-lease. If the remote branch changes during preparation, the +push fails rather than overwriting that change. An existing open release PR is +reused, preserving its description and discussion. +The optional `--date` sets the date in the changelog release heading and defaults +to today; it does not schedule publication. + +## Things to Avoid + +Avoid changes that make review harder without improving the contribution: + +* Unrelated refactors mixed into a behavior change. +* Style-only churn. +* Large feature pull requests that were not discussed first. +* License, copyright, or other legal changes without maintainer discussion. + +## AI-Generated Contributions + +Using AI tools while contributing is acceptable. You are responsible for the +correctness, quality, and maintainability of everything you submit. + +Contributors must fully understand the issue they are fixing and be able to explain +the proposed change. We expect that human understanding to be evident in pull +request responses and design discussions. If a contribution's interaction appears +entirely AI-driven, maintainers may close it: it does not provide a benefit over +maintainers using AI tooling themselves. + +Thoroughly self-review AI-generated code and documentation before opening a pull +request. Make sure it is correct, tested where appropriate, and consistent with the +style and patterns of the codebase. + +Keep AI-assisted changes concise and scoped. Avoid verbose generated prose, +unnecessary comments, or broad rewrites that make the change harder to review. + +## Contributor License Agreement + +All contributors must complete the Temporal Contributor License Agreement (CLA) +before changes can be merged. A link to the CLA will be posted in the pull request. + +## Security Issues + +Do not open public GitHub issues for suspected security vulnerabilities. Report them +to security@temporal.io instead. + +## Review and CI + +Maintainers review pull requests for correctness, compatibility, test coverage, +documentation, and long-term maintainability. Review may require changes before a +pull request can be merged, and it may take maintainers some time to review a +contribution. + +CI is the final validation gate. If CI fails, update the pull request or ask for help +if the failure appears unrelated to your change. Some CI gates may wait for a +maintainer to approve or run them. + +## Inactive Pull Requests + +Maintainers may close inactive pull requests after follow-up if they are no longer +moving forward. If that happens, you are welcome to reopen the pull request or open a +new one when you are ready to continue. + +## Community Conduct + +Keep discussions respectful, constructive, and focused on the work. Clear context, +specific examples, and patience with review feedback help everyone move faster. diff --git a/README.md b/README.md index 38f3696d54..e0048a088a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ -![Temporal Python SDK](https://assets.temporal.io/w/py-banner.svg) +![Temporal Python SDK](https://assets.temporal.io/w/py.png) -[![Python 3.9+](https://img.shields.io/pypi/pyversions/temporalio.svg?style=for-the-badge)](https://pypi.org/project/temporalio) +[![Python 3.11+](https://img.shields.io/pypi/pyversions/temporalio.svg?style=for-the-badge)](https://pypi.org/project/temporalio) [![PyPI](https://img.shields.io/pypi/v/temporalio.svg?style=for-the-badge)](https://pypi.org/project/temporalio) [![MIT](https://img.shields.io/pypi/l/temporalio.svg?style=for-the-badge)](LICENSE) -**📣 News: Integration between OpenAI Agents SDK and Temporal is now in public preview. [Learn more](temporalio/contrib/openai_agents/README.md).** - [Temporal](https://temporal.io/) is a distributed, scalable, durable, and highly available orchestration engine used to execute asynchronous, long-running business logic in a scalable and resilient way. @@ -54,6 +52,10 @@ informal introduction to the features and their implementation. - [Data Conversion](#data-conversion) - [Pydantic Support](#pydantic-support) - [Custom Type Data Conversion](#custom-type-data-conversion) + - [External Storage](#external-storage) + - [Driver Selection](#driver-selection) + - [Built-in Drivers](#built-in-drivers) + - [Custom Drivers](#custom-drivers) - [Workers](#workers) - [Workflows](#workflows) - [Definition](#definition) @@ -78,6 +80,7 @@ informal introduction to the features and their implementation. - [Customizing the Sandbox](#customizing-the-sandbox) - [Passthrough Modules](#passthrough-modules) - [Invalid Module Members](#invalid-module-members) + - [Debugging Workflows with `breakpoint()` / `pdb`](#debugging-workflows-with-breakpoint--pdb) - [Known Sandbox Issues](#known-sandbox-issues) - [Global Import/Builtins](#global-importbuiltins) - [Sandbox is not Secure](#sandbox-is-not-secure) @@ -108,7 +111,8 @@ informal introduction to the features and their implementation. - [Observability](#observability) - [Metrics](#metrics) - [OpenTelemetry Tracing](#opentelemetry-tracing) - - [Protobuf 3.x vs 4.x](#protobuf-3x-vs-4x) + - [OpenTelemetry Metrics](#opentelemetry-metrics) + - [Protobuf compatibility](#protobuf-compatibility) - [Known Compatibility Issues](#known-compatibility-issues) - [gevent Patching](#gevent-patching) - [Development](#development) @@ -116,6 +120,7 @@ informal introduction to the features and their implementation. - [Prepare](#prepare) - [Build](#build) - [Use](#use) + - [FIPS Compliance (Experimental)](#fips-compliance-experimental) - [Local SDK development environment](#local-sdk-development-environment) - [Testing](#testing-2) - [Proto Generation and Testing](#proto-generation-and-testing) @@ -164,7 +169,7 @@ from temporalio import workflow # Import our activity, passing it through the sandbox with workflow.unsafe.imports_passed_through(): - from .activities import say_hello + from activities import say_hello @workflow.defn class SayHello: @@ -184,8 +189,8 @@ from temporalio.client import Client from temporalio.worker import Worker # Import the activity and workflow from our other files -from .activities import say_hello -from .workflows import SayHello +from activities import say_hello +from workflows import SayHello async def main(): # Create client connected to server at the given address @@ -220,7 +225,7 @@ import asyncio from temporalio.client import Client # Import the workflow from the previous code -from .workflows import SayHello +from workflows import SayHello async def main(): # Create client connected to server at the given address @@ -309,8 +314,9 @@ other_ns_client = Client(**config) Data converters are used to convert raw Temporal payloads to/from actual Python types. A custom data converter of type `temporalio.converter.DataConverter` can be set via the `data_converter` parameter of the `Client` constructor. Data -converters are a combination of payload converters, payload codecs, and failure converters. Payload converters convert -Python values to/from serialized bytes. Payload codecs convert bytes to bytes (e.g. for compression or encryption). +converters are a combination of payload converters, external storage, payload codecs, and failure converters. Payload +converters convert Python values to/from serialized bytes. External payload storage optionally stores and retrieves payloads +to/from external storage services using drivers. Payload codecs convert bytes to bytes (e.g. for compression or encryption). Failure converters convert exceptions to/from serialized failures. The default data converter supports converting multiple types including: @@ -322,7 +328,7 @@ The default data converter supports converting multiple types including: * Anything that [`json.dump`](https://docs.python.org/3/library/json.html#json.dump) supports natively * [dataclasses](https://docs.python.org/3/library/dataclasses.html) * Iterables including ones JSON dump may not support by default, e.g. `set` - * [IntEnum, StrEnum](https://docs.python.org/3/library/enum.html) based enumerates + * [IntEnum, StrEnum](https://docs.python.org/3/library/enum.html) based enumerates, including enums that mix in `int` or `str` * [UUID](https://docs.python.org/3/library/uuid.html) * `datetime.datetime` @@ -427,7 +433,7 @@ class IPv4AddressJSONEncoder(AdvancedJSONEncoder): class IPv4AddressJSONTypeConverter(JSONTypeConverter): def to_typed_value( self, hint: Type, value: Any - ) -> Union[Optional[Any], _JSONTypeConverterUnhandled]: + ) -> Union[Optional[Any], JSONTypeConverterUnhandled]: if issubclass(hint, ipaddress.IPv4Address): return ipaddress.IPv4Address(value) return JSONTypeConverter.Unhandled @@ -455,6 +461,147 @@ my_data_converter = dataclasses.replace( Now `IPv4Address` can be used in type hints including collections, optionals, etc. +##### External Storage + +⚠️ **External storage support is currently at an experimental release stage.** ⚠️ + +External storage allows large payloads to be offloaded to an external storage service (such as Amazon S3) rather than stored inline in workflow history. This is useful when workflows or activities work with data that would otherwise exceed Temporal's payload size limits. + +External storage is configured via the `external_storage` parameter on `DataConverter`. It should be configured on the `Client` both for clients of your workflow as well as on the worker -- anywhere large payloads may be uploaded or downloaded. + +A `StorageDriver` handles uploading and downloading payloads. Temporal provides [built-in drivers](#built-in-drivers) for common storage solutions, or you may implement a [custom driver](#custom-drivers). Here's an example using the built-in `S3StorageDriver` with the SDK's `aioboto3` client: + +```python +import aioboto3 +import dataclasses +from temporalio.client import Client +from temporalio.envconfig import ClientConfig +from temporalio.contrib.aws.s3driver import S3StorageDriver +from temporalio.contrib.aws.s3driver.aioboto3 import new_aioboto3_client +from temporalio.converter import DataConverter +from temporalio.converter import ExternalStorage + +client_config = ClientConfig.load_client_connect_config() + +session = aioboto3.Session() +async with session.client("s3") as s3_client: + driver = S3StorageDriver( + client=new_aioboto3_client(s3_client), + bucket="my-bucket", + ) + client = await Client.connect( + **client_config, + data_converter=dataclasses.replace( + DataConverter.default, + external_storage=ExternalStorage(drivers=[driver]), + ), + ) +``` + +See the [S3 driver README](temporalio/contrib/aws/s3driver/) for further details. + +Some things to note about external storage: + +* Only payloads that meet or exceed `ExternalStorage.payload_size_threshold` (default 256 KiB) are offloaded. Smaller payloads are stored inline as normal. +* External storage applies transparently to all payloads, whether they are workflow inputs/outputs, activity inputs/outputs, signal inputs, query outputs, update inputs/outputs, or failure details. +* The `DataConverter`'s `payload_codec` (if configured) is applied to the payload *before* it is handed to the storage driver, so the driver always stores encoded bytes. The reference payload written to workflow history is not encoded by the `DataConverter` codec. +* Setting `ExternalStorage.payload_size_threshold` to `0` causes every payload to be considered for external storage regardless of size. + +###### Driver Selection + +When multiple storage backends are needed, list all drivers in `ExternalStorage.drivers` and provide a `driver_selector` to control which driver stores new payloads. Any driver in the list not chosen for storing is still available for retrieval, which is useful when migrating between storage backends. + +```python +from temporalio.converter import ExternalStorage + +options = ExternalStorage( + drivers=[hot_driver, cold_driver], + driver_selector=lambda context, payload: ( + hot_driver if payload.ByteSize() < 5 * 1024 * 1024 else cold_driver + ), +) +``` + +For more complex selection logic, use a plain callable that reads from the `StorageDriverStoreContext`: + +```python +import temporalio.converter +from temporalio.api.common.v1 import Payload + +def feature_flag_is_on(workflow_id: str | None) -> bool: + """Check whether external storage is enabled for this workflow via a feature flag service.""" + return workflow_id is not None and len(workflow_id) % 2 == 0 + +def feature_flag_selector( + context: temporalio.converter.StorageDriverStoreContext, _payload: Payload +) -> temporalio.converter.StorageDriver | None: + workflow_id = ( + context.target.id + if isinstance(context.target, temporalio.converter.StorageDriverWorkflowInfo) + else None + ) + return my_driver if feature_flag_is_on(workflow_id) else None + +options = ExternalStorage( + drivers=[my_driver], + driver_selector=feature_flag_selector, +) +``` + +Some things to note about driver selection: + +* A `driver_selector` is required when more than one driver is registered. With a single driver, `driver_selector` may be omitted and that driver is used for all store operations. +* Returning `None` from a selector leaves the payload stored inline in workflow history rather than offloading it. +* The driver instance returned by the selector must be one of the instances registered in `ExternalStorage.drivers`. If it is not, an error is raised. + +###### Built-in Drivers + +- **[GCS Storage Driver](temporalio/contrib/gcp/gcsdriver/)**: ⚠️ **Experimental** ⚠️ Google Cloud Storage driver. Ships with a gcloud-aio-storage client adapter, or bring your own by subclassing `GCSStorageDriverClient`. +- **[S3 Storage Driver](temporalio/contrib/aws/s3driver/)**: ⚠️ **Experimental** ⚠️ Amazon S3 driver. Ships with an aioboto3 client, or bring your own by subclassing `S3StorageDriverClient`. + +###### Custom Drivers + +Implement `temporalio.converter.StorageDriver` to integrate with an external storage system: + +```python +from collections.abc import Sequence +from temporalio.converter import StorageDriver, StorageDriverClaim, StorageDriverRetrieveContext, StorageDriverStoreContext +from temporalio.api.common.v1 import Payload + +class MyDriver(StorageDriver): + def __init__(self, driver_name: str | None = None): + self._driver_name = driver_name or "my-org:driver:my-driver" + + def name(self) -> str: + return self._driver_name + + async def store( + self, context: StorageDriverStoreContext, payloads: Sequence[Payload] + ) -> list[StorageDriverClaim]: + claims = [] + for payload in payloads: + key = await my_storage.put(payload.SerializeToString()) + claims.append(StorageDriverClaim(claim_data={"key": key})) + return claims + + async def retrieve( + self, context: StorageDriverRetrieveContext, claims: Sequence[StorageDriverClaim] + ) -> list[Payload]: + payloads = [] + for claim in claims: + data = await my_storage.get(claim.claim_data["key"]) + p = Payload() + p.ParseFromString(data) + payloads.append(p) + return payloads +``` + +Some things to note about implementing a custom driver: + +* `StorageDriver.name()` must return a string that is unique among all drivers in `ExternalStorage.drivers`. This name is embedded in the reference payload stored in workflow history and used to look up the correct driver during retrieval — changing it after payloads have been stored will break retrieval. +* `StorageDriver.type()` is automatically implemented to return the name of the class. This can be overridden in subclasses but must remain consistent across all instances of the subclass. +* Use `StorageDriverStoreContext.target` inside `store()` when you need workflow or activity identity (namespace, workflow ID, activity ID, etc.) to choose where or how to store payloads. + ### Workers Workers host workflows and/or activities. Here's how to run a worker: @@ -684,7 +831,6 @@ Some things to note about the above code: capabilities are needed. * Local activities work very similarly except the functions are `workflow.start_local_activity()` and `workflow.execute_local_activity()` - * ⚠️Local activities are currently experimental * Activities can be methods of a class. Invokers should use `workflow.start_activity_method()`, `workflow.execute_activity_method()`, `workflow.start_local_activity_method()`, and `workflow.execute_local_activity_method()` instead. @@ -739,6 +885,10 @@ deterministic: * `asyncio.as_completed()` - use `workflow.as_completed()` * `asyncio.wait()` - use `workflow.wait()` +`asyncio.TaskGroup` tracks tasks in a `set()`, so cancellation order can differ between execution and replay. +This can cause non-determinism errors, even if the workflow catches the task group's exception and completes +successfully. The sandbox warns when a task group is created. + #### Asyncio Cancellation Cancellation is done using `asyncio` [task cancellation](https://docs.python.org/3/library/asyncio-task.html#task-cancellation). @@ -751,9 +901,12 @@ protect tasks against cancellation. The following tasks, when cancelled, perform a Temporal cancellation: -* Activities - when the task executing an activity is cancelled, a cancellation request is sent to the activity -* Child workflows - when the task starting or executing a child workflow is cancelled, a cancellation request is sent to - cancel the child workflow +* Activities - when the task executing an activity is cancelled, a cancellation request may be sent to the activity + depending on cancellation type +* Child workflows - when the task starting or executing a child workflow is cancelled, a cancellation request may be + sent to cancel the child workflow depending on cancellation type +* Nexus operations - when the task starting or executing a Nexus operation is cancelled, a cancellation request may be + sent to cancel the Nexus operation depending on cancellation type * Timers - when the task executing a timer is cancelled (whether started via sleep or timeout), the timer is cancelled When the workflow itself is requested to cancel, `Task.cancel` is called on the main workflow task. Therefore, @@ -1098,6 +1251,80 @@ my_worker = Worker(..., workflow_runner=SandboxedWorkflowRunner(restrictions=my_ See the API for more details on exact fields and their meaning. +##### Debugging Workflows with `breakpoint()` / `pdb` + +Setting `debug_mode=True` on the `Worker` (or `TEMPORAL_DEBUG=1` in the environment) routes workflow activations +onto the asyncio main thread instead of a worker thread pool. This lets `breakpoint()` and `pdb.set_trace()` +inside workflow code open an interactive REPL — without it, pdb hangs because its `input()` call would run on a +thread that does not own the controlling TTY. + +A minimal runnable example: + +```python +import asyncio +from datetime import timedelta + +from temporalio import workflow +from temporalio.client import Client +from temporalio.worker import Worker + + +@workflow.defn +class DebugMeWorkflow: + @workflow.run + async def run(self) -> str: + x = 42 + breakpoint() # interactive pdb prompt opens at this line + return f"x was {x}" + + +async def main() -> None: + client = await Client.connect("localhost:7233") + async with Worker( + client, + task_queue="debug-me", + workflows=[DebugMeWorkflow], + debug_mode=True, + ): + result = await client.execute_workflow( + DebugMeWorkflow.run, + id="debug-me-wf", + task_queue="debug-me", + task_timeout=timedelta(minutes=10), # see caveat below + ) + print(result) + + +if __name__ == "__main__": + asyncio.run(main()) +``` + +Run with `python debug_me.py`, or under pytest with `pytest -s` (the `-s` flag disables pytest's stdin +capture). At the `(Pdb)` prompt you'll land at the line where `breakpoint()` was called, with workflow +locals in scope. Try `p x`, `n`, `c`, `q`. + +**Quitting cleanly.** Typing `q` or hitting Ctrl-D continues the workflow rather than raising `BdbQuit` +(which would fail the workflow task). To genuinely abort, kill the outer process with Ctrl-C. + +Two caveats when pausing at a breakpoint inside a workflow: + +1. **Workflow task timeout.** Temporal expires a workflow task after ~10 seconds by default. If you sit at the + `(Pdb)` prompt longer than that, the server reassigns the task and your workflow replays from the start when + you continue — re-hitting the breakpoint. Pass `task_timeout=timedelta(minutes=N)` to `execute_workflow` / + `start_workflow` to give yourself debugging headroom: + + ```python + await client.execute_workflow(MyWorkflow.run, ..., task_timeout=timedelta(minutes=10)) + ``` + +2. **Deterministic replay.** Workflows are deterministic and replay from history; any wall-clock pause violates + that contract. For post-mortem debugging without these caveats, use the [Replayer](#replayer) on a recorded + history instead of live debugging. + +Calling `breakpoint()` from sandboxed workflow code without `debug_mode` raises a sandbox +`RestrictedWorkflowAccessError` with a message pointing at `debug_mode=True`, so the failure mode is loud +and the fix is obvious. + ##### Known Sandbox Issues Below are known sandbox issues. As the sandbox is developed and matures, some may be resolved. @@ -1386,13 +1613,13 @@ code](https://github.com/temporalio/samples-python/blob/main/context_propagation ### Nexus -⚠️ **Nexus support is currently at an experimental release stage. Backwards-incompatible changes are anticipated until a stable release is announced.** ⚠️ - [Nexus](https://github.com/nexus-rpc/) is a synchronous RPC protocol. Arbitrary duration operations that can respond asynchronously are modeled on top of a set of pre-defined synchronous RPCs. -Temporal supports calling Nexus operations **from a workflow**. See https://docs.temporal.io/nexus. There is no support -currently for calling a Nexus operation from non-workflow code. +Temporal supports calling Nexus operations **from a workflow** or directly from a client using +[Standalone Nexus Operations](https://docs.temporal.io/develop/python/nexus/standalone-operations). +Standalone Nexus Operations are in [Public Preview](https://docs.temporal.io/evaluate/development-production-features/release-stages#public-preview). +We aim to preserve backward compatibility and avoid breaking changes. See https://docs.temporal.io/nexus. To get started quickly using Nexus with Temporal, see the Python Nexus sample: https://github.com/temporalio/samples-python/tree/nexus/hello_nexus. @@ -1770,17 +1997,46 @@ as an interceptor on the `interceptors` argument of `Client.connect`. When set, calls and for all activity and workflow invocations on the worker, spans will be created and properly serialized through the server to give one proper trace for a workflow execution. -### Protobuf 3.x vs 4.x +#### OpenTelemetry Metrics + +Metrics support also requires the `opentelemetry` extra (see above). If you want your Temporal SDK/Core metrics (and +any custom metrics recorded via `activity.metric_meter()`/`workflow.metric_meter()`) to flow through the standard +OpenTelemetry metrics pipeline (views, resources, any OTel-compatible backend) rather than only through +`PrometheusConfig`/`OpenTelemetryConfig`, set a `temporalio.runtime.MetricBuffer` as the `metrics` on +`TelemetryConfig`, then drain it into a real OpenTelemetry `MeterProvider` using +`temporalio.contrib.opentelemetry.MetricsExporter`: + +```python +from datetime import timedelta + +from opentelemetry.sdk.metrics import MeterProvider +from opentelemetry.sdk.metrics.export import ConsoleMetricExporter, PeriodicExportingMetricReader + +from temporalio.client import Client +from temporalio.contrib.opentelemetry import MetricsExporter +from temporalio.runtime import MetricBuffer, Runtime, TelemetryConfig -Python currently has two somewhat-incompatible protobuf library versions - the 3.x series and the 4.x series. Python -currently recommends 4.x and that is the primary supported version. Some libraries like -[Pulumi](https://github.com/pulumi/pulumi) require 4.x. Other libraries such as [ONNX](https://github.com/onnx/onnx) and -[Streamlit](https://github.com/streamlit/streamlit), for one reason or another, have/will not leave 3.x. +buffer = MetricBuffer(10_000) +runtime = Runtime(telemetry=TelemetryConfig(metrics=buffer)) +meter_provider = MeterProvider( + metric_readers=[PeriodicExportingMetricReader(ConsoleMetricExporter(), export_interval_millis=5000)] +) + +async with MetricsExporter(buffer, meter_provider): + client = await Client.connect("localhost:7233", runtime=runtime) + # ... run workers/workflows while the exporter drains the buffer in the background +``` -To support these, Temporal Python SDK allows any protobuf library >= 3.19. However, the C extension in older Python -versions can cause issues with the sandbox due to global state sharing. Temporal strongly recommends using the latest -protobuf 4.x library unless you absolutely cannot at which point some proto libraries may have to be marked as -[Passthrough Modules](#passthrough-modules). +`MetricsExporter` must be running (via `async with` or manual `run()`/`shutdown()`) for as long as metrics should be +exported, since it works by draining the buffer on a fixed interval (`poll_interval`, default one second) -- per the +warning on `MetricBuffer`, updates are dropped if the buffer isn't drained regularly. + +### Protobuf compatibility + +The SDK requires `protobuf>=4.21.12,<8` and supports protobuf 4, 5, 6, and 7 runtimes. +Its Python bindings are generated with `grpcio-tools` 1.49.1, which bundles +protoc 3.21.6 (Python protobuf 4.21.6). +The optional `grpc` extra requires `grpcio>=1.49.1,<2`. ### Known Compatibility Issues @@ -1795,8 +2051,8 @@ users are encouraged to not use gevent in asyncio applications (including Tempor # Development -The Python SDK is built to work with Python 3.9 and newer. It is built using -[SDK Core](https://github.com/temporalio/sdk-core/) which is written in Rust. +The Python SDK supports Python 3.11 through 3.15. It is built using +[SDK Core](https://github.com/temporalio/sdk-rust/) which is written in Rust. ### Building @@ -1893,6 +2149,50 @@ It should output: Result: Hello, Temporal! +#### FIPS Compliance (Experimental) + +> **NOTE**: FIPS support is **experimental**. It is opt-in, source-build only, and currently exercised +> on Linux only. This build wires the TLS/gRPC cryptography through a FIPS-validated module; it is +> **not** a claim that the SDK has passed a FIPS compliance audit or certification. + +FIPS 140-3 compliant cryptography is available as an **opt-in source build**. The published wheels are +**not** FIPS compliant — they use the [`ring`](https://github.com/briansmith/ring) backend, which is not +FIPS-validated. Because the crypto backend is chosen at compile time, FIPS cannot be enabled on a +precompiled wheel: you must build the native extension yourself with `TEMPORALIO_FIPS=1`. When set, the +build selects [`aws-lc-rs`](https://github.com/aws/aws-lc-rs) in FIPS mode (AWS-LC's FIPS 140-3 module) +for the gRPC client (and the OTLP metric exporter, when enabled), in place of `ring`. + +Building `aws-lc-rs` in FIPS mode compiles AWS-LC from source, so in addition to the +[Prepare](#prepare) prerequisites it requires **Go**, **CMake**, **Perl**, and a **C compiler**. + +To produce an installable FIPS wheel: + +```bash +TEMPORALIO_FIPS=1 uv run maturin build --release --no-default-features --features fips +``` + +or, equivalently, the provided task: + +```bash +poe build-wheel-fips +``` + +For a local develop build, use `poe build-develop-fips`. You can confirm at runtime that a FIPS build is +loaded: + +```python +from temporalio.bridge import temporal_sdk_bridge +assert temporal_sdk_bridge.FIPS +``` + +> **NOTE**: When a `Worker` or `Replayer` is created without a `build_id` (or `deployment_config`), the +> SDK derives a default build ID by hashing loaded module bytecode with MD5 (via +> `hashlib.md5(usedforsecurity=False)`). Although md5 is among Python's +> [guaranteed hash algorithms](https://docs.python.org/3/library/hashlib.html#hashlib.algorithms_guaranteed), +> some vendors ship "FIPS" Python builds that remove it entirely — on such an interpreter this call +> raises. If you run on one, pass an explicit `build_id` (directly or inside `deployment_config`) so the +> default MD5-based path is not used. + ### Local SDK development environment For local development, it is quicker to use a debug build. @@ -1918,38 +2218,53 @@ The environment is now ready to develop in. #### Testing -To execute tests: +To execute tests (in parallel if possible): ```bash poe test ``` -This runs against [Temporalite](https://github.com/temporalio/temporalite). To run against the time-skipping test -server, pass `--workflow-environment time-skipping`. To run against the `default` namespace of an already-running -server, pass the `host:port` to `--workflow-environment`. Can also use regular pytest arguments. For example, here's how -to run a single test with debug logs on the console: +To execute tests serially: + +```bash +uv run pytest +``` + +To execute a single test: ```bash poe test -s --log-cli-level=DEBUG -k test_sync_activity_thread_cancel_caught ``` +**Temporal Server** + +- Tests that use the workflow test environment run against the [Temporal CLI dev server](https://docs.temporal.io/cli#start-dev-server). +- By default, workflow-environment tests automatically start a local dev server. +- On first run, the dev server binary may be downloaded so network access is required if no server is currently running. +- To run workflow-environment tests against the time-skipping test server, pass `--workflow-environment time-skipping`. +- To run workflow-environment tests against the `default` namespace of an already-running server, pass the `host:port` to `--workflow-environment`. +- Unit tests that do not use the workflow environment do not start a dev server. + #### Proto Generation and Testing -If you have docker available, run +Generate protobuf code: ``` -poe gen-protos-docker +poe gen-protos ``` -Alternatively: to generate protobuf code, you must be on Python <= 3.10, and then run `uv add -"protobuf<4"` + `uv sync --all-extras`. Then the protobuf files can be generated via `poe -gen-protos` followed by `poe format`. Do not commit `uv.lock` or `pyproject.toml` changes. To go -back from this downgrade, restore both of those files and run `uv sync --all-extras`. Tests can be -run for protobuf version 3 by setting the `TEMPORAL_TEST_PROTO3` env var to `1` prior to running -tests. +`uv` runs the protobuf compiler in an isolated Python 3.11 environment using the +dependencies declared in `scripts/gen_protos.py` and locked in +`scripts/gen_protos.py.lock`. It downloads Python if needed and leaves the SDK +development environment unchanged. ### Style +``` +# runs ruff + cargo fmt +poe format +``` + * Mostly [Google Style Guide](https://google.github.io/styleguide/pyguide.html). Notable exceptions: * We use [ruff](https://docs.astral.sh/ruff/) for formatting, so that takes precedence * In tests and example code, can import individual classes/functions to make it more readable. Can also do this for diff --git a/basedpyrightconfig.json b/basedpyrightconfig.json new file mode 100644 index 0000000000..10a478c237 --- /dev/null +++ b/basedpyrightconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "pyproject.toml", + "reportAny": "none", + "reportExplicitAny": "none", + "reportIgnoreCommentWithoutRule": "none", + "reportImplicitAbstractClass": "none", + "reportUnannotatedClassAttribute": "none" +} diff --git a/changelog/README.md b/changelog/README.md new file mode 100644 index 0000000000..d9e75ea0dd --- /dev/null +++ b/changelog/README.md @@ -0,0 +1,85 @@ +# Changelog fragments + +For each PR with user-facing changes, add a Markdown file in each applicable +category folder. Write high-level release notes describing what users can observe. +Keep entries concise, ideally one or two sentences. Write each entry entirely on +one line: release tooling turns each nonempty line into a separate list item. +A fragment may contain multiple entries; blank lines are ignored. +Use fun, whimsical, unique lowercase kebab-case filenames, such as +`fixed/giggling-teapot.md` or `added/dancing-marshmallow.md`. PR numbers are optional. + +| Folder | Changes | +| --- | --- | +| `added/` | New features | +| `stabilized/` | Features that are no longer experimental | +| `changed/` | Changes in existing functionality | +| `deprecated/` | Soon-to-be-removed features | +| `breaking-changes/` | Removed or backwards-incompatible features | +| `fixed/` | Notable bug fixes | +| `security/` | Notable security fixes | + +Create a category folder when first needed. Place files directly inside it; +use one fragment per category for your PR. The folder supplies the category, so +the file contains only the entries, without a category or version heading or +leading list markers (`-`). Release tooling adds a list marker to each nonempty line: + +```markdown +Reject unsupported activity executors when creating a worker, instead of failing during activity execution. +Preserve cancellation details when reporting activity failures. +``` + +Entries can include inline Markdown and documentation links. Do not edit +`CHANGELOG.md` for pending changes: it contains completed releases only. Maintainers +can apply `skip-changelog` to PRs that need no release note. + +`poe update-core` imports Core changelog entries into category fragments when +updating the submodule. See [Updating SDK Core](../CONTRIBUTING.md#updating-sdk-core) +for contributor instructions. + +## Preparing a release + +Release tooling requires Rust/Cargo and the checked-in sdk-rust submodule: + +```bash +git submodule update --init +python scripts/prepare_release.py 1.35.0 --date 2026-10-02 +``` + +Run preparation from a clean worktree. The script creates a release branch from +`origin/main`, bumps Python versions and refreshes `uv.lock`, then tells the +shared tool to write the dated changelog and consume its fragments. It commits +the resulting version, lockfile, changelog, and fragment-deletion changes. It pushes the branch and opens a PR with the `skip-changelog` label. +Review the assembled notes before merging the release PR. + +Preparation consumes both language and imported Core fragments. Publishing calls +the shared `release-notes` command to read that completed release and append Core +commit links under `### SDK Core Commits`. Core changelog entries are not collected +again during publishing. Both publishing jobs check out the pinned Core tool; +the commit range comes from the previous release tag and the current release's pin. + +Assembly creates a dated section at the top of the changelog, groups notes in the +category order above, and sorts filenames within each category. Empty categories +are omitted. Each nonempty line becomes one list item, in the order it appears +in the fragment. Breaking changes use `### :boom: Breaking Changes`. Older releases +are preserved. Empty releases are allowed; duplicate versions are rejected. +Fragments are retained if validation or lockfile +refresh fails. A changelog validation failure leaves the version and lockfile +updates in the local worktree; inspect or restore those changes before retrying. +File-system errors can leave partial changelog preparation as well; preparation +stops without committing so those changes can be inspected. + +Fragments merged after preparation remain pending for the next release. To +include them in the current release, update the release PR and regenerate its +notes from the intended fragment set before publishing. + +The shared CLI lives in sdk-rust's `changelog-release-notes` crate. To validate +pending notes without making changes: + +```bash +cargo run --manifest-path temporalio/bridge/sdk-core/crates/changelog-release-notes/Cargo.toml \ + --bin changelog-tool -- check --repo "$PWD" +``` + +See that crate's README for the reusable CLI. SDK-specific version and lockfile +updates happen before its `prepare` command; no hook or release-plan exchange is +required. diff --git a/changelog/added/wandering-namespace-otter.md b/changelog/added/wandering-namespace-otter.md new file mode 100644 index 0000000000..1bed3ea13d --- /dev/null +++ b/changelog/added/wandering-namespace-otter.md @@ -0,0 +1 @@ +Experimental: external storage store and select contexts now have an optional `namespace` holding the namespace of the client or worker performing the operation. diff --git a/changelog/changed/jaunty-namespace-heron.md b/changelog/changed/jaunty-namespace-heron.md new file mode 100644 index 0000000000..123c35fa64 --- /dev/null +++ b/changelog/changed/jaunty-namespace-heron.md @@ -0,0 +1 @@ +Experimental: the S3 and GCS storage drivers now write payloads stored without a target under `v0/ns/{namespace}/d/sha256/...`, using the namespace of the storing client or worker (`null` when it is unknown), instead of `v0/d/sha256/...`. Existing objects remain retrievable. diff --git a/changelog/fixed/fickle-passthrough-ferret.md b/changelog/fixed/fickle-passthrough-ferret.md new file mode 100644 index 0000000000..a935fb4872 --- /dev/null +++ b/changelog/fixed/fickle-passthrough-ferret.md @@ -0,0 +1 @@ +Fix `workflow.unsafe.imports_passed_through()` reloading a submodule in the sandbox when it is imported with `from package import module` from a workflow in the same package. diff --git a/changelog/fixed/patient-evicting-platypus.md b/changelog/fixed/patient-evicting-platypus.md new file mode 100644 index 0000000000..d93baab972 --- /dev/null +++ b/changelog/fixed/patient-evicting-platypus.md @@ -0,0 +1 @@ +Fix workflow eviction getting stuck after a deadlock interrupt during task completion. Eviction now waits for timed-out activations to finish, avoids overlapping eviction retries, and tolerates lost done callbacks for finished tasks. diff --git a/changelog/fixed/sleepy-tokio-fireflies.md b/changelog/fixed/sleepy-tokio-fireflies.md new file mode 100644 index 0000000000..8cebb6233c --- /dev/null +++ b/changelog/fixed/sleepy-tokio-fireflies.md @@ -0,0 +1 @@ +Shut down native runtimes before Python interpreter finalization to prevent short-lived clients from crashing or hanging while Rust callbacks finish. diff --git a/pyproject.toml b/pyproject.toml index 6b294b3c71..6c41cbba54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,34 +1,56 @@ [project] name = "temporalio" -version = "1.21.1" +version = "1.36.1" description = "Temporal.io Python SDK" authors = [{ name = "Temporal Technologies Inc", email = "sdk@temporal.io" }] -requires-python = ">=3.10" +requires-python = ">=3.11" readme = "README.md" license = "MIT" license-files = ["LICENSE"] keywords = ["temporal", "workflow"] dependencies = [ - "nexus-rpc==1.3.0", - "protobuf>=3.20,<7.0.0", - "python-dateutil>=2.8.2,<3 ; python_version < '3.11'", - "types-protobuf>=3.20", + "nexus-rpc==1.5.0", + "protobuf>=4.21.12,<8.0.0", + "types-protobuf>=4.24,<8.0.0", "typing-extensions>=4.2.0,<5", ] classifiers = [ "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", ] [project.optional-dependencies] -grpc = ["grpcio>=1.48.2,<2"] -opentelemetry = ["opentelemetry-api>=1.11.1,<2", "opentelemetry-sdk>=1.11.1,<2"] +grpc = ["grpcio>=1.49.1,<2"] +opentelemetry = ["opentelemetry-api>=1.26,<2", "opentelemetry-sdk>=1.26,<2"] pydantic = ["pydantic>=2.0.0,<3"] -openai-agents = ["openai-agents>=0.3,<0.7", "mcp>=1.9.4, <2"] +openai-agents = ["temporalio-openai-agents>=1.0.0"] +google-adk = ["temporalio-google-adk[mcp]>=0.0.1"] +langgraph = ["temporalio-langgraph>=0.1.0"] +langsmith = ["temporalio-langsmith>=0.1.1"] +deepagents = ["temporalio-deepagents>=0.0.1"] +lambda-worker-otel = [ + "opentelemetry-api>=1.26,<2", + "opentelemetry-sdk>=1.26,<2", + "opentelemetry-exporter-otlp-proto-grpc>=1.11.1,<2", + "opentelemetry-semantic-conventions>=0.40b0,<1", + "opentelemetry-sdk-extension-aws>=2.0.0,<3", +] +cloud-run-worker-otel = [ + "opentelemetry-api>=1.26,<2", + "opentelemetry-sdk>=1.26,<2", + "opentelemetry-exporter-otlp-proto-grpc>=1.11.1,<2", + # Keep dependency upgrades from selecting an older OTLP exporter solely + # because its protobuf constraint permits version 7. + "protobuf<7", +] +aioboto3 = ["aioboto3>=10.4.0", "types-aioboto3[s3]>=10.4.0"] +gcloud-aio-storage = ["gcloud-aio-storage>=9.6.4,<10"] +google-genai = ["temporalio-google-genai[mcp]>=0.1.0"] +strands-agents = ["temporalio-strands-agents>=0.1.0"] [project.urls] Homepage = "https://github.com/temporalio/sdk-python" @@ -38,47 +60,54 @@ Documentation = "https://docs.temporal.io/docs/python" [dependency-groups] dev = [ + "basedpyright==1.34.0", "cibuildwheel>=2.22.0,<3", - "grpcio-tools>=1.48.2,<2", - "mypy==1.18.2", - "mypy-protobuf>=3.3.0,<4", + "cryptography>=46", + "mypy==2.4.0", "psutil>=5.9.3,<6", "pydocstyle>=6.3.0,<7", "pydoctor>=25.10.1,<26", - "pyright==1.1.403", - "pytest~=7.4", + "pyright==1.1.414", + # pytest-asyncio 0.21 relies on pytest internals removed in 9.2. + "pytest>=9.0,<9.2", "pytest-asyncio>=0.21,<0.22", "pytest-timeout~=2.2", - "ruff>=0.5.0,<0.6", + "ruff>=0.15.12,<0.16", "toml>=0.10.2,<0.11", + "tomlkit>=0.13,<0.14", "twine>=4.0.1,<5", "maturin>=1.8.2", + "temporalio-openai-agents>=1.0.0", "pytest-cov>=6.1.1", "httpx>=0.28.1", "pytest-pretty>=1.3.0", - "openai-agents>=0.3,<0.7; python_version >= '3.14'", - "openai-agents[litellm]>=0.3,<0.7; python_version < '3.14'", - "googleapis-common-protos==1.70.0", + "googleapis-common-protos>=1.75.0,<2", "pytest-rerunfailures>=16.1", + "pytest-xdist>=3.6,<4", + "moto[s3,server]>=5", + "setuptools<82", + "opentelemetry-exporter-otlp-proto-grpc>=1.11.1,<2", + "opentelemetry-semantic-conventions>=0.40b0,<1", + "opentelemetry-sdk-extension-aws>=2.0.0,<3", + "pytest-flakefinder>=1.1.0", ] [tool.poe.tasks] build-develop = "uv run maturin develop --uv" build-develop-with-release = { cmd = "uv run maturin develop --release --uv" } +# FIPS builds: swap the rustls stack onto aws-lc-rs FIPS mode (aws-lc-fips-sys), eliminating `ring`. +build-develop-fips = { cmd = "uv run maturin develop --uv --no-default-features --features fips", env = { TEMPORALIO_FIPS = "1" } } +build-wheel-fips = { cmd = "uv run maturin build --release --no-default-features --features fips", env = { TEMPORALIO_FIPS = "1" } } format = [ { cmd = "uv run ruff check --select I --fix" }, { cmd = "uv run ruff format" }, { cmd = "cargo fmt", cwd = "temporalio/bridge" }, ] gen-docs = "uv run scripts/gen_docs.py" +gen-nexus-system-api = "uv run scripts/gen_nexus_system_api.py" gen-protos = [ - { cmd = "uv run scripts/gen_protos.py" }, - { cmd = "uv run scripts/gen_payload_visitor.py" }, - { cmd = "uv run scripts/gen_bridge_client.py" }, - { ref = "format" }, -] -gen-protos-docker = [ - { cmd = "uv run scripts/gen_protos_docker.py" }, + { cmd = "uv run --locked scripts/gen_protos.py" }, + { ref = "gen-nexus-system-api" }, { cmd = "uv run scripts/gen_payload_visitor.py" }, { cmd = "uv run scripts/gen_bridge_client.py" }, { ref = "format" }, @@ -96,9 +125,12 @@ lint-docs = "uv run pydocstyle --ignore-decorators=overload" lint-types = [ { cmd = "uv run pyright" }, { cmd = "uv run mypy --namespace-packages --check-untyped-defs ." }, + { cmd = "uv run basedpyright --project basedpyrightconfig.json" }, ] run-bench = "uv run python scripts/run_bench.py" -test = "uv run pytest" +test = "uv run pytest -n auto --dist=worksteal" +update-core = { cmd = "uv run python scripts/update_core.py", help = "Update Core to origin/main (or --latest-tag), import changelog fragments, refresh bridge dependencies, and generate protos" } +prepare-release = { cmd = "uv run python scripts/prepare_release.py --update-core", help = "Update Core and prepare a release PR" } [tool.pytest.ini_options] @@ -119,29 +151,38 @@ filterwarnings = [ [tool.cibuildwheel] before-all = "pip install protoc-wheel-0" -build = "cp310-win_amd64 cp310-manylinux_x86_64 cp310-manylinux_aarch64 cp310-macosx_x86_64 cp310-macosx_arm64" +build = "cp311-win_amd64 cp311-manylinux_x86_64 cp311-manylinux_aarch64 cp311-musllinux_x86_64 cp311-musllinux_aarch64 cp311-macosx_x86_64 cp311-macosx_arm64" build-verbosity = 1 [tool.cibuildwheel.macos] environment = { MACOSX_DEPLOYMENT_TARGET = "10.12" } [tool.cibuildwheel.linux] -before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y && yum install -y openssl-devel" -before-build = "pip install protoc-wheel-0" +before-all = "sh scripts/cibuildwheel_before_all_linux.sh" +before-build = "sh scripts/cibuildwheel_before_build_linux.sh" environment = { PATH = "$PATH:$HOME/.cargo/bin", CARGO_NET_GIT_FETCH_WITH_CLI = "true" } +[[tool.cibuildwheel.overrides]] +select = "*musllinux*" +environment = { PATH = "$PATH:$HOME/.cargo/bin", CARGO_NET_GIT_FETCH_WITH_CLI = "true", RUSTFLAGS = "-C target-feature=-crt-static" } + [tool.mypy] ignore_missing_imports = true exclude = [ # Ignore generated code 'temporalio/api', 'temporalio/bridge/proto', + 'temporalio/nexus/system/workflow_service', ] +[[tool.mypy.overrides]] +module = "temporalio.nexus.system.workflow_service.*" +ignore_errors = true + [tool.pydocstyle] convention = "google" # https://github.com/PyCQA/pydocstyle/issues/363#issuecomment-625563088 -match_dir = "^(?!(docs|scripts|tests|api|proto|\\.)).*" +match_dir = "^(?!(docs|scripts|tests|api|proto|system|_support|notifications|\\.)).*" add_ignore = [ # We like to wrap at a certain number of chars, even long summary sentences. # https://github.com/PyCQA/pydocstyle/issues/184 @@ -182,17 +223,12 @@ warnings-as-errors = true [tool.pyright] enableTypeIgnoreComments = true -reportAny = "none" reportCallInDefaultInitializer = "none" -reportExplicitAny = "none" -reportIgnoreCommentWithoutRule = "none" -reportImplicitAbstractClass = "none" reportImplicitOverride = "none" reportImplicitStringConcatenation = "none" reportImportCycles = "none" reportMissingTypeArgument = "none" reportPrivateUsage = "none" -reportUnannotatedClassAttribute = "none" reportUnknownArgumentType = "none" reportUnknownMemberType = "none" reportUnknownParameterType = "none" @@ -200,16 +236,18 @@ reportUnknownVariableType = "none" reportUnnecessaryIsInstance = "none" reportUnnecessaryTypeIgnoreComment = "none" reportUnusedCallResult = "none" +reportUnknownLambdaType = "none" include = ["temporalio", "tests"] exclude = [ # Exclude auto generated files "temporalio/api", "temporalio/bridge/proto", + "temporalio/bridge/_visitor.py", "tests/worker/workflow_sandbox/testmodules/proto", ] [tool.ruff] -target-version = "py39" +target-version = "py311" [build-system] requires = ["maturin>=1.0,<2.0"] @@ -220,8 +258,11 @@ manifest-path = "temporalio/bridge/Cargo.toml" module-name = "temporalio.bridge.temporal_sdk_bridge" python-packages = ["temporalio"] include = ["LICENSE"] -exclude = ["temporalio/bridge/target/**/*"] +exclude = ["temporalio/bridge/target/**/*", "temporalio/bridge/sdk-core/.git"] [tool.uv] # Prevent uv commands from building the package by default package = false +exclude-newer = "2 weeks" +# Nexus and the SDK compatibility extras need newly published releases. +exclude-newer-package = { nexus-rpc = false, temporalio-deepagents = false, temporalio-google-adk = false, temporalio-google-genai = false, temporalio-langgraph = false, temporalio-langsmith = false, temporalio-strands-agents = false } diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000000..9f29c10995 --- /dev/null +++ b/scripts/__init__.py @@ -0,0 +1 @@ +"""Repository helper scripts.""" diff --git a/scripts/_proto/Dockerfile b/scripts/_proto/Dockerfile deleted file mode 100644 index 36e6d1a6cd..0000000000 --- a/scripts/_proto/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM python:3.10 - -RUN curl -LsSf https://astral.sh/uv/install.sh | sh -ENV PATH="$PATH:/root/.local/bin" -RUN uv tool install poethepoet -VOLUME ["/api_new", "/bridge_new"] - -COPY ./ ./ - -RUN mkdir -p ./temporalio/api -RUN uv add "protobuf<4" -RUN uv sync --all-extras -RUN uv run scripts/gen_protos.py - -CMD ["sh", "-c", "cp -r ./temporalio/api/* /api_new && cp -r ./temporalio/bridge/proto/* /bridge_new"] diff --git a/scripts/_proto/Dockerfile.dockerignore b/scripts/_proto/Dockerfile.dockerignore deleted file mode 100644 index 00714526a3..0000000000 --- a/scripts/_proto/Dockerfile.dockerignore +++ /dev/null @@ -1,13 +0,0 @@ -.git/ -.idea/ -.mypy_cache/ -.pytest_cache/ -.ruff_cache/ -.venv/ -build/ -dist/ -temporalio/api/ -temporalio/bridge/**/target/ -temporalio/bridge/**/*.so -Dockerfile -.python-version diff --git a/scripts/changelog.py b/scripts/changelog.py new file mode 100644 index 0000000000..412acf4733 --- /dev/null +++ b/scripts/changelog.py @@ -0,0 +1,54 @@ +"""Invoke the shared, pinned sdk-rust changelog tooling.""" + +from __future__ import annotations + +import datetime +import pathlib +import subprocess +from collections.abc import Sequence + + +def run_tool(repo_root: pathlib.Path, args: Sequence[str]) -> str: + """Run the pinned tool, retaining diagnostics on failure.""" + core = repo_root / "temporalio/bridge/sdk-core" + if not (core / ".git").exists(): + raise RuntimeError("Initialize sdk-rust with 'git submodule update --init'") + try: + result = subprocess.run( + [ + "cargo", + "run", + "--quiet", + "--manifest-path", + str(core / "crates/changelog-release-notes/Cargo.toml"), + "--bin", + "changelog-tool", + "--", + *args, + "--repo", + str(repo_root.resolve()), + ], + cwd=core, + check=True, + capture_output=True, + text=True, + ) + except subprocess.CalledProcessError as err: + raise RuntimeError(f"Shared changelog tool failed:\n{err.stderr}") from err + return result.stdout + + +def prepare_changelog( + repo_root: pathlib.Path, version: str, release_date: datetime.date +) -> None: + """Write the dated changelog and consume fragments using the shared tool.""" + run_tool( + repo_root, + [ + "prepare", + "--version", + version, + "--date", + release_date.isoformat(), + ], + ) diff --git a/scripts/cibuildwheel_before_all_linux.sh b/scripts/cibuildwheel_before_all_linux.sh new file mode 100644 index 0000000000..be9b089861 --- /dev/null +++ b/scripts/cibuildwheel_before_all_linux.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -eu + +if command -v apk >/dev/null 2>&1; then + apk add --no-cache build-base curl openssl-dev protobuf-dev +elif command -v yum >/dev/null 2>&1; then + yum install -y openssl-devel +else + echo "Unsupported Linux image: expected apk or yum" >&2 + exit 1 +fi + +curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y diff --git a/scripts/cibuildwheel_before_build_linux.sh b/scripts/cibuildwheel_before_build_linux.sh new file mode 100644 index 0000000000..838c7dd725 --- /dev/null +++ b/scripts/cibuildwheel_before_build_linux.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if command -v protoc >/dev/null 2>&1; then + protoc --version +else + pip install protoc-wheel-0 +fi diff --git a/scripts/gen_bridge_client.py b/scripts/gen_bridge_client.py index d49cf14cb8..f06dd29e65 100644 --- a/scripts/gen_bridge_client.py +++ b/scripts/gen_bridge_client.py @@ -42,7 +42,7 @@ def generate_python_services( ''') def service_name(s): - return f"import {sanitize_proto_name(s.full_name)[:-len(s.name)-1]}" + return f"import {sanitize_proto_name(s.full_name)[: -len(s.name) - 1]}" service_imports = [ service_name(service_descriptor) @@ -174,8 +174,8 @@ def generate_rust_service_call(service_descriptor: ServiceDescriptor) -> str: call: RpcCall, ) -> PyResult> { self.runtime.assert_same_process("use client")?; - use temporalio_client::${descriptor_name}; - let mut retry_client = self.retry_client.clone(); + use temporalio_client::grpc::${descriptor_name}; + let mut connection = self.connection.clone(); self.runtime.future_into_py(py, async move { let bytes = match call.rpc.as_str() { $match_arms @@ -203,26 +203,31 @@ def generate_rust_service_call(service_descriptor: ServiceDescriptor) -> str: if not method.client_streaming and not method.server_streaming ] + service_method = pascal_to_snake(sanitized_service_name) match_arms = [ - generate_rust_match_arm(sanitized_service_name, method) + generate_rust_match_arm(sanitized_service_name, service_method, method) for method in sorted(methods, key=lambda m: m.name) ] return call_template.substitute( - service_name=pascal_to_snake(sanitized_service_name), + service_name=service_method, descriptor_name=sanitized_service_name, match_arms="\n".join(match_arms), ) -def generate_rust_match_arm(trait_name: str, method: MethodDescriptor) -> str: +def generate_rust_match_arm( + trait_name: str, service_method: str, method: MethodDescriptor +) -> str: match_template = Template("""\ - "$method_name" => { - rpc_call!(retry_client, call, $trait_name, $method_name) + "$method_name" => { + rpc_call!(connection, call, $trait_name, $service_method, $method_name) }""") return match_template.substitute( - method_name=pascal_to_snake(method.name), trait_name=trait_name + method_name=pascal_to_snake(method.name), + trait_name=trait_name, + service_method=service_method, ) diff --git a/scripts/gen_docs.py b/scripts/gen_docs.py index eb68499865..c00e2b468a 100644 --- a/scripts/gen_docs.py +++ b/scripts/gen_docs.py @@ -1,14 +1,48 @@ +import ast import shutil -import subprocess from pathlib import Path +from pydoctor import driver, model + base_dir = Path(__file__).parent.parent + +class ProtobufSystem(model.System): + """Expose dynamic protobuf types as names without documenting their internals. + + Pydoctor discovers .py files, not adjacent .pyi stubs. The generated .py + files create types through runtime builder calls that its static analysis + cannot resolve. Read public top-level class names from the stubs and register + them as attributes so links resolve without generating full class pages. + """ + + def addModule(self, path: Path, parent: model.Package | None) -> None: + super().addModule(path, parent) + stub = path.with_suffix(".pyi") + if path.name.endswith("_pb2.py") and stub.is_file(): + name = f"{parent.fullName()}.{path.stem}" if parent else path.stem + module = self.allobjects[name] + assert isinstance(module, model.Module) + for node in ast.parse(stub.read_text(encoding="utf-8")).body: + if isinstance(node, ast.ClassDef) and not node.name.startswith("_"): + attribute = self.Attribute(self, node.name, module, stub) + attribute.kind = model.DocumentableKind.VARIABLE + attribute.parentMod = module + attribute.setLineNumber(node.lineno) + # The declaration is in the stub, not the runtime module. + if source_href := self._formatSourceHref(stub): + attribute.source_href = self.options.htmlsourcetemplate.format( + mod_source_href=source_href, lineno=str(node.lineno) + ) + self.addObject(attribute) + + if __name__ == "__main__": print("Generating documentation...") - # Run pydoctor - subprocess.check_call(["pydoctor", "--quiet"]) + result = driver.main(["--quiet", "--system-class=__main__.ProtobufSystem"]) + if result: + raise SystemExit(result) # Copy favicon shutil.copyfile( diff --git a/scripts/gen_nexus_system_api.py b/scripts/gen_nexus_system_api.py new file mode 100644 index 0000000000..3b16ce1bb3 --- /dev/null +++ b/scripts/gen_nexus_system_api.py @@ -0,0 +1,205 @@ +import ast +import os +import shutil +import subprocess +import sys +import tempfile +from pathlib import Path + +import gen_protos + +base_dir = Path(__file__).parent.parent +sys.path.insert(0, str(base_dir)) +wit_input_dir = ( + base_dir + / "temporalio" + / "bridge" + / "sdk-core" + / "crates" + / "protos" + / "protos" + / "api_upstream" + / "nexus" +) +wit_deps_dir = wit_input_dir / "deps" +workflow_output_dir = base_dir / "temporalio" / "nexus" / "system" / "workflow_service" +notification_output_dir = base_dir / "temporalio" / "nexus" / "notifications" +workflow_init_path = base_dir / "temporalio" / "workflow" / "__init__.py" +NEX_GEN_VERSION = "0.2.8" +proto_files = [ + gen_protos.api_proto_dir + / "temporal" + / "api" + / "workflowservice" + / "v1" + / "request_response.proto", + gen_protos.api_proto_dir + / "temporal" + / "api" + / "notificationservice" + / "v1" + / "request_response.proto", +] + + +def nex_gen_command() -> list[str]: + if bin_path := os.environ.get("NEX_GEN_BIN"): + return [bin_path] + if ( + shutil.which("nexgen") is None + or subprocess.check_output(["nexgen", "--version"], text=True).strip() + != f"nexgen {NEX_GEN_VERSION}" + ): + subprocess.check_call( + [ + "cargo", + "install", + "--locked", + "nexgen", + "--version", + NEX_GEN_VERSION, + "--features", + "advanced", + "--force", + ] + ) + return ["nexgen"] + + +def build_descriptor_set(descriptor_path: Path) -> None: + subprocess.check_call( + [ + "protoc", + f"--proto_path={gen_protos.api_proto_dir}", + f"--proto_path={gen_protos.proto_dir}", + "--include_imports", + f"--descriptor_set_out={descriptor_path}", + *map(str, proto_files), + ] + ) + + +def generate_package( + command: list[str], + wit_name: str, + output_dir: Path, + descriptor_path: Path, + *, + native_api: bool, +) -> None: + args = [*command, "python", str(wit_input_dir / wit_name), str(wit_deps_dir)] + if native_api: + args.append("--native-api") + subprocess.check_call( + [ + *args, + "--system-nexus", + "--support-package", + "temporalio.nexus.system._support", + "--descriptors", + str(descriptor_path), + "--output", + str(output_dir), + ] + ) + + +def generated_exports(init_path: Path) -> list[str]: + tree = ast.parse(init_path.read_text()) + for statement in tree.body: + if not isinstance(statement, ast.Assign) or not any( + isinstance(target, ast.Name) and target.id == "__all__" + for target in statement.targets + ): + continue + value = ast.literal_eval(statement.value) + if not isinstance(value, list) or not all( + isinstance(item, str) for item in value + ): + raise RuntimeError( + f"generated package {init_path} __all__ must be a list of strings" + ) + return value + raise RuntimeError(f"generated package {init_path} does not define __all__") + + +def replace_marker_block( + content: str, begin: str, end: str, replacement: list[str] +) -> str: + start = content.index(begin) + finish = content.index("\n", content.index(end, start)) + 1 + return content[:start] + "".join(replacement) + content[finish:] + + +def generate_workflow_exports() -> None: + exports = generated_exports(workflow_output_dir / "__init__.py") + import_block = [ + "# BEGIN GENERATED NEXUS SYSTEM EXPORTS\n", + "from temporalio.nexus.system.workflow_service import (\n", + *[f" {export},\n" for export in exports], + ")\n", + "# END GENERATED NEXUS SYSTEM EXPORTS\n", + ] + all_block = [ + " # BEGIN GENERATED NEXUS SYSTEM __ALL__\n", + *[f' "{export}",\n' for export in exports], + " # END GENERATED NEXUS SYSTEM __ALL__\n", + ] + content = workflow_init_path.read_text() + content = replace_marker_block( + content, import_block[0].strip(), import_block[-1].strip(), import_block + ) + workflow_init_path.write_text( + replace_marker_block( + content, + " # BEGIN GENERATED NEXUS SYSTEM __ALL__", + " # END GENERATED NEXUS SYSTEM __ALL__", + all_block, + ) + ) + + +def generate_nexus_system_api() -> None: + required_paths = [ + wit_input_dir / "workflow-service.wit", + wit_input_dir / "notification-service.wit", + wit_deps_dir, + *proto_files, + ] + for path in required_paths: + if not path.exists(): + raise RuntimeError(f"missing generator input: {path}") + with tempfile.TemporaryDirectory(dir=base_dir) as temp_dir: + descriptor_path = Path(temp_dir) / "temporal_api.bin" + build_descriptor_set(descriptor_path) + command = nex_gen_command() + for wit_name, output_dir, native_api in ( + ("workflow-service.wit", workflow_output_dir, True), + ("notification-service.wit", notification_output_dir, False), + ): + shutil.rmtree(output_dir, ignore_errors=True) + output_dir.parent.mkdir(parents=True, exist_ok=True) + generate_package( + command, + wit_name, + output_dir, + descriptor_path, + native_api=native_api, + ) + workflow_output_dir.parent.joinpath("__init__.py").touch() + generate_workflow_exports() + format_paths = [ + str(workflow_output_dir), + str(notification_output_dir), + str(workflow_init_path), + ] + subprocess.check_call( + [sys.executable, "-m", "ruff", "check", "--select", "I", "--fix", *format_paths] + ) + subprocess.check_call([sys.executable, "-m", "ruff", "format", *format_paths]) + + +if __name__ == "__main__": + print("Generating Nexus system API...", file=sys.stderr) + generate_nexus_system_api() + print("Done", file=sys.stderr) diff --git a/scripts/gen_payload_visitor.py b/scripts/gen_payload_visitor.py index eabfd9e6a0..ba5ddc112b 100644 --- a/scripts/gen_payload_visitor.py +++ b/scripts/gen_payload_visitor.py @@ -1,19 +1,61 @@ import subprocess import sys +from importlib.util import module_from_spec, spec_from_file_location from pathlib import Path -from typing import Optional +from typing import cast, get_args, get_origin, get_type_hints +import google.protobuf.message +import nexusrpc from google.protobuf.descriptor import Descriptor, FieldDescriptor +base_dir = Path(__file__).parent.parent +sys.path.insert(0, str(base_dir)) + from temporalio.api.common.v1.message_pb2 import Payload, Payloads, SearchAttributes +from temporalio.api.notificationservice.v1 import OnCompleteRequest, OnCompleteResponse +from temporalio.bridge.proto.nexus import NexusTaskCompletion from temporalio.bridge.proto.workflow_activation.workflow_activation_pb2 import ( WorkflowActivation, ) from temporalio.bridge.proto.workflow_completion.workflow_completion_pb2 import ( WorkflowActivationCompletion, ) - -base_dir = Path(__file__).parent.parent +from temporalio.converter._payload_converter import _get_transfer_type_converter + + +def discover_system_nexus_roots() -> list[Descriptor]: + module_path = base_dir / "temporalio" / "nexus" / "system" / "workflow_service" + spec = spec_from_file_location( + "temporalio_nexus_system_workflow_service", + module_path / "__init__.py", + submodule_search_locations=[str(module_path)], + ) + if spec is None or spec.loader is None: + raise RuntimeError(f"Cannot load generated system service from {module_path}") + module = module_from_spec(spec) + sys.modules[spec.name] = module + spec.loader.exec_module(module) + + roots: list[Descriptor] = [] + for annotation in get_type_hints(module._services.WorkflowService).values(): + if get_origin(annotation) is not nexusrpc.Operation: + continue + for operation_type in get_args(annotation): + converter = _get_transfer_type_converter(operation_type) + proto_type = ( + converter.transfer_type if converter is not None else operation_type + ) + if isinstance(proto_type, type) and issubclass( + proto_type, google.protobuf.message.Message + ): + roots.append(cast(Descriptor, proto_type.DESCRIPTOR)) + deduped: list[Descriptor] = [] + seen: set[str] = set() + for root in roots: + if root.full_name not in seen: + seen.add(root.full_name) + deduped.append(root) + return deduped def name_for(desc: Descriptor) -> str: @@ -21,50 +63,58 @@ def name_for(desc: Descriptor) -> str: return desc.full_name.replace(".", "_") +def field_is_repeated(field: FieldDescriptor) -> bool: + return bool( + getattr( + field, + "is_repeated", + getattr(field, "label") == FieldDescriptor.LABEL_REPEATED, + ) + ) + + def emit_loop( field_name: str, iter_expr: str, child_method: str, ) -> str: - # Helper to emit a for-loop over a collection with optional headers guard + # Emit a for-loop with direct await, with optional skip guard + inner = ( + f"for v in {iter_expr}:\n" + f" await self._visit_{child_method}(fs, v)" + ) if field_name == "headers": - return f"""\ - if not self.skip_headers: - for v in {iter_expr}: - await self._visit_{child_method}(fs, v)""" + return f" if not self.skip_headers:\n {inner}" elif field_name == "search_attributes": - return f"""\ - if not self.skip_search_attributes: - for v in {iter_expr}: - await self._visit_{child_method}(fs, v)""" + return f" if not self.skip_search_attributes:\n {inner}" else: - return f"""\ - for v in {iter_expr}: - await self._visit_{child_method}(fs, v)""" + return f" {inner}" def emit_singular( field_name: str, access_expr: str, child_method: str, presence_word: str | None ) -> str: - # Helper to emit a singular field visit with presence check and optional headers guard + # Emit a direct await self._visit_...() with optional HasField check and skip guard if presence_word: if field_name == "headers": - return f"""\ - if not self.skip_headers: - {presence_word} o.HasField("{field_name}"): - await self._visit_{child_method}(fs, {access_expr})""" + return ( + " if not self.skip_headers:\n" + f' {presence_word} o.HasField("{field_name}"):\n' + f" await self._visit_{child_method}(fs, {access_expr})" + ) else: - return f"""\ - {presence_word} o.HasField("{field_name}"): - await self._visit_{child_method}(fs, {access_expr})""" + return ( + f' {presence_word} o.HasField("{field_name}"):\n' + f" await self._visit_{child_method}(fs, {access_expr})" + ) else: if field_name == "headers": - return f"""\ - if not self.skip_headers: - await self._visit_{child_method}(fs, {access_expr})""" + return ( + " if not self.skip_headers:\n" + f" await self._visit_{child_method}(fs, {access_expr})" + ) else: - return f"""\ - await self._visit_{child_method}(fs, {access_expr})""" + return f" await self._visit_{child_method}(fs, {access_expr})" class VisitorGenerator: @@ -75,45 +125,62 @@ def generate(self, roots: list[Descriptor]) -> str: The generated code defines async visitor functions for each reachable protobuf message type starting from WorkflowActivation, including support - for repeated fields and map entries, and a convenience entrypoint - function `visit`. + for repeated fields and map entries. Payload-free roots get no-op methods + so the `visit` entrypoint recognizes them as supported. """ - for r in roots: - self.walk(r) + for root in roots: + if not self.walk(root): + self.methods.append( + f"""\ + async def _visit_{name_for(root)}( + self, fs: VisitorFunctions, o: Any + ) -> None: + pass +""" + ) header = """ +from __future__ import annotations + # This file is generated by gen_payload_visitor.py. Changes should be made there. -import abc -from typing import Any, MutableSequence +from typing import Any +import temporalio.nexus.system from temporalio.api.common.v1.message_pb2 import Payload +from temporalio.bridge._visitor_functions import ( + BoundedVisitorFunctions, + PayloadSequence, + VisitorFunctions, +) -class VisitorFunctions(abc.ABC): - \"\"\"Set of functions which can be called by the visitor. - Allows handling payloads as a sequence. - \"\"\" - @abc.abstractmethod - async def visit_payload(self, payload: Payload) -> None: - \"\"\"Called when encountering a single payload.\"\"\" - raise NotImplementedError() - - @abc.abstractmethod - async def visit_payloads(self, payloads: MutableSequence[Payload]) -> None: - \"\"\"Called when encountering multiple payloads together.\"\"\" - raise NotImplementedError() - class PayloadVisitor: - \"\"\"A visitor for payloads. + \"\"\"A visitor for payloads. Applies a function to every payload in a tree of messages. \"\"\" + def __init__( - self, *, skip_search_attributes: bool = False, skip_headers: bool = False + self, + *, + skip_search_attributes: bool = False, + skip_headers: bool = False, + concurrency_limit: int = 1, ): - \"\"\"Creates a new payload visitor.\"\"\" + \"\"\"Creates a new payload visitor. + + Args: + skip_search_attributes: If True, search attributes are not visited. + skip_headers: If True, headers are not visited. + concurrency_limit: Maximum number of payload visits that may run + concurrently during a single call to visit(). Defaults to 1 + (sequential). + \"\"\" + if concurrency_limit < 1: + raise ValueError("concurrency_limit must be positive") self.skip_search_attributes = skip_search_attributes self.skip_headers = skip_headers + self._concurrency_limit = concurrency_limit async def visit( self, fs: VisitorFunctions, root: Any @@ -121,10 +188,24 @@ async def visit( \"\"\"Visits the given root message with the given function.\"\"\" method_name = "_visit_" + root.DESCRIPTOR.full_name.replace(".", "_") method = getattr(self, method_name, None) - if method is not None: - await method(fs, root) - else: + if method is None: raise ValueError(f"Unknown root message type: {root.DESCRIPTOR.full_name}") + if self._concurrency_limit == 1: + await method(fs, root) + return + + bounded = BoundedVisitorFunctions(fs, self._concurrency_limit) + try: + await method(bounded, root) + finally: + await bounded.drain() + + async def _visit_nexus_operation_input_payload( + self, + fs: VisitorFunctions, + payload: Payload, + ) -> None: + await self._visit_temporal_api_common_v1_Payload(fs, payload) """ @@ -139,31 +220,42 @@ def __init__(self): self.in_progress: set[str] = set() self.methods: list[str] = [ """\ - async def _visit_temporal_api_common_v1_Payload(self, fs, o): - await fs.visit_payload(o) + async def _visit_temporal_api_common_v1_Payload( + self, fs: VisitorFunctions, payload: Payload + ) -> None: + new_payload = await temporalio.nexus.system.maybe_visit_payload( + payload, + fs, + self.skip_search_attributes, + ) + if new_payload is None: + await fs.visit_payload(payload) + return + + if new_payload is not payload: + payload.CopyFrom(new_payload) + await fs.visit_system_nexus_envelope(payload) """, """\ - async def _visit_temporal_api_common_v1_Payloads(self, fs, o): + async def _visit_temporal_api_common_v1_Payloads(self, fs: VisitorFunctions, o: Any): await fs.visit_payloads(o.payloads) """, """\ - async def _visit_payload_container(self, fs, o): + async def _visit_payload_container(self, fs: VisitorFunctions, o: PayloadSequence): await fs.visit_payloads(o) """, ] - def check_repeated(self, child_desc, field, iter_expr) -> str | None: - # Special case for repeated payloads, handle them directly + def _collect_repeated( + self, child_desc: Descriptor, field: FieldDescriptor, iter_expr: str + ) -> tuple | None: + """Collect emit item for a non-map repeated field. Returns tuple or None.""" if child_desc.full_name == Payload.DESCRIPTOR.full_name: - return emit_singular(field.name, iter_expr, "payload_container", None) + return ("singular", field.name, iter_expr, "payload_container", None) else: child_needed = self.walk(child_desc) if child_needed: - return emit_loop( - field.name, - iter_expr, - name_for(child_desc), - ) + return ("loop", field.name, iter_expr, name_for(child_desc)) else: return None @@ -177,11 +269,13 @@ def walk(self, desc: Descriptor) -> bool: has_payload = False self.in_progress.add(key) - lines: list[str] = [f" async def _visit_{name_for(desc)}(self, fs, o):"] - # If this is the SearchAttributes message, allow skipping - if desc.full_name == SearchAttributes.DESCRIPTOR.full_name: - lines.append(" if self.skip_search_attributes:") - lines.append(" return") + is_search_attrs = desc.full_name == SearchAttributes.DESCRIPTOR.full_name + + # Collect emit items before generating code. Each item is one of: + # ("loop", field_name, iter_expr, child_method) + # ("singular", field_name, access_expr, child_method, presence_word_or_None) + # ("oneof_group",[(field_name, access_expr, child_method, if_word), ...]) + emit_items: list = [] # Group fields by oneof to generate if/elif chains oneof_fields: dict[int, list[FieldDescriptor]] = {} @@ -202,98 +296,160 @@ def walk(self, desc: Descriptor) -> bool: # Process regular fields first for field in regular_fields: + if ( + desc.full_name == "coresdk.workflow_commands.ScheduleNexusOperation" + and field.name == "input" + ): + has_payload = True + emit_items.append( + ( + "system_nexus", + field.name, + "o.endpoint", + "o.input", + ) + ) + continue + # Repeated fields (including maps which are represented as repeated messages) - if field.label == FieldDescriptor.LABEL_REPEATED: - if ( - field.message_type is not None - and field.message_type.GetOptions().map_entry - ): - val_fd = field.message_type.fields_by_name.get("value") + if field_is_repeated(field): + message_type = field.message_type + if message_type is not None and message_type.GetOptions().map_entry: + val_fd = message_type.fields_by_name.get("value") if ( val_fd is not None and val_fd.type == FieldDescriptor.TYPE_MESSAGE ): child_desc = val_fd.message_type + assert child_desc is not None child_needed = self.walk(child_desc) if child_needed: has_payload = True - lines.append( - emit_loop( + emit_items.append( + ( + "loop", field.name, f"o.{field.name}.values()", name_for(child_desc), ) ) - key_fd = field.message_type.fields_by_name.get("key") + key_fd = message_type.fields_by_name.get("key") if ( key_fd is not None and key_fd.type == FieldDescriptor.TYPE_MESSAGE ): child_desc = key_fd.message_type + assert child_desc is not None child_needed = self.walk(child_desc) if child_needed: has_payload = True - lines.append( - emit_loop( + emit_items.append( + ( + "loop", field.name, f"o.{field.name}.keys()", name_for(child_desc), ) ) else: - child = self.check_repeated( - field.message_type, field, f"o.{field.name}" + assert message_type is not None + item = self._collect_repeated( + message_type, field, f"o.{field.name}" ) - if child is not None: + if item is not None: has_payload = True - lines.append(child) + emit_items.append(item) else: child_desc = field.message_type + assert child_desc is not None child_has_payload = self.walk(child_desc) has_payload |= child_has_payload if child_has_payload: - lines.append( - emit_singular( - field.name, f"o.{field.name}", name_for(child_desc), "if" + emit_items.append( + ( + "singular", + field.name, + f"o.{field.name}", + name_for(child_desc), + "if", ) ) # Process oneof fields as if/elif chains for oneof_idx, fields in oneof_fields.items(): - oneof_lines = [] + group = [] first = True for field in fields: child_desc = field.message_type + assert child_desc is not None child_has_payload = self.walk(child_desc) has_payload |= child_has_payload if child_has_payload: if_word = "if" if first else "elif" first = False - line = emit_singular( - field.name, f"o.{field.name}", name_for(child_desc), if_word + group.append( + (field.name, f"o.{field.name}", name_for(child_desc), if_word) ) - oneof_lines.append(line) - if oneof_lines: - lines.extend(oneof_lines) + if group: + emit_items.append(("oneof_group", group)) self.generated[key] = has_payload self.in_progress.discard(key) + if has_payload: + lines: list[str] = [ + f" async def _visit_{name_for(desc)}" + "(self, fs: VisitorFunctions, o: Any):" + ] + if is_search_attrs: + lines.append(" if self.skip_search_attributes:") + lines.append(" return") + + for item in emit_items: + if item[0] == "loop": + _, field_name, iter_expr, child_method = item + lines.append(emit_loop(field_name, iter_expr, child_method)) + elif item[0] == "singular": + _, field_name, access_expr, child_method, presence_word = item + lines.append( + emit_singular( + field_name, access_expr, child_method, presence_word + ) + ) + elif item[0] == "system_nexus": + _, field_name, _endpoint_expr, payload_expr = item + lines.append( + f' if o.HasField("{field_name}"):\n' + " await self._visit_nexus_operation_input_payload(\n" + f" fs, {payload_expr}\n" + " )" + ) + else: # oneof_group + for field_name, access_expr, child_method, presence_word in item[1]: + lines.append( + emit_singular( + field_name, access_expr, child_method, presence_word + ) + ) + self.methods.append("\n".join(lines) + "\n") return has_payload -def write_generated_visitors_into_visitor_generated_py() -> None: - """Write the generated visitor code into _visitor.py.""" +def write_bridge_visitors() -> None: out_path = base_dir / "temporalio" / "bridge" / "_visitor.py" # Build root descriptors: WorkflowActivation, WorkflowActivationCompletion, - # and all messages from selected API modules + # NexusTaskCompletion, the system Nexus operation roots, and the notification + # service messages delivered to Nexus handler callbacks. roots: list[Descriptor] = [ WorkflowActivation.DESCRIPTOR, WorkflowActivationCompletion.DESCRIPTOR, - ] + NexusTaskCompletion.DESCRIPTOR, + OnCompleteRequest.DESCRIPTOR, + OnCompleteResponse.DESCRIPTOR, + ] + discover_system_nexus_roots() code = VisitorGenerator().generate(roots) out_path.write_text(code) @@ -301,5 +457,29 @@ def write_generated_visitors_into_visitor_generated_py() -> None: if __name__ == "__main__": print("Generating temporalio/bridge/_visitor.py...", file=sys.stderr) - write_generated_visitors_into_visitor_generated_py() - subprocess.run(["uv", "run", "ruff", "format", "temporalio/bridge/_visitor.py"]) + write_bridge_visitors() + subprocess.run( + [ + "uv", + "run", + "ruff", + "check", + "--select", + "I", + "--fix", + "temporalio/bridge/_visitor.py", + ], + cwd=base_dir, + check=True, + ) + subprocess.run( + [ + "uv", + "run", + "ruff", + "format", + "temporalio/bridge/_visitor.py", + ], + cwd=base_dir, + check=True, + ) diff --git a/scripts/gen_protos.py b/scripts/gen_protos.py index 131f094f40..f33981fdc3 100644 --- a/scripts/gen_protos.py +++ b/scripts/gen_protos.py @@ -1,4 +1,17 @@ +# /// script +# requires-python = "==3.11.*" +# dependencies = [ +# "grpcio-tools==1.49.1", +# "protobuf==4.25.9", +# "mypy-protobuf==3.6.0", +# "setuptools<82", +# ] +# [tool.uv] +# extra-build-dependencies = { grpcio-tools = ["setuptools<82"] } +# /// + import collections +import importlib.metadata import re import shutil import subprocess @@ -7,11 +20,10 @@ from collections.abc import Mapping from functools import partial from pathlib import Path -from typing import List base_dir = Path(__file__).parent.parent proto_dir = ( - base_dir / "temporalio" / "bridge" / "sdk-core" / "crates" / "common" / "protos" + base_dir / "temporalio" / "bridge" / "sdk-core" / "crates" / "protos" / "protos" ) api_proto_dir = proto_dir / "api_upstream" api_cloud_proto_dir = proto_dir / "api_cloud_upstream" @@ -30,7 +42,11 @@ and not "google" in str(v) ] proto_paths.extend(test_proto_dir.glob("**/*.proto")) -proto_paths.extend(additional_proto_dir.glob("**/*.proto")) +proto_paths.extend( + v + for v in additional_proto_dir.glob("**/*.proto") + if ".venv" not in v.relative_to(additional_proto_dir).parts +) api_out_dir = base_dir / "temporalio" / "api" sdk_out_dir = base_dir / "temporalio" / "bridge" / "proto" @@ -40,17 +56,36 @@ partial( re.compile(r"from dependencies\.").sub, r"from temporalio.api.dependencies." ), + partial( + re.compile(r"from protoc_gen_openapiv2\.").sub, + r"from temporalio.api.dependencies.protoc_gen_openapiv2.", + ), + partial( + re.compile(r"from nexusannotations\.").sub, + r"from temporalio.api.dependencies.nexusannotations.", + ), partial( re.compile(r"from temporal\.sdk\.core\.").sub, r"from temporalio.bridge.proto." ), + # Pickle must use the installed module, not the upstream proto namespace. partial( - re.compile(r"'__module__' : 'temporal\.api\.").sub, - r"'__module__' : 'temporalio.api.", + re.compile( + r"(_builder\.BuildTopDescriptorsAndMessages\(DESCRIPTOR, )'[^']+'" + ).sub, + r"\1__name__", ), ] pyi_fixes = [ partial(re.compile(r"temporal\.api\.").sub, r"temporalio.api."), + partial( + re.compile(r"protoc_gen_openapiv2\.").sub, + r"temporalio.api.dependencies.protoc_gen_openapiv2.", + ), + partial( + re.compile(r"nexusannotations\.").sub, + r"temporalio.api.dependencies.nexusannotations.", + ), partial(re.compile(r"temporal\.sdk\.core\.").sub, r"temporalio.bridge.proto."), ] @@ -73,12 +108,15 @@ def fix_generated_output(base_path: Path): with p.open(encoding="utf8") as f: content = f.read() if p.suffix == ".py": - # Defs in .py, classes in .pyi imports[p.stem] += find_def_re.findall(content) + # gRPC .pyi files also declare type-only classes. + if p.stem.endswith("_grpc"): + imports[p.stem] += find_class_re.findall(content) for fix in py_fixes: content = fix(content) else: - imports[p.stem] += find_class_re.findall(content) + if not p.stem.endswith("_grpc"): + imports[p.stem] += find_class_re.findall(content) for fix in pyi_fixes: content = fix(content) with p.open("w") as f: @@ -124,34 +162,15 @@ def fix_generated_output(base_path: Path): def check_proto_toolchain_versions(): - """ - Check protobuf and grpcio versions. - - Due to issues with the Python protobuf 3.x vs protobuf 4.x libraries, we - must require that grpcio tools be on 1.48.x and protobuf be on 3.x for - generation of protos. We can't check __version__ on the module (not - present), and we can't use importlib.metadata due to its absence in 3.7, - so we just run pip and check there. - """ - proc = subprocess.run( - ["uv", "pip", "list", "--format", "freeze"], - check=True, - capture_output=True, - text=True, + """Keep generated runtime requirements aligned with the package minimums.""" + proto_version = importlib.metadata.version("protobuf") + grpcio_tools_version = importlib.metadata.version("grpcio-tools") + assert proto_version.startswith("4."), ( + f"expected 4.x protobuf, found {proto_version}" + ) + assert grpcio_tools_version == "1.49.1", ( + f"expected 1.49.1 grpcio-tools, found {grpcio_tools_version}" ) - proto_version = "" - grpcio_tools_version = "" - for line in proc.stdout.splitlines(): - if line.startswith("protobuf"): - _, _, proto_version = line.partition("==") - elif line.startswith("grpcio-tools"): - _, _, grpcio_tools_version = line.partition("==") - assert proto_version.startswith( - "3." - ), f"expected 3.x protobuf, found {proto_version}" - assert grpcio_tools_version.startswith( - "1.48." - ), f"expected 1.48.x grpcio-tools, found {grpcio_tools_version}" def generate_protos(output_dir: Path): @@ -164,6 +183,7 @@ def generate_protos(output_dir: Path): f"--proto_path={core_proto_dir}", f"--proto_path={testsrv_proto_dir}", f"--proto_path={health_proto_dir}", + f"--proto_path={proto_dir}", f"--proto_path={test_proto_dir}", f"--proto_path={additional_proto_dir}", f"--python_out={output_dir}", @@ -183,11 +203,18 @@ def generate_protos(output_dir: Path): grpc_file.unlink() # Apply fixes before moving code fix_generated_output(output_dir) + # Move dependency protos + deps_out_dir = api_out_dir / "dependencies" + shutil.rmtree(deps_out_dir / "protoc_gen_openapiv2", ignore_errors=True) + shutil.rmtree(deps_out_dir / "nexusannotations", ignore_errors=True) + deps_out_dir.mkdir(exist_ok=True) + (output_dir / "protoc_gen_openapiv2").replace(deps_out_dir / "protoc_gen_openapiv2") + (output_dir / "nexusannotations").replace(deps_out_dir / "nexusannotations") + (deps_out_dir / "__init__.py").touch() # Move protos for p in (output_dir / "temporal" / "api").iterdir(): shutil.rmtree(api_out_dir / p.name, ignore_errors=True) p.replace(api_out_dir / p.name) - shutil.rmtree(api_out_dir / "dependencies", ignore_errors=True) for p in (output_dir / "temporal" / "sdk" / "core").iterdir(): shutil.rmtree(sdk_out_dir / p.name, ignore_errors=True) p.replace(sdk_out_dir / p.name) diff --git a/scripts/gen_protos.py.lock b/scripts/gen_protos.py.lock new file mode 100644 index 0000000000..745b9b9746 --- /dev/null +++ b/scripts/gen_protos.py.lock @@ -0,0 +1,120 @@ +version = 1 +revision = 3 +requires-python = "==3.11.*" + +[options] +exclude-newer = "2026-10-22T00:16:05.57603Z" +exclude-newer-span = "P2W" + +[options.exclude-newer-package] +nexus-rpc = false +temporalio-google-genai = false +temporalio-deepagents = false +temporalio-langgraph = false +temporalio-strands-agents = false +temporalio-langsmith = false +temporalio-google-adk = false + +[manifest] +requirements = [ + { name = "grpcio-tools", specifier = "==1.49.1" }, + { name = "mypy-protobuf", specifier = "==3.6.0" }, + { name = "protobuf", specifier = "==4.25.9" }, + { name = "setuptools", specifier = "<82" }, +] + +[[package]] +name = "grpcio" +version = "1.84.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3f/4f/4435c0aae54657258d9cfcba78598f3d9e5fe4c82ff18d78558567b90faf/grpcio-1.84.0.tar.gz", hash = "sha256:19aaf172fc2edbefccce3f6e92c5150975dbe56c45744e9e87cf72ebdf85bfbe", size = 13493876, upload-time = "2026-09-14T06:59:33.291Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2d/b9/46146728b3f4a5c7e34c17d0ab724d58b5456b116e76dc77d3ef4e79b135/grpcio-1.84.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:4aaeceeb7fa7d824c322d1ec3208c8495c88478a927295553235435fc49043ad", size = 6454572, upload-time = "2026-09-14T06:57:14.651Z" }, + { url = "https://files.pythonhosted.org/packages/e3/63/5d668b4102637410d700153fd12d6a798e3ff8308bd9dcbaeae93f191060/grpcio-1.84.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:06619ba1515e5ee69fb2a514e95dd8be05ce74cb3928d5b34f87f87c86fe3c27", size = 12359529, upload-time = "2026-09-14T06:57:17.202Z" }, + { url = "https://files.pythonhosted.org/packages/18/2a/52e29c02047a493f15a78c0502bde4d3fab7c19c7813944d367cd501811c/grpcio-1.84.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:158c1c11cfb61b4849c3caf4d52de6f5ecd376e14446feb4a90dc95a90d616f5", size = 7029927, upload-time = "2026-09-14T06:57:19.767Z" }, + { url = "https://files.pythonhosted.org/packages/0a/11/9962b313553647abb091943e0721e4a1662ecc63cdfe930abf00abcce47a/grpcio-1.84.0-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:a9383401d9f116f98cacd4eba6c505a6edb80ba65badfc8e8ed8ae64983bcc44", size = 7782268, upload-time = "2026-09-14T06:57:22.381Z" }, + { url = "https://files.pythonhosted.org/packages/e2/b7/14a9413cb7d4b2e782b4f79c81a918610caedf55138ab5916f5fdd4b002f/grpcio-1.84.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bd8ea8eb3817b226057cc1c0e7ec4b378dcda52043b972b6ff12b1152178967d", size = 7187959, upload-time = "2026-09-14T06:57:24.686Z" }, + { url = "https://files.pythonhosted.org/packages/ee/3b/6cc8e6aed8f23be40f52af341e5d4595ec3ec8d7572271a692b5c1212178/grpcio-1.84.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:756ea5c2da00fa65c930284892d2a9706828704ca3ba40b4c51c4834eb39fcfd", size = 7737554, upload-time = "2026-09-14T06:57:27.5Z" }, + { url = "https://files.pythonhosted.org/packages/3c/7e/6f61002a01802ca9675e1b3599c9b0f9f3cf168ded94ebacc02199309f88/grpcio-1.84.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:28d2609691da93051e998495108bbddd2a9f7a561253bae94828d81290f30c15", size = 8792681, upload-time = "2026-09-14T06:57:29.731Z" }, + { url = "https://files.pythonhosted.org/packages/eb/84/8bec1ae7e6732a9b435a394ddfdfffde46c2620ae0109823f7cce1a54455/grpcio-1.84.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:27b8b36200a9fbee6e120246f4a8a41657549107ef19fb2c819c4b2fd524f39a", size = 8145493, upload-time = "2026-09-14T06:57:32.672Z" }, + { url = "https://files.pythonhosted.org/packages/59/84/c8c7bd210d657288f18af06522f150f61e81ea14fd3c7c135beed697c5fd/grpcio-1.84.0-cp311-cp311-win32.whl", hash = "sha256:465eef3d17e59ad22a556fc0138f7c7c799df426734344daec42c797d49fda99", size = 4495596, upload-time = "2026-09-14T06:57:34.799Z" }, + { url = "https://files.pythonhosted.org/packages/da/1e/da99356b3b573af357d059753a47fba54f1ca1a9c0e4deccd0210cb7f4ba/grpcio-1.84.0-cp311-cp311-win_amd64.whl", hash = "sha256:f9a456bdbed52a01c9ab8423bdebab04a5363c78676edc55ab9b58bd13bdf9e1", size = 5259900, upload-time = "2026-09-14T06:57:37.067Z" }, +] + +[[package]] +name = "grpcio-tools" +version = "1.49.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "grpcio" }, + { name = "protobuf" }, + { name = "setuptools" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6c/e4/3416d25aebc4477141a491fae2c9494c5e0437a706c59103a936aac7d072/grpcio-tools-1.49.1.tar.gz", hash = "sha256:84cc64e5b46bad43d5d7bd2fd772b656eba0366961187a847e908e2cb735db91", size = 2252679, upload-time = "2022-09-22T03:03:00.279Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e4/c1/ba298fe650b67c9e31a7ad88b2fe1d8d22ff2c6a9e131604054835397dfc/grpcio_tools-1.49.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:9e5c13809ab2f245398e8446c4c3b399a62d591db651e46806cccf52a700452e", size = 36912892, upload-time = "2022-09-22T03:00:51.237Z" }, + { url = "https://files.pythonhosted.org/packages/9c/8b/a45a39bf7d1c4956d48179831e4da88c3f6ee14dbdcb273e575bbeb7de20/grpcio_tools-1.49.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:ab3d0ee9623720ee585fdf3753b3755d3144a4a8ae35bca8e3655fa2f41056be", size = 2025040, upload-time = "2022-09-22T03:00:55.219Z" }, + { url = "https://files.pythonhosted.org/packages/38/53/63174ffb57e95f32432035ae4d706963e6b5232faa1ef3563fe62aed7fe2/grpcio_tools-1.49.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ba87e3512bc91d78bf9febcfb522eadda171d2d4ddaf886066b0f01aa4929ad", size = 2513622, upload-time = "2022-09-22T03:00:57.304Z" }, + { url = "https://files.pythonhosted.org/packages/6d/7f/89dc6036b91f8cbada98b06801ac2f5db60885000feaf88f9d7cabe665b7/grpcio_tools-1.49.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13e13b3643e7577a3ec13b79689eb4d7548890b1e104c04b9ed6557a3c3dd452", size = 2370982, upload-time = "2022-09-22T03:00:59.807Z" }, + { url = "https://files.pythonhosted.org/packages/f4/65/5d95b318063b6ff023fdd6d233e91f177afac3018fffffa35ec08bcc4178/grpcio_tools-1.49.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:324f67d9cb4b7058b6ce45352fb64c20cc1fa04c34d97ad44772cfe6a4ae0cf5", size = 2960418, upload-time = "2022-09-22T03:01:02.611Z" }, + { url = "https://files.pythonhosted.org/packages/01/98/4730bfff6bcd3163db8c3d70689e19a1a5f419152316edfc1f13ff06a5d7/grpcio_tools-1.49.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a64bab81b220c50033f584f57978ebbea575f09c1ccee765cd5c462177988098", size = 2731915, upload-time = "2022-09-22T03:01:05.44Z" }, + { url = "https://files.pythonhosted.org/packages/e0/12/337b3f90f0eaa0b5998134c6f97bbacc89639c371f1e07e5fd2e51331316/grpcio_tools-1.49.1-cp311-cp311-win32.whl", hash = "sha256:f632d376f92f23e5931697a3acf1b38df7eb719774213d93c52e02acd2d529ac", size = 1553171, upload-time = "2022-09-22T03:01:08.287Z" }, + { url = "https://files.pythonhosted.org/packages/1a/14/9f61820a13429c3719741f0810ed4a055c363f84d528c8f957a72605ce86/grpcio_tools-1.49.1-cp311-cp311-win_amd64.whl", hash = "sha256:28ff2b978d9509474928b9c096a0cce4eaa9c8f7046136aee1545f6211ed8126", size = 1844039, upload-time = "2022-09-22T03:01:10.391Z" }, +] + +[[package]] +name = "mypy-protobuf" +version = "3.6.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "protobuf" }, + { name = "types-protobuf" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/4d/6f/282d64d66bf48ce60e38a6560753f784e0f88ab245ac2fb5e93f701a36cd/mypy-protobuf-3.6.0.tar.gz", hash = "sha256:02f242eb3409f66889f2b1a3aa58356ec4d909cdd0f93115622e9e70366eca3c", size = 24445, upload-time = "2024-04-01T20:24:42.837Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e8/73/d6b999782ae22f16971cc05378b3b33f6a89ede3b9619e8366aa23484bca/mypy_protobuf-3.6.0-py3-none-any.whl", hash = "sha256:56176e4d569070e7350ea620262478b49b7efceba4103d468448f1d21492fd6c", size = 16434, upload-time = "2024-04-01T20:24:40.583Z" }, +] + +[[package]] +name = "protobuf" +version = "4.25.9" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d9/8e/d08c41a8c004e1d437ef467e7c4f9c3295cd784eba48ed5d1d01f94b1dad/protobuf-4.25.9.tar.gz", hash = "sha256:b0dc7e7c68de8b1ce831dacb12fb407e838edbb8b6cc0dc3a2a6b4cbf6de9cff", size = 381040, upload-time = "2026-03-25T23:09:36.423Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a8/e9/59435bd04bdd46cb38c42a336b22f9843e8e586ff83c35a5423f8b14704e/protobuf-4.25.9-cp310-abi3-win32.whl", hash = "sha256:bde396f568b0b46fc8fbfe9f02facf25b6755b2578a3b8ac61e74b9d69499e03", size = 392879, upload-time = "2026-03-25T23:09:21.32Z" }, + { url = "https://files.pythonhosted.org/packages/f3/16/42a5c7f1001783d2b5bfcecde10127f09010f78982c86ae409122ce3ece6/protobuf-4.25.9-cp310-abi3-win_amd64.whl", hash = "sha256:3683c05154252206f7cb2d371626514b3708199d9bcf683b503dabf3a2e38e06", size = 413900, upload-time = "2026-03-25T23:09:23.589Z" }, + { url = "https://files.pythonhosted.org/packages/56/5b/0074a0a9eb01f3d1c4648ca5e81b22090c811b210b61df9018ac6d6c5cda/protobuf-4.25.9-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:9560813560e6ee72c11ca8873878bdb7ee003c96a57ebb013245fe84e2540904", size = 394826, upload-time = "2026-03-25T23:09:25.194Z" }, + { url = "https://files.pythonhosted.org/packages/54/aa/b2dba856f64c36b2a06c67be1472de98cca07a2322d0f0cbf03279a40e5b/protobuf-4.25.9-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:999146ef02e7fa6a692477badd1528bcd7268df211852a3df2d834ba2b480791", size = 294191, upload-time = "2026-03-25T23:09:26.613Z" }, + { url = "https://files.pythonhosted.org/packages/a8/5c/53f18822017b8bda6bd8bb4e02048e911fdc79a3dafdc83ab994fe922a84/protobuf-4.25.9-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:438c636de8fb706a0de94a12a268ef1ae8f5ba5ae655a7671fcda5968ba3c9be", size = 295178, upload-time = "2026-03-25T23:09:27.839Z" }, + { url = "https://files.pythonhosted.org/packages/16/28/d5065b212685875d3924bcdb3201cbf467cb4d58a18aa19a8dfd99ea80a9/protobuf-4.25.9-py3-none-any.whl", hash = "sha256:d49b615e7c935194ac161f0965699ac84df6112c378e05ec53da65d2e4cbb6d4", size = 156822, upload-time = "2026-03-25T23:09:34.957Z" }, +] + +[[package]] +name = "setuptools" +version = "81.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0d/1c/73e719955c59b8e424d015ab450f51c0af856ae46ea2da83eba51cc88de1/setuptools-81.0.0.tar.gz", hash = "sha256:487b53915f52501f0a79ccfd0c02c165ffe06631443a886740b91af4b7a5845a", size = 1198299, upload-time = "2026-02-06T21:10:39.601Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e1/e3/c164c88b2e5ce7b24d667b9bd83589cf4f3520d97cad01534cd3c4f55fdb/setuptools-81.0.0-py3-none-any.whl", hash = "sha256:fdd925d5c5d9f62e4b74b30d6dd7828ce236fd6ed998a08d81de62ce5a6310d6", size = 1062021, upload-time = "2026-02-06T21:10:37.175Z" }, +] + +[[package]] +name = "types-protobuf" +version = "7.35.1.20260906" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e1/6c/e3e5b3e10bc328126a39637c138f9ebfd734bf14342b9f3540039b4ab995/types_protobuf-7.35.1.20260906.tar.gz", hash = "sha256:efd1a3862d4c967dad5512ef8d56b1530ac84f182c41735b94004756518c4998", size = 69895, upload-time = "2026-09-06T06:35:28.308Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/44/4e/f63e826c68f77ef875506d72f225918800346545ee99847bc28f3394f18d/types_protobuf-7.35.1.20260906-py3-none-any.whl", hash = "sha256:5155e48569e0dabff303fdf578db96cd31ea9a4a63b18018a4ceac6b0ae17462", size = 86419, upload-time = "2026-09-06T06:35:27.247Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, +] diff --git a/scripts/gen_protos_docker.py b/scripts/gen_protos_docker.py deleted file mode 100644 index 8198979011..0000000000 --- a/scripts/gen_protos_docker.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import subprocess - -# Build the Docker image and capture its ID -result = subprocess.run( - [ - "docker", - "build", - "-q", - "-f", - os.path.join("scripts", "_proto", "Dockerfile"), - ".", - ], - capture_output=True, - text=True, - check=True, -) -image_id = result.stdout.strip() - -subprocess.run( - [ - "docker", - "run", - "--rm", - "-v", - os.path.join(os.getcwd(), "temporalio", "api") + ":/api_new", - "-v", - os.path.join(os.getcwd(), "temporalio", "bridge", "proto") + ":/bridge_new", - image_id, - ], - check=True, -) diff --git a/scripts/prepare_release.py b/scripts/prepare_release.py new file mode 100644 index 0000000000..6edd82077b --- /dev/null +++ b/scripts/prepare_release.py @@ -0,0 +1,304 @@ +"""Prepare checked-in files for an SDK release.""" + +from __future__ import annotations + +import argparse +import datetime +import pathlib +import re +import subprocess +import sys +from collections.abc import Sequence + +if __package__ is None or __package__ == "": + sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) + +from scripts.changelog import prepare_changelog +from scripts.update_core import update_core + +VERSION_RE = re.compile(r"[0-9]+(?:\.[0-9]+)+(?:[a-zA-Z0-9_.+-]+)?") +_RELEASE_FILES = ( + "CHANGELOG.md", + "pyproject.toml", + "temporalio/service.py", + "uv.lock", +) + + +def validate_version(version: str) -> str: + if not VERSION_RE.fullmatch(version): + raise ValueError( + f"Invalid version {version!r}; expected a version like '1.30.0'" + ) + return version + + +def parse_date(date: str) -> datetime.date: + try: + return datetime.date.fromisoformat(date) + except ValueError as err: + raise ValueError(f"Invalid release date {date!r}; expected YYYY-MM-DD") from err + + +def replace_project_version(text: str, version: str) -> str: + return _replace_once( + r'(?m)^version = "[^"]+"[^\S\r\n]*$', + f'version = "{validate_version(version)}"', + text, + description="project version", + ) + + +def replace_service_version(text: str, version: str) -> str: + return _replace_once( + r'(?m)^__version__ = "[^"]+"[^\S\r\n]*$', + f'__version__ = "{validate_version(version)}"', + text, + description="service version", + ) + + +def create_release_branch(repo_root: pathlib.Path, version: str) -> str: + """Rebuild the release branch and return its expected remote commit, if any.""" + subprocess.run(["git", "fetch", "origin", "main"], cwd=repo_root, check=True) + branch = f"chore/release-{version}" + result = subprocess.run( + ["git", "ls-remote", "--heads", "origin", f"refs/heads/{branch}"], + cwd=repo_root, + check=True, + capture_output=True, + text=True, + ) + remote_commit = result.stdout.split()[0] if result.stdout.strip() else "" + subprocess.run( + ["git", "switch", "--force-create", branch, "origin/main"], + cwd=repo_root, + check=True, + ) + subprocess.run(["git", "submodule", "update", "--init"], cwd=repo_root, check=True) + return remote_commit + + +def changed_files(repo_root: pathlib.Path) -> set[str]: + result = subprocess.run( + ["git", "status", "--porcelain", "-z", "--untracked-files=all"], + cwd=repo_root, + check=True, + capture_output=True, + text=True, + ) + return {entry[3:] for entry in result.stdout.split("\0") if entry} + + +def ensure_clean_worktree(repo_root: pathlib.Path) -> None: + changes = changed_files(repo_root) + if changes: + raise RuntimeError( + "Release preparation requires a clean worktree; found changes in " + + ", ".join(sorted(changes)) + ) + + +def ensure_only_release_changes( + repo_root: pathlib.Path, consumed_paths: Sequence[str] = () +) -> None: + unexpected_files = ( + changed_files(repo_root) - set(_RELEASE_FILES) - set(consumed_paths) + ) + if unexpected_files: + raise RuntimeError( + "Release preparation changed unexpected files: " + + ", ".join(sorted(unexpected_files)) + ) + + +def commit_release_changes( + repo_root: pathlib.Path, version: str, consumed_paths: Sequence[str] = () +) -> None: + subprocess.run( + ["git", "add", "--all", "--", *_RELEASE_FILES, *consumed_paths], + cwd=repo_root, + check=True, + ) + subprocess.run( + [ + "git", + "commit", + "-m", + f"Prepare release {version}", + "--", + *_RELEASE_FILES, + *consumed_paths, + ], + cwd=repo_root, + check=True, + ) + + +def push_release_branch( + repo_root: pathlib.Path, version: str, remote_commit: str = "" +) -> None: + branch = f"chore/release-{version}" + subprocess.run( + [ + "git", + "push", + f"--force-with-lease=refs/heads/{branch}:{remote_commit}", + "--set-upstream", + "origin", + branch, + ], + cwd=repo_root, + check=True, + ) + + +def create_release_pr(repo_root: pathlib.Path, version: str) -> None: + branch = f"chore/release-{version}" + result = subprocess.run( + [ + "gh", + "pr", + "list", + "--base", + "main", + "--head", + branch, + "--state", + "open", + "--json", + "url", + "--jq", + ".[0].url // empty", + ], + cwd=repo_root, + check=True, + capture_output=True, + text=True, + ) + if result.stdout.strip(): + print(f"Updated existing release PR: {result.stdout.strip()}") + return + subprocess.run( + [ + "gh", + "pr", + "create", + "--base", + "main", + "--head", + branch, + "--title", + f"Prepare release {version}", + "--body", + f"Prepare release {version}.", + "--label", + "skip-changelog", + ], + cwd=repo_root, + check=True, + ) + + +def _replace_once( + pattern: str, + replacement: str, + text: str, + *, + description: str, +) -> str: + updated, count = re.subn(pattern, replacement, text, count=1) + if count != 1: + raise RuntimeError(f"Could not find {description}") + return updated.rstrip("\n") + + +def prepare_release_files( + repo_root: pathlib.Path, + version: str, + release_date: datetime.date, + *, + skip_lock: bool = False, + core_changes: Sequence[str] = (), +) -> tuple[str, ...]: + """Update Python versions and lockfile before preparing the shared changelog.""" + pyproject_path = repo_root / "pyproject.toml" + service_path = repo_root / "temporalio/service.py" + pyproject_text = ( + replace_project_version(pyproject_path.read_text(encoding="utf-8"), version) + + "\n" + ) + service_text = ( + replace_service_version(service_path.read_text(encoding="utf-8"), version) + + "\n" + ) + pyproject_path.write_text(pyproject_text, encoding="utf-8") + service_path.write_text(service_text, encoding="utf-8") + if not skip_lock: + subprocess.run(["uv", "lock"], cwd=repo_root, check=True) + ensure_only_release_changes(repo_root, core_changes) + prepare_changelog(repo_root, version, release_date) + result = subprocess.run( + ["git", "ls-files", "--deleted", "-z", "--", "changelog"], + cwd=repo_root, + check=True, + capture_output=True, + text=True, + ) + return tuple(path for path in result.stdout.split("\0") if path) + + +def main(argv: Sequence[str] | None = None) -> None: + parser = argparse.ArgumentParser( + description=( + "Collect changelog fragments into a dated release, bump versions, " + "refresh uv.lock, and open a PR." + ) + ) + parser.add_argument("version", help="Release version, for example 1.30.0") + parser.add_argument( + "--date", + default=datetime.date.today().isoformat(), + help="Release date in YYYY-MM-DD format. Defaults to today.", + ) + parser.add_argument( + "--skip-lock", + action="store_true", + help="Do not run 'uv lock'. Intended only for local testing.", + ) + parser.add_argument( + "--update-core", + action="store_true", + help="Update to the latest Core release and regenerate protos on the release branch.", + ) + args = parser.parse_args(argv) + + repo_root = pathlib.Path(__file__).resolve().parents[1] + version = validate_version(args.version) + release_date = parse_date(args.date) + ensure_clean_worktree(repo_root) + remote_commit = create_release_branch(repo_root, version) + core_changes: set[str] = set() + if args.update_core: + update_core(repo_root, ["--latest-tag"]) + core_changes = changed_files(repo_root) + consumed = prepare_release_files( + repo_root, + version, + release_date, + skip_lock=args.skip_lock, + core_changes=tuple(sorted(core_changes)), + ) + ensure_only_release_changes(repo_root, (*consumed, *core_changes)) + extra_paths = tuple(sorted(changed_files(repo_root) - set(_RELEASE_FILES))) + commit_release_changes(repo_root, version, extra_paths) + push_release_branch(repo_root, version, remote_commit) + create_release_pr(repo_root, version) + + print( + f"Prepared release {version} dated {release_date.isoformat()} and created or updated a PR" + ) + + +if __name__ == "__main__": + main() diff --git a/scripts/run_bench.py b/scripts/run_bench.py index ba5a6923eb..e98a141df1 100644 --- a/scripts/run_bench.py +++ b/scripts/run_bench.py @@ -14,8 +14,6 @@ from temporalio.worker import UnsandboxedWorkflowRunner, Worker from temporalio.worker.workflow_sandbox import SandboxedWorkflowRunner -assert sys.version_info >= (3, 9) - @workflow.defn class BenchWorkflow: diff --git a/scripts/update_core.py b/scripts/update_core.py new file mode 100644 index 0000000000..d961cbc763 --- /dev/null +++ b/scripts/update_core.py @@ -0,0 +1,110 @@ +"""Update SDK Core, bridge dependencies, and generated protobuf bindings.""" + +from __future__ import annotations + +import argparse +import pathlib +import re +import subprocess +import sys +from collections.abc import MutableMapping, Sequence +from typing import Any, cast + +import tomlkit + +if __package__ is None or __package__ == "": + sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) + +from scripts.changelog import run_tool + + +def update_bridge_dependencies(repo_root: pathlib.Path) -> None: + """Copy Core path dependency versions and refresh the bridge lockfile.""" + bridge = repo_root / "temporalio/bridge" + core = (bridge / "sdk-core").resolve() + manifest_path = bridge / "Cargo.toml" + original = manifest_path.read_text() + manifest = tomlkit.parse(original) + dependencies = cast(MutableMapping[str, Any], manifest["dependencies"]) + for name, dependency in dependencies.items(): + if not isinstance(dependency, MutableMapping): + continue + path = dependency.get("path") + requirement = dependency.get("version") + if not isinstance(path, str): + continue + crate = (bridge / path).resolve() + if not crate.is_relative_to(core): + continue + package = cast( + MutableMapping[str, Any], + tomlkit.parse((crate / "Cargo.toml").read_text())["package"], + ) + version = cast(str, package["version"]) + if requirement != version: + dependency["version"] = version + print(f"Updated {name} requirement: {requirement} -> {version}") + updated = tomlkit.dumps(manifest) + if updated != original: + manifest_path.write_text(updated) + subprocess.run(["cargo", "update"], cwd=bridge, check=True) + + +def latest_core_tag(repo_root: pathlib.Path) -> str: + """Fetch Core tags and select the highest stable Core version.""" + core = repo_root / "temporalio/bridge/sdk-core" + if not (core / ".git").exists(): + raise RuntimeError("Initialize sdk-core with 'git submodule update --init'") + subprocess.run(["git", "fetch", "origin", "--tags"], cwd=core, check=True) + result = subprocess.run( + ["git", "tag", "--list", "core-v*"], + cwd=core, + check=True, + capture_output=True, + text=True, + ) + versions = { + tag: tuple(map(int, match.groups())) + for tag in result.stdout.splitlines() + if (match := re.fullmatch(r"core-v(\d+)\.(\d+)\.(\d+)", tag)) + } + if not versions: + raise RuntimeError("No stable core-v* release tags found in sdk-core") + return max(versions, key=versions.__getitem__) + + +def update_core(repo_root: pathlib.Path, args: Sequence[str]) -> None: + """Import Core changes, refresh bridge dependencies, and generate protos.""" + parser = argparse.ArgumentParser(add_help=False) + target = parser.add_mutually_exclusive_group() + target.add_argument("--latest-tag", action="store_true") + target.add_argument("--revision") + options, args = parser.parse_known_args(args) + if options.latest_tag: + args.extend(["--revision", latest_core_tag(repo_root)]) + elif options.revision is not None: + args.extend(["--revision", options.revision]) + print( + run_tool( + repo_root, + ["update-core", "--submodule", "temporalio/bridge/sdk-core", *args], + ), + end="", + flush=True, + ) + update_bridge_dependencies(repo_root) + subprocess.run(["poe", "gen-protos"], cwd=repo_root, check=True) + + +if __name__ == "__main__": + repo_root = pathlib.Path(__file__).resolve().parents[1] + args = sys.argv[1:] + if "--help" in args or "-h" in args: + print(__doc__) + print( + "Defaults to the fetched origin/main head. Use --latest-tag to select " + "the highest stable core-vX.Y.Z tag instead (cannot combine with --revision)." + ) + print(run_tool(repo_root, ["update-core", "--help"]), end="") + else: + update_core(repo_root, args) diff --git a/temporalio/__init__.py b/temporalio/__init__.py index 2afb165a74..301048ec48 100644 --- a/temporalio/__init__.py +++ b/temporalio/__init__.py @@ -8,6 +8,15 @@ :py:mod:`worker` to run workflows and activities. """ +from pkgutil import extend_path as _extend_path + from .service import __version__ as __sdk_version +# After Python finds this ``temporalio`` package, it does not keep searching for +# other ``temporalio`` directories, such as one containing the separately +# installed AI integration packages. Explicitly extend the search +# path so they can be found. Every package that provides ``temporalio/__init__.py`` +# must do this: https://docs.python.org/3.14/library/pkgutil.html#pkgutil.extend_path +__path__ = _extend_path(__path__, __name__) + __version__ = __sdk_version diff --git a/temporalio/activity.py b/temporalio/activity.py index ea6ce64585..bf1b4cb731 100644 --- a/temporalio/activity.py +++ b/temporalio/activity.py @@ -9,12 +9,10 @@ from __future__ import annotations -import asyncio import contextvars import dataclasses import inspect import logging -import threading from collections.abc import Callable, Iterator, Mapping, MutableMapping, Sequence from contextlib import AbstractContextManager, contextmanager from dataclasses import dataclass @@ -22,12 +20,7 @@ from typing import ( TYPE_CHECKING, Any, - List, NoReturn, - Optional, - Tuple, - Type, - Union, overload, ) @@ -36,6 +29,9 @@ import temporalio.bridge.proto.activity_task import temporalio.common import temporalio.converter +from temporalio.converter._payload_converter import ( + _TemporalTransferTypePayloadConverter, +) from .types import CallableType @@ -100,6 +96,12 @@ class Info: """Information about the running activity. Retrieved inside an activity via :py:func:`info`. + + .. warning:: + Do not construct this class directly. For testing, use + :py:meth:`temporalio.testing.ActivityEnvironment.default_info` with + :py:func:`dataclasses.replace` to customize fields. This class may have + new required fields added in future versions. """ activity_id: str @@ -109,16 +111,25 @@ class Info: heartbeat_details: Sequence[Any] heartbeat_timeout: timedelta | None is_local: bool + namespace: str schedule_to_close_timeout: timedelta | None scheduled_time: datetime start_to_close_timeout: timedelta | None started_time: datetime task_queue: str task_token: bytes - workflow_id: str - workflow_namespace: str - workflow_run_id: str - workflow_type: str + workflow_id: str | None + """ID of the workflow. None if the activity was not started by a workflow.""" + workflow_namespace: str | None + """Namespace of the workflow. None if the activity was not started by a workflow. + + .. deprecated:: + Use :py:attr:`namespace` instead. + """ + workflow_run_id: str | None + """Run ID of the workflow. None if the activity was not started by a workflow.""" + workflow_type: str | None + """Type of the workflow. None if the activity was not started by a workflow.""" priority: temporalio.common.Priority retry_policy: temporalio.common.RetryPolicy | None """The retry policy of this activity. @@ -127,6 +138,28 @@ class Info: If the value is None, it means the server didn't send information about retry policy (e.g. due to old server version), but it may still be defined server-side.""" + activity_run_id: str | None = None + """Run ID of this activity. None for workflow activities.""" + + nexus_serialization_context: ( + temporalio.converter.NexusSerializationContext | None + ) = None + """Serialization context of the Nexus operation handler that started this activity, if any. + + Only set for standalone activities. The activity's result, failure and heartbeat details are + encoded with it because they are returned to the Nexus caller. To complete the activity + asynchronously, store this context with the task token and pass it to + :py:meth:`temporalio.client.AsyncActivityHandle.with_context`. + + .. warning:: + This API is experimental and unstable. + """ + + @property + def in_workflow(self) -> bool: + """Was this activity started by a workflow?""" + return self.workflow_id is not None + # TODO(cretz): Consider putting identity on here for "worker_id" for logger? def _logger_details(self) -> Mapping[str, Any]: @@ -134,7 +167,7 @@ def _logger_details(self) -> Mapping[str, Any]: "activity_id": self.activity_id, "activity_type": self.activity_type, "attempt": self.attempt, - "namespace": self.workflow_namespace, + "namespace": self.namespace, "task_queue": self.task_queue, "workflow_id": self.workflow_id, "workflow_run_id": self.workflow_run_id, @@ -180,8 +213,8 @@ class _Context: info: Callable[[], Info] # This is optional because during interceptor init it is not present heartbeat: Callable[..., None] | None - cancelled_event: _CompositeEvent - worker_shutdown_event: _CompositeEvent + cancelled_event: temporalio.common._CompositeEvent + worker_shutdown_event: temporalio.common._CompositeEvent shield_thread_cancel_exception: Callable[[], AbstractContextManager] | None payload_converter_class_or_instance: ( type[temporalio.converter.PayloadConverter] @@ -222,9 +255,13 @@ def payload_converter(self) -> temporalio.converter.PayloadConverter: self.payload_converter_class_or_instance, temporalio.converter.PayloadConverter, ): - self._payload_converter = self.payload_converter_class_or_instance + self._payload_converter = _TemporalTransferTypePayloadConverter.wrap( + self.payload_converter_class_or_instance + ) else: - self._payload_converter = self.payload_converter_class_or_instance() + self._payload_converter = _TemporalTransferTypePayloadConverter.wrap( + self.payload_converter_class_or_instance() + ) return self._payload_converter @property @@ -243,7 +280,7 @@ def metric_meter(self) -> temporalio.common.MetricMeter: info = self.info() self._metric_meter = self.runtime_metric_meter.with_additional_attributes( { - "namespace": info.workflow_namespace, + "namespace": info.namespace, "task_queue": info.task_queue, "activity_type": info.activity_type, } @@ -251,36 +288,6 @@ def metric_meter(self) -> temporalio.common.MetricMeter: return self._metric_meter -@dataclass -class _CompositeEvent: - # This should always be present, but is sometimes lazily set internally - thread_event: threading.Event | None - # Async event only for async activities - async_event: asyncio.Event | None - - def set(self) -> None: - if not self.thread_event: - raise RuntimeError("Missing event") - self.thread_event.set() - if self.async_event: - self.async_event.set() - - def is_set(self) -> bool: - if not self.thread_event: - raise RuntimeError("Missing event") - return self.thread_event.is_set() - - async def wait(self) -> None: - if not self.async_event: - raise RuntimeError("not in async activity") - await self.async_event.wait() - - def wait_sync(self, timeout: float | None = None) -> None: - if not self.thread_event: - raise RuntimeError("Missing event") - self.thread_event.wait(timeout) - - def client() -> Client: """Return a Temporal Client for use in the current activity. @@ -527,15 +534,14 @@ def process( if context: if self.activity_info_on_message: msg = f"{msg} ({context.logger_details})" - if self.activity_info_on_extra: - # Extra can be absent or None, this handles both - extra = kwargs.get("extra", None) or {} - extra["temporal_activity"] = context.logger_details - kwargs["extra"] = extra - if self.full_activity_info_on_extra: - # Extra can be absent or None, this handles both - extra = kwargs.get("extra", None) or {} - extra["activity_info"] = context.info() + if self.activity_info_on_extra or self.full_activity_info_on_extra: + # Copy any caller-provided extra rather than mutating it in + # place (see https://github.com/temporalio/sdk-python/issues/503). + extra = dict(kwargs.get("extra") or {}) + if self.activity_info_on_extra: + extra["temporal_activity"] = context.logger_details + if self.full_activity_info_on_extra: + extra["activity_info"] = context.info() kwargs["extra"] = extra return (msg, kwargs) @@ -582,6 +588,20 @@ def must_from_callable(fn: Callable) -> _Definition: f"Activity {fn_name} missing attributes, was it decorated with @activity.defn?" ) + @classmethod + def get_name_and_result_type( + cls, name_or_run_fn: str | Callable[..., Any] + ) -> tuple[str, type | None]: + if isinstance(name_or_run_fn, str): + return name_or_run_fn, None + elif callable(name_or_run_fn): + defn = cls.must_from_callable(name_or_run_fn) + if not defn.name: + raise ValueError(f"Activity {name_or_run_fn} definition has no name") + return defn.name, defn.ret_type + else: + raise TypeError("Activity must be a string or callable") # type:ignore[reportUnreachable] + @staticmethod def _apply_to_callable( fn: Callable, @@ -593,7 +613,7 @@ def _apply_to_callable( if hasattr(fn, "__temporal_activity_definition"): raise ValueError("Function already contains activity definition") elif not callable(fn): - raise TypeError("Activity is not callable") + raise TypeError("Activity is not callable") # type:ignore[reportUnreachable] # We do not allow keyword only arguments in activities sig = inspect.signature(fn) for param in sig.parameters.values(): diff --git a/temporalio/api/activity/v1/__init__.py b/temporalio/api/activity/v1/__init__.py index a6e54842f6..2700227145 100644 --- a/temporalio/api/activity/v1/__init__.py +++ b/temporalio/api/activity/v1/__init__.py @@ -1,5 +1,15 @@ -from .message_pb2 import ActivityOptions +from .message_pb2 import ( + ActivityExecutionInfo, + ActivityExecutionListInfo, + ActivityExecutionOutcome, + ActivityOptions, + CallbackInfo, +) __all__ = [ + "ActivityExecutionInfo", + "ActivityExecutionListInfo", + "ActivityExecutionOutcome", "ActivityOptions", + "CallbackInfo", ] diff --git a/temporalio/api/activity/v1/message_pb2.py b/temporalio/api/activity/v1/message_pb2.py index baf769c7cc..46c9ac1d0a 100644 --- a/temporalio/api/activity/v1/message_pb2.py +++ b/temporalio/api/activity/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -15,34 +14,57 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from temporalio.api.callback.v1 import ( + message_pb2 as temporal_dot_api_dot_callback_dot_v1_dot_message__pb2, +) from temporalio.api.common.v1 import ( message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, ) +from temporalio.api.deployment.v1 import ( + message_pb2 as temporal_dot_api_dot_deployment_dot_v1_dot_message__pb2, +) +from temporalio.api.enums.v1 import ( + activity_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_activity__pb2, +) +from temporalio.api.enums.v1 import ( + workflow_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_workflow__pb2, +) +from temporalio.api.failure.v1 import ( + message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, +) +from temporalio.api.nexus.v1 import ( + message_pb2 as temporal_dot_api_dot_nexus_dot_v1_dot_message__pb2, +) +from temporalio.api.sdk.v1 import ( + user_metadata_pb2 as temporal_dot_api_dot_sdk_dot_v1_dot_user__metadata__pb2, +) from temporalio.api.taskqueue.v1 import ( message_pb2 as temporal_dot_api_dot_taskqueue_dot_v1_dot_message__pb2, ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b"\n&temporal/api/activity/v1/message.proto\x12\x18temporal.api.activity.v1\x1a$temporal/api/common/v1/message.proto\x1a'temporal/api/taskqueue/v1/message.proto\x1a\x1egoogle/protobuf/duration.proto\"\xf3\x02\n\x0f\x41\x63tivityOptions\x12\x38\n\ntask_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12<\n\x19schedule_to_close_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x06 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicyB\x93\x01\n\x1bio.temporal.api.activity.v1B\x0cMessageProtoP\x01Z'go.temporal.io/api/activity/v1;activity\xaa\x02\x1aTemporalio.Api.Activity.V1\xea\x02\x1dTemporalio::Api::Activity::V1b\x06proto3" -) - - -_ACTIVITYOPTIONS = DESCRIPTOR.message_types_by_name["ActivityOptions"] -ActivityOptions = _reflection.GeneratedProtocolMessageType( - "ActivityOptions", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYOPTIONS, - "__module__": "temporalio.api.activity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.activity.v1.ActivityOptions) - }, + b'\n&temporal/api/activity/v1/message.proto\x12\x18temporal.api.activity.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto\x1a$temporal/api/enums/v1/activity.proto\x1a&temporal/api/callback/v1/message.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a%temporal/api/failure/v1/message.proto\x1a#temporal/api/nexus/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto"\xc4\x01\n\x18\x41\x63tivityExecutionOutcome\x12\x32\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.PayloadsH\x00\x12\x33\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x36\n\x0bretry_state\x18\x03 \x01(\x0e\x32!.temporal.api.enums.v1.RetryStateB\x07\n\x05value"\xd7\x03\n\x0f\x41\x63tivityOptions\x12\x38\n\ntask_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12<\n\x19schedule_to_close_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x06 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x32\n\x08priority\x18\x07 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12.\n\x0bstart_delay\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration"\x9a\x11\n\x15\x41\x63tivityExecutionInfo\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12;\n\ractivity_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12>\n\x06status\x18\x04 \x01(\x0e\x32..temporal.api.enums.v1.ActivityExecutionStatus\x12>\n\trun_state\x18\x05 \x01(\x0e\x32+.temporal.api.enums.v1.PendingActivityState\x12\x12\n\ntask_queue\x18\x06 \x01(\t\x12<\n\x19schedule_to_close_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x0b \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12;\n\x11heartbeat_details\x18\x0c \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x13last_heartbeat_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_started_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x0f \x01(\x05\x12\x35\n\x12\x65xecution_duration\x18\x10 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\rschedule_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x0clast_failure\x18\x14 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1c\n\x14last_worker_identity\x18\x15 \x01(\t\x12\x39\n\x16\x63urrent_retry_interval\x18\x16 \x01(\x0b\x32\x19.google.protobuf.Duration\x12>\n\x1alast_attempt_complete_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x1anext_attempt_schedule_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x17last_deployment_version\x18\x19 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x32\n\x08priority\x18\x1a \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12\x1e\n\x16state_transition_count\x18\x1b \x01(\x03\x12\x18\n\x10state_size_bytes\x18\x1c \x01(\x03\x12\x43\n\x11search_attributes\x18\x1d \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\x1e \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x38\n\ruser_metadata\x18\x1f \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12\x17\n\x0f\x63\x61nceled_reason\x18 \x01(\t\x12+\n\x05links\x18! \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12\x1d\n\x15total_heartbeat_count\x18" \x01(\x03\x12\x10\n\x08sdk_name\x18# \x01(\t\x12\x13\n\x0bsdk_version\x18$ \x01(\t\x12.\n\x0bstart_delay\x18% \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0e\x65xecution_time\x18& \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x65\n&propagated_nexus_serialization_context\x18\' \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext\x12 \n\x18\x65\x61ger_execution_accepted\x18( \x01(\x08\x12G\n\x14started_by_principal\x18) \x01(\x0b\x32).temporal.api.common.v1.ResolvedPrincipal\x12\x46\n\x13\x63losed_by_principal\x18* \x01(\x0b\x32).temporal.api.common.v1.ResolvedPrincipal\x12H\n\x15last_worker_principal\x18+ \x01(\x0b\x32).temporal.api.common.v1.ResolvedPrincipal"\x9e\x04\n\x19\x41\x63tivityExecutionListInfo\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12;\n\ractivity_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x31\n\rschedule_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x06status\x18\x06 \x01(\x0e\x32..temporal.api.enums.v1.ActivityExecutionStatus\x12\x43\n\x11search_attributes\x18\x07 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x12\n\ntask_queue\x18\x08 \x01(\t\x12\x1e\n\x16state_transition_count\x18\t \x01(\x03\x12\x18\n\x10state_size_bytes\x18\n \x01(\x03\x12\x35\n\x12\x65xecution_duration\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0e\x65xecution_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xff\x01\n\x0c\x43\x61llbackInfo\x12?\n\x07trigger\x18\x01 \x01(\x0b\x32..temporal.api.activity.v1.CallbackInfo.Trigger\x12\x34\n\x04info\x18\x02 \x01(\x0b\x32&.temporal.api.callback.v1.CallbackInfo\x1a\x10\n\x0e\x41\x63tivityClosed\x1a\x66\n\x07Trigger\x12P\n\x0f\x61\x63tivity_closed\x18\x01 \x01(\x0b\x32\x35.temporal.api.activity.v1.CallbackInfo.ActivityClosedH\x00\x42\t\n\x07variantB\x93\x01\n\x1bio.temporal.api.activity.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/activity/v1;activity\xaa\x02\x1aTemporalio.Api.Activity.V1\xea\x02\x1dTemporalio::Api::Activity::V1b\x06proto3' ) -_sym_db.RegisterMessage(ActivityOptions) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\033io.temporal.api.activity.v1B\014MessageProtoP\001Z'go.temporal.io/api/activity/v1;activity\252\002\032Temporalio.Api.Activity.V1\352\002\035Temporalio::Api::Activity::V1" - _ACTIVITYOPTIONS._serialized_start = 180 - _ACTIVITYOPTIONS._serialized_end = 551 + _ACTIVITYEXECUTIONOUTCOME._serialized_start = 488 + _ACTIVITYEXECUTIONOUTCOME._serialized_end = 684 + _ACTIVITYOPTIONS._serialized_start = 687 + _ACTIVITYOPTIONS._serialized_end = 1158 + _ACTIVITYEXECUTIONINFO._serialized_start = 1161 + _ACTIVITYEXECUTIONINFO._serialized_end = 3363 + _ACTIVITYEXECUTIONLISTINFO._serialized_start = 3366 + _ACTIVITYEXECUTIONLISTINFO._serialized_end = 3908 + _CALLBACKINFO._serialized_start = 3911 + _CALLBACKINFO._serialized_end = 4166 + _CALLBACKINFO_ACTIVITYCLOSED._serialized_start = 4046 + _CALLBACKINFO_ACTIVITYCLOSED._serialized_end = 4062 + _CALLBACKINFO_TRIGGER._serialized_start = 4064 + _CALLBACKINFO_TRIGGER._serialized_end = 4166 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/activity/v1/message_pb2.pyi b/temporalio/api/activity/v1/message_pb2.pyi index 373c5f18fe..24590aecc7 100644 --- a/temporalio/api/activity/v1/message_pb2.pyi +++ b/temporalio/api/activity/v1/message_pb2.pyi @@ -4,22 +4,81 @@ isort:skip_file """ import builtins -import sys +import collections.abc +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 +import google.protobuf.internal.containers import google.protobuf.message +import google.protobuf.timestamp_pb2 +import temporalio.api.callback.v1.message_pb2 import temporalio.api.common.v1.message_pb2 +import temporalio.api.deployment.v1.message_pb2 +import temporalio.api.enums.v1.activity_pb2 +import temporalio.api.enums.v1.workflow_pb2 +import temporalio.api.failure.v1.message_pb2 +import temporalio.api.nexus.v1.message_pb2 +import temporalio.api.sdk.v1.user_metadata_pb2 import temporalio.api.taskqueue.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final +class ActivityExecutionOutcome(google.protobuf.message.Message): + """The outcome of a completed activity execution: either a successful result or a failure.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RESULT_FIELD_NUMBER: builtins.int + FAILURE_FIELD_NUMBER: builtins.int + RETRY_STATE_FIELD_NUMBER: builtins.int + retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType + """The retry state associated with an unsuccessful activity execution. + This field is only meaningful when `failure` is set. + """ + @property + def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """The result if the activity completed successfully.""" + + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The failure if the activity completed unsuccessfully.""" + + def __init__( + self, + *, + result: temporalio.api.common.v1.message_pb2.Payloads | None = ..., + failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., + retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "failure", b"failure", "result", b"result", "value", b"value" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "failure", + b"failure", + "result", + b"result", + "retry_state", + b"retry_state", + "value", + b"value", + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["value", b"value"] + ) -> typing.Literal["result", "failure"] | None: ... + +global___ActivityExecutionOutcome = ActivityExecutionOutcome + +@typing.final class ActivityOptions(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -29,6 +88,8 @@ class ActivityOptions(google.protobuf.message.Message): START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int HEARTBEAT_TIMEOUT_FIELD_NUMBER: builtins.int RETRY_POLICY_FIELD_NUMBER: builtins.int + PRIORITY_FIELD_NUMBER: builtins.int + START_DELAY_FIELD_NUMBER: builtins.int @property def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ... @property @@ -39,6 +100,7 @@ class ActivityOptions(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: """Limits time an activity task can stay in a task queue before a worker picks it up. This @@ -49,6 +111,7 @@ class ActivityOptions(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Maximum time an activity is allowed to execute after being picked up by a worker. This @@ -58,11 +121,28 @@ class ActivityOptions(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def heartbeat_timeout(self) -> google.protobuf.duration_pb2.Duration: """Maximum permitted time between successful worker heartbeats.""" + @property - def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: ... + def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: + """The retry policy for the activity. Will never exceed `schedule_to_close_timeout`.""" + + @property + def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: + """Priority metadata. If this message is not present, or any fields are not + present, they inherit the values from the workflow. + """ + + @property + def start_delay(self) -> google.protobuf.duration_pb2.Duration: + """Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts. + When updated, the time is added to the original `schedule_time`, not to the current time. + If the resulting time is in the past, the task is made available for dispatch immediately. + """ + def __init__( self, *, @@ -72,18 +152,24 @@ class ActivityOptions(google.protobuf.message.Message): start_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., heartbeat_timeout: google.protobuf.duration_pb2.Duration | None = ..., retry_policy: temporalio.api.common.v1.message_pb2.RetryPolicy | None = ..., + priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + start_delay: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "heartbeat_timeout", b"heartbeat_timeout", + "priority", + b"priority", "retry_policy", b"retry_policy", "schedule_to_close_timeout", b"schedule_to_close_timeout", "schedule_to_start_timeout", b"schedule_to_start_timeout", + "start_delay", + b"start_delay", "start_to_close_timeout", b"start_to_close_timeout", "task_queue", @@ -92,15 +178,19 @@ class ActivityOptions(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "heartbeat_timeout", b"heartbeat_timeout", + "priority", + b"priority", "retry_policy", b"retry_policy", "schedule_to_close_timeout", b"schedule_to_close_timeout", "schedule_to_start_timeout", b"schedule_to_start_timeout", + "start_delay", + b"start_delay", "start_to_close_timeout", b"start_to_close_timeout", "task_queue", @@ -109,3 +199,665 @@ class ActivityOptions(google.protobuf.message.Message): ) -> None: ... global___ActivityOptions = ActivityOptions + +@typing.final +class ActivityExecutionInfo(google.protobuf.message.Message): + """Information about a standalone activity.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + ACTIVITY_TYPE_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: builtins.int + RUN_STATE_FIELD_NUMBER: builtins.int + TASK_QUEUE_FIELD_NUMBER: builtins.int + SCHEDULE_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int + SCHEDULE_TO_START_TIMEOUT_FIELD_NUMBER: builtins.int + START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int + HEARTBEAT_TIMEOUT_FIELD_NUMBER: builtins.int + RETRY_POLICY_FIELD_NUMBER: builtins.int + HEARTBEAT_DETAILS_FIELD_NUMBER: builtins.int + LAST_HEARTBEAT_TIME_FIELD_NUMBER: builtins.int + LAST_STARTED_TIME_FIELD_NUMBER: builtins.int + ATTEMPT_FIELD_NUMBER: builtins.int + EXECUTION_DURATION_FIELD_NUMBER: builtins.int + SCHEDULE_TIME_FIELD_NUMBER: builtins.int + EXPIRATION_TIME_FIELD_NUMBER: builtins.int + CLOSE_TIME_FIELD_NUMBER: builtins.int + LAST_FAILURE_FIELD_NUMBER: builtins.int + LAST_WORKER_IDENTITY_FIELD_NUMBER: builtins.int + CURRENT_RETRY_INTERVAL_FIELD_NUMBER: builtins.int + LAST_ATTEMPT_COMPLETE_TIME_FIELD_NUMBER: builtins.int + NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int + LAST_DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int + PRIORITY_FIELD_NUMBER: builtins.int + STATE_TRANSITION_COUNT_FIELD_NUMBER: builtins.int + STATE_SIZE_BYTES_FIELD_NUMBER: builtins.int + SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int + HEADER_FIELD_NUMBER: builtins.int + USER_METADATA_FIELD_NUMBER: builtins.int + CANCELED_REASON_FIELD_NUMBER: builtins.int + LINKS_FIELD_NUMBER: builtins.int + TOTAL_HEARTBEAT_COUNT_FIELD_NUMBER: builtins.int + SDK_NAME_FIELD_NUMBER: builtins.int + SDK_VERSION_FIELD_NUMBER: builtins.int + START_DELAY_FIELD_NUMBER: builtins.int + EXECUTION_TIME_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int + EAGER_EXECUTION_ACCEPTED_FIELD_NUMBER: builtins.int + STARTED_BY_PRINCIPAL_FIELD_NUMBER: builtins.int + CLOSED_BY_PRINCIPAL_FIELD_NUMBER: builtins.int + LAST_WORKER_PRINCIPAL_FIELD_NUMBER: builtins.int + activity_id: builtins.str + """Unique identifier of this activity within its namespace along with run ID (below).""" + run_id: builtins.str + status: temporalio.api.enums.v1.activity_pb2.ActivityExecutionStatus.ValueType + """A general status for this activity, indicates whether it is currently running or in one of the terminal statuses.""" + run_state: temporalio.api.enums.v1.workflow_pb2.PendingActivityState.ValueType + """More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING.""" + task_queue: builtins.str + attempt: builtins.int + """The attempt this activity is currently on. Incremented each time a new attempt is scheduled.""" + last_worker_identity: builtins.str + state_transition_count: builtins.int + """Incremented each time the activity's state is mutated in persistence.""" + state_size_bytes: builtins.int + """Updated once on scheduled and once on terminal status.""" + canceled_reason: builtins.str + """Set if activity cancelation was requested.""" + total_heartbeat_count: builtins.int + """Total number of heartbeats recorded across all attempts of this activity, including retries.""" + sdk_name: builtins.str + """The name of the SDK of the worker that most recently picked up an attempt of this activity. + Overwritten on each new attempt. Empty if unknown. + """ + sdk_version: builtins.str + """The version of the SDK of the worker that most recently picked up an attempt of this activity. + Overwritten on each new attempt. Empty if unknown. + """ + eager_execution_accepted: builtins.bool + """Indicates whether eager execution was requested for this activity and accepted by the server + for its first task. + """ + @property + def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: + """The type of the activity, a string that maps to a registered activity on a worker.""" + + @property + def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Indicates how long the caller is willing to wait for an activity completion. Limits how long + retries will be attempted. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Limits time an activity task can stay in a task queue before a worker picks it up. This + timeout is always non retryable, as all a retry would achieve is to put it back into the same + queue. Defaults to `schedule_to_close_timeout`. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Maximum time a single activity attempt is allowed to execute after being picked up by a worker. This + timeout is always retryable. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def heartbeat_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Maximum permitted time between successful worker heartbeats.""" + + @property + def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: + """The retry policy for the activity. Will never exceed `schedule_to_close_timeout`.""" + + @property + def heartbeat_details(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Details provided in the last recorded activity heartbeat. + DescribeActivityExecution does not set this field unless include_heartbeat_details was true in the request. + """ + + @property + def last_heartbeat_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Time the last heartbeat was recorded.""" + + @property + def last_started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Time the last attempt was started.""" + + @property + def execution_duration(self) -> google.protobuf.duration_pb2.Duration: + """How long this activity has been running for, including all attempts and backoff between attempts.""" + + @property + def schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Time the activity was originally scheduled via a StartActivityExecution request.""" + + @property + def expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time at which the activity's Schedule-to-Close timeout expires. + Calculated as `schedule_time` + `start_delay` + `schedule_to_close_timeout`. + """ + + @property + def close_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Time when the activity transitioned to a closed state.""" + + @property + def last_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """Failure details from the last failed attempt. + DescribeActivityExecution does not set this field unless include_last_failure was true in the request. + """ + + @property + def current_retry_interval(self) -> google.protobuf.duration_pb2.Duration: + """Time from the last attempt failure to the next activity retry. + If the activity is currently running, this represents the next retry interval in case the attempt fails. + If activity is currently backing off between attempt, this represents the current retry interval. + If there is no next retry allowed, this field will be null. + This interval is typically calculated from the specified retry policy, but may be modified if an activity fails + with a retryable application failure specifying a retry delay. + """ + + @property + def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the last activity attempt completed. If activity has not been completed yet, it will be null.""" + + @property + def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the next activity attempt will be scheduled. + If activity is currently scheduled or started, this field will be null. + """ + + @property + def last_deployment_version( + self, + ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: + """The Worker Deployment Version this activity was dispatched to most recently. + If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. + """ + + @property + def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: + """Priority metadata.""" + + @property + def search_attributes( + self, + ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ... + @property + def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... + @property + def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata: + """Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity.""" + + @property + def links( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Link + ]: + """Links to related entities, such as the entity that started this activity.""" + + @property + def start_delay(self) -> google.protobuf.duration_pb2.Duration: + """Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts.""" + + @property + def execution_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time at which the first activity task is made available for dispatch, computed as + `schedule_time + start_delay`. Same as `schedule_time` if `start_delay` is not set. + """ + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this activity.""" + + @property + def started_by_principal( + self, + ) -> temporalio.api.common.v1.message_pb2.ResolvedPrincipal: + """Authenticated principal by which this activity execution was started. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "by" identifies the authenticated actor. --) + """ + + @property + def closed_by_principal( + self, + ) -> temporalio.api.common.v1.message_pb2.ResolvedPrincipal: + """Authenticated principal by which this activity execution was closed. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "by" identifies the authenticated actor. --) + """ + + @property + def last_worker_principal( + self, + ) -> temporalio.api.common.v1.message_pb2.ResolvedPrincipal: + """Authenticated principal of the worker that most recently interacted with this activity execution.""" + + def __init__( + self, + *, + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + activity_type: temporalio.api.common.v1.message_pb2.ActivityType | None = ..., + status: temporalio.api.enums.v1.activity_pb2.ActivityExecutionStatus.ValueType = ..., + run_state: temporalio.api.enums.v1.workflow_pb2.PendingActivityState.ValueType = ..., + task_queue: builtins.str = ..., + schedule_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., + schedule_to_start_timeout: google.protobuf.duration_pb2.Duration | None = ..., + start_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., + heartbeat_timeout: google.protobuf.duration_pb2.Duration | None = ..., + retry_policy: temporalio.api.common.v1.message_pb2.RetryPolicy | None = ..., + heartbeat_details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., + last_heartbeat_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + last_started_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + attempt: builtins.int = ..., + execution_duration: google.protobuf.duration_pb2.Duration | None = ..., + schedule_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + expiration_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + close_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + last_failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., + last_worker_identity: builtins.str = ..., + current_retry_interval: google.protobuf.duration_pb2.Duration | None = ..., + last_attempt_complete_time: google.protobuf.timestamp_pb2.Timestamp + | None = ..., + next_attempt_schedule_time: google.protobuf.timestamp_pb2.Timestamp + | None = ..., + last_deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion + | None = ..., + priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + state_transition_count: builtins.int = ..., + state_size_bytes: builtins.int = ..., + search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes + | None = ..., + header: temporalio.api.common.v1.message_pb2.Header | None = ..., + user_metadata: temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata + | None = ..., + canceled_reason: builtins.str = ..., + links: collections.abc.Iterable[temporalio.api.common.v1.message_pb2.Link] + | None = ..., + total_heartbeat_count: builtins.int = ..., + sdk_name: builtins.str = ..., + sdk_version: builtins.str = ..., + start_delay: google.protobuf.duration_pb2.Duration | None = ..., + execution_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., + eager_execution_accepted: builtins.bool = ..., + started_by_principal: temporalio.api.common.v1.message_pb2.ResolvedPrincipal + | None = ..., + closed_by_principal: temporalio.api.common.v1.message_pb2.ResolvedPrincipal + | None = ..., + last_worker_principal: temporalio.api.common.v1.message_pb2.ResolvedPrincipal + | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "activity_type", + b"activity_type", + "close_time", + b"close_time", + "closed_by_principal", + b"closed_by_principal", + "current_retry_interval", + b"current_retry_interval", + "execution_duration", + b"execution_duration", + "execution_time", + b"execution_time", + "expiration_time", + b"expiration_time", + "header", + b"header", + "heartbeat_details", + b"heartbeat_details", + "heartbeat_timeout", + b"heartbeat_timeout", + "last_attempt_complete_time", + b"last_attempt_complete_time", + "last_deployment_version", + b"last_deployment_version", + "last_failure", + b"last_failure", + "last_heartbeat_time", + b"last_heartbeat_time", + "last_started_time", + b"last_started_time", + "last_worker_principal", + b"last_worker_principal", + "next_attempt_schedule_time", + b"next_attempt_schedule_time", + "priority", + b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "retry_policy", + b"retry_policy", + "schedule_time", + b"schedule_time", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "search_attributes", + b"search_attributes", + "start_delay", + b"start_delay", + "start_to_close_timeout", + b"start_to_close_timeout", + "started_by_principal", + b"started_by_principal", + "user_metadata", + b"user_metadata", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "activity_type", + b"activity_type", + "attempt", + b"attempt", + "canceled_reason", + b"canceled_reason", + "close_time", + b"close_time", + "closed_by_principal", + b"closed_by_principal", + "current_retry_interval", + b"current_retry_interval", + "eager_execution_accepted", + b"eager_execution_accepted", + "execution_duration", + b"execution_duration", + "execution_time", + b"execution_time", + "expiration_time", + b"expiration_time", + "header", + b"header", + "heartbeat_details", + b"heartbeat_details", + "heartbeat_timeout", + b"heartbeat_timeout", + "last_attempt_complete_time", + b"last_attempt_complete_time", + "last_deployment_version", + b"last_deployment_version", + "last_failure", + b"last_failure", + "last_heartbeat_time", + b"last_heartbeat_time", + "last_started_time", + b"last_started_time", + "last_worker_identity", + b"last_worker_identity", + "last_worker_principal", + b"last_worker_principal", + "links", + b"links", + "next_attempt_schedule_time", + b"next_attempt_schedule_time", + "priority", + b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "retry_policy", + b"retry_policy", + "run_id", + b"run_id", + "run_state", + b"run_state", + "schedule_time", + b"schedule_time", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "sdk_name", + b"sdk_name", + "sdk_version", + b"sdk_version", + "search_attributes", + b"search_attributes", + "start_delay", + b"start_delay", + "start_to_close_timeout", + b"start_to_close_timeout", + "started_by_principal", + b"started_by_principal", + "state_size_bytes", + b"state_size_bytes", + "state_transition_count", + b"state_transition_count", + "status", + b"status", + "task_queue", + b"task_queue", + "total_heartbeat_count", + b"total_heartbeat_count", + "user_metadata", + b"user_metadata", + ], + ) -> None: ... + +global___ActivityExecutionInfo = ActivityExecutionInfo + +@typing.final +class ActivityExecutionListInfo(google.protobuf.message.Message): + """Limited activity information returned in the list response. + When adding fields here, ensure that it is also present in ActivityExecutionInfo (note that it + may already be present in ActivityExecutionInfo but not at the top-level). + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + ACTIVITY_TYPE_FIELD_NUMBER: builtins.int + SCHEDULE_TIME_FIELD_NUMBER: builtins.int + CLOSE_TIME_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: builtins.int + SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int + TASK_QUEUE_FIELD_NUMBER: builtins.int + STATE_TRANSITION_COUNT_FIELD_NUMBER: builtins.int + STATE_SIZE_BYTES_FIELD_NUMBER: builtins.int + EXECUTION_DURATION_FIELD_NUMBER: builtins.int + EXECUTION_TIME_FIELD_NUMBER: builtins.int + activity_id: builtins.str + """A unique identifier of this activity within its namespace along with run ID (below).""" + run_id: builtins.str + """The run ID of the standalone activity.""" + status: temporalio.api.enums.v1.activity_pb2.ActivityExecutionStatus.ValueType + """Only scheduled and terminal statuses appear here. More detailed information in PendingActivityInfo but not + available in the list response. + """ + task_queue: builtins.str + """The task queue this activity was scheduled on when it was originally started, updated on activity options update.""" + state_transition_count: builtins.int + """Updated on terminal status.""" + state_size_bytes: builtins.int + """Updated once on scheduled and once on terminal status.""" + @property + def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: + """The type of the activity, a string that maps to a registered activity on a worker.""" + + @property + def schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Time the activity was originally scheduled via a StartActivityExecution request.""" + + @property + def close_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """If the activity is in a terminal status, this field represents the time the activity transitioned to that status.""" + + @property + def search_attributes( + self, + ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: + """Search attributes from the start request.""" + + @property + def execution_duration(self) -> google.protobuf.duration_pb2.Duration: + """The difference between close time and scheduled time. + This field is only populated if the activity is closed. + """ + + @property + def execution_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time at which the first activity task is made available for dispatch, computed as + `schedule_time + start_delay`. Same as `schedule_time` if `start_delay` is not set. + """ + + def __init__( + self, + *, + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + activity_type: temporalio.api.common.v1.message_pb2.ActivityType | None = ..., + schedule_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + close_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + status: temporalio.api.enums.v1.activity_pb2.ActivityExecutionStatus.ValueType = ..., + search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes + | None = ..., + task_queue: builtins.str = ..., + state_transition_count: builtins.int = ..., + state_size_bytes: builtins.int = ..., + execution_duration: google.protobuf.duration_pb2.Duration | None = ..., + execution_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "activity_type", + b"activity_type", + "close_time", + b"close_time", + "execution_duration", + b"execution_duration", + "execution_time", + b"execution_time", + "schedule_time", + b"schedule_time", + "search_attributes", + b"search_attributes", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "activity_type", + b"activity_type", + "close_time", + b"close_time", + "execution_duration", + b"execution_duration", + "execution_time", + b"execution_time", + "run_id", + b"run_id", + "schedule_time", + b"schedule_time", + "search_attributes", + b"search_attributes", + "state_size_bytes", + b"state_size_bytes", + "state_transition_count", + b"state_transition_count", + "status", + b"status", + "task_queue", + b"task_queue", + ], + ) -> None: ... + +global___ActivityExecutionListInfo = ActivityExecutionListInfo + +@typing.final +class CallbackInfo(google.protobuf.message.Message): + """CallbackInfo contains the state of an attached activity callback.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ActivityClosed(google.protobuf.message.Message): + """Trigger for when the activity is closed.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + + @typing.final + class Trigger(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACTIVITY_CLOSED_FIELD_NUMBER: builtins.int + @property + def activity_closed(self) -> global___CallbackInfo.ActivityClosed: ... + def __init__( + self, + *, + activity_closed: global___CallbackInfo.ActivityClosed | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "activity_closed", b"activity_closed", "variant", b"variant" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_closed", b"activity_closed", "variant", b"variant" + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["activity_closed"] | None: ... + + TRIGGER_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def trigger(self) -> global___CallbackInfo.Trigger: + """Trigger for this callback.""" + + @property + def info(self) -> temporalio.api.callback.v1.message_pb2.CallbackInfo: + """Common callback info.""" + + def __init__( + self, + *, + trigger: global___CallbackInfo.Trigger | None = ..., + info: temporalio.api.callback.v1.message_pb2.CallbackInfo | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["info", b"info", "trigger", b"trigger"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["info", b"info", "trigger", b"trigger"] + ) -> None: ... + +global___CallbackInfo = CallbackInfo diff --git a/temporalio/api/batch/v1/__init__.py b/temporalio/api/batch/v1/__init__.py index 5ec8ad63a8..fea70b41f5 100644 --- a/temporalio/api/batch/v1/__init__.py +++ b/temporalio/api/batch/v1/__init__.py @@ -1,10 +1,13 @@ from .message_pb2 import ( + BatchOperationCancelActivities, BatchOperationCancellation, + BatchOperationDeleteActivities, BatchOperationDeletion, BatchOperationInfo, BatchOperationReset, BatchOperationResetActivities, BatchOperationSignal, + BatchOperationTerminateActivities, BatchOperationTermination, BatchOperationTriggerWorkflowRule, BatchOperationUnpauseActivities, @@ -13,12 +16,15 @@ ) __all__ = [ + "BatchOperationCancelActivities", "BatchOperationCancellation", + "BatchOperationDeleteActivities", "BatchOperationDeletion", "BatchOperationInfo", "BatchOperationReset", "BatchOperationResetActivities", "BatchOperationSignal", + "BatchOperationTerminateActivities", "BatchOperationTermination", "BatchOperationTriggerWorkflowRule", "BatchOperationUnpauseActivities", diff --git a/temporalio/api/batch/v1/message_pb2.py b/temporalio/api/batch/v1/message_pb2.py index cb1e39b73e..5e83b9ef38 100644 --- a/temporalio/api/batch/v1/message_pb2.py +++ b/temporalio/api/batch/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -38,156 +37,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n#temporal/api/batch/v1/message.proto\x12\x15temporal.api.batch.v1\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a&temporal/api/activity/v1/message.proto\x1a$temporal/api/common/v1/message.proto\x1a+temporal/api/enums/v1/batch_operation.proto\x1a!temporal/api/enums/v1/reset.proto\x1a#temporal/api/rules/v1/message.proto\x1a&temporal/api/workflow/v1/message.proto"\xbf\x01\n\x12\x42\x61tchOperationInfo\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x39\n\x05state\x18\x02 \x01(\x0e\x32*.temporal.api.enums.v1.BatchOperationState\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"`\n\x19\x42\x61tchOperationTermination\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x02 \x01(\t"\x99\x01\n\x14\x42\x61tchOperationSignal\x12\x0e\n\x06signal\x18\x01 \x01(\t\x12/\n\x05input\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x10\n\x08identity\x18\x04 \x01(\t".\n\x1a\x42\x61tchOperationCancellation\x12\x10\n\x08identity\x18\x01 \x01(\t"*\n\x16\x42\x61tchOperationDeletion\x12\x10\n\x08identity\x18\x01 \x01(\t"\xae\x02\n\x13\x42\x61tchOperationReset\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x35\n\x07options\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.ResetOptions\x12\x38\n\nreset_type\x18\x01 \x01(\x0e\x32 .temporal.api.enums.v1.ResetTypeB\x02\x18\x01\x12G\n\x12reset_reapply_type\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.ResetReapplyTypeB\x02\x18\x01\x12K\n\x15post_reset_operations\x18\x05 \x03(\x0b\x32,.temporal.api.workflow.v1.PostResetOperation"\xc9\x01\n,BatchOperationUpdateWorkflowExecutionOptions\x12\x10\n\x08identity\x18\x01 \x01(\t\x12V\n\x1aworkflow_execution_options\x18\x02 \x01(\x0b\x32\x32.temporal.api.workflow.v1.WorkflowExecutionOptions\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"\xc0\x01\n\x1f\x42\x61tchOperationUnpauseActivities\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x04type\x18\x02 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\x03 \x01(\x08H\x00\x12\x16\n\x0ereset_attempts\x18\x04 \x01(\x08\x12\x17\n\x0freset_heartbeat\x18\x05 \x01(\x08\x12)\n\x06jitter\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\n\n\x08\x61\x63tivity"\x84\x01\n!BatchOperationTriggerWorkflowRule\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0c\n\x02id\x18\x02 \x01(\tH\x00\x12\x37\n\x04spec\x18\x03 \x01(\x0b\x32\'.temporal.api.rules.v1.WorkflowRuleSpecH\x00\x42\x06\n\x04rule"\xf5\x01\n\x1d\x42\x61tchOperationResetActivities\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x04type\x18\x02 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\x03 \x01(\x08H\x00\x12\x16\n\x0ereset_attempts\x18\x04 \x01(\x08\x12\x17\n\x0freset_heartbeat\x18\x05 \x01(\x08\x12\x13\n\x0bkeep_paused\x18\x06 \x01(\x08\x12)\n\x06jitter\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x18restore_original_options\x18\x08 \x01(\x08\x42\n\n\x08\x61\x63tivity"\xf8\x01\n#BatchOperationUpdateActivityOptions\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x04type\x18\x02 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\x03 \x01(\x08H\x00\x12\x43\n\x10\x61\x63tivity_options\x18\x04 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x18\n\x10restore_original\x18\x06 \x01(\x08\x42\n\n\x08\x61\x63tivityB\x84\x01\n\x18io.temporal.api.batch.v1B\x0cMessageProtoP\x01Z!go.temporal.io/api/batch/v1;batch\xaa\x02\x17Temporalio.Api.Batch.V1\xea\x02\x1aTemporalio::Api::Batch::V1b\x06proto3' + b'\n#temporal/api/batch/v1/message.proto\x12\x15temporal.api.batch.v1\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a&temporal/api/activity/v1/message.proto\x1a$temporal/api/common/v1/message.proto\x1a+temporal/api/enums/v1/batch_operation.proto\x1a!temporal/api/enums/v1/reset.proto\x1a#temporal/api/rules/v1/message.proto\x1a&temporal/api/workflow/v1/message.proto"\x82\x02\n\x12\x42\x61tchOperationInfo\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x39\n\x05state\x18\x02 \x01(\x0e\x32*.temporal.api.enums.v1.BatchOperationState\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0eoperation_type\x18\x05 \x01(\x0e\x32).temporal.api.enums.v1.BatchOperationType"`\n\x19\x42\x61tchOperationTermination\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x02 \x01(\t"E\n!BatchOperationTerminateActivities\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t"\x99\x01\n\x14\x42\x61tchOperationSignal\x12\x0e\n\x06signal\x18\x01 \x01(\t\x12/\n\x05input\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x10\n\x08identity\x18\x04 \x01(\t".\n\x1a\x42\x61tchOperationCancellation\x12\x10\n\x08identity\x18\x01 \x01(\t"B\n\x1e\x42\x61tchOperationCancelActivities\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t"*\n\x16\x42\x61tchOperationDeletion\x12\x10\n\x08identity\x18\x01 \x01(\t" \n\x1e\x42\x61tchOperationDeleteActivities"\xae\x02\n\x13\x42\x61tchOperationReset\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x35\n\x07options\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.ResetOptions\x12\x38\n\nreset_type\x18\x01 \x01(\x0e\x32 .temporal.api.enums.v1.ResetTypeB\x02\x18\x01\x12G\n\x12reset_reapply_type\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.ResetReapplyTypeB\x02\x18\x01\x12K\n\x15post_reset_operations\x18\x05 \x03(\x0b\x32,.temporal.api.workflow.v1.PostResetOperation"\xc9\x01\n,BatchOperationUpdateWorkflowExecutionOptions\x12\x10\n\x08identity\x18\x01 \x01(\t\x12V\n\x1aworkflow_execution_options\x18\x02 \x01(\x0b\x32\x32.temporal.api.workflow.v1.WorkflowExecutionOptions\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"\xc0\x01\n\x1f\x42\x61tchOperationUnpauseActivities\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x04type\x18\x02 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\x03 \x01(\x08H\x00\x12\x16\n\x0ereset_attempts\x18\x04 \x01(\x08\x12\x17\n\x0freset_heartbeat\x18\x05 \x01(\x08\x12)\n\x06jitter\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\n\n\x08\x61\x63tivity"\x84\x01\n!BatchOperationTriggerWorkflowRule\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0c\n\x02id\x18\x02 \x01(\tH\x00\x12\x37\n\x04spec\x18\x03 \x01(\x0b\x32\'.temporal.api.rules.v1.WorkflowRuleSpecH\x00\x42\x06\n\x04rule"\xf5\x01\n\x1d\x42\x61tchOperationResetActivities\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x04type\x18\x02 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\x03 \x01(\x08H\x00\x12\x16\n\x0ereset_attempts\x18\x04 \x01(\x08\x12\x17\n\x0freset_heartbeat\x18\x05 \x01(\x08\x12\x13\n\x0bkeep_paused\x18\x06 \x01(\x08\x12)\n\x06jitter\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x18restore_original_options\x18\x08 \x01(\x08\x42\n\n\x08\x61\x63tivity"\xf8\x01\n#BatchOperationUpdateActivityOptions\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x04type\x18\x02 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\x03 \x01(\x08H\x00\x12\x43\n\x10\x61\x63tivity_options\x18\x04 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x18\n\x10restore_original\x18\x06 \x01(\x08\x42\n\n\x08\x61\x63tivityB\x84\x01\n\x18io.temporal.api.batch.v1B\x0cMessageProtoP\x01Z!go.temporal.io/api/batch/v1;batch\xaa\x02\x17Temporalio.Api.Batch.V1\xea\x02\x1aTemporalio::Api::Batch::V1b\x06proto3' ) - -_BATCHOPERATIONINFO = DESCRIPTOR.message_types_by_name["BatchOperationInfo"] -_BATCHOPERATIONTERMINATION = DESCRIPTOR.message_types_by_name[ - "BatchOperationTermination" -] -_BATCHOPERATIONSIGNAL = DESCRIPTOR.message_types_by_name["BatchOperationSignal"] -_BATCHOPERATIONCANCELLATION = DESCRIPTOR.message_types_by_name[ - "BatchOperationCancellation" -] -_BATCHOPERATIONDELETION = DESCRIPTOR.message_types_by_name["BatchOperationDeletion"] -_BATCHOPERATIONRESET = DESCRIPTOR.message_types_by_name["BatchOperationReset"] -_BATCHOPERATIONUPDATEWORKFLOWEXECUTIONOPTIONS = DESCRIPTOR.message_types_by_name[ - "BatchOperationUpdateWorkflowExecutionOptions" -] -_BATCHOPERATIONUNPAUSEACTIVITIES = DESCRIPTOR.message_types_by_name[ - "BatchOperationUnpauseActivities" -] -_BATCHOPERATIONTRIGGERWORKFLOWRULE = DESCRIPTOR.message_types_by_name[ - "BatchOperationTriggerWorkflowRule" -] -_BATCHOPERATIONRESETACTIVITIES = DESCRIPTOR.message_types_by_name[ - "BatchOperationResetActivities" -] -_BATCHOPERATIONUPDATEACTIVITYOPTIONS = DESCRIPTOR.message_types_by_name[ - "BatchOperationUpdateActivityOptions" -] -BatchOperationInfo = _reflection.GeneratedProtocolMessageType( - "BatchOperationInfo", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONINFO, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationInfo) - }, -) -_sym_db.RegisterMessage(BatchOperationInfo) - -BatchOperationTermination = _reflection.GeneratedProtocolMessageType( - "BatchOperationTermination", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONTERMINATION, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationTermination) - }, -) -_sym_db.RegisterMessage(BatchOperationTermination) - -BatchOperationSignal = _reflection.GeneratedProtocolMessageType( - "BatchOperationSignal", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONSIGNAL, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationSignal) - }, -) -_sym_db.RegisterMessage(BatchOperationSignal) - -BatchOperationCancellation = _reflection.GeneratedProtocolMessageType( - "BatchOperationCancellation", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONCANCELLATION, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationCancellation) - }, -) -_sym_db.RegisterMessage(BatchOperationCancellation) - -BatchOperationDeletion = _reflection.GeneratedProtocolMessageType( - "BatchOperationDeletion", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONDELETION, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationDeletion) - }, -) -_sym_db.RegisterMessage(BatchOperationDeletion) - -BatchOperationReset = _reflection.GeneratedProtocolMessageType( - "BatchOperationReset", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONRESET, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationReset) - }, -) -_sym_db.RegisterMessage(BatchOperationReset) - -BatchOperationUpdateWorkflowExecutionOptions = _reflection.GeneratedProtocolMessageType( - "BatchOperationUpdateWorkflowExecutionOptions", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONUPDATEWORKFLOWEXECUTIONOPTIONS, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions) - }, -) -_sym_db.RegisterMessage(BatchOperationUpdateWorkflowExecutionOptions) - -BatchOperationUnpauseActivities = _reflection.GeneratedProtocolMessageType( - "BatchOperationUnpauseActivities", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONUNPAUSEACTIVITIES, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationUnpauseActivities) - }, -) -_sym_db.RegisterMessage(BatchOperationUnpauseActivities) - -BatchOperationTriggerWorkflowRule = _reflection.GeneratedProtocolMessageType( - "BatchOperationTriggerWorkflowRule", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONTRIGGERWORKFLOWRULE, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationTriggerWorkflowRule) - }, -) -_sym_db.RegisterMessage(BatchOperationTriggerWorkflowRule) - -BatchOperationResetActivities = _reflection.GeneratedProtocolMessageType( - "BatchOperationResetActivities", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONRESETACTIVITIES, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationResetActivities) - }, -) -_sym_db.RegisterMessage(BatchOperationResetActivities) - -BatchOperationUpdateActivityOptions = _reflection.GeneratedProtocolMessageType( - "BatchOperationUpdateActivityOptions", - (_message.Message,), - { - "DESCRIPTOR": _BATCHOPERATIONUPDATEACTIVITYOPTIONS, - "__module__": "temporalio.api.batch.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.batch.v1.BatchOperationUpdateActivityOptions) - }, -) -_sym_db.RegisterMessage(BatchOperationUpdateActivityOptions) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.batch.v1B\014MessageProtoP\001Z!go.temporal.io/api/batch/v1;batch\252\002\027Temporalio.Api.Batch.V1\352\002\032Temporalio::Api::Batch::V1" @@ -198,25 +52,31 @@ "reset_reapply_type" ]._serialized_options = b"\030\001" _BATCHOPERATIONINFO._serialized_start = 397 - _BATCHOPERATIONINFO._serialized_end = 588 - _BATCHOPERATIONTERMINATION._serialized_start = 590 - _BATCHOPERATIONTERMINATION._serialized_end = 686 - _BATCHOPERATIONSIGNAL._serialized_start = 689 - _BATCHOPERATIONSIGNAL._serialized_end = 842 - _BATCHOPERATIONCANCELLATION._serialized_start = 844 - _BATCHOPERATIONCANCELLATION._serialized_end = 890 - _BATCHOPERATIONDELETION._serialized_start = 892 - _BATCHOPERATIONDELETION._serialized_end = 934 - _BATCHOPERATIONRESET._serialized_start = 937 - _BATCHOPERATIONRESET._serialized_end = 1239 - _BATCHOPERATIONUPDATEWORKFLOWEXECUTIONOPTIONS._serialized_start = 1242 - _BATCHOPERATIONUPDATEWORKFLOWEXECUTIONOPTIONS._serialized_end = 1443 - _BATCHOPERATIONUNPAUSEACTIVITIES._serialized_start = 1446 - _BATCHOPERATIONUNPAUSEACTIVITIES._serialized_end = 1638 - _BATCHOPERATIONTRIGGERWORKFLOWRULE._serialized_start = 1641 - _BATCHOPERATIONTRIGGERWORKFLOWRULE._serialized_end = 1773 - _BATCHOPERATIONRESETACTIVITIES._serialized_start = 1776 - _BATCHOPERATIONRESETACTIVITIES._serialized_end = 2021 - _BATCHOPERATIONUPDATEACTIVITYOPTIONS._serialized_start = 2024 - _BATCHOPERATIONUPDATEACTIVITYOPTIONS._serialized_end = 2272 + _BATCHOPERATIONINFO._serialized_end = 655 + _BATCHOPERATIONTERMINATION._serialized_start = 657 + _BATCHOPERATIONTERMINATION._serialized_end = 753 + _BATCHOPERATIONTERMINATEACTIVITIES._serialized_start = 755 + _BATCHOPERATIONTERMINATEACTIVITIES._serialized_end = 824 + _BATCHOPERATIONSIGNAL._serialized_start = 827 + _BATCHOPERATIONSIGNAL._serialized_end = 980 + _BATCHOPERATIONCANCELLATION._serialized_start = 982 + _BATCHOPERATIONCANCELLATION._serialized_end = 1028 + _BATCHOPERATIONCANCELACTIVITIES._serialized_start = 1030 + _BATCHOPERATIONCANCELACTIVITIES._serialized_end = 1096 + _BATCHOPERATIONDELETION._serialized_start = 1098 + _BATCHOPERATIONDELETION._serialized_end = 1140 + _BATCHOPERATIONDELETEACTIVITIES._serialized_start = 1142 + _BATCHOPERATIONDELETEACTIVITIES._serialized_end = 1174 + _BATCHOPERATIONRESET._serialized_start = 1177 + _BATCHOPERATIONRESET._serialized_end = 1479 + _BATCHOPERATIONUPDATEWORKFLOWEXECUTIONOPTIONS._serialized_start = 1482 + _BATCHOPERATIONUPDATEWORKFLOWEXECUTIONOPTIONS._serialized_end = 1683 + _BATCHOPERATIONUNPAUSEACTIVITIES._serialized_start = 1686 + _BATCHOPERATIONUNPAUSEACTIVITIES._serialized_end = 1878 + _BATCHOPERATIONTRIGGERWORKFLOWRULE._serialized_start = 1881 + _BATCHOPERATIONTRIGGERWORKFLOWRULE._serialized_end = 2013 + _BATCHOPERATIONRESETACTIVITIES._serialized_start = 2016 + _BATCHOPERATIONRESETACTIVITIES._serialized_end = 2261 + _BATCHOPERATIONUPDATEACTIVITYOPTIONS._serialized_start = 2264 + _BATCHOPERATIONUPDATEACTIVITYOPTIONS._serialized_end = 2512 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/batch/v1/message_pb2.pyi b/temporalio/api/batch/v1/message_pb2.pyi index 0f7e87da0c..5a00bea1d6 100644 --- a/temporalio/api/batch/v1/message_pb2.pyi +++ b/temporalio/api/batch/v1/message_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -21,13 +21,9 @@ import temporalio.api.enums.v1.reset_pb2 import temporalio.api.rules.v1.message_pb2 import temporalio.api.workflow.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class BatchOperationInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -35,16 +31,23 @@ class BatchOperationInfo(google.protobuf.message.Message): STATE_FIELD_NUMBER: builtins.int START_TIME_FIELD_NUMBER: builtins.int CLOSE_TIME_FIELD_NUMBER: builtins.int + OPERATION_TYPE_FIELD_NUMBER: builtins.int job_id: builtins.str """Batch job ID""" state: temporalio.api.enums.v1.batch_operation_pb2.BatchOperationState.ValueType """Batch operation state""" + operation_type: ( + temporalio.api.enums.v1.batch_operation_pb2.BatchOperationType.ValueType + ) + """Operation type""" @property def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Batch operation start time""" + @property def close_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Batch operation close time""" + def __init__( self, *, @@ -52,20 +55,23 @@ class BatchOperationInfo(google.protobuf.message.Message): state: temporalio.api.enums.v1.batch_operation_pb2.BatchOperationState.ValueType = ..., start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., close_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + operation_type: temporalio.api.enums.v1.batch_operation_pb2.BatchOperationType.ValueType = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "close_time", b"close_time", "start_time", b"start_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "close_time", b"close_time", "job_id", b"job_id", + "operation_type", + b"operation_type", "start_time", b"start_time", "state", @@ -75,6 +81,7 @@ class BatchOperationInfo(google.protobuf.message.Message): global___BatchOperationInfo = BatchOperationInfo +@typing.final class BatchOperationTermination(google.protobuf.message.Message): """BatchOperationTermination sends terminate requests to batch workflows. Keep the parameter in sync with temporalio.api.workflowservice.v1.TerminateWorkflowExecutionRequest. @@ -85,11 +92,12 @@ class BatchOperationTermination(google.protobuf.message.Message): DETAILS_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int + identity: builtins.str + """The identity of the worker/client""" @property def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Serialized value(s) to provide to the termination event""" - identity: builtins.str - """The identity of the worker/client""" + def __init__( self, *, @@ -97,17 +105,43 @@ class BatchOperationTermination(google.protobuf.message.Message): identity: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["details", b"details"] + self, field_name: typing.Literal["details", b"details"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "details", b"details", "identity", b"identity" - ], + self, field_name: typing.Literal["details", b"details", "identity", b"identity"] ) -> None: ... global___BatchOperationTermination = BatchOperationTermination +@typing.final +class BatchOperationTerminateActivities(google.protobuf.message.Message): + """BatchOperationTerminateActivities sends terminate requests to a batch of activities. + Keep the parameter in sync with temporalio.api.workflowservice.v1.TerminateActivityExecutionRequest. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + IDENTITY_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + identity: builtins.str + """The identity of the worker/client""" + reason: builtins.str + """Reason for requesting the termination, recorded and available via the PollActivityExecution API. + Not propagated to a worker if an activity attempt is currently running. + """ + def __init__( + self, + *, + identity: builtins.str = ..., + reason: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["identity", b"identity", "reason", b"reason"] + ) -> None: ... + +global___BatchOperationTerminateActivities = BatchOperationTerminateActivities + +@typing.final class BatchOperationSignal(google.protobuf.message.Message): """BatchOperationSignal sends signals to batch workflows. Keep the parameter in sync with temporalio.api.workflowservice.v1.SignalWorkflowExecutionRequest. @@ -121,16 +155,18 @@ class BatchOperationSignal(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int signal: builtins.str """The workflow author-defined name of the signal to send to the workflow""" + identity: builtins.str + """The identity of the worker/client""" @property def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Serialized value(s) to provide with the signal""" + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: """Headers that are passed with the signal to the processing workflow. These can include things like auth or tracing tokens. """ - identity: builtins.str - """The identity of the worker/client""" + def __init__( self, *, @@ -140,12 +176,11 @@ class BatchOperationSignal(google.protobuf.message.Message): identity: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["header", b"header", "input", b"input"], + self, field_name: typing.Literal["header", b"header", "input", b"input"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "identity", @@ -159,6 +194,7 @@ class BatchOperationSignal(google.protobuf.message.Message): global___BatchOperationSignal = BatchOperationSignal +@typing.final class BatchOperationCancellation(google.protobuf.message.Message): """BatchOperationCancellation sends cancel requests to batch workflows. Keep the parameter in sync with temporalio.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest. @@ -176,11 +212,40 @@ class BatchOperationCancellation(google.protobuf.message.Message): identity: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["identity", b"identity"] + self, field_name: typing.Literal["identity", b"identity"] ) -> None: ... global___BatchOperationCancellation = BatchOperationCancellation +@typing.final +class BatchOperationCancelActivities(google.protobuf.message.Message): + """BatchOperationCancelActivities sends cancel requests to a batch of activities. + Keep the parameter in sync with temporalio.api.workflowservice.v1.RequestCancelActivityExecutionRequest. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + IDENTITY_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + identity: builtins.str + """The identity of the worker/client""" + reason: builtins.str + """Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. + Not propagated to a worker if an activity attempt is currently running. + """ + def __init__( + self, + *, + identity: builtins.str = ..., + reason: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["identity", b"identity", "reason", b"reason"] + ) -> None: ... + +global___BatchOperationCancelActivities = BatchOperationCancelActivities + +@typing.final class BatchOperationDeletion(google.protobuf.message.Message): """BatchOperationDeletion sends deletion requests to batch workflows. Keep the parameter in sync with temporalio.api.workflowservice.v1.DeleteWorkflowExecutionRequest. @@ -197,11 +262,26 @@ class BatchOperationDeletion(google.protobuf.message.Message): identity: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["identity", b"identity"] + self, field_name: typing.Literal["identity", b"identity"] ) -> None: ... global___BatchOperationDeletion = BatchOperationDeletion +@typing.final +class BatchOperationDeleteActivities(google.protobuf.message.Message): + """BatchOperationDeleteActivities sends deletion requests to a batch of activities. + Keep the parameter in sync with temporalio.api.workflowservice.v1.DeleteActivityExecutionRequest. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___BatchOperationDeleteActivities = BatchOperationDeleteActivities + +@typing.final class BatchOperationReset(google.protobuf.message.Message): """BatchOperationReset sends reset requests to batch workflows. Keep the parameter in sync with temporalio.api.workflowservice.v1.ResetWorkflowExecutionRequest. @@ -216,13 +296,14 @@ class BatchOperationReset(google.protobuf.message.Message): POST_RESET_OPERATIONS_FIELD_NUMBER: builtins.int identity: builtins.str """The identity of the worker/client.""" - @property - def options(self) -> temporalio.api.common.v1.message_pb2.ResetOptions: - """Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored.""" reset_type: temporalio.api.enums.v1.reset_pb2.ResetType.ValueType """Deprecated. Use `options`.""" reset_reapply_type: temporalio.api.enums.v1.reset_pb2.ResetReapplyType.ValueType """Deprecated. Use `options`.""" + @property + def options(self) -> temporalio.api.common.v1.message_pb2.ResetOptions: + """Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored.""" + @property def post_reset_operations( self, @@ -233,6 +314,7 @@ class BatchOperationReset(google.protobuf.message.Message): to the *new* run of the workflow execution in the order they are provided. All operations are applied to the workflow before the first new workflow task is generated """ + def __init__( self, *, @@ -246,11 +328,11 @@ class BatchOperationReset(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["options", b"options"] + self, field_name: typing.Literal["options", b"options"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "options", @@ -266,6 +348,7 @@ class BatchOperationReset(google.protobuf.message.Message): global___BatchOperationReset = BatchOperationReset +@typing.final class BatchOperationUpdateWorkflowExecutionOptions(google.protobuf.message.Message): """BatchOperationUpdateWorkflowExecutionOptions sends UpdateWorkflowExecutionOptions requests to batch workflows. Keep the parameters in sync with temporalio.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest. @@ -283,11 +366,13 @@ class BatchOperationUpdateWorkflowExecutionOptions(google.protobuf.message.Messa self, ) -> temporalio.api.workflow.v1.message_pb2.WorkflowExecutionOptions: """Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask.""" + @property def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: """Controls which fields from `workflow_execution_options` will be applied. To unset a field, set it to null and use the update mask to indicate that it should be mutated. """ + def __init__( self, *, @@ -298,7 +383,7 @@ class BatchOperationUpdateWorkflowExecutionOptions(google.protobuf.message.Messa ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "update_mask", b"update_mask", "workflow_execution_options", @@ -307,7 +392,7 @@ class BatchOperationUpdateWorkflowExecutionOptions(google.protobuf.message.Messa ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "update_mask", @@ -321,6 +406,7 @@ global___BatchOperationUpdateWorkflowExecutionOptions = ( BatchOperationUpdateWorkflowExecutionOptions ) +@typing.final class BatchOperationUnpauseActivities(google.protobuf.message.Message): """BatchOperationUnpauseActivities sends unpause requests to batch workflows.""" @@ -345,6 +431,7 @@ class BatchOperationUnpauseActivities(google.protobuf.message.Message): """If set, the activity will start at a random time within the specified jitter duration, introducing variability to the start time. """ + def __init__( self, *, @@ -357,7 +444,7 @@ class BatchOperationUnpauseActivities(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "jitter", @@ -370,7 +457,7 @@ class BatchOperationUnpauseActivities(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "identity", @@ -388,11 +475,12 @@ class BatchOperationUnpauseActivities(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["activity", b"activity"] - ) -> typing_extensions.Literal["type", "match_all"] | None: ... + self, oneof_group: typing.Literal["activity", b"activity"] + ) -> typing.Literal["type", "match_all"] | None: ... global___BatchOperationUnpauseActivities = BatchOperationUnpauseActivities +@typing.final class BatchOperationTriggerWorkflowRule(google.protobuf.message.Message): """BatchOperationTriggerWorkflowRule sends TriggerWorkflowRule requests to batch workflows.""" @@ -408,6 +496,7 @@ class BatchOperationTriggerWorkflowRule(google.protobuf.message.Message): @property def spec(self) -> temporalio.api.rules.v1.message_pb2.WorkflowRuleSpec: """Rule specification to be applied to the workflow without creating a new rule.""" + def __init__( self, *, @@ -416,23 +505,21 @@ class BatchOperationTriggerWorkflowRule(google.protobuf.message.Message): spec: temporalio.api.rules.v1.message_pb2.WorkflowRuleSpec | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "id", b"id", "rule", b"rule", "spec", b"spec" - ], + self, field_name: typing.Literal["id", b"id", "rule", b"rule", "spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "id", b"id", "identity", b"identity", "rule", b"rule", "spec", b"spec" ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["rule", b"rule"] - ) -> typing_extensions.Literal["id", "spec"] | None: ... + self, oneof_group: typing.Literal["rule", b"rule"] + ) -> typing.Literal["id", "spec"] | None: ... global___BatchOperationTriggerWorkflowRule = BatchOperationTriggerWorkflowRule +@typing.final class BatchOperationResetActivities(google.protobuf.message.Message): """BatchOperationResetActivities sends activity reset requests in a batch. NOTE: keep in sync with temporalio.api.workflowservice.v1.ResetActivityRequest @@ -458,16 +545,17 @@ class BatchOperationResetActivities(google.protobuf.message.Message): """Setting this flag will also reset the heartbeat details.""" keep_paused: builtins.bool """If activity is paused, it will remain paused after reset""" - @property - def jitter(self) -> google.protobuf.duration_pb2.Duration: - """If set, the activity will start at a random time within the specified jitter - duration, introducing variability to the start time. - """ restore_original_options: builtins.bool """If set, the activity options will be restored to the defaults. Default options are then options activity was created with. They are part of the first ActivityTaskScheduled event. """ + @property + def jitter(self) -> google.protobuf.duration_pb2.Duration: + """If set, the activity will start at a random time within the specified jitter + duration, introducing variability to the start time. + """ + def __init__( self, *, @@ -482,7 +570,7 @@ class BatchOperationResetActivities(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "jitter", @@ -495,7 +583,7 @@ class BatchOperationResetActivities(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "identity", @@ -517,11 +605,12 @@ class BatchOperationResetActivities(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["activity", b"activity"] - ) -> typing_extensions.Literal["type", "match_all"] | None: ... + self, oneof_group: typing.Literal["activity", b"activity"] + ) -> typing.Literal["type", "match_all"] | None: ... global___BatchOperationResetActivities = BatchOperationResetActivities +@typing.final class BatchOperationUpdateActivityOptions(google.protobuf.message.Message): """BatchOperationUpdateActivityOptions sends an update-activity-options requests in a batch. NOTE: keep in sync with temporalio.api.workflowservice.v1.UpdateActivityRequest @@ -539,21 +628,23 @@ class BatchOperationUpdateActivityOptions(google.protobuf.message.Message): """The identity of the worker/client.""" type: builtins.str match_all: builtins.bool + restore_original: builtins.bool + """If set, the activity options will be restored to the default. + Default options are then options activity was created with. + They are part of the first ActivityTaskScheduled event. + This flag cannot be combined with any other option; if you supply + restore_original together with other options, the request will be rejected. + """ @property def activity_options( self, ) -> temporalio.api.activity.v1.message_pb2.ActivityOptions: """Update Activity options. Partial updates are accepted and controlled by update_mask.""" + @property def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: """Controls which fields from `activity_options` will be applied""" - restore_original: builtins.bool - """If set, the activity options will be restored to the default. - Default options are then options activity was created with. - They are part of the first ActivityTaskScheduled event. - This flag cannot be combined with any other option; if you supply - restore_original together with other options, the request will be rejected. - """ + def __init__( self, *, @@ -567,7 +658,7 @@ class BatchOperationUpdateActivityOptions(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "activity_options", @@ -582,7 +673,7 @@ class BatchOperationUpdateActivityOptions(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "activity_options", @@ -600,7 +691,7 @@ class BatchOperationUpdateActivityOptions(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["activity", b"activity"] - ) -> typing_extensions.Literal["type", "match_all"] | None: ... + self, oneof_group: typing.Literal["activity", b"activity"] + ) -> typing.Literal["type", "match_all"] | None: ... global___BatchOperationUpdateActivityOptions = BatchOperationUpdateActivityOptions diff --git a/temporalio/api/callback/__init__.py b/temporalio/api/callback/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/callback/v1/__init__.py b/temporalio/api/callback/v1/__init__.py new file mode 100644 index 0000000000..4e0d8fcc6c --- /dev/null +++ b/temporalio/api/callback/v1/__init__.py @@ -0,0 +1,5 @@ +from .message_pb2 import CallbackInfo + +__all__ = [ + "CallbackInfo", +] diff --git a/temporalio/api/callback/v1/message_pb2.py b/temporalio/api/callback/v1/message_pb2.py new file mode 100644 index 0000000000..03f0f9db70 --- /dev/null +++ b/temporalio/api/callback/v1/message_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/callback/v1/message.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + +from temporalio.api.common.v1 import ( + message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, +) +from temporalio.api.enums.v1 import ( + common_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_common__pb2, +) +from temporalio.api.failure.v1 import ( + message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, +) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n&temporal/api/callback/v1/message.proto\x12\x18temporal.api.callback.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a"temporal/api/enums/v1/common.proto\x1a%temporal/api/failure/v1/message.proto"\xab\x03\n\x0c\x43\x61llbackInfo\x12\x32\n\x08\x63\x61llback\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Callback\x12\x35\n\x11registration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x05state\x18\x03 \x01(\x0e\x32$.temporal.api.enums.v1.CallbackState\x12\x0f\n\x07\x61ttempt\x18\x04 \x01(\x05\x12>\n\x1alast_attempt_complete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x14last_attempt_failure\x18\x06 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12>\n\x1anext_attempt_schedule_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0e\x62locked_reason\x18\x08 \x01(\t\x12\x12\n\nrequest_id\x18\t \x01(\tB\x93\x01\n\x1bio.temporal.api.callback.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/callback/v1;callback\xaa\x02\x1aTemporalio.Api.Callback.V1\xea\x02\x1dTemporalio::Api::Callback::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\033io.temporal.api.callback.v1B\014MessageProtoP\001Z'go.temporal.io/api/callback/v1;callback\252\002\032Temporalio.Api.Callback.V1\352\002\035Temporalio::Api::Callback::V1" + _CALLBACKINFO._serialized_start = 215 + _CALLBACKINFO._serialized_end = 642 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/callback/v1/message_pb2.pyi b/temporalio/api/callback/v1/message_pb2.pyi new file mode 100644 index 0000000000..6b25ba15f9 --- /dev/null +++ b/temporalio/api/callback/v1/message_pb2.pyi @@ -0,0 +1,121 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import typing + +import google.protobuf.descriptor +import google.protobuf.message +import google.protobuf.timestamp_pb2 + +import temporalio.api.common.v1.message_pb2 +import temporalio.api.enums.v1.common_pb2 +import temporalio.api.failure.v1.message_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class CallbackInfo(google.protobuf.message.Message): + """Common callback information. Specific CallbackInfo messages should embed this and may include additional fields.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CALLBACK_FIELD_NUMBER: builtins.int + REGISTRATION_TIME_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + ATTEMPT_FIELD_NUMBER: builtins.int + LAST_ATTEMPT_COMPLETE_TIME_FIELD_NUMBER: builtins.int + LAST_ATTEMPT_FAILURE_FIELD_NUMBER: builtins.int + NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int + BLOCKED_REASON_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + state: temporalio.api.enums.v1.common_pb2.CallbackState.ValueType + """The current state of the callback.""" + attempt: builtins.int + """The number of attempts made to deliver the callback. + This number represents a minimum bound since the attempt is incremented after the callback request completes. + """ + blocked_reason: builtins.str + """If the state is BLOCKED, blocked reason provides additional information.""" + request_id: builtins.str + """Server-generated request ID used as an idempotency token when invoking callbacks. + It has no relation to caller-side request_id sent in operations like StartNexusOperationExecutionRequest. + """ + @property + def callback(self) -> temporalio.api.common.v1.message_pb2.Callback: + """Information on how this callback should be invoked (e.g. its URL and type).""" + + @property + def registration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the callback was registered.""" + + @property + def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the last attempt completed.""" + + @property + def last_attempt_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The last attempt's failure, if any.""" + + @property + def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the next attempt is scheduled.""" + + def __init__( + self, + *, + callback: temporalio.api.common.v1.message_pb2.Callback | None = ..., + registration_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + state: temporalio.api.enums.v1.common_pb2.CallbackState.ValueType = ..., + attempt: builtins.int = ..., + last_attempt_complete_time: google.protobuf.timestamp_pb2.Timestamp + | None = ..., + last_attempt_failure: temporalio.api.failure.v1.message_pb2.Failure + | None = ..., + next_attempt_schedule_time: google.protobuf.timestamp_pb2.Timestamp + | None = ..., + blocked_reason: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "callback", + b"callback", + "last_attempt_complete_time", + b"last_attempt_complete_time", + "last_attempt_failure", + b"last_attempt_failure", + "next_attempt_schedule_time", + b"next_attempt_schedule_time", + "registration_time", + b"registration_time", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "attempt", + b"attempt", + "blocked_reason", + b"blocked_reason", + "callback", + b"callback", + "last_attempt_complete_time", + b"last_attempt_complete_time", + "last_attempt_failure", + b"last_attempt_failure", + "next_attempt_schedule_time", + b"next_attempt_schedule_time", + "registration_time", + b"registration_time", + "request_id", + b"request_id", + "state", + b"state", + ], + ) -> None: ... + +global___CallbackInfo = CallbackInfo diff --git a/temporalio/api/cloud/account/v1/__init__.py b/temporalio/api/cloud/account/v1/__init__.py index ed3d87d9fa..b1ef72ede1 100644 --- a/temporalio/api/cloud/account/v1/__init__.py +++ b/temporalio/api/cloud/account/v1/__init__.py @@ -1,8 +1,16 @@ -from .message_pb2 import Account, AccountSpec, AuditLogSinkSpec, Metrics, MetricsSpec +from .message_pb2 import ( + Account, + AccountSpec, + AuditLogSink, + AuditLogSinkSpec, + Metrics, + MetricsSpec, +) __all__ = [ "Account", "AccountSpec", + "AuditLogSink", "AuditLogSinkSpec", "Metrics", "MetricsSpec", diff --git a/temporalio/api/cloud/account/v1/message_pb2.py b/temporalio/api/cloud/account/v1/message_pb2.py index 11d4ad75ca..da7d0429e3 100644 --- a/temporalio/api/cloud/account/v1/message_pb2.py +++ b/temporalio/api/cloud/account/v1/message_pb2.py @@ -5,15 +5,16 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + from temporalio.api.cloud.resource.v1 import ( message_pb2 as temporal_dot_api_dot_cloud_dot_resource_dot_v1_dot_message__pb2, ) @@ -22,81 +23,26 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n+temporal/api/cloud/account/v1/message.proto\x12\x1dtemporal.api.cloud.account.v1\x1a,temporal/api/cloud/resource/v1/message.proto\x1a(temporal/api/cloud/sink/v1/message.proto")\n\x0bMetricsSpec\x12\x1a\n\x12\x61\x63\x63\x65pted_client_ca\x18\x02 \x01(\x0c"J\n\x0b\x41\x63\x63ountSpec\x12;\n\x07metrics\x18\x01 \x01(\x0b\x32*.temporal.api.cloud.account.v1.MetricsSpec"\x16\n\x07Metrics\x12\x0b\n\x03uri\x18\x01 \x01(\t"\xfc\x01\n\x07\x41\x63\x63ount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x38\n\x04spec\x18\x02 \x01(\x0b\x32*.temporal.api.cloud.account.v1.AccountSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x37\n\x07metrics\x18\x06 \x01(\x0b\x32&.temporal.api.cloud.account.v1.Metrics"\xbf\x01\n\x10\x41uditLogSinkSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x0ckinesis_sink\x18\x02 \x01(\x0b\x32\'.temporal.api.cloud.sink.v1.KinesisSpecH\x00\x12>\n\x0cpub_sub_sink\x18\x03 \x01(\x0b\x32&.temporal.api.cloud.sink.v1.PubSubSpecH\x00\x12\x0f\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x0b\n\tsink_typeB\xa7\x01\n io.temporal.api.cloud.account.v1B\x0cMessageProtoP\x01Z+go.temporal.io/api/cloud/account/v1;account\xaa\x02\x1fTemporalio.Api.Cloud.Account.V1\xea\x02#Temporalio::Api::Cloud::Account::V1b\x06proto3' -) - - -_METRICSSPEC = DESCRIPTOR.message_types_by_name["MetricsSpec"] -_ACCOUNTSPEC = DESCRIPTOR.message_types_by_name["AccountSpec"] -_METRICS = DESCRIPTOR.message_types_by_name["Metrics"] -_ACCOUNT = DESCRIPTOR.message_types_by_name["Account"] -_AUDITLOGSINKSPEC = DESCRIPTOR.message_types_by_name["AuditLogSinkSpec"] -MetricsSpec = _reflection.GeneratedProtocolMessageType( - "MetricsSpec", - (_message.Message,), - { - "DESCRIPTOR": _METRICSSPEC, - "__module__": "temporalio.api.cloud.account.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.account.v1.MetricsSpec) - }, -) -_sym_db.RegisterMessage(MetricsSpec) - -AccountSpec = _reflection.GeneratedProtocolMessageType( - "AccountSpec", - (_message.Message,), - { - "DESCRIPTOR": _ACCOUNTSPEC, - "__module__": "temporalio.api.cloud.account.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.account.v1.AccountSpec) - }, -) -_sym_db.RegisterMessage(AccountSpec) - -Metrics = _reflection.GeneratedProtocolMessageType( - "Metrics", - (_message.Message,), - { - "DESCRIPTOR": _METRICS, - "__module__": "temporalio.api.cloud.account.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.account.v1.Metrics) - }, -) -_sym_db.RegisterMessage(Metrics) - -Account = _reflection.GeneratedProtocolMessageType( - "Account", - (_message.Message,), - { - "DESCRIPTOR": _ACCOUNT, - "__module__": "temporalio.api.cloud.account.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.account.v1.Account) - }, -) -_sym_db.RegisterMessage(Account) - -AuditLogSinkSpec = _reflection.GeneratedProtocolMessageType( - "AuditLogSinkSpec", - (_message.Message,), - { - "DESCRIPTOR": _AUDITLOGSINKSPEC, - "__module__": "temporalio.api.cloud.account.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.account.v1.AuditLogSinkSpec) - }, + b'\n+temporal/api/cloud/account/v1/message.proto\x12\x1dtemporal.api.cloud.account.v1\x1a,temporal/api/cloud/resource/v1/message.proto\x1a(temporal/api/cloud/sink/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto")\n\x0bMetricsSpec\x12\x1a\n\x12\x61\x63\x63\x65pted_client_ca\x18\x02 \x01(\x0c"J\n\x0b\x41\x63\x63ountSpec\x12;\n\x07metrics\x18\x01 \x01(\x0b\x32*.temporal.api.cloud.account.v1.MetricsSpec"\x16\n\x07Metrics\x12\x0b\n\x03uri\x18\x01 \x01(\t"\xfc\x01\n\x07\x41\x63\x63ount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x38\n\x04spec\x18\x02 \x01(\x0b\x32*.temporal.api.cloud.account.v1.AccountSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x37\n\x07metrics\x18\x06 \x01(\x0b\x32&.temporal.api.cloud.account.v1.Metrics"\xbf\x01\n\x10\x41uditLogSinkSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x0ckinesis_sink\x18\x02 \x01(\x0b\x32\'.temporal.api.cloud.sink.v1.KinesisSpecH\x00\x12>\n\x0cpub_sub_sink\x18\x03 \x01(\x0b\x32&.temporal.api.cloud.sink.v1.PubSubSpecH\x00\x12\x0f\n\x07\x65nabled\x18\x04 \x01(\x08\x42\x0b\n\tsink_type"\xb8\x03\n\x0c\x41uditLogSink\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12<\n\x05state\x18\x03 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12=\n\x04spec\x18\x04 \x01(\x0b\x32/.temporal.api.cloud.account.v1.AuditLogSinkSpec\x12\x42\n\x06health\x18\x05 \x01(\x0e\x32\x32.temporal.api.cloud.account.v1.AuditLogSink.Health\x12\x15\n\rerror_message\x18\x06 \x01(\t\x12\x37\n\x13last_succeeded_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"o\n\x06Health\x12\x16\n\x12HEALTH_UNSPECIFIED\x10\x00\x12\r\n\tHEALTH_OK\x10\x01\x12\x19\n\x15HEALTH_ERROR_INTERNAL\x10\x02\x12#\n\x1fHEALTH_ERROR_USER_CONFIGURATION\x10\x03\x42\xa7\x01\n io.temporal.api.cloud.account.v1B\x0cMessageProtoP\x01Z+go.temporal.io/api/cloud/account/v1;account\xaa\x02\x1fTemporalio.Api.Cloud.Account.V1\xea\x02#Temporalio::Api::Cloud::Account::V1b\x06proto3' ) -_sym_db.RegisterMessage(AuditLogSinkSpec) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n io.temporal.api.cloud.account.v1B\014MessageProtoP\001Z+go.temporal.io/api/cloud/account/v1;account\252\002\037Temporalio.Api.Cloud.Account.V1\352\002#Temporalio::Api::Cloud::Account::V1" - _METRICSSPEC._serialized_start = 166 - _METRICSSPEC._serialized_end = 207 - _ACCOUNTSPEC._serialized_start = 209 - _ACCOUNTSPEC._serialized_end = 283 - _METRICS._serialized_start = 285 - _METRICS._serialized_end = 307 - _ACCOUNT._serialized_start = 310 - _ACCOUNT._serialized_end = 562 - _AUDITLOGSINKSPEC._serialized_start = 565 - _AUDITLOGSINKSPEC._serialized_end = 756 + _METRICSSPEC._serialized_start = 199 + _METRICSSPEC._serialized_end = 240 + _ACCOUNTSPEC._serialized_start = 242 + _ACCOUNTSPEC._serialized_end = 316 + _METRICS._serialized_start = 318 + _METRICS._serialized_end = 340 + _ACCOUNT._serialized_start = 343 + _ACCOUNT._serialized_end = 595 + _AUDITLOGSINKSPEC._serialized_start = 598 + _AUDITLOGSINKSPEC._serialized_end = 789 + _AUDITLOGSINK._serialized_start = 792 + _AUDITLOGSINK._serialized_end = 1232 + _AUDITLOGSINK_HEALTH._serialized_start = 1121 + _AUDITLOGSINK_HEALTH._serialized_end = 1232 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/cloud/account/v1/message_pb2.pyi b/temporalio/api/cloud/account/v1/message_pb2.pyi index 2bd9917e00..138b18e136 100644 --- a/temporalio/api/cloud/account/v1/message_pb2.pyi +++ b/temporalio/api/cloud/account/v1/message_pb2.pyi @@ -5,20 +5,24 @@ isort:skip_file import builtins import sys +import typing import google.protobuf.descriptor +import google.protobuf.internal.enum_type_wrapper import google.protobuf.message +import google.protobuf.timestamp_pb2 import temporalio.api.cloud.resource.v1.message_pb2 import temporalio.api.cloud.sink.v1.message_pb2 -if sys.version_info >= (3, 8): +if sys.version_info >= (3, 10): import typing as typing_extensions else: import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class MetricsSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -33,14 +37,12 @@ class MetricsSpec(google.protobuf.message.Message): accepted_client_ca: builtins.bytes = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "accepted_client_ca", b"accepted_client_ca" - ], + self, field_name: typing.Literal["accepted_client_ca", b"accepted_client_ca"] ) -> None: ... global___MetricsSpec = MetricsSpec +@typing.final class AccountSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -50,20 +52,20 @@ class AccountSpec(google.protobuf.message.Message): """The metrics specification for this account. If not specified, metrics will not be enabled. """ + def __init__( self, *, metrics: global___MetricsSpec | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["metrics", b"metrics"] + self, field_name: typing.Literal["metrics", b"metrics"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["metrics", b"metrics"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["metrics", b"metrics"]) -> None: ... global___AccountSpec = AccountSpec +@typing.final class Metrics(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -77,12 +79,11 @@ class Metrics(google.protobuf.message.Message): *, uri: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["uri", b"uri"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["uri", b"uri"]) -> None: ... global___Metrics = Metrics +@typing.final class Account(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -94,9 +95,6 @@ class Account(google.protobuf.message.Message): METRICS_FIELD_NUMBER: builtins.int id: builtins.str """The id of the account.""" - @property - def spec(self) -> global___AccountSpec: - """The account specification.""" resource_version: builtins.str """The current version of the account specification. The next update operation will have to include this version. @@ -105,9 +103,14 @@ class Account(google.protobuf.message.Message): """The current state of the account.""" async_operation_id: builtins.str """The id of the async operation that is updating the account, if any.""" + @property + def spec(self) -> global___AccountSpec: + """The account specification.""" + @property def metrics(self) -> global___Metrics: """Information related to metrics.""" + def __init__( self, *, @@ -119,12 +122,11 @@ class Account(google.protobuf.message.Message): metrics: global___Metrics | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["metrics", b"metrics", "spec", b"spec"], + self, field_name: typing.Literal["metrics", b"metrics", "spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "id", @@ -142,6 +144,7 @@ class Account(google.protobuf.message.Message): global___Account = Account +@typing.final class AuditLogSinkSpec(google.protobuf.message.Message): """AuditLogSinkSpec is only used by Audit Log""" @@ -153,14 +156,16 @@ class AuditLogSinkSpec(google.protobuf.message.Message): ENABLED_FIELD_NUMBER: builtins.int name: builtins.str """Name of the sink e.g. "audit_log_01" """ + enabled: builtins.bool + """Enabled indicates whether the sink is enabled or not.""" @property def kinesis_sink(self) -> temporalio.api.cloud.sink.v1.message_pb2.KinesisSpec: """The KinesisSpec when destination_type is Kinesis""" + @property def pub_sub_sink(self) -> temporalio.api.cloud.sink.v1.message_pb2.PubSubSpec: """The PubSubSpec when destination_type is PubSub""" - enabled: builtins.bool - """Enabled indicates whether the sink is enabled or not.""" + def __init__( self, *, @@ -171,7 +176,7 @@ class AuditLogSinkSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "kinesis_sink", b"kinesis_sink", "pub_sub_sink", @@ -182,7 +187,7 @@ class AuditLogSinkSpec(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "enabled", b"enabled", "kinesis_sink", @@ -196,7 +201,107 @@ class AuditLogSinkSpec(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["sink_type", b"sink_type"] - ) -> typing_extensions.Literal["kinesis_sink", "pub_sub_sink"] | None: ... + self, oneof_group: typing.Literal["sink_type", b"sink_type"] + ) -> typing.Literal["kinesis_sink", "pub_sub_sink"] | None: ... global___AuditLogSinkSpec = AuditLogSinkSpec + +@typing.final +class AuditLogSink(google.protobuf.message.Message): + """AuditLogSink is only used by Audit Log""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Health: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _HealthEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + AuditLogSink._Health.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + HEALTH_UNSPECIFIED: AuditLogSink._Health.ValueType # 0 + HEALTH_OK: AuditLogSink._Health.ValueType # 1 + """The audit log sink is healthy and functioning correctly.""" + HEALTH_ERROR_INTERNAL: AuditLogSink._Health.ValueType # 2 + """The audit log sink has an internal error.""" + HEALTH_ERROR_USER_CONFIGURATION: AuditLogSink._Health.ValueType # 3 + """The audit log sink has a configuration error.""" + + class Health(_Health, metaclass=_HealthEnumTypeWrapper): + """The health status of the audit log sink.""" + + HEALTH_UNSPECIFIED: AuditLogSink.Health.ValueType # 0 + HEALTH_OK: AuditLogSink.Health.ValueType # 1 + """The audit log sink is healthy and functioning correctly.""" + HEALTH_ERROR_INTERNAL: AuditLogSink.Health.ValueType # 2 + """The audit log sink has an internal error.""" + HEALTH_ERROR_USER_CONFIGURATION: AuditLogSink.Health.ValueType # 3 + """The audit log sink has a configuration error.""" + + NAME_FIELD_NUMBER: builtins.int + RESOURCE_VERSION_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + SPEC_FIELD_NUMBER: builtins.int + HEALTH_FIELD_NUMBER: builtins.int + ERROR_MESSAGE_FIELD_NUMBER: builtins.int + LAST_SUCCEEDED_TIME_FIELD_NUMBER: builtins.int + name: builtins.str + """Name of the sink e.g. "audit_log_01" """ + resource_version: builtins.str + """The version of the audit log sink resource.""" + state: temporalio.api.cloud.resource.v1.message_pb2.ResourceState.ValueType + """The current state of the audit log sink.""" + health: global___AuditLogSink.Health.ValueType + """The health status of the audit log sink.""" + error_message: builtins.str + """An error message describing any issues with the audit log sink, if applicable.""" + @property + def spec(self) -> global___AuditLogSinkSpec: + """The specification details of the audit log sink.""" + + @property + def last_succeeded_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The last succeeded timestamp for the internal workflow responsible for adding data to the sink.""" + + def __init__( + self, + *, + name: builtins.str = ..., + resource_version: builtins.str = ..., + state: temporalio.api.cloud.resource.v1.message_pb2.ResourceState.ValueType = ..., + spec: global___AuditLogSinkSpec | None = ..., + health: global___AuditLogSink.Health.ValueType = ..., + error_message: builtins.str = ..., + last_succeeded_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "last_succeeded_time", b"last_succeeded_time", "spec", b"spec" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "error_message", + b"error_message", + "health", + b"health", + "last_succeeded_time", + b"last_succeeded_time", + "name", + b"name", + "resource_version", + b"resource_version", + "spec", + b"spec", + "state", + b"state", + ], + ) -> None: ... + +global___AuditLogSink = AuditLogSink diff --git a/temporalio/api/cloud/auditlog/__init__.py b/temporalio/api/cloud/auditlog/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/cloud/auditlog/v1/__init__.py b/temporalio/api/cloud/auditlog/v1/__init__.py new file mode 100644 index 0000000000..558f70660e --- /dev/null +++ b/temporalio/api/cloud/auditlog/v1/__init__.py @@ -0,0 +1,6 @@ +from .message_pb2 import LogRecord, Principal + +__all__ = [ + "LogRecord", + "Principal", +] diff --git a/temporalio/api/cloud/auditlog/v1/message_pb2.py b/temporalio/api/cloud/auditlog/v1/message_pb2.py new file mode 100644 index 0000000000..7a83b841b0 --- /dev/null +++ b/temporalio/api/cloud/auditlog/v1/message_pb2.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/cloud/auditlog/v1/message.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n,temporal/api/cloud/auditlog/v1/message.proto\x12\x1etemporal.api.cloud.auditlog.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto"\x9f\x02\n\tLogRecord\x12-\n\temit_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\toperation\x18\x05 \x01(\t\x12\x0e\n\x06status\x18\x07 \x01(\t\x12\x0f\n\x07version\x18\t \x01(\x05\x12\x0e\n\x06log_id\x18\n \x01(\t\x12<\n\tprincipal\x18\x0c \x01(\x0b\x32).temporal.api.cloud.auditlog.v1.Principal\x12,\n\x0braw_details\x18\r \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x17\n\x0fx_forwarded_for\x18\x0e \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x0f \x01(\t"G\n\tPrincipal\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x12\n\napi_key_id\x18\x04 \x01(\tB\xac\x01\n!io.temporal.api.cloud.auditlog.v1B\x0cMessageProtoP\x01Z-go.temporal.io/api/cloud/auditlog/v1;auditlog\xaa\x02 Temporalio.Api.Cloud.AuditLog.V1\xea\x02$Temporalio::Api::Cloud::AuditLog::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n!io.temporal.api.cloud.auditlog.v1B\014MessageProtoP\001Z-go.temporal.io/api/cloud/auditlog/v1;auditlog\252\002 Temporalio.Api.Cloud.AuditLog.V1\352\002$Temporalio::Api::Cloud::AuditLog::V1" + _LOGRECORD._serialized_start = 144 + _LOGRECORD._serialized_end = 431 + _PRINCIPAL._serialized_start = 433 + _PRINCIPAL._serialized_end = 504 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/cloud/auditlog/v1/message_pb2.pyi b/temporalio/api/cloud/auditlog/v1/message_pb2.pyi new file mode 100644 index 0000000000..6976f0ca4b --- /dev/null +++ b/temporalio/api/cloud/auditlog/v1/message_pb2.pyi @@ -0,0 +1,138 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import typing + +import google.protobuf.descriptor +import google.protobuf.message +import google.protobuf.struct_pb2 +import google.protobuf.timestamp_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class LogRecord(google.protobuf.message.Message): + """LogRecord represents an audit log entry from Temporal, structured for easy parsing and analysis.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + EMIT_TIME_FIELD_NUMBER: builtins.int + OPERATION_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: builtins.int + VERSION_FIELD_NUMBER: builtins.int + LOG_ID_FIELD_NUMBER: builtins.int + PRINCIPAL_FIELD_NUMBER: builtins.int + RAW_DETAILS_FIELD_NUMBER: builtins.int + X_FORWARDED_FOR_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + operation: builtins.str + """The operation performed.""" + status: builtins.str + """The status of the operation.""" + version: builtins.int + """The internal version of the log message. Can be used in deduplication if needed.""" + log_id: builtins.str + """Unique ID for the log record.""" + x_forwarded_for: builtins.str + """The originating IP address of the request.""" + async_operation_id: builtins.str + """The ID of the async operation.""" + @property + def emit_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Time when the log was emitted.""" + + @property + def principal(self) -> global___Principal: + """The principal that performed the operation.""" + + @property + def raw_details(self) -> google.protobuf.struct_pb2.Struct: + """The raw details of the operation.""" + + def __init__( + self, + *, + emit_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + operation: builtins.str = ..., + status: builtins.str = ..., + version: builtins.int = ..., + log_id: builtins.str = ..., + principal: global___Principal | None = ..., + raw_details: google.protobuf.struct_pb2.Struct | None = ..., + x_forwarded_for: builtins.str = ..., + async_operation_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "emit_time", + b"emit_time", + "principal", + b"principal", + "raw_details", + b"raw_details", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", + b"async_operation_id", + "emit_time", + b"emit_time", + "log_id", + b"log_id", + "operation", + b"operation", + "principal", + b"principal", + "raw_details", + b"raw_details", + "status", + b"status", + "version", + b"version", + "x_forwarded_for", + b"x_forwarded_for", + ], + ) -> None: ... + +global___LogRecord = LogRecord + +@typing.final +class Principal(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + ID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + API_KEY_ID_FIELD_NUMBER: builtins.int + type: builtins.str + """The type of the principal. + Possible type values: user, serviceaccount. + """ + id: builtins.str + """The id of the principal.""" + name: builtins.str + """The name of the principal.""" + api_key_id: builtins.str + """The api key id of the principal if provided.""" + def __init__( + self, + *, + type: builtins.str = ..., + id: builtins.str = ..., + name: builtins.str = ..., + api_key_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "api_key_id", b"api_key_id", "id", b"id", "name", b"name", "type", b"type" + ], + ) -> None: ... + +global___Principal = Principal diff --git a/temporalio/api/cloud/billing/__init__.py b/temporalio/api/cloud/billing/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/cloud/billing/v1/__init__.py b/temporalio/api/cloud/billing/v1/__init__.py new file mode 100644 index 0000000000..7159e38fce --- /dev/null +++ b/temporalio/api/cloud/billing/v1/__init__.py @@ -0,0 +1,6 @@ +from .message_pb2 import BillingReport, BillingReportSpec + +__all__ = [ + "BillingReport", + "BillingReportSpec", +] diff --git a/temporalio/api/cloud/billing/v1/message_pb2.py b/temporalio/api/cloud/billing/v1/message_pb2.py new file mode 100644 index 0000000000..16c559b2b3 --- /dev/null +++ b/temporalio/api/cloud/billing/v1/message_pb2.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/cloud/billing/v1/message.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n+temporal/api/cloud/billing/v1/message.proto\x12\x1dtemporal.api.cloud.billing.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xfd\x03\n\x11\x42illingReportSpec\x12\x38\n\x14start_time_inclusive\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12\x65nd_time_exclusive\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n download_url_expiration_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12^\n\x0bgranularity\x18\x05 \x01(\x0e\x32I.temporal.api.cloud.billing.v1.BillingReportSpec.BillingReportGranularity"\xbb\x01\n\x18\x42illingReportGranularity\x12*\n&BILLING_REPORT_GRANULARITY_UNSPECIFIED\x10\x00\x12%\n!BILLING_REPORT_GRANULARITY_HOURLY\x10\x01\x12$\n BILLING_REPORT_GRANULARITY_DAILY\x10\x02\x12&\n"BILLING_REPORT_GRANULARITY_MONTHLY\x10\x03"\xa8\x06\n\rBillingReport\x12\n\n\x02id\x18\x01 \x01(\t\x12N\n\x05state\x18\x02 \x01(\x0e\x32?.temporal.api.cloud.billing.v1.BillingReport.BillingReportState\x12>\n\x04spec\x18\x03 \x01(\x0b\x32\x30.temporal.api.cloud.billing.v1.BillingReportSpec\x12L\n\rdownload_info\x18\x04 \x03(\x0b\x32\x35.temporal.api.cloud.billing.v1.BillingReport.Download\x12\x32\n\x0erequested_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0egenerated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12\x61sync_operation_id\x18\x07 \x01(\t\x1a\x80\x02\n\x08\x44ownload\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x37\n\x13url_expiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12U\n\x0b\x66ile_format\x18\x03 \x01(\x0e\x32@.temporal.api.cloud.billing.v1.BillingReport.Download.FileFormat\x12\x17\n\x0f\x66ile_size_bytes\x18\x04 \x01(\x03">\n\nFileFormat\x12\x1b\n\x17\x46ILE_FORMAT_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46ILE_FORMAT_CSV\x10\x01"\xa5\x01\n\x12\x42illingReportState\x12$\n BILLING_REPORT_STATE_UNSPECIFIED\x10\x00\x12$\n BILLING_REPORT_STATE_IN_PROGRESS\x10\x01\x12"\n\x1e\x42ILLING_REPORT_STATE_GENERATED\x10\x02\x12\x1f\n\x1b\x42ILLING_REPORT_STATE_FAILED\x10\x03\x42\xa7\x01\n io.temporal.api.cloud.billing.v1B\x0cMessageProtoP\x01Z+go.temporal.io/api/cloud/billing/v1;billing\xaa\x02\x1fTemporalio.Api.Cloud.Billing.V1\xea\x02#Temporalio::Api::Cloud::Billing::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n io.temporal.api.cloud.billing.v1B\014MessageProtoP\001Z+go.temporal.io/api/cloud/billing/v1;billing\252\002\037Temporalio.Api.Cloud.Billing.V1\352\002#Temporalio::Api::Cloud::Billing::V1" + _BILLINGREPORTSPEC._serialized_start = 144 + _BILLINGREPORTSPEC._serialized_end = 653 + _BILLINGREPORTSPEC_BILLINGREPORTGRANULARITY._serialized_start = 466 + _BILLINGREPORTSPEC_BILLINGREPORTGRANULARITY._serialized_end = 653 + _BILLINGREPORT._serialized_start = 656 + _BILLINGREPORT._serialized_end = 1464 + _BILLINGREPORT_DOWNLOAD._serialized_start = 1040 + _BILLINGREPORT_DOWNLOAD._serialized_end = 1296 + _BILLINGREPORT_DOWNLOAD_FILEFORMAT._serialized_start = 1234 + _BILLINGREPORT_DOWNLOAD_FILEFORMAT._serialized_end = 1296 + _BILLINGREPORT_BILLINGREPORTSTATE._serialized_start = 1299 + _BILLINGREPORT_BILLINGREPORTSTATE._serialized_end = 1464 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/cloud/billing/v1/message_pb2.pyi b/temporalio/api/cloud/billing/v1/message_pb2.pyi new file mode 100644 index 0000000000..7f592966b8 --- /dev/null +++ b/temporalio/api/cloud/billing/v1/message_pb2.pyi @@ -0,0 +1,308 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import sys +import typing + +import google.protobuf.descriptor +import google.protobuf.duration_pb2 +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import google.protobuf.timestamp_pb2 + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class BillingReportSpec(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _BillingReportGranularity: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _BillingReportGranularityEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + BillingReportSpec._BillingReportGranularity.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + BILLING_REPORT_GRANULARITY_UNSPECIFIED: ( + BillingReportSpec._BillingReportGranularity.ValueType + ) # 0 + BILLING_REPORT_GRANULARITY_HOURLY: ( + BillingReportSpec._BillingReportGranularity.ValueType + ) # 1 + BILLING_REPORT_GRANULARITY_DAILY: ( + BillingReportSpec._BillingReportGranularity.ValueType + ) # 2 + BILLING_REPORT_GRANULARITY_MONTHLY: ( + BillingReportSpec._BillingReportGranularity.ValueType + ) # 3 + + class BillingReportGranularity( + _BillingReportGranularity, metaclass=_BillingReportGranularityEnumTypeWrapper + ): ... + BILLING_REPORT_GRANULARITY_UNSPECIFIED: ( + BillingReportSpec.BillingReportGranularity.ValueType + ) # 0 + BILLING_REPORT_GRANULARITY_HOURLY: ( + BillingReportSpec.BillingReportGranularity.ValueType + ) # 1 + BILLING_REPORT_GRANULARITY_DAILY: ( + BillingReportSpec.BillingReportGranularity.ValueType + ) # 2 + BILLING_REPORT_GRANULARITY_MONTHLY: ( + BillingReportSpec.BillingReportGranularity.ValueType + ) # 3 + + START_TIME_INCLUSIVE_FIELD_NUMBER: builtins.int + END_TIME_EXCLUSIVE_FIELD_NUMBER: builtins.int + DOWNLOAD_URL_EXPIRATION_DURATION_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + GRANULARITY_FIELD_NUMBER: builtins.int + description: builtins.str + """The description for the billing report. + Optional, default is empty. + """ + granularity: global___BillingReportSpec.BillingReportGranularity.ValueType + """The data granularity of the billing report. + Optional, default is hourly. + temporal:versioning:min_version=v0.16.0 + """ + @property + def start_time_inclusive(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The start time of the billing report (in UTC).""" + + @property + def end_time_exclusive(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The end time of the billing report (in UTC).""" + + @property + def download_url_expiration_duration(self) -> google.protobuf.duration_pb2.Duration: + """The duration after which the download url will expire. + Optional, default is 5 minutes and maximum is 1 hour. + """ + + def __init__( + self, + *, + start_time_inclusive: google.protobuf.timestamp_pb2.Timestamp | None = ..., + end_time_exclusive: google.protobuf.timestamp_pb2.Timestamp | None = ..., + download_url_expiration_duration: google.protobuf.duration_pb2.Duration + | None = ..., + description: builtins.str = ..., + granularity: global___BillingReportSpec.BillingReportGranularity.ValueType = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "download_url_expiration_duration", + b"download_url_expiration_duration", + "end_time_exclusive", + b"end_time_exclusive", + "start_time_inclusive", + b"start_time_inclusive", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "description", + b"description", + "download_url_expiration_duration", + b"download_url_expiration_duration", + "end_time_exclusive", + b"end_time_exclusive", + "granularity", + b"granularity", + "start_time_inclusive", + b"start_time_inclusive", + ], + ) -> None: ... + +global___BillingReportSpec = BillingReportSpec + +@typing.final +class BillingReport(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _BillingReportState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _BillingReportStateEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + BillingReport._BillingReportState.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + BILLING_REPORT_STATE_UNSPECIFIED: ( + BillingReport._BillingReportState.ValueType + ) # 0 + BILLING_REPORT_STATE_IN_PROGRESS: ( + BillingReport._BillingReportState.ValueType + ) # 1 + BILLING_REPORT_STATE_GENERATED: BillingReport._BillingReportState.ValueType # 2 + BILLING_REPORT_STATE_FAILED: BillingReport._BillingReportState.ValueType # 3 + + class BillingReportState( + _BillingReportState, metaclass=_BillingReportStateEnumTypeWrapper + ): ... + BILLING_REPORT_STATE_UNSPECIFIED: BillingReport.BillingReportState.ValueType # 0 + BILLING_REPORT_STATE_IN_PROGRESS: BillingReport.BillingReportState.ValueType # 1 + BILLING_REPORT_STATE_GENERATED: BillingReport.BillingReportState.ValueType # 2 + BILLING_REPORT_STATE_FAILED: BillingReport.BillingReportState.ValueType # 3 + + @typing.final + class Download(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _FileFormat: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _FileFormatEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + BillingReport.Download._FileFormat.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + FILE_FORMAT_UNSPECIFIED: BillingReport.Download._FileFormat.ValueType # 0 + FILE_FORMAT_CSV: BillingReport.Download._FileFormat.ValueType # 1 + + class FileFormat(_FileFormat, metaclass=_FileFormatEnumTypeWrapper): ... + FILE_FORMAT_UNSPECIFIED: BillingReport.Download.FileFormat.ValueType # 0 + FILE_FORMAT_CSV: BillingReport.Download.FileFormat.ValueType # 1 + + URL_FIELD_NUMBER: builtins.int + URL_EXPIRATION_TIME_FIELD_NUMBER: builtins.int + FILE_FORMAT_FIELD_NUMBER: builtins.int + FILE_SIZE_BYTES_FIELD_NUMBER: builtins.int + url: builtins.str + """The download url.""" + file_format: global___BillingReport.Download.FileFormat.ValueType + """The file format of the billing report""" + file_size_bytes: builtins.int + """The size of the file in bytes. Useful for pre-allocating space, progress indicators, etc.""" + @property + def url_expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the download url will expire.""" + + def __init__( + self, + *, + url: builtins.str = ..., + url_expiration_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + file_format: global___BillingReport.Download.FileFormat.ValueType = ..., + file_size_bytes: builtins.int = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal["url_expiration_time", b"url_expiration_time"], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "file_format", + b"file_format", + "file_size_bytes", + b"file_size_bytes", + "url", + b"url", + "url_expiration_time", + b"url_expiration_time", + ], + ) -> None: ... + + ID_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + SPEC_FIELD_NUMBER: builtins.int + DOWNLOAD_INFO_FIELD_NUMBER: builtins.int + REQUESTED_TIME_FIELD_NUMBER: builtins.int + GENERATED_TIME_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + id: builtins.str + """The id of the billing report.""" + state: global___BillingReport.BillingReportState.ValueType + """The current state of the billing report.""" + async_operation_id: builtins.str + """The async operation id associated with the billing report generation.""" + @property + def spec(self) -> global___BillingReportSpec: + """The spec used to generate this billing report.""" + + @property + def download_info( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___BillingReport.Download + ]: + """The download information for the billing report. + For future-proofness this is repeated as we may return multiple files (e.g. csv+meta/json, split by size/date, etc.) + """ + + @property + def requested_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The date and time when the billing report was requested.""" + + @property + def generated_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The date and time when the billing report generation completed.""" + + def __init__( + self, + *, + id: builtins.str = ..., + state: global___BillingReport.BillingReportState.ValueType = ..., + spec: global___BillingReportSpec | None = ..., + download_info: collections.abc.Iterable[global___BillingReport.Download] + | None = ..., + requested_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + generated_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + async_operation_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "generated_time", + b"generated_time", + "requested_time", + b"requested_time", + "spec", + b"spec", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", + b"async_operation_id", + "download_info", + b"download_info", + "generated_time", + b"generated_time", + "id", + b"id", + "requested_time", + b"requested_time", + "spec", + b"spec", + "state", + b"state", + ], + ) -> None: ... + +global___BillingReport = BillingReport diff --git a/temporalio/api/cloud/cloudservice/v1/__init__.py b/temporalio/api/cloud/cloudservice/v1/__init__.py index 293d6b837a..1aba18b065 100644 --- a/temporalio/api/cloud/cloudservice/v1/__init__.py +++ b/temporalio/api/cloud/cloudservice/v1/__init__.py @@ -3,10 +3,16 @@ AddNamespaceRegionResponse, AddUserGroupMemberRequest, AddUserGroupMemberResponse, + CreateAccountAuditLogSinkRequest, + CreateAccountAuditLogSinkResponse, CreateApiKeyRequest, CreateApiKeyResponse, + CreateBillingReportRequest, + CreateBillingReportResponse, CreateConnectivityRuleRequest, CreateConnectivityRuleResponse, + CreateCustomRoleRequest, + CreateCustomRoleResponse, CreateNamespaceExportSinkRequest, CreateNamespaceExportSinkResponse, CreateNamespaceRequest, @@ -19,10 +25,14 @@ CreateUserGroupResponse, CreateUserRequest, CreateUserResponse, + DeleteAccountAuditLogSinkRequest, + DeleteAccountAuditLogSinkResponse, DeleteApiKeyRequest, DeleteApiKeyResponse, DeleteConnectivityRuleRequest, DeleteConnectivityRuleResponse, + DeleteCustomRoleRequest, + DeleteCustomRoleResponse, DeleteNamespaceExportSinkRequest, DeleteNamespaceExportSinkResponse, DeleteNamespaceRegionRequest, @@ -39,6 +49,10 @@ DeleteUserResponse, FailoverNamespaceRegionRequest, FailoverNamespaceRegionResponse, + GetAccountAuditLogSinkRequest, + GetAccountAuditLogSinkResponse, + GetAccountAuditLogSinksRequest, + GetAccountAuditLogSinksResponse, GetAccountRequest, GetAccountResponse, GetApiKeyRequest, @@ -47,10 +61,22 @@ GetApiKeysResponse, GetAsyncOperationRequest, GetAsyncOperationResponse, + GetAuditLogsRequest, + GetAuditLogsResponse, + GetBillingReportRequest, + GetBillingReportResponse, GetConnectivityRuleRequest, GetConnectivityRuleResponse, GetConnectivityRulesRequest, GetConnectivityRulesResponse, + GetCurrentIdentityRequest, + GetCurrentIdentityResponse, + GetCustomRoleRequest, + GetCustomRoleResponse, + GetCustomRolesRequest, + GetCustomRolesResponse, + GetNamespaceCapacityInfoRequest, + GetNamespaceCapacityInfoResponse, GetNamespaceExportSinkRequest, GetNamespaceExportSinkResponse, GetNamespaceExportSinksRequest, @@ -67,6 +93,8 @@ GetRegionResponse, GetRegionsRequest, GetRegionsResponse, + GetServiceAccountNamespaceAssignmentsRequest, + GetServiceAccountNamespaceAssignmentsResponse, GetServiceAccountRequest, GetServiceAccountResponse, GetServiceAccountsRequest, @@ -75,10 +103,14 @@ GetUsageResponse, GetUserGroupMembersRequest, GetUserGroupMembersResponse, + GetUserGroupNamespaceAssignmentsRequest, + GetUserGroupNamespaceAssignmentsResponse, GetUserGroupRequest, GetUserGroupResponse, GetUserGroupsRequest, GetUserGroupsResponse, + GetUserNamespaceAssignmentsRequest, + GetUserNamespaceAssignmentsResponse, GetUserRequest, GetUserResponse, GetUsersRequest, @@ -93,10 +125,14 @@ SetUserGroupNamespaceAccessResponse, SetUserNamespaceAccessRequest, SetUserNamespaceAccessResponse, + UpdateAccountAuditLogSinkRequest, + UpdateAccountAuditLogSinkResponse, UpdateAccountRequest, UpdateAccountResponse, UpdateApiKeyRequest, UpdateApiKeyResponse, + UpdateCustomRoleRequest, + UpdateCustomRoleResponse, UpdateNamespaceExportSinkRequest, UpdateNamespaceExportSinkResponse, UpdateNamespaceRequest, @@ -122,10 +158,16 @@ "AddNamespaceRegionResponse", "AddUserGroupMemberRequest", "AddUserGroupMemberResponse", + "CreateAccountAuditLogSinkRequest", + "CreateAccountAuditLogSinkResponse", "CreateApiKeyRequest", "CreateApiKeyResponse", + "CreateBillingReportRequest", + "CreateBillingReportResponse", "CreateConnectivityRuleRequest", "CreateConnectivityRuleResponse", + "CreateCustomRoleRequest", + "CreateCustomRoleResponse", "CreateNamespaceExportSinkRequest", "CreateNamespaceExportSinkResponse", "CreateNamespaceRequest", @@ -138,10 +180,14 @@ "CreateUserGroupResponse", "CreateUserRequest", "CreateUserResponse", + "DeleteAccountAuditLogSinkRequest", + "DeleteAccountAuditLogSinkResponse", "DeleteApiKeyRequest", "DeleteApiKeyResponse", "DeleteConnectivityRuleRequest", "DeleteConnectivityRuleResponse", + "DeleteCustomRoleRequest", + "DeleteCustomRoleResponse", "DeleteNamespaceExportSinkRequest", "DeleteNamespaceExportSinkResponse", "DeleteNamespaceRegionRequest", @@ -158,6 +204,10 @@ "DeleteUserResponse", "FailoverNamespaceRegionRequest", "FailoverNamespaceRegionResponse", + "GetAccountAuditLogSinkRequest", + "GetAccountAuditLogSinkResponse", + "GetAccountAuditLogSinksRequest", + "GetAccountAuditLogSinksResponse", "GetAccountRequest", "GetAccountResponse", "GetApiKeyRequest", @@ -166,10 +216,22 @@ "GetApiKeysResponse", "GetAsyncOperationRequest", "GetAsyncOperationResponse", + "GetAuditLogsRequest", + "GetAuditLogsResponse", + "GetBillingReportRequest", + "GetBillingReportResponse", "GetConnectivityRuleRequest", "GetConnectivityRuleResponse", "GetConnectivityRulesRequest", "GetConnectivityRulesResponse", + "GetCurrentIdentityRequest", + "GetCurrentIdentityResponse", + "GetCustomRoleRequest", + "GetCustomRoleResponse", + "GetCustomRolesRequest", + "GetCustomRolesResponse", + "GetNamespaceCapacityInfoRequest", + "GetNamespaceCapacityInfoResponse", "GetNamespaceExportSinkRequest", "GetNamespaceExportSinkResponse", "GetNamespaceExportSinksRequest", @@ -186,6 +248,8 @@ "GetRegionResponse", "GetRegionsRequest", "GetRegionsResponse", + "GetServiceAccountNamespaceAssignmentsRequest", + "GetServiceAccountNamespaceAssignmentsResponse", "GetServiceAccountRequest", "GetServiceAccountResponse", "GetServiceAccountsRequest", @@ -194,10 +258,14 @@ "GetUsageResponse", "GetUserGroupMembersRequest", "GetUserGroupMembersResponse", + "GetUserGroupNamespaceAssignmentsRequest", + "GetUserGroupNamespaceAssignmentsResponse", "GetUserGroupRequest", "GetUserGroupResponse", "GetUserGroupsRequest", "GetUserGroupsResponse", + "GetUserNamespaceAssignmentsRequest", + "GetUserNamespaceAssignmentsResponse", "GetUserRequest", "GetUserResponse", "GetUsersRequest", @@ -212,10 +280,14 @@ "SetUserGroupNamespaceAccessResponse", "SetUserNamespaceAccessRequest", "SetUserNamespaceAccessResponse", + "UpdateAccountAuditLogSinkRequest", + "UpdateAccountAuditLogSinkResponse", "UpdateAccountRequest", "UpdateAccountResponse", "UpdateApiKeyRequest", "UpdateApiKeyResponse", + "UpdateCustomRoleRequest", + "UpdateCustomRoleResponse", "UpdateNamespaceExportSinkRequest", "UpdateNamespaceExportSinkResponse", "UpdateNamespaceRequest", @@ -241,6 +313,7 @@ import grpc from .service_pb2_grpc import ( + CloudService, CloudServiceServicer, CloudServiceStub, add_CloudServiceServicer_to_server, @@ -248,6 +321,7 @@ __all__.extend( [ + "CloudService", "CloudServiceServicer", "CloudServiceStub", "add_CloudServiceServicer_to_server", diff --git a/temporalio/api/cloud/cloudservice/v1/request_response_pb2.py b/temporalio/api/cloud/cloudservice/v1/request_response_pb2.py index 589d4c4f9f..4406cb0e57 100644 --- a/temporalio/api/cloud/cloudservice/v1/request_response_pb2.py +++ b/temporalio/api/cloud/cloudservice/v1/request_response_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -19,6 +18,12 @@ from temporalio.api.cloud.account.v1 import ( message_pb2 as temporal_dot_api_dot_cloud_dot_account_dot_v1_dot_message__pb2, ) +from temporalio.api.cloud.auditlog.v1 import ( + message_pb2 as temporal_dot_api_dot_cloud_dot_auditlog_dot_v1_dot_message__pb2, +) +from temporalio.api.cloud.billing.v1 import ( + message_pb2 as temporal_dot_api_dot_cloud_dot_billing_dot_v1_dot_message__pb2, +) from temporalio.api.cloud.connectivityrule.v1 import ( message_pb2 as temporal_dot_api_dot_cloud_dot_connectivityrule_dot_v1_dot_message__pb2, ) @@ -42,1576 +47,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n9temporal/api/cloud/cloudservice/v1/request_response.proto\x12"temporal.api.cloud.cloudservice.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-temporal/api/cloud/operation/v1/message.proto\x1a,temporal/api/cloud/identity/v1/message.proto\x1a-temporal/api/cloud/namespace/v1/message.proto\x1a)temporal/api/cloud/nexus/v1/message.proto\x1a*temporal/api/cloud/region/v1/message.proto\x1a+temporal/api/cloud/account/v1/message.proto\x1a)temporal/api/cloud/usage/v1/message.proto\x1a\x34temporal/api/cloud/connectivityrule/v1/message.proto"Z\n\x0fGetUsersRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t"`\n\x10GetUsersResponse\x12\x33\n\x05users\x18\x01 \x03(\x0b\x32$.temporal.api.cloud.identity.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"!\n\x0eGetUserRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t"E\n\x0fGetUserResponse\x12\x32\n\x04user\x18\x01 \x01(\x0b\x32$.temporal.api.cloud.identity.v1.User"g\n\x11\x43reateUserRequest\x12\x36\n\x04spec\x18\x01 \x01(\x0b\x32(.temporal.api.cloud.identity.v1.UserSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"o\n\x12\x43reateUserResponse\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x92\x01\n\x11UpdateUserRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x36\n\x04spec\x18\x02 \x01(\x0b\x32(.temporal.api.cloud.identity.v1.UserSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"^\n\x12UpdateUserResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"Z\n\x11\x44\x65leteUserRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"^\n\x12\x44\x65leteUserResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xba\x01\n\x1dSetUserNamespaceAccessRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12?\n\x06\x61\x63\x63\x65ss\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t"j\n\x1eSetUserNamespaceAccessResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"6\n\x18GetAsyncOperationRequest\x12\x1a\n\x12\x61sync_operation_id\x18\x01 \x01(\t"e\n\x19GetAsyncOperationResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xf3\x01\n\x16\x43reateNamespaceRequest\x12<\n\x04spec\x18\x02 \x01(\x0b\x32..temporal.api.cloud.namespace.v1.NamespaceSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t\x12R\n\x04tags\x18\x04 \x03(\x0b\x32\x44.temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"v\n\x17\x43reateNamespaceResponse\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"K\n\x14GetNamespacesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t"p\n\x15GetNamespacesResponse\x12>\n\nnamespaces\x18\x01 \x03(\x0b\x32*.temporal.api.cloud.namespace.v1.Namespace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"(\n\x13GetNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t"U\n\x14GetNamespaceResponse\x12=\n\tnamespace\x18\x01 \x01(\x0b\x32*.temporal.api.cloud.namespace.v1.Namespace"\x9f\x01\n\x16UpdateNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\x04spec\x18\x02 \x01(\x0b\x32..temporal.api.cloud.namespace.v1.NamespaceSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"c\n\x17UpdateNamespaceResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xc6\x01\n"RenameCustomSearchAttributeRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12-\n%existing_custom_search_attribute_name\x18\x02 \x01(\t\x12(\n new_custom_search_attribute_name\x18\x03 \x01(\t\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t"o\n#RenameCustomSearchAttributeResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"a\n\x16\x44\x65leteNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"c\n\x17\x44\x65leteNamespaceResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"_\n\x1e\x46\x61iloverNamespaceRegionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"k\n\x1f\x46\x61iloverNamespaceRegionResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"t\n\x19\x41\x64\x64NamespaceRegionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"f\n\x1a\x41\x64\x64NamespaceRegionResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"w\n\x1c\x44\x65leteNamespaceRegionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"i\n\x1d\x44\x65leteNamespaceRegionResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x13\n\x11GetRegionsRequest"K\n\x12GetRegionsResponse\x12\x35\n\x07regions\x18\x01 \x03(\x0b\x32$.temporal.api.cloud.region.v1.Region""\n\x10GetRegionRequest\x12\x0e\n\x06region\x18\x01 \x01(\t"I\n\x11GetRegionResponse\x12\x34\n\x06region\x18\x01 \x01(\x0b\x32$.temporal.api.cloud.region.v1.Region"\xae\x01\n\x11GetApiKeysRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x10\n\x08owner_id\x18\x03 \x01(\t\x12!\n\x15owner_type_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12=\n\nowner_type\x18\x05 \x01(\x0e\x32).temporal.api.cloud.identity.v1.OwnerType"g\n\x12GetApiKeysResponse\x12\x38\n\x08\x61pi_keys\x18\x01 \x03(\x0b\x32&.temporal.api.cloud.identity.v1.ApiKey\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t""\n\x10GetApiKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t"L\n\x11GetApiKeyResponse\x12\x37\n\x07\x61pi_key\x18\x01 \x01(\x0b\x32&.temporal.api.cloud.identity.v1.ApiKey"k\n\x13\x43reateApiKeyRequest\x12\x38\n\x04spec\x18\x01 \x01(\x0b\x32*.temporal.api.cloud.identity.v1.ApiKeySpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"\x7f\n\x14\x43reateApiKeyResponse\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x95\x01\n\x13UpdateApiKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x38\n\x04spec\x18\x02 \x01(\x0b\x32*.temporal.api.cloud.identity.v1.ApiKeySpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"`\n\x14UpdateApiKeyResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"[\n\x13\x44\x65leteApiKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"`\n\x14\x44\x65leteApiKeyResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x87\x01\n\x18GetNexusEndpointsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x1b\n\x13target_namespace_id\x18\x03 \x01(\t\x12\x19\n\x11target_task_queue\x18\x04 \x01(\t\x12\x0c\n\x04name\x18\x05 \x01(\t"n\n\x19GetNexusEndpointsResponse\x12\x38\n\tendpoints\x18\x01 \x03(\x0b\x32%.temporal.api.cloud.nexus.v1.Endpoint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t".\n\x17GetNexusEndpointRequest\x12\x13\n\x0b\x65ndpoint_id\x18\x01 \x01(\t"S\n\x18GetNexusEndpointResponse\x12\x37\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32%.temporal.api.cloud.nexus.v1.Endpoint"q\n\x1a\x43reateNexusEndpointRequest\x12\x37\n\x04spec\x18\x01 \x01(\x0b\x32).temporal.api.cloud.nexus.v1.EndpointSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"|\n\x1b\x43reateNexusEndpointResponse\x12\x13\n\x0b\x65ndpoint_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xa0\x01\n\x1aUpdateNexusEndpointRequest\x12\x13\n\x0b\x65ndpoint_id\x18\x01 \x01(\t\x12\x37\n\x04spec\x18\x02 \x01(\x0b\x32).temporal.api.cloud.nexus.v1.EndpointSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"g\n\x1bUpdateNexusEndpointResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"g\n\x1a\x44\x65leteNexusEndpointRequest\x12\x13\n\x0b\x65ndpoint_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"g\n\x1b\x44\x65leteNexusEndpointResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xf5\x02\n\x14GetUserGroupsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12`\n\x0cgoogle_group\x18\x05 \x01(\x0b\x32J.temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter\x12\\\n\nscim_group\x18\x06 \x01(\x0b\x32H.temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter\x1a*\n\x11GoogleGroupFilter\x12\x15\n\remail_address\x18\x01 \x01(\t\x1a!\n\x0fSCIMGroupFilter\x12\x0e\n\x06idp_id\x18\x01 \x01(\t"k\n\x15GetUserGroupsResponse\x12\x39\n\x06groups\x18\x01 \x03(\x0b\x32).temporal.api.cloud.identity.v1.UserGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\'\n\x13GetUserGroupRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t"P\n\x14GetUserGroupResponse\x12\x38\n\x05group\x18\x01 \x01(\x0b\x32).temporal.api.cloud.identity.v1.UserGroup"q\n\x16\x43reateUserGroupRequest\x12;\n\x04spec\x18\x01 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.UserGroupSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"u\n\x17\x43reateUserGroupResponse\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x9d\x01\n\x16UpdateUserGroupRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12;\n\x04spec\x18\x02 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.UserGroupSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"c\n\x17UpdateUserGroupResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"`\n\x16\x44\x65leteUserGroupRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"c\n\x17\x44\x65leteUserGroupResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xc0\x01\n"SetUserGroupNamespaceAccessRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12?\n\x06\x61\x63\x63\x65ss\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t"o\n#SetUserGroupNamespaceAccessResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x8f\x01\n\x19\x41\x64\x64UserGroupMemberRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12\x44\n\tmember_id\x18\x02 \x01(\x0b\x32\x31.temporal.api.cloud.identity.v1.UserGroupMemberId\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"f\n\x1a\x41\x64\x64UserGroupMemberResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x92\x01\n\x1cRemoveUserGroupMemberRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12\x44\n\tmember_id\x18\x02 \x01(\x0b\x32\x31.temporal.api.cloud.identity.v1.UserGroupMemberId\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"i\n\x1dRemoveUserGroupMemberResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"U\n\x1aGetUserGroupMembersRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x10\n\x08group_id\x18\x03 \x01(\t"x\n\x1bGetUserGroupMembersResponse\x12@\n\x07members\x18\x01 \x03(\x0b\x32/.temporal.api.cloud.identity.v1.UserGroupMember\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"{\n\x1b\x43reateServiceAccountRequest\x12@\n\x04spec\x18\x01 \x01(\x0b\x32\x32.temporal.api.cloud.identity.v1.ServiceAccountSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"\x84\x01\n\x1c\x43reateServiceAccountResponse\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"6\n\x18GetServiceAccountRequest\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t"d\n\x19GetServiceAccountResponse\x12G\n\x0fservice_account\x18\x01 \x01(\x0b\x32..temporal.api.cloud.identity.v1.ServiceAccount"B\n\x19GetServiceAccountsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"~\n\x1aGetServiceAccountsResponse\x12G\n\x0fservice_account\x18\x01 \x03(\x0b\x32..temporal.api.cloud.identity.v1.ServiceAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb1\x01\n\x1bUpdateServiceAccountRequest\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t\x12@\n\x04spec\x18\x02 \x01(\x0b\x32\x32.temporal.api.cloud.identity.v1.ServiceAccountSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"h\n\x1cUpdateServiceAccountResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xcf\x01\n\'SetServiceAccountNamespaceAccessRequest\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12?\n\x06\x61\x63\x63\x65ss\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t"t\n(SetServiceAccountNamespaceAccessResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"o\n\x1b\x44\x65leteServiceAccountRequest\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"h\n\x1c\x44\x65leteServiceAccountResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xaa\x01\n\x0fGetUsageRequest\x12\x38\n\x14start_time_inclusive\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12\x65nd_time_exclusive\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"d\n\x10GetUsageResponse\x12\x37\n\tsummaries\x18\x01 \x03(\x0b\x32$.temporal.api.cloud.usage.v1.Summary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x13\n\x11GetAccountRequest"M\n\x12GetAccountResponse\x12\x37\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32&.temporal.api.cloud.account.v1.Account"\x86\x01\n\x14UpdateAccountRequest\x12\x38\n\x04spec\x18\x01 \x01(\x0b\x32*.temporal.api.cloud.account.v1.AccountSpec\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"a\n\x15UpdateAccountResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x90\x01\n CreateNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12=\n\x04spec\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ExportSinkSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"m\n!CreateNamespaceExportSinkResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"@\n\x1dGetNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t"[\n\x1eGetNamespaceExportSinkResponse\x12\x39\n\x04sink\x18\x01 \x01(\x0b\x32+.temporal.api.cloud.namespace.v1.ExportSink"Z\n\x1eGetNamespaceExportSinksRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"v\n\x1fGetNamespaceExportSinksResponse\x12:\n\x05sinks\x18\x01 \x03(\x0b\x32+.temporal.api.cloud.namespace.v1.ExportSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xaa\x01\n UpdateNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12=\n\x04spec\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ExportSinkSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"m\n!UpdateNamespaceExportSinkResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"y\n DeleteNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"m\n!DeleteNamespaceExportSinkResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"v\n"ValidateNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12=\n\x04spec\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ExportSinkSpec"%\n#ValidateNamespaceExportSinkResponse"\x82\x02\n\x1aUpdateNamespaceTagsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12h\n\x0etags_to_upsert\x18\x02 \x03(\x0b\x32P.temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest.TagsToUpsertEntry\x12\x16\n\x0etags_to_remove\x18\x03 \x03(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t\x1a\x33\n\x11TagsToUpsertEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"g\n\x1bUpdateNamespaceTagsResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x87\x01\n\x1d\x43reateConnectivityRuleRequest\x12J\n\x04spec\x18\x01 \x01(\x0b\x32<.temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"\x88\x01\n\x1e\x43reateConnectivityRuleResponse\x12\x1c\n\x14\x63onnectivity_rule_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation":\n\x1aGetConnectivityRuleRequest\x12\x1c\n\x14\x63onnectivity_rule_id\x18\x01 \x01(\t"r\n\x1bGetConnectivityRuleResponse\x12S\n\x11\x63onnectivity_rule\x18\x01 \x01(\x0b\x32\x38.temporal.api.cloud.connectivityrule.v1.ConnectivityRule"W\n\x1bGetConnectivityRulesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tnamespace\x18\x03 \x01(\t"\x8d\x01\n\x1cGetConnectivityRulesResponse\x12T\n\x12\x63onnectivity_rules\x18\x01 \x03(\x0b\x32\x38.temporal.api.cloud.connectivityrule.v1.ConnectivityRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"s\n\x1d\x44\x65leteConnectivityRuleRequest\x12\x1c\n\x14\x63onnectivity_rule_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"j\n\x1e\x44\x65leteConnectivityRuleResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"c\n"ValidateAccountAuditLogSinkRequest\x12=\n\x04spec\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.account.v1.AuditLogSinkSpec"%\n#ValidateAccountAuditLogSinkResponseB\xc8\x01\n%io.temporal.api.cloud.cloudservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/cloud/cloudservice/v1;cloudservice\xaa\x02$Temporalio.Api.Cloud.CloudService.V1\xea\x02(Temporalio::Api::Cloud::CloudService::V1b\x06proto3' -) - - -_GETUSERSREQUEST = DESCRIPTOR.message_types_by_name["GetUsersRequest"] -_GETUSERSRESPONSE = DESCRIPTOR.message_types_by_name["GetUsersResponse"] -_GETUSERREQUEST = DESCRIPTOR.message_types_by_name["GetUserRequest"] -_GETUSERRESPONSE = DESCRIPTOR.message_types_by_name["GetUserResponse"] -_CREATEUSERREQUEST = DESCRIPTOR.message_types_by_name["CreateUserRequest"] -_CREATEUSERRESPONSE = DESCRIPTOR.message_types_by_name["CreateUserResponse"] -_UPDATEUSERREQUEST = DESCRIPTOR.message_types_by_name["UpdateUserRequest"] -_UPDATEUSERRESPONSE = DESCRIPTOR.message_types_by_name["UpdateUserResponse"] -_DELETEUSERREQUEST = DESCRIPTOR.message_types_by_name["DeleteUserRequest"] -_DELETEUSERRESPONSE = DESCRIPTOR.message_types_by_name["DeleteUserResponse"] -_SETUSERNAMESPACEACCESSREQUEST = DESCRIPTOR.message_types_by_name[ - "SetUserNamespaceAccessRequest" -] -_SETUSERNAMESPACEACCESSRESPONSE = DESCRIPTOR.message_types_by_name[ - "SetUserNamespaceAccessResponse" -] -_GETASYNCOPERATIONREQUEST = DESCRIPTOR.message_types_by_name["GetAsyncOperationRequest"] -_GETASYNCOPERATIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetAsyncOperationResponse" -] -_CREATENAMESPACEREQUEST = DESCRIPTOR.message_types_by_name["CreateNamespaceRequest"] -_CREATENAMESPACEREQUEST_TAGSENTRY = _CREATENAMESPACEREQUEST.nested_types_by_name[ - "TagsEntry" -] -_CREATENAMESPACERESPONSE = DESCRIPTOR.message_types_by_name["CreateNamespaceResponse"] -_GETNAMESPACESREQUEST = DESCRIPTOR.message_types_by_name["GetNamespacesRequest"] -_GETNAMESPACESRESPONSE = DESCRIPTOR.message_types_by_name["GetNamespacesResponse"] -_GETNAMESPACEREQUEST = DESCRIPTOR.message_types_by_name["GetNamespaceRequest"] -_GETNAMESPACERESPONSE = DESCRIPTOR.message_types_by_name["GetNamespaceResponse"] -_UPDATENAMESPACEREQUEST = DESCRIPTOR.message_types_by_name["UpdateNamespaceRequest"] -_UPDATENAMESPACERESPONSE = DESCRIPTOR.message_types_by_name["UpdateNamespaceResponse"] -_RENAMECUSTOMSEARCHATTRIBUTEREQUEST = DESCRIPTOR.message_types_by_name[ - "RenameCustomSearchAttributeRequest" -] -_RENAMECUSTOMSEARCHATTRIBUTERESPONSE = DESCRIPTOR.message_types_by_name[ - "RenameCustomSearchAttributeResponse" -] -_DELETENAMESPACEREQUEST = DESCRIPTOR.message_types_by_name["DeleteNamespaceRequest"] -_DELETENAMESPACERESPONSE = DESCRIPTOR.message_types_by_name["DeleteNamespaceResponse"] -_FAILOVERNAMESPACEREGIONREQUEST = DESCRIPTOR.message_types_by_name[ - "FailoverNamespaceRegionRequest" -] -_FAILOVERNAMESPACEREGIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "FailoverNamespaceRegionResponse" -] -_ADDNAMESPACEREGIONREQUEST = DESCRIPTOR.message_types_by_name[ - "AddNamespaceRegionRequest" -] -_ADDNAMESPACEREGIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "AddNamespaceRegionResponse" -] -_DELETENAMESPACEREGIONREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteNamespaceRegionRequest" -] -_DELETENAMESPACEREGIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteNamespaceRegionResponse" -] -_GETREGIONSREQUEST = DESCRIPTOR.message_types_by_name["GetRegionsRequest"] -_GETREGIONSRESPONSE = DESCRIPTOR.message_types_by_name["GetRegionsResponse"] -_GETREGIONREQUEST = DESCRIPTOR.message_types_by_name["GetRegionRequest"] -_GETREGIONRESPONSE = DESCRIPTOR.message_types_by_name["GetRegionResponse"] -_GETAPIKEYSREQUEST = DESCRIPTOR.message_types_by_name["GetApiKeysRequest"] -_GETAPIKEYSRESPONSE = DESCRIPTOR.message_types_by_name["GetApiKeysResponse"] -_GETAPIKEYREQUEST = DESCRIPTOR.message_types_by_name["GetApiKeyRequest"] -_GETAPIKEYRESPONSE = DESCRIPTOR.message_types_by_name["GetApiKeyResponse"] -_CREATEAPIKEYREQUEST = DESCRIPTOR.message_types_by_name["CreateApiKeyRequest"] -_CREATEAPIKEYRESPONSE = DESCRIPTOR.message_types_by_name["CreateApiKeyResponse"] -_UPDATEAPIKEYREQUEST = DESCRIPTOR.message_types_by_name["UpdateApiKeyRequest"] -_UPDATEAPIKEYRESPONSE = DESCRIPTOR.message_types_by_name["UpdateApiKeyResponse"] -_DELETEAPIKEYREQUEST = DESCRIPTOR.message_types_by_name["DeleteApiKeyRequest"] -_DELETEAPIKEYRESPONSE = DESCRIPTOR.message_types_by_name["DeleteApiKeyResponse"] -_GETNEXUSENDPOINTSREQUEST = DESCRIPTOR.message_types_by_name["GetNexusEndpointsRequest"] -_GETNEXUSENDPOINTSRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetNexusEndpointsResponse" -] -_GETNEXUSENDPOINTREQUEST = DESCRIPTOR.message_types_by_name["GetNexusEndpointRequest"] -_GETNEXUSENDPOINTRESPONSE = DESCRIPTOR.message_types_by_name["GetNexusEndpointResponse"] -_CREATENEXUSENDPOINTREQUEST = DESCRIPTOR.message_types_by_name[ - "CreateNexusEndpointRequest" -] -_CREATENEXUSENDPOINTRESPONSE = DESCRIPTOR.message_types_by_name[ - "CreateNexusEndpointResponse" -] -_UPDATENEXUSENDPOINTREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateNexusEndpointRequest" -] -_UPDATENEXUSENDPOINTRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateNexusEndpointResponse" -] -_DELETENEXUSENDPOINTREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteNexusEndpointRequest" -] -_DELETENEXUSENDPOINTRESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteNexusEndpointResponse" -] -_GETUSERGROUPSREQUEST = DESCRIPTOR.message_types_by_name["GetUserGroupsRequest"] -_GETUSERGROUPSREQUEST_GOOGLEGROUPFILTER = _GETUSERGROUPSREQUEST.nested_types_by_name[ - "GoogleGroupFilter" -] -_GETUSERGROUPSREQUEST_SCIMGROUPFILTER = _GETUSERGROUPSREQUEST.nested_types_by_name[ - "SCIMGroupFilter" -] -_GETUSERGROUPSRESPONSE = DESCRIPTOR.message_types_by_name["GetUserGroupsResponse"] -_GETUSERGROUPREQUEST = DESCRIPTOR.message_types_by_name["GetUserGroupRequest"] -_GETUSERGROUPRESPONSE = DESCRIPTOR.message_types_by_name["GetUserGroupResponse"] -_CREATEUSERGROUPREQUEST = DESCRIPTOR.message_types_by_name["CreateUserGroupRequest"] -_CREATEUSERGROUPRESPONSE = DESCRIPTOR.message_types_by_name["CreateUserGroupResponse"] -_UPDATEUSERGROUPREQUEST = DESCRIPTOR.message_types_by_name["UpdateUserGroupRequest"] -_UPDATEUSERGROUPRESPONSE = DESCRIPTOR.message_types_by_name["UpdateUserGroupResponse"] -_DELETEUSERGROUPREQUEST = DESCRIPTOR.message_types_by_name["DeleteUserGroupRequest"] -_DELETEUSERGROUPRESPONSE = DESCRIPTOR.message_types_by_name["DeleteUserGroupResponse"] -_SETUSERGROUPNAMESPACEACCESSREQUEST = DESCRIPTOR.message_types_by_name[ - "SetUserGroupNamespaceAccessRequest" -] -_SETUSERGROUPNAMESPACEACCESSRESPONSE = DESCRIPTOR.message_types_by_name[ - "SetUserGroupNamespaceAccessResponse" -] -_ADDUSERGROUPMEMBERREQUEST = DESCRIPTOR.message_types_by_name[ - "AddUserGroupMemberRequest" -] -_ADDUSERGROUPMEMBERRESPONSE = DESCRIPTOR.message_types_by_name[ - "AddUserGroupMemberResponse" -] -_REMOVEUSERGROUPMEMBERREQUEST = DESCRIPTOR.message_types_by_name[ - "RemoveUserGroupMemberRequest" -] -_REMOVEUSERGROUPMEMBERRESPONSE = DESCRIPTOR.message_types_by_name[ - "RemoveUserGroupMemberResponse" -] -_GETUSERGROUPMEMBERSREQUEST = DESCRIPTOR.message_types_by_name[ - "GetUserGroupMembersRequest" -] -_GETUSERGROUPMEMBERSRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetUserGroupMembersResponse" -] -_CREATESERVICEACCOUNTREQUEST = DESCRIPTOR.message_types_by_name[ - "CreateServiceAccountRequest" -] -_CREATESERVICEACCOUNTRESPONSE = DESCRIPTOR.message_types_by_name[ - "CreateServiceAccountResponse" -] -_GETSERVICEACCOUNTREQUEST = DESCRIPTOR.message_types_by_name["GetServiceAccountRequest"] -_GETSERVICEACCOUNTRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetServiceAccountResponse" -] -_GETSERVICEACCOUNTSREQUEST = DESCRIPTOR.message_types_by_name[ - "GetServiceAccountsRequest" -] -_GETSERVICEACCOUNTSRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetServiceAccountsResponse" -] -_UPDATESERVICEACCOUNTREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateServiceAccountRequest" -] -_UPDATESERVICEACCOUNTRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateServiceAccountResponse" -] -_SETSERVICEACCOUNTNAMESPACEACCESSREQUEST = DESCRIPTOR.message_types_by_name[ - "SetServiceAccountNamespaceAccessRequest" -] -_SETSERVICEACCOUNTNAMESPACEACCESSRESPONSE = DESCRIPTOR.message_types_by_name[ - "SetServiceAccountNamespaceAccessResponse" -] -_DELETESERVICEACCOUNTREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteServiceAccountRequest" -] -_DELETESERVICEACCOUNTRESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteServiceAccountResponse" -] -_GETUSAGEREQUEST = DESCRIPTOR.message_types_by_name["GetUsageRequest"] -_GETUSAGERESPONSE = DESCRIPTOR.message_types_by_name["GetUsageResponse"] -_GETACCOUNTREQUEST = DESCRIPTOR.message_types_by_name["GetAccountRequest"] -_GETACCOUNTRESPONSE = DESCRIPTOR.message_types_by_name["GetAccountResponse"] -_UPDATEACCOUNTREQUEST = DESCRIPTOR.message_types_by_name["UpdateAccountRequest"] -_UPDATEACCOUNTRESPONSE = DESCRIPTOR.message_types_by_name["UpdateAccountResponse"] -_CREATENAMESPACEEXPORTSINKREQUEST = DESCRIPTOR.message_types_by_name[ - "CreateNamespaceExportSinkRequest" -] -_CREATENAMESPACEEXPORTSINKRESPONSE = DESCRIPTOR.message_types_by_name[ - "CreateNamespaceExportSinkResponse" -] -_GETNAMESPACEEXPORTSINKREQUEST = DESCRIPTOR.message_types_by_name[ - "GetNamespaceExportSinkRequest" -] -_GETNAMESPACEEXPORTSINKRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetNamespaceExportSinkResponse" -] -_GETNAMESPACEEXPORTSINKSREQUEST = DESCRIPTOR.message_types_by_name[ - "GetNamespaceExportSinksRequest" -] -_GETNAMESPACEEXPORTSINKSRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetNamespaceExportSinksResponse" -] -_UPDATENAMESPACEEXPORTSINKREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateNamespaceExportSinkRequest" -] -_UPDATENAMESPACEEXPORTSINKRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateNamespaceExportSinkResponse" -] -_DELETENAMESPACEEXPORTSINKREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteNamespaceExportSinkRequest" -] -_DELETENAMESPACEEXPORTSINKRESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteNamespaceExportSinkResponse" -] -_VALIDATENAMESPACEEXPORTSINKREQUEST = DESCRIPTOR.message_types_by_name[ - "ValidateNamespaceExportSinkRequest" -] -_VALIDATENAMESPACEEXPORTSINKRESPONSE = DESCRIPTOR.message_types_by_name[ - "ValidateNamespaceExportSinkResponse" -] -_UPDATENAMESPACETAGSREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateNamespaceTagsRequest" -] -_UPDATENAMESPACETAGSREQUEST_TAGSTOUPSERTENTRY = ( - _UPDATENAMESPACETAGSREQUEST.nested_types_by_name["TagsToUpsertEntry"] -) -_UPDATENAMESPACETAGSRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateNamespaceTagsResponse" -] -_CREATECONNECTIVITYRULEREQUEST = DESCRIPTOR.message_types_by_name[ - "CreateConnectivityRuleRequest" -] -_CREATECONNECTIVITYRULERESPONSE = DESCRIPTOR.message_types_by_name[ - "CreateConnectivityRuleResponse" -] -_GETCONNECTIVITYRULEREQUEST = DESCRIPTOR.message_types_by_name[ - "GetConnectivityRuleRequest" -] -_GETCONNECTIVITYRULERESPONSE = DESCRIPTOR.message_types_by_name[ - "GetConnectivityRuleResponse" -] -_GETCONNECTIVITYRULESREQUEST = DESCRIPTOR.message_types_by_name[ - "GetConnectivityRulesRequest" -] -_GETCONNECTIVITYRULESRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetConnectivityRulesResponse" -] -_DELETECONNECTIVITYRULEREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteConnectivityRuleRequest" -] -_DELETECONNECTIVITYRULERESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteConnectivityRuleResponse" -] -_VALIDATEACCOUNTAUDITLOGSINKREQUEST = DESCRIPTOR.message_types_by_name[ - "ValidateAccountAuditLogSinkRequest" -] -_VALIDATEACCOUNTAUDITLOGSINKRESPONSE = DESCRIPTOR.message_types_by_name[ - "ValidateAccountAuditLogSinkResponse" -] -GetUsersRequest = _reflection.GeneratedProtocolMessageType( - "GetUsersRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUsersRequest) - }, -) -_sym_db.RegisterMessage(GetUsersRequest) - -GetUsersResponse = _reflection.GeneratedProtocolMessageType( - "GetUsersResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUsersResponse) - }, -) -_sym_db.RegisterMessage(GetUsersResponse) - -GetUserRequest = _reflection.GeneratedProtocolMessageType( - "GetUserRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserRequest) - }, -) -_sym_db.RegisterMessage(GetUserRequest) - -GetUserResponse = _reflection.GeneratedProtocolMessageType( - "GetUserResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserResponse) - }, -) -_sym_db.RegisterMessage(GetUserResponse) - -CreateUserRequest = _reflection.GeneratedProtocolMessageType( - "CreateUserRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATEUSERREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateUserRequest) - }, -) -_sym_db.RegisterMessage(CreateUserRequest) - -CreateUserResponse = _reflection.GeneratedProtocolMessageType( - "CreateUserResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATEUSERRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateUserResponse) - }, -) -_sym_db.RegisterMessage(CreateUserResponse) - -UpdateUserRequest = _reflection.GeneratedProtocolMessageType( - "UpdateUserRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEUSERREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateUserRequest) - }, -) -_sym_db.RegisterMessage(UpdateUserRequest) - -UpdateUserResponse = _reflection.GeneratedProtocolMessageType( - "UpdateUserResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEUSERRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateUserResponse) - }, -) -_sym_db.RegisterMessage(UpdateUserResponse) - -DeleteUserRequest = _reflection.GeneratedProtocolMessageType( - "DeleteUserRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETEUSERREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteUserRequest) - }, -) -_sym_db.RegisterMessage(DeleteUserRequest) - -DeleteUserResponse = _reflection.GeneratedProtocolMessageType( - "DeleteUserResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETEUSERRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteUserResponse) - }, -) -_sym_db.RegisterMessage(DeleteUserResponse) - -SetUserNamespaceAccessRequest = _reflection.GeneratedProtocolMessageType( - "SetUserNamespaceAccessRequest", - (_message.Message,), - { - "DESCRIPTOR": _SETUSERNAMESPACEACCESSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest) - }, -) -_sym_db.RegisterMessage(SetUserNamespaceAccessRequest) - -SetUserNamespaceAccessResponse = _reflection.GeneratedProtocolMessageType( - "SetUserNamespaceAccessResponse", - (_message.Message,), - { - "DESCRIPTOR": _SETUSERNAMESPACEACCESSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse) - }, -) -_sym_db.RegisterMessage(SetUserNamespaceAccessResponse) - -GetAsyncOperationRequest = _reflection.GeneratedProtocolMessageType( - "GetAsyncOperationRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETASYNCOPERATIONREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest) - }, -) -_sym_db.RegisterMessage(GetAsyncOperationRequest) - -GetAsyncOperationResponse = _reflection.GeneratedProtocolMessageType( - "GetAsyncOperationResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETASYNCOPERATIONRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse) - }, -) -_sym_db.RegisterMessage(GetAsyncOperationResponse) - -CreateNamespaceRequest = _reflection.GeneratedProtocolMessageType( - "CreateNamespaceRequest", - (_message.Message,), - { - "TagsEntry": _reflection.GeneratedProtocolMessageType( - "TagsEntry", - (_message.Message,), - { - "DESCRIPTOR": _CREATENAMESPACEREQUEST_TAGSENTRY, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest.TagsEntry) - }, - ), - "DESCRIPTOR": _CREATENAMESPACEREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest) - }, -) -_sym_db.RegisterMessage(CreateNamespaceRequest) -_sym_db.RegisterMessage(CreateNamespaceRequest.TagsEntry) - -CreateNamespaceResponse = _reflection.GeneratedProtocolMessageType( - "CreateNamespaceResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATENAMESPACERESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse) - }, -) -_sym_db.RegisterMessage(CreateNamespaceResponse) - -GetNamespacesRequest = _reflection.GeneratedProtocolMessageType( - "GetNamespacesRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETNAMESPACESREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNamespacesRequest) - }, -) -_sym_db.RegisterMessage(GetNamespacesRequest) - -GetNamespacesResponse = _reflection.GeneratedProtocolMessageType( - "GetNamespacesResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETNAMESPACESRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNamespacesResponse) - }, -) -_sym_db.RegisterMessage(GetNamespacesResponse) - -GetNamespaceRequest = _reflection.GeneratedProtocolMessageType( - "GetNamespaceRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETNAMESPACEREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNamespaceRequest) - }, -) -_sym_db.RegisterMessage(GetNamespaceRequest) - -GetNamespaceResponse = _reflection.GeneratedProtocolMessageType( - "GetNamespaceResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETNAMESPACERESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNamespaceResponse) - }, -) -_sym_db.RegisterMessage(GetNamespaceResponse) - -UpdateNamespaceRequest = _reflection.GeneratedProtocolMessageType( - "UpdateNamespaceRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENAMESPACEREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest) - }, -) -_sym_db.RegisterMessage(UpdateNamespaceRequest) - -UpdateNamespaceResponse = _reflection.GeneratedProtocolMessageType( - "UpdateNamespaceResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENAMESPACERESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse) - }, -) -_sym_db.RegisterMessage(UpdateNamespaceResponse) - -RenameCustomSearchAttributeRequest = _reflection.GeneratedProtocolMessageType( - "RenameCustomSearchAttributeRequest", - (_message.Message,), - { - "DESCRIPTOR": _RENAMECUSTOMSEARCHATTRIBUTEREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest) - }, -) -_sym_db.RegisterMessage(RenameCustomSearchAttributeRequest) - -RenameCustomSearchAttributeResponse = _reflection.GeneratedProtocolMessageType( - "RenameCustomSearchAttributeResponse", - (_message.Message,), - { - "DESCRIPTOR": _RENAMECUSTOMSEARCHATTRIBUTERESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse) - }, -) -_sym_db.RegisterMessage(RenameCustomSearchAttributeResponse) - -DeleteNamespaceRequest = _reflection.GeneratedProtocolMessageType( - "DeleteNamespaceRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETENAMESPACEREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteNamespaceRequest) - }, -) -_sym_db.RegisterMessage(DeleteNamespaceRequest) - -DeleteNamespaceResponse = _reflection.GeneratedProtocolMessageType( - "DeleteNamespaceResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETENAMESPACERESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteNamespaceResponse) - }, -) -_sym_db.RegisterMessage(DeleteNamespaceResponse) - -FailoverNamespaceRegionRequest = _reflection.GeneratedProtocolMessageType( - "FailoverNamespaceRegionRequest", - (_message.Message,), - { - "DESCRIPTOR": _FAILOVERNAMESPACEREGIONREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionRequest) - }, -) -_sym_db.RegisterMessage(FailoverNamespaceRegionRequest) - -FailoverNamespaceRegionResponse = _reflection.GeneratedProtocolMessageType( - "FailoverNamespaceRegionResponse", - (_message.Message,), - { - "DESCRIPTOR": _FAILOVERNAMESPACEREGIONRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.FailoverNamespaceRegionResponse) - }, -) -_sym_db.RegisterMessage(FailoverNamespaceRegionResponse) - -AddNamespaceRegionRequest = _reflection.GeneratedProtocolMessageType( - "AddNamespaceRegionRequest", - (_message.Message,), - { - "DESCRIPTOR": _ADDNAMESPACEREGIONREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.AddNamespaceRegionRequest) - }, -) -_sym_db.RegisterMessage(AddNamespaceRegionRequest) - -AddNamespaceRegionResponse = _reflection.GeneratedProtocolMessageType( - "AddNamespaceRegionResponse", - (_message.Message,), - { - "DESCRIPTOR": _ADDNAMESPACEREGIONRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse) - }, -) -_sym_db.RegisterMessage(AddNamespaceRegionResponse) - -DeleteNamespaceRegionRequest = _reflection.GeneratedProtocolMessageType( - "DeleteNamespaceRegionRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETENAMESPACEREGIONREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest) - }, -) -_sym_db.RegisterMessage(DeleteNamespaceRegionRequest) - -DeleteNamespaceRegionResponse = _reflection.GeneratedProtocolMessageType( - "DeleteNamespaceRegionResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETENAMESPACEREGIONRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse) - }, -) -_sym_db.RegisterMessage(DeleteNamespaceRegionResponse) - -GetRegionsRequest = _reflection.GeneratedProtocolMessageType( - "GetRegionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETREGIONSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetRegionsRequest) - }, -) -_sym_db.RegisterMessage(GetRegionsRequest) - -GetRegionsResponse = _reflection.GeneratedProtocolMessageType( - "GetRegionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETREGIONSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetRegionsResponse) - }, -) -_sym_db.RegisterMessage(GetRegionsResponse) - -GetRegionRequest = _reflection.GeneratedProtocolMessageType( - "GetRegionRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETREGIONREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetRegionRequest) - }, -) -_sym_db.RegisterMessage(GetRegionRequest) - -GetRegionResponse = _reflection.GeneratedProtocolMessageType( - "GetRegionResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETREGIONRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetRegionResponse) - }, -) -_sym_db.RegisterMessage(GetRegionResponse) - -GetApiKeysRequest = _reflection.GeneratedProtocolMessageType( - "GetApiKeysRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETAPIKEYSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetApiKeysRequest) - }, -) -_sym_db.RegisterMessage(GetApiKeysRequest) - -GetApiKeysResponse = _reflection.GeneratedProtocolMessageType( - "GetApiKeysResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETAPIKEYSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetApiKeysResponse) - }, -) -_sym_db.RegisterMessage(GetApiKeysResponse) - -GetApiKeyRequest = _reflection.GeneratedProtocolMessageType( - "GetApiKeyRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETAPIKEYREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetApiKeyRequest) - }, -) -_sym_db.RegisterMessage(GetApiKeyRequest) - -GetApiKeyResponse = _reflection.GeneratedProtocolMessageType( - "GetApiKeyResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETAPIKEYRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetApiKeyResponse) - }, -) -_sym_db.RegisterMessage(GetApiKeyResponse) - -CreateApiKeyRequest = _reflection.GeneratedProtocolMessageType( - "CreateApiKeyRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATEAPIKEYREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest) - }, -) -_sym_db.RegisterMessage(CreateApiKeyRequest) - -CreateApiKeyResponse = _reflection.GeneratedProtocolMessageType( - "CreateApiKeyResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATEAPIKEYRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse) - }, -) -_sym_db.RegisterMessage(CreateApiKeyResponse) - -UpdateApiKeyRequest = _reflection.GeneratedProtocolMessageType( - "UpdateApiKeyRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEAPIKEYREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest) - }, -) -_sym_db.RegisterMessage(UpdateApiKeyRequest) - -UpdateApiKeyResponse = _reflection.GeneratedProtocolMessageType( - "UpdateApiKeyResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEAPIKEYRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse) - }, -) -_sym_db.RegisterMessage(UpdateApiKeyResponse) - -DeleteApiKeyRequest = _reflection.GeneratedProtocolMessageType( - "DeleteApiKeyRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETEAPIKEYREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest) - }, -) -_sym_db.RegisterMessage(DeleteApiKeyRequest) - -DeleteApiKeyResponse = _reflection.GeneratedProtocolMessageType( - "DeleteApiKeyResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETEAPIKEYRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse) - }, -) -_sym_db.RegisterMessage(DeleteApiKeyResponse) - -GetNexusEndpointsRequest = _reflection.GeneratedProtocolMessageType( - "GetNexusEndpointsRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETNEXUSENDPOINTSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest) - }, -) -_sym_db.RegisterMessage(GetNexusEndpointsRequest) - -GetNexusEndpointsResponse = _reflection.GeneratedProtocolMessageType( - "GetNexusEndpointsResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETNEXUSENDPOINTSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse) - }, -) -_sym_db.RegisterMessage(GetNexusEndpointsResponse) - -GetNexusEndpointRequest = _reflection.GeneratedProtocolMessageType( - "GetNexusEndpointRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETNEXUSENDPOINTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest) - }, -) -_sym_db.RegisterMessage(GetNexusEndpointRequest) - -GetNexusEndpointResponse = _reflection.GeneratedProtocolMessageType( - "GetNexusEndpointResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETNEXUSENDPOINTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse) - }, -) -_sym_db.RegisterMessage(GetNexusEndpointResponse) - -CreateNexusEndpointRequest = _reflection.GeneratedProtocolMessageType( - "CreateNexusEndpointRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATENEXUSENDPOINTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest) - }, -) -_sym_db.RegisterMessage(CreateNexusEndpointRequest) - -CreateNexusEndpointResponse = _reflection.GeneratedProtocolMessageType( - "CreateNexusEndpointResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATENEXUSENDPOINTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse) - }, -) -_sym_db.RegisterMessage(CreateNexusEndpointResponse) - -UpdateNexusEndpointRequest = _reflection.GeneratedProtocolMessageType( - "UpdateNexusEndpointRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENEXUSENDPOINTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest) - }, -) -_sym_db.RegisterMessage(UpdateNexusEndpointRequest) - -UpdateNexusEndpointResponse = _reflection.GeneratedProtocolMessageType( - "UpdateNexusEndpointResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENEXUSENDPOINTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse) - }, -) -_sym_db.RegisterMessage(UpdateNexusEndpointResponse) - -DeleteNexusEndpointRequest = _reflection.GeneratedProtocolMessageType( - "DeleteNexusEndpointRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETENEXUSENDPOINTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest) - }, -) -_sym_db.RegisterMessage(DeleteNexusEndpointRequest) - -DeleteNexusEndpointResponse = _reflection.GeneratedProtocolMessageType( - "DeleteNexusEndpointResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETENEXUSENDPOINTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse) - }, -) -_sym_db.RegisterMessage(DeleteNexusEndpointResponse) - -GetUserGroupsRequest = _reflection.GeneratedProtocolMessageType( - "GetUserGroupsRequest", - (_message.Message,), - { - "GoogleGroupFilter": _reflection.GeneratedProtocolMessageType( - "GoogleGroupFilter", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERGROUPSREQUEST_GOOGLEGROUPFILTER, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter) - }, - ), - "SCIMGroupFilter": _reflection.GeneratedProtocolMessageType( - "SCIMGroupFilter", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERGROUPSREQUEST_SCIMGROUPFILTER, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter) - }, - ), - "DESCRIPTOR": _GETUSERGROUPSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest) - }, -) -_sym_db.RegisterMessage(GetUserGroupsRequest) -_sym_db.RegisterMessage(GetUserGroupsRequest.GoogleGroupFilter) -_sym_db.RegisterMessage(GetUserGroupsRequest.SCIMGroupFilter) - -GetUserGroupsResponse = _reflection.GeneratedProtocolMessageType( - "GetUserGroupsResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERGROUPSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse) - }, -) -_sym_db.RegisterMessage(GetUserGroupsResponse) - -GetUserGroupRequest = _reflection.GeneratedProtocolMessageType( - "GetUserGroupRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERGROUPREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserGroupRequest) - }, -) -_sym_db.RegisterMessage(GetUserGroupRequest) - -GetUserGroupResponse = _reflection.GeneratedProtocolMessageType( - "GetUserGroupResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERGROUPRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserGroupResponse) - }, -) -_sym_db.RegisterMessage(GetUserGroupResponse) - -CreateUserGroupRequest = _reflection.GeneratedProtocolMessageType( - "CreateUserGroupRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATEUSERGROUPREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest) - }, -) -_sym_db.RegisterMessage(CreateUserGroupRequest) - -CreateUserGroupResponse = _reflection.GeneratedProtocolMessageType( - "CreateUserGroupResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATEUSERGROUPRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse) - }, -) -_sym_db.RegisterMessage(CreateUserGroupResponse) - -UpdateUserGroupRequest = _reflection.GeneratedProtocolMessageType( - "UpdateUserGroupRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEUSERGROUPREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest) - }, -) -_sym_db.RegisterMessage(UpdateUserGroupRequest) - -UpdateUserGroupResponse = _reflection.GeneratedProtocolMessageType( - "UpdateUserGroupResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEUSERGROUPRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse) - }, -) -_sym_db.RegisterMessage(UpdateUserGroupResponse) - -DeleteUserGroupRequest = _reflection.GeneratedProtocolMessageType( - "DeleteUserGroupRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETEUSERGROUPREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest) - }, -) -_sym_db.RegisterMessage(DeleteUserGroupRequest) - -DeleteUserGroupResponse = _reflection.GeneratedProtocolMessageType( - "DeleteUserGroupResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETEUSERGROUPRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse) - }, -) -_sym_db.RegisterMessage(DeleteUserGroupResponse) - -SetUserGroupNamespaceAccessRequest = _reflection.GeneratedProtocolMessageType( - "SetUserGroupNamespaceAccessRequest", - (_message.Message,), - { - "DESCRIPTOR": _SETUSERGROUPNAMESPACEACCESSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest) - }, -) -_sym_db.RegisterMessage(SetUserGroupNamespaceAccessRequest) - -SetUserGroupNamespaceAccessResponse = _reflection.GeneratedProtocolMessageType( - "SetUserGroupNamespaceAccessResponse", - (_message.Message,), - { - "DESCRIPTOR": _SETUSERGROUPNAMESPACEACCESSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse) - }, -) -_sym_db.RegisterMessage(SetUserGroupNamespaceAccessResponse) - -AddUserGroupMemberRequest = _reflection.GeneratedProtocolMessageType( - "AddUserGroupMemberRequest", - (_message.Message,), - { - "DESCRIPTOR": _ADDUSERGROUPMEMBERREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest) - }, -) -_sym_db.RegisterMessage(AddUserGroupMemberRequest) - -AddUserGroupMemberResponse = _reflection.GeneratedProtocolMessageType( - "AddUserGroupMemberResponse", - (_message.Message,), - { - "DESCRIPTOR": _ADDUSERGROUPMEMBERRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse) - }, -) -_sym_db.RegisterMessage(AddUserGroupMemberResponse) - -RemoveUserGroupMemberRequest = _reflection.GeneratedProtocolMessageType( - "RemoveUserGroupMemberRequest", - (_message.Message,), - { - "DESCRIPTOR": _REMOVEUSERGROUPMEMBERREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest) - }, -) -_sym_db.RegisterMessage(RemoveUserGroupMemberRequest) - -RemoveUserGroupMemberResponse = _reflection.GeneratedProtocolMessageType( - "RemoveUserGroupMemberResponse", - (_message.Message,), - { - "DESCRIPTOR": _REMOVEUSERGROUPMEMBERRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse) - }, -) -_sym_db.RegisterMessage(RemoveUserGroupMemberResponse) - -GetUserGroupMembersRequest = _reflection.GeneratedProtocolMessageType( - "GetUserGroupMembersRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERGROUPMEMBERSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest) - }, -) -_sym_db.RegisterMessage(GetUserGroupMembersRequest) - -GetUserGroupMembersResponse = _reflection.GeneratedProtocolMessageType( - "GetUserGroupMembersResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETUSERGROUPMEMBERSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse) - }, -) -_sym_db.RegisterMessage(GetUserGroupMembersResponse) - -CreateServiceAccountRequest = _reflection.GeneratedProtocolMessageType( - "CreateServiceAccountRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATESERVICEACCOUNTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest) - }, -) -_sym_db.RegisterMessage(CreateServiceAccountRequest) - -CreateServiceAccountResponse = _reflection.GeneratedProtocolMessageType( - "CreateServiceAccountResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATESERVICEACCOUNTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse) - }, -) -_sym_db.RegisterMessage(CreateServiceAccountResponse) - -GetServiceAccountRequest = _reflection.GeneratedProtocolMessageType( - "GetServiceAccountRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETSERVICEACCOUNTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest) - }, -) -_sym_db.RegisterMessage(GetServiceAccountRequest) - -GetServiceAccountResponse = _reflection.GeneratedProtocolMessageType( - "GetServiceAccountResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETSERVICEACCOUNTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse) - }, -) -_sym_db.RegisterMessage(GetServiceAccountResponse) - -GetServiceAccountsRequest = _reflection.GeneratedProtocolMessageType( - "GetServiceAccountsRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETSERVICEACCOUNTSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest) - }, -) -_sym_db.RegisterMessage(GetServiceAccountsRequest) - -GetServiceAccountsResponse = _reflection.GeneratedProtocolMessageType( - "GetServiceAccountsResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETSERVICEACCOUNTSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse) - }, -) -_sym_db.RegisterMessage(GetServiceAccountsResponse) - -UpdateServiceAccountRequest = _reflection.GeneratedProtocolMessageType( - "UpdateServiceAccountRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATESERVICEACCOUNTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest) - }, -) -_sym_db.RegisterMessage(UpdateServiceAccountRequest) - -UpdateServiceAccountResponse = _reflection.GeneratedProtocolMessageType( - "UpdateServiceAccountResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATESERVICEACCOUNTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse) - }, -) -_sym_db.RegisterMessage(UpdateServiceAccountResponse) - -SetServiceAccountNamespaceAccessRequest = _reflection.GeneratedProtocolMessageType( - "SetServiceAccountNamespaceAccessRequest", - (_message.Message,), - { - "DESCRIPTOR": _SETSERVICEACCOUNTNAMESPACEACCESSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest) - }, -) -_sym_db.RegisterMessage(SetServiceAccountNamespaceAccessRequest) - -SetServiceAccountNamespaceAccessResponse = _reflection.GeneratedProtocolMessageType( - "SetServiceAccountNamespaceAccessResponse", - (_message.Message,), - { - "DESCRIPTOR": _SETSERVICEACCOUNTNAMESPACEACCESSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse) - }, -) -_sym_db.RegisterMessage(SetServiceAccountNamespaceAccessResponse) - -DeleteServiceAccountRequest = _reflection.GeneratedProtocolMessageType( - "DeleteServiceAccountRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETESERVICEACCOUNTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest) - }, -) -_sym_db.RegisterMessage(DeleteServiceAccountRequest) - -DeleteServiceAccountResponse = _reflection.GeneratedProtocolMessageType( - "DeleteServiceAccountResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETESERVICEACCOUNTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse) - }, -) -_sym_db.RegisterMessage(DeleteServiceAccountResponse) - -GetUsageRequest = _reflection.GeneratedProtocolMessageType( - "GetUsageRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETUSAGEREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUsageRequest) - }, -) -_sym_db.RegisterMessage(GetUsageRequest) - -GetUsageResponse = _reflection.GeneratedProtocolMessageType( - "GetUsageResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETUSAGERESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetUsageResponse) - }, -) -_sym_db.RegisterMessage(GetUsageResponse) - -GetAccountRequest = _reflection.GeneratedProtocolMessageType( - "GetAccountRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETACCOUNTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetAccountRequest) - }, -) -_sym_db.RegisterMessage(GetAccountRequest) - -GetAccountResponse = _reflection.GeneratedProtocolMessageType( - "GetAccountResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETACCOUNTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetAccountResponse) - }, -) -_sym_db.RegisterMessage(GetAccountResponse) - -UpdateAccountRequest = _reflection.GeneratedProtocolMessageType( - "UpdateAccountRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEACCOUNTREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateAccountRequest) - }, -) -_sym_db.RegisterMessage(UpdateAccountRequest) - -UpdateAccountResponse = _reflection.GeneratedProtocolMessageType( - "UpdateAccountResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEACCOUNTRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateAccountResponse) - }, -) -_sym_db.RegisterMessage(UpdateAccountResponse) - -CreateNamespaceExportSinkRequest = _reflection.GeneratedProtocolMessageType( - "CreateNamespaceExportSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATENAMESPACEEXPORTSINKREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest) - }, -) -_sym_db.RegisterMessage(CreateNamespaceExportSinkRequest) - -CreateNamespaceExportSinkResponse = _reflection.GeneratedProtocolMessageType( - "CreateNamespaceExportSinkResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATENAMESPACEEXPORTSINKRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse) - }, -) -_sym_db.RegisterMessage(CreateNamespaceExportSinkResponse) - -GetNamespaceExportSinkRequest = _reflection.GeneratedProtocolMessageType( - "GetNamespaceExportSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETNAMESPACEEXPORTSINKREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest) - }, -) -_sym_db.RegisterMessage(GetNamespaceExportSinkRequest) - -GetNamespaceExportSinkResponse = _reflection.GeneratedProtocolMessageType( - "GetNamespaceExportSinkResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETNAMESPACEEXPORTSINKRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse) - }, -) -_sym_db.RegisterMessage(GetNamespaceExportSinkResponse) - -GetNamespaceExportSinksRequest = _reflection.GeneratedProtocolMessageType( - "GetNamespaceExportSinksRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETNAMESPACEEXPORTSINKSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest) - }, -) -_sym_db.RegisterMessage(GetNamespaceExportSinksRequest) - -GetNamespaceExportSinksResponse = _reflection.GeneratedProtocolMessageType( - "GetNamespaceExportSinksResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETNAMESPACEEXPORTSINKSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse) - }, -) -_sym_db.RegisterMessage(GetNamespaceExportSinksResponse) - -UpdateNamespaceExportSinkRequest = _reflection.GeneratedProtocolMessageType( - "UpdateNamespaceExportSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENAMESPACEEXPORTSINKREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest) - }, -) -_sym_db.RegisterMessage(UpdateNamespaceExportSinkRequest) - -UpdateNamespaceExportSinkResponse = _reflection.GeneratedProtocolMessageType( - "UpdateNamespaceExportSinkResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENAMESPACEEXPORTSINKRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse) - }, -) -_sym_db.RegisterMessage(UpdateNamespaceExportSinkResponse) - -DeleteNamespaceExportSinkRequest = _reflection.GeneratedProtocolMessageType( - "DeleteNamespaceExportSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETENAMESPACEEXPORTSINKREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest) - }, -) -_sym_db.RegisterMessage(DeleteNamespaceExportSinkRequest) - -DeleteNamespaceExportSinkResponse = _reflection.GeneratedProtocolMessageType( - "DeleteNamespaceExportSinkResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETENAMESPACEEXPORTSINKRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse) - }, -) -_sym_db.RegisterMessage(DeleteNamespaceExportSinkResponse) - -ValidateNamespaceExportSinkRequest = _reflection.GeneratedProtocolMessageType( - "ValidateNamespaceExportSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _VALIDATENAMESPACEEXPORTSINKREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest) - }, -) -_sym_db.RegisterMessage(ValidateNamespaceExportSinkRequest) - -ValidateNamespaceExportSinkResponse = _reflection.GeneratedProtocolMessageType( - "ValidateNamespaceExportSinkResponse", - (_message.Message,), - { - "DESCRIPTOR": _VALIDATENAMESPACEEXPORTSINKRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse) - }, -) -_sym_db.RegisterMessage(ValidateNamespaceExportSinkResponse) - -UpdateNamespaceTagsRequest = _reflection.GeneratedProtocolMessageType( - "UpdateNamespaceTagsRequest", - (_message.Message,), - { - "TagsToUpsertEntry": _reflection.GeneratedProtocolMessageType( - "TagsToUpsertEntry", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENAMESPACETAGSREQUEST_TAGSTOUPSERTENTRY, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest.TagsToUpsertEntry) - }, - ), - "DESCRIPTOR": _UPDATENAMESPACETAGSREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest) - }, -) -_sym_db.RegisterMessage(UpdateNamespaceTagsRequest) -_sym_db.RegisterMessage(UpdateNamespaceTagsRequest.TagsToUpsertEntry) - -UpdateNamespaceTagsResponse = _reflection.GeneratedProtocolMessageType( - "UpdateNamespaceTagsResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENAMESPACETAGSRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse) - }, -) -_sym_db.RegisterMessage(UpdateNamespaceTagsResponse) - -CreateConnectivityRuleRequest = _reflection.GeneratedProtocolMessageType( - "CreateConnectivityRuleRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATECONNECTIVITYRULEREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest) - }, -) -_sym_db.RegisterMessage(CreateConnectivityRuleRequest) - -CreateConnectivityRuleResponse = _reflection.GeneratedProtocolMessageType( - "CreateConnectivityRuleResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATECONNECTIVITYRULERESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse) - }, -) -_sym_db.RegisterMessage(CreateConnectivityRuleResponse) - -GetConnectivityRuleRequest = _reflection.GeneratedProtocolMessageType( - "GetConnectivityRuleRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETCONNECTIVITYRULEREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest) - }, -) -_sym_db.RegisterMessage(GetConnectivityRuleRequest) - -GetConnectivityRuleResponse = _reflection.GeneratedProtocolMessageType( - "GetConnectivityRuleResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETCONNECTIVITYRULERESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse) - }, -) -_sym_db.RegisterMessage(GetConnectivityRuleResponse) - -GetConnectivityRulesRequest = _reflection.GeneratedProtocolMessageType( - "GetConnectivityRulesRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETCONNECTIVITYRULESREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest) - }, -) -_sym_db.RegisterMessage(GetConnectivityRulesRequest) - -GetConnectivityRulesResponse = _reflection.GeneratedProtocolMessageType( - "GetConnectivityRulesResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETCONNECTIVITYRULESRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse) - }, -) -_sym_db.RegisterMessage(GetConnectivityRulesResponse) - -DeleteConnectivityRuleRequest = _reflection.GeneratedProtocolMessageType( - "DeleteConnectivityRuleRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETECONNECTIVITYRULEREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest) - }, -) -_sym_db.RegisterMessage(DeleteConnectivityRuleRequest) - -DeleteConnectivityRuleResponse = _reflection.GeneratedProtocolMessageType( - "DeleteConnectivityRuleResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETECONNECTIVITYRULERESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse) - }, -) -_sym_db.RegisterMessage(DeleteConnectivityRuleResponse) - -ValidateAccountAuditLogSinkRequest = _reflection.GeneratedProtocolMessageType( - "ValidateAccountAuditLogSinkRequest", - (_message.Message,), - { - "DESCRIPTOR": _VALIDATEACCOUNTAUDITLOGSINKREQUEST, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest) - }, -) -_sym_db.RegisterMessage(ValidateAccountAuditLogSinkRequest) - -ValidateAccountAuditLogSinkResponse = _reflection.GeneratedProtocolMessageType( - "ValidateAccountAuditLogSinkResponse", - (_message.Message,), - { - "DESCRIPTOR": _VALIDATEACCOUNTAUDITLOGSINKRESPONSE, - "__module__": "temporalio.api.cloud.cloudservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse) - }, + b'\n9temporal/api/cloud/cloudservice/v1/request_response.proto\x12"temporal.api.cloud.cloudservice.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-temporal/api/cloud/operation/v1/message.proto\x1a,temporal/api/cloud/identity/v1/message.proto\x1a-temporal/api/cloud/namespace/v1/message.proto\x1a)temporal/api/cloud/nexus/v1/message.proto\x1a*temporal/api/cloud/region/v1/message.proto\x1a+temporal/api/cloud/account/v1/message.proto\x1a)temporal/api/cloud/usage/v1/message.proto\x1a\x34temporal/api/cloud/connectivityrule/v1/message.proto\x1a,temporal/api/cloud/auditlog/v1/message.proto\x1a+temporal/api/cloud/billing/v1/message.proto"\x1b\n\x19GetCurrentIdentityRequest"\xed\x01\n\x1aGetCurrentIdentityResponse\x12\x34\n\x04user\x18\x01 \x01(\x0b\x32$.temporal.api.cloud.identity.v1.UserH\x00\x12I\n\x0fservice_account\x18\x02 \x01(\x0b\x32..temporal.api.cloud.identity.v1.ServiceAccountH\x00\x12\x41\n\x11principal_api_key\x18\x03 \x01(\x0b\x32&.temporal.api.cloud.identity.v1.ApiKeyB\x0b\n\tprincipal"Z\n\x0fGetUsersRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t"`\n\x10GetUsersResponse\x12\x33\n\x05users\x18\x01 \x03(\x0b\x32$.temporal.api.cloud.identity.v1.User\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"!\n\x0eGetUserRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t"E\n\x0fGetUserResponse\x12\x32\n\x04user\x18\x01 \x01(\x0b\x32$.temporal.api.cloud.identity.v1.User"g\n\x11\x43reateUserRequest\x12\x36\n\x04spec\x18\x01 \x01(\x0b\x32(.temporal.api.cloud.identity.v1.UserSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"o\n\x12\x43reateUserResponse\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x92\x01\n\x11UpdateUserRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x36\n\x04spec\x18\x02 \x01(\x0b\x32(.temporal.api.cloud.identity.v1.UserSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"^\n\x12UpdateUserResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"Z\n\x11\x44\x65leteUserRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"^\n\x12\x44\x65leteUserResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xba\x01\n\x1dSetUserNamespaceAccessRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12?\n\x06\x61\x63\x63\x65ss\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t"j\n\x1eSetUserNamespaceAccessResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"6\n\x18GetAsyncOperationRequest\x12\x1a\n\x12\x61sync_operation_id\x18\x01 \x01(\t"e\n\x19GetAsyncOperationResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xf3\x01\n\x16\x43reateNamespaceRequest\x12<\n\x04spec\x18\x02 \x01(\x0b\x32..temporal.api.cloud.namespace.v1.NamespaceSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t\x12R\n\x04tags\x18\x04 \x03(\x0b\x32\x44.temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"v\n\x17\x43reateNamespaceResponse\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"K\n\x14GetNamespacesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t"p\n\x15GetNamespacesResponse\x12>\n\nnamespaces\x18\x01 \x03(\x0b\x32*.temporal.api.cloud.namespace.v1.Namespace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"(\n\x13GetNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t"U\n\x14GetNamespaceResponse\x12=\n\tnamespace\x18\x01 \x01(\x0b\x32*.temporal.api.cloud.namespace.v1.Namespace"\x9f\x01\n\x16UpdateNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\x04spec\x18\x02 \x01(\x0b\x32..temporal.api.cloud.namespace.v1.NamespaceSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"c\n\x17UpdateNamespaceResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xc6\x01\n"RenameCustomSearchAttributeRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12-\n%existing_custom_search_attribute_name\x18\x02 \x01(\t\x12(\n new_custom_search_attribute_name\x18\x03 \x01(\t\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t"o\n#RenameCustomSearchAttributeResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"a\n\x16\x44\x65leteNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"c\n\x17\x44\x65leteNamespaceResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"_\n\x1e\x46\x61iloverNamespaceRegionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"k\n\x1f\x46\x61iloverNamespaceRegionResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"t\n\x19\x41\x64\x64NamespaceRegionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"f\n\x1a\x41\x64\x64NamespaceRegionResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"w\n\x1c\x44\x65leteNamespaceRegionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"i\n\x1d\x44\x65leteNamespaceRegionResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x13\n\x11GetRegionsRequest"K\n\x12GetRegionsResponse\x12\x35\n\x07regions\x18\x01 \x03(\x0b\x32$.temporal.api.cloud.region.v1.Region""\n\x10GetRegionRequest\x12\x0e\n\x06region\x18\x01 \x01(\t"I\n\x11GetRegionResponse\x12\x34\n\x06region\x18\x01 \x01(\x0b\x32$.temporal.api.cloud.region.v1.Region"\xae\x01\n\x11GetApiKeysRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x10\n\x08owner_id\x18\x03 \x01(\t\x12!\n\x15owner_type_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12=\n\nowner_type\x18\x05 \x01(\x0e\x32).temporal.api.cloud.identity.v1.OwnerType"g\n\x12GetApiKeysResponse\x12\x38\n\x08\x61pi_keys\x18\x01 \x03(\x0b\x32&.temporal.api.cloud.identity.v1.ApiKey\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t""\n\x10GetApiKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t"L\n\x11GetApiKeyResponse\x12\x37\n\x07\x61pi_key\x18\x01 \x01(\x0b\x32&.temporal.api.cloud.identity.v1.ApiKey"k\n\x13\x43reateApiKeyRequest\x12\x38\n\x04spec\x18\x01 \x01(\x0b\x32*.temporal.api.cloud.identity.v1.ApiKeySpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"\x7f\n\x14\x43reateApiKeyResponse\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x95\x01\n\x13UpdateApiKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x38\n\x04spec\x18\x02 \x01(\x0b\x32*.temporal.api.cloud.identity.v1.ApiKeySpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"`\n\x14UpdateApiKeyResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"[\n\x13\x44\x65leteApiKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"`\n\x14\x44\x65leteApiKeyResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x87\x01\n\x18GetNexusEndpointsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x1b\n\x13target_namespace_id\x18\x03 \x01(\t\x12\x19\n\x11target_task_queue\x18\x04 \x01(\t\x12\x0c\n\x04name\x18\x05 \x01(\t"n\n\x19GetNexusEndpointsResponse\x12\x38\n\tendpoints\x18\x01 \x03(\x0b\x32%.temporal.api.cloud.nexus.v1.Endpoint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t".\n\x17GetNexusEndpointRequest\x12\x13\n\x0b\x65ndpoint_id\x18\x01 \x01(\t"S\n\x18GetNexusEndpointResponse\x12\x37\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32%.temporal.api.cloud.nexus.v1.Endpoint"q\n\x1a\x43reateNexusEndpointRequest\x12\x37\n\x04spec\x18\x01 \x01(\x0b\x32).temporal.api.cloud.nexus.v1.EndpointSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"|\n\x1b\x43reateNexusEndpointResponse\x12\x13\n\x0b\x65ndpoint_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xa0\x01\n\x1aUpdateNexusEndpointRequest\x12\x13\n\x0b\x65ndpoint_id\x18\x01 \x01(\t\x12\x37\n\x04spec\x18\x02 \x01(\x0b\x32).temporal.api.cloud.nexus.v1.EndpointSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"g\n\x1bUpdateNexusEndpointResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"g\n\x1a\x44\x65leteNexusEndpointRequest\x12\x13\n\x0b\x65ndpoint_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"g\n\x1b\x44\x65leteNexusEndpointResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xf5\x02\n\x14GetUserGroupsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12`\n\x0cgoogle_group\x18\x05 \x01(\x0b\x32J.temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.GoogleGroupFilter\x12\\\n\nscim_group\x18\x06 \x01(\x0b\x32H.temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest.SCIMGroupFilter\x1a*\n\x11GoogleGroupFilter\x12\x15\n\remail_address\x18\x01 \x01(\t\x1a!\n\x0fSCIMGroupFilter\x12\x0e\n\x06idp_id\x18\x01 \x01(\t"k\n\x15GetUserGroupsResponse\x12\x39\n\x06groups\x18\x01 \x03(\x0b\x32).temporal.api.cloud.identity.v1.UserGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\'\n\x13GetUserGroupRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t"P\n\x14GetUserGroupResponse\x12\x38\n\x05group\x18\x01 \x01(\x0b\x32).temporal.api.cloud.identity.v1.UserGroup"q\n\x16\x43reateUserGroupRequest\x12;\n\x04spec\x18\x01 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.UserGroupSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"u\n\x17\x43reateUserGroupResponse\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x9d\x01\n\x16UpdateUserGroupRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12;\n\x04spec\x18\x02 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.UserGroupSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"c\n\x17UpdateUserGroupResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"`\n\x16\x44\x65leteUserGroupRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"c\n\x17\x44\x65leteUserGroupResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xc0\x01\n"SetUserGroupNamespaceAccessRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12?\n\x06\x61\x63\x63\x65ss\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t"o\n#SetUserGroupNamespaceAccessResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x8f\x01\n\x19\x41\x64\x64UserGroupMemberRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12\x44\n\tmember_id\x18\x02 \x01(\x0b\x32\x31.temporal.api.cloud.identity.v1.UserGroupMemberId\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"f\n\x1a\x41\x64\x64UserGroupMemberResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x92\x01\n\x1cRemoveUserGroupMemberRequest\x12\x10\n\x08group_id\x18\x01 \x01(\t\x12\x44\n\tmember_id\x18\x02 \x01(\x0b\x32\x31.temporal.api.cloud.identity.v1.UserGroupMemberId\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"i\n\x1dRemoveUserGroupMemberResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"U\n\x1aGetUserGroupMembersRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x10\n\x08group_id\x18\x03 \x01(\t"x\n\x1bGetUserGroupMembersResponse\x12@\n\x07members\x18\x01 \x03(\x0b\x32/.temporal.api.cloud.identity.v1.UserGroupMember\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"{\n\x1b\x43reateServiceAccountRequest\x12@\n\x04spec\x18\x01 \x01(\x0b\x32\x32.temporal.api.cloud.identity.v1.ServiceAccountSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"\x84\x01\n\x1c\x43reateServiceAccountResponse\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"6\n\x18GetServiceAccountRequest\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t"d\n\x19GetServiceAccountResponse\x12G\n\x0fservice_account\x18\x01 \x01(\x0b\x32..temporal.api.cloud.identity.v1.ServiceAccount"B\n\x19GetServiceAccountsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"~\n\x1aGetServiceAccountsResponse\x12G\n\x0fservice_account\x18\x01 \x03(\x0b\x32..temporal.api.cloud.identity.v1.ServiceAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xb1\x01\n\x1bUpdateServiceAccountRequest\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t\x12@\n\x04spec\x18\x02 \x01(\x0b\x32\x32.temporal.api.cloud.identity.v1.ServiceAccountSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"h\n\x1cUpdateServiceAccountResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xcf\x01\n\'SetServiceAccountNamespaceAccessRequest\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12?\n\x06\x61\x63\x63\x65ss\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t"t\n(SetServiceAccountNamespaceAccessResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"o\n\x1b\x44\x65leteServiceAccountRequest\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"h\n\x1c\x44\x65leteServiceAccountResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xaa\x01\n\x0fGetUsageRequest\x12\x38\n\x14start_time_inclusive\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12\x65nd_time_exclusive\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"d\n\x10GetUsageResponse\x12\x37\n\tsummaries\x18\x01 \x03(\x0b\x32$.temporal.api.cloud.usage.v1.Summary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x13\n\x11GetAccountRequest"M\n\x12GetAccountResponse\x12\x37\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32&.temporal.api.cloud.account.v1.Account"\x86\x01\n\x14UpdateAccountRequest\x12\x38\n\x04spec\x18\x01 \x01(\x0b\x32*.temporal.api.cloud.account.v1.AccountSpec\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"a\n\x15UpdateAccountResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x90\x01\n CreateNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12=\n\x04spec\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ExportSinkSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"m\n!CreateNamespaceExportSinkResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"@\n\x1dGetNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t"[\n\x1eGetNamespaceExportSinkResponse\x12\x39\n\x04sink\x18\x01 \x01(\x0b\x32+.temporal.api.cloud.namespace.v1.ExportSink"Z\n\x1eGetNamespaceExportSinksRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"v\n\x1fGetNamespaceExportSinksResponse\x12:\n\x05sinks\x18\x01 \x03(\x0b\x32+.temporal.api.cloud.namespace.v1.ExportSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xaa\x01\n UpdateNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12=\n\x04spec\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ExportSinkSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"m\n!UpdateNamespaceExportSinkResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"y\n DeleteNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"m\n!DeleteNamespaceExportSinkResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"v\n"ValidateNamespaceExportSinkRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12=\n\x04spec\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ExportSinkSpec"%\n#ValidateNamespaceExportSinkResponse"\x82\x02\n\x1aUpdateNamespaceTagsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12h\n\x0etags_to_upsert\x18\x02 \x03(\x0b\x32P.temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest.TagsToUpsertEntry\x12\x16\n\x0etags_to_remove\x18\x03 \x03(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t\x1a\x33\n\x11TagsToUpsertEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"g\n\x1bUpdateNamespaceTagsResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x87\x01\n\x1d\x43reateConnectivityRuleRequest\x12J\n\x04spec\x18\x01 \x01(\x0b\x32<.temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"\x88\x01\n\x1e\x43reateConnectivityRuleResponse\x12\x1c\n\x14\x63onnectivity_rule_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation":\n\x1aGetConnectivityRuleRequest\x12\x1c\n\x14\x63onnectivity_rule_id\x18\x01 \x01(\t"r\n\x1bGetConnectivityRuleResponse\x12S\n\x11\x63onnectivity_rule\x18\x01 \x01(\x0b\x32\x38.temporal.api.cloud.connectivityrule.v1.ConnectivityRule"W\n\x1bGetConnectivityRulesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tnamespace\x18\x03 \x01(\t"\x8d\x01\n\x1cGetConnectivityRulesResponse\x12T\n\x12\x63onnectivity_rules\x18\x01 \x03(\x0b\x32\x38.temporal.api.cloud.connectivityrule.v1.ConnectivityRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"s\n\x1d\x44\x65leteConnectivityRuleRequest\x12\x1c\n\x14\x63onnectivity_rule_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"j\n\x1e\x44\x65leteConnectivityRuleResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\xae\x01\n\x13GetAuditLogsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x38\n\x14start_time_inclusive\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12\x65nd_time_exclusive\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"h\n\x14GetAuditLogsResponse\x12\x37\n\x04logs\x18\x01 \x03(\x0b\x32).temporal.api.cloud.auditlog.v1.LogRecord\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"c\n"ValidateAccountAuditLogSinkRequest\x12=\n\x04spec\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.account.v1.AuditLogSinkSpec"%\n#ValidateAccountAuditLogSinkResponse"}\n CreateAccountAuditLogSinkRequest\x12=\n\x04spec\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.account.v1.AuditLogSinkSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"m\n!CreateAccountAuditLogSinkResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"-\n\x1dGetAccountAuditLogSinkRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"[\n\x1eGetAccountAuditLogSinkResponse\x12\x39\n\x04sink\x18\x01 \x01(\x0b\x32+.temporal.api.cloud.account.v1.AuditLogSink"G\n\x1eGetAccountAuditLogSinksRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"v\n\x1fGetAccountAuditLogSinksResponse\x12:\n\x05sinks\x18\x01 \x03(\x0b\x32+.temporal.api.cloud.account.v1.AuditLogSink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x97\x01\n UpdateAccountAuditLogSinkRequest\x12=\n\x04spec\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.account.v1.AuditLogSinkSpec\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"m\n!UpdateAccountAuditLogSinkResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"f\n DeleteAccountAuditLogSinkRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"m\n!DeleteAccountAuditLogSinkResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"4\n\x1fGetNamespaceCapacityInfoRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t"q\n GetNamespaceCapacityInfoResponse\x12M\n\rcapacity_info\x18\x01 \x01(\x0b\x32\x36.temporal.api.cloud.namespace.v1.NamespaceCapacityInfo"x\n\x1a\x43reateBillingReportRequest\x12>\n\x04spec\x18\x01 \x01(\x0b\x32\x30.temporal.api.cloud.billing.v1.BillingReportSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"\x82\x01\n\x1b\x43reateBillingReportResponse\x12\x19\n\x11\x62illing_report_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"4\n\x17GetBillingReportRequest\x12\x19\n\x11\x62illing_report_id\x18\x01 \x01(\t"`\n\x18GetBillingReportResponse\x12\x44\n\x0e\x62illing_report\x18\x01 \x01(\x0b\x32,.temporal.api.cloud.billing.v1.BillingReport">\n\x15GetCustomRolesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t"s\n\x16GetCustomRolesResponse\x12@\n\x0c\x63ustom_roles\x18\x01 \x03(\x0b\x32*.temporal.api.cloud.identity.v1.CustomRole\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\'\n\x14GetCustomRoleRequest\x12\x0f\n\x07role_id\x18\x01 \x01(\t"X\n\x15GetCustomRoleResponse\x12?\n\x0b\x63ustom_role\x18\x01 \x01(\x0b\x32*.temporal.api.cloud.identity.v1.CustomRole"s\n\x17\x43reateCustomRoleRequest\x12<\n\x04spec\x18\x01 \x01(\x0b\x32..temporal.api.cloud.identity.v1.CustomRoleSpec\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"u\n\x18\x43reateCustomRoleResponse\x12\x0f\n\x07role_id\x18\x01 \x01(\t\x12H\n\x0f\x61sync_operation\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"\x9e\x01\n\x17UpdateCustomRoleRequest\x12\x0f\n\x07role_id\x18\x01 \x01(\t\x12<\n\x04spec\x18\x02 \x01(\x0b\x32..temporal.api.cloud.identity.v1.CustomRoleSpec\x12\x18\n\x10resource_version\x18\x03 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t"d\n\x18UpdateCustomRoleResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"`\n\x17\x44\x65leteCustomRoleRequest\x12\x0f\n\x07role_id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x1a\n\x12\x61sync_operation_id\x18\x03 \x01(\t"d\n\x18\x44\x65leteCustomRoleResponse\x12H\n\x0f\x61sync_operation\x18\x01 \x01(\x0b\x32/.temporal.api.cloud.operation.v1.AsyncOperation"^\n"GetUserNamespaceAssignmentsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\x86\x01\n#GetUserNamespaceAssignmentsResponse\x12\x46\n\x05users\x18\x01 \x03(\x0b\x32\x37.temporal.api.cloud.identity.v1.UserNamespaceAssignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"h\n,GetServiceAccountNamespaceAssignmentsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\xa5\x01\n-GetServiceAccountNamespaceAssignmentsResponse\x12[\n\x10service_accounts\x18\x01 \x03(\x0b\x32\x41.temporal.api.cloud.identity.v1.ServiceAccountNamespaceAssignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"c\n\'GetUserGroupNamespaceAssignmentsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\x91\x01\n(GetUserGroupNamespaceAssignmentsResponse\x12L\n\x06groups\x18\x01 \x03(\x0b\x32<.temporal.api.cloud.identity.v1.UserGroupNamespaceAssignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB\xc8\x01\n%io.temporal.api.cloud.cloudservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/cloud/cloudservice/v1;cloudservice\xaa\x02$Temporalio.Api.Cloud.CloudService.V1\xea\x02(Temporalio::Api::Cloud::CloudService::V1b\x06proto3' ) -_sym_db.RegisterMessage(ValidateAccountAuditLogSinkResponse) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n%io.temporal.api.cloud.cloudservice.v1B\024RequestResponseProtoP\001Z5go.temporal.io/api/cloud/cloudservice/v1;cloudservice\252\002$Temporalio.Api.Cloud.CloudService.V1\352\002(Temporalio::Api::Cloud::CloudService::V1" @@ -1623,244 +63,316 @@ ]._serialized_options = b"\030\001" _UPDATENAMESPACETAGSREQUEST_TAGSTOUPSERTENTRY._options = None _UPDATENAMESPACETAGSREQUEST_TAGSTOUPSERTENTRY._serialized_options = b"8\001" - _GETUSERSREQUEST._serialized_start = 499 - _GETUSERSREQUEST._serialized_end = 589 - _GETUSERSRESPONSE._serialized_start = 591 - _GETUSERSRESPONSE._serialized_end = 687 - _GETUSERREQUEST._serialized_start = 689 - _GETUSERREQUEST._serialized_end = 722 - _GETUSERRESPONSE._serialized_start = 724 - _GETUSERRESPONSE._serialized_end = 793 - _CREATEUSERREQUEST._serialized_start = 795 - _CREATEUSERREQUEST._serialized_end = 898 - _CREATEUSERRESPONSE._serialized_start = 900 - _CREATEUSERRESPONSE._serialized_end = 1011 - _UPDATEUSERREQUEST._serialized_start = 1014 - _UPDATEUSERREQUEST._serialized_end = 1160 - _UPDATEUSERRESPONSE._serialized_start = 1162 - _UPDATEUSERRESPONSE._serialized_end = 1256 - _DELETEUSERREQUEST._serialized_start = 1258 - _DELETEUSERREQUEST._serialized_end = 1348 - _DELETEUSERRESPONSE._serialized_start = 1350 - _DELETEUSERRESPONSE._serialized_end = 1444 - _SETUSERNAMESPACEACCESSREQUEST._serialized_start = 1447 - _SETUSERNAMESPACEACCESSREQUEST._serialized_end = 1633 - _SETUSERNAMESPACEACCESSRESPONSE._serialized_start = 1635 - _SETUSERNAMESPACEACCESSRESPONSE._serialized_end = 1741 - _GETASYNCOPERATIONREQUEST._serialized_start = 1743 - _GETASYNCOPERATIONREQUEST._serialized_end = 1797 - _GETASYNCOPERATIONRESPONSE._serialized_start = 1799 - _GETASYNCOPERATIONRESPONSE._serialized_end = 1900 - _CREATENAMESPACEREQUEST._serialized_start = 1903 - _CREATENAMESPACEREQUEST._serialized_end = 2146 - _CREATENAMESPACEREQUEST_TAGSENTRY._serialized_start = 2103 - _CREATENAMESPACEREQUEST_TAGSENTRY._serialized_end = 2146 - _CREATENAMESPACERESPONSE._serialized_start = 2148 - _CREATENAMESPACERESPONSE._serialized_end = 2266 - _GETNAMESPACESREQUEST._serialized_start = 2268 - _GETNAMESPACESREQUEST._serialized_end = 2343 - _GETNAMESPACESRESPONSE._serialized_start = 2345 - _GETNAMESPACESRESPONSE._serialized_end = 2457 - _GETNAMESPACEREQUEST._serialized_start = 2459 - _GETNAMESPACEREQUEST._serialized_end = 2499 - _GETNAMESPACERESPONSE._serialized_start = 2501 - _GETNAMESPACERESPONSE._serialized_end = 2586 - _UPDATENAMESPACEREQUEST._serialized_start = 2589 - _UPDATENAMESPACEREQUEST._serialized_end = 2748 - _UPDATENAMESPACERESPONSE._serialized_start = 2750 - _UPDATENAMESPACERESPONSE._serialized_end = 2849 - _RENAMECUSTOMSEARCHATTRIBUTEREQUEST._serialized_start = 2852 - _RENAMECUSTOMSEARCHATTRIBUTEREQUEST._serialized_end = 3050 - _RENAMECUSTOMSEARCHATTRIBUTERESPONSE._serialized_start = 3052 - _RENAMECUSTOMSEARCHATTRIBUTERESPONSE._serialized_end = 3163 - _DELETENAMESPACEREQUEST._serialized_start = 3165 - _DELETENAMESPACEREQUEST._serialized_end = 3262 - _DELETENAMESPACERESPONSE._serialized_start = 3264 - _DELETENAMESPACERESPONSE._serialized_end = 3363 - _FAILOVERNAMESPACEREGIONREQUEST._serialized_start = 3365 - _FAILOVERNAMESPACEREGIONREQUEST._serialized_end = 3460 - _FAILOVERNAMESPACEREGIONRESPONSE._serialized_start = 3462 - _FAILOVERNAMESPACEREGIONRESPONSE._serialized_end = 3569 - _ADDNAMESPACEREGIONREQUEST._serialized_start = 3571 - _ADDNAMESPACEREGIONREQUEST._serialized_end = 3687 - _ADDNAMESPACEREGIONRESPONSE._serialized_start = 3689 - _ADDNAMESPACEREGIONRESPONSE._serialized_end = 3791 - _DELETENAMESPACEREGIONREQUEST._serialized_start = 3793 - _DELETENAMESPACEREGIONREQUEST._serialized_end = 3912 - _DELETENAMESPACEREGIONRESPONSE._serialized_start = 3914 - _DELETENAMESPACEREGIONRESPONSE._serialized_end = 4019 - _GETREGIONSREQUEST._serialized_start = 4021 - _GETREGIONSREQUEST._serialized_end = 4040 - _GETREGIONSRESPONSE._serialized_start = 4042 - _GETREGIONSRESPONSE._serialized_end = 4117 - _GETREGIONREQUEST._serialized_start = 4119 - _GETREGIONREQUEST._serialized_end = 4153 - _GETREGIONRESPONSE._serialized_start = 4155 - _GETREGIONRESPONSE._serialized_end = 4228 - _GETAPIKEYSREQUEST._serialized_start = 4231 - _GETAPIKEYSREQUEST._serialized_end = 4405 - _GETAPIKEYSRESPONSE._serialized_start = 4407 - _GETAPIKEYSRESPONSE._serialized_end = 4510 - _GETAPIKEYREQUEST._serialized_start = 4512 - _GETAPIKEYREQUEST._serialized_end = 4546 - _GETAPIKEYRESPONSE._serialized_start = 4548 - _GETAPIKEYRESPONSE._serialized_end = 4624 - _CREATEAPIKEYREQUEST._serialized_start = 4626 - _CREATEAPIKEYREQUEST._serialized_end = 4733 - _CREATEAPIKEYRESPONSE._serialized_start = 4735 - _CREATEAPIKEYRESPONSE._serialized_end = 4862 - _UPDATEAPIKEYREQUEST._serialized_start = 4865 - _UPDATEAPIKEYREQUEST._serialized_end = 5014 - _UPDATEAPIKEYRESPONSE._serialized_start = 5016 - _UPDATEAPIKEYRESPONSE._serialized_end = 5112 - _DELETEAPIKEYREQUEST._serialized_start = 5114 - _DELETEAPIKEYREQUEST._serialized_end = 5205 - _DELETEAPIKEYRESPONSE._serialized_start = 5207 - _DELETEAPIKEYRESPONSE._serialized_end = 5303 - _GETNEXUSENDPOINTSREQUEST._serialized_start = 5306 - _GETNEXUSENDPOINTSREQUEST._serialized_end = 5441 - _GETNEXUSENDPOINTSRESPONSE._serialized_start = 5443 - _GETNEXUSENDPOINTSRESPONSE._serialized_end = 5553 - _GETNEXUSENDPOINTREQUEST._serialized_start = 5555 - _GETNEXUSENDPOINTREQUEST._serialized_end = 5601 - _GETNEXUSENDPOINTRESPONSE._serialized_start = 5603 - _GETNEXUSENDPOINTRESPONSE._serialized_end = 5686 - _CREATENEXUSENDPOINTREQUEST._serialized_start = 5688 - _CREATENEXUSENDPOINTREQUEST._serialized_end = 5801 - _CREATENEXUSENDPOINTRESPONSE._serialized_start = 5803 - _CREATENEXUSENDPOINTRESPONSE._serialized_end = 5927 - _UPDATENEXUSENDPOINTREQUEST._serialized_start = 5930 - _UPDATENEXUSENDPOINTREQUEST._serialized_end = 6090 - _UPDATENEXUSENDPOINTRESPONSE._serialized_start = 6092 - _UPDATENEXUSENDPOINTRESPONSE._serialized_end = 6195 - _DELETENEXUSENDPOINTREQUEST._serialized_start = 6197 - _DELETENEXUSENDPOINTREQUEST._serialized_end = 6300 - _DELETENEXUSENDPOINTRESPONSE._serialized_start = 6302 - _DELETENEXUSENDPOINTRESPONSE._serialized_end = 6405 - _GETUSERGROUPSREQUEST._serialized_start = 6408 - _GETUSERGROUPSREQUEST._serialized_end = 6781 - _GETUSERGROUPSREQUEST_GOOGLEGROUPFILTER._serialized_start = 6704 - _GETUSERGROUPSREQUEST_GOOGLEGROUPFILTER._serialized_end = 6746 - _GETUSERGROUPSREQUEST_SCIMGROUPFILTER._serialized_start = 6748 - _GETUSERGROUPSREQUEST_SCIMGROUPFILTER._serialized_end = 6781 - _GETUSERGROUPSRESPONSE._serialized_start = 6783 - _GETUSERGROUPSRESPONSE._serialized_end = 6890 - _GETUSERGROUPREQUEST._serialized_start = 6892 - _GETUSERGROUPREQUEST._serialized_end = 6931 - _GETUSERGROUPRESPONSE._serialized_start = 6933 - _GETUSERGROUPRESPONSE._serialized_end = 7013 - _CREATEUSERGROUPREQUEST._serialized_start = 7015 - _CREATEUSERGROUPREQUEST._serialized_end = 7128 - _CREATEUSERGROUPRESPONSE._serialized_start = 7130 - _CREATEUSERGROUPRESPONSE._serialized_end = 7247 - _UPDATEUSERGROUPREQUEST._serialized_start = 7250 - _UPDATEUSERGROUPREQUEST._serialized_end = 7407 - _UPDATEUSERGROUPRESPONSE._serialized_start = 7409 - _UPDATEUSERGROUPRESPONSE._serialized_end = 7508 - _DELETEUSERGROUPREQUEST._serialized_start = 7510 - _DELETEUSERGROUPREQUEST._serialized_end = 7606 - _DELETEUSERGROUPRESPONSE._serialized_start = 7608 - _DELETEUSERGROUPRESPONSE._serialized_end = 7707 - _SETUSERGROUPNAMESPACEACCESSREQUEST._serialized_start = 7710 - _SETUSERGROUPNAMESPACEACCESSREQUEST._serialized_end = 7902 - _SETUSERGROUPNAMESPACEACCESSRESPONSE._serialized_start = 7904 - _SETUSERGROUPNAMESPACEACCESSRESPONSE._serialized_end = 8015 - _ADDUSERGROUPMEMBERREQUEST._serialized_start = 8018 - _ADDUSERGROUPMEMBERREQUEST._serialized_end = 8161 - _ADDUSERGROUPMEMBERRESPONSE._serialized_start = 8163 - _ADDUSERGROUPMEMBERRESPONSE._serialized_end = 8265 - _REMOVEUSERGROUPMEMBERREQUEST._serialized_start = 8268 - _REMOVEUSERGROUPMEMBERREQUEST._serialized_end = 8414 - _REMOVEUSERGROUPMEMBERRESPONSE._serialized_start = 8416 - _REMOVEUSERGROUPMEMBERRESPONSE._serialized_end = 8521 - _GETUSERGROUPMEMBERSREQUEST._serialized_start = 8523 - _GETUSERGROUPMEMBERSREQUEST._serialized_end = 8608 - _GETUSERGROUPMEMBERSRESPONSE._serialized_start = 8610 - _GETUSERGROUPMEMBERSRESPONSE._serialized_end = 8730 - _CREATESERVICEACCOUNTREQUEST._serialized_start = 8732 - _CREATESERVICEACCOUNTREQUEST._serialized_end = 8855 - _CREATESERVICEACCOUNTRESPONSE._serialized_start = 8858 - _CREATESERVICEACCOUNTRESPONSE._serialized_end = 8990 - _GETSERVICEACCOUNTREQUEST._serialized_start = 8992 - _GETSERVICEACCOUNTREQUEST._serialized_end = 9046 - _GETSERVICEACCOUNTRESPONSE._serialized_start = 9048 - _GETSERVICEACCOUNTRESPONSE._serialized_end = 9148 - _GETSERVICEACCOUNTSREQUEST._serialized_start = 9150 - _GETSERVICEACCOUNTSREQUEST._serialized_end = 9216 - _GETSERVICEACCOUNTSRESPONSE._serialized_start = 9218 - _GETSERVICEACCOUNTSRESPONSE._serialized_end = 9344 - _UPDATESERVICEACCOUNTREQUEST._serialized_start = 9347 - _UPDATESERVICEACCOUNTREQUEST._serialized_end = 9524 - _UPDATESERVICEACCOUNTRESPONSE._serialized_start = 9526 - _UPDATESERVICEACCOUNTRESPONSE._serialized_end = 9630 - _SETSERVICEACCOUNTNAMESPACEACCESSREQUEST._serialized_start = 9633 - _SETSERVICEACCOUNTNAMESPACEACCESSREQUEST._serialized_end = 9840 - _SETSERVICEACCOUNTNAMESPACEACCESSRESPONSE._serialized_start = 9842 - _SETSERVICEACCOUNTNAMESPACEACCESSRESPONSE._serialized_end = 9958 - _DELETESERVICEACCOUNTREQUEST._serialized_start = 9960 - _DELETESERVICEACCOUNTREQUEST._serialized_end = 10071 - _DELETESERVICEACCOUNTRESPONSE._serialized_start = 10073 - _DELETESERVICEACCOUNTRESPONSE._serialized_end = 10177 - _GETUSAGEREQUEST._serialized_start = 10180 - _GETUSAGEREQUEST._serialized_end = 10350 - _GETUSAGERESPONSE._serialized_start = 10352 - _GETUSAGERESPONSE._serialized_end = 10452 - _GETACCOUNTREQUEST._serialized_start = 10454 - _GETACCOUNTREQUEST._serialized_end = 10473 - _GETACCOUNTRESPONSE._serialized_start = 10475 - _GETACCOUNTRESPONSE._serialized_end = 10552 - _UPDATEACCOUNTREQUEST._serialized_start = 10555 - _UPDATEACCOUNTREQUEST._serialized_end = 10689 - _UPDATEACCOUNTRESPONSE._serialized_start = 10691 - _UPDATEACCOUNTRESPONSE._serialized_end = 10788 - _CREATENAMESPACEEXPORTSINKREQUEST._serialized_start = 10791 - _CREATENAMESPACEEXPORTSINKREQUEST._serialized_end = 10935 - _CREATENAMESPACEEXPORTSINKRESPONSE._serialized_start = 10937 - _CREATENAMESPACEEXPORTSINKRESPONSE._serialized_end = 11046 - _GETNAMESPACEEXPORTSINKREQUEST._serialized_start = 11048 - _GETNAMESPACEEXPORTSINKREQUEST._serialized_end = 11112 - _GETNAMESPACEEXPORTSINKRESPONSE._serialized_start = 11114 - _GETNAMESPACEEXPORTSINKRESPONSE._serialized_end = 11205 - _GETNAMESPACEEXPORTSINKSREQUEST._serialized_start = 11207 - _GETNAMESPACEEXPORTSINKSREQUEST._serialized_end = 11297 - _GETNAMESPACEEXPORTSINKSRESPONSE._serialized_start = 11299 - _GETNAMESPACEEXPORTSINKSRESPONSE._serialized_end = 11417 - _UPDATENAMESPACEEXPORTSINKREQUEST._serialized_start = 11420 - _UPDATENAMESPACEEXPORTSINKREQUEST._serialized_end = 11590 - _UPDATENAMESPACEEXPORTSINKRESPONSE._serialized_start = 11592 - _UPDATENAMESPACEEXPORTSINKRESPONSE._serialized_end = 11701 - _DELETENAMESPACEEXPORTSINKREQUEST._serialized_start = 11703 - _DELETENAMESPACEEXPORTSINKREQUEST._serialized_end = 11824 - _DELETENAMESPACEEXPORTSINKRESPONSE._serialized_start = 11826 - _DELETENAMESPACEEXPORTSINKRESPONSE._serialized_end = 11935 - _VALIDATENAMESPACEEXPORTSINKREQUEST._serialized_start = 11937 - _VALIDATENAMESPACEEXPORTSINKREQUEST._serialized_end = 12055 - _VALIDATENAMESPACEEXPORTSINKRESPONSE._serialized_start = 12057 - _VALIDATENAMESPACEEXPORTSINKRESPONSE._serialized_end = 12094 - _UPDATENAMESPACETAGSREQUEST._serialized_start = 12097 - _UPDATENAMESPACETAGSREQUEST._serialized_end = 12355 - _UPDATENAMESPACETAGSREQUEST_TAGSTOUPSERTENTRY._serialized_start = 12304 - _UPDATENAMESPACETAGSREQUEST_TAGSTOUPSERTENTRY._serialized_end = 12355 - _UPDATENAMESPACETAGSRESPONSE._serialized_start = 12357 - _UPDATENAMESPACETAGSRESPONSE._serialized_end = 12460 - _CREATECONNECTIVITYRULEREQUEST._serialized_start = 12463 - _CREATECONNECTIVITYRULEREQUEST._serialized_end = 12598 - _CREATECONNECTIVITYRULERESPONSE._serialized_start = 12601 - _CREATECONNECTIVITYRULERESPONSE._serialized_end = 12737 - _GETCONNECTIVITYRULEREQUEST._serialized_start = 12739 - _GETCONNECTIVITYRULEREQUEST._serialized_end = 12797 - _GETCONNECTIVITYRULERESPONSE._serialized_start = 12799 - _GETCONNECTIVITYRULERESPONSE._serialized_end = 12913 - _GETCONNECTIVITYRULESREQUEST._serialized_start = 12915 - _GETCONNECTIVITYRULESREQUEST._serialized_end = 13002 - _GETCONNECTIVITYRULESRESPONSE._serialized_start = 13005 - _GETCONNECTIVITYRULESRESPONSE._serialized_end = 13146 - _DELETECONNECTIVITYRULEREQUEST._serialized_start = 13148 - _DELETECONNECTIVITYRULEREQUEST._serialized_end = 13263 - _DELETECONNECTIVITYRULERESPONSE._serialized_start = 13265 - _DELETECONNECTIVITYRULERESPONSE._serialized_end = 13371 - _VALIDATEACCOUNTAUDITLOGSINKREQUEST._serialized_start = 13373 - _VALIDATEACCOUNTAUDITLOGSINKREQUEST._serialized_end = 13472 - _VALIDATEACCOUNTAUDITLOGSINKRESPONSE._serialized_start = 13474 - _VALIDATEACCOUNTAUDITLOGSINKRESPONSE._serialized_end = 13511 + _GETCURRENTIDENTITYREQUEST._serialized_start = 590 + _GETCURRENTIDENTITYREQUEST._serialized_end = 617 + _GETCURRENTIDENTITYRESPONSE._serialized_start = 620 + _GETCURRENTIDENTITYRESPONSE._serialized_end = 857 + _GETUSERSREQUEST._serialized_start = 859 + _GETUSERSREQUEST._serialized_end = 949 + _GETUSERSRESPONSE._serialized_start = 951 + _GETUSERSRESPONSE._serialized_end = 1047 + _GETUSERREQUEST._serialized_start = 1049 + _GETUSERREQUEST._serialized_end = 1082 + _GETUSERRESPONSE._serialized_start = 1084 + _GETUSERRESPONSE._serialized_end = 1153 + _CREATEUSERREQUEST._serialized_start = 1155 + _CREATEUSERREQUEST._serialized_end = 1258 + _CREATEUSERRESPONSE._serialized_start = 1260 + _CREATEUSERRESPONSE._serialized_end = 1371 + _UPDATEUSERREQUEST._serialized_start = 1374 + _UPDATEUSERREQUEST._serialized_end = 1520 + _UPDATEUSERRESPONSE._serialized_start = 1522 + _UPDATEUSERRESPONSE._serialized_end = 1616 + _DELETEUSERREQUEST._serialized_start = 1618 + _DELETEUSERREQUEST._serialized_end = 1708 + _DELETEUSERRESPONSE._serialized_start = 1710 + _DELETEUSERRESPONSE._serialized_end = 1804 + _SETUSERNAMESPACEACCESSREQUEST._serialized_start = 1807 + _SETUSERNAMESPACEACCESSREQUEST._serialized_end = 1993 + _SETUSERNAMESPACEACCESSRESPONSE._serialized_start = 1995 + _SETUSERNAMESPACEACCESSRESPONSE._serialized_end = 2101 + _GETASYNCOPERATIONREQUEST._serialized_start = 2103 + _GETASYNCOPERATIONREQUEST._serialized_end = 2157 + _GETASYNCOPERATIONRESPONSE._serialized_start = 2159 + _GETASYNCOPERATIONRESPONSE._serialized_end = 2260 + _CREATENAMESPACEREQUEST._serialized_start = 2263 + _CREATENAMESPACEREQUEST._serialized_end = 2506 + _CREATENAMESPACEREQUEST_TAGSENTRY._serialized_start = 2463 + _CREATENAMESPACEREQUEST_TAGSENTRY._serialized_end = 2506 + _CREATENAMESPACERESPONSE._serialized_start = 2508 + _CREATENAMESPACERESPONSE._serialized_end = 2626 + _GETNAMESPACESREQUEST._serialized_start = 2628 + _GETNAMESPACESREQUEST._serialized_end = 2703 + _GETNAMESPACESRESPONSE._serialized_start = 2705 + _GETNAMESPACESRESPONSE._serialized_end = 2817 + _GETNAMESPACEREQUEST._serialized_start = 2819 + _GETNAMESPACEREQUEST._serialized_end = 2859 + _GETNAMESPACERESPONSE._serialized_start = 2861 + _GETNAMESPACERESPONSE._serialized_end = 2946 + _UPDATENAMESPACEREQUEST._serialized_start = 2949 + _UPDATENAMESPACEREQUEST._serialized_end = 3108 + _UPDATENAMESPACERESPONSE._serialized_start = 3110 + _UPDATENAMESPACERESPONSE._serialized_end = 3209 + _RENAMECUSTOMSEARCHATTRIBUTEREQUEST._serialized_start = 3212 + _RENAMECUSTOMSEARCHATTRIBUTEREQUEST._serialized_end = 3410 + _RENAMECUSTOMSEARCHATTRIBUTERESPONSE._serialized_start = 3412 + _RENAMECUSTOMSEARCHATTRIBUTERESPONSE._serialized_end = 3523 + _DELETENAMESPACEREQUEST._serialized_start = 3525 + _DELETENAMESPACEREQUEST._serialized_end = 3622 + _DELETENAMESPACERESPONSE._serialized_start = 3624 + _DELETENAMESPACERESPONSE._serialized_end = 3723 + _FAILOVERNAMESPACEREGIONREQUEST._serialized_start = 3725 + _FAILOVERNAMESPACEREGIONREQUEST._serialized_end = 3820 + _FAILOVERNAMESPACEREGIONRESPONSE._serialized_start = 3822 + _FAILOVERNAMESPACEREGIONRESPONSE._serialized_end = 3929 + _ADDNAMESPACEREGIONREQUEST._serialized_start = 3931 + _ADDNAMESPACEREGIONREQUEST._serialized_end = 4047 + _ADDNAMESPACEREGIONRESPONSE._serialized_start = 4049 + _ADDNAMESPACEREGIONRESPONSE._serialized_end = 4151 + _DELETENAMESPACEREGIONREQUEST._serialized_start = 4153 + _DELETENAMESPACEREGIONREQUEST._serialized_end = 4272 + _DELETENAMESPACEREGIONRESPONSE._serialized_start = 4274 + _DELETENAMESPACEREGIONRESPONSE._serialized_end = 4379 + _GETREGIONSREQUEST._serialized_start = 4381 + _GETREGIONSREQUEST._serialized_end = 4400 + _GETREGIONSRESPONSE._serialized_start = 4402 + _GETREGIONSRESPONSE._serialized_end = 4477 + _GETREGIONREQUEST._serialized_start = 4479 + _GETREGIONREQUEST._serialized_end = 4513 + _GETREGIONRESPONSE._serialized_start = 4515 + _GETREGIONRESPONSE._serialized_end = 4588 + _GETAPIKEYSREQUEST._serialized_start = 4591 + _GETAPIKEYSREQUEST._serialized_end = 4765 + _GETAPIKEYSRESPONSE._serialized_start = 4767 + _GETAPIKEYSRESPONSE._serialized_end = 4870 + _GETAPIKEYREQUEST._serialized_start = 4872 + _GETAPIKEYREQUEST._serialized_end = 4906 + _GETAPIKEYRESPONSE._serialized_start = 4908 + _GETAPIKEYRESPONSE._serialized_end = 4984 + _CREATEAPIKEYREQUEST._serialized_start = 4986 + _CREATEAPIKEYREQUEST._serialized_end = 5093 + _CREATEAPIKEYRESPONSE._serialized_start = 5095 + _CREATEAPIKEYRESPONSE._serialized_end = 5222 + _UPDATEAPIKEYREQUEST._serialized_start = 5225 + _UPDATEAPIKEYREQUEST._serialized_end = 5374 + _UPDATEAPIKEYRESPONSE._serialized_start = 5376 + _UPDATEAPIKEYRESPONSE._serialized_end = 5472 + _DELETEAPIKEYREQUEST._serialized_start = 5474 + _DELETEAPIKEYREQUEST._serialized_end = 5565 + _DELETEAPIKEYRESPONSE._serialized_start = 5567 + _DELETEAPIKEYRESPONSE._serialized_end = 5663 + _GETNEXUSENDPOINTSREQUEST._serialized_start = 5666 + _GETNEXUSENDPOINTSREQUEST._serialized_end = 5801 + _GETNEXUSENDPOINTSRESPONSE._serialized_start = 5803 + _GETNEXUSENDPOINTSRESPONSE._serialized_end = 5913 + _GETNEXUSENDPOINTREQUEST._serialized_start = 5915 + _GETNEXUSENDPOINTREQUEST._serialized_end = 5961 + _GETNEXUSENDPOINTRESPONSE._serialized_start = 5963 + _GETNEXUSENDPOINTRESPONSE._serialized_end = 6046 + _CREATENEXUSENDPOINTREQUEST._serialized_start = 6048 + _CREATENEXUSENDPOINTREQUEST._serialized_end = 6161 + _CREATENEXUSENDPOINTRESPONSE._serialized_start = 6163 + _CREATENEXUSENDPOINTRESPONSE._serialized_end = 6287 + _UPDATENEXUSENDPOINTREQUEST._serialized_start = 6290 + _UPDATENEXUSENDPOINTREQUEST._serialized_end = 6450 + _UPDATENEXUSENDPOINTRESPONSE._serialized_start = 6452 + _UPDATENEXUSENDPOINTRESPONSE._serialized_end = 6555 + _DELETENEXUSENDPOINTREQUEST._serialized_start = 6557 + _DELETENEXUSENDPOINTREQUEST._serialized_end = 6660 + _DELETENEXUSENDPOINTRESPONSE._serialized_start = 6662 + _DELETENEXUSENDPOINTRESPONSE._serialized_end = 6765 + _GETUSERGROUPSREQUEST._serialized_start = 6768 + _GETUSERGROUPSREQUEST._serialized_end = 7141 + _GETUSERGROUPSREQUEST_GOOGLEGROUPFILTER._serialized_start = 7064 + _GETUSERGROUPSREQUEST_GOOGLEGROUPFILTER._serialized_end = 7106 + _GETUSERGROUPSREQUEST_SCIMGROUPFILTER._serialized_start = 7108 + _GETUSERGROUPSREQUEST_SCIMGROUPFILTER._serialized_end = 7141 + _GETUSERGROUPSRESPONSE._serialized_start = 7143 + _GETUSERGROUPSRESPONSE._serialized_end = 7250 + _GETUSERGROUPREQUEST._serialized_start = 7252 + _GETUSERGROUPREQUEST._serialized_end = 7291 + _GETUSERGROUPRESPONSE._serialized_start = 7293 + _GETUSERGROUPRESPONSE._serialized_end = 7373 + _CREATEUSERGROUPREQUEST._serialized_start = 7375 + _CREATEUSERGROUPREQUEST._serialized_end = 7488 + _CREATEUSERGROUPRESPONSE._serialized_start = 7490 + _CREATEUSERGROUPRESPONSE._serialized_end = 7607 + _UPDATEUSERGROUPREQUEST._serialized_start = 7610 + _UPDATEUSERGROUPREQUEST._serialized_end = 7767 + _UPDATEUSERGROUPRESPONSE._serialized_start = 7769 + _UPDATEUSERGROUPRESPONSE._serialized_end = 7868 + _DELETEUSERGROUPREQUEST._serialized_start = 7870 + _DELETEUSERGROUPREQUEST._serialized_end = 7966 + _DELETEUSERGROUPRESPONSE._serialized_start = 7968 + _DELETEUSERGROUPRESPONSE._serialized_end = 8067 + _SETUSERGROUPNAMESPACEACCESSREQUEST._serialized_start = 8070 + _SETUSERGROUPNAMESPACEACCESSREQUEST._serialized_end = 8262 + _SETUSERGROUPNAMESPACEACCESSRESPONSE._serialized_start = 8264 + _SETUSERGROUPNAMESPACEACCESSRESPONSE._serialized_end = 8375 + _ADDUSERGROUPMEMBERREQUEST._serialized_start = 8378 + _ADDUSERGROUPMEMBERREQUEST._serialized_end = 8521 + _ADDUSERGROUPMEMBERRESPONSE._serialized_start = 8523 + _ADDUSERGROUPMEMBERRESPONSE._serialized_end = 8625 + _REMOVEUSERGROUPMEMBERREQUEST._serialized_start = 8628 + _REMOVEUSERGROUPMEMBERREQUEST._serialized_end = 8774 + _REMOVEUSERGROUPMEMBERRESPONSE._serialized_start = 8776 + _REMOVEUSERGROUPMEMBERRESPONSE._serialized_end = 8881 + _GETUSERGROUPMEMBERSREQUEST._serialized_start = 8883 + _GETUSERGROUPMEMBERSREQUEST._serialized_end = 8968 + _GETUSERGROUPMEMBERSRESPONSE._serialized_start = 8970 + _GETUSERGROUPMEMBERSRESPONSE._serialized_end = 9090 + _CREATESERVICEACCOUNTREQUEST._serialized_start = 9092 + _CREATESERVICEACCOUNTREQUEST._serialized_end = 9215 + _CREATESERVICEACCOUNTRESPONSE._serialized_start = 9218 + _CREATESERVICEACCOUNTRESPONSE._serialized_end = 9350 + _GETSERVICEACCOUNTREQUEST._serialized_start = 9352 + _GETSERVICEACCOUNTREQUEST._serialized_end = 9406 + _GETSERVICEACCOUNTRESPONSE._serialized_start = 9408 + _GETSERVICEACCOUNTRESPONSE._serialized_end = 9508 + _GETSERVICEACCOUNTSREQUEST._serialized_start = 9510 + _GETSERVICEACCOUNTSREQUEST._serialized_end = 9576 + _GETSERVICEACCOUNTSRESPONSE._serialized_start = 9578 + _GETSERVICEACCOUNTSRESPONSE._serialized_end = 9704 + _UPDATESERVICEACCOUNTREQUEST._serialized_start = 9707 + _UPDATESERVICEACCOUNTREQUEST._serialized_end = 9884 + _UPDATESERVICEACCOUNTRESPONSE._serialized_start = 9886 + _UPDATESERVICEACCOUNTRESPONSE._serialized_end = 9990 + _SETSERVICEACCOUNTNAMESPACEACCESSREQUEST._serialized_start = 9993 + _SETSERVICEACCOUNTNAMESPACEACCESSREQUEST._serialized_end = 10200 + _SETSERVICEACCOUNTNAMESPACEACCESSRESPONSE._serialized_start = 10202 + _SETSERVICEACCOUNTNAMESPACEACCESSRESPONSE._serialized_end = 10318 + _DELETESERVICEACCOUNTREQUEST._serialized_start = 10320 + _DELETESERVICEACCOUNTREQUEST._serialized_end = 10431 + _DELETESERVICEACCOUNTRESPONSE._serialized_start = 10433 + _DELETESERVICEACCOUNTRESPONSE._serialized_end = 10537 + _GETUSAGEREQUEST._serialized_start = 10540 + _GETUSAGEREQUEST._serialized_end = 10710 + _GETUSAGERESPONSE._serialized_start = 10712 + _GETUSAGERESPONSE._serialized_end = 10812 + _GETACCOUNTREQUEST._serialized_start = 10814 + _GETACCOUNTREQUEST._serialized_end = 10833 + _GETACCOUNTRESPONSE._serialized_start = 10835 + _GETACCOUNTRESPONSE._serialized_end = 10912 + _UPDATEACCOUNTREQUEST._serialized_start = 10915 + _UPDATEACCOUNTREQUEST._serialized_end = 11049 + _UPDATEACCOUNTRESPONSE._serialized_start = 11051 + _UPDATEACCOUNTRESPONSE._serialized_end = 11148 + _CREATENAMESPACEEXPORTSINKREQUEST._serialized_start = 11151 + _CREATENAMESPACEEXPORTSINKREQUEST._serialized_end = 11295 + _CREATENAMESPACEEXPORTSINKRESPONSE._serialized_start = 11297 + _CREATENAMESPACEEXPORTSINKRESPONSE._serialized_end = 11406 + _GETNAMESPACEEXPORTSINKREQUEST._serialized_start = 11408 + _GETNAMESPACEEXPORTSINKREQUEST._serialized_end = 11472 + _GETNAMESPACEEXPORTSINKRESPONSE._serialized_start = 11474 + _GETNAMESPACEEXPORTSINKRESPONSE._serialized_end = 11565 + _GETNAMESPACEEXPORTSINKSREQUEST._serialized_start = 11567 + _GETNAMESPACEEXPORTSINKSREQUEST._serialized_end = 11657 + _GETNAMESPACEEXPORTSINKSRESPONSE._serialized_start = 11659 + _GETNAMESPACEEXPORTSINKSRESPONSE._serialized_end = 11777 + _UPDATENAMESPACEEXPORTSINKREQUEST._serialized_start = 11780 + _UPDATENAMESPACEEXPORTSINKREQUEST._serialized_end = 11950 + _UPDATENAMESPACEEXPORTSINKRESPONSE._serialized_start = 11952 + _UPDATENAMESPACEEXPORTSINKRESPONSE._serialized_end = 12061 + _DELETENAMESPACEEXPORTSINKREQUEST._serialized_start = 12063 + _DELETENAMESPACEEXPORTSINKREQUEST._serialized_end = 12184 + _DELETENAMESPACEEXPORTSINKRESPONSE._serialized_start = 12186 + _DELETENAMESPACEEXPORTSINKRESPONSE._serialized_end = 12295 + _VALIDATENAMESPACEEXPORTSINKREQUEST._serialized_start = 12297 + _VALIDATENAMESPACEEXPORTSINKREQUEST._serialized_end = 12415 + _VALIDATENAMESPACEEXPORTSINKRESPONSE._serialized_start = 12417 + _VALIDATENAMESPACEEXPORTSINKRESPONSE._serialized_end = 12454 + _UPDATENAMESPACETAGSREQUEST._serialized_start = 12457 + _UPDATENAMESPACETAGSREQUEST._serialized_end = 12715 + _UPDATENAMESPACETAGSREQUEST_TAGSTOUPSERTENTRY._serialized_start = 12664 + _UPDATENAMESPACETAGSREQUEST_TAGSTOUPSERTENTRY._serialized_end = 12715 + _UPDATENAMESPACETAGSRESPONSE._serialized_start = 12717 + _UPDATENAMESPACETAGSRESPONSE._serialized_end = 12820 + _CREATECONNECTIVITYRULEREQUEST._serialized_start = 12823 + _CREATECONNECTIVITYRULEREQUEST._serialized_end = 12958 + _CREATECONNECTIVITYRULERESPONSE._serialized_start = 12961 + _CREATECONNECTIVITYRULERESPONSE._serialized_end = 13097 + _GETCONNECTIVITYRULEREQUEST._serialized_start = 13099 + _GETCONNECTIVITYRULEREQUEST._serialized_end = 13157 + _GETCONNECTIVITYRULERESPONSE._serialized_start = 13159 + _GETCONNECTIVITYRULERESPONSE._serialized_end = 13273 + _GETCONNECTIVITYRULESREQUEST._serialized_start = 13275 + _GETCONNECTIVITYRULESREQUEST._serialized_end = 13362 + _GETCONNECTIVITYRULESRESPONSE._serialized_start = 13365 + _GETCONNECTIVITYRULESRESPONSE._serialized_end = 13506 + _DELETECONNECTIVITYRULEREQUEST._serialized_start = 13508 + _DELETECONNECTIVITYRULEREQUEST._serialized_end = 13623 + _DELETECONNECTIVITYRULERESPONSE._serialized_start = 13625 + _DELETECONNECTIVITYRULERESPONSE._serialized_end = 13731 + _GETAUDITLOGSREQUEST._serialized_start = 13734 + _GETAUDITLOGSREQUEST._serialized_end = 13908 + _GETAUDITLOGSRESPONSE._serialized_start = 13910 + _GETAUDITLOGSRESPONSE._serialized_end = 14014 + _VALIDATEACCOUNTAUDITLOGSINKREQUEST._serialized_start = 14016 + _VALIDATEACCOUNTAUDITLOGSINKREQUEST._serialized_end = 14115 + _VALIDATEACCOUNTAUDITLOGSINKRESPONSE._serialized_start = 14117 + _VALIDATEACCOUNTAUDITLOGSINKRESPONSE._serialized_end = 14154 + _CREATEACCOUNTAUDITLOGSINKREQUEST._serialized_start = 14156 + _CREATEACCOUNTAUDITLOGSINKREQUEST._serialized_end = 14281 + _CREATEACCOUNTAUDITLOGSINKRESPONSE._serialized_start = 14283 + _CREATEACCOUNTAUDITLOGSINKRESPONSE._serialized_end = 14392 + _GETACCOUNTAUDITLOGSINKREQUEST._serialized_start = 14394 + _GETACCOUNTAUDITLOGSINKREQUEST._serialized_end = 14439 + _GETACCOUNTAUDITLOGSINKRESPONSE._serialized_start = 14441 + _GETACCOUNTAUDITLOGSINKRESPONSE._serialized_end = 14532 + _GETACCOUNTAUDITLOGSINKSREQUEST._serialized_start = 14534 + _GETACCOUNTAUDITLOGSINKSREQUEST._serialized_end = 14605 + _GETACCOUNTAUDITLOGSINKSRESPONSE._serialized_start = 14607 + _GETACCOUNTAUDITLOGSINKSRESPONSE._serialized_end = 14725 + _UPDATEACCOUNTAUDITLOGSINKREQUEST._serialized_start = 14728 + _UPDATEACCOUNTAUDITLOGSINKREQUEST._serialized_end = 14879 + _UPDATEACCOUNTAUDITLOGSINKRESPONSE._serialized_start = 14881 + _UPDATEACCOUNTAUDITLOGSINKRESPONSE._serialized_end = 14990 + _DELETEACCOUNTAUDITLOGSINKREQUEST._serialized_start = 14992 + _DELETEACCOUNTAUDITLOGSINKREQUEST._serialized_end = 15094 + _DELETEACCOUNTAUDITLOGSINKRESPONSE._serialized_start = 15096 + _DELETEACCOUNTAUDITLOGSINKRESPONSE._serialized_end = 15205 + _GETNAMESPACECAPACITYINFOREQUEST._serialized_start = 15207 + _GETNAMESPACECAPACITYINFOREQUEST._serialized_end = 15259 + _GETNAMESPACECAPACITYINFORESPONSE._serialized_start = 15261 + _GETNAMESPACECAPACITYINFORESPONSE._serialized_end = 15374 + _CREATEBILLINGREPORTREQUEST._serialized_start = 15376 + _CREATEBILLINGREPORTREQUEST._serialized_end = 15496 + _CREATEBILLINGREPORTRESPONSE._serialized_start = 15499 + _CREATEBILLINGREPORTRESPONSE._serialized_end = 15629 + _GETBILLINGREPORTREQUEST._serialized_start = 15631 + _GETBILLINGREPORTREQUEST._serialized_end = 15683 + _GETBILLINGREPORTRESPONSE._serialized_start = 15685 + _GETBILLINGREPORTRESPONSE._serialized_end = 15781 + _GETCUSTOMROLESREQUEST._serialized_start = 15783 + _GETCUSTOMROLESREQUEST._serialized_end = 15845 + _GETCUSTOMROLESRESPONSE._serialized_start = 15847 + _GETCUSTOMROLESRESPONSE._serialized_end = 15962 + _GETCUSTOMROLEREQUEST._serialized_start = 15964 + _GETCUSTOMROLEREQUEST._serialized_end = 16003 + _GETCUSTOMROLERESPONSE._serialized_start = 16005 + _GETCUSTOMROLERESPONSE._serialized_end = 16093 + _CREATECUSTOMROLEREQUEST._serialized_start = 16095 + _CREATECUSTOMROLEREQUEST._serialized_end = 16210 + _CREATECUSTOMROLERESPONSE._serialized_start = 16212 + _CREATECUSTOMROLERESPONSE._serialized_end = 16329 + _UPDATECUSTOMROLEREQUEST._serialized_start = 16332 + _UPDATECUSTOMROLEREQUEST._serialized_end = 16490 + _UPDATECUSTOMROLERESPONSE._serialized_start = 16492 + _UPDATECUSTOMROLERESPONSE._serialized_end = 16592 + _DELETECUSTOMROLEREQUEST._serialized_start = 16594 + _DELETECUSTOMROLEREQUEST._serialized_end = 16690 + _DELETECUSTOMROLERESPONSE._serialized_start = 16692 + _DELETECUSTOMROLERESPONSE._serialized_end = 16792 + _GETUSERNAMESPACEASSIGNMENTSREQUEST._serialized_start = 16794 + _GETUSERNAMESPACEASSIGNMENTSREQUEST._serialized_end = 16888 + _GETUSERNAMESPACEASSIGNMENTSRESPONSE._serialized_start = 16891 + _GETUSERNAMESPACEASSIGNMENTSRESPONSE._serialized_end = 17025 + _GETSERVICEACCOUNTNAMESPACEASSIGNMENTSREQUEST._serialized_start = 17027 + _GETSERVICEACCOUNTNAMESPACEASSIGNMENTSREQUEST._serialized_end = 17131 + _GETSERVICEACCOUNTNAMESPACEASSIGNMENTSRESPONSE._serialized_start = 17134 + _GETSERVICEACCOUNTNAMESPACEASSIGNMENTSRESPONSE._serialized_end = 17299 + _GETUSERGROUPNAMESPACEASSIGNMENTSREQUEST._serialized_start = 17301 + _GETUSERGROUPNAMESPACEASSIGNMENTSREQUEST._serialized_end = 17400 + _GETUSERGROUPNAMESPACEASSIGNMENTSRESPONSE._serialized_start = 17403 + _GETUSERGROUPNAMESPACEASSIGNMENTSRESPONSE._serialized_end = 17548 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/cloud/cloudservice/v1/request_response_pb2.pyi b/temporalio/api/cloud/cloudservice/v1/request_response_pb2.pyi index 2d41774e1d..703264d14c 100644 --- a/temporalio/api/cloud/cloudservice/v1/request_response_pb2.pyi +++ b/temporalio/api/cloud/cloudservice/v1/request_response_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers @@ -13,6 +13,8 @@ import google.protobuf.message import google.protobuf.timestamp_pb2 import temporalio.api.cloud.account.v1.message_pb2 +import temporalio.api.cloud.auditlog.v1.message_pb2 +import temporalio.api.cloud.billing.v1.message_pb2 import temporalio.api.cloud.connectivityrule.v1.message_pb2 import temporalio.api.cloud.identity.v1.message_pb2 import temporalio.api.cloud.namespace.v1.message_pb2 @@ -21,13 +23,81 @@ import temporalio.api.cloud.operation.v1.message_pb2 import temporalio.api.cloud.region.v1.message_pb2 import temporalio.api.cloud.usage.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final +class GetCurrentIdentityRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___GetCurrentIdentityRequest = GetCurrentIdentityRequest + +@typing.final +class GetCurrentIdentityResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + USER_FIELD_NUMBER: builtins.int + SERVICE_ACCOUNT_FIELD_NUMBER: builtins.int + PRINCIPAL_API_KEY_FIELD_NUMBER: builtins.int + @property + def user(self) -> temporalio.api.cloud.identity.v1.message_pb2.User: + """The user is a regular user""" + + @property + def service_account( + self, + ) -> temporalio.api.cloud.identity.v1.message_pb2.ServiceAccount: + """The user is a service account""" + + @property + def principal_api_key(self) -> temporalio.api.cloud.identity.v1.message_pb2.ApiKey: + """The API key info used to authenticate the request, if any""" + + def __init__( + self, + *, + user: temporalio.api.cloud.identity.v1.message_pb2.User | None = ..., + service_account: temporalio.api.cloud.identity.v1.message_pb2.ServiceAccount + | None = ..., + principal_api_key: temporalio.api.cloud.identity.v1.message_pb2.ApiKey + | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "principal", + b"principal", + "principal_api_key", + b"principal_api_key", + "service_account", + b"service_account", + "user", + b"user", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "principal", + b"principal", + "principal_api_key", + b"principal_api_key", + "service_account", + b"service_account", + "user", + b"user", + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["principal", b"principal"] + ) -> typing.Literal["user", "service_account"] | None: ... + +global___GetCurrentIdentityResponse = GetCurrentIdentityResponse + +@typing.final class GetUsersRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -55,7 +125,7 @@ class GetUsersRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "email", b"email", "namespace", @@ -69,11 +139,14 @@ class GetUsersRequest(google.protobuf.message.Message): global___GetUsersRequest = GetUsersRequest +@typing.final class GetUsersResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor USERS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token""" @property def users( self, @@ -81,8 +154,7 @@ class GetUsersResponse(google.protobuf.message.Message): temporalio.api.cloud.identity.v1.message_pb2.User ]: """The list of users in ascending ids order""" - next_page_token: builtins.str - """The next page's token""" + def __init__( self, *, @@ -94,13 +166,14 @@ class GetUsersResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "next_page_token", b"next_page_token", "users", b"users" ], ) -> None: ... global___GetUsersResponse = GetUsersResponse +@typing.final class GetUserRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -112,12 +185,11 @@ class GetUserRequest(google.protobuf.message.Message): *, user_id: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["user_id", b"user_id"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["user_id", b"user_id"]) -> None: ... global___GetUserRequest = GetUserRequest +@typing.final class GetUserResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -125,30 +197,31 @@ class GetUserResponse(google.protobuf.message.Message): @property def user(self) -> temporalio.api.cloud.identity.v1.message_pb2.User: """The user""" + def __init__( self, *, user: temporalio.api.cloud.identity.v1.message_pb2.User | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["user", b"user"] + self, field_name: typing.Literal["user", b"user"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["user", b"user"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["user", b"user"]) -> None: ... global___GetUserResponse = GetUserResponse +@typing.final class CreateUserRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SPEC_FIELD_NUMBER: builtins.int ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + async_operation_id: builtins.str + """The id to use for this async operation - optional""" @property def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.UserSpec: """The spec for the user to invite""" - async_operation_id: builtins.str - """The id to use for this async operation - optional""" + def __init__( self, *, @@ -156,17 +229,18 @@ class CreateUserRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "spec", b"spec" ], ) -> None: ... global___CreateUserRequest = CreateUserRequest +@typing.final class CreateUserResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -179,6 +253,7 @@ class CreateUserResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation""" + def __init__( self, *, @@ -187,18 +262,18 @@ class CreateUserResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation", b"async_operation", "user_id", b"user_id" ], ) -> None: ... global___CreateUserResponse = CreateUserResponse +@typing.final class UpdateUserRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -208,15 +283,16 @@ class UpdateUserRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int user_id: builtins.str """The id of the user to update""" - @property - def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.UserSpec: - """The new user specification""" resource_version: builtins.str """The version of the user for which this update is intended for The latest version can be found in the GetUser operation response """ async_operation_id: builtins.str """The id to use for this async operation - optional""" + @property + def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.UserSpec: + """The new user specification""" + def __init__( self, *, @@ -226,11 +302,11 @@ class UpdateUserRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "resource_version", @@ -244,6 +320,7 @@ class UpdateUserRequest(google.protobuf.message.Message): global___UpdateUserRequest = UpdateUserRequest +@typing.final class UpdateUserResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -253,6 +330,7 @@ class UpdateUserResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation""" + def __init__( self, *, @@ -260,16 +338,15 @@ class UpdateUserResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___UpdateUserResponse = UpdateUserResponse +@typing.final class DeleteUserRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -293,7 +370,7 @@ class DeleteUserRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "resource_version", @@ -305,6 +382,7 @@ class DeleteUserRequest(google.protobuf.message.Message): global___DeleteUserRequest = DeleteUserRequest +@typing.final class DeleteUserResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -314,6 +392,7 @@ class DeleteUserResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation""" + def __init__( self, *, @@ -321,16 +400,15 @@ class DeleteUserResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___DeleteUserResponse = DeleteUserResponse +@typing.final class SetUserNamespaceAccessRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -343,15 +421,16 @@ class SetUserNamespaceAccessRequest(google.protobuf.message.Message): """The namespace to set permissions for""" user_id: builtins.str """The id of the user to set permissions for""" - @property - def access(self) -> temporalio.api.cloud.identity.v1.message_pb2.NamespaceAccess: - """The namespace access to assign the user""" resource_version: builtins.str """The version of the user for which this update is intended for The latest version can be found in the GetUser operation response """ async_operation_id: builtins.str """The id to use for this async operation - optional""" + @property + def access(self) -> temporalio.api.cloud.identity.v1.message_pb2.NamespaceAccess: + """The namespace access to assign the user""" + def __init__( self, *, @@ -363,11 +442,11 @@ class SetUserNamespaceAccessRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["access", b"access"] + self, field_name: typing.Literal["access", b"access"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "access", b"access", "async_operation_id", @@ -383,6 +462,7 @@ class SetUserNamespaceAccessRequest(google.protobuf.message.Message): global___SetUserNamespaceAccessRequest = SetUserNamespaceAccessRequest +@typing.final class SetUserNamespaceAccessResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -392,6 +472,7 @@ class SetUserNamespaceAccessResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation""" + def __init__( self, *, @@ -399,16 +480,15 @@ class SetUserNamespaceAccessResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___SetUserNamespaceAccessResponse = SetUserNamespaceAccessResponse +@typing.final class GetAsyncOperationRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -421,14 +501,12 @@ class GetAsyncOperationRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "async_operation_id", b"async_operation_id" - ], + self, field_name: typing.Literal["async_operation_id", b"async_operation_id"] ) -> None: ... global___GetAsyncOperationRequest = GetAsyncOperationRequest +@typing.final class GetAsyncOperationResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -438,6 +516,7 @@ class GetAsyncOperationResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation""" + def __init__( self, *, @@ -445,19 +524,19 @@ class GetAsyncOperationResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___GetAsyncOperationResponse = GetAsyncOperationResponse +@typing.final class CreateNamespaceRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class TagsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -472,20 +551,20 @@ class CreateNamespaceRequest(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SPEC_FIELD_NUMBER: builtins.int ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int TAGS_FIELD_NUMBER: builtins.int - @property - def spec(self) -> temporalio.api.cloud.namespace.v1.message_pb2.NamespaceSpec: - """The namespace specification.""" async_operation_id: builtins.str """The id to use for this async operation. Optional, if not provided a random id will be generated. """ + @property + def spec(self) -> temporalio.api.cloud.namespace.v1.message_pb2.NamespaceSpec: + """The namespace specification.""" + @property def tags( self, @@ -493,6 +572,7 @@ class CreateNamespaceRequest(google.protobuf.message.Message): """The tags to add to the namespace. Note: This field can be set by global admins or account owners only. """ + def __init__( self, *, @@ -501,11 +581,11 @@ class CreateNamespaceRequest(google.protobuf.message.Message): tags: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "spec", @@ -517,6 +597,7 @@ class CreateNamespaceRequest(google.protobuf.message.Message): global___CreateNamespaceRequest = CreateNamespaceRequest +@typing.final class CreateNamespaceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -529,6 +610,7 @@ class CreateNamespaceResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -537,18 +619,18 @@ class CreateNamespaceResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation", b"async_operation", "namespace", b"namespace" ], ) -> None: ... global___CreateNamespaceResponse = CreateNamespaceResponse +@typing.final class GetNamespacesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -577,18 +659,21 @@ class GetNamespacesRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "name", b"name", "page_size", b"page_size", "page_token", b"page_token" ], ) -> None: ... global___GetNamespacesRequest = GetNamespacesRequest +@typing.final class GetNamespacesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMESPACES_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" @property def namespaces( self, @@ -596,8 +681,7 @@ class GetNamespacesResponse(google.protobuf.message.Message): temporalio.api.cloud.namespace.v1.message_pb2.Namespace ]: """The list of namespaces in ascending name order.""" - next_page_token: builtins.str - """The next page's token.""" + def __init__( self, *, @@ -609,13 +693,14 @@ class GetNamespacesResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespaces", b"namespaces", "next_page_token", b"next_page_token" ], ) -> None: ... global___GetNamespacesResponse = GetNamespacesResponse +@typing.final class GetNamespaceRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -628,11 +713,12 @@ class GetNamespaceRequest(google.protobuf.message.Message): namespace: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["namespace", b"namespace"] + self, field_name: typing.Literal["namespace", b"namespace"] ) -> None: ... global___GetNamespaceRequest = GetNamespaceRequest +@typing.final class GetNamespaceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -640,20 +726,22 @@ class GetNamespaceResponse(google.protobuf.message.Message): @property def namespace(self) -> temporalio.api.cloud.namespace.v1.message_pb2.Namespace: """The namespace.""" + def __init__( self, *, namespace: temporalio.api.cloud.namespace.v1.message_pb2.Namespace | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["namespace", b"namespace"] + self, field_name: typing.Literal["namespace", b"namespace"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["namespace", b"namespace"] + self, field_name: typing.Literal["namespace", b"namespace"] ) -> None: ... global___GetNamespaceResponse = GetNamespaceResponse +@typing.final class UpdateNamespaceRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -663,9 +751,6 @@ class UpdateNamespaceRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """The namespace to update.""" - @property - def spec(self) -> temporalio.api.cloud.namespace.v1.message_pb2.NamespaceSpec: - """The new namespace specification.""" resource_version: builtins.str """The version of the namespace for which this update is intended for. The latest version can be found in the namespace status. @@ -674,6 +759,10 @@ class UpdateNamespaceRequest(google.protobuf.message.Message): """The id to use for this async operation. Optional, if not provided a random id will be generated. """ + @property + def spec(self) -> temporalio.api.cloud.namespace.v1.message_pb2.NamespaceSpec: + """The new namespace specification.""" + def __init__( self, *, @@ -683,11 +772,11 @@ class UpdateNamespaceRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "namespace", @@ -701,6 +790,7 @@ class UpdateNamespaceRequest(google.protobuf.message.Message): global___UpdateNamespaceRequest = UpdateNamespaceRequest +@typing.final class UpdateNamespaceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -710,6 +800,7 @@ class UpdateNamespaceResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -717,16 +808,15 @@ class UpdateNamespaceResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___UpdateNamespaceResponse = UpdateNamespaceResponse +@typing.final class RenameCustomSearchAttributeRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -760,7 +850,7 @@ class RenameCustomSearchAttributeRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "existing_custom_search_attribute_name", @@ -776,6 +866,7 @@ class RenameCustomSearchAttributeRequest(google.protobuf.message.Message): global___RenameCustomSearchAttributeRequest = RenameCustomSearchAttributeRequest +@typing.final class RenameCustomSearchAttributeResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -785,6 +876,7 @@ class RenameCustomSearchAttributeResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -792,16 +884,15 @@ class RenameCustomSearchAttributeResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___RenameCustomSearchAttributeResponse = RenameCustomSearchAttributeResponse +@typing.final class DeleteNamespaceRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -827,7 +918,7 @@ class DeleteNamespaceRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "namespace", @@ -839,6 +930,7 @@ class DeleteNamespaceRequest(google.protobuf.message.Message): global___DeleteNamespaceRequest = DeleteNamespaceRequest +@typing.final class DeleteNamespaceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -848,6 +940,7 @@ class DeleteNamespaceResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -855,16 +948,15 @@ class DeleteNamespaceResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___DeleteNamespaceResponse = DeleteNamespaceResponse +@typing.final class FailoverNamespaceRegionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -888,7 +980,7 @@ class FailoverNamespaceRegionRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "namespace", @@ -900,6 +992,7 @@ class FailoverNamespaceRegionRequest(google.protobuf.message.Message): global___FailoverNamespaceRegionRequest = FailoverNamespaceRegionRequest +@typing.final class FailoverNamespaceRegionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -909,6 +1002,7 @@ class FailoverNamespaceRegionResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -916,16 +1010,15 @@ class FailoverNamespaceRegionResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___FailoverNamespaceRegionResponse = FailoverNamespaceRegionResponse +@typing.final class AddNamespaceRegionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -956,7 +1049,7 @@ class AddNamespaceRegionRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "namespace", @@ -970,6 +1063,7 @@ class AddNamespaceRegionRequest(google.protobuf.message.Message): global___AddNamespaceRegionRequest = AddNamespaceRegionRequest +@typing.final class AddNamespaceRegionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -979,6 +1073,7 @@ class AddNamespaceRegionResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -986,16 +1081,15 @@ class AddNamespaceRegionResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___AddNamespaceRegionResponse = AddNamespaceRegionResponse +@typing.final class DeleteNamespaceRegionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1026,7 +1120,7 @@ class DeleteNamespaceRegionRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "namespace", @@ -1040,6 +1134,7 @@ class DeleteNamespaceRegionRequest(google.protobuf.message.Message): global___DeleteNamespaceRegionRequest = DeleteNamespaceRegionRequest +@typing.final class DeleteNamespaceRegionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1049,6 +1144,7 @@ class DeleteNamespaceRegionResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -1056,16 +1152,15 @@ class DeleteNamespaceRegionResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___DeleteNamespaceRegionResponse = DeleteNamespaceRegionResponse +@typing.final class GetRegionsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1075,6 +1170,7 @@ class GetRegionsRequest(google.protobuf.message.Message): global___GetRegionsRequest = GetRegionsRequest +@typing.final class GetRegionsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1086,6 +1182,7 @@ class GetRegionsResponse(google.protobuf.message.Message): temporalio.api.cloud.region.v1.message_pb2.Region ]: """The temporal cloud regions.""" + def __init__( self, *, @@ -1094,12 +1191,11 @@ class GetRegionsResponse(google.protobuf.message.Message): ] | None = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["regions", b"regions"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["regions", b"regions"]) -> None: ... global___GetRegionsResponse = GetRegionsResponse +@typing.final class GetRegionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1111,12 +1207,11 @@ class GetRegionRequest(google.protobuf.message.Message): *, region: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["region", b"region"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["region", b"region"]) -> None: ... global___GetRegionRequest = GetRegionRequest +@typing.final class GetRegionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1124,20 +1219,20 @@ class GetRegionResponse(google.protobuf.message.Message): @property def region(self) -> temporalio.api.cloud.region.v1.message_pb2.Region: """The temporal cloud region.""" + def __init__( self, *, region: temporalio.api.cloud.region.v1.message_pb2.Region | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["region", b"region"] + self, field_name: typing.Literal["region", b"region"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["region", b"region"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["region", b"region"]) -> None: ... global___GetRegionResponse = GetRegionResponse +@typing.final class GetApiKeysRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1157,6 +1252,7 @@ class GetApiKeysRequest(google.protobuf.message.Message): owner_type_deprecated: builtins.str """Filter api keys by owner type - optional. Possible values: user, service-account + temporal:versioning:max_version=v0.3.0 """ owner_type: temporalio.api.cloud.identity.v1.message_pb2.OwnerType.ValueType """Filter api keys by owner type - optional. @@ -1173,7 +1269,7 @@ class GetApiKeysRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "owner_id", b"owner_id", "owner_type", @@ -1189,11 +1285,14 @@ class GetApiKeysRequest(google.protobuf.message.Message): global___GetApiKeysRequest = GetApiKeysRequest +@typing.final class GetApiKeysResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor API_KEYS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" @property def api_keys( self, @@ -1201,8 +1300,7 @@ class GetApiKeysResponse(google.protobuf.message.Message): temporalio.api.cloud.identity.v1.message_pb2.ApiKey ]: """The list of api keys in ascending id order.""" - next_page_token: builtins.str - """The next page's token.""" + def __init__( self, *, @@ -1214,13 +1312,14 @@ class GetApiKeysResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "api_keys", b"api_keys", "next_page_token", b"next_page_token" ], ) -> None: ... global___GetApiKeysResponse = GetApiKeysResponse +@typing.final class GetApiKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1232,12 +1331,11 @@ class GetApiKeyRequest(google.protobuf.message.Message): *, key_id: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["key_id", b"key_id"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["key_id", b"key_id"]) -> None: ... global___GetApiKeyRequest = GetApiKeyRequest +@typing.final class GetApiKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1245,32 +1343,33 @@ class GetApiKeyResponse(google.protobuf.message.Message): @property def api_key(self) -> temporalio.api.cloud.identity.v1.message_pb2.ApiKey: """The api key.""" + def __init__( self, *, api_key: temporalio.api.cloud.identity.v1.message_pb2.ApiKey | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["api_key", b"api_key"] + self, field_name: typing.Literal["api_key", b"api_key"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["api_key", b"api_key"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["api_key", b"api_key"]) -> None: ... global___GetApiKeyResponse = GetApiKeyResponse +@typing.final class CreateApiKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SPEC_FIELD_NUMBER: builtins.int ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + async_operation_id: builtins.str + """The id to use for this async operation - optional.""" @property def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.ApiKeySpec: """The spec for the api key to create. Create api key only supports service-account owner type for now. """ - async_operation_id: builtins.str - """The id to use for this async operation - optional.""" + def __init__( self, *, @@ -1278,17 +1377,18 @@ class CreateApiKeyRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "spec", b"spec" ], ) -> None: ... global___CreateApiKeyRequest = CreateApiKeyRequest +@typing.final class CreateApiKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1307,6 +1407,7 @@ class CreateApiKeyResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -1316,12 +1417,11 @@ class CreateApiKeyResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation", b"async_operation", "key_id", @@ -1333,6 +1433,7 @@ class CreateApiKeyResponse(google.protobuf.message.Message): global___CreateApiKeyResponse = CreateApiKeyResponse +@typing.final class UpdateApiKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1342,15 +1443,16 @@ class UpdateApiKeyRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int key_id: builtins.str """The id of the api key to update.""" - @property - def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.ApiKeySpec: - """The new api key specification.""" resource_version: builtins.str """The version of the api key for which this update is intended for. The latest version can be found in the GetApiKey operation response. """ async_operation_id: builtins.str """The id to use for this async operation - optional.""" + @property + def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.ApiKeySpec: + """The new api key specification.""" + def __init__( self, *, @@ -1360,11 +1462,11 @@ class UpdateApiKeyRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "key_id", @@ -1378,6 +1480,7 @@ class UpdateApiKeyRequest(google.protobuf.message.Message): global___UpdateApiKeyRequest = UpdateApiKeyRequest +@typing.final class UpdateApiKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1387,6 +1490,7 @@ class UpdateApiKeyResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -1394,16 +1498,15 @@ class UpdateApiKeyResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___UpdateApiKeyResponse = UpdateApiKeyResponse +@typing.final class DeleteApiKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1427,7 +1530,7 @@ class DeleteApiKeyRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "key_id", @@ -1439,6 +1542,7 @@ class DeleteApiKeyRequest(google.protobuf.message.Message): global___DeleteApiKeyRequest = DeleteApiKeyRequest +@typing.final class DeleteApiKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1448,6 +1552,7 @@ class DeleteApiKeyResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -1455,16 +1560,15 @@ class DeleteApiKeyResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___DeleteApiKeyResponse = DeleteApiKeyResponse +@typing.final class GetNexusEndpointsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1496,7 +1600,7 @@ class GetNexusEndpointsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "name", b"name", "page_size", @@ -1512,11 +1616,14 @@ class GetNexusEndpointsRequest(google.protobuf.message.Message): global___GetNexusEndpointsRequest = GetNexusEndpointsRequest +@typing.final class GetNexusEndpointsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor ENDPOINTS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" @property def endpoints( self, @@ -1524,8 +1631,7 @@ class GetNexusEndpointsResponse(google.protobuf.message.Message): temporalio.api.cloud.nexus.v1.message_pb2.Endpoint ]: """The list of endpoints in ascending id order.""" - next_page_token: builtins.str - """The next page's token.""" + def __init__( self, *, @@ -1537,13 +1643,14 @@ class GetNexusEndpointsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "endpoints", b"endpoints", "next_page_token", b"next_page_token" ], ) -> None: ... global___GetNexusEndpointsResponse = GetNexusEndpointsResponse +@typing.final class GetNexusEndpointRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1556,11 +1663,12 @@ class GetNexusEndpointRequest(google.protobuf.message.Message): endpoint_id: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["endpoint_id", b"endpoint_id"] + self, field_name: typing.Literal["endpoint_id", b"endpoint_id"] ) -> None: ... global___GetNexusEndpointRequest = GetNexusEndpointRequest +@typing.final class GetNexusEndpointResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1568,30 +1676,33 @@ class GetNexusEndpointResponse(google.protobuf.message.Message): @property def endpoint(self) -> temporalio.api.cloud.nexus.v1.message_pb2.Endpoint: """The nexus endpoint.""" + def __init__( self, *, endpoint: temporalio.api.cloud.nexus.v1.message_pb2.Endpoint | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["endpoint", b"endpoint"] + self, field_name: typing.Literal["endpoint", b"endpoint"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["endpoint", b"endpoint"] + self, field_name: typing.Literal["endpoint", b"endpoint"] ) -> None: ... global___GetNexusEndpointResponse = GetNexusEndpointResponse +@typing.final class CreateNexusEndpointRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SPEC_FIELD_NUMBER: builtins.int ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + async_operation_id: builtins.str + """The id to use for this async operation - optional.""" @property def spec(self) -> temporalio.api.cloud.nexus.v1.message_pb2.EndpointSpec: """The spec for the nexus endpoint.""" - async_operation_id: builtins.str - """The id to use for this async operation - optional.""" + def __init__( self, *, @@ -1599,17 +1710,18 @@ class CreateNexusEndpointRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "spec", b"spec" ], ) -> None: ... global___CreateNexusEndpointRequest = CreateNexusEndpointRequest +@typing.final class CreateNexusEndpointResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1622,6 +1734,7 @@ class CreateNexusEndpointResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -1630,18 +1743,18 @@ class CreateNexusEndpointResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation", b"async_operation", "endpoint_id", b"endpoint_id" ], ) -> None: ... global___CreateNexusEndpointResponse = CreateNexusEndpointResponse +@typing.final class UpdateNexusEndpointRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1651,15 +1764,16 @@ class UpdateNexusEndpointRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int endpoint_id: builtins.str """The id of the nexus endpoint to update.""" - @property - def spec(self) -> temporalio.api.cloud.nexus.v1.message_pb2.EndpointSpec: - """The updated nexus endpoint specification.""" resource_version: builtins.str """The version of the nexus endpoint for which this update is intended for. The latest version can be found in the GetNexusEndpoint operation response. """ async_operation_id: builtins.str """The id to use for this async operation - optional.""" + @property + def spec(self) -> temporalio.api.cloud.nexus.v1.message_pb2.EndpointSpec: + """The updated nexus endpoint specification.""" + def __init__( self, *, @@ -1669,11 +1783,11 @@ class UpdateNexusEndpointRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "endpoint_id", @@ -1687,6 +1801,7 @@ class UpdateNexusEndpointRequest(google.protobuf.message.Message): global___UpdateNexusEndpointRequest = UpdateNexusEndpointRequest +@typing.final class UpdateNexusEndpointResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1696,6 +1811,7 @@ class UpdateNexusEndpointResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -1703,16 +1819,15 @@ class UpdateNexusEndpointResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___UpdateNexusEndpointResponse = UpdateNexusEndpointResponse +@typing.final class DeleteNexusEndpointRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1736,7 +1851,7 @@ class DeleteNexusEndpointRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "endpoint_id", @@ -1748,6 +1863,7 @@ class DeleteNexusEndpointRequest(google.protobuf.message.Message): global___DeleteNexusEndpointRequest = DeleteNexusEndpointRequest +@typing.final class DeleteNexusEndpointResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1757,6 +1873,7 @@ class DeleteNexusEndpointResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation""" + def __init__( self, *, @@ -1764,19 +1881,19 @@ class DeleteNexusEndpointResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___DeleteNexusEndpointResponse = DeleteNexusEndpointResponse +@typing.final class GetUserGroupsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class GoogleGroupFilter(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1789,10 +1906,10 @@ class GetUserGroupsRequest(google.protobuf.message.Message): email_address: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["email_address", b"email_address"], + self, field_name: typing.Literal["email_address", b"email_address"] ) -> None: ... + @typing.final class SCIMGroupFilter(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1805,7 +1922,7 @@ class GetUserGroupsRequest(google.protobuf.message.Message): idp_id: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["idp_id", b"idp_id"] + self, field_name: typing.Literal["idp_id", b"idp_id"] ) -> None: ... PAGE_SIZE_FIELD_NUMBER: builtins.int @@ -1827,9 +1944,11 @@ class GetUserGroupsRequest(google.protobuf.message.Message): @property def google_group(self) -> global___GetUserGroupsRequest.GoogleGroupFilter: """Filter groups by the google group specification - optional.""" + @property def scim_group(self) -> global___GetUserGroupsRequest.SCIMGroupFilter: """Filter groups by the SCIM group specification - optional.""" + def __init__( self, *, @@ -1842,13 +1961,13 @@ class GetUserGroupsRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "google_group", b"google_group", "scim_group", b"scim_group" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "display_name", b"display_name", "google_group", @@ -1866,11 +1985,14 @@ class GetUserGroupsRequest(google.protobuf.message.Message): global___GetUserGroupsRequest = GetUserGroupsRequest +@typing.final class GetUserGroupsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor GROUPS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" @property def groups( self, @@ -1878,8 +2000,7 @@ class GetUserGroupsResponse(google.protobuf.message.Message): temporalio.api.cloud.identity.v1.message_pb2.UserGroup ]: """The list of groups in ascending name order.""" - next_page_token: builtins.str - """The next page's token.""" + def __init__( self, *, @@ -1891,13 +2012,14 @@ class GetUserGroupsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "groups", b"groups", "next_page_token", b"next_page_token" ], ) -> None: ... global___GetUserGroupsResponse = GetUserGroupsResponse +@typing.final class GetUserGroupRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1910,11 +2032,12 @@ class GetUserGroupRequest(google.protobuf.message.Message): group_id: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["group_id", b"group_id"] + self, field_name: typing.Literal["group_id", b"group_id"] ) -> None: ... global___GetUserGroupRequest = GetUserGroupRequest +@typing.final class GetUserGroupResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1922,32 +2045,33 @@ class GetUserGroupResponse(google.protobuf.message.Message): @property def group(self) -> temporalio.api.cloud.identity.v1.message_pb2.UserGroup: """The group.""" + def __init__( self, *, group: temporalio.api.cloud.identity.v1.message_pb2.UserGroup | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["group", b"group"] + self, field_name: typing.Literal["group", b"group"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["group", b"group"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["group", b"group"]) -> None: ... global___GetUserGroupResponse = GetUserGroupResponse +@typing.final class CreateUserGroupRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SPEC_FIELD_NUMBER: builtins.int ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int - @property - def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.UserGroupSpec: - """The spec for the group to create.""" async_operation_id: builtins.str """The id to use for this async operation. Optional, if not provided a random id will be generated. """ + @property + def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.UserGroupSpec: + """The spec for the group to create.""" + def __init__( self, *, @@ -1955,17 +2079,18 @@ class CreateUserGroupRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "spec", b"spec" ], ) -> None: ... global___CreateUserGroupRequest = CreateUserGroupRequest +@typing.final class CreateUserGroupResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1978,6 +2103,7 @@ class CreateUserGroupResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -1986,18 +2112,18 @@ class CreateUserGroupResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation", b"async_operation", "group_id", b"group_id" ], ) -> None: ... global___CreateUserGroupResponse = CreateUserGroupResponse +@typing.final class UpdateUserGroupRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2007,9 +2133,6 @@ class UpdateUserGroupRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int group_id: builtins.str """The id of the group to update.""" - @property - def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.UserGroupSpec: - """The new group specification.""" resource_version: builtins.str """The version of the group for which this update is intended for. The latest version can be found in the GetGroup operation response. @@ -2018,6 +2141,10 @@ class UpdateUserGroupRequest(google.protobuf.message.Message): """The id to use for this async operation. Optional, if not provided a random id will be generated. """ + @property + def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.UserGroupSpec: + """The new group specification.""" + def __init__( self, *, @@ -2027,11 +2154,11 @@ class UpdateUserGroupRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "group_id", @@ -2045,6 +2172,7 @@ class UpdateUserGroupRequest(google.protobuf.message.Message): global___UpdateUserGroupRequest = UpdateUserGroupRequest +@typing.final class UpdateUserGroupResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2054,6 +2182,7 @@ class UpdateUserGroupResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2061,16 +2190,15 @@ class UpdateUserGroupResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___UpdateUserGroupResponse = UpdateUserGroupResponse +@typing.final class DeleteUserGroupRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2096,7 +2224,7 @@ class DeleteUserGroupRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "group_id", @@ -2108,6 +2236,7 @@ class DeleteUserGroupRequest(google.protobuf.message.Message): global___DeleteUserGroupRequest = DeleteUserGroupRequest +@typing.final class DeleteUserGroupResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2117,6 +2246,7 @@ class DeleteUserGroupResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2124,16 +2254,15 @@ class DeleteUserGroupResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___DeleteUserGroupResponse = DeleteUserGroupResponse +@typing.final class SetUserGroupNamespaceAccessRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2146,15 +2275,16 @@ class SetUserGroupNamespaceAccessRequest(google.protobuf.message.Message): """The namespace to set permissions for.""" group_id: builtins.str """The id of the group to set permissions for.""" - @property - def access(self) -> temporalio.api.cloud.identity.v1.message_pb2.NamespaceAccess: - """The namespace access to assign the group. If left empty, the group will be removed from the namespace access.""" resource_version: builtins.str """The version of the group for which this update is intended for. The latest version can be found in the GetGroup operation response. """ async_operation_id: builtins.str """The id to use for this async operation - optional.""" + @property + def access(self) -> temporalio.api.cloud.identity.v1.message_pb2.NamespaceAccess: + """The namespace access to assign the group. If left empty, the group will be removed from the namespace access.""" + def __init__( self, *, @@ -2166,11 +2296,11 @@ class SetUserGroupNamespaceAccessRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["access", b"access"] + self, field_name: typing.Literal["access", b"access"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "access", b"access", "async_operation_id", @@ -2186,6 +2316,7 @@ class SetUserGroupNamespaceAccessRequest(google.protobuf.message.Message): global___SetUserGroupNamespaceAccessRequest = SetUserGroupNamespaceAccessRequest +@typing.final class SetUserGroupNamespaceAccessResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2195,6 +2326,7 @@ class SetUserGroupNamespaceAccessResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2202,16 +2334,15 @@ class SetUserGroupNamespaceAccessResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___SetUserGroupNamespaceAccessResponse = SetUserGroupNamespaceAccessResponse +@typing.final class AddUserGroupMemberRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2220,15 +2351,16 @@ class AddUserGroupMemberRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int group_id: builtins.str """The id of the group to add the member for.""" + async_operation_id: builtins.str + """The id to use for this async operation. + Optional, if not provided a random id will be generated. + """ @property def member_id( self, ) -> temporalio.api.cloud.identity.v1.message_pb2.UserGroupMemberId: """The member id to add to the group.""" - async_operation_id: builtins.str - """The id to use for this async operation. - Optional, if not provided a random id will be generated. - """ + def __init__( self, *, @@ -2238,11 +2370,11 @@ class AddUserGroupMemberRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["member_id", b"member_id"] + self, field_name: typing.Literal["member_id", b"member_id"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "group_id", @@ -2254,6 +2386,7 @@ class AddUserGroupMemberRequest(google.protobuf.message.Message): global___AddUserGroupMemberRequest = AddUserGroupMemberRequest +@typing.final class AddUserGroupMemberResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2263,6 +2396,7 @@ class AddUserGroupMemberResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2270,16 +2404,15 @@ class AddUserGroupMemberResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___AddUserGroupMemberResponse = AddUserGroupMemberResponse +@typing.final class RemoveUserGroupMemberRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2288,15 +2421,16 @@ class RemoveUserGroupMemberRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int group_id: builtins.str """The id of the group to add the member for.""" + async_operation_id: builtins.str + """The id to use for this async operation. + Optional, if not provided a random id will be generated. + """ @property def member_id( self, ) -> temporalio.api.cloud.identity.v1.message_pb2.UserGroupMemberId: """The member id to add to the group.""" - async_operation_id: builtins.str - """The id to use for this async operation. - Optional, if not provided a random id will be generated. - """ + def __init__( self, *, @@ -2306,11 +2440,11 @@ class RemoveUserGroupMemberRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["member_id", b"member_id"] + self, field_name: typing.Literal["member_id", b"member_id"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "group_id", @@ -2322,6 +2456,7 @@ class RemoveUserGroupMemberRequest(google.protobuf.message.Message): global___RemoveUserGroupMemberRequest = RemoveUserGroupMemberRequest +@typing.final class RemoveUserGroupMemberResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2331,6 +2466,7 @@ class RemoveUserGroupMemberResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2338,16 +2474,15 @@ class RemoveUserGroupMemberResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___RemoveUserGroupMemberResponse = RemoveUserGroupMemberResponse +@typing.final class GetUserGroupMembersRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2371,7 +2506,7 @@ class GetUserGroupMembersRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "group_id", b"group_id", "page_size", @@ -2383,11 +2518,14 @@ class GetUserGroupMembersRequest(google.protobuf.message.Message): global___GetUserGroupMembersRequest = GetUserGroupMembersRequest +@typing.final class GetUserGroupMembersResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor MEMBERS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" @property def members( self, @@ -2395,8 +2533,7 @@ class GetUserGroupMembersResponse(google.protobuf.message.Message): temporalio.api.cloud.identity.v1.message_pb2.UserGroupMember ]: """The list of group members""" - next_page_token: builtins.str - """The next page's token.""" + def __init__( self, *, @@ -2408,23 +2545,25 @@ class GetUserGroupMembersResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "members", b"members", "next_page_token", b"next_page_token" ], ) -> None: ... global___GetUserGroupMembersResponse = GetUserGroupMembersResponse +@typing.final class CreateServiceAccountRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SPEC_FIELD_NUMBER: builtins.int ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + async_operation_id: builtins.str + """The ID to use for this async operation - optional.""" @property def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.ServiceAccountSpec: """The spec of the service account to create.""" - async_operation_id: builtins.str - """The ID to use for this async operation - optional.""" + def __init__( self, *, @@ -2433,17 +2572,18 @@ class CreateServiceAccountRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "spec", b"spec" ], ) -> None: ... global___CreateServiceAccountRequest = CreateServiceAccountRequest +@typing.final class CreateServiceAccountResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2456,6 +2596,7 @@ class CreateServiceAccountResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2464,12 +2605,11 @@ class CreateServiceAccountResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation", b"async_operation", "service_account_id", @@ -2479,6 +2619,7 @@ class CreateServiceAccountResponse(google.protobuf.message.Message): global___CreateServiceAccountResponse = CreateServiceAccountResponse +@typing.final class GetServiceAccountRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2491,14 +2632,12 @@ class GetServiceAccountRequest(google.protobuf.message.Message): service_account_id: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "service_account_id", b"service_account_id" - ], + self, field_name: typing.Literal["service_account_id", b"service_account_id"] ) -> None: ... global___GetServiceAccountRequest = GetServiceAccountRequest +@typing.final class GetServiceAccountResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2508,6 +2647,7 @@ class GetServiceAccountResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.identity.v1.message_pb2.ServiceAccount: """The service account retrieved.""" + def __init__( self, *, @@ -2515,16 +2655,15 @@ class GetServiceAccountResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["service_account", b"service_account"], + self, field_name: typing.Literal["service_account", b"service_account"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["service_account", b"service_account"], + self, field_name: typing.Literal["service_account", b"service_account"] ) -> None: ... global___GetServiceAccountResponse = GetServiceAccountResponse +@typing.final class GetServiceAccountsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2544,18 +2683,21 @@ class GetServiceAccountsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "page_size", b"page_size", "page_token", b"page_token" ], ) -> None: ... global___GetServiceAccountsRequest = GetServiceAccountsRequest +@typing.final class GetServiceAccountsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SERVICE_ACCOUNT_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page token, set if there is another page.""" @property def service_account( self, @@ -2563,8 +2705,7 @@ class GetServiceAccountsResponse(google.protobuf.message.Message): temporalio.api.cloud.identity.v1.message_pb2.ServiceAccount ]: """The list of service accounts in ascending ID order.""" - next_page_token: builtins.str - """The next page token, set if there is another page.""" + def __init__( self, *, @@ -2576,13 +2717,14 @@ class GetServiceAccountsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "next_page_token", b"next_page_token", "service_account", b"service_account" ], ) -> None: ... global___GetServiceAccountsResponse = GetServiceAccountsResponse +@typing.final class UpdateServiceAccountRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2592,15 +2734,16 @@ class UpdateServiceAccountRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int service_account_id: builtins.str """The ID of the service account to update.""" - @property - def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.ServiceAccountSpec: - """The new service account specification.""" resource_version: builtins.str """The version of the service account for which this update is intended for. The latest version can be found in the GetServiceAccount response. """ async_operation_id: builtins.str """The ID to use for this async operation - optional.""" + @property + def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.ServiceAccountSpec: + """The new service account specification.""" + def __init__( self, *, @@ -2611,11 +2754,11 @@ class UpdateServiceAccountRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "resource_version", @@ -2629,6 +2772,7 @@ class UpdateServiceAccountRequest(google.protobuf.message.Message): global___UpdateServiceAccountRequest = UpdateServiceAccountRequest +@typing.final class UpdateServiceAccountResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2638,6 +2782,7 @@ class UpdateServiceAccountResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2645,16 +2790,15 @@ class UpdateServiceAccountResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___UpdateServiceAccountResponse = UpdateServiceAccountResponse +@typing.final class SetServiceAccountNamespaceAccessRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2667,15 +2811,16 @@ class SetServiceAccountNamespaceAccessRequest(google.protobuf.message.Message): """The ID of the service account to update.""" namespace: builtins.str """The namespace to set permissions for.""" - @property - def access(self) -> temporalio.api.cloud.identity.v1.message_pb2.NamespaceAccess: - """The namespace access to assign the service account.""" resource_version: builtins.str """The version of the service account for which this update is intended for. The latest version can be found in the GetServiceAccount response. """ async_operation_id: builtins.str """The ID to use for this async operation - optional.""" + @property + def access(self) -> temporalio.api.cloud.identity.v1.message_pb2.NamespaceAccess: + """The namespace access to assign the service account.""" + def __init__( self, *, @@ -2687,11 +2832,11 @@ class SetServiceAccountNamespaceAccessRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["access", b"access"] + self, field_name: typing.Literal["access", b"access"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "access", b"access", "async_operation_id", @@ -2709,6 +2854,7 @@ global___SetServiceAccountNamespaceAccessRequest = ( SetServiceAccountNamespaceAccessRequest ) +@typing.final class SetServiceAccountNamespaceAccessResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2718,6 +2864,7 @@ class SetServiceAccountNamespaceAccessResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2725,18 +2872,17 @@ class SetServiceAccountNamespaceAccessResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___SetServiceAccountNamespaceAccessResponse = ( SetServiceAccountNamespaceAccessResponse ) +@typing.final class DeleteServiceAccountRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2760,7 +2906,7 @@ class DeleteServiceAccountRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "resource_version", @@ -2772,6 +2918,7 @@ class DeleteServiceAccountRequest(google.protobuf.message.Message): global___DeleteServiceAccountRequest = DeleteServiceAccountRequest +@typing.final class DeleteServiceAccountResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2781,6 +2928,7 @@ class DeleteServiceAccountResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2788,16 +2936,15 @@ class DeleteServiceAccountResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___DeleteServiceAccountResponse = DeleteServiceAccountResponse +@typing.final class GetUsageRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2805,6 +2952,13 @@ class GetUsageRequest(google.protobuf.message.Message): END_TIME_EXCLUSIVE_FIELD_NUMBER: builtins.int PAGE_SIZE_FIELD_NUMBER: builtins.int PAGE_TOKEN_FIELD_NUMBER: builtins.int + page_size: builtins.int + """The requested size of the page to retrieve - optional. + Each count corresponds to a single object - per day per namespace + Cannot exceed 1000. Defaults to 100. + """ + page_token: builtins.str + """The page token if this is continuing from another response - optional.""" @property def start_time_inclusive(self) -> google.protobuf.timestamp_pb2.Timestamp: """Filter for UTC time >= - optional. @@ -2812,6 +2966,7 @@ class GetUsageRequest(google.protobuf.message.Message): Must be: within the last 90 days from the current date. Must be: midnight UTC time. """ + @property def end_time_exclusive(self) -> google.protobuf.timestamp_pb2.Timestamp: """Filter for UTC time < - optional. @@ -2819,13 +2974,7 @@ class GetUsageRequest(google.protobuf.message.Message): Must be: within the last 90 days from the current date. Must be: midnight UTC time. """ - page_size: builtins.int - """The requested size of the page to retrieve - optional. - Each count corresponds to a single object - per day per namespace - Cannot exceed 1000. Defaults to 100. - """ - page_token: builtins.str - """The page token if this is continuing from another response - optional.""" + def __init__( self, *, @@ -2836,7 +2985,7 @@ class GetUsageRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "end_time_exclusive", b"end_time_exclusive", "start_time_inclusive", @@ -2845,7 +2994,7 @@ class GetUsageRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "end_time_exclusive", b"end_time_exclusive", "page_size", @@ -2859,11 +3008,14 @@ class GetUsageRequest(google.protobuf.message.Message): global___GetUsageRequest = GetUsageRequest +@typing.final class GetUsageResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SUMMARIES_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" @property def summaries( self, @@ -2873,8 +3025,7 @@ class GetUsageResponse(google.protobuf.message.Message): """The list of data based on granularity (per Day for now) Ordered by: time range in ascending order """ - next_page_token: builtins.str - """The next page's token.""" + def __init__( self, *, @@ -2886,13 +3037,14 @@ class GetUsageResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "next_page_token", b"next_page_token", "summaries", b"summaries" ], ) -> None: ... global___GetUsageResponse = GetUsageResponse +@typing.final class GetAccountRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2902,6 +3054,7 @@ class GetAccountRequest(google.protobuf.message.Message): global___GetAccountRequest = GetAccountRequest +@typing.final class GetAccountResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2909,29 +3062,26 @@ class GetAccountResponse(google.protobuf.message.Message): @property def account(self) -> temporalio.api.cloud.account.v1.message_pb2.Account: """The account.""" + def __init__( self, *, account: temporalio.api.cloud.account.v1.message_pb2.Account | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["account", b"account"] + self, field_name: typing.Literal["account", b"account"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["account", b"account"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["account", b"account"]) -> None: ... global___GetAccountResponse = GetAccountResponse +@typing.final class UpdateAccountRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SPEC_FIELD_NUMBER: builtins.int RESOURCE_VERSION_FIELD_NUMBER: builtins.int ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int - @property - def spec(self) -> temporalio.api.cloud.account.v1.message_pb2.AccountSpec: - """The updated account specification to apply.""" resource_version: builtins.str """The version of the account for which this update is intended for. The latest version can be found in the GetAccount operation response. @@ -2940,6 +3090,10 @@ class UpdateAccountRequest(google.protobuf.message.Message): """The id to use for this async operation. Optional, if not provided a random id will be generated. """ + @property + def spec(self) -> temporalio.api.cloud.account.v1.message_pb2.AccountSpec: + """The updated account specification to apply.""" + def __init__( self, *, @@ -2948,11 +3102,11 @@ class UpdateAccountRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "resource_version", @@ -2964,6 +3118,7 @@ class UpdateAccountRequest(google.protobuf.message.Message): global___UpdateAccountRequest = UpdateAccountRequest +@typing.final class UpdateAccountResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2973,6 +3128,7 @@ class UpdateAccountResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -2980,16 +3136,15 @@ class UpdateAccountResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___UpdateAccountResponse = UpdateAccountResponse +@typing.final class CreateNamespaceExportSinkRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2998,11 +3153,12 @@ class CreateNamespaceExportSinkRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """The namespace under which the sink is configured.""" + async_operation_id: builtins.str + """Optional. The ID to use for this async operation.""" @property def spec(self) -> temporalio.api.cloud.namespace.v1.message_pb2.ExportSinkSpec: """The specification for the export sink.""" - async_operation_id: builtins.str - """Optional. The ID to use for this async operation.""" + def __init__( self, *, @@ -3011,11 +3167,11 @@ class CreateNamespaceExportSinkRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "namespace", @@ -3027,6 +3183,7 @@ class CreateNamespaceExportSinkRequest(google.protobuf.message.Message): global___CreateNamespaceExportSinkRequest = CreateNamespaceExportSinkRequest +@typing.final class CreateNamespaceExportSinkResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3036,6 +3193,7 @@ class CreateNamespaceExportSinkResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -3043,16 +3201,15 @@ class CreateNamespaceExportSinkResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___CreateNamespaceExportSinkResponse = CreateNamespaceExportSinkResponse +@typing.final class GetNamespaceExportSinkRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3069,14 +3226,12 @@ class GetNamespaceExportSinkRequest(google.protobuf.message.Message): name: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "name", b"name", "namespace", b"namespace" - ], + self, field_name: typing.Literal["name", b"name", "namespace", b"namespace"] ) -> None: ... global___GetNamespaceExportSinkRequest = GetNamespaceExportSinkRequest +@typing.final class GetNamespaceExportSinkResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3084,20 +3239,20 @@ class GetNamespaceExportSinkResponse(google.protobuf.message.Message): @property def sink(self) -> temporalio.api.cloud.namespace.v1.message_pb2.ExportSink: """The export sink retrieved.""" + def __init__( self, *, sink: temporalio.api.cloud.namespace.v1.message_pb2.ExportSink | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["sink", b"sink"] + self, field_name: typing.Literal["sink", b"sink"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["sink", b"sink"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["sink", b"sink"]) -> None: ... global___GetNamespaceExportSinkResponse = GetNamespaceExportSinkResponse +@typing.final class GetNamespaceExportSinksRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3121,7 +3276,7 @@ class GetNamespaceExportSinksRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "page_size", @@ -3133,11 +3288,14 @@ class GetNamespaceExportSinksRequest(google.protobuf.message.Message): global___GetNamespaceExportSinksRequest = GetNamespaceExportSinksRequest +@typing.final class GetNamespaceExportSinksResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SINKS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page token, set if there is another page.""" @property def sinks( self, @@ -3145,8 +3303,7 @@ class GetNamespaceExportSinksResponse(google.protobuf.message.Message): temporalio.api.cloud.namespace.v1.message_pb2.ExportSink ]: """The list of export sinks retrieved.""" - next_page_token: builtins.str - """The next page token, set if there is another page.""" + def __init__( self, *, @@ -3158,13 +3315,14 @@ class GetNamespaceExportSinksResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "next_page_token", b"next_page_token", "sinks", b"sinks" ], ) -> None: ... global___GetNamespaceExportSinksResponse = GetNamespaceExportSinksResponse +@typing.final class UpdateNamespaceExportSinkRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3174,15 +3332,16 @@ class UpdateNamespaceExportSinkRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """The namespace to which the sink belongs.""" - @property - def spec(self) -> temporalio.api.cloud.namespace.v1.message_pb2.ExportSinkSpec: - """The updated export sink specification.""" resource_version: builtins.str """The version of the sink to update. The latest version can be retrieved using the GetNamespaceExportSink call. """ async_operation_id: builtins.str """The ID to use for this async operation - optional.""" + @property + def spec(self) -> temporalio.api.cloud.namespace.v1.message_pb2.ExportSinkSpec: + """The updated export sink specification.""" + def __init__( self, *, @@ -3192,11 +3351,11 @@ class UpdateNamespaceExportSinkRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "namespace", @@ -3210,6 +3369,7 @@ class UpdateNamespaceExportSinkRequest(google.protobuf.message.Message): global___UpdateNamespaceExportSinkRequest = UpdateNamespaceExportSinkRequest +@typing.final class UpdateNamespaceExportSinkResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3219,6 +3379,7 @@ class UpdateNamespaceExportSinkResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -3226,16 +3387,15 @@ class UpdateNamespaceExportSinkResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___UpdateNamespaceExportSinkResponse = UpdateNamespaceExportSinkResponse +@typing.final class DeleteNamespaceExportSinkRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3263,7 +3423,7 @@ class DeleteNamespaceExportSinkRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "name", @@ -3277,6 +3437,7 @@ class DeleteNamespaceExportSinkRequest(google.protobuf.message.Message): global___DeleteNamespaceExportSinkRequest = DeleteNamespaceExportSinkRequest +@typing.final class DeleteNamespaceExportSinkResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3286,6 +3447,7 @@ class DeleteNamespaceExportSinkResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -3293,16 +3455,15 @@ class DeleteNamespaceExportSinkResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___DeleteNamespaceExportSinkResponse = DeleteNamespaceExportSinkResponse +@typing.final class ValidateNamespaceExportSinkRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3313,6 +3474,7 @@ class ValidateNamespaceExportSinkRequest(google.protobuf.message.Message): @property def spec(self) -> temporalio.api.cloud.namespace.v1.message_pb2.ExportSinkSpec: """The export sink specification to validate.""" + def __init__( self, *, @@ -3320,17 +3482,15 @@ class ValidateNamespaceExportSinkRequest(google.protobuf.message.Message): spec: temporalio.api.cloud.namespace.v1.message_pb2.ExportSinkSpec | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "namespace", b"namespace", "spec", b"spec" - ], + self, field_name: typing.Literal["namespace", b"namespace", "spec", b"spec"] ) -> None: ... global___ValidateNamespaceExportSinkRequest = ValidateNamespaceExportSinkRequest +@typing.final class ValidateNamespaceExportSinkResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3340,9 +3500,11 @@ class ValidateNamespaceExportSinkResponse(google.protobuf.message.Message): global___ValidateNamespaceExportSinkResponse = ValidateNamespaceExportSinkResponse +@typing.final class UpdateNamespaceTagsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class TagsToUpsertEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3357,8 +3519,7 @@ class UpdateNamespaceTagsRequest(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... NAMESPACE_FIELD_NUMBER: builtins.int @@ -3367,6 +3528,8 @@ class UpdateNamespaceTagsRequest(google.protobuf.message.Message): ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """The namespace to set tags for.""" + async_operation_id: builtins.str + """The id to use for this async operation - optional.""" @property def tags_to_upsert( self, @@ -3375,6 +3538,7 @@ class UpdateNamespaceTagsRequest(google.protobuf.message.Message): If a key of an existing tag is added, the tag's value is updated. At least one of tags_to_upsert or tags_to_remove must be specified. """ + @property def tags_to_remove( self, @@ -3383,8 +3547,7 @@ class UpdateNamespaceTagsRequest(google.protobuf.message.Message): If a tag key doesn't exist, it is silently ignored. At least one of tags_to_upsert or tags_to_remove must be specified. """ - async_operation_id: builtins.str - """The id to use for this async operation - optional.""" + def __init__( self, *, @@ -3396,7 +3559,7 @@ class UpdateNamespaceTagsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "namespace", @@ -3410,6 +3573,7 @@ class UpdateNamespaceTagsRequest(google.protobuf.message.Message): global___UpdateNamespaceTagsRequest = UpdateNamespaceTagsRequest +@typing.final class UpdateNamespaceTagsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3419,6 +3583,7 @@ class UpdateNamespaceTagsResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation.""" + def __init__( self, *, @@ -3426,30 +3591,30 @@ class UpdateNamespaceTagsResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> None: ... global___UpdateNamespaceTagsResponse = UpdateNamespaceTagsResponse +@typing.final class CreateConnectivityRuleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SPEC_FIELD_NUMBER: builtins.int ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + async_operation_id: builtins.str + """The id to use for this async operation. + Optional, if not provided a random id will be generated. + """ @property def spec( self, ) -> temporalio.api.cloud.connectivityrule.v1.message_pb2.ConnectivityRuleSpec: """The connectivity rule specification.""" - async_operation_id: builtins.str - """The id to use for this async operation. - Optional, if not provided a random id will be generated. - """ + def __init__( self, *, @@ -3458,17 +3623,18 @@ class CreateConnectivityRuleRequest(google.protobuf.message.Message): async_operation_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "spec", b"spec" ], ) -> None: ... global___CreateConnectivityRuleRequest = CreateConnectivityRuleRequest +@typing.final class CreateConnectivityRuleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3481,6 +3647,7 @@ class CreateConnectivityRuleResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation""" + def __init__( self, *, @@ -3489,12 +3656,11 @@ class CreateConnectivityRuleResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + self, field_name: typing.Literal["async_operation", b"async_operation"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation", b"async_operation", "connectivity_rule_id", @@ -3504,6 +3670,7 @@ class CreateConnectivityRuleResponse(google.protobuf.message.Message): global___CreateConnectivityRuleResponse = CreateConnectivityRuleResponse +@typing.final class GetConnectivityRuleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3517,13 +3684,12 @@ class GetConnectivityRuleRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "connectivity_rule_id", b"connectivity_rule_id" - ], + field_name: typing.Literal["connectivity_rule_id", b"connectivity_rule_id"], ) -> None: ... global___GetConnectivityRuleRequest = GetConnectivityRuleRequest +@typing.final class GetConnectivityRuleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3539,20 +3705,15 @@ class GetConnectivityRuleResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "connectivity_rule", b"connectivity_rule" - ], + self, field_name: typing.Literal["connectivity_rule", b"connectivity_rule"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "connectivity_rule", b"connectivity_rule" - ], + self, field_name: typing.Literal["connectivity_rule", b"connectivity_rule"] ) -> None: ... global___GetConnectivityRuleResponse = GetConnectivityRuleResponse +@typing.final class GetConnectivityRulesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3578,7 +3739,7 @@ class GetConnectivityRulesRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "page_size", @@ -3590,11 +3751,14 @@ class GetConnectivityRulesRequest(google.protobuf.message.Message): global___GetConnectivityRulesRequest = GetConnectivityRulesRequest +@typing.final class GetConnectivityRulesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor CONNECTIVITY_RULES_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page token""" @property def connectivity_rules( self, @@ -3602,8 +3766,7 @@ class GetConnectivityRulesResponse(google.protobuf.message.Message): temporalio.api.cloud.connectivityrule.v1.message_pb2.ConnectivityRule ]: """connectivity_rules returned""" - next_page_token: builtins.str - """The next page token""" + def __init__( self, *, @@ -3615,7 +3778,7 @@ class GetConnectivityRulesResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "connectivity_rules", b"connectivity_rules", "next_page_token", @@ -3625,6 +3788,7 @@ class GetConnectivityRulesResponse(google.protobuf.message.Message): global___GetConnectivityRulesResponse = GetConnectivityRulesResponse +@typing.final class DeleteConnectivityRuleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3650,7 +3814,7 @@ class DeleteConnectivityRuleRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "connectivity_rule_id", @@ -3662,6 +3826,7 @@ class DeleteConnectivityRuleRequest(google.protobuf.message.Message): global___DeleteConnectivityRuleRequest = DeleteConnectivityRuleRequest +@typing.final class DeleteConnectivityRuleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3671,23 +3836,112 @@ class DeleteConnectivityRuleResponse(google.protobuf.message.Message): self, ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: """The async operation""" + def __init__( self, *, async_operation: temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation | None = ..., ) -> None: ... + def HasField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> None: ... + +global___DeleteConnectivityRuleResponse = DeleteConnectivityRuleResponse + +@typing.final +class GetAuditLogsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PAGE_SIZE_FIELD_NUMBER: builtins.int + PAGE_TOKEN_FIELD_NUMBER: builtins.int + START_TIME_INCLUSIVE_FIELD_NUMBER: builtins.int + END_TIME_EXCLUSIVE_FIELD_NUMBER: builtins.int + page_size: builtins.int + """The requested size of the page to retrieve - optional. + Cannot exceed 1000. Defaults to 100. + """ + page_token: builtins.str + """The page token if this is continuing from another response - optional.""" + @property + def start_time_inclusive(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Filter for UTC time >= (defaults to 30 days ago) - optional.""" + + @property + def end_time_exclusive(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Filter for UTC time < (defaults to current time) - optional.""" + + def __init__( + self, + *, + page_size: builtins.int = ..., + page_token: builtins.str = ..., + start_time_inclusive: google.protobuf.timestamp_pb2.Timestamp | None = ..., + end_time_exclusive: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + field_name: typing.Literal[ + "end_time_exclusive", + b"end_time_exclusive", + "start_time_inclusive", + b"start_time_inclusive", + ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal["async_operation", b"async_operation"], + field_name: typing.Literal[ + "end_time_exclusive", + b"end_time_exclusive", + "page_size", + b"page_size", + "page_token", + b"page_token", + "start_time_inclusive", + b"start_time_inclusive", + ], + ) -> None: ... + +global___GetAuditLogsRequest = GetAuditLogsRequest + +@typing.final +class GetAuditLogsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOGS_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" + @property + def logs( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.cloud.auditlog.v1.message_pb2.LogRecord + ]: + """The list of audit logs ordered by emit time, log_id""" + + def __init__( + self, + *, + logs: collections.abc.Iterable[ + temporalio.api.cloud.auditlog.v1.message_pb2.LogRecord + ] + | None = ..., + next_page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "logs", b"logs", "next_page_token", b"next_page_token" + ], ) -> None: ... -global___DeleteConnectivityRuleResponse = DeleteConnectivityRuleResponse +global___GetAuditLogsResponse = GetAuditLogsResponse +@typing.final class ValidateAccountAuditLogSinkRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3695,20 +3949,20 @@ class ValidateAccountAuditLogSinkRequest(google.protobuf.message.Message): @property def spec(self) -> temporalio.api.cloud.account.v1.message_pb2.AuditLogSinkSpec: """The audit log sink spec that will be validated""" + def __init__( self, *, spec: temporalio.api.cloud.account.v1.message_pb2.AuditLogSinkSpec | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["spec", b"spec"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["spec", b"spec"]) -> None: ... global___ValidateAccountAuditLogSinkRequest = ValidateAccountAuditLogSinkRequest +@typing.final class ValidateAccountAuditLogSinkResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3717,3 +3971,969 @@ class ValidateAccountAuditLogSinkResponse(google.protobuf.message.Message): ) -> None: ... global___ValidateAccountAuditLogSinkResponse = ValidateAccountAuditLogSinkResponse + +@typing.final +class CreateAccountAuditLogSinkRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SPEC_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + async_operation_id: builtins.str + """Optional. The ID to use for this async operation.""" + @property + def spec(self) -> temporalio.api.cloud.account.v1.message_pb2.AuditLogSinkSpec: + """The specification for the audit log sink.""" + + def __init__( + self, + *, + spec: temporalio.api.cloud.account.v1.message_pb2.AuditLogSinkSpec | None = ..., + async_operation_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["spec", b"spec"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", b"async_operation_id", "spec", b"spec" + ], + ) -> None: ... + +global___CreateAccountAuditLogSinkRequest = CreateAccountAuditLogSinkRequest + +@typing.final +class CreateAccountAuditLogSinkResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_OPERATION_FIELD_NUMBER: builtins.int + @property + def async_operation( + self, + ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: + """The async operation.""" + + def __init__( + self, + *, + async_operation: temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> None: ... + +global___CreateAccountAuditLogSinkResponse = CreateAccountAuditLogSinkResponse + +@typing.final +class GetAccountAuditLogSinkRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + name: builtins.str + """The name of the sink to retrieve.""" + def __init__( + self, + *, + name: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["name", b"name"]) -> None: ... + +global___GetAccountAuditLogSinkRequest = GetAccountAuditLogSinkRequest + +@typing.final +class GetAccountAuditLogSinkResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SINK_FIELD_NUMBER: builtins.int + @property + def sink(self) -> temporalio.api.cloud.account.v1.message_pb2.AuditLogSink: + """The audit log sink retrieved.""" + + def __init__( + self, + *, + sink: temporalio.api.cloud.account.v1.message_pb2.AuditLogSink | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["sink", b"sink"] + ) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["sink", b"sink"]) -> None: ... + +global___GetAccountAuditLogSinkResponse = GetAccountAuditLogSinkResponse + +@typing.final +class GetAccountAuditLogSinksRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PAGE_SIZE_FIELD_NUMBER: builtins.int + PAGE_TOKEN_FIELD_NUMBER: builtins.int + page_size: builtins.int + """The requested size of the page to retrieve. Cannot exceed 1000. + Defaults to 100 if not specified. + """ + page_token: builtins.str + """The page token if this is continuing from another response - optional.""" + def __init__( + self, + *, + page_size: builtins.int = ..., + page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "page_size", b"page_size", "page_token", b"page_token" + ], + ) -> None: ... + +global___GetAccountAuditLogSinksRequest = GetAccountAuditLogSinksRequest + +@typing.final +class GetAccountAuditLogSinksResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SINKS_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page token, set if there is another page.""" + @property + def sinks( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.cloud.account.v1.message_pb2.AuditLogSink + ]: + """The list of audit log sinks retrieved.""" + + def __init__( + self, + *, + sinks: collections.abc.Iterable[ + temporalio.api.cloud.account.v1.message_pb2.AuditLogSink + ] + | None = ..., + next_page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "next_page_token", b"next_page_token", "sinks", b"sinks" + ], + ) -> None: ... + +global___GetAccountAuditLogSinksResponse = GetAccountAuditLogSinksResponse + +@typing.final +class UpdateAccountAuditLogSinkRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SPEC_FIELD_NUMBER: builtins.int + RESOURCE_VERSION_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + resource_version: builtins.str + """The version of the audit log sink to update. The latest version can be + retrieved using the GetAuditLogSink call. + """ + async_operation_id: builtins.str + """The ID to use for this async operation - optional.""" + @property + def spec(self) -> temporalio.api.cloud.account.v1.message_pb2.AuditLogSinkSpec: + """The updated audit log sink specification.""" + + def __init__( + self, + *, + spec: temporalio.api.cloud.account.v1.message_pb2.AuditLogSinkSpec | None = ..., + resource_version: builtins.str = ..., + async_operation_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["spec", b"spec"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", + b"async_operation_id", + "resource_version", + b"resource_version", + "spec", + b"spec", + ], + ) -> None: ... + +global___UpdateAccountAuditLogSinkRequest = UpdateAccountAuditLogSinkRequest + +@typing.final +class UpdateAccountAuditLogSinkResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_OPERATION_FIELD_NUMBER: builtins.int + @property + def async_operation( + self, + ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: + """The async operation.""" + + def __init__( + self, + *, + async_operation: temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> None: ... + +global___UpdateAccountAuditLogSinkResponse = UpdateAccountAuditLogSinkResponse + +@typing.final +class DeleteAccountAuditLogSinkRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + RESOURCE_VERSION_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + name: builtins.str + """The name of the sink to delete.""" + resource_version: builtins.str + """The version of the sink to delete. The latest version can be + retrieved using the GetAccountAuditLogSink call. + """ + async_operation_id: builtins.str + """The ID to use for this async operation - optional.""" + def __init__( + self, + *, + name: builtins.str = ..., + resource_version: builtins.str = ..., + async_operation_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", + b"async_operation_id", + "name", + b"name", + "resource_version", + b"resource_version", + ], + ) -> None: ... + +global___DeleteAccountAuditLogSinkRequest = DeleteAccountAuditLogSinkRequest + +@typing.final +class DeleteAccountAuditLogSinkResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_OPERATION_FIELD_NUMBER: builtins.int + @property + def async_operation( + self, + ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: + """The async operation.""" + + def __init__( + self, + *, + async_operation: temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> None: ... + +global___DeleteAccountAuditLogSinkResponse = DeleteAccountAuditLogSinkResponse + +@typing.final +class GetNamespaceCapacityInfoRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + namespace: builtins.str + """The namespace identifier. + Required. + """ + def __init__( + self, + *, + namespace: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["namespace", b"namespace"] + ) -> None: ... + +global___GetNamespaceCapacityInfoRequest = GetNamespaceCapacityInfoRequest + +@typing.final +class GetNamespaceCapacityInfoResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CAPACITY_INFO_FIELD_NUMBER: builtins.int + @property + def capacity_info( + self, + ) -> temporalio.api.cloud.namespace.v1.message_pb2.NamespaceCapacityInfo: + """Capacity information for the namespace.""" + + def __init__( + self, + *, + capacity_info: temporalio.api.cloud.namespace.v1.message_pb2.NamespaceCapacityInfo + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["capacity_info", b"capacity_info"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["capacity_info", b"capacity_info"] + ) -> None: ... + +global___GetNamespaceCapacityInfoResponse = GetNamespaceCapacityInfoResponse + +@typing.final +class CreateBillingReportRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SPEC_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + async_operation_id: builtins.str + """Optional, if not provided a random id will be generated.""" + @property + def spec(self) -> temporalio.api.cloud.billing.v1.message_pb2.BillingReportSpec: + """The specification for the billing report.""" + + def __init__( + self, + *, + spec: temporalio.api.cloud.billing.v1.message_pb2.BillingReportSpec + | None = ..., + async_operation_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["spec", b"spec"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", b"async_operation_id", "spec", b"spec" + ], + ) -> None: ... + +global___CreateBillingReportRequest = CreateBillingReportRequest + +@typing.final +class CreateBillingReportResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BILLING_REPORT_ID_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_FIELD_NUMBER: builtins.int + billing_report_id: builtins.str + """The id of the billing report created.""" + @property + def async_operation( + self, + ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: + """The async operation.""" + + def __init__( + self, + *, + billing_report_id: builtins.str = ..., + async_operation: temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation", + b"async_operation", + "billing_report_id", + b"billing_report_id", + ], + ) -> None: ... + +global___CreateBillingReportResponse = CreateBillingReportResponse + +@typing.final +class GetBillingReportRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BILLING_REPORT_ID_FIELD_NUMBER: builtins.int + billing_report_id: builtins.str + """The id of the billing report to retrieve.""" + def __init__( + self, + *, + billing_report_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["billing_report_id", b"billing_report_id"] + ) -> None: ... + +global___GetBillingReportRequest = GetBillingReportRequest + +@typing.final +class GetBillingReportResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BILLING_REPORT_FIELD_NUMBER: builtins.int + @property + def billing_report( + self, + ) -> temporalio.api.cloud.billing.v1.message_pb2.BillingReport: + """The billing report retrieved.""" + + def __init__( + self, + *, + billing_report: temporalio.api.cloud.billing.v1.message_pb2.BillingReport + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["billing_report", b"billing_report"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["billing_report", b"billing_report"] + ) -> None: ... + +global___GetBillingReportResponse = GetBillingReportResponse + +@typing.final +class GetCustomRolesRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PAGE_SIZE_FIELD_NUMBER: builtins.int + PAGE_TOKEN_FIELD_NUMBER: builtins.int + page_size: builtins.int + """The requested size of the page to retrieve. + Cannot exceed 1000. Defaults to 100. + """ + page_token: builtins.str + """The page token if this is continuing from another response.""" + def __init__( + self, + *, + page_size: builtins.int = ..., + page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "page_size", b"page_size", "page_token", b"page_token" + ], + ) -> None: ... + +global___GetCustomRolesRequest = GetCustomRolesRequest + +@typing.final +class GetCustomRolesResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CUSTOM_ROLES_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page token.""" + @property + def custom_roles( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.cloud.identity.v1.message_pb2.CustomRole + ]: + """The list of custom roles in ascending ID order.""" + + def __init__( + self, + *, + custom_roles: collections.abc.Iterable[ + temporalio.api.cloud.identity.v1.message_pb2.CustomRole + ] + | None = ..., + next_page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "custom_roles", b"custom_roles", "next_page_token", b"next_page_token" + ], + ) -> None: ... + +global___GetCustomRolesResponse = GetCustomRolesResponse + +@typing.final +class GetCustomRoleRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ROLE_ID_FIELD_NUMBER: builtins.int + role_id: builtins.str + """The ID of the custom role to retrieve.""" + def __init__( + self, + *, + role_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["role_id", b"role_id"]) -> None: ... + +global___GetCustomRoleRequest = GetCustomRoleRequest + +@typing.final +class GetCustomRoleResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CUSTOM_ROLE_FIELD_NUMBER: builtins.int + @property + def custom_role(self) -> temporalio.api.cloud.identity.v1.message_pb2.CustomRole: + """The custom role retrieved.""" + + def __init__( + self, + *, + custom_role: temporalio.api.cloud.identity.v1.message_pb2.CustomRole + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["custom_role", b"custom_role"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["custom_role", b"custom_role"] + ) -> None: ... + +global___GetCustomRoleResponse = GetCustomRoleResponse + +@typing.final +class CreateCustomRoleRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SPEC_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + async_operation_id: builtins.str + """The ID to use for this async operation. + Optional, if not provided a random ID will be generated. + """ + @property + def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.CustomRoleSpec: + """The specification for the custom role to create.""" + + def __init__( + self, + *, + spec: temporalio.api.cloud.identity.v1.message_pb2.CustomRoleSpec | None = ..., + async_operation_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["spec", b"spec"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", b"async_operation_id", "spec", b"spec" + ], + ) -> None: ... + +global___CreateCustomRoleRequest = CreateCustomRoleRequest + +@typing.final +class CreateCustomRoleResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ROLE_ID_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_FIELD_NUMBER: builtins.int + role_id: builtins.str + """The ID of the custom role created.""" + @property + def async_operation( + self, + ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: + """The async operation.""" + + def __init__( + self, + *, + role_id: builtins.str = ..., + async_operation: temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation", b"async_operation", "role_id", b"role_id" + ], + ) -> None: ... + +global___CreateCustomRoleResponse = CreateCustomRoleResponse + +@typing.final +class UpdateCustomRoleRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ROLE_ID_FIELD_NUMBER: builtins.int + SPEC_FIELD_NUMBER: builtins.int + RESOURCE_VERSION_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + role_id: builtins.str + """The ID of the custom role to update.""" + resource_version: builtins.str + """The version of the custom role for which this update is intended. + The latest version can be found in the GetCustomRole operation response. + """ + async_operation_id: builtins.str + """The ID to use for this async operation. + Optional, if not provided a random ID will be generated. + """ + @property + def spec(self) -> temporalio.api.cloud.identity.v1.message_pb2.CustomRoleSpec: + """The new custom role specification.""" + + def __init__( + self, + *, + role_id: builtins.str = ..., + spec: temporalio.api.cloud.identity.v1.message_pb2.CustomRoleSpec | None = ..., + resource_version: builtins.str = ..., + async_operation_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["spec", b"spec"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", + b"async_operation_id", + "resource_version", + b"resource_version", + "role_id", + b"role_id", + "spec", + b"spec", + ], + ) -> None: ... + +global___UpdateCustomRoleRequest = UpdateCustomRoleRequest + +@typing.final +class UpdateCustomRoleResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_OPERATION_FIELD_NUMBER: builtins.int + @property + def async_operation( + self, + ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: + """The async operation.""" + + def __init__( + self, + *, + async_operation: temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> None: ... + +global___UpdateCustomRoleResponse = UpdateCustomRoleResponse + +@typing.final +class DeleteCustomRoleRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ROLE_ID_FIELD_NUMBER: builtins.int + RESOURCE_VERSION_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + role_id: builtins.str + """The ID of the custom role to delete.""" + resource_version: builtins.str + """The version of the custom role for which this delete is intended. + The latest version can be found in the GetCustomRole operation response. + """ + async_operation_id: builtins.str + """The ID to use for this async operation. + Optional, if not provided a random ID will be generated. + """ + def __init__( + self, + *, + role_id: builtins.str = ..., + resource_version: builtins.str = ..., + async_operation_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", + b"async_operation_id", + "resource_version", + b"resource_version", + "role_id", + b"role_id", + ], + ) -> None: ... + +global___DeleteCustomRoleRequest = DeleteCustomRoleRequest + +@typing.final +class DeleteCustomRoleResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_OPERATION_FIELD_NUMBER: builtins.int + @property + def async_operation( + self, + ) -> temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation: + """The async operation.""" + + def __init__( + self, + *, + async_operation: temporalio.api.cloud.operation.v1.message_pb2.AsyncOperation + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["async_operation", b"async_operation"] + ) -> None: ... + +global___DeleteCustomRoleResponse = DeleteCustomRoleResponse + +@typing.final +class GetUserNamespaceAssignmentsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + PAGE_SIZE_FIELD_NUMBER: builtins.int + PAGE_TOKEN_FIELD_NUMBER: builtins.int + namespace: builtins.str + """The namespace to get users for.""" + page_size: builtins.int + """The requested size of the page to retrieve - optional. + Cannot exceed 1000. Defaults to 100. + """ + page_token: builtins.str + """The page token if this is continuing from another response - optional.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + page_size: builtins.int = ..., + page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "namespace", + b"namespace", + "page_size", + b"page_size", + "page_token", + b"page_token", + ], + ) -> None: ... + +global___GetUserNamespaceAssignmentsRequest = GetUserNamespaceAssignmentsRequest + +@typing.final +class GetUserNamespaceAssignmentsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + USERS_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" + @property + def users( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.cloud.identity.v1.message_pb2.UserNamespaceAssignment + ]: + """The list of users with access to the namespace.""" + + def __init__( + self, + *, + users: collections.abc.Iterable[ + temporalio.api.cloud.identity.v1.message_pb2.UserNamespaceAssignment + ] + | None = ..., + next_page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "next_page_token", b"next_page_token", "users", b"users" + ], + ) -> None: ... + +global___GetUserNamespaceAssignmentsResponse = GetUserNamespaceAssignmentsResponse + +@typing.final +class GetServiceAccountNamespaceAssignmentsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + PAGE_SIZE_FIELD_NUMBER: builtins.int + PAGE_TOKEN_FIELD_NUMBER: builtins.int + namespace: builtins.str + """The namespace to get service accounts for.""" + page_size: builtins.int + """The requested size of the page to retrieve - optional. + Cannot exceed 1000. Defaults to 100. + """ + page_token: builtins.str + """The page token if this is continuing from another response - optional.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + page_size: builtins.int = ..., + page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "namespace", + b"namespace", + "page_size", + b"page_size", + "page_token", + b"page_token", + ], + ) -> None: ... + +global___GetServiceAccountNamespaceAssignmentsRequest = ( + GetServiceAccountNamespaceAssignmentsRequest +) + +@typing.final +class GetServiceAccountNamespaceAssignmentsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SERVICE_ACCOUNTS_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" + @property + def service_accounts( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.cloud.identity.v1.message_pb2.ServiceAccountNamespaceAssignment + ]: + """The list of service accounts with access to the namespace.""" + + def __init__( + self, + *, + service_accounts: collections.abc.Iterable[ + temporalio.api.cloud.identity.v1.message_pb2.ServiceAccountNamespaceAssignment + ] + | None = ..., + next_page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "next_page_token", + b"next_page_token", + "service_accounts", + b"service_accounts", + ], + ) -> None: ... + +global___GetServiceAccountNamespaceAssignmentsResponse = ( + GetServiceAccountNamespaceAssignmentsResponse +) + +@typing.final +class GetUserGroupNamespaceAssignmentsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + PAGE_SIZE_FIELD_NUMBER: builtins.int + PAGE_TOKEN_FIELD_NUMBER: builtins.int + namespace: builtins.str + """The namespace to get user groups for.""" + page_size: builtins.int + """The requested size of the page to retrieve - optional. + Cannot exceed 1000. Defaults to 100. + """ + page_token: builtins.str + """The page token if this is continuing from another response - optional.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + page_size: builtins.int = ..., + page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "namespace", + b"namespace", + "page_size", + b"page_size", + "page_token", + b"page_token", + ], + ) -> None: ... + +global___GetUserGroupNamespaceAssignmentsRequest = ( + GetUserGroupNamespaceAssignmentsRequest +) + +@typing.final +class GetUserGroupNamespaceAssignmentsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + GROUPS_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.str + """The next page's token.""" + @property + def groups( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.cloud.identity.v1.message_pb2.UserGroupNamespaceAssignment + ]: + """The list of user groups with access to the namespace.""" + + def __init__( + self, + *, + groups: collections.abc.Iterable[ + temporalio.api.cloud.identity.v1.message_pb2.UserGroupNamespaceAssignment + ] + | None = ..., + next_page_token: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "groups", b"groups", "next_page_token", b"next_page_token" + ], + ) -> None: ... + +global___GetUserGroupNamespaceAssignmentsResponse = ( + GetUserGroupNamespaceAssignmentsResponse +) diff --git a/temporalio/api/cloud/cloudservice/v1/request_response_pb2_grpc.pyi b/temporalio/api/cloud/cloudservice/v1/request_response_pb2_grpc.pyi index f3a5a087ef..de236ac811 100644 --- a/temporalio/api/cloud/cloudservice/v1/request_response_pb2_grpc.pyi +++ b/temporalio/api/cloud/cloudservice/v1/request_response_pb2_grpc.pyi @@ -2,3 +2,20 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + +import abc +import collections.abc +import typing + +import grpc +import grpc.aio + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator( + collections.abc.AsyncIterator[_T], + collections.abc.Iterator[_T], + metaclass=abc.ABCMeta, +): ... +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... diff --git a/temporalio/api/cloud/cloudservice/v1/service_pb2.py b/temporalio/api/cloud/cloudservice/v1/service_pb2.py index 6a5d7beab7..759b401817 100644 --- a/temporalio/api/cloud/cloudservice/v1/service_pb2.py +++ b/temporalio/api/cloud/cloudservice/v1/service_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -19,308 +18,325 @@ from temporalio.api.cloud.cloudservice.v1 import ( request_response_pb2 as temporal_dot_api_dot_cloud_dot_cloudservice_dot_v1_dot_request__response__pb2, ) +from temporalio.api.dependencies.protoc_gen_openapiv2.options import ( + annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2, +) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n0temporal/api/cloud/cloudservice/v1/service.proto\x12"temporal.api.cloud.cloudservice.v1\x1a\x39temporal/api/cloud/cloudservice/v1/request_response.proto\x1a\x1cgoogle/api/annotations.proto2\xeeV\n\x0c\x43loudService\x12\x8b\x01\n\x08GetUsers\x12\x33.temporal.api.cloud.cloudservice.v1.GetUsersRequest\x1a\x34.temporal.api.cloud.cloudservice.v1.GetUsersResponse"\x14\x82\xd3\xe4\x93\x02\x0e\x12\x0c/cloud/users\x12\x92\x01\n\x07GetUser\x12\x32.temporal.api.cloud.cloudservice.v1.GetUserRequest\x1a\x33.temporal.api.cloud.cloudservice.v1.GetUserResponse"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/cloud/users/{user_id}\x12\x94\x01\n\nCreateUser\x12\x35.temporal.api.cloud.cloudservice.v1.CreateUserRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.CreateUserResponse"\x17\x82\xd3\xe4\x93\x02\x11"\x0c/cloud/users:\x01*\x12\x9e\x01\n\nUpdateUser\x12\x35.temporal.api.cloud.cloudservice.v1.UpdateUserRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.UpdateUserResponse"!\x82\xd3\xe4\x93\x02\x1b"\x16/cloud/users/{user_id}:\x01*\x12\x9b\x01\n\nDeleteUser\x12\x35.temporal.api.cloud.cloudservice.v1.DeleteUserRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.DeleteUserResponse"\x1e\x82\xd3\xe4\x93\x02\x18*\x16/cloud/users/{user_id}\x12\xe0\x01\n\x16SetUserNamespaceAccess\x12\x41.temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest\x1a\x42.temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse"?\x82\xd3\xe4\x93\x02\x39"4/cloud/namespaces/{namespace}/users/{user_id}/access:\x01*\x12\xc0\x01\n\x11GetAsyncOperation\x12<.temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest\x1a=.temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse".\x82\xd3\xe4\x93\x02(\x12&/cloud/operations/{async_operation_id}\x12\xa8\x01\n\x0f\x43reateNamespace\x12:.temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest\x1a;.temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse"\x1c\x82\xd3\xe4\x93\x02\x16"\x11/cloud/namespaces:\x01*\x12\x9f\x01\n\rGetNamespaces\x12\x38.temporal.api.cloud.cloudservice.v1.GetNamespacesRequest\x1a\x39.temporal.api.cloud.cloudservice.v1.GetNamespacesResponse"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/cloud/namespaces\x12\xa8\x01\n\x0cGetNamespace\x12\x37.temporal.api.cloud.cloudservice.v1.GetNamespaceRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.GetNamespaceResponse"%\x82\xd3\xe4\x93\x02\x1f\x12\x1d/cloud/namespaces/{namespace}\x12\xb4\x01\n\x0fUpdateNamespace\x12:.temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest\x1a;.temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse"(\x82\xd3\xe4\x93\x02""\x1d/cloud/namespaces/{namespace}:\x01*\x12\xf7\x01\n\x1bRenameCustomSearchAttribute\x12\x46.temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest\x1aG.temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse"G\x82\xd3\xe4\x93\x02\x41".temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse"3\x82\xd3\xe4\x93\x02-"(/cloud/namespaces/{namespace}/add-region:\x01*\x12\xd4\x01\n\x15\x44\x65leteNamespaceRegion\x12@.temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest\x1a\x41.temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse"6\x82\xd3\xe4\x93\x02\x30*./cloud/namespaces/{namespace}/regions/{region}\x12\x93\x01\n\nGetRegions\x12\x35.temporal.api.cloud.cloudservice.v1.GetRegionsRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.GetRegionsResponse"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/cloud/regions\x12\x99\x01\n\tGetRegion\x12\x34.temporal.api.cloud.cloudservice.v1.GetRegionRequest\x1a\x35.temporal.api.cloud.cloudservice.v1.GetRegionResponse"\x1f\x82\xd3\xe4\x93\x02\x19\x12\x17/cloud/regions/{region}\x12\x94\x01\n\nGetApiKeys\x12\x35.temporal.api.cloud.cloudservice.v1.GetApiKeysRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.GetApiKeysResponse"\x17\x82\xd3\xe4\x93\x02\x11\x12\x0f/cloud/api-keys\x12\x9a\x01\n\tGetApiKey\x12\x34.temporal.api.cloud.cloudservice.v1.GetApiKeyRequest\x1a\x35.temporal.api.cloud.cloudservice.v1.GetApiKeyResponse" \x82\xd3\xe4\x93\x02\x1a\x12\x18/cloud/api-keys/{key_id}\x12\x9d\x01\n\x0c\x43reateApiKey\x12\x37.temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse"\x1a\x82\xd3\xe4\x93\x02\x14"\x0f/cloud/api-keys:\x01*\x12\xa6\x01\n\x0cUpdateApiKey\x12\x37.temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse"#\x82\xd3\xe4\x93\x02\x1d"\x18/cloud/api-keys/{key_id}:\x01*\x12\xa3\x01\n\x0c\x44\x65leteApiKey\x12\x37.temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse" \x82\xd3\xe4\x93\x02\x1a*\x18/cloud/api-keys/{key_id}\x12\xb0\x01\n\x11GetNexusEndpoints\x12<.temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest\x1a=.temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/cloud/nexus/endpoints\x12\xbb\x01\n\x10GetNexusEndpoint\x12;.temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest\x1a<.temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse",\x82\xd3\xe4\x93\x02&\x12$/cloud/nexus/endpoints/{endpoint_id}\x12\xb9\x01\n\x13\x43reateNexusEndpoint\x12>.temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest\x1a?.temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse"!\x82\xd3\xe4\x93\x02\x1b"\x16/cloud/nexus/endpoints:\x01*\x12\xc7\x01\n\x13UpdateNexusEndpoint\x12>.temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest\x1a?.temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse"/\x82\xd3\xe4\x93\x02)"$/cloud/nexus/endpoints/{endpoint_id}:\x01*\x12\xc4\x01\n\x13\x44\x65leteNexusEndpoint\x12>.temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest\x1a?.temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse",\x82\xd3\xe4\x93\x02&*$/cloud/nexus/endpoints/{endpoint_id}\x12\xa0\x01\n\rGetUserGroups\x12\x38.temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest\x1a\x39.temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/cloud/user-groups\x12\xa8\x01\n\x0cGetUserGroup\x12\x37.temporal.api.cloud.cloudservice.v1.GetUserGroupRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.GetUserGroupResponse"%\x82\xd3\xe4\x93\x02\x1f\x12\x1d/cloud/user-groups/{group_id}\x12\xa9\x01\n\x0f\x43reateUserGroup\x12:.temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest\x1a;.temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse"\x1d\x82\xd3\xe4\x93\x02\x17"\x12/cloud/user-groups:\x01*\x12\xb4\x01\n\x0fUpdateUserGroup\x12:.temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest\x1a;.temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse"(\x82\xd3\xe4\x93\x02""\x1d/cloud/user-groups/{group_id}:\x01*\x12\xb1\x01\n\x0f\x44\x65leteUserGroup\x12:.temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest\x1a;.temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse"%\x82\xd3\xe4\x93\x02\x1f*\x1d/cloud/user-groups/{group_id}\x12\xf6\x01\n\x1bSetUserGroupNamespaceAccess\x12\x46.temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest\x1aG.temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse"F\x82\xd3\xe4\x93\x02@";/cloud/namespaces/{namespace}/user-groups/{group_id}/access:\x01*\x12\xc5\x01\n\x12\x41\x64\x64UserGroupMember\x12=.temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest\x1a>.temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse"0\x82\xd3\xe4\x93\x02*"%/cloud/user-groups/{group_id}/members:\x01*\x12\xd4\x01\n\x15RemoveUserGroupMember\x12@.temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest\x1a\x41.temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse"6\x82\xd3\xe4\x93\x02\x30"+/cloud/user-groups/{group_id}/remove-member:\x01*\x12\xc5\x01\n\x13GetUserGroupMembers\x12>.temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest\x1a?.temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse"-\x82\xd3\xe4\x93\x02\'\x12%/cloud/user-groups/{group_id}/members\x12\xbd\x01\n\x14\x43reateServiceAccount\x12?.temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest\x1a@.temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse""\x82\xd3\xe4\x93\x02\x1c"\x17/cloud/service-accounts:\x01*\x12\xc6\x01\n\x11GetServiceAccount\x12<.temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest\x1a=.temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse"4\x82\xd3\xe4\x93\x02.\x12,/cloud/service-accounts/{service_account_id}\x12\xb4\x01\n\x12GetServiceAccounts\x12=.temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest\x1a>.temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse"\x1f\x82\xd3\xe4\x93\x02\x19\x12\x17/cloud/service-accounts\x12\xd2\x01\n\x14UpdateServiceAccount\x12?.temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest\x1a@.temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse"7\x82\xd3\xe4\x93\x02\x31",/cloud/service-accounts/{service_account_id}:\x01*\x12\x94\x02\n SetServiceAccountNamespaceAccess\x12K.temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest\x1aL.temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse"U\x82\xd3\xe4\x93\x02O"J/cloud/namespaces/{namespace}/service-accounts/{service_account_id}/access:\x01*\x12\xcf\x01\n\x14\x44\x65leteServiceAccount\x12?.temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest\x1a@.temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse"4\x82\xd3\xe4\x93\x02.*,/cloud/service-accounts/{service_account_id}\x12\x8b\x01\n\x08GetUsage\x12\x33.temporal.api.cloud.cloudservice.v1.GetUsageRequest\x1a\x34.temporal.api.cloud.cloudservice.v1.GetUsageResponse"\x14\x82\xd3\xe4\x93\x02\x0e\x12\x0c/cloud/usage\x12\x93\x01\n\nGetAccount\x12\x35.temporal.api.cloud.cloudservice.v1.GetAccountRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.GetAccountResponse"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/cloud/account\x12\x9f\x01\n\rUpdateAccount\x12\x38.temporal.api.cloud.cloudservice.v1.UpdateAccountRequest\x1a\x39.temporal.api.cloud.cloudservice.v1.UpdateAccountResponse"\x19\x82\xd3\xe4\x93\x02\x13"\x0e/cloud/account:\x01*\x12\xdf\x01\n\x19\x43reateNamespaceExportSink\x12\x44.temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest\x1a\x45.temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse"5\x82\xd3\xe4\x93\x02/"*/cloud/namespaces/{namespace}/export-sinks:\x01*\x12\xda\x01\n\x16GetNamespaceExportSink\x12\x41.temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest\x1a\x42.temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse"9\x82\xd3\xe4\x93\x02\x33\x12\x31/cloud/namespaces/{namespace}/export-sinks/{name}\x12\xd6\x01\n\x17GetNamespaceExportSinks\x12\x42.temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest\x1a\x43.temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse"2\x82\xd3\xe4\x93\x02,\x12*/cloud/namespaces/{namespace}/export-sinks\x12\xeb\x01\n\x19UpdateNamespaceExportSink\x12\x44.temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest\x1a\x45.temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse"A\x82\xd3\xe4\x93\x02;"6/cloud/namespaces/{namespace}/export-sinks/{spec.name}:\x01*\x12\xe3\x01\n\x19\x44\x65leteNamespaceExportSink\x12\x44.temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest\x1a\x45.temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse"9\x82\xd3\xe4\x93\x02\x33*1/cloud/namespaces/{namespace}/export-sinks/{name}\x12\xee\x01\n\x1bValidateNamespaceExportSink\x12\x46.temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest\x1aG.temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse">\x82\xd3\xe4\x93\x02\x38"3/cloud/namespaces/{namespace}/export-sinks/validate:\x01*\x12\xcc\x01\n\x13UpdateNamespaceTags\x12>.temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest\x1a?.temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse"4\x82\xd3\xe4\x93\x02.")/cloud/namespaces/{namespace}/update-tags:\x01*\x12\xc5\x01\n\x16\x43reateConnectivityRule\x12\x41.temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest\x1a\x42.temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse"$\x82\xd3\xe4\x93\x02\x1e"\x19/cloud/connectivity-rules:\x01*\x12\xd0\x01\n\x13GetConnectivityRule\x12>.temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest\x1a?.temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse"8\x82\xd3\xe4\x93\x02\x32\x12\x30/cloud/connectivity-rules/{connectivity_rule_id}\x12\xbc\x01\n\x14GetConnectivityRules\x12?.temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest\x1a@.temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/cloud/connectivity-rules\x12\xd9\x01\n\x16\x44\x65leteConnectivityRule\x12\x41.temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest\x1a\x42.temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse"8\x82\xd3\xe4\x93\x02\x32*0/cloud/connectivity-rules/{connectivity_rule_id}\x12\xe2\x01\n\x1bValidateAccountAuditLogSink\x12\x46.temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest\x1aG.temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse"2\x82\xd3\xe4\x93\x02,"\'/cloud/account/audit-logs/sink/validate:\x01*B\xc0\x01\n%io.temporal.api.cloud.cloudservice.v1B\x0cServiceProtoP\x01Z5go.temporal.io/api/cloud/cloudservice/v1;cloudservice\xaa\x02$Temporalio.Api.Cloud.CloudService.V1\xea\x02(Temporalio::Api::Cloud::CloudService::V1b\x06proto3' + b'\n0temporal/api/cloud/cloudservice/v1/service.proto\x12"temporal.api.cloud.cloudservice.v1\x1a\x39temporal/api/cloud/cloudservice/v1/request_response.proto\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto2\x92\xd7\x01\n\x0c\x43loudService\x12\xb0\x02\n\x12GetCurrentIdentity\x12=.temporal.api.cloud.cloudservice.v1.GetCurrentIdentityRequest\x1a>.temporal.api.cloud.cloudservice.v1.GetCurrentIdentityResponse"\x9a\x01\x82\xd3\xe4\x93\x02\x19\x12\x17/cloud/current-identity\x92\x41x\n\x07\x41\x63\x63ount\x12\x14Get current identity\x1aWReturns information about the currently authenticated user or service account principal\x12\xa5\x02\n\x08GetUsers\x12\x33.temporal.api.cloud.cloudservice.v1.GetUsersRequest\x1a\x34.temporal.api.cloud.cloudservice.v1.GetUsersResponse"\xad\x01\x82\xd3\xe4\x93\x02\x0e\x12\x0c/cloud/users\x92\x41\x95\x01\n\x05Users\x12\x0eList all users\x1a*Returns a list of all users in the account"E\n\x1dUser management documentation\x12$https://docs.temporal.io/cloud/users*\tlistUsers\x12\x9c\x02\n\x07GetUser\x12\x32.temporal.api.cloud.cloudservice.v1.GetUserRequest\x1a\x33.temporal.api.cloud.cloudservice.v1.GetUserResponse"\xa7\x01\x82\xd3\xe4\x93\x02\x18\x12\x16/cloud/users/{user_id}\x92\x41\x85\x01\n\x05Users\x12\x0eGet user by ID\x1a%Takes a user ID, returns user details"E\n\x1dUser management documentation\x12$https://docs.temporal.io/cloud/users\x12\xd0\x01\n\nCreateUser\x12\x35.temporal.api.cloud.cloudservice.v1.CreateUserRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.CreateUserResponse"S\x82\xd3\xe4\x93\x02\x11"\x0c/cloud/users:\x01*\x92\x41\x39\n\x05Users\x12\rCreate a user\x1a!Creates a new user in the account\x12\xdb\x01\n\nUpdateUser\x12\x35.temporal.api.cloud.cloudservice.v1.UpdateUserRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.UpdateUserResponse"^\x82\xd3\xe4\x93\x02\x1b"\x16/cloud/users/{user_id}:\x01*\x92\x41:\n\x05Users\x12\rUpdate a user\x1a"Updates an existing user\'s details\x12\xd5\x01\n\nDeleteUser\x12\x35.temporal.api.cloud.cloudservice.v1.DeleteUserRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.DeleteUserResponse"X\x82\xd3\xe4\x93\x02\x18*\x16/cloud/users/{user_id}\x92\x41\x37\n\x05Users\x12\rDelete a user\x1a\x1fRemoves a user from the account\x12\xaa\x03\n\x16SetUserNamespaceAccess\x12\x41.temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessRequest\x1a\x42.temporal.api.cloud.cloudservice.v1.SetUserNamespaceAccessResponse"\x88\x02\x82\xd3\xe4\x93\x02\x39"4/cloud/namespaces/{namespace}/users/{user_id}/access:\x01*\x92\x41\xc5\x01\n\x05Users\x12\x19Set user namespace access\x1a\x38\x43onfigures a user\'s permissions for a specific namespace"g\n#Namespace permissions documentation\x12@https://docs.temporal.io/cloud/users-namespace-level-permissions\x12\xb1\x02\n\x11GetAsyncOperation\x12<.temporal.api.cloud.cloudservice.v1.GetAsyncOperationRequest\x1a=.temporal.api.cloud.cloudservice.v1.GetAsyncOperationResponse"\x9e\x01\x82\xd3\xe4\x93\x02(\x12&/cloud/operations/{async_operation_id}\x92\x41m\n\nOperations\x12\x1aGet async operation status\x1a\x43Returns the current status and details of an asynchronous operation\x12\xc6\x02\n\x0f\x43reateNamespace\x12:.temporal.api.cloud.cloudservice.v1.CreateNamespaceRequest\x1a;.temporal.api.cloud.cloudservice.v1.CreateNamespaceResponse"\xb9\x01\x82\xd3\xe4\x93\x02\x16"\x11/cloud/namespaces:\x01*\x92\x41\x99\x01\n\nNamespaces\x12\x12\x43reate a namespace\x1a&Creates a new namespace in the account"O\n"Namespace management documentation\x12)https://docs.temporal.io/cloud/namespaces\x12\xc7\x02\n\rGetNamespaces\x12\x38.temporal.api.cloud.cloudservice.v1.GetNamespacesRequest\x1a\x39.temporal.api.cloud.cloudservice.v1.GetNamespacesResponse"\xc0\x01\x82\xd3\xe4\x93\x02\x13\x12\x11/cloud/namespaces\x92\x41\xa3\x01\n\nNamespaces\x12\x13List all namespaces\x1a/Returns a list of all namespaces in the account"O\n"Namespace management documentation\x12)https://docs.temporal.io/cloud/namespaces\x12\xda\x02\n\x0cGetNamespace\x12\x37.temporal.api.cloud.cloudservice.v1.GetNamespaceRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.GetNamespaceResponse"\xd6\x01\x82\xd3\xe4\x93\x02\x1f\x12\x1d/cloud/namespaces/{namespace}\x92\x41\xad\x01\n\nNamespaces\x12\x15Get namespace details\x1a\x37Returns detailed information about a specific namespace"O\n"Namespace management documentation\x12)https://docs.temporal.io/cloud/namespaces\x12\xdb\x02\n\x0fUpdateNamespace\x12:.temporal.api.cloud.cloudservice.v1.UpdateNamespaceRequest\x1a;.temporal.api.cloud.cloudservice.v1.UpdateNamespaceResponse"\xce\x01\x82\xd3\xe4\x93\x02""\x1d/cloud/namespaces/{namespace}:\x01*\x92\x41\xa2\x01\n\nNamespaces\x12\x12Update a namespace\x1a/Updates configuration for an existing namespace"O\n"Namespace management documentation\x12)https://docs.temporal.io/cloud/namespaces\x12\xc7\x03\n\x1bRenameCustomSearchAttribute\x12\x46.temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeRequest\x1aG.temporal.api.cloud.cloudservice.v1.RenameCustomSearchAttributeResponse"\x96\x02\x82\xd3\xe4\x93\x02\x41".temporal.api.cloud.cloudservice.v1.AddNamespaceRegionResponse"\xf0\x01\x88\x02\x01\x82\xd3\xe4\x93\x02-"(/cloud/namespaces/{namespace}/add-region:\x01*\x92\x41\xb6\x01\n\x11High Availability\x12\x15\x41\x64\x64 namespace replica\x1a+Adds a new replica to an existing namespace"]\n)High availability namespace documentation\x12\x30https://docs.temporal.io/cloud/high-availability\x12\x9e\x03\n\x15\x44\x65leteNamespaceRegion\x12@.temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionRequest\x1a\x41.temporal.api.cloud.cloudservice.v1.DeleteNamespaceRegionResponse"\xff\x01\x88\x02\x01\x82\xd3\xe4\x93\x02\x30*./cloud/namespaces/{namespace}/regions/{region}\x92\x41\xc2\x01\n\x11High Availability\x12\x18Remove namespace replica\x1a\x34Removes a replica from a high availability namespace"]\n)High availability namespace documentation\x12\x30https://docs.temporal.io/cloud/high-availability\x12\xa3\x02\n\nGetRegions\x12\x35.temporal.api.cloud.cloudservice.v1.GetRegionsRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.GetRegionsResponse"\xa5\x01\x82\xd3\xe4\x93\x02\x10\x12\x0e/cloud/regions\x92\x41\x8b\x01\n\x07Regions\x12\x10List all regions\x1a-Returns a list of all available cloud regions"?\n\x15Regions documentation\x12&https://docs.temporal.io/cloud/regions\x12\xb2\x02\n\tGetRegion\x12\x34.temporal.api.cloud.cloudservice.v1.GetRegionRequest\x1a\x35.temporal.api.cloud.cloudservice.v1.GetRegionResponse"\xb7\x01\x82\xd3\xe4\x93\x02\x19\x12\x17/cloud/regions/{region}\x92\x41\x94\x01\n\x07Regions\x12\x12Get region details\x1a\x34Returns detailed information about a specific region"?\n\x15Regions documentation\x12&https://docs.temporal.io/cloud/regions\x12\xa8\x02\n\nGetApiKeys\x12\x35.temporal.api.cloud.cloudservice.v1.GetApiKeysRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.GetApiKeysResponse"\xaa\x01\x82\xd3\xe4\x93\x02\x11\x12\x0f/cloud/api-keys\x92\x41\x8f\x01\n\x08\x41PI Keys\x12\x11List all API keys\x1a-Returns a list of all API keys in the account"A\n\x16\x41PI Keys documentation\x12\'https://docs.temporal.io/cloud/api-keys\x12\xb8\x02\n\tGetApiKey\x12\x34.temporal.api.cloud.cloudservice.v1.GetApiKeyRequest\x1a\x35.temporal.api.cloud.cloudservice.v1.GetApiKeyResponse"\xbd\x01\x82\xd3\xe4\x93\x02\x1a\x12\x18/cloud/api-keys/{key_id}\x92\x41\x99\x01\n\x08\x41PI Keys\x12\x13Get API key details\x1a\x35Returns detailed information about a specific API key"A\n\x16\x41PI Keys documentation\x12\'https://docs.temporal.io/cloud/api-keys\x12\xb1\x02\n\x0c\x43reateApiKey\x12\x37.temporal.api.cloud.cloudservice.v1.CreateApiKeyRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.CreateApiKeyResponse"\xad\x01\x82\xd3\xe4\x93\x02\x14"\x0f/cloud/api-keys:\x01*\x92\x41\x8f\x01\n\x08\x41PI Keys\x12\x11\x43reate an API key\x1a-Creates a new API key for programmatic access"A\n\x16\x41PI Keys documentation\x12\'https://docs.temporal.io/cloud/api-keys\x12\xb5\x02\n\x0cUpdateApiKey\x12\x37.temporal.api.cloud.cloudservice.v1.UpdateApiKeyRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.UpdateApiKeyResponse"\xb1\x01\x82\xd3\xe4\x93\x02\x1d"\x18/cloud/api-keys/{key_id}:\x01*\x92\x41\x8a\x01\n\x08\x41PI Keys\x12\x11Update an API key\x1a(Updates an existing API key\'s properties"A\n\x16\x41PI Keys documentation\x12\'https://docs.temporal.io/cloud/api-keys\x12\xa8\x02\n\x0c\x44\x65leteApiKey\x12\x37.temporal.api.cloud.cloudservice.v1.DeleteApiKeyRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.DeleteApiKeyResponse"\xa4\x01\x82\xd3\xe4\x93\x02\x1a*\x18/cloud/api-keys/{key_id}\x92\x41\x80\x01\n\x08\x41PI Keys\x12\x11\x44\x65lete an API key\x1a\x1eRevokes and deletes an API key"A\n\x16\x41PI Keys documentation\x12\'https://docs.temporal.io/cloud/api-keys\x12\xc3\x02\n\x11GetNexusEndpoints\x12<.temporal.api.cloud.cloudservice.v1.GetNexusEndpointsRequest\x1a=.temporal.api.cloud.cloudservice.v1.GetNexusEndpointsResponse"\xb0\x01\x82\xd3\xe4\x93\x02\x18\x12\x16/cloud/nexus/endpoints\x92\x41\x8e\x01\n\x05Nexus\x12\x18List all Nexus endpoints\x1a\x34Returns a list of all Nexus endpoints in the account"5\n\x13Nexus documentation\x12\x1ehttps://docs.temporal.io/nexus\x12\xd8\x02\n\x10GetNexusEndpoint\x12;.temporal.api.cloud.cloudservice.v1.GetNexusEndpointRequest\x1a<.temporal.api.cloud.cloudservice.v1.GetNexusEndpointResponse"\xc8\x01\x82\xd3\xe4\x93\x02&\x12$/cloud/nexus/endpoints/{endpoint_id}\x92\x41\x98\x01\n\x05Nexus\x12\x1aGet Nexus endpoint details\x1a.temporal.api.cloud.cloudservice.v1.CreateNexusEndpointRequest\x1a?.temporal.api.cloud.cloudservice.v1.CreateNexusEndpointResponse"\xbc\x01\x82\xd3\xe4\x93\x02\x1b"\x16/cloud/nexus/endpoints:\x01*\x92\x41\x97\x01\n\x05Nexus\x12\x17\x43reate a Nexus endpoint\x1a>Creates a new Nexus endpoint for cross-namespace communication"5\n\x13Nexus documentation\x12\x1ehttps://docs.temporal.io/nexus\x12\xd7\x02\n\x13UpdateNexusEndpoint\x12>.temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointRequest\x1a?.temporal.api.cloud.cloudservice.v1.UpdateNexusEndpointResponse"\xbe\x01\x82\xd3\xe4\x93\x02)"$/cloud/nexus/endpoints/{endpoint_id}:\x01*\x92\x41\x8b\x01\n\x05Nexus\x12\x17Update a Nexus endpoint\x1a\x32Updates an existing Nexus endpoint\'s configuration"5\n\x13Nexus documentation\x12\x1ehttps://docs.temporal.io/nexus\x12\xcb\x02\n\x13\x44\x65leteNexusEndpoint\x12>.temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointRequest\x1a?.temporal.api.cloud.cloudservice.v1.DeleteNexusEndpointResponse"\xb2\x01\x82\xd3\xe4\x93\x02&*$/cloud/nexus/endpoints/{endpoint_id}\x92\x41\x82\x01\n\x05Nexus\x12\x17\x44\x65lete a Nexus endpoint\x1a)Removes a Nexus endpoint from the account"5\n\x13Nexus documentation\x12\x1ehttps://docs.temporal.io/nexus\x12\xcc\x02\n\rGetUserGroups\x12\x38.temporal.api.cloud.cloudservice.v1.GetUserGroupsRequest\x1a\x39.temporal.api.cloud.cloudservice.v1.GetUserGroupsResponse"\xc5\x01\x82\xd3\xe4\x93\x02\x14\x12\x12/cloud/user-groups\x92\x41\xa7\x01\n\x06Groups\x12\x14List all user groups\x1a\x30Returns a list of all user groups in the account"U\n\x19User groups documentation\x12\x38https://docs.temporal.io/cloud/users-account-level-roles\x12\xd0\x02\n\x0cGetUserGroup\x12\x37.temporal.api.cloud.cloudservice.v1.GetUserGroupRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.GetUserGroupResponse"\xcc\x01\x82\xd3\xe4\x93\x02\x1f\x12\x1d/cloud/user-groups/{group_id}\x92\x41\xa3\x01\n\x06Groups\x12\x16Get user group details\x1a\x38Returns detailed information about a specific user group"G\n\x19User groups documentation\x12*https://docs.temporal.io/cloud/user-groups\x12\xc7\x02\n\x0f\x43reateUserGroup\x12:.temporal.api.cloud.cloudservice.v1.CreateUserGroupRequest\x1a;.temporal.api.cloud.cloudservice.v1.CreateUserGroupResponse"\xba\x01\x82\xd3\xe4\x93\x02\x17"\x12/cloud/user-groups:\x01*\x92\x41\x99\x01\n\x06Groups\x12\x13\x43reate a user group\x1a\x31\x43reates a new user group for managing permissions"G\n\x19User groups documentation\x12*https://docs.temporal.io/cloud/user-groups\x12\xcc\x02\n\x0fUpdateUserGroup\x12:.temporal.api.cloud.cloudservice.v1.UpdateUserGroupRequest\x1a;.temporal.api.cloud.cloudservice.v1.UpdateUserGroupResponse"\xbf\x01\x82\xd3\xe4\x93\x02""\x1d/cloud/user-groups/{group_id}:\x01*\x92\x41\x93\x01\n\x06Groups\x12\x13Update a user group\x1a+Updates an existing user group\'s properties"G\n\x19User groups documentation\x12*https://docs.temporal.io/cloud/user-groups\x12\xc3\x02\n\x0f\x44\x65leteUserGroup\x12:.temporal.api.cloud.cloudservice.v1.DeleteUserGroupRequest\x1a;.temporal.api.cloud.cloudservice.v1.DeleteUserGroupResponse"\xb6\x01\x82\xd3\xe4\x93\x02\x1f*\x1d/cloud/user-groups/{group_id}\x92\x41\x8d\x01\n\x06Groups\x12\x13\x44\x65lete a user group\x1a%Removes a user group from the account"G\n\x19User groups documentation\x12*https://docs.temporal.io/cloud/user-groups\x12\xad\x03\n\x1bSetUserGroupNamespaceAccess\x12\x46.temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessRequest\x1aG.temporal.api.cloud.cloudservice.v1.SetUserGroupNamespaceAccessResponse"\xfc\x01\x82\xd3\xe4\x93\x02@";/cloud/namespaces/{namespace}/user-groups/{group_id}/access:\x01*\x92\x41\xb2\x01\n\x06Groups\x12\x1fSet user group namespace access\x1a>Configures a user group\'s permissions for a specific namespace"G\n\x19User groups documentation\x12*https://docs.temporal.io/cloud/user-groups\x12\xdf\x02\n\x12\x41\x64\x64UserGroupMember\x12=.temporal.api.cloud.cloudservice.v1.AddUserGroupMemberRequest\x1a>.temporal.api.cloud.cloudservice.v1.AddUserGroupMemberResponse"\xc9\x01\x82\xd3\xe4\x93\x02*"%/cloud/user-groups/{group_id}/members:\x01*\x92\x41\x95\x01\n\x06Groups\x12\x11\x41\x64\x64 user to group\x1a/Adds a user to a user group (Cloud groups only)"G\n\x19User groups documentation\x12*https://docs.temporal.io/cloud/user-groups\x12\xf8\x02\n\x15RemoveUserGroupMember\x12@.temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberRequest\x1a\x41.temporal.api.cloud.cloudservice.v1.RemoveUserGroupMemberResponse"\xd9\x01\x82\xd3\xe4\x93\x02\x30"+/cloud/user-groups/{group_id}/remove-member:\x01*\x92\x41\x9f\x01\n\x06Groups\x12\x16Remove user from group\x1a\x34Removes a user from a user group (Cloud groups only)"G\n\x19User groups documentation\x12*https://docs.temporal.io/cloud/user-groups\x12\xdf\x02\n\x13GetUserGroupMembers\x12>.temporal.api.cloud.cloudservice.v1.GetUserGroupMembersRequest\x1a?.temporal.api.cloud.cloudservice.v1.GetUserGroupMembersResponse"\xc6\x01\x82\xd3\xe4\x93\x02\'\x12%/cloud/user-groups/{group_id}/members\x92\x41\x95\x01\n\x06Groups\x12\x15List users in a group\x1a+Returns a list of all users in a user group"G\n\x19User groups documentation\x12*https://docs.temporal.io/cloud/user-groups\x12\xf5\x02\n\x14\x43reateServiceAccount\x12?.temporal.api.cloud.cloudservice.v1.CreateServiceAccountRequest\x1a@.temporal.api.cloud.cloudservice.v1.CreateServiceAccountResponse"\xd9\x01\x82\xd3\xe4\x93\x02\x1c"\x17/cloud/service-accounts:\x01*\x92\x41\xb3\x01\n\x10Service Accounts\x12\x18\x43reate a service account\x1a\x32\x43reates a new service account for automated access"Q\n\x1eService Accounts documentation\x12/https://docs.temporal.io/cloud/service-accounts\x12\x8c\x03\n\x11GetServiceAccount\x12<.temporal.api.cloud.cloudservice.v1.GetServiceAccountRequest\x1a=.temporal.api.cloud.cloudservice.v1.GetServiceAccountResponse"\xf9\x01\x82\xd3\xe4\x93\x02.\x12,/cloud/service-accounts/{service_account_id}\x92\x41\xc1\x01\n\x10Service Accounts\x12\x1bGet service account details\x1a=Returns detailed information about a specific service account"Q\n\x1eService Accounts documentation\x12/https://docs.temporal.io/cloud/service-accounts\x12\xf0\x02\n\x12GetServiceAccounts\x12=.temporal.api.cloud.cloudservice.v1.GetServiceAccountsRequest\x1a>.temporal.api.cloud.cloudservice.v1.GetServiceAccountsResponse"\xda\x01\x82\xd3\xe4\x93\x02\x19\x12\x17/cloud/service-accounts\x92\x41\xb7\x01\n\x10Service Accounts\x12\x19List all service accounts\x1a\x35Returns a list of all service accounts in the account"Q\n\x1eService Accounts documentation\x12/https://docs.temporal.io/cloud/service-accounts\x12\x88\x03\n\x14UpdateServiceAccount\x12?.temporal.api.cloud.cloudservice.v1.UpdateServiceAccountRequest\x1a@.temporal.api.cloud.cloudservice.v1.UpdateServiceAccountResponse"\xec\x01\x82\xd3\xe4\x93\x02\x31",/cloud/service-accounts/{service_account_id}:\x01*\x92\x41\xb1\x01\n\x10Service Accounts\x12\x18Update a service account\x1a\x30Updates an existing service account\'s properties"Q\n\x1eService Accounts documentation\x12/https://docs.temporal.io/cloud/service-accounts\x12\xe9\x03\n SetServiceAccountNamespaceAccess\x12K.temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessRequest\x1aL.temporal.api.cloud.cloudservice.v1.SetServiceAccountNamespaceAccessResponse"\xa9\x02\x82\xd3\xe4\x93\x02O"J/cloud/namespaces/{namespace}/service-accounts/{service_account_id}/access:\x01*\x92\x41\xd0\x01\n\x10Service Accounts\x12$Set service account namespace access\x1a\x43\x43onfigures a service account\'s permissions for a specific namespace"Q\n\x1eService Accounts documentation\x12/https://docs.temporal.io/cloud/service-accounts\x12\xff\x02\n\x14\x44\x65leteServiceAccount\x12?.temporal.api.cloud.cloudservice.v1.DeleteServiceAccountRequest\x1a@.temporal.api.cloud.cloudservice.v1.DeleteServiceAccountResponse"\xe3\x01\x82\xd3\xe4\x93\x02.*,/cloud/service-accounts/{service_account_id}\x92\x41\xab\x01\n\x10Service Accounts\x12\x18\x44\x65lete a service account\x1a*Removes a service account from the account"Q\n\x1eService Accounts documentation\x12/https://docs.temporal.io/cloud/service-accounts\x12\xcb\x01\n\x08GetUsage\x12\x33.temporal.api.cloud.cloudservice.v1.GetUsageRequest\x1a\x34.temporal.api.cloud.cloudservice.v1.GetUsageResponse"T\x82\xd3\xe4\x93\x02\x0e\x12\x0c/cloud/usage\x92\x41=\n\x07\x41\x63\x63ount\x12\x0eGet usage data\x1a Get usage data across namespacesX\x01\x12\xb0\x02\n\nGetAccount\x12\x35.temporal.api.cloud.cloudservice.v1.GetAccountRequest\x1a\x36.temporal.api.cloud.cloudservice.v1.GetAccountResponse"\xb2\x01\x82\xd3\xe4\x93\x02\x10\x12\x0e/cloud/account\x92\x41\x98\x01\n\x07\x41\x63\x63ount\x12\x13Get account details\x1a.Returns detailed information about the account"H\n\x15\x42illing documentation\x12/https://docs.temporal.io/cloud/billing-and-cost\x12\xbb\x02\n\rUpdateAccount\x12\x38.temporal.api.cloud.cloudservice.v1.UpdateAccountRequest\x1a\x39.temporal.api.cloud.cloudservice.v1.UpdateAccountResponse"\xb4\x01\x82\xd3\xe4\x93\x02\x13"\x0e/cloud/account:\x01*\x92\x41\x97\x01\n\x07\x41\x63\x63ount\x12\x16Update account details\x1a*Updates account configuration and settings"H\n\x15\x42illing documentation\x12/https://docs.temporal.io/cloud/billing-and-cost\x12\xf3\x02\n\x19\x43reateNamespaceExportSink\x12\x44.temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkRequest\x1a\x45.temporal.api.cloud.cloudservice.v1.CreateNamespaceExportSinkResponse"\xc8\x01\x82\xd3\xe4\x93\x02/"*/cloud/namespaces/{namespace}/export-sinks:\x01*\x92\x41\x8f\x01\n\x06\x45xport\x12\x1a\x43reate history export sink\x1a*Creates a new workflow history export sink"=\n\x14\x45xport documentation\x12%https://docs.temporal.io/cloud/export\x12\x8c\x03\n\x16GetNamespaceExportSink\x12\x41.temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest\x1a\x42.temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinkResponse"\xea\x01\x82\xd3\xe4\x93\x02\x33\x12\x31/cloud/namespaces/{namespace}/export-sinks/{name}\x92\x41\xad\x01\n\x06\x45xport\x12\x18Get history sink details\x1aJReturns detailed information about a specific workflow history export sink"=\n\x14\x45xport documentation\x12%https://docs.temporal.io/cloud/export\x12\x82\x03\n\x17GetNamespaceExportSinks\x12\x42.temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksRequest\x1a\x43.temporal.api.cloud.cloudservice.v1.GetNamespaceExportSinksResponse"\xdd\x01\x82\xd3\xe4\x93\x02,\x12*/cloud/namespaces/{namespace}/export-sinks\x92\x41\xa7\x01\n\x06\x45xport\x12\x19List history export sinks\x1a\x43Returns a list of all workflow history export sinks for a namespace"=\n\x14\x45xport documentation\x12%https://docs.temporal.io/cloud/export\x12\x95\x03\n\x19UpdateNamespaceExportSink\x12\x44.temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkRequest\x1a\x45.temporal.api.cloud.cloudservice.v1.UpdateNamespaceExportSinkResponse"\xea\x01\x82\xd3\xe4\x93\x02;"6/cloud/namespaces/{namespace}/export-sinks/{spec.name}:\x01*\x92\x41\xa5\x01\n\x06\x45xport\x12\x1aUpdate history export sink\x1a@Updates an existing workflow history export sink\'s configuration"=\n\x14\x45xport documentation\x12%https://docs.temporal.io/cloud/export\x12\x84\x03\n\x19\x44\x65leteNamespaceExportSink\x12\x44.temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkRequest\x1a\x45.temporal.api.cloud.cloudservice.v1.DeleteNamespaceExportSinkResponse"\xd9\x01\x82\xd3\xe4\x93\x02\x33*1/cloud/namespaces/{namespace}/export-sinks/{name}\x92\x41\x9c\x01\n\x06\x45xport\x12\x1a\x44\x65lete history export sink\x1a\x37Removes a workflow history export sink from a namespace"=\n\x14\x45xport documentation\x12%https://docs.temporal.io/cloud/export\x12\xc9\x03\n\x1bValidateNamespaceExportSink\x12\x46.temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkRequest\x1aG.temporal.api.cloud.cloudservice.v1.ValidateNamespaceExportSinkResponse"\x98\x02\x82\xd3\xe4\x93\x02\x37"2/cloud/namespaces/{namespace}/export-sink-validate:\x01*\x92\x41\xd7\x01\n\x06\x45xport\x12*Validate history export sink configuration\x1a\x62Tests workflow history export sink configuration by delivering a test file to verify accessibility"=\n\x14\x45xport documentation\x12%https://docs.temporal.io/cloud/export\x12\xfc\x02\n\x13UpdateNamespaceTags\x12>.temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsRequest\x1a?.temporal.api.cloud.cloudservice.v1.UpdateNamespaceTagsResponse"\xe3\x01\x82\xd3\xe4\x93\x02.")/cloud/namespaces/{namespace}/update-tags:\x01*\x92\x41\xab\x01\n\nNamespaces\x12\x15Update namespace tags\x1a,Updates the tags associated with a namespace"X\n\x1bNamespace tag documentation\x12\x39https://docs.temporal.io/cloud/namespaces#tag-a-namespace\x12\xff\x02\n\x16\x43reateConnectivityRule\x12\x41.temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest\x1a\x42.temporal.api.cloud.cloudservice.v1.CreateConnectivityRuleResponse"\xdd\x01\x82\xd3\xe4\x93\x02\x1e"\x19/cloud/connectivity-rules:\x01*\x92\x41\xb5\x01\n\x12\x43onnectivity Rules\x12\x18\x43reate connectivity rule\x1a:Creates a new connectivity rule for network access control"I\n\x1a\x43onnectivity documentation\x12+https://docs.temporal.io/cloud/connectivity\x12\x94\x03\n\x13GetConnectivityRule\x12>.temporal.api.cloud.cloudservice.v1.GetConnectivityRuleRequest\x1a?.temporal.api.cloud.cloudservice.v1.GetConnectivityRuleResponse"\xfb\x01\x82\xd3\xe4\x93\x02\x32\x12\x30/cloud/connectivity-rules/{connectivity_rule_id}\x92\x41\xbf\x01\n\x12\x43onnectivity Rules\x12\x1dGet connectivity rule details\x1a?Returns detailed information about a specific connectivity rule"I\n\x1a\x43onnectivity documentation\x12+https://docs.temporal.io/cloud/connectivity\x12\xf6\x02\n\x14GetConnectivityRules\x12?.temporal.api.cloud.cloudservice.v1.GetConnectivityRulesRequest\x1a@.temporal.api.cloud.cloudservice.v1.GetConnectivityRulesResponse"\xda\x01\x82\xd3\xe4\x93\x02\x1b\x12\x19/cloud/connectivity-rules\x92\x41\xb5\x01\n\x12\x43onnectivity Rules\x12\x1bList all connectivity rules\x1a\x37Returns a list of all connectivity rules in the account"I\n\x1a\x43onnectivity documentation\x12+https://docs.temporal.io/cloud/connectivity\x12\x85\x03\n\x16\x44\x65leteConnectivityRule\x12\x41.temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleRequest\x1a\x42.temporal.api.cloud.cloudservice.v1.DeleteConnectivityRuleResponse"\xe3\x01\x82\xd3\xe4\x93\x02\x32*0/cloud/connectivity-rules/{connectivity_rule_id}\x92\x41\xa7\x01\n\x12\x43onnectivity Rules\x12\x18\x44\x65lete connectivity rule\x1a,Removes a connectivity rule from the account"I\n\x1a\x43onnectivity documentation\x12+https://docs.temporal.io/cloud/connectivity\x12\xe2\x02\n\x0cGetAuditLogs\x12\x37.temporal.api.cloud.cloudservice.v1.GetAuditLogsRequest\x1a\x38.temporal.api.cloud.cloudservice.v1.GetAuditLogsResponse"\xde\x01\x82\xd3\xe4\x93\x02\x13\x12\x11/cloud/audit-logs\x92\x41\xc1\x01\n\x07\x41\x63\x63ount\x12\x0eGet audit logs\x1aYReturns a paginated list of audit logs for the account, optionally filtered by time range"K\n\x1b\x41udit logging documentation\x12,https://docs.temporal.io/cloud/audit-logging\x12\xb4\x04\n\x1bValidateAccountAuditLogSink\x12\x46.temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkRequest\x1aG.temporal.api.cloud.cloudservice.v1.ValidateAccountAuditLogSinkResponse"\x83\x03\x82\xd3\xe4\x93\x02#"\x1e/cloud/audit-log-sink-validate:\x01*\x92\x41\xd6\x02\n\x07\x41\x63\x63ount\x12\x17Validate audit log sink\x1a\xe4\x01Validate customer audit log sink is accessible from Temporal\'s workflow by delivering an empty file to the specified sink. The operation verifies that the sink is correctly configured, accessible and ready to receive audit logs."K\n\x1b\x41udit logging documentation\x12,https://docs.temporal.io/cloud/audit-logging\x12\xf4\x02\n\x19\x43reateAccountAuditLogSink\x12\x44.temporal.api.cloud.cloudservice.v1.CreateAccountAuditLogSinkRequest\x1a\x45.temporal.api.cloud.cloudservice.v1.CreateAccountAuditLogSinkResponse"\xc9\x01\x82\xd3\xe4\x93\x02\x1b"\x16/cloud/audit-log-sinks:\x01*\x92\x41\xa4\x01\n\x07\x41\x63\x63ount\x12\x15\x43reate audit log sink\x1a\x35\x43reates a new audit log sink for exporting audit logs"K\n\x1b\x41udit logging documentation\x12,https://docs.temporal.io/cloud/audit-logging\x12\xfb\x02\n\x16GetAccountAuditLogSink\x12\x41.temporal.api.cloud.cloudservice.v1.GetAccountAuditLogSinkRequest\x1a\x42.temporal.api.cloud.cloudservice.v1.GetAccountAuditLogSinkResponse"\xd9\x01\x82\xd3\xe4\x93\x02\x1f\x12\x1d/cloud/audit-log-sinks/{name}\x92\x41\xb0\x01\n\x07\x41\x63\x63ount\x12\x1aGet audit log sink details\x1a.temporal.api.cloud.cloudservice.v1.CreateBillingReportRequest\x1a?.temporal.api.cloud.cloudservice.v1.CreateBillingReportResponse"\xc1\x01\x82\xd3\xe4\x93\x02\x1b"\x16/cloud/billing-reports:\x01*\x92\x41\x9c\x01\n\x07\x42illing\x12\x17\x43reate a billing report\x1a(Creates a billing report for the account"N\n\x1c\x42illing report documentation\x12.https://docs.temporal.io/cloud/billing-reports\x12\xe6\x02\n\x10GetBillingReport\x12;.temporal.api.cloud.cloudservice.v1.GetBillingReportRequest\x1a<.temporal.api.cloud.cloudservice.v1.GetBillingReportResponse"\xd6\x01\x82\xd3\xe4\x93\x02,\x12*/cloud/billing-reports/{billing_report_id}\x92\x41\xa0\x01\n\x07\x42illing\x12\x14Get a billing report\x1a/Gets an existing billing report for the account"N\n\x1c\x42illing report documentation\x12.https://docs.temporal.io/cloud/billing-reports\x12\xc4\x02\n\x0eGetCustomRoles\x12\x39.temporal.api.cloud.cloudservice.v1.GetCustomRolesRequest\x1a:.temporal.api.cloud.cloudservice.v1.GetCustomRolesResponse"\xba\x01\x82\xd3\xe4\x93\x02\x15\x12\x13/cloud/custom-roles\x92\x41\x9b\x01\n\x0c\x43ustom Roles\x12\x11List custom roles\x1a-Returns a list of custom roles in the account"I\n\x1a\x43ustom roles documentation\x12+https://docs.temporal.io/cloud/custom-roles\x12\xcc\x02\n\rGetCustomRole\x12\x38.temporal.api.cloud.cloudservice.v1.GetCustomRoleRequest\x1a\x39.temporal.api.cloud.cloudservice.v1.GetCustomRoleResponse"\xc5\x01\x82\xd3\xe4\x93\x02\x1f\x12\x1d/cloud/custom-roles/{role_id}\x92\x41\x9c\x01\n\x0c\x43ustom Roles\x12\x15Get custom role by ID\x1a*Returns details for a specific custom role"I\n\x1a\x43ustom roles documentation\x12+https://docs.temporal.io/cloud/custom-roles\x12\xcb\x02\n\x10\x43reateCustomRole\x12;.temporal.api.cloud.cloudservice.v1.CreateCustomRoleRequest\x1a<.temporal.api.cloud.cloudservice.v1.CreateCustomRoleResponse"\xbb\x01\x82\xd3\xe4\x93\x02\x18"\x13/cloud/custom-roles:\x01*\x92\x41\x99\x01\n\x0c\x43ustom Roles\x12\x14\x43reate a custom role\x1a(Creates a new custom role in the account"I\n\x1a\x43ustom roles documentation\x12+https://docs.temporal.io/cloud/custom-roles\x12\xcc\x02\n\x10UpdateCustomRole\x12;.temporal.api.cloud.cloudservice.v1.UpdateCustomRoleRequest\x1a<.temporal.api.cloud.cloudservice.v1.UpdateCustomRoleResponse"\xbc\x01\x82\xd3\xe4\x93\x02""\x1d/cloud/custom-roles/{role_id}:\x01*\x92\x41\x90\x01\n\x0c\x43ustom Roles\x12\x14Update a custom role\x1a\x1fUpdates an existing custom role"I\n\x1a\x43ustom roles documentation\x12+https://docs.temporal.io/cloud/custom-roles\x12\xd0\x02\n\x10\x44\x65leteCustomRole\x12;.temporal.api.cloud.cloudservice.v1.DeleteCustomRoleRequest\x1a<.temporal.api.cloud.cloudservice.v1.DeleteCustomRoleResponse"\xc0\x01\x82\xd3\xe4\x93\x02\x1f*\x1d/cloud/custom-roles/{role_id}\x92\x41\x97\x01\n\x0c\x43ustom Roles\x12\x14\x44\x65lete a custom role\x1a&Deletes a custom role from the account"I\n\x1a\x43ustom roles documentation\x12+https://docs.temporal.io/cloud/custom-roles\x12\xb9\x03\n\x1bGetUserNamespaceAssignments\x12\x46.temporal.api.cloud.cloudservice.v1.GetUserNamespaceAssignmentsRequest\x1aG.temporal.api.cloud.cloudservice.v1.GetUserNamespaceAssignmentsResponse"\x88\x02\x82\xd3\xe4\x93\x02\x30\x12./cloud/namespaces/{namespace}/user-assignments\x92\x41\xce\x01\n\x05Users\x12$Get users with access to a namespace\x1a\x62Returns the users that have access to the namespace, including each user\'s namespace-level access.";\n\x13Users documentation\x12$https://docs.temporal.io/cloud/users\x12\xa5\x04\n%GetServiceAccountNamespaceAssignments\x12P.temporal.api.cloud.cloudservice.v1.GetServiceAccountNamespaceAssignmentsRequest\x1aQ.temporal.api.cloud.cloudservice.v1.GetServiceAccountNamespaceAssignmentsResponse"\xd6\x02\x82\xd3\xe4\x93\x02;\x12\x39/cloud/namespaces/{namespace}/service-account-assignments\x92\x41\x91\x02\n\x10Service Accounts\x12\x30List service accounts with access to a namespace\x1axReturns the service accounts that have access to the namespace, including each service account\'s namespace-level access."Q\n\x1eService Accounts documentation\x12/https://docs.temporal.io/cloud/service-accounts\x12\xe9\x03\n GetUserGroupNamespaceAssignments\x12K.temporal.api.cloud.cloudservice.v1.GetUserGroupNamespaceAssignmentsRequest\x1aL.temporal.api.cloud.cloudservice.v1.GetUserGroupNamespaceAssignmentsResponse"\xa9\x02\x82\xd3\xe4\x93\x02\x36\x12\x34/cloud/namespaces/{namespace}/user-group-assignments\x92\x41\xe9\x01\n\x06Groups\x12+List user groups with access to a namespace\x1aiReturns the user groups that have access to the namespace, including each group\'s namespace-level access."G\n\x19User groups documentation\x12*https://docs.temporal.io/cloud/user-groupsB\xc1\x15\n%io.temporal.api.cloud.cloudservice.v1B\x0cServiceProtoP\x01Z5go.temporal.io/api/cloud/cloudservice/v1;cloudservice\xaa\x02$Temporalio.Api.Cloud.CloudService.V1\xea\x02(Temporalio::Api::Cloud::CloudService::V1\x92\x41\xfd\x13\x12\xe0\r\n\x16Temporal Cloud Ops API\x12\x96\x0cProgrammatic access to manage Temporal Cloud control plane resources including namespaces, users, service accounts, and more.\n\n## Authentication\n\nAll API requests require authentication using an API Key. Include your API key in the `Authorization` header using the Bearer scheme:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\nAPI keys can be created and managed through the [API Keys endpoints](#tag/API-Keys) or via the Temporal Cloud UI. For more information, see [API Keys Documentation](https://docs.temporal.io/cloud/api-keys).\n\n## Authorization\n\nThe API uses Role-Based Access Control (RBAC) to manage permissions. Each operation requires specific role-based permissions in addition to a valid API key.\n\n### Account-Level Roles\n\n- **Account Owner** - Full account administration access\n- **Account Admin** - Manage namespaces, users, and service accounts \n- **Account Developer** - Create namespaces and manage Nexus endpoints\n- **Finance Admin** - View usage and billing information\n- **Account Read** - Read-only access to account resources\n\n### Namespace-Level Roles\n\n- **Namespace Admin** - Full access to namespace configuration and data\n- **Namespace Write** - Execute workflows and modify workflow data\n- **Namespace Read** - Read-only access to namespace data\n\nNamespace-level permissions are scoped to specific namespaces. A user or service account may have different permission levels across different namespaces.\n\nFor detailed information about roles and permissions, see [Access Control Documentation](https://docs.temporal.io/cloud/users).2\x03\x31.0:\xa7\x01\n\x06x-logo\x12\x9c\x01*\x99\x01\n\x96\x01\n\x03url\x12\x8e\x01\x1a\x8b\x01https://images.ctfassets.net/0uuz8ydxyd9p/4YGUnEoCaH9SyoUDhlJkau/e1600205d17eeee3033d926ef06664a9/Temporal_LogoLockup_Horizontal_dark_1.svgj.\n\nNamespaces\x12 Manage Temporal Cloud namespacesj0\n\x05Users\x12\'Manage users and their namespace accessjF\n\x10Service Accounts\x12\x32Manage service accounts and their namespace accessj.\n\x08\x41PI Keys\x12"Manage API keys for authenticationj1\n\x06Groups\x12\'Manage user groups and group membershipj\x1f\n\x05Nexus\x12\x16Manage Nexus endpointsj\x7f\n\x11High Availability\x12jManage high availability (multi-region, multi-cloud, and same-region replication) namespace configurationsj7\n\x06\x45xport\x12-Manage workflow history export configurationsj7\n\x12\x43onnectivity Rules\x12!Manage network connectivity rulesj"\n\x07Regions\x12\x17Query available regionsj,\n\x07\x41\x63\x63ount\x12!Manage account settings and usagej9\n\x0c\x43ustom Roles\x12)Manage custom roles and their permissionsj*\n\nOperations\x12\x1cQuery async operation statusr>\n\x1cTemporal Cloud Documentation\x12\x1ehttps://docs.temporal.io/cloudb\x06proto3' ) - -_CLOUDSERVICE = DESCRIPTOR.services_by_name["CloudService"] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b"\n%io.temporal.api.cloud.cloudservice.v1B\014ServiceProtoP\001Z5go.temporal.io/api/cloud/cloudservice/v1;cloudservice\252\002$Temporalio.Api.Cloud.CloudService.V1\352\002(Temporalio::Api::Cloud::CloudService::V1" + DESCRIPTOR._serialized_options = b"\n%io.temporal.api.cloud.cloudservice.v1B\014ServiceProtoP\001Z5go.temporal.io/api/cloud/cloudservice/v1;cloudservice\252\002$Temporalio.Api.Cloud.CloudService.V1\352\002(Temporalio::Api::Cloud::CloudService::V1\222A\375\023\022\340\r\n\026Temporal Cloud Ops API\022\226\014Programmatic access to manage Temporal Cloud control plane resources including namespaces, users, service accounts, and more.\n\n## Authentication\n\nAll API requests require authentication using an API Key. Include your API key in the `Authorization` header using the Bearer scheme:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\nAPI keys can be created and managed through the [API Keys endpoints](#tag/API-Keys) or via the Temporal Cloud UI. For more information, see [API Keys Documentation](https://docs.temporal.io/cloud/api-keys).\n\n## Authorization\n\nThe API uses Role-Based Access Control (RBAC) to manage permissions. Each operation requires specific role-based permissions in addition to a valid API key.\n\n### Account-Level Roles\n\n- **Account Owner** - Full account administration access\n- **Account Admin** - Manage namespaces, users, and service accounts \n- **Account Developer** - Create namespaces and manage Nexus endpoints\n- **Finance Admin** - View usage and billing information\n- **Account Read** - Read-only access to account resources\n\n### Namespace-Level Roles\n\n- **Namespace Admin** - Full access to namespace configuration and data\n- **Namespace Write** - Execute workflows and modify workflow data\n- **Namespace Read** - Read-only access to namespace data\n\nNamespace-level permissions are scoped to specific namespaces. A user or service account may have different permission levels across different namespaces.\n\nFor detailed information about roles and permissions, see [Access Control Documentation](https://docs.temporal.io/cloud/users).2\0031.0:\247\001\n\006x-logo\022\234\001*\231\001\n\226\001\n\003url\022\216\001\032\213\001https://images.ctfassets.net/0uuz8ydxyd9p/4YGUnEoCaH9SyoUDhlJkau/e1600205d17eeee3033d926ef06664a9/Temporal_LogoLockup_Horizontal_dark_1.svgj.\n\nNamespaces\022 Manage Temporal Cloud namespacesj0\n\005Users\022'Manage users and their namespace accessjF\n\020Service Accounts\0222Manage service accounts and their namespace accessj.\n\010API Keys\022\"Manage API keys for authenticationj1\n\006Groups\022'Manage user groups and group membershipj\037\n\005Nexus\022\026Manage Nexus endpointsj\177\n\021High Availability\022jManage high availability (multi-region, multi-cloud, and same-region replication) namespace configurationsj7\n\006Export\022-Manage workflow history export configurationsj7\n\022Connectivity Rules\022!Manage network connectivity rulesj\"\n\007Regions\022\027Query available regionsj,\n\007Account\022!Manage account settings and usagej9\n\014Custom Roles\022)Manage custom roles and their permissionsj*\n\nOperations\022\034Query async operation statusr>\n\034Temporal Cloud Documentation\022\036https://docs.temporal.io/cloud" + _CLOUDSERVICE.methods_by_name["GetCurrentIdentity"]._options = None + _CLOUDSERVICE.methods_by_name[ + "GetCurrentIdentity" + ]._serialized_options = b"\202\323\344\223\002\031\022\027/cloud/current-identity\222Ax\n\007Account\022\024Get current identity\032WReturns information about the currently authenticated user or service account principal" _CLOUDSERVICE.methods_by_name["GetUsers"]._options = None _CLOUDSERVICE.methods_by_name[ "GetUsers" - ]._serialized_options = b"\202\323\344\223\002\016\022\014/cloud/users" + ]._serialized_options = b'\202\323\344\223\002\016\022\014/cloud/users\222A\225\001\n\005Users\022\016List all users\032*Returns a list of all users in the account"E\n\035User management documentation\022$https://docs.temporal.io/cloud/users*\tlistUsers' _CLOUDSERVICE.methods_by_name["GetUser"]._options = None _CLOUDSERVICE.methods_by_name[ "GetUser" - ]._serialized_options = b"\202\323\344\223\002\030\022\026/cloud/users/{user_id}" + ]._serialized_options = b'\202\323\344\223\002\030\022\026/cloud/users/{user_id}\222A\205\001\n\005Users\022\016Get user by ID\032%Takes a user ID, returns user details"E\n\035User management documentation\022$https://docs.temporal.io/cloud/users' _CLOUDSERVICE.methods_by_name["CreateUser"]._options = None _CLOUDSERVICE.methods_by_name[ "CreateUser" - ]._serialized_options = b'\202\323\344\223\002\021"\014/cloud/users:\001*' + ]._serialized_options = b'\202\323\344\223\002\021"\014/cloud/users:\001*\222A9\n\005Users\022\rCreate a user\032!Creates a new user in the account' _CLOUDSERVICE.methods_by_name["UpdateUser"]._options = None _CLOUDSERVICE.methods_by_name[ "UpdateUser" - ]._serialized_options = b'\202\323\344\223\002\033"\026/cloud/users/{user_id}:\001*' + ]._serialized_options = b'\202\323\344\223\002\033"\026/cloud/users/{user_id}:\001*\222A:\n\005Users\022\rUpdate a user\032"Updates an existing user\'s details' _CLOUDSERVICE.methods_by_name["DeleteUser"]._options = None _CLOUDSERVICE.methods_by_name[ "DeleteUser" - ]._serialized_options = b"\202\323\344\223\002\030*\026/cloud/users/{user_id}" + ]._serialized_options = b"\202\323\344\223\002\030*\026/cloud/users/{user_id}\222A7\n\005Users\022\rDelete a user\032\037Removes a user from the account" _CLOUDSERVICE.methods_by_name["SetUserNamespaceAccess"]._options = None _CLOUDSERVICE.methods_by_name[ "SetUserNamespaceAccess" - ]._serialized_options = b'\202\323\344\223\0029"4/cloud/namespaces/{namespace}/users/{user_id}/access:\001*' + ]._serialized_options = b'\202\323\344\223\0029"4/cloud/namespaces/{namespace}/users/{user_id}/access:\001*\222A\305\001\n\005Users\022\031Set user namespace access\0328Configures a user\'s permissions for a specific namespace"g\n#Namespace permissions documentation\022@https://docs.temporal.io/cloud/users-namespace-level-permissions' _CLOUDSERVICE.methods_by_name["GetAsyncOperation"]._options = None _CLOUDSERVICE.methods_by_name[ "GetAsyncOperation" - ]._serialized_options = ( - b"\202\323\344\223\002(\022&/cloud/operations/{async_operation_id}" - ) + ]._serialized_options = b"\202\323\344\223\002(\022&/cloud/operations/{async_operation_id}\222Am\n\nOperations\022\032Get async operation status\032CReturns the current status and details of an asynchronous operation" _CLOUDSERVICE.methods_by_name["CreateNamespace"]._options = None _CLOUDSERVICE.methods_by_name[ "CreateNamespace" - ]._serialized_options = b'\202\323\344\223\002\026"\021/cloud/namespaces:\001*' + ]._serialized_options = b'\202\323\344\223\002\026"\021/cloud/namespaces:\001*\222A\231\001\n\nNamespaces\022\022Create a namespace\032&Creates a new namespace in the account"O\n"Namespace management documentation\022)https://docs.temporal.io/cloud/namespaces' _CLOUDSERVICE.methods_by_name["GetNamespaces"]._options = None _CLOUDSERVICE.methods_by_name[ "GetNamespaces" - ]._serialized_options = b"\202\323\344\223\002\023\022\021/cloud/namespaces" + ]._serialized_options = b'\202\323\344\223\002\023\022\021/cloud/namespaces\222A\243\001\n\nNamespaces\022\023List all namespaces\032/Returns a list of all namespaces in the account"O\n"Namespace management documentation\022)https://docs.temporal.io/cloud/namespaces' _CLOUDSERVICE.methods_by_name["GetNamespace"]._options = None _CLOUDSERVICE.methods_by_name[ "GetNamespace" - ]._serialized_options = ( - b"\202\323\344\223\002\037\022\035/cloud/namespaces/{namespace}" - ) + ]._serialized_options = b'\202\323\344\223\002\037\022\035/cloud/namespaces/{namespace}\222A\255\001\n\nNamespaces\022\025Get namespace details\0327Returns detailed information about a specific namespace"O\n"Namespace management documentation\022)https://docs.temporal.io/cloud/namespaces' _CLOUDSERVICE.methods_by_name["UpdateNamespace"]._options = None _CLOUDSERVICE.methods_by_name[ "UpdateNamespace" - ]._serialized_options = ( - b'\202\323\344\223\002""\035/cloud/namespaces/{namespace}:\001*' - ) + ]._serialized_options = b'\202\323\344\223\002""\035/cloud/namespaces/{namespace}:\001*\222A\242\001\n\nNamespaces\022\022Update a namespace\032/Updates configuration for an existing namespace"O\n"Namespace management documentation\022)https://docs.temporal.io/cloud/namespaces' _CLOUDSERVICE.methods_by_name["RenameCustomSearchAttribute"]._options = None _CLOUDSERVICE.methods_by_name[ "RenameCustomSearchAttribute" - ]._serialized_options = b'\202\323\344\223\002A"Creates a new Nexus endpoint for cross-namespace communication"5\n\023Nexus documentation\022\036https://docs.temporal.io/nexus' _CLOUDSERVICE.methods_by_name["UpdateNexusEndpoint"]._options = None _CLOUDSERVICE.methods_by_name[ "UpdateNexusEndpoint" - ]._serialized_options = ( - b'\202\323\344\223\002)"$/cloud/nexus/endpoints/{endpoint_id}:\001*' - ) + ]._serialized_options = b'\202\323\344\223\002)"$/cloud/nexus/endpoints/{endpoint_id}:\001*\222A\213\001\n\005Nexus\022\027Update a Nexus endpoint\0322Updates an existing Nexus endpoint\'s configuration"5\n\023Nexus documentation\022\036https://docs.temporal.io/nexus' _CLOUDSERVICE.methods_by_name["DeleteNexusEndpoint"]._options = None _CLOUDSERVICE.methods_by_name[ "DeleteNexusEndpoint" - ]._serialized_options = ( - b"\202\323\344\223\002&*$/cloud/nexus/endpoints/{endpoint_id}" - ) + ]._serialized_options = b'\202\323\344\223\002&*$/cloud/nexus/endpoints/{endpoint_id}\222A\202\001\n\005Nexus\022\027Delete a Nexus endpoint\032)Removes a Nexus endpoint from the account"5\n\023Nexus documentation\022\036https://docs.temporal.io/nexus' _CLOUDSERVICE.methods_by_name["GetUserGroups"]._options = None _CLOUDSERVICE.methods_by_name[ "GetUserGroups" - ]._serialized_options = b"\202\323\344\223\002\024\022\022/cloud/user-groups" + ]._serialized_options = b'\202\323\344\223\002\024\022\022/cloud/user-groups\222A\247\001\n\006Groups\022\024List all user groups\0320Returns a list of all user groups in the account"U\n\031User groups documentation\0228https://docs.temporal.io/cloud/users-account-level-roles' _CLOUDSERVICE.methods_by_name["GetUserGroup"]._options = None _CLOUDSERVICE.methods_by_name[ "GetUserGroup" - ]._serialized_options = ( - b"\202\323\344\223\002\037\022\035/cloud/user-groups/{group_id}" - ) + ]._serialized_options = b'\202\323\344\223\002\037\022\035/cloud/user-groups/{group_id}\222A\243\001\n\006Groups\022\026Get user group details\0328Returns detailed information about a specific user group"G\n\031User groups documentation\022*https://docs.temporal.io/cloud/user-groups' _CLOUDSERVICE.methods_by_name["CreateUserGroup"]._options = None _CLOUDSERVICE.methods_by_name[ "CreateUserGroup" - ]._serialized_options = b'\202\323\344\223\002\027"\022/cloud/user-groups:\001*' + ]._serialized_options = b'\202\323\344\223\002\027"\022/cloud/user-groups:\001*\222A\231\001\n\006Groups\022\023Create a user group\0321Creates a new user group for managing permissions"G\n\031User groups documentation\022*https://docs.temporal.io/cloud/user-groups' _CLOUDSERVICE.methods_by_name["UpdateUserGroup"]._options = None _CLOUDSERVICE.methods_by_name[ "UpdateUserGroup" - ]._serialized_options = ( - b'\202\323\344\223\002""\035/cloud/user-groups/{group_id}:\001*' - ) + ]._serialized_options = b'\202\323\344\223\002""\035/cloud/user-groups/{group_id}:\001*\222A\223\001\n\006Groups\022\023Update a user group\032+Updates an existing user group\'s properties"G\n\031User groups documentation\022*https://docs.temporal.io/cloud/user-groups' _CLOUDSERVICE.methods_by_name["DeleteUserGroup"]._options = None _CLOUDSERVICE.methods_by_name[ "DeleteUserGroup" - ]._serialized_options = ( - b"\202\323\344\223\002\037*\035/cloud/user-groups/{group_id}" - ) + ]._serialized_options = b'\202\323\344\223\002\037*\035/cloud/user-groups/{group_id}\222A\215\001\n\006Groups\022\023Delete a user group\032%Removes a user group from the account"G\n\031User groups documentation\022*https://docs.temporal.io/cloud/user-groups' _CLOUDSERVICE.methods_by_name["SetUserGroupNamespaceAccess"]._options = None _CLOUDSERVICE.methods_by_name[ "SetUserGroupNamespaceAccess" - ]._serialized_options = b'\202\323\344\223\002@";/cloud/namespaces/{namespace}/user-groups/{group_id}/access:\001*' + ]._serialized_options = b'\202\323\344\223\002@";/cloud/namespaces/{namespace}/user-groups/{group_id}/access:\001*\222A\262\001\n\006Groups\022\037Set user group namespace access\032>Configures a user group\'s permissions for a specific namespace"G\n\031User groups documentation\022*https://docs.temporal.io/cloud/user-groups' _CLOUDSERVICE.methods_by_name["AddUserGroupMember"]._options = None _CLOUDSERVICE.methods_by_name[ "AddUserGroupMember" - ]._serialized_options = ( - b'\202\323\344\223\002*"%/cloud/user-groups/{group_id}/members:\001*' - ) + ]._serialized_options = b'\202\323\344\223\002*"%/cloud/user-groups/{group_id}/members:\001*\222A\225\001\n\006Groups\022\021Add user to group\032/Adds a user to a user group (Cloud groups only)"G\n\031User groups documentation\022*https://docs.temporal.io/cloud/user-groups' _CLOUDSERVICE.methods_by_name["RemoveUserGroupMember"]._options = None _CLOUDSERVICE.methods_by_name[ "RemoveUserGroupMember" - ]._serialized_options = ( - b'\202\323\344\223\0020"+/cloud/user-groups/{group_id}/remove-member:\001*' - ) + ]._serialized_options = b'\202\323\344\223\0020"+/cloud/user-groups/{group_id}/remove-member:\001*\222A\237\001\n\006Groups\022\026Remove user from group\0324Removes a user from a user group (Cloud groups only)"G\n\031User groups documentation\022*https://docs.temporal.io/cloud/user-groups' _CLOUDSERVICE.methods_by_name["GetUserGroupMembers"]._options = None _CLOUDSERVICE.methods_by_name[ "GetUserGroupMembers" - ]._serialized_options = ( - b"\202\323\344\223\002'\022%/cloud/user-groups/{group_id}/members" - ) + ]._serialized_options = b"\202\323\344\223\002'\022%/cloud/user-groups/{group_id}/members\222A\225\001\n\006Groups\022\025List users in a group\032+Returns a list of all users in a user group\"G\n\031User groups documentation\022*https://docs.temporal.io/cloud/user-groups" _CLOUDSERVICE.methods_by_name["CreateServiceAccount"]._options = None _CLOUDSERVICE.methods_by_name[ "CreateServiceAccount" - ]._serialized_options = ( - b'\202\323\344\223\002\034"\027/cloud/service-accounts:\001*' - ) + ]._serialized_options = b'\202\323\344\223\002\034"\027/cloud/service-accounts:\001*\222A\263\001\n\020Service Accounts\022\030Create a service account\0322Creates a new service account for automated access"Q\n\036Service Accounts documentation\022/https://docs.temporal.io/cloud/service-accounts' _CLOUDSERVICE.methods_by_name["GetServiceAccount"]._options = None _CLOUDSERVICE.methods_by_name[ "GetServiceAccount" - ]._serialized_options = ( - b"\202\323\344\223\002.\022,/cloud/service-accounts/{service_account_id}" - ) + ]._serialized_options = b'\202\323\344\223\002.\022,/cloud/service-accounts/{service_account_id}\222A\301\001\n\020Service Accounts\022\033Get service account details\032=Returns detailed information about a specific service account"Q\n\036Service Accounts documentation\022/https://docs.temporal.io/cloud/service-accounts' _CLOUDSERVICE.methods_by_name["GetServiceAccounts"]._options = None _CLOUDSERVICE.methods_by_name[ "GetServiceAccounts" - ]._serialized_options = b"\202\323\344\223\002\031\022\027/cloud/service-accounts" + ]._serialized_options = b'\202\323\344\223\002\031\022\027/cloud/service-accounts\222A\267\001\n\020Service Accounts\022\031List all service accounts\0325Returns a list of all service accounts in the account"Q\n\036Service Accounts documentation\022/https://docs.temporal.io/cloud/service-accounts' _CLOUDSERVICE.methods_by_name["UpdateServiceAccount"]._options = None _CLOUDSERVICE.methods_by_name[ "UpdateServiceAccount" - ]._serialized_options = ( - b'\202\323\344\223\0021",/cloud/service-accounts/{service_account_id}:\001*' - ) + ]._serialized_options = b'\202\323\344\223\0021",/cloud/service-accounts/{service_account_id}:\001*\222A\261\001\n\020Service Accounts\022\030Update a service account\0320Updates an existing service account\'s properties"Q\n\036Service Accounts documentation\022/https://docs.temporal.io/cloud/service-accounts' _CLOUDSERVICE.methods_by_name["SetServiceAccountNamespaceAccess"]._options = None _CLOUDSERVICE.methods_by_name[ "SetServiceAccountNamespaceAccess" - ]._serialized_options = b'\202\323\344\223\002O"J/cloud/namespaces/{namespace}/service-accounts/{service_account_id}/access:\001*' + ]._serialized_options = b'\202\323\344\223\002O"J/cloud/namespaces/{namespace}/service-accounts/{service_account_id}/access:\001*\222A\320\001\n\020Service Accounts\022$Set service account namespace access\032CConfigures a service account\'s permissions for a specific namespace"Q\n\036Service Accounts documentation\022/https://docs.temporal.io/cloud/service-accounts' _CLOUDSERVICE.methods_by_name["DeleteServiceAccount"]._options = None _CLOUDSERVICE.methods_by_name[ "DeleteServiceAccount" - ]._serialized_options = ( - b"\202\323\344\223\002.*,/cloud/service-accounts/{service_account_id}" - ) + ]._serialized_options = b'\202\323\344\223\002.*,/cloud/service-accounts/{service_account_id}\222A\253\001\n\020Service Accounts\022\030Delete a service account\032*Removes a service account from the account"Q\n\036Service Accounts documentation\022/https://docs.temporal.io/cloud/service-accounts' _CLOUDSERVICE.methods_by_name["GetUsage"]._options = None _CLOUDSERVICE.methods_by_name[ "GetUsage" - ]._serialized_options = b"\202\323\344\223\002\016\022\014/cloud/usage" + ]._serialized_options = b"\202\323\344\223\002\016\022\014/cloud/usage\222A=\n\007Account\022\016Get usage data\032 Get usage data across namespacesX\001" _CLOUDSERVICE.methods_by_name["GetAccount"]._options = None _CLOUDSERVICE.methods_by_name[ "GetAccount" - ]._serialized_options = b"\202\323\344\223\002\020\022\016/cloud/account" + ]._serialized_options = b'\202\323\344\223\002\020\022\016/cloud/account\222A\230\001\n\007Account\022\023Get account details\032.Returns detailed information about the account"H\n\025Billing documentation\022/https://docs.temporal.io/cloud/billing-and-cost' _CLOUDSERVICE.methods_by_name["UpdateAccount"]._options = None _CLOUDSERVICE.methods_by_name[ "UpdateAccount" - ]._serialized_options = b'\202\323\344\223\002\023"\016/cloud/account:\001*' + ]._serialized_options = b'\202\323\344\223\002\023"\016/cloud/account:\001*\222A\227\001\n\007Account\022\026Update account details\032*Updates account configuration and settings"H\n\025Billing documentation\022/https://docs.temporal.io/cloud/billing-and-cost' _CLOUDSERVICE.methods_by_name["CreateNamespaceExportSink"]._options = None _CLOUDSERVICE.methods_by_name[ "CreateNamespaceExportSink" - ]._serialized_options = ( - b'\202\323\344\223\002/"*/cloud/namespaces/{namespace}/export-sinks:\001*' - ) + ]._serialized_options = b'\202\323\344\223\002/"*/cloud/namespaces/{namespace}/export-sinks:\001*\222A\217\001\n\006Export\022\032Create history export sink\032*Creates a new workflow history export sink"=\n\024Export documentation\022%https://docs.temporal.io/cloud/export' _CLOUDSERVICE.methods_by_name["GetNamespaceExportSink"]._options = None _CLOUDSERVICE.methods_by_name[ "GetNamespaceExportSink" - ]._serialized_options = ( - b"\202\323\344\223\0023\0221/cloud/namespaces/{namespace}/export-sinks/{name}" - ) + ]._serialized_options = b'\202\323\344\223\0023\0221/cloud/namespaces/{namespace}/export-sinks/{name}\222A\255\001\n\006Export\022\030Get history sink details\032JReturns detailed information about a specific workflow history export sink"=\n\024Export documentation\022%https://docs.temporal.io/cloud/export' _CLOUDSERVICE.methods_by_name["GetNamespaceExportSinks"]._options = None _CLOUDSERVICE.methods_by_name[ "GetNamespaceExportSinks" - ]._serialized_options = ( - b"\202\323\344\223\002,\022*/cloud/namespaces/{namespace}/export-sinks" - ) + ]._serialized_options = b'\202\323\344\223\002,\022*/cloud/namespaces/{namespace}/export-sinks\222A\247\001\n\006Export\022\031List history export sinks\032CReturns a list of all workflow history export sinks for a namespace"=\n\024Export documentation\022%https://docs.temporal.io/cloud/export' _CLOUDSERVICE.methods_by_name["UpdateNamespaceExportSink"]._options = None _CLOUDSERVICE.methods_by_name[ "UpdateNamespaceExportSink" - ]._serialized_options = b'\202\323\344\223\002;"6/cloud/namespaces/{namespace}/export-sinks/{spec.name}:\001*' + ]._serialized_options = b'\202\323\344\223\002;"6/cloud/namespaces/{namespace}/export-sinks/{spec.name}:\001*\222A\245\001\n\006Export\022\032Update history export sink\032@Updates an existing workflow history export sink\'s configuration"=\n\024Export documentation\022%https://docs.temporal.io/cloud/export' _CLOUDSERVICE.methods_by_name["DeleteNamespaceExportSink"]._options = None _CLOUDSERVICE.methods_by_name[ "DeleteNamespaceExportSink" - ]._serialized_options = ( - b"\202\323\344\223\0023*1/cloud/namespaces/{namespace}/export-sinks/{name}" - ) + ]._serialized_options = b'\202\323\344\223\0023*1/cloud/namespaces/{namespace}/export-sinks/{name}\222A\234\001\n\006Export\022\032Delete history export sink\0327Removes a workflow history export sink from a namespace"=\n\024Export documentation\022%https://docs.temporal.io/cloud/export' _CLOUDSERVICE.methods_by_name["ValidateNamespaceExportSink"]._options = None _CLOUDSERVICE.methods_by_name[ "ValidateNamespaceExportSink" - ]._serialized_options = b'\202\323\344\223\0028"3/cloud/namespaces/{namespace}/export-sinks/validate:\001*' + ]._serialized_options = b'\202\323\344\223\0027"2/cloud/namespaces/{namespace}/export-sink-validate:\001*\222A\327\001\n\006Export\022*Validate history export sink configuration\032bTests workflow history export sink configuration by delivering a test file to verify accessibility"=\n\024Export documentation\022%https://docs.temporal.io/cloud/export' _CLOUDSERVICE.methods_by_name["UpdateNamespaceTags"]._options = None _CLOUDSERVICE.methods_by_name[ "UpdateNamespaceTags" - ]._serialized_options = ( - b'\202\323\344\223\002.")/cloud/namespaces/{namespace}/update-tags:\001*' - ) + ]._serialized_options = b'\202\323\344\223\002.")/cloud/namespaces/{namespace}/update-tags:\001*\222A\253\001\n\nNamespaces\022\025Update namespace tags\032,Updates the tags associated with a namespace"X\n\033Namespace tag documentation\0229https://docs.temporal.io/cloud/namespaces#tag-a-namespace' _CLOUDSERVICE.methods_by_name["CreateConnectivityRule"]._options = None _CLOUDSERVICE.methods_by_name[ "CreateConnectivityRule" - ]._serialized_options = ( - b'\202\323\344\223\002\036"\031/cloud/connectivity-rules:\001*' - ) + ]._serialized_options = b'\202\323\344\223\002\036"\031/cloud/connectivity-rules:\001*\222A\265\001\n\022Connectivity Rules\022\030Create connectivity rule\032:Creates a new connectivity rule for network access control"I\n\032Connectivity documentation\022+https://docs.temporal.io/cloud/connectivity' _CLOUDSERVICE.methods_by_name["GetConnectivityRule"]._options = None _CLOUDSERVICE.methods_by_name[ "GetConnectivityRule" - ]._serialized_options = ( - b"\202\323\344\223\0022\0220/cloud/connectivity-rules/{connectivity_rule_id}" - ) + ]._serialized_options = b'\202\323\344\223\0022\0220/cloud/connectivity-rules/{connectivity_rule_id}\222A\277\001\n\022Connectivity Rules\022\035Get connectivity rule details\032?Returns detailed information about a specific connectivity rule"I\n\032Connectivity documentation\022+https://docs.temporal.io/cloud/connectivity' _CLOUDSERVICE.methods_by_name["GetConnectivityRules"]._options = None _CLOUDSERVICE.methods_by_name[ "GetConnectivityRules" - ]._serialized_options = b"\202\323\344\223\002\033\022\031/cloud/connectivity-rules" + ]._serialized_options = b'\202\323\344\223\002\033\022\031/cloud/connectivity-rules\222A\265\001\n\022Connectivity Rules\022\033List all connectivity rules\0327Returns a list of all connectivity rules in the account"I\n\032Connectivity documentation\022+https://docs.temporal.io/cloud/connectivity' _CLOUDSERVICE.methods_by_name["DeleteConnectivityRule"]._options = None _CLOUDSERVICE.methods_by_name[ "DeleteConnectivityRule" - ]._serialized_options = ( - b"\202\323\344\223\0022*0/cloud/connectivity-rules/{connectivity_rule_id}" - ) + ]._serialized_options = b'\202\323\344\223\0022*0/cloud/connectivity-rules/{connectivity_rule_id}\222A\247\001\n\022Connectivity Rules\022\030Delete connectivity rule\032,Removes a connectivity rule from the account"I\n\032Connectivity documentation\022+https://docs.temporal.io/cloud/connectivity' + _CLOUDSERVICE.methods_by_name["GetAuditLogs"]._options = None + _CLOUDSERVICE.methods_by_name[ + "GetAuditLogs" + ]._serialized_options = b'\202\323\344\223\002\023\022\021/cloud/audit-logs\222A\301\001\n\007Account\022\016Get audit logs\032YReturns a paginated list of audit logs for the account, optionally filtered by time range"K\n\033Audit logging documentation\022,https://docs.temporal.io/cloud/audit-logging' _CLOUDSERVICE.methods_by_name["ValidateAccountAuditLogSink"]._options = None _CLOUDSERVICE.methods_by_name[ "ValidateAccountAuditLogSink" - ]._serialized_options = ( - b"\202\323\344\223\002,\"'/cloud/account/audit-logs/sink/validate:\001*" - ) - _CLOUDSERVICE._serialized_start = 178 - _CLOUDSERVICE._serialized_end = 11296 + ]._serialized_options = b'\202\323\344\223\002#"\036/cloud/audit-log-sink-validate:\001*\222A\326\002\n\007Account\022\027Validate audit log sink\032\344\001Validate customer audit log sink is accessible from Temporal\'s workflow by delivering an empty file to the specified sink. The operation verifies that the sink is correctly configured, accessible and ready to receive audit logs."K\n\033Audit logging documentation\022,https://docs.temporal.io/cloud/audit-logging' + _CLOUDSERVICE.methods_by_name["CreateAccountAuditLogSink"]._options = None + _CLOUDSERVICE.methods_by_name[ + "CreateAccountAuditLogSink" + ]._serialized_options = b'\202\323\344\223\002\033"\026/cloud/audit-log-sinks:\001*\222A\244\001\n\007Account\022\025Create audit log sink\0325Creates a new audit log sink for exporting audit logs"K\n\033Audit logging documentation\022,https://docs.temporal.io/cloud/audit-logging' + _CLOUDSERVICE.methods_by_name["GetAccountAuditLogSink"]._options = None + _CLOUDSERVICE.methods_by_name[ + "GetAccountAuditLogSink" + ]._serialized_options = b'\202\323\344\223\002\037\022\035/cloud/audit-log-sinks/{name}\222A\260\001\n\007Account\022\032Get audit log sink details\032 None: ... + def __init__( + self, channel: typing.Union[grpc.Channel, grpc.aio.Channel] + ) -> None: ... + GetCurrentIdentity: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCurrentIdentityRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCurrentIdentityResponse, + ] + """Get information about the current authenticated user or service account principal""" + GetUsers: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsersRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsersResponse, ] """Gets all known users""" + GetUser: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserResponse, ] """Get a user""" + CreateUser: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserResponse, ] """Create a user""" + UpdateUser: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserResponse, ] """Update a user""" + DeleteUser: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserResponse, ] """Delete a user""" + SetUserNamespaceAccess: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserNamespaceAccessRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserNamespaceAccessResponse, ] """Set a user's access to a namespace""" + GetAsyncOperation: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAsyncOperationRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAsyncOperationResponse, ] """Get the latest information on an async operation""" + CreateNamespace: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceResponse, ] """Create a new namespace""" + GetNamespaces: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespacesRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespacesResponse, ] """Get all namespaces""" + GetNamespace: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceResponse, ] """Get a namespace""" + UpdateNamespace: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceResponse, ] """Update a namespace""" + RenameCustomSearchAttribute: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.RenameCustomSearchAttributeRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.RenameCustomSearchAttributeResponse, ] """Rename an existing customer search attribute""" + DeleteNamespace: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceResponse, ] """Delete a namespace""" + FailoverNamespaceRegion: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.FailoverNamespaceRegionRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.FailoverNamespaceRegionResponse, ] """Failover a multi-region namespace""" + AddNamespaceRegion: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddNamespaceRegionRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddNamespaceRegionResponse, ] - """Add a new region to a namespace""" + """Add a new region to a namespace + Deprecated: Use the UpdateNamespace() to add new replica in the namespace spec instead. + """ + DeleteNamespaceRegion: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRegionRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRegionResponse, ] - """Delete a region from a namespace""" + """Delete a region from a namespace + Deprecated: Use the UpdateNamespace() to delete a replica in the namespace spec instead. + """ + GetRegions: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionsRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionsResponse, ] """Get all regions""" + GetRegion: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionResponse, ] """Get a region""" + GetApiKeys: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeysRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeysResponse, ] """Get all known API keys""" + GetApiKey: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeyRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeyResponse, ] """Get an API key""" + CreateApiKey: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateApiKeyRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateApiKeyResponse, ] """Create an API key""" + UpdateApiKey: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateApiKeyRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateApiKeyResponse, ] """Update an API key""" + DeleteApiKey: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteApiKeyRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteApiKeyResponse, ] """Delete an API key""" + GetNexusEndpoints: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointsRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointsResponse, ] """Gets nexus endpoints""" + GetNexusEndpoint: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointResponse, ] """Get a nexus endpoint""" + CreateNexusEndpoint: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNexusEndpointRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNexusEndpointResponse, ] """Create a nexus endpoint""" + UpdateNexusEndpoint: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNexusEndpointRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNexusEndpointResponse, ] """Update a nexus endpoint""" + DeleteNexusEndpoint: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNexusEndpointRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNexusEndpointResponse, ] """Delete a nexus endpoint""" + GetUserGroups: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupsRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupsResponse, ] """Get all user groups""" + GetUserGroup: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupResponse, ] """Get a user group""" + CreateUserGroup: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserGroupRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserGroupResponse, ] """Create new a user group""" + UpdateUserGroup: grpc.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserGroupRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserGroupResponse, ] """Update a user group""" - DeleteUserGroup: grpc.UnaryUnaryMultiCallable[ + + DeleteUserGroup: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserGroupRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserGroupResponse, + ] + """Delete a user group""" + + SetUserGroupNamespaceAccess: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserGroupNamespaceAccessRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserGroupNamespaceAccessResponse, + ] + """Set a user group's access to a namespace""" + + AddUserGroupMember: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddUserGroupMemberRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddUserGroupMemberResponse, + ] + """Add a member to the group, can only be used with Cloud group types.""" + + RemoveUserGroupMember: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.RemoveUserGroupMemberRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.RemoveUserGroupMemberResponse, + ] + """Remove a member from the group, can only be used with Cloud group types.""" + + GetUserGroupMembers: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupMembersRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupMembersResponse, + ] + + CreateServiceAccount: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateServiceAccountRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateServiceAccountResponse, + ] + """Create a service account.""" + + GetServiceAccount: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountResponse, + ] + """Get a service account.""" + + GetServiceAccounts: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountsResponse, + ] + """Get service accounts.""" + + UpdateServiceAccount: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateServiceAccountRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateServiceAccountResponse, + ] + """Update a service account.""" + + SetServiceAccountNamespaceAccess: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetServiceAccountNamespaceAccessRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetServiceAccountNamespaceAccessResponse, + ] + """Set a service account's access to a namespace.""" + + DeleteServiceAccount: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteServiceAccountRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteServiceAccountResponse, + ] + """Delete a service account.""" + + GetUsage: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsageRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsageResponse, + ] + """WARNING: Pre-Release Feature + Get usage data across namespaces + """ + + GetAccount: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountResponse, + ] + """Get account information.""" + + UpdateAccount: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountResponse, + ] + """Update account information.""" + + CreateNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceExportSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceExportSinkResponse, + ] + """Create an export sink""" + + GetNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinkResponse, + ] + """Get an export sink""" + + GetNamespaceExportSinks: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinksRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinksResponse, + ] + """Get export sinks""" + + UpdateNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceExportSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceExportSinkResponse, + ] + """Update an export sink""" + + DeleteNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceExportSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceExportSinkResponse, + ] + """Delete an export sink""" + + ValidateNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateNamespaceExportSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateNamespaceExportSinkResponse, + ] + """Validates an export sink configuration by delivering an empty test file to the specified sink. + This operation verifies that the sink is correctly configured, accessible, and ready for data export. + """ + + UpdateNamespaceTags: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceTagsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceTagsResponse, + ] + """Update the tags for a namespace""" + + CreateConnectivityRule: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateConnectivityRuleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateConnectivityRuleResponse, + ] + """Creates a connectivity rule""" + + GetConnectivityRule: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRuleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRuleResponse, + ] + """Gets a connectivity rule by id""" + + GetConnectivityRules: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRulesRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRulesResponse, + ] + """Lists connectivity rules by account""" + + DeleteConnectivityRule: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteConnectivityRuleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteConnectivityRuleResponse, + ] + """Deletes a connectivity rule by id""" + + GetAuditLogs: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAuditLogsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAuditLogsResponse, + ] + """Get audit logs""" + + ValidateAccountAuditLogSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateAccountAuditLogSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateAccountAuditLogSinkResponse, + ] + """Validate customer audit log sink is accessible from Temporal's workflow by delivering an empty file to the specified sink. + The operation verifies that the sink is correctly configured, accessible and ready to receive audit logs. + """ + + CreateAccountAuditLogSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateAccountAuditLogSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateAccountAuditLogSinkResponse, + ] + """Create an audit log sink""" + + GetAccountAuditLogSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinkResponse, + ] + """Get an audit log sink""" + + GetAccountAuditLogSinks: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinksRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinksResponse, + ] + """Get audit log sinks""" + + UpdateAccountAuditLogSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountAuditLogSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountAuditLogSinkResponse, + ] + """Update an audit log sink""" + + DeleteAccountAuditLogSink: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteAccountAuditLogSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteAccountAuditLogSinkResponse, + ] + """Delete an audit log sink""" + + GetNamespaceCapacityInfo: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceCapacityInfoRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceCapacityInfoResponse, + ] + """Get namespace capacity information""" + + CreateBillingReport: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateBillingReportRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateBillingReportResponse, + ] + """Create a billing report""" + + GetBillingReport: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetBillingReportRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetBillingReportResponse, + ] + """Get a billing report""" + + GetCustomRoles: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRolesRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRolesResponse, + ] + """Get custom roles""" + + GetCustomRole: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRoleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRoleResponse, + ] + """Get a custom role""" + + CreateCustomRole: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateCustomRoleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateCustomRoleResponse, + ] + """Create a custom role""" + + UpdateCustomRole: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateCustomRoleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateCustomRoleResponse, + ] + """Update a custom role""" + + DeleteCustomRole: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteCustomRoleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteCustomRoleResponse, + ] + """Delete a custom role""" + + GetUserNamespaceAssignments: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserNamespaceAssignmentsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserNamespaceAssignmentsResponse, + ] + """Get users with access to a namespace""" + + GetServiceAccountNamespaceAssignments: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountNamespaceAssignmentsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountNamespaceAssignmentsResponse, + ] + """Get service accounts with access to a namespace""" + + GetUserGroupNamespaceAssignments: grpc.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupNamespaceAssignmentsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupNamespaceAssignmentsResponse, + ] + """Get user groups with access to a namespace""" + +class CloudServiceAsyncStub: + """WARNING: This service is currently experimental and may change in + incompatible ways. + """ + + GetCurrentIdentity: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCurrentIdentityRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCurrentIdentityResponse, + ] + """Get information about the current authenticated user or service account principal""" + + GetUsers: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsersRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsersResponse, + ] + """Gets all known users""" + + GetUser: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserResponse, + ] + """Get a user""" + + CreateUser: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserResponse, + ] + """Create a user""" + + UpdateUser: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserResponse, + ] + """Update a user""" + + DeleteUser: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserResponse, + ] + """Delete a user""" + + SetUserNamespaceAccess: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserNamespaceAccessRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserNamespaceAccessResponse, + ] + """Set a user's access to a namespace""" + + GetAsyncOperation: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAsyncOperationRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAsyncOperationResponse, + ] + """Get the latest information on an async operation""" + + CreateNamespace: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceResponse, + ] + """Create a new namespace""" + + GetNamespaces: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespacesRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespacesResponse, + ] + """Get all namespaces""" + + GetNamespace: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceResponse, + ] + """Get a namespace""" + + UpdateNamespace: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceResponse, + ] + """Update a namespace""" + + RenameCustomSearchAttribute: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.RenameCustomSearchAttributeRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.RenameCustomSearchAttributeResponse, + ] + """Rename an existing customer search attribute""" + + DeleteNamespace: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceResponse, + ] + """Delete a namespace""" + + FailoverNamespaceRegion: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.FailoverNamespaceRegionRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.FailoverNamespaceRegionResponse, + ] + """Failover a multi-region namespace""" + + AddNamespaceRegion: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddNamespaceRegionRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddNamespaceRegionResponse, + ] + """Add a new region to a namespace + Deprecated: Use the UpdateNamespace() to add new replica in the namespace spec instead. + """ + + DeleteNamespaceRegion: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRegionRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRegionResponse, + ] + """Delete a region from a namespace + Deprecated: Use the UpdateNamespace() to delete a replica in the namespace spec instead. + """ + + GetRegions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionsResponse, + ] + """Get all regions""" + + GetRegion: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionResponse, + ] + """Get a region""" + + GetApiKeys: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeysRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeysResponse, + ] + """Get all known API keys""" + + GetApiKey: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeyRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeyResponse, + ] + """Get an API key""" + + CreateApiKey: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateApiKeyRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateApiKeyResponse, + ] + """Create an API key""" + + UpdateApiKey: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateApiKeyRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateApiKeyResponse, + ] + """Update an API key""" + + DeleteApiKey: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteApiKeyRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteApiKeyResponse, + ] + """Delete an API key""" + + GetNexusEndpoints: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointsResponse, + ] + """Gets nexus endpoints""" + + GetNexusEndpoint: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointResponse, + ] + """Get a nexus endpoint""" + + CreateNexusEndpoint: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNexusEndpointRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNexusEndpointResponse, + ] + """Create a nexus endpoint""" + + UpdateNexusEndpoint: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNexusEndpointRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNexusEndpointResponse, + ] + """Update a nexus endpoint""" + + DeleteNexusEndpoint: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNexusEndpointRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNexusEndpointResponse, + ] + """Delete a nexus endpoint""" + + GetUserGroups: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupsResponse, + ] + """Get all user groups""" + + GetUserGroup: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupResponse, + ] + """Get a user group""" + + CreateUserGroup: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserGroupRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserGroupResponse, + ] + """Create new a user group""" + + UpdateUserGroup: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserGroupRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserGroupResponse, + ] + """Update a user group""" + + DeleteUserGroup: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserGroupRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserGroupResponse, ] """Delete a user group""" - SetUserGroupNamespaceAccess: grpc.UnaryUnaryMultiCallable[ + + SetUserGroupNamespaceAccess: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserGroupNamespaceAccessRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserGroupNamespaceAccessResponse, ] """Set a user group's access to a namespace""" - AddUserGroupMember: grpc.UnaryUnaryMultiCallable[ + + AddUserGroupMember: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddUserGroupMemberRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddUserGroupMemberResponse, ] """Add a member to the group, can only be used with Cloud group types.""" - RemoveUserGroupMember: grpc.UnaryUnaryMultiCallable[ + + RemoveUserGroupMember: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.RemoveUserGroupMemberRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.RemoveUserGroupMemberResponse, ] """Remove a member from the group, can only be used with Cloud group types.""" - GetUserGroupMembers: grpc.UnaryUnaryMultiCallable[ + + GetUserGroupMembers: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupMembersRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupMembersResponse, ] - CreateServiceAccount: grpc.UnaryUnaryMultiCallable[ + + CreateServiceAccount: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateServiceAccountRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateServiceAccountResponse, ] """Create a service account.""" - GetServiceAccount: grpc.UnaryUnaryMultiCallable[ + + GetServiceAccount: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountResponse, ] """Get a service account.""" - GetServiceAccounts: grpc.UnaryUnaryMultiCallable[ + + GetServiceAccounts: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountsRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountsResponse, ] """Get service accounts.""" - UpdateServiceAccount: grpc.UnaryUnaryMultiCallable[ + + UpdateServiceAccount: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateServiceAccountRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateServiceAccountResponse, ] """Update a service account.""" - SetServiceAccountNamespaceAccess: grpc.UnaryUnaryMultiCallable[ + + SetServiceAccountNamespaceAccess: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetServiceAccountNamespaceAccessRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetServiceAccountNamespaceAccessResponse, ] """Set a service account's access to a namespace.""" - DeleteServiceAccount: grpc.UnaryUnaryMultiCallable[ + + DeleteServiceAccount: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteServiceAccountRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteServiceAccountResponse, ] """Delete a service account.""" - GetUsage: grpc.UnaryUnaryMultiCallable[ + + GetUsage: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsageRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsageResponse, ] """WARNING: Pre-Release Feature Get usage data across namespaces """ - GetAccount: grpc.UnaryUnaryMultiCallable[ + + GetAccount: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountResponse, ] """Get account information.""" - UpdateAccount: grpc.UnaryUnaryMultiCallable[ + + UpdateAccount: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountResponse, ] """Update account information.""" - CreateNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + + CreateNamespaceExportSink: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceExportSinkRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceExportSinkResponse, ] """Create an export sink""" - GetNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + + GetNamespaceExportSink: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinkRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinkResponse, ] """Get an export sink""" - GetNamespaceExportSinks: grpc.UnaryUnaryMultiCallable[ + + GetNamespaceExportSinks: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinksRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinksResponse, ] """Get export sinks""" - UpdateNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + + UpdateNamespaceExportSink: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceExportSinkRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceExportSinkResponse, ] """Update an export sink""" - DeleteNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + + DeleteNamespaceExportSink: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceExportSinkRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceExportSinkResponse, ] """Delete an export sink""" - ValidateNamespaceExportSink: grpc.UnaryUnaryMultiCallable[ + + ValidateNamespaceExportSink: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateNamespaceExportSinkRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateNamespaceExportSinkResponse, ] """Validates an export sink configuration by delivering an empty test file to the specified sink. This operation verifies that the sink is correctly configured, accessible, and ready for data export. """ - UpdateNamespaceTags: grpc.UnaryUnaryMultiCallable[ + + UpdateNamespaceTags: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceTagsRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceTagsResponse, ] """Update the tags for a namespace""" - CreateConnectivityRule: grpc.UnaryUnaryMultiCallable[ + + CreateConnectivityRule: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateConnectivityRuleRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateConnectivityRuleResponse, ] """Creates a connectivity rule""" - GetConnectivityRule: grpc.UnaryUnaryMultiCallable[ + + GetConnectivityRule: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRuleRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRuleResponse, ] """Gets a connectivity rule by id""" - GetConnectivityRules: grpc.UnaryUnaryMultiCallable[ + + GetConnectivityRules: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRulesRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRulesResponse, ] """Lists connectivity rules by account""" - DeleteConnectivityRule: grpc.UnaryUnaryMultiCallable[ + + DeleteConnectivityRule: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteConnectivityRuleRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteConnectivityRuleResponse, ] """Deletes a connectivity rule by id""" - ValidateAccountAuditLogSink: grpc.UnaryUnaryMultiCallable[ + + GetAuditLogs: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAuditLogsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAuditLogsResponse, + ] + """Get audit logs""" + + ValidateAccountAuditLogSink: grpc.aio.UnaryUnaryMultiCallable[ temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateAccountAuditLogSinkRequest, temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateAccountAuditLogSinkResponse, ] @@ -311,429 +869,1103 @@ class CloudServiceStub: The operation verifies that the sink is correctly configured, accessible and ready to receive audit logs. """ + CreateAccountAuditLogSink: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateAccountAuditLogSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateAccountAuditLogSinkResponse, + ] + """Create an audit log sink""" + + GetAccountAuditLogSink: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinkResponse, + ] + """Get an audit log sink""" + + GetAccountAuditLogSinks: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinksRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinksResponse, + ] + """Get audit log sinks""" + + UpdateAccountAuditLogSink: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountAuditLogSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountAuditLogSinkResponse, + ] + """Update an audit log sink""" + + DeleteAccountAuditLogSink: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteAccountAuditLogSinkRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteAccountAuditLogSinkResponse, + ] + """Delete an audit log sink""" + + GetNamespaceCapacityInfo: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceCapacityInfoRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceCapacityInfoResponse, + ] + """Get namespace capacity information""" + + CreateBillingReport: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateBillingReportRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateBillingReportResponse, + ] + """Create a billing report""" + + GetBillingReport: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetBillingReportRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetBillingReportResponse, + ] + """Get a billing report""" + + GetCustomRoles: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRolesRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRolesResponse, + ] + """Get custom roles""" + + GetCustomRole: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRoleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRoleResponse, + ] + """Get a custom role""" + + CreateCustomRole: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateCustomRoleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateCustomRoleResponse, + ] + """Create a custom role""" + + UpdateCustomRole: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateCustomRoleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateCustomRoleResponse, + ] + """Update a custom role""" + + DeleteCustomRole: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteCustomRoleRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteCustomRoleResponse, + ] + """Delete a custom role""" + + GetUserNamespaceAssignments: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserNamespaceAssignmentsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserNamespaceAssignmentsResponse, + ] + """Get users with access to a namespace""" + + GetServiceAccountNamespaceAssignments: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountNamespaceAssignmentsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountNamespaceAssignmentsResponse, + ] + """Get service accounts with access to a namespace""" + + GetUserGroupNamespaceAssignments: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupNamespaceAssignmentsRequest, + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupNamespaceAssignmentsResponse, + ] + """Get user groups with access to a namespace""" + class CloudServiceServicer(metaclass=abc.ABCMeta): """WARNING: This service is currently experimental and may change in incompatible ways. """ + @abc.abstractmethod + def GetCurrentIdentity( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCurrentIdentityRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCurrentIdentityResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCurrentIdentityResponse + ], + ]: + """Get information about the current authenticated user or service account principal""" + @abc.abstractmethod def GetUsers( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsersRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsersResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsersResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsersResponse + ], + ]: """Gets all known users""" + @abc.abstractmethod def GetUser( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserResponse + ], + ]: """Get a user""" + @abc.abstractmethod def CreateUser( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserResponse + ], + ]: """Create a user""" + @abc.abstractmethod def UpdateUser( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserResponse + ], + ]: """Update a user""" + @abc.abstractmethod def DeleteUser( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserResponse + ], + ]: """Delete a user""" + @abc.abstractmethod def SetUserNamespaceAccess( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserNamespaceAccessRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserNamespaceAccessResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserNamespaceAccessResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserNamespaceAccessResponse + ], + ]: """Set a user's access to a namespace""" + @abc.abstractmethod def GetAsyncOperation( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAsyncOperationRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAsyncOperationResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAsyncOperationResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAsyncOperationResponse + ], + ]: """Get the latest information on an async operation""" + @abc.abstractmethod def CreateNamespace( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceResponse + ], + ]: """Create a new namespace""" + @abc.abstractmethod def GetNamespaces( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespacesRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespacesResponse - ): + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespacesResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespacesResponse + ], + ]: """Get all namespaces""" + @abc.abstractmethod def GetNamespace( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceResponse + ], + ]: """Get a namespace""" + @abc.abstractmethod def UpdateNamespace( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceResponse + ], + ]: """Update a namespace""" + @abc.abstractmethod def RenameCustomSearchAttribute( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.RenameCustomSearchAttributeRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.RenameCustomSearchAttributeResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.RenameCustomSearchAttributeResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.RenameCustomSearchAttributeResponse + ], + ]: """Rename an existing customer search attribute""" + @abc.abstractmethod def DeleteNamespace( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceResponse + ], + ]: """Delete a namespace""" + @abc.abstractmethod def FailoverNamespaceRegion( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.FailoverNamespaceRegionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.FailoverNamespaceRegionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.FailoverNamespaceRegionResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.FailoverNamespaceRegionResponse + ], + ]: """Failover a multi-region namespace""" + @abc.abstractmethod def AddNamespaceRegion( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddNamespaceRegionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddNamespaceRegionResponse: - """Add a new region to a namespace""" + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddNamespaceRegionResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddNamespaceRegionResponse + ], + ]: + """Add a new region to a namespace + Deprecated: Use the UpdateNamespace() to add new replica in the namespace spec instead. + """ + @abc.abstractmethod def DeleteNamespaceRegion( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRegionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRegionResponse: - """Delete a region from a namespace""" + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRegionResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceRegionResponse + ], + ]: + """Delete a region from a namespace + Deprecated: Use the UpdateNamespace() to delete a replica in the namespace spec instead. + """ + @abc.abstractmethod def GetRegions( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionsResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionsResponse + ], + ]: """Get all regions""" + @abc.abstractmethod def GetRegion( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetRegionResponse + ], + ]: """Get a region""" + @abc.abstractmethod def GetApiKeys( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeysRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeysResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeysResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeysResponse + ], + ]: """Get all known API keys""" + @abc.abstractmethod def GetApiKey( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeyRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeyResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeyResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetApiKeyResponse + ], + ]: """Get an API key""" + @abc.abstractmethod def CreateApiKey( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateApiKeyRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateApiKeyResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateApiKeyResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateApiKeyResponse + ], + ]: """Create an API key""" + @abc.abstractmethod def UpdateApiKey( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateApiKeyRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateApiKeyResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateApiKeyResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateApiKeyResponse + ], + ]: """Update an API key""" + @abc.abstractmethod def DeleteApiKey( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteApiKeyRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteApiKeyResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteApiKeyResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteApiKeyResponse + ], + ]: """Delete an API key""" + @abc.abstractmethod def GetNexusEndpoints( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointsResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointsResponse + ], + ]: """Gets nexus endpoints""" + @abc.abstractmethod def GetNexusEndpoint( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNexusEndpointResponse + ], + ]: """Get a nexus endpoint""" + @abc.abstractmethod def CreateNexusEndpoint( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNexusEndpointRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNexusEndpointResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNexusEndpointResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNexusEndpointResponse + ], + ]: """Create a nexus endpoint""" + @abc.abstractmethod def UpdateNexusEndpoint( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNexusEndpointRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNexusEndpointResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNexusEndpointResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNexusEndpointResponse + ], + ]: """Update a nexus endpoint""" + @abc.abstractmethod def DeleteNexusEndpoint( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNexusEndpointRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNexusEndpointResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNexusEndpointResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNexusEndpointResponse + ], + ]: """Delete a nexus endpoint""" + @abc.abstractmethod def GetUserGroups( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupsRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupsResponse - ): + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupsResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupsResponse + ], + ]: """Get all user groups""" + @abc.abstractmethod def GetUserGroup( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupResponse + ], + ]: """Get a user group""" + @abc.abstractmethod def CreateUserGroup( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserGroupRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserGroupResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserGroupResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateUserGroupResponse + ], + ]: """Create new a user group""" + @abc.abstractmethod def UpdateUserGroup( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserGroupRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserGroupResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserGroupResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateUserGroupResponse + ], + ]: """Update a user group""" + @abc.abstractmethod def DeleteUserGroup( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserGroupRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserGroupResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserGroupResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteUserGroupResponse + ], + ]: """Delete a user group""" + @abc.abstractmethod def SetUserGroupNamespaceAccess( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserGroupNamespaceAccessRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserGroupNamespaceAccessResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserGroupNamespaceAccessResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetUserGroupNamespaceAccessResponse + ], + ]: """Set a user group's access to a namespace""" + @abc.abstractmethod def AddUserGroupMember( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddUserGroupMemberRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddUserGroupMemberResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddUserGroupMemberResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.AddUserGroupMemberResponse + ], + ]: """Add a member to the group, can only be used with Cloud group types.""" + @abc.abstractmethod def RemoveUserGroupMember( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.RemoveUserGroupMemberRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.RemoveUserGroupMemberResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.RemoveUserGroupMemberResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.RemoveUserGroupMemberResponse + ], + ]: """Remove a member from the group, can only be used with Cloud group types.""" + @abc.abstractmethod def GetUserGroupMembers( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupMembersRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupMembersResponse: ... + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupMembersResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupMembersResponse + ], + ]: ... @abc.abstractmethod def CreateServiceAccount( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateServiceAccountRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateServiceAccountResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateServiceAccountResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateServiceAccountResponse + ], + ]: """Create a service account.""" + @abc.abstractmethod def GetServiceAccount( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountResponse + ], + ]: """Get a service account.""" + @abc.abstractmethod def GetServiceAccounts( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountsResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountsResponse + ], + ]: """Get service accounts.""" + @abc.abstractmethod def UpdateServiceAccount( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateServiceAccountRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateServiceAccountResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateServiceAccountResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateServiceAccountResponse + ], + ]: """Update a service account.""" + @abc.abstractmethod def SetServiceAccountNamespaceAccess( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetServiceAccountNamespaceAccessRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetServiceAccountNamespaceAccessResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetServiceAccountNamespaceAccessResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.SetServiceAccountNamespaceAccessResponse + ], + ]: """Set a service account's access to a namespace.""" + @abc.abstractmethod def DeleteServiceAccount( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteServiceAccountRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteServiceAccountResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteServiceAccountResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteServiceAccountResponse + ], + ]: """Delete a service account.""" + @abc.abstractmethod def GetUsage( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsageRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsageResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsageResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUsageResponse + ], + ]: """WARNING: Pre-Release Feature Get usage data across namespaces """ + @abc.abstractmethod def GetAccount( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountResponse + ], + ]: """Get account information.""" + @abc.abstractmethod def UpdateAccount( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountResponse - ): + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountResponse + ], + ]: """Update account information.""" + @abc.abstractmethod def CreateNamespaceExportSink( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceExportSinkRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceExportSinkResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceExportSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateNamespaceExportSinkResponse + ], + ]: """Create an export sink""" + @abc.abstractmethod def GetNamespaceExportSink( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinkRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinkResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinkResponse + ], + ]: """Get an export sink""" + @abc.abstractmethod def GetNamespaceExportSinks( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinksRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinksResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinksResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceExportSinksResponse + ], + ]: """Get export sinks""" + @abc.abstractmethod def UpdateNamespaceExportSink( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceExportSinkRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceExportSinkResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceExportSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceExportSinkResponse + ], + ]: """Update an export sink""" + @abc.abstractmethod def DeleteNamespaceExportSink( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceExportSinkRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceExportSinkResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceExportSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteNamespaceExportSinkResponse + ], + ]: """Delete an export sink""" + @abc.abstractmethod def ValidateNamespaceExportSink( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateNamespaceExportSinkRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateNamespaceExportSinkResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateNamespaceExportSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateNamespaceExportSinkResponse + ], + ]: """Validates an export sink configuration by delivering an empty test file to the specified sink. This operation verifies that the sink is correctly configured, accessible, and ready for data export. """ + @abc.abstractmethod def UpdateNamespaceTags( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceTagsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceTagsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceTagsResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateNamespaceTagsResponse + ], + ]: """Update the tags for a namespace""" + @abc.abstractmethod def CreateConnectivityRule( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateConnectivityRuleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateConnectivityRuleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateConnectivityRuleResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateConnectivityRuleResponse + ], + ]: """Creates a connectivity rule""" + @abc.abstractmethod def GetConnectivityRule( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRuleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRuleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRuleResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRuleResponse + ], + ]: """Gets a connectivity rule by id""" + @abc.abstractmethod def GetConnectivityRules( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRulesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRulesResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRulesResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetConnectivityRulesResponse + ], + ]: """Lists connectivity rules by account""" + @abc.abstractmethod def DeleteConnectivityRule( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteConnectivityRuleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteConnectivityRuleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteConnectivityRuleResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteConnectivityRuleResponse + ], + ]: """Deletes a connectivity rule by id""" + + @abc.abstractmethod + def GetAuditLogs( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAuditLogsRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAuditLogsResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAuditLogsResponse + ], + ]: + """Get audit logs""" + @abc.abstractmethod def ValidateAccountAuditLogSink( self, request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateAccountAuditLogSinkRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateAccountAuditLogSinkResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateAccountAuditLogSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.ValidateAccountAuditLogSinkResponse + ], + ]: """Validate customer audit log sink is accessible from Temporal's workflow by delivering an empty file to the specified sink. The operation verifies that the sink is correctly configured, accessible and ready to receive audit logs. """ + @abc.abstractmethod + def CreateAccountAuditLogSink( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateAccountAuditLogSinkRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateAccountAuditLogSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateAccountAuditLogSinkResponse + ], + ]: + """Create an audit log sink""" + + @abc.abstractmethod + def GetAccountAuditLogSink( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinkRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinkResponse + ], + ]: + """Get an audit log sink""" + + @abc.abstractmethod + def GetAccountAuditLogSinks( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinksRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinksResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetAccountAuditLogSinksResponse + ], + ]: + """Get audit log sinks""" + + @abc.abstractmethod + def UpdateAccountAuditLogSink( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountAuditLogSinkRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountAuditLogSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateAccountAuditLogSinkResponse + ], + ]: + """Update an audit log sink""" + + @abc.abstractmethod + def DeleteAccountAuditLogSink( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteAccountAuditLogSinkRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteAccountAuditLogSinkResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteAccountAuditLogSinkResponse + ], + ]: + """Delete an audit log sink""" + + @abc.abstractmethod + def GetNamespaceCapacityInfo( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceCapacityInfoRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceCapacityInfoResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetNamespaceCapacityInfoResponse + ], + ]: + """Get namespace capacity information""" + + @abc.abstractmethod + def CreateBillingReport( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateBillingReportRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateBillingReportResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateBillingReportResponse + ], + ]: + """Create a billing report""" + + @abc.abstractmethod + def GetBillingReport( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetBillingReportRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetBillingReportResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetBillingReportResponse + ], + ]: + """Get a billing report""" + + @abc.abstractmethod + def GetCustomRoles( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRolesRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRolesResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRolesResponse + ], + ]: + """Get custom roles""" + + @abc.abstractmethod + def GetCustomRole( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRoleRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRoleResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetCustomRoleResponse + ], + ]: + """Get a custom role""" + + @abc.abstractmethod + def CreateCustomRole( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateCustomRoleRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateCustomRoleResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.CreateCustomRoleResponse + ], + ]: + """Create a custom role""" + + @abc.abstractmethod + def UpdateCustomRole( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateCustomRoleRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateCustomRoleResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.UpdateCustomRoleResponse + ], + ]: + """Update a custom role""" + + @abc.abstractmethod + def DeleteCustomRole( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteCustomRoleRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteCustomRoleResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.DeleteCustomRoleResponse + ], + ]: + """Delete a custom role""" + + @abc.abstractmethod + def GetUserNamespaceAssignments( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserNamespaceAssignmentsRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserNamespaceAssignmentsResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserNamespaceAssignmentsResponse + ], + ]: + """Get users with access to a namespace""" + + @abc.abstractmethod + def GetServiceAccountNamespaceAssignments( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountNamespaceAssignmentsRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountNamespaceAssignmentsResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetServiceAccountNamespaceAssignmentsResponse + ], + ]: + """Get service accounts with access to a namespace""" + + @abc.abstractmethod + def GetUserGroupNamespaceAssignments( + self, + request: temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupNamespaceAssignmentsRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupNamespaceAssignmentsResponse, + collections.abc.Awaitable[ + temporalio.api.cloud.cloudservice.v1.request_response_pb2.GetUserGroupNamespaceAssignmentsResponse + ], + ]: + """Get user groups with access to a namespace""" + def add_CloudServiceServicer_to_server( - servicer: CloudServiceServicer, server: grpc.Server + servicer: CloudServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server] ) -> None: ... diff --git a/temporalio/api/cloud/connectivityrule/v1/message_pb2.py b/temporalio/api/cloud/connectivityrule/v1/message_pb2.py index 6737fdcae1..176ec59718 100644 --- a/temporalio/api/cloud/connectivityrule/v1/message_pb2.py +++ b/temporalio/api/cloud/connectivityrule/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -21,58 +20,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n4temporal/api/cloud/connectivityrule/v1/message.proto\x12&temporal.api.cloud.connectivityrule.v1\x1a,temporal/api/cloud/resource/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x96\x02\n\x10\x43onnectivityRule\x12\n\n\x02id\x18\x01 \x01(\t\x12J\n\x04spec\x18\x02 \x01(\x0b\x32<.temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12<\n\x05state\x18\x05 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x06 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampJ\x04\x08\x03\x10\x04"\xd9\x01\n\x14\x43onnectivityRuleSpec\x12U\n\x0bpublic_rule\x18\x01 \x01(\x0b\x32>.temporal.api.cloud.connectivityrule.v1.PublicConnectivityRuleH\x00\x12W\n\x0cprivate_rule\x18\x02 \x01(\x0b\x32?.temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRuleH\x00\x42\x11\n\x0f\x63onnection_type"\x18\n\x16PublicConnectivityRule"^\n\x17PrivateConnectivityRule\x12\x15\n\rconnection_id\x18\x01 \x01(\t\x12\x16\n\x0egcp_project_id\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\tJ\x04\x08\x04\x10\x05\x42\xd4\x01\n)io.temporal.api.cloud.connectivityrule.v1B\x0cMessageProtoP\x01Z=go.temporal.io/api/cloud/connectivityrule/v1;connectivityrule\xaa\x02(Temporalio.Api.Cloud.ConnectivityRule.V1\xea\x02,Temporalio::Api::Cloud::ConnectivityRule::V1b\x06proto3' + b'\n4temporal/api/cloud/connectivityrule/v1/message.proto\x12&temporal.api.cloud.connectivityrule.v1\x1a,temporal/api/cloud/resource/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x96\x02\n\x10\x43onnectivityRule\x12\n\n\x02id\x18\x01 \x01(\t\x12J\n\x04spec\x18\x02 \x01(\x0b\x32<.temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec\x12\x18\n\x10resource_version\x18\x04 \x01(\t\x12<\n\x05state\x18\x05 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x06 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampJ\x04\x08\x03\x10\x04"\xd9\x01\n\x14\x43onnectivityRuleSpec\x12U\n\x0bpublic_rule\x18\x01 \x01(\x0b\x32>.temporal.api.cloud.connectivityrule.v1.PublicConnectivityRuleH\x00\x12W\n\x0cprivate_rule\x18\x02 \x01(\x0b\x32?.temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRuleH\x00\x42\x11\n\x0f\x63onnection_type"3\n\x16PublicConnectivityRule\x12\x19\n\x11\x65nable_stable_ips\x18\x01 \x01(\x08"^\n\x17PrivateConnectivityRule\x12\x15\n\rconnection_id\x18\x01 \x01(\t\x12\x16\n\x0egcp_project_id\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\tJ\x04\x08\x04\x10\x05\x42\xd4\x01\n)io.temporal.api.cloud.connectivityrule.v1B\x0cMessageProtoP\x01Z=go.temporal.io/api/cloud/connectivityrule/v1;connectivityrule\xaa\x02(Temporalio.Api.Cloud.ConnectivityRule.V1\xea\x02,Temporalio::Api::Cloud::ConnectivityRule::V1b\x06proto3' ) - -_CONNECTIVITYRULE = DESCRIPTOR.message_types_by_name["ConnectivityRule"] -_CONNECTIVITYRULESPEC = DESCRIPTOR.message_types_by_name["ConnectivityRuleSpec"] -_PUBLICCONNECTIVITYRULE = DESCRIPTOR.message_types_by_name["PublicConnectivityRule"] -_PRIVATECONNECTIVITYRULE = DESCRIPTOR.message_types_by_name["PrivateConnectivityRule"] -ConnectivityRule = _reflection.GeneratedProtocolMessageType( - "ConnectivityRule", - (_message.Message,), - { - "DESCRIPTOR": _CONNECTIVITYRULE, - "__module__": "temporalio.api.cloud.connectivityrule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.connectivityrule.v1.ConnectivityRule) - }, -) -_sym_db.RegisterMessage(ConnectivityRule) - -ConnectivityRuleSpec = _reflection.GeneratedProtocolMessageType( - "ConnectivityRuleSpec", - (_message.Message,), - { - "DESCRIPTOR": _CONNECTIVITYRULESPEC, - "__module__": "temporalio.api.cloud.connectivityrule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.connectivityrule.v1.ConnectivityRuleSpec) - }, -) -_sym_db.RegisterMessage(ConnectivityRuleSpec) - -PublicConnectivityRule = _reflection.GeneratedProtocolMessageType( - "PublicConnectivityRule", - (_message.Message,), - { - "DESCRIPTOR": _PUBLICCONNECTIVITYRULE, - "__module__": "temporalio.api.cloud.connectivityrule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.connectivityrule.v1.PublicConnectivityRule) - }, -) -_sym_db.RegisterMessage(PublicConnectivityRule) - -PrivateConnectivityRule = _reflection.GeneratedProtocolMessageType( - "PrivateConnectivityRule", - (_message.Message,), - { - "DESCRIPTOR": _PRIVATECONNECTIVITYRULE, - "__module__": "temporalio.api.cloud.connectivityrule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.connectivityrule.v1.PrivateConnectivityRule) - }, -) -_sym_db.RegisterMessage(PrivateConnectivityRule) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n)io.temporal.api.cloud.connectivityrule.v1B\014MessageProtoP\001Z=go.temporal.io/api/cloud/connectivityrule/v1;connectivityrule\252\002(Temporalio.Api.Cloud.ConnectivityRule.V1\352\002,Temporalio::Api::Cloud::ConnectivityRule::V1" @@ -81,7 +33,7 @@ _CONNECTIVITYRULESPEC._serialized_start = 457 _CONNECTIVITYRULESPEC._serialized_end = 674 _PUBLICCONNECTIVITYRULE._serialized_start = 676 - _PUBLICCONNECTIVITYRULE._serialized_end = 700 - _PRIVATECONNECTIVITYRULE._serialized_start = 702 - _PRIVATECONNECTIVITYRULE._serialized_end = 796 + _PUBLICCONNECTIVITYRULE._serialized_end = 727 + _PRIVATECONNECTIVITYRULE._serialized_start = 729 + _PRIVATECONNECTIVITYRULE._serialized_end = 823 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/cloud/connectivityrule/v1/message_pb2.pyi b/temporalio/api/cloud/connectivityrule/v1/message_pb2.pyi index 06d8850d47..1d3f7b69af 100644 --- a/temporalio/api/cloud/connectivityrule/v1/message_pb2.pyi +++ b/temporalio/api/cloud/connectivityrule/v1/message_pb2.pyi @@ -4,7 +4,7 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.message @@ -12,13 +12,9 @@ import google.protobuf.timestamp_pb2 import temporalio.api.cloud.resource.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class ConnectivityRule(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -30,9 +26,6 @@ class ConnectivityRule(google.protobuf.message.Message): CREATED_TIME_FIELD_NUMBER: builtins.int id: builtins.str """The id of the private connectivity rule.""" - @property - def spec(self) -> global___ConnectivityRuleSpec: - """The connectivity rule specification.""" resource_version: builtins.str """The current version of the connectivity rule specification. The next update operation will have to include this version. @@ -40,9 +33,14 @@ class ConnectivityRule(google.protobuf.message.Message): state: temporalio.api.cloud.resource.v1.message_pb2.ResourceState.ValueType async_operation_id: builtins.str """The id of the async operation that is creating/updating/deleting the connectivity rule, if any.""" + @property + def spec(self) -> global___ConnectivityRuleSpec: + """The connectivity rule specification.""" + @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the connectivity rule was created.""" + def __init__( self, *, @@ -55,13 +53,11 @@ class ConnectivityRule(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "created_time", b"created_time", "spec", b"spec" - ], + field_name: typing.Literal["created_time", b"created_time", "spec", b"spec"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "created_time", @@ -79,6 +75,7 @@ class ConnectivityRule(google.protobuf.message.Message): global___ConnectivityRule = ConnectivityRule +@typing.final class ConnectivityRuleSpec(google.protobuf.message.Message): """The connectivity rule specification passed in on create/update operations.""" @@ -89,9 +86,11 @@ class ConnectivityRuleSpec(google.protobuf.message.Message): @property def public_rule(self) -> global___PublicConnectivityRule: """This allows access via public internet.""" + @property def private_rule(self) -> global___PrivateConnectivityRule: """This allows access via specific private vpc.""" + def __init__( self, *, @@ -100,7 +99,7 @@ class ConnectivityRuleSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "connection_type", b"connection_type", "private_rule", @@ -111,7 +110,7 @@ class ConnectivityRuleSpec(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "connection_type", b"connection_type", "private_rule", @@ -121,23 +120,34 @@ class ConnectivityRuleSpec(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, - oneof_group: typing_extensions.Literal["connection_type", b"connection_type"], - ) -> typing_extensions.Literal["public_rule", "private_rule"] | None: ... + self, oneof_group: typing.Literal["connection_type", b"connection_type"] + ) -> typing.Literal["public_rule", "private_rule"] | None: ... global___ConnectivityRuleSpec = ConnectivityRuleSpec +@typing.final class PublicConnectivityRule(google.protobuf.message.Message): """A public connectivity rule allows access to the namespace via the public internet.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + ENABLE_STABLE_IPS_FIELD_NUMBER: builtins.int + enable_stable_ips: builtins.bool + """Flag to determine namespace is connected via a predictable set of IPs on public internet + temporal:versioning:min_version=v0.15.0 + """ def __init__( self, + *, + enable_stable_ips: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["enable_stable_ips", b"enable_stable_ips"] ) -> None: ... global___PublicConnectivityRule = PublicConnectivityRule +@typing.final class PrivateConnectivityRule(google.protobuf.message.Message): """A private connectivity rule allows connections from a specific private vpc only.""" @@ -165,7 +175,7 @@ class PrivateConnectivityRule(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "connection_id", b"connection_id", "gcp_project_id", diff --git a/temporalio/api/cloud/identity/v1/__init__.py b/temporalio/api/cloud/identity/v1/__init__.py index 6b477fbef3..48e9ad21d0 100644 --- a/temporalio/api/cloud/identity/v1/__init__.py +++ b/temporalio/api/cloud/identity/v1/__init__.py @@ -4,6 +4,8 @@ ApiKey, ApiKeySpec, CloudGroupSpec, + CustomRole, + CustomRoleSpec, GoogleGroupSpec, Invitation, NamespaceAccess, @@ -11,12 +13,15 @@ OwnerType, SCIMGroupSpec, ServiceAccount, + ServiceAccountNamespaceAssignment, ServiceAccountSpec, User, UserGroup, UserGroupMember, UserGroupMemberId, + UserGroupNamespaceAssignment, UserGroupSpec, + UserNamespaceAssignment, UserSpec, ) @@ -26,6 +31,8 @@ "ApiKey", "ApiKeySpec", "CloudGroupSpec", + "CustomRole", + "CustomRoleSpec", "GoogleGroupSpec", "Invitation", "NamespaceAccess", @@ -33,11 +40,14 @@ "OwnerType", "SCIMGroupSpec", "ServiceAccount", + "ServiceAccountNamespaceAssignment", "ServiceAccountSpec", "User", "UserGroup", "UserGroupMember", "UserGroupMemberId", + "UserGroupNamespaceAssignment", "UserGroupSpec", + "UserNamespaceAssignment", "UserSpec", ] diff --git a/temporalio/api/cloud/identity/v1/message_pb2.py b/temporalio/api/cloud/identity/v1/message_pb2.py index 8924685069..5095a22b2b 100644 --- a/temporalio/api/cloud/identity/v1/message_pb2.py +++ b/temporalio/api/cloud/identity/v1/message_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -22,245 +20,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n,temporal/api/cloud/identity/v1/message.proto\x12\x1etemporal.api.cloud.identity.v1\x1a,temporal/api/cloud/resource/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xff\x01\n\rAccountAccess\x12\x1b\n\x0frole_deprecated\x18\x01 \x01(\tB\x02\x18\x01\x12@\n\x04role\x18\x02 \x01(\x0e\x32\x32.temporal.api.cloud.identity.v1.AccountAccess.Role"\x8e\x01\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\x0e\n\nROLE_OWNER\x10\x01\x12\x0e\n\nROLE_ADMIN\x10\x02\x12\x12\n\x0eROLE_DEVELOPER\x10\x03\x12\x16\n\x12ROLE_FINANCE_ADMIN\x10\x04\x12\r\n\tROLE_READ\x10\x05\x12\x15\n\x11ROLE_METRICS_READ\x10\x06"\xef\x01\n\x0fNamespaceAccess\x12!\n\x15permission_deprecated\x18\x01 \x01(\tB\x02\x18\x01\x12N\n\npermission\x18\x02 \x01(\x0e\x32:.temporal.api.cloud.identity.v1.NamespaceAccess.Permission"i\n\nPermission\x12\x1a\n\x16PERMISSION_UNSPECIFIED\x10\x00\x12\x14\n\x10PERMISSION_ADMIN\x10\x01\x12\x14\n\x10PERMISSION_WRITE\x10\x02\x12\x13\n\x0fPERMISSION_READ\x10\x03"\x95\x02\n\x06\x41\x63\x63\x65ss\x12\x45\n\x0e\x61\x63\x63ount_access\x18\x01 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.AccountAccess\x12Y\n\x12namespace_accesses\x18\x02 \x03(\x0b\x32=.temporal.api.cloud.identity.v1.Access.NamespaceAccessesEntry\x1ai\n\x16NamespaceAccessesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess:\x02\x38\x01"k\n\x15NamespaceScopedAccess\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12?\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess"Q\n\x08UserSpec\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\x0b\x32&.temporal.api.cloud.identity.v1.Access"p\n\nInvitation\x12\x30\n\x0c\x63reated_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0c\x65xpired_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x86\x03\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x36\n\x04spec\x18\x03 \x01(\x0b\x32(.temporal.api.cloud.identity.v1.UserSpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\t \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12>\n\ninvitation\x18\x06 \x01(\x0b\x32*.temporal.api.cloud.identity.v1.Invitation\x12\x30\n\x0c\x63reated_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"(\n\x0fGoogleGroupSpec\x12\x15\n\remail_address\x18\x01 \x01(\t"\x1f\n\rSCIMGroupSpec\x12\x0e\n\x06idp_id\x18\x01 \x01(\t"\x10\n\x0e\x43loudGroupSpec"\xc0\x02\n\rUserGroupSpec\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\x0b\x32&.temporal.api.cloud.identity.v1.Access\x12G\n\x0cgoogle_group\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.GoogleGroupSpecH\x00\x12\x43\n\nscim_group\x18\x04 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.SCIMGroupSpecH\x00\x12\x45\n\x0b\x63loud_group\x18\x05 \x01(\x0b\x32..temporal.api.cloud.identity.v1.CloudGroupSpecH\x00\x42\x0c\n\ngroup_type"\xd0\x02\n\tUserGroup\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12;\n\x04spec\x18\x03 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.UserGroupSpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\x08 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"5\n\x11UserGroupMemberId\x12\x11\n\x07user_id\x18\x01 \x01(\tH\x00\x42\r\n\x0bmember_type"\x89\x01\n\x0fUserGroupMember\x12\x44\n\tmember_id\x18\x01 \x01(\x0b\x32\x31.temporal.api.cloud.identity.v1.UserGroupMemberId\x12\x30\n\x0c\x63reated_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xda\x02\n\x0eServiceAccount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12@\n\x04spec\x18\x03 \x01(\x0b\x32\x32.temporal.api.cloud.identity.v1.ServiceAccountSpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\x08 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xc7\x01\n\x12ServiceAccountSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\x0b\x32&.temporal.api.cloud.identity.v1.Access\x12V\n\x17namespace_scoped_access\x18\x04 \x01(\x0b\x32\x35.temporal.api.cloud.identity.v1.NamespaceScopedAccess\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t"\xca\x02\n\x06\x41piKey\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x38\n\x04spec\x18\x03 \x01(\x0b\x32*.temporal.api.cloud.identity.v1.ApiKeySpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\x08 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xee\x01\n\nApiKeySpec\x12\x10\n\x08owner_id\x18\x01 \x01(\t\x12!\n\x15owner_type_deprecated\x18\x02 \x01(\tB\x02\x18\x01\x12=\n\nowner_type\x18\x07 \x01(\x0e\x32).temporal.api.cloud.identity.v1.OwnerType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12/\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64isabled\x18\x06 \x01(\x08*\\\n\tOwnerType\x12\x1a\n\x16OWNER_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fOWNER_TYPE_USER\x10\x01\x12\x1e\n\x1aOWNER_TYPE_SERVICE_ACCOUNT\x10\x02\x42\xac\x01\n!io.temporal.api.cloud.identity.v1B\x0cMessageProtoP\x01Z-go.temporal.io/api/cloud/identity/v1;identity\xaa\x02 Temporalio.Api.Cloud.Identity.V1\xea\x02$Temporalio::Api::Cloud::Identity::V1b\x06proto3' + b'\n,temporal/api/cloud/identity/v1/message.proto\x12\x1etemporal.api.cloud.identity.v1\x1a,temporal/api/cloud/resource/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x95\x02\n\rAccountAccess\x12\x1b\n\x0frole_deprecated\x18\x01 \x01(\tB\x02\x18\x01\x12@\n\x04role\x18\x02 \x01(\x0e\x32\x32.temporal.api.cloud.identity.v1.AccountAccess.Role\x12\x14\n\x0c\x63ustom_roles\x18\x03 \x03(\t"\x8e\x01\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\x0e\n\nROLE_OWNER\x10\x01\x12\x0e\n\nROLE_ADMIN\x10\x02\x12\x12\n\x0eROLE_DEVELOPER\x10\x03\x12\x16\n\x12ROLE_FINANCE_ADMIN\x10\x04\x12\r\n\tROLE_READ\x10\x05\x12\x15\n\x11ROLE_METRICS_READ\x10\x06"\xef\x01\n\x0fNamespaceAccess\x12!\n\x15permission_deprecated\x18\x01 \x01(\tB\x02\x18\x01\x12N\n\npermission\x18\x02 \x01(\x0e\x32:.temporal.api.cloud.identity.v1.NamespaceAccess.Permission"i\n\nPermission\x12\x1a\n\x16PERMISSION_UNSPECIFIED\x10\x00\x12\x14\n\x10PERMISSION_ADMIN\x10\x01\x12\x14\n\x10PERMISSION_WRITE\x10\x02\x12\x13\n\x0fPERMISSION_READ\x10\x03"\xba\x02\n\x06\x41\x63\x63\x65ss\x12\x45\n\x0e\x61\x63\x63ount_access\x18\x01 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.AccountAccess\x12Y\n\x12namespace_accesses\x18\x02 \x03(\x0b\x32=.temporal.api.cloud.identity.v1.Access.NamespaceAccessesEntry\x12#\n\x17\x63ustom_roles_deprecated\x18\x04 \x03(\tB\x02\x18\x01\x1ai\n\x16NamespaceAccessesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess:\x02\x38\x01"k\n\x15NamespaceScopedAccess\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12?\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess"Q\n\x08UserSpec\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\x0b\x32&.temporal.api.cloud.identity.v1.Access"p\n\nInvitation\x12\x30\n\x0c\x63reated_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0c\x65xpired_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x86\x03\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x36\n\x04spec\x18\x03 \x01(\x0b\x32(.temporal.api.cloud.identity.v1.UserSpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\t \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12>\n\ninvitation\x18\x06 \x01(\x0b\x32*.temporal.api.cloud.identity.v1.Invitation\x12\x30\n\x0c\x63reated_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"(\n\x0fGoogleGroupSpec\x12\x15\n\remail_address\x18\x01 \x01(\t"\x1f\n\rSCIMGroupSpec\x12\x0e\n\x06idp_id\x18\x01 \x01(\t"\x10\n\x0e\x43loudGroupSpec"\xc0\x02\n\rUserGroupSpec\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\x0b\x32&.temporal.api.cloud.identity.v1.Access\x12G\n\x0cgoogle_group\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.GoogleGroupSpecH\x00\x12\x43\n\nscim_group\x18\x04 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.SCIMGroupSpecH\x00\x12\x45\n\x0b\x63loud_group\x18\x05 \x01(\x0b\x32..temporal.api.cloud.identity.v1.CloudGroupSpecH\x00\x42\x0c\n\ngroup_type"\xd0\x02\n\tUserGroup\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12;\n\x04spec\x18\x03 \x01(\x0b\x32-.temporal.api.cloud.identity.v1.UserGroupSpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\x08 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"5\n\x11UserGroupMemberId\x12\x11\n\x07user_id\x18\x01 \x01(\tH\x00\x42\r\n\x0bmember_type"\x89\x01\n\x0fUserGroupMember\x12\x44\n\tmember_id\x18\x01 \x01(\x0b\x32\x31.temporal.api.cloud.identity.v1.UserGroupMemberId\x12\x30\n\x0c\x63reated_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xda\x02\n\x0eServiceAccount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12@\n\x04spec\x18\x03 \x01(\x0b\x32\x32.temporal.api.cloud.identity.v1.ServiceAccountSpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\x08 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xc7\x01\n\x12ServiceAccountSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\x0b\x32&.temporal.api.cloud.identity.v1.Access\x12V\n\x17namespace_scoped_access\x18\x04 \x01(\x0b\x32\x35.temporal.api.cloud.identity.v1.NamespaceScopedAccess\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t"\xca\x02\n\x06\x41piKey\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x38\n\x04spec\x18\x03 \x01(\x0b\x32*.temporal.api.cloud.identity.v1.ApiKeySpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\x08 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xee\x01\n\nApiKeySpec\x12\x10\n\x08owner_id\x18\x01 \x01(\t\x12!\n\x15owner_type_deprecated\x18\x02 \x01(\tB\x02\x18\x01\x12=\n\nowner_type\x18\x07 \x01(\x0e\x32).temporal.api.cloud.identity.v1.OwnerType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12/\n\x0b\x65xpiry_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64isabled\x18\x06 \x01(\x08"\xbc\x02\n\x0e\x43ustomRoleSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12N\n\x0bpermissions\x18\x03 \x03(\x0b\x32\x39.temporal.api.cloud.identity.v1.CustomRoleSpec.Permission\x1aK\n\tResources\x12\x15\n\rresource_type\x18\x01 \x01(\t\x12\x14\n\x0cresource_ids\x18\x02 \x03(\t\x12\x11\n\tallow_all\x18\x03 \x01(\x08\x1aj\n\nPermission\x12K\n\tresources\x18\x01 \x01(\x0b\x32\x38.temporal.api.cloud.identity.v1.CustomRoleSpec.Resources\x12\x0f\n\x07\x61\x63tions\x18\x02 \x03(\t"\xb4\x02\n\nCustomRole\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12<\n\x04spec\x18\x03 \x01(\x0b\x32..temporal.api.cloud.identity.v1.CustomRoleSpec\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xb3\x01\n\x17UserNamespaceAssignment\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12I\n\x10namespace_access\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess\x12\x18\n\x10inherited_access\x18\x04 \x01(\x08\x12\x18\n\x10resource_version\x18\x05 \x01(\t"\xbc\x01\n!ServiceAccountNamespaceAssignment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12I\n\x10namespace_access\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess\x12\x18\n\x10inherited_access\x18\x04 \x01(\x08\x12\x18\n\x10resource_version\x18\x05 \x01(\t"\xbf\x01\n\x1cUserGroupNamespaceAssignment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12I\n\x10namespace_access\x18\x03 \x01(\x0b\x32/.temporal.api.cloud.identity.v1.NamespaceAccess\x12\x18\n\x10inherited_access\x18\x04 \x01(\x08\x12\x18\n\x10resource_version\x18\x05 \x01(\t*\\\n\tOwnerType\x12\x1a\n\x16OWNER_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fOWNER_TYPE_USER\x10\x01\x12\x1e\n\x1aOWNER_TYPE_SERVICE_ACCOUNT\x10\x02\x42\xac\x01\n!io.temporal.api.cloud.identity.v1B\x0cMessageProtoP\x01Z-go.temporal.io/api/cloud/identity/v1;identity\xaa\x02 Temporalio.Api.Cloud.Identity.V1\xea\x02$Temporalio::Api::Cloud::Identity::V1b\x06proto3' ) -_OWNERTYPE = DESCRIPTOR.enum_types_by_name["OwnerType"] -OwnerType = enum_type_wrapper.EnumTypeWrapper(_OWNERTYPE) -OWNER_TYPE_UNSPECIFIED = 0 -OWNER_TYPE_USER = 1 -OWNER_TYPE_SERVICE_ACCOUNT = 2 - - -_ACCOUNTACCESS = DESCRIPTOR.message_types_by_name["AccountAccess"] -_NAMESPACEACCESS = DESCRIPTOR.message_types_by_name["NamespaceAccess"] -_ACCESS = DESCRIPTOR.message_types_by_name["Access"] -_ACCESS_NAMESPACEACCESSESENTRY = _ACCESS.nested_types_by_name["NamespaceAccessesEntry"] -_NAMESPACESCOPEDACCESS = DESCRIPTOR.message_types_by_name["NamespaceScopedAccess"] -_USERSPEC = DESCRIPTOR.message_types_by_name["UserSpec"] -_INVITATION = DESCRIPTOR.message_types_by_name["Invitation"] -_USER = DESCRIPTOR.message_types_by_name["User"] -_GOOGLEGROUPSPEC = DESCRIPTOR.message_types_by_name["GoogleGroupSpec"] -_SCIMGROUPSPEC = DESCRIPTOR.message_types_by_name["SCIMGroupSpec"] -_CLOUDGROUPSPEC = DESCRIPTOR.message_types_by_name["CloudGroupSpec"] -_USERGROUPSPEC = DESCRIPTOR.message_types_by_name["UserGroupSpec"] -_USERGROUP = DESCRIPTOR.message_types_by_name["UserGroup"] -_USERGROUPMEMBERID = DESCRIPTOR.message_types_by_name["UserGroupMemberId"] -_USERGROUPMEMBER = DESCRIPTOR.message_types_by_name["UserGroupMember"] -_SERVICEACCOUNT = DESCRIPTOR.message_types_by_name["ServiceAccount"] -_SERVICEACCOUNTSPEC = DESCRIPTOR.message_types_by_name["ServiceAccountSpec"] -_APIKEY = DESCRIPTOR.message_types_by_name["ApiKey"] -_APIKEYSPEC = DESCRIPTOR.message_types_by_name["ApiKeySpec"] -_ACCOUNTACCESS_ROLE = _ACCOUNTACCESS.enum_types_by_name["Role"] -_NAMESPACEACCESS_PERMISSION = _NAMESPACEACCESS.enum_types_by_name["Permission"] -AccountAccess = _reflection.GeneratedProtocolMessageType( - "AccountAccess", - (_message.Message,), - { - "DESCRIPTOR": _ACCOUNTACCESS, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.AccountAccess) - }, -) -_sym_db.RegisterMessage(AccountAccess) - -NamespaceAccess = _reflection.GeneratedProtocolMessageType( - "NamespaceAccess", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEACCESS, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.NamespaceAccess) - }, -) -_sym_db.RegisterMessage(NamespaceAccess) - -Access = _reflection.GeneratedProtocolMessageType( - "Access", - (_message.Message,), - { - "NamespaceAccessesEntry": _reflection.GeneratedProtocolMessageType( - "NamespaceAccessesEntry", - (_message.Message,), - { - "DESCRIPTOR": _ACCESS_NAMESPACEACCESSESENTRY, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.Access.NamespaceAccessesEntry) - }, - ), - "DESCRIPTOR": _ACCESS, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.Access) - }, -) -_sym_db.RegisterMessage(Access) -_sym_db.RegisterMessage(Access.NamespaceAccessesEntry) - -NamespaceScopedAccess = _reflection.GeneratedProtocolMessageType( - "NamespaceScopedAccess", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACESCOPEDACCESS, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.NamespaceScopedAccess) - }, -) -_sym_db.RegisterMessage(NamespaceScopedAccess) - -UserSpec = _reflection.GeneratedProtocolMessageType( - "UserSpec", - (_message.Message,), - { - "DESCRIPTOR": _USERSPEC, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.UserSpec) - }, -) -_sym_db.RegisterMessage(UserSpec) - -Invitation = _reflection.GeneratedProtocolMessageType( - "Invitation", - (_message.Message,), - { - "DESCRIPTOR": _INVITATION, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.Invitation) - }, -) -_sym_db.RegisterMessage(Invitation) - -User = _reflection.GeneratedProtocolMessageType( - "User", - (_message.Message,), - { - "DESCRIPTOR": _USER, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.User) - }, -) -_sym_db.RegisterMessage(User) - -GoogleGroupSpec = _reflection.GeneratedProtocolMessageType( - "GoogleGroupSpec", - (_message.Message,), - { - "DESCRIPTOR": _GOOGLEGROUPSPEC, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.GoogleGroupSpec) - }, -) -_sym_db.RegisterMessage(GoogleGroupSpec) - -SCIMGroupSpec = _reflection.GeneratedProtocolMessageType( - "SCIMGroupSpec", - (_message.Message,), - { - "DESCRIPTOR": _SCIMGROUPSPEC, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.SCIMGroupSpec) - }, -) -_sym_db.RegisterMessage(SCIMGroupSpec) - -CloudGroupSpec = _reflection.GeneratedProtocolMessageType( - "CloudGroupSpec", - (_message.Message,), - { - "DESCRIPTOR": _CLOUDGROUPSPEC, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.CloudGroupSpec) - }, -) -_sym_db.RegisterMessage(CloudGroupSpec) - -UserGroupSpec = _reflection.GeneratedProtocolMessageType( - "UserGroupSpec", - (_message.Message,), - { - "DESCRIPTOR": _USERGROUPSPEC, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.UserGroupSpec) - }, -) -_sym_db.RegisterMessage(UserGroupSpec) - -UserGroup = _reflection.GeneratedProtocolMessageType( - "UserGroup", - (_message.Message,), - { - "DESCRIPTOR": _USERGROUP, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.UserGroup) - }, -) -_sym_db.RegisterMessage(UserGroup) - -UserGroupMemberId = _reflection.GeneratedProtocolMessageType( - "UserGroupMemberId", - (_message.Message,), - { - "DESCRIPTOR": _USERGROUPMEMBERID, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.UserGroupMemberId) - }, -) -_sym_db.RegisterMessage(UserGroupMemberId) - -UserGroupMember = _reflection.GeneratedProtocolMessageType( - "UserGroupMember", - (_message.Message,), - { - "DESCRIPTOR": _USERGROUPMEMBER, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.UserGroupMember) - }, -) -_sym_db.RegisterMessage(UserGroupMember) - -ServiceAccount = _reflection.GeneratedProtocolMessageType( - "ServiceAccount", - (_message.Message,), - { - "DESCRIPTOR": _SERVICEACCOUNT, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.ServiceAccount) - }, -) -_sym_db.RegisterMessage(ServiceAccount) - -ServiceAccountSpec = _reflection.GeneratedProtocolMessageType( - "ServiceAccountSpec", - (_message.Message,), - { - "DESCRIPTOR": _SERVICEACCOUNTSPEC, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.ServiceAccountSpec) - }, -) -_sym_db.RegisterMessage(ServiceAccountSpec) - -ApiKey = _reflection.GeneratedProtocolMessageType( - "ApiKey", - (_message.Message,), - { - "DESCRIPTOR": _APIKEY, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.ApiKey) - }, -) -_sym_db.RegisterMessage(ApiKey) - -ApiKeySpec = _reflection.GeneratedProtocolMessageType( - "ApiKeySpec", - (_message.Message,), - { - "DESCRIPTOR": _APIKEYSPEC, - "__module__": "temporalio.api.cloud.identity.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.identity.v1.ApiKeySpec) - }, -) -_sym_db.RegisterMessage(ApiKeySpec) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n!io.temporal.api.cloud.identity.v1B\014MessageProtoP\001Z-go.temporal.io/api/cloud/identity/v1;identity\252\002 Temporalio.Api.Cloud.Identity.V1\352\002$Temporalio::Api::Cloud::Identity::V1" @@ -272,6 +36,8 @@ ]._serialized_options = b"\030\001" _ACCESS_NAMESPACEACCESSESENTRY._options = None _ACCESS_NAMESPACEACCESSESENTRY._serialized_options = b"8\001" + _ACCESS.fields_by_name["custom_roles_deprecated"]._options = None + _ACCESS.fields_by_name["custom_roles_deprecated"]._serialized_options = b"\030\001" _USER.fields_by_name["state_deprecated"]._options = None _USER.fields_by_name["state_deprecated"]._serialized_options = b"\030\001" _USERGROUP.fields_by_name["state_deprecated"]._options = None @@ -284,48 +50,62 @@ _APIKEYSPEC.fields_by_name[ "owner_type_deprecated" ]._serialized_options = b"\030\001" - _OWNERTYPE._serialized_start = 3713 - _OWNERTYPE._serialized_end = 3805 + _OWNERTYPE._serialized_start = 4969 + _OWNERTYPE._serialized_end = 5061 _ACCOUNTACCESS._serialized_start = 160 - _ACCOUNTACCESS._serialized_end = 415 - _ACCOUNTACCESS_ROLE._serialized_start = 273 - _ACCOUNTACCESS_ROLE._serialized_end = 415 - _NAMESPACEACCESS._serialized_start = 418 - _NAMESPACEACCESS._serialized_end = 657 - _NAMESPACEACCESS_PERMISSION._serialized_start = 552 - _NAMESPACEACCESS_PERMISSION._serialized_end = 657 - _ACCESS._serialized_start = 660 - _ACCESS._serialized_end = 937 - _ACCESS_NAMESPACEACCESSESENTRY._serialized_start = 832 - _ACCESS_NAMESPACEACCESSESENTRY._serialized_end = 937 - _NAMESPACESCOPEDACCESS._serialized_start = 939 - _NAMESPACESCOPEDACCESS._serialized_end = 1046 - _USERSPEC._serialized_start = 1048 - _USERSPEC._serialized_end = 1129 - _INVITATION._serialized_start = 1131 - _INVITATION._serialized_end = 1243 - _USER._serialized_start = 1246 - _USER._serialized_end = 1636 - _GOOGLEGROUPSPEC._serialized_start = 1638 - _GOOGLEGROUPSPEC._serialized_end = 1678 - _SCIMGROUPSPEC._serialized_start = 1680 - _SCIMGROUPSPEC._serialized_end = 1711 - _CLOUDGROUPSPEC._serialized_start = 1713 - _CLOUDGROUPSPEC._serialized_end = 1729 - _USERGROUPSPEC._serialized_start = 1732 - _USERGROUPSPEC._serialized_end = 2052 - _USERGROUP._serialized_start = 2055 - _USERGROUP._serialized_end = 2391 - _USERGROUPMEMBERID._serialized_start = 2393 - _USERGROUPMEMBERID._serialized_end = 2446 - _USERGROUPMEMBER._serialized_start = 2449 - _USERGROUPMEMBER._serialized_end = 2586 - _SERVICEACCOUNT._serialized_start = 2589 - _SERVICEACCOUNT._serialized_end = 2935 - _SERVICEACCOUNTSPEC._serialized_start = 2938 - _SERVICEACCOUNTSPEC._serialized_end = 3137 - _APIKEY._serialized_start = 3140 - _APIKEY._serialized_end = 3470 - _APIKEYSPEC._serialized_start = 3473 - _APIKEYSPEC._serialized_end = 3711 + _ACCOUNTACCESS._serialized_end = 437 + _ACCOUNTACCESS_ROLE._serialized_start = 295 + _ACCOUNTACCESS_ROLE._serialized_end = 437 + _NAMESPACEACCESS._serialized_start = 440 + _NAMESPACEACCESS._serialized_end = 679 + _NAMESPACEACCESS_PERMISSION._serialized_start = 574 + _NAMESPACEACCESS_PERMISSION._serialized_end = 679 + _ACCESS._serialized_start = 682 + _ACCESS._serialized_end = 996 + _ACCESS_NAMESPACEACCESSESENTRY._serialized_start = 891 + _ACCESS_NAMESPACEACCESSESENTRY._serialized_end = 996 + _NAMESPACESCOPEDACCESS._serialized_start = 998 + _NAMESPACESCOPEDACCESS._serialized_end = 1105 + _USERSPEC._serialized_start = 1107 + _USERSPEC._serialized_end = 1188 + _INVITATION._serialized_start = 1190 + _INVITATION._serialized_end = 1302 + _USER._serialized_start = 1305 + _USER._serialized_end = 1695 + _GOOGLEGROUPSPEC._serialized_start = 1697 + _GOOGLEGROUPSPEC._serialized_end = 1737 + _SCIMGROUPSPEC._serialized_start = 1739 + _SCIMGROUPSPEC._serialized_end = 1770 + _CLOUDGROUPSPEC._serialized_start = 1772 + _CLOUDGROUPSPEC._serialized_end = 1788 + _USERGROUPSPEC._serialized_start = 1791 + _USERGROUPSPEC._serialized_end = 2111 + _USERGROUP._serialized_start = 2114 + _USERGROUP._serialized_end = 2450 + _USERGROUPMEMBERID._serialized_start = 2452 + _USERGROUPMEMBERID._serialized_end = 2505 + _USERGROUPMEMBER._serialized_start = 2508 + _USERGROUPMEMBER._serialized_end = 2645 + _SERVICEACCOUNT._serialized_start = 2648 + _SERVICEACCOUNT._serialized_end = 2994 + _SERVICEACCOUNTSPEC._serialized_start = 2997 + _SERVICEACCOUNTSPEC._serialized_end = 3196 + _APIKEY._serialized_start = 3199 + _APIKEY._serialized_end = 3529 + _APIKEYSPEC._serialized_start = 3532 + _APIKEYSPEC._serialized_end = 3770 + _CUSTOMROLESPEC._serialized_start = 3773 + _CUSTOMROLESPEC._serialized_end = 4089 + _CUSTOMROLESPEC_RESOURCES._serialized_start = 3906 + _CUSTOMROLESPEC_RESOURCES._serialized_end = 3981 + _CUSTOMROLESPEC_PERMISSION._serialized_start = 3983 + _CUSTOMROLESPEC_PERMISSION._serialized_end = 4089 + _CUSTOMROLE._serialized_start = 4092 + _CUSTOMROLE._serialized_end = 4400 + _USERNAMESPACEASSIGNMENT._serialized_start = 4403 + _USERNAMESPACEASSIGNMENT._serialized_end = 4582 + _SERVICEACCOUNTNAMESPACEASSIGNMENT._serialized_start = 4585 + _SERVICEACCOUNTNAMESPACEASSIGNMENT._serialized_end = 4773 + _USERGROUPNAMESPACEASSIGNMENT._serialized_start = 4776 + _USERGROUPNAMESPACEASSIGNMENT._serialized_end = 4967 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/cloud/identity/v1/message_pb2.pyi b/temporalio/api/cloud/identity/v1/message_pb2.pyi index ced77ff78c..de956bcac6 100644 --- a/temporalio/api/cloud/identity/v1/message_pb2.pyi +++ b/temporalio/api/cloud/identity/v1/message_pb2.pyi @@ -30,7 +30,7 @@ class _OwnerType: class _OwnerTypeEnumTypeWrapper( google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_OwnerType.ValueType], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor OWNER_TYPE_UNSPECIFIED: _OwnerType.ValueType # 0 OWNER_TYPE_USER: _OwnerType.ValueType # 1 @@ -47,6 +47,7 @@ OWNER_TYPE_SERVICE_ACCOUNT: OwnerType.ValueType # 2 """The owner is a service account.""" global___OwnerType = OwnerType +@typing.final class AccountAccess(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -59,7 +60,7 @@ class AccountAccess(google.protobuf.message.Message): AccountAccess._Role.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor ROLE_UNSPECIFIED: AccountAccess._Role.ValueType # 0 ROLE_OWNER: AccountAccess._Role.ValueType # 1 @@ -92,6 +93,7 @@ class AccountAccess(google.protobuf.message.Message): ROLE_DEPRECATED_FIELD_NUMBER: builtins.int ROLE_FIELD_NUMBER: builtins.int + CUSTOM_ROLES_FIELD_NUMBER: builtins.int role_deprecated: builtins.str """The role on the account, should be one of [owner, admin, developer, financeadmin, read, metricsread] owner - gives full access to the account, including users, namespaces, and billing @@ -108,21 +110,36 @@ class AccountAccess(google.protobuf.message.Message): temporal:versioning:min_version=v0.3.0 temporal:enums:replaces=role_deprecated """ + @property + def custom_roles( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """List of custom role IDs assigned to the user or service account. + temporal:versioning:min_version=v0.13.0 + """ + def __init__( self, *, role_deprecated: builtins.str = ..., role: global___AccountAccess.Role.ValueType = ..., + custom_roles: collections.abc.Iterable[builtins.str] | None = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "role", b"role", "role_deprecated", b"role_deprecated" + field_name: typing.Literal[ + "custom_roles", + b"custom_roles", + "role", + b"role", + "role_deprecated", + b"role_deprecated", ], ) -> None: ... global___AccountAccess = AccountAccess +@typing.final class NamespaceAccess(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -135,7 +152,7 @@ class NamespaceAccess(google.protobuf.message.Message): NamespaceAccess._Permission.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor PERMISSION_UNSPECIFIED: NamespaceAccess._Permission.ValueType # 0 PERMISSION_ADMIN: NamespaceAccess._Permission.ValueType # 1 @@ -177,7 +194,7 @@ class NamespaceAccess(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "permission", b"permission", "permission_deprecated", @@ -187,9 +204,11 @@ class NamespaceAccess(google.protobuf.message.Message): global___NamespaceAccess = NamespaceAccess +@typing.final class Access(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class NamespaceAccessesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -205,18 +224,19 @@ class Access(google.protobuf.message.Message): value: global___NamespaceAccess | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... ACCOUNT_ACCESS_FIELD_NUMBER: builtins.int NAMESPACE_ACCESSES_FIELD_NUMBER: builtins.int + CUSTOM_ROLES_DEPRECATED_FIELD_NUMBER: builtins.int @property def account_access(self) -> global___AccountAccess: """The account access""" + @property def namespace_accesses( self, @@ -226,6 +246,16 @@ class Access(google.protobuf.message.Message): """The map of namespace accesses The key is the namespace name and the value is the access to the namespace """ + + @property + def custom_roles_deprecated( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """List of custom role IDs assigned to the user or service account. + Deprecated: Not supported after v0.12.0 api version. Use account_access.custom_roles instead. + temporal:versioning:max_version=v0.12.0 + """ + def __init__( self, *, @@ -234,15 +264,18 @@ class Access(google.protobuf.message.Message): builtins.str, global___NamespaceAccess ] | None = ..., + custom_roles_deprecated: collections.abc.Iterable[builtins.str] | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["account_access", b"account_access"] + self, field_name: typing.Literal["account_access", b"account_access"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "account_access", b"account_access", + "custom_roles_deprecated", + b"custom_roles_deprecated", "namespace_accesses", b"namespace_accesses", ], @@ -250,6 +283,7 @@ class Access(google.protobuf.message.Message): global___Access = Access +@typing.final class NamespaceScopedAccess(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -260,6 +294,7 @@ class NamespaceScopedAccess(google.protobuf.message.Message): @property def access(self) -> global___NamespaceAccess: """The namespace access assigned to the service account - mutable.""" + def __init__( self, *, @@ -267,17 +302,15 @@ class NamespaceScopedAccess(google.protobuf.message.Message): access: global___NamespaceAccess | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["access", b"access"] + self, field_name: typing.Literal["access", b"access"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "access", b"access", "namespace", b"namespace" - ], + self, field_name: typing.Literal["access", b"access", "namespace", b"namespace"] ) -> None: ... global___NamespaceScopedAccess = NamespaceScopedAccess +@typing.final class UserSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -288,6 +321,7 @@ class UserSpec(google.protobuf.message.Message): @property def access(self) -> global___Access: """The access to assigned to the user""" + def __init__( self, *, @@ -295,15 +329,15 @@ class UserSpec(google.protobuf.message.Message): access: global___Access | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["access", b"access"] + self, field_name: typing.Literal["access", b"access"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["access", b"access", "email", b"email"], + self, field_name: typing.Literal["access", b"access", "email", b"email"] ) -> None: ... global___UserSpec = UserSpec +@typing.final class Invitation(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -312,9 +346,11 @@ class Invitation(google.protobuf.message.Message): @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the user was created""" + @property def expired_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the invitation expires or has expired""" + def __init__( self, *, @@ -323,19 +359,20 @@ class Invitation(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "expired_time", b"expired_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "expired_time", b"expired_time" ], ) -> None: ... global___Invitation = Invitation +@typing.final class User(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -354,9 +391,6 @@ class User(google.protobuf.message.Message): """The current version of the user specification The next update operation will have to include this version """ - @property - def spec(self) -> global___UserSpec: - """The user specification""" state_deprecated: builtins.str """The current state of the user Deprecated: Not supported after v0.3.0 api version. Use state instead. @@ -370,17 +404,24 @@ class User(google.protobuf.message.Message): """ async_operation_id: builtins.str """The id of the async operation that is creating/updating/deleting the user, if any""" + @property + def spec(self) -> global___UserSpec: + """The user specification""" + @property def invitation(self) -> global___Invitation: """The details of the open invitation sent to the user, if any""" + @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the user was created""" + @property def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the user was last modified Will not be set if the user has never been modified """ + def __init__( self, *, @@ -396,7 +437,7 @@ class User(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "invitation", @@ -409,7 +450,7 @@ class User(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "created_time", @@ -433,6 +474,7 @@ class User(google.protobuf.message.Message): global___User = User +@typing.final class GoogleGroupSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -447,11 +489,12 @@ class GoogleGroupSpec(google.protobuf.message.Message): email_address: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["email_address", b"email_address"] + self, field_name: typing.Literal["email_address", b"email_address"] ) -> None: ... global___GoogleGroupSpec = GoogleGroupSpec +@typing.final class SCIMGroupSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -463,12 +506,11 @@ class SCIMGroupSpec(google.protobuf.message.Message): *, idp_id: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["idp_id", b"idp_id"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["idp_id", b"idp_id"]) -> None: ... global___SCIMGroupSpec = SCIMGroupSpec +@typing.final class CloudGroupSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -478,6 +520,7 @@ class CloudGroupSpec(google.protobuf.message.Message): global___CloudGroupSpec = CloudGroupSpec +@typing.final class UserGroupSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -491,19 +534,23 @@ class UserGroupSpec(google.protobuf.message.Message): @property def access(self) -> global___Access: """The access assigned to the group.""" + @property def google_group(self) -> global___GoogleGroupSpec: """The specification of the google group that this group is associated with.""" + @property def scim_group(self) -> global___SCIMGroupSpec: """The specification of the SCIM group that this group is associated with. SCIM groups cannot be created or deleted directly, but their access can be managed. """ + @property def cloud_group(self) -> global___CloudGroupSpec: """The specification for a Cloud group. Cloud groups can manage members using the add and remove member APIs. """ + def __init__( self, *, @@ -515,7 +562,7 @@ class UserGroupSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "access", b"access", "cloud_group", @@ -530,7 +577,7 @@ class UserGroupSpec(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "access", b"access", "cloud_group", @@ -546,13 +593,12 @@ class UserGroupSpec(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["group_type", b"group_type"] - ) -> ( - typing_extensions.Literal["google_group", "scim_group", "cloud_group"] | None - ): ... + self, oneof_group: typing.Literal["group_type", b"group_type"] + ) -> typing.Literal["google_group", "scim_group", "cloud_group"] | None: ... global___UserGroupSpec = UserGroupSpec +@typing.final class UserGroup(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -570,9 +616,6 @@ class UserGroup(google.protobuf.message.Message): """The current version of the group specification The next update operation will have to include this version """ - @property - def spec(self) -> global___UserGroupSpec: - """The group specification""" state_deprecated: builtins.str """The current state of the group. Deprecated: Not supported after v0.3.0 api version. Use state instead. @@ -586,14 +629,20 @@ class UserGroup(google.protobuf.message.Message): """ async_operation_id: builtins.str """The id of the async operation that is creating/updating/deleting the group, if any""" + @property + def spec(self) -> global___UserGroupSpec: + """The group specification""" + @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the group was created""" + @property def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the group was last modified Will not be set if the group has never been modified """ + def __init__( self, *, @@ -608,7 +657,7 @@ class UserGroup(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "last_modified_time", @@ -619,7 +668,7 @@ class UserGroup(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "created_time", @@ -641,6 +690,7 @@ class UserGroup(google.protobuf.message.Message): global___UserGroup = UserGroup +@typing.final class UserGroupMemberId(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -653,22 +703,23 @@ class UserGroupMemberId(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "member_type", b"member_type", "user_id", b"user_id" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "member_type", b"member_type", "user_id", b"user_id" ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["member_type", b"member_type"] - ) -> typing_extensions.Literal["user_id"] | None: ... + self, oneof_group: typing.Literal["member_type", b"member_type"] + ) -> typing.Literal["user_id"] | None: ... global___UserGroupMemberId = UserGroupMemberId +@typing.final class UserGroupMember(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -686,19 +737,20 @@ class UserGroupMember(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "member_id", b"member_id" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "member_id", b"member_id" ], ) -> None: ... global___UserGroupMember = UserGroupMember +@typing.final class ServiceAccount(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -716,9 +768,6 @@ class ServiceAccount(google.protobuf.message.Message): """The current version of the service account specification. The next update operation will have to include this version. """ - @property - def spec(self) -> global___ServiceAccountSpec: - """The service account specification.""" state_deprecated: builtins.str """The current state of the service account. Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended. @@ -734,14 +783,20 @@ class ServiceAccount(google.protobuf.message.Message): """ async_operation_id: builtins.str """The id of the async operation that is creating/updating/deleting the service account, if any.""" + @property + def spec(self) -> global___ServiceAccountSpec: + """The service account specification.""" + @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the service account was created.""" + @property def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the service account was last modified Will not be set if the service account has never been modified. """ + def __init__( self, *, @@ -756,7 +811,7 @@ class ServiceAccount(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "last_modified_time", @@ -767,7 +822,7 @@ class ServiceAccount(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "created_time", @@ -789,6 +844,7 @@ class ServiceAccount(google.protobuf.message.Message): global___ServiceAccount = ServiceAccount +@typing.final class ServiceAccountSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -800,6 +856,10 @@ class ServiceAccountSpec(google.protobuf.message.Message): """The name associated with the service account. The name is mutable, but must be unique across all your active service accounts. """ + description: builtins.str + """The description associated with the service account - optional. + The description is mutable. + """ @property def access(self) -> global___Access: """Note: one of `Access` or `NamespaceScopedAccess` must be provided, but not both. @@ -807,6 +867,7 @@ class ServiceAccountSpec(google.protobuf.message.Message): If set, creates an account scoped service account. The access is mutable. """ + @property def namespace_scoped_access(self) -> global___NamespaceScopedAccess: """The namespace scoped access assigned to the service account. @@ -814,10 +875,7 @@ class ServiceAccountSpec(google.protobuf.message.Message): The namespace scoped access is partially mutable. Refer to `NamespaceScopedAccess` for details. """ - description: builtins.str - """The description associated with the service account - optional. - The description is mutable. - """ + def __init__( self, *, @@ -828,13 +886,13 @@ class ServiceAccountSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "access", b"access", "namespace_scoped_access", b"namespace_scoped_access" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "access", b"access", "description", @@ -848,6 +906,7 @@ class ServiceAccountSpec(google.protobuf.message.Message): global___ServiceAccountSpec = ServiceAccountSpec +@typing.final class ApiKey(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -865,9 +924,6 @@ class ApiKey(google.protobuf.message.Message): """The current version of the API key specification. The next update operation will have to include this version. """ - @property - def spec(self) -> global___ApiKeySpec: - """The API key specification.""" state_deprecated: builtins.str """The current state of the API key. Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended. @@ -882,14 +938,20 @@ class ApiKey(google.protobuf.message.Message): """ async_operation_id: builtins.str """The id of the async operation that is creating/updating/deleting the API key, if any.""" + @property + def spec(self) -> global___ApiKeySpec: + """The API key specification.""" + @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the API key was created.""" + @property def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the API key was last modified. Will not be set if the API key has never been modified. """ + def __init__( self, *, @@ -904,7 +966,7 @@ class ApiKey(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "last_modified_time", @@ -915,7 +977,7 @@ class ApiKey(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "created_time", @@ -937,6 +999,7 @@ class ApiKey(google.protobuf.message.Message): global___ApiKey = ApiKey +@typing.final class ApiKeySpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -969,11 +1032,12 @@ class ApiKeySpec(google.protobuf.message.Message): """The display name of the API key.""" description: builtins.str """The description of the API key.""" + disabled: builtins.bool + """True if the API key is disabled.""" @property def expiry_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The expiry time of the API key.""" - disabled: builtins.bool - """True if the API key is disabled.""" + def __init__( self, *, @@ -986,11 +1050,11 @@ class ApiKeySpec(google.protobuf.message.Message): disabled: builtins.bool = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["expiry_time", b"expiry_time"] + self, field_name: typing.Literal["expiry_time", b"expiry_time"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "description", b"description", "disabled", @@ -1009,3 +1073,350 @@ class ApiKeySpec(google.protobuf.message.Message): ) -> None: ... global___ApiKeySpec = ApiKeySpec + +@typing.final +class CustomRoleSpec(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class Resources(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RESOURCE_TYPE_FIELD_NUMBER: builtins.int + RESOURCE_IDS_FIELD_NUMBER: builtins.int + ALLOW_ALL_FIELD_NUMBER: builtins.int + resource_type: builtins.str + """The resource type the permission applies to.""" + allow_all: builtins.bool + """Whether the permission applies to all resources of the given type.""" + @property + def resource_ids( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + builtins.str + ]: + """The resource IDs the permission applies to. Can be empty if allow_all is true.""" + + def __init__( + self, + *, + resource_type: builtins.str = ..., + resource_ids: collections.abc.Iterable[builtins.str] | None = ..., + allow_all: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "allow_all", + b"allow_all", + "resource_ids", + b"resource_ids", + "resource_type", + b"resource_type", + ], + ) -> None: ... + + @typing.final + class Permission(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RESOURCES_FIELD_NUMBER: builtins.int + ACTIONS_FIELD_NUMBER: builtins.int + @property + def resources(self) -> global___CustomRoleSpec.Resources: + """The resources the permission applies to.""" + + @property + def actions( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + builtins.str + ]: + """The actions allowed by the permission.""" + + def __init__( + self, + *, + resources: global___CustomRoleSpec.Resources | None = ..., + actions: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["resources", b"resources"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "actions", b"actions", "resources", b"resources" + ], + ) -> None: ... + + NAME_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + PERMISSIONS_FIELD_NUMBER: builtins.int + name: builtins.str + """The name of the custom role.""" + description: builtins.str + """The description of the custom role.""" + @property + def permissions( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___CustomRoleSpec.Permission + ]: + """The permissions assigned to the custom role.""" + + def __init__( + self, + *, + name: builtins.str = ..., + description: builtins.str = ..., + permissions: collections.abc.Iterable[global___CustomRoleSpec.Permission] + | None = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "description", + b"description", + "name", + b"name", + "permissions", + b"permissions", + ], + ) -> None: ... + +global___CustomRoleSpec = CustomRoleSpec + +@typing.final +class CustomRole(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + RESOURCE_VERSION_FIELD_NUMBER: builtins.int + SPEC_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + CREATED_TIME_FIELD_NUMBER: builtins.int + LAST_MODIFIED_TIME_FIELD_NUMBER: builtins.int + id: builtins.str + """The id of the custom role.""" + resource_version: builtins.str + """The current version of the custom role specification. + The next update operation will have to include this version. + """ + state: temporalio.api.cloud.resource.v1.message_pb2.ResourceState.ValueType + """The current state of the custom role. + For any failed state, reach out to Temporal Cloud support for remediation. + """ + async_operation_id: builtins.str + """The id of the async operation that is creating/updating/deleting the custom role, if any.""" + @property + def spec(self) -> global___CustomRoleSpec: + """The custom role specification.""" + + @property + def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The date and time when the custom role was created.""" + + @property + def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The date and time when the custom role was last modified. + Will not be set if the custom role has never been modified. + """ + + def __init__( + self, + *, + id: builtins.str = ..., + resource_version: builtins.str = ..., + spec: global___CustomRoleSpec | None = ..., + state: temporalio.api.cloud.resource.v1.message_pb2.ResourceState.ValueType = ..., + async_operation_id: builtins.str = ..., + created_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + last_modified_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "created_time", + b"created_time", + "last_modified_time", + b"last_modified_time", + "spec", + b"spec", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", + b"async_operation_id", + "created_time", + b"created_time", + "id", + b"id", + "last_modified_time", + b"last_modified_time", + "resource_version", + b"resource_version", + "spec", + b"spec", + "state", + b"state", + ], + ) -> None: ... + +global___CustomRole = CustomRole + +@typing.final +class UserNamespaceAssignment(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + EMAIL_FIELD_NUMBER: builtins.int + NAMESPACE_ACCESS_FIELD_NUMBER: builtins.int + INHERITED_ACCESS_FIELD_NUMBER: builtins.int + RESOURCE_VERSION_FIELD_NUMBER: builtins.int + id: builtins.str + """The ID of the user.""" + email: builtins.str + """The email of the user.""" + inherited_access: builtins.bool + """True if the user has inherited access to the namespace through an account or project role.""" + resource_version: builtins.str + """The current resource version of the user.""" + @property + def namespace_access(self) -> global___NamespaceAccess: + """The access assigned to the user at the namespace level.""" + + def __init__( + self, + *, + id: builtins.str = ..., + email: builtins.str = ..., + namespace_access: global___NamespaceAccess | None = ..., + inherited_access: builtins.bool = ..., + resource_version: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["namespace_access", b"namespace_access"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "email", + b"email", + "id", + b"id", + "inherited_access", + b"inherited_access", + "namespace_access", + b"namespace_access", + "resource_version", + b"resource_version", + ], + ) -> None: ... + +global___UserNamespaceAssignment = UserNamespaceAssignment + +@typing.final +class ServiceAccountNamespaceAssignment(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + NAMESPACE_ACCESS_FIELD_NUMBER: builtins.int + INHERITED_ACCESS_FIELD_NUMBER: builtins.int + RESOURCE_VERSION_FIELD_NUMBER: builtins.int + id: builtins.str + """The ID of the service account.""" + name: builtins.str + """The name of the service account.""" + inherited_access: builtins.bool + """True if the service account has inherited access to the namespace through an account or project role.""" + resource_version: builtins.str + """The current resource version of the service account.""" + @property + def namespace_access(self) -> global___NamespaceAccess: + """The access assigned to the service account at the namespace level.""" + + def __init__( + self, + *, + id: builtins.str = ..., + name: builtins.str = ..., + namespace_access: global___NamespaceAccess | None = ..., + inherited_access: builtins.bool = ..., + resource_version: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["namespace_access", b"namespace_access"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "id", + b"id", + "inherited_access", + b"inherited_access", + "name", + b"name", + "namespace_access", + b"namespace_access", + "resource_version", + b"resource_version", + ], + ) -> None: ... + +global___ServiceAccountNamespaceAssignment = ServiceAccountNamespaceAssignment + +@typing.final +class UserGroupNamespaceAssignment(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + DISPLAY_NAME_FIELD_NUMBER: builtins.int + NAMESPACE_ACCESS_FIELD_NUMBER: builtins.int + INHERITED_ACCESS_FIELD_NUMBER: builtins.int + RESOURCE_VERSION_FIELD_NUMBER: builtins.int + id: builtins.str + """The ID of the group.""" + display_name: builtins.str + """The display name of the group.""" + inherited_access: builtins.bool + """True if the group has inherited access to the namespace through an account or project role.""" + resource_version: builtins.str + """The current resource version of the group.""" + @property + def namespace_access(self) -> global___NamespaceAccess: + """The access assigned to the group at the namespace level.""" + + def __init__( + self, + *, + id: builtins.str = ..., + display_name: builtins.str = ..., + namespace_access: global___NamespaceAccess | None = ..., + inherited_access: builtins.bool = ..., + resource_version: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["namespace_access", b"namespace_access"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "display_name", + b"display_name", + "id", + b"id", + "inherited_access", + b"inherited_access", + "namespace_access", + b"namespace_access", + "resource_version", + b"resource_version", + ], + ) -> None: ... + +global___UserGroupNamespaceAssignment = UserGroupNamespaceAssignment diff --git a/temporalio/api/cloud/namespace/v1/__init__.py b/temporalio/api/cloud/namespace/v1/__init__.py index ed81cf8651..04e5e98f8a 100644 --- a/temporalio/api/cloud/namespace/v1/__init__.py +++ b/temporalio/api/cloud/namespace/v1/__init__.py @@ -1,35 +1,47 @@ from .message_pb2 import ( ApiKeyAuthSpec, AWSPrivateLinkInfo, + Capacity, + CapacitySpec, CertificateFilterSpec, CodecServerSpec, Endpoints, ExportSink, ExportSinkSpec, + FairnessSpec, HighAvailabilitySpec, LifecycleSpec, Limits, MtlsAuthSpec, Namespace, + NamespaceCapacityInfo, NamespaceRegionStatus, NamespaceSpec, PrivateConnectivity, + Replica, + ReplicaSpec, ) __all__ = [ "AWSPrivateLinkInfo", "ApiKeyAuthSpec", + "Capacity", + "CapacitySpec", "CertificateFilterSpec", "CodecServerSpec", "Endpoints", "ExportSink", "ExportSinkSpec", + "FairnessSpec", "HighAvailabilitySpec", "LifecycleSpec", "Limits", "MtlsAuthSpec", "Namespace", + "NamespaceCapacityInfo", "NamespaceRegionStatus", "NamespaceSpec", "PrivateConnectivity", + "Replica", + "ReplicaSpec", ] diff --git a/temporalio/api/cloud/namespace/v1/message_pb2.py b/temporalio/api/cloud/namespace/v1/message_pb2.py index 17f25d1850..03bbc83a37 100644 --- a/temporalio/api/cloud/namespace/v1/message_pb2.py +++ b/temporalio/api/cloud/namespace/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -27,276 +26,24 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n-temporal/api/cloud/namespace/v1/message.proto\x12\x1ftemporal.api.cloud.namespace.v1\x1a,temporal/api/cloud/resource/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a(temporal/api/cloud/sink/v1/message.proto\x1a\x34temporal/api/cloud/connectivityrule/v1/message.proto"\x81\x01\n\x15\x43\x65rtificateFilterSpec\x12\x13\n\x0b\x63ommon_name\x18\x01 \x01(\t\x12\x14\n\x0corganization\x18\x02 \x01(\t\x12\x1b\n\x13organizational_unit\x18\x03 \x01(\t\x12 \n\x18subject_alternative_name\x18\x04 \x01(\t"\xb7\x01\n\x0cMtlsAuthSpec\x12%\n\x1d\x61\x63\x63\x65pted_client_ca_deprecated\x18\x01 \x01(\t\x12\x1a\n\x12\x61\x63\x63\x65pted_client_ca\x18\x04 \x01(\x0c\x12S\n\x13\x63\x65rtificate_filters\x18\x02 \x03(\x0b\x32\x36.temporal.api.cloud.namespace.v1.CertificateFilterSpec\x12\x0f\n\x07\x65nabled\x18\x03 \x01(\x08"!\n\x0e\x41piKeyAuthSpec\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08"\xf4\x02\n\x0f\x43odecServerSpec\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x19\n\x11pass_access_token\x18\x02 \x01(\x08\x12(\n include_cross_origin_credentials\x18\x03 \x01(\x08\x12\x61\n\x14\x63ustom_error_message\x18\x04 \x01(\x0b\x32\x43.temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage\x1a\xa6\x01\n\x12\x43ustomErrorMessage\x12\x61\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\x0b\x32P.temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage\x1a-\n\x0c\x45rrorMessage\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04link\x18\x02 \x01(\t"1\n\rLifecycleSpec\x12 \n\x18\x65nable_delete_protection\x18\x01 \x01(\x08"8\n\x14HighAvailabilitySpec\x12 \n\x18\x64isable_managed_failover\x18\x01 \x01(\x08"\x89\t\n\rNamespaceSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07regions\x18\x02 \x03(\t\x12\x16\n\x0eretention_days\x18\x03 \x01(\x05\x12@\n\tmtls_auth\x18\x04 \x01(\x0b\x32-.temporal.api.cloud.namespace.v1.MtlsAuthSpec\x12\x45\n\x0c\x61pi_key_auth\x18\x07 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ApiKeyAuthSpec\x12p\n\x18\x63ustom_search_attributes\x18\x05 \x03(\x0b\x32J.temporal.api.cloud.namespace.v1.NamespaceSpec.CustomSearchAttributesEntryB\x02\x18\x01\x12_\n\x11search_attributes\x18\x08 \x03(\x0b\x32\x44.temporal.api.cloud.namespace.v1.NamespaceSpec.SearchAttributesEntry\x12\x46\n\x0c\x63odec_server\x18\x06 \x01(\x0b\x32\x30.temporal.api.cloud.namespace.v1.CodecServerSpec\x12\x41\n\tlifecycle\x18\t \x01(\x0b\x32..temporal.api.cloud.namespace.v1.LifecycleSpec\x12P\n\x11high_availability\x18\n \x01(\x0b\x32\x35.temporal.api.cloud.namespace.v1.HighAvailabilitySpec\x12\x1d\n\x15\x63onnectivity_rule_ids\x18\x0b \x03(\t\x1a=\n\x1b\x43ustomSearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a{\n\x15SearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0e\x32\x42.temporal.api.cloud.namespace.v1.NamespaceSpec.SearchAttributeType:\x02\x38\x01"\xac\x02\n\x13SearchAttributeType\x12%\n!SEARCH_ATTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aSEARCH_ATTRIBUTE_TYPE_TEXT\x10\x01\x12!\n\x1dSEARCH_ATTRIBUTE_TYPE_KEYWORD\x10\x02\x12\x1d\n\x19SEARCH_ATTRIBUTE_TYPE_INT\x10\x03\x12 \n\x1cSEARCH_ATTRIBUTE_TYPE_DOUBLE\x10\x04\x12\x1e\n\x1aSEARCH_ATTRIBUTE_TYPE_BOOL\x10\x05\x12"\n\x1eSEARCH_ATTRIBUTE_TYPE_DATETIME\x10\x06\x12&\n"SEARCH_ATTRIBUTE_TYPE_KEYWORD_LIST\x10\x07"Q\n\tEndpoints\x12\x13\n\x0bweb_address\x18\x01 \x01(\t\x12\x19\n\x11mtls_grpc_address\x18\x02 \x01(\t\x12\x14\n\x0cgrpc_address\x18\x03 \x01(\t"*\n\x06Limits\x12 \n\x18\x61\x63tions_per_second_limit\x18\x01 \x01(\x05"X\n\x12\x41WSPrivateLinkInfo\x12\x1e\n\x16\x61llowed_principal_arns\x18\x01 \x03(\t\x12"\n\x1avpc_endpoint_service_names\x18\x02 \x03(\t"t\n\x13PrivateConnectivity\x12\x0e\n\x06region\x18\x01 \x01(\t\x12M\n\x10\x61ws_private_link\x18\x02 \x01(\x0b\x32\x33.temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo"\xc6\x07\n\tNamespace\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12<\n\x04spec\x18\x03 \x01(\x0b\x32..temporal.api.cloud.namespace.v1.NamespaceSpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\r \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12=\n\tendpoints\x18\x06 \x01(\x0b\x32*.temporal.api.cloud.namespace.v1.Endpoints\x12\x15\n\ractive_region\x18\x07 \x01(\t\x12\x37\n\x06limits\x18\x08 \x01(\x0b\x32\'.temporal.api.cloud.namespace.v1.Limits\x12T\n\x16private_connectivities\x18\t \x03(\x0b\x32\x34.temporal.api.cloud.namespace.v1.PrivateConnectivity\x12\x30\n\x0c\x63reated_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12S\n\rregion_status\x18\x0c \x03(\x0b\x32<.temporal.api.cloud.namespace.v1.Namespace.RegionStatusEntry\x12T\n\x12\x63onnectivity_rules\x18\x0e \x03(\x0b\x32\x38.temporal.api.cloud.connectivityrule.v1.ConnectivityRule\x12\x42\n\x04tags\x18\x0f \x03(\x0b\x32\x34.temporal.api.cloud.namespace.v1.Namespace.TagsEntry\x1ak\n\x11RegionStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.temporal.api.cloud.namespace.v1.NamespaceRegionStatus:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x9b\x02\n\x15NamespaceRegionStatus\x12\x1c\n\x10state_deprecated\x18\x01 \x01(\tB\x02\x18\x01\x12K\n\x05state\x18\x03 \x01(\x0e\x32<.temporal.api.cloud.namespace.v1.NamespaceRegionStatus.State\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATE_ADDING\x10\x01\x12\x10\n\x0cSTATE_ACTIVE\x10\x02\x12\x11\n\rSTATE_PASSIVE\x10\x03\x12\x12\n\x0eSTATE_REMOVING\x10\x04\x12\x10\n\x0cSTATE_FAILED\x10\x05"\x91\x01\n\x0e\x45xportSinkSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x12.\n\x02s3\x18\x03 \x01(\x0b\x32".temporal.api.cloud.sink.v1.S3Spec\x12\x30\n\x03gcs\x18\x04 \x01(\x0b\x32#.temporal.api.cloud.sink.v1.GCSSpec"\xf6\x03\n\nExportSink\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12<\n\x05state\x18\x03 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12=\n\x04spec\x18\x04 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ExportSinkSpec\x12\x42\n\x06health\x18\x05 \x01(\x0e\x32\x32.temporal.api.cloud.namespace.v1.ExportSink.Health\x12\x15\n\rerror_message\x18\x06 \x01(\t\x12;\n\x17latest_data_export_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16last_health_check_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"o\n\x06Health\x12\x16\n\x12HEALTH_UNSPECIFIED\x10\x00\x12\r\n\tHEALTH_OK\x10\x01\x12\x19\n\x15HEALTH_ERROR_INTERNAL\x10\x02\x12#\n\x1fHEALTH_ERROR_USER_CONFIGURATION\x10\x03\x42\xb1\x01\n"io.temporal.api.cloud.namespace.v1B\x0cMessageProtoP\x01Z/go.temporal.io/api/cloud/namespace/v1;namespace\xaa\x02!Temporalio.Api.Cloud.Namespace.V1\xea\x02%Temporalio::Api::Cloud::Namespace::V1b\x06proto3' + b'\n-temporal/api/cloud/namespace/v1/message.proto\x12\x1ftemporal.api.cloud.namespace.v1\x1a,temporal/api/cloud/resource/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a(temporal/api/cloud/sink/v1/message.proto\x1a\x34temporal/api/cloud/connectivityrule/v1/message.proto"\x81\x01\n\x15\x43\x65rtificateFilterSpec\x12\x13\n\x0b\x63ommon_name\x18\x01 \x01(\t\x12\x14\n\x0corganization\x18\x02 \x01(\t\x12\x1b\n\x13organizational_unit\x18\x03 \x01(\t\x12 \n\x18subject_alternative_name\x18\x04 \x01(\t"\xbb\x01\n\x0cMtlsAuthSpec\x12)\n\x1d\x61\x63\x63\x65pted_client_ca_deprecated\x18\x01 \x01(\tB\x02\x18\x01\x12\x1a\n\x12\x61\x63\x63\x65pted_client_ca\x18\x04 \x01(\x0c\x12S\n\x13\x63\x65rtificate_filters\x18\x02 \x03(\x0b\x32\x36.temporal.api.cloud.namespace.v1.CertificateFilterSpec\x12\x0f\n\x07\x65nabled\x18\x03 \x01(\x08"!\n\x0e\x41piKeyAuthSpec\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08"1\n\rLifecycleSpec\x12 \n\x18\x65nable_delete_protection\x18\x01 \x01(\x08"\xf4\x02\n\x0f\x43odecServerSpec\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x19\n\x11pass_access_token\x18\x02 \x01(\x08\x12(\n include_cross_origin_credentials\x18\x03 \x01(\x08\x12\x61\n\x14\x63ustom_error_message\x18\x04 \x01(\x0b\x32\x43.temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage\x1a\xa6\x01\n\x12\x43ustomErrorMessage\x12\x61\n\x07\x64\x65\x66\x61ult\x18\x01 \x01(\x0b\x32P.temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage\x1a-\n\x0c\x45rrorMessage\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0c\n\x04link\x18\x02 \x01(\t"c\n\x14HighAvailabilitySpec\x12 \n\x18\x64isable_managed_failover\x18\x01 \x01(\x08\x12)\n!disable_passive_poller_forwarding\x18\x02 \x01(\x08"\x1d\n\x0bReplicaSpec\x12\x0e\n\x06region\x18\x01 \x01(\t"\x99\x02\n\x07Replica\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\nis_primary\x18\x02 \x01(\x08\x12\x44\n\x05state\x18\x03 \x01(\x0e\x32\x35.temporal.api.cloud.namespace.v1.Replica.ReplicaState\x12\x0e\n\x06region\x18\x04 \x01(\t"\x97\x01\n\x0cReplicaState\x12\x1d\n\x19REPLICA_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14REPLICA_STATE_ADDING\x10\x01\x12\x18\n\x14REPLICA_STATE_ACTIVE\x10\x02\x12\x1a\n\x16REPLICA_STATE_REMOVING\x10\x03\x12\x18\n\x14REPLICA_STATE_FAILED\x10\x05"\xdf\x01\n\x0c\x43\x61pacitySpec\x12K\n\ton_demand\x18\x01 \x01(\x0b\x32\x36.temporal.api.cloud.namespace.v1.CapacitySpec.OnDemandH\x00\x12P\n\x0bprovisioned\x18\x02 \x01(\x0b\x32\x39.temporal.api.cloud.namespace.v1.CapacitySpec.ProvisionedH\x00\x1a\n\n\x08OnDemand\x1a\x1c\n\x0bProvisioned\x12\r\n\x05value\x18\x01 \x01(\x01\x42\x06\n\x04spec"\xdc\x05\n\x08\x43\x61pacity\x12G\n\ton_demand\x18\x01 \x01(\x0b\x32\x32.temporal.api.cloud.namespace.v1.Capacity.OnDemandH\x00\x12L\n\x0bprovisioned\x18\x02 \x01(\x0b\x32\x35.temporal.api.cloud.namespace.v1.Capacity.ProvisionedH\x00\x12I\n\x0elatest_request\x18\x03 \x01(\x0b\x32\x31.temporal.api.cloud.namespace.v1.Capacity.Request\x1a\n\n\x08OnDemand\x1a$\n\x0bProvisioned\x12\x15\n\rcurrent_value\x18\x01 \x01(\x01\x1a\xab\x03\n\x07Request\x12\x46\n\x05state\x18\x01 \x01(\x0e\x32\x37.temporal.api.cloud.namespace.v1.Capacity.Request.State\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12\x61sync_operation_id\x18\x04 \x01(\t\x12;\n\x04spec\x18\x05 \x01(\x0b\x32-.temporal.api.cloud.namespace.v1.CapacitySpec"\xa0\x01\n\x05State\x12&\n"STATE_CAPACITY_REQUEST_UNSPECIFIED\x10\x00\x12$\n STATE_CAPACITY_REQUEST_COMPLETED\x10\x01\x12&\n"STATE_CAPACITY_REQUEST_IN_PROGRESS\x10\x02\x12!\n\x1dSTATE_CAPACITY_REQUEST_FAILED\x10\x03\x42\x0e\n\x0c\x63urrent_mode"3\n\x0c\x46\x61irnessSpec\x12#\n\x1btask_queue_fairness_enabled\x18\x01 \x01(\x08"\xd4\n\n\rNamespaceSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x07regions\x18\x02 \x03(\tB\x02\x18\x01\x12\x16\n\x0eretention_days\x18\x03 \x01(\x05\x12@\n\tmtls_auth\x18\x04 \x01(\x0b\x32-.temporal.api.cloud.namespace.v1.MtlsAuthSpec\x12\x45\n\x0c\x61pi_key_auth\x18\x07 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ApiKeyAuthSpec\x12p\n\x18\x63ustom_search_attributes\x18\x05 \x03(\x0b\x32J.temporal.api.cloud.namespace.v1.NamespaceSpec.CustomSearchAttributesEntryB\x02\x18\x01\x12_\n\x11search_attributes\x18\x08 \x03(\x0b\x32\x44.temporal.api.cloud.namespace.v1.NamespaceSpec.SearchAttributesEntry\x12\x46\n\x0c\x63odec_server\x18\x06 \x01(\x0b\x32\x30.temporal.api.cloud.namespace.v1.CodecServerSpec\x12\x41\n\tlifecycle\x18\t \x01(\x0b\x32..temporal.api.cloud.namespace.v1.LifecycleSpec\x12P\n\x11high_availability\x18\n \x01(\x0b\x32\x35.temporal.api.cloud.namespace.v1.HighAvailabilitySpec\x12\x1d\n\x15\x63onnectivity_rule_ids\x18\x0b \x03(\t\x12\x44\n\rcapacity_spec\x18\x0c \x01(\x0b\x32-.temporal.api.cloud.namespace.v1.CapacitySpec\x12>\n\x08replicas\x18\r \x03(\x0b\x32,.temporal.api.cloud.namespace.v1.ReplicaSpec\x12?\n\x08\x66\x61irness\x18\x0e \x01(\x0b\x32-.temporal.api.cloud.namespace.v1.FairnessSpec\x1a=\n\x1b\x43ustomSearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a{\n\x15SearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0e\x32\x42.temporal.api.cloud.namespace.v1.NamespaceSpec.SearchAttributeType:\x02\x38\x01"\xac\x02\n\x13SearchAttributeType\x12%\n!SEARCH_ATTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aSEARCH_ATTRIBUTE_TYPE_TEXT\x10\x01\x12!\n\x1dSEARCH_ATTRIBUTE_TYPE_KEYWORD\x10\x02\x12\x1d\n\x19SEARCH_ATTRIBUTE_TYPE_INT\x10\x03\x12 \n\x1cSEARCH_ATTRIBUTE_TYPE_DOUBLE\x10\x04\x12\x1e\n\x1aSEARCH_ATTRIBUTE_TYPE_BOOL\x10\x05\x12"\n\x1eSEARCH_ATTRIBUTE_TYPE_DATETIME\x10\x06\x12&\n"SEARCH_ATTRIBUTE_TYPE_KEYWORD_LIST\x10\x07"Q\n\tEndpoints\x12\x13\n\x0bweb_address\x18\x01 \x01(\t\x12\x19\n\x11mtls_grpc_address\x18\x02 \x01(\t\x12\x14\n\x0cgrpc_address\x18\x03 \x01(\t"*\n\x06Limits\x12 \n\x18\x61\x63tions_per_second_limit\x18\x01 \x01(\x05"X\n\x12\x41WSPrivateLinkInfo\x12\x1e\n\x16\x61llowed_principal_arns\x18\x01 \x03(\t\x12"\n\x1avpc_endpoint_service_names\x18\x02 \x03(\t"t\n\x13PrivateConnectivity\x12\x0e\n\x06region\x18\x01 \x01(\t\x12M\n\x10\x61ws_private_link\x18\x02 \x01(\x0b\x32\x33.temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo"\xc3\x08\n\tNamespace\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12<\n\x04spec\x18\x03 \x01(\x0b\x32..temporal.api.cloud.namespace.v1.NamespaceSpec\x12\x1c\n\x10state_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x05state\x18\r \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12=\n\tendpoints\x18\x06 \x01(\x0b\x32*.temporal.api.cloud.namespace.v1.Endpoints\x12\x15\n\ractive_region\x18\x07 \x01(\t\x12\x37\n\x06limits\x18\x08 \x01(\x0b\x32\'.temporal.api.cloud.namespace.v1.Limits\x12T\n\x16private_connectivities\x18\t \x03(\x0b\x32\x34.temporal.api.cloud.namespace.v1.PrivateConnectivity\x12\x30\n\x0c\x63reated_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12W\n\rregion_status\x18\x0c \x03(\x0b\x32<.temporal.api.cloud.namespace.v1.Namespace.RegionStatusEntryB\x02\x18\x01\x12T\n\x12\x63onnectivity_rules\x18\x0e \x03(\x0b\x32\x38.temporal.api.cloud.connectivityrule.v1.ConnectivityRule\x12\x42\n\x04tags\x18\x0f \x03(\x0b\x32\x34.temporal.api.cloud.namespace.v1.Namespace.TagsEntry\x12;\n\x08\x63\x61pacity\x18\x10 \x01(\x0b\x32).temporal.api.cloud.namespace.v1.Capacity\x12:\n\x08replicas\x18\x12 \x03(\x0b\x32(.temporal.api.cloud.namespace.v1.Replica\x1ak\n\x11RegionStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.temporal.api.cloud.namespace.v1.NamespaceRegionStatus:\x02\x38\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x9b\x02\n\x15NamespaceRegionStatus\x12\x1c\n\x10state_deprecated\x18\x01 \x01(\tB\x02\x18\x01\x12K\n\x05state\x18\x03 \x01(\x0e\x32<.temporal.api.cloud.namespace.v1.NamespaceRegionStatus.State\x12\x1a\n\x12\x61sync_operation_id\x18\x02 \x01(\t"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSTATE_ADDING\x10\x01\x12\x10\n\x0cSTATE_ACTIVE\x10\x02\x12\x11\n\rSTATE_PASSIVE\x10\x03\x12\x12\n\x0eSTATE_REMOVING\x10\x04\x12\x10\n\x0cSTATE_FAILED\x10\x05"\x91\x01\n\x0e\x45xportSinkSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x12.\n\x02s3\x18\x03 \x01(\x0b\x32".temporal.api.cloud.sink.v1.S3Spec\x12\x30\n\x03gcs\x18\x04 \x01(\x0b\x32#.temporal.api.cloud.sink.v1.GCSSpec"\xf6\x03\n\nExportSink\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12<\n\x05state\x18\x03 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12=\n\x04spec\x18\x04 \x01(\x0b\x32/.temporal.api.cloud.namespace.v1.ExportSinkSpec\x12\x42\n\x06health\x18\x05 \x01(\x0e\x32\x32.temporal.api.cloud.namespace.v1.ExportSink.Health\x12\x15\n\rerror_message\x18\x06 \x01(\t\x12;\n\x17latest_data_export_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16last_health_check_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"o\n\x06Health\x12\x16\n\x12HEALTH_UNSPECIFIED\x10\x00\x12\r\n\tHEALTH_OK\x10\x01\x12\x19\n\x15HEALTH_ERROR_INTERNAL\x10\x02\x12#\n\x1fHEALTH_ERROR_USER_CONFIGURATION\x10\x03"\x9f\x06\n\x15NamespaceCapacityInfo\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11has_legacy_limits\x18\x02 \x01(\x08\x12\x43\n\x10\x63urrent_capacity\x18\x03 \x01(\x0b\x32).temporal.api.cloud.namespace.v1.Capacity\x12`\n\x0cmode_options\x18\x04 \x01(\x0b\x32J.temporal.api.cloud.namespace.v1.NamespaceCapacityInfo.CapacityModeOptions\x12K\n\x05stats\x18\x05 \x01(\x0b\x32<.temporal.api.cloud.namespace.v1.NamespaceCapacityInfo.Stats\x1a\xd3\x02\n\x13\x43\x61pacityModeOptions\x12k\n\x0bprovisioned\x18\x01 \x01(\x0b\x32V.temporal.api.cloud.namespace.v1.NamespaceCapacityInfo.CapacityModeOptions.Provisioned\x12\x66\n\ton_demand\x18\x02 \x01(\x0b\x32S.temporal.api.cloud.namespace.v1.NamespaceCapacityInfo.CapacityModeOptions.OnDemand\x1aH\n\x0bProvisioned\x12\x18\n\x10valid_tru_values\x18\x01 \x03(\x01\x12\x1f\n\x17max_available_tru_value\x18\x02 \x01(\x01\x1a\x1d\n\x08OnDemand\x12\x11\n\taps_limit\x18\x01 \x01(\x01\x1a\x8d\x01\n\x05Stats\x12Q\n\x03\x61ps\x18\x01 \x01(\x0b\x32\x44.temporal.api.cloud.namespace.v1.NamespaceCapacityInfo.Stats.Summary\x1a\x31\n\x07Summary\x12\x0c\n\x04mean\x18\x01 \x01(\x01\x12\x0b\n\x03p90\x18\x02 \x01(\x01\x12\x0b\n\x03p99\x18\x03 \x01(\x01\x42\xb1\x01\n"io.temporal.api.cloud.namespace.v1B\x0cMessageProtoP\x01Z/go.temporal.io/api/cloud/namespace/v1;namespace\xaa\x02!Temporalio.Api.Cloud.Namespace.V1\xea\x02%Temporalio::Api::Cloud::Namespace::V1b\x06proto3' ) - -_CERTIFICATEFILTERSPEC = DESCRIPTOR.message_types_by_name["CertificateFilterSpec"] -_MTLSAUTHSPEC = DESCRIPTOR.message_types_by_name["MtlsAuthSpec"] -_APIKEYAUTHSPEC = DESCRIPTOR.message_types_by_name["ApiKeyAuthSpec"] -_CODECSERVERSPEC = DESCRIPTOR.message_types_by_name["CodecServerSpec"] -_CODECSERVERSPEC_CUSTOMERRORMESSAGE = _CODECSERVERSPEC.nested_types_by_name[ - "CustomErrorMessage" -] -_CODECSERVERSPEC_CUSTOMERRORMESSAGE_ERRORMESSAGE = ( - _CODECSERVERSPEC_CUSTOMERRORMESSAGE.nested_types_by_name["ErrorMessage"] -) -_LIFECYCLESPEC = DESCRIPTOR.message_types_by_name["LifecycleSpec"] -_HIGHAVAILABILITYSPEC = DESCRIPTOR.message_types_by_name["HighAvailabilitySpec"] -_NAMESPACESPEC = DESCRIPTOR.message_types_by_name["NamespaceSpec"] -_NAMESPACESPEC_CUSTOMSEARCHATTRIBUTESENTRY = _NAMESPACESPEC.nested_types_by_name[ - "CustomSearchAttributesEntry" -] -_NAMESPACESPEC_SEARCHATTRIBUTESENTRY = _NAMESPACESPEC.nested_types_by_name[ - "SearchAttributesEntry" -] -_ENDPOINTS = DESCRIPTOR.message_types_by_name["Endpoints"] -_LIMITS = DESCRIPTOR.message_types_by_name["Limits"] -_AWSPRIVATELINKINFO = DESCRIPTOR.message_types_by_name["AWSPrivateLinkInfo"] -_PRIVATECONNECTIVITY = DESCRIPTOR.message_types_by_name["PrivateConnectivity"] -_NAMESPACE = DESCRIPTOR.message_types_by_name["Namespace"] -_NAMESPACE_REGIONSTATUSENTRY = _NAMESPACE.nested_types_by_name["RegionStatusEntry"] -_NAMESPACE_TAGSENTRY = _NAMESPACE.nested_types_by_name["TagsEntry"] -_NAMESPACEREGIONSTATUS = DESCRIPTOR.message_types_by_name["NamespaceRegionStatus"] -_EXPORTSINKSPEC = DESCRIPTOR.message_types_by_name["ExportSinkSpec"] -_EXPORTSINK = DESCRIPTOR.message_types_by_name["ExportSink"] -_NAMESPACESPEC_SEARCHATTRIBUTETYPE = _NAMESPACESPEC.enum_types_by_name[ - "SearchAttributeType" -] -_NAMESPACEREGIONSTATUS_STATE = _NAMESPACEREGIONSTATUS.enum_types_by_name["State"] -_EXPORTSINK_HEALTH = _EXPORTSINK.enum_types_by_name["Health"] -CertificateFilterSpec = _reflection.GeneratedProtocolMessageType( - "CertificateFilterSpec", - (_message.Message,), - { - "DESCRIPTOR": _CERTIFICATEFILTERSPEC, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.CertificateFilterSpec) - }, -) -_sym_db.RegisterMessage(CertificateFilterSpec) - -MtlsAuthSpec = _reflection.GeneratedProtocolMessageType( - "MtlsAuthSpec", - (_message.Message,), - { - "DESCRIPTOR": _MTLSAUTHSPEC, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.MtlsAuthSpec) - }, -) -_sym_db.RegisterMessage(MtlsAuthSpec) - -ApiKeyAuthSpec = _reflection.GeneratedProtocolMessageType( - "ApiKeyAuthSpec", - (_message.Message,), - { - "DESCRIPTOR": _APIKEYAUTHSPEC, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.ApiKeyAuthSpec) - }, -) -_sym_db.RegisterMessage(ApiKeyAuthSpec) - -CodecServerSpec = _reflection.GeneratedProtocolMessageType( - "CodecServerSpec", - (_message.Message,), - { - "CustomErrorMessage": _reflection.GeneratedProtocolMessageType( - "CustomErrorMessage", - (_message.Message,), - { - "ErrorMessage": _reflection.GeneratedProtocolMessageType( - "ErrorMessage", - (_message.Message,), - { - "DESCRIPTOR": _CODECSERVERSPEC_CUSTOMERRORMESSAGE_ERRORMESSAGE, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage.ErrorMessage) - }, - ), - "DESCRIPTOR": _CODECSERVERSPEC_CUSTOMERRORMESSAGE, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.CodecServerSpec.CustomErrorMessage) - }, - ), - "DESCRIPTOR": _CODECSERVERSPEC, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.CodecServerSpec) - }, -) -_sym_db.RegisterMessage(CodecServerSpec) -_sym_db.RegisterMessage(CodecServerSpec.CustomErrorMessage) -_sym_db.RegisterMessage(CodecServerSpec.CustomErrorMessage.ErrorMessage) - -LifecycleSpec = _reflection.GeneratedProtocolMessageType( - "LifecycleSpec", - (_message.Message,), - { - "DESCRIPTOR": _LIFECYCLESPEC, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.LifecycleSpec) - }, -) -_sym_db.RegisterMessage(LifecycleSpec) - -HighAvailabilitySpec = _reflection.GeneratedProtocolMessageType( - "HighAvailabilitySpec", - (_message.Message,), - { - "DESCRIPTOR": _HIGHAVAILABILITYSPEC, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.HighAvailabilitySpec) - }, -) -_sym_db.RegisterMessage(HighAvailabilitySpec) - -NamespaceSpec = _reflection.GeneratedProtocolMessageType( - "NamespaceSpec", - (_message.Message,), - { - "CustomSearchAttributesEntry": _reflection.GeneratedProtocolMessageType( - "CustomSearchAttributesEntry", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACESPEC_CUSTOMSEARCHATTRIBUTESENTRY, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.NamespaceSpec.CustomSearchAttributesEntry) - }, - ), - "SearchAttributesEntry": _reflection.GeneratedProtocolMessageType( - "SearchAttributesEntry", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACESPEC_SEARCHATTRIBUTESENTRY, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.NamespaceSpec.SearchAttributesEntry) - }, - ), - "DESCRIPTOR": _NAMESPACESPEC, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.NamespaceSpec) - }, -) -_sym_db.RegisterMessage(NamespaceSpec) -_sym_db.RegisterMessage(NamespaceSpec.CustomSearchAttributesEntry) -_sym_db.RegisterMessage(NamespaceSpec.SearchAttributesEntry) - -Endpoints = _reflection.GeneratedProtocolMessageType( - "Endpoints", - (_message.Message,), - { - "DESCRIPTOR": _ENDPOINTS, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.Endpoints) - }, -) -_sym_db.RegisterMessage(Endpoints) - -Limits = _reflection.GeneratedProtocolMessageType( - "Limits", - (_message.Message,), - { - "DESCRIPTOR": _LIMITS, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.Limits) - }, -) -_sym_db.RegisterMessage(Limits) - -AWSPrivateLinkInfo = _reflection.GeneratedProtocolMessageType( - "AWSPrivateLinkInfo", - (_message.Message,), - { - "DESCRIPTOR": _AWSPRIVATELINKINFO, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.AWSPrivateLinkInfo) - }, -) -_sym_db.RegisterMessage(AWSPrivateLinkInfo) - -PrivateConnectivity = _reflection.GeneratedProtocolMessageType( - "PrivateConnectivity", - (_message.Message,), - { - "DESCRIPTOR": _PRIVATECONNECTIVITY, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.PrivateConnectivity) - }, -) -_sym_db.RegisterMessage(PrivateConnectivity) - -Namespace = _reflection.GeneratedProtocolMessageType( - "Namespace", - (_message.Message,), - { - "RegionStatusEntry": _reflection.GeneratedProtocolMessageType( - "RegionStatusEntry", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACE_REGIONSTATUSENTRY, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.Namespace.RegionStatusEntry) - }, - ), - "TagsEntry": _reflection.GeneratedProtocolMessageType( - "TagsEntry", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACE_TAGSENTRY, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.Namespace.TagsEntry) - }, - ), - "DESCRIPTOR": _NAMESPACE, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.Namespace) - }, -) -_sym_db.RegisterMessage(Namespace) -_sym_db.RegisterMessage(Namespace.RegionStatusEntry) -_sym_db.RegisterMessage(Namespace.TagsEntry) - -NamespaceRegionStatus = _reflection.GeneratedProtocolMessageType( - "NamespaceRegionStatus", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEREGIONSTATUS, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.NamespaceRegionStatus) - }, -) -_sym_db.RegisterMessage(NamespaceRegionStatus) - -ExportSinkSpec = _reflection.GeneratedProtocolMessageType( - "ExportSinkSpec", - (_message.Message,), - { - "DESCRIPTOR": _EXPORTSINKSPEC, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.ExportSinkSpec) - }, -) -_sym_db.RegisterMessage(ExportSinkSpec) - -ExportSink = _reflection.GeneratedProtocolMessageType( - "ExportSink", - (_message.Message,), - { - "DESCRIPTOR": _EXPORTSINK, - "__module__": "temporalio.api.cloud.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.namespace.v1.ExportSink) - }, -) -_sym_db.RegisterMessage(ExportSink) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n"io.temporal.api.cloud.namespace.v1B\014MessageProtoP\001Z/go.temporal.io/api/cloud/namespace/v1;namespace\252\002!Temporalio.Api.Cloud.Namespace.V1\352\002%Temporalio::Api::Cloud::Namespace::V1' + _MTLSAUTHSPEC.fields_by_name["accepted_client_ca_deprecated"]._options = None + _MTLSAUTHSPEC.fields_by_name[ + "accepted_client_ca_deprecated" + ]._serialized_options = b"\030\001" _NAMESPACESPEC_CUSTOMSEARCHATTRIBUTESENTRY._options = None _NAMESPACESPEC_CUSTOMSEARCHATTRIBUTESENTRY._serialized_options = b"8\001" _NAMESPACESPEC_SEARCHATTRIBUTESENTRY._options = None _NAMESPACESPEC_SEARCHATTRIBUTESENTRY._serialized_options = b"8\001" + _NAMESPACESPEC.fields_by_name["regions"]._options = None + _NAMESPACESPEC.fields_by_name["regions"]._serialized_options = b"\030\001" _NAMESPACESPEC.fields_by_name["custom_search_attributes"]._options = None _NAMESPACESPEC.fields_by_name[ "custom_search_attributes" @@ -307,6 +54,8 @@ _NAMESPACE_TAGSENTRY._serialized_options = b"8\001" _NAMESPACE.fields_by_name["state_deprecated"]._options = None _NAMESPACE.fields_by_name["state_deprecated"]._serialized_options = b"\030\001" + _NAMESPACE.fields_by_name["region_status"]._options = None + _NAMESPACE.fields_by_name["region_status"]._serialized_options = b"\030\001" _NAMESPACEREGIONSTATUS.fields_by_name["state_deprecated"]._options = None _NAMESPACEREGIONSTATUS.fields_by_name[ "state_deprecated" @@ -314,49 +63,85 @@ _CERTIFICATEFILTERSPEC._serialized_start = 258 _CERTIFICATEFILTERSPEC._serialized_end = 387 _MTLSAUTHSPEC._serialized_start = 390 - _MTLSAUTHSPEC._serialized_end = 573 - _APIKEYAUTHSPEC._serialized_start = 575 - _APIKEYAUTHSPEC._serialized_end = 608 - _CODECSERVERSPEC._serialized_start = 611 - _CODECSERVERSPEC._serialized_end = 983 - _CODECSERVERSPEC_CUSTOMERRORMESSAGE._serialized_start = 817 - _CODECSERVERSPEC_CUSTOMERRORMESSAGE._serialized_end = 983 - _CODECSERVERSPEC_CUSTOMERRORMESSAGE_ERRORMESSAGE._serialized_start = 938 - _CODECSERVERSPEC_CUSTOMERRORMESSAGE_ERRORMESSAGE._serialized_end = 983 - _LIFECYCLESPEC._serialized_start = 985 - _LIFECYCLESPEC._serialized_end = 1034 - _HIGHAVAILABILITYSPEC._serialized_start = 1036 - _HIGHAVAILABILITYSPEC._serialized_end = 1092 - _NAMESPACESPEC._serialized_start = 1095 - _NAMESPACESPEC._serialized_end = 2256 - _NAMESPACESPEC_CUSTOMSEARCHATTRIBUTESENTRY._serialized_start = 1767 - _NAMESPACESPEC_CUSTOMSEARCHATTRIBUTESENTRY._serialized_end = 1828 - _NAMESPACESPEC_SEARCHATTRIBUTESENTRY._serialized_start = 1830 - _NAMESPACESPEC_SEARCHATTRIBUTESENTRY._serialized_end = 1953 - _NAMESPACESPEC_SEARCHATTRIBUTETYPE._serialized_start = 1956 - _NAMESPACESPEC_SEARCHATTRIBUTETYPE._serialized_end = 2256 - _ENDPOINTS._serialized_start = 2258 - _ENDPOINTS._serialized_end = 2339 - _LIMITS._serialized_start = 2341 - _LIMITS._serialized_end = 2383 - _AWSPRIVATELINKINFO._serialized_start = 2385 - _AWSPRIVATELINKINFO._serialized_end = 2473 - _PRIVATECONNECTIVITY._serialized_start = 2475 - _PRIVATECONNECTIVITY._serialized_end = 2591 - _NAMESPACE._serialized_start = 2594 - _NAMESPACE._serialized_end = 3560 - _NAMESPACE_REGIONSTATUSENTRY._serialized_start = 3408 - _NAMESPACE_REGIONSTATUSENTRY._serialized_end = 3515 - _NAMESPACE_TAGSENTRY._serialized_start = 3517 - _NAMESPACE_TAGSENTRY._serialized_end = 3560 - _NAMESPACEREGIONSTATUS._serialized_start = 3563 - _NAMESPACEREGIONSTATUS._serialized_end = 3846 - _NAMESPACEREGIONSTATUS_STATE._serialized_start = 3723 - _NAMESPACEREGIONSTATUS_STATE._serialized_end = 3846 - _EXPORTSINKSPEC._serialized_start = 3849 - _EXPORTSINKSPEC._serialized_end = 3994 - _EXPORTSINK._serialized_start = 3997 - _EXPORTSINK._serialized_end = 4499 - _EXPORTSINK_HEALTH._serialized_start = 4388 - _EXPORTSINK_HEALTH._serialized_end = 4499 + _MTLSAUTHSPEC._serialized_end = 577 + _APIKEYAUTHSPEC._serialized_start = 579 + _APIKEYAUTHSPEC._serialized_end = 612 + _LIFECYCLESPEC._serialized_start = 614 + _LIFECYCLESPEC._serialized_end = 663 + _CODECSERVERSPEC._serialized_start = 666 + _CODECSERVERSPEC._serialized_end = 1038 + _CODECSERVERSPEC_CUSTOMERRORMESSAGE._serialized_start = 872 + _CODECSERVERSPEC_CUSTOMERRORMESSAGE._serialized_end = 1038 + _CODECSERVERSPEC_CUSTOMERRORMESSAGE_ERRORMESSAGE._serialized_start = 993 + _CODECSERVERSPEC_CUSTOMERRORMESSAGE_ERRORMESSAGE._serialized_end = 1038 + _HIGHAVAILABILITYSPEC._serialized_start = 1040 + _HIGHAVAILABILITYSPEC._serialized_end = 1139 + _REPLICASPEC._serialized_start = 1141 + _REPLICASPEC._serialized_end = 1170 + _REPLICA._serialized_start = 1173 + _REPLICA._serialized_end = 1454 + _REPLICA_REPLICASTATE._serialized_start = 1303 + _REPLICA_REPLICASTATE._serialized_end = 1454 + _CAPACITYSPEC._serialized_start = 1457 + _CAPACITYSPEC._serialized_end = 1680 + _CAPACITYSPEC_ONDEMAND._serialized_start = 1632 + _CAPACITYSPEC_ONDEMAND._serialized_end = 1642 + _CAPACITYSPEC_PROVISIONED._serialized_start = 1644 + _CAPACITYSPEC_PROVISIONED._serialized_end = 1672 + _CAPACITY._serialized_start = 1683 + _CAPACITY._serialized_end = 2415 + _CAPACITY_ONDEMAND._serialized_start = 1632 + _CAPACITY_ONDEMAND._serialized_end = 1642 + _CAPACITY_PROVISIONED._serialized_start = 1933 + _CAPACITY_PROVISIONED._serialized_end = 1969 + _CAPACITY_REQUEST._serialized_start = 1972 + _CAPACITY_REQUEST._serialized_end = 2399 + _CAPACITY_REQUEST_STATE._serialized_start = 2239 + _CAPACITY_REQUEST_STATE._serialized_end = 2399 + _FAIRNESSSPEC._serialized_start = 2417 + _FAIRNESSSPEC._serialized_end = 2468 + _NAMESPACESPEC._serialized_start = 2471 + _NAMESPACESPEC._serialized_end = 3835 + _NAMESPACESPEC_CUSTOMSEARCHATTRIBUTESENTRY._serialized_start = 3346 + _NAMESPACESPEC_CUSTOMSEARCHATTRIBUTESENTRY._serialized_end = 3407 + _NAMESPACESPEC_SEARCHATTRIBUTESENTRY._serialized_start = 3409 + _NAMESPACESPEC_SEARCHATTRIBUTESENTRY._serialized_end = 3532 + _NAMESPACESPEC_SEARCHATTRIBUTETYPE._serialized_start = 3535 + _NAMESPACESPEC_SEARCHATTRIBUTETYPE._serialized_end = 3835 + _ENDPOINTS._serialized_start = 3837 + _ENDPOINTS._serialized_end = 3918 + _LIMITS._serialized_start = 3920 + _LIMITS._serialized_end = 3962 + _AWSPRIVATELINKINFO._serialized_start = 3964 + _AWSPRIVATELINKINFO._serialized_end = 4052 + _PRIVATECONNECTIVITY._serialized_start = 4054 + _PRIVATECONNECTIVITY._serialized_end = 4170 + _NAMESPACE._serialized_start = 4173 + _NAMESPACE._serialized_end = 5264 + _NAMESPACE_REGIONSTATUSENTRY._serialized_start = 5112 + _NAMESPACE_REGIONSTATUSENTRY._serialized_end = 5219 + _NAMESPACE_TAGSENTRY._serialized_start = 5221 + _NAMESPACE_TAGSENTRY._serialized_end = 5264 + _NAMESPACEREGIONSTATUS._serialized_start = 5267 + _NAMESPACEREGIONSTATUS._serialized_end = 5550 + _NAMESPACEREGIONSTATUS_STATE._serialized_start = 5427 + _NAMESPACEREGIONSTATUS_STATE._serialized_end = 5550 + _EXPORTSINKSPEC._serialized_start = 5553 + _EXPORTSINKSPEC._serialized_end = 5698 + _EXPORTSINK._serialized_start = 5701 + _EXPORTSINK._serialized_end = 6203 + _EXPORTSINK_HEALTH._serialized_start = 6092 + _EXPORTSINK_HEALTH._serialized_end = 6203 + _NAMESPACECAPACITYINFO._serialized_start = 6206 + _NAMESPACECAPACITYINFO._serialized_end = 7005 + _NAMESPACECAPACITYINFO_CAPACITYMODEOPTIONS._serialized_start = 6522 + _NAMESPACECAPACITYINFO_CAPACITYMODEOPTIONS._serialized_end = 6861 + _NAMESPACECAPACITYINFO_CAPACITYMODEOPTIONS_PROVISIONED._serialized_start = 6758 + _NAMESPACECAPACITYINFO_CAPACITYMODEOPTIONS_PROVISIONED._serialized_end = 6830 + _NAMESPACECAPACITYINFO_CAPACITYMODEOPTIONS_ONDEMAND._serialized_start = 6832 + _NAMESPACECAPACITYINFO_CAPACITYMODEOPTIONS_ONDEMAND._serialized_end = 6861 + _NAMESPACECAPACITYINFO_STATS._serialized_start = 6864 + _NAMESPACECAPACITYINFO_STATS._serialized_end = 7005 + _NAMESPACECAPACITYINFO_STATS_SUMMARY._serialized_start = 6956 + _NAMESPACECAPACITYINFO_STATS_SUMMARY._serialized_end = 7005 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/cloud/namespace/v1/message_pb2.pyi b/temporalio/api/cloud/namespace/v1/message_pb2.pyi index ef666d6e5e..b4c50e655e 100644 --- a/temporalio/api/cloud/namespace/v1/message_pb2.pyi +++ b/temporalio/api/cloud/namespace/v1/message_pb2.pyi @@ -25,6 +25,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class CertificateFilterSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -58,7 +59,7 @@ class CertificateFilterSpec(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "common_name", b"common_name", "organization", @@ -72,6 +73,7 @@ class CertificateFilterSpec(google.protobuf.message.Message): global___CertificateFilterSpec = CertificateFilterSpec +@typing.final class MtlsAuthSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -92,6 +94,11 @@ class MtlsAuthSpec(google.protobuf.message.Message): This must only be one value, but the CA can have a chain. temporal:versioning:min_version=v0.2.0 """ + enabled: builtins.bool + """Flag to enable mTLS auth (default: disabled). + Note: disabling mTLS auth will cause existing mTLS connections to fail. + temporal:versioning:min_version=v0.2.0 + """ @property def certificate_filters( self, @@ -102,11 +109,7 @@ class MtlsAuthSpec(google.protobuf.message.Message): This allows limiting access to specific end-entity certificates. Optional, default is empty. """ - enabled: builtins.bool - """Flag to enable mTLS auth (default: disabled). - Note: disabling mTLS auth will cause existing mTLS connections to fail. - temporal:versioning:min_version=v0.2.0 - """ + def __init__( self, *, @@ -118,7 +121,7 @@ class MtlsAuthSpec(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "accepted_client_ca", b"accepted_client_ca", "accepted_client_ca_deprecated", @@ -132,6 +135,7 @@ class MtlsAuthSpec(google.protobuf.message.Message): global___MtlsAuthSpec = MtlsAuthSpec +@typing.final class ApiKeyAuthSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -145,18 +149,40 @@ class ApiKeyAuthSpec(google.protobuf.message.Message): *, enabled: builtins.bool = ..., ) -> None: ... + def ClearField(self, field_name: typing.Literal["enabled", b"enabled"]) -> None: ... + +global___ApiKeyAuthSpec = ApiKeyAuthSpec + +@typing.final +class LifecycleSpec(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ENABLE_DELETE_PROTECTION_FIELD_NUMBER: builtins.int + enable_delete_protection: builtins.bool + """Flag to enable delete protection for the namespace.""" + def __init__( + self, + *, + enable_delete_protection: builtins.bool = ..., + ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["enabled", b"enabled"] + self, + field_name: typing.Literal[ + "enable_delete_protection", b"enable_delete_protection" + ], ) -> None: ... -global___ApiKeyAuthSpec = ApiKeyAuthSpec +global___LifecycleSpec = LifecycleSpec +@typing.final class CodecServerSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class CustomErrorMessage(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class ErrorMessage(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -173,16 +199,14 @@ class CodecServerSpec(google.protobuf.message.Message): link: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "link", b"link", "message", b"message" - ], + self, field_name: typing.Literal["link", b"link", "message", b"message"] ) -> None: ... DEFAULT_FIELD_NUMBER: builtins.int @property def default(self) -> global___CodecServerSpec.CustomErrorMessage.ErrorMessage: """The error message to display by default for any remote codec server errors.""" + def __init__( self, *, @@ -190,10 +214,10 @@ class CodecServerSpec(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["default", b"default"] + self, field_name: typing.Literal["default", b"default"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["default", b"default"] + self, field_name: typing.Literal["default", b"default"] ) -> None: ... ENDPOINT_FIELD_NUMBER: builtins.int @@ -211,6 +235,7 @@ class CodecServerSpec(google.protobuf.message.Message): """A custom error message to display for remote codec server errors. temporal:versioning:min_version=v0.5.1 """ + def __init__( self, *, @@ -221,13 +246,11 @@ class CodecServerSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "custom_error_message", b"custom_error_message" - ], + field_name: typing.Literal["custom_error_message", b"custom_error_message"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "custom_error_message", b"custom_error_message", "endpoint", @@ -241,46 +264,381 @@ class CodecServerSpec(google.protobuf.message.Message): global___CodecServerSpec = CodecServerSpec -class LifecycleSpec(google.protobuf.message.Message): +@typing.final +class HighAvailabilitySpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - ENABLE_DELETE_PROTECTION_FIELD_NUMBER: builtins.int - enable_delete_protection: builtins.bool - """Flag to enable delete protection for the namespace.""" + DISABLE_MANAGED_FAILOVER_FIELD_NUMBER: builtins.int + DISABLE_PASSIVE_POLLER_FORWARDING_FIELD_NUMBER: builtins.int + disable_managed_failover: builtins.bool + """Flag to disable managed failover for the namespace.""" + disable_passive_poller_forwarding: builtins.bool + """Flag to disable passive poller forwarding for this namespace. + temporal:versioning:min_version=v0.13.0 + """ def __init__( self, *, - enable_delete_protection: builtins.bool = ..., + disable_managed_failover: builtins.bool = ..., + disable_passive_poller_forwarding: builtins.bool = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "enable_delete_protection", b"enable_delete_protection" + field_name: typing.Literal[ + "disable_managed_failover", + b"disable_managed_failover", + "disable_passive_poller_forwarding", + b"disable_passive_poller_forwarding", ], ) -> None: ... -global___LifecycleSpec = LifecycleSpec +global___HighAvailabilitySpec = HighAvailabilitySpec + +@typing.final +class ReplicaSpec(google.protobuf.message.Message): + """temporal:versioning:min_version=v0.13.0""" -class HighAvailabilitySpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - DISABLE_MANAGED_FAILOVER_FIELD_NUMBER: builtins.int - disable_managed_failover: builtins.bool - """Flag to disable managed failover for the namespace.""" + REGION_FIELD_NUMBER: builtins.int + region: builtins.str + """The id of the region where the replica should be placed. + The GetRegions API can be used to get the list of valid region ids. + All the replicas must adhere to the region's max_in_region_replicas limit and connectable_region_ids. + Required. Immutable. + Example: "aws-us-west-2". + """ def __init__( self, *, - disable_managed_failover: builtins.bool = ..., + region: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["region", b"region"]) -> None: ... + +global___ReplicaSpec = ReplicaSpec + +@typing.final +class Replica(google.protobuf.message.Message): + """temporal:versioning:min_version=v0.13.0""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _ReplicaState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ReplicaStateEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + Replica._ReplicaState.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + REPLICA_STATE_UNSPECIFIED: Replica._ReplicaState.ValueType # 0 + REPLICA_STATE_ADDING: Replica._ReplicaState.ValueType # 1 + """This replica is currently being added to the namespace.""" + REPLICA_STATE_ACTIVE: Replica._ReplicaState.ValueType # 2 + """This replica is healthy and active.""" + REPLICA_STATE_REMOVING: Replica._ReplicaState.ValueType # 3 + """This replica is currently being removed from the namespace.""" + REPLICA_STATE_FAILED: Replica._ReplicaState.ValueType # 5 + """This replica is in a failed state, reach out to Temporal Cloud support for remediation.""" + + class ReplicaState(_ReplicaState, metaclass=_ReplicaStateEnumTypeWrapper): ... + REPLICA_STATE_UNSPECIFIED: Replica.ReplicaState.ValueType # 0 + REPLICA_STATE_ADDING: Replica.ReplicaState.ValueType # 1 + """This replica is currently being added to the namespace.""" + REPLICA_STATE_ACTIVE: Replica.ReplicaState.ValueType # 2 + """This replica is healthy and active.""" + REPLICA_STATE_REMOVING: Replica.ReplicaState.ValueType # 3 + """This replica is currently being removed from the namespace.""" + REPLICA_STATE_FAILED: Replica.ReplicaState.ValueType # 5 + """This replica is in a failed state, reach out to Temporal Cloud support for remediation.""" + + ID_FIELD_NUMBER: builtins.int + IS_PRIMARY_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + REGION_FIELD_NUMBER: builtins.int + id: builtins.str + """The id of the replica. This is generated by Temporal after a replica is created.""" + is_primary: builtins.bool + """Whether this replica is currently the primary one.""" + state: global___Replica.ReplicaState.ValueType + """The current state of this replica.""" + region: builtins.str + """The cloud provider and region of this replica.""" + def __init__( + self, + *, + id: builtins.str = ..., + is_primary: builtins.bool = ..., + state: global___Replica.ReplicaState.ValueType = ..., + region: builtins.str = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "disable_managed_failover", b"disable_managed_failover" + field_name: typing.Literal[ + "id", + b"id", + "is_primary", + b"is_primary", + "region", + b"region", + "state", + b"state", ], ) -> None: ... -global___HighAvailabilitySpec = HighAvailabilitySpec +global___Replica = Replica + +@typing.final +class CapacitySpec(google.protobuf.message.Message): + """temporal:versioning:min_version=v0.10.0""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class OnDemand(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + @typing.final + class Provisioned(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + VALUE_FIELD_NUMBER: builtins.int + value: builtins.float + """The units of provisioned capacity in TRU (Temporal Resource Units). + Each TRU unit assigned to the namespace will entitle it with additional APS limits as specified in the documentation. + """ + def __init__( + self, + *, + value: builtins.float = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ... + + ON_DEMAND_FIELD_NUMBER: builtins.int + PROVISIONED_FIELD_NUMBER: builtins.int + @property + def on_demand(self) -> global___CapacitySpec.OnDemand: + """The on-demand capacity mode configuration.""" + + @property + def provisioned(self) -> global___CapacitySpec.Provisioned: + """The provisioned capacity mode configuration.""" + + def __init__( + self, + *, + on_demand: global___CapacitySpec.OnDemand | None = ..., + provisioned: global___CapacitySpec.Provisioned | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "on_demand", b"on_demand", "provisioned", b"provisioned", "spec", b"spec" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "on_demand", b"on_demand", "provisioned", b"provisioned", "spec", b"spec" + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["spec", b"spec"] + ) -> typing.Literal["on_demand", "provisioned"] | None: ... + +global___CapacitySpec = CapacitySpec + +@typing.final +class Capacity(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class OnDemand(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + + @typing.final + class Provisioned(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CURRENT_VALUE_FIELD_NUMBER: builtins.int + current_value: builtins.float + """The current provisioned capacity for the namespace in Temporal Resource Units. + Can be different from the requested capacity in latest_request if the request is still in progress. + """ + def __init__( + self, + *, + current_value: builtins.float = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["current_value", b"current_value"] + ) -> None: ... + + @typing.final + class Request(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _State: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _StateEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + Capacity.Request._State.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + STATE_CAPACITY_REQUEST_UNSPECIFIED: Capacity.Request._State.ValueType # 0 + STATE_CAPACITY_REQUEST_COMPLETED: Capacity.Request._State.ValueType # 1 + STATE_CAPACITY_REQUEST_IN_PROGRESS: Capacity.Request._State.ValueType # 2 + STATE_CAPACITY_REQUEST_FAILED: Capacity.Request._State.ValueType # 3 + + class State(_State, metaclass=_StateEnumTypeWrapper): ... + STATE_CAPACITY_REQUEST_UNSPECIFIED: Capacity.Request.State.ValueType # 0 + STATE_CAPACITY_REQUEST_COMPLETED: Capacity.Request.State.ValueType # 1 + STATE_CAPACITY_REQUEST_IN_PROGRESS: Capacity.Request.State.ValueType # 2 + STATE_CAPACITY_REQUEST_FAILED: Capacity.Request.State.ValueType # 3 + + STATE_FIELD_NUMBER: builtins.int + START_TIME_FIELD_NUMBER: builtins.int + END_TIME_FIELD_NUMBER: builtins.int + ASYNC_OPERATION_ID_FIELD_NUMBER: builtins.int + SPEC_FIELD_NUMBER: builtins.int + state: global___Capacity.Request.State.ValueType + """The current state of the capacity request (e.g. in-progress, completed, failed).""" + async_operation_id: builtins.str + """The id of the async operation that is creating/updating/deleting the capacity, if any.""" + @property + def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The date and time when the capacity request was created.""" + + @property + def end_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The date and time when the capacity request was completed or failed.""" + + @property + def spec(self) -> global___CapacitySpec: + """The requested capacity specification.""" + + def __init__( + self, + *, + state: global___Capacity.Request.State.ValueType = ..., + start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + end_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + async_operation_id: builtins.str = ..., + spec: global___CapacitySpec | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "end_time", b"end_time", "spec", b"spec", "start_time", b"start_time" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "async_operation_id", + b"async_operation_id", + "end_time", + b"end_time", + "spec", + b"spec", + "start_time", + b"start_time", + "state", + b"state", + ], + ) -> None: ... + + ON_DEMAND_FIELD_NUMBER: builtins.int + PROVISIONED_FIELD_NUMBER: builtins.int + LATEST_REQUEST_FIELD_NUMBER: builtins.int + @property + def on_demand(self) -> global___Capacity.OnDemand: + """The status of on-demand capacity mode.""" + + @property + def provisioned(self) -> global___Capacity.Provisioned: + """The status of provisioned capacity mode.""" + + @property + def latest_request(self) -> global___Capacity.Request: + """The latest requested capacity for the namespace, if any.""" + + def __init__( + self, + *, + on_demand: global___Capacity.OnDemand | None = ..., + provisioned: global___Capacity.Provisioned | None = ..., + latest_request: global___Capacity.Request | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "current_mode", + b"current_mode", + "latest_request", + b"latest_request", + "on_demand", + b"on_demand", + "provisioned", + b"provisioned", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "current_mode", + b"current_mode", + "latest_request", + b"latest_request", + "on_demand", + b"on_demand", + "provisioned", + b"provisioned", + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["current_mode", b"current_mode"] + ) -> typing.Literal["on_demand", "provisioned"] | None: ... + +global___Capacity = Capacity + +@typing.final +class FairnessSpec(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TASK_QUEUE_FAIRNESS_ENABLED_FIELD_NUMBER: builtins.int + task_queue_fairness_enabled: builtins.bool + """Flag to enable task queue fairness for the namespace (default: disabled).""" + def __init__( + self, + *, + task_queue_fairness_enabled: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "task_queue_fairness_enabled", b"task_queue_fairness_enabled" + ], + ) -> None: ... + +global___FairnessSpec = FairnessSpec + +@typing.final class NamespaceSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -293,7 +651,7 @@ class NamespaceSpec(google.protobuf.message.Message): NamespaceSpec._SearchAttributeType.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor SEARCH_ATTRIBUTE_TYPE_UNSPECIFIED: ( NamespaceSpec._SearchAttributeType.ValueType @@ -322,6 +680,7 @@ class NamespaceSpec(google.protobuf.message.Message): SEARCH_ATTRIBUTE_TYPE_DATETIME: NamespaceSpec.SearchAttributeType.ValueType # 6 SEARCH_ATTRIBUTE_TYPE_KEYWORD_LIST: NamespaceSpec.SearchAttributeType.ValueType # 7 + @typing.final class CustomSearchAttributesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -336,10 +695,10 @@ class NamespaceSpec(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class SearchAttributesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -354,8 +713,7 @@ class NamespaceSpec(google.protobuf.message.Message): value: global___NamespaceSpec.SearchAttributeType.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... NAME_FIELD_NUMBER: builtins.int @@ -369,11 +727,19 @@ class NamespaceSpec(google.protobuf.message.Message): LIFECYCLE_FIELD_NUMBER: builtins.int HIGH_AVAILABILITY_FIELD_NUMBER: builtins.int CONNECTIVITY_RULE_IDS_FIELD_NUMBER: builtins.int + CAPACITY_SPEC_FIELD_NUMBER: builtins.int + REPLICAS_FIELD_NUMBER: builtins.int + FAIRNESS_FIELD_NUMBER: builtins.int name: builtins.str """The name to use for the namespace. This will create a namespace that's available at '..tmprl.cloud:7233'. The name is immutable. Once set, it cannot be changed. """ + retention_days: builtins.int + """The number of days the workflows data will be retained for. + Changes to the retention period may impact your storage costs. + Any changes to the retention period will be applied to all new running workflows. + """ @property def regions( self, @@ -386,23 +752,23 @@ class NamespaceSpec(google.protobuf.message.Message): Number of supported regions is 2. The regions is immutable. Once set, it cannot be changed. Example: ["aws-us-west-2"]. + Deprecated: Use replicas field instead. + temporal:versioning:max_version=v0.15.0 """ - retention_days: builtins.int - """The number of days the workflows data will be retained for. - Changes to the retention period may impact your storage costs. - Any changes to the retention period will be applied to all new running workflows. - """ + @property def mtls_auth(self) -> global___MtlsAuthSpec: """The mTLS auth configuration for the namespace. If unspecified, mTLS will be disabled. """ + @property def api_key_auth(self) -> global___ApiKeyAuthSpec: """The API key auth configuration for the namespace. If unspecified, API keys will be disabled. temporal:versioning:min_version=v0.2.0 """ + @property def custom_search_attributes( self, @@ -415,6 +781,7 @@ class NamespaceSpec(google.protobuf.message.Message): Deprecated: Not supported after v0.3.0 api version. Use search_attributes instead. temporal:versioning:max_version=v0.3.0 """ + @property def search_attributes( self, @@ -428,21 +795,25 @@ class NamespaceSpec(google.protobuf.message.Message): temporal:versioning:min_version=v0.3.0 temporal:enums:replaces=custom_search_attributes """ + @property def codec_server(self) -> global___CodecServerSpec: """Codec server spec used by UI to decode payloads for all users interacting with this namespace. Optional, default is unset. """ + @property def lifecycle(self) -> global___LifecycleSpec: """The lifecycle configuration for the namespace. temporal:versioning:min_version=v0.4.0 """ + @property def high_availability(self) -> global___HighAvailabilitySpec: """The high availability configuration for the namespace. temporal:versioning:min_version=v0.4.0 """ + @property def connectivity_rule_ids( self, @@ -451,6 +822,39 @@ class NamespaceSpec(google.protobuf.message.Message): This will apply the connectivity rules specified to the namespace. temporal:versioning:min_version=v0.6.0 """ + + @property + def capacity_spec(self) -> global___CapacitySpec: + """The capacity configuration for the namespace. + There are two capacity modes: on-demand and provisioned. + On-demand capacity mode allows the namespace to scale automatically based on usage. + Provisioned capacity mode allows the user to specify a fixed amount of capacity (in TRUs) for the namespace. + Can be changed only when the last capacity request is not in progress. + temporal:versioning:min_version=v0.10.0 + """ + + @property + def replicas( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___ReplicaSpec + ]: + """The replication configuration for the namespace. + At least one replica must be specified. + Only one replica can be marked to be the desired active one. + The status of each replica is available in the Namespace.replicas field. + Use HighAvailabilitySpec to set the preferred primary replica ID. + If the preferred primary replica ID is not set, the first replica in this replicas list will be the preferred primary. + temporal:versioning:min_version=v0.13.0 + """ + + @property + def fairness(self) -> global___FairnessSpec: + """The fairness configuration for the namespace. + If unspecified, fairness features will be disabled. + temporal:versioning:min_version=v0.14.0 + """ + def __init__( self, *, @@ -469,14 +873,21 @@ class NamespaceSpec(google.protobuf.message.Message): lifecycle: global___LifecycleSpec | None = ..., high_availability: global___HighAvailabilitySpec | None = ..., connectivity_rule_ids: collections.abc.Iterable[builtins.str] | None = ..., + capacity_spec: global___CapacitySpec | None = ..., + replicas: collections.abc.Iterable[global___ReplicaSpec] | None = ..., + fairness: global___FairnessSpec | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "api_key_auth", b"api_key_auth", + "capacity_spec", + b"capacity_spec", "codec_server", b"codec_server", + "fairness", + b"fairness", "high_availability", b"high_availability", "lifecycle", @@ -487,15 +898,19 @@ class NamespaceSpec(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "api_key_auth", b"api_key_auth", + "capacity_spec", + b"capacity_spec", "codec_server", b"codec_server", "connectivity_rule_ids", b"connectivity_rule_ids", "custom_search_attributes", b"custom_search_attributes", + "fairness", + b"fairness", "high_availability", b"high_availability", "lifecycle", @@ -506,6 +921,8 @@ class NamespaceSpec(google.protobuf.message.Message): b"name", "regions", b"regions", + "replicas", + b"replicas", "retention_days", b"retention_days", "search_attributes", @@ -515,6 +932,7 @@ class NamespaceSpec(google.protobuf.message.Message): global___NamespaceSpec = NamespaceSpec +@typing.final class Endpoints(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -536,7 +954,7 @@ class Endpoints(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "grpc_address", b"grpc_address", "mtls_grpc_address", @@ -548,6 +966,7 @@ class Endpoints(google.protobuf.message.Message): global___Endpoints = Endpoints +@typing.final class Limits(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -563,13 +982,14 @@ class Limits(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "actions_per_second_limit", b"actions_per_second_limit" ], ) -> None: ... global___Limits = Limits +@typing.final class AWSPrivateLinkInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -580,11 +1000,13 @@ class AWSPrivateLinkInfo(google.protobuf.message.Message): self, ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """The list of principal arns that are allowed to access the namespace on the private link.""" + @property def vpc_endpoint_service_names( self, ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """The list of vpc endpoint service names that are associated with the namespace.""" + def __init__( self, *, @@ -593,7 +1015,7 @@ class AWSPrivateLinkInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "allowed_principal_arns", b"allowed_principal_arns", "vpc_endpoint_service_names", @@ -603,6 +1025,7 @@ class AWSPrivateLinkInfo(google.protobuf.message.Message): global___AWSPrivateLinkInfo = AWSPrivateLinkInfo +@typing.final class PrivateConnectivity(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -615,6 +1038,7 @@ class PrivateConnectivity(google.protobuf.message.Message): """The AWS PrivateLink info. This will only be set for an aws region. """ + def __init__( self, *, @@ -622,21 +1046,22 @@ class PrivateConnectivity(google.protobuf.message.Message): aws_private_link: global___AWSPrivateLinkInfo | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["aws_private_link", b"aws_private_link"], + self, field_name: typing.Literal["aws_private_link", b"aws_private_link"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "aws_private_link", b"aws_private_link", "region", b"region" ], ) -> None: ... global___PrivateConnectivity = PrivateConnectivity +@typing.final class Namespace(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class RegionStatusEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -652,13 +1077,13 @@ class Namespace(google.protobuf.message.Message): value: global___NamespaceRegionStatus | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class TagsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -673,8 +1098,7 @@ class Namespace(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... NAMESPACE_FIELD_NUMBER: builtins.int @@ -692,15 +1116,14 @@ class Namespace(google.protobuf.message.Message): REGION_STATUS_FIELD_NUMBER: builtins.int CONNECTIVITY_RULES_FIELD_NUMBER: builtins.int TAGS_FIELD_NUMBER: builtins.int + CAPACITY_FIELD_NUMBER: builtins.int + REPLICAS_FIELD_NUMBER: builtins.int namespace: builtins.str """The namespace identifier.""" resource_version: builtins.str """The current version of the namespace specification. The next update operation will have to include this version. """ - @property - def spec(self) -> global___NamespaceSpec: - """The namespace specification.""" state_deprecated: builtins.str """The current state of the namespace. Deprecated: Not supported after v0.3.0 api version. Use state instead. @@ -714,14 +1137,20 @@ class Namespace(google.protobuf.message.Message): """ async_operation_id: builtins.str """The id of the async operation that is creating/updating/deleting the namespace, if any.""" + active_region: builtins.str + """The currently active region for the namespace.""" + @property + def spec(self) -> global___NamespaceSpec: + """The namespace specification.""" + @property def endpoints(self) -> global___Endpoints: """The endpoints for the namespace.""" - active_region: builtins.str - """The currently active region for the namespace.""" + @property def limits(self) -> global___Limits: """The limits set on the namespace currently.""" + @property def private_connectivities( self, @@ -729,14 +1158,17 @@ class Namespace(google.protobuf.message.Message): global___PrivateConnectivity ]: """The private connectivities for the namespace, if any.""" + @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the namespace was created.""" + @property def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the namespace was last modified. Will not be set if the namespace has never been modified. """ + @property def region_status( self, @@ -745,7 +1177,10 @@ class Namespace(google.protobuf.message.Message): ]: """The status of each region where the namespace is available. The id of the region is the key and the status is the value of the map. + deprecated: Use replicas field instead. + temporal:versioning:max_version=v0.15.0 """ + @property def connectivity_rules( self, @@ -753,11 +1188,27 @@ class Namespace(google.protobuf.message.Message): temporalio.api.cloud.connectivityrule.v1.message_pb2.ConnectivityRule ]: """The connectivity rules that are set on this namespace.""" + @property def tags( self, ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: """The tags for the namespace.""" + + @property + def capacity(self) -> global___Capacity: + """The status of namespace's capacity, if any.""" + + @property + def replicas( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___Replica + ]: + """The status of each replica where the namespace is available. + temporal:versioning:min_version=v0.13.0 + """ + def __init__( self, *, @@ -783,10 +1234,14 @@ class Namespace(google.protobuf.message.Message): ] | None = ..., tags: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + capacity: global___Capacity | None = ..., + replicas: collections.abc.Iterable[global___Replica] | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "capacity", + b"capacity", "created_time", b"created_time", "endpoints", @@ -801,11 +1256,13 @@ class Namespace(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "active_region", b"active_region", "async_operation_id", b"async_operation_id", + "capacity", + b"capacity", "connectivity_rules", b"connectivity_rules", "created_time", @@ -822,6 +1279,8 @@ class Namespace(google.protobuf.message.Message): b"private_connectivities", "region_status", b"region_status", + "replicas", + b"replicas", "resource_version", b"resource_version", "spec", @@ -837,6 +1296,7 @@ class Namespace(google.protobuf.message.Message): global___Namespace = Namespace +@typing.final class NamespaceRegionStatus(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -849,7 +1309,7 @@ class NamespaceRegionStatus(google.protobuf.message.Message): NamespaceRegionStatus._State.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor STATE_UNSPECIFIED: NamespaceRegionStatus._State.ValueType # 0 STATE_ADDING: NamespaceRegionStatus._State.ValueType # 1 @@ -902,7 +1362,7 @@ class NamespaceRegionStatus(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "state", @@ -914,6 +1374,7 @@ class NamespaceRegionStatus(google.protobuf.message.Message): global___NamespaceRegionStatus = NamespaceRegionStatus +@typing.final class ExportSinkSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -928,9 +1389,13 @@ class ExportSinkSpec(google.protobuf.message.Message): @property def s3(self) -> temporalio.api.cloud.sink.v1.message_pb2.S3Spec: """The S3 configuration details when destination_type is S3.""" + @property def gcs(self) -> temporalio.api.cloud.sink.v1.message_pb2.GCSSpec: - """The GCS configuration details when destination_type is GCS.""" + """This is a feature under development. We will allow GCS sink support for GCP Namespaces. + The GCS configuration details when destination_type is GCS. + """ + def __init__( self, *, @@ -940,17 +1405,18 @@ class ExportSinkSpec(google.protobuf.message.Message): gcs: temporalio.api.cloud.sink.v1.message_pb2.GCSSpec | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["gcs", b"gcs", "s3", b"s3"] + self, field_name: typing.Literal["gcs", b"gcs", "s3", b"s3"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "enabled", b"enabled", "gcs", b"gcs", "name", b"name", "s3", b"s3" ], ) -> None: ... global___ExportSinkSpec = ExportSinkSpec +@typing.final class ExportSink(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -963,7 +1429,7 @@ class ExportSink(google.protobuf.message.Message): ExportSink._Health.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor HEALTH_UNSPECIFIED: ExportSink._Health.ValueType # 0 HEALTH_OK: ExportSink._Health.ValueType # 1 @@ -985,24 +1451,27 @@ class ExportSink(google.protobuf.message.Message): LATEST_DATA_EXPORT_TIME_FIELD_NUMBER: builtins.int LAST_HEALTH_CHECK_TIME_FIELD_NUMBER: builtins.int name: builtins.str - """The unique name of the export sink.""" + """The unique name of the export sink, once set it can't be changed""" resource_version: builtins.str """The version of the export sink resource.""" state: temporalio.api.cloud.resource.v1.message_pb2.ResourceState.ValueType """The current state of the export sink.""" - @property - def spec(self) -> global___ExportSinkSpec: - """The specification details of the export sink.""" health: global___ExportSink.Health.ValueType """The health status of the export sink.""" error_message: builtins.str """An error message describing any issues with the export sink, if applicable.""" + @property + def spec(self) -> global___ExportSinkSpec: + """The specification details of the export sink.""" + @property def latest_data_export_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The timestamp of the latest successful data export.""" + @property def last_health_check_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The timestamp of the last health check performed on the export sink.""" + def __init__( self, *, @@ -1017,7 +1486,7 @@ class ExportSink(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "last_health_check_time", b"last_health_check_time", "latest_data_export_time", @@ -1028,7 +1497,7 @@ class ExportSink(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "error_message", b"error_message", "health", @@ -1049,3 +1518,213 @@ class ExportSink(google.protobuf.message.Message): ) -> None: ... global___ExportSink = ExportSink + +@typing.final +class NamespaceCapacityInfo(google.protobuf.message.Message): + """NamespaceCapacityInfo contains detailed capacity information for a namespace.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class CapacityModeOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class Provisioned(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + VALID_TRU_VALUES_FIELD_NUMBER: builtins.int + MAX_AVAILABLE_TRU_VALUE_FIELD_NUMBER: builtins.int + max_available_tru_value: builtins.float + """The maximum TRU value that can currently be set for this namespace. + This may be lower than the highest value in valid_tru_values due to + inventory constraints. + """ + @property + def valid_tru_values( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + builtins.float + ]: + """The valid TRU (Temporal Resource Unit) values that can be set. + These are the discrete capacity tiers available for selection. + """ + + def __init__( + self, + *, + valid_tru_values: collections.abc.Iterable[builtins.float] | None = ..., + max_available_tru_value: builtins.float = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "max_available_tru_value", + b"max_available_tru_value", + "valid_tru_values", + b"valid_tru_values", + ], + ) -> None: ... + + @typing.final + class OnDemand(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + APS_LIMIT_FIELD_NUMBER: builtins.int + aps_limit: builtins.float + """The APS limit that would apply to this namespace in on-demand mode. + See: https://docs.temporal.io/cloud/limits#actions-per-second + """ + def __init__( + self, + *, + aps_limit: builtins.float = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["aps_limit", b"aps_limit"] + ) -> None: ... + + PROVISIONED_FIELD_NUMBER: builtins.int + ON_DEMAND_FIELD_NUMBER: builtins.int + @property + def provisioned( + self, + ) -> global___NamespaceCapacityInfo.CapacityModeOptions.Provisioned: + """Provisioned capacity options and entitlements.""" + + @property + def on_demand( + self, + ) -> global___NamespaceCapacityInfo.CapacityModeOptions.OnDemand: + """On-Demand capacity information.""" + + def __init__( + self, + *, + provisioned: global___NamespaceCapacityInfo.CapacityModeOptions.Provisioned + | None = ..., + on_demand: global___NamespaceCapacityInfo.CapacityModeOptions.OnDemand + | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "on_demand", b"on_demand", "provisioned", b"provisioned" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "on_demand", b"on_demand", "provisioned", b"provisioned" + ], + ) -> None: ... + + @typing.final + class Stats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class Summary(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MEAN_FIELD_NUMBER: builtins.int + P90_FIELD_NUMBER: builtins.int + P99_FIELD_NUMBER: builtins.int + mean: builtins.float + p90: builtins.float + p99: builtins.float + def __init__( + self, + *, + mean: builtins.float = ..., + p90: builtins.float = ..., + p99: builtins.float = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "mean", b"mean", "p90", b"p90", "p99", b"p99" + ], + ) -> None: ... + + APS_FIELD_NUMBER: builtins.int + @property + def aps(self) -> global___NamespaceCapacityInfo.Stats.Summary: + """Actions-per-second measurements summarized over the last 7 days.""" + + def __init__( + self, + *, + aps: global___NamespaceCapacityInfo.Stats.Summary | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["aps", b"aps"] + ) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["aps", b"aps"]) -> None: ... + + NAMESPACE_FIELD_NUMBER: builtins.int + HAS_LEGACY_LIMITS_FIELD_NUMBER: builtins.int + CURRENT_CAPACITY_FIELD_NUMBER: builtins.int + MODE_OPTIONS_FIELD_NUMBER: builtins.int + STATS_FIELD_NUMBER: builtins.int + namespace: builtins.str + """The namespace identifier.""" + has_legacy_limits: builtins.bool + """Whether the namespace's APS limit was set by Temporal Support. + When true, adjusting the namespace's capacity will reset this limit. + """ + @property + def current_capacity(self) -> global___Capacity: + """The current capacity of the namespace. + Includes the current mode (on-demand or provisioned) and latest request status. + """ + + @property + def mode_options(self) -> global___NamespaceCapacityInfo.CapacityModeOptions: + """Available capacity mode options for this namespace. + Contains configuration limits for both provisioned and on-demand modes. + """ + + @property + def stats(self) -> global___NamespaceCapacityInfo.Stats: + """Usage statistics for the namespace over the last 7 days. + Used to calculate On-Demand capacity limits, also useful for capacity planning. + """ + + def __init__( + self, + *, + namespace: builtins.str = ..., + has_legacy_limits: builtins.bool = ..., + current_capacity: global___Capacity | None = ..., + mode_options: global___NamespaceCapacityInfo.CapacityModeOptions | None = ..., + stats: global___NamespaceCapacityInfo.Stats | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "current_capacity", + b"current_capacity", + "mode_options", + b"mode_options", + "stats", + b"stats", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "current_capacity", + b"current_capacity", + "has_legacy_limits", + b"has_legacy_limits", + "mode_options", + b"mode_options", + "namespace", + b"namespace", + "stats", + b"stats", + ], + ) -> None: ... + +global___NamespaceCapacityInfo = NamespaceCapacityInfo diff --git a/temporalio/api/cloud/nexus/v1/message_pb2.py b/temporalio/api/cloud/nexus/v1/message_pb2.py index f34cac2cce..a723637d73 100644 --- a/temporalio/api/cloud/nexus/v1/message_pb2.py +++ b/temporalio/api/cloud/nexus/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -27,81 +26,8 @@ b'\n)temporal/api/cloud/nexus/v1/message.proto\x12\x1btemporal.api.cloud.nexus.v1\x1a$temporal/api/common/v1/message.proto\x1a,temporal/api/cloud/resource/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x83\x02\n\x0c\x45ndpointSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x44\n\x0btarget_spec\x18\x02 \x01(\x0b\x32/.temporal.api.cloud.nexus.v1.EndpointTargetSpec\x12\x45\n\x0cpolicy_specs\x18\x03 \x03(\x0b\x32/.temporal.api.cloud.nexus.v1.EndpointPolicySpec\x12"\n\x16\x64\x65scription_deprecated\x18\x04 \x01(\tB\x02\x18\x01\x12\x34\n\x0b\x64\x65scription\x18\x05 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload"l\n\x12\x45ndpointTargetSpec\x12K\n\x12worker_target_spec\x18\x01 \x01(\x0b\x32-.temporal.api.cloud.nexus.v1.WorkerTargetSpecH\x00\x42\t\n\x07variant"<\n\x10WorkerTargetSpec\x12\x14\n\x0cnamespace_id\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t"\x8c\x01\n\x12\x45ndpointPolicySpec\x12k\n#allowed_cloud_namespace_policy_spec\x18\x01 \x01(\x0b\x32<.temporal.api.cloud.nexus.v1.AllowedCloudNamespacePolicySpecH\x00\x42\t\n\x07variant"7\n\x1f\x41llowedCloudNamespacePolicySpec\x12\x14\n\x0cnamespace_id\x18\x01 \x01(\t"\xad\x02\n\x08\x45ndpoint\x12\n\n\x02id\x18\x01 \x01(\t\x12\x18\n\x10resource_version\x18\x02 \x01(\t\x12\x37\n\x04spec\x18\x03 \x01(\x0b\x32).temporal.api.cloud.nexus.v1.EndpointSpec\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.temporal.api.cloud.resource.v1.ResourceState\x12\x1a\n\x12\x61sync_operation_id\x18\x05 \x01(\t\x12\x30\n\x0c\x63reated_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x9d\x01\n\x1eio.temporal.api.cloud.nexus.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/cloud/nexus/v1;nexus\xaa\x02\x1dTemporalio.Api.Cloud.Nexus.V1\xea\x02!Temporalio::Api::Cloud::Nexus::V1b\x06proto3' ) - -_ENDPOINTSPEC = DESCRIPTOR.message_types_by_name["EndpointSpec"] -_ENDPOINTTARGETSPEC = DESCRIPTOR.message_types_by_name["EndpointTargetSpec"] -_WORKERTARGETSPEC = DESCRIPTOR.message_types_by_name["WorkerTargetSpec"] -_ENDPOINTPOLICYSPEC = DESCRIPTOR.message_types_by_name["EndpointPolicySpec"] -_ALLOWEDCLOUDNAMESPACEPOLICYSPEC = DESCRIPTOR.message_types_by_name[ - "AllowedCloudNamespacePolicySpec" -] -_ENDPOINT = DESCRIPTOR.message_types_by_name["Endpoint"] -EndpointSpec = _reflection.GeneratedProtocolMessageType( - "EndpointSpec", - (_message.Message,), - { - "DESCRIPTOR": _ENDPOINTSPEC, - "__module__": "temporalio.api.cloud.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.nexus.v1.EndpointSpec) - }, -) -_sym_db.RegisterMessage(EndpointSpec) - -EndpointTargetSpec = _reflection.GeneratedProtocolMessageType( - "EndpointTargetSpec", - (_message.Message,), - { - "DESCRIPTOR": _ENDPOINTTARGETSPEC, - "__module__": "temporalio.api.cloud.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.nexus.v1.EndpointTargetSpec) - }, -) -_sym_db.RegisterMessage(EndpointTargetSpec) - -WorkerTargetSpec = _reflection.GeneratedProtocolMessageType( - "WorkerTargetSpec", - (_message.Message,), - { - "DESCRIPTOR": _WORKERTARGETSPEC, - "__module__": "temporalio.api.cloud.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.nexus.v1.WorkerTargetSpec) - }, -) -_sym_db.RegisterMessage(WorkerTargetSpec) - -EndpointPolicySpec = _reflection.GeneratedProtocolMessageType( - "EndpointPolicySpec", - (_message.Message,), - { - "DESCRIPTOR": _ENDPOINTPOLICYSPEC, - "__module__": "temporalio.api.cloud.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.nexus.v1.EndpointPolicySpec) - }, -) -_sym_db.RegisterMessage(EndpointPolicySpec) - -AllowedCloudNamespacePolicySpec = _reflection.GeneratedProtocolMessageType( - "AllowedCloudNamespacePolicySpec", - (_message.Message,), - { - "DESCRIPTOR": _ALLOWEDCLOUDNAMESPACEPOLICYSPEC, - "__module__": "temporalio.api.cloud.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.nexus.v1.AllowedCloudNamespacePolicySpec) - }, -) -_sym_db.RegisterMessage(AllowedCloudNamespacePolicySpec) - -Endpoint = _reflection.GeneratedProtocolMessageType( - "Endpoint", - (_message.Message,), - { - "DESCRIPTOR": _ENDPOINT, - "__module__": "temporalio.api.cloud.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.nexus.v1.Endpoint) - }, -) -_sym_db.RegisterMessage(Endpoint) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\036io.temporal.api.cloud.nexus.v1B\014MessageProtoP\001Z'go.temporal.io/api/cloud/nexus/v1;nexus\252\002\035Temporalio.Api.Cloud.Nexus.V1\352\002!Temporalio::Api::Cloud::Nexus::V1" diff --git a/temporalio/api/cloud/nexus/v1/message_pb2.pyi b/temporalio/api/cloud/nexus/v1/message_pb2.pyi index 5ec14c3ac1..080013f25c 100644 --- a/temporalio/api/cloud/nexus/v1/message_pb2.pyi +++ b/temporalio/api/cloud/nexus/v1/message_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers @@ -15,13 +15,9 @@ import google.protobuf.timestamp_pb2 import temporalio.api.cloud.resource.v1.message_pb2 import temporalio.api.common.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class EndpointSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -35,9 +31,14 @@ class EndpointSpec(google.protobuf.message.Message): The name must match `^[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9]$`. This field is mutable. """ + description_deprecated: builtins.str + """Deprecated: Not supported after v0.4.0 api version. Use description instead. + temporal:versioning:max_version=v0.4.0 + """ @property def target_spec(self) -> global___EndpointTargetSpec: """Indicates where the endpoint should forward received nexus requests to.""" + @property def policy_specs( self, @@ -48,15 +49,13 @@ class EndpointSpec(google.protobuf.message.Message): must match with at least one of the specs to be accepted by the endpoint. This field is mutable. """ - description_deprecated: builtins.str - """Deprecated: Not supported after v0.4.0 api version. Use description instead. - temporal:versioning:max_version=v0.4.0 - """ + @property def description(self) -> temporalio.api.common.v1.message_pb2.Payload: """The markdown description of the endpoint - optional. temporal:versioning:min_version=v0.4.0 """ + def __init__( self, *, @@ -69,13 +68,13 @@ class EndpointSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "description", b"description", "target_spec", b"target_spec" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "description", b"description", "description_deprecated", @@ -91,6 +90,7 @@ class EndpointSpec(google.protobuf.message.Message): global___EndpointSpec = EndpointSpec +@typing.final class EndpointTargetSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -98,6 +98,7 @@ class EndpointTargetSpec(google.protobuf.message.Message): @property def worker_target_spec(self) -> global___WorkerTargetSpec: """A target spec for routing nexus requests to a specific cloud namespace worker.""" + def __init__( self, *, @@ -105,22 +106,23 @@ class EndpointTargetSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "variant", b"variant", "worker_target_spec", b"worker_target_spec" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "variant", b"variant", "worker_target_spec", b"worker_target_spec" ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["worker_target_spec"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["worker_target_spec"] | None: ... global___EndpointTargetSpec = EndpointTargetSpec +@typing.final class WorkerTargetSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -138,13 +140,14 @@ class WorkerTargetSpec(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace_id", b"namespace_id", "task_queue", b"task_queue" ], ) -> None: ... global___WorkerTargetSpec = WorkerTargetSpec +@typing.final class EndpointPolicySpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -154,6 +157,7 @@ class EndpointPolicySpec(google.protobuf.message.Message): self, ) -> global___AllowedCloudNamespacePolicySpec: """A policy spec that allows one caller namespace to access the endpoint.""" + def __init__( self, *, @@ -162,7 +166,7 @@ class EndpointPolicySpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "allowed_cloud_namespace_policy_spec", b"allowed_cloud_namespace_policy_spec", "variant", @@ -171,7 +175,7 @@ class EndpointPolicySpec(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "allowed_cloud_namespace_policy_spec", b"allowed_cloud_namespace_policy_spec", "variant", @@ -179,11 +183,12 @@ class EndpointPolicySpec(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["allowed_cloud_namespace_policy_spec"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["allowed_cloud_namespace_policy_spec"] | None: ... global___EndpointPolicySpec = EndpointPolicySpec +@typing.final class AllowedCloudNamespacePolicySpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -196,11 +201,12 @@ class AllowedCloudNamespacePolicySpec(google.protobuf.message.Message): namespace_id: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["namespace_id", b"namespace_id"] + self, field_name: typing.Literal["namespace_id", b"namespace_id"] ) -> None: ... global___AllowedCloudNamespacePolicySpec = AllowedCloudNamespacePolicySpec +@typing.final class Endpoint(google.protobuf.message.Message): """An endpoint that receives and then routes Nexus requests""" @@ -219,21 +225,24 @@ class Endpoint(google.protobuf.message.Message): """The current version of the endpoint specification. The next update operation must include this version. """ - @property - def spec(self) -> global___EndpointSpec: - """The endpoint specification.""" state: temporalio.api.cloud.resource.v1.message_pb2.ResourceState.ValueType """The current state of the endpoint. For any failed state, reach out to Temporal Cloud support for remediation. """ async_operation_id: builtins.str """The id of any ongoing async operation that is creating, updating, or deleting the endpoint, if any.""" + @property + def spec(self) -> global___EndpointSpec: + """The endpoint specification.""" + @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the endpoint was created.""" + @property def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the endpoint was last modified.""" + def __init__( self, *, @@ -247,7 +256,7 @@ class Endpoint(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "last_modified_time", @@ -258,7 +267,7 @@ class Endpoint(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_operation_id", b"async_operation_id", "created_time", diff --git a/temporalio/api/cloud/operation/v1/message_pb2.py b/temporalio/api/cloud/operation/v1/message_pb2.py index 8d4664ed56..79d6d8efd0 100644 --- a/temporalio/api/cloud/operation/v1/message_pb2.py +++ b/temporalio/api/cloud/operation/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -22,20 +21,8 @@ b'\n-temporal/api/cloud/operation/v1/message.proto\x12\x1ftemporal.api.cloud.operation.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19google/protobuf/any.proto"\x92\x04\n\x0e\x41syncOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x10state_deprecated\x18\x02 \x01(\tB\x02\x18\x01\x12\x44\n\x05state\x18\t \x01(\x0e\x32\x35.temporal.api.cloud.operation.v1.AsyncOperation.State\x12\x31\n\x0e\x63heck_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x16\n\x0eoperation_type\x18\x04 \x01(\t\x12-\n\x0foperation_input\x18\x05 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x16\n\x0e\x66\x61ilure_reason\x18\x06 \x01(\t\x12\x30\n\x0cstarted_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rfinished_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x98\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n\rSTATE_PENDING\x10\x01\x12\x15\n\x11STATE_IN_PROGRESS\x10\x02\x12\x10\n\x0cSTATE_FAILED\x10\x03\x12\x13\n\x0fSTATE_CANCELLED\x10\x04\x12\x13\n\x0fSTATE_FULFILLED\x10\x05\x12\x12\n\x0eSTATE_REJECTED\x10\x06\x42\xb1\x01\n"io.temporal.api.cloud.operation.v1B\x0cMessageProtoP\x01Z/go.temporal.io/api/cloud/operation/v1;operation\xaa\x02!Temporalio.Api.Cloud.Operation.V1\xea\x02%Temporalio::Api::Cloud::Operation::V1b\x06proto3' ) - -_ASYNCOPERATION = DESCRIPTOR.message_types_by_name["AsyncOperation"] -_ASYNCOPERATION_STATE = _ASYNCOPERATION.enum_types_by_name["State"] -AsyncOperation = _reflection.GeneratedProtocolMessageType( - "AsyncOperation", - (_message.Message,), - { - "DESCRIPTOR": _ASYNCOPERATION, - "__module__": "temporalio.api.cloud.operation.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.operation.v1.AsyncOperation) - }, -) -_sym_db.RegisterMessage(AsyncOperation) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n"io.temporal.api.cloud.operation.v1B\014MessageProtoP\001Z/go.temporal.io/api/cloud/operation/v1;operation\252\002!Temporalio.Api.Cloud.Operation.V1\352\002%Temporalio::Api::Cloud::Operation::V1' diff --git a/temporalio/api/cloud/operation/v1/message_pb2.pyi b/temporalio/api/cloud/operation/v1/message_pb2.pyi index 4e9346d962..3f9917ce7c 100644 --- a/temporalio/api/cloud/operation/v1/message_pb2.pyi +++ b/temporalio/api/cloud/operation/v1/message_pb2.pyi @@ -21,6 +21,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class AsyncOperation(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -33,7 +34,7 @@ class AsyncOperation(google.protobuf.message.Message): AsyncOperation._State.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor STATE_UNSPECIFIED: AsyncOperation._State.ValueType # 0 STATE_PENDING: AsyncOperation._State.ValueType # 1 @@ -86,25 +87,29 @@ class AsyncOperation(google.protobuf.message.Message): temporal:versioning:min_version=v0.3.0 temporal:enums:replaces=state_deprecated """ + operation_type: builtins.str + """The type of operation being performed.""" + failure_reason: builtins.str + """If the operation failed, the reason for the failure.""" @property def check_duration(self) -> google.protobuf.duration_pb2.Duration: """The recommended duration to check back for an update in the operation's state.""" - operation_type: builtins.str - """The type of operation being performed.""" + @property def operation_input(self) -> google.protobuf.any_pb2.Any: """The input to the operation being performed. (-- api-linter: core::0146::any=disabled --) """ - failure_reason: builtins.str - """If the operation failed, the reason for the failure.""" + @property def started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the operation initiated.""" + @property def finished_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the operation completed.""" + def __init__( self, *, @@ -120,7 +125,7 @@ class AsyncOperation(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "check_duration", b"check_duration", "finished_time", @@ -133,7 +138,7 @@ class AsyncOperation(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "check_duration", b"check_duration", "failure_reason", diff --git a/temporalio/api/cloud/region/v1/message_pb2.py b/temporalio/api/cloud/region/v1/message_pb2.py index 17a5461a8b..56fc78f4d0 100644 --- a/temporalio/api/cloud/region/v1/message_pb2.py +++ b/temporalio/api/cloud/region/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -18,20 +17,8 @@ b'\n*temporal/api/cloud/region/v1/message.proto\x12\x1ctemporal.api.cloud.region.v1"\x99\x02\n\x06Region\x12\n\n\x02id\x18\x01 \x01(\t\x12%\n\x19\x63loud_provider_deprecated\x18\x02 \x01(\tB\x02\x18\x01\x12J\n\x0e\x63loud_provider\x18\x05 \x01(\x0e\x32\x32.temporal.api.cloud.region.v1.Region.CloudProvider\x12\x1d\n\x15\x63loud_provider_region\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t"_\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43LOUD_PROVIDER_AWS\x10\x01\x12\x16\n\x12\x43LOUD_PROVIDER_GCP\x10\x02\x42\xa2\x01\n\x1fio.temporal.api.cloud.region.v1B\x0cMessageProtoP\x01Z)go.temporal.io/api/cloud/region/v1;region\xaa\x02\x1eTemporalio.Api.Cloud.Region.V1\xea\x02"Temporalio::Api::Cloud::Region::V1b\x06proto3' ) - -_REGION = DESCRIPTOR.message_types_by_name["Region"] -_REGION_CLOUDPROVIDER = _REGION.enum_types_by_name["CloudProvider"] -Region = _reflection.GeneratedProtocolMessageType( - "Region", - (_message.Message,), - { - "DESCRIPTOR": _REGION, - "__module__": "temporalio.api.cloud.region.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.region.v1.Region) - }, -) -_sym_db.RegisterMessage(Region) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\037io.temporal.api.cloud.region.v1B\014MessageProtoP\001Z)go.temporal.io/api/cloud/region/v1;region\252\002\036Temporalio.Api.Cloud.Region.V1\352\002"Temporalio::Api::Cloud::Region::V1' diff --git a/temporalio/api/cloud/region/v1/message_pb2.pyi b/temporalio/api/cloud/region/v1/message_pb2.pyi index 69718ad181..1c4e1cba56 100644 --- a/temporalio/api/cloud/region/v1/message_pb2.pyi +++ b/temporalio/api/cloud/region/v1/message_pb2.pyi @@ -18,6 +18,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class Region(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -30,7 +31,7 @@ class Region(google.protobuf.message.Message): Region._CloudProvider.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor CLOUD_PROVIDER_UNSPECIFIED: Region._CloudProvider.ValueType # 0 CLOUD_PROVIDER_AWS: Region._CloudProvider.ValueType # 1 @@ -76,7 +77,7 @@ class Region(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cloud_provider", b"cloud_provider", "cloud_provider_deprecated", diff --git a/temporalio/api/cloud/resource/v1/message_pb2.py b/temporalio/api/cloud/resource/v1/message_pb2.py index 88e7a7daaf..33f18ef730 100644 --- a/temporalio/api/cloud/resource/v1/message_pb2.py +++ b/temporalio/api/cloud/resource/v1/message_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -19,21 +17,8 @@ b"\n,temporal/api/cloud/resource/v1/message.proto\x12\x1etemporal.api.cloud.resource.v1*\xe3\x02\n\rResourceState\x12\x1e\n\x1aRESOURCE_STATE_UNSPECIFIED\x10\x00\x12\x1d\n\x19RESOURCE_STATE_ACTIVATING\x10\x01\x12$\n RESOURCE_STATE_ACTIVATION_FAILED\x10\x02\x12\x19\n\x15RESOURCE_STATE_ACTIVE\x10\x03\x12\x1b\n\x17RESOURCE_STATE_UPDATING\x10\x04\x12 \n\x1cRESOURCE_STATE_UPDATE_FAILED\x10\x05\x12\x1b\n\x17RESOURCE_STATE_DELETING\x10\x06\x12 \n\x1cRESOURCE_STATE_DELETE_FAILED\x10\x07\x12\x1a\n\x16RESOURCE_STATE_DELETED\x10\x08\x12\x1c\n\x18RESOURCE_STATE_SUSPENDED\x10\t\x12\x1a\n\x16RESOURCE_STATE_EXPIRED\x10\nB\xac\x01\n!io.temporal.api.cloud.resource.v1B\x0cMessageProtoP\x01Z-go.temporal.io/api/cloud/resource/v1;resource\xaa\x02 Temporalio.Api.Cloud.Resource.V1\xea\x02$Temporalio::Api::Cloud::Resource::V1b\x06proto3" ) -_RESOURCESTATE = DESCRIPTOR.enum_types_by_name["ResourceState"] -ResourceState = enum_type_wrapper.EnumTypeWrapper(_RESOURCESTATE) -RESOURCE_STATE_UNSPECIFIED = 0 -RESOURCE_STATE_ACTIVATING = 1 -RESOURCE_STATE_ACTIVATION_FAILED = 2 -RESOURCE_STATE_ACTIVE = 3 -RESOURCE_STATE_UPDATING = 4 -RESOURCE_STATE_UPDATE_FAILED = 5 -RESOURCE_STATE_DELETING = 6 -RESOURCE_STATE_DELETE_FAILED = 7 -RESOURCE_STATE_DELETED = 8 -RESOURCE_STATE_SUSPENDED = 9 -RESOURCE_STATE_EXPIRED = 10 - - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n!io.temporal.api.cloud.resource.v1B\014MessageProtoP\001Z-go.temporal.io/api/cloud/resource/v1;resource\252\002 Temporalio.Api.Cloud.Resource.V1\352\002$Temporalio::Api::Cloud::Resource::V1" diff --git a/temporalio/api/cloud/resource/v1/message_pb2.pyi b/temporalio/api/cloud/resource/v1/message_pb2.pyi index 28f76e2022..2a880b4272 100644 --- a/temporalio/api/cloud/resource/v1/message_pb2.pyi +++ b/temporalio/api/cloud/resource/v1/message_pb2.pyi @@ -26,7 +26,7 @@ class _ResourceStateEnumTypeWrapper( _ResourceState.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor RESOURCE_STATE_UNSPECIFIED: _ResourceState.ValueType # 0 RESOURCE_STATE_ACTIVATING: _ResourceState.ValueType # 1 diff --git a/temporalio/api/cloud/sink/v1/message_pb2.py b/temporalio/api/cloud/sink/v1/message_pb2.py index ef22569f12..d5177bcc44 100644 --- a/temporalio/api/cloud/sink/v1/message_pb2.py +++ b/temporalio/api/cloud/sink/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -18,55 +17,8 @@ b'\n(temporal/api/cloud/sink/v1/message.proto\x12\x1atemporal.api.cloud.sink.v1"i\n\x06S3Spec\x12\x11\n\trole_name\x18\x01 \x01(\t\x12\x13\n\x0b\x62ucket_name\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x0f\n\x07kms_arn\x18\x04 \x01(\t\x12\x16\n\x0e\x61ws_account_id\x18\x05 \x01(\t"U\n\x07GCSSpec\x12\r\n\x05sa_id\x18\x01 \x01(\t\x12\x13\n\x0b\x62ucket_name\x18\x02 \x01(\t\x12\x16\n\x0egcp_project_id\x18\x03 \x01(\t\x12\x0e\n\x06region\x18\x04 \x01(\t"I\n\x0bKinesisSpec\x12\x11\n\trole_name\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65stination_uri\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t"T\n\nPubSubSpec\x12\x1a\n\x12service_account_id\x18\x01 \x01(\t\x12\x12\n\ntopic_name\x18\x02 \x01(\t\x12\x16\n\x0egcp_project_id\x18\x03 \x01(\tB\x98\x01\n\x1dio.temporal.api.cloud.sink.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/cloud/sink/v1;sink\xaa\x02\x1cTemporalio.Api.Cloud.Sink.V1\xea\x02 Temporalio::Api::Cloud::Sink::V1b\x06proto3' ) - -_S3SPEC = DESCRIPTOR.message_types_by_name["S3Spec"] -_GCSSPEC = DESCRIPTOR.message_types_by_name["GCSSpec"] -_KINESISSPEC = DESCRIPTOR.message_types_by_name["KinesisSpec"] -_PUBSUBSPEC = DESCRIPTOR.message_types_by_name["PubSubSpec"] -S3Spec = _reflection.GeneratedProtocolMessageType( - "S3Spec", - (_message.Message,), - { - "DESCRIPTOR": _S3SPEC, - "__module__": "temporalio.api.cloud.sink.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.sink.v1.S3Spec) - }, -) -_sym_db.RegisterMessage(S3Spec) - -GCSSpec = _reflection.GeneratedProtocolMessageType( - "GCSSpec", - (_message.Message,), - { - "DESCRIPTOR": _GCSSPEC, - "__module__": "temporalio.api.cloud.sink.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.sink.v1.GCSSpec) - }, -) -_sym_db.RegisterMessage(GCSSpec) - -KinesisSpec = _reflection.GeneratedProtocolMessageType( - "KinesisSpec", - (_message.Message,), - { - "DESCRIPTOR": _KINESISSPEC, - "__module__": "temporalio.api.cloud.sink.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.sink.v1.KinesisSpec) - }, -) -_sym_db.RegisterMessage(KinesisSpec) - -PubSubSpec = _reflection.GeneratedProtocolMessageType( - "PubSubSpec", - (_message.Message,), - { - "DESCRIPTOR": _PUBSUBSPEC, - "__module__": "temporalio.api.cloud.sink.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.sink.v1.PubSubSpec) - }, -) -_sym_db.RegisterMessage(PubSubSpec) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\035io.temporal.api.cloud.sink.v1B\014MessageProtoP\001Z%go.temporal.io/api/cloud/sink/v1;sink\252\002\034Temporalio.Api.Cloud.Sink.V1\352\002 Temporalio::Api::Cloud::Sink::V1" diff --git a/temporalio/api/cloud/sink/v1/message_pb2.pyi b/temporalio/api/cloud/sink/v1/message_pb2.pyi index 30e6ff0996..1545a9e29a 100644 --- a/temporalio/api/cloud/sink/v1/message_pb2.pyi +++ b/temporalio/api/cloud/sink/v1/message_pb2.pyi @@ -4,18 +4,14 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.message -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class S3Spec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -45,7 +41,7 @@ class S3Spec(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "aws_account_id", b"aws_account_id", "bucket_name", @@ -61,6 +57,7 @@ class S3Spec(google.protobuf.message.Message): global___S3Spec = S3Spec +@typing.final class GCSSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -86,7 +83,7 @@ class GCSSpec(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "bucket_name", b"bucket_name", "gcp_project_id", @@ -100,6 +97,7 @@ class GCSSpec(google.protobuf.message.Message): global___GCSSpec = GCSSpec +@typing.final class KinesisSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -121,7 +119,7 @@ class KinesisSpec(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "destination_uri", b"destination_uri", "region", @@ -133,6 +131,7 @@ class KinesisSpec(google.protobuf.message.Message): global___KinesisSpec = KinesisSpec +@typing.final class PubSubSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -154,7 +153,7 @@ class PubSubSpec(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "gcp_project_id", b"gcp_project_id", "service_account_id", diff --git a/temporalio/api/cloud/usage/v1/message_pb2.py b/temporalio/api/cloud/usage/v1/message_pb2.py index 84b635bba7..b312a611c8 100644 --- a/temporalio/api/cloud/usage/v1/message_pb2.py +++ b/temporalio/api/cloud/usage/v1/message_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -21,71 +19,8 @@ b"\n)temporal/api/cloud/usage/v1/message.proto\x12\x1btemporal.api.cloud.usage.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbc\x01\n\x07Summary\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\rrecord_groups\x18\x03 \x03(\x0b\x32(.temporal.api.cloud.usage.v1.RecordGroup\x12\x12\n\nincomplete\x18\x04 \x01(\x08\"|\n\x0bRecordGroup\x12\x37\n\tgroup_bys\x18\x01 \x03(\x0b\x32$.temporal.api.cloud.usage.v1.GroupBy\x12\x34\n\x07records\x18\x02 \x03(\x0b\x32#.temporal.api.cloud.usage.v1.Record\"N\n\x07GroupBy\x12\x34\n\x03key\x18\x01 \x01(\x0e\x32'.temporal.api.cloud.usage.v1.GroupByKey\x12\r\n\x05value\x18\x02 \x01(\t\"\x85\x01\n\x06Record\x12\x35\n\x04type\x18\x01 \x01(\x0e\x32'.temporal.api.cloud.usage.v1.RecordType\x12\x35\n\x04unit\x18\x02 \x01(\x0e\x32'.temporal.api.cloud.usage.v1.RecordUnit\x12\r\n\x05value\x18\x03 \x01(\x01*\x84\x01\n\nRecordType\x12\x1b\n\x17RECORD_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13RECORD_TYPE_ACTIONS\x10\x01\x12\x1e\n\x1aRECORD_TYPE_ACTIVE_STORAGE\x10\x02\x12 \n\x1cRECORD_TYPE_RETAINED_STORAGE\x10\x03*_\n\nRecordUnit\x12\x1b\n\x17RECORD_UNIT_UNSPECIFIED\x10\x00\x12\x16\n\x12RECORD_UNIT_NUMBER\x10\x01\x12\x1c\n\x18RECORD_UNIT_BYTE_SECONDS\x10\x02*F\n\nGroupByKey\x12\x1c\n\x18GROUP_BY_KEY_UNSPECIFIED\x10\x00\x12\x1a\n\x16GROUP_BY_KEY_NAMESPACE\x10\x01\x42\x9d\x01\n\x1eio.temporal.api.cloud.usage.v1B\x0cMessageProtoP\x01Z'go.temporal.io/api/cloud/usage/v1;usage\xaa\x02\x1dTemporalio.Api.Cloud.Usage.V1\xea\x02!Temporalio::Api::Cloud::Usage::V1b\x06proto3" ) -_RECORDTYPE = DESCRIPTOR.enum_types_by_name["RecordType"] -RecordType = enum_type_wrapper.EnumTypeWrapper(_RECORDTYPE) -_RECORDUNIT = DESCRIPTOR.enum_types_by_name["RecordUnit"] -RecordUnit = enum_type_wrapper.EnumTypeWrapper(_RECORDUNIT) -_GROUPBYKEY = DESCRIPTOR.enum_types_by_name["GroupByKey"] -GroupByKey = enum_type_wrapper.EnumTypeWrapper(_GROUPBYKEY) -RECORD_TYPE_UNSPECIFIED = 0 -RECORD_TYPE_ACTIONS = 1 -RECORD_TYPE_ACTIVE_STORAGE = 2 -RECORD_TYPE_RETAINED_STORAGE = 3 -RECORD_UNIT_UNSPECIFIED = 0 -RECORD_UNIT_NUMBER = 1 -RECORD_UNIT_BYTE_SECONDS = 2 -GROUP_BY_KEY_UNSPECIFIED = 0 -GROUP_BY_KEY_NAMESPACE = 1 - - -_SUMMARY = DESCRIPTOR.message_types_by_name["Summary"] -_RECORDGROUP = DESCRIPTOR.message_types_by_name["RecordGroup"] -_GROUPBY = DESCRIPTOR.message_types_by_name["GroupBy"] -_RECORD = DESCRIPTOR.message_types_by_name["Record"] -Summary = _reflection.GeneratedProtocolMessageType( - "Summary", - (_message.Message,), - { - "DESCRIPTOR": _SUMMARY, - "__module__": "temporalio.api.cloud.usage.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.usage.v1.Summary) - }, -) -_sym_db.RegisterMessage(Summary) - -RecordGroup = _reflection.GeneratedProtocolMessageType( - "RecordGroup", - (_message.Message,), - { - "DESCRIPTOR": _RECORDGROUP, - "__module__": "temporalio.api.cloud.usage.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.usage.v1.RecordGroup) - }, -) -_sym_db.RegisterMessage(RecordGroup) - -GroupBy = _reflection.GeneratedProtocolMessageType( - "GroupBy", - (_message.Message,), - { - "DESCRIPTOR": _GROUPBY, - "__module__": "temporalio.api.cloud.usage.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.usage.v1.GroupBy) - }, -) -_sym_db.RegisterMessage(GroupBy) - -Record = _reflection.GeneratedProtocolMessageType( - "Record", - (_message.Message,), - { - "DESCRIPTOR": _RECORD, - "__module__": "temporalio.api.cloud.usage.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.cloud.usage.v1.Record) - }, -) -_sym_db.RegisterMessage(Record) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\036io.temporal.api.cloud.usage.v1B\014MessageProtoP\001Z'go.temporal.io/api/cloud/usage/v1;usage\252\002\035Temporalio.Api.Cloud.Usage.V1\352\002!Temporalio::Api::Cloud::Usage::V1" diff --git a/temporalio/api/cloud/usage/v1/message_pb2.pyi b/temporalio/api/cloud/usage/v1/message_pb2.pyi index 8ffdc1189e..e5db0c90d7 100644 --- a/temporalio/api/cloud/usage/v1/message_pb2.pyi +++ b/temporalio/api/cloud/usage/v1/message_pb2.pyi @@ -28,7 +28,7 @@ class _RecordType: class _RecordTypeEnumTypeWrapper( google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_RecordType.ValueType], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor RECORD_TYPE_UNSPECIFIED: _RecordType.ValueType # 0 RECORD_TYPE_ACTIONS: _RecordType.ValueType # 1 @@ -50,7 +50,7 @@ class _RecordUnit: class _RecordUnitEnumTypeWrapper( google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_RecordUnit.ValueType], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor RECORD_UNIT_UNSPECIFIED: _RecordUnit.ValueType # 0 RECORD_UNIT_NUMBER: _RecordUnit.ValueType # 1 @@ -70,7 +70,7 @@ class _GroupByKey: class _GroupByKeyEnumTypeWrapper( google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_GroupByKey.ValueType], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor GROUP_BY_KEY_UNSPECIFIED: _GroupByKey.ValueType # 0 GROUP_BY_KEY_NAMESPACE: _GroupByKey.ValueType # 1 @@ -81,6 +81,7 @@ GROUP_BY_KEY_UNSPECIFIED: GroupByKey.ValueType # 0 GROUP_BY_KEY_NAMESPACE: GroupByKey.ValueType # 1 global___GroupByKey = GroupByKey +@typing.final class Summary(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -88,12 +89,18 @@ class Summary(google.protobuf.message.Message): END_TIME_FIELD_NUMBER: builtins.int RECORD_GROUPS_FIELD_NUMBER: builtins.int INCOMPLETE_FIELD_NUMBER: builtins.int + incomplete: builtins.bool + """True if data for given time window is not fully available yet (e.g. delays) + When true, records for the given time range could still be added/updated in the future (until false) + """ @property def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Start of UTC day for now (inclusive)""" + @property def end_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """End of UTC day for now (exclusive)""" + @property def record_groups( self, @@ -101,10 +108,7 @@ class Summary(google.protobuf.message.Message): global___RecordGroup ]: """Records grouped by namespace""" - incomplete: builtins.bool - """True if data for given time window is not fully available yet (e.g. delays) - When true, records for the given time range could still be added/updated in the future (until false) - """ + def __init__( self, *, @@ -115,13 +119,13 @@ class Summary(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "end_time", b"end_time", "start_time", b"start_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "end_time", b"end_time", "incomplete", @@ -135,6 +139,7 @@ class Summary(google.protobuf.message.Message): global___Summary = Summary +@typing.final class RecordGroup(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -147,6 +152,7 @@ class RecordGroup(google.protobuf.message.Message): global___GroupBy ]: """GroupBy keys and their values for this record group. Multiple fields are combined with logical AND.""" + @property def records( self, @@ -161,13 +167,12 @@ class RecordGroup(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "group_bys", b"group_bys", "records", b"records" - ], + field_name: typing.Literal["group_bys", b"group_bys", "records", b"records"], ) -> None: ... global___RecordGroup = RecordGroup +@typing.final class GroupBy(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -182,11 +187,12 @@ class GroupBy(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"] + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... global___GroupBy = GroupBy +@typing.final class Record(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -205,9 +211,7 @@ class Record(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "type", b"type", "unit", b"unit", "value", b"value" - ], + field_name: typing.Literal["type", b"type", "unit", b"unit", "value", b"value"], ) -> None: ... global___Record = Record diff --git a/temporalio/api/command/v1/message_pb2.py b/temporalio/api/command/v1/message_pb2.py index f01c3810d4..c89afb346e 100644 --- a/temporalio/api/command/v1/message_pb2.py +++ b/temporalio/api/command/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -28,313 +27,46 @@ from temporalio.api.failure.v1 import ( message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, ) +from temporalio.api.sdk.v1 import ( + event_group_marker_pb2 as temporal_dot_api_dot_sdk_dot_v1_dot_event__group__marker__pb2, +) from temporalio.api.sdk.v1 import ( user_metadata_pb2 as temporal_dot_api_dot_sdk_dot_v1_dot_user__metadata__pb2, ) from temporalio.api.taskqueue.v1 import ( message_pb2 as temporal_dot_api_dot_taskqueue_dot_v1_dot_message__pb2, ) - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n%temporal/api/command/v1/message.proto\x12\x17temporal.api.command.v1\x1a\x1egoogle/protobuf/duration.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a(temporal/api/enums/v1/command_type.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto"\xb6\x05\n%ScheduleActivityTaskCommandAttributes\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12;\n\ractivity_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12.\n\x06header\x18\x05 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12/\n\x05input\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12<\n\x19schedule_to_close_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x0b \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x1f\n\x17request_eager_execution\x18\x0c \x01(\x08\x12\x1d\n\x15use_workflow_build_id\x18\r \x01(\x08\x12\x32\n\x08priority\x18\x0e \x01(\x0b\x32 .temporal.api.common.v1.PriorityJ\x04\x08\x03\x10\x04"H\n*RequestCancelActivityTaskCommandAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03"i\n\x1bStartTimerCommandAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x38\n\x15start_to_fire_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration"^\n*CompleteWorkflowExecutionCommandAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"[\n&FailWorkflowExecutionCommandAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"0\n\x1c\x43\x61ncelTimerCommandAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t"]\n(CancelWorkflowExecutionCommandAttributes\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"\xb3\x01\n7RequestCancelExternalWorkflowExecutionCommandAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x07\x63ontrol\x18\x04 \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x63hild_workflow_only\x18\x05 \x01(\x08\x12\x0e\n\x06reason\x18\x06 \x01(\t"\xab\x02\n0SignalExternalWorkflowExecutionCommandAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0bsignal_name\x18\x03 \x01(\t\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x13\n\x07\x63ontrol\x18\x05 \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x63hild_workflow_only\x18\x06 \x01(\x08\x12.\n\x06header\x18\x07 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header"v\n/UpsertWorkflowSearchAttributesCommandAttributes\x12\x43\n\x11search_attributes\x18\x01 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes"`\n)ModifyWorkflowPropertiesCommandAttributes\x12\x33\n\rupserted_memo\x18\x01 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo"\xbf\x02\n\x1dRecordMarkerCommandAttributes\x12\x13\n\x0bmarker_name\x18\x01 \x01(\t\x12T\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32\x43.temporal.api.command.v1.RecordMarkerCommandAttributes.DetailsEntry\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x1aP\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads:\x02\x38\x01"\xcf\x06\n/ContinueAsNewWorkflowExecutionCommandAttributes\x12;\n\rworkflow_type\x18\x01 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x14workflow_run_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16\x62\x61\x63koff_start_interval\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x07 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12@\n\tinitiator\x18\x08 \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12\x31\n\x07\x66\x61ilure\x18\t \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\n \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x15\n\rcron_schedule\x18\x0b \x01(\t\x12.\n\x06header\x18\x0c \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\r \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0e \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1c\n\x10inherit_build_id\x18\x0f \x01(\x08\x42\x02\x18\x01"\x9d\x07\n,StartChildWorkflowExecutionCommandAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x13parent_close_policy\x18\t \x01(\x0e\x32(.temporal.api.enums.v1.ParentClosePolicy\x12\x0f\n\x07\x63ontrol\x18\n \x01(\t\x12N\n\x18workflow_id_reuse_policy\x18\x0b \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\r \x01(\t\x12.\n\x06header\x18\x0e \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\x0f \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x10 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1c\n\x10inherit_build_id\x18\x11 \x01(\x08\x42\x02\x18\x01\x12\x32\n\x08priority\x18\x12 \x01(\x0b\x32 .temporal.api.common.v1.Priority"6\n ProtocolMessageCommandAttributes\x12\x12\n\nmessage_id\x18\x01 \x01(\t"\xea\x02\n\'ScheduleNexusOperationCommandAttributes\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x11\n\toperation\x18\x03 \x01(\t\x12.\n\x05input\x18\x04 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12g\n\x0cnexus_header\x18\x06 \x03(\x0b\x32Q.temporal.api.command.v1.ScheduleNexusOperationCommandAttributes.NexusHeaderEntry\x1a\x32\n\x10NexusHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"J\n,RequestCancelNexusOperationCommandAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03"\xc2\x11\n\x07\x43ommand\x12\x38\n\x0c\x63ommand_type\x18\x01 \x01(\x0e\x32".temporal.api.enums.v1.CommandType\x12\x39\n\ruser_metadata\x18\xad\x02 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12s\n)schedule_activity_task_command_attributes\x18\x02 \x01(\x0b\x32>.temporal.api.command.v1.ScheduleActivityTaskCommandAttributesH\x00\x12^\n\x1estart_timer_command_attributes\x18\x03 \x01(\x0b\x32\x34.temporal.api.command.v1.StartTimerCommandAttributesH\x00\x12}\n.complete_workflow_execution_command_attributes\x18\x04 \x01(\x0b\x32\x43.temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributesH\x00\x12u\n*fail_workflow_execution_command_attributes\x18\x05 \x01(\x0b\x32?.temporal.api.command.v1.FailWorkflowExecutionCommandAttributesH\x00\x12~\n/request_cancel_activity_task_command_attributes\x18\x06 \x01(\x0b\x32\x43.temporal.api.command.v1.RequestCancelActivityTaskCommandAttributesH\x00\x12`\n\x1f\x63\x61ncel_timer_command_attributes\x18\x07 \x01(\x0b\x32\x35.temporal.api.command.v1.CancelTimerCommandAttributesH\x00\x12y\n,cancel_workflow_execution_command_attributes\x18\x08 \x01(\x0b\x32\x41.temporal.api.command.v1.CancelWorkflowExecutionCommandAttributesH\x00\x12\x99\x01\n=request_cancel_external_workflow_execution_command_attributes\x18\t \x01(\x0b\x32P.temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributesH\x00\x12\x62\n record_marker_command_attributes\x18\n \x01(\x0b\x32\x36.temporal.api.command.v1.RecordMarkerCommandAttributesH\x00\x12\x89\x01\n5continue_as_new_workflow_execution_command_attributes\x18\x0b \x01(\x0b\x32H.temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributesH\x00\x12\x82\x01\n1start_child_workflow_execution_command_attributes\x18\x0c \x01(\x0b\x32\x45.temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributesH\x00\x12\x8a\x01\n5signal_external_workflow_execution_command_attributes\x18\r \x01(\x0b\x32I.temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributesH\x00\x12\x88\x01\n4upsert_workflow_search_attributes_command_attributes\x18\x0e \x01(\x0b\x32H.temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributesH\x00\x12h\n#protocol_message_command_attributes\x18\x0f \x01(\x0b\x32\x39.temporal.api.command.v1.ProtocolMessageCommandAttributesH\x00\x12{\n-modify_workflow_properties_command_attributes\x18\x11 \x01(\x0b\x32\x42.temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributesH\x00\x12w\n+schedule_nexus_operation_command_attributes\x18\x12 \x01(\x0b\x32@.temporal.api.command.v1.ScheduleNexusOperationCommandAttributesH\x00\x12\x82\x01\n1request_cancel_nexus_operation_command_attributes\x18\x13 \x01(\x0b\x32\x45.temporal.api.command.v1.RequestCancelNexusOperationCommandAttributesH\x00\x42\x0c\n\nattributesB\x8e\x01\n\x1aio.temporal.api.command.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/command/v1;command\xaa\x02\x19Temporalio.Api.Command.V1\xea\x02\x1cTemporalio::Api::Command::V1b\x06proto3' -) - - -_SCHEDULEACTIVITYTASKCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ScheduleActivityTaskCommandAttributes" -] -_REQUESTCANCELACTIVITYTASKCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "RequestCancelActivityTaskCommandAttributes" -] -_STARTTIMERCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "StartTimerCommandAttributes" -] -_COMPLETEWORKFLOWEXECUTIONCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "CompleteWorkflowExecutionCommandAttributes" -] -_FAILWORKFLOWEXECUTIONCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "FailWorkflowExecutionCommandAttributes" -] -_CANCELTIMERCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "CancelTimerCommandAttributes" -] -_CANCELWORKFLOWEXECUTIONCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "CancelWorkflowExecutionCommandAttributes" -] -_REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES = ( - DESCRIPTOR.message_types_by_name[ - "RequestCancelExternalWorkflowExecutionCommandAttributes" - ] -) -_SIGNALEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "SignalExternalWorkflowExecutionCommandAttributes" -] -_UPSERTWORKFLOWSEARCHATTRIBUTESCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "UpsertWorkflowSearchAttributesCommandAttributes" -] -_MODIFYWORKFLOWPROPERTIESCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ModifyWorkflowPropertiesCommandAttributes" -] -_RECORDMARKERCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "RecordMarkerCommandAttributes" -] -_RECORDMARKERCOMMANDATTRIBUTES_DETAILSENTRY = ( - _RECORDMARKERCOMMANDATTRIBUTES.nested_types_by_name["DetailsEntry"] -) -_CONTINUEASNEWWORKFLOWEXECUTIONCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ContinueAsNewWorkflowExecutionCommandAttributes" -] -_STARTCHILDWORKFLOWEXECUTIONCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "StartChildWorkflowExecutionCommandAttributes" -] -_PROTOCOLMESSAGECOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ProtocolMessageCommandAttributes" -] -_SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ScheduleNexusOperationCommandAttributes" -] -_SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES_NEXUSHEADERENTRY = ( - _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES.nested_types_by_name["NexusHeaderEntry"] -) -_REQUESTCANCELNEXUSOPERATIONCOMMANDATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "RequestCancelNexusOperationCommandAttributes" -] -_COMMAND = DESCRIPTOR.message_types_by_name["Command"] -ScheduleActivityTaskCommandAttributes = _reflection.GeneratedProtocolMessageType( - "ScheduleActivityTaskCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULEACTIVITYTASKCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.ScheduleActivityTaskCommandAttributes) - }, -) -_sym_db.RegisterMessage(ScheduleActivityTaskCommandAttributes) - -RequestCancelActivityTaskCommandAttributes = _reflection.GeneratedProtocolMessageType( - "RequestCancelActivityTaskCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELACTIVITYTASKCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.RequestCancelActivityTaskCommandAttributes) - }, -) -_sym_db.RegisterMessage(RequestCancelActivityTaskCommandAttributes) - -StartTimerCommandAttributes = _reflection.GeneratedProtocolMessageType( - "StartTimerCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _STARTTIMERCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.StartTimerCommandAttributes) - }, -) -_sym_db.RegisterMessage(StartTimerCommandAttributes) - -CompleteWorkflowExecutionCommandAttributes = _reflection.GeneratedProtocolMessageType( - "CompleteWorkflowExecutionCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _COMPLETEWORKFLOWEXECUTIONCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributes) - }, -) -_sym_db.RegisterMessage(CompleteWorkflowExecutionCommandAttributes) - -FailWorkflowExecutionCommandAttributes = _reflection.GeneratedProtocolMessageType( - "FailWorkflowExecutionCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _FAILWORKFLOWEXECUTIONCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.FailWorkflowExecutionCommandAttributes) - }, -) -_sym_db.RegisterMessage(FailWorkflowExecutionCommandAttributes) - -CancelTimerCommandAttributes = _reflection.GeneratedProtocolMessageType( - "CancelTimerCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _CANCELTIMERCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.CancelTimerCommandAttributes) - }, -) -_sym_db.RegisterMessage(CancelTimerCommandAttributes) - -CancelWorkflowExecutionCommandAttributes = _reflection.GeneratedProtocolMessageType( - "CancelWorkflowExecutionCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _CANCELWORKFLOWEXECUTIONCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.CancelWorkflowExecutionCommandAttributes) - }, +from temporalio.api.workflow.v1 import ( + message_pb2 as temporal_dot_api_dot_workflow_dot_v1_dot_message__pb2, ) -_sym_db.RegisterMessage(CancelWorkflowExecutionCommandAttributes) -RequestCancelExternalWorkflowExecutionCommandAttributes = ( - _reflection.GeneratedProtocolMessageType( - "RequestCancelExternalWorkflowExecutionCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributes) - }, - ) -) -_sym_db.RegisterMessage(RequestCancelExternalWorkflowExecutionCommandAttributes) - -SignalExternalWorkflowExecutionCommandAttributes = ( - _reflection.GeneratedProtocolMessageType( - "SignalExternalWorkflowExecutionCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _SIGNALEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributes) - }, - ) -) -_sym_db.RegisterMessage(SignalExternalWorkflowExecutionCommandAttributes) - -UpsertWorkflowSearchAttributesCommandAttributes = ( - _reflection.GeneratedProtocolMessageType( - "UpsertWorkflowSearchAttributesCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _UPSERTWORKFLOWSEARCHATTRIBUTESCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributes) - }, - ) -) -_sym_db.RegisterMessage(UpsertWorkflowSearchAttributesCommandAttributes) - -ModifyWorkflowPropertiesCommandAttributes = _reflection.GeneratedProtocolMessageType( - "ModifyWorkflowPropertiesCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _MODIFYWORKFLOWPROPERTIESCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributes) - }, -) -_sym_db.RegisterMessage(ModifyWorkflowPropertiesCommandAttributes) - -RecordMarkerCommandAttributes = _reflection.GeneratedProtocolMessageType( - "RecordMarkerCommandAttributes", - (_message.Message,), - { - "DetailsEntry": _reflection.GeneratedProtocolMessageType( - "DetailsEntry", - (_message.Message,), - { - "DESCRIPTOR": _RECORDMARKERCOMMANDATTRIBUTES_DETAILSENTRY, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.RecordMarkerCommandAttributes.DetailsEntry) - }, - ), - "DESCRIPTOR": _RECORDMARKERCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.RecordMarkerCommandAttributes) - }, -) -_sym_db.RegisterMessage(RecordMarkerCommandAttributes) -_sym_db.RegisterMessage(RecordMarkerCommandAttributes.DetailsEntry) - -ContinueAsNewWorkflowExecutionCommandAttributes = ( - _reflection.GeneratedProtocolMessageType( - "ContinueAsNewWorkflowExecutionCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _CONTINUEASNEWWORKFLOWEXECUTIONCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributes) - }, - ) -) -_sym_db.RegisterMessage(ContinueAsNewWorkflowExecutionCommandAttributes) - -StartChildWorkflowExecutionCommandAttributes = _reflection.GeneratedProtocolMessageType( - "StartChildWorkflowExecutionCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _STARTCHILDWORKFLOWEXECUTIONCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributes) - }, -) -_sym_db.RegisterMessage(StartChildWorkflowExecutionCommandAttributes) - -ProtocolMessageCommandAttributes = _reflection.GeneratedProtocolMessageType( - "ProtocolMessageCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _PROTOCOLMESSAGECOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.ProtocolMessageCommandAttributes) - }, -) -_sym_db.RegisterMessage(ProtocolMessageCommandAttributes) - -ScheduleNexusOperationCommandAttributes = _reflection.GeneratedProtocolMessageType( - "ScheduleNexusOperationCommandAttributes", - (_message.Message,), - { - "NexusHeaderEntry": _reflection.GeneratedProtocolMessageType( - "NexusHeaderEntry", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES_NEXUSHEADERENTRY, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.ScheduleNexusOperationCommandAttributes.NexusHeaderEntry) - }, - ), - "DESCRIPTOR": _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.ScheduleNexusOperationCommandAttributes) - }, -) -_sym_db.RegisterMessage(ScheduleNexusOperationCommandAttributes) -_sym_db.RegisterMessage(ScheduleNexusOperationCommandAttributes.NexusHeaderEntry) - -RequestCancelNexusOperationCommandAttributes = _reflection.GeneratedProtocolMessageType( - "RequestCancelNexusOperationCommandAttributes", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELNEXUSOPERATIONCOMMANDATTRIBUTES, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.RequestCancelNexusOperationCommandAttributes) - }, -) -_sym_db.RegisterMessage(RequestCancelNexusOperationCommandAttributes) - -Command = _reflection.GeneratedProtocolMessageType( - "Command", - (_message.Message,), - { - "DESCRIPTOR": _COMMAND, - "__module__": "temporalio.api.command.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.command.v1.Command) - }, +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n%temporal/api/command/v1/message.proto\x12\x17temporal.api.command.v1\x1a\x1egoogle/protobuf/duration.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a(temporal/api/enums/v1/command_type.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a&temporal/api/workflow/v1/message.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto\x1a,temporal/api/sdk/v1/event_group_marker.proto"\xb6\x05\n%ScheduleActivityTaskCommandAttributes\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12;\n\ractivity_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12.\n\x06header\x18\x05 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12/\n\x05input\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12<\n\x19schedule_to_close_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x0b \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x1f\n\x17request_eager_execution\x18\x0c \x01(\x08\x12\x1d\n\x15use_workflow_build_id\x18\r \x01(\x08\x12\x32\n\x08priority\x18\x0e \x01(\x0b\x32 .temporal.api.common.v1.PriorityJ\x04\x08\x03\x10\x04"H\n*RequestCancelActivityTaskCommandAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03"i\n\x1bStartTimerCommandAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x38\n\x15start_to_fire_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration"^\n*CompleteWorkflowExecutionCommandAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"[\n&FailWorkflowExecutionCommandAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"0\n\x1c\x43\x61ncelTimerCommandAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t"]\n(CancelWorkflowExecutionCommandAttributes\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"\xb7\x01\n7RequestCancelExternalWorkflowExecutionCommandAttributes\x12\x15\n\tnamespace\x18\x01 \x01(\tB\x02\x18\x01\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x07\x63ontrol\x18\x04 \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x63hild_workflow_only\x18\x05 \x01(\x08\x12\x0e\n\x06reason\x18\x06 \x01(\t"\xaf\x02\n0SignalExternalWorkflowExecutionCommandAttributes\x12\x15\n\tnamespace\x18\x01 \x01(\tB\x02\x18\x01\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0bsignal_name\x18\x03 \x01(\t\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x13\n\x07\x63ontrol\x18\x05 \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x63hild_workflow_only\x18\x06 \x01(\x08\x12.\n\x06header\x18\x07 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header"v\n/UpsertWorkflowSearchAttributesCommandAttributes\x12\x43\n\x11search_attributes\x18\x01 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes"`\n)ModifyWorkflowPropertiesCommandAttributes\x12\x33\n\rupserted_memo\x18\x01 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo"\xbf\x02\n\x1dRecordMarkerCommandAttributes\x12\x13\n\x0bmarker_name\x18\x01 \x01(\t\x12T\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32\x43.temporal.api.command.v1.RecordMarkerCommandAttributes.DetailsEntry\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x1aP\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads:\x02\x38\x01"\xac\x07\n/ContinueAsNewWorkflowExecutionCommandAttributes\x12;\n\rworkflow_type\x18\x01 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x14workflow_run_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16\x62\x61\x63koff_start_interval\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x07 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12@\n\tinitiator\x18\x08 \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12\x31\n\x07\x66\x61ilure\x18\t \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\n \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x15\n\rcron_schedule\x18\x0b \x01(\t\x12.\n\x06header\x18\x0c \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\r \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0e \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1c\n\x10inherit_build_id\x18\x0f \x01(\x08\x42\x02\x18\x01\x12[\n\x1binitial_versioning_behavior\x18\x10 \x01(\x0e\x32\x36.temporal.api.enums.v1.ContinueAsNewVersioningBehavior"\xec\x07\n,StartChildWorkflowExecutionCommandAttributes\x12\x15\n\tnamespace\x18\x01 \x01(\tB\x02\x18\x01\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x13parent_close_policy\x18\t \x01(\x0e\x32(.temporal.api.enums.v1.ParentClosePolicy\x12\x0f\n\x07\x63ontrol\x18\n \x01(\t\x12N\n\x18workflow_id_reuse_policy\x18\x0b \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\r \x01(\t\x12.\n\x06header\x18\x0e \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\x0f \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x10 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1c\n\x10inherit_build_id\x18\x11 \x01(\x08\x42\x02\x18\x01\x12\x32\n\x08priority\x18\x12 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12I\n\x13versioning_override\x18\x13 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride"6\n ProtocolMessageCommandAttributes\x12\x12\n\nmessage_id\x18\x01 \x01(\t"\xe3\x03\n\'ScheduleNexusOperationCommandAttributes\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x11\n\toperation\x18\x03 \x01(\t\x12.\n\x05input\x18\x04 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12g\n\x0cnexus_header\x18\x06 \x03(\x0b\x32Q.temporal.api.command.v1.ScheduleNexusOperationCommandAttributes.NexusHeaderEntry\x12<\n\x19schedule_to_start_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x32\n\x10NexusHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"J\n,RequestCancelNexusOperationCommandAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03"\x87\x12\n\x07\x43ommand\x12\x38\n\x0c\x63ommand_type\x18\x01 \x01(\x0e\x32".temporal.api.enums.v1.CommandType\x12\x39\n\ruser_metadata\x18\xad\x02 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12\x43\n\x13\x65vent_group_markers\x18\xae\x02 \x03(\x0b\x32%.temporal.api.sdk.v1.EventGroupMarker\x12s\n)schedule_activity_task_command_attributes\x18\x02 \x01(\x0b\x32>.temporal.api.command.v1.ScheduleActivityTaskCommandAttributesH\x00\x12^\n\x1estart_timer_command_attributes\x18\x03 \x01(\x0b\x32\x34.temporal.api.command.v1.StartTimerCommandAttributesH\x00\x12}\n.complete_workflow_execution_command_attributes\x18\x04 \x01(\x0b\x32\x43.temporal.api.command.v1.CompleteWorkflowExecutionCommandAttributesH\x00\x12u\n*fail_workflow_execution_command_attributes\x18\x05 \x01(\x0b\x32?.temporal.api.command.v1.FailWorkflowExecutionCommandAttributesH\x00\x12~\n/request_cancel_activity_task_command_attributes\x18\x06 \x01(\x0b\x32\x43.temporal.api.command.v1.RequestCancelActivityTaskCommandAttributesH\x00\x12`\n\x1f\x63\x61ncel_timer_command_attributes\x18\x07 \x01(\x0b\x32\x35.temporal.api.command.v1.CancelTimerCommandAttributesH\x00\x12y\n,cancel_workflow_execution_command_attributes\x18\x08 \x01(\x0b\x32\x41.temporal.api.command.v1.CancelWorkflowExecutionCommandAttributesH\x00\x12\x99\x01\n=request_cancel_external_workflow_execution_command_attributes\x18\t \x01(\x0b\x32P.temporal.api.command.v1.RequestCancelExternalWorkflowExecutionCommandAttributesH\x00\x12\x62\n record_marker_command_attributes\x18\n \x01(\x0b\x32\x36.temporal.api.command.v1.RecordMarkerCommandAttributesH\x00\x12\x89\x01\n5continue_as_new_workflow_execution_command_attributes\x18\x0b \x01(\x0b\x32H.temporal.api.command.v1.ContinueAsNewWorkflowExecutionCommandAttributesH\x00\x12\x82\x01\n1start_child_workflow_execution_command_attributes\x18\x0c \x01(\x0b\x32\x45.temporal.api.command.v1.StartChildWorkflowExecutionCommandAttributesH\x00\x12\x8a\x01\n5signal_external_workflow_execution_command_attributes\x18\r \x01(\x0b\x32I.temporal.api.command.v1.SignalExternalWorkflowExecutionCommandAttributesH\x00\x12\x88\x01\n4upsert_workflow_search_attributes_command_attributes\x18\x0e \x01(\x0b\x32H.temporal.api.command.v1.UpsertWorkflowSearchAttributesCommandAttributesH\x00\x12h\n#protocol_message_command_attributes\x18\x0f \x01(\x0b\x32\x39.temporal.api.command.v1.ProtocolMessageCommandAttributesH\x00\x12{\n-modify_workflow_properties_command_attributes\x18\x11 \x01(\x0b\x32\x42.temporal.api.command.v1.ModifyWorkflowPropertiesCommandAttributesH\x00\x12w\n+schedule_nexus_operation_command_attributes\x18\x12 \x01(\x0b\x32@.temporal.api.command.v1.ScheduleNexusOperationCommandAttributesH\x00\x12\x82\x01\n1request_cancel_nexus_operation_command_attributes\x18\x13 \x01(\x0b\x32\x45.temporal.api.command.v1.RequestCancelNexusOperationCommandAttributesH\x00\x42\x0c\n\nattributesB\x8e\x01\n\x1aio.temporal.api.command.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/command/v1;command\xaa\x02\x19Temporalio.Api.Command.V1\xea\x02\x1cTemporalio::Api::Command::V1b\x06proto3' ) -_sym_db.RegisterMessage(Command) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\032io.temporal.api.command.v1B\014MessageProtoP\001Z%go.temporal.io/api/command/v1;command\252\002\031Temporalio.Api.Command.V1\352\002\034Temporalio::Api::Command::V1" + _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ + "namespace" + ]._options = None + _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ + "namespace" + ]._serialized_options = b"\030\001" _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ "control" ]._options = None _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ "control" ]._serialized_options = b"\030\001" + _SIGNALEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ + "namespace" + ]._options = None + _SIGNALEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ + "namespace" + ]._serialized_options = b"\030\001" _SIGNALEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ "control" ]._options = None @@ -349,6 +81,12 @@ _CONTINUEASNEWWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ "inherit_build_id" ]._serialized_options = b"\030\001" + _STARTCHILDWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ + "namespace" + ]._options = None + _STARTCHILDWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ + "namespace" + ]._serialized_options = b"\030\001" _STARTCHILDWORKFLOWEXECUTIONCOMMANDATTRIBUTES.fields_by_name[ "inherit_build_id" ]._options = None @@ -359,44 +97,44 @@ _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES_NEXUSHEADERENTRY._serialized_options = ( b"8\001" ) - _SCHEDULEACTIVITYTASKCOMMANDATTRIBUTES._serialized_start = 338 - _SCHEDULEACTIVITYTASKCOMMANDATTRIBUTES._serialized_end = 1032 - _REQUESTCANCELACTIVITYTASKCOMMANDATTRIBUTES._serialized_start = 1034 - _REQUESTCANCELACTIVITYTASKCOMMANDATTRIBUTES._serialized_end = 1106 - _STARTTIMERCOMMANDATTRIBUTES._serialized_start = 1108 - _STARTTIMERCOMMANDATTRIBUTES._serialized_end = 1213 - _COMPLETEWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1215 - _COMPLETEWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 1309 - _FAILWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1311 - _FAILWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 1402 - _CANCELTIMERCOMMANDATTRIBUTES._serialized_start = 1404 - _CANCELTIMERCOMMANDATTRIBUTES._serialized_end = 1452 - _CANCELWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1454 - _CANCELWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 1547 - _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1550 - _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 1729 - _SIGNALEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1732 - _SIGNALEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 2031 - _UPSERTWORKFLOWSEARCHATTRIBUTESCOMMANDATTRIBUTES._serialized_start = 2033 - _UPSERTWORKFLOWSEARCHATTRIBUTESCOMMANDATTRIBUTES._serialized_end = 2151 - _MODIFYWORKFLOWPROPERTIESCOMMANDATTRIBUTES._serialized_start = 2153 - _MODIFYWORKFLOWPROPERTIESCOMMANDATTRIBUTES._serialized_end = 2249 - _RECORDMARKERCOMMANDATTRIBUTES._serialized_start = 2252 - _RECORDMARKERCOMMANDATTRIBUTES._serialized_end = 2571 - _RECORDMARKERCOMMANDATTRIBUTES_DETAILSENTRY._serialized_start = 2491 - _RECORDMARKERCOMMANDATTRIBUTES_DETAILSENTRY._serialized_end = 2571 - _CONTINUEASNEWWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 2574 - _CONTINUEASNEWWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 3421 - _STARTCHILDWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 3424 - _STARTCHILDWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 4349 - _PROTOCOLMESSAGECOMMANDATTRIBUTES._serialized_start = 4351 - _PROTOCOLMESSAGECOMMANDATTRIBUTES._serialized_end = 4405 - _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES._serialized_start = 4408 - _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES._serialized_end = 4770 - _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES_NEXUSHEADERENTRY._serialized_start = 4720 - _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES_NEXUSHEADERENTRY._serialized_end = 4770 - _REQUESTCANCELNEXUSOPERATIONCOMMANDATTRIBUTES._serialized_start = 4772 - _REQUESTCANCELNEXUSOPERATIONCOMMANDATTRIBUTES._serialized_end = 4846 - _COMMAND._serialized_start = 4849 - _COMMAND._serialized_end = 7091 + _SCHEDULEACTIVITYTASKCOMMANDATTRIBUTES._serialized_start = 424 + _SCHEDULEACTIVITYTASKCOMMANDATTRIBUTES._serialized_end = 1118 + _REQUESTCANCELACTIVITYTASKCOMMANDATTRIBUTES._serialized_start = 1120 + _REQUESTCANCELACTIVITYTASKCOMMANDATTRIBUTES._serialized_end = 1192 + _STARTTIMERCOMMANDATTRIBUTES._serialized_start = 1194 + _STARTTIMERCOMMANDATTRIBUTES._serialized_end = 1299 + _COMPLETEWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1301 + _COMPLETEWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 1395 + _FAILWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1397 + _FAILWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 1488 + _CANCELTIMERCOMMANDATTRIBUTES._serialized_start = 1490 + _CANCELTIMERCOMMANDATTRIBUTES._serialized_end = 1538 + _CANCELWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1540 + _CANCELWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 1633 + _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1636 + _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 1819 + _SIGNALEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 1822 + _SIGNALEXTERNALWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 2125 + _UPSERTWORKFLOWSEARCHATTRIBUTESCOMMANDATTRIBUTES._serialized_start = 2127 + _UPSERTWORKFLOWSEARCHATTRIBUTESCOMMANDATTRIBUTES._serialized_end = 2245 + _MODIFYWORKFLOWPROPERTIESCOMMANDATTRIBUTES._serialized_start = 2247 + _MODIFYWORKFLOWPROPERTIESCOMMANDATTRIBUTES._serialized_end = 2343 + _RECORDMARKERCOMMANDATTRIBUTES._serialized_start = 2346 + _RECORDMARKERCOMMANDATTRIBUTES._serialized_end = 2665 + _RECORDMARKERCOMMANDATTRIBUTES_DETAILSENTRY._serialized_start = 2585 + _RECORDMARKERCOMMANDATTRIBUTES_DETAILSENTRY._serialized_end = 2665 + _CONTINUEASNEWWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 2668 + _CONTINUEASNEWWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 3608 + _STARTCHILDWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_start = 3611 + _STARTCHILDWORKFLOWEXECUTIONCOMMANDATTRIBUTES._serialized_end = 4615 + _PROTOCOLMESSAGECOMMANDATTRIBUTES._serialized_start = 4617 + _PROTOCOLMESSAGECOMMANDATTRIBUTES._serialized_end = 4671 + _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES._serialized_start = 4674 + _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES._serialized_end = 5157 + _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES_NEXUSHEADERENTRY._serialized_start = 5107 + _SCHEDULENEXUSOPERATIONCOMMANDATTRIBUTES_NEXUSHEADERENTRY._serialized_end = 5157 + _REQUESTCANCELNEXUSOPERATIONCOMMANDATTRIBUTES._serialized_start = 5159 + _REQUESTCANCELNEXUSOPERATIONCOMMANDATTRIBUTES._serialized_end = 5233 + _COMMAND._serialized_start = 5236 + _COMMAND._serialized_end = 7547 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/command/v1/message_pb2.pyi b/temporalio/api/command/v1/message_pb2.pyi index 5a60e3aa1d..255f70b2b2 100644 --- a/temporalio/api/command/v1/message_pb2.pyi +++ b/temporalio/api/command/v1/message_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -16,16 +16,14 @@ import temporalio.api.common.v1.message_pb2 import temporalio.api.enums.v1.command_type_pb2 import temporalio.api.enums.v1.workflow_pb2 import temporalio.api.failure.v1.message_pb2 +import temporalio.api.sdk.v1.event_group_marker_pb2 import temporalio.api.sdk.v1.user_metadata_pb2 import temporalio.api.taskqueue.v1.message_pb2 - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import temporalio.api.workflow.v1.message_pb2 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -43,6 +41,14 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message): USE_WORKFLOW_BUILD_ID_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int activity_id: builtins.str + request_eager_execution: builtins.bool + """Request to start the activity directly bypassing matching service and worker polling + The slot for executing the activity should be reserved when setting this field to true. + """ + use_workflow_build_id: builtins.bool + """If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + Assignment rules of the activity's Task Queue will be used to determine the Build ID. + """ @property def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: ... @property @@ -61,6 +67,7 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: """Limits the time an activity task can stay in a task queue before a worker picks it up. The @@ -74,6 +81,7 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Maximum time an activity is allowed to execute after being picked up by a worker. This @@ -82,28 +90,24 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def heartbeat_timeout(self) -> google.protobuf.duration_pb2.Duration: """Maximum permitted time between successful worker heartbeats.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """Activities are provided by a default retry policy which is controlled through the service's dynamic configuration. Retries will be attempted until `schedule_to_close_timeout` has elapsed. To disable retries set retry_policy.maximum_attempts to 1. """ - request_eager_execution: builtins.bool - """Request to start the activity directly bypassing matching service and worker polling - The slot for executing the activity should be reserved when setting this field to true. - """ - use_workflow_build_id: builtins.bool - """If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, - Assignment rules of the activity's Task Queue will be used to determine the Build ID. - """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata. If this message is not present, or any fields are not present, they inherit the values from the workflow. """ + def __init__( self, *, @@ -123,7 +127,7 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_type", b"activity_type", "header", @@ -148,7 +152,7 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "activity_type", @@ -180,6 +184,7 @@ class ScheduleActivityTaskCommandAttributes(google.protobuf.message.Message): global___ScheduleActivityTaskCommandAttributes = ScheduleActivityTaskCommandAttributes +@typing.final class RequestCancelActivityTaskCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -192,16 +197,14 @@ class RequestCancelActivityTaskCommandAttributes(google.protobuf.message.Message scheduled_event_id: builtins.int = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "scheduled_event_id", b"scheduled_event_id" - ], + self, field_name: typing.Literal["scheduled_event_id", b"scheduled_event_id"] ) -> None: ... global___RequestCancelActivityTaskCommandAttributes = ( RequestCancelActivityTaskCommandAttributes ) +@typing.final class StartTimerCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -218,6 +221,7 @@ class StartTimerCommandAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + def __init__( self, *, @@ -226,19 +230,18 @@ class StartTimerCommandAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "start_to_fire_timeout", b"start_to_fire_timeout" - ], + field_name: typing.Literal["start_to_fire_timeout", b"start_to_fire_timeout"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "start_to_fire_timeout", b"start_to_fire_timeout", "timer_id", b"timer_id" ], ) -> None: ... global___StartTimerCommandAttributes = StartTimerCommandAttributes +@typing.final class CompleteWorkflowExecutionCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -251,16 +254,15 @@ class CompleteWorkflowExecutionCommandAttributes(google.protobuf.message.Message result: temporalio.api.common.v1.message_pb2.Payloads | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["result", b"result"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["result", b"result"]) -> None: ... global___CompleteWorkflowExecutionCommandAttributes = ( CompleteWorkflowExecutionCommandAttributes ) +@typing.final class FailWorkflowExecutionCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -273,14 +275,13 @@ class FailWorkflowExecutionCommandAttributes(google.protobuf.message.Message): failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["failure", b"failure"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["failure", b"failure"]) -> None: ... global___FailWorkflowExecutionCommandAttributes = FailWorkflowExecutionCommandAttributes +@typing.final class CancelTimerCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -293,11 +294,12 @@ class CancelTimerCommandAttributes(google.protobuf.message.Message): timer_id: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["timer_id", b"timer_id"] + self, field_name: typing.Literal["timer_id", b"timer_id"] ) -> None: ... global___CancelTimerCommandAttributes = CancelTimerCommandAttributes +@typing.final class CancelWorkflowExecutionCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -310,16 +312,15 @@ class CancelWorkflowExecutionCommandAttributes(google.protobuf.message.Message): details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["details", b"details"] + self, field_name: typing.Literal["details", b"details"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["details", b"details"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["details", b"details"]) -> None: ... global___CancelWorkflowExecutionCommandAttributes = ( CancelWorkflowExecutionCommandAttributes ) +@typing.final class RequestCancelExternalWorkflowExecutionCommandAttributes( google.protobuf.message.Message ): @@ -332,6 +333,7 @@ class RequestCancelExternalWorkflowExecutionCommandAttributes( CHILD_WORKFLOW_ONLY_FIELD_NUMBER: builtins.int REASON_FIELD_NUMBER: builtins.int namespace: builtins.str + """Deprecated. Cross-namespace operations are disabled by default as of server 1.30.1.""" workflow_id: builtins.str run_id: builtins.str control: builtins.str @@ -355,7 +357,7 @@ class RequestCancelExternalWorkflowExecutionCommandAttributes( ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "child_workflow_only", b"child_workflow_only", "control", @@ -375,6 +377,7 @@ global___RequestCancelExternalWorkflowExecutionCommandAttributes = ( RequestCancelExternalWorkflowExecutionCommandAttributes ) +@typing.final class SignalExternalWorkflowExecutionCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -386,13 +389,9 @@ class SignalExternalWorkflowExecutionCommandAttributes(google.protobuf.message.M CHILD_WORKFLOW_ONLY_FIELD_NUMBER: builtins.int HEADER_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... + """Deprecated. Cross-namespace operations are disabled by default as of server 1.30.1.""" signal_name: builtins.str """The workflow author-defined name of the signal to send to the workflow.""" - @property - def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Serialized value(s) to provide with the signal.""" control: builtins.str """Deprecated""" child_workflow_only: builtins.bool @@ -400,11 +399,18 @@ class SignalExternalWorkflowExecutionCommandAttributes(google.protobuf.message.M command. The request will be rejected if it is set to true and the target workflow is *not* a child of the requesting workflow. """ + @property + def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... + @property + def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized value(s) to provide with the signal.""" + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: """Headers that are passed by the workflow that is sending a signal to the external workflow that is receiving this signal. """ + def __init__( self, *, @@ -418,13 +424,13 @@ class SignalExternalWorkflowExecutionCommandAttributes(google.protobuf.message.M ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution", b"execution", "header", b"header", "input", b"input" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "child_workflow_only", b"child_workflow_only", "control", @@ -446,6 +452,7 @@ global___SignalExternalWorkflowExecutionCommandAttributes = ( SignalExternalWorkflowExecutionCommandAttributes ) +@typing.final class UpsertWorkflowSearchAttributesCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -461,22 +468,17 @@ class UpsertWorkflowSearchAttributesCommandAttributes(google.protobuf.message.Me | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "search_attributes", b"search_attributes" - ], + self, field_name: typing.Literal["search_attributes", b"search_attributes"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "search_attributes", b"search_attributes" - ], + self, field_name: typing.Literal["search_attributes", b"search_attributes"] ) -> None: ... global___UpsertWorkflowSearchAttributesCommandAttributes = ( UpsertWorkflowSearchAttributesCommandAttributes ) +@typing.final class ModifyWorkflowPropertiesCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -487,25 +489,28 @@ class ModifyWorkflowPropertiesCommandAttributes(google.protobuf.message.Message) the existing memo. If the user wants to delete values, a default/empty Payload should be used as the value for the key being deleted. """ + def __init__( self, *, upserted_memo: temporalio.api.common.v1.message_pb2.Memo | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["upserted_memo", b"upserted_memo"] + self, field_name: typing.Literal["upserted_memo", b"upserted_memo"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["upserted_memo", b"upserted_memo"] + self, field_name: typing.Literal["upserted_memo", b"upserted_memo"] ) -> None: ... global___ModifyWorkflowPropertiesCommandAttributes = ( ModifyWorkflowPropertiesCommandAttributes ) +@typing.final class RecordMarkerCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class DetailsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -521,11 +526,10 @@ class RecordMarkerCommandAttributes(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payloads | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... MARKER_NAME_FIELD_NUMBER: builtins.int @@ -555,14 +559,11 @@ class RecordMarkerCommandAttributes(google.protobuf.message.Message): failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "failure", b"failure", "header", b"header" - ], + self, field_name: typing.Literal["failure", b"failure", "header", b"header"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "failure", @@ -576,6 +577,7 @@ class RecordMarkerCommandAttributes(google.protobuf.message.Message): global___RecordMarkerCommandAttributes = RecordMarkerCommandAttributes +@typing.final class ContinueAsNewWorkflowExecutionCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -594,6 +596,23 @@ class ContinueAsNewWorkflowExecutionCommandAttributes(google.protobuf.message.Me MEMO_FIELD_NUMBER: builtins.int SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int INHERIT_BUILD_ID_FIELD_NUMBER: builtins.int + INITIAL_VERSIONING_BEHAVIOR_FIELD_NUMBER: builtins.int + initiator: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewInitiator.ValueType + """Should be removed""" + cron_schedule: builtins.str + """Should be removed. Not necessarily unused but unclear and not exposed by SDKs.""" + inherit_build_id: builtins.bool + """If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + the assignment rules will be used to independently assign a Build ID to the new execution. + Deprecated. Only considered for versioning v0.2. + """ + initial_versioning_behavior: ( + temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType + ) + """Experimental. Optionally decide the versioning behavior that the first task of the new run should use. + For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version + of the previous run. + """ @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... @property @@ -603,24 +622,25 @@ class ContinueAsNewWorkflowExecutionCommandAttributes(google.protobuf.message.Me @property def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow run.""" + @property def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow task.""" + @property def backoff_start_interval(self) -> google.protobuf.duration_pb2.Duration: """How long the workflow start will be delayed - not really a "backoff" in the traditional sense.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: ... - initiator: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewInitiator.ValueType - """Should be removed""" @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """Should be removed""" + @property def last_completion_result(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Should be removed""" - cron_schedule: builtins.str - """Should be removed. Not necessarily unused but unclear and not exposed by SDKs.""" + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... @property @@ -629,11 +649,6 @@ class ContinueAsNewWorkflowExecutionCommandAttributes(google.protobuf.message.Me def search_attributes( self, ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ... - inherit_build_id: builtins.bool - """If this is set, the new execution inherits the Build ID of the current execution. Otherwise, - the assignment rules will be used to independently assign a Build ID to the new execution. - Deprecated. Only considered for versioning v0.2. - """ def __init__( self, *, @@ -654,10 +669,11 @@ class ContinueAsNewWorkflowExecutionCommandAttributes(google.protobuf.message.Me search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes | None = ..., inherit_build_id: builtins.bool = ..., + initial_versioning_behavior: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "backoff_start_interval", b"backoff_start_interval", "failure", @@ -686,7 +702,7 @@ class ContinueAsNewWorkflowExecutionCommandAttributes(google.protobuf.message.Me ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "backoff_start_interval", b"backoff_start_interval", "cron_schedule", @@ -697,6 +713,8 @@ class ContinueAsNewWorkflowExecutionCommandAttributes(google.protobuf.message.Me b"header", "inherit_build_id", b"inherit_build_id", + "initial_versioning_behavior", + b"initial_versioning_behavior", "initiator", b"initiator", "input", @@ -724,6 +742,7 @@ global___ContinueAsNewWorkflowExecutionCommandAttributes = ( ContinueAsNewWorkflowExecutionCommandAttributes ) +@typing.final class StartChildWorkflowExecutionCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -745,8 +764,26 @@ class StartChildWorkflowExecutionCommandAttributes(google.protobuf.message.Messa SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int INHERIT_BUILD_ID_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int + VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int namespace: builtins.str + """Deprecated. Cross-namespace operations are disabled by default as of server 1.30.1.""" workflow_id: builtins.str + parent_close_policy: ( + temporalio.api.enums.v1.workflow_pb2.ParentClosePolicy.ValueType + ) + """Default: PARENT_CLOSE_POLICY_TERMINATE.""" + control: builtins.str + workflow_id_reuse_policy: ( + temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType + ) + """Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.""" + cron_schedule: builtins.str + """Establish a cron schedule for the child workflow.""" + inherit_build_id: builtins.bool + """If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + rules of the child's Task Queue will be used to independently assign a Build ID to it. + Deprecated. Only considered for versioning v0.2. + """ @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... @property @@ -756,25 +793,17 @@ class StartChildWorkflowExecutionCommandAttributes(google.protobuf.message.Messa @property def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: """Total workflow execution timeout including retries and continue as new.""" + @property def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow run.""" + @property def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow task.""" - parent_close_policy: ( - temporalio.api.enums.v1.workflow_pb2.ParentClosePolicy.ValueType - ) - """Default: PARENT_CLOSE_POLICY_TERMINATE.""" - control: builtins.str - workflow_id_reuse_policy: ( - temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType - ) - """Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: ... - cron_schedule: builtins.str - """Establish a cron schedule for the child workflow.""" @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... @property @@ -783,16 +812,20 @@ class StartChildWorkflowExecutionCommandAttributes(google.protobuf.message.Messa def search_attributes( self, ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ... - inherit_build_id: builtins.bool - """If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment - rules of the child's Task Queue will be used to independently assign a Build ID to it. - Deprecated. Only considered for versioning v0.2. - """ @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata. If this message is not present, or any fields are not present, they inherit the values from the workflow. """ + + @property + def versioning_override( + self, + ) -> temporalio.api.workflow.v1.message_pb2.VersioningOverride: + """Versioning override for the child workflow. If present, this explicit override takes + precedence over versioning behavior inherited from the parent workflow. + """ + def __init__( self, *, @@ -815,10 +848,12 @@ class StartChildWorkflowExecutionCommandAttributes(google.protobuf.message.Messa | None = ..., inherit_build_id: builtins.bool = ..., priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + versioning_override: temporalio.api.workflow.v1.message_pb2.VersioningOverride + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "input", @@ -833,6 +868,8 @@ class StartChildWorkflowExecutionCommandAttributes(google.protobuf.message.Messa b"search_attributes", "task_queue", b"task_queue", + "versioning_override", + b"versioning_override", "workflow_execution_timeout", b"workflow_execution_timeout", "workflow_run_timeout", @@ -845,7 +882,7 @@ class StartChildWorkflowExecutionCommandAttributes(google.protobuf.message.Messa ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "control", b"control", "cron_schedule", @@ -870,6 +907,8 @@ class StartChildWorkflowExecutionCommandAttributes(google.protobuf.message.Messa b"search_attributes", "task_queue", b"task_queue", + "versioning_override", + b"versioning_override", "workflow_execution_timeout", b"workflow_execution_timeout", "workflow_id", @@ -889,6 +928,7 @@ global___StartChildWorkflowExecutionCommandAttributes = ( StartChildWorkflowExecutionCommandAttributes ) +@typing.final class ProtocolMessageCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -901,14 +941,16 @@ class ProtocolMessageCommandAttributes(google.protobuf.message.Message): message_id: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["message_id", b"message_id"] + self, field_name: typing.Literal["message_id", b"message_id"] ) -> None: ... global___ProtocolMessageCommandAttributes = ProtocolMessageCommandAttributes +@typing.final class ScheduleNexusOperationCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class NexusHeaderEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -923,8 +965,7 @@ class ScheduleNexusOperationCommandAttributes(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... ENDPOINT_FIELD_NUMBER: builtins.int @@ -933,6 +974,8 @@ class ScheduleNexusOperationCommandAttributes(google.protobuf.message.Message): INPUT_FIELD_NUMBER: builtins.int SCHEDULE_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int NEXUS_HEADER_FIELD_NUMBER: builtins.int + SCHEDULE_TO_START_TIMEOUT_FIELD_NUMBER: builtins.int + START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int endpoint: builtins.str """Endpoint name, must exist in the endpoint registry or this command will fail.""" service: builtins.str @@ -945,6 +988,7 @@ class ScheduleNexusOperationCommandAttributes(google.protobuf.message.Message): internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the content is transformed back to the original Payload sent in this command. """ + @property def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Schedule-to-close timeout for this operation. @@ -953,6 +997,7 @@ class ScheduleNexusOperationCommandAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def nexus_header( self, @@ -964,6 +1009,32 @@ class ScheduleNexusOperationCommandAttributes(google.protobuf.message.Message): Note these headers are not the same as Temporal headers on internal activities and child workflows, these are transmitted to Nexus operations that may be external and are not traditional payloads. """ + + @property + def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Schedule-to-start timeout for this operation. + Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) + by the handler. If the operation is not started within this timeout, it will fail with + TIMEOUT_TYPE_SCHEDULE_TO_START. + If not set or zero, no schedule-to-start timeout is enforced. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + Requires server version 1.31.0 or later. + """ + + @property + def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Start-to-close timeout for this operation. + Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been + started. If the operation does not complete within this timeout after starting, it will fail with + TIMEOUT_TYPE_START_TO_CLOSE. + Only applies to asynchronous operations. Synchronous operations ignore this timeout. + If not set or zero, no start-to-close timeout is enforced. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + Requires server version 1.31.0 or later. + """ + def __init__( self, *, @@ -973,16 +1044,25 @@ class ScheduleNexusOperationCommandAttributes(google.protobuf.message.Message): input: temporalio.api.common.v1.message_pb2.Payload | None = ..., schedule_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., nexus_header: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + schedule_to_start_timeout: google.protobuf.duration_pb2.Duration | None = ..., + start_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "input", b"input", "schedule_to_close_timeout", b"schedule_to_close_timeout" + field_name: typing.Literal[ + "input", + b"input", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "start_to_close_timeout", + b"start_to_close_timeout", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "endpoint", b"endpoint", "input", @@ -993,8 +1073,12 @@ class ScheduleNexusOperationCommandAttributes(google.protobuf.message.Message): b"operation", "schedule_to_close_timeout", b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", "service", b"service", + "start_to_close_timeout", + b"start_to_close_timeout", ], ) -> None: ... @@ -1002,6 +1086,7 @@ global___ScheduleNexusOperationCommandAttributes = ( ScheduleNexusOperationCommandAttributes ) +@typing.final class RequestCancelNexusOperationCommandAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1016,21 +1101,20 @@ class RequestCancelNexusOperationCommandAttributes(google.protobuf.message.Messa scheduled_event_id: builtins.int = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "scheduled_event_id", b"scheduled_event_id" - ], + self, field_name: typing.Literal["scheduled_event_id", b"scheduled_event_id"] ) -> None: ... global___RequestCancelNexusOperationCommandAttributes = ( RequestCancelNexusOperationCommandAttributes ) +@typing.final class Command(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor COMMAND_TYPE_FIELD_NUMBER: builtins.int USER_METADATA_FIELD_NUMBER: builtins.int + EVENT_GROUP_MARKERS_FIELD_NUMBER: builtins.int SCHEDULE_ACTIVITY_TASK_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int START_TIMER_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int COMPLETE_WORKFLOW_EXECUTION_COMMAND_ATTRIBUTES_FIELD_NUMBER: builtins.int @@ -1064,6 +1148,15 @@ class Command(google.protobuf.message.Message): * start_timer_command_attributes - populates temporalio.api.history.v1.HistoryEvent for timer started where the summary is used to identify the timer. """ + + @property + def event_group_markers( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.sdk.v1.event_group_marker_pb2.EventGroupMarker + ]: + """Event Group Markers attached to the command by the workflow author.""" + @property def schedule_activity_task_command_attributes( self, @@ -1125,6 +1218,7 @@ class Command(google.protobuf.message.Message): self, ) -> global___ModifyWorkflowPropertiesCommandAttributes: """16 is available for use - it was used as part of a prototype that never made it into a release""" + @property def schedule_nexus_operation_command_attributes( self, @@ -1139,6 +1233,10 @@ class Command(google.protobuf.message.Message): command_type: temporalio.api.enums.v1.command_type_pb2.CommandType.ValueType = ..., user_metadata: temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata | None = ..., + event_group_markers: collections.abc.Iterable[ + temporalio.api.sdk.v1.event_group_marker_pb2.EventGroupMarker + ] + | None = ..., schedule_activity_task_command_attributes: global___ScheduleActivityTaskCommandAttributes | None = ..., start_timer_command_attributes: global___StartTimerCommandAttributes @@ -1176,7 +1274,7 @@ class Command(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attributes", b"attributes", "cancel_timer_command_attributes", @@ -1219,7 +1317,7 @@ class Command(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attributes", b"attributes", "cancel_timer_command_attributes", @@ -1232,6 +1330,8 @@ class Command(google.protobuf.message.Message): b"complete_workflow_execution_command_attributes", "continue_as_new_workflow_execution_command_attributes", b"continue_as_new_workflow_execution_command_attributes", + "event_group_markers", + b"event_group_markers", "fail_workflow_execution_command_attributes", b"fail_workflow_execution_command_attributes", "modify_workflow_properties_command_attributes", @@ -1263,9 +1363,9 @@ class Command(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["attributes", b"attributes"] + self, oneof_group: typing.Literal["attributes", b"attributes"] ) -> ( - typing_extensions.Literal[ + typing.Literal[ "schedule_activity_task_command_attributes", "start_timer_command_attributes", "complete_workflow_execution_command_attributes", diff --git a/temporalio/api/common/v1/__init__.py b/temporalio/api/common/v1/__init__.py index b3d074f41c..81652ad255 100644 --- a/temporalio/api/common/v1/__init__.py +++ b/temporalio/api/common/v1/__init__.py @@ -3,16 +3,25 @@ ActivityType, Callback, DataBlob, + Execution, + FastForwardConfig, Header, Link, Memo, MeteringMetadata, + OnConflictOptions, Payload, Payloads, + Principal, Priority, ResetOptions, + ResolvedPrincipal, RetryPolicy, SearchAttributes, + TimeSkippingConfig, + TimeSkippingFastForwardInfo, + TimeSkippingInfo, + TimeSkippingStatePropagation, WorkerSelector, WorkerVersionCapabilities, WorkerVersionStamp, @@ -24,17 +33,26 @@ "ActivityType", "Callback", "DataBlob", + "Execution", + "FastForwardConfig", "GrpcStatus", "Header", "Link", "Memo", "MeteringMetadata", + "OnConflictOptions", "Payload", "Payloads", + "Principal", "Priority", "ResetOptions", + "ResolvedPrincipal", "RetryPolicy", "SearchAttributes", + "TimeSkippingConfig", + "TimeSkippingFastForwardInfo", + "TimeSkippingInfo", + "TimeSkippingStatePropagation", "WorkerSelector", "WorkerVersionCapabilities", "WorkerVersionStamp", diff --git a/temporalio/api/common/v1/grpc_status_pb2.py b/temporalio/api/common/v1/grpc_status_pb2.py index 17642e92e6..9c35065e81 100644 --- a/temporalio/api/common/v1/grpc_status_pb2.py +++ b/temporalio/api/common/v1/grpc_status_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -20,19 +19,8 @@ b'\n(temporal/api/common/v1/grpc_status.proto\x12\x16temporal.api.common.v1\x1a\x19google/protobuf/any.proto"R\n\nGrpcStatus\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\x12%\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Anyb\x06proto3' ) - -_GRPCSTATUS = DESCRIPTOR.message_types_by_name["GrpcStatus"] -GrpcStatus = _reflection.GeneratedProtocolMessageType( - "GrpcStatus", - (_message.Message,), - { - "DESCRIPTOR": _GRPCSTATUS, - "__module__": "temporalio.api.common.v1.grpc_status_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.GrpcStatus) - }, -) -_sym_db.RegisterMessage(GrpcStatus) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None _GRPCSTATUS._serialized_start = 95 diff --git a/temporalio/api/common/v1/grpc_status_pb2.pyi b/temporalio/api/common/v1/grpc_status_pb2.pyi index 749a003aff..3965b89e1d 100644 --- a/temporalio/api/common/v1/grpc_status_pb2.pyi +++ b/temporalio/api/common/v1/grpc_status_pb2.pyi @@ -5,20 +5,16 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.any_pb2 import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class GrpcStatus(google.protobuf.message.Message): """From https://github.com/grpc/grpc/blob/master/src/proto/grpc/status/status.proto since we don't import grpc but still need the status info @@ -46,7 +42,7 @@ class GrpcStatus(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "code", b"code", "details", b"details", "message", b"message" ], ) -> None: ... diff --git a/temporalio/api/common/v1/message_pb2.py b/temporalio/api/common/v1/message_pb2.py index edaa01f1ef..6ee55b19d6 100644 --- a/temporalio/api/common/v1/message_pb2.py +++ b/temporalio/api/common/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -16,6 +15,7 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from temporalio.api.enums.v1 import ( common_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_common__pb2, @@ -28,355 +28,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n$temporal/api/common/v1/message.proto\x12\x16temporal.api.common.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a"temporal/api/enums/v1/common.proto\x1a&temporal/api/enums/v1/event_type.proto\x1a!temporal/api/enums/v1/reset.proto"T\n\x08\x44\x61taBlob\x12:\n\rencoding_type\x18\x01 \x01(\x0e\x32#.temporal.api.enums.v1.EncodingType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c"=\n\x08Payloads\x12\x31\n\x08payloads\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload"\x89\x01\n\x07Payload\x12?\n\x08metadata\x18\x01 \x03(\x0b\x32-.temporal.api.common.v1.Payload.MetadataEntry\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01"\xbe\x01\n\x10SearchAttributes\x12S\n\x0eindexed_fields\x18\x01 \x03(\x0b\x32;.temporal.api.common.v1.SearchAttributes.IndexedFieldsEntry\x1aU\n\x12IndexedFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x90\x01\n\x04Memo\x12\x38\n\x06\x66ields\x18\x01 \x03(\x0b\x32(.temporal.api.common.v1.Memo.FieldsEntry\x1aN\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x94\x01\n\x06Header\x12:\n\x06\x66ields\x18\x01 \x03(\x0b\x32*.temporal.api.common.v1.Header.FieldsEntry\x1aN\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"8\n\x11WorkflowExecution\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t"\x1c\n\x0cWorkflowType\x12\x0c\n\x04name\x18\x01 \x01(\t"\x1c\n\x0c\x41\x63tivityType\x12\x0c\n\x04name\x18\x01 \x01(\t"\xd1\x01\n\x0bRetryPolicy\x12\x33\n\x10initial_interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1b\n\x13\x62\x61\x63koff_coefficient\x18\x02 \x01(\x01\x12\x33\n\x10maximum_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10maximum_attempts\x18\x04 \x01(\x05\x12!\n\x19non_retryable_error_types\x18\x05 \x03(\t"F\n\x10MeteringMetadata\x12\x32\n*nonfirst_local_activity_execution_attempts\x18\r \x01(\r">\n\x12WorkerVersionStamp\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x16\n\x0euse_versioning\x18\x03 \x01(\x08"e\n\x19WorkerVersionCapabilities\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x16\n\x0euse_versioning\x18\x02 \x01(\x08\x12\x1e\n\x16\x64\x65ployment_series_name\x18\x04 \x01(\t"\xed\x02\n\x0cResetOptions\x12\x35\n\x13\x66irst_workflow_task\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x34\n\x12last_workflow_task\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x1a\n\x10workflow_task_id\x18\x03 \x01(\x03H\x00\x12\x12\n\x08\x62uild_id\x18\x04 \x01(\tH\x00\x12G\n\x12reset_reapply_type\x18\n \x01(\x0e\x32\'.temporal.api.enums.v1.ResetReapplyTypeB\x02\x18\x01\x12\x18\n\x10\x63urrent_run_only\x18\x0b \x01(\x08\x12S\n\x1breset_reapply_exclude_types\x18\x0c \x03(\x0e\x32..temporal.api.enums.v1.ResetReapplyExcludeTypeB\x08\n\x06target"\xe4\x02\n\x08\x43\x61llback\x12\x37\n\x05nexus\x18\x02 \x01(\x0b\x32&.temporal.api.common.v1.Callback.NexusH\x00\x12=\n\x08internal\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.Callback.InternalH\x00\x12+\n\x05links\x18\x64 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x1a\x87\x01\n\x05Nexus\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x42\n\x06header\x18\x02 \x03(\x0b\x32\x32.temporal.api.common.v1.Callback.Nexus.HeaderEntry\x1a-\n\x0bHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x18\n\x08Internal\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x42\t\n\x07variantJ\x04\x08\x01\x10\x02"\xe9\x04\n\x04Link\x12\x44\n\x0eworkflow_event\x18\x01 \x01(\x0b\x32*.temporal.api.common.v1.Link.WorkflowEventH\x00\x12:\n\tbatch_job\x18\x02 \x01(\x0b\x32%.temporal.api.common.v1.Link.BatchJobH\x00\x1a\xb7\x03\n\rWorkflowEvent\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12N\n\tevent_ref\x18\x64 \x01(\x0b\x32\x39.temporal.api.common.v1.Link.WorkflowEvent.EventReferenceH\x00\x12W\n\x0erequest_id_ref\x18\x65 \x01(\x0b\x32=.temporal.api.common.v1.Link.WorkflowEvent.RequestIdReferenceH\x00\x1aX\n\x0e\x45ventReference\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\x03\x12\x34\n\nevent_type\x18\x02 \x01(\x0e\x32 .temporal.api.enums.v1.EventType\x1a^\n\x12RequestIdReference\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x34\n\nevent_type\x18\x02 \x01(\x0e\x32 .temporal.api.enums.v1.EventTypeB\x0b\n\treference\x1a\x1a\n\x08\x42\x61tchJob\x12\x0e\n\x06job_id\x18\x01 \x01(\tB\t\n\x07variant"O\n\x08Priority\x12\x14\n\x0cpriority_key\x18\x01 \x01(\x05\x12\x14\n\x0c\x66\x61irness_key\x18\x02 \x01(\t\x12\x17\n\x0f\x66\x61irness_weight\x18\x03 \x01(\x02";\n\x0eWorkerSelector\x12\x1d\n\x13worker_instance_key\x18\x01 \x01(\tH\x00\x42\n\n\x08selectorB\x89\x01\n\x19io.temporal.api.common.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/common/v1;common\xaa\x02\x18Temporalio.Api.Common.V1\xea\x02\x1bTemporalio::Api::Common::V1b\x06proto3' + b'\n$temporal/api/common/v1/message.proto\x12\x16temporal.api.common.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a"temporal/api/enums/v1/common.proto\x1a&temporal/api/enums/v1/event_type.proto\x1a!temporal/api/enums/v1/reset.proto"T\n\x08\x44\x61taBlob\x12:\n\rencoding_type\x18\x01 \x01(\x0e\x32#.temporal.api.enums.v1.EncodingType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c"=\n\x08Payloads\x12\x31\n\x08payloads\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload"\x8a\x02\n\x07Payload\x12?\n\x08metadata\x18\x01 \x03(\x0b\x32-.temporal.api.common.v1.Payload.MetadataEntry\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12Q\n\x11\x65xternal_payloads\x18\x03 \x03(\x0b\x32\x36.temporal.api.common.v1.Payload.ExternalPayloadDetails\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a,\n\x16\x45xternalPayloadDetails\x12\x12\n\nsize_bytes\x18\x01 \x01(\x03"\xbe\x01\n\x10SearchAttributes\x12S\n\x0eindexed_fields\x18\x01 \x03(\x0b\x32;.temporal.api.common.v1.SearchAttributes.IndexedFieldsEntry\x1aU\n\x12IndexedFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x90\x01\n\x04Memo\x12\x38\n\x06\x66ields\x18\x01 \x03(\x0b\x32(.temporal.api.common.v1.Memo.FieldsEntry\x1aN\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x94\x01\n\x06Header\x12:\n\x06\x66ields\x18\x01 \x03(\x0b\x32*.temporal.api.common.v1.Header.FieldsEntry\x1aN\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"8\n\x11WorkflowExecution\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t"d\n\tExecution\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32$.temporal.api.enums.v1.ExecutionType\x12\x13\n\x0b\x62usiness_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t"\x1c\n\x0cWorkflowType\x12\x0c\n\x04name\x18\x01 \x01(\t"\x1c\n\x0c\x41\x63tivityType\x12\x0c\n\x04name\x18\x01 \x01(\t"\xd1\x01\n\x0bRetryPolicy\x12\x33\n\x10initial_interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1b\n\x13\x62\x61\x63koff_coefficient\x18\x02 \x01(\x01\x12\x33\n\x10maximum_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10maximum_attempts\x18\x04 \x01(\x05\x12!\n\x19non_retryable_error_types\x18\x05 \x03(\t"F\n\x10MeteringMetadata\x12\x32\n*nonfirst_local_activity_execution_attempts\x18\r \x01(\r">\n\x12WorkerVersionStamp\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x16\n\x0euse_versioning\x18\x03 \x01(\x08"e\n\x19WorkerVersionCapabilities\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x16\n\x0euse_versioning\x18\x02 \x01(\x08\x12\x1e\n\x16\x64\x65ployment_series_name\x18\x04 \x01(\t"\xed\x02\n\x0cResetOptions\x12\x35\n\x13\x66irst_workflow_task\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x34\n\x12last_workflow_task\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x1a\n\x10workflow_task_id\x18\x03 \x01(\x03H\x00\x12\x12\n\x08\x62uild_id\x18\x04 \x01(\tH\x00\x12G\n\x12reset_reapply_type\x18\n \x01(\x0e\x32\'.temporal.api.enums.v1.ResetReapplyTypeB\x02\x18\x01\x12\x18\n\x10\x63urrent_run_only\x18\x0b \x01(\x08\x12S\n\x1breset_reapply_exclude_types\x18\x0c \x03(\x0e\x32..temporal.api.enums.v1.ResetReapplyExcludeTypeB\x08\n\x06target"\xb3\x04\n\x08\x43\x61llback\x12\x37\n\x05nexus\x18\x02 \x01(\x0b\x32&.temporal.api.common.v1.Callback.NexusH\x00\x12=\n\x08internal\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.Callback.InternalH\x00\x12\x46\n\rnexus_handler\x18\x04 \x01(\x0b\x32-.temporal.api.common.v1.Callback.NexusHandlerH\x00\x12+\n\x05links\x18\x64 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x1a\x87\x01\n\x05Nexus\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x42\n\x06header\x18\x02 \x03(\x0b\x32\x32.temporal.api.common.v1.Callback.Nexus.HeaderEntry\x1a-\n\x0bHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x18\n\x08Internal\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x1a\x84\x01\n\x0cNexusHandler\x12\x17\n\x0ftask_queue_name\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x11\n\toperation\x18\x03 \x01(\t\x12\x37\n\x0esource_context\x18\x04 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadB\t\n\x07variantJ\x04\x08\x01\x10\x02"\xc6\t\n\x04Link\x12\x44\n\x0eworkflow_event\x18\x01 \x01(\x0b\x32*.temporal.api.common.v1.Link.WorkflowEventH\x00\x12:\n\tbatch_job\x18\x02 \x01(\x0b\x32%.temporal.api.common.v1.Link.BatchJobH\x00\x12\x39\n\x08\x61\x63tivity\x18\x03 \x01(\x0b\x32%.temporal.api.common.v1.Link.ActivityH\x00\x12\x46\n\x0fnexus_operation\x18\x04 \x01(\x0b\x32+.temporal.api.common.v1.Link.NexusOperationH\x00\x12\x39\n\x08workflow\x18\x05 \x01(\x0b\x32%.temporal.api.common.v1.Link.WorkflowH\x00\x12\x39\n\x08\x63\x61llback\x18\x06 \x01(\x0b\x32%.temporal.api.common.v1.Link.CallbackH\x00\x1a\xb7\x03\n\rWorkflowEvent\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12N\n\tevent_ref\x18\x64 \x01(\x0b\x32\x39.temporal.api.common.v1.Link.WorkflowEvent.EventReferenceH\x00\x12W\n\x0erequest_id_ref\x18\x65 \x01(\x0b\x32=.temporal.api.common.v1.Link.WorkflowEvent.RequestIdReferenceH\x00\x1aX\n\x0e\x45ventReference\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\x03\x12\x34\n\nevent_type\x18\x02 \x01(\x0e\x32 .temporal.api.enums.v1.EventType\x1a^\n\x12RequestIdReference\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x34\n\nevent_type\x18\x02 \x01(\x0e\x32 .temporal.api.enums.v1.EventTypeB\x0b\n\treference\x1a\x1a\n\x08\x42\x61tchJob\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x1a\x42\n\x08\x41\x63tivity\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x1aI\n\x0eNexusOperation\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0coperation_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x1aR\n\x08Workflow\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x0e\n\x06reason\x18\x04 \x01(\t\x1a\x7f\n\x08\x43\x61llback\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x34\n\texecution\x18\x02 \x01(\x0b\x32!.temporal.api.common.v1.Execution\x12\x16\n\x0e\x63omponent_path\x18\x03 \x03(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\tB\t\n\x07variant"\'\n\tPrincipal\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t"=\n\x11ResolvedPrincipal\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x1a\n\x12name_at_write_time\x18\x02 \x01(\t"O\n\x08Priority\x12\x14\n\x0cpriority_key\x18\x01 \x01(\x05\x12\x14\n\x0c\x66\x61irness_key\x18\x02 \x01(\t\x12\x17\n\x0f\x66\x61irness_weight\x18\x03 \x01(\x02";\n\x0eWorkerSelector\x12\x1d\n\x13worker_instance_key\x18\x01 \x01(\tH\x00\x42\n\n\x08selector"i\n\x11OnConflictOptions\x12\x19\n\x11\x61ttach_request_id\x18\x01 \x01(\x08\x12#\n\x1b\x61ttach_completion_callbacks\x18\x02 \x01(\x08\x12\x14\n\x0c\x61ttach_links\x18\x03 \x01(\x08"\xaa\x01\n\x12TimeSkippingConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x46\n\x13\x66\x61st_forward_config\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.FastForwardConfig\x12\x1b\n\x13\x64isable_propagation\x18\x03 \x01(\x08\x12\x1e\n\x16max_session_skip_count\x18\x04 \x01(\x05"L\n\x11\x46\x61stForwardConfig\x12\n\n\x02id\x18\x01 \x01(\t\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration"\xb5\x01\n\x1cTimeSkippingStatePropagation\x12;\n\x18initial_skipped_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x18\x66\x61st_forward_target_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12initial_skip_count\x18\x03 \x01(\x05"\xfe\x01\n\x10TimeSkippingInfo\x12\x30\n\x0c\x63urrent_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x10\x65\x66\x66\x65\x63tive_config\x18\x02 \x01(\x0b\x32*.temporal.api.common.v1.TimeSkippingConfig\x12N\n\x11\x66\x61st_forward_info\x18\x04 \x01(\x0b\x32\x33.temporal.api.common.v1.TimeSkippingFastForwardInfo\x12"\n\x1a\x63urrent_session_skip_count\x18\x06 \x01(\x05"\xb8\x01\n\x1bTimeSkippingFastForwardInfo\x12\x38\n\x15\x66\x61st_forward_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0f\x66\x61st_forward_id\x18\x02 \x01(\t\x12/\n\x0btarget_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rhas_completed\x18\x04 \x01(\x08\x42\x89\x01\n\x19io.temporal.api.common.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/common/v1;common\xaa\x02\x18Temporalio.Api.Common.V1\xea\x02\x1bTemporalio::Api::Common::V1b\x06proto3' ) - -_DATABLOB = DESCRIPTOR.message_types_by_name["DataBlob"] -_PAYLOADS = DESCRIPTOR.message_types_by_name["Payloads"] -_PAYLOAD = DESCRIPTOR.message_types_by_name["Payload"] -_PAYLOAD_METADATAENTRY = _PAYLOAD.nested_types_by_name["MetadataEntry"] -_SEARCHATTRIBUTES = DESCRIPTOR.message_types_by_name["SearchAttributes"] -_SEARCHATTRIBUTES_INDEXEDFIELDSENTRY = _SEARCHATTRIBUTES.nested_types_by_name[ - "IndexedFieldsEntry" -] -_MEMO = DESCRIPTOR.message_types_by_name["Memo"] -_MEMO_FIELDSENTRY = _MEMO.nested_types_by_name["FieldsEntry"] -_HEADER = DESCRIPTOR.message_types_by_name["Header"] -_HEADER_FIELDSENTRY = _HEADER.nested_types_by_name["FieldsEntry"] -_WORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name["WorkflowExecution"] -_WORKFLOWTYPE = DESCRIPTOR.message_types_by_name["WorkflowType"] -_ACTIVITYTYPE = DESCRIPTOR.message_types_by_name["ActivityType"] -_RETRYPOLICY = DESCRIPTOR.message_types_by_name["RetryPolicy"] -_METERINGMETADATA = DESCRIPTOR.message_types_by_name["MeteringMetadata"] -_WORKERVERSIONSTAMP = DESCRIPTOR.message_types_by_name["WorkerVersionStamp"] -_WORKERVERSIONCAPABILITIES = DESCRIPTOR.message_types_by_name[ - "WorkerVersionCapabilities" -] -_RESETOPTIONS = DESCRIPTOR.message_types_by_name["ResetOptions"] -_CALLBACK = DESCRIPTOR.message_types_by_name["Callback"] -_CALLBACK_NEXUS = _CALLBACK.nested_types_by_name["Nexus"] -_CALLBACK_NEXUS_HEADERENTRY = _CALLBACK_NEXUS.nested_types_by_name["HeaderEntry"] -_CALLBACK_INTERNAL = _CALLBACK.nested_types_by_name["Internal"] -_LINK = DESCRIPTOR.message_types_by_name["Link"] -_LINK_WORKFLOWEVENT = _LINK.nested_types_by_name["WorkflowEvent"] -_LINK_WORKFLOWEVENT_EVENTREFERENCE = _LINK_WORKFLOWEVENT.nested_types_by_name[ - "EventReference" -] -_LINK_WORKFLOWEVENT_REQUESTIDREFERENCE = _LINK_WORKFLOWEVENT.nested_types_by_name[ - "RequestIdReference" -] -_LINK_BATCHJOB = _LINK.nested_types_by_name["BatchJob"] -_PRIORITY = DESCRIPTOR.message_types_by_name["Priority"] -_WORKERSELECTOR = DESCRIPTOR.message_types_by_name["WorkerSelector"] -DataBlob = _reflection.GeneratedProtocolMessageType( - "DataBlob", - (_message.Message,), - { - "DESCRIPTOR": _DATABLOB, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.DataBlob) - }, -) -_sym_db.RegisterMessage(DataBlob) - -Payloads = _reflection.GeneratedProtocolMessageType( - "Payloads", - (_message.Message,), - { - "DESCRIPTOR": _PAYLOADS, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Payloads) - }, -) -_sym_db.RegisterMessage(Payloads) - -Payload = _reflection.GeneratedProtocolMessageType( - "Payload", - (_message.Message,), - { - "MetadataEntry": _reflection.GeneratedProtocolMessageType( - "MetadataEntry", - (_message.Message,), - { - "DESCRIPTOR": _PAYLOAD_METADATAENTRY, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Payload.MetadataEntry) - }, - ), - "DESCRIPTOR": _PAYLOAD, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Payload) - }, -) -_sym_db.RegisterMessage(Payload) -_sym_db.RegisterMessage(Payload.MetadataEntry) - -SearchAttributes = _reflection.GeneratedProtocolMessageType( - "SearchAttributes", - (_message.Message,), - { - "IndexedFieldsEntry": _reflection.GeneratedProtocolMessageType( - "IndexedFieldsEntry", - (_message.Message,), - { - "DESCRIPTOR": _SEARCHATTRIBUTES_INDEXEDFIELDSENTRY, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.SearchAttributes.IndexedFieldsEntry) - }, - ), - "DESCRIPTOR": _SEARCHATTRIBUTES, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.SearchAttributes) - }, -) -_sym_db.RegisterMessage(SearchAttributes) -_sym_db.RegisterMessage(SearchAttributes.IndexedFieldsEntry) - -Memo = _reflection.GeneratedProtocolMessageType( - "Memo", - (_message.Message,), - { - "FieldsEntry": _reflection.GeneratedProtocolMessageType( - "FieldsEntry", - (_message.Message,), - { - "DESCRIPTOR": _MEMO_FIELDSENTRY, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Memo.FieldsEntry) - }, - ), - "DESCRIPTOR": _MEMO, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Memo) - }, -) -_sym_db.RegisterMessage(Memo) -_sym_db.RegisterMessage(Memo.FieldsEntry) - -Header = _reflection.GeneratedProtocolMessageType( - "Header", - (_message.Message,), - { - "FieldsEntry": _reflection.GeneratedProtocolMessageType( - "FieldsEntry", - (_message.Message,), - { - "DESCRIPTOR": _HEADER_FIELDSENTRY, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Header.FieldsEntry) - }, - ), - "DESCRIPTOR": _HEADER, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Header) - }, -) -_sym_db.RegisterMessage(Header) -_sym_db.RegisterMessage(Header.FieldsEntry) - -WorkflowExecution = _reflection.GeneratedProtocolMessageType( - "WorkflowExecution", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTION, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.WorkflowExecution) - }, -) -_sym_db.RegisterMessage(WorkflowExecution) - -WorkflowType = _reflection.GeneratedProtocolMessageType( - "WorkflowType", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWTYPE, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.WorkflowType) - }, -) -_sym_db.RegisterMessage(WorkflowType) - -ActivityType = _reflection.GeneratedProtocolMessageType( - "ActivityType", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTYPE, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.ActivityType) - }, -) -_sym_db.RegisterMessage(ActivityType) - -RetryPolicy = _reflection.GeneratedProtocolMessageType( - "RetryPolicy", - (_message.Message,), - { - "DESCRIPTOR": _RETRYPOLICY, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.RetryPolicy) - }, -) -_sym_db.RegisterMessage(RetryPolicy) - -MeteringMetadata = _reflection.GeneratedProtocolMessageType( - "MeteringMetadata", - (_message.Message,), - { - "DESCRIPTOR": _METERINGMETADATA, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.MeteringMetadata) - }, -) -_sym_db.RegisterMessage(MeteringMetadata) - -WorkerVersionStamp = _reflection.GeneratedProtocolMessageType( - "WorkerVersionStamp", - (_message.Message,), - { - "DESCRIPTOR": _WORKERVERSIONSTAMP, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.WorkerVersionStamp) - }, -) -_sym_db.RegisterMessage(WorkerVersionStamp) - -WorkerVersionCapabilities = _reflection.GeneratedProtocolMessageType( - "WorkerVersionCapabilities", - (_message.Message,), - { - "DESCRIPTOR": _WORKERVERSIONCAPABILITIES, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.WorkerVersionCapabilities) - }, -) -_sym_db.RegisterMessage(WorkerVersionCapabilities) - -ResetOptions = _reflection.GeneratedProtocolMessageType( - "ResetOptions", - (_message.Message,), - { - "DESCRIPTOR": _RESETOPTIONS, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.ResetOptions) - }, -) -_sym_db.RegisterMessage(ResetOptions) - -Callback = _reflection.GeneratedProtocolMessageType( - "Callback", - (_message.Message,), - { - "Nexus": _reflection.GeneratedProtocolMessageType( - "Nexus", - (_message.Message,), - { - "HeaderEntry": _reflection.GeneratedProtocolMessageType( - "HeaderEntry", - (_message.Message,), - { - "DESCRIPTOR": _CALLBACK_NEXUS_HEADERENTRY, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Callback.Nexus.HeaderEntry) - }, - ), - "DESCRIPTOR": _CALLBACK_NEXUS, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Callback.Nexus) - }, - ), - "Internal": _reflection.GeneratedProtocolMessageType( - "Internal", - (_message.Message,), - { - "DESCRIPTOR": _CALLBACK_INTERNAL, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Callback.Internal) - }, - ), - "DESCRIPTOR": _CALLBACK, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Callback) - }, -) -_sym_db.RegisterMessage(Callback) -_sym_db.RegisterMessage(Callback.Nexus) -_sym_db.RegisterMessage(Callback.Nexus.HeaderEntry) -_sym_db.RegisterMessage(Callback.Internal) - -Link = _reflection.GeneratedProtocolMessageType( - "Link", - (_message.Message,), - { - "WorkflowEvent": _reflection.GeneratedProtocolMessageType( - "WorkflowEvent", - (_message.Message,), - { - "EventReference": _reflection.GeneratedProtocolMessageType( - "EventReference", - (_message.Message,), - { - "DESCRIPTOR": _LINK_WORKFLOWEVENT_EVENTREFERENCE, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Link.WorkflowEvent.EventReference) - }, - ), - "RequestIdReference": _reflection.GeneratedProtocolMessageType( - "RequestIdReference", - (_message.Message,), - { - "DESCRIPTOR": _LINK_WORKFLOWEVENT_REQUESTIDREFERENCE, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Link.WorkflowEvent.RequestIdReference) - }, - ), - "DESCRIPTOR": _LINK_WORKFLOWEVENT, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Link.WorkflowEvent) - }, - ), - "BatchJob": _reflection.GeneratedProtocolMessageType( - "BatchJob", - (_message.Message,), - { - "DESCRIPTOR": _LINK_BATCHJOB, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Link.BatchJob) - }, - ), - "DESCRIPTOR": _LINK, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Link) - }, -) -_sym_db.RegisterMessage(Link) -_sym_db.RegisterMessage(Link.WorkflowEvent) -_sym_db.RegisterMessage(Link.WorkflowEvent.EventReference) -_sym_db.RegisterMessage(Link.WorkflowEvent.RequestIdReference) -_sym_db.RegisterMessage(Link.BatchJob) - -Priority = _reflection.GeneratedProtocolMessageType( - "Priority", - (_message.Message,), - { - "DESCRIPTOR": _PRIORITY, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.Priority) - }, -) -_sym_db.RegisterMessage(Priority) - -WorkerSelector = _reflection.GeneratedProtocolMessageType( - "WorkerSelector", - (_message.Message,), - { - "DESCRIPTOR": _WORKERSELECTOR, - "__module__": "temporalio.api.common.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.common.v1.WorkerSelector) - }, -) -_sym_db.RegisterMessage(WorkerSelector) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\031io.temporal.api.common.v1B\014MessageProtoP\001Z#go.temporal.io/api/common/v1;common\252\002\030Temporalio.Api.Common.V1\352\002\033Temporalio::Api::Common::V1" @@ -392,62 +48,92 @@ _RESETOPTIONS.fields_by_name["reset_reapply_type"]._serialized_options = b"\030\001" _CALLBACK_NEXUS_HEADERENTRY._options = None _CALLBACK_NEXUS_HEADERENTRY._serialized_options = b"8\001" - _DATABLOB._serialized_start = 236 - _DATABLOB._serialized_end = 320 - _PAYLOADS._serialized_start = 322 - _PAYLOADS._serialized_end = 383 - _PAYLOAD._serialized_start = 386 - _PAYLOAD._serialized_end = 523 - _PAYLOAD_METADATAENTRY._serialized_start = 476 - _PAYLOAD_METADATAENTRY._serialized_end = 523 - _SEARCHATTRIBUTES._serialized_start = 526 - _SEARCHATTRIBUTES._serialized_end = 716 - _SEARCHATTRIBUTES_INDEXEDFIELDSENTRY._serialized_start = 631 - _SEARCHATTRIBUTES_INDEXEDFIELDSENTRY._serialized_end = 716 - _MEMO._serialized_start = 719 - _MEMO._serialized_end = 863 - _MEMO_FIELDSENTRY._serialized_start = 785 - _MEMO_FIELDSENTRY._serialized_end = 863 - _HEADER._serialized_start = 866 - _HEADER._serialized_end = 1014 - _HEADER_FIELDSENTRY._serialized_start = 785 - _HEADER_FIELDSENTRY._serialized_end = 863 - _WORKFLOWEXECUTION._serialized_start = 1016 - _WORKFLOWEXECUTION._serialized_end = 1072 - _WORKFLOWTYPE._serialized_start = 1074 - _WORKFLOWTYPE._serialized_end = 1102 - _ACTIVITYTYPE._serialized_start = 1104 - _ACTIVITYTYPE._serialized_end = 1132 - _RETRYPOLICY._serialized_start = 1135 - _RETRYPOLICY._serialized_end = 1344 - _METERINGMETADATA._serialized_start = 1346 - _METERINGMETADATA._serialized_end = 1416 - _WORKERVERSIONSTAMP._serialized_start = 1418 - _WORKERVERSIONSTAMP._serialized_end = 1480 - _WORKERVERSIONCAPABILITIES._serialized_start = 1482 - _WORKERVERSIONCAPABILITIES._serialized_end = 1583 - _RESETOPTIONS._serialized_start = 1586 - _RESETOPTIONS._serialized_end = 1951 - _CALLBACK._serialized_start = 1954 - _CALLBACK._serialized_end = 2310 - _CALLBACK_NEXUS._serialized_start = 2132 - _CALLBACK_NEXUS._serialized_end = 2267 - _CALLBACK_NEXUS_HEADERENTRY._serialized_start = 2222 - _CALLBACK_NEXUS_HEADERENTRY._serialized_end = 2267 - _CALLBACK_INTERNAL._serialized_start = 2269 - _CALLBACK_INTERNAL._serialized_end = 2293 - _LINK._serialized_start = 2313 - _LINK._serialized_end = 2930 - _LINK_WORKFLOWEVENT._serialized_start = 2452 - _LINK_WORKFLOWEVENT._serialized_end = 2891 - _LINK_WORKFLOWEVENT_EVENTREFERENCE._serialized_start = 2694 - _LINK_WORKFLOWEVENT_EVENTREFERENCE._serialized_end = 2782 - _LINK_WORKFLOWEVENT_REQUESTIDREFERENCE._serialized_start = 2784 - _LINK_WORKFLOWEVENT_REQUESTIDREFERENCE._serialized_end = 2878 - _LINK_BATCHJOB._serialized_start = 2893 - _LINK_BATCHJOB._serialized_end = 2919 - _PRIORITY._serialized_start = 2932 - _PRIORITY._serialized_end = 3011 - _WORKERSELECTOR._serialized_start = 3013 - _WORKERSELECTOR._serialized_end = 3072 + _DATABLOB._serialized_start = 269 + _DATABLOB._serialized_end = 353 + _PAYLOADS._serialized_start = 355 + _PAYLOADS._serialized_end = 416 + _PAYLOAD._serialized_start = 419 + _PAYLOAD._serialized_end = 685 + _PAYLOAD_METADATAENTRY._serialized_start = 592 + _PAYLOAD_METADATAENTRY._serialized_end = 639 + _PAYLOAD_EXTERNALPAYLOADDETAILS._serialized_start = 641 + _PAYLOAD_EXTERNALPAYLOADDETAILS._serialized_end = 685 + _SEARCHATTRIBUTES._serialized_start = 688 + _SEARCHATTRIBUTES._serialized_end = 878 + _SEARCHATTRIBUTES_INDEXEDFIELDSENTRY._serialized_start = 793 + _SEARCHATTRIBUTES_INDEXEDFIELDSENTRY._serialized_end = 878 + _MEMO._serialized_start = 881 + _MEMO._serialized_end = 1025 + _MEMO_FIELDSENTRY._serialized_start = 947 + _MEMO_FIELDSENTRY._serialized_end = 1025 + _HEADER._serialized_start = 1028 + _HEADER._serialized_end = 1176 + _HEADER_FIELDSENTRY._serialized_start = 947 + _HEADER_FIELDSENTRY._serialized_end = 1025 + _WORKFLOWEXECUTION._serialized_start = 1178 + _WORKFLOWEXECUTION._serialized_end = 1234 + _EXECUTION._serialized_start = 1236 + _EXECUTION._serialized_end = 1336 + _WORKFLOWTYPE._serialized_start = 1338 + _WORKFLOWTYPE._serialized_end = 1366 + _ACTIVITYTYPE._serialized_start = 1368 + _ACTIVITYTYPE._serialized_end = 1396 + _RETRYPOLICY._serialized_start = 1399 + _RETRYPOLICY._serialized_end = 1608 + _METERINGMETADATA._serialized_start = 1610 + _METERINGMETADATA._serialized_end = 1680 + _WORKERVERSIONSTAMP._serialized_start = 1682 + _WORKERVERSIONSTAMP._serialized_end = 1744 + _WORKERVERSIONCAPABILITIES._serialized_start = 1746 + _WORKERVERSIONCAPABILITIES._serialized_end = 1847 + _RESETOPTIONS._serialized_start = 1850 + _RESETOPTIONS._serialized_end = 2215 + _CALLBACK._serialized_start = 2218 + _CALLBACK._serialized_end = 2781 + _CALLBACK_NEXUS._serialized_start = 2468 + _CALLBACK_NEXUS._serialized_end = 2603 + _CALLBACK_NEXUS_HEADERENTRY._serialized_start = 2558 + _CALLBACK_NEXUS_HEADERENTRY._serialized_end = 2603 + _CALLBACK_INTERNAL._serialized_start = 2605 + _CALLBACK_INTERNAL._serialized_end = 2629 + _CALLBACK_NEXUSHANDLER._serialized_start = 2632 + _CALLBACK_NEXUSHANDLER._serialized_end = 2764 + _LINK._serialized_start = 2784 + _LINK._serialized_end = 4006 + _LINK_WORKFLOWEVENT._serialized_start = 3172 + _LINK_WORKFLOWEVENT._serialized_end = 3611 + _LINK_WORKFLOWEVENT_EVENTREFERENCE._serialized_start = 3414 + _LINK_WORKFLOWEVENT_EVENTREFERENCE._serialized_end = 3502 + _LINK_WORKFLOWEVENT_REQUESTIDREFERENCE._serialized_start = 3504 + _LINK_WORKFLOWEVENT_REQUESTIDREFERENCE._serialized_end = 3598 + _LINK_BATCHJOB._serialized_start = 3613 + _LINK_BATCHJOB._serialized_end = 3639 + _LINK_ACTIVITY._serialized_start = 3641 + _LINK_ACTIVITY._serialized_end = 3707 + _LINK_NEXUSOPERATION._serialized_start = 3709 + _LINK_NEXUSOPERATION._serialized_end = 3782 + _LINK_WORKFLOW._serialized_start = 3784 + _LINK_WORKFLOW._serialized_end = 3866 + _LINK_CALLBACK._serialized_start = 3868 + _LINK_CALLBACK._serialized_end = 3995 + _PRINCIPAL._serialized_start = 4008 + _PRINCIPAL._serialized_end = 4047 + _RESOLVEDPRINCIPAL._serialized_start = 4049 + _RESOLVEDPRINCIPAL._serialized_end = 4110 + _PRIORITY._serialized_start = 4112 + _PRIORITY._serialized_end = 4191 + _WORKERSELECTOR._serialized_start = 4193 + _WORKERSELECTOR._serialized_end = 4252 + _ONCONFLICTOPTIONS._serialized_start = 4254 + _ONCONFLICTOPTIONS._serialized_end = 4359 + _TIMESKIPPINGCONFIG._serialized_start = 4362 + _TIMESKIPPINGCONFIG._serialized_end = 4532 + _FASTFORWARDCONFIG._serialized_start = 4534 + _FASTFORWARDCONFIG._serialized_end = 4610 + _TIMESKIPPINGSTATEPROPAGATION._serialized_start = 4613 + _TIMESKIPPINGSTATEPROPAGATION._serialized_end = 4794 + _TIMESKIPPINGINFO._serialized_start = 4797 + _TIMESKIPPINGINFO._serialized_end = 5051 + _TIMESKIPPINGFASTFORWARDINFO._serialized_start = 5054 + _TIMESKIPPINGFASTFORWARDINFO._serialized_end = 5238 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/common/v1/message_pb2.pyi b/temporalio/api/common/v1/message_pb2.pyi index 1ef9a9c76f..6fea2d4b9d 100644 --- a/temporalio/api/common/v1/message_pb2.pyi +++ b/temporalio/api/common/v1/message_pb2.pyi @@ -5,25 +5,22 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 import google.protobuf.empty_pb2 import google.protobuf.internal.containers import google.protobuf.message +import google.protobuf.timestamp_pb2 import temporalio.api.enums.v1.common_pb2 import temporalio.api.enums.v1.event_type_pb2 import temporalio.api.enums.v1.reset_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class DataBlob(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -39,13 +36,12 @@ class DataBlob(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "data", b"data", "encoding_type", b"encoding_type" - ], + field_name: typing.Literal["data", b"data", "encoding_type", b"encoding_type"], ) -> None: ... global___DataBlob = DataBlob +@typing.final class Payloads(google.protobuf.message.Message): """See `Payload`""" @@ -64,11 +60,12 @@ class Payloads(google.protobuf.message.Message): payloads: collections.abc.Iterable[global___Payload] | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["payloads", b"payloads"] + self, field_name: typing.Literal["payloads", b"payloads"] ) -> None: ... global___Payloads = Payloads +@typing.final class Payload(google.protobuf.message.Message): """Represents some binary (byte array) data (ex: activity input parameters or workflow result) with metadata which describes this binary data (format, encoding, encryption, etc). Serialization @@ -77,6 +74,7 @@ class Payload(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class MetadataEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -91,32 +89,70 @@ class Payload(google.protobuf.message.Message): value: builtins.bytes = ..., ) -> None: ... def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + @typing.final + class ExternalPayloadDetails(google.protobuf.message.Message): + """Describes an externally stored object referenced by this payload.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SIZE_BYTES_FIELD_NUMBER: builtins.int + size_bytes: builtins.int + """Size in bytes of the externally stored payload""" + def __init__( self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + *, + size_bytes: builtins.int = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["size_bytes", b"size_bytes"] ) -> None: ... METADATA_FIELD_NUMBER: builtins.int DATA_FIELD_NUMBER: builtins.int + EXTERNAL_PAYLOADS_FIELD_NUMBER: builtins.int + data: builtins.bytes @property def metadata( self, ) -> google.protobuf.internal.containers.ScalarMap[ builtins.str, builtins.bytes ]: ... - data: builtins.bytes + @property + def external_payloads( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___Payload.ExternalPayloadDetails + ]: + """Details about externally stored payloads associated with this payload.""" + def __init__( self, *, metadata: collections.abc.Mapping[builtins.str, builtins.bytes] | None = ..., data: builtins.bytes = ..., + external_payloads: collections.abc.Iterable[ + global___Payload.ExternalPayloadDetails + ] + | None = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal["data", b"data", "metadata", b"metadata"], + field_name: typing.Literal[ + "data", + b"data", + "external_payloads", + b"external_payloads", + "metadata", + b"metadata", + ], ) -> None: ... global___Payload = Payload +@typing.final class SearchAttributes(google.protobuf.message.Message): """A user-defined set of *indexed* fields that are used/exposed when listing/searching workflows. The payload is not serialized in a user-defined way. @@ -124,6 +160,7 @@ class SearchAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class IndexedFieldsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -139,11 +176,10 @@ class SearchAttributes(google.protobuf.message.Message): value: global___Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... INDEXED_FIELDS_FIELD_NUMBER: builtins.int @@ -160,16 +196,18 @@ class SearchAttributes(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["indexed_fields", b"indexed_fields"] + self, field_name: typing.Literal["indexed_fields", b"indexed_fields"] ) -> None: ... global___SearchAttributes = SearchAttributes +@typing.final class Memo(google.protobuf.message.Message): """A user-defined set of *unindexed* fields that are exposed when listing/searching workflows""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class FieldsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -185,11 +223,10 @@ class Memo(google.protobuf.message.Message): value: global___Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... FIELDS_FIELD_NUMBER: builtins.int @@ -204,12 +241,11 @@ class Memo(google.protobuf.message.Message): *, fields: collections.abc.Mapping[builtins.str, global___Payload] | None = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["fields", b"fields"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["fields", b"fields"]) -> None: ... global___Memo = Memo +@typing.final class Header(google.protobuf.message.Message): """Contains metadata that can be attached to a variety of requests, like starting a workflow, and can be propagated between, for example, workflows and activities. @@ -217,6 +253,7 @@ class Header(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class FieldsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -232,11 +269,10 @@ class Header(google.protobuf.message.Message): value: global___Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... FIELDS_FIELD_NUMBER: builtins.int @@ -251,12 +287,11 @@ class Header(google.protobuf.message.Message): *, fields: collections.abc.Mapping[builtins.str, global___Payload] | None = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["fields", b"fields"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["fields", b"fields"]) -> None: ... global___Header = Header +@typing.final class WorkflowExecution(google.protobuf.message.Message): """Identifies a specific workflow within a namespace. Practically speaking, because run_id is a uuid, a workflow execution is globally unique. Note that many commands allow specifying an empty @@ -277,13 +312,40 @@ class WorkflowExecution(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "run_id", b"run_id", "workflow_id", b"workflow_id" - ], + field_name: typing.Literal["run_id", b"run_id", "workflow_id", b"workflow_id"], ) -> None: ... global___WorkflowExecution = WorkflowExecution +@typing.final +class Execution(google.protobuf.message.Message): + """Identifies a specific execution within a namespace.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + BUSINESS_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + type: temporalio.api.enums.v1.common_pb2.ExecutionType.ValueType + business_id: builtins.str + run_id: builtins.str + def __init__( + self, + *, + type: temporalio.api.enums.v1.common_pb2.ExecutionType.ValueType = ..., + business_id: builtins.str = ..., + run_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "business_id", b"business_id", "run_id", b"run_id", "type", b"type" + ], + ) -> None: ... + +global___Execution = Execution + +@typing.final class WorkflowType(google.protobuf.message.Message): """Represents the identifier used by a workflow author to define the workflow. Typically, the name of a function. This is sometimes referred to as the workflow's "name" @@ -298,12 +360,11 @@ class WorkflowType(google.protobuf.message.Message): *, name: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["name", b"name"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["name", b"name"]) -> None: ... global___WorkflowType = WorkflowType +@typing.final class ActivityType(google.protobuf.message.Message): """Represents the identifier used by a activity author to define the activity. Typically, the name of a function. This is sometimes referred to as the activity's "name" @@ -318,12 +379,11 @@ class ActivityType(google.protobuf.message.Message): *, name: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["name", b"name"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["name", b"name"]) -> None: ... global___ActivityType = ActivityType +@typing.final class RetryPolicy(google.protobuf.message.Message): """How retries ought to be handled, usable by both workflows and activities""" @@ -334,23 +394,25 @@ class RetryPolicy(google.protobuf.message.Message): MAXIMUM_INTERVAL_FIELD_NUMBER: builtins.int MAXIMUM_ATTEMPTS_FIELD_NUMBER: builtins.int NON_RETRYABLE_ERROR_TYPES_FIELD_NUMBER: builtins.int - @property - def initial_interval(self) -> google.protobuf.duration_pb2.Duration: - """Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.""" backoff_coefficient: builtins.float """Coefficient used to calculate the next retry interval. The next retry interval is previous interval multiplied by the coefficient. Must be 1 or larger. """ + maximum_attempts: builtins.int + """Maximum number of attempts. When exceeded the retries stop even if not expired yet. + 1 disables retries. 0 means unlimited (up to the timeouts) + """ + @property + def initial_interval(self) -> google.protobuf.duration_pb2.Duration: + """Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.""" + @property def maximum_interval(self) -> google.protobuf.duration_pb2.Duration: """Maximum interval between retries. Exponential backoff leads to interval increase. This value is the cap of the increase. Default is 100x of the initial interval. """ - maximum_attempts: builtins.int - """Maximum number of attempts. When exceeded the retries stop even if not expired yet. - 1 disables retries. 0 means unlimited (up to the timeouts) - """ + @property def non_retryable_error_types( self, @@ -358,6 +420,7 @@ class RetryPolicy(google.protobuf.message.Message): """Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that this is not a substring match, the error *type* (not message) must match exactly. """ + def __init__( self, *, @@ -369,7 +432,7 @@ class RetryPolicy(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "initial_interval", b"initial_interval", "maximum_interval", @@ -378,7 +441,7 @@ class RetryPolicy(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "backoff_coefficient", b"backoff_coefficient", "initial_interval", @@ -394,6 +457,7 @@ class RetryPolicy(google.protobuf.message.Message): global___RetryPolicy = RetryPolicy +@typing.final class MeteringMetadata(google.protobuf.message.Message): """Metadata relevant for metering purposes""" @@ -415,7 +479,7 @@ class MeteringMetadata(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "nonfirst_local_activity_execution_attempts", b"nonfirst_local_activity_execution_attempts", ], @@ -423,6 +487,7 @@ class MeteringMetadata(google.protobuf.message.Message): global___MeteringMetadata = MeteringMetadata +@typing.final class WorkerVersionStamp(google.protobuf.message.Message): """Deprecated. This message is replaced with `Deployment` and `VersioningBehavior`. Identifies the version(s) of a worker that processed a task @@ -448,13 +513,14 @@ class WorkerVersionStamp(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id", b"build_id", "use_versioning", b"use_versioning" ], ) -> None: ... global___WorkerVersionStamp = WorkerVersionStamp +@typing.final class WorkerVersionCapabilities(google.protobuf.message.Message): """Identifies the version that a worker is compatible with when polling or identifying itself, and whether or not this worker is opting into the build-id based versioning feature. This is @@ -484,7 +550,7 @@ class WorkerVersionCapabilities(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id", b"build_id", "deployment_series_name", @@ -496,6 +562,7 @@ class WorkerVersionCapabilities(google.protobuf.message.Message): global___WorkerVersionCapabilities = WorkerVersionCapabilities +@typing.final class ResetOptions(google.protobuf.message.Message): """Describes where and how to reset a workflow, used for batch reset currently and may be used for single-workflow reset later. @@ -510,12 +577,6 @@ class ResetOptions(google.protobuf.message.Message): RESET_REAPPLY_TYPE_FIELD_NUMBER: builtins.int CURRENT_RUN_ONLY_FIELD_NUMBER: builtins.int RESET_REAPPLY_EXCLUDE_TYPES_FIELD_NUMBER: builtins.int - @property - def first_workflow_task(self) -> google.protobuf.empty_pb2.Empty: - """Resets to the first workflow task completed or started event.""" - @property - def last_workflow_task(self) -> google.protobuf.empty_pb2.Empty: - """Resets to the last workflow task completed or started event.""" workflow_task_id: builtins.int """The id of a specific `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or `WORKFLOW_TASK_STARTED` event to reset to. @@ -536,6 +597,14 @@ class ResetOptions(google.protobuf.message.Message): """If true, limit the reset to only within the current run. (Applies to build_id targets and possibly others in the future.) """ + @property + def first_workflow_task(self) -> google.protobuf.empty_pb2.Empty: + """Resets to the first workflow task completed or started event.""" + + @property + def last_workflow_task(self) -> google.protobuf.empty_pb2.Empty: + """Resets to the last workflow task completed or started event.""" + @property def reset_reapply_exclude_types( self, @@ -543,6 +612,7 @@ class ResetOptions(google.protobuf.message.Message): temporalio.api.enums.v1.reset_pb2.ResetReapplyExcludeType.ValueType ]: """Event types not to be reapplied""" + def __init__( self, *, @@ -559,7 +629,7 @@ class ResetOptions(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id", b"build_id", "first_workflow_task", @@ -574,7 +644,7 @@ class ResetOptions(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id", b"build_id", "current_run_only", @@ -594,9 +664,9 @@ class ResetOptions(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["target", b"target"] + self, oneof_group: typing.Literal["target", b"target"] ) -> ( - typing_extensions.Literal[ + typing.Literal[ "first_workflow_task", "last_workflow_task", "workflow_task_id", "build_id" ] | None @@ -604,14 +674,21 @@ class ResetOptions(google.protobuf.message.Message): global___ResetOptions = ResetOptions +@typing.final class Callback(google.protobuf.message.Message): """Callback to attach to various events in the system, e.g. workflow run completion.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class Nexus(google.protobuf.message.Message): + """Nexus callbacks are used to delivery Nexus operation completions, as defined in the Nexus RPC spec: + https://github.com/nexus-rpc/api/blob/main/SPEC.md#callback-urls + """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeaderEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -626,8 +703,7 @@ class Callback(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... URL_FIELD_NUMBER: builtins.int @@ -639,6 +715,7 @@ class Callback(google.protobuf.message.Message): self, ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: """Header to attach to callback request.""" + def __init__( self, *, @@ -646,10 +723,10 @@ class Callback(google.protobuf.message.Message): header: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["header", b"header", "url", b"url"], + self, field_name: typing.Literal["header", b"header", "url", b"url"] ) -> None: ... + @typing.final class Internal(google.protobuf.message.Message): """Callbacks to be delivered internally within the system. This variant is not settable in the API and will be rejected by the service with an INVALID_ARGUMENT error. @@ -667,18 +744,85 @@ class Callback(google.protobuf.message.Message): *, data: builtins.bytes = ..., ) -> None: ... + def ClearField(self, field_name: typing.Literal["data", b"data"]) -> None: ... + + @typing.final + class NexusHandler(google.protobuf.message.Message): + """NexusHandler callbacks are requests to invoke a specific shape of Nexus operation on a Temporal worker. + The specified Nexus operation must have the following: + - Input: temporalio.api.notificationservice.v1.OnCompleteRequest + - Output: temporalio.api.notificationservice.v1.OnCompleteResponse + + The targeted Nexus service must be registered within the same namespace as the source operation + the callback is attached to. (While Nexus allows for cross-namespace operations, NexusHandler callbacks + are strictly caller-side.) + + NexusHandler callbacks are only supported for certain types of operations, e.g. standalone Nexus operations. + Attempting to attach a Worker callback for an unsupported operation will result in an INVALID_ARGUMENT + error from the server. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TASK_QUEUE_NAME_FIELD_NUMBER: builtins.int + SERVICE_FIELD_NUMBER: builtins.int + OPERATION_FIELD_NUMBER: builtins.int + SOURCE_CONTEXT_FIELD_NUMBER: builtins.int + task_queue_name: builtins.str + """Nexus task queue the Temporal worker is listening on. + + NOTE: This is not a temporalio.api.taskqueue.v1.TaskQueue to avoid a circular dependency. + """ + service: builtins.str + """Target Nexus service, e.g. "HTTPAdapter".""" + operation: builtins.str + """Target operation, e.g. "DeliverAsWebhook".""" + @property + def source_context(self) -> global___Payload: + """Arbitrary user-supplied data from the source operation's callsite. (As applicable, not all operations + support attaching context data.) + + There are restrictions on the maxium payload size a single callback can carry, as well as the + total sum of all source context payloads attached to an execution. See dynamic configuration: + "callback.nexusHandler.sourceContext.maxSize", "callback.nexusHandler.sourceContext.aggregateMaxSize". + """ + + def __init__( + self, + *, + task_queue_name: builtins.str = ..., + service: builtins.str = ..., + operation: builtins.str = ..., + source_context: global___Payload | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["source_context", b"source_context"] + ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["data", b"data"] + self, + field_name: typing.Literal[ + "operation", + b"operation", + "service", + b"service", + "source_context", + b"source_context", + "task_queue_name", + b"task_queue_name", + ], ) -> None: ... NEXUS_FIELD_NUMBER: builtins.int INTERNAL_FIELD_NUMBER: builtins.int + NEXUS_HANDLER_FIELD_NUMBER: builtins.int LINKS_FIELD_NUMBER: builtins.int @property def nexus(self) -> global___Callback.Nexus: ... @property def internal(self) -> global___Callback.Internal: ... @property + def nexus_handler(self) -> global___Callback.NexusHandler: ... + @property def links( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ @@ -687,38 +831,50 @@ class Callback(google.protobuf.message.Message): """Links associated with the callback. It can be used to link to underlying resources of the callback. """ + def __init__( self, *, nexus: global___Callback.Nexus | None = ..., internal: global___Callback.Internal | None = ..., + nexus_handler: global___Callback.NexusHandler | None = ..., links: collections.abc.Iterable[global___Link] | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "internal", b"internal", "nexus", b"nexus", "variant", b"variant" + field_name: typing.Literal[ + "internal", + b"internal", + "nexus", + b"nexus", + "nexus_handler", + b"nexus_handler", + "variant", + b"variant", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "internal", b"internal", "links", b"links", "nexus", b"nexus", + "nexus_handler", + b"nexus_handler", "variant", b"variant", ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["nexus", "internal"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["nexus", "internal", "nexus_handler"] | None: ... global___Callback = Callback +@typing.final class Link(google.protobuf.message.Message): """Link can be associated with history events. It might contain information about an external entity related to the history event. For example, workflow A makes a Nexus call that starts workflow B: @@ -728,9 +884,11 @@ class Link(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class WorkflowEvent(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class EventReference(google.protobuf.message.Message): """EventReference is a direct reference to a history event through the event ID.""" @@ -748,11 +906,12 @@ class Link(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "event_id", b"event_id", "event_type", b"event_type" ], ) -> None: ... + @typing.final class RequestIdReference(google.protobuf.message.Message): """RequestIdReference is a indirect reference to a history event through the request ID.""" @@ -770,7 +929,7 @@ class Link(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "event_type", b"event_type", "request_id", b"request_id" ], ) -> None: ... @@ -798,7 +957,7 @@ class Link(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "event_ref", b"event_ref", "reference", @@ -809,7 +968,7 @@ class Link(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "event_ref", b"event_ref", "namespace", @@ -825,9 +984,10 @@ class Link(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["reference", b"reference"] - ) -> typing_extensions.Literal["event_ref", "request_id_ref"] | None: ... + self, oneof_group: typing.Literal["reference", b"reference"] + ) -> typing.Literal["event_ref", "request_id_ref"] | None: ... + @typing.final class BatchJob(google.protobuf.message.Message): """A link to a built-in batch job. Batch jobs can be used to perform operations on a set of workflows (e.g. terminate, signal, cancel, etc). @@ -844,49 +1004,305 @@ class Link(google.protobuf.message.Message): job_id: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["job_id", b"job_id"] + self, field_name: typing.Literal["job_id", b"job_id"] + ) -> None: ... + + @typing.final + class Activity(google.protobuf.message.Message): + """A link to an activity.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + activity_id: builtins.str + run_id: builtins.str + def __init__( + self, + *, + namespace: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "namespace", + b"namespace", + "run_id", + b"run_id", + ], + ) -> None: ... + + @typing.final + class NexusOperation(google.protobuf.message.Message): + """A link to a standalone Nexus operation.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + OPERATION_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + operation_id: builtins.str + run_id: builtins.str + def __init__( + self, + *, + namespace: builtins.str = ..., + operation_id: builtins.str = ..., + run_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "namespace", + b"namespace", + "operation_id", + b"operation_id", + "run_id", + b"run_id", + ], + ) -> None: ... + + @typing.final + class Workflow(google.protobuf.message.Message): + """A link to a workflow execution. This is a more general version of WorkflowEvent that doesn't specify a + particular event within the workflow, useful when you want to link to a workflow but there is no particular event to link to, + such as a Query or a Rejected Update. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + WORKFLOW_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + namespace: builtins.str + workflow_id: builtins.str + run_id: builtins.str + reason: builtins.str + def __init__( + self, + *, + namespace: builtins.str = ..., + workflow_id: builtins.str = ..., + run_id: builtins.str = ..., + reason: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "namespace", + b"namespace", + "reason", + b"reason", + "run_id", + b"run_id", + "workflow_id", + b"workflow_id", + ], + ) -> None: ... + + @typing.final + class Callback(google.protobuf.message.Message): + """A link to a worker callback attached to an execution. An execution (e.g. standalone Nexus operation) can have + multiple callbacks attached, and will be differentiated by the request_id used when the callback is invoked. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + EXECUTION_FIELD_NUMBER: builtins.int + COMPONENT_PATH_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + request_id: builtins.str + """Server-generate request ID sent when the callback was dispatched.""" + @property + def execution(self) -> global___Execution: ... + @property + def component_path( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + builtins.str + ]: + """In most cases, the Execution is sufficient to identify the callback's source. But the callback could have + been attached some child component of that execution. e.g. a workflow update. The component path describes + the unique component as applicable, typically ending with a unique ID. e.g. ["Update", $workflowUpdateId ] + """ + + def __init__( + self, + *, + namespace: builtins.str = ..., + execution: global___Execution | None = ..., + component_path: collections.abc.Iterable[builtins.str] | None = ..., + request_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["execution", b"execution"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "component_path", + b"component_path", + "execution", + b"execution", + "namespace", + b"namespace", + "request_id", + b"request_id", + ], ) -> None: ... WORKFLOW_EVENT_FIELD_NUMBER: builtins.int BATCH_JOB_FIELD_NUMBER: builtins.int + ACTIVITY_FIELD_NUMBER: builtins.int + NEXUS_OPERATION_FIELD_NUMBER: builtins.int + WORKFLOW_FIELD_NUMBER: builtins.int + CALLBACK_FIELD_NUMBER: builtins.int @property def workflow_event(self) -> global___Link.WorkflowEvent: ... @property def batch_job(self) -> global___Link.BatchJob: ... + @property + def activity(self) -> global___Link.Activity: ... + @property + def nexus_operation(self) -> global___Link.NexusOperation: ... + @property + def workflow(self) -> global___Link.Workflow: ... + @property + def callback(self) -> global___Link.Callback: ... def __init__( self, *, workflow_event: global___Link.WorkflowEvent | None = ..., batch_job: global___Link.BatchJob | None = ..., + activity: global___Link.Activity | None = ..., + nexus_operation: global___Link.NexusOperation | None = ..., + workflow: global___Link.Workflow | None = ..., + callback: global___Link.Callback | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "activity", + b"activity", "batch_job", b"batch_job", + "callback", + b"callback", + "nexus_operation", + b"nexus_operation", "variant", b"variant", + "workflow", + b"workflow", "workflow_event", b"workflow_event", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "activity", + b"activity", "batch_job", b"batch_job", + "callback", + b"callback", + "nexus_operation", + b"nexus_operation", "variant", b"variant", + "workflow", + b"workflow", "workflow_event", b"workflow_event", ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["workflow_event", "batch_job"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> ( + typing.Literal[ + "workflow_event", + "batch_job", + "activity", + "nexus_operation", + "workflow", + "callback", + ] + | None + ): ... global___Link = Link +@typing.final +class Principal(google.protobuf.message.Message): + """Principal is an authenticated caller identity computed by the server from trusted + authentication context. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + type: builtins.str + """Low-cardinality category of the principal (e.g., "jwt", "users").""" + name: builtins.str + """Identifier within that category (e.g., sub JWT claim, email address).""" + def __init__( + self, + *, + type: builtins.str = ..., + name: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["name", b"name", "type", b"type"] + ) -> None: ... + +global___Principal = Principal + +@typing.final +class ResolvedPrincipal(google.protobuf.message.Message): + """ResolvedPrincipal is a principal returned to an API caller.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + NAME_AT_WRITE_TIME_FIELD_NUMBER: builtins.int + type: builtins.str + """Low-cardinality category of the principal (e.g., "jwt", "users").""" + name_at_write_time: builtins.str + """Identifier within that category (e.g., sub JWT claim, email address). + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: Identifies the principal name snapshot used for this response. --) + (-- api-linter: core::0142::time-field-type=disabled + aip.dev/not-precedent: This string is a principal name snapshot, not a timestamp. --) + """ + def __init__( + self, + *, + type: builtins.str = ..., + name_at_write_time: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "name_at_write_time", b"name_at_write_time", "type", b"type" + ], + ) -> None: ... + +global___ResolvedPrincipal = ResolvedPrincipal + +@typing.final class Priority(google.protobuf.message.Message): """Priority contains metadata that controls relative ordering of task processing when tasks are backed up in a queue. Initially, Priority will be used in @@ -985,7 +1401,7 @@ class Priority(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "fairness_key", b"fairness_key", "fairness_weight", @@ -997,6 +1413,7 @@ class Priority(google.protobuf.message.Message): global___Priority = Priority +@typing.final class WorkerSelector(google.protobuf.message.Message): """This is used to send commands to a specific worker or a group of workers. Right now, it is used to send commands to a specific worker instance. @@ -1015,18 +1432,346 @@ class WorkerSelector(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "selector", b"selector", "worker_instance_key", b"worker_instance_key" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "selector", b"selector", "worker_instance_key", b"worker_instance_key" ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["selector", b"selector"] - ) -> typing_extensions.Literal["worker_instance_key"] | None: ... + self, oneof_group: typing.Literal["selector", b"selector"] + ) -> typing.Literal["worker_instance_key"] | None: ... global___WorkerSelector = WorkerSelector + +@typing.final +class OnConflictOptions(google.protobuf.message.Message): + """When starting an execution with a conflict policy that uses an existing execution and there is already an existing + running execution, OnConflictOptions defines actions to be taken on the existing running execution. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ATTACH_REQUEST_ID_FIELD_NUMBER: builtins.int + ATTACH_COMPLETION_CALLBACKS_FIELD_NUMBER: builtins.int + ATTACH_LINKS_FIELD_NUMBER: builtins.int + attach_request_id: builtins.bool + """Attaches the request ID to the running execution.""" + attach_completion_callbacks: builtins.bool + """Attaches the completion callbacks to the running execution.""" + attach_links: builtins.bool + """Attaches the links to the running execution.""" + def __init__( + self, + *, + attach_request_id: builtins.bool = ..., + attach_completion_callbacks: builtins.bool = ..., + attach_links: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "attach_completion_callbacks", + b"attach_completion_callbacks", + "attach_links", + b"attach_links", + "attach_request_id", + b"attach_request_id", + ], + ) -> None: ... + +global___OnConflictOptions = OnConflictOptions + +@typing.final +class TimeSkippingConfig(google.protobuf.message.Message): + """The configuration for time skipping of an execution. + When time skipping is enabled, virtual time advances automatically whenever there is no in-flight work. + Options like fast_forward, disable_propagation, and max_session_skip_count are provided for granular + control of the execution's time skipping behavior. See each field's comment for a detailed explanation. + + An example of workflows with time skipping: + For workflows, an execution is a chain of runs including retries, cron, and continue-as-new. + In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations, etc. + User timers are not classified as in-flight work and will be skipped over; the virtual clock may also skip to the + time point of the registered fast-forward when there is no in-flight work. + Whenever time is skipped, the skip count is incremented by one; max_session_skip_count bounds the number of skips allowed within a single time-skipping session. + For child workflows, by default, if the parent execution is skipping time, the child execution will also skip time, + but a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the + "enabled" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the + parent execution as its start time. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ENABLED_FIELD_NUMBER: builtins.int + FAST_FORWARD_CONFIG_FIELD_NUMBER: builtins.int + DISABLE_PROPAGATION_FIELD_NUMBER: builtins.int + MAX_SESSION_SKIP_COUNT_FIELD_NUMBER: builtins.int + enabled: builtins.bool + """Enables or disables time skipping for this workflow execution.""" + disable_propagation: builtins.bool + """By default, executions started by another execution (e.g. a child workflow of a parent workflow or + a schedule with the time-skipping policy enabled) inherit the "enabled" flag and skip time when possible. + This flag disables that inheritance. + """ + max_session_skip_count: builtins.int + """The maximum number of skips allowed every time this field is updated. It protects the execution from + situations like unlimited retries when backoff is skipped. + + Every time the execution skips time, the skip count is incremented by one, and when it reaches + max_session_skip_count, time skipping stops. Whenever this config field is updated, the accumulated + skip count is cleared, marking the start of a new session. + For an execution with a chain of runs (retry, cron, continue-as-new), the count is accumulated + across all runs within the same session. + + If this field is not set, the server applies a large default value (e.g. 100). The default can + be changed through dynamic config, and is overridden by this field when set. + """ + @property + def fast_forward_config(self) -> global___FastForwardConfig: + """An optional opt-in to control time-skipping behavior through fast-forward; see its definition for details.""" + + def __init__( + self, + *, + enabled: builtins.bool = ..., + fast_forward_config: global___FastForwardConfig | None = ..., + disable_propagation: builtins.bool = ..., + max_session_skip_count: builtins.int = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["fast_forward_config", b"fast_forward_config"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "disable_propagation", + b"disable_propagation", + "enabled", + b"enabled", + "fast_forward_config", + b"fast_forward_config", + "max_session_skip_count", + b"max_session_skip_count", + ], + ) -> None: ... + +global___TimeSkippingConfig = TimeSkippingConfig + +@typing.final +class FastForwardConfig(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + DURATION_FIELD_NUMBER: builtins.int + id: builtins.str + """A client-supplied ID, required field, set alongside `duration`. It is used to poll for + fast-forward completion via PollWorkflowExecutionTimeSkipping. + The server performs no idempotency check on this ID; the client is responsible for managing it. + """ + @property + def duration(self) -> google.protobuf.duration_pb2.Duration: + """Fast-forward the current execution by this duration ahead of the current execution time; required field. + The duration yields a target time (current execution time + duration), surfaced as `target_time` in + TimeSkippingFastForwardInfo. Once virtual time reaches that target, the fast-forward completes, time + skipping is disabled, and no further time is skipped. Time skipping can be resumed either + by updating the TimeSkippingConfig with a new FastForwardConfig, or by clearing the FastForwardConfig + to skip through to the end of the execution. + + If this duration exceeds the remaining execution timeout, time will not pass beyond the end + of the execution, and the fast-forward won't have a chance to complete. + """ + + def __init__( + self, + *, + id: builtins.str = ..., + duration: google.protobuf.duration_pb2.Duration | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["duration", b"duration"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["duration", b"duration", "id", b"id"] + ) -> None: ... + +global___FastForwardConfig = FastForwardConfig + +@typing.final +class TimeSkippingStatePropagation(google.protobuf.message.Message): + """The time-skipping state that needs to be propagated from one execution to another, or through a chain of runs + within the same execution. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + INITIAL_SKIPPED_DURATION_FIELD_NUMBER: builtins.int + FAST_FORWARD_TARGET_TIME_FIELD_NUMBER: builtins.int + INITIAL_SKIP_COUNT_FIELD_NUMBER: builtins.int + initial_skip_count: builtins.int + """The initial skip count. It only propagates across a chain of runs within the same execution.""" + @property + def initial_skipped_duration(self) -> google.protobuf.duration_pb2.Duration: + """The time skipped by the previous run. It is propagated both to executions started by the + current execution and through a chain of runs (CaN, cron, retry). + """ + + @property + def fast_forward_target_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The fast-forward target time. It only propagates across a chain of runs within the same execution.""" + + def __init__( + self, + *, + initial_skipped_duration: google.protobuf.duration_pb2.Duration | None = ..., + fast_forward_target_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + initial_skip_count: builtins.int = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "fast_forward_target_time", + b"fast_forward_target_time", + "initial_skipped_duration", + b"initial_skipped_duration", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "fast_forward_target_time", + b"fast_forward_target_time", + "initial_skip_count", + b"initial_skip_count", + "initial_skipped_duration", + b"initial_skipped_duration", + ], + ) -> None: ... + +global___TimeSkippingStatePropagation = TimeSkippingStatePropagation + +@typing.final +class TimeSkippingInfo(google.protobuf.message.Message): + """Describes the current time-skipping state of a workflow execution.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CURRENT_TIME_FIELD_NUMBER: builtins.int + EFFECTIVE_CONFIG_FIELD_NUMBER: builtins.int + FAST_FORWARD_INFO_FIELD_NUMBER: builtins.int + CURRENT_SESSION_SKIP_COUNT_FIELD_NUMBER: builtins.int + current_session_skip_count: builtins.int + """The number of skips accumulated in the current session, bounded by `max_session_skip_count`. + A new session begins — and this resets to 0 — each time `max_session_skip_count` is updated. + """ + @property + def current_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Current virtual time of the execution. If the execution hasn't skipped + any time yet, it will be the same as wall clock time. + """ + + @property + def effective_config(self) -> global___TimeSkippingConfig: + """The current effective time-skipping config, which can differ from the config the user last set: + internally-defaulted fields are populated, and `enabled` reflects whether the execution is still + skipping time — e.g. it is set to false once `max_session_skip_count` is reached, the fast-forward + completes, or a client call disables time skipping. + """ + + @property + def fast_forward_info(self) -> global___TimeSkippingFastForwardInfo: + """The execution's current fast-forward, if any. Unset if time skipping is enabled without a fast-forward.""" + + def __init__( + self, + *, + current_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + effective_config: global___TimeSkippingConfig | None = ..., + fast_forward_info: global___TimeSkippingFastForwardInfo | None = ..., + current_session_skip_count: builtins.int = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "current_time", + b"current_time", + "effective_config", + b"effective_config", + "fast_forward_info", + b"fast_forward_info", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "current_session_skip_count", + b"current_session_skip_count", + "current_time", + b"current_time", + "effective_config", + b"effective_config", + "fast_forward_info", + b"fast_forward_info", + ], + ) -> None: ... + +global___TimeSkippingInfo = TimeSkippingInfo + +@typing.final +class TimeSkippingFastForwardInfo(google.protobuf.message.Message): + """TimeSkippingFastForwardInfo describes the current time-skipping fast-forward on an execution.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + FAST_FORWARD_DURATION_FIELD_NUMBER: builtins.int + FAST_FORWARD_ID_FIELD_NUMBER: builtins.int + TARGET_TIME_FIELD_NUMBER: builtins.int + HAS_COMPLETED_FIELD_NUMBER: builtins.int + fast_forward_id: builtins.str + """The client-supplied ID set alongside `fast_forward` duration.""" + has_completed: builtins.bool + """True once `target_time` has been reached.""" + @property + def fast_forward_duration(self) -> google.protobuf.duration_pb2.Duration: + """The client-supplied `fast_forward` duration.""" + + @property + def target_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The target virtual time at which the fast-forward completes.""" + + def __init__( + self, + *, + fast_forward_duration: google.protobuf.duration_pb2.Duration | None = ..., + fast_forward_id: builtins.str = ..., + target_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + has_completed: builtins.bool = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "fast_forward_duration", + b"fast_forward_duration", + "target_time", + b"target_time", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "fast_forward_duration", + b"fast_forward_duration", + "fast_forward_id", + b"fast_forward_id", + "has_completed", + b"has_completed", + "target_time", + b"target_time", + ], + ) -> None: ... + +global___TimeSkippingFastForwardInfo = TimeSkippingFastForwardInfo diff --git a/temporalio/api/compute/__init__.py b/temporalio/api/compute/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/compute/v1/__init__.py b/temporalio/api/compute/v1/__init__.py new file mode 100644 index 0000000000..816d11299e --- /dev/null +++ b/temporalio/api/compute/v1/__init__.py @@ -0,0 +1,19 @@ +from .config_pb2 import ( + ComputeConfig, + ComputeConfigScalingGroup, + ComputeConfigScalingGroupSummary, + ComputeConfigScalingGroupUpdate, + ComputeConfigSummary, +) +from .provider_pb2 import ComputeProvider +from .scaler_pb2 import ComputeScaler + +__all__ = [ + "ComputeConfig", + "ComputeConfigScalingGroup", + "ComputeConfigScalingGroupSummary", + "ComputeConfigScalingGroupUpdate", + "ComputeConfigSummary", + "ComputeProvider", + "ComputeScaler", +] diff --git a/temporalio/api/compute/v1/config_pb2.py b/temporalio/api/compute/v1/config_pb2.py new file mode 100644 index 0000000000..0007bc527f --- /dev/null +++ b/temporalio/api/compute/v1/config_pb2.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/compute/v1/config.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 + +from temporalio.api.compute.v1 import ( + provider_pb2 as temporal_dot_api_dot_compute_dot_v1_dot_provider__pb2, +) +from temporalio.api.compute.v1 import ( + scaler_pb2 as temporal_dot_api_dot_compute_dot_v1_dot_scaler__pb2, +) +from temporalio.api.enums.v1 import ( + task_queue_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_task__queue__pb2, +) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n$temporal/api/compute/v1/config.proto\x12\x17temporal.api.compute.v1\x1a&temporal/api/compute/v1/provider.proto\x1a$temporal/api/compute/v1/scaler.proto\x1a&temporal/api/enums/v1/task_queue.proto\x1a google/protobuf/field_mask.proto"\xe3\x01\n\x19\x43omputeConfigScalingGroup\x12>\n\x10task_queue_types\x18\x01 \x03(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12\x12\n\nregion_ids\x18\x02 \x03(\t\x12:\n\x08provider\x18\x03 \x01(\x0b\x32(.temporal.api.compute.v1.ComputeProvider\x12\x36\n\x06scaler\x18\x04 \x01(\x0b\x32&.temporal.api.compute.v1.ComputeScaler"\xcc\x01\n\rComputeConfig\x12Q\n\x0escaling_groups\x18\x01 \x03(\x0b\x32\x39.temporal.api.compute.v1.ComputeConfig.ScalingGroupsEntry\x1ah\n\x12ScalingGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.temporal.api.compute.v1.ComputeConfigScalingGroup:\x02\x38\x01"\x9d\x01\n\x1f\x43omputeConfigScalingGroupUpdate\x12I\n\rscaling_group\x18\x01 \x01(\x0b\x32\x32.temporal.api.compute.v1.ComputeConfigScalingGroup\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"\xe1\x01\n\x14\x43omputeConfigSummary\x12X\n\x0escaling_groups\x18\x01 \x03(\x0b\x32@.temporal.api.compute.v1.ComputeConfigSummary.ScalingGroupsEntry\x1ao\n\x12ScalingGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.temporal.api.compute.v1.ComputeConfigScalingGroupSummary:\x02\x38\x01"\x8d\x01\n ComputeConfigScalingGroupSummary\x12>\n\x10task_queue_types\x18\x01 \x03(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12\x15\n\rprovider_type\x18\x02 \x01(\t\x12\x12\n\nregion_ids\x18\x03 \x03(\tB\x8d\x01\n\x1aio.temporal.api.compute.v1B\x0b\x43onfigProtoP\x01Z%go.temporal.io/api/compute/v1;compute\xaa\x02\x19Temporalio.Api.Compute.V1\xea\x02\x1cTemporalio::Api::Compute::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\032io.temporal.api.compute.v1B\013ConfigProtoP\001Z%go.temporal.io/api/compute/v1;compute\252\002\031Temporalio.Api.Compute.V1\352\002\034Temporalio::Api::Compute::V1" + _COMPUTECONFIG_SCALINGGROUPSENTRY._options = None + _COMPUTECONFIG_SCALINGGROUPSENTRY._serialized_options = b"8\001" + _COMPUTECONFIGSUMMARY_SCALINGGROUPSENTRY._options = None + _COMPUTECONFIGSUMMARY_SCALINGGROUPSENTRY._serialized_options = b"8\001" + _COMPUTECONFIGSCALINGGROUP._serialized_start = 218 + _COMPUTECONFIGSCALINGGROUP._serialized_end = 445 + _COMPUTECONFIG._serialized_start = 448 + _COMPUTECONFIG._serialized_end = 652 + _COMPUTECONFIG_SCALINGGROUPSENTRY._serialized_start = 548 + _COMPUTECONFIG_SCALINGGROUPSENTRY._serialized_end = 652 + _COMPUTECONFIGSCALINGGROUPUPDATE._serialized_start = 655 + _COMPUTECONFIGSCALINGGROUPUPDATE._serialized_end = 812 + _COMPUTECONFIGSUMMARY._serialized_start = 815 + _COMPUTECONFIGSUMMARY._serialized_end = 1040 + _COMPUTECONFIGSUMMARY_SCALINGGROUPSENTRY._serialized_start = 929 + _COMPUTECONFIGSUMMARY_SCALINGGROUPSENTRY._serialized_end = 1040 + _COMPUTECONFIGSCALINGGROUPSUMMARY._serialized_start = 1043 + _COMPUTECONFIGSCALINGGROUPSUMMARY._serialized_end = 1184 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/compute/v1/config_pb2.pyi b/temporalio/api/compute/v1/config_pb2.pyi new file mode 100644 index 0000000000..2656dec603 --- /dev/null +++ b/temporalio/api/compute/v1/config_pb2.pyi @@ -0,0 +1,282 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import typing + +import google.protobuf.descriptor +import google.protobuf.field_mask_pb2 +import google.protobuf.internal.containers +import google.protobuf.message + +import temporalio.api.compute.v1.provider_pb2 +import temporalio.api.compute.v1.scaler_pb2 +import temporalio.api.enums.v1.task_queue_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class ComputeConfigScalingGroup(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TASK_QUEUE_TYPES_FIELD_NUMBER: builtins.int + REGION_IDS_FIELD_NUMBER: builtins.int + PROVIDER_FIELD_NUMBER: builtins.int + SCALER_FIELD_NUMBER: builtins.int + @property + def task_queue_types( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType + ]: + """Optional. The set of task queue types this scaling group serves. + If not provided, this scaling group serves all not otherwise defined + task types. + """ + + @property + def region_ids( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Optional. If set, this scaling group is used only while the namespace is + active in one of these regions. + """ + + @property + def provider(self) -> temporalio.api.compute.v1.provider_pb2.ComputeProvider: + """Stores instructions for a worker control plane controller how to respond + to worker lifeycle events. + """ + + @property + def scaler(self) -> temporalio.api.compute.v1.scaler_pb2.ComputeScaler: + """Informs a worker lifecycle controller *when* and *how often* to perform + certain worker lifecycle actions like starting a serverless worker. + """ + + def __init__( + self, + *, + task_queue_types: collections.abc.Iterable[ + temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType + ] + | None = ..., + region_ids: collections.abc.Iterable[builtins.str] | None = ..., + provider: temporalio.api.compute.v1.provider_pb2.ComputeProvider | None = ..., + scaler: temporalio.api.compute.v1.scaler_pb2.ComputeScaler | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["provider", b"provider", "scaler", b"scaler"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "provider", + b"provider", + "region_ids", + b"region_ids", + "scaler", + b"scaler", + "task_queue_types", + b"task_queue_types", + ], + ) -> None: ... + +global___ComputeConfigScalingGroup = ComputeConfigScalingGroup + +@typing.final +class ComputeConfig(google.protobuf.message.Message): + """ComputeConfig stores configuration that helps a worker control plane + controller understand *when* and *how* to respond to worker lifecycle + events. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ScalingGroupsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> global___ComputeConfigScalingGroup: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: global___ComputeConfigScalingGroup | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + SCALING_GROUPS_FIELD_NUMBER: builtins.int + @property + def scaling_groups( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, global___ComputeConfigScalingGroup + ]: + """Each scaling group describes a compute config for a specific subset of the worker + deployment version: covering a specific set of task types and/or regions. + Having different configurations for different task types, allows independent + tuning of activity and workflow task processing (for example). + + The key of the map is the ID of the scaling group used to reference it in subsequent + update calls. + """ + + def __init__( + self, + *, + scaling_groups: collections.abc.Mapping[ + builtins.str, global___ComputeConfigScalingGroup + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["scaling_groups", b"scaling_groups"] + ) -> None: ... + +global___ComputeConfig = ComputeConfig + +@typing.final +class ComputeConfigScalingGroupUpdate(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SCALING_GROUP_FIELD_NUMBER: builtins.int + UPDATE_MASK_FIELD_NUMBER: builtins.int + @property + def scaling_group(self) -> global___ComputeConfigScalingGroup: ... + @property + def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: + """Controls which fields from `scaling_group` will be applied. Semantics: + - Mask is ignored for new scaling groups (only applicable when scaling group already exists). + - Empty mask for an existing scaling group is no-op: no change. + - Non-empty mask for an existing scaling group will update/unset only to the fields + mentioned in the mask. + - Accepted paths: "task_queue_types", "region_ids", "provider", "provider.type", "provider.details", + "provider.nexus_endpoint", "scaler", "scaler.type", "scaler.details" + """ + + def __init__( + self, + *, + scaling_group: global___ComputeConfigScalingGroup | None = ..., + update_mask: google.protobuf.field_mask_pb2.FieldMask | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "scaling_group", b"scaling_group", "update_mask", b"update_mask" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "scaling_group", b"scaling_group", "update_mask", b"update_mask" + ], + ) -> None: ... + +global___ComputeConfigScalingGroupUpdate = ComputeConfigScalingGroupUpdate + +@typing.final +class ComputeConfigSummary(google.protobuf.message.Message): + """A subset of information in ComputeConfig optimized for list views.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ScalingGroupsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> global___ComputeConfigScalingGroupSummary: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: global___ComputeConfigScalingGroupSummary | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + SCALING_GROUPS_FIELD_NUMBER: builtins.int + @property + def scaling_groups( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, global___ComputeConfigScalingGroupSummary + ]: ... + def __init__( + self, + *, + scaling_groups: collections.abc.Mapping[ + builtins.str, global___ComputeConfigScalingGroupSummary + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["scaling_groups", b"scaling_groups"] + ) -> None: ... + +global___ComputeConfigSummary = ComputeConfigSummary + +@typing.final +class ComputeConfigScalingGroupSummary(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TASK_QUEUE_TYPES_FIELD_NUMBER: builtins.int + PROVIDER_TYPE_FIELD_NUMBER: builtins.int + REGION_IDS_FIELD_NUMBER: builtins.int + provider_type: builtins.str + @property + def task_queue_types( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType + ]: ... + @property + def region_ids( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + builtins.str + ]: ... + def __init__( + self, + *, + task_queue_types: collections.abc.Iterable[ + temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType + ] + | None = ..., + provider_type: builtins.str = ..., + region_ids: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "provider_type", + b"provider_type", + "region_ids", + b"region_ids", + "task_queue_types", + b"task_queue_types", + ], + ) -> None: ... + +global___ComputeConfigScalingGroupSummary = ComputeConfigScalingGroupSummary diff --git a/temporalio/api/compute/v1/provider_pb2.py b/temporalio/api/compute/v1/provider_pb2.py new file mode 100644 index 0000000000..8bfe931552 --- /dev/null +++ b/temporalio/api/compute/v1/provider_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/compute/v1/provider.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from temporalio.api.common.v1 import ( + message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, +) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n&temporal/api/compute/v1/provider.proto\x12\x17temporal.api.compute.v1\x1a$temporal/api/common/v1/message.proto"i\n\x0f\x43omputeProvider\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x30\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x16\n\x0enexus_endpoint\x18\n \x01(\tB\x8f\x01\n\x1aio.temporal.api.compute.v1B\rProviderProtoP\x01Z%go.temporal.io/api/compute/v1;compute\xaa\x02\x19Temporalio.Api.Compute.V1\xea\x02\x1cTemporalio::Api::Compute::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\032io.temporal.api.compute.v1B\rProviderProtoP\001Z%go.temporal.io/api/compute/v1;compute\252\002\031Temporalio.Api.Compute.V1\352\002\034Temporalio::Api::Compute::V1" + _COMPUTEPROVIDER._serialized_start = 105 + _COMPUTEPROVIDER._serialized_end = 210 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/compute/v1/provider_pb2.pyi b/temporalio/api/compute/v1/provider_pb2.pyi new file mode 100644 index 0000000000..3b2ba7f4db --- /dev/null +++ b/temporalio/api/compute/v1/provider_pb2.pyi @@ -0,0 +1,65 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import typing + +import google.protobuf.descriptor +import google.protobuf.message + +import temporalio.api.common.v1.message_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class ComputeProvider(google.protobuf.message.Message): + """ComputeProvider stores information used by a worker control plane controller + to respond to worker lifecycle events. For example, when a Task is received + on a TaskQueue that has no active pollers, a serverless worker lifecycle + controller might need to invoke an AWS Lambda Function that itself ends up + calling the SDK's worker.New() function. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + DETAILS_FIELD_NUMBER: builtins.int + NEXUS_ENDPOINT_FIELD_NUMBER: builtins.int + type: builtins.str + """Type of the compute provider. This string is implementation-specific and + can be used by implementations to understand how to interpret the + contents of the provider_details field. + """ + nexus_endpoint: builtins.str + """Optional. If the compute provider is a Nexus service, this should point + there. + """ + @property + def details(self) -> temporalio.api.common.v1.message_pb2.Payload: + """Contains provider-specific instructions and configuration. + For server-implemented providers, use the SDK's default content + converter to ensure the server can understand it. + For remote-implemented providers, you might use your own content + converters according to what the remote endpoints understand. + """ + + def __init__( + self, + *, + type: builtins.str = ..., + details: temporalio.api.common.v1.message_pb2.Payload | None = ..., + nexus_endpoint: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["details", b"details"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "details", b"details", "nexus_endpoint", b"nexus_endpoint", "type", b"type" + ], + ) -> None: ... + +global___ComputeProvider = ComputeProvider diff --git a/temporalio/api/compute/v1/scaler_pb2.py b/temporalio/api/compute/v1/scaler_pb2.py new file mode 100644 index 0000000000..5229c3ea77 --- /dev/null +++ b/temporalio/api/compute/v1/scaler_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/compute/v1/scaler.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from temporalio.api.common.v1 import ( + message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, +) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n$temporal/api/compute/v1/scaler.proto\x12\x17temporal.api.compute.v1\x1a$temporal/api/common/v1/message.proto"O\n\rComputeScaler\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x30\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadB\x8d\x01\n\x1aio.temporal.api.compute.v1B\x0bScalerProtoP\x01Z%go.temporal.io/api/compute/v1;compute\xaa\x02\x19Temporalio.Api.Compute.V1\xea\x02\x1cTemporalio::Api::Compute::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\032io.temporal.api.compute.v1B\013ScalerProtoP\001Z%go.temporal.io/api/compute/v1;compute\252\002\031Temporalio.Api.Compute.V1\352\002\034Temporalio::Api::Compute::V1" + _COMPUTESCALER._serialized_start = 103 + _COMPUTESCALER._serialized_end = 182 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/compute/v1/scaler_pb2.pyi b/temporalio/api/compute/v1/scaler_pb2.pyi new file mode 100644 index 0000000000..d9a7784ce9 --- /dev/null +++ b/temporalio/api/compute/v1/scaler_pb2.pyi @@ -0,0 +1,53 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import typing + +import google.protobuf.descriptor +import google.protobuf.message + +import temporalio.api.common.v1.message_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class ComputeScaler(google.protobuf.message.Message): + """ComputeScaler instructs the Temporal Service when to scale up or down the number of + Workers that comprise a WorkerDeployment. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + DETAILS_FIELD_NUMBER: builtins.int + type: builtins.str + """Type of the compute scaler. this string is implementation-specific and + can be used by implementations to understand how to interpret the + contents of the scaler_details field. + """ + @property + def details(self) -> temporalio.api.common.v1.message_pb2.Payload: + """Contains scaler-specific instructions and configuration. + For server-implemented scalers, use the SDK's default data + converter to ensure the server can understand it. + For remote-implemented scalers, you might use your own data + converters according to what the remote endpoints understand. + """ + + def __init__( + self, + *, + type: builtins.str = ..., + details: temporalio.api.common.v1.message_pb2.Payload | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["details", b"details"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["details", b"details", "type", b"type"] + ) -> None: ... + +global___ComputeScaler = ComputeScaler diff --git a/temporalio/api/dependencies/__init__.py b/temporalio/api/dependencies/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/dependencies/nexusannotations/__init__.py b/temporalio/api/dependencies/nexusannotations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/dependencies/nexusannotations/v1/__init__.py b/temporalio/api/dependencies/nexusannotations/v1/__init__.py new file mode 100644 index 0000000000..5cb6849148 --- /dev/null +++ b/temporalio/api/dependencies/nexusannotations/v1/__init__.py @@ -0,0 +1,6 @@ +from .options_pb2 import OperationOptions, ServiceOptions + +__all__ = [ + "OperationOptions", + "ServiceOptions", +] diff --git a/temporalio/api/dependencies/nexusannotations/v1/options_pb2.py b/temporalio/api/dependencies/nexusannotations/v1/options_pb2.py new file mode 100644 index 0000000000..d357c3a582 --- /dev/null +++ b/temporalio/api/dependencies/nexusannotations/v1/options_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: nexusannotations/v1/options.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n!nexusannotations/v1/options.proto\x12\x13nexusannotations.v1\x1a google/protobuf/descriptor.proto".\n\x10OperationOptions\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04tags\x18\x02 \x03(\t",\n\x0eServiceOptions\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04tags\x18\x02 \x03(\t:Y\n\x07service\x12\x1f.google.protobuf.ServiceOptions\x18\xa9@ \x01(\x0b\x32#.nexusannotations.v1.ServiceOptions\x88\x01\x01:\\\n\toperation\x12\x1e.google.protobuf.MethodOptions\x18\xaa@ \x01(\x0b\x32%.nexusannotations.v1.OperationOptions\x88\x01\x01\x42\x45ZCgithub.com/nexus-rpc/nexus-proto-annotations/go/nexusannotations/v1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.ServiceOptions.RegisterExtension(service) + google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(operation) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = ( + b"ZCgithub.com/nexus-rpc/nexus-proto-annotations/go/nexusannotations/v1" + ) + _OPERATIONOPTIONS._serialized_start = 92 + _OPERATIONOPTIONS._serialized_end = 138 + _SERVICEOPTIONS._serialized_start = 140 + _SERVICEOPTIONS._serialized_end = 184 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/dependencies/nexusannotations/v1/options_pb2.pyi b/temporalio/api/dependencies/nexusannotations/v1/options_pb2.pyi new file mode 100644 index 0000000000..e50a8e659c --- /dev/null +++ b/temporalio/api/dependencies/nexusannotations/v1/options_pb2.pyi @@ -0,0 +1,77 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import typing + +import google.protobuf.descriptor +import google.protobuf.descriptor_pb2 +import google.protobuf.internal.containers +import google.protobuf.internal.extension_dict +import google.protobuf.message + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class OperationOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + TAGS_FIELD_NUMBER: builtins.int + name: builtins.str + """Nexus operation name (defaults to proto method name).""" + @property + def tags( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Tags to attach to the operation. Used by code generators to include and exclude operations.""" + + def __init__( + self, + *, + name: builtins.str = ..., + tags: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["name", b"name", "tags", b"tags"] + ) -> None: ... + +global___OperationOptions = OperationOptions + +@typing.final +class ServiceOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + TAGS_FIELD_NUMBER: builtins.int + name: builtins.str + """Nexus service name (defaults to proto service full name).""" + @property + def tags( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Tags to attach to the service. Used by code generators to include and exclude services.""" + + def __init__( + self, + *, + name: builtins.str = ..., + tags: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["name", b"name", "tags", b"tags"] + ) -> None: ... + +global___ServiceOptions = ServiceOptions + +SERVICE_FIELD_NUMBER: builtins.int +OPERATION_FIELD_NUMBER: builtins.int +service: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[ + google.protobuf.descriptor_pb2.ServiceOptions, global___ServiceOptions +] +operation: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[ + google.protobuf.descriptor_pb2.MethodOptions, global___OperationOptions +] diff --git a/temporalio/api/dependencies/protoc_gen_openapiv2/__init__.py b/temporalio/api/dependencies/protoc_gen_openapiv2/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/dependencies/protoc_gen_openapiv2/options/__init__.py b/temporalio/api/dependencies/protoc_gen_openapiv2/options/__init__.py new file mode 100644 index 0000000000..f828cbf238 --- /dev/null +++ b/temporalio/api/dependencies/protoc_gen_openapiv2/options/__init__.py @@ -0,0 +1,43 @@ +from .openapiv2_pb2 import ( + Contact, + EnumSchema, + ExternalDocumentation, + Header, + HeaderParameter, + Info, + JSONSchema, + License, + Operation, + Parameters, + Response, + Schema, + Scheme, + Scopes, + SecurityDefinitions, + SecurityRequirement, + SecurityScheme, + Swagger, + Tag, +) + +__all__ = [ + "Contact", + "EnumSchema", + "ExternalDocumentation", + "Header", + "HeaderParameter", + "Info", + "JSONSchema", + "License", + "Operation", + "Parameters", + "Response", + "Schema", + "Scheme", + "Scopes", + "SecurityDefinitions", + "SecurityRequirement", + "SecurityScheme", + "Swagger", + "Tag", +] diff --git a/temporalio/api/dependencies/protoc_gen_openapiv2/options/annotations_pb2.py b/temporalio/api/dependencies/protoc_gen_openapiv2/options/annotations_pb2.py new file mode 100644 index 0000000000..4af20c0f76 --- /dev/null +++ b/temporalio/api/dependencies/protoc_gen_openapiv2/options/annotations_pb2.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protoc-gen-openapiv2/options/annotations.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + +from temporalio.api.dependencies.protoc_gen_openapiv2.options import ( + openapiv2_pb2 as protoc__gen__openapiv2_dot_options_dot_openapiv2__pb2, +) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b"\n.protoc-gen-openapiv2/options/annotations.proto\x12)grpc.gateway.protoc_gen_openapiv2.options\x1a google/protobuf/descriptor.proto\x1a,protoc-gen-openapiv2/options/openapiv2.proto:l\n\x11openapiv2_swagger\x12\x1c.google.protobuf.FileOptions\x18\x92\x08 \x01(\x0b\x32\x32.grpc.gateway.protoc_gen_openapiv2.options.Swagger:r\n\x13openapiv2_operation\x12\x1e.google.protobuf.MethodOptions\x18\x92\x08 \x01(\x0b\x32\x34.grpc.gateway.protoc_gen_openapiv2.options.Operation:m\n\x10openapiv2_schema\x12\x1f.google.protobuf.MessageOptions\x18\x92\x08 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.Schema:l\n\x0eopenapiv2_enum\x12\x1c.google.protobuf.EnumOptions\x18\x92\x08 \x01(\x0b\x32\x35.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema:g\n\ropenapiv2_tag\x12\x1f.google.protobuf.ServiceOptions\x18\x92\x08 \x01(\x0b\x32..grpc.gateway.protoc_gen_openapiv2.options.Tag:n\n\x0fopenapiv2_field\x12\x1d.google.protobuf.FieldOptions\x18\x92\x08 \x01(\x0b\x32\x35.grpc.gateway.protoc_gen_openapiv2.options.JSONSchemaBHZFgithub.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/optionsb\x06proto3" +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension( + openapiv2_swagger + ) + google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension( + openapiv2_operation + ) + google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension( + openapiv2_schema + ) + google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension( + openapiv2_enum + ) + google_dot_protobuf_dot_descriptor__pb2.ServiceOptions.RegisterExtension( + openapiv2_tag + ) + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension( + openapiv2_field + ) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = ( + b"ZFgithub.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + ) +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/dependencies/protoc_gen_openapiv2/options/annotations_pb2.pyi b/temporalio/api/dependencies/protoc_gen_openapiv2/options/annotations_pb2.pyi new file mode 100644 index 0000000000..1d2f3de315 --- /dev/null +++ b/temporalio/api/dependencies/protoc_gen_openapiv2/options/annotations_pb2.pyi @@ -0,0 +1,75 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins + +import google.protobuf.descriptor +import google.protobuf.descriptor_pb2 +import google.protobuf.internal.extension_dict + +import temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +OPENAPIV2_SWAGGER_FIELD_NUMBER: builtins.int +OPENAPIV2_OPERATION_FIELD_NUMBER: builtins.int +OPENAPIV2_SCHEMA_FIELD_NUMBER: builtins.int +OPENAPIV2_ENUM_FIELD_NUMBER: builtins.int +OPENAPIV2_TAG_FIELD_NUMBER: builtins.int +OPENAPIV2_FIELD_FIELD_NUMBER: builtins.int +openapiv2_swagger: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[ + google.protobuf.descriptor_pb2.FileOptions, + temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_pb2.Swagger, +] +"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend +different descriptor messages. +""" +openapiv2_operation: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[ + google.protobuf.descriptor_pb2.MethodOptions, + temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_pb2.Operation, +] +"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend +different descriptor messages. +""" +openapiv2_schema: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[ + google.protobuf.descriptor_pb2.MessageOptions, + temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_pb2.Schema, +] +"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend +different descriptor messages. +""" +openapiv2_enum: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[ + google.protobuf.descriptor_pb2.EnumOptions, + temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_pb2.EnumSchema, +] +"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend +different descriptor messages. +""" +openapiv2_tag: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[ + google.protobuf.descriptor_pb2.ServiceOptions, + temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_pb2.Tag, +] +"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend +different descriptor messages. +""" +openapiv2_field: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[ + google.protobuf.descriptor_pb2.FieldOptions, + temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_pb2.JSONSchema, +] +"""ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend +different descriptor messages. +""" diff --git a/temporalio/api/dependencies/protoc_gen_openapiv2/options/openapiv2_pb2.py b/temporalio/api/dependencies/protoc_gen_openapiv2/options/openapiv2_pb2.py new file mode 100644 index 0000000000..4a63ed5634 --- /dev/null +++ b/temporalio/api/dependencies/protoc_gen_openapiv2/options/openapiv2_pb2.py @@ -0,0 +1,141 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: protoc-gen-openapiv2/options/openapiv2.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n,protoc-gen-openapiv2/options/openapiv2.proto\x12)grpc.gateway.protoc_gen_openapiv2.options\x1a\x1cgoogle/protobuf/struct.proto"\x95\x07\n\x07Swagger\x12\x0f\n\x07swagger\x18\x01 \x01(\t\x12=\n\x04info\x18\x02 \x01(\x0b\x32/.grpc.gateway.protoc_gen_openapiv2.options.Info\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x11\n\tbase_path\x18\x04 \x01(\t\x12\x42\n\x07schemes\x18\x05 \x03(\x0e\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.Scheme\x12\x10\n\x08\x63onsumes\x18\x06 \x03(\t\x12\x10\n\x08produces\x18\x07 \x03(\t\x12T\n\tresponses\x18\n \x03(\x0b\x32\x41.grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry\x12\\\n\x14security_definitions\x18\x0b \x01(\x0b\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions\x12P\n\x08security\x18\x0c \x03(\x0b\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement\x12<\n\x04tags\x18\r \x03(\x0b\x32..grpc.gateway.protoc_gen_openapiv2.options.Tag\x12W\n\rexternal_docs\x18\x0e \x01(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation\x12V\n\nextensions\x18\x0f \x03(\x0b\x32\x42.grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry\x1a\x65\n\x0eResponsesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.grpc.gateway.protoc_gen_openapiv2.options.Response:\x02\x38\x01\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n"\xb1\x06\n\tOperation\x12\x0c\n\x04tags\x18\x01 \x03(\t\x12\x0f\n\x07summary\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12W\n\rexternal_docs\x18\x04 \x01(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation\x12\x14\n\x0coperation_id\x18\x05 \x01(\t\x12\x10\n\x08\x63onsumes\x18\x06 \x03(\t\x12\x10\n\x08produces\x18\x07 \x03(\t\x12V\n\tresponses\x18\t \x03(\x0b\x32\x43.grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry\x12\x42\n\x07schemes\x18\n \x03(\x0e\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.Scheme\x12\x12\n\ndeprecated\x18\x0b \x01(\x08\x12P\n\x08security\x18\x0c \x03(\x0b\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement\x12X\n\nextensions\x18\r \x03(\x0b\x32\x44.grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry\x12I\n\nparameters\x18\x0e \x01(\x0b\x32\x35.grpc.gateway.protoc_gen_openapiv2.options.Parameters\x1a\x65\n\x0eResponsesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.grpc.gateway.protoc_gen_openapiv2.options.Response:\x02\x38\x01\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01J\x04\x08\x08\x10\t"Y\n\nParameters\x12K\n\x07headers\x18\x01 \x03(\x0b\x32:.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter"\xf8\x01\n\x0fHeaderParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12M\n\x04type\x18\x03 \x01(\x0e\x32?.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type\x12\x0e\n\x06\x66ormat\x18\x04 \x01(\t\x12\x10\n\x08required\x18\x05 \x01(\x08"E\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06STRING\x10\x01\x12\n\n\x06NUMBER\x10\x02\x12\x0b\n\x07INTEGER\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08"\xab\x01\n\x06Header\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x03 \x01(\t\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x06 \x01(\t\x12\x0f\n\x07pattern\x18\r \x01(\tJ\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\tJ\x04\x08\t\x10\nJ\x04\x08\n\x10\x0bJ\x04\x08\x0b\x10\x0cJ\x04\x08\x0c\x10\rJ\x04\x08\x0e\x10\x0fJ\x04\x08\x0f\x10\x10J\x04\x08\x10\x10\x11J\x04\x08\x11\x10\x12J\x04\x08\x12\x10\x13"\xc2\x04\n\x08Response\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x41\n\x06schema\x18\x02 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.Schema\x12Q\n\x07headers\x18\x03 \x03(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry\x12S\n\x08\x65xamples\x18\x04 \x03(\x0b\x32\x41.grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry\x12W\n\nextensions\x18\x05 \x03(\x0b\x32\x43.grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry\x1a\x61\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.Header:\x02\x38\x01\x1a/\n\rExamplesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01"\xff\x02\n\x04Info\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x18\n\x10terms_of_service\x18\x03 \x01(\t\x12\x43\n\x07\x63ontact\x18\x04 \x01(\x0b\x32\x32.grpc.gateway.protoc_gen_openapiv2.options.Contact\x12\x43\n\x07license\x18\x05 \x01(\x0b\x32\x32.grpc.gateway.protoc_gen_openapiv2.options.License\x12\x0f\n\x07version\x18\x06 \x01(\t\x12S\n\nextensions\x18\x07 \x03(\x0b\x32?.grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01"3\n\x07\x43ontact\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\r\n\x05\x65mail\x18\x03 \x01(\t"$\n\x07License\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t"9\n\x15\x45xternalDocumentation\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t"\xee\x01\n\x06Schema\x12J\n\x0bjson_schema\x18\x01 \x01(\x0b\x32\x35.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema\x12\x15\n\rdiscriminator\x18\x02 \x01(\t\x12\x11\n\tread_only\x18\x03 \x01(\x08\x12W\n\rexternal_docs\x18\x05 \x01(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation\x12\x0f\n\x07\x65xample\x18\x06 \x01(\tJ\x04\x08\x04\x10\x05"\x83\x03\n\nEnumSchema\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x02 \x01(\t\x12\r\n\x05title\x18\x03 \x01(\t\x12\x10\n\x08required\x18\x04 \x01(\x08\x12\x11\n\tread_only\x18\x05 \x01(\x08\x12W\n\rexternal_docs\x18\x06 \x01(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation\x12\x0f\n\x07\x65xample\x18\x07 \x01(\t\x12\x0b\n\x03ref\x18\x08 \x01(\t\x12Y\n\nextensions\x18\t \x03(\x0b\x32\x45.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01"\xa2\x08\n\nJSONSchema\x12\x0b\n\x03ref\x18\x03 \x01(\t\x12\r\n\x05title\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x07 \x01(\t\x12\x11\n\tread_only\x18\x08 \x01(\x08\x12\x0f\n\x07\x65xample\x18\t \x01(\t\x12\x13\n\x0bmultiple_of\x18\n \x01(\x01\x12\x0f\n\x07maximum\x18\x0b \x01(\x01\x12\x19\n\x11\x65xclusive_maximum\x18\x0c \x01(\x08\x12\x0f\n\x07minimum\x18\r \x01(\x01\x12\x19\n\x11\x65xclusive_minimum\x18\x0e \x01(\x08\x12\x12\n\nmax_length\x18\x0f \x01(\x04\x12\x12\n\nmin_length\x18\x10 \x01(\x04\x12\x0f\n\x07pattern\x18\x11 \x01(\t\x12\x11\n\tmax_items\x18\x14 \x01(\x04\x12\x11\n\tmin_items\x18\x15 \x01(\x04\x12\x14\n\x0cunique_items\x18\x16 \x01(\x08\x12\x16\n\x0emax_properties\x18\x18 \x01(\x04\x12\x16\n\x0emin_properties\x18\x19 \x01(\x04\x12\x10\n\x08required\x18\x1a \x03(\t\x12\r\n\x05\x61rray\x18" \x03(\t\x12Y\n\x04type\x18# \x03(\x0e\x32K.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes\x12\x0e\n\x06\x66ormat\x18$ \x01(\t\x12\x0c\n\x04\x65num\x18. \x03(\t\x12\x66\n\x13\x66ield_configuration\x18\xe9\x07 \x01(\x0b\x32H.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration\x12Y\n\nextensions\x18\x30 \x03(\x0b\x32\x45.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry\x1a-\n\x12\x46ieldConfiguration\x12\x17\n\x0fpath_param_name\x18/ \x01(\t\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01"w\n\x15JSONSchemaSimpleTypes\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x41RRAY\x10\x01\x12\x0b\n\x07\x42OOLEAN\x10\x02\x12\x0b\n\x07INTEGER\x10\x03\x12\x08\n\x04NULL\x10\x04\x12\n\n\x06NUMBER\x10\x05\x12\n\n\x06OBJECT\x10\x06\x12\n\n\x06STRING\x10\x07J\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x04\x10\x05J\x04\x08\x12\x10\x13J\x04\x08\x13\x10\x14J\x04\x08\x17\x10\x18J\x04\x08\x1b\x10\x1cJ\x04\x08\x1c\x10\x1dJ\x04\x08\x1d\x10\x1eJ\x04\x08\x1e\x10"J\x04\x08%\x10*J\x04\x08*\x10+J\x04\x08+\x10."\xa0\x02\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12W\n\rexternal_docs\x18\x03 \x01(\x0b\x32@.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation\x12R\n\nextensions\x18\x04 \x03(\x0b\x32>.grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01"\xe1\x01\n\x13SecurityDefinitions\x12^\n\x08security\x18\x01 \x03(\x0b\x32L.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry\x1aj\n\rSecurityEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme:\x02\x38\x01"\xa0\x06\n\x0eSecurityScheme\x12L\n\x04type\x18\x01 \x01(\x0e\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12H\n\x02in\x18\x04 \x01(\x0e\x32<.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In\x12L\n\x04\x66low\x18\x05 \x01(\x0e\x32>.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow\x12\x19\n\x11\x61uthorization_url\x18\x06 \x01(\t\x12\x11\n\ttoken_url\x18\x07 \x01(\t\x12\x41\n\x06scopes\x18\x08 \x01(\x0b\x32\x31.grpc.gateway.protoc_gen_openapiv2.options.Scopes\x12]\n\nextensions\x18\t \x03(\x0b\x32I.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry\x1aI\n\x0f\x45xtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01"K\n\x04Type\x12\x10\n\x0cTYPE_INVALID\x10\x00\x12\x0e\n\nTYPE_BASIC\x10\x01\x12\x10\n\x0cTYPE_API_KEY\x10\x02\x12\x0f\n\x0bTYPE_OAUTH2\x10\x03"1\n\x02In\x12\x0e\n\nIN_INVALID\x10\x00\x12\x0c\n\x08IN_QUERY\x10\x01\x12\r\n\tIN_HEADER\x10\x02"j\n\x04\x46low\x12\x10\n\x0c\x46LOW_INVALID\x10\x00\x12\x11\n\rFLOW_IMPLICIT\x10\x01\x12\x11\n\rFLOW_PASSWORD\x10\x02\x12\x14\n\x10\x46LOW_APPLICATION\x10\x03\x12\x14\n\x10\x46LOW_ACCESS_CODE\x10\x04"\xcd\x02\n\x13SecurityRequirement\x12u\n\x14security_requirement\x18\x01 \x03(\x0b\x32W.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry\x1a)\n\x18SecurityRequirementValue\x12\r\n\x05scope\x18\x01 \x03(\t\x1a\x93\x01\n\x18SecurityRequirementEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x66\n\x05value\x18\x02 \x01(\x0b\x32W.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue:\x02\x38\x01"\x83\x01\n\x06Scopes\x12K\n\x05scope\x18\x01 \x03(\x0b\x32<.grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry\x1a,\n\nScopeEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01*;\n\x06Scheme\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04HTTP\x10\x01\x12\t\n\x05HTTPS\x10\x02\x12\x06\n\x02WS\x10\x03\x12\x07\n\x03WSS\x10\x04\x42HZFgithub.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/optionsb\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = ( + b"ZFgithub.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + ) + _SWAGGER_RESPONSESENTRY._options = None + _SWAGGER_RESPONSESENTRY._serialized_options = b"8\001" + _SWAGGER_EXTENSIONSENTRY._options = None + _SWAGGER_EXTENSIONSENTRY._serialized_options = b"8\001" + _OPERATION_RESPONSESENTRY._options = None + _OPERATION_RESPONSESENTRY._serialized_options = b"8\001" + _OPERATION_EXTENSIONSENTRY._options = None + _OPERATION_EXTENSIONSENTRY._serialized_options = b"8\001" + _RESPONSE_HEADERSENTRY._options = None + _RESPONSE_HEADERSENTRY._serialized_options = b"8\001" + _RESPONSE_EXAMPLESENTRY._options = None + _RESPONSE_EXAMPLESENTRY._serialized_options = b"8\001" + _RESPONSE_EXTENSIONSENTRY._options = None + _RESPONSE_EXTENSIONSENTRY._serialized_options = b"8\001" + _INFO_EXTENSIONSENTRY._options = None + _INFO_EXTENSIONSENTRY._serialized_options = b"8\001" + _ENUMSCHEMA_EXTENSIONSENTRY._options = None + _ENUMSCHEMA_EXTENSIONSENTRY._serialized_options = b"8\001" + _JSONSCHEMA_EXTENSIONSENTRY._options = None + _JSONSCHEMA_EXTENSIONSENTRY._serialized_options = b"8\001" + _TAG_EXTENSIONSENTRY._options = None + _TAG_EXTENSIONSENTRY._serialized_options = b"8\001" + _SECURITYDEFINITIONS_SECURITYENTRY._options = None + _SECURITYDEFINITIONS_SECURITYENTRY._serialized_options = b"8\001" + _SECURITYSCHEME_EXTENSIONSENTRY._options = None + _SECURITYSCHEME_EXTENSIONSENTRY._serialized_options = b"8\001" + _SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY._options = None + _SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY._serialized_options = b"8\001" + _SCOPES_SCOPEENTRY._options = None + _SCOPES_SCOPEENTRY._serialized_options = b"8\001" + _SCHEME._serialized_start = 6978 + _SCHEME._serialized_end = 7037 + _SWAGGER._serialized_start = 122 + _SWAGGER._serialized_end = 1039 + _SWAGGER_RESPONSESENTRY._serialized_start = 851 + _SWAGGER_RESPONSESENTRY._serialized_end = 952 + _SWAGGER_EXTENSIONSENTRY._serialized_start = 954 + _SWAGGER_EXTENSIONSENTRY._serialized_end = 1027 + _OPERATION._serialized_start = 1042 + _OPERATION._serialized_end = 1859 + _OPERATION_RESPONSESENTRY._serialized_start = 851 + _OPERATION_RESPONSESENTRY._serialized_end = 952 + _OPERATION_EXTENSIONSENTRY._serialized_start = 954 + _OPERATION_EXTENSIONSENTRY._serialized_end = 1027 + _PARAMETERS._serialized_start = 1861 + _PARAMETERS._serialized_end = 1950 + _HEADERPARAMETER._serialized_start = 1953 + _HEADERPARAMETER._serialized_end = 2201 + _HEADERPARAMETER_TYPE._serialized_start = 2120 + _HEADERPARAMETER_TYPE._serialized_end = 2189 + _HEADER._serialized_start = 2204 + _HEADER._serialized_end = 2375 + _RESPONSE._serialized_start = 2378 + _RESPONSE._serialized_end = 2956 + _RESPONSE_HEADERSENTRY._serialized_start = 2735 + _RESPONSE_HEADERSENTRY._serialized_end = 2832 + _RESPONSE_EXAMPLESENTRY._serialized_start = 2834 + _RESPONSE_EXAMPLESENTRY._serialized_end = 2881 + _RESPONSE_EXTENSIONSENTRY._serialized_start = 954 + _RESPONSE_EXTENSIONSENTRY._serialized_end = 1027 + _INFO._serialized_start = 2959 + _INFO._serialized_end = 3342 + _INFO_EXTENSIONSENTRY._serialized_start = 954 + _INFO_EXTENSIONSENTRY._serialized_end = 1027 + _CONTACT._serialized_start = 3344 + _CONTACT._serialized_end = 3395 + _LICENSE._serialized_start = 3397 + _LICENSE._serialized_end = 3433 + _EXTERNALDOCUMENTATION._serialized_start = 3435 + _EXTERNALDOCUMENTATION._serialized_end = 3492 + _SCHEMA._serialized_start = 3495 + _SCHEMA._serialized_end = 3733 + _ENUMSCHEMA._serialized_start = 3736 + _ENUMSCHEMA._serialized_end = 4123 + _ENUMSCHEMA_EXTENSIONSENTRY._serialized_start = 954 + _ENUMSCHEMA_EXTENSIONSENTRY._serialized_end = 1027 + _JSONSCHEMA._serialized_start = 4126 + _JSONSCHEMA._serialized_end = 5184 + _JSONSCHEMA_FIELDCONFIGURATION._serialized_start = 4865 + _JSONSCHEMA_FIELDCONFIGURATION._serialized_end = 4910 + _JSONSCHEMA_EXTENSIONSENTRY._serialized_start = 954 + _JSONSCHEMA_EXTENSIONSENTRY._serialized_end = 1027 + _JSONSCHEMA_JSONSCHEMASIMPLETYPES._serialized_start = 4987 + _JSONSCHEMA_JSONSCHEMASIMPLETYPES._serialized_end = 5106 + _TAG._serialized_start = 5187 + _TAG._serialized_end = 5475 + _TAG_EXTENSIONSENTRY._serialized_start = 954 + _TAG_EXTENSIONSENTRY._serialized_end = 1027 + _SECURITYDEFINITIONS._serialized_start = 5478 + _SECURITYDEFINITIONS._serialized_end = 5703 + _SECURITYDEFINITIONS_SECURITYENTRY._serialized_start = 5597 + _SECURITYDEFINITIONS_SECURITYENTRY._serialized_end = 5703 + _SECURITYSCHEME._serialized_start = 5706 + _SECURITYSCHEME._serialized_end = 6506 + _SECURITYSCHEME_EXTENSIONSENTRY._serialized_start = 954 + _SECURITYSCHEME_EXTENSIONSENTRY._serialized_end = 1027 + _SECURITYSCHEME_TYPE._serialized_start = 6272 + _SECURITYSCHEME_TYPE._serialized_end = 6347 + _SECURITYSCHEME_IN._serialized_start = 6349 + _SECURITYSCHEME_IN._serialized_end = 6398 + _SECURITYSCHEME_FLOW._serialized_start = 6400 + _SECURITYSCHEME_FLOW._serialized_end = 6506 + _SECURITYREQUIREMENT._serialized_start = 6509 + _SECURITYREQUIREMENT._serialized_end = 6842 + _SECURITYREQUIREMENT_SECURITYREQUIREMENTVALUE._serialized_start = 6651 + _SECURITYREQUIREMENT_SECURITYREQUIREMENTVALUE._serialized_end = 6692 + _SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY._serialized_start = 6695 + _SECURITYREQUIREMENT_SECURITYREQUIREMENTENTRY._serialized_end = 6842 + _SCOPES._serialized_start = 6845 + _SCOPES._serialized_end = 6976 + _SCOPES_SCOPEENTRY._serialized_start = 6932 + _SCOPES_SCOPEENTRY._serialized_end = 6976 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/dependencies/protoc_gen_openapiv2/options/openapiv2_pb2.pyi b/temporalio/api/dependencies/protoc_gen_openapiv2/options/openapiv2_pb2.pyi new file mode 100644 index 0000000000..e78f061b3b --- /dev/null +++ b/temporalio/api/dependencies/protoc_gen_openapiv2/options/openapiv2_pb2.pyi @@ -0,0 +1,2141 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import sys +import typing + +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import google.protobuf.struct_pb2 + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _Scheme: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _SchemeEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Scheme.ValueType], + builtins.type, +): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + UNKNOWN: _Scheme.ValueType # 0 + HTTP: _Scheme.ValueType # 1 + HTTPS: _Scheme.ValueType # 2 + WS: _Scheme.ValueType # 3 + WSS: _Scheme.ValueType # 4 + +class Scheme(_Scheme, metaclass=_SchemeEnumTypeWrapper): + """Scheme describes the schemes supported by the OpenAPI Swagger + and Operation objects. + """ + +UNKNOWN: Scheme.ValueType # 0 +HTTP: Scheme.ValueType # 1 +HTTPS: Scheme.ValueType # 2 +WS: Scheme.ValueType # 3 +WSS: Scheme.ValueType # 4 +global___Scheme = Scheme + +@typing.final +class Swagger(google.protobuf.message.Message): + """`Swagger` is a representation of OpenAPI v2 specification's Swagger object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject + + Example: + + option (grpc.gateway.temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "Echo API"; + version: "1.0"; + description: ""; + contact: { + name: "gRPC-Gateway project"; + url: "https://github.com/grpc-ecosystem/grpc-gateway"; + email: "none@example.com"; + }; + license: { + name: "BSD 3-Clause License"; + url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; + }; + }; + schemes: HTTPS; + consumes: "application/json"; + produces: "application/json"; + }; + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ResponsesEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> global___Response: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: global___Response | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + @typing.final + class ExtensionsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> google.protobuf.struct_pb2.Value: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: google.protobuf.struct_pb2.Value | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + SWAGGER_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + HOST_FIELD_NUMBER: builtins.int + BASE_PATH_FIELD_NUMBER: builtins.int + SCHEMES_FIELD_NUMBER: builtins.int + CONSUMES_FIELD_NUMBER: builtins.int + PRODUCES_FIELD_NUMBER: builtins.int + RESPONSES_FIELD_NUMBER: builtins.int + SECURITY_DEFINITIONS_FIELD_NUMBER: builtins.int + SECURITY_FIELD_NUMBER: builtins.int + TAGS_FIELD_NUMBER: builtins.int + EXTERNAL_DOCS_FIELD_NUMBER: builtins.int + EXTENSIONS_FIELD_NUMBER: builtins.int + swagger: builtins.str + """Specifies the OpenAPI Specification version being used. It can be + used by the OpenAPI UI and other clients to interpret the API listing. The + value MUST be "2.0". + """ + host: builtins.str + """The host (name or ip) serving the API. This MUST be the host only and does + not include the scheme nor sub-paths. It MAY include a port. If the host is + not included, the host serving the documentation is to be used (including + the port). The host does not support path templating. + """ + base_path: builtins.str + """The base path on which the API is served, which is relative to the host. If + it is not included, the API is served directly under the host. The value + MUST start with a leading slash (/). The basePath does not support path + templating. + Note that using `base_path` does not change the endpoint paths that are + generated in the resulting OpenAPI file. If you wish to use `base_path` + with relatively generated OpenAPI paths, the `base_path` prefix must be + manually removed from your `google.api.http` paths and your code changed to + serve the API from the `base_path`. + """ + @property + def info(self) -> global___Info: + """Provides metadata about the API. The metadata can be used by the + clients if needed. + """ + + @property + def schemes( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + global___Scheme.ValueType + ]: + """The transfer protocol of the API. Values MUST be from the list: "http", + "https", "ws", "wss". If the schemes is not included, the default scheme to + be used is the one used to access the OpenAPI definition itself. + """ + + @property + def consumes( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """A list of MIME types the APIs can consume. This is global to all APIs but + can be overridden on specific API calls. Value MUST be as described under + Mime Types. + """ + + @property + def produces( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """A list of MIME types the APIs can produce. This is global to all APIs but + can be overridden on specific API calls. Value MUST be as described under + Mime Types. + """ + + @property + def responses( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, global___Response + ]: + """An object to hold responses that can be used across operations. This + property does not define global responses for all operations. + """ + + @property + def security_definitions(self) -> global___SecurityDefinitions: + """Security scheme definitions that can be used across the specification.""" + + @property + def security( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___SecurityRequirement + ]: + """A declaration of which security schemes are applied for the API as a whole. + The list of values describes alternative security schemes that can be used + (that is, there is a logical OR between the security requirements). + Individual operations can override this definition. + """ + + @property + def tags( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___Tag + ]: + """A list of tags for API documentation control. Tags can be used for logical + grouping of operations by resources or any other qualifier. + """ + + @property + def external_docs(self) -> global___ExternalDocumentation: + """Additional external documentation.""" + + @property + def extensions( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, google.protobuf.struct_pb2.Value + ]: + """Custom properties that start with "x-" such as "x-foo" used to describe + extra functionality that is not covered by the standard OpenAPI Specification. + See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + """ + + def __init__( + self, + *, + swagger: builtins.str = ..., + info: global___Info | None = ..., + host: builtins.str = ..., + base_path: builtins.str = ..., + schemes: collections.abc.Iterable[global___Scheme.ValueType] | None = ..., + consumes: collections.abc.Iterable[builtins.str] | None = ..., + produces: collections.abc.Iterable[builtins.str] | None = ..., + responses: collections.abc.Mapping[builtins.str, global___Response] + | None = ..., + security_definitions: global___SecurityDefinitions | None = ..., + security: collections.abc.Iterable[global___SecurityRequirement] | None = ..., + tags: collections.abc.Iterable[global___Tag] | None = ..., + external_docs: global___ExternalDocumentation | None = ..., + extensions: collections.abc.Mapping[ + builtins.str, google.protobuf.struct_pb2.Value + ] + | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "external_docs", + b"external_docs", + "info", + b"info", + "security_definitions", + b"security_definitions", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "base_path", + b"base_path", + "consumes", + b"consumes", + "extensions", + b"extensions", + "external_docs", + b"external_docs", + "host", + b"host", + "info", + b"info", + "produces", + b"produces", + "responses", + b"responses", + "schemes", + b"schemes", + "security", + b"security", + "security_definitions", + b"security_definitions", + "swagger", + b"swagger", + "tags", + b"tags", + ], + ) -> None: ... + +global___Swagger = Swagger + +@typing.final +class Operation(google.protobuf.message.Message): + """`Operation` is a representation of OpenAPI v2 specification's Operation object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject + + Example: + + service EchoService { + rpc Echo(SimpleMessage) returns (SimpleMessage) { + option (google.api.http) = { + get: "/v1/example/echo/{id}" + }; + + option (grpc.gateway.temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Get a message."; + operation_id: "getMessage"; + tags: "echo"; + responses: { + key: "200" + value: { + description: "OK"; + } + } + }; + } + } + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ResponsesEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> global___Response: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: global___Response | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + @typing.final + class ExtensionsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> google.protobuf.struct_pb2.Value: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: google.protobuf.struct_pb2.Value | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + TAGS_FIELD_NUMBER: builtins.int + SUMMARY_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + EXTERNAL_DOCS_FIELD_NUMBER: builtins.int + OPERATION_ID_FIELD_NUMBER: builtins.int + CONSUMES_FIELD_NUMBER: builtins.int + PRODUCES_FIELD_NUMBER: builtins.int + RESPONSES_FIELD_NUMBER: builtins.int + SCHEMES_FIELD_NUMBER: builtins.int + DEPRECATED_FIELD_NUMBER: builtins.int + SECURITY_FIELD_NUMBER: builtins.int + EXTENSIONS_FIELD_NUMBER: builtins.int + PARAMETERS_FIELD_NUMBER: builtins.int + summary: builtins.str + """A short summary of what the operation does. For maximum readability in the + swagger-ui, this field SHOULD be less than 120 characters. + """ + description: builtins.str + """A verbose explanation of the operation behavior. GFM syntax can be used for + rich text representation. + """ + operation_id: builtins.str + """Unique string used to identify the operation. The id MUST be unique among + all operations described in the API. Tools and libraries MAY use the + operationId to uniquely identify an operation, therefore, it is recommended + to follow common programming naming conventions. + """ + deprecated: builtins.bool + """Declares this operation to be deprecated. Usage of the declared operation + should be refrained. Default value is false. + """ + @property + def tags( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """A list of tags for API documentation control. Tags can be used for logical + grouping of operations by resources or any other qualifier. + """ + + @property + def external_docs(self) -> global___ExternalDocumentation: + """Additional external documentation for this operation.""" + + @property + def consumes( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """A list of MIME types the operation can consume. This overrides the consumes + definition at the OpenAPI Object. An empty value MAY be used to clear the + global definition. Value MUST be as described under Mime Types. + """ + + @property + def produces( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """A list of MIME types the operation can produce. This overrides the produces + definition at the OpenAPI Object. An empty value MAY be used to clear the + global definition. Value MUST be as described under Mime Types. + """ + + @property + def responses( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, global___Response + ]: + """The list of possible responses as they are returned from executing this + operation. + """ + + @property + def schemes( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + global___Scheme.ValueType + ]: + """The transfer protocol for the operation. Values MUST be from the list: + "http", "https", "ws", "wss". The value overrides the OpenAPI Object + schemes definition. + """ + + @property + def security( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___SecurityRequirement + ]: + """A declaration of which security schemes are applied for this operation. The + list of values describes alternative security schemes that can be used + (that is, there is a logical OR between the security requirements). This + definition overrides any declared top-level security. To remove a top-level + security declaration, an empty array can be used. + """ + + @property + def extensions( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, google.protobuf.struct_pb2.Value + ]: + """Custom properties that start with "x-" such as "x-foo" used to describe + extra functionality that is not covered by the standard OpenAPI Specification. + See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + """ + + @property + def parameters(self) -> global___Parameters: + """Custom parameters such as HTTP request headers. + See: https://swagger.io/docs/specification/2-0/describing-parameters/ + and https://swagger.io/specification/v2/#parameter-object. + """ + + def __init__( + self, + *, + tags: collections.abc.Iterable[builtins.str] | None = ..., + summary: builtins.str = ..., + description: builtins.str = ..., + external_docs: global___ExternalDocumentation | None = ..., + operation_id: builtins.str = ..., + consumes: collections.abc.Iterable[builtins.str] | None = ..., + produces: collections.abc.Iterable[builtins.str] | None = ..., + responses: collections.abc.Mapping[builtins.str, global___Response] + | None = ..., + schemes: collections.abc.Iterable[global___Scheme.ValueType] | None = ..., + deprecated: builtins.bool = ..., + security: collections.abc.Iterable[global___SecurityRequirement] | None = ..., + extensions: collections.abc.Mapping[ + builtins.str, google.protobuf.struct_pb2.Value + ] + | None = ..., + parameters: global___Parameters | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "external_docs", b"external_docs", "parameters", b"parameters" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "consumes", + b"consumes", + "deprecated", + b"deprecated", + "description", + b"description", + "extensions", + b"extensions", + "external_docs", + b"external_docs", + "operation_id", + b"operation_id", + "parameters", + b"parameters", + "produces", + b"produces", + "responses", + b"responses", + "schemes", + b"schemes", + "security", + b"security", + "summary", + b"summary", + "tags", + b"tags", + ], + ) -> None: ... + +global___Operation = Operation + +@typing.final +class Parameters(google.protobuf.message.Message): + """`Parameters` is a representation of OpenAPI v2 specification's parameters object. + Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only + allow header parameters to be set here since we do not want users specifying custom non-header + parameters beyond those inferred from the Protobuf schema. + See: https://swagger.io/specification/v2/#parameter-object + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HEADERS_FIELD_NUMBER: builtins.int + @property + def headers( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___HeaderParameter + ]: + """`Headers` is one or more HTTP header parameter. + See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters + """ + + def __init__( + self, + *, + headers: collections.abc.Iterable[global___HeaderParameter] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["headers", b"headers"]) -> None: ... + +global___Parameters = Parameters + +@typing.final +class HeaderParameter(google.protobuf.message.Message): + """`HeaderParameter` a HTTP header parameter. + See: https://swagger.io/specification/v2/#parameter-object + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Type: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _TypeEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + HeaderParameter._Type.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + UNKNOWN: HeaderParameter._Type.ValueType # 0 + STRING: HeaderParameter._Type.ValueType # 1 + NUMBER: HeaderParameter._Type.ValueType # 2 + INTEGER: HeaderParameter._Type.ValueType # 3 + BOOLEAN: HeaderParameter._Type.ValueType # 4 + + class Type(_Type, metaclass=_TypeEnumTypeWrapper): + """`Type` is a supported HTTP header type. + See https://swagger.io/specification/v2/#parameterType. + """ + + UNKNOWN: HeaderParameter.Type.ValueType # 0 + STRING: HeaderParameter.Type.ValueType # 1 + NUMBER: HeaderParameter.Type.ValueType # 2 + INTEGER: HeaderParameter.Type.ValueType # 3 + BOOLEAN: HeaderParameter.Type.ValueType # 4 + + NAME_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + TYPE_FIELD_NUMBER: builtins.int + FORMAT_FIELD_NUMBER: builtins.int + REQUIRED_FIELD_NUMBER: builtins.int + name: builtins.str + """`Name` is the header name.""" + description: builtins.str + """`Description` is a short description of the header.""" + type: global___HeaderParameter.Type.ValueType + """`Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + See: https://swagger.io/specification/v2/#parameterType. + """ + format: builtins.str + """`Format` The extending format for the previously mentioned type.""" + required: builtins.bool + """`Required` indicates if the header is optional""" + def __init__( + self, + *, + name: builtins.str = ..., + description: builtins.str = ..., + type: global___HeaderParameter.Type.ValueType = ..., + format: builtins.str = ..., + required: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "description", + b"description", + "format", + b"format", + "name", + b"name", + "required", + b"required", + "type", + b"type", + ], + ) -> None: ... + +global___HeaderParameter = HeaderParameter + +@typing.final +class Header(google.protobuf.message.Message): + """`Header` is a representation of OpenAPI v2 specification's Header object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DESCRIPTION_FIELD_NUMBER: builtins.int + TYPE_FIELD_NUMBER: builtins.int + FORMAT_FIELD_NUMBER: builtins.int + DEFAULT_FIELD_NUMBER: builtins.int + PATTERN_FIELD_NUMBER: builtins.int + description: builtins.str + """`Description` is a short description of the header.""" + type: builtins.str + """The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.""" + format: builtins.str + """`Format` The extending format for the previously mentioned type.""" + default: builtins.str + """`Default` Declares the value of the header that the server will use if none is provided. + See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + Unlike JSON Schema this value MUST conform to the defined type for the header. + """ + pattern: builtins.str + """'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.""" + def __init__( + self, + *, + description: builtins.str = ..., + type: builtins.str = ..., + format: builtins.str = ..., + default: builtins.str = ..., + pattern: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "default", + b"default", + "description", + b"description", + "format", + b"format", + "pattern", + b"pattern", + "type", + b"type", + ], + ) -> None: ... + +global___Header = Header + +@typing.final +class Response(google.protobuf.message.Message): + """`Response` is a representation of OpenAPI v2 specification's Response object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class HeadersEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> global___Header: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: global___Header | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + @typing.final + class ExamplesEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.str + def __init__( + self, + *, + key: builtins.str = ..., + value: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + @typing.final + class ExtensionsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> google.protobuf.struct_pb2.Value: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: google.protobuf.struct_pb2.Value | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + DESCRIPTION_FIELD_NUMBER: builtins.int + SCHEMA_FIELD_NUMBER: builtins.int + HEADERS_FIELD_NUMBER: builtins.int + EXAMPLES_FIELD_NUMBER: builtins.int + EXTENSIONS_FIELD_NUMBER: builtins.int + description: builtins.str + """`Description` is a short description of the response. + GFM syntax can be used for rich text representation. + """ + @property + def schema(self) -> global___Schema: + """`Schema` optionally defines the structure of the response. + If `Schema` is not provided, it means there is no content to the response. + """ + + @property + def headers( + self, + ) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___Header]: + """`Headers` A list of headers that are sent with the response. + `Header` name is expected to be a string in the canonical format of the MIME header key + See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + """ + + @property + def examples( + self, + ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + """`Examples` gives per-mimetype response examples. + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + """ + + @property + def extensions( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, google.protobuf.struct_pb2.Value + ]: + """Custom properties that start with "x-" such as "x-foo" used to describe + extra functionality that is not covered by the standard OpenAPI Specification. + See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + """ + + def __init__( + self, + *, + description: builtins.str = ..., + schema: global___Schema | None = ..., + headers: collections.abc.Mapping[builtins.str, global___Header] | None = ..., + examples: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + extensions: collections.abc.Mapping[ + builtins.str, google.protobuf.struct_pb2.Value + ] + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["schema", b"schema"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "description", + b"description", + "examples", + b"examples", + "extensions", + b"extensions", + "headers", + b"headers", + "schema", + b"schema", + ], + ) -> None: ... + +global___Response = Response + +@typing.final +class Info(google.protobuf.message.Message): + """`Info` is a representation of OpenAPI v2 specification's Info object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject + + Example: + + option (grpc.gateway.temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "Echo API"; + version: "1.0"; + description: ""; + contact: { + name: "gRPC-Gateway project"; + url: "https://github.com/grpc-ecosystem/grpc-gateway"; + email: "none@example.com"; + }; + license: { + name: "BSD 3-Clause License"; + url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; + }; + }; + ... + }; + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ExtensionsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> google.protobuf.struct_pb2.Value: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: google.protobuf.struct_pb2.Value | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + TITLE_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + TERMS_OF_SERVICE_FIELD_NUMBER: builtins.int + CONTACT_FIELD_NUMBER: builtins.int + LICENSE_FIELD_NUMBER: builtins.int + VERSION_FIELD_NUMBER: builtins.int + EXTENSIONS_FIELD_NUMBER: builtins.int + title: builtins.str + """The title of the application.""" + description: builtins.str + """A short description of the application. GFM syntax can be used for rich + text representation. + """ + terms_of_service: builtins.str + """The Terms of Service for the API.""" + version: builtins.str + """Provides the version of the application API (not to be confused + with the specification version). + """ + @property + def contact(self) -> global___Contact: + """The contact information for the exposed API.""" + + @property + def license(self) -> global___License: + """The license information for the exposed API.""" + + @property + def extensions( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, google.protobuf.struct_pb2.Value + ]: + """Custom properties that start with "x-" such as "x-foo" used to describe + extra functionality that is not covered by the standard OpenAPI Specification. + See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + """ + + def __init__( + self, + *, + title: builtins.str = ..., + description: builtins.str = ..., + terms_of_service: builtins.str = ..., + contact: global___Contact | None = ..., + license: global___License | None = ..., + version: builtins.str = ..., + extensions: collections.abc.Mapping[ + builtins.str, google.protobuf.struct_pb2.Value + ] + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["contact", b"contact", "license", b"license"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "contact", + b"contact", + "description", + b"description", + "extensions", + b"extensions", + "license", + b"license", + "terms_of_service", + b"terms_of_service", + "title", + b"title", + "version", + b"version", + ], + ) -> None: ... + +global___Info = Info + +@typing.final +class Contact(google.protobuf.message.Message): + """`Contact` is a representation of OpenAPI v2 specification's Contact object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject + + Example: + + option (grpc.gateway.temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + ... + contact: { + name: "gRPC-Gateway project"; + url: "https://github.com/grpc-ecosystem/grpc-gateway"; + email: "none@example.com"; + }; + ... + }; + ... + }; + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + URL_FIELD_NUMBER: builtins.int + EMAIL_FIELD_NUMBER: builtins.int + name: builtins.str + """The identifying name of the contact person/organization.""" + url: builtins.str + """The URL pointing to the contact information. MUST be in the format of a + URL. + """ + email: builtins.str + """The email address of the contact person/organization. MUST be in the format + of an email address. + """ + def __init__( + self, + *, + name: builtins.str = ..., + url: builtins.str = ..., + email: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal["email", b"email", "name", b"name", "url", b"url"], + ) -> None: ... + +global___Contact = Contact + +@typing.final +class License(google.protobuf.message.Message): + """`License` is a representation of OpenAPI v2 specification's License object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject + + Example: + + option (grpc.gateway.temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + ... + license: { + name: "BSD 3-Clause License"; + url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; + }; + ... + }; + ... + }; + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + URL_FIELD_NUMBER: builtins.int + name: builtins.str + """The license name used for the API.""" + url: builtins.str + """A URL to the license used for the API. MUST be in the format of a URL.""" + def __init__( + self, + *, + name: builtins.str = ..., + url: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["name", b"name", "url", b"url"] + ) -> None: ... + +global___License = License + +@typing.final +class ExternalDocumentation(google.protobuf.message.Message): + """`ExternalDocumentation` is a representation of OpenAPI v2 specification's + ExternalDocumentation object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject + + Example: + + option (grpc.gateway.temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_swagger) = { + ... + external_docs: { + description: "More about gRPC-Gateway"; + url: "https://github.com/grpc-ecosystem/grpc-gateway"; + } + ... + }; + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DESCRIPTION_FIELD_NUMBER: builtins.int + URL_FIELD_NUMBER: builtins.int + description: builtins.str + """A short description of the target documentation. GFM syntax can be used for + rich text representation. + """ + url: builtins.str + """The URL for the target documentation. Value MUST be in the format + of a URL. + """ + def __init__( + self, + *, + description: builtins.str = ..., + url: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["description", b"description", "url", b"url"] + ) -> None: ... + +global___ExternalDocumentation = ExternalDocumentation + +@typing.final +class Schema(google.protobuf.message.Message): + """`Schema` is a representation of OpenAPI v2 specification's Schema object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + JSON_SCHEMA_FIELD_NUMBER: builtins.int + DISCRIMINATOR_FIELD_NUMBER: builtins.int + READ_ONLY_FIELD_NUMBER: builtins.int + EXTERNAL_DOCS_FIELD_NUMBER: builtins.int + EXAMPLE_FIELD_NUMBER: builtins.int + discriminator: builtins.str + """Adds support for polymorphism. The discriminator is the schema property + name that is used to differentiate between other schema that inherit this + schema. The property name used MUST be defined at this schema and it MUST + be in the required property list. When used, the value MUST be the name of + this schema or any schema that inherits it. + """ + read_only: builtins.bool + """Relevant only for Schema "properties" definitions. Declares the property as + "read only". This means that it MAY be sent as part of a response but MUST + NOT be sent as part of the request. Properties marked as readOnly being + true SHOULD NOT be in the required list of the defined schema. Default + value is false. + """ + example: builtins.str + """A free-form property to include an example of an instance for this schema in JSON. + This is copied verbatim to the output. + """ + @property + def json_schema(self) -> global___JSONSchema: ... + @property + def external_docs(self) -> global___ExternalDocumentation: + """Additional external documentation for this schema.""" + + def __init__( + self, + *, + json_schema: global___JSONSchema | None = ..., + discriminator: builtins.str = ..., + read_only: builtins.bool = ..., + external_docs: global___ExternalDocumentation | None = ..., + example: builtins.str = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "external_docs", b"external_docs", "json_schema", b"json_schema" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "discriminator", + b"discriminator", + "example", + b"example", + "external_docs", + b"external_docs", + "json_schema", + b"json_schema", + "read_only", + b"read_only", + ], + ) -> None: ... + +global___Schema = Schema + +@typing.final +class EnumSchema(google.protobuf.message.Message): + """`EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object. + Only fields that are applicable to Enums are included + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + + Example: + + option (grpc.gateway.temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_enum) = { + ... + title: "MyEnum"; + description:"This is my nice enum"; + example: "ZERO"; + required: true; + ... + }; + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ExtensionsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> google.protobuf.struct_pb2.Value: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: google.protobuf.struct_pb2.Value | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + DESCRIPTION_FIELD_NUMBER: builtins.int + DEFAULT_FIELD_NUMBER: builtins.int + TITLE_FIELD_NUMBER: builtins.int + REQUIRED_FIELD_NUMBER: builtins.int + READ_ONLY_FIELD_NUMBER: builtins.int + EXTERNAL_DOCS_FIELD_NUMBER: builtins.int + EXAMPLE_FIELD_NUMBER: builtins.int + REF_FIELD_NUMBER: builtins.int + EXTENSIONS_FIELD_NUMBER: builtins.int + description: builtins.str + """A short description of the schema.""" + default: builtins.str + title: builtins.str + """The title of the schema.""" + required: builtins.bool + read_only: builtins.bool + example: builtins.str + ref: builtins.str + """Ref is used to define an external reference to include in the message. + This could be a fully qualified proto message reference, and that type must + be imported into the protofile. If no message is identified, the Ref will + be used verbatim in the output. + For example: + `ref: ".google.protobuf.Timestamp"`. + """ + @property + def external_docs(self) -> global___ExternalDocumentation: + """Additional external documentation for this schema.""" + + @property + def extensions( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, google.protobuf.struct_pb2.Value + ]: + """Custom properties that start with "x-" such as "x-foo" used to describe + extra functionality that is not covered by the standard OpenAPI Specification. + See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + """ + + def __init__( + self, + *, + description: builtins.str = ..., + default: builtins.str = ..., + title: builtins.str = ..., + required: builtins.bool = ..., + read_only: builtins.bool = ..., + external_docs: global___ExternalDocumentation | None = ..., + example: builtins.str = ..., + ref: builtins.str = ..., + extensions: collections.abc.Mapping[ + builtins.str, google.protobuf.struct_pb2.Value + ] + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["external_docs", b"external_docs"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "default", + b"default", + "description", + b"description", + "example", + b"example", + "extensions", + b"extensions", + "external_docs", + b"external_docs", + "read_only", + b"read_only", + "ref", + b"ref", + "required", + b"required", + "title", + b"title", + ], + ) -> None: ... + +global___EnumSchema = EnumSchema + +@typing.final +class JSONSchema(google.protobuf.message.Message): + """`JSONSchema` represents properties from JSON Schema taken, and as used, in + the OpenAPI v2 spec. + + This includes changes made by OpenAPI v2. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + + See also: https://cswr.github.io/JsonSchema/spec/basic_types/, + https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json + + Example: + + message SimpleMessage { + option (grpc.gateway.temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: { + title: "SimpleMessage" + description: "A simple message." + required: ["id"] + } + }; + + // Id represents the message identifier. + string id = 1; [ + (grpc.gateway.temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_field) = { + description: "The unique identifier of the simple message." + }]; + } + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _JSONSchemaSimpleTypes: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _JSONSchemaSimpleTypesEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + JSONSchema._JSONSchemaSimpleTypes.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + UNKNOWN: JSONSchema._JSONSchemaSimpleTypes.ValueType # 0 + ARRAY: JSONSchema._JSONSchemaSimpleTypes.ValueType # 1 + BOOLEAN: JSONSchema._JSONSchemaSimpleTypes.ValueType # 2 + INTEGER: JSONSchema._JSONSchemaSimpleTypes.ValueType # 3 + NULL: JSONSchema._JSONSchemaSimpleTypes.ValueType # 4 + NUMBER: JSONSchema._JSONSchemaSimpleTypes.ValueType # 5 + OBJECT: JSONSchema._JSONSchemaSimpleTypes.ValueType # 6 + STRING: JSONSchema._JSONSchemaSimpleTypes.ValueType # 7 + + class JSONSchemaSimpleTypes( + _JSONSchemaSimpleTypes, metaclass=_JSONSchemaSimpleTypesEnumTypeWrapper + ): ... + UNKNOWN: JSONSchema.JSONSchemaSimpleTypes.ValueType # 0 + ARRAY: JSONSchema.JSONSchemaSimpleTypes.ValueType # 1 + BOOLEAN: JSONSchema.JSONSchemaSimpleTypes.ValueType # 2 + INTEGER: JSONSchema.JSONSchemaSimpleTypes.ValueType # 3 + NULL: JSONSchema.JSONSchemaSimpleTypes.ValueType # 4 + NUMBER: JSONSchema.JSONSchemaSimpleTypes.ValueType # 5 + OBJECT: JSONSchema.JSONSchemaSimpleTypes.ValueType # 6 + STRING: JSONSchema.JSONSchemaSimpleTypes.ValueType # 7 + + @typing.final + class FieldConfiguration(google.protobuf.message.Message): + """'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. + These properties are not defined by OpenAPIv2, but they are used to control the generation. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PATH_PARAM_NAME_FIELD_NUMBER: builtins.int + path_param_name: builtins.str + """Alternative parameter name when used as path parameter. If set, this will + be used as the complete parameter name when this field is used as a path + parameter. Use this to avoid having auto generated path parameter names + for overlapping paths. + """ + def __init__( + self, + *, + path_param_name: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["path_param_name", b"path_param_name"] + ) -> None: ... + + @typing.final + class ExtensionsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> google.protobuf.struct_pb2.Value: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: google.protobuf.struct_pb2.Value | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + REF_FIELD_NUMBER: builtins.int + TITLE_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + DEFAULT_FIELD_NUMBER: builtins.int + READ_ONLY_FIELD_NUMBER: builtins.int + EXAMPLE_FIELD_NUMBER: builtins.int + MULTIPLE_OF_FIELD_NUMBER: builtins.int + MAXIMUM_FIELD_NUMBER: builtins.int + EXCLUSIVE_MAXIMUM_FIELD_NUMBER: builtins.int + MINIMUM_FIELD_NUMBER: builtins.int + EXCLUSIVE_MINIMUM_FIELD_NUMBER: builtins.int + MAX_LENGTH_FIELD_NUMBER: builtins.int + MIN_LENGTH_FIELD_NUMBER: builtins.int + PATTERN_FIELD_NUMBER: builtins.int + MAX_ITEMS_FIELD_NUMBER: builtins.int + MIN_ITEMS_FIELD_NUMBER: builtins.int + UNIQUE_ITEMS_FIELD_NUMBER: builtins.int + MAX_PROPERTIES_FIELD_NUMBER: builtins.int + MIN_PROPERTIES_FIELD_NUMBER: builtins.int + REQUIRED_FIELD_NUMBER: builtins.int + ARRAY_FIELD_NUMBER: builtins.int + TYPE_FIELD_NUMBER: builtins.int + FORMAT_FIELD_NUMBER: builtins.int + ENUM_FIELD_NUMBER: builtins.int + FIELD_CONFIGURATION_FIELD_NUMBER: builtins.int + EXTENSIONS_FIELD_NUMBER: builtins.int + ref: builtins.str + """Ref is used to define an external reference to include in the message. + This could be a fully qualified proto message reference, and that type must + be imported into the protofile. If no message is identified, the Ref will + be used verbatim in the output. + For example: + `ref: ".google.protobuf.Timestamp"`. + """ + title: builtins.str + """The title of the schema.""" + description: builtins.str + """A short description of the schema.""" + default: builtins.str + read_only: builtins.bool + example: builtins.str + """A free-form property to include a JSON example of this field. This is copied + verbatim to the output swagger.json. Quotes must be escaped. + This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + """ + multiple_of: builtins.float + maximum: builtins.float + """Maximum represents an inclusive upper limit for a numeric instance. The + value of MUST be a number, + """ + exclusive_maximum: builtins.bool + minimum: builtins.float + """minimum represents an inclusive lower limit for a numeric instance. The + value of MUST be a number, + """ + exclusive_minimum: builtins.bool + max_length: builtins.int + min_length: builtins.int + pattern: builtins.str + max_items: builtins.int + min_items: builtins.int + unique_items: builtins.bool + max_properties: builtins.int + min_properties: builtins.int + format: builtins.str + """`Format`""" + @property + def required( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + builtins.str + ]: ... + @property + def array( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Items in 'array' must be unique.""" + + @property + def type( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + global___JSONSchema.JSONSchemaSimpleTypes.ValueType + ]: ... + @property + def enum( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1""" + + @property + def field_configuration(self) -> global___JSONSchema.FieldConfiguration: + """Additional field level properties used when generating the OpenAPI v2 file.""" + + @property + def extensions( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, google.protobuf.struct_pb2.Value + ]: + """Custom properties that start with "x-" such as "x-foo" used to describe + extra functionality that is not covered by the standard OpenAPI Specification. + See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + """ + + def __init__( + self, + *, + ref: builtins.str = ..., + title: builtins.str = ..., + description: builtins.str = ..., + default: builtins.str = ..., + read_only: builtins.bool = ..., + example: builtins.str = ..., + multiple_of: builtins.float = ..., + maximum: builtins.float = ..., + exclusive_maximum: builtins.bool = ..., + minimum: builtins.float = ..., + exclusive_minimum: builtins.bool = ..., + max_length: builtins.int = ..., + min_length: builtins.int = ..., + pattern: builtins.str = ..., + max_items: builtins.int = ..., + min_items: builtins.int = ..., + unique_items: builtins.bool = ..., + max_properties: builtins.int = ..., + min_properties: builtins.int = ..., + required: collections.abc.Iterable[builtins.str] | None = ..., + array: collections.abc.Iterable[builtins.str] | None = ..., + type: collections.abc.Iterable[ + global___JSONSchema.JSONSchemaSimpleTypes.ValueType + ] + | None = ..., + format: builtins.str = ..., + enum: collections.abc.Iterable[builtins.str] | None = ..., + field_configuration: global___JSONSchema.FieldConfiguration | None = ..., + extensions: collections.abc.Mapping[ + builtins.str, google.protobuf.struct_pb2.Value + ] + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["field_configuration", b"field_configuration"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "array", + b"array", + "default", + b"default", + "description", + b"description", + "enum", + b"enum", + "example", + b"example", + "exclusive_maximum", + b"exclusive_maximum", + "exclusive_minimum", + b"exclusive_minimum", + "extensions", + b"extensions", + "field_configuration", + b"field_configuration", + "format", + b"format", + "max_items", + b"max_items", + "max_length", + b"max_length", + "max_properties", + b"max_properties", + "maximum", + b"maximum", + "min_items", + b"min_items", + "min_length", + b"min_length", + "min_properties", + b"min_properties", + "minimum", + b"minimum", + "multiple_of", + b"multiple_of", + "pattern", + b"pattern", + "read_only", + b"read_only", + "ref", + b"ref", + "required", + b"required", + "title", + b"title", + "type", + b"type", + "unique_items", + b"unique_items", + ], + ) -> None: ... + +global___JSONSchema = JSONSchema + +@typing.final +class Tag(google.protobuf.message.Message): + """`Tag` is a representation of OpenAPI v2 specification's Tag object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ExtensionsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> google.protobuf.struct_pb2.Value: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: google.protobuf.struct_pb2.Value | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + NAME_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + EXTERNAL_DOCS_FIELD_NUMBER: builtins.int + EXTENSIONS_FIELD_NUMBER: builtins.int + name: builtins.str + """The name of the tag. Use it to allow override of the name of a + global Tag object, then use that name to reference the tag throughout the + OpenAPI file. + """ + description: builtins.str + """A short description for the tag. GFM syntax can be used for rich text + representation. + """ + @property + def external_docs(self) -> global___ExternalDocumentation: + """Additional external documentation for this tag.""" + + @property + def extensions( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, google.protobuf.struct_pb2.Value + ]: + """Custom properties that start with "x-" such as "x-foo" used to describe + extra functionality that is not covered by the standard OpenAPI Specification. + See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + """ + + def __init__( + self, + *, + name: builtins.str = ..., + description: builtins.str = ..., + external_docs: global___ExternalDocumentation | None = ..., + extensions: collections.abc.Mapping[ + builtins.str, google.protobuf.struct_pb2.Value + ] + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["external_docs", b"external_docs"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "description", + b"description", + "extensions", + b"extensions", + "external_docs", + b"external_docs", + "name", + b"name", + ], + ) -> None: ... + +global___Tag = Tag + +@typing.final +class SecurityDefinitions(google.protobuf.message.Message): + """`SecurityDefinitions` is a representation of OpenAPI v2 specification's + Security Definitions object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject + + A declaration of the security schemes available to be used in the + specification. This does not enforce the security schemes on the operations + and only serves to provide the relevant details for each scheme. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class SecurityEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> global___SecurityScheme: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: global___SecurityScheme | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + SECURITY_FIELD_NUMBER: builtins.int + @property + def security( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, global___SecurityScheme + ]: + """A single security scheme definition, mapping a "name" to the scheme it + defines. + """ + + def __init__( + self, + *, + security: collections.abc.Mapping[builtins.str, global___SecurityScheme] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["security", b"security"] + ) -> None: ... + +global___SecurityDefinitions = SecurityDefinitions + +@typing.final +class SecurityScheme(google.protobuf.message.Message): + """`SecurityScheme` is a representation of OpenAPI v2 specification's + Security Scheme object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject + + Allows the definition of a security scheme that can be used by the + operations. Supported schemes are basic authentication, an API key (either as + a header or as a query parameter) and OAuth2's common flows (implicit, + password, application and access code). + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Type: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _TypeEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + SecurityScheme._Type.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + TYPE_INVALID: SecurityScheme._Type.ValueType # 0 + TYPE_BASIC: SecurityScheme._Type.ValueType # 1 + TYPE_API_KEY: SecurityScheme._Type.ValueType # 2 + TYPE_OAUTH2: SecurityScheme._Type.ValueType # 3 + + class Type(_Type, metaclass=_TypeEnumTypeWrapper): + """The type of the security scheme. Valid values are "basic", + "apiKey" or "oauth2". + """ + + TYPE_INVALID: SecurityScheme.Type.ValueType # 0 + TYPE_BASIC: SecurityScheme.Type.ValueType # 1 + TYPE_API_KEY: SecurityScheme.Type.ValueType # 2 + TYPE_OAUTH2: SecurityScheme.Type.ValueType # 3 + + class _In: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _InEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + SecurityScheme._In.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + IN_INVALID: SecurityScheme._In.ValueType # 0 + IN_QUERY: SecurityScheme._In.ValueType # 1 + IN_HEADER: SecurityScheme._In.ValueType # 2 + + class In(_In, metaclass=_InEnumTypeWrapper): + """The location of the API key. Valid values are "query" or "header".""" + + IN_INVALID: SecurityScheme.In.ValueType # 0 + IN_QUERY: SecurityScheme.In.ValueType # 1 + IN_HEADER: SecurityScheme.In.ValueType # 2 + + class _Flow: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _FlowEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + SecurityScheme._Flow.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + FLOW_INVALID: SecurityScheme._Flow.ValueType # 0 + FLOW_IMPLICIT: SecurityScheme._Flow.ValueType # 1 + FLOW_PASSWORD: SecurityScheme._Flow.ValueType # 2 + FLOW_APPLICATION: SecurityScheme._Flow.ValueType # 3 + FLOW_ACCESS_CODE: SecurityScheme._Flow.ValueType # 4 + + class Flow(_Flow, metaclass=_FlowEnumTypeWrapper): + """The flow used by the OAuth2 security scheme. Valid values are + "implicit", "password", "application" or "accessCode". + """ + + FLOW_INVALID: SecurityScheme.Flow.ValueType # 0 + FLOW_IMPLICIT: SecurityScheme.Flow.ValueType # 1 + FLOW_PASSWORD: SecurityScheme.Flow.ValueType # 2 + FLOW_APPLICATION: SecurityScheme.Flow.ValueType # 3 + FLOW_ACCESS_CODE: SecurityScheme.Flow.ValueType # 4 + + @typing.final + class ExtensionsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> google.protobuf.struct_pb2.Value: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: google.protobuf.struct_pb2.Value | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + TYPE_FIELD_NUMBER: builtins.int + DESCRIPTION_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + IN_FIELD_NUMBER: builtins.int + FLOW_FIELD_NUMBER: builtins.int + AUTHORIZATION_URL_FIELD_NUMBER: builtins.int + TOKEN_URL_FIELD_NUMBER: builtins.int + SCOPES_FIELD_NUMBER: builtins.int + EXTENSIONS_FIELD_NUMBER: builtins.int + type: global___SecurityScheme.Type.ValueType + """The type of the security scheme. Valid values are "basic", + "apiKey" or "oauth2". + """ + description: builtins.str + """A short description for security scheme.""" + name: builtins.str + """The name of the header or query parameter to be used. + Valid for apiKey. + """ + flow: global___SecurityScheme.Flow.ValueType + """The flow used by the OAuth2 security scheme. Valid values are + "implicit", "password", "application" or "accessCode". + Valid for oauth2. + """ + authorization_url: builtins.str + """The authorization URL to be used for this flow. This SHOULD be in + the form of a URL. + Valid for oauth2/implicit and oauth2/accessCode. + """ + token_url: builtins.str + """The token URL to be used for this flow. This SHOULD be in the + form of a URL. + Valid for oauth2/password, oauth2/application and oauth2/accessCode. + """ + @property + def scopes(self) -> global___Scopes: + """The available scopes for the OAuth2 security scheme. + Valid for oauth2. + """ + + @property + def extensions( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, google.protobuf.struct_pb2.Value + ]: + """Custom properties that start with "x-" such as "x-foo" used to describe + extra functionality that is not covered by the standard OpenAPI Specification. + See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + """ + + def __init__( + self, + *, + type: global___SecurityScheme.Type.ValueType = ..., + description: builtins.str = ..., + name: builtins.str = ..., + flow: global___SecurityScheme.Flow.ValueType = ..., + authorization_url: builtins.str = ..., + token_url: builtins.str = ..., + scopes: global___Scopes | None = ..., + extensions: collections.abc.Mapping[ + builtins.str, google.protobuf.struct_pb2.Value + ] + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["scopes", b"scopes"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "authorization_url", + b"authorization_url", + "description", + b"description", + "extensions", + b"extensions", + "flow", + b"flow", + "in", + b"in", + "name", + b"name", + "scopes", + b"scopes", + "token_url", + b"token_url", + "type", + b"type", + ], + ) -> None: ... + +global___SecurityScheme = SecurityScheme + +@typing.final +class SecurityRequirement(google.protobuf.message.Message): + """`SecurityRequirement` is a representation of OpenAPI v2 specification's + Security Requirement object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject + + Lists the required security schemes to execute this operation. The object can + have multiple security schemes declared in it which are all required (that + is, there is a logical AND between the schemes). + + The name used for each property MUST correspond to a security scheme + declared in the Security Definitions. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class SecurityRequirementValue(google.protobuf.message.Message): + """If the security scheme is of type "oauth2", then the value is a list of + scope names required for the execution. For other security scheme types, + the array MUST be empty. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SCOPE_FIELD_NUMBER: builtins.int + @property + def scope( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + builtins.str + ]: ... + def __init__( + self, + *, + scope: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["scope", b"scope"]) -> None: ... + + @typing.final + class SecurityRequirementEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> global___SecurityRequirement.SecurityRequirementValue: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: global___SecurityRequirement.SecurityRequirementValue | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + SECURITY_REQUIREMENT_FIELD_NUMBER: builtins.int + @property + def security_requirement( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, global___SecurityRequirement.SecurityRequirementValue + ]: + """Each name must correspond to a security scheme which is declared in + the Security Definitions. If the security scheme is of type "oauth2", + then the value is a list of scope names required for the execution. + For other security scheme types, the array MUST be empty. + """ + + def __init__( + self, + *, + security_requirement: collections.abc.Mapping[ + builtins.str, global___SecurityRequirement.SecurityRequirementValue + ] + | None = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal["security_requirement", b"security_requirement"], + ) -> None: ... + +global___SecurityRequirement = SecurityRequirement + +@typing.final +class Scopes(google.protobuf.message.Message): + """`Scopes` is a representation of OpenAPI v2 specification's Scopes object. + + See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject + + Lists the available scopes for an OAuth2 security scheme. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ScopeEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.str + def __init__( + self, + *, + key: builtins.str = ..., + value: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + SCOPE_FIELD_NUMBER: builtins.int + @property + def scope( + self, + ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + """Maps between a name of a scope to a short description of it (as the value + of the property). + """ + + def __init__( + self, + *, + scope: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["scope", b"scope"]) -> None: ... + +global___Scopes = Scopes diff --git a/temporalio/api/deployment/v1/__init__.py b/temporalio/api/deployment/v1/__init__.py index 63d01878ff..2abc00d319 100644 --- a/temporalio/api/deployment/v1/__init__.py +++ b/temporalio/api/deployment/v1/__init__.py @@ -1,7 +1,9 @@ from .message_pb2 import ( + ComputeStatus, Deployment, DeploymentInfo, DeploymentListInfo, + InheritedAutoUpgradeInfo, RoutingConfig, UpdateDeploymentMetadata, VersionDrainageInfo, @@ -13,9 +15,11 @@ ) __all__ = [ + "ComputeStatus", "Deployment", "DeploymentInfo", "DeploymentListInfo", + "InheritedAutoUpgradeInfo", "RoutingConfig", "UpdateDeploymentMetadata", "VersionDrainageInfo", diff --git a/temporalio/api/deployment/v1/message_pb2.py b/temporalio/api/deployment/v1/message_pb2.py index 35b372570c..65b9a2da86 100644 --- a/temporalio/api/deployment/v1/message_pb2.py +++ b/temporalio/api/deployment/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -19,224 +18,25 @@ from temporalio.api.common.v1 import ( message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, ) +from temporalio.api.compute.v1 import ( + config_pb2 as temporal_dot_api_dot_compute_dot_v1_dot_config__pb2, +) from temporalio.api.enums.v1 import ( deployment_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_deployment__pb2, ) from temporalio.api.enums.v1 import ( task_queue_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_task__queue__pb2, ) - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n(temporal/api/deployment/v1/message.proto\x12\x1atemporal.api.deployment.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a&temporal/api/enums/v1/deployment.proto\x1a&temporal/api/enums/v1/task_queue.proto\x1a$temporal/api/common/v1/message.proto"\x91\x01\n\x17WorkerDeploymentOptions\x12\x17\n\x0f\x64\x65ployment_name\x18\x01 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t\x12K\n\x16worker_versioning_mode\x18\x03 \x01(\x0e\x32+.temporal.api.enums.v1.WorkerVersioningMode"3\n\nDeployment\x12\x13\n\x0bseries_name\x18\x01 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t"\x8e\x04\n\x0e\x44\x65ploymentInfo\x12:\n\ndeployment\x18\x01 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12R\n\x10task_queue_infos\x18\x03 \x03(\x0b\x32\x38.temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo\x12J\n\x08metadata\x18\x04 \x03(\x0b\x32\x38.temporal.api.deployment.v1.DeploymentInfo.MetadataEntry\x12\x12\n\nis_current\x18\x05 \x01(\x08\x1aP\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x1a\x88\x01\n\rTaskQueueInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12\x35\n\x11\x66irst_poller_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xea\x01\n\x18UpdateDeploymentMetadata\x12_\n\x0eupsert_entries\x18\x01 \x03(\x0b\x32G.temporal.api.deployment.v1.UpdateDeploymentMetadata.UpsertEntriesEntry\x12\x16\n\x0eremove_entries\x18\x02 \x03(\t\x1aU\n\x12UpsertEntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x95\x01\n\x12\x44\x65ploymentListInfo\x12:\n\ndeployment\x18\x01 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nis_current\x18\x03 \x01(\x08"\x96\x07\n\x1bWorkerDeploymentVersionInfo\x12\x13\n\x07version\x18\x01 \x01(\tB\x02\x18\x01\x12\x44\n\x06status\x18\x0e \x01(\x0e\x32\x34.temporal.api.enums.v1.WorkerDeploymentVersionStatus\x12O\n\x12\x64\x65ployment_version\x18\x0b \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14routing_changed_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12\x63urrent_since_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12ramping_since_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x15\x66irst_activation_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16last_deactivation_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0framp_percentage\x18\x07 \x01(\x02\x12\x66\n\x10task_queue_infos\x18\x08 \x03(\x0b\x32L.temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo\x12\x46\n\rdrainage_info\x18\t \x01(\x0b\x32/.temporal.api.deployment.v1.VersionDrainageInfo\x12=\n\x08metadata\x18\n \x01(\x0b\x32+.temporal.api.deployment.v1.VersionMetadata\x1aX\n\x14VersionTaskQueueInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType"\xc1\x01\n\x13VersionDrainageInfo\x12<\n\x06status\x18\x01 \x01(\x0e\x32,.temporal.api.enums.v1.VersionDrainageStatus\x12\x35\n\x11last_changed_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_checked_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xed\x07\n\x14WorkerDeploymentInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12j\n\x11version_summaries\x18\x02 \x03(\x0b\x32O.temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0erouting_config\x18\x04 \x01(\x0b\x32).temporal.api.deployment.v1.RoutingConfig\x12\x1e\n\x16last_modifier_identity\x18\x05 \x01(\t\x12\x18\n\x10manager_identity\x18\x06 \x01(\t\x1a\xac\x05\n\x1eWorkerDeploymentVersionSummary\x12\x13\n\x07version\x18\x01 \x01(\tB\x02\x18\x01\x12\x44\n\x06status\x18\x0b \x01(\x0e\x32\x34.temporal.api.enums.v1.WorkerDeploymentVersionStatus\x12O\n\x12\x64\x65ployment_version\x18\x04 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\x0f\x64rainage_status\x18\x03 \x01(\x0e\x32,.temporal.api.enums.v1.VersionDrainageStatus\x12\x46\n\rdrainage_info\x18\x05 \x01(\x0b\x32/.temporal.api.deployment.v1.VersionDrainageInfo\x12\x36\n\x12\x63urrent_since_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12ramping_since_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13routing_update_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x15\x66irst_activation_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16last_deactivation_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp"D\n\x17WorkerDeploymentVersion\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t"\xad\x01\n\x0fVersionMetadata\x12I\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x38.temporal.api.deployment.v1.VersionMetadata.EntriesEntry\x1aO\n\x0c\x45ntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\xf0\x03\n\rRoutingConfig\x12W\n\x1a\x63urrent_deployment_version\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1b\n\x0f\x63urrent_version\x18\x01 \x01(\tB\x02\x18\x01\x12W\n\x1aramping_deployment_version\x18\t \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1b\n\x0framping_version\x18\x02 \x01(\tB\x02\x18\x01\x12"\n\x1aramping_version_percentage\x18\x03 \x01(\x02\x12@\n\x1c\x63urrent_version_changed_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1cramping_version_changed_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12K\n\'ramping_version_percentage_changed_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x9d\x01\n\x1dio.temporal.api.deployment.v1B\x0cMessageProtoP\x01Z+go.temporal.io/api/deployment/v1;deployment\xaa\x02\x1cTemporalio.Api.Deployment.V1\xea\x02\x1fTemporalio::Api::Deployment::V1b\x06proto3' -) - - -_WORKERDEPLOYMENTOPTIONS = DESCRIPTOR.message_types_by_name["WorkerDeploymentOptions"] -_DEPLOYMENT = DESCRIPTOR.message_types_by_name["Deployment"] -_DEPLOYMENTINFO = DESCRIPTOR.message_types_by_name["DeploymentInfo"] -_DEPLOYMENTINFO_METADATAENTRY = _DEPLOYMENTINFO.nested_types_by_name["MetadataEntry"] -_DEPLOYMENTINFO_TASKQUEUEINFO = _DEPLOYMENTINFO.nested_types_by_name["TaskQueueInfo"] -_UPDATEDEPLOYMENTMETADATA = DESCRIPTOR.message_types_by_name["UpdateDeploymentMetadata"] -_UPDATEDEPLOYMENTMETADATA_UPSERTENTRIESENTRY = ( - _UPDATEDEPLOYMENTMETADATA.nested_types_by_name["UpsertEntriesEntry"] -) -_DEPLOYMENTLISTINFO = DESCRIPTOR.message_types_by_name["DeploymentListInfo"] -_WORKERDEPLOYMENTVERSIONINFO = DESCRIPTOR.message_types_by_name[ - "WorkerDeploymentVersionInfo" -] -_WORKERDEPLOYMENTVERSIONINFO_VERSIONTASKQUEUEINFO = ( - _WORKERDEPLOYMENTVERSIONINFO.nested_types_by_name["VersionTaskQueueInfo"] -) -_VERSIONDRAINAGEINFO = DESCRIPTOR.message_types_by_name["VersionDrainageInfo"] -_WORKERDEPLOYMENTINFO = DESCRIPTOR.message_types_by_name["WorkerDeploymentInfo"] -_WORKERDEPLOYMENTINFO_WORKERDEPLOYMENTVERSIONSUMMARY = ( - _WORKERDEPLOYMENTINFO.nested_types_by_name["WorkerDeploymentVersionSummary"] -) -_WORKERDEPLOYMENTVERSION = DESCRIPTOR.message_types_by_name["WorkerDeploymentVersion"] -_VERSIONMETADATA = DESCRIPTOR.message_types_by_name["VersionMetadata"] -_VERSIONMETADATA_ENTRIESENTRY = _VERSIONMETADATA.nested_types_by_name["EntriesEntry"] -_ROUTINGCONFIG = DESCRIPTOR.message_types_by_name["RoutingConfig"] -WorkerDeploymentOptions = _reflection.GeneratedProtocolMessageType( - "WorkerDeploymentOptions", - (_message.Message,), - { - "DESCRIPTOR": _WORKERDEPLOYMENTOPTIONS, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.WorkerDeploymentOptions) - }, -) -_sym_db.RegisterMessage(WorkerDeploymentOptions) - -Deployment = _reflection.GeneratedProtocolMessageType( - "Deployment", - (_message.Message,), - { - "DESCRIPTOR": _DEPLOYMENT, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.Deployment) - }, -) -_sym_db.RegisterMessage(Deployment) - -DeploymentInfo = _reflection.GeneratedProtocolMessageType( - "DeploymentInfo", - (_message.Message,), - { - "MetadataEntry": _reflection.GeneratedProtocolMessageType( - "MetadataEntry", - (_message.Message,), - { - "DESCRIPTOR": _DEPLOYMENTINFO_METADATAENTRY, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.DeploymentInfo.MetadataEntry) - }, - ), - "TaskQueueInfo": _reflection.GeneratedProtocolMessageType( - "TaskQueueInfo", - (_message.Message,), - { - "DESCRIPTOR": _DEPLOYMENTINFO_TASKQUEUEINFO, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo) - }, - ), - "DESCRIPTOR": _DEPLOYMENTINFO, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.DeploymentInfo) - }, -) -_sym_db.RegisterMessage(DeploymentInfo) -_sym_db.RegisterMessage(DeploymentInfo.MetadataEntry) -_sym_db.RegisterMessage(DeploymentInfo.TaskQueueInfo) - -UpdateDeploymentMetadata = _reflection.GeneratedProtocolMessageType( - "UpdateDeploymentMetadata", - (_message.Message,), - { - "UpsertEntriesEntry": _reflection.GeneratedProtocolMessageType( - "UpsertEntriesEntry", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEDEPLOYMENTMETADATA_UPSERTENTRIESENTRY, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.UpdateDeploymentMetadata.UpsertEntriesEntry) - }, - ), - "DESCRIPTOR": _UPDATEDEPLOYMENTMETADATA, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.UpdateDeploymentMetadata) - }, -) -_sym_db.RegisterMessage(UpdateDeploymentMetadata) -_sym_db.RegisterMessage(UpdateDeploymentMetadata.UpsertEntriesEntry) - -DeploymentListInfo = _reflection.GeneratedProtocolMessageType( - "DeploymentListInfo", - (_message.Message,), - { - "DESCRIPTOR": _DEPLOYMENTLISTINFO, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.DeploymentListInfo) - }, -) -_sym_db.RegisterMessage(DeploymentListInfo) - -WorkerDeploymentVersionInfo = _reflection.GeneratedProtocolMessageType( - "WorkerDeploymentVersionInfo", - (_message.Message,), - { - "VersionTaskQueueInfo": _reflection.GeneratedProtocolMessageType( - "VersionTaskQueueInfo", - (_message.Message,), - { - "DESCRIPTOR": _WORKERDEPLOYMENTVERSIONINFO_VERSIONTASKQUEUEINFO, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo) - }, - ), - "DESCRIPTOR": _WORKERDEPLOYMENTVERSIONINFO, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.WorkerDeploymentVersionInfo) - }, -) -_sym_db.RegisterMessage(WorkerDeploymentVersionInfo) -_sym_db.RegisterMessage(WorkerDeploymentVersionInfo.VersionTaskQueueInfo) - -VersionDrainageInfo = _reflection.GeneratedProtocolMessageType( - "VersionDrainageInfo", - (_message.Message,), - { - "DESCRIPTOR": _VERSIONDRAINAGEINFO, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.VersionDrainageInfo) - }, -) -_sym_db.RegisterMessage(VersionDrainageInfo) - -WorkerDeploymentInfo = _reflection.GeneratedProtocolMessageType( - "WorkerDeploymentInfo", - (_message.Message,), - { - "WorkerDeploymentVersionSummary": _reflection.GeneratedProtocolMessageType( - "WorkerDeploymentVersionSummary", - (_message.Message,), - { - "DESCRIPTOR": _WORKERDEPLOYMENTINFO_WORKERDEPLOYMENTVERSIONSUMMARY, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary) - }, - ), - "DESCRIPTOR": _WORKERDEPLOYMENTINFO, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.WorkerDeploymentInfo) - }, -) -_sym_db.RegisterMessage(WorkerDeploymentInfo) -_sym_db.RegisterMessage(WorkerDeploymentInfo.WorkerDeploymentVersionSummary) - -WorkerDeploymentVersion = _reflection.GeneratedProtocolMessageType( - "WorkerDeploymentVersion", - (_message.Message,), - { - "DESCRIPTOR": _WORKERDEPLOYMENTVERSION, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.WorkerDeploymentVersion) - }, -) -_sym_db.RegisterMessage(WorkerDeploymentVersion) - -VersionMetadata = _reflection.GeneratedProtocolMessageType( - "VersionMetadata", - (_message.Message,), - { - "EntriesEntry": _reflection.GeneratedProtocolMessageType( - "EntriesEntry", - (_message.Message,), - { - "DESCRIPTOR": _VERSIONMETADATA_ENTRIESENTRY, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.VersionMetadata.EntriesEntry) - }, - ), - "DESCRIPTOR": _VERSIONMETADATA, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.VersionMetadata) - }, +from temporalio.api.enums.v1 import ( + workflow_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_workflow__pb2, ) -_sym_db.RegisterMessage(VersionMetadata) -_sym_db.RegisterMessage(VersionMetadata.EntriesEntry) -RoutingConfig = _reflection.GeneratedProtocolMessageType( - "RoutingConfig", - (_message.Message,), - { - "DESCRIPTOR": _ROUTINGCONFIG, - "__module__": "temporalio.api.deployment.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.deployment.v1.RoutingConfig) - }, +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n(temporal/api/deployment/v1/message.proto\x12\x1atemporal.api.deployment.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a&temporal/api/enums/v1/deployment.proto\x1a&temporal/api/enums/v1/task_queue.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/compute/v1/config.proto"\x91\x01\n\x17WorkerDeploymentOptions\x12\x17\n\x0f\x64\x65ployment_name\x18\x01 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t\x12K\n\x16worker_versioning_mode\x18\x03 \x01(\x0e\x32+.temporal.api.enums.v1.WorkerVersioningMode"3\n\nDeployment\x12\x13\n\x0bseries_name\x18\x01 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t"\x8e\x04\n\x0e\x44\x65ploymentInfo\x12:\n\ndeployment\x18\x01 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12R\n\x10task_queue_infos\x18\x03 \x03(\x0b\x32\x38.temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo\x12J\n\x08metadata\x18\x04 \x03(\x0b\x32\x38.temporal.api.deployment.v1.DeploymentInfo.MetadataEntry\x12\x12\n\nis_current\x18\x05 \x01(\x08\x1aP\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x1a\x88\x01\n\rTaskQueueInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12\x35\n\x11\x66irst_poller_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xea\x01\n\x18UpdateDeploymentMetadata\x12_\n\x0eupsert_entries\x18\x01 \x03(\x0b\x32G.temporal.api.deployment.v1.UpdateDeploymentMetadata.UpsertEntriesEntry\x12\x16\n\x0eremove_entries\x18\x02 \x03(\t\x1aU\n\x12UpsertEntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x95\x01\n\x12\x44\x65ploymentListInfo\x12:\n\ndeployment\x18\x01 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nis_current\x18\x03 \x01(\x08"\xad\x08\n\x1bWorkerDeploymentVersionInfo\x12\x13\n\x07version\x18\x01 \x01(\tB\x02\x18\x01\x12\x44\n\x06status\x18\x0e \x01(\x0e\x32\x34.temporal.api.enums.v1.WorkerDeploymentVersionStatus\x12O\n\x12\x64\x65ployment_version\x18\x0b \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\x14routing_changed_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12\x63urrent_since_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12ramping_since_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x15\x66irst_activation_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_current_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16last_deactivation_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0framp_percentage\x18\x07 \x01(\x02\x12\x66\n\x10task_queue_infos\x18\x08 \x03(\x0b\x32L.temporal.api.deployment.v1.WorkerDeploymentVersionInfo.VersionTaskQueueInfo\x12\x46\n\rdrainage_info\x18\t \x01(\x0b\x32/.temporal.api.deployment.v1.VersionDrainageInfo\x12=\n\x08metadata\x18\n \x01(\x0b\x32+.temporal.api.deployment.v1.VersionMetadata\x12>\n\x0e\x63ompute_config\x18\x10 \x01(\x0b\x32&.temporal.api.compute.v1.ComputeConfig\x12\x1e\n\x16last_modifier_identity\x18\x11 \x01(\t\x1aX\n\x14VersionTaskQueueInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType"\xc1\x01\n\x13VersionDrainageInfo\x12<\n\x06status\x18\x01 \x01(\x0e\x32,.temporal.api.enums.v1.VersionDrainageStatus\x12\x35\n\x11last_changed_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_checked_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xd8\x01\n\rComputeStatus\x12_\n\x13provider_validation\x18\x01 \x01(\x0b\x32\x42.temporal.api.deployment.v1.ComputeStatus.ProviderValidationStatus\x1a\x66\n\x18ProviderValidationStatus\x12\x15\n\rerror_message\x18\x01 \x01(\t\x12\x33\n\x0flast_check_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x84\n\n\x14WorkerDeploymentInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12j\n\x11version_summaries\x18\x02 \x03(\x0b\x32O.temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0erouting_config\x18\x04 \x01(\x0b\x32).temporal.api.deployment.v1.RoutingConfig\x12\x1e\n\x16last_modifier_identity\x18\x05 \x01(\t\x12\x18\n\x10manager_identity\x18\x06 \x01(\t\x12T\n\x1brouting_config_update_state\x18\x07 \x01(\x0e\x32/.temporal.api.enums.v1.RoutingConfigUpdateState\x1a\xed\x06\n\x1eWorkerDeploymentVersionSummary\x12\x13\n\x07version\x18\x01 \x01(\tB\x02\x18\x01\x12\x44\n\x06status\x18\x0b \x01(\x0e\x32\x34.temporal.api.enums.v1.WorkerDeploymentVersionStatus\x12O\n\x12\x64\x65ployment_version\x18\x04 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\x0f\x64rainage_status\x18\x03 \x01(\x0e\x32,.temporal.api.enums.v1.VersionDrainageStatus\x12\x46\n\rdrainage_info\x18\x05 \x01(\x0b\x32/.temporal.api.deployment.v1.VersionDrainageInfo\x12\x36\n\x12\x63urrent_since_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12ramping_since_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13routing_update_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x15\x66irst_activation_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_current_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x16last_deactivation_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\x0e\x63ompute_config\x18\r \x01(\x0b\x32-.temporal.api.compute.v1.ComputeConfigSummary\x12\x41\n\x0e\x63ompute_status\x18\x0e \x01(\x0b\x32).temporal.api.deployment.v1.ComputeStatus"D\n\x17WorkerDeploymentVersion\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t"\xad\x01\n\x0fVersionMetadata\x12I\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x38.temporal.api.deployment.v1.VersionMetadata.EntriesEntry\x1aO\n\x0c\x45ntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x89\x04\n\rRoutingConfig\x12W\n\x1a\x63urrent_deployment_version\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1b\n\x0f\x63urrent_version\x18\x01 \x01(\tB\x02\x18\x01\x12W\n\x1aramping_deployment_version\x18\t \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1b\n\x0framping_version\x18\x02 \x01(\tB\x02\x18\x01\x12"\n\x1aramping_version_percentage\x18\x03 \x01(\x02\x12@\n\x1c\x63urrent_version_changed_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x1cramping_version_changed_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12K\n\'ramping_version_percentage_changed_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frevision_number\x18\n \x01(\x03"\x8a\x02\n\x18InheritedAutoUpgradeInfo\x12V\n\x19source_deployment_version\x18\x01 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12)\n!source_deployment_revision_number\x18\x02 \x01(\x03\x12k\n+continue_as_new_initial_versioning_behavior\x18\x03 \x01(\x0e\x32\x36.temporal.api.enums.v1.ContinueAsNewVersioningBehaviorB\x9d\x01\n\x1dio.temporal.api.deployment.v1B\x0cMessageProtoP\x01Z+go.temporal.io/api/deployment/v1;deployment\xaa\x02\x1cTemporalio.Api.Deployment.V1\xea\x02\x1fTemporalio::Api::Deployment::V1b\x06proto3' ) -_sym_db.RegisterMessage(RoutingConfig) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\035io.temporal.api.deployment.v1B\014MessageProtoP\001Z+go.temporal.io/api/deployment/v1;deployment\252\002\034Temporalio.Api.Deployment.V1\352\002\037Temporalio::Api::Deployment::V1" @@ -260,38 +60,44 @@ _ROUTINGCONFIG.fields_by_name["current_version"]._serialized_options = b"\030\001" _ROUTINGCONFIG.fields_by_name["ramping_version"]._options = None _ROUTINGCONFIG.fields_by_name["ramping_version"]._serialized_options = b"\030\001" - _WORKERDEPLOYMENTOPTIONS._serialized_start = 224 - _WORKERDEPLOYMENTOPTIONS._serialized_end = 369 - _DEPLOYMENT._serialized_start = 371 - _DEPLOYMENT._serialized_end = 422 - _DEPLOYMENTINFO._serialized_start = 425 - _DEPLOYMENTINFO._serialized_end = 951 - _DEPLOYMENTINFO_METADATAENTRY._serialized_start = 732 - _DEPLOYMENTINFO_METADATAENTRY._serialized_end = 812 - _DEPLOYMENTINFO_TASKQUEUEINFO._serialized_start = 815 - _DEPLOYMENTINFO_TASKQUEUEINFO._serialized_end = 951 - _UPDATEDEPLOYMENTMETADATA._serialized_start = 954 - _UPDATEDEPLOYMENTMETADATA._serialized_end = 1188 - _UPDATEDEPLOYMENTMETADATA_UPSERTENTRIESENTRY._serialized_start = 1103 - _UPDATEDEPLOYMENTMETADATA_UPSERTENTRIESENTRY._serialized_end = 1188 - _DEPLOYMENTLISTINFO._serialized_start = 1191 - _DEPLOYMENTLISTINFO._serialized_end = 1340 - _WORKERDEPLOYMENTVERSIONINFO._serialized_start = 1343 - _WORKERDEPLOYMENTVERSIONINFO._serialized_end = 2261 - _WORKERDEPLOYMENTVERSIONINFO_VERSIONTASKQUEUEINFO._serialized_start = 2173 - _WORKERDEPLOYMENTVERSIONINFO_VERSIONTASKQUEUEINFO._serialized_end = 2261 - _VERSIONDRAINAGEINFO._serialized_start = 2264 - _VERSIONDRAINAGEINFO._serialized_end = 2457 - _WORKERDEPLOYMENTINFO._serialized_start = 2460 - _WORKERDEPLOYMENTINFO._serialized_end = 3465 - _WORKERDEPLOYMENTINFO_WORKERDEPLOYMENTVERSIONSUMMARY._serialized_start = 2781 - _WORKERDEPLOYMENTINFO_WORKERDEPLOYMENTVERSIONSUMMARY._serialized_end = 3465 - _WORKERDEPLOYMENTVERSION._serialized_start = 3467 - _WORKERDEPLOYMENTVERSION._serialized_end = 3535 - _VERSIONMETADATA._serialized_start = 3538 - _VERSIONMETADATA._serialized_end = 3711 - _VERSIONMETADATA_ENTRIESENTRY._serialized_start = 3632 - _VERSIONMETADATA_ENTRIESENTRY._serialized_end = 3711 - _ROUTINGCONFIG._serialized_start = 3714 - _ROUTINGCONFIG._serialized_end = 4210 + _WORKERDEPLOYMENTOPTIONS._serialized_start = 300 + _WORKERDEPLOYMENTOPTIONS._serialized_end = 445 + _DEPLOYMENT._serialized_start = 447 + _DEPLOYMENT._serialized_end = 498 + _DEPLOYMENTINFO._serialized_start = 501 + _DEPLOYMENTINFO._serialized_end = 1027 + _DEPLOYMENTINFO_METADATAENTRY._serialized_start = 808 + _DEPLOYMENTINFO_METADATAENTRY._serialized_end = 888 + _DEPLOYMENTINFO_TASKQUEUEINFO._serialized_start = 891 + _DEPLOYMENTINFO_TASKQUEUEINFO._serialized_end = 1027 + _UPDATEDEPLOYMENTMETADATA._serialized_start = 1030 + _UPDATEDEPLOYMENTMETADATA._serialized_end = 1264 + _UPDATEDEPLOYMENTMETADATA_UPSERTENTRIESENTRY._serialized_start = 1179 + _UPDATEDEPLOYMENTMETADATA_UPSERTENTRIESENTRY._serialized_end = 1264 + _DEPLOYMENTLISTINFO._serialized_start = 1267 + _DEPLOYMENTLISTINFO._serialized_end = 1416 + _WORKERDEPLOYMENTVERSIONINFO._serialized_start = 1419 + _WORKERDEPLOYMENTVERSIONINFO._serialized_end = 2488 + _WORKERDEPLOYMENTVERSIONINFO_VERSIONTASKQUEUEINFO._serialized_start = 2400 + _WORKERDEPLOYMENTVERSIONINFO_VERSIONTASKQUEUEINFO._serialized_end = 2488 + _VERSIONDRAINAGEINFO._serialized_start = 2491 + _VERSIONDRAINAGEINFO._serialized_end = 2684 + _COMPUTESTATUS._serialized_start = 2687 + _COMPUTESTATUS._serialized_end = 2903 + _COMPUTESTATUS_PROVIDERVALIDATIONSTATUS._serialized_start = 2801 + _COMPUTESTATUS_PROVIDERVALIDATIONSTATUS._serialized_end = 2903 + _WORKERDEPLOYMENTINFO._serialized_start = 2906 + _WORKERDEPLOYMENTINFO._serialized_end = 4190 + _WORKERDEPLOYMENTINFO_WORKERDEPLOYMENTVERSIONSUMMARY._serialized_start = 3313 + _WORKERDEPLOYMENTINFO_WORKERDEPLOYMENTVERSIONSUMMARY._serialized_end = 4190 + _WORKERDEPLOYMENTVERSION._serialized_start = 4192 + _WORKERDEPLOYMENTVERSION._serialized_end = 4260 + _VERSIONMETADATA._serialized_start = 4263 + _VERSIONMETADATA._serialized_end = 4436 + _VERSIONMETADATA_ENTRIESENTRY._serialized_start = 4357 + _VERSIONMETADATA_ENTRIESENTRY._serialized_end = 4436 + _ROUTINGCONFIG._serialized_start = 4439 + _ROUTINGCONFIG._serialized_end = 4960 + _INHERITEDAUTOUPGRADEINFO._serialized_start = 4963 + _INHERITEDAUTOUPGRADEINFO._serialized_end = 5229 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/deployment/v1/message_pb2.pyi b/temporalio/api/deployment/v1/message_pb2.pyi index 5619f33f36..de21d4f1d4 100644 --- a/temporalio/api/deployment/v1/message_pb2.pyi +++ b/temporalio/api/deployment/v1/message_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers @@ -13,20 +13,16 @@ import google.protobuf.message import google.protobuf.timestamp_pb2 import temporalio.api.common.v1.message_pb2 +import temporalio.api.compute.v1.config_pb2 import temporalio.api.enums.v1.deployment_pb2 import temporalio.api.enums.v1.task_queue_pb2 - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import temporalio.api.enums.v1.workflow_pb2 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkerDeploymentOptions(google.protobuf.message.Message): - """Worker Deployment options set in SDK that need to be sent to server in every poll. - Experimental. Worker Deployments are experimental and might significantly change in the future. - """ + """Worker Deployment options set in SDK that need to be sent to server in every poll.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -34,7 +30,7 @@ class WorkerDeploymentOptions(google.protobuf.message.Message): BUILD_ID_FIELD_NUMBER: builtins.int WORKER_VERSIONING_MODE_FIELD_NUMBER: builtins.int deployment_name: builtins.str - """Required. Worker Deployment name.""" + """Required when `worker_versioning_mode==VERSIONED`.""" build_id: builtins.str """The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case, the worker will be part of a Deployment Version. @@ -55,7 +51,7 @@ class WorkerDeploymentOptions(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id", b"build_id", "deployment_name", @@ -67,6 +63,7 @@ class WorkerDeploymentOptions(google.protobuf.message.Message): global___WorkerDeploymentOptions = WorkerDeploymentOptions +@typing.final class Deployment(google.protobuf.message.Message): """`Deployment` identifies a deployment of Temporal workers. The combination of deployment series name + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker @@ -97,13 +94,14 @@ class Deployment(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id", b"build_id", "series_name", b"series_name" ], ) -> None: ... global___Deployment = Deployment +@typing.final class DeploymentInfo(google.protobuf.message.Message): """`DeploymentInfo` holds information about a deployment. Deployment information is tracked automatically by server as soon as the first poll from that deployment reaches the server. There @@ -113,6 +111,7 @@ class DeploymentInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class MetadataEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -128,13 +127,13 @@ class DeploymentInfo(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class TaskQueueInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -146,6 +145,7 @@ class DeploymentInfo(google.protobuf.message.Message): @property def first_poller_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When server saw the first poller for this task queue in this deployment.""" + def __init__( self, *, @@ -154,14 +154,11 @@ class DeploymentInfo(google.protobuf.message.Message): first_poller_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "first_poller_time", b"first_poller_time" - ], + self, field_name: typing.Literal["first_poller_time", b"first_poller_time"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "first_poller_time", b"first_poller_time", "name", @@ -176,6 +173,8 @@ class DeploymentInfo(google.protobuf.message.Message): TASK_QUEUE_INFOS_FIELD_NUMBER: builtins.int METADATA_FIELD_NUMBER: builtins.int IS_CURRENT_FIELD_NUMBER: builtins.int + is_current: builtins.bool + """If this deployment is the current deployment of its deployment series.""" @property def deployment(self) -> global___Deployment: ... @property @@ -195,8 +194,7 @@ class DeploymentInfo(google.protobuf.message.Message): """A user-defined set of key-values. Can be updated as part of write operations to the deployment, such as `SetCurrentDeployment`. """ - is_current: builtins.bool - """If this deployment is the current deployment of its deployment series.""" + def __init__( self, *, @@ -214,13 +212,13 @@ class DeploymentInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "deployment", b"deployment" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "deployment", @@ -236,6 +234,7 @@ class DeploymentInfo(google.protobuf.message.Message): global___DeploymentInfo = DeploymentInfo +@typing.final class UpdateDeploymentMetadata(google.protobuf.message.Message): """Used as part of Deployment write APIs to update metadata attached to a deployment. Deprecated. @@ -243,6 +242,7 @@ class UpdateDeploymentMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class UpsertEntriesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -258,11 +258,10 @@ class UpdateDeploymentMetadata(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... UPSERT_ENTRIES_FIELD_NUMBER: builtins.int @@ -278,6 +277,7 @@ class UpdateDeploymentMetadata(google.protobuf.message.Message): self, ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """List of keys to remove from the metadata.""" + def __init__( self, *, @@ -289,13 +289,14 @@ class UpdateDeploymentMetadata(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "remove_entries", b"remove_entries", "upsert_entries", b"upsert_entries" ], ) -> None: ... global___UpdateDeploymentMetadata = UpdateDeploymentMetadata +@typing.final class DeploymentListInfo(google.protobuf.message.Message): """DeploymentListInfo is an abbreviated set of fields from DeploymentInfo that's returned in ListDeployments. @@ -307,12 +308,12 @@ class DeploymentListInfo(google.protobuf.message.Message): DEPLOYMENT_FIELD_NUMBER: builtins.int CREATE_TIME_FIELD_NUMBER: builtins.int IS_CURRENT_FIELD_NUMBER: builtins.int + is_current: builtins.bool + """If this deployment is the current deployment of its deployment series.""" @property def deployment(self) -> global___Deployment: ... @property def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - is_current: builtins.bool - """If this deployment is the current deployment of its deployment series.""" def __init__( self, *, @@ -322,13 +323,13 @@ class DeploymentListInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "deployment", b"deployment" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "deployment", @@ -340,6 +341,7 @@ class DeploymentListInfo(google.protobuf.message.Message): global___DeploymentListInfo = DeploymentListInfo +@typing.final class WorkerDeploymentVersionInfo(google.protobuf.message.Message): """A Worker Deployment Version (Version, for short) represents all workers of the same code and config within a Deployment. Workers of the same Version are expected to @@ -347,11 +349,11 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): non-determinism issues. Worker Deployment Versions are created in Temporal server automatically when their first poller arrives to the server. - Experimental. Worker Deployments are experimental and might significantly change in the future. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class VersionTaskQueueInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -366,8 +368,7 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): type: temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["name", b"name", "type", b"type"], + self, field_name: typing.Literal["name", b"name", "type", b"type"] ) -> None: ... VERSION_FIELD_NUMBER: builtins.int @@ -379,48 +380,73 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): CURRENT_SINCE_TIME_FIELD_NUMBER: builtins.int RAMPING_SINCE_TIME_FIELD_NUMBER: builtins.int FIRST_ACTIVATION_TIME_FIELD_NUMBER: builtins.int + LAST_CURRENT_TIME_FIELD_NUMBER: builtins.int LAST_DEACTIVATION_TIME_FIELD_NUMBER: builtins.int RAMP_PERCENTAGE_FIELD_NUMBER: builtins.int TASK_QUEUE_INFOS_FIELD_NUMBER: builtins.int DRAINAGE_INFO_FIELD_NUMBER: builtins.int METADATA_FIELD_NUMBER: builtins.int + COMPUTE_CONFIG_FIELD_NUMBER: builtins.int + LAST_MODIFIER_IDENTITY_FIELD_NUMBER: builtins.int version: builtins.str """Deprecated. Use `deployment_version`.""" status: ( temporalio.api.enums.v1.deployment_pb2.WorkerDeploymentVersionStatus.ValueType ) """The status of the Worker Deployment Version.""" + deployment_name: builtins.str + """Deprecated. User deployment_version.deployment_name.""" + ramp_percentage: builtins.float + """Range: [0, 100]. Must be zero if the version is not ramping (i.e. `ramping_since_time` is nil). + Can be in the range [0, 100] if the version is ramping. + """ + last_modifier_identity: builtins.str + """Identity of the last client who modified the configuration of this Version. + As of now, this field only covers changes through the following APIs: + - `CreateWorkerDeploymentVersion` + - `UpdateWorkerDeploymentVersionComputeConfig` + - `UpdateWorkerDeploymentVersionMetadata` + """ @property def deployment_version(self) -> global___WorkerDeploymentVersion: """Required.""" - deployment_name: builtins.str + @property def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... @property def routing_changed_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed.""" + @property def current_since_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) Unset if not current. """ + @property def ramping_since_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. """ + @property def first_activation_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Timestamp when this version first became current or ramping.""" + + @property + def last_current_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Timestamp when this version last became current. + Can be used to determine whether a version has ever been Current. + """ + @property def last_deactivation_time(self) -> google.protobuf.timestamp_pb2.Timestamp: - """Timestamp when this version last stopped being current or ramping.""" - ramp_percentage: builtins.float - """Range: [0, 100]. Must be zero if the version is not ramping (i.e. `ramping_since_time` is nil). - Can be in the range [0, 100] if the version is ramping. - """ + """Timestamp when this version last stopped being current or ramping. + Cleared if the version becomes current or ramping again. + """ + @property def task_queue_infos( self, @@ -430,6 +456,7 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): """All the Task Queues that have ever polled from this Deployment version. Deprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead. """ + @property def drainage_info(self) -> global___VersionDrainageInfo: """Helps user determine when it is safe to decommission the workers of this @@ -446,9 +473,17 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): Pinned Versioning Override, the status does not account for those Pinned-override executions and remains "drained". """ + @property def metadata(self) -> global___VersionMetadata: """Arbitrary user-provided metadata attached to this version.""" + + @property + def compute_config(self) -> temporalio.api.compute.v1.config_pb2.ComputeConfig: + """Optional. Contains the new worker compute configuration for the Worker + Deployment. Used for worker scale management. + """ + def __init__( self, *, @@ -461,6 +496,7 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): current_since_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ramping_since_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., first_activation_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + last_current_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., last_deactivation_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ramp_percentage: builtins.float = ..., task_queue_infos: collections.abc.Iterable[ @@ -469,10 +505,14 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): | None = ..., drainage_info: global___VersionDrainageInfo | None = ..., metadata: global___VersionMetadata | None = ..., + compute_config: temporalio.api.compute.v1.config_pb2.ComputeConfig | None = ..., + last_modifier_identity: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "compute_config", + b"compute_config", "create_time", b"create_time", "current_since_time", @@ -483,6 +523,8 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): b"drainage_info", "first_activation_time", b"first_activation_time", + "last_current_time", + b"last_current_time", "last_deactivation_time", b"last_deactivation_time", "metadata", @@ -495,7 +537,9 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "compute_config", + b"compute_config", "create_time", b"create_time", "current_since_time", @@ -508,8 +552,12 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): b"drainage_info", "first_activation_time", b"first_activation_time", + "last_current_time", + b"last_current_time", "last_deactivation_time", b"last_deactivation_time", + "last_modifier_identity", + b"last_modifier_identity", "metadata", b"metadata", "ramp_percentage", @@ -529,10 +577,10 @@ class WorkerDeploymentVersionInfo(google.protobuf.message.Message): global___WorkerDeploymentVersionInfo = WorkerDeploymentVersionInfo +@typing.final class VersionDrainageInfo(google.protobuf.message.Message): """Information about workflow drainage to help the user determine when it is safe to decommission a Version. Not present while version is current or ramping. - Experimental. Worker Deployments are experimental and might significantly change in the future. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -547,9 +595,11 @@ class VersionDrainageInfo(google.protobuf.message.Message): @property def last_changed_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Last time the drainage status changed.""" + @property def last_checked_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Last time the system checked for drainage of this version.""" + def __init__( self, *, @@ -559,7 +609,7 @@ class VersionDrainageInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "last_changed_time", b"last_changed_time", "last_checked_time", @@ -568,7 +618,7 @@ class VersionDrainageInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "last_changed_time", b"last_changed_time", "last_checked_time", @@ -580,6 +630,67 @@ class VersionDrainageInfo(google.protobuf.message.Message): global___VersionDrainageInfo = VersionDrainageInfo +@typing.final +class ComputeStatus(google.protobuf.message.Message): + """ComputeStatus represents compute-related configuration and health for a Worker Deployment Version.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ProviderValidationStatus(google.protobuf.message.Message): + """ProviderValidationStatus represents the result of the most recent + connectivity check between Temporal and a customer's compute provider. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ERROR_MESSAGE_FIELD_NUMBER: builtins.int + LAST_CHECK_TIME_FIELD_NUMBER: builtins.int + error_message: builtins.str + """Human-readable error message if connectivity validation failed. + An empty string means validation passed. + """ + @property + def last_check_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Timestamp of the last validation check.""" + + def __init__( + self, + *, + error_message: builtins.str = ..., + last_check_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["last_check_time", b"last_check_time"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "error_message", b"error_message", "last_check_time", b"last_check_time" + ], + ) -> None: ... + + PROVIDER_VALIDATION_FIELD_NUMBER: builtins.int + @property + def provider_validation(self) -> global___ComputeStatus.ProviderValidationStatus: + """provider_validation encapsulates the health signal for validating the compute provider.""" + + def __init__( + self, + *, + provider_validation: global___ComputeStatus.ProviderValidationStatus + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["provider_validation", b"provider_validation"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["provider_validation", b"provider_validation"] + ) -> None: ... + +global___ComputeStatus = ComputeStatus + +@typing.final class WorkerDeploymentInfo(google.protobuf.message.Message): """A Worker Deployment (Deployment, for short) represents all workers serving a shared set of Task Queues. Typically, a Deployment represents one service or @@ -588,11 +699,11 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): version of workers. (see documentation of WorkerDeploymentVersionInfo) Deployment records are created in Temporal server automatically when their first poller arrives to the server. - Experimental. Worker Deployments are experimental and might significantly change in the future. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class WorkerDeploymentVersionSummary(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -606,46 +717,72 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): RAMPING_SINCE_TIME_FIELD_NUMBER: builtins.int ROUTING_UPDATE_TIME_FIELD_NUMBER: builtins.int FIRST_ACTIVATION_TIME_FIELD_NUMBER: builtins.int + LAST_CURRENT_TIME_FIELD_NUMBER: builtins.int LAST_DEACTIVATION_TIME_FIELD_NUMBER: builtins.int + COMPUTE_CONFIG_FIELD_NUMBER: builtins.int + COMPUTE_STATUS_FIELD_NUMBER: builtins.int version: builtins.str """Deprecated. Use `deployment_version`.""" status: temporalio.api.enums.v1.deployment_pb2.WorkerDeploymentVersionStatus.ValueType """The status of the Worker Deployment Version.""" + drainage_status: ( + temporalio.api.enums.v1.deployment_pb2.VersionDrainageStatus.ValueType + ) + """Deprecated. Use `drainage_info` instead.""" @property def deployment_version(self) -> global___WorkerDeploymentVersion: """Required.""" + @property def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - drainage_status: ( - temporalio.api.enums.v1.deployment_pb2.VersionDrainageStatus.ValueType - ) - """Deprecated. Use `drainage_info` instead.""" @property def drainage_info(self) -> global___VersionDrainageInfo: """Information about workflow drainage to help the user determine when it is safe to decommission a Version. Not present while version is current or ramping """ + @property def current_since_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Unset if not current. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) """ + @property def ramping_since_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) """ + @property def routing_update_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed.""" + @property def first_activation_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Timestamp when this version first became current or ramping.""" + + @property + def last_current_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Timestamp when this version last became current. + Can be used to determine whether a version has ever been Current. + """ + @property def last_deactivation_time(self) -> google.protobuf.timestamp_pb2.Timestamp: - """Timestamp when this version last stopped being current or ramping.""" + """Timestamp when this version last stopped being current or ramping. + Cleared if the version becomes current or ramping again. + """ + + @property + def compute_config( + self, + ) -> temporalio.api.compute.v1.config_pb2.ComputeConfigSummary: ... + @property + def compute_status(self) -> global___ComputeStatus: + """ComputeStatus represents compute-related configuration and healthchecks.""" + def __init__( self, *, @@ -659,12 +796,20 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): ramping_since_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., routing_update_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., first_activation_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + last_current_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., last_deactivation_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + compute_config: temporalio.api.compute.v1.config_pb2.ComputeConfigSummary + | None = ..., + compute_status: global___ComputeStatus | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "compute_config", + b"compute_config", + "compute_status", + b"compute_status", "create_time", b"create_time", "current_since_time", @@ -675,6 +820,8 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): b"drainage_info", "first_activation_time", b"first_activation_time", + "last_current_time", + b"last_current_time", "last_deactivation_time", b"last_deactivation_time", "ramping_since_time", @@ -685,7 +832,11 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "compute_config", + b"compute_config", + "compute_status", + b"compute_status", "create_time", b"create_time", "current_since_time", @@ -698,6 +849,8 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): b"drainage_status", "first_activation_time", b"first_activation_time", + "last_current_time", + b"last_current_time", "last_deactivation_time", b"last_deactivation_time", "ramping_since_time", @@ -717,8 +870,26 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): ROUTING_CONFIG_FIELD_NUMBER: builtins.int LAST_MODIFIER_IDENTITY_FIELD_NUMBER: builtins.int MANAGER_IDENTITY_FIELD_NUMBER: builtins.int + ROUTING_CONFIG_UPDATE_STATE_FIELD_NUMBER: builtins.int name: builtins.str """Identifies a Worker Deployment. Must be unique within the namespace.""" + last_modifier_identity: builtins.str + """Identity of the last client who modified the configuration of this Deployment. Set to the + `identity` value sent by APIs such as `SetWorkerDeploymentCurrentVersion` and + `SetWorkerDeploymentRampingVersion`. + """ + manager_identity: builtins.str + """Identity of the client that has the exclusive right to make changes to this Worker Deployment. + Empty by default. + If this is set, clients whose identity does not match `manager_identity` will not be able to make changes + to this Worker Deployment. They can either set their own identity as the manager or unset the field to proceed. + """ + routing_config_update_state: ( + temporalio.api.enums.v1.task_queue_pb2.RoutingConfigUpdateState.ValueType + ) + """Indicates whether the routing_config has been fully propagated to all + relevant task queues and their partitions. + """ @property def version_summaries( self, @@ -731,21 +902,11 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) - It is drained (see WorkerDeploymentVersionInfo.drainage_status) """ + @property def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... @property def routing_config(self) -> global___RoutingConfig: ... - last_modifier_identity: builtins.str - """Identity of the last client who modified the configuration of this Deployment. Set to the - `identity` value sent by APIs such as `SetWorkerDeploymentCurrentVersion` and - `SetWorkerDeploymentRampingVersion`. - """ - manager_identity: builtins.str - """Identity of the client that has the exclusive right to make changes to this Worker Deployment. - Empty by default. - If this is set, clients whose identity does not match `manager_identity` will not be able to make changes - to this Worker Deployment. They can either set their own identity as the manager or unset the field to proceed. - """ def __init__( self, *, @@ -758,16 +919,17 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): routing_config: global___RoutingConfig | None = ..., last_modifier_identity: builtins.str = ..., manager_identity: builtins.str = ..., + routing_config_update_state: temporalio.api.enums.v1.task_queue_pb2.RoutingConfigUpdateState.ValueType = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "routing_config", b"routing_config" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "last_modifier_identity", @@ -778,6 +940,8 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): b"name", "routing_config", b"routing_config", + "routing_config_update_state", + b"routing_config_update_state", "version_summaries", b"version_summaries", ], @@ -785,6 +949,7 @@ class WorkerDeploymentInfo(google.protobuf.message.Message): global___WorkerDeploymentInfo = WorkerDeploymentInfo +@typing.final class WorkerDeploymentVersion(google.protobuf.message.Message): """A Worker Deployment Version (Version, for short) represents a version of workers within a Worker Deployment. (see documentation of WorkerDeploymentVersionInfo) @@ -813,16 +978,18 @@ class WorkerDeploymentVersion(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id", b"build_id", "deployment_name", b"deployment_name" ], ) -> None: ... global___WorkerDeploymentVersion = WorkerDeploymentVersion +@typing.final class VersionMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class EntriesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -838,11 +1005,10 @@ class VersionMetadata(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... ENTRIES_FIELD_NUMBER: builtins.int @@ -853,6 +1019,7 @@ class VersionMetadata(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ]: """Arbitrary key-values.""" + def __init__( self, *, @@ -861,12 +1028,11 @@ class VersionMetadata(google.protobuf.message.Message): ] | None = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["entries", b"entries"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["entries", b"entries"]) -> None: ... global___VersionMetadata = VersionMetadata +@typing.final class RoutingConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -878,6 +1044,21 @@ class RoutingConfig(google.protobuf.message.Message): CURRENT_VERSION_CHANGED_TIME_FIELD_NUMBER: builtins.int RAMPING_VERSION_CHANGED_TIME_FIELD_NUMBER: builtins.int RAMPING_VERSION_PERCENTAGE_CHANGED_TIME_FIELD_NUMBER: builtins.int + REVISION_NUMBER_FIELD_NUMBER: builtins.int + current_version: builtins.str + """Deprecated. Use `current_deployment_version`.""" + ramping_version: builtins.str + """Deprecated. Use `ramping_deployment_version`.""" + ramping_version_percentage: builtins.float + """Percentage of tasks that are routed to the Ramping Version instead of the Current Version. + Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but + not yet "promoted" to be the Current Version, likely due to pending validations. + A 0% value means the Ramping Version is receiving no traffic. + """ + revision_number: builtins.int + """Monotonically increasing value which is incremented on every mutation + to any field of this message to achieve eventual consistency between task queues and their partitions. + """ @property def current_deployment_version(self) -> global___WorkerDeploymentVersion: """Specifies which Deployment Version should receive new workflow executions and tasks of @@ -886,8 +1067,7 @@ class RoutingConfig(google.protobuf.message.Message): Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). """ - current_version: builtins.str - """Deprecated. Use `current_deployment_version`.""" + @property def ramping_deployment_version(self) -> global___WorkerDeploymentVersion: """When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. @@ -896,20 +1076,15 @@ class RoutingConfig(google.protobuf.message.Message): Note that it is possible to ramp from one Version to another Version, or from unversioned workers to a particular Version, or from a particular Version to unversioned workers. """ - ramping_version: builtins.str - """Deprecated. Use `ramping_deployment_version`.""" - ramping_version_percentage: builtins.float - """Percentage of tasks that are routed to the Ramping Version instead of the Current Version. - Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but - not yet "promoted" to be the Current Version, likely due to pending validations. - A 0% value means the Ramping Version is receiving no traffic. - """ + @property def current_version_changed_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Last time current version was changed.""" + @property def ramping_version_changed_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Last time ramping version was changed. Not updated if only the ramp percentage changes.""" + @property def ramping_version_percentage_changed_time( self, @@ -917,6 +1092,7 @@ class RoutingConfig(google.protobuf.message.Message): """Last time ramping version percentage was changed. If ramping version is changed, this is also updated, even if the percentage stays the same. """ + def __init__( self, *, @@ -931,10 +1107,11 @@ class RoutingConfig(google.protobuf.message.Message): | None = ..., ramping_version_percentage_changed_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + revision_number: builtins.int = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_deployment_version", b"current_deployment_version", "current_version_changed_time", @@ -949,7 +1126,7 @@ class RoutingConfig(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_deployment_version", b"current_deployment_version", "current_version", @@ -966,7 +1143,68 @@ class RoutingConfig(google.protobuf.message.Message): b"ramping_version_percentage", "ramping_version_percentage_changed_time", b"ramping_version_percentage_changed_time", + "revision_number", + b"revision_number", ], ) -> None: ... global___RoutingConfig = RoutingConfig + +@typing.final +class InheritedAutoUpgradeInfo(google.protobuf.message.Message): + """Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version + to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. + Also used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SOURCE_DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int + SOURCE_DEPLOYMENT_REVISION_NUMBER_FIELD_NUMBER: builtins.int + CONTINUE_AS_NEW_INITIAL_VERSIONING_BEHAVIOR_FIELD_NUMBER: builtins.int + source_deployment_revision_number: builtins.int + """The revision number of the source deployment version of the parent/previous workflow.""" + continue_as_new_initial_versioning_behavior: ( + temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType + ) + """Experimental. + If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + specified in that command. + Only used for the initial task of this run and the initial task of any retries of this run. + Not passed to children or to future continue-as-new. + + Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade + value if the InheritedAutoUpgradeInfo is non-empty. + """ + @property + def source_deployment_version(self) -> global___WorkerDeploymentVersion: + """The source deployment version of the parent/previous workflow.""" + + def __init__( + self, + *, + source_deployment_version: global___WorkerDeploymentVersion | None = ..., + source_deployment_revision_number: builtins.int = ..., + continue_as_new_initial_versioning_behavior: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "source_deployment_version", b"source_deployment_version" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "continue_as_new_initial_versioning_behavior", + b"continue_as_new_initial_versioning_behavior", + "source_deployment_revision_number", + b"source_deployment_revision_number", + "source_deployment_version", + b"source_deployment_version", + ], + ) -> None: ... + +global___InheritedAutoUpgradeInfo = InheritedAutoUpgradeInfo diff --git a/temporalio/api/enums/v1/__init__.py b/temporalio/api/enums/v1/__init__.py index 156d02e862..518a2f32bc 100644 --- a/temporalio/api/enums/v1/__init__.py +++ b/temporalio/api/enums/v1/__init__.py @@ -1,9 +1,15 @@ +from .activity_pb2 import ( + ActivityExecutionStatus, + ActivityIdConflictPolicy, + ActivityIdReusePolicy, +) from .batch_operation_pb2 import BatchOperationState, BatchOperationType from .command_type_pb2 import CommandType from .common_pb2 import ( ApplicationErrorCategory, CallbackState, EncodingType, + ExecutionType, IndexedValueType, NexusOperationCancellationState, PendingNexusOperationState, @@ -19,6 +25,7 @@ ) from .event_type_pb2 import EventType from .failed_cause_pb2 import ( + ActivityTaskFailedCause, CancelExternalWorkflowExecutionFailedCause, ResourceExhaustedCause, ResourceExhaustedScope, @@ -27,7 +34,13 @@ WorkflowTaskFailedCause, ) from .namespace_pb2 import ArchivalState, NamespaceState, ReplicationState -from .nexus_pb2 import NexusHandlerErrorRetryBehavior +from .nexus_pb2 import ( + NexusHandlerErrorRetryBehavior, + NexusOperationExecutionStatus, + NexusOperationIdConflictPolicy, + NexusOperationIdReusePolicy, + NexusOperationWaitStage, +) from .query_pb2 import QueryRejectCondition, QueryResultType from .reset_pb2 import ResetReapplyExcludeType, ResetReapplyType, ResetType from .schedule_pb2 import ScheduleOverlapPolicy @@ -35,18 +48,22 @@ BuildIdTaskReachability, DescribeTaskQueueMode, RateLimitSource, + RoutingConfigUpdateState, TaskQueueKind, TaskQueueType, TaskReachability, ) +from .time_skipping_pb2 import FastForwardPollingResult from .update_pb2 import UpdateAdmittedEventOrigin, UpdateWorkflowExecutionLifecycleStage from .workflow_pb2 import ( ContinueAsNewInitiator, + ContinueAsNewVersioningBehavior, HistoryEventFilterType, ParentClosePolicy, PendingActivityState, PendingWorkflowTaskState, RetryState, + SuggestContinueAsNewReason, TimeoutType, VersioningBehavior, WorkflowExecutionStatus, @@ -55,6 +72,10 @@ ) __all__ = [ + "ActivityExecutionStatus", + "ActivityIdConflictPolicy", + "ActivityIdReusePolicy", + "ActivityTaskFailedCause", "ApplicationErrorCategory", "ArchivalState", "BatchOperationState", @@ -64,15 +85,22 @@ "CancelExternalWorkflowExecutionFailedCause", "CommandType", "ContinueAsNewInitiator", + "ContinueAsNewVersioningBehavior", "DeploymentReachability", "DescribeTaskQueueMode", "EncodingType", "EventType", + "ExecutionType", + "FastForwardPollingResult", "HistoryEventFilterType", "IndexedValueType", "NamespaceState", "NexusHandlerErrorRetryBehavior", "NexusOperationCancellationState", + "NexusOperationExecutionStatus", + "NexusOperationIdConflictPolicy", + "NexusOperationIdReusePolicy", + "NexusOperationWaitStage", "ParentClosePolicy", "PendingActivityState", "PendingNexusOperationState", @@ -87,10 +115,12 @@ "ResourceExhaustedCause", "ResourceExhaustedScope", "RetryState", + "RoutingConfigUpdateState", "ScheduleOverlapPolicy", "Severity", "SignalExternalWorkflowExecutionFailedCause", "StartChildWorkflowExecutionFailedCause", + "SuggestContinueAsNewReason", "TaskQueueKind", "TaskQueueType", "TaskReachability", diff --git a/temporalio/api/enums/v1/activity_pb2.py b/temporalio/api/enums/v1/activity_pb2.py new file mode 100644 index 0000000000..5a4d0f1c7e --- /dev/null +++ b/temporalio/api/enums/v1/activity_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/enums/v1/activity.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b"\n$temporal/api/enums/v1/activity.proto\x12\x15temporal.api.enums.v1*\xdb\x02\n\x17\x41\x63tivityExecutionStatus\x12)\n%ACTIVITY_EXECUTION_STATUS_UNSPECIFIED\x10\x00\x12%\n!ACTIVITY_EXECUTION_STATUS_RUNNING\x10\x01\x12'\n#ACTIVITY_EXECUTION_STATUS_COMPLETED\x10\x02\x12$\n ACTIVITY_EXECUTION_STATUS_FAILED\x10\x03\x12&\n\"ACTIVITY_EXECUTION_STATUS_CANCELED\x10\x04\x12(\n$ACTIVITY_EXECUTION_STATUS_TERMINATED\x10\x05\x12'\n#ACTIVITY_EXECUTION_STATUS_TIMED_OUT\x10\x06\x12$\n ACTIVITY_EXECUTION_STATUS_PAUSED\x10\x07*\xd8\x01\n\x15\x41\x63tivityIdReusePolicy\x12(\n$ACTIVITY_ID_REUSE_POLICY_UNSPECIFIED\x10\x00\x12,\n(ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE\x10\x01\x12\x38\n4ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY\x10\x02\x12-\n)ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE\x10\x03*\x9b\x01\n\x18\x41\x63tivityIdConflictPolicy\x12+\n'ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED\x10\x00\x12$\n ACTIVITY_ID_CONFLICT_POLICY_FAIL\x10\x01\x12,\n(ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING\x10\x02\x42\x85\x01\n\x18io.temporal.api.enums.v1B\rActivityProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.enums.v1B\rActivityProtoP\001Z!go.temporal.io/api/enums/v1;enums\252\002\027Temporalio.Api.Enums.V1\352\002\032Temporalio::Api::Enums::V1" + _ACTIVITYEXECUTIONSTATUS._serialized_start = 64 + _ACTIVITYEXECUTIONSTATUS._serialized_end = 411 + _ACTIVITYIDREUSEPOLICY._serialized_start = 414 + _ACTIVITYIDREUSEPOLICY._serialized_end = 630 + _ACTIVITYIDCONFLICTPOLICY._serialized_start = 633 + _ACTIVITYIDCONFLICTPOLICY._serialized_end = 788 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/enums/v1/activity_pb2.pyi b/temporalio/api/enums/v1/activity_pb2.pyi new file mode 100644 index 0000000000..baba5d21f8 --- /dev/null +++ b/temporalio/api/enums/v1/activity_pb2.pyi @@ -0,0 +1,200 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import sys +import typing + +import google.protobuf.descriptor +import google.protobuf.internal.enum_type_wrapper + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _ActivityExecutionStatus: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ActivityExecutionStatusEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + _ActivityExecutionStatus.ValueType + ], + builtins.type, +): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + ACTIVITY_EXECUTION_STATUS_UNSPECIFIED: _ActivityExecutionStatus.ValueType # 0 + ACTIVITY_EXECUTION_STATUS_RUNNING: _ActivityExecutionStatus.ValueType # 1 + """The activity has not reached a terminal status. See PendingActivityState for the run state + (SCHEDULED, STARTED, or CANCEL_REQUESTED). + """ + ACTIVITY_EXECUTION_STATUS_COMPLETED: _ActivityExecutionStatus.ValueType # 2 + """The activity completed successfully. An activity can complete even after cancellation is + requested if the worker calls RespondActivityTaskCompleted before acknowledging cancellation. + """ + ACTIVITY_EXECUTION_STATUS_FAILED: _ActivityExecutionStatus.ValueType # 3 + """The activity failed. Causes: + - Worker returned a non-retryable failure + - RetryPolicy.maximum_attempts exhausted + - Attempt failed after cancellation was requested (retries blocked) + """ + ACTIVITY_EXECUTION_STATUS_CANCELED: _ActivityExecutionStatus.ValueType # 4 + """The activity was canceled. Reached when: + - Cancellation requested while SCHEDULED (immediate), or + - Cancellation requested while STARTED and worker called RespondActivityTaskCanceled. + + Workers discover cancellation requests via heartbeat responses (cancel_requested=true). + Activities that do not heartbeat will not learn of cancellation and may complete, fail, or + time out normally. CANCELED requires explicit worker acknowledgment or immediate cancellation + of a SCHEDULED activity. + """ + ACTIVITY_EXECUTION_STATUS_TERMINATED: _ActivityExecutionStatus.ValueType # 5 + """The activity was terminated. Immediate; does not wait for worker acknowledgment.""" + ACTIVITY_EXECUTION_STATUS_TIMED_OUT: _ActivityExecutionStatus.ValueType # 6 + """The activity timed out. See TimeoutType for the specific timeout. + - SCHEDULE_TO_START and SCHEDULE_TO_CLOSE timeouts always result in TIMED_OUT. + - START_TO_CLOSE and HEARTBEAT may retry if RetryPolicy permits; TIMED_OUT is + reached when retry is blocked (RetryPolicy.maximum_attempts exhausted, + SCHEDULE_TO_CLOSE would be exceeded, or cancellation has been requested). + """ + ACTIVITY_EXECUTION_STATUS_PAUSED: _ActivityExecutionStatus.ValueType # 7 + """The activity is paused. Paused state is only reachable after calling + PauseActivityExecution on a standalone activity. + """ + +class ActivityExecutionStatus( + _ActivityExecutionStatus, metaclass=_ActivityExecutionStatusEnumTypeWrapper +): + """Status of a standalone activity. + The status is updated when the activity is originally scheduled, paused, unpaused, and when the + activity reaches a terminal state. + (-- api-linter: core::0216::synonyms=disabled + aip.dev/not-precedent: Named consistently with WorkflowExecutionStatus. --) + """ + +ACTIVITY_EXECUTION_STATUS_UNSPECIFIED: ActivityExecutionStatus.ValueType # 0 +ACTIVITY_EXECUTION_STATUS_RUNNING: ActivityExecutionStatus.ValueType # 1 +"""The activity has not reached a terminal status. See PendingActivityState for the run state +(SCHEDULED, STARTED, or CANCEL_REQUESTED). +""" +ACTIVITY_EXECUTION_STATUS_COMPLETED: ActivityExecutionStatus.ValueType # 2 +"""The activity completed successfully. An activity can complete even after cancellation is +requested if the worker calls RespondActivityTaskCompleted before acknowledging cancellation. +""" +ACTIVITY_EXECUTION_STATUS_FAILED: ActivityExecutionStatus.ValueType # 3 +"""The activity failed. Causes: +- Worker returned a non-retryable failure +- RetryPolicy.maximum_attempts exhausted +- Attempt failed after cancellation was requested (retries blocked) +""" +ACTIVITY_EXECUTION_STATUS_CANCELED: ActivityExecutionStatus.ValueType # 4 +"""The activity was canceled. Reached when: +- Cancellation requested while SCHEDULED (immediate), or +- Cancellation requested while STARTED and worker called RespondActivityTaskCanceled. + +Workers discover cancellation requests via heartbeat responses (cancel_requested=true). +Activities that do not heartbeat will not learn of cancellation and may complete, fail, or +time out normally. CANCELED requires explicit worker acknowledgment or immediate cancellation +of a SCHEDULED activity. +""" +ACTIVITY_EXECUTION_STATUS_TERMINATED: ActivityExecutionStatus.ValueType # 5 +"""The activity was terminated. Immediate; does not wait for worker acknowledgment.""" +ACTIVITY_EXECUTION_STATUS_TIMED_OUT: ActivityExecutionStatus.ValueType # 6 +"""The activity timed out. See TimeoutType for the specific timeout. +- SCHEDULE_TO_START and SCHEDULE_TO_CLOSE timeouts always result in TIMED_OUT. +- START_TO_CLOSE and HEARTBEAT may retry if RetryPolicy permits; TIMED_OUT is + reached when retry is blocked (RetryPolicy.maximum_attempts exhausted, + SCHEDULE_TO_CLOSE would be exceeded, or cancellation has been requested). +""" +ACTIVITY_EXECUTION_STATUS_PAUSED: ActivityExecutionStatus.ValueType # 7 +"""The activity is paused. Paused state is only reachable after calling +PauseActivityExecution on a standalone activity. +""" +global___ActivityExecutionStatus = ActivityExecutionStatus + +class _ActivityIdReusePolicy: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ActivityIdReusePolicyEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + _ActivityIdReusePolicy.ValueType + ], + builtins.type, +): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + ACTIVITY_ID_REUSE_POLICY_UNSPECIFIED: _ActivityIdReusePolicy.ValueType # 0 + ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE: _ActivityIdReusePolicy.ValueType # 1 + """Always allow starting an activity using the same activity ID.""" + ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: ( + _ActivityIdReusePolicy.ValueType + ) # 2 + """Allow starting an activity using the same ID only when the last activity's final state is one + of {failed, canceled, terminated, timed out}. + """ + ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE: _ActivityIdReusePolicy.ValueType # 3 + """Do not permit re-use of the ID for this activity. Future start requests could potentially change the policy, + allowing re-use of the ID. + """ + +class ActivityIdReusePolicy( + _ActivityIdReusePolicy, metaclass=_ActivityIdReusePolicyEnumTypeWrapper +): + """Defines whether to allow re-using an activity ID from a previously *closed* activity. + If the request is denied, the server returns an `ActivityExecutionAlreadyStarted` error. + + See `ActivityIdConflictPolicy` for handling ID duplication with a *running* activity. + """ + +ACTIVITY_ID_REUSE_POLICY_UNSPECIFIED: ActivityIdReusePolicy.ValueType # 0 +ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE: ActivityIdReusePolicy.ValueType # 1 +"""Always allow starting an activity using the same activity ID.""" +ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: ( + ActivityIdReusePolicy.ValueType +) # 2 +"""Allow starting an activity using the same ID only when the last activity's final state is one +of {failed, canceled, terminated, timed out}. +""" +ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE: ActivityIdReusePolicy.ValueType # 3 +"""Do not permit re-use of the ID for this activity. Future start requests could potentially change the policy, +allowing re-use of the ID. +""" +global___ActivityIdReusePolicy = ActivityIdReusePolicy + +class _ActivityIdConflictPolicy: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ActivityIdConflictPolicyEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + _ActivityIdConflictPolicy.ValueType + ], + builtins.type, +): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED: _ActivityIdConflictPolicy.ValueType # 0 + ACTIVITY_ID_CONFLICT_POLICY_FAIL: _ActivityIdConflictPolicy.ValueType # 1 + """Don't start a new activity; instead return `ActivityExecutionAlreadyStarted` error.""" + ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING: _ActivityIdConflictPolicy.ValueType # 2 + """Don't start a new activity; instead return a handle for the running activity.""" + +class ActivityIdConflictPolicy( + _ActivityIdConflictPolicy, metaclass=_ActivityIdConflictPolicyEnumTypeWrapper +): + """Defines what to do when trying to start an activity with the same ID as a *running* activity. + Note that it is *never* valid to have two running instances of the same activity ID. + + See `ActivityIdReusePolicy` for handling activity ID duplication with a *closed* activity. + """ + +ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED: ActivityIdConflictPolicy.ValueType # 0 +ACTIVITY_ID_CONFLICT_POLICY_FAIL: ActivityIdConflictPolicy.ValueType # 1 +"""Don't start a new activity; instead return `ActivityExecutionAlreadyStarted` error.""" +ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING: ActivityIdConflictPolicy.ValueType # 2 +"""Don't start a new activity; instead return a handle for the running activity.""" +global___ActivityIdConflictPolicy = ActivityIdConflictPolicy diff --git a/temporalio/api/enums/v1/batch_operation_pb2.py b/temporalio/api/enums/v1/batch_operation_pb2.py index 60c9d7f2fe..a660245342 100644 --- a/temporalio/api/enums/v1/batch_operation_pb2.py +++ b/temporalio/api/enums/v1/batch_operation_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -16,34 +14,42 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b"\n+temporal/api/enums/v1/batch_operation.proto\x12\x15temporal.api.enums.v1*\x9a\x03\n\x12\x42\x61tchOperationType\x12$\n BATCH_OPERATION_TYPE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42\x41TCH_OPERATION_TYPE_TERMINATE\x10\x01\x12\x1f\n\x1b\x42\x41TCH_OPERATION_TYPE_CANCEL\x10\x02\x12\x1f\n\x1b\x42\x41TCH_OPERATION_TYPE_SIGNAL\x10\x03\x12\x1f\n\x1b\x42\x41TCH_OPERATION_TYPE_DELETE\x10\x04\x12\x1e\n\x1a\x42\x41TCH_OPERATION_TYPE_RESET\x10\x05\x12\x31\n-BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS\x10\x06\x12)\n%BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY\x10\x07\x12\x30\n,BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS\x10\x08\x12'\n#BATCH_OPERATION_TYPE_RESET_ACTIVITY\x10\t*\xa6\x01\n\x13\x42\x61tchOperationState\x12%\n!BATCH_OPERATION_STATE_UNSPECIFIED\x10\x00\x12!\n\x1d\x42\x41TCH_OPERATION_STATE_RUNNING\x10\x01\x12#\n\x1f\x42\x41TCH_OPERATION_STATE_COMPLETED\x10\x02\x12 \n\x1c\x42\x41TCH_OPERATION_STATE_FAILED\x10\x03\x42\x8b\x01\n\x18io.temporal.api.enums.v1B\x13\x42\x61tchOperationProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" + b"\n+temporal/api/enums/v1/batch_operation.proto\x12\x15temporal.api.enums.v1*\xc3\x06\n\x12\x42\x61tchOperationType\x12$\n BATCH_OPERATION_TYPE_UNSPECIFIED\x10\x00\x12&\n\x1e\x42\x41TCH_OPERATION_TYPE_TERMINATE\x10\x01\x1a\x02\x08\x01\x12+\n'BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW\x10\r\x12#\n\x1b\x42\x41TCH_OPERATION_TYPE_CANCEL\x10\x02\x1a\x02\x08\x01\x12(\n$BATCH_OPERATION_TYPE_CANCEL_WORKFLOW\x10\x0e\x12#\n\x1b\x42\x41TCH_OPERATION_TYPE_SIGNAL\x10\x03\x1a\x02\x08\x01\x12(\n$BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW\x10\x0f\x12#\n\x1b\x42\x41TCH_OPERATION_TYPE_DELETE\x10\x04\x1a\x02\x08\x01\x12(\n$BATCH_OPERATION_TYPE_DELETE_WORKFLOW\x10\x10\x12\"\n\x1a\x42\x41TCH_OPERATION_TYPE_RESET\x10\x05\x1a\x02\x08\x01\x12'\n#BATCH_OPERATION_TYPE_RESET_WORKFLOW\x10\x11\x12\x35\n-BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS\x10\x06\x1a\x02\x08\x01\x12:\n6BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS\x10\x12\x12)\n%BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY\x10\x07\x12\x30\n,BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS\x10\x08\x12'\n#BATCH_OPERATION_TYPE_RESET_ACTIVITY\x10\t\x12+\n'BATCH_OPERATION_TYPE_TERMINATE_ACTIVITY\x10\n\x12(\n$BATCH_OPERATION_TYPE_CANCEL_ACTIVITY\x10\x0b\x12(\n$BATCH_OPERATION_TYPE_DELETE_ACTIVITY\x10\x0c*\xa6\x01\n\x13\x42\x61tchOperationState\x12%\n!BATCH_OPERATION_STATE_UNSPECIFIED\x10\x00\x12!\n\x1d\x42\x41TCH_OPERATION_STATE_RUNNING\x10\x01\x12#\n\x1f\x42\x41TCH_OPERATION_STATE_COMPLETED\x10\x02\x12 \n\x1c\x42\x41TCH_OPERATION_STATE_FAILED\x10\x03\x42\x8b\x01\n\x18io.temporal.api.enums.v1B\x13\x42\x61tchOperationProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" ) -_BATCHOPERATIONTYPE = DESCRIPTOR.enum_types_by_name["BatchOperationType"] -BatchOperationType = enum_type_wrapper.EnumTypeWrapper(_BATCHOPERATIONTYPE) -_BATCHOPERATIONSTATE = DESCRIPTOR.enum_types_by_name["BatchOperationState"] -BatchOperationState = enum_type_wrapper.EnumTypeWrapper(_BATCHOPERATIONSTATE) -BATCH_OPERATION_TYPE_UNSPECIFIED = 0 -BATCH_OPERATION_TYPE_TERMINATE = 1 -BATCH_OPERATION_TYPE_CANCEL = 2 -BATCH_OPERATION_TYPE_SIGNAL = 3 -BATCH_OPERATION_TYPE_DELETE = 4 -BATCH_OPERATION_TYPE_RESET = 5 -BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS = 6 -BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY = 7 -BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS = 8 -BATCH_OPERATION_TYPE_RESET_ACTIVITY = 9 -BATCH_OPERATION_STATE_UNSPECIFIED = 0 -BATCH_OPERATION_STATE_RUNNING = 1 -BATCH_OPERATION_STATE_COMPLETED = 2 -BATCH_OPERATION_STATE_FAILED = 3 - - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.enums.v1B\023BatchOperationProtoP\001Z!go.temporal.io/api/enums/v1;enums\252\002\027Temporalio.Api.Enums.V1\352\002\032Temporalio::Api::Enums::V1" + _BATCHOPERATIONTYPE.values_by_name["BATCH_OPERATION_TYPE_TERMINATE"]._options = None + _BATCHOPERATIONTYPE.values_by_name[ + "BATCH_OPERATION_TYPE_TERMINATE" + ]._serialized_options = b"\010\001" + _BATCHOPERATIONTYPE.values_by_name["BATCH_OPERATION_TYPE_CANCEL"]._options = None + _BATCHOPERATIONTYPE.values_by_name[ + "BATCH_OPERATION_TYPE_CANCEL" + ]._serialized_options = b"\010\001" + _BATCHOPERATIONTYPE.values_by_name["BATCH_OPERATION_TYPE_SIGNAL"]._options = None + _BATCHOPERATIONTYPE.values_by_name[ + "BATCH_OPERATION_TYPE_SIGNAL" + ]._serialized_options = b"\010\001" + _BATCHOPERATIONTYPE.values_by_name["BATCH_OPERATION_TYPE_DELETE"]._options = None + _BATCHOPERATIONTYPE.values_by_name[ + "BATCH_OPERATION_TYPE_DELETE" + ]._serialized_options = b"\010\001" + _BATCHOPERATIONTYPE.values_by_name["BATCH_OPERATION_TYPE_RESET"]._options = None + _BATCHOPERATIONTYPE.values_by_name[ + "BATCH_OPERATION_TYPE_RESET" + ]._serialized_options = b"\010\001" + _BATCHOPERATIONTYPE.values_by_name[ + "BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS" + ]._options = None + _BATCHOPERATIONTYPE.values_by_name[ + "BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS" + ]._serialized_options = b"\010\001" _BATCHOPERATIONTYPE._serialized_start = 71 - _BATCHOPERATIONTYPE._serialized_end = 481 - _BATCHOPERATIONSTATE._serialized_start = 484 - _BATCHOPERATIONSTATE._serialized_end = 650 + _BATCHOPERATIONTYPE._serialized_end = 906 + _BATCHOPERATIONSTATE._serialized_start = 909 + _BATCHOPERATIONSTATE._serialized_end = 1075 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/enums/v1/batch_operation_pb2.pyi b/temporalio/api/enums/v1/batch_operation_pb2.pyi index 49f426ebb3..049dfb40ae 100644 --- a/temporalio/api/enums/v1/batch_operation_pb2.pyi +++ b/temporalio/api/enums/v1/batch_operation_pb2.pyi @@ -26,18 +26,35 @@ class _BatchOperationTypeEnumTypeWrapper( _BatchOperationType.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor BATCH_OPERATION_TYPE_UNSPECIFIED: _BatchOperationType.ValueType # 0 BATCH_OPERATION_TYPE_TERMINATE: _BatchOperationType.ValueType # 1 + """DEPRECATED: Use BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW instead.""" + BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW: _BatchOperationType.ValueType # 13 BATCH_OPERATION_TYPE_CANCEL: _BatchOperationType.ValueType # 2 + """DEPRECATED: Use BATCH_OPERATION_TYPE_CANCEL_WORKFLOW instead.""" + BATCH_OPERATION_TYPE_CANCEL_WORKFLOW: _BatchOperationType.ValueType # 14 BATCH_OPERATION_TYPE_SIGNAL: _BatchOperationType.ValueType # 3 + """DEPRECATED: Use BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW instead.""" + BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW: _BatchOperationType.ValueType # 15 BATCH_OPERATION_TYPE_DELETE: _BatchOperationType.ValueType # 4 + """DEPRECATED: Use BATCH_OPERATION_TYPE_DELETE_WORKFLOW instead.""" + BATCH_OPERATION_TYPE_DELETE_WORKFLOW: _BatchOperationType.ValueType # 16 BATCH_OPERATION_TYPE_RESET: _BatchOperationType.ValueType # 5 + """DEPRECATED: Use BATCH_OPERATION_TYPE_RESET_WORKFLOW instead.""" + BATCH_OPERATION_TYPE_RESET_WORKFLOW: _BatchOperationType.ValueType # 17 BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS: _BatchOperationType.ValueType # 6 + """DEPRECATED: Use BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS instead.""" + BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS: ( + _BatchOperationType.ValueType + ) # 18 BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY: _BatchOperationType.ValueType # 7 BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS: _BatchOperationType.ValueType # 8 BATCH_OPERATION_TYPE_RESET_ACTIVITY: _BatchOperationType.ValueType # 9 + BATCH_OPERATION_TYPE_TERMINATE_ACTIVITY: _BatchOperationType.ValueType # 10 + BATCH_OPERATION_TYPE_CANCEL_ACTIVITY: _BatchOperationType.ValueType # 11 + BATCH_OPERATION_TYPE_DELETE_ACTIVITY: _BatchOperationType.ValueType # 12 class BatchOperationType( _BatchOperationType, metaclass=_BatchOperationTypeEnumTypeWrapper @@ -45,14 +62,31 @@ class BatchOperationType( BATCH_OPERATION_TYPE_UNSPECIFIED: BatchOperationType.ValueType # 0 BATCH_OPERATION_TYPE_TERMINATE: BatchOperationType.ValueType # 1 +"""DEPRECATED: Use BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW instead.""" +BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW: BatchOperationType.ValueType # 13 BATCH_OPERATION_TYPE_CANCEL: BatchOperationType.ValueType # 2 +"""DEPRECATED: Use BATCH_OPERATION_TYPE_CANCEL_WORKFLOW instead.""" +BATCH_OPERATION_TYPE_CANCEL_WORKFLOW: BatchOperationType.ValueType # 14 BATCH_OPERATION_TYPE_SIGNAL: BatchOperationType.ValueType # 3 +"""DEPRECATED: Use BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW instead.""" +BATCH_OPERATION_TYPE_SIGNAL_WORKFLOW: BatchOperationType.ValueType # 15 BATCH_OPERATION_TYPE_DELETE: BatchOperationType.ValueType # 4 +"""DEPRECATED: Use BATCH_OPERATION_TYPE_DELETE_WORKFLOW instead.""" +BATCH_OPERATION_TYPE_DELETE_WORKFLOW: BatchOperationType.ValueType # 16 BATCH_OPERATION_TYPE_RESET: BatchOperationType.ValueType # 5 +"""DEPRECATED: Use BATCH_OPERATION_TYPE_RESET_WORKFLOW instead.""" +BATCH_OPERATION_TYPE_RESET_WORKFLOW: BatchOperationType.ValueType # 17 BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS: BatchOperationType.ValueType # 6 +"""DEPRECATED: Use BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS instead.""" +BATCH_OPERATION_TYPE_UPDATE_WORKFLOW_EXECUTION_OPTIONS: ( + BatchOperationType.ValueType +) # 18 BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY: BatchOperationType.ValueType # 7 BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS: BatchOperationType.ValueType # 8 BATCH_OPERATION_TYPE_RESET_ACTIVITY: BatchOperationType.ValueType # 9 +BATCH_OPERATION_TYPE_TERMINATE_ACTIVITY: BatchOperationType.ValueType # 10 +BATCH_OPERATION_TYPE_CANCEL_ACTIVITY: BatchOperationType.ValueType # 11 +BATCH_OPERATION_TYPE_DELETE_ACTIVITY: BatchOperationType.ValueType # 12 global___BatchOperationType = BatchOperationType class _BatchOperationState: @@ -64,7 +98,7 @@ class _BatchOperationStateEnumTypeWrapper( _BatchOperationState.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor BATCH_OPERATION_STATE_UNSPECIFIED: _BatchOperationState.ValueType # 0 BATCH_OPERATION_STATE_RUNNING: _BatchOperationState.ValueType # 1 diff --git a/temporalio/api/enums/v1/command_type_pb2.py b/temporalio/api/enums/v1/command_type_pb2.py index 6d1c3b6e57..d49c9c3693 100644 --- a/temporalio/api/enums/v1/command_type_pb2.py +++ b/temporalio/api/enums/v1/command_type_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -19,28 +17,8 @@ b"\n(temporal/api/enums/v1/command_type.proto\x12\x15temporal.api.enums.v1*\x9c\x06\n\x0b\x43ommandType\x12\x1c\n\x18\x43OMMAND_TYPE_UNSPECIFIED\x10\x00\x12'\n#COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK\x10\x01\x12-\n)COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK\x10\x02\x12\x1c\n\x18\x43OMMAND_TYPE_START_TIMER\x10\x03\x12,\n(COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION\x10\x04\x12(\n$COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION\x10\x05\x12\x1d\n\x19\x43OMMAND_TYPE_CANCEL_TIMER\x10\x06\x12*\n&COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION\x10\x07\x12;\n7COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION\x10\x08\x12\x1e\n\x1a\x43OMMAND_TYPE_RECORD_MARKER\x10\t\x12\x33\n/COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION\x10\n\x12/\n+COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION\x10\x0b\x12\x33\n/COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION\x10\x0c\x12\x32\n.COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES\x10\r\x12!\n\x1d\x43OMMAND_TYPE_PROTOCOL_MESSAGE\x10\x0e\x12+\n'COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES\x10\x10\x12)\n%COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION\x10\x11\x12/\n+COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION\x10\x12\x42\x88\x01\n\x18io.temporal.api.enums.v1B\x10\x43ommandTypeProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" ) -_COMMANDTYPE = DESCRIPTOR.enum_types_by_name["CommandType"] -CommandType = enum_type_wrapper.EnumTypeWrapper(_COMMANDTYPE) -COMMAND_TYPE_UNSPECIFIED = 0 -COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK = 1 -COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK = 2 -COMMAND_TYPE_START_TIMER = 3 -COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION = 4 -COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION = 5 -COMMAND_TYPE_CANCEL_TIMER = 6 -COMMAND_TYPE_CANCEL_WORKFLOW_EXECUTION = 7 -COMMAND_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION = 8 -COMMAND_TYPE_RECORD_MARKER = 9 -COMMAND_TYPE_CONTINUE_AS_NEW_WORKFLOW_EXECUTION = 10 -COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION = 11 -COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION = 12 -COMMAND_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES = 13 -COMMAND_TYPE_PROTOCOL_MESSAGE = 14 -COMMAND_TYPE_MODIFY_WORKFLOW_PROPERTIES = 16 -COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION = 17 -COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION = 18 - - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.enums.v1B\020CommandTypeProtoP\001Z!go.temporal.io/api/enums/v1;enums\252\002\027Temporalio.Api.Enums.V1\352\002\032Temporalio::Api::Enums::V1" diff --git a/temporalio/api/enums/v1/command_type_pb2.pyi b/temporalio/api/enums/v1/command_type_pb2.pyi index 9f1bfd240a..951e61aa9a 100644 --- a/temporalio/api/enums/v1/command_type_pb2.pyi +++ b/temporalio/api/enums/v1/command_type_pb2.pyi @@ -24,7 +24,7 @@ class _CommandType: class _CommandTypeEnumTypeWrapper( google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CommandType.ValueType], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor COMMAND_TYPE_UNSPECIFIED: _CommandType.ValueType # 0 COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK: _CommandType.ValueType # 1 diff --git a/temporalio/api/enums/v1/common_pb2.py b/temporalio/api/enums/v1/common_pb2.py index 557ce7631d..48db1c3b17 100644 --- a/temporalio/api/enums/v1/common_pb2.py +++ b/temporalio/api/enums/v1/common_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -16,80 +14,11 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b"\n\"temporal/api/enums/v1/common.proto\x12\x15temporal.api.enums.v1*_\n\x0c\x45ncodingType\x12\x1d\n\x19\x45NCODING_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45NCODING_TYPE_PROTO3\x10\x01\x12\x16\n\x12\x45NCODING_TYPE_JSON\x10\x02*\x91\x02\n\x10IndexedValueType\x12\"\n\x1eINDEXED_VALUE_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17INDEXED_VALUE_TYPE_TEXT\x10\x01\x12\x1e\n\x1aINDEXED_VALUE_TYPE_KEYWORD\x10\x02\x12\x1a\n\x16INDEXED_VALUE_TYPE_INT\x10\x03\x12\x1d\n\x19INDEXED_VALUE_TYPE_DOUBLE\x10\x04\x12\x1b\n\x17INDEXED_VALUE_TYPE_BOOL\x10\x05\x12\x1f\n\x1bINDEXED_VALUE_TYPE_DATETIME\x10\x06\x12#\n\x1fINDEXED_VALUE_TYPE_KEYWORD_LIST\x10\x07*^\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x11\n\rSEVERITY_HIGH\x10\x01\x12\x13\n\x0fSEVERITY_MEDIUM\x10\x02\x12\x10\n\x0cSEVERITY_LOW\x10\x03*\xde\x01\n\rCallbackState\x12\x1e\n\x1a\x43\x41LLBACK_STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x43\x41LLBACK_STATE_STANDBY\x10\x01\x12\x1c\n\x18\x43\x41LLBACK_STATE_SCHEDULED\x10\x02\x12\x1e\n\x1a\x43\x41LLBACK_STATE_BACKING_OFF\x10\x03\x12\x19\n\x15\x43\x41LLBACK_STATE_FAILED\x10\x04\x12\x1c\n\x18\x43\x41LLBACK_STATE_SUCCEEDED\x10\x05\x12\x1a\n\x16\x43\x41LLBACK_STATE_BLOCKED\x10\x06*\xfd\x01\n\x1aPendingNexusOperationState\x12-\n)PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED\x10\x00\x12+\n'PENDING_NEXUS_OPERATION_STATE_SCHEDULED\x10\x01\x12-\n)PENDING_NEXUS_OPERATION_STATE_BACKING_OFF\x10\x02\x12)\n%PENDING_NEXUS_OPERATION_STATE_STARTED\x10\x03\x12)\n%PENDING_NEXUS_OPERATION_STATE_BLOCKED\x10\x04*\xfe\x02\n\x1fNexusOperationCancellationState\x12\x32\n.NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED\x10\x00\x12\x30\n,NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED\x10\x01\x12\x32\n.NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF\x10\x02\x12\x30\n,NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED\x10\x03\x12-\n)NEXUS_OPERATION_CANCELLATION_STATE_FAILED\x10\x04\x12\x30\n,NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT\x10\x05\x12.\n*NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED\x10\x06*\x97\x01\n\x17WorkflowRuleActionScope\x12*\n&WORKFLOW_RULE_ACTION_SCOPE_UNSPECIFIED\x10\x00\x12'\n#WORKFLOW_RULE_ACTION_SCOPE_WORKFLOW\x10\x01\x12'\n#WORKFLOW_RULE_ACTION_SCOPE_ACTIVITY\x10\x02*m\n\x18\x41pplicationErrorCategory\x12*\n&APPLICATION_ERROR_CATEGORY_UNSPECIFIED\x10\x00\x12%\n!APPLICATION_ERROR_CATEGORY_BENIGN\x10\x01*\x85\x01\n\x0cWorkerStatus\x12\x1d\n\x19WORKER_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15WORKER_STATUS_RUNNING\x10\x01\x12\x1f\n\x1bWORKER_STATUS_SHUTTING_DOWN\x10\x02\x12\x1a\n\x16WORKER_STATUS_SHUTDOWN\x10\x03\x42\x83\x01\n\x18io.temporal.api.enums.v1B\x0b\x43ommonProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" + b"\n\"temporal/api/enums/v1/common.proto\x12\x15temporal.api.enums.v1*_\n\x0c\x45ncodingType\x12\x1d\n\x19\x45NCODING_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x45NCODING_TYPE_PROTO3\x10\x01\x12\x16\n\x12\x45NCODING_TYPE_JSON\x10\x02*\x91\x02\n\x10IndexedValueType\x12\"\n\x1eINDEXED_VALUE_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17INDEXED_VALUE_TYPE_TEXT\x10\x01\x12\x1e\n\x1aINDEXED_VALUE_TYPE_KEYWORD\x10\x02\x12\x1a\n\x16INDEXED_VALUE_TYPE_INT\x10\x03\x12\x1d\n\x19INDEXED_VALUE_TYPE_DOUBLE\x10\x04\x12\x1b\n\x17INDEXED_VALUE_TYPE_BOOL\x10\x05\x12\x1f\n\x1bINDEXED_VALUE_TYPE_DATETIME\x10\x06\x12#\n\x1fINDEXED_VALUE_TYPE_KEYWORD_LIST\x10\x07*^\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x11\n\rSEVERITY_HIGH\x10\x01\x12\x13\n\x0fSEVERITY_MEDIUM\x10\x02\x12\x10\n\x0cSEVERITY_LOW\x10\x03*\xde\x01\n\rCallbackState\x12\x1e\n\x1a\x43\x41LLBACK_STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x43\x41LLBACK_STATE_STANDBY\x10\x01\x12\x1c\n\x18\x43\x41LLBACK_STATE_SCHEDULED\x10\x02\x12\x1e\n\x1a\x43\x41LLBACK_STATE_BACKING_OFF\x10\x03\x12\x19\n\x15\x43\x41LLBACK_STATE_FAILED\x10\x04\x12\x1c\n\x18\x43\x41LLBACK_STATE_SUCCEEDED\x10\x05\x12\x1a\n\x16\x43\x41LLBACK_STATE_BLOCKED\x10\x06*\xfd\x01\n\x1aPendingNexusOperationState\x12-\n)PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED\x10\x00\x12+\n'PENDING_NEXUS_OPERATION_STATE_SCHEDULED\x10\x01\x12-\n)PENDING_NEXUS_OPERATION_STATE_BACKING_OFF\x10\x02\x12)\n%PENDING_NEXUS_OPERATION_STATE_STARTED\x10\x03\x12)\n%PENDING_NEXUS_OPERATION_STATE_BLOCKED\x10\x04*\xfe\x02\n\x1fNexusOperationCancellationState\x12\x32\n.NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED\x10\x00\x12\x30\n,NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED\x10\x01\x12\x32\n.NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF\x10\x02\x12\x30\n,NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED\x10\x03\x12-\n)NEXUS_OPERATION_CANCELLATION_STATE_FAILED\x10\x04\x12\x30\n,NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT\x10\x05\x12.\n*NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED\x10\x06*\x97\x01\n\x17WorkflowRuleActionScope\x12*\n&WORKFLOW_RULE_ACTION_SCOPE_UNSPECIFIED\x10\x00\x12'\n#WORKFLOW_RULE_ACTION_SCOPE_WORKFLOW\x10\x01\x12'\n#WORKFLOW_RULE_ACTION_SCOPE_ACTIVITY\x10\x02*m\n\x18\x41pplicationErrorCategory\x12*\n&APPLICATION_ERROR_CATEGORY_UNSPECIFIED\x10\x00\x12%\n!APPLICATION_ERROR_CATEGORY_BENIGN\x10\x01*\x85\x01\n\x0cWorkerStatus\x12\x1d\n\x19WORKER_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15WORKER_STATUS_RUNNING\x10\x01\x12\x1f\n\x1bWORKER_STATUS_SHUTTING_DOWN\x10\x02\x12\x1a\n\x16WORKER_STATUS_SHUTDOWN\x10\x03*\x8d\x01\n\rExecutionType\x12\x1e\n\x1a\x45XECUTION_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45XECUTION_TYPE_WORKFLOW\x10\x01\x12\x1b\n\x17\x45XECUTION_TYPE_ACTIVITY\x10\x02\x12\"\n\x1e\x45XECUTION_TYPE_NEXUS_OPERATION\x10\x03\x42\x83\x01\n\x18io.temporal.api.enums.v1B\x0b\x43ommonProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" ) -_ENCODINGTYPE = DESCRIPTOR.enum_types_by_name["EncodingType"] -EncodingType = enum_type_wrapper.EnumTypeWrapper(_ENCODINGTYPE) -_INDEXEDVALUETYPE = DESCRIPTOR.enum_types_by_name["IndexedValueType"] -IndexedValueType = enum_type_wrapper.EnumTypeWrapper(_INDEXEDVALUETYPE) -_SEVERITY = DESCRIPTOR.enum_types_by_name["Severity"] -Severity = enum_type_wrapper.EnumTypeWrapper(_SEVERITY) -_CALLBACKSTATE = DESCRIPTOR.enum_types_by_name["CallbackState"] -CallbackState = enum_type_wrapper.EnumTypeWrapper(_CALLBACKSTATE) -_PENDINGNEXUSOPERATIONSTATE = DESCRIPTOR.enum_types_by_name[ - "PendingNexusOperationState" -] -PendingNexusOperationState = enum_type_wrapper.EnumTypeWrapper( - _PENDINGNEXUSOPERATIONSTATE -) -_NEXUSOPERATIONCANCELLATIONSTATE = DESCRIPTOR.enum_types_by_name[ - "NexusOperationCancellationState" -] -NexusOperationCancellationState = enum_type_wrapper.EnumTypeWrapper( - _NEXUSOPERATIONCANCELLATIONSTATE -) -_WORKFLOWRULEACTIONSCOPE = DESCRIPTOR.enum_types_by_name["WorkflowRuleActionScope"] -WorkflowRuleActionScope = enum_type_wrapper.EnumTypeWrapper(_WORKFLOWRULEACTIONSCOPE) -_APPLICATIONERRORCATEGORY = DESCRIPTOR.enum_types_by_name["ApplicationErrorCategory"] -ApplicationErrorCategory = enum_type_wrapper.EnumTypeWrapper(_APPLICATIONERRORCATEGORY) -_WORKERSTATUS = DESCRIPTOR.enum_types_by_name["WorkerStatus"] -WorkerStatus = enum_type_wrapper.EnumTypeWrapper(_WORKERSTATUS) -ENCODING_TYPE_UNSPECIFIED = 0 -ENCODING_TYPE_PROTO3 = 1 -ENCODING_TYPE_JSON = 2 -INDEXED_VALUE_TYPE_UNSPECIFIED = 0 -INDEXED_VALUE_TYPE_TEXT = 1 -INDEXED_VALUE_TYPE_KEYWORD = 2 -INDEXED_VALUE_TYPE_INT = 3 -INDEXED_VALUE_TYPE_DOUBLE = 4 -INDEXED_VALUE_TYPE_BOOL = 5 -INDEXED_VALUE_TYPE_DATETIME = 6 -INDEXED_VALUE_TYPE_KEYWORD_LIST = 7 -SEVERITY_UNSPECIFIED = 0 -SEVERITY_HIGH = 1 -SEVERITY_MEDIUM = 2 -SEVERITY_LOW = 3 -CALLBACK_STATE_UNSPECIFIED = 0 -CALLBACK_STATE_STANDBY = 1 -CALLBACK_STATE_SCHEDULED = 2 -CALLBACK_STATE_BACKING_OFF = 3 -CALLBACK_STATE_FAILED = 4 -CALLBACK_STATE_SUCCEEDED = 5 -CALLBACK_STATE_BLOCKED = 6 -PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED = 0 -PENDING_NEXUS_OPERATION_STATE_SCHEDULED = 1 -PENDING_NEXUS_OPERATION_STATE_BACKING_OFF = 2 -PENDING_NEXUS_OPERATION_STATE_STARTED = 3 -PENDING_NEXUS_OPERATION_STATE_BLOCKED = 4 -NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED = 0 -NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED = 1 -NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF = 2 -NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED = 3 -NEXUS_OPERATION_CANCELLATION_STATE_FAILED = 4 -NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT = 5 -NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED = 6 -WORKFLOW_RULE_ACTION_SCOPE_UNSPECIFIED = 0 -WORKFLOW_RULE_ACTION_SCOPE_WORKFLOW = 1 -WORKFLOW_RULE_ACTION_SCOPE_ACTIVITY = 2 -APPLICATION_ERROR_CATEGORY_UNSPECIFIED = 0 -APPLICATION_ERROR_CATEGORY_BENIGN = 1 -WORKER_STATUS_UNSPECIFIED = 0 -WORKER_STATUS_RUNNING = 1 -WORKER_STATUS_SHUTTING_DOWN = 2 -WORKER_STATUS_SHUTDOWN = 3 - - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.enums.v1B\013CommonProtoP\001Z!go.temporal.io/api/enums/v1;enums\252\002\027Temporalio.Api.Enums.V1\352\002\032Temporalio::Api::Enums::V1" @@ -111,4 +40,6 @@ _APPLICATIONERRORCATEGORY._serialized_end = 1659 _WORKERSTATUS._serialized_start = 1662 _WORKERSTATUS._serialized_end = 1795 + _EXECUTIONTYPE._serialized_start = 1798 + _EXECUTIONTYPE._serialized_end = 1939 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/enums/v1/common_pb2.pyi b/temporalio/api/enums/v1/common_pb2.pyi index 47e4702955..0189b93c27 100644 --- a/temporalio/api/enums/v1/common_pb2.pyi +++ b/temporalio/api/enums/v1/common_pb2.pyi @@ -26,7 +26,7 @@ class _EncodingTypeEnumTypeWrapper( _EncodingType.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor ENCODING_TYPE_UNSPECIFIED: _EncodingType.ValueType # 0 ENCODING_TYPE_PROTO3: _EncodingType.ValueType # 1 @@ -48,7 +48,7 @@ class _IndexedValueTypeEnumTypeWrapper( _IndexedValueType.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor INDEXED_VALUE_TYPE_UNSPECIFIED: _IndexedValueType.ValueType # 0 INDEXED_VALUE_TYPE_TEXT: _IndexedValueType.ValueType # 1 @@ -80,7 +80,7 @@ class _Severity: class _SeverityEnumTypeWrapper( google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Severity.ValueType], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor SEVERITY_UNSPECIFIED: _Severity.ValueType # 0 SEVERITY_HIGH: _Severity.ValueType # 1 @@ -104,7 +104,7 @@ class _CallbackStateEnumTypeWrapper( _CallbackState.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor CALLBACK_STATE_UNSPECIFIED: _CallbackState.ValueType # 0 """Default value, unspecified state.""" @@ -119,7 +119,7 @@ class _CallbackStateEnumTypeWrapper( CALLBACK_STATE_SUCCEEDED: _CallbackState.ValueType # 5 """Callback has succeeded.""" CALLBACK_STATE_BLOCKED: _CallbackState.ValueType # 6 - """Callback is blocked (eg: by circuit breaker).""" + """Callback is blocked, e.g. by circuit breaker.""" class CallbackState(_CallbackState, metaclass=_CallbackStateEnumTypeWrapper): """State of a callback.""" @@ -137,7 +137,7 @@ CALLBACK_STATE_FAILED: CallbackState.ValueType # 4 CALLBACK_STATE_SUCCEEDED: CallbackState.ValueType # 5 """Callback has succeeded.""" CALLBACK_STATE_BLOCKED: CallbackState.ValueType # 6 -"""Callback is blocked (eg: by circuit breaker).""" +"""Callback is blocked, e.g. by circuit breaker.""" global___CallbackState = CallbackState class _PendingNexusOperationState: @@ -149,7 +149,7 @@ class _PendingNexusOperationStateEnumTypeWrapper( _PendingNexusOperationState.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED: ( _PendingNexusOperationState.ValueType @@ -192,7 +192,7 @@ class _NexusOperationCancellationStateEnumTypeWrapper( _NexusOperationCancellationState.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED: ( _NexusOperationCancellationState.ValueType @@ -268,7 +268,7 @@ class _WorkflowRuleActionScopeEnumTypeWrapper( _WorkflowRuleActionScope.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor WORKFLOW_RULE_ACTION_SCOPE_UNSPECIFIED: _WorkflowRuleActionScope.ValueType # 0 """Default value, unspecified scope.""" @@ -298,7 +298,7 @@ class _ApplicationErrorCategoryEnumTypeWrapper( _ApplicationErrorCategory.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor APPLICATION_ERROR_CATEGORY_UNSPECIFIED: _ApplicationErrorCategory.ValueType # 0 APPLICATION_ERROR_CATEGORY_BENIGN: _ApplicationErrorCategory.ValueType # 1 @@ -322,7 +322,7 @@ class _WorkerStatusEnumTypeWrapper( _WorkerStatus.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor WORKER_STATUS_UNSPECIFIED: _WorkerStatus.ValueType # 0 WORKER_STATUS_RUNNING: _WorkerStatus.ValueType # 1 @@ -339,3 +339,33 @@ WORKER_STATUS_RUNNING: WorkerStatus.ValueType # 1 WORKER_STATUS_SHUTTING_DOWN: WorkerStatus.ValueType # 2 WORKER_STATUS_SHUTDOWN: WorkerStatus.ValueType # 3 global___WorkerStatus = WorkerStatus + +class _ExecutionType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ExecutionTypeEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + _ExecutionType.ValueType + ], + builtins.type, +): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + EXECUTION_TYPE_UNSPECIFIED: _ExecutionType.ValueType # 0 + EXECUTION_TYPE_WORKFLOW: _ExecutionType.ValueType # 1 + """A workflow execution archetype.""" + EXECUTION_TYPE_ACTIVITY: _ExecutionType.ValueType # 2 + """An activity execution archetype. This is reserved for standalone activities.""" + EXECUTION_TYPE_NEXUS_OPERATION: _ExecutionType.ValueType # 3 + """A Nexus operation execution archetype. This is reserved for standalone Nexus operations.""" + +class ExecutionType(_ExecutionType, metaclass=_ExecutionTypeEnumTypeWrapper): ... + +EXECUTION_TYPE_UNSPECIFIED: ExecutionType.ValueType # 0 +EXECUTION_TYPE_WORKFLOW: ExecutionType.ValueType # 1 +"""A workflow execution archetype.""" +EXECUTION_TYPE_ACTIVITY: ExecutionType.ValueType # 2 +"""An activity execution archetype. This is reserved for standalone activities.""" +EXECUTION_TYPE_NEXUS_OPERATION: ExecutionType.ValueType # 3 +"""A Nexus operation execution archetype. This is reserved for standalone Nexus operations.""" +global___ExecutionType = ExecutionType diff --git a/temporalio/api/enums/v1/deployment_pb2.py b/temporalio/api/enums/v1/deployment_pb2.py index a4c5e00aae..ee2353bb6d 100644 --- a/temporalio/api/enums/v1/deployment_pb2.py +++ b/temporalio/api/enums/v1/deployment_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -16,39 +14,11 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b"\n&temporal/api/enums/v1/deployment.proto\x12\x15temporal.api.enums.v1*\xc4\x01\n\x16\x44\x65ploymentReachability\x12'\n#DEPLOYMENT_REACHABILITY_UNSPECIFIED\x10\x00\x12%\n!DEPLOYMENT_REACHABILITY_REACHABLE\x10\x01\x12\x31\n-DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY\x10\x02\x12'\n#DEPLOYMENT_REACHABILITY_UNREACHABLE\x10\x03*\x8b\x01\n\x15VersionDrainageStatus\x12'\n#VERSION_DRAINAGE_STATUS_UNSPECIFIED\x10\x00\x12$\n VERSION_DRAINAGE_STATUS_DRAINING\x10\x01\x12#\n\x1fVERSION_DRAINAGE_STATUS_DRAINED\x10\x02*\x8c\x01\n\x14WorkerVersioningMode\x12&\n\"WORKER_VERSIONING_MODE_UNSPECIFIED\x10\x00\x12&\n\"WORKER_VERSIONING_MODE_UNVERSIONED\x10\x01\x12$\n WORKER_VERSIONING_MODE_VERSIONED\x10\x02*\xb9\x02\n\x1dWorkerDeploymentVersionStatus\x12\x30\n,WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED\x10\x00\x12-\n)WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE\x10\x01\x12,\n(WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT\x10\x02\x12,\n(WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING\x10\x03\x12-\n)WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING\x10\x04\x12,\n(WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED\x10\x05\x42\x87\x01\n\x18io.temporal.api.enums.v1B\x0f\x44\x65ploymentProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" + b"\n&temporal/api/enums/v1/deployment.proto\x12\x15temporal.api.enums.v1*\xc4\x01\n\x16\x44\x65ploymentReachability\x12'\n#DEPLOYMENT_REACHABILITY_UNSPECIFIED\x10\x00\x12%\n!DEPLOYMENT_REACHABILITY_REACHABLE\x10\x01\x12\x31\n-DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY\x10\x02\x12'\n#DEPLOYMENT_REACHABILITY_UNREACHABLE\x10\x03*\x8b\x01\n\x15VersionDrainageStatus\x12'\n#VERSION_DRAINAGE_STATUS_UNSPECIFIED\x10\x00\x12$\n VERSION_DRAINAGE_STATUS_DRAINING\x10\x01\x12#\n\x1fVERSION_DRAINAGE_STATUS_DRAINED\x10\x02*\x8c\x01\n\x14WorkerVersioningMode\x12&\n\"WORKER_VERSIONING_MODE_UNSPECIFIED\x10\x00\x12&\n\"WORKER_VERSIONING_MODE_UNVERSIONED\x10\x01\x12$\n WORKER_VERSIONING_MODE_VERSIONED\x10\x02*\xe7\x02\n\x1dWorkerDeploymentVersionStatus\x12\x30\n,WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED\x10\x00\x12-\n)WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE\x10\x01\x12,\n(WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT\x10\x02\x12,\n(WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING\x10\x03\x12-\n)WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING\x10\x04\x12,\n(WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED\x10\x05\x12,\n(WORKER_DEPLOYMENT_VERSION_STATUS_CREATED\x10\x06\x42\x87\x01\n\x18io.temporal.api.enums.v1B\x0f\x44\x65ploymentProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" ) -_DEPLOYMENTREACHABILITY = DESCRIPTOR.enum_types_by_name["DeploymentReachability"] -DeploymentReachability = enum_type_wrapper.EnumTypeWrapper(_DEPLOYMENTREACHABILITY) -_VERSIONDRAINAGESTATUS = DESCRIPTOR.enum_types_by_name["VersionDrainageStatus"] -VersionDrainageStatus = enum_type_wrapper.EnumTypeWrapper(_VERSIONDRAINAGESTATUS) -_WORKERVERSIONINGMODE = DESCRIPTOR.enum_types_by_name["WorkerVersioningMode"] -WorkerVersioningMode = enum_type_wrapper.EnumTypeWrapper(_WORKERVERSIONINGMODE) -_WORKERDEPLOYMENTVERSIONSTATUS = DESCRIPTOR.enum_types_by_name[ - "WorkerDeploymentVersionStatus" -] -WorkerDeploymentVersionStatus = enum_type_wrapper.EnumTypeWrapper( - _WORKERDEPLOYMENTVERSIONSTATUS -) -DEPLOYMENT_REACHABILITY_UNSPECIFIED = 0 -DEPLOYMENT_REACHABILITY_REACHABLE = 1 -DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY = 2 -DEPLOYMENT_REACHABILITY_UNREACHABLE = 3 -VERSION_DRAINAGE_STATUS_UNSPECIFIED = 0 -VERSION_DRAINAGE_STATUS_DRAINING = 1 -VERSION_DRAINAGE_STATUS_DRAINED = 2 -WORKER_VERSIONING_MODE_UNSPECIFIED = 0 -WORKER_VERSIONING_MODE_UNVERSIONED = 1 -WORKER_VERSIONING_MODE_VERSIONED = 2 -WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED = 0 -WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE = 1 -WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT = 2 -WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING = 3 -WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING = 4 -WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED = 5 - - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.enums.v1B\017DeploymentProtoP\001Z!go.temporal.io/api/enums/v1;enums\252\002\027Temporalio.Api.Enums.V1\352\002\032Temporalio::Api::Enums::V1" @@ -59,5 +29,5 @@ _WORKERVERSIONINGMODE._serialized_start = 407 _WORKERVERSIONINGMODE._serialized_end = 547 _WORKERDEPLOYMENTVERSIONSTATUS._serialized_start = 550 - _WORKERDEPLOYMENTVERSIONSTATUS._serialized_end = 863 + _WORKERDEPLOYMENTVERSIONSTATUS._serialized_end = 909 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/enums/v1/deployment_pb2.pyi b/temporalio/api/enums/v1/deployment_pb2.pyi index 92074757c9..f0debc4e89 100644 --- a/temporalio/api/enums/v1/deployment_pb2.pyi +++ b/temporalio/api/enums/v1/deployment_pb2.pyi @@ -26,7 +26,7 @@ class _DeploymentReachabilityEnumTypeWrapper( _DeploymentReachability.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor DEPLOYMENT_REACHABILITY_UNSPECIFIED: _DeploymentReachability.ValueType # 0 """Reachability level is not specified.""" @@ -79,7 +79,7 @@ class _VersionDrainageStatusEnumTypeWrapper( _VersionDrainageStatus.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor VERSION_DRAINAGE_STATUS_UNSPECIFIED: _VersionDrainageStatus.ValueType # 0 """Drainage Status is not specified.""" @@ -101,7 +101,6 @@ class VersionDrainageStatus( aip.dev/not-precedent: Call this status because it is . --) Specify the drainage status for a Worker Deployment Version so users can decide whether they can safely decommission the version. - Experimental. Worker Deployments are experimental and might significantly change in the future. """ VERSION_DRAINAGE_STATUS_UNSPECIFIED: VersionDrainageStatus.ValueType # 0 @@ -127,7 +126,7 @@ class _WorkerVersioningModeEnumTypeWrapper( _WorkerVersioningMode.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor WORKER_VERSIONING_MODE_UNSPECIFIED: _WorkerVersioningMode.ValueType # 0 WORKER_VERSIONING_MODE_UNVERSIONED: _WorkerVersioningMode.ValueType # 1 @@ -160,7 +159,6 @@ class WorkerVersioningMode( - Whether or not Temporal Server considers this worker's version (Build ID) when dispatching tasks to it. - Whether or not the workflows processed by this worker are versioned using the worker's version. - Experimental. Worker Deployments are experimental and might significantly change in the future. """ WORKER_VERSIONING_MODE_UNSPECIFIED: WorkerVersioningMode.ValueType # 0 @@ -196,7 +194,7 @@ class _WorkerDeploymentVersionStatusEnumTypeWrapper( _WorkerDeploymentVersionStatus.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED: ( _WorkerDeploymentVersionStatus.ValueType @@ -234,6 +232,12 @@ class _WorkerDeploymentVersionStatusEnumTypeWrapper( not query closed workflows. If the user does query closed workflows for some time x after workflows are closed, they should decommission the version after it has been drained for that duration. """ + WORKER_DEPLOYMENT_VERSION_STATUS_CREATED: ( + _WorkerDeploymentVersionStatus.ValueType + ) # 6 + """The Worker Deployment Version is created by user (via `CreateWorkerDeploymentVersion` API) + but server has not seen any poller for it yet. + """ class WorkerDeploymentVersionStatus( _WorkerDeploymentVersionStatus, @@ -242,7 +246,6 @@ class WorkerDeploymentVersionStatus( """(-- api-linter: core::0216::synonyms=disabled aip.dev/not-precedent: Call this status because it is . --) Specify the status of a Worker Deployment Version. - Experimental. Worker Deployments are experimental and might significantly change in the future. """ WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED: ( @@ -271,4 +274,8 @@ Queries sent to closed workflows. The version can be decommissioned safely if us not query closed workflows. If the user does query closed workflows for some time x after workflows are closed, they should decommission the version after it has been drained for that duration. """ +WORKER_DEPLOYMENT_VERSION_STATUS_CREATED: WorkerDeploymentVersionStatus.ValueType # 6 +"""The Worker Deployment Version is created by user (via `CreateWorkerDeploymentVersion` API) +but server has not seen any poller for it yet. +""" global___WorkerDeploymentVersionStatus = WorkerDeploymentVersionStatus diff --git a/temporalio/api/enums/v1/event_type_pb2.py b/temporalio/api/enums/v1/event_type_pb2.py index f518097256..41f96b8486 100644 --- a/temporalio/api/enums/v1/event_type_pb2.py +++ b/temporalio/api/enums/v1/event_type_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -16,74 +14,14 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n&temporal/api/enums/v1/event_type.proto\x12\x15temporal.api.enums.v1*\x8a\x15\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12)\n%EVENT_TYPE_WORKFLOW_EXECUTION_STARTED\x10\x01\x12+\n\'EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED\x10\x02\x12(\n$EVENT_TYPE_WORKFLOW_EXECUTION_FAILED\x10\x03\x12+\n\'EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT\x10\x04\x12&\n"EVENT_TYPE_WORKFLOW_TASK_SCHEDULED\x10\x05\x12$\n EVENT_TYPE_WORKFLOW_TASK_STARTED\x10\x06\x12&\n"EVENT_TYPE_WORKFLOW_TASK_COMPLETED\x10\x07\x12&\n"EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT\x10\x08\x12#\n\x1f\x45VENT_TYPE_WORKFLOW_TASK_FAILED\x10\t\x12&\n"EVENT_TYPE_ACTIVITY_TASK_SCHEDULED\x10\n\x12$\n EVENT_TYPE_ACTIVITY_TASK_STARTED\x10\x0b\x12&\n"EVENT_TYPE_ACTIVITY_TASK_COMPLETED\x10\x0c\x12#\n\x1f\x45VENT_TYPE_ACTIVITY_TASK_FAILED\x10\r\x12&\n"EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT\x10\x0e\x12-\n)EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED\x10\x0f\x12%\n!EVENT_TYPE_ACTIVITY_TASK_CANCELED\x10\x10\x12\x1c\n\x18\x45VENT_TYPE_TIMER_STARTED\x10\x11\x12\x1a\n\x16\x45VENT_TYPE_TIMER_FIRED\x10\x12\x12\x1d\n\x19\x45VENT_TYPE_TIMER_CANCELED\x10\x13\x12\x32\n.EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED\x10\x14\x12*\n&EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED\x10\x15\x12\x43\n?EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED\x10\x16\x12@\n= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _FastForwardPollingResult: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _FastForwardPollingResultEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + _FastForwardPollingResult.ValueType + ], + builtins.type, +): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + FAST_FORWARD_POLLING_RESULT_UNSPECIFIED: _FastForwardPollingResult.ValueType # 0 + """Never returned; guards against an unset result.""" + FAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT: _FastForwardPollingResult.ValueType # 1 + """The poll timed out server-side before the fast-forward completed. The caller may poll again.""" + FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED: ( + _FastForwardPollingResult.ValueType + ) # 2 + """The fast-forward identified by the request's `fast_forward_id` reached its target time and completed.""" + FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED: ( + _FastForwardPollingResult.ValueType + ) # 3 + """The fast-forward can no longer complete, which usually indicates improper usage of + fast-forward on the client side. Possible reasons: the `fast_forward_id` does not match + the execution's current fast-forward, the execution ended before the fast-forward + completed, the fast-forward config was updated while the poll was in flight, etc. + See `failed_reason` in the response for the specific cause. + """ + +class FastForwardPollingResult( + _FastForwardPollingResult, metaclass=_FastForwardPollingResultEnumTypeWrapper +): + """FastForwardPollingResult is the result of polling and waiting for a fast-forward to complete + on a time-skipping execution. + FAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT and FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED + are the normal poll outcomes; FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED means the + fast-forward can no longer complete. + """ + +FAST_FORWARD_POLLING_RESULT_UNSPECIFIED: FastForwardPollingResult.ValueType # 0 +"""Never returned; guards against an unset result.""" +FAST_FORWARD_POLLING_RESULT_POLL_TIMEOUT: FastForwardPollingResult.ValueType # 1 +"""The poll timed out server-side before the fast-forward completed. The caller may poll again.""" +FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED: ( + FastForwardPollingResult.ValueType +) # 2 +"""The fast-forward identified by the request's `fast_forward_id` reached its target time and completed.""" +FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED: FastForwardPollingResult.ValueType # 3 +"""The fast-forward can no longer complete, which usually indicates improper usage of +fast-forward on the client side. Possible reasons: the `fast_forward_id` does not match +the execution's current fast-forward, the execution ended before the fast-forward +completed, the fast-forward config was updated while the poll was in flight, etc. +See `failed_reason` in the response for the specific cause. +""" +global___FastForwardPollingResult = FastForwardPollingResult diff --git a/temporalio/api/enums/v1/update_pb2.py b/temporalio/api/enums/v1/update_pb2.py index fb92155526..8bcf7ad39d 100644 --- a/temporalio/api/enums/v1/update_pb2.py +++ b/temporalio/api/enums/v1/update_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -19,24 +17,8 @@ b'\n"temporal/api/enums/v1/update.proto\x12\x15temporal.api.enums.v1*\x8b\x02\n%UpdateWorkflowExecutionLifecycleStage\x12\x39\n5UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED\x10\x00\x12\x36\n2UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED\x10\x01\x12\x36\n2UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED\x10\x02\x12\x37\n3UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED\x10\x03*s\n\x19UpdateAdmittedEventOrigin\x12,\n(UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED\x10\x00\x12(\n$UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY\x10\x01\x42\x83\x01\n\x18io.temporal.api.enums.v1B\x0bUpdateProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3' ) -_UPDATEWORKFLOWEXECUTIONLIFECYCLESTAGE = DESCRIPTOR.enum_types_by_name[ - "UpdateWorkflowExecutionLifecycleStage" -] -UpdateWorkflowExecutionLifecycleStage = enum_type_wrapper.EnumTypeWrapper( - _UPDATEWORKFLOWEXECUTIONLIFECYCLESTAGE -) -_UPDATEADMITTEDEVENTORIGIN = DESCRIPTOR.enum_types_by_name["UpdateAdmittedEventOrigin"] -UpdateAdmittedEventOrigin = enum_type_wrapper.EnumTypeWrapper( - _UPDATEADMITTEDEVENTORIGIN -) -UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED = 0 -UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED = 1 -UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED = 2 -UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED = 3 -UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED = 0 -UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY = 1 - - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.enums.v1B\013UpdateProtoP\001Z!go.temporal.io/api/enums/v1;enums\252\002\027Temporalio.Api.Enums.V1\352\002\032Temporalio::Api::Enums::V1" diff --git a/temporalio/api/enums/v1/update_pb2.pyi b/temporalio/api/enums/v1/update_pb2.pyi index b6d694bd2a..0bea3a6b02 100644 --- a/temporalio/api/enums/v1/update_pb2.pyi +++ b/temporalio/api/enums/v1/update_pb2.pyi @@ -26,7 +26,7 @@ class _UpdateWorkflowExecutionLifecycleStageEnumTypeWrapper( _UpdateWorkflowExecutionLifecycleStage.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED: ( _UpdateWorkflowExecutionLifecycleStage.ValueType @@ -101,7 +101,7 @@ class _UpdateAdmittedEventOriginEnumTypeWrapper( _UpdateAdmittedEventOrigin.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED: _UpdateAdmittedEventOrigin.ValueType # 0 UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY: _UpdateAdmittedEventOrigin.ValueType # 1 diff --git a/temporalio/api/enums/v1/workflow_pb2.py b/temporalio/api/enums/v1/workflow_pb2.py index 03600d3451..be829ba704 100644 --- a/temporalio/api/enums/v1/workflow_pb2.py +++ b/temporalio/api/enums/v1/workflow_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -16,109 +14,44 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b"\n$temporal/api/enums/v1/workflow.proto\x12\x15temporal.api.enums.v1*\x8b\x02\n\x15WorkflowIdReusePolicy\x12(\n$WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED\x10\x00\x12,\n(WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE\x10\x01\x12\x38\n4WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY\x10\x02\x12-\n)WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE\x10\x03\x12\x31\n-WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING\x10\x04*\xcf\x01\n\x18WorkflowIdConflictPolicy\x12+\n'WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED\x10\x00\x12$\n WORKFLOW_ID_CONFLICT_POLICY_FAIL\x10\x01\x12,\n(WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING\x10\x02\x12\x32\n.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING\x10\x03*\xa4\x01\n\x11ParentClosePolicy\x12#\n\x1fPARENT_CLOSE_POLICY_UNSPECIFIED\x10\x00\x12!\n\x1dPARENT_CLOSE_POLICY_TERMINATE\x10\x01\x12\x1f\n\x1bPARENT_CLOSE_POLICY_ABANDON\x10\x02\x12&\n\"PARENT_CLOSE_POLICY_REQUEST_CANCEL\x10\x03*\xbd\x01\n\x16\x43ontinueAsNewInitiator\x12)\n%CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED\x10\x00\x12&\n\"CONTINUE_AS_NEW_INITIATOR_WORKFLOW\x10\x01\x12#\n\x1f\x43ONTINUE_AS_NEW_INITIATOR_RETRY\x10\x02\x12+\n'CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE\x10\x03*\xe5\x02\n\x17WorkflowExecutionStatus\x12)\n%WORKFLOW_EXECUTION_STATUS_UNSPECIFIED\x10\x00\x12%\n!WORKFLOW_EXECUTION_STATUS_RUNNING\x10\x01\x12'\n#WORKFLOW_EXECUTION_STATUS_COMPLETED\x10\x02\x12$\n WORKFLOW_EXECUTION_STATUS_FAILED\x10\x03\x12&\n\"WORKFLOW_EXECUTION_STATUS_CANCELED\x10\x04\x12(\n$WORKFLOW_EXECUTION_STATUS_TERMINATED\x10\x05\x12.\n*WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW\x10\x06\x12'\n#WORKFLOW_EXECUTION_STATUS_TIMED_OUT\x10\x07*\x84\x02\n\x14PendingActivityState\x12&\n\"PENDING_ACTIVITY_STATE_UNSPECIFIED\x10\x00\x12$\n PENDING_ACTIVITY_STATE_SCHEDULED\x10\x01\x12\"\n\x1ePENDING_ACTIVITY_STATE_STARTED\x10\x02\x12+\n'PENDING_ACTIVITY_STATE_CANCEL_REQUESTED\x10\x03\x12!\n\x1dPENDING_ACTIVITY_STATE_PAUSED\x10\x04\x12*\n&PENDING_ACTIVITY_STATE_PAUSE_REQUESTED\x10\x05*\x9b\x01\n\x18PendingWorkflowTaskState\x12+\n'PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED\x10\x00\x12)\n%PENDING_WORKFLOW_TASK_STATE_SCHEDULED\x10\x01\x12'\n#PENDING_WORKFLOW_TASK_STATE_STARTED\x10\x02*\x97\x01\n\x16HistoryEventFilterType\x12)\n%HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED\x10\x00\x12'\n#HISTORY_EVENT_FILTER_TYPE_ALL_EVENT\x10\x01\x12)\n%HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT\x10\x02*\x9f\x02\n\nRetryState\x12\x1b\n\x17RETRY_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17RETRY_STATE_IN_PROGRESS\x10\x01\x12%\n!RETRY_STATE_NON_RETRYABLE_FAILURE\x10\x02\x12\x17\n\x13RETRY_STATE_TIMEOUT\x10\x03\x12(\n$RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED\x10\x04\x12$\n RETRY_STATE_RETRY_POLICY_NOT_SET\x10\x05\x12%\n!RETRY_STATE_INTERNAL_SERVER_ERROR\x10\x06\x12 \n\x1cRETRY_STATE_CANCEL_REQUESTED\x10\x07*\xb0\x01\n\x0bTimeoutType\x12\x1c\n\x18TIMEOUT_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bTIMEOUT_TYPE_START_TO_CLOSE\x10\x01\x12\"\n\x1eTIMEOUT_TYPE_SCHEDULE_TO_START\x10\x02\x12\"\n\x1eTIMEOUT_TYPE_SCHEDULE_TO_CLOSE\x10\x03\x12\x1a\n\x16TIMEOUT_TYPE_HEARTBEAT\x10\x04*\x7f\n\x12VersioningBehavior\x12#\n\x1fVERSIONING_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x1e\n\x1aVERSIONING_BEHAVIOR_PINNED\x10\x01\x12$\n VERSIONING_BEHAVIOR_AUTO_UPGRADE\x10\x02\x42\x85\x01\n\x18io.temporal.api.enums.v1B\rWorkflowProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" + b"\n$temporal/api/enums/v1/workflow.proto\x12\x15temporal.api.enums.v1*\x8f\x02\n\x15WorkflowIdReusePolicy\x12(\n$WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED\x10\x00\x12,\n(WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE\x10\x01\x12\x38\n4WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY\x10\x02\x12-\n)WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE\x10\x03\x12\x35\n-WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING\x10\x04\x1a\x02\x08\x01*\xcf\x01\n\x18WorkflowIdConflictPolicy\x12+\n'WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED\x10\x00\x12$\n WORKFLOW_ID_CONFLICT_POLICY_FAIL\x10\x01\x12,\n(WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING\x10\x02\x12\x32\n.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING\x10\x03*\xa4\x01\n\x11ParentClosePolicy\x12#\n\x1fPARENT_CLOSE_POLICY_UNSPECIFIED\x10\x00\x12!\n\x1dPARENT_CLOSE_POLICY_TERMINATE\x10\x01\x12\x1f\n\x1bPARENT_CLOSE_POLICY_ABANDON\x10\x02\x12&\n\"PARENT_CLOSE_POLICY_REQUEST_CANCEL\x10\x03*\xbd\x01\n\x16\x43ontinueAsNewInitiator\x12)\n%CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED\x10\x00\x12&\n\"CONTINUE_AS_NEW_INITIATOR_WORKFLOW\x10\x01\x12#\n\x1f\x43ONTINUE_AS_NEW_INITIATOR_RETRY\x10\x02\x12+\n'CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE\x10\x03*\x8b\x03\n\x17WorkflowExecutionStatus\x12)\n%WORKFLOW_EXECUTION_STATUS_UNSPECIFIED\x10\x00\x12%\n!WORKFLOW_EXECUTION_STATUS_RUNNING\x10\x01\x12'\n#WORKFLOW_EXECUTION_STATUS_COMPLETED\x10\x02\x12$\n WORKFLOW_EXECUTION_STATUS_FAILED\x10\x03\x12&\n\"WORKFLOW_EXECUTION_STATUS_CANCELED\x10\x04\x12(\n$WORKFLOW_EXECUTION_STATUS_TERMINATED\x10\x05\x12.\n*WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW\x10\x06\x12'\n#WORKFLOW_EXECUTION_STATUS_TIMED_OUT\x10\x07\x12$\n WORKFLOW_EXECUTION_STATUS_PAUSED\x10\x08*\x84\x02\n\x14PendingActivityState\x12&\n\"PENDING_ACTIVITY_STATE_UNSPECIFIED\x10\x00\x12$\n PENDING_ACTIVITY_STATE_SCHEDULED\x10\x01\x12\"\n\x1ePENDING_ACTIVITY_STATE_STARTED\x10\x02\x12+\n'PENDING_ACTIVITY_STATE_CANCEL_REQUESTED\x10\x03\x12!\n\x1dPENDING_ACTIVITY_STATE_PAUSED\x10\x04\x12*\n&PENDING_ACTIVITY_STATE_PAUSE_REQUESTED\x10\x05*\x9b\x01\n\x18PendingWorkflowTaskState\x12+\n'PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED\x10\x00\x12)\n%PENDING_WORKFLOW_TASK_STATE_SCHEDULED\x10\x01\x12'\n#PENDING_WORKFLOW_TASK_STATE_STARTED\x10\x02*\x97\x01\n\x16HistoryEventFilterType\x12)\n%HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED\x10\x00\x12'\n#HISTORY_EVENT_FILTER_TYPE_ALL_EVENT\x10\x01\x12)\n%HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT\x10\x02*\x9f\x02\n\nRetryState\x12\x1b\n\x17RETRY_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17RETRY_STATE_IN_PROGRESS\x10\x01\x12%\n!RETRY_STATE_NON_RETRYABLE_FAILURE\x10\x02\x12\x17\n\x13RETRY_STATE_TIMEOUT\x10\x03\x12(\n$RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED\x10\x04\x12$\n RETRY_STATE_RETRY_POLICY_NOT_SET\x10\x05\x12%\n!RETRY_STATE_INTERNAL_SERVER_ERROR\x10\x06\x12 \n\x1cRETRY_STATE_CANCEL_REQUESTED\x10\x07*\xb0\x01\n\x0bTimeoutType\x12\x1c\n\x18TIMEOUT_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bTIMEOUT_TYPE_START_TO_CLOSE\x10\x01\x12\"\n\x1eTIMEOUT_TYPE_SCHEDULE_TO_START\x10\x02\x12\"\n\x1eTIMEOUT_TYPE_SCHEDULE_TO_CLOSE\x10\x03\x12\x1a\n\x16TIMEOUT_TYPE_HEARTBEAT\x10\x04*\x7f\n\x12VersioningBehavior\x12#\n\x1fVERSIONING_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x1e\n\x1aVERSIONING_BEHAVIOR_PINNED\x10\x01\x12$\n VERSIONING_BEHAVIOR_AUTO_UPGRADE\x10\x02*\xc9\x01\n\x1f\x43ontinueAsNewVersioningBehavior\x12\x33\n/CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x34\n0CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE\x10\x01\x12;\n7CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION\x10\x02*\xc7\x02\n\x1aSuggestContinueAsNewReason\x12.\n*SUGGEST_CONTINUE_AS_NEW_REASON_UNSPECIFIED\x10\x00\x12\x39\n5SUGGEST_CONTINUE_AS_NEW_REASON_HISTORY_SIZE_TOO_LARGE\x10\x01\x12:\n6SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_HISTORY_EVENTS\x10\x02\x12\x33\n/SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES\x10\x03\"\x04\x08\x04\x10\x04*GSUGGEST_CONTINUE_AS_NEW_REASON_TARGET_WORKER_DEPLOYMENT_VERSION_CHANGEDB\x85\x01\n\x18io.temporal.api.enums.v1B\rWorkflowProtoP\x01Z!go.temporal.io/api/enums/v1;enums\xaa\x02\x17Temporalio.Api.Enums.V1\xea\x02\x1aTemporalio::Api::Enums::V1b\x06proto3" ) -_WORKFLOWIDREUSEPOLICY = DESCRIPTOR.enum_types_by_name["WorkflowIdReusePolicy"] -WorkflowIdReusePolicy = enum_type_wrapper.EnumTypeWrapper(_WORKFLOWIDREUSEPOLICY) -_WORKFLOWIDCONFLICTPOLICY = DESCRIPTOR.enum_types_by_name["WorkflowIdConflictPolicy"] -WorkflowIdConflictPolicy = enum_type_wrapper.EnumTypeWrapper(_WORKFLOWIDCONFLICTPOLICY) -_PARENTCLOSEPOLICY = DESCRIPTOR.enum_types_by_name["ParentClosePolicy"] -ParentClosePolicy = enum_type_wrapper.EnumTypeWrapper(_PARENTCLOSEPOLICY) -_CONTINUEASNEWINITIATOR = DESCRIPTOR.enum_types_by_name["ContinueAsNewInitiator"] -ContinueAsNewInitiator = enum_type_wrapper.EnumTypeWrapper(_CONTINUEASNEWINITIATOR) -_WORKFLOWEXECUTIONSTATUS = DESCRIPTOR.enum_types_by_name["WorkflowExecutionStatus"] -WorkflowExecutionStatus = enum_type_wrapper.EnumTypeWrapper(_WORKFLOWEXECUTIONSTATUS) -_PENDINGACTIVITYSTATE = DESCRIPTOR.enum_types_by_name["PendingActivityState"] -PendingActivityState = enum_type_wrapper.EnumTypeWrapper(_PENDINGACTIVITYSTATE) -_PENDINGWORKFLOWTASKSTATE = DESCRIPTOR.enum_types_by_name["PendingWorkflowTaskState"] -PendingWorkflowTaskState = enum_type_wrapper.EnumTypeWrapper(_PENDINGWORKFLOWTASKSTATE) -_HISTORYEVENTFILTERTYPE = DESCRIPTOR.enum_types_by_name["HistoryEventFilterType"] -HistoryEventFilterType = enum_type_wrapper.EnumTypeWrapper(_HISTORYEVENTFILTERTYPE) -_RETRYSTATE = DESCRIPTOR.enum_types_by_name["RetryState"] -RetryState = enum_type_wrapper.EnumTypeWrapper(_RETRYSTATE) -_TIMEOUTTYPE = DESCRIPTOR.enum_types_by_name["TimeoutType"] -TimeoutType = enum_type_wrapper.EnumTypeWrapper(_TIMEOUTTYPE) -_VERSIONINGBEHAVIOR = DESCRIPTOR.enum_types_by_name["VersioningBehavior"] -VersioningBehavior = enum_type_wrapper.EnumTypeWrapper(_VERSIONINGBEHAVIOR) -WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED = 0 -WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE = 1 -WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY = 2 -WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE = 3 -WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING = 4 -WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED = 0 -WORKFLOW_ID_CONFLICT_POLICY_FAIL = 1 -WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING = 2 -WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING = 3 -PARENT_CLOSE_POLICY_UNSPECIFIED = 0 -PARENT_CLOSE_POLICY_TERMINATE = 1 -PARENT_CLOSE_POLICY_ABANDON = 2 -PARENT_CLOSE_POLICY_REQUEST_CANCEL = 3 -CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED = 0 -CONTINUE_AS_NEW_INITIATOR_WORKFLOW = 1 -CONTINUE_AS_NEW_INITIATOR_RETRY = 2 -CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE = 3 -WORKFLOW_EXECUTION_STATUS_UNSPECIFIED = 0 -WORKFLOW_EXECUTION_STATUS_RUNNING = 1 -WORKFLOW_EXECUTION_STATUS_COMPLETED = 2 -WORKFLOW_EXECUTION_STATUS_FAILED = 3 -WORKFLOW_EXECUTION_STATUS_CANCELED = 4 -WORKFLOW_EXECUTION_STATUS_TERMINATED = 5 -WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW = 6 -WORKFLOW_EXECUTION_STATUS_TIMED_OUT = 7 -PENDING_ACTIVITY_STATE_UNSPECIFIED = 0 -PENDING_ACTIVITY_STATE_SCHEDULED = 1 -PENDING_ACTIVITY_STATE_STARTED = 2 -PENDING_ACTIVITY_STATE_CANCEL_REQUESTED = 3 -PENDING_ACTIVITY_STATE_PAUSED = 4 -PENDING_ACTIVITY_STATE_PAUSE_REQUESTED = 5 -PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED = 0 -PENDING_WORKFLOW_TASK_STATE_SCHEDULED = 1 -PENDING_WORKFLOW_TASK_STATE_STARTED = 2 -HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED = 0 -HISTORY_EVENT_FILTER_TYPE_ALL_EVENT = 1 -HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT = 2 -RETRY_STATE_UNSPECIFIED = 0 -RETRY_STATE_IN_PROGRESS = 1 -RETRY_STATE_NON_RETRYABLE_FAILURE = 2 -RETRY_STATE_TIMEOUT = 3 -RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED = 4 -RETRY_STATE_RETRY_POLICY_NOT_SET = 5 -RETRY_STATE_INTERNAL_SERVER_ERROR = 6 -RETRY_STATE_CANCEL_REQUESTED = 7 -TIMEOUT_TYPE_UNSPECIFIED = 0 -TIMEOUT_TYPE_START_TO_CLOSE = 1 -TIMEOUT_TYPE_SCHEDULE_TO_START = 2 -TIMEOUT_TYPE_SCHEDULE_TO_CLOSE = 3 -TIMEOUT_TYPE_HEARTBEAT = 4 -VERSIONING_BEHAVIOR_UNSPECIFIED = 0 -VERSIONING_BEHAVIOR_PINNED = 1 -VERSIONING_BEHAVIOR_AUTO_UPGRADE = 2 - - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.enums.v1B\rWorkflowProtoP\001Z!go.temporal.io/api/enums/v1;enums\252\002\027Temporalio.Api.Enums.V1\352\002\032Temporalio::Api::Enums::V1" + _WORKFLOWIDREUSEPOLICY.values_by_name[ + "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING" + ]._options = None + _WORKFLOWIDREUSEPOLICY.values_by_name[ + "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING" + ]._serialized_options = b"\010\001" _WORKFLOWIDREUSEPOLICY._serialized_start = 64 - _WORKFLOWIDREUSEPOLICY._serialized_end = 331 - _WORKFLOWIDCONFLICTPOLICY._serialized_start = 334 - _WORKFLOWIDCONFLICTPOLICY._serialized_end = 541 - _PARENTCLOSEPOLICY._serialized_start = 544 - _PARENTCLOSEPOLICY._serialized_end = 708 - _CONTINUEASNEWINITIATOR._serialized_start = 711 - _CONTINUEASNEWINITIATOR._serialized_end = 900 - _WORKFLOWEXECUTIONSTATUS._serialized_start = 903 - _WORKFLOWEXECUTIONSTATUS._serialized_end = 1260 - _PENDINGACTIVITYSTATE._serialized_start = 1263 - _PENDINGACTIVITYSTATE._serialized_end = 1523 - _PENDINGWORKFLOWTASKSTATE._serialized_start = 1526 - _PENDINGWORKFLOWTASKSTATE._serialized_end = 1681 - _HISTORYEVENTFILTERTYPE._serialized_start = 1684 - _HISTORYEVENTFILTERTYPE._serialized_end = 1835 - _RETRYSTATE._serialized_start = 1838 - _RETRYSTATE._serialized_end = 2125 - _TIMEOUTTYPE._serialized_start = 2128 - _TIMEOUTTYPE._serialized_end = 2304 - _VERSIONINGBEHAVIOR._serialized_start = 2306 - _VERSIONINGBEHAVIOR._serialized_end = 2433 + _WORKFLOWIDREUSEPOLICY._serialized_end = 335 + _WORKFLOWIDCONFLICTPOLICY._serialized_start = 338 + _WORKFLOWIDCONFLICTPOLICY._serialized_end = 545 + _PARENTCLOSEPOLICY._serialized_start = 548 + _PARENTCLOSEPOLICY._serialized_end = 712 + _CONTINUEASNEWINITIATOR._serialized_start = 715 + _CONTINUEASNEWINITIATOR._serialized_end = 904 + _WORKFLOWEXECUTIONSTATUS._serialized_start = 907 + _WORKFLOWEXECUTIONSTATUS._serialized_end = 1302 + _PENDINGACTIVITYSTATE._serialized_start = 1305 + _PENDINGACTIVITYSTATE._serialized_end = 1565 + _PENDINGWORKFLOWTASKSTATE._serialized_start = 1568 + _PENDINGWORKFLOWTASKSTATE._serialized_end = 1723 + _HISTORYEVENTFILTERTYPE._serialized_start = 1726 + _HISTORYEVENTFILTERTYPE._serialized_end = 1877 + _RETRYSTATE._serialized_start = 1880 + _RETRYSTATE._serialized_end = 2167 + _TIMEOUTTYPE._serialized_start = 2170 + _TIMEOUTTYPE._serialized_end = 2346 + _VERSIONINGBEHAVIOR._serialized_start = 2348 + _VERSIONINGBEHAVIOR._serialized_end = 2475 + _CONTINUEASNEWVERSIONINGBEHAVIOR._serialized_start = 2478 + _CONTINUEASNEWVERSIONINGBEHAVIOR._serialized_end = 2679 + _SUGGESTCONTINUEASNEWREASON._serialized_start = 2682 + _SUGGESTCONTINUEASNEWREASON._serialized_end = 3009 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/enums/v1/workflow_pb2.pyi b/temporalio/api/enums/v1/workflow_pb2.pyi index 516bdce567..a6f66c5b1b 100644 --- a/temporalio/api/enums/v1/workflow_pb2.pyi +++ b/temporalio/api/enums/v1/workflow_pb2.pyi @@ -26,7 +26,7 @@ class _WorkflowIdReusePolicyEnumTypeWrapper( _WorkflowIdReusePolicy.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED: _WorkflowIdReusePolicy.ValueType # 0 WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: _WorkflowIdReusePolicy.ValueType # 1 @@ -42,10 +42,12 @@ class _WorkflowIdReusePolicyEnumTypeWrapper( could potentially change the policy, allowing re-use of the workflow id. """ WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: _WorkflowIdReusePolicy.ValueType # 4 - """This option belongs in WorkflowIdConflictPolicy but is here for backwards compatibility. - If specified, it acts like ALLOW_DUPLICATE, but also the WorkflowId*Conflict*Policy on - the request is treated as WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING. - If no running workflow, then the behavior is the same as ALLOW_DUPLICATE. + """Terminate the current Workflow if one is already running; otherwise allow reusing the + Workflow ID. When using this option, `WorkflowIdConflictPolicy` must be left unspecified. + + Deprecated. Instead, set `WorkflowIdReusePolicy` to `ALLOW_DUPLICATE` and + `WorkflowIdConflictPolicy` to `TERMINATE_EXISTING`. Note that `WorkflowIdConflictPolicy` + requires Temporal Server v1.24.0 or later. """ class WorkflowIdReusePolicy( @@ -71,10 +73,12 @@ WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: WorkflowIdReusePolicy.ValueType # 3 could potentially change the policy, allowing re-use of the workflow id. """ WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: WorkflowIdReusePolicy.ValueType # 4 -"""This option belongs in WorkflowIdConflictPolicy but is here for backwards compatibility. -If specified, it acts like ALLOW_DUPLICATE, but also the WorkflowId*Conflict*Policy on -the request is treated as WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING. -If no running workflow, then the behavior is the same as ALLOW_DUPLICATE. +"""Terminate the current Workflow if one is already running; otherwise allow reusing the +Workflow ID. When using this option, `WorkflowIdConflictPolicy` must be left unspecified. + +Deprecated. Instead, set `WorkflowIdReusePolicy` to `ALLOW_DUPLICATE` and +`WorkflowIdConflictPolicy` to `TERMINATE_EXISTING`. Note that `WorkflowIdConflictPolicy` +requires Temporal Server v1.24.0 or later. """ global___WorkflowIdReusePolicy = WorkflowIdReusePolicy @@ -87,7 +91,7 @@ class _WorkflowIdConflictPolicyEnumTypeWrapper( _WorkflowIdConflictPolicy.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED: _WorkflowIdConflictPolicy.ValueType # 0 WORKFLOW_ID_CONFLICT_POLICY_FAIL: _WorkflowIdConflictPolicy.ValueType # 1 @@ -126,7 +130,7 @@ class _ParentClosePolicyEnumTypeWrapper( _ParentClosePolicy.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor PARENT_CLOSE_POLICY_UNSPECIFIED: _ParentClosePolicy.ValueType # 0 PARENT_CLOSE_POLICY_TERMINATE: _ParentClosePolicy.ValueType # 1 @@ -159,7 +163,7 @@ class _ContinueAsNewInitiatorEnumTypeWrapper( _ContinueAsNewInitiator.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED: _ContinueAsNewInitiator.ValueType # 0 CONTINUE_AS_NEW_INITIATOR_WORKFLOW: _ContinueAsNewInitiator.ValueType # 1 @@ -191,7 +195,7 @@ class _WorkflowExecutionStatusEnumTypeWrapper( _WorkflowExecutionStatus.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor WORKFLOW_EXECUTION_STATUS_UNSPECIFIED: _WorkflowExecutionStatus.ValueType # 0 WORKFLOW_EXECUTION_STATUS_RUNNING: _WorkflowExecutionStatus.ValueType # 1 @@ -202,6 +206,7 @@ class _WorkflowExecutionStatusEnumTypeWrapper( WORKFLOW_EXECUTION_STATUS_TERMINATED: _WorkflowExecutionStatus.ValueType # 5 WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW: _WorkflowExecutionStatus.ValueType # 6 WORKFLOW_EXECUTION_STATUS_TIMED_OUT: _WorkflowExecutionStatus.ValueType # 7 + WORKFLOW_EXECUTION_STATUS_PAUSED: _WorkflowExecutionStatus.ValueType # 8 class WorkflowExecutionStatus( _WorkflowExecutionStatus, metaclass=_WorkflowExecutionStatusEnumTypeWrapper @@ -219,6 +224,7 @@ WORKFLOW_EXECUTION_STATUS_CANCELED: WorkflowExecutionStatus.ValueType # 4 WORKFLOW_EXECUTION_STATUS_TERMINATED: WorkflowExecutionStatus.ValueType # 5 WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW: WorkflowExecutionStatus.ValueType # 6 WORKFLOW_EXECUTION_STATUS_TIMED_OUT: WorkflowExecutionStatus.ValueType # 7 +WORKFLOW_EXECUTION_STATUS_PAUSED: WorkflowExecutionStatus.ValueType # 8 global___WorkflowExecutionStatus = WorkflowExecutionStatus class _PendingActivityState: @@ -230,7 +236,7 @@ class _PendingActivityStateEnumTypeWrapper( _PendingActivityState.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor PENDING_ACTIVITY_STATE_UNSPECIFIED: _PendingActivityState.ValueType # 0 PENDING_ACTIVITY_STATE_SCHEDULED: _PendingActivityState.ValueType # 1 @@ -264,7 +270,7 @@ class _PendingWorkflowTaskStateEnumTypeWrapper( _PendingWorkflowTaskState.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED: _PendingWorkflowTaskState.ValueType # 0 PENDING_WORKFLOW_TASK_STATE_SCHEDULED: _PendingWorkflowTaskState.ValueType # 1 @@ -288,7 +294,7 @@ class _HistoryEventFilterTypeEnumTypeWrapper( _HistoryEventFilterType.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED: _HistoryEventFilterType.ValueType # 0 HISTORY_EVENT_FILTER_TYPE_ALL_EVENT: _HistoryEventFilterType.ValueType # 1 @@ -310,7 +316,7 @@ class _RetryState: class _RetryStateEnumTypeWrapper( google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_RetryState.ValueType], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor RETRY_STATE_UNSPECIFIED: _RetryState.ValueType # 0 RETRY_STATE_IN_PROGRESS: _RetryState.ValueType # 1 @@ -340,7 +346,7 @@ class _TimeoutType: class _TimeoutTypeEnumTypeWrapper( google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_TimeoutType.ValueType], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor TIMEOUT_TYPE_UNSPECIFIED: _TimeoutType.ValueType # 0 TIMEOUT_TYPE_START_TO_CLOSE: _TimeoutType.ValueType # 1 @@ -366,7 +372,7 @@ class _VersioningBehaviorEnumTypeWrapper( _VersioningBehavior.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor VERSIONING_BEHAVIOR_UNSPECIFIED: _VersioningBehavior.ValueType # 0 """Workflow execution does not have a Versioning Behavior and is called Unversioned. This is the @@ -376,9 +382,15 @@ class _VersioningBehaviorEnumTypeWrapper( with Unversioned workflows. """ VERSIONING_BEHAVIOR_PINNED: _VersioningBehavior.ValueType # 1 - """Workflow will start on the Current Deployment Version of its Task Queue, and then - will be pinned to that same Deployment Version until completion (the Version that - this Workflow is pinned to is specified in `versioning_info.version`). + """Workflow will start on its Target Version and then will be pinned to that same Deployment + Version until completion (the Version that this Workflow is pinned to is specified in + `versioning_info.version` and is the Pinned Version of the Workflow). + + The workflow's Target Version is the Current Version of its Task Queue, or, if the + Task Queue has a Ramping Version with non-zero Ramp Percentage `P`, the workflow's Target + Version has a P% chance of being the Ramping Version. Whether a workflow falls into the + Ramping group depends on its Workflow ID and and the Ramp Percentage. + This behavior eliminates most of compatibility concerns users face when changing their code. Patching is not needed when pinned workflows code change. Can be overridden explicitly via `UpdateWorkflowExecutionOptions` API to move the @@ -389,8 +401,13 @@ class _VersioningBehaviorEnumTypeWrapper( task queue. """ VERSIONING_BEHAVIOR_AUTO_UPGRADE: _VersioningBehavior.ValueType # 2 - """Workflow will automatically move to the Current Deployment Version of its Task Queue when the - next workflow task is dispatched. + """Workflow will automatically move to its Target Version when the next workflow task is dispatched. + + The workflow's Target Version is the Current Version of its Task Queue, or, if the + Task Queue has a Ramping Version with non-zero Ramp Percentage `P`, the workflow's Target + Version has a P% chance of being the Ramping Version. Whether a workflow falls into the + Ramping group depends on its Workflow ID and and the Ramp Percentage. + AutoUpgrade behavior is suitable for long-running workflows as it allows them to move to the latest Deployment Version, but the user still needs to use Patching to keep the new code compatible with prior versions for changed workflow types. @@ -398,11 +415,10 @@ class _VersioningBehaviorEnumTypeWrapper( execution (as specified in versioning_info.version based on the last completed workflow task). Exception to this would be when the activity Task Queue workers are not present in the workflow's Deployment Version, in which case, the activity will be sent to a - different Deployment Version according to the Current Deployment Version of its own task - queue. - Workflows stuck on a backlogged activity will still auto-upgrade if the Current Deployment - Version of their Task Queue changes, without having to wait for the backlogged activity to - complete on the old Version. + different Deployment Version according to the Current or Ramping Deployment Version of its own + Task Queue. + Workflows stuck on a backlogged activity will still auto-upgrade if their Target Version + changes, without having to wait for the backlogged activity to complete on the old Version. """ class VersioningBehavior( @@ -412,7 +428,6 @@ class VersioningBehavior( Versions. The Versioning Behavior of a workflow execution is typically specified by the worker who completes the first task of the execution, but is also overridable manually for new and existing workflows (see VersioningOverride). - Experimental. Worker Deployments are experimental and might significantly change in the future. """ VERSIONING_BEHAVIOR_UNSPECIFIED: VersioningBehavior.ValueType # 0 @@ -423,9 +438,15 @@ User needs to use Patching to keep the new code compatible with prior versions w with Unversioned workflows. """ VERSIONING_BEHAVIOR_PINNED: VersioningBehavior.ValueType # 1 -"""Workflow will start on the Current Deployment Version of its Task Queue, and then -will be pinned to that same Deployment Version until completion (the Version that -this Workflow is pinned to is specified in `versioning_info.version`). +"""Workflow will start on its Target Version and then will be pinned to that same Deployment +Version until completion (the Version that this Workflow is pinned to is specified in +`versioning_info.version` and is the Pinned Version of the Workflow). + +The workflow's Target Version is the Current Version of its Task Queue, or, if the +Task Queue has a Ramping Version with non-zero Ramp Percentage `P`, the workflow's Target +Version has a P% chance of being the Ramping Version. Whether a workflow falls into the +Ramping group depends on its Workflow ID and and the Ramp Percentage. + This behavior eliminates most of compatibility concerns users face when changing their code. Patching is not needed when pinned workflows code change. Can be overridden explicitly via `UpdateWorkflowExecutionOptions` API to move the @@ -436,8 +457,13 @@ Version, in which case the activity will be sent to the Current Deployment Versi task queue. """ VERSIONING_BEHAVIOR_AUTO_UPGRADE: VersioningBehavior.ValueType # 2 -"""Workflow will automatically move to the Current Deployment Version of its Task Queue when the -next workflow task is dispatched. +"""Workflow will automatically move to its Target Version when the next workflow task is dispatched. + +The workflow's Target Version is the Current Version of its Task Queue, or, if the +Task Queue has a Ramping Version with non-zero Ramp Percentage `P`, the workflow's Target +Version has a P% chance of being the Ramping Version. Whether a workflow falls into the +Ramping group depends on its Workflow ID and and the Ramp Percentage. + AutoUpgrade behavior is suitable for long-running workflows as it allows them to move to the latest Deployment Version, but the user still needs to use Patching to keep the new code compatible with prior versions for changed workflow types. @@ -445,10 +471,142 @@ Activities of `AUTO_UPGRADE` workflows are sent to the Deployment Version of the execution (as specified in versioning_info.version based on the last completed workflow task). Exception to this would be when the activity Task Queue workers are not present in the workflow's Deployment Version, in which case, the activity will be sent to a -different Deployment Version according to the Current Deployment Version of its own task -queue. -Workflows stuck on a backlogged activity will still auto-upgrade if the Current Deployment -Version of their Task Queue changes, without having to wait for the backlogged activity to -complete on the old Version. +different Deployment Version according to the Current or Ramping Deployment Version of its own +Task Queue. +Workflows stuck on a backlogged activity will still auto-upgrade if their Target Version +changes, without having to wait for the backlogged activity to complete on the old Version. """ global___VersioningBehavior = VersioningBehavior + +class _ContinueAsNewVersioningBehavior: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ContinueAsNewVersioningBehaviorEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + _ContinueAsNewVersioningBehavior.ValueType + ], + builtins.type, +): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED: ( + _ContinueAsNewVersioningBehavior.ValueType + ) # 0 + CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: ( + _ContinueAsNewVersioningBehavior.ValueType + ) # 1 + """Experimental. + Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at + start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever + Versioning Behavior the workflow is annotated with in the workflow code. + + Note that if the workflow being continued has a Pinned override, that override will be inherited by the + new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new + command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. + """ + CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: ( + _ContinueAsNewVersioningBehavior.ValueType + ) # 2 + """Experimental. + Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's + Target Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes, + the workflow will use whatever Versioning Behavior it is annotated with. If there is no Ramping + Version by the time that the first workflow task is dispatched, it will be sent to the Current Version. + + It is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because + this setting ONLY applies to the first task of the workflow. If, after the first task, the workflow + is AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which + may be the Current Version instead of the Ramping Version. + + Note that if the workflow being continued has a Pinned override, that override will be inherited by the + new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new + command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. + """ + +class ContinueAsNewVersioningBehavior( + _ContinueAsNewVersioningBehavior, + metaclass=_ContinueAsNewVersioningBehaviorEnumTypeWrapper, +): + """Experimental. Defines the versioning behavior to be used by the first task of a new workflow run in a continue-as-new chain.""" + +CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED: ( + ContinueAsNewVersioningBehavior.ValueType +) # 0 +CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE: ( + ContinueAsNewVersioningBehavior.ValueType +) # 1 +"""Experimental. +Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at +start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever +Versioning Behavior the workflow is annotated with in the workflow code. + +Note that if the workflow being continued has a Pinned override, that override will be inherited by the +new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new +command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. +""" +CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION: ( + ContinueAsNewVersioningBehavior.ValueType +) # 2 +"""Experimental. +Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's +Target Version (according to f(workflow_id, ramp_percentage)). After the first workflow task completes, +the workflow will use whatever Versioning Behavior it is annotated with. If there is no Ramping +Version by the time that the first workflow task is dispatched, it will be sent to the Current Version. + +It is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because +this setting ONLY applies to the first task of the workflow. If, after the first task, the workflow +is AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which +may be the Current Version instead of the Ramping Version. + +Note that if the workflow being continued has a Pinned override, that override will be inherited by the +new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new +command. Versioning Override always takes precedence until it's removed manually via UpdateWorkflowExecutionOptions. +""" +global___ContinueAsNewVersioningBehavior = ContinueAsNewVersioningBehavior + +class _SuggestContinueAsNewReason: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _SuggestContinueAsNewReasonEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + _SuggestContinueAsNewReason.ValueType + ], + builtins.type, +): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + SUGGEST_CONTINUE_AS_NEW_REASON_UNSPECIFIED: ( + _SuggestContinueAsNewReason.ValueType + ) # 0 + SUGGEST_CONTINUE_AS_NEW_REASON_HISTORY_SIZE_TOO_LARGE: ( + _SuggestContinueAsNewReason.ValueType + ) # 1 + """Workflow History size is getting too large.""" + SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_HISTORY_EVENTS: ( + _SuggestContinueAsNewReason.ValueType + ) # 2 + """Workflow History event count is getting too large.""" + SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES: ( + _SuggestContinueAsNewReason.ValueType + ) # 3 + """Workflow's count of completed plus in-flight updates is too large.""" + +class SuggestContinueAsNewReason( + _SuggestContinueAsNewReason, metaclass=_SuggestContinueAsNewReasonEnumTypeWrapper +): + """SuggestContinueAsNewReason specifies why SuggestContinueAsNew is true.""" + +SUGGEST_CONTINUE_AS_NEW_REASON_UNSPECIFIED: SuggestContinueAsNewReason.ValueType # 0 +SUGGEST_CONTINUE_AS_NEW_REASON_HISTORY_SIZE_TOO_LARGE: ( + SuggestContinueAsNewReason.ValueType +) # 1 +"""Workflow History size is getting too large.""" +SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_HISTORY_EVENTS: ( + SuggestContinueAsNewReason.ValueType +) # 2 +"""Workflow History event count is getting too large.""" +SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES: ( + SuggestContinueAsNewReason.ValueType +) # 3 +"""Workflow's count of completed plus in-flight updates is too large.""" +global___SuggestContinueAsNewReason = SuggestContinueAsNewReason diff --git a/temporalio/api/errordetails/v1/__init__.py b/temporalio/api/errordetails/v1/__init__.py index 2afb6ec955..068503e9e1 100644 --- a/temporalio/api/errordetails/v1/__init__.py +++ b/temporalio/api/errordetails/v1/__init__.py @@ -1,4 +1,5 @@ from .message_pb2 import ( + ActivityExecutionAlreadyStartedFailure, CancellationAlreadyRequestedFailure, ClientVersionNotSupportedFailure, MultiOperationExecutionFailure, @@ -8,6 +9,7 @@ NamespaceNotFoundFailure, NamespaceUnavailableFailure, NewerBuildExistsFailure, + NexusOperationExecutionAlreadyStartedFailure, NotFoundFailure, PermissionDeniedFailure, QueryFailedFailure, @@ -16,9 +18,11 @@ SystemWorkflowFailure, WorkflowExecutionAlreadyStartedFailure, WorkflowNotReadyFailure, + WorkflowTaskCompletionBufferLostFailure, ) __all__ = [ + "ActivityExecutionAlreadyStartedFailure", "CancellationAlreadyRequestedFailure", "ClientVersionNotSupportedFailure", "MultiOperationExecutionFailure", @@ -28,6 +32,7 @@ "NamespaceNotFoundFailure", "NamespaceUnavailableFailure", "NewerBuildExistsFailure", + "NexusOperationExecutionAlreadyStartedFailure", "NotFoundFailure", "PermissionDeniedFailure", "QueryFailedFailure", @@ -36,4 +41,5 @@ "SystemWorkflowFailure", "WorkflowExecutionAlreadyStartedFailure", "WorkflowNotReadyFailure", + "WorkflowTaskCompletionBufferLostFailure", ] diff --git a/temporalio/api/errordetails/v1/message_pb2.py b/temporalio/api/errordetails/v1/message_pb2.py index 772238c021..0273b70a2c 100644 --- a/temporalio/api/errordetails/v1/message_pb2.py +++ b/temporalio/api/errordetails/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -30,282 +29,54 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n*temporal/api/errordetails/v1/message.proto\x12\x1ctemporal.api.errordetails.v1\x1a\x19google/protobuf/any.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a%temporal/api/enums/v1/namespace.proto\x1a%temporal/api/failure/v1/message.proto"B\n\x0fNotFoundFailure\x12\x17\n\x0f\x63urrent_cluster\x18\x01 \x01(\t\x12\x16\n\x0e\x61\x63tive_cluster\x18\x02 \x01(\t"R\n&WorkflowExecutionAlreadyStartedFailure\x12\x18\n\x10start_request_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t"_\n\x19NamespaceNotActiveFailure\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x63urrent_cluster\x18\x02 \x01(\t\x12\x16\n\x0e\x61\x63tive_cluster\x18\x03 \x01(\t"0\n\x1bNamespaceUnavailableFailure\x12\x11\n\tnamespace\x18\x01 \x01(\t"\xa6\x01\n\x1cNamespaceInvalidStateFailure\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32%.temporal.api.enums.v1.NamespaceState\x12=\n\x0e\x61llowed_states\x18\x03 \x03(\x0e\x32%.temporal.api.enums.v1.NamespaceState"-\n\x18NamespaceNotFoundFailure\x12\x11\n\tnamespace\x18\x01 \x01(\t"\x1f\n\x1dNamespaceAlreadyExistsFailure"k\n ClientVersionNotSupportedFailure\x12\x16\n\x0e\x63lient_version\x18\x01 \x01(\t\x12\x13\n\x0b\x63lient_name\x18\x02 \x01(\t\x12\x1a\n\x12supported_versions\x18\x03 \x01(\t"d\n ServerVersionNotSupportedFailure\x12\x16\n\x0eserver_version\x18\x01 \x01(\t\x12(\n client_supported_server_versions\x18\x02 \x01(\t"%\n#CancellationAlreadyRequestedFailure"G\n\x12QueryFailedFailure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure")\n\x17PermissionDeniedFailure\x12\x0e\n\x06reason\x18\x01 \x01(\t"\x96\x01\n\x18ResourceExhaustedFailure\x12<\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32-.temporal.api.enums.v1.ResourceExhaustedCause\x12<\n\x05scope\x18\x02 \x01(\x0e\x32-.temporal.api.enums.v1.ResourceExhaustedScope"v\n\x15SystemWorkflowFailure\x12\x45\n\x12workflow_execution\x18\x01 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x16\n\x0eworkflow_error\x18\x02 \x01(\t"\x19\n\x17WorkflowNotReadyFailure"3\n\x17NewerBuildExistsFailure\x12\x18\n\x10\x64\x65\x66\x61ult_build_id\x18\x01 \x01(\t"\xd9\x01\n\x1eMultiOperationExecutionFailure\x12^\n\x08statuses\x18\x01 \x03(\x0b\x32L.temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus\x1aW\n\x0fOperationStatus\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\x12%\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyB\xa7\x01\n\x1fio.temporal.api.errordetails.v1B\x0cMessageProtoP\x01Z/go.temporal.io/api/errordetails/v1;errordetails\xaa\x02\x1eTemporalio.Api.ErrorDetails.V1\xea\x02!Temporalio::Api::ErrorDetails::V1b\x06proto3' + b'\n*temporal/api/errordetails/v1/message.proto\x12\x1ctemporal.api.errordetails.v1\x1a\x19google/protobuf/any.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a%temporal/api/enums/v1/namespace.proto\x1a%temporal/api/failure/v1/message.proto"B\n\x0fNotFoundFailure\x12\x17\n\x0f\x63urrent_cluster\x18\x01 \x01(\t\x12\x16\n\x0e\x61\x63tive_cluster\x18\x02 \x01(\t"r\n&WorkflowExecutionAlreadyStartedFailure\x12\x18\n\x10start_request_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x03 \x01(\t"_\n\x19NamespaceNotActiveFailure\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x63urrent_cluster\x18\x02 \x01(\t\x12\x16\n\x0e\x61\x63tive_cluster\x18\x03 \x01(\t"0\n\x1bNamespaceUnavailableFailure\x12\x11\n\tnamespace\x18\x01 \x01(\t"\xa6\x01\n\x1cNamespaceInvalidStateFailure\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32%.temporal.api.enums.v1.NamespaceState\x12=\n\x0e\x61llowed_states\x18\x03 \x03(\x0e\x32%.temporal.api.enums.v1.NamespaceState"-\n\x18NamespaceNotFoundFailure\x12\x11\n\tnamespace\x18\x01 \x01(\t"\x1f\n\x1dNamespaceAlreadyExistsFailure"k\n ClientVersionNotSupportedFailure\x12\x16\n\x0e\x63lient_version\x18\x01 \x01(\t\x12\x13\n\x0b\x63lient_name\x18\x02 \x01(\t\x12\x1a\n\x12supported_versions\x18\x03 \x01(\t"d\n ServerVersionNotSupportedFailure\x12\x16\n\x0eserver_version\x18\x01 \x01(\t\x12(\n client_supported_server_versions\x18\x02 \x01(\t"%\n#CancellationAlreadyRequestedFailure"G\n\x12QueryFailedFailure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure")\n\x17PermissionDeniedFailure\x12\x0e\n\x06reason\x18\x01 \x01(\t"\x96\x01\n\x18ResourceExhaustedFailure\x12<\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32-.temporal.api.enums.v1.ResourceExhaustedCause\x12<\n\x05scope\x18\x02 \x01(\x0e\x32-.temporal.api.enums.v1.ResourceExhaustedScope"v\n\x15SystemWorkflowFailure\x12\x45\n\x12workflow_execution\x18\x01 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x16\n\x0eworkflow_error\x18\x02 \x01(\t"\x19\n\x17WorkflowNotReadyFailure"3\n\x17NewerBuildExistsFailure\x12\x18\n\x10\x64\x65\x66\x61ult_build_id\x18\x01 \x01(\t"\xd9\x01\n\x1eMultiOperationExecutionFailure\x12^\n\x08statuses\x18\x01 \x03(\x0b\x32L.temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus\x1aW\n\x0fOperationStatus\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\x12%\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Any"R\n&ActivityExecutionAlreadyStartedFailure\x12\x18\n\x10start_request_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t"X\n,NexusOperationExecutionAlreadyStartedFailure\x12\x18\n\x10start_request_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t")\n\'WorkflowTaskCompletionBufferLostFailureB\xa7\x01\n\x1fio.temporal.api.errordetails.v1B\x0cMessageProtoP\x01Z/go.temporal.io/api/errordetails/v1;errordetails\xaa\x02\x1eTemporalio.Api.ErrorDetails.V1\xea\x02!Temporalio::Api::ErrorDetails::V1b\x06proto3' ) - -_NOTFOUNDFAILURE = DESCRIPTOR.message_types_by_name["NotFoundFailure"] -_WORKFLOWEXECUTIONALREADYSTARTEDFAILURE = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionAlreadyStartedFailure" -] -_NAMESPACENOTACTIVEFAILURE = DESCRIPTOR.message_types_by_name[ - "NamespaceNotActiveFailure" -] -_NAMESPACEUNAVAILABLEFAILURE = DESCRIPTOR.message_types_by_name[ - "NamespaceUnavailableFailure" -] -_NAMESPACEINVALIDSTATEFAILURE = DESCRIPTOR.message_types_by_name[ - "NamespaceInvalidStateFailure" -] -_NAMESPACENOTFOUNDFAILURE = DESCRIPTOR.message_types_by_name["NamespaceNotFoundFailure"] -_NAMESPACEALREADYEXISTSFAILURE = DESCRIPTOR.message_types_by_name[ - "NamespaceAlreadyExistsFailure" -] -_CLIENTVERSIONNOTSUPPORTEDFAILURE = DESCRIPTOR.message_types_by_name[ - "ClientVersionNotSupportedFailure" -] -_SERVERVERSIONNOTSUPPORTEDFAILURE = DESCRIPTOR.message_types_by_name[ - "ServerVersionNotSupportedFailure" -] -_CANCELLATIONALREADYREQUESTEDFAILURE = DESCRIPTOR.message_types_by_name[ - "CancellationAlreadyRequestedFailure" -] -_QUERYFAILEDFAILURE = DESCRIPTOR.message_types_by_name["QueryFailedFailure"] -_PERMISSIONDENIEDFAILURE = DESCRIPTOR.message_types_by_name["PermissionDeniedFailure"] -_RESOURCEEXHAUSTEDFAILURE = DESCRIPTOR.message_types_by_name["ResourceExhaustedFailure"] -_SYSTEMWORKFLOWFAILURE = DESCRIPTOR.message_types_by_name["SystemWorkflowFailure"] -_WORKFLOWNOTREADYFAILURE = DESCRIPTOR.message_types_by_name["WorkflowNotReadyFailure"] -_NEWERBUILDEXISTSFAILURE = DESCRIPTOR.message_types_by_name["NewerBuildExistsFailure"] -_MULTIOPERATIONEXECUTIONFAILURE = DESCRIPTOR.message_types_by_name[ - "MultiOperationExecutionFailure" -] -_MULTIOPERATIONEXECUTIONFAILURE_OPERATIONSTATUS = ( - _MULTIOPERATIONEXECUTIONFAILURE.nested_types_by_name["OperationStatus"] -) -NotFoundFailure = _reflection.GeneratedProtocolMessageType( - "NotFoundFailure", - (_message.Message,), - { - "DESCRIPTOR": _NOTFOUNDFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.NotFoundFailure) - }, -) -_sym_db.RegisterMessage(NotFoundFailure) - -WorkflowExecutionAlreadyStartedFailure = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionAlreadyStartedFailure", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONALREADYSTARTEDFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionAlreadyStartedFailure) - -NamespaceNotActiveFailure = _reflection.GeneratedProtocolMessageType( - "NamespaceNotActiveFailure", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACENOTACTIVEFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.NamespaceNotActiveFailure) - }, -) -_sym_db.RegisterMessage(NamespaceNotActiveFailure) - -NamespaceUnavailableFailure = _reflection.GeneratedProtocolMessageType( - "NamespaceUnavailableFailure", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEUNAVAILABLEFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.NamespaceUnavailableFailure) - }, -) -_sym_db.RegisterMessage(NamespaceUnavailableFailure) - -NamespaceInvalidStateFailure = _reflection.GeneratedProtocolMessageType( - "NamespaceInvalidStateFailure", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEINVALIDSTATEFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.NamespaceInvalidStateFailure) - }, -) -_sym_db.RegisterMessage(NamespaceInvalidStateFailure) - -NamespaceNotFoundFailure = _reflection.GeneratedProtocolMessageType( - "NamespaceNotFoundFailure", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACENOTFOUNDFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.NamespaceNotFoundFailure) - }, -) -_sym_db.RegisterMessage(NamespaceNotFoundFailure) - -NamespaceAlreadyExistsFailure = _reflection.GeneratedProtocolMessageType( - "NamespaceAlreadyExistsFailure", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEALREADYEXISTSFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.NamespaceAlreadyExistsFailure) - }, -) -_sym_db.RegisterMessage(NamespaceAlreadyExistsFailure) - -ClientVersionNotSupportedFailure = _reflection.GeneratedProtocolMessageType( - "ClientVersionNotSupportedFailure", - (_message.Message,), - { - "DESCRIPTOR": _CLIENTVERSIONNOTSUPPORTEDFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.ClientVersionNotSupportedFailure) - }, -) -_sym_db.RegisterMessage(ClientVersionNotSupportedFailure) - -ServerVersionNotSupportedFailure = _reflection.GeneratedProtocolMessageType( - "ServerVersionNotSupportedFailure", - (_message.Message,), - { - "DESCRIPTOR": _SERVERVERSIONNOTSUPPORTEDFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.ServerVersionNotSupportedFailure) - }, -) -_sym_db.RegisterMessage(ServerVersionNotSupportedFailure) - -CancellationAlreadyRequestedFailure = _reflection.GeneratedProtocolMessageType( - "CancellationAlreadyRequestedFailure", - (_message.Message,), - { - "DESCRIPTOR": _CANCELLATIONALREADYREQUESTEDFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.CancellationAlreadyRequestedFailure) - }, -) -_sym_db.RegisterMessage(CancellationAlreadyRequestedFailure) - -QueryFailedFailure = _reflection.GeneratedProtocolMessageType( - "QueryFailedFailure", - (_message.Message,), - { - "DESCRIPTOR": _QUERYFAILEDFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.QueryFailedFailure) - }, -) -_sym_db.RegisterMessage(QueryFailedFailure) - -PermissionDeniedFailure = _reflection.GeneratedProtocolMessageType( - "PermissionDeniedFailure", - (_message.Message,), - { - "DESCRIPTOR": _PERMISSIONDENIEDFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.PermissionDeniedFailure) - }, -) -_sym_db.RegisterMessage(PermissionDeniedFailure) - -ResourceExhaustedFailure = _reflection.GeneratedProtocolMessageType( - "ResourceExhaustedFailure", - (_message.Message,), - { - "DESCRIPTOR": _RESOURCEEXHAUSTEDFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.ResourceExhaustedFailure) - }, -) -_sym_db.RegisterMessage(ResourceExhaustedFailure) - -SystemWorkflowFailure = _reflection.GeneratedProtocolMessageType( - "SystemWorkflowFailure", - (_message.Message,), - { - "DESCRIPTOR": _SYSTEMWORKFLOWFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.SystemWorkflowFailure) - }, -) -_sym_db.RegisterMessage(SystemWorkflowFailure) - -WorkflowNotReadyFailure = _reflection.GeneratedProtocolMessageType( - "WorkflowNotReadyFailure", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWNOTREADYFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.WorkflowNotReadyFailure) - }, -) -_sym_db.RegisterMessage(WorkflowNotReadyFailure) - -NewerBuildExistsFailure = _reflection.GeneratedProtocolMessageType( - "NewerBuildExistsFailure", - (_message.Message,), - { - "DESCRIPTOR": _NEWERBUILDEXISTSFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.NewerBuildExistsFailure) - }, -) -_sym_db.RegisterMessage(NewerBuildExistsFailure) - -MultiOperationExecutionFailure = _reflection.GeneratedProtocolMessageType( - "MultiOperationExecutionFailure", - (_message.Message,), - { - "OperationStatus": _reflection.GeneratedProtocolMessageType( - "OperationStatus", - (_message.Message,), - { - "DESCRIPTOR": _MULTIOPERATIONEXECUTIONFAILURE_OPERATIONSTATUS, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus) - }, - ), - "DESCRIPTOR": _MULTIOPERATIONEXECUTIONFAILURE, - "__module__": "temporalio.api.errordetails.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.errordetails.v1.MultiOperationExecutionFailure) - }, -) -_sym_db.RegisterMessage(MultiOperationExecutionFailure) -_sym_db.RegisterMessage(MultiOperationExecutionFailure.OperationStatus) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\037io.temporal.api.errordetails.v1B\014MessageProtoP\001Z/go.temporal.io/api/errordetails/v1;errordetails\252\002\036Temporalio.Api.ErrorDetails.V1\352\002!Temporalio::Api::ErrorDetails::V1" _NOTFOUNDFAILURE._serialized_start = 261 _NOTFOUNDFAILURE._serialized_end = 327 _WORKFLOWEXECUTIONALREADYSTARTEDFAILURE._serialized_start = 329 - _WORKFLOWEXECUTIONALREADYSTARTEDFAILURE._serialized_end = 411 - _NAMESPACENOTACTIVEFAILURE._serialized_start = 413 - _NAMESPACENOTACTIVEFAILURE._serialized_end = 508 - _NAMESPACEUNAVAILABLEFAILURE._serialized_start = 510 - _NAMESPACEUNAVAILABLEFAILURE._serialized_end = 558 - _NAMESPACEINVALIDSTATEFAILURE._serialized_start = 561 - _NAMESPACEINVALIDSTATEFAILURE._serialized_end = 727 - _NAMESPACENOTFOUNDFAILURE._serialized_start = 729 - _NAMESPACENOTFOUNDFAILURE._serialized_end = 774 - _NAMESPACEALREADYEXISTSFAILURE._serialized_start = 776 - _NAMESPACEALREADYEXISTSFAILURE._serialized_end = 807 - _CLIENTVERSIONNOTSUPPORTEDFAILURE._serialized_start = 809 - _CLIENTVERSIONNOTSUPPORTEDFAILURE._serialized_end = 916 - _SERVERVERSIONNOTSUPPORTEDFAILURE._serialized_start = 918 - _SERVERVERSIONNOTSUPPORTEDFAILURE._serialized_end = 1018 - _CANCELLATIONALREADYREQUESTEDFAILURE._serialized_start = 1020 - _CANCELLATIONALREADYREQUESTEDFAILURE._serialized_end = 1057 - _QUERYFAILEDFAILURE._serialized_start = 1059 - _QUERYFAILEDFAILURE._serialized_end = 1130 - _PERMISSIONDENIEDFAILURE._serialized_start = 1132 - _PERMISSIONDENIEDFAILURE._serialized_end = 1173 - _RESOURCEEXHAUSTEDFAILURE._serialized_start = 1176 - _RESOURCEEXHAUSTEDFAILURE._serialized_end = 1326 - _SYSTEMWORKFLOWFAILURE._serialized_start = 1328 - _SYSTEMWORKFLOWFAILURE._serialized_end = 1446 - _WORKFLOWNOTREADYFAILURE._serialized_start = 1448 - _WORKFLOWNOTREADYFAILURE._serialized_end = 1473 - _NEWERBUILDEXISTSFAILURE._serialized_start = 1475 - _NEWERBUILDEXISTSFAILURE._serialized_end = 1526 - _MULTIOPERATIONEXECUTIONFAILURE._serialized_start = 1529 - _MULTIOPERATIONEXECUTIONFAILURE._serialized_end = 1746 - _MULTIOPERATIONEXECUTIONFAILURE_OPERATIONSTATUS._serialized_start = 1659 - _MULTIOPERATIONEXECUTIONFAILURE_OPERATIONSTATUS._serialized_end = 1746 + _WORKFLOWEXECUTIONALREADYSTARTEDFAILURE._serialized_end = 443 + _NAMESPACENOTACTIVEFAILURE._serialized_start = 445 + _NAMESPACENOTACTIVEFAILURE._serialized_end = 540 + _NAMESPACEUNAVAILABLEFAILURE._serialized_start = 542 + _NAMESPACEUNAVAILABLEFAILURE._serialized_end = 590 + _NAMESPACEINVALIDSTATEFAILURE._serialized_start = 593 + _NAMESPACEINVALIDSTATEFAILURE._serialized_end = 759 + _NAMESPACENOTFOUNDFAILURE._serialized_start = 761 + _NAMESPACENOTFOUNDFAILURE._serialized_end = 806 + _NAMESPACEALREADYEXISTSFAILURE._serialized_start = 808 + _NAMESPACEALREADYEXISTSFAILURE._serialized_end = 839 + _CLIENTVERSIONNOTSUPPORTEDFAILURE._serialized_start = 841 + _CLIENTVERSIONNOTSUPPORTEDFAILURE._serialized_end = 948 + _SERVERVERSIONNOTSUPPORTEDFAILURE._serialized_start = 950 + _SERVERVERSIONNOTSUPPORTEDFAILURE._serialized_end = 1050 + _CANCELLATIONALREADYREQUESTEDFAILURE._serialized_start = 1052 + _CANCELLATIONALREADYREQUESTEDFAILURE._serialized_end = 1089 + _QUERYFAILEDFAILURE._serialized_start = 1091 + _QUERYFAILEDFAILURE._serialized_end = 1162 + _PERMISSIONDENIEDFAILURE._serialized_start = 1164 + _PERMISSIONDENIEDFAILURE._serialized_end = 1205 + _RESOURCEEXHAUSTEDFAILURE._serialized_start = 1208 + _RESOURCEEXHAUSTEDFAILURE._serialized_end = 1358 + _SYSTEMWORKFLOWFAILURE._serialized_start = 1360 + _SYSTEMWORKFLOWFAILURE._serialized_end = 1478 + _WORKFLOWNOTREADYFAILURE._serialized_start = 1480 + _WORKFLOWNOTREADYFAILURE._serialized_end = 1505 + _NEWERBUILDEXISTSFAILURE._serialized_start = 1507 + _NEWERBUILDEXISTSFAILURE._serialized_end = 1558 + _MULTIOPERATIONEXECUTIONFAILURE._serialized_start = 1561 + _MULTIOPERATIONEXECUTIONFAILURE._serialized_end = 1778 + _MULTIOPERATIONEXECUTIONFAILURE_OPERATIONSTATUS._serialized_start = 1691 + _MULTIOPERATIONEXECUTIONFAILURE_OPERATIONSTATUS._serialized_end = 1778 + _ACTIVITYEXECUTIONALREADYSTARTEDFAILURE._serialized_start = 1780 + _ACTIVITYEXECUTIONALREADYSTARTEDFAILURE._serialized_end = 1862 + _NEXUSOPERATIONEXECUTIONALREADYSTARTEDFAILURE._serialized_start = 1864 + _NEXUSOPERATIONEXECUTIONALREADYSTARTEDFAILURE._serialized_end = 1952 + _WORKFLOWTASKCOMPLETIONBUFFERLOSTFAILURE._serialized_start = 1954 + _WORKFLOWTASKCOMPLETIONBUFFERLOSTFAILURE._serialized_end = 1995 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/errordetails/v1/message_pb2.pyi b/temporalio/api/errordetails/v1/message_pb2.pyi index 4857dbf318..73c08ce25d 100644 --- a/temporalio/api/errordetails/v1/message_pb2.pyi +++ b/temporalio/api/errordetails/v1/message_pb2.pyi @@ -7,7 +7,7 @@ and extend standard Error Details defined in https://github.com/googleapis/googl import builtins import collections.abc -import sys +import typing import google.protobuf.any_pb2 import google.protobuf.descriptor @@ -19,13 +19,9 @@ import temporalio.api.enums.v1.failed_cause_pb2 import temporalio.api.enums.v1.namespace_pb2 import temporalio.api.failure.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class NotFoundFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -41,35 +37,45 @@ class NotFoundFailure(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "active_cluster", b"active_cluster", "current_cluster", b"current_cluster" ], ) -> None: ... global___NotFoundFailure = NotFoundFailure +@typing.final class WorkflowExecutionAlreadyStartedFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor START_REQUEST_ID_FIELD_NUMBER: builtins.int RUN_ID_FIELD_NUMBER: builtins.int + FIRST_EXECUTION_RUN_ID_FIELD_NUMBER: builtins.int start_request_id: builtins.str run_id: builtins.str + first_execution_run_id: builtins.str def __init__( self, *, start_request_id: builtins.str = ..., run_id: builtins.str = ..., + first_execution_run_id: builtins.str = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "run_id", b"run_id", "start_request_id", b"start_request_id" + field_name: typing.Literal[ + "first_execution_run_id", + b"first_execution_run_id", + "run_id", + b"run_id", + "start_request_id", + b"start_request_id", ], ) -> None: ... global___WorkflowExecutionAlreadyStartedFailure = WorkflowExecutionAlreadyStartedFailure +@typing.final class NamespaceNotActiveFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -88,7 +94,7 @@ class NamespaceNotActiveFailure(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "active_cluster", b"active_cluster", "current_cluster", @@ -100,6 +106,7 @@ class NamespaceNotActiveFailure(google.protobuf.message.Message): global___NamespaceNotActiveFailure = NamespaceNotActiveFailure +@typing.final class NamespaceUnavailableFailure(google.protobuf.message.Message): """NamespaceUnavailableFailure is returned by the service when a request addresses a namespace that is unavailable. For example, when a namespace is in the process of failing over between clusters. @@ -116,11 +123,12 @@ class NamespaceUnavailableFailure(google.protobuf.message.Message): namespace: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["namespace", b"namespace"] + self, field_name: typing.Literal["namespace", b"namespace"] ) -> None: ... global___NamespaceUnavailableFailure = NamespaceUnavailableFailure +@typing.final class NamespaceInvalidStateFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -139,6 +147,7 @@ class NamespaceInvalidStateFailure(google.protobuf.message.Message): """Allowed namespace states for requested operation. For example NAMESPACE_STATE_DELETED is forbidden for most operations but allowed for DescribeNamespace. """ + def __init__( self, *, @@ -151,7 +160,7 @@ class NamespaceInvalidStateFailure(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "allowed_states", b"allowed_states", "namespace", @@ -163,6 +172,7 @@ class NamespaceInvalidStateFailure(google.protobuf.message.Message): global___NamespaceInvalidStateFailure = NamespaceInvalidStateFailure +@typing.final class NamespaceNotFoundFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -174,11 +184,12 @@ class NamespaceNotFoundFailure(google.protobuf.message.Message): namespace: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["namespace", b"namespace"] + self, field_name: typing.Literal["namespace", b"namespace"] ) -> None: ... global___NamespaceNotFoundFailure = NamespaceNotFoundFailure +@typing.final class NamespaceAlreadyExistsFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -188,6 +199,7 @@ class NamespaceAlreadyExistsFailure(google.protobuf.message.Message): global___NamespaceAlreadyExistsFailure = NamespaceAlreadyExistsFailure +@typing.final class ClientVersionNotSupportedFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -206,7 +218,7 @@ class ClientVersionNotSupportedFailure(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "client_name", b"client_name", "client_version", @@ -218,6 +230,7 @@ class ClientVersionNotSupportedFailure(google.protobuf.message.Message): global___ClientVersionNotSupportedFailure = ClientVersionNotSupportedFailure +@typing.final class ServerVersionNotSupportedFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -233,7 +246,7 @@ class ServerVersionNotSupportedFailure(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "client_supported_server_versions", b"client_supported_server_versions", "server_version", @@ -243,6 +256,7 @@ class ServerVersionNotSupportedFailure(google.protobuf.message.Message): global___ServerVersionNotSupportedFailure = ServerVersionNotSupportedFailure +@typing.final class CancellationAlreadyRequestedFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -252,6 +266,7 @@ class CancellationAlreadyRequestedFailure(google.protobuf.message.Message): global___CancellationAlreadyRequestedFailure = CancellationAlreadyRequestedFailure +@typing.final class QueryFailedFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -262,20 +277,20 @@ class QueryFailedFailure(google.protobuf.message.Message): SDK. This field can be encoded by the SDK's failure converter to support E2E encryption of messages and stack traces. """ + def __init__( self, *, failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["failure", b"failure"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["failure", b"failure"]) -> None: ... global___QueryFailedFailure = QueryFailedFailure +@typing.final class PermissionDeniedFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -286,12 +301,11 @@ class PermissionDeniedFailure(google.protobuf.message.Message): *, reason: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["reason", b"reason"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["reason", b"reason"]) -> None: ... global___PermissionDeniedFailure = PermissionDeniedFailure +@typing.final class ResourceExhaustedFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -306,17 +320,19 @@ class ResourceExhaustedFailure(google.protobuf.message.Message): scope: temporalio.api.enums.v1.failed_cause_pb2.ResourceExhaustedScope.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["cause", b"cause", "scope", b"scope"], + self, field_name: typing.Literal["cause", b"cause", "scope", b"scope"] ) -> None: ... global___ResourceExhaustedFailure = ResourceExhaustedFailure +@typing.final class SystemWorkflowFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor WORKFLOW_EXECUTION_FIELD_NUMBER: builtins.int WORKFLOW_ERROR_FIELD_NUMBER: builtins.int + workflow_error: builtins.str + """Serialized error returned by the system workflow performing the underlying operation.""" @property def workflow_execution( self, @@ -324,8 +340,7 @@ class SystemWorkflowFailure(google.protobuf.message.Message): """WorkflowId and RunId of the Temporal system workflow performing the underlying operation. Looking up the info of the system workflow run may help identify the issue causing the failure. """ - workflow_error: builtins.str - """Serialized error returned by the system workflow performing the underlying operation.""" + def __init__( self, *, @@ -334,14 +349,11 @@ class SystemWorkflowFailure(google.protobuf.message.Message): workflow_error: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "workflow_error", b"workflow_error", "workflow_execution", @@ -351,6 +363,7 @@ class SystemWorkflowFailure(google.protobuf.message.Message): global___SystemWorkflowFailure = SystemWorkflowFailure +@typing.final class WorkflowNotReadyFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -360,6 +373,7 @@ class WorkflowNotReadyFailure(google.protobuf.message.Message): global___WorkflowNotReadyFailure = WorkflowNotReadyFailure +@typing.final class NewerBuildExistsFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -372,15 +386,16 @@ class NewerBuildExistsFailure(google.protobuf.message.Message): default_build_id: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["default_build_id", b"default_build_id"], + self, field_name: typing.Literal["default_build_id", b"default_build_id"] ) -> None: ... global___NewerBuildExistsFailure = NewerBuildExistsFailure +@typing.final class MultiOperationExecutionFailure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class OperationStatus(google.protobuf.message.Message): """NOTE: `OperationStatus` is modelled after [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto). @@ -411,7 +426,7 @@ class MultiOperationExecutionFailure(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "code", b"code", "details", b"details", "message", b"message" ], ) -> None: ... @@ -427,6 +442,7 @@ class MultiOperationExecutionFailure(google.protobuf.message.Message): operation(s) have the same error details as if it was executed separately. All other operations have the status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field. """ + def __init__( self, *, @@ -436,7 +452,82 @@ class MultiOperationExecutionFailure(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["statuses", b"statuses"] + self, field_name: typing.Literal["statuses", b"statuses"] ) -> None: ... global___MultiOperationExecutionFailure = MultiOperationExecutionFailure + +@typing.final +class ActivityExecutionAlreadyStartedFailure(google.protobuf.message.Message): + """An error indicating that an activity execution failed to start. Returned when there is an existing activity with the + given activity ID, and the given ID reuse and conflict policies do not permit starting a new one or attaching to an + existing one. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + START_REQUEST_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + start_request_id: builtins.str + run_id: builtins.str + def __init__( + self, + *, + start_request_id: builtins.str = ..., + run_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "run_id", b"run_id", "start_request_id", b"start_request_id" + ], + ) -> None: ... + +global___ActivityExecutionAlreadyStartedFailure = ActivityExecutionAlreadyStartedFailure + +@typing.final +class NexusOperationExecutionAlreadyStartedFailure(google.protobuf.message.Message): + """An error indicating that a Nexus operation failed to start. Returned when there is an existing operation with the + given operation ID, and the given ID reuse and conflict policies do not permit starting a new one or attaching to an + existing one. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + START_REQUEST_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + start_request_id: builtins.str + run_id: builtins.str + def __init__( + self, + *, + start_request_id: builtins.str = ..., + run_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "run_id", b"run_id", "start_request_id", b"start_request_id" + ], + ) -> None: ... + +global___NexusOperationExecutionAlreadyStartedFailure = ( + NexusOperationExecutionAlreadyStartedFailure +) + +@typing.final +class WorkflowTaskCompletionBufferLostFailure(google.protobuf.message.Message): + """An error indicating that the server lost the buffered pages of a paginated workflow task + completion. This is a transient error: the workflow task is still valid, and the client + should resend all pages from page 0 using the same task token. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___WorkflowTaskCompletionBufferLostFailure = ( + WorkflowTaskCompletionBufferLostFailure +) diff --git a/temporalio/api/export/v1/__init__.py b/temporalio/api/export/v1/__init__.py index 11e7e71b77..756902846f 100644 --- a/temporalio/api/export/v1/__init__.py +++ b/temporalio/api/export/v1/__init__.py @@ -1,6 +1,13 @@ -from .message_pb2 import WorkflowExecution, WorkflowExecutions +from .message_pb2 import ( + ActivityExecution, + ExportedExecutions, + WorkflowExecution, + WorkflowExecutions, +) __all__ = [ + "ActivityExecution", + "ExportedExecutions", "WorkflowExecution", "WorkflowExecutions", ] diff --git a/temporalio/api/export/v1/message_pb2.py b/temporalio/api/export/v1/message_pb2.py index 35d672eca6..c2dab8710b 100644 --- a/temporalio/api/export/v1/message_pb2.py +++ b/temporalio/api/export/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,41 +16,25 @@ from temporalio.api.history.v1 import ( message_pb2 as temporal_dot_api_dot_history_dot_v1_dot_message__pb2, ) - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n$temporal/api/export/v1/message.proto\x12\x16temporal.api.export.v1\x1a%temporal/api/history/v1/message.proto"F\n\x11WorkflowExecution\x12\x31\n\x07history\x18\x01 \x01(\x0b\x32 .temporal.api.history.v1.History"N\n\x12WorkflowExecutions\x12\x38\n\x05items\x18\x01 \x03(\x0b\x32).temporal.api.export.v1.WorkflowExecutionB\x89\x01\n\x19io.temporal.api.export.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/export/v1;export\xaa\x02\x18Temporalio.Api.Export.V1\xea\x02\x1bTemporalio::Api::Export::V1b\x06proto3' -) - - -_WORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name["WorkflowExecution"] -_WORKFLOWEXECUTIONS = DESCRIPTOR.message_types_by_name["WorkflowExecutions"] -WorkflowExecution = _reflection.GeneratedProtocolMessageType( - "WorkflowExecution", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTION, - "__module__": "temporalio.api.export.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.export.v1.WorkflowExecution) - }, +from temporalio.api.workflowservice.v1 import ( + request_response_pb2 as temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2, ) -_sym_db.RegisterMessage(WorkflowExecution) -WorkflowExecutions = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutions", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONS, - "__module__": "temporalio.api.export.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.export.v1.WorkflowExecutions) - }, +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n$temporal/api/export/v1/message.proto\x12\x16temporal.api.export.v1\x1a%temporal/api/history/v1/message.proto\x1a\x36temporal/api/workflowservice/v1/request_response.proto"F\n\x11WorkflowExecution\x12\x31\n\x07history\x18\x01 \x01(\x0b\x32 .temporal.api.history.v1.History"N\n\x12WorkflowExecutions\x12\x38\n\x05items\x18\x01 \x03(\x0b\x32).temporal.api.export.v1.WorkflowExecution"i\n\x11\x41\x63tivityExecution\x12T\n\x08\x61\x63tivity\x18\x01 \x01(\x0b\x32\x42.temporal.api.workflowservice.v1.DescribeActivityExecutionResponse"\x91\x01\n\x12\x45xportedExecutions\x12<\n\tworkflows\x18\x01 \x03(\x0b\x32).temporal.api.export.v1.WorkflowExecution\x12=\n\nactivities\x18\x02 \x03(\x0b\x32).temporal.api.export.v1.ActivityExecutionB\x89\x01\n\x19io.temporal.api.export.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/export/v1;export\xaa\x02\x18Temporalio.Api.Export.V1\xea\x02\x1bTemporalio::Api::Export::V1b\x06proto3' ) -_sym_db.RegisterMessage(WorkflowExecutions) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\031io.temporal.api.export.v1B\014MessageProtoP\001Z#go.temporal.io/api/export/v1;export\252\002\030Temporalio.Api.Export.V1\352\002\033Temporalio::Api::Export::V1" - _WORKFLOWEXECUTION._serialized_start = 103 - _WORKFLOWEXECUTION._serialized_end = 173 - _WORKFLOWEXECUTIONS._serialized_start = 175 - _WORKFLOWEXECUTIONS._serialized_end = 253 + _WORKFLOWEXECUTION._serialized_start = 159 + _WORKFLOWEXECUTION._serialized_end = 229 + _WORKFLOWEXECUTIONS._serialized_start = 231 + _WORKFLOWEXECUTIONS._serialized_end = 309 + _ACTIVITYEXECUTION._serialized_start = 311 + _ACTIVITYEXECUTION._serialized_end = 416 + _EXPORTEDEXECUTIONS._serialized_start = 419 + _EXPORTEDEXECUTIONS._serialized_end = 564 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/export/v1/message_pb2.pyi b/temporalio/api/export/v1/message_pb2.pyi index a270b0e263..66bed31336 100644 --- a/temporalio/api/export/v1/message_pb2.pyi +++ b/temporalio/api/export/v1/message_pb2.pyi @@ -5,21 +5,18 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message import temporalio.api.history.v1.message_pb2 - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import temporalio.api.workflowservice.v1.request_response_pb2 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowExecution(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -32,17 +29,16 @@ class WorkflowExecution(google.protobuf.message.Message): history: temporalio.api.history.v1.message_pb2.History | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["history", b"history"] + self, field_name: typing.Literal["history", b"history"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["history", b"history"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["history", b"history"]) -> None: ... global___WorkflowExecution = WorkflowExecution +@typing.final class WorkflowExecutions(google.protobuf.message.Message): - """WorkflowExecutions is used by the Cloud Export feature to deserialize - the exported file. It encapsulates a collection of workflow execution information. + """WorkflowExecutions is the legacy Cloud Export file format containing only workflow executions. + New exporters should use ExportedExecutions. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -59,8 +55,67 @@ class WorkflowExecutions(google.protobuf.message.Message): *, items: collections.abc.Iterable[global___WorkflowExecution] | None = ..., ) -> None: ... + def ClearField(self, field_name: typing.Literal["items", b"items"]) -> None: ... + +global___WorkflowExecutions = WorkflowExecutions + +@typing.final +class ActivityExecution(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACTIVITY_FIELD_NUMBER: builtins.int + @property + def activity( + self, + ) -> temporalio.api.workflowservice.v1.request_response_pb2.DescribeActivityExecutionResponse: ... + def __init__( + self, + *, + activity: temporalio.api.workflowservice.v1.request_response_pb2.DescribeActivityExecutionResponse + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["activity", b"activity"] + ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["items", b"items"] + self, field_name: typing.Literal["activity", b"activity"] ) -> None: ... -global___WorkflowExecutions = WorkflowExecutions +global___ActivityExecution = ActivityExecution + +@typing.final +class ExportedExecutions(google.protobuf.message.Message): + """ExportedExecutions is used by the Cloud Export feature to deserialize the exported file. + It encapsulates workflow execution information and contains other execution types. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + WORKFLOWS_FIELD_NUMBER: builtins.int + ACTIVITIES_FIELD_NUMBER: builtins.int + @property + def workflows( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___WorkflowExecution + ]: ... + @property + def activities( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___ActivityExecution + ]: ... + def __init__( + self, + *, + workflows: collections.abc.Iterable[global___WorkflowExecution] | None = ..., + activities: collections.abc.Iterable[global___ActivityExecution] | None = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "activities", b"activities", "workflows", b"workflows" + ], + ) -> None: ... + +global___ExportedExecutions = ExportedExecutions diff --git a/temporalio/api/failure/v1/message_pb2.py b/temporalio/api/failure/v1/message_pb2.py index 6b61331128..4c5431d513 100644 --- a/temporalio/api/failure/v1/message_pb2.py +++ b/temporalio/api/failure/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -30,160 +29,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n%temporal/api/failure/v1/message.proto\x12\x17temporal.api.failure.v1\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a!temporal/api/enums/v1/nexus.proto\x1a"temporal/api/enums/v1/common.proto\x1a\x1egoogle/protobuf/duration.proto"\xe8\x01\n\x16\x41pplicationFailureInfo\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x15\n\rnon_retryable\x18\x02 \x01(\x08\x12\x31\n\x07\x64\x65tails\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x33\n\x10next_retry_delay\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x41\n\x08\x63\x61tegory\x18\x05 \x01(\x0e\x32/.temporal.api.enums.v1.ApplicationErrorCategory"\x90\x01\n\x12TimeoutFailureInfo\x12\x38\n\x0ctimeout_type\x18\x01 \x01(\x0e\x32".temporal.api.enums.v1.TimeoutType\x12@\n\x16last_heartbeat_details\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"H\n\x13\x43\x61nceledFailureInfo\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"\x17\n\x15TerminatedFailureInfo"*\n\x11ServerFailureInfo\x12\x15\n\rnon_retryable\x18\x01 \x01(\x08"\\\n\x18ResetWorkflowFailureInfo\x12@\n\x16last_heartbeat_details\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"\xe7\x01\n\x13\x41\x63tivityFailureInfo\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12\x10\n\x08identity\x18\x03 \x01(\t\x12;\n\ractivity_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x13\n\x0b\x61\x63tivity_id\x18\x05 \x01(\t\x12\x36\n\x0bretry_state\x18\x06 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"\xa8\x02\n!ChildWorkflowExecutionFailureInfo\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03\x12\x36\n\x0bretry_state\x18\x06 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"\xa0\x01\n\x19NexusOperationFailureInfo\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\t\x12\x11\n\toperation\x18\x04 \x01(\t\x12\x18\n\x0coperation_id\x18\x05 \x01(\tB\x02\x18\x01\x12\x17\n\x0foperation_token\x18\x06 \x01(\t"v\n\x17NexusHandlerFailureInfo\x12\x0c\n\x04type\x18\x01 \x01(\t\x12M\n\x0eretry_behavior\x18\x02 \x01(\x0e\x32\x35.temporal.api.enums.v1.NexusHandlerErrorRetryBehavior"\xa0\x08\n\x07\x46\x61ilure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x13\n\x0bstack_trace\x18\x03 \x01(\t\x12;\n\x12\x65ncoded_attributes\x18\x14 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12/\n\x05\x63\x61use\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12S\n\x18\x61pplication_failure_info\x18\x05 \x01(\x0b\x32/.temporal.api.failure.v1.ApplicationFailureInfoH\x00\x12K\n\x14timeout_failure_info\x18\x06 \x01(\x0b\x32+.temporal.api.failure.v1.TimeoutFailureInfoH\x00\x12M\n\x15\x63\x61nceled_failure_info\x18\x07 \x01(\x0b\x32,.temporal.api.failure.v1.CanceledFailureInfoH\x00\x12Q\n\x17terminated_failure_info\x18\x08 \x01(\x0b\x32..temporal.api.failure.v1.TerminatedFailureInfoH\x00\x12I\n\x13server_failure_info\x18\t \x01(\x0b\x32*.temporal.api.failure.v1.ServerFailureInfoH\x00\x12X\n\x1breset_workflow_failure_info\x18\n \x01(\x0b\x32\x31.temporal.api.failure.v1.ResetWorkflowFailureInfoH\x00\x12M\n\x15\x61\x63tivity_failure_info\x18\x0b \x01(\x0b\x32,.temporal.api.failure.v1.ActivityFailureInfoH\x00\x12k\n%child_workflow_execution_failure_info\x18\x0c \x01(\x0b\x32:.temporal.api.failure.v1.ChildWorkflowExecutionFailureInfoH\x00\x12\x64\n&nexus_operation_execution_failure_info\x18\r \x01(\x0b\x32\x32.temporal.api.failure.v1.NexusOperationFailureInfoH\x00\x12V\n\x1anexus_handler_failure_info\x18\x0e \x01(\x0b\x32\x30.temporal.api.failure.v1.NexusHandlerFailureInfoH\x00\x42\x0e\n\x0c\x66\x61ilure_info" \n\x1eMultiOperationExecutionAbortedB\x8e\x01\n\x1aio.temporal.api.failure.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/failure/v1;failure\xaa\x02\x19Temporalio.Api.Failure.V1\xea\x02\x1cTemporalio::Api::Failure::V1b\x06proto3' + b'\n%temporal/api/failure/v1/message.proto\x12\x17temporal.api.failure.v1\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a!temporal/api/enums/v1/nexus.proto\x1a"temporal/api/enums/v1/common.proto\x1a\x1egoogle/protobuf/duration.proto"\xe8\x01\n\x16\x41pplicationFailureInfo\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x15\n\rnon_retryable\x18\x02 \x01(\x08\x12\x31\n\x07\x64\x65tails\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x33\n\x10next_retry_delay\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x41\n\x08\x63\x61tegory\x18\x05 \x01(\x0e\x32/.temporal.api.enums.v1.ApplicationErrorCategory"\x90\x01\n\x12TimeoutFailureInfo\x12\x38\n\x0ctimeout_type\x18\x01 \x01(\x0e\x32".temporal.api.enums.v1.TimeoutType\x12@\n\x16last_heartbeat_details\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"Z\n\x13\x43\x61nceledFailureInfo\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x02 \x01(\t")\n\x15TerminatedFailureInfo\x12\x10\n\x08identity\x18\x01 \x01(\t"*\n\x11ServerFailureInfo\x12\x15\n\rnon_retryable\x18\x01 \x01(\x08"\\\n\x18ResetWorkflowFailureInfo\x12@\n\x16last_heartbeat_details\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"\xe7\x01\n\x13\x41\x63tivityFailureInfo\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12\x10\n\x08identity\x18\x03 \x01(\t\x12;\n\ractivity_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x13\n\x0b\x61\x63tivity_id\x18\x05 \x01(\t\x12\x36\n\x0bretry_state\x18\x06 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"\xa8\x02\n!ChildWorkflowExecutionFailureInfo\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03\x12\x36\n\x0bretry_state\x18\x06 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"\xa0\x01\n\x19NexusOperationFailureInfo\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\t\x12\x11\n\toperation\x18\x04 \x01(\t\x12\x18\n\x0coperation_id\x18\x05 \x01(\tB\x02\x18\x01\x12\x17\n\x0foperation_token\x18\x06 \x01(\t"v\n\x17NexusHandlerFailureInfo\x12\x0c\n\x04type\x18\x01 \x01(\t\x12M\n\x0eretry_behavior\x18\x02 \x01(\x0e\x32\x35.temporal.api.enums.v1.NexusHandlerErrorRetryBehavior"\xa0\x08\n\x07\x46\x61ilure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x13\n\x0bstack_trace\x18\x03 \x01(\t\x12;\n\x12\x65ncoded_attributes\x18\x14 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12/\n\x05\x63\x61use\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12S\n\x18\x61pplication_failure_info\x18\x05 \x01(\x0b\x32/.temporal.api.failure.v1.ApplicationFailureInfoH\x00\x12K\n\x14timeout_failure_info\x18\x06 \x01(\x0b\x32+.temporal.api.failure.v1.TimeoutFailureInfoH\x00\x12M\n\x15\x63\x61nceled_failure_info\x18\x07 \x01(\x0b\x32,.temporal.api.failure.v1.CanceledFailureInfoH\x00\x12Q\n\x17terminated_failure_info\x18\x08 \x01(\x0b\x32..temporal.api.failure.v1.TerminatedFailureInfoH\x00\x12I\n\x13server_failure_info\x18\t \x01(\x0b\x32*.temporal.api.failure.v1.ServerFailureInfoH\x00\x12X\n\x1breset_workflow_failure_info\x18\n \x01(\x0b\x32\x31.temporal.api.failure.v1.ResetWorkflowFailureInfoH\x00\x12M\n\x15\x61\x63tivity_failure_info\x18\x0b \x01(\x0b\x32,.temporal.api.failure.v1.ActivityFailureInfoH\x00\x12k\n%child_workflow_execution_failure_info\x18\x0c \x01(\x0b\x32:.temporal.api.failure.v1.ChildWorkflowExecutionFailureInfoH\x00\x12\x64\n&nexus_operation_execution_failure_info\x18\r \x01(\x0b\x32\x32.temporal.api.failure.v1.NexusOperationFailureInfoH\x00\x12V\n\x1anexus_handler_failure_info\x18\x0e \x01(\x0b\x32\x30.temporal.api.failure.v1.NexusHandlerFailureInfoH\x00\x42\x0e\n\x0c\x66\x61ilure_info" \n\x1eMultiOperationExecutionAbortedB\x8e\x01\n\x1aio.temporal.api.failure.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/failure/v1;failure\xaa\x02\x19Temporalio.Api.Failure.V1\xea\x02\x1cTemporalio::Api::Failure::V1b\x06proto3' ) - -_APPLICATIONFAILUREINFO = DESCRIPTOR.message_types_by_name["ApplicationFailureInfo"] -_TIMEOUTFAILUREINFO = DESCRIPTOR.message_types_by_name["TimeoutFailureInfo"] -_CANCELEDFAILUREINFO = DESCRIPTOR.message_types_by_name["CanceledFailureInfo"] -_TERMINATEDFAILUREINFO = DESCRIPTOR.message_types_by_name["TerminatedFailureInfo"] -_SERVERFAILUREINFO = DESCRIPTOR.message_types_by_name["ServerFailureInfo"] -_RESETWORKFLOWFAILUREINFO = DESCRIPTOR.message_types_by_name["ResetWorkflowFailureInfo"] -_ACTIVITYFAILUREINFO = DESCRIPTOR.message_types_by_name["ActivityFailureInfo"] -_CHILDWORKFLOWEXECUTIONFAILUREINFO = DESCRIPTOR.message_types_by_name[ - "ChildWorkflowExecutionFailureInfo" -] -_NEXUSOPERATIONFAILUREINFO = DESCRIPTOR.message_types_by_name[ - "NexusOperationFailureInfo" -] -_NEXUSHANDLERFAILUREINFO = DESCRIPTOR.message_types_by_name["NexusHandlerFailureInfo"] -_FAILURE = DESCRIPTOR.message_types_by_name["Failure"] -_MULTIOPERATIONEXECUTIONABORTED = DESCRIPTOR.message_types_by_name[ - "MultiOperationExecutionAborted" -] -ApplicationFailureInfo = _reflection.GeneratedProtocolMessageType( - "ApplicationFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _APPLICATIONFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.ApplicationFailureInfo) - }, -) -_sym_db.RegisterMessage(ApplicationFailureInfo) - -TimeoutFailureInfo = _reflection.GeneratedProtocolMessageType( - "TimeoutFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _TIMEOUTFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.TimeoutFailureInfo) - }, -) -_sym_db.RegisterMessage(TimeoutFailureInfo) - -CanceledFailureInfo = _reflection.GeneratedProtocolMessageType( - "CanceledFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _CANCELEDFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.CanceledFailureInfo) - }, -) -_sym_db.RegisterMessage(CanceledFailureInfo) - -TerminatedFailureInfo = _reflection.GeneratedProtocolMessageType( - "TerminatedFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _TERMINATEDFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.TerminatedFailureInfo) - }, -) -_sym_db.RegisterMessage(TerminatedFailureInfo) - -ServerFailureInfo = _reflection.GeneratedProtocolMessageType( - "ServerFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _SERVERFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.ServerFailureInfo) - }, -) -_sym_db.RegisterMessage(ServerFailureInfo) - -ResetWorkflowFailureInfo = _reflection.GeneratedProtocolMessageType( - "ResetWorkflowFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _RESETWORKFLOWFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.ResetWorkflowFailureInfo) - }, -) -_sym_db.RegisterMessage(ResetWorkflowFailureInfo) - -ActivityFailureInfo = _reflection.GeneratedProtocolMessageType( - "ActivityFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.ActivityFailureInfo) - }, -) -_sym_db.RegisterMessage(ActivityFailureInfo) - -ChildWorkflowExecutionFailureInfo = _reflection.GeneratedProtocolMessageType( - "ChildWorkflowExecutionFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _CHILDWORKFLOWEXECUTIONFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo) - }, -) -_sym_db.RegisterMessage(ChildWorkflowExecutionFailureInfo) - -NexusOperationFailureInfo = _reflection.GeneratedProtocolMessageType( - "NexusOperationFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.NexusOperationFailureInfo) - }, -) -_sym_db.RegisterMessage(NexusOperationFailureInfo) - -NexusHandlerFailureInfo = _reflection.GeneratedProtocolMessageType( - "NexusHandlerFailureInfo", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSHANDLERFAILUREINFO, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.NexusHandlerFailureInfo) - }, -) -_sym_db.RegisterMessage(NexusHandlerFailureInfo) - -Failure = _reflection.GeneratedProtocolMessageType( - "Failure", - (_message.Message,), - { - "DESCRIPTOR": _FAILURE, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.Failure) - }, -) -_sym_db.RegisterMessage(Failure) - -MultiOperationExecutionAborted = _reflection.GeneratedProtocolMessageType( - "MultiOperationExecutionAborted", - (_message.Message,), - { - "DESCRIPTOR": _MULTIOPERATIONEXECUTIONABORTED, - "__module__": "temporalio.api.failure.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.failure.v1.MultiOperationExecutionAborted) - }, -) -_sym_db.RegisterMessage(MultiOperationExecutionAborted) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\032io.temporal.api.failure.v1B\014MessageProtoP\001Z%go.temporal.io/api/failure/v1;failure\252\002\031Temporalio.Api.Failure.V1\352\002\034Temporalio::Api::Failure::V1" @@ -196,23 +46,23 @@ _TIMEOUTFAILUREINFO._serialized_start = 481 _TIMEOUTFAILUREINFO._serialized_end = 625 _CANCELEDFAILUREINFO._serialized_start = 627 - _CANCELEDFAILUREINFO._serialized_end = 699 - _TERMINATEDFAILUREINFO._serialized_start = 701 - _TERMINATEDFAILUREINFO._serialized_end = 724 - _SERVERFAILUREINFO._serialized_start = 726 - _SERVERFAILUREINFO._serialized_end = 768 - _RESETWORKFLOWFAILUREINFO._serialized_start = 770 - _RESETWORKFLOWFAILUREINFO._serialized_end = 862 - _ACTIVITYFAILUREINFO._serialized_start = 865 - _ACTIVITYFAILUREINFO._serialized_end = 1096 - _CHILDWORKFLOWEXECUTIONFAILUREINFO._serialized_start = 1099 - _CHILDWORKFLOWEXECUTIONFAILUREINFO._serialized_end = 1395 - _NEXUSOPERATIONFAILUREINFO._serialized_start = 1398 - _NEXUSOPERATIONFAILUREINFO._serialized_end = 1558 - _NEXUSHANDLERFAILUREINFO._serialized_start = 1560 - _NEXUSHANDLERFAILUREINFO._serialized_end = 1678 - _FAILURE._serialized_start = 1681 - _FAILURE._serialized_end = 2737 - _MULTIOPERATIONEXECUTIONABORTED._serialized_start = 2739 - _MULTIOPERATIONEXECUTIONABORTED._serialized_end = 2771 + _CANCELEDFAILUREINFO._serialized_end = 717 + _TERMINATEDFAILUREINFO._serialized_start = 719 + _TERMINATEDFAILUREINFO._serialized_end = 760 + _SERVERFAILUREINFO._serialized_start = 762 + _SERVERFAILUREINFO._serialized_end = 804 + _RESETWORKFLOWFAILUREINFO._serialized_start = 806 + _RESETWORKFLOWFAILUREINFO._serialized_end = 898 + _ACTIVITYFAILUREINFO._serialized_start = 901 + _ACTIVITYFAILUREINFO._serialized_end = 1132 + _CHILDWORKFLOWEXECUTIONFAILUREINFO._serialized_start = 1135 + _CHILDWORKFLOWEXECUTIONFAILUREINFO._serialized_end = 1431 + _NEXUSOPERATIONFAILUREINFO._serialized_start = 1434 + _NEXUSOPERATIONFAILUREINFO._serialized_end = 1594 + _NEXUSHANDLERFAILUREINFO._serialized_start = 1596 + _NEXUSHANDLERFAILUREINFO._serialized_end = 1714 + _FAILURE._serialized_start = 1717 + _FAILURE._serialized_end = 2773 + _MULTIOPERATIONEXECUTIONABORTED._serialized_start = 2775 + _MULTIOPERATIONEXECUTIONABORTED._serialized_end = 2807 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/failure/v1/message_pb2.pyi b/temporalio/api/failure/v1/message_pb2.pyi index 76efeb1121..9a10d84c13 100644 --- a/temporalio/api/failure/v1/message_pb2.pyi +++ b/temporalio/api/failure/v1/message_pb2.pyi @@ -4,7 +4,7 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -15,13 +15,9 @@ import temporalio.api.enums.v1.common_pb2 import temporalio.api.enums.v1.nexus_pb2 import temporalio.api.enums.v1.workflow_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class ApplicationFailureInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -32,6 +28,7 @@ class ApplicationFailureInfo(google.protobuf.message.Message): CATEGORY_FIELD_NUMBER: builtins.int type: builtins.str non_retryable: builtins.bool + category: temporalio.api.enums.v1.common_pb2.ApplicationErrorCategory.ValueType @property def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... @property @@ -41,7 +38,7 @@ class ApplicationFailureInfo(google.protobuf.message.Message): still be subject to the maximum retries limit and total time limit defined by the policy. """ - category: temporalio.api.enums.v1.common_pb2.ApplicationErrorCategory.ValueType + def __init__( self, *, @@ -53,13 +50,13 @@ class ApplicationFailureInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "next_retry_delay", b"next_retry_delay" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "category", b"category", "details", @@ -75,6 +72,7 @@ class ApplicationFailureInfo(google.protobuf.message.Message): global___ApplicationFailureInfo = ApplicationFailureInfo +@typing.final class TimeoutFailureInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -94,13 +92,11 @@ class TimeoutFailureInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "last_heartbeat_details", b"last_heartbeat_details" - ], + field_name: typing.Literal["last_heartbeat_details", b"last_heartbeat_details"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "last_heartbeat_details", b"last_heartbeat_details", "timeout_type", @@ -110,35 +106,50 @@ class TimeoutFailureInfo(google.protobuf.message.Message): global___TimeoutFailureInfo = TimeoutFailureInfo +@typing.final class CanceledFailureInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor DETAILS_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + identity: builtins.str + """The identity of the worker or client that requested the cancellation.""" @property def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... def __init__( self, *, details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., + identity: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["details", b"details"] + self, field_name: typing.Literal["details", b"details"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["details", b"details"] + self, field_name: typing.Literal["details", b"details", "identity", b"identity"] ) -> None: ... global___CanceledFailureInfo = CanceledFailureInfo +@typing.final class TerminatedFailureInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + IDENTITY_FIELD_NUMBER: builtins.int + identity: builtins.str + """The identity of the worker or client that requested the termination.""" def __init__( self, + *, + identity: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["identity", b"identity"] ) -> None: ... global___TerminatedFailureInfo = TerminatedFailureInfo +@typing.final class ServerFailureInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -150,11 +161,12 @@ class ServerFailureInfo(google.protobuf.message.Message): non_retryable: builtins.bool = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["non_retryable", b"non_retryable"] + self, field_name: typing.Literal["non_retryable", b"non_retryable"] ) -> None: ... global___ServerFailureInfo = ServerFailureInfo +@typing.final class ResetWorkflowFailureInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -171,19 +183,16 @@ class ResetWorkflowFailureInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "last_heartbeat_details", b"last_heartbeat_details" - ], + field_name: typing.Literal["last_heartbeat_details", b"last_heartbeat_details"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "last_heartbeat_details", b"last_heartbeat_details" - ], + field_name: typing.Literal["last_heartbeat_details", b"last_heartbeat_details"], ) -> None: ... global___ResetWorkflowFailureInfo = ResetWorkflowFailureInfo +@typing.final class ActivityFailureInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -196,10 +205,10 @@ class ActivityFailureInfo(google.protobuf.message.Message): scheduled_event_id: builtins.int started_event_id: builtins.int identity: builtins.str - @property - def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: ... activity_id: builtins.str retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType + @property + def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: ... def __init__( self, *, @@ -211,11 +220,11 @@ class ActivityFailureInfo(google.protobuf.message.Message): retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["activity_type", b"activity_type"] + self, field_name: typing.Literal["activity_type", b"activity_type"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "activity_type", @@ -233,6 +242,7 @@ class ActivityFailureInfo(google.protobuf.message.Message): global___ActivityFailureInfo = ActivityFailureInfo +@typing.final class ChildWorkflowExecutionFailureInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -243,15 +253,15 @@ class ChildWorkflowExecutionFailureInfo(google.protobuf.message.Message): STARTED_EVENT_ID_FIELD_NUMBER: builtins.int RETRY_STATE_FIELD_NUMBER: builtins.int namespace: builtins.str + initiated_event_id: builtins.int + started_event_id: builtins.int + retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... - initiated_event_id: builtins.int - started_event_id: builtins.int - retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType def __init__( self, *, @@ -265,7 +275,7 @@ class ChildWorkflowExecutionFailureInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "workflow_execution", b"workflow_execution", "workflow_type", @@ -274,7 +284,7 @@ class ChildWorkflowExecutionFailureInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "initiated_event_id", b"initiated_event_id", "namespace", @@ -292,7 +302,10 @@ class ChildWorkflowExecutionFailureInfo(google.protobuf.message.Message): global___ChildWorkflowExecutionFailureInfo = ChildWorkflowExecutionFailureInfo +@typing.final class NexusOperationFailureInfo(google.protobuf.message.Message): + """Representation of the Temporal SDK NexusOperationError object that is returned to workflow callers.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor SCHEDULED_EVENT_ID_FIELD_NUMBER: builtins.int @@ -328,7 +341,7 @@ class NexusOperationFailureInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "endpoint", b"endpoint", "operation", @@ -346,6 +359,7 @@ class NexusOperationFailureInfo(google.protobuf.message.Message): global___NexusOperationFailureInfo = NexusOperationFailureInfo +@typing.final class NexusHandlerFailureInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -367,13 +381,14 @@ class NexusHandlerFailureInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "retry_behavior", b"retry_behavior", "type", b"type" ], ) -> None: ... global___NexusHandlerFailureInfo = NexusHandlerFailureInfo +@typing.final class Failure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -416,6 +431,7 @@ class Failure(google.protobuf.message.Message): - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes. (-- api-linter: core::0203::optional=disabled --) """ + @property def cause(self) -> global___Failure: ... @property @@ -465,7 +481,7 @@ class Failure(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_failure_info", b"activity_failure_info", "application_failure_info", @@ -496,7 +512,7 @@ class Failure(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_failure_info", b"activity_failure_info", "application_failure_info", @@ -532,9 +548,9 @@ class Failure(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["failure_info", b"failure_info"] + self, oneof_group: typing.Literal["failure_info", b"failure_info"] ) -> ( - typing_extensions.Literal[ + typing.Literal[ "application_failure_info", "timeout_failure_info", "canceled_failure_info", @@ -551,6 +567,7 @@ class Failure(google.protobuf.message.Message): global___Failure = Failure +@typing.final class MultiOperationExecutionAborted(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor diff --git a/temporalio/api/filter/v1/message_pb2.py b/temporalio/api/filter/v1/message_pb2.py index 3df20337db..776903c3e5 100644 --- a/temporalio/api/filter/v1/message_pb2.py +++ b/temporalio/api/filter/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -24,55 +23,8 @@ b'\n$temporal/api/filter/v1/message.proto\x12\x16temporal.api.filter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/enums/v1/workflow.proto">\n\x17WorkflowExecutionFilter\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t""\n\x12WorkflowTypeFilter\x12\x0c\n\x04name\x18\x01 \x01(\t"u\n\x0fStartTimeFilter\x12\x31\n\rearliest_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0blatest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"N\n\x0cStatusFilter\x12>\n\x06status\x18\x01 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatusB\x89\x01\n\x19io.temporal.api.filter.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/filter/v1;filter\xaa\x02\x18Temporalio.Api.Filter.V1\xea\x02\x1bTemporalio::Api::Filter::V1b\x06proto3' ) - -_WORKFLOWEXECUTIONFILTER = DESCRIPTOR.message_types_by_name["WorkflowExecutionFilter"] -_WORKFLOWTYPEFILTER = DESCRIPTOR.message_types_by_name["WorkflowTypeFilter"] -_STARTTIMEFILTER = DESCRIPTOR.message_types_by_name["StartTimeFilter"] -_STATUSFILTER = DESCRIPTOR.message_types_by_name["StatusFilter"] -WorkflowExecutionFilter = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionFilter", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONFILTER, - "__module__": "temporalio.api.filter.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.filter.v1.WorkflowExecutionFilter) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionFilter) - -WorkflowTypeFilter = _reflection.GeneratedProtocolMessageType( - "WorkflowTypeFilter", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWTYPEFILTER, - "__module__": "temporalio.api.filter.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.filter.v1.WorkflowTypeFilter) - }, -) -_sym_db.RegisterMessage(WorkflowTypeFilter) - -StartTimeFilter = _reflection.GeneratedProtocolMessageType( - "StartTimeFilter", - (_message.Message,), - { - "DESCRIPTOR": _STARTTIMEFILTER, - "__module__": "temporalio.api.filter.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.filter.v1.StartTimeFilter) - }, -) -_sym_db.RegisterMessage(StartTimeFilter) - -StatusFilter = _reflection.GeneratedProtocolMessageType( - "StatusFilter", - (_message.Message,), - { - "DESCRIPTOR": _STATUSFILTER, - "__module__": "temporalio.api.filter.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.filter.v1.StatusFilter) - }, -) -_sym_db.RegisterMessage(StatusFilter) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\031io.temporal.api.filter.v1B\014MessageProtoP\001Z#go.temporal.io/api/filter/v1;filter\252\002\030Temporalio.Api.Filter.V1\352\002\033Temporalio::Api::Filter::V1" diff --git a/temporalio/api/filter/v1/message_pb2.pyi b/temporalio/api/filter/v1/message_pb2.pyi index 26d2efeb18..ec6d88a4f7 100644 --- a/temporalio/api/filter/v1/message_pb2.pyi +++ b/temporalio/api/filter/v1/message_pb2.pyi @@ -4,7 +4,7 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.message @@ -12,13 +12,9 @@ import google.protobuf.timestamp_pb2 import temporalio.api.enums.v1.workflow_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowExecutionFilter(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -34,13 +30,12 @@ class WorkflowExecutionFilter(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "run_id", b"run_id", "workflow_id", b"workflow_id" - ], + field_name: typing.Literal["run_id", b"run_id", "workflow_id", b"workflow_id"], ) -> None: ... global___WorkflowExecutionFilter = WorkflowExecutionFilter +@typing.final class WorkflowTypeFilter(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -51,12 +46,11 @@ class WorkflowTypeFilter(google.protobuf.message.Message): *, name: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["name", b"name"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["name", b"name"]) -> None: ... global___WorkflowTypeFilter = WorkflowTypeFilter +@typing.final class StartTimeFilter(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -74,19 +68,20 @@ class StartTimeFilter(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "earliest_time", b"earliest_time", "latest_time", b"latest_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "earliest_time", b"earliest_time", "latest_time", b"latest_time" ], ) -> None: ... global___StartTimeFilter = StartTimeFilter +@typing.final class StatusFilter(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -97,8 +92,6 @@ class StatusFilter(google.protobuf.message.Message): *, status: temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["status", b"status"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["status", b"status"]) -> None: ... global___StatusFilter = StatusFilter diff --git a/temporalio/api/history/v1/__init__.py b/temporalio/api/history/v1/__init__.py index 3ed424c124..ec7f659624 100644 --- a/temporalio/api/history/v1/__init__.py +++ b/temporalio/api/history/v1/__init__.py @@ -13,6 +13,7 @@ ChildWorkflowExecutionStartedEventAttributes, ChildWorkflowExecutionTerminatedEventAttributes, ChildWorkflowExecutionTimedOutEventAttributes, + DeclinedTargetVersionUpgrade, ExternalWorkflowExecutionCancelRequestedEventAttributes, ExternalWorkflowExecutionSignaledEventAttributes, History, @@ -43,10 +44,13 @@ WorkflowExecutionContinuedAsNewEventAttributes, WorkflowExecutionFailedEventAttributes, WorkflowExecutionOptionsUpdatedEventAttributes, + WorkflowExecutionPausedEventAttributes, WorkflowExecutionSignaledEventAttributes, WorkflowExecutionStartedEventAttributes, WorkflowExecutionTerminatedEventAttributes, WorkflowExecutionTimedOutEventAttributes, + WorkflowExecutionTimeSkippingTransitionedEventAttributes, + WorkflowExecutionUnpausedEventAttributes, WorkflowExecutionUpdateAcceptedEventAttributes, WorkflowExecutionUpdateAdmittedEventAttributes, WorkflowExecutionUpdateCompletedEventAttributes, @@ -75,6 +79,7 @@ "ChildWorkflowExecutionStartedEventAttributes", "ChildWorkflowExecutionTerminatedEventAttributes", "ChildWorkflowExecutionTimedOutEventAttributes", + "DeclinedTargetVersionUpgrade", "ExternalWorkflowExecutionCancelRequestedEventAttributes", "ExternalWorkflowExecutionSignaledEventAttributes", "History", @@ -105,10 +110,13 @@ "WorkflowExecutionContinuedAsNewEventAttributes", "WorkflowExecutionFailedEventAttributes", "WorkflowExecutionOptionsUpdatedEventAttributes", + "WorkflowExecutionPausedEventAttributes", "WorkflowExecutionSignaledEventAttributes", "WorkflowExecutionStartedEventAttributes", "WorkflowExecutionTerminatedEventAttributes", + "WorkflowExecutionTimeSkippingTransitionedEventAttributes", "WorkflowExecutionTimedOutEventAttributes", + "WorkflowExecutionUnpausedEventAttributes", "WorkflowExecutionUpdateAcceptedEventAttributes", "WorkflowExecutionUpdateAdmittedEventAttributes", "WorkflowExecutionUpdateCompletedEventAttributes", diff --git a/temporalio/api/history/v1/message_pb2.py b/temporalio/api/history/v1/message_pb2.py index f48a5946ff..a837ef265f 100644 --- a/temporalio/api/history/v1/message_pb2.py +++ b/temporalio/api/history/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -38,6 +37,12 @@ from temporalio.api.failure.v1 import ( message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, ) +from temporalio.api.nexus.v1 import ( + message_pb2 as temporal_dot_api_dot_nexus_dot_v1_dot_message__pb2, +) +from temporalio.api.sdk.v1 import ( + event_group_marker_pb2 as temporal_dot_api_dot_sdk_dot_v1_dot_event__group__marker__pb2, +) from temporalio.api.sdk.v1 import ( task_complete_metadata_pb2 as temporal_dot_api_dot_sdk_dot_v1_dot_task__complete__metadata__pb2, ) @@ -55,914 +60,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n%temporal/api/history/v1/message.proto\x12\x17temporal.api.history.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a&temporal/api/enums/v1/event_type.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a"temporal/api/enums/v1/update.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a&temporal/api/workflow/v1/message.proto\x1a\x30temporal/api/sdk/v1/task_complete_metadata.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto"\xd6\x0f\n\'WorkflowExecutionStartedEventAttributes\x12;\n\rworkflow_type\x18\x01 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12!\n\x19parent_workflow_namespace\x18\x02 \x01(\t\x12$\n\x1cparent_workflow_namespace_id\x18\x1b \x01(\t\x12L\n\x19parent_workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12!\n\x19parent_initiated_event_id\x18\x04 \x01(\x03\x12\x38\n\ntask_queue\x18\x05 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12"\n\x1a\x63ontinued_execution_run_id\x18\n \x01(\t\x12@\n\tinitiator\x18\x0b \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12;\n\x11\x63ontinued_failure\x18\x0c \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\r \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12!\n\x19original_execution_run_id\x18\x0e \x01(\t\x12\x10\n\x08identity\x18\x0f \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x10 \x01(\t\x12\x39\n\x0cretry_policy\x18\x11 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x0f\n\x07\x61ttempt\x18\x12 \x01(\x05\x12\x46\n"workflow_execution_expiration_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rcron_schedule\x18\x14 \x01(\t\x12>\n\x1b\x66irst_workflow_task_backoff\x18\x15 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x04memo\x18\x16 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x17 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x45\n\x16prev_auto_reset_points\x18\x18 \x01(\x0b\x32%.temporal.api.workflow.v1.ResetPoints\x12.\n\x06header\x18\x19 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12&\n\x1eparent_initiated_event_version\x18\x1a \x01(\x03\x12\x13\n\x0bworkflow_id\x18\x1c \x01(\t\x12L\n\x14source_version_stamp\x18\x1d \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\x14\x63ompletion_callbacks\x18\x1e \x03(\x0b\x32 .temporal.api.common.v1.Callback\x12J\n\x17root_workflow_execution\x18\x1f \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1e\n\x12inherited_build_id\x18 \x01(\tB\x02\x18\x01\x12I\n\x13versioning_override\x18! \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12\x33\n\'parent_pinned_worker_deployment_version\x18" \x01(\tB\x02\x18\x01\x12\x32\n\x08priority\x18# \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12U\n\x18inherited_pinned_version\x18% \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12 \n\x18\x65\x61ger_execution_accepted\x18& \x01(\x08J\x04\x08$\x10%R parent_pinned_deployment_version"\xa5\x01\n)WorkflowExecutionCompletedEventAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x1c\n\x14new_execution_run_id\x18\x03 \x01(\t"\xdb\x01\n&WorkflowExecutionFailedEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x36\n\x0bretry_state\x18\x02 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\x12\x1c\n\x14new_execution_run_id\x18\x04 \x01(\t"\x80\x01\n(WorkflowExecutionTimedOutEventAttributes\x12\x36\n\x0bretry_state\x18\x01 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\x12\x1c\n\x14new_execution_run_id\x18\x02 \x01(\t"\xc8\x06\n.WorkflowExecutionContinuedAsNewEventAttributes\x12\x1c\n\x14new_execution_run_id\x18\x01 \x01(\t\x12;\n\rworkflow_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x03 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x14workflow_run_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n workflow_task_completed_event_id\x18\x07 \x01(\x03\x12\x39\n\x16\x62\x61\x63koff_start_interval\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\tinitiator\x18\t \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12\x35\n\x07\x66\x61ilure\x18\n \x01(\x0b\x32 .temporal.api.failure.v1.FailureB\x02\x18\x01\x12@\n\x16last_completion_result\x18\x0b \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x0c \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\r \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0e \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1c\n\x10inherit_build_id\x18\x0f \x01(\x08\x42\x02\x18\x01"\xac\x01\n$WorkflowTaskScheduledEventAttributes\x12\x38\n\ntask_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x39\n\x16start_to_close_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07\x61ttempt\x18\x03 \x01(\x05"\x92\x02\n"WorkflowTaskStartedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x1f\n\x17suggest_continue_as_new\x18\x04 \x01(\x08\x12\x1a\n\x12history_size_bytes\x18\x05 \x01(\x03\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12%\n\x19\x62uild_id_redirect_counter\x18\x07 \x01(\x03\x42\x02\x18\x01"\x82\x05\n$WorkflowTaskCompletedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x1b\n\x0f\x62inary_checksum\x18\x04 \x01(\tB\x02\x18\x01\x12\x46\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12H\n\x0csdk_metadata\x18\x06 \x01(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowTaskCompletedMetadata\x12\x43\n\x11metering_metadata\x18\r \x01(\x0b\x32(.temporal.api.common.v1.MeteringMetadata\x12>\n\ndeployment\x18\x07 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12\x46\n\x13versioning_behavior\x18\x08 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehavior\x12%\n\x19worker_deployment_version\x18\t \x01(\tB\x02\x18\x01\x12\x1e\n\x16worker_deployment_name\x18\n \x01(\t\x12O\n\x12\x64\x65ployment_version\x18\x0b \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion"\x95\x01\n#WorkflowTaskTimedOutEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12\x38\n\x0ctimeout_type\x18\x03 \x01(\x0e\x32".temporal.api.enums.v1.TimeoutType"\x87\x03\n!WorkflowTaskFailedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12=\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCause\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x13\n\x0b\x62\x61se_run_id\x18\x06 \x01(\t\x12\x12\n\nnew_run_id\x18\x07 \x01(\t\x12\x1a\n\x12\x66ork_event_version\x18\x08 \x01(\x03\x12\x1b\n\x0f\x62inary_checksum\x18\t \x01(\tB\x02\x18\x01\x12\x46\n\x0eworker_version\x18\n \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01"\xc2\x05\n$ActivityTaskScheduledEventAttributes\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12;\n\ractivity_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12.\n\x06header\x18\x05 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12/\n\x05input\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12<\n\x19schedule_to_close_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n workflow_task_completed_event_id\x18\x0b \x01(\x03\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12!\n\x15use_workflow_build_id\x18\r \x01(\x08\x42\x02\x18\x01\x12\x32\n\x08priority\x18\x0e \x01(\x0b\x32 .temporal.api.common.v1.PriorityJ\x04\x08\x03\x10\x04"\x9e\x02\n"ActivityTaskStartedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x0f\n\x07\x61ttempt\x18\x04 \x01(\x05\x12\x36\n\x0clast_failure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12%\n\x19\x62uild_id_redirect_counter\x18\x07 \x01(\x03\x42\x02\x18\x01"\xe8\x01\n$ActivityTaskCompletedEventAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x1a\n\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\n\x10started_event_id\x18\x03 \x01(\x03\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x46\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01"\x9e\x02\n!ActivityTaskFailedEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1a\n\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\n\x10started_event_id\x18\x03 \x01(\x03\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x36\n\x0bretry_state\x18\x05 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01"\xc6\x01\n#ActivityTaskTimedOutEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1a\n\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\n\x10started_event_id\x18\x03 \x01(\x03\x12\x36\n\x0bretry_state\x18\x04 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"r\n*ActivityTaskCancelRequestedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03"\x92\x02\n#ActivityTaskCanceledEventAttributes\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12(\n latest_cancel_requested_event_id\x18\x02 \x01(\x03\x12\x1a\n\x12scheduled_event_id\x18\x03 \x01(\x03\x12\x18\n\x10started_event_id\x18\x04 \x01(\x03\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01"\x93\x01\n\x1bTimerStartedEventAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x38\n\x15start_to_fire_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03"G\n\x19TimerFiredEventAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03"\x86\x01\n\x1cTimerCanceledEventAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\x12\x10\n\x08identity\x18\x04 \x01(\t"\xc7\x01\n/WorkflowExecutionCancelRequestedEventAttributes\x12\r\n\x05\x63\x61use\x18\x01 \x01(\t\x12#\n\x1b\x65xternal_initiated_event_id\x18\x02 \x01(\x03\x12N\n\x1b\x65xternal_workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x04 \x01(\t"\x87\x01\n(WorkflowExecutionCanceledEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"\xe9\x02\n\x1dMarkerRecordedEventAttributes\x12\x13\n\x0bmarker_name\x18\x01 \x01(\t\x12T\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32\x43.temporal.api.history.v1.MarkerRecordedEventAttributes.DetailsEntry\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\x12.\n\x06header\x18\x04 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x1aP\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads:\x02\x38\x01"\xab\x02\n(WorkflowExecutionSignaledEventAttributes\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12/\n\x05input\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12.\n\x06header\x18\x04 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\'\n\x1bskip_generate_workflow_task\x18\x05 \x01(\x08\x42\x02\x18\x01\x12N\n\x1b\x65xternal_workflow_execution\x18\x06 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution"\x81\x01\n*WorkflowExecutionTerminatedEventAttributes\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t"\x9c\x02\n>RequestCancelExternalWorkflowExecutionInitiatedEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x07\x63ontrol\x18\x04 \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x63hild_workflow_only\x18\x05 \x01(\x08\x12\x0e\n\x06reason\x18\x06 \x01(\t"\xda\x02\n;RequestCancelExternalWorkflowExecutionFailedEventAttributes\x12P\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x41.temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x04 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x13\n\x07\x63ontrol\x18\x06 \x01(\tB\x02\x18\x01"\xc5\x01\n7ExternalWorkflowExecutionCancelRequestedEventAttributes\x12\x1a\n\x12initiated_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x04 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution"\xfb\x02\n7SignalExternalWorkflowExecutionInitiatedEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\t \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0bsignal_name\x18\x04 \x01(\t\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x13\n\x07\x63ontrol\x18\x06 \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x63hild_workflow_only\x18\x07 \x01(\x08\x12.\n\x06header\x18\x08 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header"\xd3\x02\n4SignalExternalWorkflowExecutionFailedEventAttributes\x12P\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x41.temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x04 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x13\n\x07\x63ontrol\x18\x06 \x01(\tB\x02\x18\x01"\xd3\x01\n0ExternalWorkflowExecutionSignaledEventAttributes\x12\x1a\n\x12initiated_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x05 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x07\x63ontrol\x18\x04 \x01(\tB\x02\x18\x01"\x9e\x01\n-UpsertWorkflowSearchAttributesEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x43\n\x11search_attributes\x18\x02 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes"\x8a\x01\n)WorkflowPropertiesModifiedEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x33\n\rupserted_memo\x18\x02 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo"\xe8\x07\n3StartChildWorkflowExecutionInitiatedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x12 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x13parent_close_policy\x18\t \x01(\x0e\x32(.temporal.api.enums.v1.ParentClosePolicy\x12\x13\n\x07\x63ontrol\x18\n \x01(\tB\x02\x18\x01\x12(\n workflow_task_completed_event_id\x18\x0b \x01(\x03\x12N\n\x18workflow_id_reuse_policy\x18\x0c \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\r \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\x0e \x01(\t\x12.\n\x06header\x18\x0f \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\x10 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x11 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1c\n\x10inherit_build_id\x18\x13 \x01(\x08\x42\x02\x18\x01\x12\x32\n\x08priority\x18\x14 \x01(\x0b\x32 .temporal.api.common.v1.Priority"\xd6\x02\n0StartChildWorkflowExecutionFailedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x08 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12L\n\x05\x63\x61use\x18\x04 \x01(\x0e\x32=.temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause\x12\x13\n\x07\x63ontrol\x18\x05 \x01(\tB\x02\x18\x01\x12\x1a\n\x12initiated_event_id\x18\x06 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x07 \x01(\x03"\xa7\x02\n,ChildWorkflowExecutionStartedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x06 \x01(\t\x12\x1a\n\x12initiated_event_id\x18\x02 \x01(\x03\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12.\n\x06header\x18\x05 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header"\xc5\x02\n.ChildWorkflowExecutionCompletedEventAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\n\x10started_event_id\x18\x06 \x01(\x03"\xfb\x02\n+ChildWorkflowExecutionFailedEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x08 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\n\x10started_event_id\x18\x06 \x01(\x03\x12\x36\n\x0bretry_state\x18\x07 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"\xc5\x02\n-ChildWorkflowExecutionCanceledEventAttributes\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\n\x10started_event_id\x18\x06 \x01(\x03"\xca\x02\n-ChildWorkflowExecutionTimedOutEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03\x12\x36\n\x0bretry_state\x18\x06 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"\x94\x02\n/ChildWorkflowExecutionTerminatedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x06 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03"\x84\x02\n.WorkflowExecutionOptionsUpdatedEventAttributes\x12I\n\x13versioning_override\x18\x01 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12!\n\x19unset_versioning_override\x18\x02 \x01(\x08\x12\x1b\n\x13\x61ttached_request_id\x18\x03 \x01(\t\x12G\n\x1d\x61ttached_completion_callbacks\x18\x04 \x03(\x0b\x32 .temporal.api.common.v1.Callback"\xc0\x02\n3WorkflowPropertiesModifiedExternallyEventAttributes\x12\x16\n\x0enew_task_queue\x18\x01 \x01(\t\x12<\n\x19new_workflow_task_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x18new_workflow_run_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x41\n\x1enew_workflow_execution_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\rupserted_memo\x18\x05 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo"\x90\x01\n3ActivityPropertiesModifiedExternallyEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12=\n\x10new_retry_policy\x18\x02 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy"\xdc\x01\n.WorkflowExecutionUpdateAcceptedEventAttributes\x12\x1c\n\x14protocol_instance_id\x18\x01 \x01(\t\x12#\n\x1b\x61\x63\x63\x65pted_request_message_id\x18\x02 \x01(\t\x12,\n$accepted_request_sequencing_event_id\x18\x03 \x01(\x03\x12\x39\n\x10\x61\x63\x63\x65pted_request\x18\x04 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request"\xaa\x01\n/WorkflowExecutionUpdateCompletedEventAttributes\x12*\n\x04meta\x18\x01 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x19\n\x11\x61\x63\x63\x65pted_event_id\x18\x03 \x01(\x03\x12\x30\n\x07outcome\x18\x02 \x01(\x0b\x32\x1f.temporal.api.update.v1.Outcome"\x8f\x02\n.WorkflowExecutionUpdateRejectedEventAttributes\x12\x1c\n\x14protocol_instance_id\x18\x01 \x01(\t\x12#\n\x1brejected_request_message_id\x18\x02 \x01(\t\x12,\n$rejected_request_sequencing_event_id\x18\x03 \x01(\x03\x12\x39\n\x10rejected_request\x18\x04 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"\xa4\x01\n.WorkflowExecutionUpdateAdmittedEventAttributes\x12\x30\n\x07request\x18\x01 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\x12@\n\x06origin\x18\x02 \x01(\x0e\x32\x30.temporal.api.enums.v1.UpdateAdmittedEventOrigin"\xbb\x03\n&NexusOperationScheduledEventAttributes\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x11\n\toperation\x18\x03 \x01(\t\x12.\n\x05input\x18\x04 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x66\n\x0cnexus_header\x18\x06 \x03(\x0b\x32P.temporal.api.history.v1.NexusOperationScheduledEventAttributes.NexusHeaderEntry\x12(\n workflow_task_completed_event_id\x18\x07 \x01(\x03\x12\x12\n\nrequest_id\x18\x08 \x01(\t\x12\x13\n\x0b\x65ndpoint_id\x18\t \x01(\t\x1a\x32\n\x10NexusHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x89\x01\n$NexusOperationStartedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x17\n\x0foperation_token\x18\x05 \x01(\t"\x89\x01\n&NexusOperationCompletedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12/\n\x06result\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x12\n\nrequest_id\x18\x03 \x01(\t"\x88\x01\n#NexusOperationFailedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x12\n\nrequest_id\x18\x03 \x01(\t"\x8a\x01\n%NexusOperationTimedOutEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x12\n\nrequest_id\x18\x03 \x01(\t"\x8a\x01\n%NexusOperationCanceledEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x12\n\nrequest_id\x18\x03 \x01(\t"t\n,NexusOperationCancelRequestedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03"\x97\x01\n3NexusOperationCancelRequestCompletedEventAttributes\x12\x1a\n\x12requested_event_id\x18\x01 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x1a\n\x12scheduled_event_id\x18\x03 \x01(\x03"\xc7\x01\n0NexusOperationCancelRequestFailedEventAttributes\x12\x1a\n\x12requested_event_id\x18\x01 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x31\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1a\n\x12scheduled_event_id\x18\x04 \x01(\x03"\xbe;\n\x0cHistoryEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\x03\x12.\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nevent_type\x18\x03 \x01(\x0e\x32 .temporal.api.enums.v1.EventType\x12\x0f\n\x07version\x18\x04 \x01(\x03\x12\x0f\n\x07task_id\x18\x05 \x01(\x03\x12\x1a\n\x11worker_may_ignore\x18\xac\x02 \x01(\x08\x12\x39\n\ruser_metadata\x18\xad\x02 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12,\n\x05links\x18\xae\x02 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12w\n+workflow_execution_started_event_attributes\x18\x06 \x01(\x0b\x32@.temporal.api.history.v1.WorkflowExecutionStartedEventAttributesH\x00\x12{\n-workflow_execution_completed_event_attributes\x18\x07 \x01(\x0b\x32\x42.temporal.api.history.v1.WorkflowExecutionCompletedEventAttributesH\x00\x12u\n*workflow_execution_failed_event_attributes\x18\x08 \x01(\x0b\x32?.temporal.api.history.v1.WorkflowExecutionFailedEventAttributesH\x00\x12z\n-workflow_execution_timed_out_event_attributes\x18\t \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributesH\x00\x12q\n(workflow_task_scheduled_event_attributes\x18\n \x01(\x0b\x32=.temporal.api.history.v1.WorkflowTaskScheduledEventAttributesH\x00\x12m\n&workflow_task_started_event_attributes\x18\x0b \x01(\x0b\x32;.temporal.api.history.v1.WorkflowTaskStartedEventAttributesH\x00\x12q\n(workflow_task_completed_event_attributes\x18\x0c \x01(\x0b\x32=.temporal.api.history.v1.WorkflowTaskCompletedEventAttributesH\x00\x12p\n(workflow_task_timed_out_event_attributes\x18\r \x01(\x0b\x32<.temporal.api.history.v1.WorkflowTaskTimedOutEventAttributesH\x00\x12k\n%workflow_task_failed_event_attributes\x18\x0e \x01(\x0b\x32:.temporal.api.history.v1.WorkflowTaskFailedEventAttributesH\x00\x12q\n(activity_task_scheduled_event_attributes\x18\x0f \x01(\x0b\x32=.temporal.api.history.v1.ActivityTaskScheduledEventAttributesH\x00\x12m\n&activity_task_started_event_attributes\x18\x10 \x01(\x0b\x32;.temporal.api.history.v1.ActivityTaskStartedEventAttributesH\x00\x12q\n(activity_task_completed_event_attributes\x18\x11 \x01(\x0b\x32=.temporal.api.history.v1.ActivityTaskCompletedEventAttributesH\x00\x12k\n%activity_task_failed_event_attributes\x18\x12 \x01(\x0b\x32:.temporal.api.history.v1.ActivityTaskFailedEventAttributesH\x00\x12p\n(activity_task_timed_out_event_attributes\x18\x13 \x01(\x0b\x32<.temporal.api.history.v1.ActivityTaskTimedOutEventAttributesH\x00\x12^\n\x1etimer_started_event_attributes\x18\x14 \x01(\x0b\x32\x34.temporal.api.history.v1.TimerStartedEventAttributesH\x00\x12Z\n\x1ctimer_fired_event_attributes\x18\x15 \x01(\x0b\x32\x32.temporal.api.history.v1.TimerFiredEventAttributesH\x00\x12~\n/activity_task_cancel_requested_event_attributes\x18\x16 \x01(\x0b\x32\x43.temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributesH\x00\x12o\n\'activity_task_canceled_event_attributes\x18\x17 \x01(\x0b\x32<.temporal.api.history.v1.ActivityTaskCanceledEventAttributesH\x00\x12`\n\x1ftimer_canceled_event_attributes\x18\x18 \x01(\x0b\x32\x35.temporal.api.history.v1.TimerCanceledEventAttributesH\x00\x12\x62\n marker_recorded_event_attributes\x18\x19 \x01(\x0b\x32\x36.temporal.api.history.v1.MarkerRecordedEventAttributesH\x00\x12y\n,workflow_execution_signaled_event_attributes\x18\x1a \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionSignaledEventAttributesH\x00\x12}\n.workflow_execution_terminated_event_attributes\x18\x1b \x01(\x0b\x32\x43.temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributesH\x00\x12\x88\x01\n4workflow_execution_cancel_requested_event_attributes\x18\x1c \x01(\x0b\x32H.temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributesH\x00\x12y\n,workflow_execution_canceled_event_attributes\x18\x1d \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionCanceledEventAttributesH\x00\x12\xa8\x01\nErequest_cancel_external_workflow_execution_initiated_event_attributes\x18\x1e \x01(\x0b\x32W.temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributesH\x00\x12\xa2\x01\nBrequest_cancel_external_workflow_execution_failed_event_attributes\x18\x1f \x01(\x0b\x32T.temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributesH\x00\x12\x99\x01\n=external_workflow_execution_cancel_requested_event_attributes\x18 \x01(\x0b\x32P.temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributesH\x00\x12\x87\x01\n4workflow_execution_continued_as_new_event_attributes\x18! \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributesH\x00\x12\x91\x01\n9start_child_workflow_execution_initiated_event_attributes\x18" \x01(\x0b\x32L.temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributesH\x00\x12\x8b\x01\n6start_child_workflow_execution_failed_event_attributes\x18# \x01(\x0b\x32I.temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributesH\x00\x12\x82\x01\n1child_workflow_execution_started_event_attributes\x18$ \x01(\x0b\x32\x45.temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributesH\x00\x12\x86\x01\n3child_workflow_execution_completed_event_attributes\x18% \x01(\x0b\x32G.temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributesH\x00\x12\x80\x01\n0child_workflow_execution_failed_event_attributes\x18& \x01(\x0b\x32\x44.temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributesH\x00\x12\x84\x01\n2child_workflow_execution_canceled_event_attributes\x18\' \x01(\x0b\x32\x46.temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributesH\x00\x12\x85\x01\n3child_workflow_execution_timed_out_event_attributes\x18( \x01(\x0b\x32\x46.temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributesH\x00\x12\x88\x01\n4child_workflow_execution_terminated_event_attributes\x18) \x01(\x0b\x32H.temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributesH\x00\x12\x99\x01\n=signal_external_workflow_execution_initiated_event_attributes\x18* \x01(\x0b\x32P.temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributesH\x00\x12\x93\x01\n:signal_external_workflow_execution_failed_event_attributes\x18+ \x01(\x0b\x32M.temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributesH\x00\x12\x8a\x01\n5external_workflow_execution_signaled_event_attributes\x18, \x01(\x0b\x32I.temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributesH\x00\x12\x84\x01\n2upsert_workflow_search_attributes_event_attributes\x18- \x01(\x0b\x32\x46.temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributesH\x00\x12\x86\x01\n3workflow_execution_update_accepted_event_attributes\x18. \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributesH\x00\x12\x86\x01\n3workflow_execution_update_rejected_event_attributes\x18/ \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributesH\x00\x12\x88\x01\n4workflow_execution_update_completed_event_attributes\x18\x30 \x01(\x0b\x32H.temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributesH\x00\x12\x90\x01\n8workflow_properties_modified_externally_event_attributes\x18\x31 \x01(\x0b\x32L.temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributesH\x00\x12\x90\x01\n8activity_properties_modified_externally_event_attributes\x18\x32 \x01(\x0b\x32L.temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributesH\x00\x12{\n-workflow_properties_modified_event_attributes\x18\x33 \x01(\x0b\x32\x42.temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributesH\x00\x12\x86\x01\n3workflow_execution_update_admitted_event_attributes\x18\x34 \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributesH\x00\x12u\n*nexus_operation_scheduled_event_attributes\x18\x35 \x01(\x0b\x32?.temporal.api.history.v1.NexusOperationScheduledEventAttributesH\x00\x12q\n(nexus_operation_started_event_attributes\x18\x36 \x01(\x0b\x32=.temporal.api.history.v1.NexusOperationStartedEventAttributesH\x00\x12u\n*nexus_operation_completed_event_attributes\x18\x37 \x01(\x0b\x32?.temporal.api.history.v1.NexusOperationCompletedEventAttributesH\x00\x12o\n\'nexus_operation_failed_event_attributes\x18\x38 \x01(\x0b\x32<.temporal.api.history.v1.NexusOperationFailedEventAttributesH\x00\x12s\n)nexus_operation_canceled_event_attributes\x18\x39 \x01(\x0b\x32>.temporal.api.history.v1.NexusOperationCanceledEventAttributesH\x00\x12t\n*nexus_operation_timed_out_event_attributes\x18: \x01(\x0b\x32>.temporal.api.history.v1.NexusOperationTimedOutEventAttributesH\x00\x12\x82\x01\n1nexus_operation_cancel_requested_event_attributes\x18; \x01(\x0b\x32\x45.temporal.api.history.v1.NexusOperationCancelRequestedEventAttributesH\x00\x12\x86\x01\n3workflow_execution_options_updated_event_attributes\x18< \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributesH\x00\x12\x91\x01\n9nexus_operation_cancel_request_completed_event_attributes\x18= \x01(\x0b\x32L.temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributesH\x00\x12\x8b\x01\n6nexus_operation_cancel_request_failed_event_attributes\x18> \x01(\x0b\x32I.temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributesH\x00\x42\x0c\n\nattributes"@\n\x07History\x12\x35\n\x06\x65vents\x18\x01 \x03(\x0b\x32%.temporal.api.history.v1.HistoryEventB\x8e\x01\n\x1aio.temporal.api.history.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/history/v1;history\xaa\x02\x19Temporalio.Api.History.V1\xea\x02\x1cTemporalio::Api::History::V1b\x06proto3' -) - - -_WORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionStartedEventAttributes" -] -_WORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionCompletedEventAttributes" -] -_WORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionFailedEventAttributes" -] -_WORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionTimedOutEventAttributes" -] -_WORKFLOWEXECUTIONCONTINUEDASNEWEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionContinuedAsNewEventAttributes" -] -_WORKFLOWTASKSCHEDULEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowTaskScheduledEventAttributes" -] -_WORKFLOWTASKSTARTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowTaskStartedEventAttributes" -] -_WORKFLOWTASKCOMPLETEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowTaskCompletedEventAttributes" -] -_WORKFLOWTASKTIMEDOUTEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowTaskTimedOutEventAttributes" -] -_WORKFLOWTASKFAILEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowTaskFailedEventAttributes" -] -_ACTIVITYTASKSCHEDULEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ActivityTaskScheduledEventAttributes" -] -_ACTIVITYTASKSTARTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ActivityTaskStartedEventAttributes" -] -_ACTIVITYTASKCOMPLETEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ActivityTaskCompletedEventAttributes" -] -_ACTIVITYTASKFAILEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ActivityTaskFailedEventAttributes" -] -_ACTIVITYTASKTIMEDOUTEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ActivityTaskTimedOutEventAttributes" -] -_ACTIVITYTASKCANCELREQUESTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ActivityTaskCancelRequestedEventAttributes" -] -_ACTIVITYTASKCANCELEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ActivityTaskCanceledEventAttributes" -] -_TIMERSTARTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "TimerStartedEventAttributes" -] -_TIMERFIREDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "TimerFiredEventAttributes" -] -_TIMERCANCELEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "TimerCanceledEventAttributes" -] -_WORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionCancelRequestedEventAttributes" -] -_WORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionCanceledEventAttributes" -] -_MARKERRECORDEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "MarkerRecordedEventAttributes" -] -_MARKERRECORDEDEVENTATTRIBUTES_DETAILSENTRY = ( - _MARKERRECORDEDEVENTATTRIBUTES.nested_types_by_name["DetailsEntry"] -) -_WORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionSignaledEventAttributes" -] -_WORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionTerminatedEventAttributes" -] -_REQUESTCANCELEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES = ( - DESCRIPTOR.message_types_by_name[ - "RequestCancelExternalWorkflowExecutionInitiatedEventAttributes" - ] -) -_REQUESTCANCELEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES = ( - DESCRIPTOR.message_types_by_name[ - "RequestCancelExternalWorkflowExecutionFailedEventAttributes" - ] -) -_EXTERNALWORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES = ( - DESCRIPTOR.message_types_by_name[ - "ExternalWorkflowExecutionCancelRequestedEventAttributes" - ] -) -_SIGNALEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES = ( - DESCRIPTOR.message_types_by_name[ - "SignalExternalWorkflowExecutionInitiatedEventAttributes" - ] -) -_SIGNALEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES = ( - DESCRIPTOR.message_types_by_name[ - "SignalExternalWorkflowExecutionFailedEventAttributes" - ] -) -_EXTERNALWORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ExternalWorkflowExecutionSignaledEventAttributes" -] -_UPSERTWORKFLOWSEARCHATTRIBUTESEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "UpsertWorkflowSearchAttributesEventAttributes" -] -_WORKFLOWPROPERTIESMODIFIEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowPropertiesModifiedEventAttributes" -] -_STARTCHILDWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "StartChildWorkflowExecutionInitiatedEventAttributes" -] -_STARTCHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "StartChildWorkflowExecutionFailedEventAttributes" -] -_CHILDWORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ChildWorkflowExecutionStartedEventAttributes" -] -_CHILDWORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ChildWorkflowExecutionCompletedEventAttributes" -] -_CHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ChildWorkflowExecutionFailedEventAttributes" -] -_CHILDWORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ChildWorkflowExecutionCanceledEventAttributes" -] -_CHILDWORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ChildWorkflowExecutionTimedOutEventAttributes" -] -_CHILDWORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ChildWorkflowExecutionTerminatedEventAttributes" -] -_WORKFLOWEXECUTIONOPTIONSUPDATEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionOptionsUpdatedEventAttributes" -] -_WORKFLOWPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowPropertiesModifiedExternallyEventAttributes" -] -_ACTIVITYPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "ActivityPropertiesModifiedExternallyEventAttributes" -] -_WORKFLOWEXECUTIONUPDATEACCEPTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionUpdateAcceptedEventAttributes" -] -_WORKFLOWEXECUTIONUPDATECOMPLETEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionUpdateCompletedEventAttributes" -] -_WORKFLOWEXECUTIONUPDATEREJECTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionUpdateRejectedEventAttributes" -] -_WORKFLOWEXECUTIONUPDATEADMITTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionUpdateAdmittedEventAttributes" -] -_NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "NexusOperationScheduledEventAttributes" -] -_NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES_NEXUSHEADERENTRY = ( - _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES.nested_types_by_name["NexusHeaderEntry"] -) -_NEXUSOPERATIONSTARTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "NexusOperationStartedEventAttributes" -] -_NEXUSOPERATIONCOMPLETEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "NexusOperationCompletedEventAttributes" -] -_NEXUSOPERATIONFAILEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "NexusOperationFailedEventAttributes" -] -_NEXUSOPERATIONTIMEDOUTEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "NexusOperationTimedOutEventAttributes" -] -_NEXUSOPERATIONCANCELEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "NexusOperationCanceledEventAttributes" -] -_NEXUSOPERATIONCANCELREQUESTEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "NexusOperationCancelRequestedEventAttributes" -] -_NEXUSOPERATIONCANCELREQUESTCOMPLETEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "NexusOperationCancelRequestCompletedEventAttributes" -] -_NEXUSOPERATIONCANCELREQUESTFAILEDEVENTATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "NexusOperationCancelRequestFailedEventAttributes" -] -_HISTORYEVENT = DESCRIPTOR.message_types_by_name["HistoryEvent"] -_HISTORY = DESCRIPTOR.message_types_by_name["History"] -WorkflowExecutionStartedEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionStartedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionStartedEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionStartedEventAttributes) - -WorkflowExecutionCompletedEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionCompletedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionCompletedEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionCompletedEventAttributes) - -WorkflowExecutionFailedEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionFailedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionFailedEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionFailedEventAttributes) - -WorkflowExecutionTimedOutEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionTimedOutEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionTimedOutEventAttributes) - -WorkflowExecutionContinuedAsNewEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionContinuedAsNewEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONCONTINUEDASNEWEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(WorkflowExecutionContinuedAsNewEventAttributes) - -WorkflowTaskScheduledEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowTaskScheduledEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWTASKSCHEDULEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowTaskScheduledEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowTaskScheduledEventAttributes) - -WorkflowTaskStartedEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowTaskStartedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWTASKSTARTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowTaskStartedEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowTaskStartedEventAttributes) - -WorkflowTaskCompletedEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowTaskCompletedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWTASKCOMPLETEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowTaskCompletedEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowTaskCompletedEventAttributes) - -WorkflowTaskTimedOutEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowTaskTimedOutEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWTASKTIMEDOUTEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowTaskTimedOutEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowTaskTimedOutEventAttributes) - -WorkflowTaskFailedEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowTaskFailedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWTASKFAILEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowTaskFailedEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowTaskFailedEventAttributes) - -ActivityTaskScheduledEventAttributes = _reflection.GeneratedProtocolMessageType( - "ActivityTaskScheduledEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTASKSCHEDULEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ActivityTaskScheduledEventAttributes) - }, -) -_sym_db.RegisterMessage(ActivityTaskScheduledEventAttributes) - -ActivityTaskStartedEventAttributes = _reflection.GeneratedProtocolMessageType( - "ActivityTaskStartedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTASKSTARTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ActivityTaskStartedEventAttributes) - }, -) -_sym_db.RegisterMessage(ActivityTaskStartedEventAttributes) - -ActivityTaskCompletedEventAttributes = _reflection.GeneratedProtocolMessageType( - "ActivityTaskCompletedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTASKCOMPLETEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ActivityTaskCompletedEventAttributes) - }, -) -_sym_db.RegisterMessage(ActivityTaskCompletedEventAttributes) - -ActivityTaskFailedEventAttributes = _reflection.GeneratedProtocolMessageType( - "ActivityTaskFailedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTASKFAILEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ActivityTaskFailedEventAttributes) - }, -) -_sym_db.RegisterMessage(ActivityTaskFailedEventAttributes) - -ActivityTaskTimedOutEventAttributes = _reflection.GeneratedProtocolMessageType( - "ActivityTaskTimedOutEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTASKTIMEDOUTEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ActivityTaskTimedOutEventAttributes) - }, -) -_sym_db.RegisterMessage(ActivityTaskTimedOutEventAttributes) - -ActivityTaskCancelRequestedEventAttributes = _reflection.GeneratedProtocolMessageType( - "ActivityTaskCancelRequestedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTASKCANCELREQUESTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributes) - }, -) -_sym_db.RegisterMessage(ActivityTaskCancelRequestedEventAttributes) - -ActivityTaskCanceledEventAttributes = _reflection.GeneratedProtocolMessageType( - "ActivityTaskCanceledEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTASKCANCELEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ActivityTaskCanceledEventAttributes) - }, -) -_sym_db.RegisterMessage(ActivityTaskCanceledEventAttributes) - -TimerStartedEventAttributes = _reflection.GeneratedProtocolMessageType( - "TimerStartedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _TIMERSTARTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.TimerStartedEventAttributes) - }, -) -_sym_db.RegisterMessage(TimerStartedEventAttributes) - -TimerFiredEventAttributes = _reflection.GeneratedProtocolMessageType( - "TimerFiredEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _TIMERFIREDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.TimerFiredEventAttributes) - }, -) -_sym_db.RegisterMessage(TimerFiredEventAttributes) - -TimerCanceledEventAttributes = _reflection.GeneratedProtocolMessageType( - "TimerCanceledEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _TIMERCANCELEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.TimerCanceledEventAttributes) - }, -) -_sym_db.RegisterMessage(TimerCanceledEventAttributes) - -WorkflowExecutionCancelRequestedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionCancelRequestedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(WorkflowExecutionCancelRequestedEventAttributes) - -WorkflowExecutionCanceledEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionCanceledEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionCanceledEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionCanceledEventAttributes) - -MarkerRecordedEventAttributes = _reflection.GeneratedProtocolMessageType( - "MarkerRecordedEventAttributes", - (_message.Message,), - { - "DetailsEntry": _reflection.GeneratedProtocolMessageType( - "DetailsEntry", - (_message.Message,), - { - "DESCRIPTOR": _MARKERRECORDEDEVENTATTRIBUTES_DETAILSENTRY, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.MarkerRecordedEventAttributes.DetailsEntry) - }, - ), - "DESCRIPTOR": _MARKERRECORDEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.MarkerRecordedEventAttributes) - }, -) -_sym_db.RegisterMessage(MarkerRecordedEventAttributes) -_sym_db.RegisterMessage(MarkerRecordedEventAttributes.DetailsEntry) - -WorkflowExecutionSignaledEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionSignaledEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionSignaledEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionSignaledEventAttributes) - -WorkflowExecutionTerminatedEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionTerminatedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionTerminatedEventAttributes) - -RequestCancelExternalWorkflowExecutionInitiatedEventAttributes = _reflection.GeneratedProtocolMessageType( - "RequestCancelExternalWorkflowExecutionInitiatedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) - }, -) -_sym_db.RegisterMessage(RequestCancelExternalWorkflowExecutionInitiatedEventAttributes) - -RequestCancelExternalWorkflowExecutionFailedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "RequestCancelExternalWorkflowExecutionFailedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(RequestCancelExternalWorkflowExecutionFailedEventAttributes) - -ExternalWorkflowExecutionCancelRequestedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "ExternalWorkflowExecutionCancelRequestedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _EXTERNALWORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(ExternalWorkflowExecutionCancelRequestedEventAttributes) - -SignalExternalWorkflowExecutionInitiatedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "SignalExternalWorkflowExecutionInitiatedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _SIGNALEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(SignalExternalWorkflowExecutionInitiatedEventAttributes) - -SignalExternalWorkflowExecutionFailedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "SignalExternalWorkflowExecutionFailedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _SIGNALEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(SignalExternalWorkflowExecutionFailedEventAttributes) - -ExternalWorkflowExecutionSignaledEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "ExternalWorkflowExecutionSignaledEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _EXTERNALWORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(ExternalWorkflowExecutionSignaledEventAttributes) - -UpsertWorkflowSearchAttributesEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "UpsertWorkflowSearchAttributesEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _UPSERTWORKFLOWSEARCHATTRIBUTESEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(UpsertWorkflowSearchAttributesEventAttributes) - -WorkflowPropertiesModifiedEventAttributes = _reflection.GeneratedProtocolMessageType( - "WorkflowPropertiesModifiedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWPROPERTIESMODIFIEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributes) - }, -) -_sym_db.RegisterMessage(WorkflowPropertiesModifiedEventAttributes) - -StartChildWorkflowExecutionInitiatedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "StartChildWorkflowExecutionInitiatedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _STARTCHILDWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(StartChildWorkflowExecutionInitiatedEventAttributes) - -StartChildWorkflowExecutionFailedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "StartChildWorkflowExecutionFailedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _STARTCHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(StartChildWorkflowExecutionFailedEventAttributes) - -ChildWorkflowExecutionStartedEventAttributes = _reflection.GeneratedProtocolMessageType( - "ChildWorkflowExecutionStartedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _CHILDWORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributes) - }, -) -_sym_db.RegisterMessage(ChildWorkflowExecutionStartedEventAttributes) - -ChildWorkflowExecutionCompletedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "ChildWorkflowExecutionCompletedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _CHILDWORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(ChildWorkflowExecutionCompletedEventAttributes) - -ChildWorkflowExecutionFailedEventAttributes = _reflection.GeneratedProtocolMessageType( - "ChildWorkflowExecutionFailedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _CHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributes) - }, -) -_sym_db.RegisterMessage(ChildWorkflowExecutionFailedEventAttributes) - -ChildWorkflowExecutionCanceledEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "ChildWorkflowExecutionCanceledEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _CHILDWORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(ChildWorkflowExecutionCanceledEventAttributes) - -ChildWorkflowExecutionTimedOutEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "ChildWorkflowExecutionTimedOutEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _CHILDWORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(ChildWorkflowExecutionTimedOutEventAttributes) - -ChildWorkflowExecutionTerminatedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "ChildWorkflowExecutionTerminatedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _CHILDWORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(ChildWorkflowExecutionTerminatedEventAttributes) - -WorkflowExecutionOptionsUpdatedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionOptionsUpdatedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONOPTIONSUPDATEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(WorkflowExecutionOptionsUpdatedEventAttributes) - -WorkflowPropertiesModifiedExternallyEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "WorkflowPropertiesModifiedExternallyEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(WorkflowPropertiesModifiedExternallyEventAttributes) - -ActivityPropertiesModifiedExternallyEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "ActivityPropertiesModifiedExternallyEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(ActivityPropertiesModifiedExternallyEventAttributes) - -WorkflowExecutionUpdateAcceptedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionUpdateAcceptedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONUPDATEACCEPTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(WorkflowExecutionUpdateAcceptedEventAttributes) - -WorkflowExecutionUpdateCompletedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionUpdateCompletedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONUPDATECOMPLETEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(WorkflowExecutionUpdateCompletedEventAttributes) - -WorkflowExecutionUpdateRejectedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionUpdateRejectedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONUPDATEREJECTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(WorkflowExecutionUpdateRejectedEventAttributes) - -WorkflowExecutionUpdateAdmittedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionUpdateAdmittedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONUPDATEADMITTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(WorkflowExecutionUpdateAdmittedEventAttributes) - -NexusOperationScheduledEventAttributes = _reflection.GeneratedProtocolMessageType( - "NexusOperationScheduledEventAttributes", - (_message.Message,), - { - "NexusHeaderEntry": _reflection.GeneratedProtocolMessageType( - "NexusHeaderEntry", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES_NEXUSHEADERENTRY, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationScheduledEventAttributes.NexusHeaderEntry) - }, - ), - "DESCRIPTOR": _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationScheduledEventAttributes) - }, -) -_sym_db.RegisterMessage(NexusOperationScheduledEventAttributes) -_sym_db.RegisterMessage(NexusOperationScheduledEventAttributes.NexusHeaderEntry) - -NexusOperationStartedEventAttributes = _reflection.GeneratedProtocolMessageType( - "NexusOperationStartedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONSTARTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationStartedEventAttributes) - }, -) -_sym_db.RegisterMessage(NexusOperationStartedEventAttributes) - -NexusOperationCompletedEventAttributes = _reflection.GeneratedProtocolMessageType( - "NexusOperationCompletedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONCOMPLETEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationCompletedEventAttributes) - }, -) -_sym_db.RegisterMessage(NexusOperationCompletedEventAttributes) - -NexusOperationFailedEventAttributes = _reflection.GeneratedProtocolMessageType( - "NexusOperationFailedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONFAILEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationFailedEventAttributes) - }, -) -_sym_db.RegisterMessage(NexusOperationFailedEventAttributes) - -NexusOperationTimedOutEventAttributes = _reflection.GeneratedProtocolMessageType( - "NexusOperationTimedOutEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONTIMEDOUTEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationTimedOutEventAttributes) - }, -) -_sym_db.RegisterMessage(NexusOperationTimedOutEventAttributes) - -NexusOperationCanceledEventAttributes = _reflection.GeneratedProtocolMessageType( - "NexusOperationCanceledEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONCANCELEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationCanceledEventAttributes) - }, -) -_sym_db.RegisterMessage(NexusOperationCanceledEventAttributes) - -NexusOperationCancelRequestedEventAttributes = _reflection.GeneratedProtocolMessageType( - "NexusOperationCancelRequestedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONCANCELREQUESTEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationCancelRequestedEventAttributes) - }, -) -_sym_db.RegisterMessage(NexusOperationCancelRequestedEventAttributes) - -NexusOperationCancelRequestCompletedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "NexusOperationCancelRequestCompletedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONCANCELREQUESTCOMPLETEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(NexusOperationCancelRequestCompletedEventAttributes) - -NexusOperationCancelRequestFailedEventAttributes = ( - _reflection.GeneratedProtocolMessageType( - "NexusOperationCancelRequestFailedEventAttributes", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONCANCELREQUESTFAILEDEVENTATTRIBUTES, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributes) - }, - ) -) -_sym_db.RegisterMessage(NexusOperationCancelRequestFailedEventAttributes) - -HistoryEvent = _reflection.GeneratedProtocolMessageType( - "HistoryEvent", - (_message.Message,), - { - "DESCRIPTOR": _HISTORYEVENT, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.HistoryEvent) - }, -) -_sym_db.RegisterMessage(HistoryEvent) - -History = _reflection.GeneratedProtocolMessageType( - "History", - (_message.Message,), - { - "DESCRIPTOR": _HISTORY, - "__module__": "temporalio.api.history.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.history.v1.History) - }, + b'\n%temporal/api/history/v1/message.proto\x12\x17temporal.api.history.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a&temporal/api/enums/v1/event_type.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a"temporal/api/enums/v1/update.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a#temporal/api/nexus/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a&temporal/api/workflow/v1/message.proto\x1a\x30temporal/api/sdk/v1/task_complete_metadata.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto\x1a,temporal/api/sdk/v1/event_group_marker.proto"\xc1\x13\n\'WorkflowExecutionStartedEventAttributes\x12;\n\rworkflow_type\x18\x01 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12!\n\x19parent_workflow_namespace\x18\x02 \x01(\t\x12$\n\x1cparent_workflow_namespace_id\x18\x1b \x01(\t\x12L\n\x19parent_workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12!\n\x19parent_initiated_event_id\x18\x04 \x01(\x03\x12\x38\n\ntask_queue\x18\x05 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12"\n\x1a\x63ontinued_execution_run_id\x18\n \x01(\t\x12@\n\tinitiator\x18\x0b \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12;\n\x11\x63ontinued_failure\x18\x0c \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\r \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12!\n\x19original_execution_run_id\x18\x0e \x01(\t\x12\x10\n\x08identity\x18\x0f \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x10 \x01(\t\x12\x39\n\x0cretry_policy\x18\x11 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x0f\n\x07\x61ttempt\x18\x12 \x01(\x05\x12\x46\n"workflow_execution_expiration_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rcron_schedule\x18\x14 \x01(\t\x12>\n\x1b\x66irst_workflow_task_backoff\x18\x15 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x04memo\x18\x16 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x17 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x45\n\x16prev_auto_reset_points\x18\x18 \x01(\x0b\x32%.temporal.api.workflow.v1.ResetPoints\x12.\n\x06header\x18\x19 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12&\n\x1eparent_initiated_event_version\x18\x1a \x01(\x03\x12\x13\n\x0bworkflow_id\x18\x1c \x01(\t\x12L\n\x14source_version_stamp\x18\x1d \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\x14\x63ompletion_callbacks\x18\x1e \x03(\x0b\x32 .temporal.api.common.v1.Callback\x12J\n\x17root_workflow_execution\x18\x1f \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1e\n\x12inherited_build_id\x18 \x01(\tB\x02\x18\x01\x12I\n\x13versioning_override\x18! \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12\x33\n\'parent_pinned_worker_deployment_version\x18" \x01(\tB\x02\x18\x01\x12\x32\n\x08priority\x18# \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12U\n\x18inherited_pinned_version\x18% \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12Y\n\x1binherited_auto_upgrade_info\x18\' \x01(\x0b\x32\x34.temporal.api.deployment.v1.InheritedAutoUpgradeInfo\x12 \n\x18\x65\x61ger_execution_accepted\x18& \x01(\x08\x12^\n\x1f\x64\x65\x63lined_target_version_upgrade\x18( \x01(\x0b\x32\x35.temporal.api.history.v1.DeclinedTargetVersionUpgrade\x12H\n\x14time_skipping_config\x18) \x01(\x0b\x32*.temporal.api.common.v1.TimeSkippingConfig\x12]\n\x1ftime_skipping_state_propagation\x18+ \x01(\x0b\x32\x34.temporal.api.common.v1.TimeSkippingStatePropagation\x12\x65\n&propagated_nexus_serialization_context\x18, \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContextJ\x04\x08$\x10%J\x04\x08*\x10+R parent_pinned_deployment_versionR\x18initial_skipped_duration"\x88\x01\n\x1c\x44\x65\x63linedTargetVersionUpgrade\x12O\n\x12\x64\x65ployment_version\x18\x01 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x17\n\x0frevision_number\x18\x02 \x01(\x03"\xa5\x01\n)WorkflowExecutionCompletedEventAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x1c\n\x14new_execution_run_id\x18\x03 \x01(\t"\xdb\x01\n&WorkflowExecutionFailedEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x36\n\x0bretry_state\x18\x02 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\x12\x1c\n\x14new_execution_run_id\x18\x04 \x01(\t"\x80\x01\n(WorkflowExecutionTimedOutEventAttributes\x12\x36\n\x0bretry_state\x18\x01 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\x12\x1c\n\x14new_execution_run_id\x18\x02 \x01(\t"\xa5\x07\n.WorkflowExecutionContinuedAsNewEventAttributes\x12\x1c\n\x14new_execution_run_id\x18\x01 \x01(\t\x12;\n\rworkflow_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x03 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x14workflow_run_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n workflow_task_completed_event_id\x18\x07 \x01(\x03\x12\x39\n\x16\x62\x61\x63koff_start_interval\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\tinitiator\x18\t \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12\x35\n\x07\x66\x61ilure\x18\n \x01(\x0b\x32 .temporal.api.failure.v1.FailureB\x02\x18\x01\x12@\n\x16last_completion_result\x18\x0b \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x0c \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\r \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0e \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1c\n\x10inherit_build_id\x18\x0f \x01(\x08\x42\x02\x18\x01\x12[\n\x1binitial_versioning_behavior\x18\x10 \x01(\x0e\x32\x36.temporal.api.enums.v1.ContinueAsNewVersioningBehavior"\xac\x01\n$WorkflowTaskScheduledEventAttributes\x12\x38\n\ntask_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x39\n\x16start_to_close_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07\x61ttempt\x18\x03 \x01(\x05"\xa0\x03\n"WorkflowTaskStartedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x1f\n\x17suggest_continue_as_new\x18\x04 \x01(\x08\x12Z\n\x1fsuggest_continue_as_new_reasons\x18\x08 \x03(\x0e\x32\x31.temporal.api.enums.v1.SuggestContinueAsNewReason\x12\x30\n(target_worker_deployment_version_changed\x18\t \x01(\x08\x12\x1a\n\x12history_size_bytes\x18\x05 \x01(\x03\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12%\n\x19\x62uild_id_redirect_counter\x18\x07 \x01(\x03\x42\x02\x18\x01"\x82\x05\n$WorkflowTaskCompletedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x1b\n\x0f\x62inary_checksum\x18\x04 \x01(\tB\x02\x18\x01\x12\x46\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12H\n\x0csdk_metadata\x18\x06 \x01(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowTaskCompletedMetadata\x12\x43\n\x11metering_metadata\x18\r \x01(\x0b\x32(.temporal.api.common.v1.MeteringMetadata\x12>\n\ndeployment\x18\x07 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12\x46\n\x13versioning_behavior\x18\x08 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehavior\x12%\n\x19worker_deployment_version\x18\t \x01(\tB\x02\x18\x01\x12\x1e\n\x16worker_deployment_name\x18\n \x01(\t\x12O\n\x12\x64\x65ployment_version\x18\x0b \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion"\x95\x01\n#WorkflowTaskTimedOutEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12\x38\n\x0ctimeout_type\x18\x03 \x01(\x0e\x32".temporal.api.enums.v1.TimeoutType"\x87\x03\n!WorkflowTaskFailedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12=\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCause\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x13\n\x0b\x62\x61se_run_id\x18\x06 \x01(\t\x12\x12\n\nnew_run_id\x18\x07 \x01(\t\x12\x1a\n\x12\x66ork_event_version\x18\x08 \x01(\x03\x12\x1b\n\x0f\x62inary_checksum\x18\t \x01(\tB\x02\x18\x01\x12\x46\n\x0eworker_version\x18\n \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01"\xc2\x05\n$ActivityTaskScheduledEventAttributes\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12;\n\ractivity_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12.\n\x06header\x18\x05 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12/\n\x05input\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12<\n\x19schedule_to_close_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n workflow_task_completed_event_id\x18\x0b \x01(\x03\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12!\n\x15use_workflow_build_id\x18\r \x01(\x08\x42\x02\x18\x01\x12\x32\n\x08priority\x18\x0e \x01(\x0b\x32 .temporal.api.common.v1.PriorityJ\x04\x08\x03\x10\x04"\x9e\x02\n"ActivityTaskStartedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x0f\n\x07\x61ttempt\x18\x04 \x01(\x05\x12\x36\n\x0clast_failure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12%\n\x19\x62uild_id_redirect_counter\x18\x07 \x01(\x03\x42\x02\x18\x01"\xe8\x01\n$ActivityTaskCompletedEventAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x1a\n\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\n\x10started_event_id\x18\x03 \x01(\x03\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x46\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01"\xdd\x02\n!ActivityTaskFailedEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1a\n\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\n\x10started_event_id\x18\x03 \x01(\x03\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x36\n\x0bretry_state\x18\x05 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12=\n\x05\x63\x61use\x18\x07 \x01(\x0e\x32..temporal.api.enums.v1.ActivityTaskFailedCause"\xc6\x01\n#ActivityTaskTimedOutEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1a\n\x12scheduled_event_id\x18\x02 \x01(\x03\x12\x18\n\x10started_event_id\x18\x03 \x01(\x03\x12\x36\n\x0bretry_state\x18\x04 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"r\n*ActivityTaskCancelRequestedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03"\x92\x02\n#ActivityTaskCanceledEventAttributes\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12(\n latest_cancel_requested_event_id\x18\x02 \x01(\x03\x12\x1a\n\x12scheduled_event_id\x18\x03 \x01(\x03\x12\x18\n\x10started_event_id\x18\x04 \x01(\x03\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01"\x93\x01\n\x1bTimerStartedEventAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x38\n\x15start_to_fire_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03"G\n\x19TimerFiredEventAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03"\x86\x01\n\x1cTimerCanceledEventAttributes\x12\x10\n\x08timer_id\x18\x01 \x01(\t\x12\x18\n\x10started_event_id\x18\x02 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\x12\x10\n\x08identity\x18\x04 \x01(\t"\xc7\x01\n/WorkflowExecutionCancelRequestedEventAttributes\x12\r\n\x05\x63\x61use\x18\x01 \x01(\t\x12#\n\x1b\x65xternal_initiated_event_id\x18\x02 \x01(\x03\x12N\n\x1b\x65xternal_workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x04 \x01(\t"\x87\x01\n(WorkflowExecutionCanceledEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"\xe9\x02\n\x1dMarkerRecordedEventAttributes\x12\x13\n\x0bmarker_name\x18\x01 \x01(\t\x12T\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32\x43.temporal.api.history.v1.MarkerRecordedEventAttributes.DetailsEntry\x12(\n workflow_task_completed_event_id\x18\x03 \x01(\x03\x12.\n\x06header\x18\x04 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x1aP\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads:\x02\x38\x01"\xbf\x02\n(WorkflowExecutionSignaledEventAttributes\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12/\n\x05input\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12.\n\x06header\x18\x04 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\'\n\x1bskip_generate_workflow_task\x18\x05 \x01(\x08\x42\x02\x18\x01\x12N\n\x1b\x65xternal_workflow_execution\x18\x06 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x12\n\nrequest_id\x18\x07 \x01(\t"\x81\x01\n*WorkflowExecutionTerminatedEventAttributes\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t"\x9c\x02\n>RequestCancelExternalWorkflowExecutionInitiatedEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x07\x63ontrol\x18\x04 \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x63hild_workflow_only\x18\x05 \x01(\x08\x12\x0e\n\x06reason\x18\x06 \x01(\t"\xda\x02\n;RequestCancelExternalWorkflowExecutionFailedEventAttributes\x12P\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x41.temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x04 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x13\n\x07\x63ontrol\x18\x06 \x01(\tB\x02\x18\x01"\xc5\x01\n7ExternalWorkflowExecutionCancelRequestedEventAttributes\x12\x1a\n\x12initiated_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x04 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution"\xfb\x02\n7SignalExternalWorkflowExecutionInitiatedEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\t \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0bsignal_name\x18\x04 \x01(\t\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x13\n\x07\x63ontrol\x18\x06 \x01(\tB\x02\x18\x01\x12\x1b\n\x13\x63hild_workflow_only\x18\x07 \x01(\x08\x12.\n\x06header\x18\x08 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header"\xd3\x02\n4SignalExternalWorkflowExecutionFailedEventAttributes\x12P\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x41.temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x04 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x13\n\x07\x63ontrol\x18\x06 \x01(\tB\x02\x18\x01"\xd3\x01\n0ExternalWorkflowExecutionSignaledEventAttributes\x12\x1a\n\x12initiated_event_id\x18\x01 \x01(\x03\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x05 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x07\x63ontrol\x18\x04 \x01(\tB\x02\x18\x01"\x9e\x01\n-UpsertWorkflowSearchAttributesEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x43\n\x11search_attributes\x18\x02 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes"\x8a\x01\n)WorkflowPropertiesModifiedEventAttributes\x12(\n workflow_task_completed_event_id\x18\x01 \x01(\x03\x12\x33\n\rupserted_memo\x18\x02 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo"\xfc\t\n3StartChildWorkflowExecutionInitiatedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x12 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\x13parent_close_policy\x18\t \x01(\x0e\x32(.temporal.api.enums.v1.ParentClosePolicy\x12\x13\n\x07\x63ontrol\x18\n \x01(\tB\x02\x18\x01\x12(\n workflow_task_completed_event_id\x18\x0b \x01(\x03\x12N\n\x18workflow_id_reuse_policy\x18\x0c \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\r \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\x0e \x01(\t\x12.\n\x06header\x18\x0f \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12*\n\x04memo\x18\x10 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x11 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1c\n\x10inherit_build_id\x18\x13 \x01(\x08\x42\x02\x18\x01\x12\x32\n\x08priority\x18\x14 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12H\n\x14time_skipping_config\x18\x15 \x01(\x0b\x32*.temporal.api.common.v1.TimeSkippingConfig\x12]\n\x1ftime_skipping_state_propagation\x18\x17 \x01(\x0b\x32\x34.temporal.api.common.v1.TimeSkippingStatePropagation\x12I\n\x13versioning_override\x18\x18 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverrideJ\x04\x08\x16\x10\x17R\x18initial_skipped_duration"\xd6\x02\n0StartChildWorkflowExecutionFailedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x08 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12L\n\x05\x63\x61use\x18\x04 \x01(\x0e\x32=.temporal.api.enums.v1.StartChildWorkflowExecutionFailedCause\x12\x13\n\x07\x63ontrol\x18\x05 \x01(\tB\x02\x18\x01\x12\x1a\n\x12initiated_event_id\x18\x06 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x07 \x01(\x03"\xa7\x02\n,ChildWorkflowExecutionStartedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x06 \x01(\t\x12\x1a\n\x12initiated_event_id\x18\x02 \x01(\x03\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12.\n\x06header\x18\x05 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header"\xc5\x02\n.ChildWorkflowExecutionCompletedEventAttributes\x12\x30\n\x06result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\n\x10started_event_id\x18\x06 \x01(\x03"\xfb\x02\n+ChildWorkflowExecutionFailedEventAttributes\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x08 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\n\x10started_event_id\x18\x06 \x01(\x03\x12\x36\n\x0bretry_state\x18\x07 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"\xc5\x02\n-ChildWorkflowExecutionCanceledEventAttributes\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x04 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x05 \x01(\x03\x12\x18\n\x10started_event_id\x18\x06 \x01(\x03"\xca\x02\n-ChildWorkflowExecutionTimedOutEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x07 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03\x12\x36\n\x0bretry_state\x18\x06 \x01(\x0e\x32!.temporal.api.enums.v1.RetryState"\x94\x02\n/ChildWorkflowExecutionTerminatedEventAttributes\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x06 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x1a\n\x12initiated_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03"\xda\x05\n.WorkflowExecutionOptionsUpdatedEventAttributes\x12I\n\x13versioning_override\x18\x01 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12!\n\x19unset_versioning_override\x18\x02 \x01(\x08\x12\x1b\n\x13\x61ttached_request_id\x18\x03 \x01(\t\x12G\n\x1d\x61ttached_completion_callbacks\x18\x04 \x03(\x0b\x32 .temporal.api.common.v1.Callback\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x32\n\x08priority\x18\x06 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12H\n\x14time_skipping_config\x18\x07 \x01(\x0b\x32*.temporal.api.common.v1.TimeSkippingConfig\x12$\n\x1ctime_skipping_config_updated\x18\t \x01(\x08\x12\x84\x01\n\x17workflow_update_options\x18\x08 \x03(\x0b\x32\x63.temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributes.WorkflowUpdateOptionsUpdate\x1a\x96\x01\n\x1bWorkflowUpdateOptionsUpdate\x12\x11\n\tupdate_id\x18\x01 \x01(\t\x12\x1b\n\x13\x61ttached_request_id\x18\x02 \x01(\t\x12G\n\x1d\x61ttached_completion_callbacks\x18\x03 \x03(\x0b\x32 .temporal.api.common.v1.Callback"\xc0\x02\n3WorkflowPropertiesModifiedExternallyEventAttributes\x12\x16\n\x0enew_task_queue\x18\x01 \x01(\t\x12<\n\x19new_workflow_task_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x18new_workflow_run_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x41\n\x1enew_workflow_execution_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\rupserted_memo\x18\x05 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo"\x90\x01\n3ActivityPropertiesModifiedExternallyEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12=\n\x10new_retry_policy\x18\x02 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy"\xdc\x01\n.WorkflowExecutionUpdateAcceptedEventAttributes\x12\x1c\n\x14protocol_instance_id\x18\x01 \x01(\t\x12#\n\x1b\x61\x63\x63\x65pted_request_message_id\x18\x02 \x01(\t\x12,\n$accepted_request_sequencing_event_id\x18\x03 \x01(\x03\x12\x39\n\x10\x61\x63\x63\x65pted_request\x18\x04 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request"\xaa\x01\n/WorkflowExecutionUpdateCompletedEventAttributes\x12*\n\x04meta\x18\x01 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x19\n\x11\x61\x63\x63\x65pted_event_id\x18\x03 \x01(\x03\x12\x30\n\x07outcome\x18\x02 \x01(\x0b\x32\x1f.temporal.api.update.v1.Outcome"\x8f\x02\n.WorkflowExecutionUpdateRejectedEventAttributes\x12\x1c\n\x14protocol_instance_id\x18\x01 \x01(\t\x12#\n\x1brejected_request_message_id\x18\x02 \x01(\t\x12,\n$rejected_request_sequencing_event_id\x18\x03 \x01(\x03\x12\x39\n\x10rejected_request\x18\x04 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"\xa4\x01\n.WorkflowExecutionUpdateAdmittedEventAttributes\x12\x30\n\x07request\x18\x01 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\x12@\n\x06origin\x18\x02 \x01(\x0e\x32\x30.temporal.api.enums.v1.UpdateAdmittedEventOrigin"^\n&WorkflowExecutionPausedEventAttributes\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t"`\n(WorkflowExecutionUnpausedEventAttributes\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t"\xc5\x01\n8WorkflowExecutionTimeSkippingTransitionedEventAttributes\x12/\n\x0btarget_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12#\n\x1b\x64isabled_after_fast_forward\x18\x02 \x01(\x08\x12\x33\n\x0fwall_clock_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xb4\x04\n&NexusOperationScheduledEventAttributes\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x11\n\toperation\x18\x03 \x01(\t\x12.\n\x05input\x18\x04 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x66\n\x0cnexus_header\x18\x06 \x03(\x0b\x32P.temporal.api.history.v1.NexusOperationScheduledEventAttributes.NexusHeaderEntry\x12(\n workflow_task_completed_event_id\x18\x07 \x01(\x03\x12\x12\n\nrequest_id\x18\x08 \x01(\t\x12\x13\n\x0b\x65ndpoint_id\x18\t \x01(\t\x12<\n\x19schedule_to_start_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x32\n\x10NexusHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x89\x01\n$NexusOperationStartedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x17\n\x0foperation_token\x18\x05 \x01(\t"\x89\x01\n&NexusOperationCompletedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12/\n\x06result\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x12\n\nrequest_id\x18\x03 \x01(\t"\x88\x01\n#NexusOperationFailedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x12\n\nrequest_id\x18\x03 \x01(\t"\x8a\x01\n%NexusOperationTimedOutEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x12\n\nrequest_id\x18\x03 \x01(\t"\x8a\x01\n%NexusOperationCanceledEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x12\n\nrequest_id\x18\x03 \x01(\t"t\n,NexusOperationCancelRequestedEventAttributes\x12\x1a\n\x12scheduled_event_id\x18\x01 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03"\x97\x01\n3NexusOperationCancelRequestCompletedEventAttributes\x12\x1a\n\x12requested_event_id\x18\x01 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x1a\n\x12scheduled_event_id\x18\x03 \x01(\x03"\xc7\x01\n0NexusOperationCancelRequestFailedEventAttributes\x12\x1a\n\x12requested_event_id\x18\x01 \x01(\x03\x12(\n workflow_task_completed_event_id\x18\x02 \x01(\x03\x12\x31\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1a\n\x12scheduled_event_id\x18\x04 \x01(\x03"\xca?\n\x0cHistoryEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\x03\x12.\n\nevent_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\nevent_type\x18\x03 \x01(\x0e\x32 .temporal.api.enums.v1.EventType\x12\x0f\n\x07version\x18\x04 \x01(\x03\x12\x0f\n\x07task_id\x18\x05 \x01(\x03\x12\x1a\n\x11worker_may_ignore\x18\xac\x02 \x01(\x08\x12\x39\n\ruser_metadata\x18\xad\x02 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12,\n\x05links\x18\xae\x02 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12\x35\n\tprincipal\x18\xaf\x02 \x01(\x0b\x32!.temporal.api.common.v1.Principal\x12\x43\n\x13\x65vent_group_markers\x18\xb0\x02 \x03(\x0b\x32%.temporal.api.sdk.v1.EventGroupMarker\x12w\n+workflow_execution_started_event_attributes\x18\x06 \x01(\x0b\x32@.temporal.api.history.v1.WorkflowExecutionStartedEventAttributesH\x00\x12{\n-workflow_execution_completed_event_attributes\x18\x07 \x01(\x0b\x32\x42.temporal.api.history.v1.WorkflowExecutionCompletedEventAttributesH\x00\x12u\n*workflow_execution_failed_event_attributes\x18\x08 \x01(\x0b\x32?.temporal.api.history.v1.WorkflowExecutionFailedEventAttributesH\x00\x12z\n-workflow_execution_timed_out_event_attributes\x18\t \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionTimedOutEventAttributesH\x00\x12q\n(workflow_task_scheduled_event_attributes\x18\n \x01(\x0b\x32=.temporal.api.history.v1.WorkflowTaskScheduledEventAttributesH\x00\x12m\n&workflow_task_started_event_attributes\x18\x0b \x01(\x0b\x32;.temporal.api.history.v1.WorkflowTaskStartedEventAttributesH\x00\x12q\n(workflow_task_completed_event_attributes\x18\x0c \x01(\x0b\x32=.temporal.api.history.v1.WorkflowTaskCompletedEventAttributesH\x00\x12p\n(workflow_task_timed_out_event_attributes\x18\r \x01(\x0b\x32<.temporal.api.history.v1.WorkflowTaskTimedOutEventAttributesH\x00\x12k\n%workflow_task_failed_event_attributes\x18\x0e \x01(\x0b\x32:.temporal.api.history.v1.WorkflowTaskFailedEventAttributesH\x00\x12q\n(activity_task_scheduled_event_attributes\x18\x0f \x01(\x0b\x32=.temporal.api.history.v1.ActivityTaskScheduledEventAttributesH\x00\x12m\n&activity_task_started_event_attributes\x18\x10 \x01(\x0b\x32;.temporal.api.history.v1.ActivityTaskStartedEventAttributesH\x00\x12q\n(activity_task_completed_event_attributes\x18\x11 \x01(\x0b\x32=.temporal.api.history.v1.ActivityTaskCompletedEventAttributesH\x00\x12k\n%activity_task_failed_event_attributes\x18\x12 \x01(\x0b\x32:.temporal.api.history.v1.ActivityTaskFailedEventAttributesH\x00\x12p\n(activity_task_timed_out_event_attributes\x18\x13 \x01(\x0b\x32<.temporal.api.history.v1.ActivityTaskTimedOutEventAttributesH\x00\x12^\n\x1etimer_started_event_attributes\x18\x14 \x01(\x0b\x32\x34.temporal.api.history.v1.TimerStartedEventAttributesH\x00\x12Z\n\x1ctimer_fired_event_attributes\x18\x15 \x01(\x0b\x32\x32.temporal.api.history.v1.TimerFiredEventAttributesH\x00\x12~\n/activity_task_cancel_requested_event_attributes\x18\x16 \x01(\x0b\x32\x43.temporal.api.history.v1.ActivityTaskCancelRequestedEventAttributesH\x00\x12o\n\'activity_task_canceled_event_attributes\x18\x17 \x01(\x0b\x32<.temporal.api.history.v1.ActivityTaskCanceledEventAttributesH\x00\x12`\n\x1ftimer_canceled_event_attributes\x18\x18 \x01(\x0b\x32\x35.temporal.api.history.v1.TimerCanceledEventAttributesH\x00\x12\x62\n marker_recorded_event_attributes\x18\x19 \x01(\x0b\x32\x36.temporal.api.history.v1.MarkerRecordedEventAttributesH\x00\x12y\n,workflow_execution_signaled_event_attributes\x18\x1a \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionSignaledEventAttributesH\x00\x12}\n.workflow_execution_terminated_event_attributes\x18\x1b \x01(\x0b\x32\x43.temporal.api.history.v1.WorkflowExecutionTerminatedEventAttributesH\x00\x12\x88\x01\n4workflow_execution_cancel_requested_event_attributes\x18\x1c \x01(\x0b\x32H.temporal.api.history.v1.WorkflowExecutionCancelRequestedEventAttributesH\x00\x12y\n,workflow_execution_canceled_event_attributes\x18\x1d \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionCanceledEventAttributesH\x00\x12\xa8\x01\nErequest_cancel_external_workflow_execution_initiated_event_attributes\x18\x1e \x01(\x0b\x32W.temporal.api.history.v1.RequestCancelExternalWorkflowExecutionInitiatedEventAttributesH\x00\x12\xa2\x01\nBrequest_cancel_external_workflow_execution_failed_event_attributes\x18\x1f \x01(\x0b\x32T.temporal.api.history.v1.RequestCancelExternalWorkflowExecutionFailedEventAttributesH\x00\x12\x99\x01\n=external_workflow_execution_cancel_requested_event_attributes\x18 \x01(\x0b\x32P.temporal.api.history.v1.ExternalWorkflowExecutionCancelRequestedEventAttributesH\x00\x12\x87\x01\n4workflow_execution_continued_as_new_event_attributes\x18! \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionContinuedAsNewEventAttributesH\x00\x12\x91\x01\n9start_child_workflow_execution_initiated_event_attributes\x18" \x01(\x0b\x32L.temporal.api.history.v1.StartChildWorkflowExecutionInitiatedEventAttributesH\x00\x12\x8b\x01\n6start_child_workflow_execution_failed_event_attributes\x18# \x01(\x0b\x32I.temporal.api.history.v1.StartChildWorkflowExecutionFailedEventAttributesH\x00\x12\x82\x01\n1child_workflow_execution_started_event_attributes\x18$ \x01(\x0b\x32\x45.temporal.api.history.v1.ChildWorkflowExecutionStartedEventAttributesH\x00\x12\x86\x01\n3child_workflow_execution_completed_event_attributes\x18% \x01(\x0b\x32G.temporal.api.history.v1.ChildWorkflowExecutionCompletedEventAttributesH\x00\x12\x80\x01\n0child_workflow_execution_failed_event_attributes\x18& \x01(\x0b\x32\x44.temporal.api.history.v1.ChildWorkflowExecutionFailedEventAttributesH\x00\x12\x84\x01\n2child_workflow_execution_canceled_event_attributes\x18\' \x01(\x0b\x32\x46.temporal.api.history.v1.ChildWorkflowExecutionCanceledEventAttributesH\x00\x12\x85\x01\n3child_workflow_execution_timed_out_event_attributes\x18( \x01(\x0b\x32\x46.temporal.api.history.v1.ChildWorkflowExecutionTimedOutEventAttributesH\x00\x12\x88\x01\n4child_workflow_execution_terminated_event_attributes\x18) \x01(\x0b\x32H.temporal.api.history.v1.ChildWorkflowExecutionTerminatedEventAttributesH\x00\x12\x99\x01\n=signal_external_workflow_execution_initiated_event_attributes\x18* \x01(\x0b\x32P.temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributesH\x00\x12\x93\x01\n:signal_external_workflow_execution_failed_event_attributes\x18+ \x01(\x0b\x32M.temporal.api.history.v1.SignalExternalWorkflowExecutionFailedEventAttributesH\x00\x12\x8a\x01\n5external_workflow_execution_signaled_event_attributes\x18, \x01(\x0b\x32I.temporal.api.history.v1.ExternalWorkflowExecutionSignaledEventAttributesH\x00\x12\x84\x01\n2upsert_workflow_search_attributes_event_attributes\x18- \x01(\x0b\x32\x46.temporal.api.history.v1.UpsertWorkflowSearchAttributesEventAttributesH\x00\x12\x86\x01\n3workflow_execution_update_accepted_event_attributes\x18. \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionUpdateAcceptedEventAttributesH\x00\x12\x86\x01\n3workflow_execution_update_rejected_event_attributes\x18/ \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionUpdateRejectedEventAttributesH\x00\x12\x88\x01\n4workflow_execution_update_completed_event_attributes\x18\x30 \x01(\x0b\x32H.temporal.api.history.v1.WorkflowExecutionUpdateCompletedEventAttributesH\x00\x12\x90\x01\n8workflow_properties_modified_externally_event_attributes\x18\x31 \x01(\x0b\x32L.temporal.api.history.v1.WorkflowPropertiesModifiedExternallyEventAttributesH\x00\x12\x90\x01\n8activity_properties_modified_externally_event_attributes\x18\x32 \x01(\x0b\x32L.temporal.api.history.v1.ActivityPropertiesModifiedExternallyEventAttributesH\x00\x12{\n-workflow_properties_modified_event_attributes\x18\x33 \x01(\x0b\x32\x42.temporal.api.history.v1.WorkflowPropertiesModifiedEventAttributesH\x00\x12\x86\x01\n3workflow_execution_update_admitted_event_attributes\x18\x34 \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionUpdateAdmittedEventAttributesH\x00\x12u\n*nexus_operation_scheduled_event_attributes\x18\x35 \x01(\x0b\x32?.temporal.api.history.v1.NexusOperationScheduledEventAttributesH\x00\x12q\n(nexus_operation_started_event_attributes\x18\x36 \x01(\x0b\x32=.temporal.api.history.v1.NexusOperationStartedEventAttributesH\x00\x12u\n*nexus_operation_completed_event_attributes\x18\x37 \x01(\x0b\x32?.temporal.api.history.v1.NexusOperationCompletedEventAttributesH\x00\x12o\n\'nexus_operation_failed_event_attributes\x18\x38 \x01(\x0b\x32<.temporal.api.history.v1.NexusOperationFailedEventAttributesH\x00\x12s\n)nexus_operation_canceled_event_attributes\x18\x39 \x01(\x0b\x32>.temporal.api.history.v1.NexusOperationCanceledEventAttributesH\x00\x12t\n*nexus_operation_timed_out_event_attributes\x18: \x01(\x0b\x32>.temporal.api.history.v1.NexusOperationTimedOutEventAttributesH\x00\x12\x82\x01\n1nexus_operation_cancel_requested_event_attributes\x18; \x01(\x0b\x32\x45.temporal.api.history.v1.NexusOperationCancelRequestedEventAttributesH\x00\x12\x86\x01\n3workflow_execution_options_updated_event_attributes\x18< \x01(\x0b\x32G.temporal.api.history.v1.WorkflowExecutionOptionsUpdatedEventAttributesH\x00\x12\x91\x01\n9nexus_operation_cancel_request_completed_event_attributes\x18= \x01(\x0b\x32L.temporal.api.history.v1.NexusOperationCancelRequestCompletedEventAttributesH\x00\x12\x8b\x01\n6nexus_operation_cancel_request_failed_event_attributes\x18> \x01(\x0b\x32I.temporal.api.history.v1.NexusOperationCancelRequestFailedEventAttributesH\x00\x12u\n*workflow_execution_paused_event_attributes\x18? \x01(\x0b\x32?.temporal.api.history.v1.WorkflowExecutionPausedEventAttributesH\x00\x12y\n,workflow_execution_unpaused_event_attributes\x18@ \x01(\x0b\x32\x41.temporal.api.history.v1.WorkflowExecutionUnpausedEventAttributesH\x00\x12\x9b\x01\n>workflow_execution_time_skipping_transitioned_event_attributes\x18\x41 \x01(\x0b\x32Q.temporal.api.history.v1.WorkflowExecutionTimeSkippingTransitionedEventAttributesH\x00\x42\x0c\n\nattributes"@\n\x07History\x12\x35\n\x06\x65vents\x18\x01 \x03(\x0b\x32%.temporal.api.history.v1.HistoryEventB\x8e\x01\n\x1aio.temporal.api.history.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/history/v1;history\xaa\x02\x19Temporalio.Api.History.V1\xea\x02\x1cTemporalio::Api::History::V1b\x06proto3' ) -_sym_db.RegisterMessage(History) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\032io.temporal.api.history.v1B\014MessageProtoP\001Z%go.temporal.io/api/history/v1;history\252\002\031Temporalio.Api.History.V1\352\002\034Temporalio::Api::History::V1" @@ -1132,130 +234,140 @@ _NEXUSOPERATIONSTARTEDEVENTATTRIBUTES.fields_by_name[ "operation_id" ]._serialized_options = b"\030\001" - _WORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES._serialized_start = 617 - _WORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES._serialized_end = 2623 - _WORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES._serialized_start = 2626 - _WORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES._serialized_end = 2791 - _WORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_start = 2794 - _WORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 3013 - _WORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES._serialized_start = 3016 - _WORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES._serialized_end = 3144 - _WORKFLOWEXECUTIONCONTINUEDASNEWEVENTATTRIBUTES._serialized_start = 3147 - _WORKFLOWEXECUTIONCONTINUEDASNEWEVENTATTRIBUTES._serialized_end = 3987 - _WORKFLOWTASKSCHEDULEDEVENTATTRIBUTES._serialized_start = 3990 - _WORKFLOWTASKSCHEDULEDEVENTATTRIBUTES._serialized_end = 4162 - _WORKFLOWTASKSTARTEDEVENTATTRIBUTES._serialized_start = 4165 - _WORKFLOWTASKSTARTEDEVENTATTRIBUTES._serialized_end = 4439 - _WORKFLOWTASKCOMPLETEDEVENTATTRIBUTES._serialized_start = 4442 - _WORKFLOWTASKCOMPLETEDEVENTATTRIBUTES._serialized_end = 5084 - _WORKFLOWTASKTIMEDOUTEVENTATTRIBUTES._serialized_start = 5087 - _WORKFLOWTASKTIMEDOUTEVENTATTRIBUTES._serialized_end = 5236 - _WORKFLOWTASKFAILEDEVENTATTRIBUTES._serialized_start = 5239 - _WORKFLOWTASKFAILEDEVENTATTRIBUTES._serialized_end = 5630 - _ACTIVITYTASKSCHEDULEDEVENTATTRIBUTES._serialized_start = 5633 - _ACTIVITYTASKSCHEDULEDEVENTATTRIBUTES._serialized_end = 6339 - _ACTIVITYTASKSTARTEDEVENTATTRIBUTES._serialized_start = 6342 - _ACTIVITYTASKSTARTEDEVENTATTRIBUTES._serialized_end = 6628 - _ACTIVITYTASKCOMPLETEDEVENTATTRIBUTES._serialized_start = 6631 - _ACTIVITYTASKCOMPLETEDEVENTATTRIBUTES._serialized_end = 6863 - _ACTIVITYTASKFAILEDEVENTATTRIBUTES._serialized_start = 6866 - _ACTIVITYTASKFAILEDEVENTATTRIBUTES._serialized_end = 7152 - _ACTIVITYTASKTIMEDOUTEVENTATTRIBUTES._serialized_start = 7155 - _ACTIVITYTASKTIMEDOUTEVENTATTRIBUTES._serialized_end = 7353 - _ACTIVITYTASKCANCELREQUESTEDEVENTATTRIBUTES._serialized_start = 7355 - _ACTIVITYTASKCANCELREQUESTEDEVENTATTRIBUTES._serialized_end = 7469 - _ACTIVITYTASKCANCELEDEVENTATTRIBUTES._serialized_start = 7472 - _ACTIVITYTASKCANCELEDEVENTATTRIBUTES._serialized_end = 7746 - _TIMERSTARTEDEVENTATTRIBUTES._serialized_start = 7749 - _TIMERSTARTEDEVENTATTRIBUTES._serialized_end = 7896 - _TIMERFIREDEVENTATTRIBUTES._serialized_start = 7898 - _TIMERFIREDEVENTATTRIBUTES._serialized_end = 7969 - _TIMERCANCELEDEVENTATTRIBUTES._serialized_start = 7972 - _TIMERCANCELEDEVENTATTRIBUTES._serialized_end = 8106 - _WORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_start = 8109 - _WORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_end = 8308 - _WORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES._serialized_start = 8311 - _WORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES._serialized_end = 8446 - _MARKERRECORDEDEVENTATTRIBUTES._serialized_start = 8449 - _MARKERRECORDEDEVENTATTRIBUTES._serialized_end = 8810 - _MARKERRECORDEDEVENTATTRIBUTES_DETAILSENTRY._serialized_start = 8730 - _MARKERRECORDEDEVENTATTRIBUTES_DETAILSENTRY._serialized_end = 8810 - _WORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES._serialized_start = 8813 - _WORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES._serialized_end = 9112 - _WORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES._serialized_start = 9115 - _WORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES._serialized_end = 9244 - _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_start = 9247 + _WORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES._serialized_start = 700 + _WORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES._serialized_end = 3197 + _DECLINEDTARGETVERSIONUPGRADE._serialized_start = 3200 + _DECLINEDTARGETVERSIONUPGRADE._serialized_end = 3336 + _WORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES._serialized_start = 3339 + _WORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES._serialized_end = 3504 + _WORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_start = 3507 + _WORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 3726 + _WORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES._serialized_start = 3729 + _WORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES._serialized_end = 3857 + _WORKFLOWEXECUTIONCONTINUEDASNEWEVENTATTRIBUTES._serialized_start = 3860 + _WORKFLOWEXECUTIONCONTINUEDASNEWEVENTATTRIBUTES._serialized_end = 4793 + _WORKFLOWTASKSCHEDULEDEVENTATTRIBUTES._serialized_start = 4796 + _WORKFLOWTASKSCHEDULEDEVENTATTRIBUTES._serialized_end = 4968 + _WORKFLOWTASKSTARTEDEVENTATTRIBUTES._serialized_start = 4971 + _WORKFLOWTASKSTARTEDEVENTATTRIBUTES._serialized_end = 5387 + _WORKFLOWTASKCOMPLETEDEVENTATTRIBUTES._serialized_start = 5390 + _WORKFLOWTASKCOMPLETEDEVENTATTRIBUTES._serialized_end = 6032 + _WORKFLOWTASKTIMEDOUTEVENTATTRIBUTES._serialized_start = 6035 + _WORKFLOWTASKTIMEDOUTEVENTATTRIBUTES._serialized_end = 6184 + _WORKFLOWTASKFAILEDEVENTATTRIBUTES._serialized_start = 6187 + _WORKFLOWTASKFAILEDEVENTATTRIBUTES._serialized_end = 6578 + _ACTIVITYTASKSCHEDULEDEVENTATTRIBUTES._serialized_start = 6581 + _ACTIVITYTASKSCHEDULEDEVENTATTRIBUTES._serialized_end = 7287 + _ACTIVITYTASKSTARTEDEVENTATTRIBUTES._serialized_start = 7290 + _ACTIVITYTASKSTARTEDEVENTATTRIBUTES._serialized_end = 7576 + _ACTIVITYTASKCOMPLETEDEVENTATTRIBUTES._serialized_start = 7579 + _ACTIVITYTASKCOMPLETEDEVENTATTRIBUTES._serialized_end = 7811 + _ACTIVITYTASKFAILEDEVENTATTRIBUTES._serialized_start = 7814 + _ACTIVITYTASKFAILEDEVENTATTRIBUTES._serialized_end = 8163 + _ACTIVITYTASKTIMEDOUTEVENTATTRIBUTES._serialized_start = 8166 + _ACTIVITYTASKTIMEDOUTEVENTATTRIBUTES._serialized_end = 8364 + _ACTIVITYTASKCANCELREQUESTEDEVENTATTRIBUTES._serialized_start = 8366 + _ACTIVITYTASKCANCELREQUESTEDEVENTATTRIBUTES._serialized_end = 8480 + _ACTIVITYTASKCANCELEDEVENTATTRIBUTES._serialized_start = 8483 + _ACTIVITYTASKCANCELEDEVENTATTRIBUTES._serialized_end = 8757 + _TIMERSTARTEDEVENTATTRIBUTES._serialized_start = 8760 + _TIMERSTARTEDEVENTATTRIBUTES._serialized_end = 8907 + _TIMERFIREDEVENTATTRIBUTES._serialized_start = 8909 + _TIMERFIREDEVENTATTRIBUTES._serialized_end = 8980 + _TIMERCANCELEDEVENTATTRIBUTES._serialized_start = 8983 + _TIMERCANCELEDEVENTATTRIBUTES._serialized_end = 9117 + _WORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_start = 9120 + _WORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_end = 9319 + _WORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES._serialized_start = 9322 + _WORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES._serialized_end = 9457 + _MARKERRECORDEDEVENTATTRIBUTES._serialized_start = 9460 + _MARKERRECORDEDEVENTATTRIBUTES._serialized_end = 9821 + _MARKERRECORDEDEVENTATTRIBUTES_DETAILSENTRY._serialized_start = 9741 + _MARKERRECORDEDEVENTATTRIBUTES_DETAILSENTRY._serialized_end = 9821 + _WORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES._serialized_start = 9824 + _WORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES._serialized_end = 10143 + _WORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES._serialized_start = 10146 + _WORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES._serialized_end = 10275 + _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_start = 10278 _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_end = ( - 9531 + 10562 ) _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_start = ( - 9534 + 10565 ) - _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 9880 - _EXTERNALWORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_start = 9883 - _EXTERNALWORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_end = 10080 - _SIGNALEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_start = 10083 - _SIGNALEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_end = 10462 - _SIGNALEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_start = 10465 - _SIGNALEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 10804 - _EXTERNALWORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES._serialized_start = 10807 - _EXTERNALWORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES._serialized_end = 11018 - _UPSERTWORKFLOWSEARCHATTRIBUTESEVENTATTRIBUTES._serialized_start = 11021 - _UPSERTWORKFLOWSEARCHATTRIBUTESEVENTATTRIBUTES._serialized_end = 11179 - _WORKFLOWPROPERTIESMODIFIEDEVENTATTRIBUTES._serialized_start = 11182 - _WORKFLOWPROPERTIESMODIFIEDEVENTATTRIBUTES._serialized_end = 11320 - _STARTCHILDWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_start = 11323 - _STARTCHILDWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_end = 12323 - _STARTCHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_start = 12326 - _STARTCHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 12668 - _CHILDWORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES._serialized_start = 12671 - _CHILDWORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES._serialized_end = 12966 - _CHILDWORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES._serialized_start = 12969 - _CHILDWORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES._serialized_end = 13294 - _CHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_start = 13297 - _CHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 13676 - _CHILDWORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES._serialized_start = 13679 - _CHILDWORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES._serialized_end = 14004 - _CHILDWORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES._serialized_start = 14007 - _CHILDWORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES._serialized_end = 14337 - _CHILDWORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES._serialized_start = 14340 - _CHILDWORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES._serialized_end = 14616 - _WORKFLOWEXECUTIONOPTIONSUPDATEDEVENTATTRIBUTES._serialized_start = 14619 - _WORKFLOWEXECUTIONOPTIONSUPDATEDEVENTATTRIBUTES._serialized_end = 14879 - _WORKFLOWPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES._serialized_start = 14882 - _WORKFLOWPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES._serialized_end = 15202 - _ACTIVITYPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES._serialized_start = 15205 - _ACTIVITYPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES._serialized_end = 15349 - _WORKFLOWEXECUTIONUPDATEACCEPTEDEVENTATTRIBUTES._serialized_start = 15352 - _WORKFLOWEXECUTIONUPDATEACCEPTEDEVENTATTRIBUTES._serialized_end = 15572 - _WORKFLOWEXECUTIONUPDATECOMPLETEDEVENTATTRIBUTES._serialized_start = 15575 - _WORKFLOWEXECUTIONUPDATECOMPLETEDEVENTATTRIBUTES._serialized_end = 15745 - _WORKFLOWEXECUTIONUPDATEREJECTEDEVENTATTRIBUTES._serialized_start = 15748 - _WORKFLOWEXECUTIONUPDATEREJECTEDEVENTATTRIBUTES._serialized_end = 16019 - _WORKFLOWEXECUTIONUPDATEADMITTEDEVENTATTRIBUTES._serialized_start = 16022 - _WORKFLOWEXECUTIONUPDATEADMITTEDEVENTATTRIBUTES._serialized_end = 16186 - _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES._serialized_start = 16189 - _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES._serialized_end = 16632 - _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES_NEXUSHEADERENTRY._serialized_start = 16582 - _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES_NEXUSHEADERENTRY._serialized_end = 16632 - _NEXUSOPERATIONSTARTEDEVENTATTRIBUTES._serialized_start = 16635 - _NEXUSOPERATIONSTARTEDEVENTATTRIBUTES._serialized_end = 16772 - _NEXUSOPERATIONCOMPLETEDEVENTATTRIBUTES._serialized_start = 16775 - _NEXUSOPERATIONCOMPLETEDEVENTATTRIBUTES._serialized_end = 16912 - _NEXUSOPERATIONFAILEDEVENTATTRIBUTES._serialized_start = 16915 - _NEXUSOPERATIONFAILEDEVENTATTRIBUTES._serialized_end = 17051 - _NEXUSOPERATIONTIMEDOUTEVENTATTRIBUTES._serialized_start = 17054 - _NEXUSOPERATIONTIMEDOUTEVENTATTRIBUTES._serialized_end = 17192 - _NEXUSOPERATIONCANCELEDEVENTATTRIBUTES._serialized_start = 17195 - _NEXUSOPERATIONCANCELEDEVENTATTRIBUTES._serialized_end = 17333 - _NEXUSOPERATIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_start = 17335 - _NEXUSOPERATIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_end = 17451 - _NEXUSOPERATIONCANCELREQUESTCOMPLETEDEVENTATTRIBUTES._serialized_start = 17454 - _NEXUSOPERATIONCANCELREQUESTCOMPLETEDEVENTATTRIBUTES._serialized_end = 17605 - _NEXUSOPERATIONCANCELREQUESTFAILEDEVENTATTRIBUTES._serialized_start = 17608 - _NEXUSOPERATIONCANCELREQUESTFAILEDEVENTATTRIBUTES._serialized_end = 17807 - _HISTORYEVENT._serialized_start = 17810 - _HISTORYEVENT._serialized_end = 25424 - _HISTORY._serialized_start = 25426 - _HISTORY._serialized_end = 25490 + _REQUESTCANCELEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 10911 + _EXTERNALWORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_start = 10914 + _EXTERNALWORKFLOWEXECUTIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_end = 11111 + _SIGNALEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_start = 11114 + _SIGNALEXTERNALWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_end = 11493 + _SIGNALEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_start = 11496 + _SIGNALEXTERNALWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 11835 + _EXTERNALWORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES._serialized_start = 11838 + _EXTERNALWORKFLOWEXECUTIONSIGNALEDEVENTATTRIBUTES._serialized_end = 12049 + _UPSERTWORKFLOWSEARCHATTRIBUTESEVENTATTRIBUTES._serialized_start = 12052 + _UPSERTWORKFLOWSEARCHATTRIBUTESEVENTATTRIBUTES._serialized_end = 12210 + _WORKFLOWPROPERTIESMODIFIEDEVENTATTRIBUTES._serialized_start = 12213 + _WORKFLOWPROPERTIESMODIFIEDEVENTATTRIBUTES._serialized_end = 12351 + _STARTCHILDWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_start = 12354 + _STARTCHILDWORKFLOWEXECUTIONINITIATEDEVENTATTRIBUTES._serialized_end = 13630 + _STARTCHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_start = 13633 + _STARTCHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 13975 + _CHILDWORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES._serialized_start = 13978 + _CHILDWORKFLOWEXECUTIONSTARTEDEVENTATTRIBUTES._serialized_end = 14273 + _CHILDWORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES._serialized_start = 14276 + _CHILDWORKFLOWEXECUTIONCOMPLETEDEVENTATTRIBUTES._serialized_end = 14601 + _CHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_start = 14604 + _CHILDWORKFLOWEXECUTIONFAILEDEVENTATTRIBUTES._serialized_end = 14983 + _CHILDWORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES._serialized_start = 14986 + _CHILDWORKFLOWEXECUTIONCANCELEDEVENTATTRIBUTES._serialized_end = 15311 + _CHILDWORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES._serialized_start = 15314 + _CHILDWORKFLOWEXECUTIONTIMEDOUTEVENTATTRIBUTES._serialized_end = 15644 + _CHILDWORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES._serialized_start = 15647 + _CHILDWORKFLOWEXECUTIONTERMINATEDEVENTATTRIBUTES._serialized_end = 15923 + _WORKFLOWEXECUTIONOPTIONSUPDATEDEVENTATTRIBUTES._serialized_start = 15926 + _WORKFLOWEXECUTIONOPTIONSUPDATEDEVENTATTRIBUTES._serialized_end = 16656 + _WORKFLOWEXECUTIONOPTIONSUPDATEDEVENTATTRIBUTES_WORKFLOWUPDATEOPTIONSUPDATE._serialized_start = 16506 + _WORKFLOWEXECUTIONOPTIONSUPDATEDEVENTATTRIBUTES_WORKFLOWUPDATEOPTIONSUPDATE._serialized_end = 16656 + _WORKFLOWPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES._serialized_start = 16659 + _WORKFLOWPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES._serialized_end = 16979 + _ACTIVITYPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES._serialized_start = 16982 + _ACTIVITYPROPERTIESMODIFIEDEXTERNALLYEVENTATTRIBUTES._serialized_end = 17126 + _WORKFLOWEXECUTIONUPDATEACCEPTEDEVENTATTRIBUTES._serialized_start = 17129 + _WORKFLOWEXECUTIONUPDATEACCEPTEDEVENTATTRIBUTES._serialized_end = 17349 + _WORKFLOWEXECUTIONUPDATECOMPLETEDEVENTATTRIBUTES._serialized_start = 17352 + _WORKFLOWEXECUTIONUPDATECOMPLETEDEVENTATTRIBUTES._serialized_end = 17522 + _WORKFLOWEXECUTIONUPDATEREJECTEDEVENTATTRIBUTES._serialized_start = 17525 + _WORKFLOWEXECUTIONUPDATEREJECTEDEVENTATTRIBUTES._serialized_end = 17796 + _WORKFLOWEXECUTIONUPDATEADMITTEDEVENTATTRIBUTES._serialized_start = 17799 + _WORKFLOWEXECUTIONUPDATEADMITTEDEVENTATTRIBUTES._serialized_end = 17963 + _WORKFLOWEXECUTIONPAUSEDEVENTATTRIBUTES._serialized_start = 17965 + _WORKFLOWEXECUTIONPAUSEDEVENTATTRIBUTES._serialized_end = 18059 + _WORKFLOWEXECUTIONUNPAUSEDEVENTATTRIBUTES._serialized_start = 18061 + _WORKFLOWEXECUTIONUNPAUSEDEVENTATTRIBUTES._serialized_end = 18157 + _WORKFLOWEXECUTIONTIMESKIPPINGTRANSITIONEDEVENTATTRIBUTES._serialized_start = 18160 + _WORKFLOWEXECUTIONTIMESKIPPINGTRANSITIONEDEVENTATTRIBUTES._serialized_end = 18357 + _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES._serialized_start = 18360 + _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES._serialized_end = 18924 + _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES_NEXUSHEADERENTRY._serialized_start = 18874 + _NEXUSOPERATIONSCHEDULEDEVENTATTRIBUTES_NEXUSHEADERENTRY._serialized_end = 18924 + _NEXUSOPERATIONSTARTEDEVENTATTRIBUTES._serialized_start = 18927 + _NEXUSOPERATIONSTARTEDEVENTATTRIBUTES._serialized_end = 19064 + _NEXUSOPERATIONCOMPLETEDEVENTATTRIBUTES._serialized_start = 19067 + _NEXUSOPERATIONCOMPLETEDEVENTATTRIBUTES._serialized_end = 19204 + _NEXUSOPERATIONFAILEDEVENTATTRIBUTES._serialized_start = 19207 + _NEXUSOPERATIONFAILEDEVENTATTRIBUTES._serialized_end = 19343 + _NEXUSOPERATIONTIMEDOUTEVENTATTRIBUTES._serialized_start = 19346 + _NEXUSOPERATIONTIMEDOUTEVENTATTRIBUTES._serialized_end = 19484 + _NEXUSOPERATIONCANCELEDEVENTATTRIBUTES._serialized_start = 19487 + _NEXUSOPERATIONCANCELEDEVENTATTRIBUTES._serialized_end = 19625 + _NEXUSOPERATIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_start = 19627 + _NEXUSOPERATIONCANCELREQUESTEDEVENTATTRIBUTES._serialized_end = 19743 + _NEXUSOPERATIONCANCELREQUESTCOMPLETEDEVENTATTRIBUTES._serialized_start = 19746 + _NEXUSOPERATIONCANCELREQUESTCOMPLETEDEVENTATTRIBUTES._serialized_end = 19897 + _NEXUSOPERATIONCANCELREQUESTFAILEDEVENTATTRIBUTES._serialized_start = 19900 + _NEXUSOPERATIONCANCELREQUESTFAILEDEVENTATTRIBUTES._serialized_end = 20099 + _HISTORYEVENT._serialized_start = 20102 + _HISTORYEVENT._serialized_end = 28240 + _HISTORY._serialized_start = 28242 + _HISTORY._serialized_end = 28306 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/history/v1/message_pb2.pyi b/temporalio/api/history/v1/message_pb2.pyi index 50fc04f0e0..57826e21a3 100644 --- a/temporalio/api/history/v1/message_pb2.pyi +++ b/temporalio/api/history/v1/message_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -20,19 +20,17 @@ import temporalio.api.enums.v1.failed_cause_pb2 import temporalio.api.enums.v1.update_pb2 import temporalio.api.enums.v1.workflow_pb2 import temporalio.api.failure.v1.message_pb2 +import temporalio.api.nexus.v1.message_pb2 +import temporalio.api.sdk.v1.event_group_marker_pb2 import temporalio.api.sdk.v1.task_complete_metadata_pb2 import temporalio.api.sdk.v1.user_metadata_pb2 import temporalio.api.taskqueue.v1.message_pb2 import temporalio.api.update.v1.message_pb2 import temporalio.api.workflow.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): """Always the first event in workflow history""" @@ -74,14 +72,64 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): PARENT_PINNED_WORKER_DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int INHERITED_PINNED_VERSION_FIELD_NUMBER: builtins.int + INHERITED_AUTO_UPGRADE_INFO_FIELD_NUMBER: builtins.int EAGER_EXECUTION_ACCEPTED_FIELD_NUMBER: builtins.int - @property - def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... + DECLINED_TARGET_VERSION_UPGRADE_FIELD_NUMBER: builtins.int + TIME_SKIPPING_CONFIG_FIELD_NUMBER: builtins.int + TIME_SKIPPING_STATE_PROPAGATION_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int parent_workflow_namespace: builtins.str """If this workflow is a child, the namespace our parent lives in. SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only. """ parent_workflow_namespace_id: builtins.str + parent_initiated_event_id: builtins.int + """EventID of the child execution initiated event in parent workflow""" + continued_execution_run_id: builtins.str + """Run id of the previous workflow which continued-as-new or retried or cron executed into this + workflow. + """ + initiator: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewInitiator.ValueType + original_execution_run_id: builtins.str + """This is the run id when the WorkflowExecutionStarted event was written. + A workflow reset changes the execution run_id, but preserves this field. + """ + identity: builtins.str + """Identity of the client who requested this execution""" + first_execution_run_id: builtins.str + """This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. + Used to identify a chain. + """ + attempt: builtins.int + """Starting at 1, the number of times we have tried to execute this workflow""" + cron_schedule: builtins.str + """If this workflow runs on a cron schedule, it will appear here""" + parent_initiated_event_version: builtins.int + """Version of the child execution initiated event in parent workflow + It should be used together with parent_initiated_event_id to identify + a child initiated event for global namespace + """ + workflow_id: builtins.str + """This field is new in 1.21.""" + inherited_build_id: builtins.str + """When present, this execution is assigned to the build ID of its parent or previous execution. + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + """ + parent_pinned_worker_deployment_version: builtins.str + """When present, it means this is a child workflow of a parent that is Pinned to this Worker + Deployment Version. In this case, child workflow will start as Pinned to this Version instead + of starting on the Current Version of its Task Queue. + This is set only if the child workflow is starting on a Task Queue belonging to the same + Worker Deployment Version. + Deprecated. Use `parent_versioning_info`. + """ + eager_execution_accepted: builtins.bool + """A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and + eager execution was accepted by the server. + Only populated by server with version >= 1.29.0. + """ + @property + def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... @property def parent_workflow_execution( self, @@ -89,47 +137,33 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): """Contains information about parent workflow execution that initiated the child workflow these attributes belong to. If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated. """ - parent_initiated_event_id: builtins.int - """EventID of the child execution initiated event in parent workflow""" + @property def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ... @property def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: """SDK will deserialize this and provide it as arguments to the workflow function""" + @property def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: """Total workflow execution timeout including retries and continue as new.""" + @property def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow run.""" + @property def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow task.""" - continued_execution_run_id: builtins.str - """Run id of the previous workflow which continued-as-new or retried or cron executed into this - workflow. - """ - initiator: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewInitiator.ValueType + @property def continued_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ... @property def last_completion_result( self, ) -> temporalio.api.common.v1.message_pb2.Payloads: ... - original_execution_run_id: builtins.str - """This is the run id when the WorkflowExecutionStarted event was written. - A workflow reset changes the execution run_id, but preserves this field. - """ - identity: builtins.str - """Identity of the client who requested this execution""" - first_execution_run_id: builtins.str - """This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. - Used to identify a chain. - """ @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: ... - attempt: builtins.int - """Starting at 1, the number of times we have tried to execute this workflow""" @property def workflow_execution_expiration_time( self, @@ -137,13 +171,13 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): """The absolute time at which the workflow will be timed out. This is passed without change to the next run/retry of a workflow. """ - cron_schedule: builtins.str - """If this workflow runs on a cron schedule, it will appear here""" + @property def first_workflow_task_backoff(self) -> google.protobuf.duration_pb2.Duration: """For a cron workflow, this contains the amount of time between when this iteration of the cron workflow was scheduled and when it should run next per its cron_schedule. """ + @property def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: ... @property @@ -156,13 +190,6 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): ) -> temporalio.api.workflow.v1.message_pb2.ResetPoints: ... @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... - parent_initiated_event_version: builtins.int - """Version of the child execution initiated event in parent workflow - It should be used together with parent_initiated_event_id to identify - a child initiated event for global namespace - """ - workflow_id: builtins.str - """This field is new in 1.21.""" @property def source_version_stamp( self, @@ -171,6 +198,7 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): the queue, then we include it here. Deprecated. [cleanup-experimental-wv] """ + @property def completion_callbacks( self, @@ -178,6 +206,7 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Callback ]: """Completion callbacks attached when this workflow was started.""" + @property def root_workflow_execution( self, @@ -209,10 +238,7 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): - The root workflow of W1 is W1 and the root workflow of W2 is W2. - W1 and W2 have root_workflow_execution set to nil. """ - inherited_build_id: builtins.str - """When present, this execution is assigned to the build ID of its parent or previous execution. - Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - """ + @property def versioning_override( self, @@ -221,17 +247,11 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): Children, crons, retries, and continue-as-new will inherit source run's override if pinned and if the new workflow's Task Queue belongs to the override version. """ - parent_pinned_worker_deployment_version: builtins.str - """When present, it means this is a child workflow of a parent that is Pinned to this Worker - Deployment Version. In this case, child workflow will start as Pinned to this Version instead - of starting on the Current Version of its Task Queue. - This is set only if the child workflow is starting on a Task Queue belonging to the same - Worker Deployment Version. - Deprecated. Use `parent_versioning_info`. - """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata""" + @property def inherited_pinned_version( self, @@ -239,23 +259,89 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): """If present, the new workflow should start on this version with pinned base behavior. Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version. - New run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the + A new run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the new run's Task Queue belongs to that version. - New run initiated by workflow Cron will never inherit. + A new run initiated by workflow Cron will never inherit. - New run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time + A new run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version). Pinned override is inherited if Task Queue of new run is compatible with the override version. Override is inherited separately and takes precedence over inherited base version. + + Note: This field is mutually exclusive with inherited_auto_upgrade_info. + Additionaly, versioning_override, if present, overrides this field during routing decisions. """ - eager_execution_accepted: builtins.bool - """A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and - eager execution was accepted by the server. - Only populated by server with version >= 1.29.0. - """ + + @property + def inherited_auto_upgrade_info( + self, + ) -> temporalio.api.deployment.v1.message_pb2.InheritedAutoUpgradeInfo: + """If present, the new workflow begins with AutoUpgrade behavior. Before dispatching the + first workflow task, this field is set to the deployment version on which the parent/ + previous run was operating. This inheritance only happens when the task queues belong to + the same deployment version. The first workflow task will then be dispatched to either + this inherited deployment version, or the current deployment version of the task queue's + Deployment. After the first workflow task, the effective behavior depends on worker-sent + values in subsequent workflow tasks. + + Inheritance rules: + - ContinueAsNew and child workflows: inherit AutoUpgrade behavior and deployment version + - Cron: never inherits + - Retry: inherits only if the retried run is effectively AutoUpgrade at the time of + retry, and inherited AutoUpgrade behavior when it started (i.e. it is a child of an + AutoUpgrade parent or ContinueAsNew of an AutoUpgrade run, running on the same + deployment as the parent/previous run) + + Additional notes: + - This field is mutually exclusive with `inherited_pinned_version`. + - `versioning_override`, if present, overrides this field during routing decisions. + - SDK implementations do not interact with this field and is only used internally by + the server to ensure task routing correctness. + """ + + @property + def declined_target_version_upgrade(self) -> global___DeclinedTargetVersionUpgrade: + """During a previous run of this workflow, the server may have notified the SDK + that the Target Worker Deployment Version changed, but the SDK declined to + upgrade (e.g., by continuing-as-new with PINNED behavior). This field records + the target version that was declined. + + This is a wrapper message to distinguish "never declined" (nil wrapper) from + "declined an unversioned target" (non-nil wrapper with nil deployment_version). + + Used internally by the server during continue-as-new and retry. + Should not be read or interpreted by SDKs. + """ + + @property + def time_skipping_config( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingConfig: + """Initial time-skipping configuration for this workflow execution, recorded at start time. + This may have been set explicitly via the start workflow request, or propagated from a + parent/previous execution. + + The configuration may be updated after start via UpdateWorkflowExecutionOptions, which + will be reflected in the WorkflowExecutionOptionsUpdatedEvent. + """ + + @property + def time_skipping_state_propagation( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingStatePropagation: + """The time-skipping state propagated from a previous run of this workflow. This can be nil + if no time skipping has occurred or there is no previous run. + """ + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this workflow.""" + def __init__( self, *, @@ -307,17 +393,31 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., inherited_pinned_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion | None = ..., + inherited_auto_upgrade_info: temporalio.api.deployment.v1.message_pb2.InheritedAutoUpgradeInfo + | None = ..., eager_execution_accepted: builtins.bool = ..., + declined_target_version_upgrade: global___DeclinedTargetVersionUpgrade + | None = ..., + time_skipping_config: temporalio.api.common.v1.message_pb2.TimeSkippingConfig + | None = ..., + time_skipping_state_propagation: temporalio.api.common.v1.message_pb2.TimeSkippingStatePropagation + | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "continued_failure", b"continued_failure", + "declined_target_version_upgrade", + b"declined_target_version_upgrade", "first_workflow_task_backoff", b"first_workflow_task_backoff", "header", b"header", + "inherited_auto_upgrade_info", + b"inherited_auto_upgrade_info", "inherited_pinned_version", b"inherited_pinned_version", "input", @@ -332,6 +432,8 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): b"prev_auto_reset_points", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "retry_policy", b"retry_policy", "root_workflow_execution", @@ -342,6 +444,10 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): b"source_version_stamp", "task_queue", b"task_queue", + "time_skipping_config", + b"time_skipping_config", + "time_skipping_state_propagation", + b"time_skipping_state_propagation", "versioning_override", b"versioning_override", "workflow_execution_expiration_time", @@ -358,7 +464,7 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attempt", b"attempt", "completion_callbacks", @@ -369,6 +475,8 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): b"continued_failure", "cron_schedule", b"cron_schedule", + "declined_target_version_upgrade", + b"declined_target_version_upgrade", "eager_execution_accepted", b"eager_execution_accepted", "first_execution_run_id", @@ -379,6 +487,8 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): b"header", "identity", b"identity", + "inherited_auto_upgrade_info", + b"inherited_auto_upgrade_info", "inherited_build_id", b"inherited_build_id", "inherited_pinned_version", @@ -409,6 +519,8 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): b"prev_auto_reset_points", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "retry_policy", b"retry_policy", "root_workflow_execution", @@ -419,6 +531,10 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): b"source_version_stamp", "task_queue", b"task_queue", + "time_skipping_config", + b"time_skipping_config", + "time_skipping_state_propagation", + b"time_skipping_state_propagation", "versioning_override", b"versioning_override", "workflow_execution_expiration_time", @@ -440,19 +556,63 @@ global___WorkflowExecutionStartedEventAttributes = ( WorkflowExecutionStartedEventAttributes ) +@typing.final +class DeclinedTargetVersionUpgrade(google.protobuf.message.Message): + """Wrapper for a target deployment version that the SDK declined to upgrade to. + See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int + REVISION_NUMBER_FIELD_NUMBER: builtins.int + revision_number: builtins.int + """Revision number of the task queue routing config at the time the target + was declined. If an incoming target's revision is <= this value, it is + not newer and is not used for deciding whether or not to suppress the + upgrade signal. + """ + @property + def deployment_version( + self, + ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: ... + def __init__( + self, + *, + deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion + | None = ..., + revision_number: builtins.int = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["deployment_version", b"deployment_version"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "deployment_version", + b"deployment_version", + "revision_number", + b"revision_number", + ], + ) -> None: ... + +global___DeclinedTargetVersionUpgrade = DeclinedTargetVersionUpgrade + +@typing.final class WorkflowExecutionCompletedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor RESULT_FIELD_NUMBER: builtins.int WORKFLOW_TASK_COMPLETED_EVENT_ID_FIELD_NUMBER: builtins.int NEW_EXECUTION_RUN_ID_FIELD_NUMBER: builtins.int - @property - def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Serialized result of workflow completion (ie: The return value of the workflow function)""" workflow_task_completed_event_id: builtins.int """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" new_execution_run_id: builtins.str """If another run is started by cron, this contains the new run id.""" + @property + def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized result of workflow completion (ie: The return value of the workflow function)""" + def __init__( self, *, @@ -461,11 +621,11 @@ class WorkflowExecutionCompletedEventAttributes(google.protobuf.message.Message) new_execution_run_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "new_execution_run_id", b"new_execution_run_id", "result", @@ -479,6 +639,7 @@ global___WorkflowExecutionCompletedEventAttributes = ( WorkflowExecutionCompletedEventAttributes ) +@typing.final class WorkflowExecutionFailedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -486,14 +647,15 @@ class WorkflowExecutionFailedEventAttributes(google.protobuf.message.Message): RETRY_STATE_FIELD_NUMBER: builtins.int WORKFLOW_TASK_COMPLETED_EVENT_ID_FIELD_NUMBER: builtins.int NEW_EXECUTION_RUN_ID_FIELD_NUMBER: builtins.int - @property - def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: - """Serialized result of workflow failure (ex: An exception thrown, or error returned)""" retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType workflow_task_completed_event_id: builtins.int """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" new_execution_run_id: builtins.str """If another run is started by cron or retry, this contains the new run id.""" + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """Serialized result of workflow failure (ex: An exception thrown, or error returned)""" + def __init__( self, *, @@ -503,11 +665,11 @@ class WorkflowExecutionFailedEventAttributes(google.protobuf.message.Message): new_execution_run_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "new_execution_run_id", @@ -521,6 +683,7 @@ class WorkflowExecutionFailedEventAttributes(google.protobuf.message.Message): global___WorkflowExecutionFailedEventAttributes = WorkflowExecutionFailedEventAttributes +@typing.final class WorkflowExecutionTimedOutEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -537,7 +700,7 @@ class WorkflowExecutionTimedOutEventAttributes(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "new_execution_run_id", b"new_execution_run_id", "retry_state", @@ -549,6 +712,7 @@ global___WorkflowExecutionTimedOutEventAttributes = ( WorkflowExecutionTimedOutEventAttributes ) +@typing.final class WorkflowExecutionContinuedAsNewEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -567,8 +731,24 @@ class WorkflowExecutionContinuedAsNewEventAttributes(google.protobuf.message.Mes MEMO_FIELD_NUMBER: builtins.int SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int INHERIT_BUILD_ID_FIELD_NUMBER: builtins.int + INITIAL_VERSIONING_BEHAVIOR_FIELD_NUMBER: builtins.int new_execution_run_id: builtins.str """The run ID of the new workflow started by this continue-as-new""" + workflow_task_completed_event_id: builtins.int + """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" + initiator: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewInitiator.ValueType + inherit_build_id: builtins.bool + """If this is set, the new execution inherits the Build ID of the current execution. Otherwise, + the assignment rules will be used to independently assign a Build ID to the new execution. + Deprecated. Only considered for versioning v0.2. + """ + initial_versioning_behavior: ( + temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType + ) + """Experimental. Optionally decide the versioning behavior that the first task of the new run should use. + For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version + of the previous run. + """ @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... @property @@ -578,25 +758,31 @@ class WorkflowExecutionContinuedAsNewEventAttributes(google.protobuf.message.Mes @property def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow run.""" + @property def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow task.""" - workflow_task_completed_event_id: builtins.int - """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" + @property def backoff_start_interval(self) -> google.protobuf.duration_pb2.Duration: - """TODO: How and is this used?""" - initiator: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewInitiator.ValueType + """How long the server will wait before scheduling the first workflow task for the new run. + Used for cron, retry, and other continue-as-new cases that server may enforce some minimal + delay between new runs for system protection purpose. + """ + @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: - """TODO: David are these right? - Deprecated. If a workflow's retry policy would cause a new run to start when the current one + """Deprecated. If a workflow's retry policy would cause a new run to start when the current one has failed, this field would be populated with that failure. Now (when supported by server and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set. """ + @property def last_completion_result(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """TODO: Is this the result of *this* workflow as it continued-as-new?""" + """The result from the most recent completed run of this workflow. The SDK surfaces this to the + new run via APIs such as `GetLastCompletionResult`. + """ + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... @property @@ -605,11 +791,6 @@ class WorkflowExecutionContinuedAsNewEventAttributes(google.protobuf.message.Mes def search_attributes( self, ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ... - inherit_build_id: builtins.bool - """If this is set, the new execution inherits the Build ID of the current execution. Otherwise, - the assignment rules will be used to independently assign a Build ID to the new execution. - Deprecated. Only considered for versioning v0.2. - """ def __init__( self, *, @@ -630,10 +811,11 @@ class WorkflowExecutionContinuedAsNewEventAttributes(google.protobuf.message.Mes search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes | None = ..., inherit_build_id: builtins.bool = ..., + initial_versioning_behavior: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "backoff_start_interval", b"backoff_start_interval", "failure", @@ -660,7 +842,7 @@ class WorkflowExecutionContinuedAsNewEventAttributes(google.protobuf.message.Mes ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "backoff_start_interval", b"backoff_start_interval", "failure", @@ -669,6 +851,8 @@ class WorkflowExecutionContinuedAsNewEventAttributes(google.protobuf.message.Mes b"header", "inherit_build_id", b"inherit_build_id", + "initial_versioning_behavior", + b"initial_versioning_behavior", "initiator", b"initiator", "input", @@ -698,15 +882,19 @@ global___WorkflowExecutionContinuedAsNewEventAttributes = ( WorkflowExecutionContinuedAsNewEventAttributes ) +@typing.final class WorkflowTaskScheduledEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor TASK_QUEUE_FIELD_NUMBER: builtins.int START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int ATTEMPT_FIELD_NUMBER: builtins.int + attempt: builtins.int + """Starting at 1, how many attempts there have been to complete this task""" @property def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: """The task queue this workflow task was enqueued in, which could be a normal or sticky queue""" + @property def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """How long the worker has to process this task once receiving it before it times out @@ -714,8 +902,7 @@ class WorkflowTaskScheduledEventAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ - attempt: builtins.int - """Starting at 1, how many attempts there have been to complete this task""" + def __init__( self, *, @@ -725,7 +912,7 @@ class WorkflowTaskScheduledEventAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "start_to_close_timeout", b"start_to_close_timeout", "task_queue", @@ -734,7 +921,7 @@ class WorkflowTaskScheduledEventAttributes(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attempt", b"attempt", "start_to_close_timeout", @@ -746,6 +933,7 @@ class WorkflowTaskScheduledEventAttributes(google.protobuf.message.Message): global___WorkflowTaskScheduledEventAttributes = WorkflowTaskScheduledEventAttributes +@typing.final class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -753,6 +941,8 @@ class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int REQUEST_ID_FIELD_NUMBER: builtins.int SUGGEST_CONTINUE_AS_NEW_FIELD_NUMBER: builtins.int + SUGGEST_CONTINUE_AS_NEW_REASONS_FIELD_NUMBER: builtins.int + TARGET_WORKER_DEPLOYMENT_VERSION_CHANGED_FIELD_NUMBER: builtins.int HISTORY_SIZE_BYTES_FIELD_NUMBER: builtins.int WORKER_VERSION_FIELD_NUMBER: builtins.int BUILD_ID_REDIRECT_COUNTER_FIELD_NUMBER: builtins.int @@ -761,26 +951,46 @@ class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message): identity: builtins.str """Identity of the worker who picked up this task""" request_id: builtins.str - """TODO: ? Appears unused?""" + """This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would + set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful + in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response, + so matching could retry and history service would return success if the request_id matches. + In that case, matching will continue to deliver the task to worker. Without this field, history + service would return AlreadyStarted error, and matching would drop the task. + """ suggest_continue_as_new: builtins.bool - """True if this workflow should continue-as-new soon because its history size (in - either event count or bytes) is getting large. + """True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why.""" + target_worker_deployment_version_changed: builtins.bool + """True if Workflow's Target Worker Deployment Version is different from its Pinned Version and + the workflow is Pinned. + Experimental. """ history_size_bytes: builtins.int """Total history size in bytes, which the workflow might use to decide when to continue-as-new regardless of the suggestion. Note that history event count is just the event id of this event, so we don't include it explicitly here. """ - @property - def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: - """Version info of the worker to whom this task was dispatched. - Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - """ build_id_redirect_counter: builtins.int """Used by server internally to properly reapply build ID redirects to an execution when rebuilding it from events. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] """ + @property + def suggest_continue_as_new_reasons( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + temporalio.api.enums.v1.workflow_pb2.SuggestContinueAsNewReason.ValueType + ]: + """The reason(s) that suggest_continue_as_new is true, if it is. + Unset if suggest_continue_as_new is false. + """ + + @property + def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: + """Version info of the worker to whom this task was dispatched. + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + """ + def __init__( self, *, @@ -788,17 +998,22 @@ class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message): identity: builtins.str = ..., request_id: builtins.str = ..., suggest_continue_as_new: builtins.bool = ..., + suggest_continue_as_new_reasons: collections.abc.Iterable[ + temporalio.api.enums.v1.workflow_pb2.SuggestContinueAsNewReason.ValueType + ] + | None = ..., + target_worker_deployment_version_changed: builtins.bool = ..., history_size_bytes: builtins.int = ..., worker_version: temporalio.api.common.v1.message_pb2.WorkerVersionStamp | None = ..., build_id_redirect_counter: builtins.int = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["worker_version", b"worker_version"] + self, field_name: typing.Literal["worker_version", b"worker_version"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id_redirect_counter", b"build_id_redirect_counter", "history_size_bytes", @@ -811,6 +1026,10 @@ class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message): b"scheduled_event_id", "suggest_continue_as_new", b"suggest_continue_as_new", + "suggest_continue_as_new_reasons", + b"suggest_continue_as_new_reasons", + "target_worker_deployment_version_changed", + b"target_worker_deployment_version_changed", "worker_version", b"worker_version", ], @@ -818,6 +1037,7 @@ class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message): global___WorkflowTaskStartedEventAttributes = WorkflowTaskStartedEventAttributes +@typing.final class WorkflowTaskCompletedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -843,6 +1063,22 @@ class WorkflowTaskCompletedEventAttributes(google.protobuf.message.Message): """Binary ID of the worker who completed this task Deprecated. Replaced with `deployment_version`. """ + versioning_behavior: ( + temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType + ) + """Versioning behavior sent by the worker that completed this task for this particular workflow + execution. UNSPECIFIED means the task was completed by an unversioned worker. This value + updates workflow execution's `versioning_info.behavior`. + """ + worker_deployment_version: builtins.str + """The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` + is set. This value updates workflow execution's `versioning_info.version`. + Deprecated. Replaced with `deployment_version`. + """ + worker_deployment_name: builtins.str + """The name of Worker Deployment that completed this task. Must be set if `versioning_behavior` + is set. This value updates workflow execution's `worker_deployment_name`. + """ @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker who processed this workflow task. If present, the `build_id` field @@ -850,6 +1086,7 @@ class WorkflowTaskCompletedEventAttributes(google.protobuf.message.Message): populated to preserve compatibility). Deprecated. Use `deployment_version` and `versioning_behavior` instead. """ + @property def sdk_metadata( self, @@ -857,11 +1094,13 @@ class WorkflowTaskCompletedEventAttributes(google.protobuf.message.Message): """Data the SDK wishes to record for itself, but server need not interpret, and does not directly impact workflow state. """ + @property def metering_metadata( self, ) -> temporalio.api.common.v1.message_pb2.MeteringMetadata: """Local usage data sent during workflow task completion and recorded here for posterity""" + @property def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: """The deployment that completed this task. May or may not be set for unversioned workers, @@ -869,32 +1108,15 @@ class WorkflowTaskCompletedEventAttributes(google.protobuf.message.Message): `versioning_info.deployment`. Deprecated. Replaced with `deployment_version`. """ - versioning_behavior: ( - temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType - ) - """Versioning behavior sent by the worker that completed this task for this particular workflow - execution. UNSPECIFIED means the task was completed by an unversioned worker. This value - updates workflow execution's `versioning_info.behavior`. - """ - worker_deployment_version: builtins.str - """The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` - is set. This value updates workflow execution's `versioning_info.version`. - Experimental. Worker Deployments are experimental and might significantly change in the future. - Deprecated. Replaced with `deployment_version`. - """ - worker_deployment_name: builtins.str - """The name of Worker Deployment that completed this task. Must be set if `versioning_behavior` - is set. This value updates workflow execution's `worker_deployment_name`. - Experimental. Worker Deployments are experimental and might significantly change in the future. - """ + @property def deployment_version( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: """The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` is set. This value updates workflow execution's `versioning_info.deployment_version`. - Experimental. Worker Deployments are experimental and might significantly change in the future. """ + def __init__( self, *, @@ -917,7 +1139,7 @@ class WorkflowTaskCompletedEventAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "deployment_version", @@ -932,7 +1154,7 @@ class WorkflowTaskCompletedEventAttributes(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "binary_checksum", b"binary_checksum", "deployment", @@ -962,6 +1184,7 @@ class WorkflowTaskCompletedEventAttributes(google.protobuf.message.Message): global___WorkflowTaskCompletedEventAttributes = WorkflowTaskCompletedEventAttributes +@typing.final class WorkflowTaskTimedOutEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -982,7 +1205,7 @@ class WorkflowTaskTimedOutEventAttributes(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "scheduled_event_id", b"scheduled_event_id", "started_event_id", @@ -994,6 +1217,7 @@ class WorkflowTaskTimedOutEventAttributes(google.protobuf.message.Message): global___WorkflowTaskTimedOutEventAttributes = WorkflowTaskTimedOutEventAttributes +@typing.final class WorkflowTaskFailedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1012,21 +1236,26 @@ class WorkflowTaskFailedEventAttributes(google.protobuf.message.Message): started_event_id: builtins.int """The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to""" cause: temporalio.api.enums.v1.failed_cause_pb2.WorkflowTaskFailedCause.ValueType - @property - def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: - """The failure details""" identity: builtins.str - """If a worker explicitly failed this task, it's identity. TODO: What is this set to if server fails the task?""" + """If a worker explicitly failed this task, this field contains the worker's identity. + When the server generates the failure internally this field is set as 'history-service'. + """ base_run_id: builtins.str """The original run id of the workflow. For reset workflow.""" new_run_id: builtins.str """If the workflow is being reset, the new run id.""" fork_event_version: builtins.int - """TODO: ?""" + """Version of the event where the history branch was forked. Used by multi-cluster replication + during resets to identify the correct history branch. + """ binary_checksum: builtins.str """Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] If a worker explicitly failed this task, its binary id """ + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The failure details""" + @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker who processed this workflow task. If present, the `build_id` field @@ -1034,6 +1263,7 @@ class WorkflowTaskFailedEventAttributes(google.protobuf.message.Message): populated to preserve compatibility). Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] """ + def __init__( self, *, @@ -1051,13 +1281,13 @@ class WorkflowTaskFailedEventAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "worker_version", b"worker_version" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "base_run_id", b"base_run_id", "binary_checksum", @@ -1083,6 +1313,7 @@ class WorkflowTaskFailedEventAttributes(google.protobuf.message.Message): global___WorkflowTaskFailedEventAttributes = WorkflowTaskFailedEventAttributes +@typing.final class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1101,6 +1332,13 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message): PRIORITY_FIELD_NUMBER: builtins.int activity_id: builtins.str """The worker/user assigned identifier for the activity""" + workflow_task_completed_event_id: builtins.int + """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" + use_workflow_build_id: builtins.bool + """If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, + Assignment rules of the activity's Task Queue will be used to determine the Build ID. + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + """ @property def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: ... @property @@ -1117,6 +1355,7 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: """Limits time an activity task can stay in a task queue before a worker picks it up. This @@ -1127,6 +1366,7 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Maximum time an activity is allowed to execute after being picked up by a worker. This @@ -1136,27 +1376,24 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def heartbeat_timeout(self) -> google.protobuf.duration_pb2.Duration: """Maximum permitted time between successful worker heartbeats.""" - workflow_task_completed_event_id: builtins.int - """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """Activities are assigned a default retry policy controlled by the service's dynamic configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set retry_policy.maximum_attempts to 1. """ - use_workflow_build_id: builtins.bool - """If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, - Assignment rules of the activity's Task Queue will be used to determine the Build ID. - Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata. If this message is not present, or any fields are not present, they inherit the values from the workflow. """ + def __init__( self, *, @@ -1176,7 +1413,7 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_type", b"activity_type", "header", @@ -1201,7 +1438,7 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "activity_type", @@ -1233,6 +1470,7 @@ class ActivityTaskScheduledEventAttributes(google.protobuf.message.Message): global___ActivityTaskScheduledEventAttributes = ActivityTaskScheduledEventAttributes +@typing.final class ActivityTaskStartedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1248,24 +1486,32 @@ class ActivityTaskStartedEventAttributes(google.protobuf.message.Message): identity: builtins.str """id of the worker that picked up this task""" request_id: builtins.str - """TODO ??""" + """This field is populated from the RecordActivityTaskStartedRequest. Matching service would + set the request_id on the RecordActivityTaskStartedRequest to a new UUID. This is useful + in case a RecordActivityTaskStarted call succeed but matching doesn't get that response, + so matching could retry and history service would return success if the request_id matches. + In that case, matching will continue to deliver the task to worker. Without this field, history + service would return AlreadyStarted error, and matching would drop the task. + """ attempt: builtins.int """Starting at 1, the number of times this task has been attempted""" + build_id_redirect_counter: builtins.int + """Used by server internally to properly reapply build ID redirects to an execution + when rebuilding it from events. + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + """ @property def last_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """Will be set to the most recent failure details, if this task has previously failed and then been retried. """ + @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker to whom this task was dispatched. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] """ - build_id_redirect_counter: builtins.int - """Used by server internally to properly reapply build ID redirects to an execution - when rebuilding it from events. - Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - """ + def __init__( self, *, @@ -1280,13 +1526,13 @@ class ActivityTaskStartedEventAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "last_failure", b"last_failure", "worker_version", b"worker_version" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attempt", b"attempt", "build_id_redirect_counter", @@ -1306,6 +1552,7 @@ class ActivityTaskStartedEventAttributes(google.protobuf.message.Message): global___ActivityTaskStartedEventAttributes = ActivityTaskStartedEventAttributes +@typing.final class ActivityTaskCompletedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1314,20 +1561,22 @@ class ActivityTaskCompletedEventAttributes(google.protobuf.message.Message): STARTED_EVENT_ID_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int WORKER_VERSION_FIELD_NUMBER: builtins.int - @property - def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Serialized results of the activity. IE: The return value of the activity function""" scheduled_event_id: builtins.int """The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to""" started_event_id: builtins.int """The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to""" identity: builtins.str """id of the worker that completed this task""" + @property + def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized results of the activity. IE: The return value of the activity function""" + @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker who processed this workflow task. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] """ + def __init__( self, *, @@ -1340,13 +1589,13 @@ class ActivityTaskCompletedEventAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "result", b"result", "worker_version", b"worker_version" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "result", @@ -1362,6 +1611,7 @@ class ActivityTaskCompletedEventAttributes(google.protobuf.message.Message): global___ActivityTaskCompletedEventAttributes = ActivityTaskCompletedEventAttributes +@typing.final class ActivityTaskFailedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1370,10 +1620,8 @@ class ActivityTaskFailedEventAttributes(google.protobuf.message.Message): STARTED_EVENT_ID_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int RETRY_STATE_FIELD_NUMBER: builtins.int - WORKER_VERSION_FIELD_NUMBER: builtins.int - @property - def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: - """Failure details""" + WORKER_VERSION_FIELD_NUMBER: builtins.int + CAUSE_FIELD_NUMBER: builtins.int scheduled_event_id: builtins.int """The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to""" started_event_id: builtins.int @@ -1381,11 +1629,18 @@ class ActivityTaskFailedEventAttributes(google.protobuf.message.Message): identity: builtins.str """id of the worker that failed this task""" retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType + cause: temporalio.api.enums.v1.failed_cause_pb2.ActivityTaskFailedCause.ValueType + """Why did the task fail? When unset, the failure is treated as an unspecified activity failure.""" + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """Failure details""" + @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker who processed this workflow task. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] """ + def __init__( self, *, @@ -1396,16 +1651,19 @@ class ActivityTaskFailedEventAttributes(google.protobuf.message.Message): retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType = ..., worker_version: temporalio.api.common.v1.message_pb2.WorkerVersionStamp | None = ..., + cause: temporalio.api.enums.v1.failed_cause_pb2.ActivityTaskFailedCause.ValueType = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "worker_version", b"worker_version" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "cause", + b"cause", "failure", b"failure", "identity", @@ -1423,6 +1681,7 @@ class ActivityTaskFailedEventAttributes(google.protobuf.message.Message): global___ActivityTaskFailedEventAttributes = ActivityTaskFailedEventAttributes +@typing.final class ActivityTaskTimedOutEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1430,16 +1689,17 @@ class ActivityTaskTimedOutEventAttributes(google.protobuf.message.Message): SCHEDULED_EVENT_ID_FIELD_NUMBER: builtins.int STARTED_EVENT_ID_FIELD_NUMBER: builtins.int RETRY_STATE_FIELD_NUMBER: builtins.int - @property - def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: - """If this activity had failed, was retried, and then timed out, that failure is stored as the - `cause` in here. - """ scheduled_event_id: builtins.int """The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to""" started_event_id: builtins.int """The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to""" retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """If this activity had failed, was retried, and then timed out, that failure is stored as the + `cause` in here. + """ + def __init__( self, *, @@ -1449,11 +1709,11 @@ class ActivityTaskTimedOutEventAttributes(google.protobuf.message.Message): retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "retry_state", @@ -1467,6 +1727,7 @@ class ActivityTaskTimedOutEventAttributes(google.protobuf.message.Message): global___ActivityTaskTimedOutEventAttributes = ActivityTaskTimedOutEventAttributes +@typing.final class ActivityTaskCancelRequestedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1484,7 +1745,7 @@ class ActivityTaskCancelRequestedEventAttributes(google.protobuf.message.Message ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "scheduled_event_id", b"scheduled_event_id", "workflow_task_completed_event_id", @@ -1496,6 +1757,7 @@ global___ActivityTaskCancelRequestedEventAttributes = ( ActivityTaskCancelRequestedEventAttributes ) +@typing.final class ActivityTaskCanceledEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1505,9 +1767,6 @@ class ActivityTaskCanceledEventAttributes(google.protobuf.message.Message): STARTED_EVENT_ID_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int WORKER_VERSION_FIELD_NUMBER: builtins.int - @property - def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Additional information that the activity reported upon confirming cancellation""" latest_cancel_requested_event_id: builtins.int """id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same activity @@ -1518,11 +1777,16 @@ class ActivityTaskCanceledEventAttributes(google.protobuf.message.Message): """The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to""" identity: builtins.str """id of the worker who canceled this activity""" + @property + def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Additional information that the activity reported upon confirming cancellation""" + @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker who processed this workflow task. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] """ + def __init__( self, *, @@ -1536,13 +1800,13 @@ class ActivityTaskCanceledEventAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "worker_version", b"worker_version" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "identity", @@ -1560,6 +1824,7 @@ class ActivityTaskCanceledEventAttributes(google.protobuf.message.Message): global___ActivityTaskCanceledEventAttributes = ActivityTaskCanceledEventAttributes +@typing.final class TimerStartedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1568,6 +1833,8 @@ class TimerStartedEventAttributes(google.protobuf.message.Message): WORKFLOW_TASK_COMPLETED_EVENT_ID_FIELD_NUMBER: builtins.int timer_id: builtins.str """The worker/user assigned id for this timer""" + workflow_task_completed_event_id: builtins.int + """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" @property def start_to_fire_timeout(self) -> google.protobuf.duration_pb2.Duration: """How long until this timer fires @@ -1575,8 +1842,7 @@ class TimerStartedEventAttributes(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ - workflow_task_completed_event_id: builtins.int - """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" + def __init__( self, *, @@ -1586,13 +1852,11 @@ class TimerStartedEventAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "start_to_fire_timeout", b"start_to_fire_timeout" - ], + field_name: typing.Literal["start_to_fire_timeout", b"start_to_fire_timeout"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "start_to_fire_timeout", b"start_to_fire_timeout", "timer_id", @@ -1604,6 +1868,7 @@ class TimerStartedEventAttributes(google.protobuf.message.Message): global___TimerStartedEventAttributes = TimerStartedEventAttributes +@typing.final class TimerFiredEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1621,13 +1886,14 @@ class TimerFiredEventAttributes(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "started_event_id", b"started_event_id", "timer_id", b"timer_id" ], ) -> None: ... global___TimerFiredEventAttributes = TimerFiredEventAttributes +@typing.final class TimerCanceledEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1653,7 +1919,7 @@ class TimerCanceledEventAttributes(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "started_event_id", @@ -1667,6 +1933,7 @@ class TimerCanceledEventAttributes(google.protobuf.message.Message): global___TimerCanceledEventAttributes = TimerCanceledEventAttributes +@typing.final class WorkflowExecutionCancelRequestedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1675,17 +1942,17 @@ class WorkflowExecutionCancelRequestedEventAttributes(google.protobuf.message.Me EXTERNAL_WORKFLOW_EXECUTION_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int cause: builtins.str - """User provided reason for requesting cancellation - TODO: shall we create a new field with name "reason" and deprecate this one? - """ + """User provided reason for requesting cancellation""" external_initiated_event_id: builtins.int - """TODO: Is this the ID of the event in the workflow which initiated this cancel, if there was one?""" + """The ID of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event in the external + workflow history when the cancellation was requested by another workflow. + """ + identity: builtins.str + """id of the worker or client who requested this cancel""" @property def external_workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... - identity: builtins.str - """id of the worker or client who requested this cancel""" def __init__( self, *, @@ -1697,13 +1964,13 @@ class WorkflowExecutionCancelRequestedEventAttributes(google.protobuf.message.Me ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "external_workflow_execution", b"external_workflow_execution" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cause", b"cause", "external_initiated_event_id", @@ -1719,6 +1986,7 @@ global___WorkflowExecutionCancelRequestedEventAttributes = ( WorkflowExecutionCancelRequestedEventAttributes ) +@typing.final class WorkflowExecutionCanceledEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1735,11 +2003,11 @@ class WorkflowExecutionCanceledEventAttributes(google.protobuf.message.Message): details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["details", b"details"] + self, field_name: typing.Literal["details", b"details"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "workflow_task_completed_event_id", @@ -1751,9 +2019,11 @@ global___WorkflowExecutionCanceledEventAttributes = ( WorkflowExecutionCanceledEventAttributes ) +@typing.final class MarkerRecordedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class DetailsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1769,11 +2039,10 @@ class MarkerRecordedEventAttributes(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payloads | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... MARKER_NAME_FIELD_NUMBER: builtins.int @@ -1783,6 +2052,8 @@ class MarkerRecordedEventAttributes(google.protobuf.message.Message): FAILURE_FIELD_NUMBER: builtins.int marker_name: builtins.str """Workers use this to identify the "types" of various markers. Ex: Local activity, side effect.""" + workflow_task_completed_event_id: builtins.int + """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" @property def details( self, @@ -1790,13 +2061,13 @@ class MarkerRecordedEventAttributes(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payloads ]: """Serialized information recorded in the marker""" - workflow_task_completed_event_id: builtins.int - """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """Some uses of markers, like a local activity, could "fail". If they did that is recorded here.""" + def __init__( self, *, @@ -1810,14 +2081,11 @@ class MarkerRecordedEventAttributes(google.protobuf.message.Message): failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "failure", b"failure", "header", b"header" - ], + self, field_name: typing.Literal["failure", b"failure", "header", b"header"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "failure", @@ -1833,6 +2101,7 @@ class MarkerRecordedEventAttributes(google.protobuf.message.Message): global___MarkerRecordedEventAttributes = MarkerRecordedEventAttributes +@typing.final class WorkflowExecutionSignaledEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1842,25 +2111,33 @@ class WorkflowExecutionSignaledEventAttributes(google.protobuf.message.Message): HEADER_FIELD_NUMBER: builtins.int SKIP_GENERATE_WORKFLOW_TASK_FIELD_NUMBER: builtins.int EXTERNAL_WORKFLOW_EXECUTION_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int signal_name: builtins.str """The name/type of the signal to fire""" + identity: builtins.str + """id of the worker/client who sent this signal""" + skip_generate_workflow_task: builtins.bool + """Deprecated. This field is never respected and should always be set to false.""" + request_id: builtins.str + """The request ID of the Signal request, used by the server to attach this to + the correct Event ID when generating link. + """ @property def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Will be deserialized and provided as argument(s) to the signal handler""" - identity: builtins.str - """id of the worker/client who sent this signal""" + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: """Headers that were passed by the sender of the signal and copied by temporal server into the workflow task. """ - skip_generate_workflow_task: builtins.bool - """Deprecated. This field is never respected and should always be set to false.""" + @property def external_workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: """When signal origin is a workflow execution, this field is set.""" + def __init__( self, *, @@ -1871,10 +2148,11 @@ class WorkflowExecutionSignaledEventAttributes(google.protobuf.message.Message): skip_generate_workflow_task: builtins.bool = ..., external_workflow_execution: temporalio.api.common.v1.message_pb2.WorkflowExecution | None = ..., + request_id: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "external_workflow_execution", b"external_workflow_execution", "header", @@ -1885,7 +2163,7 @@ class WorkflowExecutionSignaledEventAttributes(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "external_workflow_execution", b"external_workflow_execution", "header", @@ -1894,6 +2172,8 @@ class WorkflowExecutionSignaledEventAttributes(google.protobuf.message.Message): b"identity", "input", b"input", + "request_id", + b"request_id", "signal_name", b"signal_name", "skip_generate_workflow_task", @@ -1905,6 +2185,7 @@ global___WorkflowExecutionSignaledEventAttributes = ( WorkflowExecutionSignaledEventAttributes ) +@typing.final class WorkflowExecutionTerminatedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1913,10 +2194,10 @@ class WorkflowExecutionTerminatedEventAttributes(google.protobuf.message.Message IDENTITY_FIELD_NUMBER: builtins.int reason: builtins.str """User/client provided reason for termination""" - @property - def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... identity: builtins.str """id of the client who requested termination""" + @property + def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... def __init__( self, *, @@ -1925,11 +2206,11 @@ class WorkflowExecutionTerminatedEventAttributes(google.protobuf.message.Message identity: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["details", b"details"] + self, field_name: typing.Literal["details", b"details"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "identity", b"identity", "reason", b"reason" ], ) -> None: ... @@ -1938,6 +2219,7 @@ global___WorkflowExecutionTerminatedEventAttributes = ( WorkflowExecutionTerminatedEventAttributes ) +@typing.final class RequestCancelExternalWorkflowExecutionInitiatedEventAttributes( google.protobuf.message.Message ): @@ -1957,10 +2239,6 @@ class RequestCancelExternalWorkflowExecutionInitiatedEventAttributes( SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str - @property - def workflow_execution( - self, - ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... control: builtins.str """Deprecated.""" child_workflow_only: builtins.bool @@ -1969,6 +2247,10 @@ class RequestCancelExternalWorkflowExecutionInitiatedEventAttributes( """ reason: builtins.str """Reason for requesting the cancellation""" + @property + def workflow_execution( + self, + ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... def __init__( self, *, @@ -1982,14 +2264,11 @@ class RequestCancelExternalWorkflowExecutionInitiatedEventAttributes( reason: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "child_workflow_only", b"child_workflow_only", "control", @@ -2011,6 +2290,7 @@ global___RequestCancelExternalWorkflowExecutionInitiatedEventAttributes = ( RequestCancelExternalWorkflowExecutionInitiatedEventAttributes ) +@typing.final class RequestCancelExternalWorkflowExecutionFailedEventAttributes( google.protobuf.message.Message ): @@ -2031,16 +2311,16 @@ class RequestCancelExternalWorkflowExecutionFailedEventAttributes( SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str - @property - def workflow_execution( - self, - ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... initiated_event_id: builtins.int """id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure corresponds to """ control: builtins.str """Deprecated.""" + @property + def workflow_execution( + self, + ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... def __init__( self, *, @@ -2054,14 +2334,11 @@ class RequestCancelExternalWorkflowExecutionFailedEventAttributes( control: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cause", b"cause", "control", @@ -2083,6 +2360,7 @@ global___RequestCancelExternalWorkflowExecutionFailedEventAttributes = ( RequestCancelExternalWorkflowExecutionFailedEventAttributes ) +@typing.final class ExternalWorkflowExecutionCancelRequestedEventAttributes( google.protobuf.message.Message ): @@ -2115,14 +2393,11 @@ class ExternalWorkflowExecutionCancelRequestedEventAttributes( | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "initiated_event_id", b"initiated_event_id", "namespace", @@ -2138,6 +2413,7 @@ global___ExternalWorkflowExecutionCancelRequestedEventAttributes = ( ExternalWorkflowExecutionCancelRequestedEventAttributes ) +@typing.final class SignalExternalWorkflowExecutionInitiatedEventAttributes( google.protobuf.message.Message ): @@ -2159,21 +2435,22 @@ class SignalExternalWorkflowExecutionInitiatedEventAttributes( SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str - @property - def workflow_execution( - self, - ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... signal_name: builtins.str """name/type of the signal to fire in the external workflow""" - @property - def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Serialized arguments to provide to the signal handler""" control: builtins.str """Deprecated.""" child_workflow_only: builtins.bool """Workers are expected to set this to true if the workflow they are requesting to cancel is a child of the workflow which issued the request """ + @property + def workflow_execution( + self, + ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... + @property + def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized arguments to provide to the signal handler""" + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... def __init__( @@ -2192,7 +2469,7 @@ class SignalExternalWorkflowExecutionInitiatedEventAttributes( ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "input", @@ -2203,7 +2480,7 @@ class SignalExternalWorkflowExecutionInitiatedEventAttributes( ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "child_workflow_only", b"child_workflow_only", "control", @@ -2229,6 +2506,7 @@ global___SignalExternalWorkflowExecutionInitiatedEventAttributes = ( SignalExternalWorkflowExecutionInitiatedEventAttributes ) +@typing.final class SignalExternalWorkflowExecutionFailedEventAttributes( google.protobuf.message.Message ): @@ -2249,13 +2527,13 @@ class SignalExternalWorkflowExecutionFailedEventAttributes( SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str + initiated_event_id: builtins.int + control: builtins.str + """Deprecated.""" @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... - initiated_event_id: builtins.int - control: builtins.str - """Deprecated.""" def __init__( self, *, @@ -2269,14 +2547,11 @@ class SignalExternalWorkflowExecutionFailedEventAttributes( control: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cause", b"cause", "control", @@ -2298,6 +2573,7 @@ global___SignalExternalWorkflowExecutionFailedEventAttributes = ( SignalExternalWorkflowExecutionFailedEventAttributes ) +@typing.final class ExternalWorkflowExecutionSignaledEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2313,12 +2589,12 @@ class ExternalWorkflowExecutionSignaledEventAttributes(google.protobuf.message.M SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str + control: builtins.str + """Deprecated.""" @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... - control: builtins.str - """Deprecated.""" def __init__( self, *, @@ -2330,14 +2606,11 @@ class ExternalWorkflowExecutionSignaledEventAttributes(google.protobuf.message.M control: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "control", b"control", "initiated_event_id", @@ -2355,6 +2628,7 @@ global___ExternalWorkflowExecutionSignaledEventAttributes = ( ExternalWorkflowExecutionSignaledEventAttributes ) +@typing.final class UpsertWorkflowSearchAttributesEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2374,14 +2648,11 @@ class UpsertWorkflowSearchAttributesEventAttributes(google.protobuf.message.Mess | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "search_attributes", b"search_attributes" - ], + self, field_name: typing.Literal["search_attributes", b"search_attributes"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "search_attributes", b"search_attributes", "workflow_task_completed_event_id", @@ -2393,6 +2664,7 @@ global___UpsertWorkflowSearchAttributesEventAttributes = ( UpsertWorkflowSearchAttributesEventAttributes ) +@typing.final class WorkflowPropertiesModifiedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2406,6 +2678,7 @@ class WorkflowPropertiesModifiedEventAttributes(google.protobuf.message.Message) the existing memo. If the user wants to delete values, a default/empty Payload should be used as the value for the key being deleted. """ + def __init__( self, *, @@ -2413,11 +2686,11 @@ class WorkflowPropertiesModifiedEventAttributes(google.protobuf.message.Message) upserted_memo: temporalio.api.common.v1.message_pb2.Memo | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["upserted_memo", b"upserted_memo"] + self, field_name: typing.Literal["upserted_memo", b"upserted_memo"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "upserted_memo", b"upserted_memo", "workflow_task_completed_event_id", @@ -2429,6 +2702,7 @@ global___WorkflowPropertiesModifiedEventAttributes = ( WorkflowPropertiesModifiedEventAttributes ) +@typing.final class StartChildWorkflowExecutionInitiatedEventAttributes( google.protobuf.message.Message ): @@ -2454,12 +2728,34 @@ class StartChildWorkflowExecutionInitiatedEventAttributes( SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int INHERIT_BUILD_ID_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int + TIME_SKIPPING_CONFIG_FIELD_NUMBER: builtins.int + TIME_SKIPPING_STATE_PROPAGATION_FIELD_NUMBER: builtins.int + VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str workflow_id: builtins.str + parent_close_policy: ( + temporalio.api.enums.v1.workflow_pb2.ParentClosePolicy.ValueType + ) + """Default: PARENT_CLOSE_POLICY_TERMINATE.""" + control: builtins.str + """Deprecated.""" + workflow_task_completed_event_id: builtins.int + """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" + workflow_id_reuse_policy: ( + temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType + ) + """Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.""" + cron_schedule: builtins.str + """If this child runs on a cron schedule, it will appear here""" + inherit_build_id: builtins.bool + """If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment + rules of the child's Task Queue will be used to independently assign a Build ID to it. + Deprecated. Only considered for versioning v0.2. + """ @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... @property @@ -2469,28 +2765,17 @@ class StartChildWorkflowExecutionInitiatedEventAttributes( @property def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: """Total workflow execution timeout including retries and continue as new.""" + @property def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow run.""" + @property def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow task.""" - parent_close_policy: ( - temporalio.api.enums.v1.workflow_pb2.ParentClosePolicy.ValueType - ) - """Default: PARENT_CLOSE_POLICY_TERMINATE.""" - control: builtins.str - """Deprecated.""" - workflow_task_completed_event_id: builtins.int - """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" - workflow_id_reuse_policy: ( - temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType - ) - """Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: ... - cron_schedule: builtins.str - """If this child runs on a cron schedule, it will appear here""" @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... @property @@ -2499,14 +2784,32 @@ class StartChildWorkflowExecutionInitiatedEventAttributes( def search_attributes( self, ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ... - inherit_build_id: builtins.bool - """If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment - rules of the child's Task Queue will be used to independently assign a Build ID to it. - Deprecated. Only considered for versioning v0.2. - """ @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata""" + + @property + def time_skipping_config( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingConfig: + """The propagated time-skipping configuration for the child workflow.""" + + @property + def time_skipping_state_propagation( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingStatePropagation: + """The time-skipping state propagated from the parent workflow. This can be nil if no time skipping + has occurred or there is no previous run. + """ + + @property + def versioning_override( + self, + ) -> temporalio.api.workflow.v1.message_pb2.VersioningOverride: + """Versioning override requested for the child workflow. If present, this explicit override + takes precedence over versioning behavior inherited from the parent workflow. + """ + def __init__( self, *, @@ -2531,10 +2834,16 @@ class StartChildWorkflowExecutionInitiatedEventAttributes( | None = ..., inherit_build_id: builtins.bool = ..., priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + time_skipping_config: temporalio.api.common.v1.message_pb2.TimeSkippingConfig + | None = ..., + time_skipping_state_propagation: temporalio.api.common.v1.message_pb2.TimeSkippingStatePropagation + | None = ..., + versioning_override: temporalio.api.workflow.v1.message_pb2.VersioningOverride + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "input", @@ -2549,6 +2858,12 @@ class StartChildWorkflowExecutionInitiatedEventAttributes( b"search_attributes", "task_queue", b"task_queue", + "time_skipping_config", + b"time_skipping_config", + "time_skipping_state_propagation", + b"time_skipping_state_propagation", + "versioning_override", + b"versioning_override", "workflow_execution_timeout", b"workflow_execution_timeout", "workflow_run_timeout", @@ -2561,7 +2876,7 @@ class StartChildWorkflowExecutionInitiatedEventAttributes( ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "control", b"control", "cron_schedule", @@ -2588,6 +2903,12 @@ class StartChildWorkflowExecutionInitiatedEventAttributes( b"search_attributes", "task_queue", b"task_queue", + "time_skipping_config", + b"time_skipping_config", + "time_skipping_state_propagation", + b"time_skipping_state_propagation", + "versioning_override", + b"versioning_override", "workflow_execution_timeout", b"workflow_execution_timeout", "workflow_id", @@ -2609,6 +2930,7 @@ global___StartChildWorkflowExecutionInitiatedEventAttributes = ( StartChildWorkflowExecutionInitiatedEventAttributes ) +@typing.final class StartChildWorkflowExecutionFailedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2626,8 +2948,6 @@ class StartChildWorkflowExecutionFailedEventAttributes(google.protobuf.message.M """ namespace_id: builtins.str workflow_id: builtins.str - @property - def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... cause: temporalio.api.enums.v1.failed_cause_pb2.StartChildWorkflowExecutionFailedCause.ValueType control: builtins.str """Deprecated.""" @@ -2635,6 +2955,8 @@ class StartChildWorkflowExecutionFailedEventAttributes(google.protobuf.message.M """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" workflow_task_completed_event_id: builtins.int """The `WORKFLOW_TASK_COMPLETED` event which this command was reported with""" + @property + def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... def __init__( self, *, @@ -2648,11 +2970,11 @@ class StartChildWorkflowExecutionFailedEventAttributes(google.protobuf.message.M workflow_task_completed_event_id: builtins.int = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["workflow_type", b"workflow_type"] + self, field_name: typing.Literal["workflow_type", b"workflow_type"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cause", b"cause", "control", @@ -2676,6 +2998,7 @@ global___StartChildWorkflowExecutionFailedEventAttributes = ( StartChildWorkflowExecutionFailedEventAttributes ) +@typing.final class ChildWorkflowExecutionStartedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2713,7 +3036,7 @@ class ChildWorkflowExecutionStartedEventAttributes(google.protobuf.message.Messa ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "workflow_execution", @@ -2724,7 +3047,7 @@ class ChildWorkflowExecutionStartedEventAttributes(google.protobuf.message.Messa ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "initiated_event_id", @@ -2744,6 +3067,7 @@ global___ChildWorkflowExecutionStartedEventAttributes = ( ChildWorkflowExecutionStartedEventAttributes ) +@typing.final class ChildWorkflowExecutionCompletedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2754,23 +3078,23 @@ class ChildWorkflowExecutionCompletedEventAttributes(google.protobuf.message.Mes WORKFLOW_TYPE_FIELD_NUMBER: builtins.int INITIATED_EVENT_ID_FIELD_NUMBER: builtins.int STARTED_EVENT_ID_FIELD_NUMBER: builtins.int - @property - def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... namespace: builtins.str """Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str + initiated_event_id: builtins.int + """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" + started_event_id: builtins.int + """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" + @property + def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... - initiated_event_id: builtins.int - """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" - started_event_id: builtins.int - """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" def __init__( self, *, @@ -2785,7 +3109,7 @@ class ChildWorkflowExecutionCompletedEventAttributes(google.protobuf.message.Mes ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "result", b"result", "workflow_execution", @@ -2796,7 +3120,7 @@ class ChildWorkflowExecutionCompletedEventAttributes(google.protobuf.message.Mes ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "initiated_event_id", b"initiated_event_id", "namespace", @@ -2818,6 +3142,7 @@ global___ChildWorkflowExecutionCompletedEventAttributes = ( ChildWorkflowExecutionCompletedEventAttributes ) +@typing.final class ChildWorkflowExecutionFailedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2829,24 +3154,24 @@ class ChildWorkflowExecutionFailedEventAttributes(google.protobuf.message.Messag INITIATED_EVENT_ID_FIELD_NUMBER: builtins.int STARTED_EVENT_ID_FIELD_NUMBER: builtins.int RETRY_STATE_FIELD_NUMBER: builtins.int - @property - def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ... namespace: builtins.str """Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str + initiated_event_id: builtins.int + """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" + started_event_id: builtins.int + """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" + retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ... @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... - initiated_event_id: builtins.int - """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" - started_event_id: builtins.int - """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" - retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType def __init__( self, *, @@ -2862,7 +3187,7 @@ class ChildWorkflowExecutionFailedEventAttributes(google.protobuf.message.Messag ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "workflow_execution", @@ -2873,7 +3198,7 @@ class ChildWorkflowExecutionFailedEventAttributes(google.protobuf.message.Messag ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "initiated_event_id", @@ -2897,6 +3222,7 @@ global___ChildWorkflowExecutionFailedEventAttributes = ( ChildWorkflowExecutionFailedEventAttributes ) +@typing.final class ChildWorkflowExecutionCanceledEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2907,23 +3233,23 @@ class ChildWorkflowExecutionCanceledEventAttributes(google.protobuf.message.Mess WORKFLOW_TYPE_FIELD_NUMBER: builtins.int INITIATED_EVENT_ID_FIELD_NUMBER: builtins.int STARTED_EVENT_ID_FIELD_NUMBER: builtins.int - @property - def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... namespace: builtins.str """Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str + initiated_event_id: builtins.int + """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" + started_event_id: builtins.int + """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" + @property + def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... - initiated_event_id: builtins.int - """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" - started_event_id: builtins.int - """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" def __init__( self, *, @@ -2938,7 +3264,7 @@ class ChildWorkflowExecutionCanceledEventAttributes(google.protobuf.message.Mess ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "workflow_execution", @@ -2949,7 +3275,7 @@ class ChildWorkflowExecutionCanceledEventAttributes(google.protobuf.message.Mess ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "initiated_event_id", @@ -2971,6 +3297,7 @@ global___ChildWorkflowExecutionCanceledEventAttributes = ( ChildWorkflowExecutionCanceledEventAttributes ) +@typing.final class ChildWorkflowExecutionTimedOutEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2986,17 +3313,17 @@ class ChildWorkflowExecutionTimedOutEventAttributes(google.protobuf.message.Mess SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str + initiated_event_id: builtins.int + """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" + started_event_id: builtins.int + """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" + retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... - initiated_event_id: builtins.int - """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" - started_event_id: builtins.int - """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" - retry_state: temporalio.api.enums.v1.workflow_pb2.RetryState.ValueType def __init__( self, *, @@ -3011,7 +3338,7 @@ class ChildWorkflowExecutionTimedOutEventAttributes(google.protobuf.message.Mess ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "workflow_execution", b"workflow_execution", "workflow_type", @@ -3020,7 +3347,7 @@ class ChildWorkflowExecutionTimedOutEventAttributes(google.protobuf.message.Mess ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "initiated_event_id", b"initiated_event_id", "namespace", @@ -3042,6 +3369,7 @@ global___ChildWorkflowExecutionTimedOutEventAttributes = ( ChildWorkflowExecutionTimedOutEventAttributes ) +@typing.final class ChildWorkflowExecutionTerminatedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3056,16 +3384,16 @@ class ChildWorkflowExecutionTerminatedEventAttributes(google.protobuf.message.Me SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. """ namespace_id: builtins.str + initiated_event_id: builtins.int + """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" + started_event_id: builtins.int + """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... - initiated_event_id: builtins.int - """Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to""" - started_event_id: builtins.int - """Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to""" def __init__( self, *, @@ -3079,7 +3407,7 @@ class ChildWorkflowExecutionTerminatedEventAttributes(google.protobuf.message.Me ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "workflow_execution", b"workflow_execution", "workflow_type", @@ -3088,7 +3416,7 @@ class ChildWorkflowExecutionTerminatedEventAttributes(google.protobuf.message.Me ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "initiated_event_id", b"initiated_event_id", "namespace", @@ -3108,13 +3436,74 @@ global___ChildWorkflowExecutionTerminatedEventAttributes = ( ChildWorkflowExecutionTerminatedEventAttributes ) -class WorkflowExecutionOptionsUpdatedEventAttributes(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor +@typing.final +class WorkflowExecutionOptionsUpdatedEventAttributes(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class WorkflowUpdateOptionsUpdate(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UPDATE_ID_FIELD_NUMBER: builtins.int + ATTACHED_REQUEST_ID_FIELD_NUMBER: builtins.int + ATTACHED_COMPLETION_CALLBACKS_FIELD_NUMBER: builtins.int + update_id: builtins.str + """The ID of the workflow update this update options update corresponds to.""" + attached_request_id: builtins.str + """Request ID attached to the running workflow update so that subsequent requests with same + request ID will be deduped + """ + @property + def attached_completion_callbacks( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Callback + ]: + """Completion callbacks attached to the running workflow update.""" + + def __init__( + self, + *, + update_id: builtins.str = ..., + attached_request_id: builtins.str = ..., + attached_completion_callbacks: collections.abc.Iterable[ + temporalio.api.common.v1.message_pb2.Callback + ] + | None = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "attached_completion_callbacks", + b"attached_completion_callbacks", + "attached_request_id", + b"attached_request_id", + "update_id", + b"update_id", + ], + ) -> None: ... VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int UNSET_VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int ATTACHED_REQUEST_ID_FIELD_NUMBER: builtins.int ATTACHED_COMPLETION_CALLBACKS_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + PRIORITY_FIELD_NUMBER: builtins.int + TIME_SKIPPING_CONFIG_FIELD_NUMBER: builtins.int + TIME_SKIPPING_CONFIG_UPDATED_FIELD_NUMBER: builtins.int + WORKFLOW_UPDATE_OPTIONS_FIELD_NUMBER: builtins.int + unset_versioning_override: builtins.bool + """Versioning override removed in this event.""" + attached_request_id: builtins.str + """Request ID attached to the running workflow execution so that subsequent requests with same + request ID will be deduped. + """ + identity: builtins.str + """Optional. The identity of the client who initiated the request that created this event.""" + time_skipping_config_updated: builtins.bool + """Indicates the time skipping config was updated by the recent call to update + workflow execution options. + """ @property def versioning_override( self, @@ -3122,12 +3511,7 @@ class WorkflowExecutionOptionsUpdatedEventAttributes(google.protobuf.message.Mes """Versioning override upserted in this event. Ignored if nil or if unset_versioning_override is true. """ - unset_versioning_override: builtins.bool - """Versioning override removed in this event.""" - attached_request_id: builtins.str - """Request ID attachedto the running workflow execution so that subsequent requests with same - request ID will be deduped. - """ + @property def attached_completion_callbacks( self, @@ -3135,6 +3519,27 @@ class WorkflowExecutionOptionsUpdatedEventAttributes(google.protobuf.message.Mes temporalio.api.common.v1.message_pb2.Callback ]: """Completion callbacks attached to the running workflow execution.""" + + @property + def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: + """Priority override upserted in this event. Represents the full priority; not just partial fields. + Ignored if nil. + """ + + @property + def time_skipping_config( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingConfig: + """TimeSkippingConfig override upserted in this event. Represents the full config.""" + + @property + def workflow_update_options( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___WorkflowExecutionOptionsUpdatedEventAttributes.WorkflowUpdateOptionsUpdate + ]: + """Updates to workflow updates options.""" + def __init__( self, *, @@ -3146,24 +3551,48 @@ class WorkflowExecutionOptionsUpdatedEventAttributes(google.protobuf.message.Mes temporalio.api.common.v1.message_pb2.Callback ] | None = ..., + identity: builtins.str = ..., + priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + time_skipping_config: temporalio.api.common.v1.message_pb2.TimeSkippingConfig + | None = ..., + time_skipping_config_updated: builtins.bool = ..., + workflow_update_options: collections.abc.Iterable[ + global___WorkflowExecutionOptionsUpdatedEventAttributes.WorkflowUpdateOptionsUpdate + ] + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "versioning_override", b"versioning_override" + field_name: typing.Literal[ + "priority", + b"priority", + "time_skipping_config", + b"time_skipping_config", + "versioning_override", + b"versioning_override", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attached_completion_callbacks", b"attached_completion_callbacks", "attached_request_id", b"attached_request_id", + "identity", + b"identity", + "priority", + b"priority", + "time_skipping_config", + b"time_skipping_config", + "time_skipping_config_updated", + b"time_skipping_config_updated", "unset_versioning_override", b"unset_versioning_override", "versioning_override", b"versioning_override", + "workflow_update_options", + b"workflow_update_options", ], ) -> None: ... @@ -3171,6 +3600,7 @@ global___WorkflowExecutionOptionsUpdatedEventAttributes = ( WorkflowExecutionOptionsUpdatedEventAttributes ) +@typing.final class WorkflowPropertiesModifiedExternallyEventAttributes( google.protobuf.message.Message ): @@ -3188,15 +3618,19 @@ class WorkflowPropertiesModifiedExternallyEventAttributes( @property def new_workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Not used.""" + @property def new_workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Not used.""" + @property def new_workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: """Not used.""" + @property def upserted_memo(self) -> temporalio.api.common.v1.message_pb2.Memo: """Not used.""" + def __init__( self, *, @@ -3209,7 +3643,7 @@ class WorkflowPropertiesModifiedExternallyEventAttributes( ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "new_workflow_execution_timeout", b"new_workflow_execution_timeout", "new_workflow_run_timeout", @@ -3222,7 +3656,7 @@ class WorkflowPropertiesModifiedExternallyEventAttributes( ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "new_task_queue", b"new_task_queue", "new_workflow_execution_timeout", @@ -3240,6 +3674,7 @@ global___WorkflowPropertiesModifiedExternallyEventAttributes = ( WorkflowPropertiesModifiedExternallyEventAttributes ) +@typing.final class ActivityPropertiesModifiedExternallyEventAttributes( google.protobuf.message.Message ): @@ -3254,6 +3689,7 @@ class ActivityPropertiesModifiedExternallyEventAttributes( """If set, update the retry policy of the activity, replacing it with the specified one. The number of attempts at the activity is preserved. """ + def __init__( self, *, @@ -3261,12 +3697,11 @@ class ActivityPropertiesModifiedExternallyEventAttributes( new_retry_policy: temporalio.api.common.v1.message_pb2.RetryPolicy | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["new_retry_policy", b"new_retry_policy"], + self, field_name: typing.Literal["new_retry_policy", b"new_retry_policy"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "new_retry_policy", b"new_retry_policy", "scheduled_event_id", @@ -3278,6 +3713,7 @@ global___ActivityPropertiesModifiedExternallyEventAttributes = ( ActivityPropertiesModifiedExternallyEventAttributes ) +@typing.final class WorkflowExecutionUpdateAcceptedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3299,6 +3735,7 @@ class WorkflowExecutionUpdateAcceptedEventAttributes(google.protobuf.message.Mes """The message payload of the original request message that initiated this update. """ + def __init__( self, *, @@ -3308,12 +3745,11 @@ class WorkflowExecutionUpdateAcceptedEventAttributes(google.protobuf.message.Mes accepted_request: temporalio.api.update.v1.message_pb2.Request | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["accepted_request", b"accepted_request"], + self, field_name: typing.Literal["accepted_request", b"accepted_request"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "accepted_request", b"accepted_request", "accepted_request_message_id", @@ -3329,20 +3765,23 @@ global___WorkflowExecutionUpdateAcceptedEventAttributes = ( WorkflowExecutionUpdateAcceptedEventAttributes ) +@typing.final class WorkflowExecutionUpdateCompletedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor META_FIELD_NUMBER: builtins.int ACCEPTED_EVENT_ID_FIELD_NUMBER: builtins.int OUTCOME_FIELD_NUMBER: builtins.int + accepted_event_id: builtins.int + """The event ID indicating the acceptance of this update.""" @property def meta(self) -> temporalio.api.update.v1.message_pb2.Meta: """The metadata about this update.""" - accepted_event_id: builtins.int - """The event ID indicating the acceptance of this update.""" + @property def outcome(self) -> temporalio.api.update.v1.message_pb2.Outcome: """The outcome of executing the workflow update function.""" + def __init__( self, *, @@ -3351,12 +3790,11 @@ class WorkflowExecutionUpdateCompletedEventAttributes(google.protobuf.message.Me outcome: temporalio.api.update.v1.message_pb2.Outcome | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["meta", b"meta", "outcome", b"outcome"], + self, field_name: typing.Literal["meta", b"meta", "outcome", b"outcome"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "accepted_event_id", b"accepted_event_id", "meta", @@ -3370,6 +3808,7 @@ global___WorkflowExecutionUpdateCompletedEventAttributes = ( WorkflowExecutionUpdateCompletedEventAttributes ) +@typing.final class WorkflowExecutionUpdateRejectedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3392,9 +3831,11 @@ class WorkflowExecutionUpdateRejectedEventAttributes(google.protobuf.message.Mes """The message payload of the original request message that initiated this update. """ + @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """The cause of rejection.""" + def __init__( self, *, @@ -3406,13 +3847,13 @@ class WorkflowExecutionUpdateRejectedEventAttributes(google.protobuf.message.Mes ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "rejected_request", b"rejected_request" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "protocol_instance_id", @@ -3430,16 +3871,18 @@ global___WorkflowExecutionUpdateRejectedEventAttributes = ( WorkflowExecutionUpdateRejectedEventAttributes ) +@typing.final class WorkflowExecutionUpdateAdmittedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor REQUEST_FIELD_NUMBER: builtins.int ORIGIN_FIELD_NUMBER: builtins.int + origin: temporalio.api.enums.v1.update_pb2.UpdateAdmittedEventOrigin.ValueType + """An explanation of why this event was written to history.""" @property def request(self) -> temporalio.api.update.v1.message_pb2.Request: """The update request associated with this event.""" - origin: temporalio.api.enums.v1.update_pb2.UpdateAdmittedEventOrigin.ValueType - """An explanation of why this event was written to history.""" + def __init__( self, *, @@ -3447,24 +3890,143 @@ class WorkflowExecutionUpdateAdmittedEventAttributes(google.protobuf.message.Mes origin: temporalio.api.enums.v1.update_pb2.UpdateAdmittedEventOrigin.ValueType = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["request", b"request"] + self, field_name: typing.Literal["request", b"request"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "origin", b"origin", "request", b"request" - ], + self, field_name: typing.Literal["origin", b"origin", "request", b"request"] ) -> None: ... global___WorkflowExecutionUpdateAdmittedEventAttributes = ( WorkflowExecutionUpdateAdmittedEventAttributes ) +@typing.final +class WorkflowExecutionPausedEventAttributes(google.protobuf.message.Message): + """Attributes for an event marking that a workflow execution was paused.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + IDENTITY_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + identity: builtins.str + """The identity of the client who paused the workflow execution.""" + reason: builtins.str + """The reason for pausing the workflow execution.""" + request_id: builtins.str + """The request ID of the request that paused the workflow execution.""" + def __init__( + self, + *, + identity: builtins.str = ..., + reason: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "identity", b"identity", "reason", b"reason", "request_id", b"request_id" + ], + ) -> None: ... + +global___WorkflowExecutionPausedEventAttributes = WorkflowExecutionPausedEventAttributes + +@typing.final +class WorkflowExecutionUnpausedEventAttributes(google.protobuf.message.Message): + """Attributes for an event marking that a workflow execution was unpaused.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + IDENTITY_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + identity: builtins.str + """The identity of the client who unpaused the workflow execution.""" + reason: builtins.str + """The reason for unpausing the workflow execution.""" + request_id: builtins.str + """The request ID of the request that unpaused the workflow execution.""" + def __init__( + self, + *, + identity: builtins.str = ..., + reason: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "identity", b"identity", "reason", b"reason", "request_id", b"request_id" + ], + ) -> None: ... + +global___WorkflowExecutionUnpausedEventAttributes = ( + WorkflowExecutionUnpausedEventAttributes +) + +@typing.final +class WorkflowExecutionTimeSkippingTransitionedEventAttributes( + google.protobuf.message.Message +): + """Attributes for an event indicating that time skipping state changed for a workflow execution: + either time was advanced, or time skipping was stopped automatically due to the fast_forward completing. + The worker_may_ignore field in HistoryEvent should always be set true for this event. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TARGET_TIME_FIELD_NUMBER: builtins.int + DISABLED_AFTER_FAST_FORWARD_FIELD_NUMBER: builtins.int + WALL_CLOCK_TIME_FIELD_NUMBER: builtins.int + disabled_after_fast_forward: builtins.bool + """When true, time skipping has been stopped automatically due to a call to fast_forward completing. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "after" is used to indicate temporal ordering. --) + """ + @property + def target_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The virtual time point that time skipping advanced to.""" + + @property + def wall_clock_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The wall-clock time when the time-skipping state changed event was generated.""" + + def __init__( + self, + *, + target_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + disabled_after_fast_forward: builtins.bool = ..., + wall_clock_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "target_time", b"target_time", "wall_clock_time", b"wall_clock_time" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "disabled_after_fast_forward", + b"disabled_after_fast_forward", + "target_time", + b"target_time", + "wall_clock_time", + b"wall_clock_time", + ], + ) -> None: ... + +global___WorkflowExecutionTimeSkippingTransitionedEventAttributes = ( + WorkflowExecutionTimeSkippingTransitionedEventAttributes +) + +@typing.final class NexusOperationScheduledEventAttributes(google.protobuf.message.Message): """Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class NexusHeaderEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3479,8 +4041,7 @@ class NexusOperationScheduledEventAttributes(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... ENDPOINT_FIELD_NUMBER: builtins.int @@ -3492,18 +4053,32 @@ class NexusOperationScheduledEventAttributes(google.protobuf.message.Message): WORKFLOW_TASK_COMPLETED_EVENT_ID_FIELD_NUMBER: builtins.int REQUEST_ID_FIELD_NUMBER: builtins.int ENDPOINT_ID_FIELD_NUMBER: builtins.int + SCHEDULE_TO_START_TIMEOUT_FIELD_NUMBER: builtins.int + START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int endpoint: builtins.str """Endpoint name, must exist in the endpoint registry.""" service: builtins.str """Service name.""" operation: builtins.str """Operation name.""" + workflow_task_completed_event_id: builtins.int + """The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with.""" + request_id: builtins.str + """A unique ID generated by the history service upon creation of this event. + The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key. + """ + endpoint_id: builtins.str + """Endpoint ID as resolved in the endpoint registry at the time this event was generated. + This is stored on the event and used internally by the server in case the endpoint is renamed from the time the + event was originally scheduled. + """ @property def input(self) -> temporalio.api.common.v1.message_pb2.Payload: """Input for the operation. The server converts this into Nexus request content and the appropriate content headers internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the content is transformed back to the original Payload stored in this event. """ + @property def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Schedule-to-close timeout for this operation. @@ -3511,7 +4086,10 @@ class NexusOperationScheduledEventAttributes(google.protobuf.message.Message): Calls are retried internally by the server. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) + (-- api-linter: core::0142::time-field-names=disabled + aip.dev/not-precedent: "timeout" is an acceptable suffix for duration fields in this API. --) """ + @property def nexus_header( self, @@ -3520,17 +4098,23 @@ class NexusOperationScheduledEventAttributes(google.protobuf.message.Message): activities and child workflows, these are transmitted to Nexus operations that may be external and are not traditional payloads. """ - workflow_task_completed_event_id: builtins.int - """The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with.""" - request_id: builtins.str - """A unique ID generated by the history service upon creation of this event. - The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key. - """ - endpoint_id: builtins.str - """Endpoint ID as resolved in the endpoint registry at the time this event was generated. - This is stored on the event and used internally by the server in case the endpoint is renamed from the time the - event was originally scheduled. - """ + + @property + def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Schedule-to-start timeout for this operation. + See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Start-to-close timeout for this operation. + See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + def __init__( self, *, @@ -3543,16 +4127,25 @@ class NexusOperationScheduledEventAttributes(google.protobuf.message.Message): workflow_task_completed_event_id: builtins.int = ..., request_id: builtins.str = ..., endpoint_id: builtins.str = ..., + schedule_to_start_timeout: google.protobuf.duration_pb2.Duration | None = ..., + start_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "input", b"input", "schedule_to_close_timeout", b"schedule_to_close_timeout" + field_name: typing.Literal[ + "input", + b"input", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "start_to_close_timeout", + b"start_to_close_timeout", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "endpoint", b"endpoint", "endpoint_id", @@ -3567,8 +4160,12 @@ class NexusOperationScheduledEventAttributes(google.protobuf.message.Message): b"request_id", "schedule_to_close_timeout", b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", "service", b"service", + "start_to_close_timeout", + b"start_to_close_timeout", "workflow_task_completed_event_id", b"workflow_task_completed_event_id", ], @@ -3576,6 +4173,7 @@ class NexusOperationScheduledEventAttributes(google.protobuf.message.Message): global___NexusOperationScheduledEventAttributes = NexusOperationScheduledEventAttributes +@typing.final class NexusOperationStartedEventAttributes(google.protobuf.message.Message): """Event marking an asynchronous operation was started by the responding Nexus handler. If the operation completes synchronously, this event is not generated. @@ -3613,7 +4211,7 @@ class NexusOperationStartedEventAttributes(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "operation_id", b"operation_id", "operation_token", @@ -3627,6 +4225,7 @@ class NexusOperationStartedEventAttributes(google.protobuf.message.Message): global___NexusOperationStartedEventAttributes = NexusOperationStartedEventAttributes +@typing.final class NexusOperationCompletedEventAttributes(google.protobuf.message.Message): """Nexus operation completed successfully.""" @@ -3637,13 +4236,14 @@ class NexusOperationCompletedEventAttributes(google.protobuf.message.Message): REQUEST_ID_FIELD_NUMBER: builtins.int scheduled_event_id: builtins.int """The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.""" + request_id: builtins.str + """The request ID allocated at schedule time.""" @property def result(self) -> temporalio.api.common.v1.message_pb2.Payload: """Serialized result of the Nexus operation. The response of the Nexus handler. Delivered either via a completion callback or as a response to a synchronous operation. """ - request_id: builtins.str - """The request ID allocated at schedule time.""" + def __init__( self, *, @@ -3652,11 +4252,11 @@ class NexusOperationCompletedEventAttributes(google.protobuf.message.Message): request_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "request_id", b"request_id", "result", @@ -3668,6 +4268,7 @@ class NexusOperationCompletedEventAttributes(google.protobuf.message.Message): global___NexusOperationCompletedEventAttributes = NexusOperationCompletedEventAttributes +@typing.final class NexusOperationFailedEventAttributes(google.protobuf.message.Message): """Nexus operation failed.""" @@ -3678,11 +4279,12 @@ class NexusOperationFailedEventAttributes(google.protobuf.message.Message): REQUEST_ID_FIELD_NUMBER: builtins.int scheduled_event_id: builtins.int """The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.""" + request_id: builtins.str + """The request ID allocated at schedule time.""" @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo.""" - request_id: builtins.str - """The request ID allocated at schedule time.""" + def __init__( self, *, @@ -3691,11 +4293,11 @@ class NexusOperationFailedEventAttributes(google.protobuf.message.Message): request_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "request_id", @@ -3707,6 +4309,7 @@ class NexusOperationFailedEventAttributes(google.protobuf.message.Message): global___NexusOperationFailedEventAttributes = NexusOperationFailedEventAttributes +@typing.final class NexusOperationTimedOutEventAttributes(google.protobuf.message.Message): """Nexus operation timed out.""" @@ -3717,11 +4320,12 @@ class NexusOperationTimedOutEventAttributes(google.protobuf.message.Message): REQUEST_ID_FIELD_NUMBER: builtins.int scheduled_event_id: builtins.int """The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.""" + request_id: builtins.str + """The request ID allocated at schedule time.""" @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.""" - request_id: builtins.str - """The request ID allocated at schedule time.""" + def __init__( self, *, @@ -3730,11 +4334,11 @@ class NexusOperationTimedOutEventAttributes(google.protobuf.message.Message): request_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "request_id", @@ -3746,6 +4350,7 @@ class NexusOperationTimedOutEventAttributes(google.protobuf.message.Message): global___NexusOperationTimedOutEventAttributes = NexusOperationTimedOutEventAttributes +@typing.final class NexusOperationCanceledEventAttributes(google.protobuf.message.Message): """Nexus operation completed as canceled. May or may not have been due to a cancellation request by the workflow.""" @@ -3756,11 +4361,12 @@ class NexusOperationCanceledEventAttributes(google.protobuf.message.Message): REQUEST_ID_FIELD_NUMBER: builtins.int scheduled_event_id: builtins.int """The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.""" + request_id: builtins.str + """The request ID allocated at schedule time.""" @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """Cancellation details.""" - request_id: builtins.str - """The request ID allocated at schedule time.""" + def __init__( self, *, @@ -3769,11 +4375,11 @@ class NexusOperationCanceledEventAttributes(google.protobuf.message.Message): request_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "request_id", @@ -3785,6 +4391,7 @@ class NexusOperationCanceledEventAttributes(google.protobuf.message.Message): global___NexusOperationCanceledEventAttributes = NexusOperationCanceledEventAttributes +@typing.final class NexusOperationCancelRequestedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3804,7 +4411,7 @@ class NexusOperationCancelRequestedEventAttributes(google.protobuf.message.Messa ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "scheduled_event_id", b"scheduled_event_id", "workflow_task_completed_event_id", @@ -3816,6 +4423,7 @@ global___NexusOperationCancelRequestedEventAttributes = ( NexusOperationCancelRequestedEventAttributes ) +@typing.final class NexusOperationCancelRequestCompletedEventAttributes( google.protobuf.message.Message ): @@ -3841,7 +4449,7 @@ class NexusOperationCancelRequestCompletedEventAttributes( ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "requested_event_id", b"requested_event_id", "scheduled_event_id", @@ -3855,6 +4463,7 @@ global___NexusOperationCancelRequestCompletedEventAttributes = ( NexusOperationCancelRequestCompletedEventAttributes ) +@typing.final class NexusOperationCancelRequestFailedEventAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3868,11 +4477,12 @@ class NexusOperationCancelRequestFailedEventAttributes(google.protobuf.message.M """The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported with. """ + scheduled_event_id: builtins.int + """The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to.""" @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.""" - scheduled_event_id: builtins.int - """The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to.""" + def __init__( self, *, @@ -3882,11 +4492,11 @@ class NexusOperationCancelRequestFailedEventAttributes(google.protobuf.message.M scheduled_event_id: builtins.int = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "requested_event_id", @@ -3902,6 +4512,7 @@ global___NexusOperationCancelRequestFailedEventAttributes = ( NexusOperationCancelRequestFailedEventAttributes ) +@typing.final class HistoryEvent(google.protobuf.message.Message): """History events are the method by which Temporal SDKs advance (or recreate) workflow state. See the `EventType` enum for more info about what each event is for. @@ -3917,6 +4528,8 @@ class HistoryEvent(google.protobuf.message.Message): WORKER_MAY_IGNORE_FIELD_NUMBER: builtins.int USER_METADATA_FIELD_NUMBER: builtins.int LINKS_FIELD_NUMBER: builtins.int + PRINCIPAL_FIELD_NUMBER: builtins.int + EVENT_GROUP_MARKERS_FIELD_NUMBER: builtins.int WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES_FIELD_NUMBER: builtins.int WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES_FIELD_NUMBER: builtins.int WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_NUMBER: builtins.int @@ -3982,15 +4595,22 @@ class HistoryEvent(google.protobuf.message.Message): WORKFLOW_EXECUTION_OPTIONS_UPDATED_EVENT_ATTRIBUTES_FIELD_NUMBER: builtins.int NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED_EVENT_ATTRIBUTES_FIELD_NUMBER: builtins.int NEXUS_OPERATION_CANCEL_REQUEST_FAILED_EVENT_ATTRIBUTES_FIELD_NUMBER: builtins.int + WORKFLOW_EXECUTION_PAUSED_EVENT_ATTRIBUTES_FIELD_NUMBER: builtins.int + WORKFLOW_EXECUTION_UNPAUSED_EVENT_ATTRIBUTES_FIELD_NUMBER: builtins.int + WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED_EVENT_ATTRIBUTES_FIELD_NUMBER: ( + builtins.int + ) event_id: builtins.int """Monotonically increasing event number, starts at 1.""" - @property - def event_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... event_type: temporalio.api.enums.v1.event_type_pb2.EventType.ValueType version: builtins.int - """TODO: What is this? Appears unused by SDKs""" + """Failover version of the event, used by the server for multi-cluster replication and history + versioning. SDKs generally ignore this field. + """ task_id: builtins.int - """TODO: What is this? Appears unused by SDKs""" + """Identifier used by the service to order replication and transfer tasks associated with this + event. SDKs generally ignore this field. + """ worker_may_ignore: builtins.bool """Set to true when the SDK may ignore the event as it does not impact workflow state or information in any way that the SDK need be concerned with. If an SDK encounters an event @@ -3998,6 +4618,8 @@ class HistoryEvent(google.protobuf.message.Message): acceptable for the event type and/or attributes to be uninterpretable. """ @property + def event_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata: """Metadata on the event. This is often carried over from commands and client calls. Most events won't have this information, and how this information is used is dependent upon the interface @@ -4008,13 +4630,27 @@ class HistoryEvent(google.protobuf.message.Message): * timer_started_event_attributes - summary represents an identifier for the timer for use by user interfaces. """ + @property def links( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.common.v1.message_pb2.Link ]: - """Links associated with the event.""" + """Links to related entities, such as the entity that started this event's workflow.""" + + @property + def principal(self) -> temporalio.api.common.v1.message_pb2.Principal: + """Server-computed authenticated caller identity associated with this event.""" + + @property + def event_group_markers( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.sdk.v1.event_group_marker_pb2.EventGroupMarker + ]: + """Event group markers attached to this event.""" + @property def workflow_execution_started_event_attributes( self, @@ -4241,6 +4877,18 @@ class HistoryEvent(google.protobuf.message.Message): def nexus_operation_cancel_request_failed_event_attributes( self, ) -> global___NexusOperationCancelRequestFailedEventAttributes: ... + @property + def workflow_execution_paused_event_attributes( + self, + ) -> global___WorkflowExecutionPausedEventAttributes: ... + @property + def workflow_execution_unpaused_event_attributes( + self, + ) -> global___WorkflowExecutionUnpausedEventAttributes: ... + @property + def workflow_execution_time_skipping_transitioned_event_attributes( + self, + ) -> global___WorkflowExecutionTimeSkippingTransitionedEventAttributes: ... def __init__( self, *, @@ -4254,6 +4902,11 @@ class HistoryEvent(google.protobuf.message.Message): | None = ..., links: collections.abc.Iterable[temporalio.api.common.v1.message_pb2.Link] | None = ..., + principal: temporalio.api.common.v1.message_pb2.Principal | None = ..., + event_group_markers: collections.abc.Iterable[ + temporalio.api.sdk.v1.event_group_marker_pb2.EventGroupMarker + ] + | None = ..., workflow_execution_started_event_attributes: global___WorkflowExecutionStartedEventAttributes | None = ..., workflow_execution_completed_event_attributes: global___WorkflowExecutionCompletedEventAttributes @@ -4367,10 +5020,16 @@ class HistoryEvent(google.protobuf.message.Message): | None = ..., nexus_operation_cancel_request_failed_event_attributes: global___NexusOperationCancelRequestFailedEventAttributes | None = ..., + workflow_execution_paused_event_attributes: global___WorkflowExecutionPausedEventAttributes + | None = ..., + workflow_execution_unpaused_event_attributes: global___WorkflowExecutionUnpausedEventAttributes + | None = ..., + workflow_execution_time_skipping_transitioned_event_attributes: global___WorkflowExecutionTimeSkippingTransitionedEventAttributes + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_properties_modified_externally_event_attributes", b"activity_properties_modified_externally_event_attributes", "activity_task_cancel_requested_event_attributes", @@ -4427,6 +5086,8 @@ class HistoryEvent(google.protobuf.message.Message): b"nexus_operation_started_event_attributes", "nexus_operation_timed_out_event_attributes", b"nexus_operation_timed_out_event_attributes", + "principal", + b"principal", "request_cancel_external_workflow_execution_failed_event_attributes", b"request_cancel_external_workflow_execution_failed_event_attributes", "request_cancel_external_workflow_execution_initiated_event_attributes", @@ -4461,14 +5122,20 @@ class HistoryEvent(google.protobuf.message.Message): b"workflow_execution_failed_event_attributes", "workflow_execution_options_updated_event_attributes", b"workflow_execution_options_updated_event_attributes", + "workflow_execution_paused_event_attributes", + b"workflow_execution_paused_event_attributes", "workflow_execution_signaled_event_attributes", b"workflow_execution_signaled_event_attributes", "workflow_execution_started_event_attributes", b"workflow_execution_started_event_attributes", "workflow_execution_terminated_event_attributes", b"workflow_execution_terminated_event_attributes", + "workflow_execution_time_skipping_transitioned_event_attributes", + b"workflow_execution_time_skipping_transitioned_event_attributes", "workflow_execution_timed_out_event_attributes", b"workflow_execution_timed_out_event_attributes", + "workflow_execution_unpaused_event_attributes", + b"workflow_execution_unpaused_event_attributes", "workflow_execution_update_accepted_event_attributes", b"workflow_execution_update_accepted_event_attributes", "workflow_execution_update_admitted_event_attributes", @@ -4495,7 +5162,7 @@ class HistoryEvent(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_properties_modified_externally_event_attributes", b"activity_properties_modified_externally_event_attributes", "activity_task_cancel_requested_event_attributes", @@ -4526,6 +5193,8 @@ class HistoryEvent(google.protobuf.message.Message): b"child_workflow_execution_terminated_event_attributes", "child_workflow_execution_timed_out_event_attributes", b"child_workflow_execution_timed_out_event_attributes", + "event_group_markers", + b"event_group_markers", "event_id", b"event_id", "event_time", @@ -4558,6 +5227,8 @@ class HistoryEvent(google.protobuf.message.Message): b"nexus_operation_started_event_attributes", "nexus_operation_timed_out_event_attributes", b"nexus_operation_timed_out_event_attributes", + "principal", + b"principal", "request_cancel_external_workflow_execution_failed_event_attributes", b"request_cancel_external_workflow_execution_failed_event_attributes", "request_cancel_external_workflow_execution_initiated_event_attributes", @@ -4598,14 +5269,20 @@ class HistoryEvent(google.protobuf.message.Message): b"workflow_execution_failed_event_attributes", "workflow_execution_options_updated_event_attributes", b"workflow_execution_options_updated_event_attributes", + "workflow_execution_paused_event_attributes", + b"workflow_execution_paused_event_attributes", "workflow_execution_signaled_event_attributes", b"workflow_execution_signaled_event_attributes", "workflow_execution_started_event_attributes", b"workflow_execution_started_event_attributes", "workflow_execution_terminated_event_attributes", b"workflow_execution_terminated_event_attributes", + "workflow_execution_time_skipping_transitioned_event_attributes", + b"workflow_execution_time_skipping_transitioned_event_attributes", "workflow_execution_timed_out_event_attributes", b"workflow_execution_timed_out_event_attributes", + "workflow_execution_unpaused_event_attributes", + b"workflow_execution_unpaused_event_attributes", "workflow_execution_update_accepted_event_attributes", b"workflow_execution_update_accepted_event_attributes", "workflow_execution_update_admitted_event_attributes", @@ -4631,9 +5308,9 @@ class HistoryEvent(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["attributes", b"attributes"] + self, oneof_group: typing.Literal["attributes", b"attributes"] ) -> ( - typing_extensions.Literal[ + typing.Literal[ "workflow_execution_started_event_attributes", "workflow_execution_completed_event_attributes", "workflow_execution_failed_event_attributes", @@ -4691,12 +5368,16 @@ class HistoryEvent(google.protobuf.message.Message): "workflow_execution_options_updated_event_attributes", "nexus_operation_cancel_request_completed_event_attributes", "nexus_operation_cancel_request_failed_event_attributes", + "workflow_execution_paused_event_attributes", + "workflow_execution_unpaused_event_attributes", + "workflow_execution_time_skipping_transitioned_event_attributes", ] | None ): ... global___HistoryEvent = HistoryEvent +@typing.final class History(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4712,8 +5393,6 @@ class History(google.protobuf.message.Message): *, events: collections.abc.Iterable[global___HistoryEvent] | None = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["events", b"events"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["events", b"events"]) -> None: ... global___History = History diff --git a/temporalio/api/namespace/v1/message_pb2.py b/temporalio/api/namespace/v1/message_pb2.py index 0a5334a345..f3342fdf80 100644 --- a/temporalio/api/namespace/v1/message_pb2.py +++ b/temporalio/api/namespace/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -22,139 +21,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\'temporal/api/namespace/v1/message.proto\x12\x19temporal.api.namespace.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a%temporal/api/enums/v1/namespace.proto"\x82\x04\n\rNamespaceInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32%.temporal.api.enums.v1.NamespaceState\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x13\n\x0bowner_email\x18\x04 \x01(\t\x12@\n\x04\x64\x61ta\x18\x05 \x03(\x0b\x32\x32.temporal.api.namespace.v1.NamespaceInfo.DataEntry\x12\n\n\x02id\x18\x06 \x01(\t\x12K\n\x0c\x63\x61pabilities\x18\x07 \x01(\x0b\x32\x35.temporal.api.namespace.v1.NamespaceInfo.Capabilities\x12\x1a\n\x12supports_schedules\x18\x64 \x01(\x08\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x9e\x01\n\x0c\x43\x61pabilities\x12\x1c\n\x14\x65\x61ger_workflow_start\x18\x01 \x01(\x08\x12\x13\n\x0bsync_update\x18\x02 \x01(\x08\x12\x14\n\x0c\x61sync_update\x18\x03 \x01(\x08\x12\x19\n\x11worker_heartbeats\x18\x04 \x01(\x08\x12*\n"reported_problems_search_attribute\x18\x05 \x01(\x08"\x9e\x04\n\x0fNamespaceConfig\x12\x43\n workflow_execution_retention_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x0c\x62\x61\x64_binaries\x18\x02 \x01(\x0b\x32&.temporal.api.namespace.v1.BadBinaries\x12\x44\n\x16history_archival_state\x18\x03 \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1c\n\x14history_archival_uri\x18\x04 \x01(\t\x12G\n\x19visibility_archival_state\x18\x05 \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1f\n\x17visibility_archival_uri\x18\x06 \x01(\t\x12u\n\x1f\x63ustom_search_attribute_aliases\x18\x07 \x03(\x0b\x32L.temporal.api.namespace.v1.NamespaceConfig.CustomSearchAttributeAliasesEntry\x1a\x43\n!CustomSearchAttributeAliasesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xb0\x01\n\x0b\x42\x61\x64\x42inaries\x12\x46\n\x08\x62inaries\x18\x01 \x03(\x0b\x32\x34.temporal.api.namespace.v1.BadBinaries.BinariesEntry\x1aY\n\rBinariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.temporal.api.namespace.v1.BadBinaryInfo:\x02\x38\x01"b\n\rBadBinaryInfo\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x10\n\x08operator\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xea\x01\n\x13UpdateNamespaceInfo\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x13\n\x0bowner_email\x18\x02 \x01(\t\x12\x46\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x38.temporal.api.namespace.v1.UpdateNamespaceInfo.DataEntry\x12\x34\n\x05state\x18\x04 \x01(\x0e\x32%.temporal.api.enums.v1.NamespaceState\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"*\n\x0fNamespaceFilter\x12\x17\n\x0finclude_deleted\x18\x01 \x01(\x08\x42\x98\x01\n\x1cio.temporal.api.namespace.v1B\x0cMessageProtoP\x01Z)go.temporal.io/api/namespace/v1;namespace\xaa\x02\x1bTemporalio.Api.Namespace.V1\xea\x02\x1eTemporalio::Api::Namespace::V1b\x06proto3' + b'\n\'temporal/api/namespace/v1/message.proto\x12\x19temporal.api.namespace.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a%temporal/api/enums/v1/namespace.proto"\xf6\x08\n\rNamespaceInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x05state\x18\x02 \x01(\x0e\x32%.temporal.api.enums.v1.NamespaceState\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x13\n\x0bowner_email\x18\x04 \x01(\t\x12@\n\x04\x64\x61ta\x18\x05 \x03(\x0b\x32\x32.temporal.api.namespace.v1.NamespaceInfo.DataEntry\x12\n\n\x02id\x18\x06 \x01(\t\x12K\n\x0c\x63\x61pabilities\x18\x07 \x01(\x0b\x32\x35.temporal.api.namespace.v1.NamespaceInfo.Capabilities\x12?\n\x06limits\x18\x08 \x01(\x0b\x32/.temporal.api.namespace.v1.NamespaceInfo.Limits\x12\x1a\n\x12supports_schedules\x18\x64 \x01(\x08\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xd6\x04\n\x0c\x43\x61pabilities\x12\x1c\n\x14\x65\x61ger_workflow_start\x18\x01 \x01(\x08\x12\x13\n\x0bsync_update\x18\x02 \x01(\x08\x12\x14\n\x0c\x61sync_update\x18\x03 \x01(\x08\x12\x19\n\x11worker_heartbeats\x18\x04 \x01(\x08\x12*\n"reported_problems_search_attribute\x18\x05 \x01(\x08\x12\x16\n\x0eworkflow_pause\x18\x06 \x01(\x08\x12\x1d\n\x15standalone_activities\x18\x07 \x01(\x08\x12(\n worker_poll_complete_on_shutdown\x18\x08 \x01(\x08\x12\x1a\n\x12poller_autoscaling\x18\t \x01(\x08\x12\x17\n\x0fworker_commands\x18\n \x01(\x08\x12"\n\x1astandalone_nexus_operation\x18\x0b \x01(\x08\x12!\n\x19workflow_update_callbacks\x18\x0c \x01(\x08\x12&\n\x1epoller_autoscaling_auto_enroll\x18\r \x01(\x08\x12+\n#workflow_task_completion_pagination\x18\x0e \x01(\x08\x12\'\n\x1fstandalone_activity_start_delay\x18\x0f \x01(\x08\x12,\n$standalone_activity_batch_operations\x18\x10 \x01(\x08\x12-\n%standalone_activity_operator_commands\x18\x11 \x01(\x08\x1ay\n\x06Limits\x12\x1d\n\x15\x62lob_size_limit_error\x18\x01 \x01(\x03\x12\x1d\n\x15memo_size_limit_error\x18\x02 \x01(\x03\x12\x31\n)workflow_task_completion_size_limit_error\x18\x03 \x01(\x03"\x9e\x04\n\x0fNamespaceConfig\x12\x43\n workflow_execution_retention_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x0c\x62\x61\x64_binaries\x18\x02 \x01(\x0b\x32&.temporal.api.namespace.v1.BadBinaries\x12\x44\n\x16history_archival_state\x18\x03 \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1c\n\x14history_archival_uri\x18\x04 \x01(\t\x12G\n\x19visibility_archival_state\x18\x05 \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1f\n\x17visibility_archival_uri\x18\x06 \x01(\t\x12u\n\x1f\x63ustom_search_attribute_aliases\x18\x07 \x03(\x0b\x32L.temporal.api.namespace.v1.NamespaceConfig.CustomSearchAttributeAliasesEntry\x1a\x43\n!CustomSearchAttributeAliasesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xb0\x01\n\x0b\x42\x61\x64\x42inaries\x12\x46\n\x08\x62inaries\x18\x01 \x03(\x0b\x32\x34.temporal.api.namespace.v1.BadBinaries.BinariesEntry\x1aY\n\rBinariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.temporal.api.namespace.v1.BadBinaryInfo:\x02\x38\x01"b\n\rBadBinaryInfo\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x10\n\x08operator\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xea\x01\n\x13UpdateNamespaceInfo\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x13\n\x0bowner_email\x18\x02 \x01(\t\x12\x46\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x38.temporal.api.namespace.v1.UpdateNamespaceInfo.DataEntry\x12\x34\n\x05state\x18\x04 \x01(\x0e\x32%.temporal.api.enums.v1.NamespaceState\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"*\n\x0fNamespaceFilter\x12\x17\n\x0finclude_deleted\x18\x01 \x01(\x08\x42\x98\x01\n\x1cio.temporal.api.namespace.v1B\x0cMessageProtoP\x01Z)go.temporal.io/api/namespace/v1;namespace\xaa\x02\x1bTemporalio.Api.Namespace.V1\xea\x02\x1eTemporalio::Api::Namespace::V1b\x06proto3' ) - -_NAMESPACEINFO = DESCRIPTOR.message_types_by_name["NamespaceInfo"] -_NAMESPACEINFO_DATAENTRY = _NAMESPACEINFO.nested_types_by_name["DataEntry"] -_NAMESPACEINFO_CAPABILITIES = _NAMESPACEINFO.nested_types_by_name["Capabilities"] -_NAMESPACECONFIG = DESCRIPTOR.message_types_by_name["NamespaceConfig"] -_NAMESPACECONFIG_CUSTOMSEARCHATTRIBUTEALIASESENTRY = ( - _NAMESPACECONFIG.nested_types_by_name["CustomSearchAttributeAliasesEntry"] -) -_BADBINARIES = DESCRIPTOR.message_types_by_name["BadBinaries"] -_BADBINARIES_BINARIESENTRY = _BADBINARIES.nested_types_by_name["BinariesEntry"] -_BADBINARYINFO = DESCRIPTOR.message_types_by_name["BadBinaryInfo"] -_UPDATENAMESPACEINFO = DESCRIPTOR.message_types_by_name["UpdateNamespaceInfo"] -_UPDATENAMESPACEINFO_DATAENTRY = _UPDATENAMESPACEINFO.nested_types_by_name["DataEntry"] -_NAMESPACEFILTER = DESCRIPTOR.message_types_by_name["NamespaceFilter"] -NamespaceInfo = _reflection.GeneratedProtocolMessageType( - "NamespaceInfo", - (_message.Message,), - { - "DataEntry": _reflection.GeneratedProtocolMessageType( - "DataEntry", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEINFO_DATAENTRY, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.NamespaceInfo.DataEntry) - }, - ), - "Capabilities": _reflection.GeneratedProtocolMessageType( - "Capabilities", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEINFO_CAPABILITIES, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.NamespaceInfo.Capabilities) - }, - ), - "DESCRIPTOR": _NAMESPACEINFO, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.NamespaceInfo) - }, -) -_sym_db.RegisterMessage(NamespaceInfo) -_sym_db.RegisterMessage(NamespaceInfo.DataEntry) -_sym_db.RegisterMessage(NamespaceInfo.Capabilities) - -NamespaceConfig = _reflection.GeneratedProtocolMessageType( - "NamespaceConfig", - (_message.Message,), - { - "CustomSearchAttributeAliasesEntry": _reflection.GeneratedProtocolMessageType( - "CustomSearchAttributeAliasesEntry", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACECONFIG_CUSTOMSEARCHATTRIBUTEALIASESENTRY, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.NamespaceConfig.CustomSearchAttributeAliasesEntry) - }, - ), - "DESCRIPTOR": _NAMESPACECONFIG, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.NamespaceConfig) - }, -) -_sym_db.RegisterMessage(NamespaceConfig) -_sym_db.RegisterMessage(NamespaceConfig.CustomSearchAttributeAliasesEntry) - -BadBinaries = _reflection.GeneratedProtocolMessageType( - "BadBinaries", - (_message.Message,), - { - "BinariesEntry": _reflection.GeneratedProtocolMessageType( - "BinariesEntry", - (_message.Message,), - { - "DESCRIPTOR": _BADBINARIES_BINARIESENTRY, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.BadBinaries.BinariesEntry) - }, - ), - "DESCRIPTOR": _BADBINARIES, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.BadBinaries) - }, -) -_sym_db.RegisterMessage(BadBinaries) -_sym_db.RegisterMessage(BadBinaries.BinariesEntry) - -BadBinaryInfo = _reflection.GeneratedProtocolMessageType( - "BadBinaryInfo", - (_message.Message,), - { - "DESCRIPTOR": _BADBINARYINFO, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.BadBinaryInfo) - }, -) -_sym_db.RegisterMessage(BadBinaryInfo) - -UpdateNamespaceInfo = _reflection.GeneratedProtocolMessageType( - "UpdateNamespaceInfo", - (_message.Message,), - { - "DataEntry": _reflection.GeneratedProtocolMessageType( - "DataEntry", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENAMESPACEINFO_DATAENTRY, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.UpdateNamespaceInfo.DataEntry) - }, - ), - "DESCRIPTOR": _UPDATENAMESPACEINFO, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.UpdateNamespaceInfo) - }, -) -_sym_db.RegisterMessage(UpdateNamespaceInfo) -_sym_db.RegisterMessage(UpdateNamespaceInfo.DataEntry) - -NamespaceFilter = _reflection.GeneratedProtocolMessageType( - "NamespaceFilter", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEFILTER, - "__module__": "temporalio.api.namespace.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.namespace.v1.NamespaceFilter) - }, -) -_sym_db.RegisterMessage(NamespaceFilter) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\034io.temporal.api.namespace.v1B\014MessageProtoP\001Z)go.temporal.io/api/namespace/v1;namespace\252\002\033Temporalio.Api.Namespace.V1\352\002\036Temporalio::Api::Namespace::V1" @@ -167,25 +38,27 @@ _UPDATENAMESPACEINFO_DATAENTRY._options = None _UPDATENAMESPACEINFO_DATAENTRY._serialized_options = b"8\001" _NAMESPACEINFO._serialized_start = 175 - _NAMESPACEINFO._serialized_end = 689 - _NAMESPACEINFO_DATAENTRY._serialized_start = 485 - _NAMESPACEINFO_DATAENTRY._serialized_end = 528 - _NAMESPACEINFO_CAPABILITIES._serialized_start = 531 - _NAMESPACEINFO_CAPABILITIES._serialized_end = 689 - _NAMESPACECONFIG._serialized_start = 692 - _NAMESPACECONFIG._serialized_end = 1234 - _NAMESPACECONFIG_CUSTOMSEARCHATTRIBUTEALIASESENTRY._serialized_start = 1167 - _NAMESPACECONFIG_CUSTOMSEARCHATTRIBUTEALIASESENTRY._serialized_end = 1234 - _BADBINARIES._serialized_start = 1237 - _BADBINARIES._serialized_end = 1413 - _BADBINARIES_BINARIESENTRY._serialized_start = 1324 - _BADBINARIES_BINARIESENTRY._serialized_end = 1413 - _BADBINARYINFO._serialized_start = 1415 - _BADBINARYINFO._serialized_end = 1513 - _UPDATENAMESPACEINFO._serialized_start = 1516 - _UPDATENAMESPACEINFO._serialized_end = 1750 - _UPDATENAMESPACEINFO_DATAENTRY._serialized_start = 485 - _UPDATENAMESPACEINFO_DATAENTRY._serialized_end = 528 - _NAMESPACEFILTER._serialized_start = 1752 - _NAMESPACEFILTER._serialized_end = 1794 + _NAMESPACEINFO._serialized_end = 1317 + _NAMESPACEINFO_DATAENTRY._serialized_start = 550 + _NAMESPACEINFO_DATAENTRY._serialized_end = 593 + _NAMESPACEINFO_CAPABILITIES._serialized_start = 596 + _NAMESPACEINFO_CAPABILITIES._serialized_end = 1194 + _NAMESPACEINFO_LIMITS._serialized_start = 1196 + _NAMESPACEINFO_LIMITS._serialized_end = 1317 + _NAMESPACECONFIG._serialized_start = 1320 + _NAMESPACECONFIG._serialized_end = 1862 + _NAMESPACECONFIG_CUSTOMSEARCHATTRIBUTEALIASESENTRY._serialized_start = 1795 + _NAMESPACECONFIG_CUSTOMSEARCHATTRIBUTEALIASESENTRY._serialized_end = 1862 + _BADBINARIES._serialized_start = 1865 + _BADBINARIES._serialized_end = 2041 + _BADBINARIES_BINARIESENTRY._serialized_start = 1952 + _BADBINARIES_BINARIESENTRY._serialized_end = 2041 + _BADBINARYINFO._serialized_start = 2043 + _BADBINARYINFO._serialized_end = 2141 + _UPDATENAMESPACEINFO._serialized_start = 2144 + _UPDATENAMESPACEINFO._serialized_end = 2378 + _UPDATENAMESPACEINFO_DATAENTRY._serialized_start = 550 + _UPDATENAMESPACEINFO_DATAENTRY._serialized_end = 593 + _NAMESPACEFILTER._serialized_start = 2380 + _NAMESPACEFILTER._serialized_end = 2422 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/namespace/v1/message_pb2.pyi b/temporalio/api/namespace/v1/message_pb2.pyi index 14f23f5edb..d125179331 100644 --- a/temporalio/api/namespace/v1/message_pb2.pyi +++ b/temporalio/api/namespace/v1/message_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -15,16 +15,13 @@ import google.protobuf.timestamp_pb2 import temporalio.api.enums.v1.namespace_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class NamespaceInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class DataEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -39,10 +36,10 @@ class NamespaceInfo(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class Capabilities(google.protobuf.message.Message): """Namespace capability details. Should contain what features are enabled in a namespace.""" @@ -53,6 +50,18 @@ class NamespaceInfo(google.protobuf.message.Message): ASYNC_UPDATE_FIELD_NUMBER: builtins.int WORKER_HEARTBEATS_FIELD_NUMBER: builtins.int REPORTED_PROBLEMS_SEARCH_ATTRIBUTE_FIELD_NUMBER: builtins.int + WORKFLOW_PAUSE_FIELD_NUMBER: builtins.int + STANDALONE_ACTIVITIES_FIELD_NUMBER: builtins.int + WORKER_POLL_COMPLETE_ON_SHUTDOWN_FIELD_NUMBER: builtins.int + POLLER_AUTOSCALING_FIELD_NUMBER: builtins.int + WORKER_COMMANDS_FIELD_NUMBER: builtins.int + STANDALONE_NEXUS_OPERATION_FIELD_NUMBER: builtins.int + WORKFLOW_UPDATE_CALLBACKS_FIELD_NUMBER: builtins.int + POLLER_AUTOSCALING_AUTO_ENROLL_FIELD_NUMBER: builtins.int + WORKFLOW_TASK_COMPLETION_PAGINATION_FIELD_NUMBER: builtins.int + STANDALONE_ACTIVITY_START_DELAY_FIELD_NUMBER: builtins.int + STANDALONE_ACTIVITY_BATCH_OPERATIONS_FIELD_NUMBER: builtins.int + STANDALONE_ACTIVITY_OPERATOR_COMMANDS_FIELD_NUMBER: builtins.int eager_workflow_start: builtins.bool """True if the namespace supports eager workflow start.""" sync_update: builtins.bool @@ -63,6 +72,35 @@ class NamespaceInfo(google.protobuf.message.Message): """True if the namespace supports worker heartbeats""" reported_problems_search_attribute: builtins.bool """True if the namespace supports reported problems search attribute""" + workflow_pause: builtins.bool + """True if the namespace supports pausing workflows""" + standalone_activities: builtins.bool + """True if the namespace supports standalone activities""" + worker_poll_complete_on_shutdown: builtins.bool + """True if the namespace supports server-side completion of outstanding worker polls on shutdown. + When enabled, the server will complete polls for workers that send WorkerInstanceKey in their + poll requests and call ShutdownWorker with the same WorkerInstanceKey. The poll will return + an empty response. When this flag is true, workers should allow polls to return gracefully + rather than terminating any open polls on shutdown. + """ + poller_autoscaling: builtins.bool + """True if the namespace supports poller autoscaling""" + worker_commands: builtins.bool + """True if the namespace supports worker commands (server-to-worker communication via control queues).""" + standalone_nexus_operation: builtins.bool + """True if the namespace supports standalone Nexus operations.""" + workflow_update_callbacks: builtins.bool + """True if the namespace supports attaching callbacks on workflow updates""" + poller_autoscaling_auto_enroll: builtins.bool + """When true, workers should use poller autoscaling by default unless explicitly configured otherwise.""" + workflow_task_completion_pagination: builtins.bool + """True if the namespace supports pagination of `RespondWorkflowTaskCompleted` request.""" + standalone_activity_start_delay: builtins.bool + """True if the namespace supports start delay for standalone activities.""" + standalone_activity_batch_operations: builtins.bool + """True if the namespace supports batch operations for standalone activities.""" + standalone_activity_operator_commands: builtins.bool + """True if the namespace supports standalone activity operator commands.""" def __init__( self, *, @@ -71,20 +109,94 @@ class NamespaceInfo(google.protobuf.message.Message): async_update: builtins.bool = ..., worker_heartbeats: builtins.bool = ..., reported_problems_search_attribute: builtins.bool = ..., + workflow_pause: builtins.bool = ..., + standalone_activities: builtins.bool = ..., + worker_poll_complete_on_shutdown: builtins.bool = ..., + poller_autoscaling: builtins.bool = ..., + worker_commands: builtins.bool = ..., + standalone_nexus_operation: builtins.bool = ..., + workflow_update_callbacks: builtins.bool = ..., + poller_autoscaling_auto_enroll: builtins.bool = ..., + workflow_task_completion_pagination: builtins.bool = ..., + standalone_activity_start_delay: builtins.bool = ..., + standalone_activity_batch_operations: builtins.bool = ..., + standalone_activity_operator_commands: builtins.bool = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_update", b"async_update", "eager_workflow_start", b"eager_workflow_start", + "poller_autoscaling", + b"poller_autoscaling", + "poller_autoscaling_auto_enroll", + b"poller_autoscaling_auto_enroll", "reported_problems_search_attribute", b"reported_problems_search_attribute", + "standalone_activities", + b"standalone_activities", + "standalone_activity_batch_operations", + b"standalone_activity_batch_operations", + "standalone_activity_operator_commands", + b"standalone_activity_operator_commands", + "standalone_activity_start_delay", + b"standalone_activity_start_delay", + "standalone_nexus_operation", + b"standalone_nexus_operation", "sync_update", b"sync_update", + "worker_commands", + b"worker_commands", "worker_heartbeats", b"worker_heartbeats", + "worker_poll_complete_on_shutdown", + b"worker_poll_complete_on_shutdown", + "workflow_pause", + b"workflow_pause", + "workflow_task_completion_pagination", + b"workflow_task_completion_pagination", + "workflow_update_callbacks", + b"workflow_update_callbacks", + ], + ) -> None: ... + + @typing.final + class Limits(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BLOB_SIZE_LIMIT_ERROR_FIELD_NUMBER: builtins.int + MEMO_SIZE_LIMIT_ERROR_FIELD_NUMBER: builtins.int + WORKFLOW_TASK_COMPLETION_SIZE_LIMIT_ERROR_FIELD_NUMBER: builtins.int + blob_size_limit_error: builtins.int + """Maximum size in bytes for payload fields in workflow history events + (e.g., workflow/activity inputs and results, failure details, signal payloads). + When exceeded, the server will reject the operation with an error. + """ + memo_size_limit_error: builtins.int + """Maximum total memo size in bytes per workflow execution.""" + workflow_task_completion_size_limit_error: builtins.int + """Maximum total size in bytes of a single RespondWorkflowTaskCompleted request. + Requests exceeding this fail the workflow task with + WORKFLOW_TASK_FAILED_CAUSE_REQUEST_TOO_LARGE. 0 means no explicit limit. + """ + def __init__( + self, + *, + blob_size_limit_error: builtins.int = ..., + memo_size_limit_error: builtins.int = ..., + workflow_task_completion_size_limit_error: builtins.int = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "blob_size_limit_error", + b"blob_size_limit_error", + "memo_size_limit_error", + b"memo_size_limit_error", + "workflow_task_completion_size_limit_error", + b"workflow_task_completion_size_limit_error", ], ) -> None: ... @@ -95,24 +207,31 @@ class NamespaceInfo(google.protobuf.message.Message): DATA_FIELD_NUMBER: builtins.int ID_FIELD_NUMBER: builtins.int CAPABILITIES_FIELD_NUMBER: builtins.int + LIMITS_FIELD_NUMBER: builtins.int SUPPORTS_SCHEDULES_FIELD_NUMBER: builtins.int name: builtins.str state: temporalio.api.enums.v1.namespace_pb2.NamespaceState.ValueType description: builtins.str owner_email: builtins.str + id: builtins.str + supports_schedules: builtins.bool + """Whether scheduled workflows are supported on this namespace. This is only needed + temporarily while the feature is experimental, so we can give it a high tag. + """ @property def data( self, ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: """A key-value map for any customized purpose.""" - id: builtins.str + @property def capabilities(self) -> global___NamespaceInfo.Capabilities: """All capabilities the namespace supports.""" - supports_schedules: builtins.bool - """Whether scheduled workflows are supported on this namespace. This is only needed - temporarily while the feature is experimental, so we can give it a high tag. - """ + + @property + def limits(self) -> global___NamespaceInfo.Limits: + """Namespace configured limits""" + def __init__( self, *, @@ -123,14 +242,18 @@ class NamespaceInfo(google.protobuf.message.Message): data: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., id: builtins.str = ..., capabilities: global___NamespaceInfo.Capabilities | None = ..., + limits: global___NamespaceInfo.Limits | None = ..., supports_schedules: builtins.bool = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["capabilities", b"capabilities"] + self, + field_name: typing.Literal[ + "capabilities", b"capabilities", "limits", b"limits" + ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "capabilities", b"capabilities", "data", @@ -139,6 +262,8 @@ class NamespaceInfo(google.protobuf.message.Message): b"description", "id", b"id", + "limits", + b"limits", "name", b"name", "owner_email", @@ -152,9 +277,11 @@ class NamespaceInfo(google.protobuf.message.Message): global___NamespaceInfo = NamespaceInfo +@typing.final class NamespaceConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class CustomSearchAttributeAliasesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -169,8 +296,7 @@ class NamespaceConfig(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... WORKFLOW_EXECUTION_RETENTION_TTL_FIELD_NUMBER: builtins.int @@ -180,12 +306,6 @@ class NamespaceConfig(google.protobuf.message.Message): VISIBILITY_ARCHIVAL_STATE_FIELD_NUMBER: builtins.int VISIBILITY_ARCHIVAL_URI_FIELD_NUMBER: builtins.int CUSTOM_SEARCH_ATTRIBUTE_ALIASES_FIELD_NUMBER: builtins.int - @property - def workflow_execution_retention_ttl( - self, - ) -> google.protobuf.duration_pb2.Duration: ... - @property - def bad_binaries(self) -> global___BadBinaries: ... history_archival_state: ( temporalio.api.enums.v1.namespace_pb2.ArchivalState.ValueType ) @@ -197,10 +317,17 @@ class NamespaceConfig(google.protobuf.message.Message): """If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.""" visibility_archival_uri: builtins.str @property + def workflow_execution_retention_ttl( + self, + ) -> google.protobuf.duration_pb2.Duration: ... + @property + def bad_binaries(self) -> global___BadBinaries: ... + @property def custom_search_attribute_aliases( self, ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: """Map from field name to alias.""" + def __init__( self, *, @@ -218,7 +345,7 @@ class NamespaceConfig(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "bad_binaries", b"bad_binaries", "workflow_execution_retention_ttl", @@ -227,7 +354,7 @@ class NamespaceConfig(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "bad_binaries", b"bad_binaries", "custom_search_attribute_aliases", @@ -247,9 +374,11 @@ class NamespaceConfig(google.protobuf.message.Message): global___NamespaceConfig = NamespaceConfig +@typing.final class BadBinaries(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class BinariesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -265,11 +394,10 @@ class BadBinaries(google.protobuf.message.Message): value: global___BadBinaryInfo | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... BINARIES_FIELD_NUMBER: builtins.int @@ -286,11 +414,12 @@ class BadBinaries(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["binaries", b"binaries"] + self, field_name: typing.Literal["binaries", b"binaries"] ) -> None: ... global___BadBinaries = BadBinaries +@typing.final class BadBinaryInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -309,20 +438,22 @@ class BadBinaryInfo(google.protobuf.message.Message): create_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["create_time", b"create_time"] + self, field_name: typing.Literal["create_time", b"create_time"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "operator", b"operator", "reason", b"reason" ], ) -> None: ... global___BadBinaryInfo = BadBinaryInfo +@typing.final class UpdateNamespaceInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class DataEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -337,8 +468,7 @@ class UpdateNamespaceInfo(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... DESCRIPTION_FIELD_NUMBER: builtins.int @@ -347,6 +477,13 @@ class UpdateNamespaceInfo(google.protobuf.message.Message): STATE_FIELD_NUMBER: builtins.int description: builtins.str owner_email: builtins.str + state: temporalio.api.enums.v1.namespace_pb2.NamespaceState.ValueType + """New namespace state, server will reject if transition is not allowed. + Allowed transitions are: + Registered -> [ Deleted | Deprecated | Handover ] + Handover -> [ Registered ] + Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. + """ @property def data( self, @@ -355,13 +492,7 @@ class UpdateNamespaceInfo(google.protobuf.message.Message): If data already exists on the namespace, this will merge with the existing key values. """ - state: temporalio.api.enums.v1.namespace_pb2.NamespaceState.ValueType - """New namespace state, server will reject if transition is not allowed. - Allowed transitions are: - Registered -> [ Deleted | Deprecated | Handover ] - Handover -> [ Registered ] - Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. - """ + def __init__( self, *, @@ -372,7 +503,7 @@ class UpdateNamespaceInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "data", b"data", "description", @@ -386,6 +517,7 @@ class UpdateNamespaceInfo(google.protobuf.message.Message): global___UpdateNamespaceInfo = UpdateNamespaceInfo +@typing.final class NamespaceFilter(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -401,8 +533,7 @@ class NamespaceFilter(google.protobuf.message.Message): include_deleted: builtins.bool = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["include_deleted", b"include_deleted"], + self, field_name: typing.Literal["include_deleted", b"include_deleted"] ) -> None: ... global___NamespaceFilter = NamespaceFilter diff --git a/temporalio/api/nexus/v1/__init__.py b/temporalio/api/nexus/v1/__init__.py index 7ae90d5904..298419f24c 100644 --- a/temporalio/api/nexus/v1/__init__.py +++ b/temporalio/api/nexus/v1/__init__.py @@ -7,6 +7,10 @@ Failure, HandlerError, Link, + NexusOperationExecutionCancellationInfo, + NexusOperationExecutionInfo, + NexusOperationExecutionListInfo, + PropagatedSerializationContext, Request, Response, StartOperationRequest, @@ -23,6 +27,10 @@ "Failure", "HandlerError", "Link", + "NexusOperationExecutionCancellationInfo", + "NexusOperationExecutionInfo", + "NexusOperationExecutionListInfo", + "PropagatedSerializationContext", "Request", "Response", "StartOperationRequest", diff --git a/temporalio/api/nexus/v1/message_pb2.py b/temporalio/api/nexus/v1/message_pb2.py index 8cb6ce6226..bb875cd8af 100644 --- a/temporalio/api/nexus/v1/message_pb2.py +++ b/temporalio/api/nexus/v1/message_pb2.py @@ -5,266 +5,39 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from temporalio.api.common.v1 import ( message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, ) from temporalio.api.enums.v1 import ( - nexus_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_nexus__pb2, -) - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n#temporal/api/nexus/v1/message.proto\x12\x15temporal.api.nexus.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a!temporal/api/enums/v1/nexus.proto"\x9c\x01\n\x07\x46\x61ilure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12>\n\x08metadata\x18\x02 \x03(\x0b\x32,.temporal.api.nexus.v1.Failure.MetadataEntry\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\x0c\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xa2\x01\n\x0cHandlerError\x12\x12\n\nerror_type\x18\x01 \x01(\t\x12/\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32\x1e.temporal.api.nexus.v1.Failure\x12M\n\x0eretry_behavior\x18\x03 \x01(\x0e\x32\x35.temporal.api.enums.v1.NexusHandlerErrorRetryBehavior"f\n\x1aUnsuccessfulOperationError\x12\x17\n\x0foperation_state\x18\x01 \x01(\t\x12/\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32\x1e.temporal.api.nexus.v1.Failure"!\n\x04Link\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t"\xd1\x02\n\x15StartOperationRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x10\n\x08\x63\x61llback\x18\x04 \x01(\t\x12\x30\n\x07payload\x18\x05 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12Y\n\x0f\x63\x61llback_header\x18\x06 \x03(\x0b\x32@.temporal.api.nexus.v1.StartOperationRequest.CallbackHeaderEntry\x12*\n\x05links\x18\x07 \x03(\x0b\x32\x1b.temporal.api.nexus.v1.Link\x1a\x35\n\x13\x43\x61llbackHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"o\n\x16\x43\x61ncelOperationRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x17\n\x0foperation_token\x18\x04 \x01(\t"\xc7\x02\n\x07Request\x12:\n\x06header\x18\x01 \x03(\x0b\x32*.temporal.api.nexus.v1.Request.HeaderEntry\x12\x32\n\x0escheduled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12G\n\x0fstart_operation\x18\x03 \x01(\x0b\x32,.temporal.api.nexus.v1.StartOperationRequestH\x00\x12I\n\x10\x63\x61ncel_operation\x18\x04 \x01(\x0b\x32-.temporal.api.nexus.v1.CancelOperationRequestH\x00\x1a-\n\x0bHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07variant"\xd9\x03\n\x16StartOperationResponse\x12J\n\x0csync_success\x18\x01 \x01(\x0b\x32\x32.temporal.api.nexus.v1.StartOperationResponse.SyncH\x00\x12L\n\rasync_success\x18\x02 \x01(\x0b\x32\x33.temporal.api.nexus.v1.StartOperationResponse.AsyncH\x00\x12L\n\x0foperation_error\x18\x03 \x01(\x0b\x32\x31.temporal.api.nexus.v1.UnsuccessfulOperationErrorH\x00\x1a\x64\n\x04Sync\x12\x30\n\x07payload\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12*\n\x05links\x18\x02 \x03(\x0b\x32\x1b.temporal.api.nexus.v1.Link\x1a\x66\n\x05\x41sync\x12\x18\n\x0coperation_id\x18\x01 \x01(\tB\x02\x18\x01\x12*\n\x05links\x18\x02 \x03(\x0b\x32\x1b.temporal.api.nexus.v1.Link\x12\x17\n\x0foperation_token\x18\x03 \x01(\tB\t\n\x07variant"\x19\n\x17\x43\x61ncelOperationResponse"\xab\x01\n\x08Response\x12H\n\x0fstart_operation\x18\x01 \x01(\x0b\x32-.temporal.api.nexus.v1.StartOperationResponseH\x00\x12J\n\x10\x63\x61ncel_operation\x18\x02 \x01(\x0b\x32..temporal.api.nexus.v1.CancelOperationResponseH\x00\x42\t\n\x07variant"\xd8\x01\n\x08\x45ndpoint\x12\x0f\n\x07version\x18\x01 \x01(\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x31\n\x04spec\x18\x03 \x01(\x0b\x32#.temporal.api.nexus.v1.EndpointSpec\x12\x30\n\x0c\x63reated_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nurl_prefix\x18\x06 \x01(\t"\x89\x01\n\x0c\x45ndpointSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x64\x65scription\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x35\n\x06target\x18\x03 \x01(\x0b\x32%.temporal.api.nexus.v1.EndpointTarget"\xe9\x01\n\x0e\x45ndpointTarget\x12>\n\x06worker\x18\x01 \x01(\x0b\x32,.temporal.api.nexus.v1.EndpointTarget.WorkerH\x00\x12\x42\n\x08\x65xternal\x18\x02 \x01(\x0b\x32..temporal.api.nexus.v1.EndpointTarget.ExternalH\x00\x1a/\n\x06Worker\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x1a\x17\n\x08\x45xternal\x12\x0b\n\x03url\x18\x01 \x01(\tB\t\n\x07variantB\x84\x01\n\x18io.temporal.api.nexus.v1B\x0cMessageProtoP\x01Z!go.temporal.io/api/nexus/v1;nexus\xaa\x02\x17Temporalio.Api.Nexus.V1\xea\x02\x1aTemporalio::Api::Nexus::V1b\x06proto3' -) - - -_FAILURE = DESCRIPTOR.message_types_by_name["Failure"] -_FAILURE_METADATAENTRY = _FAILURE.nested_types_by_name["MetadataEntry"] -_HANDLERERROR = DESCRIPTOR.message_types_by_name["HandlerError"] -_UNSUCCESSFULOPERATIONERROR = DESCRIPTOR.message_types_by_name[ - "UnsuccessfulOperationError" -] -_LINK = DESCRIPTOR.message_types_by_name["Link"] -_STARTOPERATIONREQUEST = DESCRIPTOR.message_types_by_name["StartOperationRequest"] -_STARTOPERATIONREQUEST_CALLBACKHEADERENTRY = ( - _STARTOPERATIONREQUEST.nested_types_by_name["CallbackHeaderEntry"] -) -_CANCELOPERATIONREQUEST = DESCRIPTOR.message_types_by_name["CancelOperationRequest"] -_REQUEST = DESCRIPTOR.message_types_by_name["Request"] -_REQUEST_HEADERENTRY = _REQUEST.nested_types_by_name["HeaderEntry"] -_STARTOPERATIONRESPONSE = DESCRIPTOR.message_types_by_name["StartOperationResponse"] -_STARTOPERATIONRESPONSE_SYNC = _STARTOPERATIONRESPONSE.nested_types_by_name["Sync"] -_STARTOPERATIONRESPONSE_ASYNC = _STARTOPERATIONRESPONSE.nested_types_by_name["Async"] -_CANCELOPERATIONRESPONSE = DESCRIPTOR.message_types_by_name["CancelOperationResponse"] -_RESPONSE = DESCRIPTOR.message_types_by_name["Response"] -_ENDPOINT = DESCRIPTOR.message_types_by_name["Endpoint"] -_ENDPOINTSPEC = DESCRIPTOR.message_types_by_name["EndpointSpec"] -_ENDPOINTTARGET = DESCRIPTOR.message_types_by_name["EndpointTarget"] -_ENDPOINTTARGET_WORKER = _ENDPOINTTARGET.nested_types_by_name["Worker"] -_ENDPOINTTARGET_EXTERNAL = _ENDPOINTTARGET.nested_types_by_name["External"] -Failure = _reflection.GeneratedProtocolMessageType( - "Failure", - (_message.Message,), - { - "MetadataEntry": _reflection.GeneratedProtocolMessageType( - "MetadataEntry", - (_message.Message,), - { - "DESCRIPTOR": _FAILURE_METADATAENTRY, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.Failure.MetadataEntry) - }, - ), - "DESCRIPTOR": _FAILURE, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.Failure) - }, -) -_sym_db.RegisterMessage(Failure) -_sym_db.RegisterMessage(Failure.MetadataEntry) - -HandlerError = _reflection.GeneratedProtocolMessageType( - "HandlerError", - (_message.Message,), - { - "DESCRIPTOR": _HANDLERERROR, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.HandlerError) - }, -) -_sym_db.RegisterMessage(HandlerError) - -UnsuccessfulOperationError = _reflection.GeneratedProtocolMessageType( - "UnsuccessfulOperationError", - (_message.Message,), - { - "DESCRIPTOR": _UNSUCCESSFULOPERATIONERROR, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.UnsuccessfulOperationError) - }, -) -_sym_db.RegisterMessage(UnsuccessfulOperationError) - -Link = _reflection.GeneratedProtocolMessageType( - "Link", - (_message.Message,), - { - "DESCRIPTOR": _LINK, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.Link) - }, -) -_sym_db.RegisterMessage(Link) - -StartOperationRequest = _reflection.GeneratedProtocolMessageType( - "StartOperationRequest", - (_message.Message,), - { - "CallbackHeaderEntry": _reflection.GeneratedProtocolMessageType( - "CallbackHeaderEntry", - (_message.Message,), - { - "DESCRIPTOR": _STARTOPERATIONREQUEST_CALLBACKHEADERENTRY, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.StartOperationRequest.CallbackHeaderEntry) - }, - ), - "DESCRIPTOR": _STARTOPERATIONREQUEST, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.StartOperationRequest) - }, + common_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_common__pb2, ) -_sym_db.RegisterMessage(StartOperationRequest) -_sym_db.RegisterMessage(StartOperationRequest.CallbackHeaderEntry) - -CancelOperationRequest = _reflection.GeneratedProtocolMessageType( - "CancelOperationRequest", - (_message.Message,), - { - "DESCRIPTOR": _CANCELOPERATIONREQUEST, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.CancelOperationRequest) - }, -) -_sym_db.RegisterMessage(CancelOperationRequest) - -Request = _reflection.GeneratedProtocolMessageType( - "Request", - (_message.Message,), - { - "HeaderEntry": _reflection.GeneratedProtocolMessageType( - "HeaderEntry", - (_message.Message,), - { - "DESCRIPTOR": _REQUEST_HEADERENTRY, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.Request.HeaderEntry) - }, - ), - "DESCRIPTOR": _REQUEST, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.Request) - }, -) -_sym_db.RegisterMessage(Request) -_sym_db.RegisterMessage(Request.HeaderEntry) - -StartOperationResponse = _reflection.GeneratedProtocolMessageType( - "StartOperationResponse", - (_message.Message,), - { - "Sync": _reflection.GeneratedProtocolMessageType( - "Sync", - (_message.Message,), - { - "DESCRIPTOR": _STARTOPERATIONRESPONSE_SYNC, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.StartOperationResponse.Sync) - }, - ), - "Async": _reflection.GeneratedProtocolMessageType( - "Async", - (_message.Message,), - { - "DESCRIPTOR": _STARTOPERATIONRESPONSE_ASYNC, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.StartOperationResponse.Async) - }, - ), - "DESCRIPTOR": _STARTOPERATIONRESPONSE, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.StartOperationResponse) - }, -) -_sym_db.RegisterMessage(StartOperationResponse) -_sym_db.RegisterMessage(StartOperationResponse.Sync) -_sym_db.RegisterMessage(StartOperationResponse.Async) - -CancelOperationResponse = _reflection.GeneratedProtocolMessageType( - "CancelOperationResponse", - (_message.Message,), - { - "DESCRIPTOR": _CANCELOPERATIONRESPONSE, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.CancelOperationResponse) - }, -) -_sym_db.RegisterMessage(CancelOperationResponse) - -Response = _reflection.GeneratedProtocolMessageType( - "Response", - (_message.Message,), - { - "DESCRIPTOR": _RESPONSE, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.Response) - }, +from temporalio.api.enums.v1 import ( + nexus_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_nexus__pb2, ) -_sym_db.RegisterMessage(Response) - -Endpoint = _reflection.GeneratedProtocolMessageType( - "Endpoint", - (_message.Message,), - { - "DESCRIPTOR": _ENDPOINT, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.Endpoint) - }, +from temporalio.api.failure.v1 import ( + message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, ) -_sym_db.RegisterMessage(Endpoint) - -EndpointSpec = _reflection.GeneratedProtocolMessageType( - "EndpointSpec", - (_message.Message,), - { - "DESCRIPTOR": _ENDPOINTSPEC, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.EndpointSpec) - }, +from temporalio.api.sdk.v1 import ( + user_metadata_pb2 as temporal_dot_api_dot_sdk_dot_v1_dot_user__metadata__pb2, ) -_sym_db.RegisterMessage(EndpointSpec) -EndpointTarget = _reflection.GeneratedProtocolMessageType( - "EndpointTarget", - (_message.Message,), - { - "Worker": _reflection.GeneratedProtocolMessageType( - "Worker", - (_message.Message,), - { - "DESCRIPTOR": _ENDPOINTTARGET_WORKER, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.EndpointTarget.Worker) - }, - ), - "External": _reflection.GeneratedProtocolMessageType( - "External", - (_message.Message,), - { - "DESCRIPTOR": _ENDPOINTTARGET_EXTERNAL, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.EndpointTarget.External) - }, - ), - "DESCRIPTOR": _ENDPOINTTARGET, - "__module__": "temporalio.api.nexus.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.nexus.v1.EndpointTarget) - }, +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n#temporal/api/nexus/v1/message.proto\x12\x15temporal.api.nexus.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a"temporal/api/enums/v1/common.proto\x1a!temporal/api/enums/v1/nexus.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto"V\n\x1ePropagatedSerializationContext\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x11\n\toperation\x18\x03 \x01(\t"\xe0\x01\n\x07\x46\x61ilure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x13\n\x0bstack_trace\x18\x04 \x01(\t\x12>\n\x08metadata\x18\x02 \x03(\x0b\x32,.temporal.api.nexus.v1.Failure.MetadataEntry\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\x0c\x12-\n\x05\x63\x61use\x18\x05 \x01(\x0b\x32\x1e.temporal.api.nexus.v1.Failure\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xa2\x01\n\x0cHandlerError\x12\x12\n\nerror_type\x18\x01 \x01(\t\x12/\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32\x1e.temporal.api.nexus.v1.Failure\x12M\n\x0eretry_behavior\x18\x03 \x01(\x0e\x32\x35.temporal.api.enums.v1.NexusHandlerErrorRetryBehavior"f\n\x1aUnsuccessfulOperationError\x12\x17\n\x0foperation_state\x18\x01 \x01(\t\x12/\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32\x1e.temporal.api.nexus.v1.Failure"!\n\x04Link\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t"\xd1\x02\n\x15StartOperationRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x10\n\x08\x63\x61llback\x18\x04 \x01(\t\x12\x30\n\x07payload\x18\x05 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12Y\n\x0f\x63\x61llback_header\x18\x06 \x03(\x0b\x32@.temporal.api.nexus.v1.StartOperationRequest.CallbackHeaderEntry\x12*\n\x05links\x18\x07 \x03(\x0b\x32\x1b.temporal.api.nexus.v1.Link\x1a\x35\n\x13\x43\x61llbackHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"o\n\x16\x43\x61ncelOperationRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x11\n\toperation\x18\x02 \x01(\t\x12\x18\n\x0coperation_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x17\n\x0foperation_token\x18\x04 \x01(\t"\xd0\x03\n\x07Request\x12:\n\x06header\x18\x01 \x03(\x0b\x32*.temporal.api.nexus.v1.Request.HeaderEntry\x12\x32\n\x0escheduled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0c\x63\x61pabilities\x18\x64 \x01(\x0b\x32+.temporal.api.nexus.v1.Request.Capabilities\x12G\n\x0fstart_operation\x18\x03 \x01(\x0b\x32,.temporal.api.nexus.v1.StartOperationRequestH\x00\x12I\n\x10\x63\x61ncel_operation\x18\x04 \x01(\x0b\x32-.temporal.api.nexus.v1.CancelOperationRequestH\x00\x12\x10\n\x08\x65ndpoint\x18\n \x01(\t\x1a\x32\n\x0c\x43\x61pabilities\x12"\n\x1atemporal_failure_responses\x18\x01 \x01(\x08\x1a-\n\x0bHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07variant"\x92\x04\n\x16StartOperationResponse\x12J\n\x0csync_success\x18\x01 \x01(\x0b\x32\x32.temporal.api.nexus.v1.StartOperationResponse.SyncH\x00\x12L\n\rasync_success\x18\x02 \x01(\x0b\x32\x33.temporal.api.nexus.v1.StartOperationResponse.AsyncH\x00\x12P\n\x0foperation_error\x18\x03 \x01(\x0b\x32\x31.temporal.api.nexus.v1.UnsuccessfulOperationErrorB\x02\x18\x01H\x00\x12\x33\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x1a\x64\n\x04Sync\x12\x30\n\x07payload\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12*\n\x05links\x18\x02 \x03(\x0b\x32\x1b.temporal.api.nexus.v1.Link\x1a\x66\n\x05\x41sync\x12\x18\n\x0coperation_id\x18\x01 \x01(\tB\x02\x18\x01\x12*\n\x05links\x18\x02 \x03(\x0b\x32\x1b.temporal.api.nexus.v1.Link\x12\x17\n\x0foperation_token\x18\x03 \x01(\tB\t\n\x07variant"\x19\n\x17\x43\x61ncelOperationResponse"\xab\x01\n\x08Response\x12H\n\x0fstart_operation\x18\x01 \x01(\x0b\x32-.temporal.api.nexus.v1.StartOperationResponseH\x00\x12J\n\x10\x63\x61ncel_operation\x18\x02 \x01(\x0b\x32..temporal.api.nexus.v1.CancelOperationResponseH\x00\x42\t\n\x07variant"\xd8\x01\n\x08\x45ndpoint\x12\x0f\n\x07version\x18\x01 \x01(\x03\x12\n\n\x02id\x18\x02 \x01(\t\x12\x31\n\x04spec\x18\x03 \x01(\x0b\x32#.temporal.api.nexus.v1.EndpointSpec\x12\x30\n\x0c\x63reated_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x12last_modified_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nurl_prefix\x18\x06 \x01(\t"\x89\x01\n\x0c\x45ndpointSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x64\x65scription\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x35\n\x06target\x18\x03 \x01(\x0b\x32%.temporal.api.nexus.v1.EndpointTarget"\xe9\x01\n\x0e\x45ndpointTarget\x12>\n\x06worker\x18\x01 \x01(\x0b\x32,.temporal.api.nexus.v1.EndpointTarget.WorkerH\x00\x12\x42\n\x08\x65xternal\x18\x02 \x01(\x0b\x32..temporal.api.nexus.v1.EndpointTarget.ExternalH\x00\x1a/\n\x06Worker\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x1a\x17\n\x08\x45xternal\x12\x0b\n\x03url\x18\x01 \x01(\tB\t\n\x07variant"\x9d\x03\n\'NexusOperationExecutionCancellationInfo\x12\x32\n\x0erequested_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\x05state\x18\x02 \x01(\x0e\x32\x36.temporal.api.enums.v1.NexusOperationCancellationState\x12\x0f\n\x07\x61ttempt\x18\x03 \x01(\x05\x12>\n\x1alast_attempt_complete_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x14last_attempt_failure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12>\n\x1anext_attempt_schedule_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0e\x62locked_reason\x18\x07 \x01(\t\x12\x0e\n\x06reason\x18\x08 \x01(\t"\xff\n\n\x1bNexusOperationExecutionInfo\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\x12\x11\n\toperation\x18\x05 \x01(\t\x12\x44\n\x06status\x18\x06 \x01(\x0e\x32\x34.temporal.api.enums.v1.NexusOperationExecutionStatus\x12@\n\x05state\x18\x07 \x01(\x0e\x32\x31.temporal.api.enums.v1.PendingNexusOperationState\x12<\n\x19schedule_to_close_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0f\n\x07\x61ttempt\x18\x0b \x01(\x05\x12\x31\n\rschedule_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x1alast_attempt_complete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x14last_attempt_failure\x18\x10 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12>\n\x1anext_attempt_schedule_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12\x65xecution_duration\x18\x12 \x01(\x0b\x32\x19.google.protobuf.Duration\x12Y\n\x11\x63\x61ncellation_info\x18\x13 \x01(\x0b\x32>.temporal.api.nexus.v1.NexusOperationExecutionCancellationInfo\x12\x16\n\x0e\x62locked_reason\x18\x14 \x01(\t\x12\x12\n\nrequest_id\x18\x15 \x01(\t\x12\x17\n\x0foperation_token\x18\x16 \x01(\t\x12\x1e\n\x16state_transition_count\x18\x17 \x01(\x03\x12\x43\n\x11search_attributes\x18\x18 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12Y\n\x0cnexus_header\x18\x19 \x03(\x0b\x32\x43.temporal.api.nexus.v1.NexusOperationExecutionInfo.NexusHeaderEntry\x12\x38\n\ruser_metadata\x18\x1a \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12+\n\x05links\x18\x1b \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12\x10\n\x08identity\x18\x1c \x01(\t\x12\x18\n\x10state_size_bytes\x18\x1d \x01(\x03\x1a\x32\n\x10NexusHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xdc\x03\n\x1fNexusOperationExecutionListInfo\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\x12\x11\n\toperation\x18\x05 \x01(\t\x12\x31\n\rschedule_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x06status\x18\x08 \x01(\x0e\x32\x34.temporal.api.enums.v1.NexusOperationExecutionStatus\x12\x43\n\x11search_attributes\x18\t \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x1e\n\x16state_transition_count\x18\n \x01(\x03\x12\x35\n\x12\x65xecution_duration\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10state_size_bytes\x18\x0c \x01(\x03\x42\x84\x01\n\x18io.temporal.api.nexus.v1B\x0cMessageProtoP\x01Z!go.temporal.io/api/nexus/v1;nexus\xaa\x02\x17Temporalio.Api.Nexus.V1\xea\x02\x1aTemporalio::Api::Nexus::V1b\x06proto3' ) -_sym_db.RegisterMessage(EndpointTarget) -_sym_db.RegisterMessage(EndpointTarget.Worker) -_sym_db.RegisterMessage(EndpointTarget.External) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.nexus.v1B\014MessageProtoP\001Z!go.temporal.io/api/nexus/v1;nexus\252\002\027Temporalio.Api.Nexus.V1\352\002\032Temporalio::Api::Nexus::V1" @@ -282,44 +55,62 @@ _STARTOPERATIONRESPONSE_ASYNC.fields_by_name[ "operation_id" ]._serialized_options = b"\030\001" - _FAILURE._serialized_start = 169 - _FAILURE._serialized_end = 325 - _FAILURE_METADATAENTRY._serialized_start = 278 - _FAILURE_METADATAENTRY._serialized_end = 325 - _HANDLERERROR._serialized_start = 328 - _HANDLERERROR._serialized_end = 490 - _UNSUCCESSFULOPERATIONERROR._serialized_start = 492 - _UNSUCCESSFULOPERATIONERROR._serialized_end = 594 - _LINK._serialized_start = 596 - _LINK._serialized_end = 629 - _STARTOPERATIONREQUEST._serialized_start = 632 - _STARTOPERATIONREQUEST._serialized_end = 969 - _STARTOPERATIONREQUEST_CALLBACKHEADERENTRY._serialized_start = 916 - _STARTOPERATIONREQUEST_CALLBACKHEADERENTRY._serialized_end = 969 - _CANCELOPERATIONREQUEST._serialized_start = 971 - _CANCELOPERATIONREQUEST._serialized_end = 1082 - _REQUEST._serialized_start = 1085 - _REQUEST._serialized_end = 1412 - _REQUEST_HEADERENTRY._serialized_start = 1356 - _REQUEST_HEADERENTRY._serialized_end = 1401 - _STARTOPERATIONRESPONSE._serialized_start = 1415 - _STARTOPERATIONRESPONSE._serialized_end = 1888 - _STARTOPERATIONRESPONSE_SYNC._serialized_start = 1673 - _STARTOPERATIONRESPONSE_SYNC._serialized_end = 1773 - _STARTOPERATIONRESPONSE_ASYNC._serialized_start = 1775 - _STARTOPERATIONRESPONSE_ASYNC._serialized_end = 1877 - _CANCELOPERATIONRESPONSE._serialized_start = 1890 - _CANCELOPERATIONRESPONSE._serialized_end = 1915 - _RESPONSE._serialized_start = 1918 - _RESPONSE._serialized_end = 2089 - _ENDPOINT._serialized_start = 2092 - _ENDPOINT._serialized_end = 2308 - _ENDPOINTSPEC._serialized_start = 2311 - _ENDPOINTSPEC._serialized_end = 2448 - _ENDPOINTTARGET._serialized_start = 2451 - _ENDPOINTTARGET._serialized_end = 2684 - _ENDPOINTTARGET_WORKER._serialized_start = 2601 - _ENDPOINTTARGET_WORKER._serialized_end = 2648 - _ENDPOINTTARGET_EXTERNAL._serialized_start = 2650 - _ENDPOINTTARGET_EXTERNAL._serialized_end = 2673 + _STARTOPERATIONRESPONSE.fields_by_name["operation_error"]._options = None + _STARTOPERATIONRESPONSE.fields_by_name[ + "operation_error" + ]._serialized_options = b"\030\001" + _NEXUSOPERATIONEXECUTIONINFO_NEXUSHEADERENTRY._options = None + _NEXUSOPERATIONEXECUTIONINFO_NEXUSHEADERENTRY._serialized_options = b"8\001" + _PROPAGATEDSERIALIZATIONCONTEXT._serialized_start = 316 + _PROPAGATEDSERIALIZATIONCONTEXT._serialized_end = 402 + _FAILURE._serialized_start = 405 + _FAILURE._serialized_end = 629 + _FAILURE_METADATAENTRY._serialized_start = 582 + _FAILURE_METADATAENTRY._serialized_end = 629 + _HANDLERERROR._serialized_start = 632 + _HANDLERERROR._serialized_end = 794 + _UNSUCCESSFULOPERATIONERROR._serialized_start = 796 + _UNSUCCESSFULOPERATIONERROR._serialized_end = 898 + _LINK._serialized_start = 900 + _LINK._serialized_end = 933 + _STARTOPERATIONREQUEST._serialized_start = 936 + _STARTOPERATIONREQUEST._serialized_end = 1273 + _STARTOPERATIONREQUEST_CALLBACKHEADERENTRY._serialized_start = 1220 + _STARTOPERATIONREQUEST_CALLBACKHEADERENTRY._serialized_end = 1273 + _CANCELOPERATIONREQUEST._serialized_start = 1275 + _CANCELOPERATIONREQUEST._serialized_end = 1386 + _REQUEST._serialized_start = 1389 + _REQUEST._serialized_end = 1853 + _REQUEST_CAPABILITIES._serialized_start = 1745 + _REQUEST_CAPABILITIES._serialized_end = 1795 + _REQUEST_HEADERENTRY._serialized_start = 1797 + _REQUEST_HEADERENTRY._serialized_end = 1842 + _STARTOPERATIONRESPONSE._serialized_start = 1856 + _STARTOPERATIONRESPONSE._serialized_end = 2386 + _STARTOPERATIONRESPONSE_SYNC._serialized_start = 2171 + _STARTOPERATIONRESPONSE_SYNC._serialized_end = 2271 + _STARTOPERATIONRESPONSE_ASYNC._serialized_start = 2273 + _STARTOPERATIONRESPONSE_ASYNC._serialized_end = 2375 + _CANCELOPERATIONRESPONSE._serialized_start = 2388 + _CANCELOPERATIONRESPONSE._serialized_end = 2413 + _RESPONSE._serialized_start = 2416 + _RESPONSE._serialized_end = 2587 + _ENDPOINT._serialized_start = 2590 + _ENDPOINT._serialized_end = 2806 + _ENDPOINTSPEC._serialized_start = 2809 + _ENDPOINTSPEC._serialized_end = 2946 + _ENDPOINTTARGET._serialized_start = 2949 + _ENDPOINTTARGET._serialized_end = 3182 + _ENDPOINTTARGET_WORKER._serialized_start = 3099 + _ENDPOINTTARGET_WORKER._serialized_end = 3146 + _ENDPOINTTARGET_EXTERNAL._serialized_start = 3148 + _ENDPOINTTARGET_EXTERNAL._serialized_end = 3171 + _NEXUSOPERATIONEXECUTIONCANCELLATIONINFO._serialized_start = 3185 + _NEXUSOPERATIONEXECUTIONCANCELLATIONINFO._serialized_end = 3598 + _NEXUSOPERATIONEXECUTIONINFO._serialized_start = 3601 + _NEXUSOPERATIONEXECUTIONINFO._serialized_end = 5008 + _NEXUSOPERATIONEXECUTIONINFO_NEXUSHEADERENTRY._serialized_start = 4958 + _NEXUSOPERATIONEXECUTIONINFO_NEXUSHEADERENTRY._serialized_end = 5008 + _NEXUSOPERATIONEXECUTIONLISTINFO._serialized_start = 5011 + _NEXUSOPERATIONEXECUTIONLISTINFO._serialized_end = 5487 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/nexus/v1/message_pb2.pyi b/temporalio/api/nexus/v1/message_pb2.pyi index b72127ed6b..4980da6826 100644 --- a/temporalio/api/nexus/v1/message_pb2.pyi +++ b/temporalio/api/nexus/v1/message_pb2.pyi @@ -5,23 +5,51 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor +import google.protobuf.duration_pb2 import google.protobuf.internal.containers import google.protobuf.message import google.protobuf.timestamp_pb2 import temporalio.api.common.v1.message_pb2 +import temporalio.api.enums.v1.common_pb2 import temporalio.api.enums.v1.nexus_pb2 - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import temporalio.api.failure.v1.message_pb2 +import temporalio.api.sdk.v1.user_metadata_pb2 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final +class PropagatedSerializationContext(google.protobuf.message.Message): + """PropagatedSerializationContext represents the context of the Nexus caller that started this execution.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ENDPOINT_FIELD_NUMBER: builtins.int + SERVICE_FIELD_NUMBER: builtins.int + OPERATION_FIELD_NUMBER: builtins.int + endpoint: builtins.str + service: builtins.str + operation: builtins.str + def __init__( + self, + *, + endpoint: builtins.str = ..., + service: builtins.str = ..., + operation: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "endpoint", b"endpoint", "operation", b"operation", "service", b"service" + ], + ) -> None: ... + +global___PropagatedSerializationContext = PropagatedSerializationContext + +@typing.final class Failure(google.protobuf.message.Message): """A general purpose failure message. See: https://github.com/nexus-rpc/api/blob/main/SPEC.md#failure @@ -29,6 +57,7 @@ class Failure(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class MetadataEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -43,36 +72,55 @@ class Failure(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... MESSAGE_FIELD_NUMBER: builtins.int + STACK_TRACE_FIELD_NUMBER: builtins.int METADATA_FIELD_NUMBER: builtins.int DETAILS_FIELD_NUMBER: builtins.int + CAUSE_FIELD_NUMBER: builtins.int message: builtins.str + stack_trace: builtins.str + details: builtins.bytes + """UTF-8 encoded JSON serializable details.""" @property def metadata( self, ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ... - details: builtins.bytes - """UTF-8 encoded JSON serializable details.""" + @property + def cause(self) -> global___Failure: ... def __init__( self, *, message: builtins.str = ..., + stack_trace: builtins.str = ..., metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., details: builtins.bytes = ..., + cause: global___Failure | None = ..., ) -> None: ... + def HasField( + self, field_name: typing.Literal["cause", b"cause"] + ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "details", b"details", "message", b"message", "metadata", b"metadata" + field_name: typing.Literal[ + "cause", + b"cause", + "details", + b"details", + "message", + b"message", + "metadata", + b"metadata", + "stack_trace", + b"stack_trace", ], ) -> None: ... global___Failure = Failure +@typing.final class HandlerError(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -81,12 +129,12 @@ class HandlerError(google.protobuf.message.Message): RETRY_BEHAVIOR_FIELD_NUMBER: builtins.int error_type: builtins.str """See https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors.""" - @property - def failure(self) -> global___Failure: ... retry_behavior: ( temporalio.api.enums.v1.nexus_pb2.NexusHandlerErrorRetryBehavior.ValueType ) """Retry behavior, defaults to the retry behavior of the error type as defined in the spec.""" + @property + def failure(self) -> global___Failure: ... def __init__( self, *, @@ -95,11 +143,11 @@ class HandlerError(google.protobuf.message.Message): retry_behavior: temporalio.api.enums.v1.nexus_pb2.NexusHandlerErrorRetryBehavior.ValueType = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "error_type", b"error_type", "failure", @@ -111,6 +159,7 @@ class HandlerError(google.protobuf.message.Message): global___HandlerError = HandlerError +@typing.final class UnsuccessfulOperationError(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -127,17 +176,18 @@ class UnsuccessfulOperationError(google.protobuf.message.Message): failure: global___Failure | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "operation_state", b"operation_state" ], ) -> None: ... global___UnsuccessfulOperationError = UnsuccessfulOperationError +@typing.final class Link(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -153,16 +203,18 @@ class Link(google.protobuf.message.Message): type: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["type", b"type", "url", b"url"] + self, field_name: typing.Literal["type", b"type", "url", b"url"] ) -> None: ... global___Link = Link +@typing.final class StartOperationRequest(google.protobuf.message.Message): """A request to start an operation.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class CallbackHeaderEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -177,8 +229,7 @@ class StartOperationRequest(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SERVICE_FIELD_NUMBER: builtins.int @@ -199,11 +250,13 @@ class StartOperationRequest(google.protobuf.message.Message): @property def payload(self) -> temporalio.api.common.v1.message_pb2.Payload: """Full request body from the incoming HTTP request.""" + @property def callback_header( self, ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: """Header that is expected to be attached to the callback request when the operation completes.""" + @property def links( self, @@ -211,6 +264,7 @@ class StartOperationRequest(google.protobuf.message.Message): global___Link ]: """Links contain caller information and can be attached to the operations started by the handler.""" + def __init__( self, *, @@ -224,11 +278,11 @@ class StartOperationRequest(google.protobuf.message.Message): links: collections.abc.Iterable[global___Link] | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["payload", b"payload"] + self, field_name: typing.Literal["payload", b"payload"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "callback", b"callback", "callback_header", @@ -248,6 +302,7 @@ class StartOperationRequest(google.protobuf.message.Message): global___StartOperationRequest = StartOperationRequest +@typing.final class CancelOperationRequest(google.protobuf.message.Message): """A request to cancel an operation.""" @@ -278,7 +333,7 @@ class CancelOperationRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "operation", b"operation", "operation_id", @@ -292,11 +347,34 @@ class CancelOperationRequest(google.protobuf.message.Message): global___CancelOperationRequest = CancelOperationRequest +@typing.final class Request(google.protobuf.message.Message): """A Nexus request.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final + class Capabilities(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TEMPORAL_FAILURE_RESPONSES_FIELD_NUMBER: builtins.int + temporal_failure_responses: builtins.bool + """If set, handlers may use temporalio.api.failure.v1.Failure instances to return failures to the server. + This also allows handler and operation errors to have their own messages and stack traces. + """ + def __init__( + self, + *, + temporal_failure_responses: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "temporal_failure_responses", b"temporal_failure_responses" + ], + ) -> None: ... + + @typing.final class HeaderEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -311,14 +389,19 @@ class Request(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... HEADER_FIELD_NUMBER: builtins.int SCHEDULED_TIME_FIELD_NUMBER: builtins.int + CAPABILITIES_FIELD_NUMBER: builtins.int START_OPERATION_FIELD_NUMBER: builtins.int CANCEL_OPERATION_FIELD_NUMBER: builtins.int + ENDPOINT_FIELD_NUMBER: builtins.int + endpoint: builtins.str + """The endpoint this request was addressed to before forwarding to the worker. + Supported from server version 1.30.0. + """ @property def header( self, @@ -326,12 +409,16 @@ class Request(google.protobuf.message.Message): """Headers extracted from the original request in the Temporal frontend. When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values. """ + @property def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The timestamp when the request was scheduled in the frontend. (-- api-linter: core::0142::time-field-names=disabled aip.dev/not-precedent: Not following linter rules. --) """ + + @property + def capabilities(self) -> global___Request.Capabilities: ... @property def start_operation(self) -> global___StartOperationRequest: ... @property @@ -341,14 +428,18 @@ class Request(google.protobuf.message.Message): *, header: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., scheduled_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + capabilities: global___Request.Capabilities | None = ..., start_operation: global___StartOperationRequest | None = ..., cancel_operation: global___CancelOperationRequest | None = ..., + endpoint: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel_operation", b"cancel_operation", + "capabilities", + b"capabilities", "scheduled_time", b"scheduled_time", "start_operation", @@ -359,9 +450,13 @@ class Request(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel_operation", b"cancel_operation", + "capabilities", + b"capabilities", + "endpoint", + b"endpoint", "header", b"header", "scheduled_time", @@ -373,16 +468,18 @@ class Request(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["start_operation", "cancel_operation"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["start_operation", "cancel_operation"] | None: ... global___Request = Request +@typing.final class StartOperationResponse(google.protobuf.message.Message): """Response variant for StartOperationRequest.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class Sync(google.protobuf.message.Message): """An operation completed successfully.""" @@ -405,15 +502,13 @@ class StartOperationResponse(google.protobuf.message.Message): links: collections.abc.Iterable[global___Link] | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["payload", b"payload"] + self, field_name: typing.Literal["payload", b"payload"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "links", b"links", "payload", b"payload" - ], + self, field_name: typing.Literal["links", b"links", "payload", b"payload"] ) -> None: ... + @typing.final class Async(google.protobuf.message.Message): """The operation will complete asynchronously. The returned ID can be used to reference this operation. @@ -426,13 +521,13 @@ class StartOperationResponse(google.protobuf.message.Message): OPERATION_TOKEN_FIELD_NUMBER: builtins.int operation_id: builtins.str """Deprecated. Renamed to operation_token.""" + operation_token: builtins.str @property def links( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ global___Link ]: ... - operation_token: builtins.str def __init__( self, *, @@ -442,7 +537,7 @@ class StartOperationResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "links", b"links", "operation_id", @@ -455,25 +550,38 @@ class StartOperationResponse(google.protobuf.message.Message): SYNC_SUCCESS_FIELD_NUMBER: builtins.int ASYNC_SUCCESS_FIELD_NUMBER: builtins.int OPERATION_ERROR_FIELD_NUMBER: builtins.int + FAILURE_FIELD_NUMBER: builtins.int @property def sync_success(self) -> global___StartOperationResponse.Sync: ... @property def async_success(self) -> global___StartOperationResponse.Async: ... @property def operation_error(self) -> global___UnsuccessfulOperationError: - """The operation completed unsuccessfully (failed or canceled).""" + """The operation completed unsuccessfully (failed or canceled). + Deprecated. Use the failure variant instead. + """ + + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The operation completed unsuccessfully (failed or canceled). + Failure object must contain an ApplicationFailureInfo or CanceledFailureInfo object. + """ + def __init__( self, *, sync_success: global___StartOperationResponse.Sync | None = ..., async_success: global___StartOperationResponse.Async | None = ..., operation_error: global___UnsuccessfulOperationError | None = ..., + failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_success", b"async_success", + "failure", + b"failure", "operation_error", b"operation_error", "sync_success", @@ -484,9 +592,11 @@ class StartOperationResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "async_success", b"async_success", + "failure", + b"failure", "operation_error", b"operation_error", "sync_success", @@ -496,14 +606,15 @@ class StartOperationResponse(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] + self, oneof_group: typing.Literal["variant", b"variant"] ) -> ( - typing_extensions.Literal["sync_success", "async_success", "operation_error"] + typing.Literal["sync_success", "async_success", "operation_error", "failure"] | None ): ... global___StartOperationResponse = StartOperationResponse +@typing.final class CancelOperationResponse(google.protobuf.message.Message): """Response variant for CancelOperationRequest.""" @@ -515,6 +626,7 @@ class CancelOperationResponse(google.protobuf.message.Message): global___CancelOperationResponse = CancelOperationResponse +@typing.final class Response(google.protobuf.message.Message): """A response indicating that the handler has successfully processed a request.""" @@ -534,7 +646,7 @@ class Response(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel_operation", b"cancel_operation", "start_operation", @@ -545,7 +657,7 @@ class Response(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel_operation", b"cancel_operation", "start_operation", @@ -555,11 +667,12 @@ class Response(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["start_operation", "cancel_operation"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["start_operation", "cancel_operation"] | None: ... global___Response = Response +@typing.final class Endpoint(google.protobuf.message.Message): """A cluster-global binding from an endpoint ID to a target for dispatching incoming Nexus requests.""" @@ -575,15 +688,22 @@ class Endpoint(google.protobuf.message.Message): """Data version for this endpoint, incremented for every update issued via the UpdateNexusEndpoint API.""" id: builtins.str """Unique server-generated endpoint ID.""" + url_prefix: builtins.str + """Server exposed URL prefix for invocation of operations on this endpoint. + This doesn't include the protocol, hostname or port as the server does not know how it should be accessed + publicly. The URL is stable in the face of endpoint renames. + """ @property def spec(self) -> global___EndpointSpec: """Spec for the endpoint.""" + @property def created_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the endpoint was created. (-- api-linter: core::0142::time-field-names=disabled aip.dev/not-precedent: Not following linter rules. --) """ + @property def last_modified_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The date and time when the endpoint was last modified. @@ -591,11 +711,7 @@ class Endpoint(google.protobuf.message.Message): (-- api-linter: core::0142::time-field-names=disabled aip.dev/not-precedent: Not following linter rules. --) """ - url_prefix: builtins.str - """Server exposed URL prefix for invocation of operations on this endpoint. - This doesn't include the protocol, hostname or port as the server does not know how it should be accessed - publicly. The URL is stable in the face of endpoint renames. - """ + def __init__( self, *, @@ -608,7 +724,7 @@ class Endpoint(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "last_modified_time", @@ -619,7 +735,7 @@ class Endpoint(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "created_time", b"created_time", "id", @@ -637,6 +753,7 @@ class Endpoint(google.protobuf.message.Message): global___Endpoint = Endpoint +@typing.final class EndpointSpec(google.protobuf.message.Message): """Contains mutable fields for an Endpoint.""" @@ -655,9 +772,11 @@ class EndpointSpec(google.protobuf.message.Message): If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint. By default, the server enforces a limit of 20,000 bytes for this entire payload. """ + @property def target(self) -> global___EndpointTarget: """Target to route requests to.""" + def __init__( self, *, @@ -667,24 +786,24 @@ class EndpointSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "description", b"description", "target", b"target" - ], + field_name: typing.Literal["description", b"description", "target", b"target"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "description", b"description", "name", b"name", "target", b"target" ], ) -> None: ... global___EndpointSpec = EndpointSpec +@typing.final class EndpointTarget(google.protobuf.message.Message): """Target to route requests to.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class Worker(google.protobuf.message.Message): """Target a worker polling on a Nexus task queue in a specific namespace.""" @@ -704,11 +823,12 @@ class EndpointTarget(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "task_queue", b"task_queue" ], ) -> None: ... + @typing.final class External(google.protobuf.message.Message): """Target an external server by URL. At a later point, this will support providing credentials, in the meantime, an http.RoundTripper can be injected @@ -725,9 +845,7 @@ class EndpointTarget(google.protobuf.message.Message): *, url: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["url", b"url"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["url", b"url"]) -> None: ... WORKER_FIELD_NUMBER: builtins.int EXTERNAL_FIELD_NUMBER: builtins.int @@ -743,18 +861,531 @@ class EndpointTarget(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "external", b"external", "variant", b"variant", "worker", b"worker" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "external", b"external", "variant", b"variant", "worker", b"worker" ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["worker", "external"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["worker", "external"] | None: ... global___EndpointTarget = EndpointTarget + +@typing.final +class NexusOperationExecutionCancellationInfo(google.protobuf.message.Message): + """NexusOperationExecutionCancellationInfo contains the state of a Nexus operation cancellation.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REQUESTED_TIME_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + ATTEMPT_FIELD_NUMBER: builtins.int + LAST_ATTEMPT_COMPLETE_TIME_FIELD_NUMBER: builtins.int + LAST_ATTEMPT_FAILURE_FIELD_NUMBER: builtins.int + NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int + BLOCKED_REASON_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + state: temporalio.api.enums.v1.common_pb2.NexusOperationCancellationState.ValueType + attempt: builtins.int + """The number of attempts made to deliver the cancel operation request. + This number represents a minimum bound since the attempt is incremented after the request completes. + """ + blocked_reason: builtins.str + """If the state is BLOCKED, blocked reason provides additional information.""" + reason: builtins.str + """A reason that may be specified in the CancelNexusOperationRequest.""" + @property + def requested_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when cancellation was requested.""" + + @property + def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the last attempt completed.""" + + @property + def last_attempt_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The last attempt's failure, if any.""" + + @property + def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the next attempt is scheduled.""" + + def __init__( + self, + *, + requested_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + state: temporalio.api.enums.v1.common_pb2.NexusOperationCancellationState.ValueType = ..., + attempt: builtins.int = ..., + last_attempt_complete_time: google.protobuf.timestamp_pb2.Timestamp + | None = ..., + last_attempt_failure: temporalio.api.failure.v1.message_pb2.Failure + | None = ..., + next_attempt_schedule_time: google.protobuf.timestamp_pb2.Timestamp + | None = ..., + blocked_reason: builtins.str = ..., + reason: builtins.str = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "last_attempt_complete_time", + b"last_attempt_complete_time", + "last_attempt_failure", + b"last_attempt_failure", + "next_attempt_schedule_time", + b"next_attempt_schedule_time", + "requested_time", + b"requested_time", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "attempt", + b"attempt", + "blocked_reason", + b"blocked_reason", + "last_attempt_complete_time", + b"last_attempt_complete_time", + "last_attempt_failure", + b"last_attempt_failure", + "next_attempt_schedule_time", + b"next_attempt_schedule_time", + "reason", + b"reason", + "requested_time", + b"requested_time", + "state", + b"state", + ], + ) -> None: ... + +global___NexusOperationExecutionCancellationInfo = ( + NexusOperationExecutionCancellationInfo +) + +@typing.final +class NexusOperationExecutionInfo(google.protobuf.message.Message): + """Full current state of a standalone Nexus operation, as of the time of the request.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class NexusHeaderEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.str + def __init__( + self, + *, + key: builtins.str = ..., + value: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + OPERATION_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + ENDPOINT_FIELD_NUMBER: builtins.int + SERVICE_FIELD_NUMBER: builtins.int + OPERATION_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + SCHEDULE_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int + SCHEDULE_TO_START_TIMEOUT_FIELD_NUMBER: builtins.int + START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int + ATTEMPT_FIELD_NUMBER: builtins.int + SCHEDULE_TIME_FIELD_NUMBER: builtins.int + EXPIRATION_TIME_FIELD_NUMBER: builtins.int + CLOSE_TIME_FIELD_NUMBER: builtins.int + LAST_ATTEMPT_COMPLETE_TIME_FIELD_NUMBER: builtins.int + LAST_ATTEMPT_FAILURE_FIELD_NUMBER: builtins.int + NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int + EXECUTION_DURATION_FIELD_NUMBER: builtins.int + CANCELLATION_INFO_FIELD_NUMBER: builtins.int + BLOCKED_REASON_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + OPERATION_TOKEN_FIELD_NUMBER: builtins.int + STATE_TRANSITION_COUNT_FIELD_NUMBER: builtins.int + SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int + NEXUS_HEADER_FIELD_NUMBER: builtins.int + USER_METADATA_FIELD_NUMBER: builtins.int + LINKS_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + STATE_SIZE_BYTES_FIELD_NUMBER: builtins.int + operation_id: builtins.str + """Unique identifier of this Nexus operation within its namespace along with run ID (below).""" + run_id: builtins.str + endpoint: builtins.str + """Endpoint name, resolved to a URL via the cluster's endpoint registry.""" + service: builtins.str + """Service name.""" + operation: builtins.str + """Operation name.""" + status: temporalio.api.enums.v1.nexus_pb2.NexusOperationExecutionStatus.ValueType + """A general status for this operation, indicates whether it is currently running or in one of the terminal statuses. + Updated once when the operation is originally scheduled, and again when it reaches a terminal status. + """ + state: temporalio.api.enums.v1.common_pb2.PendingNexusOperationState.ValueType + """More detailed breakdown of NEXUS_OPERATION_EXECUTION_STATUS_RUNNING.""" + attempt: builtins.int + """The number of attempts made to deliver the start operation request. + This number is approximate, it is incremented when a task is added to the history queue. + In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task + was never executed. + """ + blocked_reason: builtins.str + """If the state is BLOCKED, blocked reason provides additional information.""" + request_id: builtins.str + """Server-generated request ID used as an idempotency token when submitting start requests to + the handler. Distinct from the request_id in StartNexusOperationRequest, which is the + caller-side idempotency key for the StartNexusOperation RPC itself. + """ + operation_token: builtins.str + """Operation token. Only set for asynchronous operations after a successful StartOperation call.""" + state_transition_count: builtins.int + """Incremented each time the operation's state is mutated in persistence.""" + identity: builtins.str + """The identity of the client who started this operation.""" + state_size_bytes: builtins.int + """Updated once on scheduled and once on terminal status.""" + @property + def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Schedule-to-close timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Schedule-to-start timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Start-to-close timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Time the operation was originally scheduled via a StartNexusOperation request.""" + + @property + def expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Scheduled time + schedule to close timeout.""" + + @property + def close_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Time when the operation transitioned to a closed state.""" + + @property + def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the last attempt completed.""" + + @property + def last_attempt_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The last attempt's failure, if any.""" + + @property + def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the next attempt is scheduled.""" + + @property + def execution_duration(self) -> google.protobuf.duration_pb2.Duration: + """Elapsed time from schedule_time to now for running operations or to close_time for closed + operations, including all attempts and backoff between attempts. + """ + + @property + def cancellation_info(self) -> global___NexusOperationExecutionCancellationInfo: ... + @property + def search_attributes( + self, + ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ... + @property + def nexus_header( + self, + ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + """Header for context propagation and tracing purposes.""" + + @property + def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata: + """Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation.""" + + @property + def links( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Link + ]: + """Links attached by the handler of this operation on start or completion.""" + + def __init__( + self, + *, + operation_id: builtins.str = ..., + run_id: builtins.str = ..., + endpoint: builtins.str = ..., + service: builtins.str = ..., + operation: builtins.str = ..., + status: temporalio.api.enums.v1.nexus_pb2.NexusOperationExecutionStatus.ValueType = ..., + state: temporalio.api.enums.v1.common_pb2.PendingNexusOperationState.ValueType = ..., + schedule_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., + schedule_to_start_timeout: google.protobuf.duration_pb2.Duration | None = ..., + start_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., + attempt: builtins.int = ..., + schedule_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + expiration_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + close_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + last_attempt_complete_time: google.protobuf.timestamp_pb2.Timestamp + | None = ..., + last_attempt_failure: temporalio.api.failure.v1.message_pb2.Failure + | None = ..., + next_attempt_schedule_time: google.protobuf.timestamp_pb2.Timestamp + | None = ..., + execution_duration: google.protobuf.duration_pb2.Duration | None = ..., + cancellation_info: global___NexusOperationExecutionCancellationInfo + | None = ..., + blocked_reason: builtins.str = ..., + request_id: builtins.str = ..., + operation_token: builtins.str = ..., + state_transition_count: builtins.int = ..., + search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes + | None = ..., + nexus_header: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + user_metadata: temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata + | None = ..., + links: collections.abc.Iterable[temporalio.api.common.v1.message_pb2.Link] + | None = ..., + identity: builtins.str = ..., + state_size_bytes: builtins.int = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "cancellation_info", + b"cancellation_info", + "close_time", + b"close_time", + "execution_duration", + b"execution_duration", + "expiration_time", + b"expiration_time", + "last_attempt_complete_time", + b"last_attempt_complete_time", + "last_attempt_failure", + b"last_attempt_failure", + "next_attempt_schedule_time", + b"next_attempt_schedule_time", + "schedule_time", + b"schedule_time", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "search_attributes", + b"search_attributes", + "start_to_close_timeout", + b"start_to_close_timeout", + "user_metadata", + b"user_metadata", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "attempt", + b"attempt", + "blocked_reason", + b"blocked_reason", + "cancellation_info", + b"cancellation_info", + "close_time", + b"close_time", + "endpoint", + b"endpoint", + "execution_duration", + b"execution_duration", + "expiration_time", + b"expiration_time", + "identity", + b"identity", + "last_attempt_complete_time", + b"last_attempt_complete_time", + "last_attempt_failure", + b"last_attempt_failure", + "links", + b"links", + "next_attempt_schedule_time", + b"next_attempt_schedule_time", + "nexus_header", + b"nexus_header", + "operation", + b"operation", + "operation_id", + b"operation_id", + "operation_token", + b"operation_token", + "request_id", + b"request_id", + "run_id", + b"run_id", + "schedule_time", + b"schedule_time", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "search_attributes", + b"search_attributes", + "service", + b"service", + "start_to_close_timeout", + b"start_to_close_timeout", + "state", + b"state", + "state_size_bytes", + b"state_size_bytes", + "state_transition_count", + b"state_transition_count", + "status", + b"status", + "user_metadata", + b"user_metadata", + ], + ) -> None: ... + +global___NexusOperationExecutionInfo = NexusOperationExecutionInfo + +@typing.final +class NexusOperationExecutionListInfo(google.protobuf.message.Message): + """Limited Nexus operation information returned in the list response. + When adding fields here, ensure that it is also present in NexusOperationExecutionInfo (note that it may already be present in + NexusOperationExecutionInfo but not at the top-level). + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + OPERATION_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + ENDPOINT_FIELD_NUMBER: builtins.int + SERVICE_FIELD_NUMBER: builtins.int + OPERATION_FIELD_NUMBER: builtins.int + SCHEDULE_TIME_FIELD_NUMBER: builtins.int + CLOSE_TIME_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: builtins.int + SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int + STATE_TRANSITION_COUNT_FIELD_NUMBER: builtins.int + EXECUTION_DURATION_FIELD_NUMBER: builtins.int + STATE_SIZE_BYTES_FIELD_NUMBER: builtins.int + operation_id: builtins.str + """A unique identifier of this operation within its namespace along with run ID (below).""" + run_id: builtins.str + """The run ID of the standalone Nexus operation.""" + endpoint: builtins.str + """Endpoint name.""" + service: builtins.str + """Service name.""" + operation: builtins.str + """Operation name.""" + status: temporalio.api.enums.v1.nexus_pb2.NexusOperationExecutionStatus.ValueType + """The status is updated once, when the operation is originally scheduled, and again when the operation reaches a terminal status.""" + state_transition_count: builtins.int + """Updated on terminal status.""" + state_size_bytes: builtins.int + """Updated once on scheduled and once on terminal status.""" + @property + def schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Time the operation was originally scheduled via a StartNexusOperation request.""" + + @property + def close_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """If the operation is in a terminal status, this field represents the time the operation transitioned to that status.""" + + @property + def search_attributes( + self, + ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: + """Search attributes from the start request.""" + + @property + def execution_duration(self) -> google.protobuf.duration_pb2.Duration: + """The difference between close time and scheduled time. + This field is only populated if the operation is closed. + """ + + def __init__( + self, + *, + operation_id: builtins.str = ..., + run_id: builtins.str = ..., + endpoint: builtins.str = ..., + service: builtins.str = ..., + operation: builtins.str = ..., + schedule_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + close_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + status: temporalio.api.enums.v1.nexus_pb2.NexusOperationExecutionStatus.ValueType = ..., + search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes + | None = ..., + state_transition_count: builtins.int = ..., + execution_duration: google.protobuf.duration_pb2.Duration | None = ..., + state_size_bytes: builtins.int = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "close_time", + b"close_time", + "execution_duration", + b"execution_duration", + "schedule_time", + b"schedule_time", + "search_attributes", + b"search_attributes", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "close_time", + b"close_time", + "endpoint", + b"endpoint", + "execution_duration", + b"execution_duration", + "operation", + b"operation", + "operation_id", + b"operation_id", + "run_id", + b"run_id", + "schedule_time", + b"schedule_time", + "search_attributes", + b"search_attributes", + "service", + b"service", + "state_size_bytes", + b"state_size_bytes", + "state_transition_count", + b"state_transition_count", + "status", + b"status", + ], + ) -> None: ... + +global___NexusOperationExecutionListInfo = NexusOperationExecutionListInfo diff --git a/temporalio/api/nexusoperation/__init__.py b/temporalio/api/nexusoperation/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/nexusoperation/v1/__init__.py b/temporalio/api/nexusoperation/v1/__init__.py new file mode 100644 index 0000000000..6357003057 --- /dev/null +++ b/temporalio/api/nexusoperation/v1/__init__.py @@ -0,0 +1,6 @@ +from .message_pb2 import CallbackInfo, OnConflictOptions + +__all__ = [ + "CallbackInfo", + "OnConflictOptions", +] diff --git a/temporalio/api/nexusoperation/v1/message_pb2.py b/temporalio/api/nexusoperation/v1/message_pb2.py new file mode 100644 index 0000000000..a9d16256db --- /dev/null +++ b/temporalio/api/nexusoperation/v1/message_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/nexusoperation/v1/message.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from temporalio.api.callback.v1 import ( + message_pb2 as temporal_dot_api_dot_callback_dot_v1_dot_message__pb2, +) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n,temporal/api/nexusoperation/v1/message.proto\x12\x1etemporal.api.nexusoperation.v1\x1a&temporal/api/callback/v1/message.proto"\x97\x02\n\x0c\x43\x61llbackInfo\x12\x45\n\x07trigger\x18\x01 \x01(\x0b\x32\x34.temporal.api.nexusoperation.v1.CallbackInfo.Trigger\x12\x34\n\x04info\x18\x02 \x01(\x0b\x32&.temporal.api.callback.v1.CallbackInfo\x1a\x14\n\x12OperationCompleted\x1at\n\x07Trigger\x12^\n\x13operation_completed\x18\x01 \x01(\x0b\x32?.temporal.api.nexusoperation.v1.CallbackInfo.OperationCompletedH\x00\x42\t\n\x07variant"i\n\x11OnConflictOptions\x12\x19\n\x11\x61ttach_request_id\x18\x01 \x01(\x08\x12#\n\x1b\x61ttach_completion_callbacks\x18\x02 \x01(\x08\x12\x14\n\x0c\x61ttach_links\x18\x03 \x01(\x08\x42\xb1\x01\n!io.temporal.api.nexusoperation.v1B\x0cMessageProtoP\x01Z3go.temporal.io/api/nexusoperation/v1;nexusoperation\xaa\x02 Temporalio.Api.NexusOperation.V1\xea\x02#Temporalio::Api::NexusOperation::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n!io.temporal.api.nexusoperation.v1B\014MessageProtoP\001Z3go.temporal.io/api/nexusoperation/v1;nexusoperation\252\002 Temporalio.Api.NexusOperation.V1\352\002#Temporalio::Api::NexusOperation::V1" + _CALLBACKINFO._serialized_start = 121 + _CALLBACKINFO._serialized_end = 400 + _CALLBACKINFO_OPERATIONCOMPLETED._serialized_start = 262 + _CALLBACKINFO_OPERATIONCOMPLETED._serialized_end = 282 + _CALLBACKINFO_TRIGGER._serialized_start = 284 + _CALLBACKINFO_TRIGGER._serialized_end = 400 + _ONCONFLICTOPTIONS._serialized_start = 402 + _ONCONFLICTOPTIONS._serialized_end = 507 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/nexusoperation/v1/message_pb2.pyi b/temporalio/api/nexusoperation/v1/message_pb2.pyi new file mode 100644 index 0000000000..0b01f0225f --- /dev/null +++ b/temporalio/api/nexusoperation/v1/message_pb2.pyi @@ -0,0 +1,124 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import typing + +import google.protobuf.descriptor +import google.protobuf.message + +import temporalio.api.callback.v1.message_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class CallbackInfo(google.protobuf.message.Message): + """CallbackInfo contains the state of a callback attached to a standalone Nexus operation.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class OperationCompleted(google.protobuf.message.Message): + """Trigger for when the Nexus operation is completed, covering both success cases as + well as any type of failure. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + + @typing.final + class Trigger(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + OPERATION_COMPLETED_FIELD_NUMBER: builtins.int + @property + def operation_completed(self) -> global___CallbackInfo.OperationCompleted: ... + def __init__( + self, + *, + operation_completed: global___CallbackInfo.OperationCompleted | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "operation_completed", b"operation_completed", "variant", b"variant" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "operation_completed", b"operation_completed", "variant", b"variant" + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["operation_completed"] | None: ... + + TRIGGER_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def trigger(self) -> global___CallbackInfo.Trigger: + """Trigger for this callback.""" + + @property + def info(self) -> temporalio.api.callback.v1.message_pb2.CallbackInfo: + """Common callback info.""" + + def __init__( + self, + *, + trigger: global___CallbackInfo.Trigger | None = ..., + info: temporalio.api.callback.v1.message_pb2.CallbackInfo | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["info", b"info", "trigger", b"trigger"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["info", b"info", "trigger", b"trigger"] + ) -> None: ... + +global___CallbackInfo = CallbackInfo + +@typing.final +class OnConflictOptions(google.protobuf.message.Message): + """When StartNexusOperationExecutionRequest uses the conflict policy NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING + and there is already an existing, running standalone Nexus operation, OnConflictOptions defines actions to be + taken. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ATTACH_REQUEST_ID_FIELD_NUMBER: builtins.int + ATTACH_COMPLETION_CALLBACKS_FIELD_NUMBER: builtins.int + ATTACH_LINKS_FIELD_NUMBER: builtins.int + attach_request_id: builtins.bool + """Attaches the request ID to the running operation.""" + attach_completion_callbacks: builtins.bool + """Attaches the completion callbacks to the running operation.""" + attach_links: builtins.bool + """Attaches any new links to the running operation.""" + def __init__( + self, + *, + attach_request_id: builtins.bool = ..., + attach_completion_callbacks: builtins.bool = ..., + attach_links: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "attach_completion_callbacks", + b"attach_completion_callbacks", + "attach_links", + b"attach_links", + "attach_request_id", + b"attach_request_id", + ], + ) -> None: ... + +global___OnConflictOptions = OnConflictOptions diff --git a/temporalio/api/nexusservices/__init__.py b/temporalio/api/nexusservices/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/nexusservices/workerservice/__init__.py b/temporalio/api/nexusservices/workerservice/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/nexusservices/workerservice/v1/__init__.py b/temporalio/api/nexusservices/workerservice/v1/__init__.py new file mode 100644 index 0000000000..0b9e4a6cab --- /dev/null +++ b/temporalio/api/nexusservices/workerservice/v1/__init__.py @@ -0,0 +1,6 @@ +from .request_response_pb2 import ExecuteCommandsRequest, ExecuteCommandsResponse + +__all__ = [ + "ExecuteCommandsRequest", + "ExecuteCommandsResponse", +] diff --git a/temporalio/api/nexusservices/workerservice/v1/request_response_pb2.py b/temporalio/api/nexusservices/workerservice/v1/request_response_pb2.py new file mode 100644 index 0000000000..4e3857d746 --- /dev/null +++ b/temporalio/api/nexusservices/workerservice/v1/request_response_pb2.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/nexusservices/workerservice/v1/request_response.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from temporalio.api.worker.v1 import ( + message_pb2 as temporal_dot_api_dot_worker_dot_v1_dot_message__pb2, +) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\nBtemporal/api/nexusservices/workerservice/v1/request_response.proto\x12+temporal.api.nexusservices.workerservice.v1\x1a$temporal/api/worker/v1/message.proto"Q\n\x16\x45xecuteCommandsRequest\x12\x37\n\x08\x63ommands\x18\x01 \x03(\x0b\x32%.temporal.api.worker.v1.WorkerCommand"W\n\x17\x45xecuteCommandsResponse\x12<\n\x07results\x18\x01 \x03(\x0b\x32+.temporal.api.worker.v1.WorkerCommandResultB\xed\x01\n.io.temporal.api.nexusservices.workerservice.v1B\x14RequestResponseProtoP\x01Z?go.temporal.io/api/nexusservices/workerservice/v1;workerservice\xaa\x02-Temporalio.Api.Nexusservices.Workerservice.V1\xea\x02\x31Temporalio::Api::Nexusservices::Workerservice::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n.io.temporal.api.nexusservices.workerservice.v1B\024RequestResponseProtoP\001Z?go.temporal.io/api/nexusservices/workerservice/v1;workerservice\252\002-Temporalio.Api.Nexusservices.Workerservice.V1\352\0021Temporalio::Api::Nexusservices::Workerservice::V1" + _EXECUTECOMMANDSREQUEST._serialized_start = 153 + _EXECUTECOMMANDSREQUEST._serialized_end = 234 + _EXECUTECOMMANDSRESPONSE._serialized_start = 236 + _EXECUTECOMMANDSRESPONSE._serialized_end = 323 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/nexusservices/workerservice/v1/request_response_pb2.pyi b/temporalio/api/nexusservices/workerservice/v1/request_response_pb2.pyi new file mode 100644 index 0000000000..af263e4869 --- /dev/null +++ b/temporalio/api/nexusservices/workerservice/v1/request_response_pb2.pyi @@ -0,0 +1,75 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import typing + +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.message + +import temporalio.api.worker.v1.message_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class ExecuteCommandsRequest(google.protobuf.message.Message): + """(-- + Internal Nexus service for server-to-worker communication. + --) + + Request payload for the "ExecuteCommands" Nexus operation. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + COMMANDS_FIELD_NUMBER: builtins.int + @property + def commands( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.worker.v1.message_pb2.WorkerCommand + ]: ... + def __init__( + self, + *, + commands: collections.abc.Iterable[ + temporalio.api.worker.v1.message_pb2.WorkerCommand + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["commands", b"commands"] + ) -> None: ... + +global___ExecuteCommandsRequest = ExecuteCommandsRequest + +@typing.final +class ExecuteCommandsResponse(google.protobuf.message.Message): + """Response payload for the "ExecuteCommands" Nexus operation. + The results list must be 1:1 with the commands list in the request (same size and order). + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RESULTS_FIELD_NUMBER: builtins.int + @property + def results( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.worker.v1.message_pb2.WorkerCommandResult + ]: ... + def __init__( + self, + *, + results: collections.abc.Iterable[ + temporalio.api.worker.v1.message_pb2.WorkerCommandResult + ] + | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["results", b"results"]) -> None: ... + +global___ExecuteCommandsResponse = ExecuteCommandsResponse diff --git a/temporalio/api/nexusservices/workerservice/v1/request_response_pb2_grpc.py b/temporalio/api/nexusservices/workerservice/v1/request_response_pb2_grpc.py new file mode 100644 index 0000000000..bf947056a2 --- /dev/null +++ b/temporalio/api/nexusservices/workerservice/v1/request_response_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" + +import grpc diff --git a/temporalio/api/nexusservices/workerservice/v1/request_response_pb2_grpc.pyi b/temporalio/api/nexusservices/workerservice/v1/request_response_pb2_grpc.pyi new file mode 100644 index 0000000000..de236ac811 --- /dev/null +++ b/temporalio/api/nexusservices/workerservice/v1/request_response_pb2_grpc.pyi @@ -0,0 +1,21 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import abc +import collections.abc +import typing + +import grpc +import grpc.aio + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator( + collections.abc.AsyncIterator[_T], + collections.abc.Iterator[_T], + metaclass=abc.ABCMeta, +): ... +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... diff --git a/temporalio/api/notificationservice/__init__.py b/temporalio/api/notificationservice/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/notificationservice/v1/__init__.py b/temporalio/api/notificationservice/v1/__init__.py new file mode 100644 index 0000000000..7b51b0a83a --- /dev/null +++ b/temporalio/api/notificationservice/v1/__init__.py @@ -0,0 +1,6 @@ +from .request_response_pb2 import OnCompleteRequest, OnCompleteResponse + +__all__ = [ + "OnCompleteRequest", + "OnCompleteResponse", +] diff --git a/temporalio/api/notificationservice/v1/request_response_pb2.py b/temporalio/api/notificationservice/v1/request_response_pb2.py new file mode 100644 index 0000000000..72a912dfef --- /dev/null +++ b/temporalio/api/notificationservice/v1/request_response_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/notificationservice/v1/request_response.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from temporalio.api.common.v1 import ( + message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, +) +from temporalio.api.failure.v1 import ( + message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, +) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n:temporal/api/notificationservice/v1/request_response.proto\x12#temporal.api.notificationservice.v1\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto"\xbf\x01\n\x11OnCompleteRequest\x12\x32\n\x07success\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadH\x00\x12\x33\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x37\n\x0esource_context\x18\x03 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadB\x08\n\x06result"\x14\n\x12OnCompleteResponseB\xd2\x01\n&io.temporal.api.notificationservice.v1B\x14RequestResponseProtoP\x01Z=go.temporal.io/api/notificationservice/v1;notificationservice\xaa\x02%Temporalio.Api.NotificationService.V1\xea\x02(Temporalio::Api::NotificationService::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n&io.temporal.api.notificationservice.v1B\024RequestResponseProtoP\001Z=go.temporal.io/api/notificationservice/v1;notificationservice\252\002%Temporalio.Api.NotificationService.V1\352\002(Temporalio::Api::NotificationService::V1" + _ONCOMPLETEREQUEST._serialized_start = 177 + _ONCOMPLETEREQUEST._serialized_end = 368 + _ONCOMPLETERESPONSE._serialized_start = 370 + _ONCOMPLETERESPONSE._serialized_end = 390 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/notificationservice/v1/request_response_pb2.pyi b/temporalio/api/notificationservice/v1/request_response_pb2.pyi new file mode 100644 index 0000000000..331d887b36 --- /dev/null +++ b/temporalio/api/notificationservice/v1/request_response_pb2.pyi @@ -0,0 +1,94 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import typing + +import google.protobuf.descriptor +import google.protobuf.message + +import temporalio.api.common.v1.message_pb2 +import temporalio.api.failure.v1.message_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class OnCompleteRequest(google.protobuf.message.Message): + """OnCompleteRequest is the request type to the NotificationService's OnComplete operation, + allowing for defining completion handlers for arbitrary operations. + + Information about the source operation will be available in the form of a commonpb.Link, + which will be available separately from this OnCompleteRequest. e.g. a link to the source + standalone Nexus operation would be found in the nexuspb.StartOperationRequest parameter + sent to the worker callback. (In addition to this OnCompleteRequest.) + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SUCCESS_FIELD_NUMBER: builtins.int + FAILURE_FIELD_NUMBER: builtins.int + SOURCE_CONTEXT_FIELD_NUMBER: builtins.int + @property + def success(self) -> temporalio.api.common.v1.message_pb2.Payload: + """The operation was successful, and resulted in the given payload.""" + + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The operation failed. Includes timeout, cancellation, and application errors.""" + + @property + def source_context(self) -> temporalio.api.common.v1.message_pb2.Payload: + """User-supplied data which was added to the source invocation. (As applicable.)""" + + def __init__( + self, + *, + success: temporalio.api.common.v1.message_pb2.Payload | None = ..., + failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., + source_context: temporalio.api.common.v1.message_pb2.Payload | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "failure", + b"failure", + "result", + b"result", + "source_context", + b"source_context", + "success", + b"success", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "failure", + b"failure", + "result", + b"result", + "source_context", + b"source_context", + "success", + b"success", + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["result", b"result"] + ) -> typing.Literal["success", "failure"] | None: ... + +global___OnCompleteRequest = OnCompleteRequest + +@typing.final +class OnCompleteResponse(google.protobuf.message.Message): + """OnCompleteResponse is the return type of the OnComplete operation.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___OnCompleteResponse = OnCompleteResponse diff --git a/temporalio/api/notificationservice/v1/request_response_pb2_grpc.py b/temporalio/api/notificationservice/v1/request_response_pb2_grpc.py new file mode 100644 index 0000000000..bf947056a2 --- /dev/null +++ b/temporalio/api/notificationservice/v1/request_response_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" + +import grpc diff --git a/temporalio/api/notificationservice/v1/request_response_pb2_grpc.pyi b/temporalio/api/notificationservice/v1/request_response_pb2_grpc.pyi new file mode 100644 index 0000000000..de236ac811 --- /dev/null +++ b/temporalio/api/notificationservice/v1/request_response_pb2_grpc.pyi @@ -0,0 +1,21 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import abc +import collections.abc +import typing + +import grpc +import grpc.aio + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator( + collections.abc.AsyncIterator[_T], + collections.abc.Iterator[_T], + metaclass=abc.ABCMeta, +): ... +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... diff --git a/temporalio/api/operatorservice/v1/__init__.py b/temporalio/api/operatorservice/v1/__init__.py index f6cd76fbfe..1db8cbae30 100644 --- a/temporalio/api/operatorservice/v1/__init__.py +++ b/temporalio/api/operatorservice/v1/__init__.py @@ -59,6 +59,7 @@ import grpc from .service_pb2_grpc import ( + OperatorService, # type: ignore OperatorServiceServicer, OperatorServiceStub, add_OperatorServiceServicer_to_server, @@ -66,6 +67,7 @@ __all__.extend( [ + "OperatorService", "OperatorServiceServicer", "OperatorServiceStub", "add_OperatorServiceServicer_to_server", diff --git a/temporalio/api/operatorservice/v1/request_response_pb2.py b/temporalio/api/operatorservice/v1/request_response_pb2.py index 59afd09528..8d0929f520 100644 --- a/temporalio/api/operatorservice/v1/request_response_pb2.py +++ b/temporalio/api/operatorservice/v1/request_response_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -24,398 +23,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n6temporal/api/operatorservice/v1/request_response.proto\x12\x1ftemporal.api.operatorservice.v1\x1a"temporal/api/enums/v1/common.proto\x1a#temporal/api/nexus/v1/message.proto\x1a\x1egoogle/protobuf/duration.proto"\xff\x01\n\x1a\x41\x64\x64SearchAttributesRequest\x12l\n\x11search_attributes\x18\x01 \x03(\x0b\x32Q.temporal.api.operatorservice.v1.AddSearchAttributesRequest.SearchAttributesEntry\x12\x11\n\tnamespace\x18\x02 \x01(\t\x1a`\n\x15SearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01"\x1d\n\x1b\x41\x64\x64SearchAttributesResponse"M\n\x1dRemoveSearchAttributesRequest\x12\x19\n\x11search_attributes\x18\x01 \x03(\t\x12\x11\n\tnamespace\x18\x02 \x01(\t" \n\x1eRemoveSearchAttributesResponse"0\n\x1bListSearchAttributesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t"\xe2\x04\n\x1cListSearchAttributesResponse\x12n\n\x11\x63ustom_attributes\x18\x01 \x03(\x0b\x32S.temporal.api.operatorservice.v1.ListSearchAttributesResponse.CustomAttributesEntry\x12n\n\x11system_attributes\x18\x02 \x03(\x0b\x32S.temporal.api.operatorservice.v1.ListSearchAttributesResponse.SystemAttributesEntry\x12h\n\x0estorage_schema\x18\x03 \x03(\x0b\x32P.temporal.api.operatorservice.v1.ListSearchAttributesResponse.StorageSchemaEntry\x1a`\n\x15\x43ustomAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01\x1a`\n\x15SystemAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01\x1a\x34\n\x12StorageSchemaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"|\n\x16\x44\x65leteNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x02 \x01(\t\x12\x39\n\x16namespace_delete_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration"4\n\x17\x44\x65leteNamespaceResponse\x12\x19\n\x11\x64\x65leted_namespace\x18\x01 \x01(\t"\x84\x01\n\x1f\x41\x64\x64OrUpdateRemoteClusterRequest\x12\x18\n\x10\x66rontend_address\x18\x01 \x01(\t\x12(\n enable_remote_cluster_connection\x18\x02 \x01(\x08\x12\x1d\n\x15\x66rontend_http_address\x18\x03 \x01(\t""\n AddOrUpdateRemoteClusterResponse"2\n\x1aRemoveRemoteClusterRequest\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t"\x1d\n\x1bRemoveRemoteClusterResponse"A\n\x13ListClustersRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"s\n\x14ListClustersResponse\x12\x42\n\x08\x63lusters\x18\x01 \x03(\x0b\x32\x30.temporal.api.operatorservice.v1.ClusterMetadata\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\x0c"\xc0\x01\n\x0f\x43lusterMetadata\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t\x12\x12\n\ncluster_id\x18\x02 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x03 \x01(\t\x12\x14\n\x0chttp_address\x18\x07 \x01(\t\x12 \n\x18initial_failover_version\x18\x04 \x01(\x03\x12\x1b\n\x13history_shard_count\x18\x05 \x01(\x05\x12\x1d\n\x15is_connection_enabled\x18\x06 \x01(\x08"%\n\x17GetNexusEndpointRequest\x12\n\n\x02id\x18\x01 \x01(\t"M\n\x18GetNexusEndpointResponse\x12\x31\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.Endpoint"O\n\x1a\x43reateNexusEndpointRequest\x12\x31\n\x04spec\x18\x01 \x01(\x0b\x32#.temporal.api.nexus.v1.EndpointSpec"P\n\x1b\x43reateNexusEndpointResponse\x12\x31\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.Endpoint"l\n\x1aUpdateNexusEndpointRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12\x31\n\x04spec\x18\x03 \x01(\x0b\x32#.temporal.api.nexus.v1.EndpointSpec"P\n\x1bUpdateNexusEndpointResponse\x12\x31\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.Endpoint"9\n\x1a\x44\x65leteNexusEndpointRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x03"\x1d\n\x1b\x44\x65leteNexusEndpointResponse"U\n\x19ListNexusEndpointsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\x12\x0c\n\x04name\x18\x03 \x01(\t"i\n\x1aListNexusEndpointsResponse\x12\x17\n\x0fnext_page_token\x18\x01 \x01(\x0c\x12\x32\n\tendpoints\x18\x02 \x03(\x0b\x32\x1f.temporal.api.nexus.v1.EndpointB\xbe\x01\n"io.temporal.api.operatorservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/operatorservice/v1;operatorservice\xaa\x02!Temporalio.Api.OperatorService.V1\xea\x02$Temporalio::Api::OperatorService::V1b\x06proto3' + b'\n6temporal/api/operatorservice/v1/request_response.proto\x12\x1ftemporal.api.operatorservice.v1\x1a"temporal/api/enums/v1/common.proto\x1a#temporal/api/nexus/v1/message.proto\x1a\x1egoogle/protobuf/duration.proto"\xff\x01\n\x1a\x41\x64\x64SearchAttributesRequest\x12l\n\x11search_attributes\x18\x01 \x03(\x0b\x32Q.temporal.api.operatorservice.v1.AddSearchAttributesRequest.SearchAttributesEntry\x12\x11\n\tnamespace\x18\x02 \x01(\t\x1a`\n\x15SearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01"\x1d\n\x1b\x41\x64\x64SearchAttributesResponse"M\n\x1dRemoveSearchAttributesRequest\x12\x19\n\x11search_attributes\x18\x01 \x03(\t\x12\x11\n\tnamespace\x18\x02 \x01(\t" \n\x1eRemoveSearchAttributesResponse"0\n\x1bListSearchAttributesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t"\xe2\x04\n\x1cListSearchAttributesResponse\x12n\n\x11\x63ustom_attributes\x18\x01 \x03(\x0b\x32S.temporal.api.operatorservice.v1.ListSearchAttributesResponse.CustomAttributesEntry\x12n\n\x11system_attributes\x18\x02 \x03(\x0b\x32S.temporal.api.operatorservice.v1.ListSearchAttributesResponse.SystemAttributesEntry\x12h\n\x0estorage_schema\x18\x03 \x03(\x0b\x32P.temporal.api.operatorservice.v1.ListSearchAttributesResponse.StorageSchemaEntry\x1a`\n\x15\x43ustomAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01\x1a`\n\x15SystemAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01\x1a\x34\n\x12StorageSchemaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"|\n\x16\x44\x65leteNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0cnamespace_id\x18\x02 \x01(\t\x12\x39\n\x16namespace_delete_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration"4\n\x17\x44\x65leteNamespaceResponse\x12\x19\n\x11\x64\x65leted_namespace\x18\x01 \x01(\t"\xa0\x01\n\x1f\x41\x64\x64OrUpdateRemoteClusterRequest\x12\x18\n\x10\x66rontend_address\x18\x01 \x01(\t\x12(\n enable_remote_cluster_connection\x18\x02 \x01(\x08\x12\x1d\n\x15\x66rontend_http_address\x18\x03 \x01(\t\x12\x1a\n\x12\x65nable_replication\x18\x04 \x01(\x08""\n AddOrUpdateRemoteClusterResponse"2\n\x1aRemoveRemoteClusterRequest\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t"\x1d\n\x1bRemoveRemoteClusterResponse"A\n\x13ListClustersRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"s\n\x14ListClustersResponse\x12\x42\n\x08\x63lusters\x18\x01 \x03(\x0b\x32\x30.temporal.api.operatorservice.v1.ClusterMetadata\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\x0c"\xe0\x01\n\x0f\x43lusterMetadata\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t\x12\x12\n\ncluster_id\x18\x02 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x03 \x01(\t\x12\x14\n\x0chttp_address\x18\x07 \x01(\t\x12 \n\x18initial_failover_version\x18\x04 \x01(\x03\x12\x1b\n\x13history_shard_count\x18\x05 \x01(\x05\x12\x1d\n\x15is_connection_enabled\x18\x06 \x01(\x08\x12\x1e\n\x16is_replication_enabled\x18\x08 \x01(\x08"%\n\x17GetNexusEndpointRequest\x12\n\n\x02id\x18\x01 \x01(\t"M\n\x18GetNexusEndpointResponse\x12\x31\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.Endpoint"O\n\x1a\x43reateNexusEndpointRequest\x12\x31\n\x04spec\x18\x01 \x01(\x0b\x32#.temporal.api.nexus.v1.EndpointSpec"P\n\x1b\x43reateNexusEndpointResponse\x12\x31\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.Endpoint"l\n\x1aUpdateNexusEndpointRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12\x31\n\x04spec\x18\x03 \x01(\x0b\x32#.temporal.api.nexus.v1.EndpointSpec"P\n\x1bUpdateNexusEndpointResponse\x12\x31\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.Endpoint"9\n\x1a\x44\x65leteNexusEndpointRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x03"\x1d\n\x1b\x44\x65leteNexusEndpointResponse"U\n\x19ListNexusEndpointsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\x12\x0c\n\x04name\x18\x03 \x01(\t"i\n\x1aListNexusEndpointsResponse\x12\x17\n\x0fnext_page_token\x18\x01 \x01(\x0c\x12\x32\n\tendpoints\x18\x02 \x03(\x0b\x32\x1f.temporal.api.nexus.v1.EndpointB\xbe\x01\n"io.temporal.api.operatorservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/operatorservice/v1;operatorservice\xaa\x02!Temporalio.Api.OperatorService.V1\xea\x02$Temporalio::Api::OperatorService::V1b\x06proto3' ) - -_ADDSEARCHATTRIBUTESREQUEST = DESCRIPTOR.message_types_by_name[ - "AddSearchAttributesRequest" -] -_ADDSEARCHATTRIBUTESREQUEST_SEARCHATTRIBUTESENTRY = ( - _ADDSEARCHATTRIBUTESREQUEST.nested_types_by_name["SearchAttributesEntry"] -) -_ADDSEARCHATTRIBUTESRESPONSE = DESCRIPTOR.message_types_by_name[ - "AddSearchAttributesResponse" -] -_REMOVESEARCHATTRIBUTESREQUEST = DESCRIPTOR.message_types_by_name[ - "RemoveSearchAttributesRequest" -] -_REMOVESEARCHATTRIBUTESRESPONSE = DESCRIPTOR.message_types_by_name[ - "RemoveSearchAttributesResponse" -] -_LISTSEARCHATTRIBUTESREQUEST = DESCRIPTOR.message_types_by_name[ - "ListSearchAttributesRequest" -] -_LISTSEARCHATTRIBUTESRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListSearchAttributesResponse" -] -_LISTSEARCHATTRIBUTESRESPONSE_CUSTOMATTRIBUTESENTRY = ( - _LISTSEARCHATTRIBUTESRESPONSE.nested_types_by_name["CustomAttributesEntry"] -) -_LISTSEARCHATTRIBUTESRESPONSE_SYSTEMATTRIBUTESENTRY = ( - _LISTSEARCHATTRIBUTESRESPONSE.nested_types_by_name["SystemAttributesEntry"] -) -_LISTSEARCHATTRIBUTESRESPONSE_STORAGESCHEMAENTRY = ( - _LISTSEARCHATTRIBUTESRESPONSE.nested_types_by_name["StorageSchemaEntry"] -) -_DELETENAMESPACEREQUEST = DESCRIPTOR.message_types_by_name["DeleteNamespaceRequest"] -_DELETENAMESPACERESPONSE = DESCRIPTOR.message_types_by_name["DeleteNamespaceResponse"] -_ADDORUPDATEREMOTECLUSTERREQUEST = DESCRIPTOR.message_types_by_name[ - "AddOrUpdateRemoteClusterRequest" -] -_ADDORUPDATEREMOTECLUSTERRESPONSE = DESCRIPTOR.message_types_by_name[ - "AddOrUpdateRemoteClusterResponse" -] -_REMOVEREMOTECLUSTERREQUEST = DESCRIPTOR.message_types_by_name[ - "RemoveRemoteClusterRequest" -] -_REMOVEREMOTECLUSTERRESPONSE = DESCRIPTOR.message_types_by_name[ - "RemoveRemoteClusterResponse" -] -_LISTCLUSTERSREQUEST = DESCRIPTOR.message_types_by_name["ListClustersRequest"] -_LISTCLUSTERSRESPONSE = DESCRIPTOR.message_types_by_name["ListClustersResponse"] -_CLUSTERMETADATA = DESCRIPTOR.message_types_by_name["ClusterMetadata"] -_GETNEXUSENDPOINTREQUEST = DESCRIPTOR.message_types_by_name["GetNexusEndpointRequest"] -_GETNEXUSENDPOINTRESPONSE = DESCRIPTOR.message_types_by_name["GetNexusEndpointResponse"] -_CREATENEXUSENDPOINTREQUEST = DESCRIPTOR.message_types_by_name[ - "CreateNexusEndpointRequest" -] -_CREATENEXUSENDPOINTRESPONSE = DESCRIPTOR.message_types_by_name[ - "CreateNexusEndpointResponse" -] -_UPDATENEXUSENDPOINTREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateNexusEndpointRequest" -] -_UPDATENEXUSENDPOINTRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateNexusEndpointResponse" -] -_DELETENEXUSENDPOINTREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteNexusEndpointRequest" -] -_DELETENEXUSENDPOINTRESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteNexusEndpointResponse" -] -_LISTNEXUSENDPOINTSREQUEST = DESCRIPTOR.message_types_by_name[ - "ListNexusEndpointsRequest" -] -_LISTNEXUSENDPOINTSRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListNexusEndpointsResponse" -] -AddSearchAttributesRequest = _reflection.GeneratedProtocolMessageType( - "AddSearchAttributesRequest", - (_message.Message,), - { - "SearchAttributesEntry": _reflection.GeneratedProtocolMessageType( - "SearchAttributesEntry", - (_message.Message,), - { - "DESCRIPTOR": _ADDSEARCHATTRIBUTESREQUEST_SEARCHATTRIBUTESENTRY, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.AddSearchAttributesRequest.SearchAttributesEntry) - }, - ), - "DESCRIPTOR": _ADDSEARCHATTRIBUTESREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.AddSearchAttributesRequest) - }, -) -_sym_db.RegisterMessage(AddSearchAttributesRequest) -_sym_db.RegisterMessage(AddSearchAttributesRequest.SearchAttributesEntry) - -AddSearchAttributesResponse = _reflection.GeneratedProtocolMessageType( - "AddSearchAttributesResponse", - (_message.Message,), - { - "DESCRIPTOR": _ADDSEARCHATTRIBUTESRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.AddSearchAttributesResponse) - }, -) -_sym_db.RegisterMessage(AddSearchAttributesResponse) - -RemoveSearchAttributesRequest = _reflection.GeneratedProtocolMessageType( - "RemoveSearchAttributesRequest", - (_message.Message,), - { - "DESCRIPTOR": _REMOVESEARCHATTRIBUTESREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.RemoveSearchAttributesRequest) - }, -) -_sym_db.RegisterMessage(RemoveSearchAttributesRequest) - -RemoveSearchAttributesResponse = _reflection.GeneratedProtocolMessageType( - "RemoveSearchAttributesResponse", - (_message.Message,), - { - "DESCRIPTOR": _REMOVESEARCHATTRIBUTESRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.RemoveSearchAttributesResponse) - }, -) -_sym_db.RegisterMessage(RemoveSearchAttributesResponse) - -ListSearchAttributesRequest = _reflection.GeneratedProtocolMessageType( - "ListSearchAttributesRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTSEARCHATTRIBUTESREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ListSearchAttributesRequest) - }, -) -_sym_db.RegisterMessage(ListSearchAttributesRequest) - -ListSearchAttributesResponse = _reflection.GeneratedProtocolMessageType( - "ListSearchAttributesResponse", - (_message.Message,), - { - "CustomAttributesEntry": _reflection.GeneratedProtocolMessageType( - "CustomAttributesEntry", - (_message.Message,), - { - "DESCRIPTOR": _LISTSEARCHATTRIBUTESRESPONSE_CUSTOMATTRIBUTESENTRY, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ListSearchAttributesResponse.CustomAttributesEntry) - }, - ), - "SystemAttributesEntry": _reflection.GeneratedProtocolMessageType( - "SystemAttributesEntry", - (_message.Message,), - { - "DESCRIPTOR": _LISTSEARCHATTRIBUTESRESPONSE_SYSTEMATTRIBUTESENTRY, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ListSearchAttributesResponse.SystemAttributesEntry) - }, - ), - "StorageSchemaEntry": _reflection.GeneratedProtocolMessageType( - "StorageSchemaEntry", - (_message.Message,), - { - "DESCRIPTOR": _LISTSEARCHATTRIBUTESRESPONSE_STORAGESCHEMAENTRY, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ListSearchAttributesResponse.StorageSchemaEntry) - }, - ), - "DESCRIPTOR": _LISTSEARCHATTRIBUTESRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ListSearchAttributesResponse) - }, -) -_sym_db.RegisterMessage(ListSearchAttributesResponse) -_sym_db.RegisterMessage(ListSearchAttributesResponse.CustomAttributesEntry) -_sym_db.RegisterMessage(ListSearchAttributesResponse.SystemAttributesEntry) -_sym_db.RegisterMessage(ListSearchAttributesResponse.StorageSchemaEntry) - -DeleteNamespaceRequest = _reflection.GeneratedProtocolMessageType( - "DeleteNamespaceRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETENAMESPACEREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.DeleteNamespaceRequest) - }, -) -_sym_db.RegisterMessage(DeleteNamespaceRequest) - -DeleteNamespaceResponse = _reflection.GeneratedProtocolMessageType( - "DeleteNamespaceResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETENAMESPACERESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.DeleteNamespaceResponse) - }, -) -_sym_db.RegisterMessage(DeleteNamespaceResponse) - -AddOrUpdateRemoteClusterRequest = _reflection.GeneratedProtocolMessageType( - "AddOrUpdateRemoteClusterRequest", - (_message.Message,), - { - "DESCRIPTOR": _ADDORUPDATEREMOTECLUSTERREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest) - }, -) -_sym_db.RegisterMessage(AddOrUpdateRemoteClusterRequest) - -AddOrUpdateRemoteClusterResponse = _reflection.GeneratedProtocolMessageType( - "AddOrUpdateRemoteClusterResponse", - (_message.Message,), - { - "DESCRIPTOR": _ADDORUPDATEREMOTECLUSTERRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse) - }, -) -_sym_db.RegisterMessage(AddOrUpdateRemoteClusterResponse) - -RemoveRemoteClusterRequest = _reflection.GeneratedProtocolMessageType( - "RemoveRemoteClusterRequest", - (_message.Message,), - { - "DESCRIPTOR": _REMOVEREMOTECLUSTERREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.RemoveRemoteClusterRequest) - }, -) -_sym_db.RegisterMessage(RemoveRemoteClusterRequest) - -RemoveRemoteClusterResponse = _reflection.GeneratedProtocolMessageType( - "RemoveRemoteClusterResponse", - (_message.Message,), - { - "DESCRIPTOR": _REMOVEREMOTECLUSTERRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.RemoveRemoteClusterResponse) - }, -) -_sym_db.RegisterMessage(RemoveRemoteClusterResponse) - -ListClustersRequest = _reflection.GeneratedProtocolMessageType( - "ListClustersRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTCLUSTERSREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ListClustersRequest) - }, -) -_sym_db.RegisterMessage(ListClustersRequest) - -ListClustersResponse = _reflection.GeneratedProtocolMessageType( - "ListClustersResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTCLUSTERSRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ListClustersResponse) - }, -) -_sym_db.RegisterMessage(ListClustersResponse) - -ClusterMetadata = _reflection.GeneratedProtocolMessageType( - "ClusterMetadata", - (_message.Message,), - { - "DESCRIPTOR": _CLUSTERMETADATA, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ClusterMetadata) - }, -) -_sym_db.RegisterMessage(ClusterMetadata) - -GetNexusEndpointRequest = _reflection.GeneratedProtocolMessageType( - "GetNexusEndpointRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETNEXUSENDPOINTREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.GetNexusEndpointRequest) - }, -) -_sym_db.RegisterMessage(GetNexusEndpointRequest) - -GetNexusEndpointResponse = _reflection.GeneratedProtocolMessageType( - "GetNexusEndpointResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETNEXUSENDPOINTRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.GetNexusEndpointResponse) - }, -) -_sym_db.RegisterMessage(GetNexusEndpointResponse) - -CreateNexusEndpointRequest = _reflection.GeneratedProtocolMessageType( - "CreateNexusEndpointRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATENEXUSENDPOINTREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.CreateNexusEndpointRequest) - }, -) -_sym_db.RegisterMessage(CreateNexusEndpointRequest) - -CreateNexusEndpointResponse = _reflection.GeneratedProtocolMessageType( - "CreateNexusEndpointResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATENEXUSENDPOINTRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.CreateNexusEndpointResponse) - }, -) -_sym_db.RegisterMessage(CreateNexusEndpointResponse) - -UpdateNexusEndpointRequest = _reflection.GeneratedProtocolMessageType( - "UpdateNexusEndpointRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENEXUSENDPOINTREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.UpdateNexusEndpointRequest) - }, -) -_sym_db.RegisterMessage(UpdateNexusEndpointRequest) - -UpdateNexusEndpointResponse = _reflection.GeneratedProtocolMessageType( - "UpdateNexusEndpointResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENEXUSENDPOINTRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.UpdateNexusEndpointResponse) - }, -) -_sym_db.RegisterMessage(UpdateNexusEndpointResponse) - -DeleteNexusEndpointRequest = _reflection.GeneratedProtocolMessageType( - "DeleteNexusEndpointRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETENEXUSENDPOINTREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.DeleteNexusEndpointRequest) - }, -) -_sym_db.RegisterMessage(DeleteNexusEndpointRequest) - -DeleteNexusEndpointResponse = _reflection.GeneratedProtocolMessageType( - "DeleteNexusEndpointResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETENEXUSENDPOINTRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.DeleteNexusEndpointResponse) - }, -) -_sym_db.RegisterMessage(DeleteNexusEndpointResponse) - -ListNexusEndpointsRequest = _reflection.GeneratedProtocolMessageType( - "ListNexusEndpointsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTNEXUSENDPOINTSREQUEST, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ListNexusEndpointsRequest) - }, -) -_sym_db.RegisterMessage(ListNexusEndpointsRequest) - -ListNexusEndpointsResponse = _reflection.GeneratedProtocolMessageType( - "ListNexusEndpointsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTNEXUSENDPOINTSRESPONSE, - "__module__": "temporalio.api.operatorservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.operatorservice.v1.ListNexusEndpointsResponse) - }, -) -_sym_db.RegisterMessage(ListNexusEndpointsResponse) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n"io.temporal.api.operatorservice.v1B\024RequestResponseProtoP\001Z5go.temporal.io/api/operatorservice/v1;operatorservice\252\002!Temporalio.Api.OperatorService.V1\352\002$Temporalio::Api::OperatorService::V1' @@ -452,37 +64,37 @@ _DELETENAMESPACERESPONSE._serialized_start = 1387 _DELETENAMESPACERESPONSE._serialized_end = 1439 _ADDORUPDATEREMOTECLUSTERREQUEST._serialized_start = 1442 - _ADDORUPDATEREMOTECLUSTERREQUEST._serialized_end = 1574 - _ADDORUPDATEREMOTECLUSTERRESPONSE._serialized_start = 1576 - _ADDORUPDATEREMOTECLUSTERRESPONSE._serialized_end = 1610 - _REMOVEREMOTECLUSTERREQUEST._serialized_start = 1612 - _REMOVEREMOTECLUSTERREQUEST._serialized_end = 1662 - _REMOVEREMOTECLUSTERRESPONSE._serialized_start = 1664 - _REMOVEREMOTECLUSTERRESPONSE._serialized_end = 1693 - _LISTCLUSTERSREQUEST._serialized_start = 1695 - _LISTCLUSTERSREQUEST._serialized_end = 1760 - _LISTCLUSTERSRESPONSE._serialized_start = 1762 - _LISTCLUSTERSRESPONSE._serialized_end = 1877 - _CLUSTERMETADATA._serialized_start = 1880 - _CLUSTERMETADATA._serialized_end = 2072 - _GETNEXUSENDPOINTREQUEST._serialized_start = 2074 - _GETNEXUSENDPOINTREQUEST._serialized_end = 2111 - _GETNEXUSENDPOINTRESPONSE._serialized_start = 2113 - _GETNEXUSENDPOINTRESPONSE._serialized_end = 2190 - _CREATENEXUSENDPOINTREQUEST._serialized_start = 2192 - _CREATENEXUSENDPOINTREQUEST._serialized_end = 2271 - _CREATENEXUSENDPOINTRESPONSE._serialized_start = 2273 - _CREATENEXUSENDPOINTRESPONSE._serialized_end = 2353 - _UPDATENEXUSENDPOINTREQUEST._serialized_start = 2355 - _UPDATENEXUSENDPOINTREQUEST._serialized_end = 2463 - _UPDATENEXUSENDPOINTRESPONSE._serialized_start = 2465 - _UPDATENEXUSENDPOINTRESPONSE._serialized_end = 2545 - _DELETENEXUSENDPOINTREQUEST._serialized_start = 2547 - _DELETENEXUSENDPOINTREQUEST._serialized_end = 2604 - _DELETENEXUSENDPOINTRESPONSE._serialized_start = 2606 - _DELETENEXUSENDPOINTRESPONSE._serialized_end = 2635 - _LISTNEXUSENDPOINTSREQUEST._serialized_start = 2637 - _LISTNEXUSENDPOINTSREQUEST._serialized_end = 2722 - _LISTNEXUSENDPOINTSRESPONSE._serialized_start = 2724 - _LISTNEXUSENDPOINTSRESPONSE._serialized_end = 2829 + _ADDORUPDATEREMOTECLUSTERREQUEST._serialized_end = 1602 + _ADDORUPDATEREMOTECLUSTERRESPONSE._serialized_start = 1604 + _ADDORUPDATEREMOTECLUSTERRESPONSE._serialized_end = 1638 + _REMOVEREMOTECLUSTERREQUEST._serialized_start = 1640 + _REMOVEREMOTECLUSTERREQUEST._serialized_end = 1690 + _REMOVEREMOTECLUSTERRESPONSE._serialized_start = 1692 + _REMOVEREMOTECLUSTERRESPONSE._serialized_end = 1721 + _LISTCLUSTERSREQUEST._serialized_start = 1723 + _LISTCLUSTERSREQUEST._serialized_end = 1788 + _LISTCLUSTERSRESPONSE._serialized_start = 1790 + _LISTCLUSTERSRESPONSE._serialized_end = 1905 + _CLUSTERMETADATA._serialized_start = 1908 + _CLUSTERMETADATA._serialized_end = 2132 + _GETNEXUSENDPOINTREQUEST._serialized_start = 2134 + _GETNEXUSENDPOINTREQUEST._serialized_end = 2171 + _GETNEXUSENDPOINTRESPONSE._serialized_start = 2173 + _GETNEXUSENDPOINTRESPONSE._serialized_end = 2250 + _CREATENEXUSENDPOINTREQUEST._serialized_start = 2252 + _CREATENEXUSENDPOINTREQUEST._serialized_end = 2331 + _CREATENEXUSENDPOINTRESPONSE._serialized_start = 2333 + _CREATENEXUSENDPOINTRESPONSE._serialized_end = 2413 + _UPDATENEXUSENDPOINTREQUEST._serialized_start = 2415 + _UPDATENEXUSENDPOINTREQUEST._serialized_end = 2523 + _UPDATENEXUSENDPOINTRESPONSE._serialized_start = 2525 + _UPDATENEXUSENDPOINTRESPONSE._serialized_end = 2605 + _DELETENEXUSENDPOINTREQUEST._serialized_start = 2607 + _DELETENEXUSENDPOINTREQUEST._serialized_end = 2664 + _DELETENEXUSENDPOINTRESPONSE._serialized_start = 2666 + _DELETENEXUSENDPOINTRESPONSE._serialized_end = 2695 + _LISTNEXUSENDPOINTSREQUEST._serialized_start = 2697 + _LISTNEXUSENDPOINTSREQUEST._serialized_end = 2782 + _LISTNEXUSENDPOINTSRESPONSE._serialized_start = 2784 + _LISTNEXUSENDPOINTSRESPONSE._serialized_end = 2889 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/operatorservice/v1/request_response_pb2.pyi b/temporalio/api/operatorservice/v1/request_response_pb2.pyi index e1043b5e1f..49dbafdc08 100644 --- a/temporalio/api/operatorservice/v1/request_response_pb2.pyi +++ b/temporalio/api/operatorservice/v1/request_response_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -15,18 +15,15 @@ import google.protobuf.message import temporalio.api.enums.v1.common_pb2 import temporalio.api.nexus.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class AddSearchAttributesRequest(google.protobuf.message.Message): """(-- Search Attribute --)""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class SearchAttributesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -41,12 +38,12 @@ class AddSearchAttributesRequest(google.protobuf.message.Message): value: temporalio.api.enums.v1.common_pb2.IndexedValueType.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int NAMESPACE_FIELD_NUMBER: builtins.int + namespace: builtins.str @property def search_attributes( self, @@ -54,7 +51,7 @@ class AddSearchAttributesRequest(google.protobuf.message.Message): builtins.str, temporalio.api.enums.v1.common_pb2.IndexedValueType.ValueType ]: """Mapping between search attribute name and its IndexedValueType.""" - namespace: builtins.str + def __init__( self, *, @@ -66,13 +63,14 @@ class AddSearchAttributesRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "search_attributes", b"search_attributes" ], ) -> None: ... global___AddSearchAttributesRequest = AddSearchAttributesRequest +@typing.final class AddSearchAttributesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -82,17 +80,19 @@ class AddSearchAttributesResponse(google.protobuf.message.Message): global___AddSearchAttributesResponse = AddSearchAttributesResponse +@typing.final class RemoveSearchAttributesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int NAMESPACE_FIELD_NUMBER: builtins.int + namespace: builtins.str @property def search_attributes( self, ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """Search attribute names to delete.""" - namespace: builtins.str + def __init__( self, *, @@ -101,13 +101,14 @@ class RemoveSearchAttributesRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "search_attributes", b"search_attributes" ], ) -> None: ... global___RemoveSearchAttributesRequest = RemoveSearchAttributesRequest +@typing.final class RemoveSearchAttributesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -117,6 +118,7 @@ class RemoveSearchAttributesResponse(google.protobuf.message.Message): global___RemoveSearchAttributesResponse = RemoveSearchAttributesResponse +@typing.final class ListSearchAttributesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -128,14 +130,16 @@ class ListSearchAttributesRequest(google.protobuf.message.Message): namespace: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["namespace", b"namespace"] + self, field_name: typing.Literal["namespace", b"namespace"] ) -> None: ... global___ListSearchAttributesRequest = ListSearchAttributesRequest +@typing.final class ListSearchAttributesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class CustomAttributesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -150,10 +154,10 @@ class ListSearchAttributesResponse(google.protobuf.message.Message): value: temporalio.api.enums.v1.common_pb2.IndexedValueType.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class SystemAttributesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -168,10 +172,10 @@ class ListSearchAttributesResponse(google.protobuf.message.Message): value: temporalio.api.enums.v1.common_pb2.IndexedValueType.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class StorageSchemaEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -186,8 +190,7 @@ class ListSearchAttributesResponse(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... CUSTOM_ATTRIBUTES_FIELD_NUMBER: builtins.int @@ -200,6 +203,7 @@ class ListSearchAttributesResponse(google.protobuf.message.Message): builtins.str, temporalio.api.enums.v1.common_pb2.IndexedValueType.ValueType ]: """Mapping between custom (user-registered) search attribute name to its IndexedValueType.""" + @property def system_attributes( self, @@ -207,11 +211,13 @@ class ListSearchAttributesResponse(google.protobuf.message.Message): builtins.str, temporalio.api.enums.v1.common_pb2.IndexedValueType.ValueType ]: """Mapping between system (predefined) search attribute name to its IndexedValueType.""" + @property def storage_schema( self, ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: """Mapping from the attribute name to the visibility storage native type.""" + def __init__( self, *, @@ -228,7 +234,7 @@ class ListSearchAttributesResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "custom_attributes", b"custom_attributes", "storage_schema", @@ -240,6 +246,7 @@ class ListSearchAttributesResponse(google.protobuf.message.Message): global___ListSearchAttributesResponse = ListSearchAttributesResponse +@typing.final class DeleteNamespaceRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -254,6 +261,7 @@ class DeleteNamespaceRequest(google.protobuf.message.Message): """If provided, the deletion of namespace info will be delayed for the given duration (0 means no delay). If not provided, the default delay configured in the cluster will be used. """ + def __init__( self, *, @@ -263,13 +271,11 @@ class DeleteNamespaceRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "namespace_delete_delay", b"namespace_delete_delay" - ], + field_name: typing.Literal["namespace_delete_delay", b"namespace_delete_delay"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "namespace_delete_delay", @@ -281,6 +287,7 @@ class DeleteNamespaceRequest(google.protobuf.message.Message): global___DeleteNamespaceRequest = DeleteNamespaceRequest +@typing.final class DeleteNamespaceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -293,20 +300,19 @@ class DeleteNamespaceResponse(google.protobuf.message.Message): deleted_namespace: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "deleted_namespace", b"deleted_namespace" - ], + self, field_name: typing.Literal["deleted_namespace", b"deleted_namespace"] ) -> None: ... global___DeleteNamespaceResponse = DeleteNamespaceResponse +@typing.final class AddOrUpdateRemoteClusterRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor FRONTEND_ADDRESS_FIELD_NUMBER: builtins.int ENABLE_REMOTE_CLUSTER_CONNECTION_FIELD_NUMBER: builtins.int FRONTEND_HTTP_ADDRESS_FIELD_NUMBER: builtins.int + ENABLE_REPLICATION_FIELD_NUMBER: builtins.int frontend_address: builtins.str """Frontend Address is a cross cluster accessible address for gRPC traffic. This field is required.""" enable_remote_cluster_connection: builtins.bool @@ -315,18 +321,23 @@ class AddOrUpdateRemoteClusterRequest(google.protobuf.message.Message): """Frontend HTTP Address is a cross cluster accessible address for HTTP traffic. This field is optional. If not provided on update, the existing HTTP address will be removed. """ + enable_replication: builtins.bool + """Controls whether replication streams are active.""" def __init__( self, *, frontend_address: builtins.str = ..., enable_remote_cluster_connection: builtins.bool = ..., frontend_http_address: builtins.str = ..., + enable_replication: builtins.bool = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "enable_remote_cluster_connection", b"enable_remote_cluster_connection", + "enable_replication", + b"enable_replication", "frontend_address", b"frontend_address", "frontend_http_address", @@ -336,6 +347,7 @@ class AddOrUpdateRemoteClusterRequest(google.protobuf.message.Message): global___AddOrUpdateRemoteClusterRequest = AddOrUpdateRemoteClusterRequest +@typing.final class AddOrUpdateRemoteClusterResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -345,6 +357,7 @@ class AddOrUpdateRemoteClusterResponse(google.protobuf.message.Message): global___AddOrUpdateRemoteClusterResponse = AddOrUpdateRemoteClusterResponse +@typing.final class RemoveRemoteClusterRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -357,11 +370,12 @@ class RemoveRemoteClusterRequest(google.protobuf.message.Message): cluster_name: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["cluster_name", b"cluster_name"] + self, field_name: typing.Literal["cluster_name", b"cluster_name"] ) -> None: ... global___RemoveRemoteClusterRequest = RemoveRemoteClusterRequest +@typing.final class RemoveRemoteClusterResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -371,6 +385,7 @@ class RemoveRemoteClusterResponse(google.protobuf.message.Message): global___RemoveRemoteClusterResponse = RemoveRemoteClusterResponse +@typing.final class ListClustersRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -386,18 +401,20 @@ class ListClustersRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "next_page_token", b"next_page_token", "page_size", b"page_size" ], ) -> None: ... global___ListClustersRequest = ListClustersRequest +@typing.final class ListClustersResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor CLUSTERS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def clusters( self, @@ -405,7 +422,7 @@ class ListClustersResponse(google.protobuf.message.Message): global___ClusterMetadata ]: """List of all cluster information""" - next_page_token: builtins.bytes + def __init__( self, *, @@ -414,13 +431,14 @@ class ListClustersResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "clusters", b"clusters", "next_page_token", b"next_page_token" ], ) -> None: ... global___ListClustersResponse = ListClustersResponse +@typing.final class ClusterMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -431,6 +449,7 @@ class ClusterMetadata(google.protobuf.message.Message): INITIAL_FAILOVER_VERSION_FIELD_NUMBER: builtins.int HISTORY_SHARD_COUNT_FIELD_NUMBER: builtins.int IS_CONNECTION_ENABLED_FIELD_NUMBER: builtins.int + IS_REPLICATION_ENABLED_FIELD_NUMBER: builtins.int cluster_name: builtins.str """Name of the cluster name.""" cluster_id: builtins.str @@ -445,6 +464,8 @@ class ClusterMetadata(google.protobuf.message.Message): """History service shard number.""" is_connection_enabled: builtins.bool """A flag to indicate if a connection is active.""" + is_replication_enabled: builtins.bool + """A flag to indicate if replication is enabled.""" def __init__( self, *, @@ -455,10 +476,11 @@ class ClusterMetadata(google.protobuf.message.Message): initial_failover_version: builtins.int = ..., history_shard_count: builtins.int = ..., is_connection_enabled: builtins.bool = ..., + is_replication_enabled: builtins.bool = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "address", b"address", "cluster_id", @@ -473,11 +495,14 @@ class ClusterMetadata(google.protobuf.message.Message): b"initial_failover_version", "is_connection_enabled", b"is_connection_enabled", + "is_replication_enabled", + b"is_replication_enabled", ], ) -> None: ... global___ClusterMetadata = ClusterMetadata +@typing.final class GetNexusEndpointRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -489,12 +514,11 @@ class GetNexusEndpointRequest(google.protobuf.message.Message): *, id: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["id", b"id"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["id", b"id"]) -> None: ... global___GetNexusEndpointRequest = GetNexusEndpointRequest +@typing.final class GetNexusEndpointResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -507,14 +531,15 @@ class GetNexusEndpointResponse(google.protobuf.message.Message): endpoint: temporalio.api.nexus.v1.message_pb2.Endpoint | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["endpoint", b"endpoint"] + self, field_name: typing.Literal["endpoint", b"endpoint"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["endpoint", b"endpoint"] + self, field_name: typing.Literal["endpoint", b"endpoint"] ) -> None: ... global___GetNexusEndpointResponse = GetNexusEndpointResponse +@typing.final class CreateNexusEndpointRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -522,20 +547,20 @@ class CreateNexusEndpointRequest(google.protobuf.message.Message): @property def spec(self) -> temporalio.api.nexus.v1.message_pb2.EndpointSpec: """Endpoint definition to create.""" + def __init__( self, *, spec: temporalio.api.nexus.v1.message_pb2.EndpointSpec | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["spec", b"spec"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["spec", b"spec"]) -> None: ... global___CreateNexusEndpointRequest = CreateNexusEndpointRequest +@typing.final class CreateNexusEndpointResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -543,20 +568,22 @@ class CreateNexusEndpointResponse(google.protobuf.message.Message): @property def endpoint(self) -> temporalio.api.nexus.v1.message_pb2.Endpoint: """Data post acceptance. Can be used to issue additional updates to this record.""" + def __init__( self, *, endpoint: temporalio.api.nexus.v1.message_pb2.Endpoint | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["endpoint", b"endpoint"] + self, field_name: typing.Literal["endpoint", b"endpoint"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["endpoint", b"endpoint"] + self, field_name: typing.Literal["endpoint", b"endpoint"] ) -> None: ... global___CreateNexusEndpointResponse = CreateNexusEndpointResponse +@typing.final class UpdateNexusEndpointRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -577,17 +604,16 @@ class UpdateNexusEndpointRequest(google.protobuf.message.Message): spec: temporalio.api.nexus.v1.message_pb2.EndpointSpec | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "id", b"id", "spec", b"spec", "version", b"version" - ], + field_name: typing.Literal["id", b"id", "spec", b"spec", "version", b"version"], ) -> None: ... global___UpdateNexusEndpointRequest = UpdateNexusEndpointRequest +@typing.final class UpdateNexusEndpointResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -595,20 +621,22 @@ class UpdateNexusEndpointResponse(google.protobuf.message.Message): @property def endpoint(self) -> temporalio.api.nexus.v1.message_pb2.Endpoint: """Data post acceptance. Can be used to issue additional updates to this record.""" + def __init__( self, *, endpoint: temporalio.api.nexus.v1.message_pb2.Endpoint | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["endpoint", b"endpoint"] + self, field_name: typing.Literal["endpoint", b"endpoint"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["endpoint", b"endpoint"] + self, field_name: typing.Literal["endpoint", b"endpoint"] ) -> None: ... global___UpdateNexusEndpointResponse = UpdateNexusEndpointResponse +@typing.final class DeleteNexusEndpointRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -625,11 +653,12 @@ class DeleteNexusEndpointRequest(google.protobuf.message.Message): version: builtins.int = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["id", b"id", "version", b"version"] + self, field_name: typing.Literal["id", b"id", "version", b"version"] ) -> None: ... global___DeleteNexusEndpointRequest = DeleteNexusEndpointRequest +@typing.final class DeleteNexusEndpointResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -639,6 +668,7 @@ class DeleteNexusEndpointResponse(google.protobuf.message.Message): global___DeleteNexusEndpointResponse = DeleteNexusEndpointResponse +@typing.final class ListNexusEndpointsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -665,7 +695,7 @@ class ListNexusEndpointsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "name", b"name", "next_page_token", @@ -677,6 +707,7 @@ class ListNexusEndpointsRequest(google.protobuf.message.Message): global___ListNexusEndpointsRequest = ListNexusEndpointsRequest +@typing.final class ListNexusEndpointsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -701,7 +732,7 @@ class ListNexusEndpointsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "endpoints", b"endpoints", "next_page_token", b"next_page_token" ], ) -> None: ... diff --git a/temporalio/api/operatorservice/v1/request_response_pb2_grpc.pyi b/temporalio/api/operatorservice/v1/request_response_pb2_grpc.pyi index f3a5a087ef..de236ac811 100644 --- a/temporalio/api/operatorservice/v1/request_response_pb2_grpc.pyi +++ b/temporalio/api/operatorservice/v1/request_response_pb2_grpc.pyi @@ -2,3 +2,20 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + +import abc +import collections.abc +import typing + +import grpc +import grpc.aio + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator( + collections.abc.AsyncIterator[_T], + collections.abc.Iterator[_T], + metaclass=abc.ABCMeta, +): ... +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... diff --git a/temporalio/api/operatorservice/v1/service_pb2.py b/temporalio/api/operatorservice/v1/service_pb2.py index 1e016243a3..2a29e08ad1 100644 --- a/temporalio/api/operatorservice/v1/service_pb2.py +++ b/temporalio/api/operatorservice/v1/service_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -24,8 +23,8 @@ b'\n-temporal/api/operatorservice/v1/service.proto\x12\x1ftemporal.api.operatorservice.v1\x1a\x36temporal/api/operatorservice/v1/request_response.proto\x1a\x1cgoogle/api/annotations.proto2\xc6\x11\n\x0fOperatorService\x12\x92\x01\n\x13\x41\x64\x64SearchAttributes\x12;.temporal.api.operatorservice.v1.AddSearchAttributesRequest\x1a<.temporal.api.operatorservice.v1.AddSearchAttributesResponse"\x00\x12\x9b\x01\n\x16RemoveSearchAttributes\x12>.temporal.api.operatorservice.v1.RemoveSearchAttributesRequest\x1a?.temporal.api.operatorservice.v1.RemoveSearchAttributesResponse"\x00\x12\x82\x02\n\x14ListSearchAttributes\x12<.temporal.api.operatorservice.v1.ListSearchAttributesRequest\x1a=.temporal.api.operatorservice.v1.ListSearchAttributesResponse"m\x82\xd3\xe4\x93\x02g\x12\x31/cluster/namespaces/{namespace}/search-attributesZ2\x12\x30/api/v1/namespaces/{namespace}/search-attributes\x12\x86\x01\n\x0f\x44\x65leteNamespace\x12\x37.temporal.api.operatorservice.v1.DeleteNamespaceRequest\x1a\x38.temporal.api.operatorservice.v1.DeleteNamespaceResponse"\x00\x12\xa1\x01\n\x18\x41\x64\x64OrUpdateRemoteCluster\x12@.temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterRequest\x1a\x41.temporal.api.operatorservice.v1.AddOrUpdateRemoteClusterResponse"\x00\x12\x92\x01\n\x13RemoveRemoteCluster\x12;.temporal.api.operatorservice.v1.RemoveRemoteClusterRequest\x1a<.temporal.api.operatorservice.v1.RemoveRemoteClusterResponse"\x00\x12}\n\x0cListClusters\x12\x34.temporal.api.operatorservice.v1.ListClustersRequest\x1a\x35.temporal.api.operatorservice.v1.ListClustersResponse"\x00\x12\xce\x01\n\x10GetNexusEndpoint\x12\x38.temporal.api.operatorservice.v1.GetNexusEndpointRequest\x1a\x39.temporal.api.operatorservice.v1.GetNexusEndpointResponse"E\x82\xd3\xe4\x93\x02?\x12\x1d/cluster/nexus/endpoints/{id}Z\x1e\x12\x1c/api/v1/nexus/endpoints/{id}\x12\xd3\x01\n\x13\x43reateNexusEndpoint\x12;.temporal.api.operatorservice.v1.CreateNexusEndpointRequest\x1a<.temporal.api.operatorservice.v1.CreateNexusEndpointResponse"A\x82\xd3\xe4\x93\x02;"\x18/cluster/nexus/endpoints:\x01*Z\x1c"\x17/api/v1/nexus/endpoints:\x01*\x12\xeb\x01\n\x13UpdateNexusEndpoint\x12;.temporal.api.operatorservice.v1.UpdateNexusEndpointRequest\x1a<.temporal.api.operatorservice.v1.UpdateNexusEndpointResponse"Y\x82\xd3\xe4\x93\x02S"$/cluster/nexus/endpoints/{id}/update:\x01*Z("#/api/v1/nexus/endpoints/{id}/update:\x01*\x12\xd7\x01\n\x13\x44\x65leteNexusEndpoint\x12;.temporal.api.operatorservice.v1.DeleteNexusEndpointRequest\x1a<.temporal.api.operatorservice.v1.DeleteNexusEndpointResponse"E\x82\xd3\xe4\x93\x02?*\x1d/cluster/nexus/endpoints/{id}Z\x1e*\x1c/api/v1/nexus/endpoints/{id}\x12\xca\x01\n\x12ListNexusEndpoints\x12:.temporal.api.operatorservice.v1.ListNexusEndpointsRequest\x1a;.temporal.api.operatorservice.v1.ListNexusEndpointsResponse";\x82\xd3\xe4\x93\x02\x35\x12\x18/cluster/nexus/endpointsZ\x19\x12\x17/api/v1/nexus/endpointsB\xb6\x01\n"io.temporal.api.operatorservice.v1B\x0cServiceProtoP\x01Z5go.temporal.io/api/operatorservice/v1;operatorservice\xaa\x02!Temporalio.Api.OperatorService.V1\xea\x02$Temporalio::Api::OperatorService::V1b\x06proto3' ) - -_OPERATORSERVICE = DESCRIPTOR.services_by_name["OperatorService"] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n"io.temporal.api.operatorservice.v1B\014ServiceProtoP\001Z5go.temporal.io/api/operatorservice/v1;operatorservice\252\002!Temporalio.Api.OperatorService.V1\352\002$Temporalio::Api::OperatorService::V1' diff --git a/temporalio/api/operatorservice/v1/service_pb2_grpc.pyi b/temporalio/api/operatorservice/v1/service_pb2_grpc.pyi index c24abb2393..05ef84ccf1 100644 --- a/temporalio/api/operatorservice/v1/service_pb2_grpc.pyi +++ b/temporalio/api/operatorservice/v1/service_pb2_grpc.pyi @@ -4,11 +4,24 @@ isort:skip_file """ import abc +import collections.abc +import typing import grpc +import grpc.aio import temporalio.api.operatorservice.v1.request_response_pb2 +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator( + collections.abc.AsyncIterator[_T], + collections.abc.Iterator[_T], + metaclass=abc.ABCMeta, +): ... +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... + class OperatorServiceStub: """OperatorService API defines how Temporal SDKs and other clients interact with the Temporal server to perform administrative functions like registering a search attribute or a namespace. @@ -17,7 +30,9 @@ class OperatorServiceStub: (-- Search Attribute --) """ - def __init__(self, channel: grpc.Channel) -> None: ... + def __init__( + self, channel: typing.Union[grpc.Channel, grpc.aio.Channel] + ) -> None: ... AddSearchAttributes: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.AddSearchAttributesRequest, temporalio.api.operatorservice.v1.request_response_pb2.AddSearchAttributesResponse, @@ -27,6 +42,7 @@ class OperatorServiceStub: Returns ALREADY_EXISTS status code if a Search Attribute with any of the specified names already exists Returns INTERNAL status code with temporalio.api.errordetails.v1.SystemWorkflowFailure in Error Details if registration process fails, """ + RemoveSearchAttributes: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.RemoveSearchAttributesRequest, temporalio.api.operatorservice.v1.request_response_pb2.RemoveSearchAttributesResponse, @@ -35,36 +51,43 @@ class OperatorServiceStub: Returns NOT_FOUND status code if a Search Attribute with any of the specified names is not registered """ + ListSearchAttributes: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.ListSearchAttributesRequest, temporalio.api.operatorservice.v1.request_response_pb2.ListSearchAttributesResponse, ] """ListSearchAttributes returns comprehensive information about search attributes.""" + DeleteNamespace: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.DeleteNamespaceRequest, temporalio.api.operatorservice.v1.request_response_pb2.DeleteNamespaceResponse, ] """DeleteNamespace synchronously deletes a namespace and asynchronously reclaims all namespace resources.""" + AddOrUpdateRemoteCluster: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.AddOrUpdateRemoteClusterRequest, temporalio.api.operatorservice.v1.request_response_pb2.AddOrUpdateRemoteClusterResponse, ] """AddOrUpdateRemoteCluster adds or updates remote cluster.""" + RemoveRemoteCluster: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.RemoveRemoteClusterRequest, temporalio.api.operatorservice.v1.request_response_pb2.RemoveRemoteClusterResponse, ] """RemoveRemoteCluster removes remote cluster.""" + ListClusters: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.ListClustersRequest, temporalio.api.operatorservice.v1.request_response_pb2.ListClustersResponse, ] """ListClusters returns information about Temporal clusters.""" + GetNexusEndpoint: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.GetNexusEndpointRequest, temporalio.api.operatorservice.v1.request_response_pb2.GetNexusEndpointResponse, ] """Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates.""" + CreateNexusEndpoint: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.CreateNexusEndpointRequest, temporalio.api.operatorservice.v1.request_response_pb2.CreateNexusEndpointResponse, @@ -73,6 +96,7 @@ class OperatorServiceStub: ALREADY_EXISTS. Returns the created endpoint with its initial version. You may use this version for subsequent updates. """ + UpdateNexusEndpoint: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.UpdateNexusEndpointRequest, temporalio.api.operatorservice.v1.request_response_pb2.UpdateNexusEndpointResponse, @@ -83,11 +107,13 @@ class OperatorServiceStub: Returns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't need to increment the version yourself. The server will increment the version for you after each update. """ + DeleteNexusEndpoint: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.DeleteNexusEndpointRequest, temporalio.api.operatorservice.v1.request_response_pb2.DeleteNexusEndpointResponse, ] """Delete an incoming Nexus service by ID.""" + ListNexusEndpoints: grpc.UnaryUnaryMultiCallable[ temporalio.api.operatorservice.v1.request_response_pb2.ListNexusEndpointsRequest, temporalio.api.operatorservice.v1.request_response_pb2.ListNexusEndpointsResponse, @@ -98,6 +124,105 @@ class OperatorServiceStub: earlier than the previous page's last endpoint's ID may be missed. """ +class OperatorServiceAsyncStub: + """OperatorService API defines how Temporal SDKs and other clients interact with the Temporal server + to perform administrative functions like registering a search attribute or a namespace. + APIs in this file could be not compatible with Temporal Cloud, hence it's usage in SDKs should be limited by + designated APIs that clearly state that they shouldn't be used by the main Application (Workflows & Activities) framework. + (-- Search Attribute --) + """ + + AddSearchAttributes: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.AddSearchAttributesRequest, + temporalio.api.operatorservice.v1.request_response_pb2.AddSearchAttributesResponse, + ] + """AddSearchAttributes add custom search attributes. + + Returns ALREADY_EXISTS status code if a Search Attribute with any of the specified names already exists + Returns INTERNAL status code with temporalio.api.errordetails.v1.SystemWorkflowFailure in Error Details if registration process fails, + """ + + RemoveSearchAttributes: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.RemoveSearchAttributesRequest, + temporalio.api.operatorservice.v1.request_response_pb2.RemoveSearchAttributesResponse, + ] + """RemoveSearchAttributes removes custom search attributes. + + Returns NOT_FOUND status code if a Search Attribute with any of the specified names is not registered + """ + + ListSearchAttributes: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.ListSearchAttributesRequest, + temporalio.api.operatorservice.v1.request_response_pb2.ListSearchAttributesResponse, + ] + """ListSearchAttributes returns comprehensive information about search attributes.""" + + DeleteNamespace: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.DeleteNamespaceRequest, + temporalio.api.operatorservice.v1.request_response_pb2.DeleteNamespaceResponse, + ] + """DeleteNamespace synchronously deletes a namespace and asynchronously reclaims all namespace resources.""" + + AddOrUpdateRemoteCluster: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.AddOrUpdateRemoteClusterRequest, + temporalio.api.operatorservice.v1.request_response_pb2.AddOrUpdateRemoteClusterResponse, + ] + """AddOrUpdateRemoteCluster adds or updates remote cluster.""" + + RemoveRemoteCluster: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.RemoveRemoteClusterRequest, + temporalio.api.operatorservice.v1.request_response_pb2.RemoveRemoteClusterResponse, + ] + """RemoveRemoteCluster removes remote cluster.""" + + ListClusters: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.ListClustersRequest, + temporalio.api.operatorservice.v1.request_response_pb2.ListClustersResponse, + ] + """ListClusters returns information about Temporal clusters.""" + + GetNexusEndpoint: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.GetNexusEndpointRequest, + temporalio.api.operatorservice.v1.request_response_pb2.GetNexusEndpointResponse, + ] + """Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates.""" + + CreateNexusEndpoint: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.CreateNexusEndpointRequest, + temporalio.api.operatorservice.v1.request_response_pb2.CreateNexusEndpointResponse, + ] + """Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of + ALREADY_EXISTS. + Returns the created endpoint with its initial version. You may use this version for subsequent updates. + """ + + UpdateNexusEndpoint: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.UpdateNexusEndpointRequest, + temporalio.api.operatorservice.v1.request_response_pb2.UpdateNexusEndpointResponse, + ] + """Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or + `ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not + match. + Returns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't + need to increment the version yourself. The server will increment the version for you after each update. + """ + + DeleteNexusEndpoint: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.DeleteNexusEndpointRequest, + temporalio.api.operatorservice.v1.request_response_pb2.DeleteNexusEndpointResponse, + ] + """Delete an incoming Nexus service by ID.""" + + ListNexusEndpoints: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.operatorservice.v1.request_response_pb2.ListNexusEndpointsRequest, + temporalio.api.operatorservice.v1.request_response_pb2.ListNexusEndpointsResponse, + ] + """List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the + next_page_token field of the previous response to get the next page of results. An empty next_page_token + indicates that there are no more results. During pagination, a newly added service with an ID lexicographically + earlier than the previous page's last endpoint's ID may be missed. + """ + class OperatorServiceServicer(metaclass=abc.ABCMeta): """OperatorService API defines how Temporal SDKs and other clients interact with the Temporal server to perform administrative functions like registering a search attribute or a namespace. @@ -110,102 +235,171 @@ class OperatorServiceServicer(metaclass=abc.ABCMeta): def AddSearchAttributes( self, request: temporalio.api.operatorservice.v1.request_response_pb2.AddSearchAttributesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.AddSearchAttributesResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.AddSearchAttributesResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.AddSearchAttributesResponse + ], + ]: """AddSearchAttributes add custom search attributes. Returns ALREADY_EXISTS status code if a Search Attribute with any of the specified names already exists Returns INTERNAL status code with temporalio.api.errordetails.v1.SystemWorkflowFailure in Error Details if registration process fails, """ + @abc.abstractmethod def RemoveSearchAttributes( self, request: temporalio.api.operatorservice.v1.request_response_pb2.RemoveSearchAttributesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.RemoveSearchAttributesResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.RemoveSearchAttributesResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.RemoveSearchAttributesResponse + ], + ]: """RemoveSearchAttributes removes custom search attributes. Returns NOT_FOUND status code if a Search Attribute with any of the specified names is not registered """ + @abc.abstractmethod def ListSearchAttributes( self, request: temporalio.api.operatorservice.v1.request_response_pb2.ListSearchAttributesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.ListSearchAttributesResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.ListSearchAttributesResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.ListSearchAttributesResponse + ], + ]: """ListSearchAttributes returns comprehensive information about search attributes.""" + @abc.abstractmethod def DeleteNamespace( self, request: temporalio.api.operatorservice.v1.request_response_pb2.DeleteNamespaceRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.DeleteNamespaceResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.DeleteNamespaceResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.DeleteNamespaceResponse + ], + ]: """DeleteNamespace synchronously deletes a namespace and asynchronously reclaims all namespace resources.""" + @abc.abstractmethod def AddOrUpdateRemoteCluster( self, request: temporalio.api.operatorservice.v1.request_response_pb2.AddOrUpdateRemoteClusterRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.AddOrUpdateRemoteClusterResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.AddOrUpdateRemoteClusterResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.AddOrUpdateRemoteClusterResponse + ], + ]: """AddOrUpdateRemoteCluster adds or updates remote cluster.""" + @abc.abstractmethod def RemoveRemoteCluster( self, request: temporalio.api.operatorservice.v1.request_response_pb2.RemoveRemoteClusterRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.RemoveRemoteClusterResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.RemoveRemoteClusterResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.RemoveRemoteClusterResponse + ], + ]: """RemoveRemoteCluster removes remote cluster.""" + @abc.abstractmethod def ListClusters( self, request: temporalio.api.operatorservice.v1.request_response_pb2.ListClustersRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.ListClustersResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.ListClustersResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.ListClustersResponse + ], + ]: """ListClusters returns information about Temporal clusters.""" + @abc.abstractmethod def GetNexusEndpoint( self, request: temporalio.api.operatorservice.v1.request_response_pb2.GetNexusEndpointRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.operatorservice.v1.request_response_pb2.GetNexusEndpointResponse - ): + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.GetNexusEndpointResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.GetNexusEndpointResponse + ], + ]: """Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates.""" + @abc.abstractmethod def CreateNexusEndpoint( self, request: temporalio.api.operatorservice.v1.request_response_pb2.CreateNexusEndpointRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.CreateNexusEndpointResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.CreateNexusEndpointResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.CreateNexusEndpointResponse + ], + ]: """Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of ALREADY_EXISTS. Returns the created endpoint with its initial version. You may use this version for subsequent updates. """ + @abc.abstractmethod def UpdateNexusEndpoint( self, request: temporalio.api.operatorservice.v1.request_response_pb2.UpdateNexusEndpointRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.UpdateNexusEndpointResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.UpdateNexusEndpointResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.UpdateNexusEndpointResponse + ], + ]: """Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or `ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not match. Returns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't need to increment the version yourself. The server will increment the version for you after each update. """ + @abc.abstractmethod def DeleteNexusEndpoint( self, request: temporalio.api.operatorservice.v1.request_response_pb2.DeleteNexusEndpointRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.DeleteNexusEndpointResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.DeleteNexusEndpointResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.DeleteNexusEndpointResponse + ], + ]: """Delete an incoming Nexus service by ID.""" + @abc.abstractmethod def ListNexusEndpoints( self, request: temporalio.api.operatorservice.v1.request_response_pb2.ListNexusEndpointsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.operatorservice.v1.request_response_pb2.ListNexusEndpointsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.operatorservice.v1.request_response_pb2.ListNexusEndpointsResponse, + collections.abc.Awaitable[ + temporalio.api.operatorservice.v1.request_response_pb2.ListNexusEndpointsResponse + ], + ]: """List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the next_page_token field of the previous response to get the next page of results. An empty next_page_token indicates that there are no more results. During pagination, a newly added service with an ID lexicographically @@ -213,5 +407,6 @@ class OperatorServiceServicer(metaclass=abc.ABCMeta): """ def add_OperatorServiceServicer_to_server( - servicer: OperatorServiceServicer, server: grpc.Server + servicer: OperatorServiceServicer, + server: typing.Union[grpc.Server, grpc.aio.Server], ) -> None: ... diff --git a/temporalio/api/protocol/v1/message_pb2.py b/temporalio/api/protocol/v1/message_pb2.py index f91d621575..e9ca64f6a2 100644 --- a/temporalio/api/protocol/v1/message_pb2.py +++ b/temporalio/api/protocol/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -20,19 +19,8 @@ b'\n&temporal/api/protocol/v1/message.proto\x12\x18temporal.api.protocol.v1\x1a\x19google/protobuf/any.proto"\x95\x01\n\x07Message\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x14protocol_instance_id\x18\x02 \x01(\t\x12\x12\n\x08\x65vent_id\x18\x03 \x01(\x03H\x00\x12\x17\n\rcommand_index\x18\x04 \x01(\x03H\x00\x12"\n\x04\x62ody\x18\x05 \x01(\x0b\x32\x14.google.protobuf.AnyB\x0f\n\rsequencing_idB\x93\x01\n\x1bio.temporal.api.protocol.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/protocol/v1;protocol\xaa\x02\x1aTemporalio.Api.Protocol.V1\xea\x02\x1dTemporalio::Api::Protocol::V1b\x06proto3' ) - -_MESSAGE = DESCRIPTOR.message_types_by_name["Message"] -Message = _reflection.GeneratedProtocolMessageType( - "Message", - (_message.Message,), - { - "DESCRIPTOR": _MESSAGE, - "__module__": "temporalio.api.protocol.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.protocol.v1.Message) - }, -) -_sym_db.RegisterMessage(Message) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\033io.temporal.api.protocol.v1B\014MessageProtoP\001Z'go.temporal.io/api/protocol/v1;protocol\252\002\032Temporalio.Api.Protocol.V1\352\002\035Temporalio::Api::Protocol::V1" diff --git a/temporalio/api/protocol/v1/message_pb2.pyi b/temporalio/api/protocol/v1/message_pb2.pyi index 24034c89e8..e873ebd628 100644 --- a/temporalio/api/protocol/v1/message_pb2.pyi +++ b/temporalio/api/protocol/v1/message_pb2.pyi @@ -4,19 +4,15 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.any_pb2 import google.protobuf.descriptor import google.protobuf.message -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class Message(google.protobuf.message.Message): """(-- api-linter: core::0146::any=disabled aip.dev/not-precedent: We want runtime extensibility for the body field --) @@ -42,6 +38,7 @@ class Message(google.protobuf.message.Message): """The opaque data carried by this message. The protocol type can be extracted from the package name of the message carried inside the Any. """ + def __init__( self, *, @@ -53,7 +50,7 @@ class Message(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "body", b"body", "command_index", @@ -66,7 +63,7 @@ class Message(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "body", b"body", "command_index", @@ -82,7 +79,7 @@ class Message(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["sequencing_id", b"sequencing_id"] - ) -> typing_extensions.Literal["event_id", "command_index"] | None: ... + self, oneof_group: typing.Literal["sequencing_id", b"sequencing_id"] + ) -> typing.Literal["event_id", "command_index"] | None: ... global___Message = Message diff --git a/temporalio/api/protometa/__init__.py b/temporalio/api/protometa/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/temporalio/api/protometa/v1/__init__.py b/temporalio/api/protometa/v1/__init__.py new file mode 100644 index 0000000000..b63c2e8df9 --- /dev/null +++ b/temporalio/api/protometa/v1/__init__.py @@ -0,0 +1,5 @@ +from .annotations_pb2 import RequestHeaderAnnotation + +__all__ = [ + "RequestHeaderAnnotation", +] diff --git a/temporalio/api/protometa/v1/annotations_pb2.py b/temporalio/api/protometa/v1/annotations_pb2.py new file mode 100644 index 0000000000..74a2d94ca3 --- /dev/null +++ b/temporalio/api/protometa/v1/annotations_pb2.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/protometa/v1/annotations.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n+temporal/api/protometa/v1/annotations.proto\x12\x19temporal.api.protometa.v1\x1a google/protobuf/descriptor.proto"8\n\x17RequestHeaderAnnotation\x12\x0e\n\x06header\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:m\n\x0erequest_header\x12\x1e.google.protobuf.MethodOptions\x18\xd1\xc3\xb9\x03 \x03(\x0b\x32\x32.temporal.api.protometa.v1.RequestHeaderAnnotationB\x9c\x01\n\x1cio.temporal.api.protometa.v1B\x10\x41nnotationsProtoP\x01Z)go.temporal.io/api/protometa/v1;protometa\xaa\x02\x1bTemporalio.Api.Protometa.V1\xea\x02\x1eTemporalio::Api::Protometa::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension( + request_header + ) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\034io.temporal.api.protometa.v1B\020AnnotationsProtoP\001Z)go.temporal.io/api/protometa/v1;protometa\252\002\033Temporalio.Api.Protometa.V1\352\002\036Temporalio::Api::Protometa::V1" + _REQUESTHEADERANNOTATION._serialized_start = 108 + _REQUESTHEADERANNOTATION._serialized_end = 164 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/protometa/v1/annotations_pb2.pyi b/temporalio/api/protometa/v1/annotations_pb2.pyi new file mode 100644 index 0000000000..a0f7c2221f --- /dev/null +++ b/temporalio/api/protometa/v1/annotations_pb2.pyi @@ -0,0 +1,59 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import typing + +import google.protobuf.descriptor +import google.protobuf.descriptor_pb2 +import google.protobuf.internal.containers +import google.protobuf.internal.extension_dict +import google.protobuf.message + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class RequestHeaderAnnotation(google.protobuf.message.Message): + """RequestHeaderAnnotation allows specifying that field values from a request + should be propagated as outbound headers. + + The value field supports template interpolation where field paths enclosed + in braces will be replaced with the actual field values from the request. + For example: + value: "{workflow_execution.workflow_id}" + value: "workflow-{workflow_execution.workflow_id}" + value: "{namespace}/{workflow_execution.workflow_id}" + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HEADER_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + header: builtins.str + """The name of the header to set (e.g., "temporal-resource-id")""" + value: builtins.str + """A template string that may contain field paths in braces. + Field paths use dot notation to traverse nested messages. + Example: "{workflow_execution.workflow_id}" + """ + def __init__( + self, + *, + header: builtins.str = ..., + value: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["header", b"header", "value", b"value"] + ) -> None: ... + +global___RequestHeaderAnnotation = RequestHeaderAnnotation + +REQUEST_HEADER_FIELD_NUMBER: builtins.int +request_header: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[ + google.protobuf.descriptor_pb2.MethodOptions, + google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___RequestHeaderAnnotation + ], +] diff --git a/temporalio/api/query/v1/message_pb2.py b/temporalio/api/query/v1/message_pb2.py index aaee2715a2..a3a4b4c8e7 100644 --- a/temporalio/api/query/v1/message_pb2.py +++ b/temporalio/api/query/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -31,43 +30,8 @@ b'\n#temporal/api/query/v1/message.proto\x12\x15temporal.api.query.v1\x1a!temporal/api/enums/v1/query.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto"\x89\x01\n\rWorkflowQuery\x12\x12\n\nquery_type\x18\x01 \x01(\t\x12\x34\n\nquery_args\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header"\xce\x01\n\x13WorkflowQueryResult\x12;\n\x0bresult_type\x18\x01 \x01(\x0e\x32&.temporal.api.enums.v1.QueryResultType\x12\x30\n\x06\x61nswer\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x15\n\rerror_message\x18\x03 \x01(\t\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"O\n\rQueryRejected\x12>\n\x06status\x18\x01 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatusB\x84\x01\n\x18io.temporal.api.query.v1B\x0cMessageProtoP\x01Z!go.temporal.io/api/query/v1;query\xaa\x02\x17Temporalio.Api.Query.V1\xea\x02\x1aTemporalio::Api::Query::V1b\x06proto3' ) - -_WORKFLOWQUERY = DESCRIPTOR.message_types_by_name["WorkflowQuery"] -_WORKFLOWQUERYRESULT = DESCRIPTOR.message_types_by_name["WorkflowQueryResult"] -_QUERYREJECTED = DESCRIPTOR.message_types_by_name["QueryRejected"] -WorkflowQuery = _reflection.GeneratedProtocolMessageType( - "WorkflowQuery", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWQUERY, - "__module__": "temporalio.api.query.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.query.v1.WorkflowQuery) - }, -) -_sym_db.RegisterMessage(WorkflowQuery) - -WorkflowQueryResult = _reflection.GeneratedProtocolMessageType( - "WorkflowQueryResult", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWQUERYRESULT, - "__module__": "temporalio.api.query.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.query.v1.WorkflowQueryResult) - }, -) -_sym_db.RegisterMessage(WorkflowQueryResult) - -QueryRejected = _reflection.GeneratedProtocolMessageType( - "QueryRejected", - (_message.Message,), - { - "DESCRIPTOR": _QUERYREJECTED, - "__module__": "temporalio.api.query.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.query.v1.QueryRejected) - }, -) -_sym_db.RegisterMessage(QueryRejected) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.query.v1B\014MessageProtoP\001Z!go.temporal.io/api/query/v1;query\252\002\027Temporalio.Api.Query.V1\352\002\032Temporalio::Api::Query::V1" diff --git a/temporalio/api/query/v1/message_pb2.pyi b/temporalio/api/query/v1/message_pb2.pyi index 199c51b9a7..2c131edab2 100644 --- a/temporalio/api/query/v1/message_pb2.pyi +++ b/temporalio/api/query/v1/message_pb2.pyi @@ -4,7 +4,7 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.message @@ -14,13 +14,9 @@ import temporalio.api.enums.v1.query_pb2 import temporalio.api.enums.v1.workflow_pb2 import temporalio.api.failure.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowQuery(google.protobuf.message.Message): """See https://docs.temporal.io/docs/concepts/queries/""" @@ -34,11 +30,13 @@ class WorkflowQuery(google.protobuf.message.Message): @property def query_args(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Serialized arguments that will be provided to the query handler.""" + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: """Headers that were passed by the caller of the query and copied by temporal server into the workflow task. """ + def __init__( self, *, @@ -48,13 +46,11 @@ class WorkflowQuery(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "header", b"header", "query_args", b"query_args" - ], + field_name: typing.Literal["header", b"header", "query_args", b"query_args"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "query_args", @@ -66,6 +62,7 @@ class WorkflowQuery(google.protobuf.message.Message): global___WorkflowQuery = WorkflowQuery +@typing.final class WorkflowQueryResult(google.protobuf.message.Message): """Answer to a `WorkflowQuery`""" @@ -77,21 +74,23 @@ class WorkflowQueryResult(google.protobuf.message.Message): FAILURE_FIELD_NUMBER: builtins.int result_type: temporalio.api.enums.v1.query_pb2.QueryResultType.ValueType """Did the query succeed or fail?""" + error_message: builtins.str + """Mutually exclusive with `answer`. Set when the query fails. + See also the newer `failure` field. + """ @property def answer(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Set when the query succeeds with the results. Mutually exclusive with `error_message` and `failure`. """ - error_message: builtins.str - """Mutually exclusive with `answer`. Set when the query fails. - See also the newer `failure` field. - """ + @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """The full reason for this query failure. This field is newer than `error_message` and can be encoded by the SDK's failure converter to support E2E encryption of messages and stack traces. Mutually exclusive with `answer`. Set when the query fails. """ + def __init__( self, *, @@ -101,14 +100,11 @@ class WorkflowQueryResult(google.protobuf.message.Message): failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "answer", b"answer", "failure", b"failure" - ], + self, field_name: typing.Literal["answer", b"answer", "failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "answer", b"answer", "error_message", @@ -122,6 +118,7 @@ class WorkflowQueryResult(google.protobuf.message.Message): global___WorkflowQueryResult = WorkflowQueryResult +@typing.final class QueryRejected(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -132,8 +129,6 @@ class QueryRejected(google.protobuf.message.Message): *, status: temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["status", b"status"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["status", b"status"]) -> None: ... global___QueryRejected = QueryRejected diff --git a/temporalio/api/replication/v1/message_pb2.py b/temporalio/api/replication/v1/message_pb2.py index 8dbe73e1d1..78773c0e6b 100644 --- a/temporalio/api/replication/v1/message_pb2.py +++ b/temporalio/api/replication/v1/message_pb2.py @@ -5,15 +5,15 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from temporalio.api.enums.v1 import ( @@ -21,55 +21,18 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n)temporal/api/replication/v1/message.proto\x12\x1btemporal.api.replication.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a%temporal/api/enums/v1/namespace.proto"0\n\x18\x43lusterReplicationConfig\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t"\xba\x01\n\x1aNamespaceReplicationConfig\x12\x1b\n\x13\x61\x63tive_cluster_name\x18\x01 \x01(\t\x12G\n\x08\x63lusters\x18\x02 \x03(\x0b\x32\x35.temporal.api.replication.v1.ClusterReplicationConfig\x12\x36\n\x05state\x18\x03 \x01(\x0e\x32\'.temporal.api.enums.v1.ReplicationState"]\n\x0e\x46\x61iloverStatus\x12\x31\n\rfailover_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10\x66\x61ilover_version\x18\x02 \x01(\x03\x42\xa2\x01\n\x1eio.temporal.api.replication.v1B\x0cMessageProtoP\x01Z-go.temporal.io/api/replication/v1;replication\xaa\x02\x1dTemporalio.Api.Replication.V1\xea\x02 Temporalio::Api::Replication::V1b\x06proto3' + b'\n)temporal/api/replication/v1/message.proto\x12\x1btemporal.api.replication.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a%temporal/api/enums/v1/namespace.proto"n\n\x18\x43lusterReplicationConfig\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t\x12<\n\x19replication_ramp_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration"\xba\x01\n\x1aNamespaceReplicationConfig\x12\x1b\n\x13\x61\x63tive_cluster_name\x18\x01 \x01(\t\x12G\n\x08\x63lusters\x18\x02 \x03(\x0b\x32\x35.temporal.api.replication.v1.ClusterReplicationConfig\x12\x36\n\x05state\x18\x03 \x01(\x0e\x32\'.temporal.api.enums.v1.ReplicationState"]\n\x0e\x46\x61iloverStatus\x12\x31\n\rfailover_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10\x66\x61ilover_version\x18\x02 \x01(\x03\x42\xa2\x01\n\x1eio.temporal.api.replication.v1B\x0cMessageProtoP\x01Z-go.temporal.io/api/replication/v1;replication\xaa\x02\x1dTemporalio.Api.Replication.V1\xea\x02 Temporalio::Api::Replication::V1b\x06proto3' ) - -_CLUSTERREPLICATIONCONFIG = DESCRIPTOR.message_types_by_name["ClusterReplicationConfig"] -_NAMESPACEREPLICATIONCONFIG = DESCRIPTOR.message_types_by_name[ - "NamespaceReplicationConfig" -] -_FAILOVERSTATUS = DESCRIPTOR.message_types_by_name["FailoverStatus"] -ClusterReplicationConfig = _reflection.GeneratedProtocolMessageType( - "ClusterReplicationConfig", - (_message.Message,), - { - "DESCRIPTOR": _CLUSTERREPLICATIONCONFIG, - "__module__": "temporalio.api.replication.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.replication.v1.ClusterReplicationConfig) - }, -) -_sym_db.RegisterMessage(ClusterReplicationConfig) - -NamespaceReplicationConfig = _reflection.GeneratedProtocolMessageType( - "NamespaceReplicationConfig", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEREPLICATIONCONFIG, - "__module__": "temporalio.api.replication.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.replication.v1.NamespaceReplicationConfig) - }, -) -_sym_db.RegisterMessage(NamespaceReplicationConfig) - -FailoverStatus = _reflection.GeneratedProtocolMessageType( - "FailoverStatus", - (_message.Message,), - { - "DESCRIPTOR": _FAILOVERSTATUS, - "__module__": "temporalio.api.replication.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.replication.v1.FailoverStatus) - }, -) -_sym_db.RegisterMessage(FailoverStatus) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\036io.temporal.api.replication.v1B\014MessageProtoP\001Z-go.temporal.io/api/replication/v1;replication\252\002\035Temporalio.Api.Replication.V1\352\002 Temporalio::Api::Replication::V1" - _CLUSTERREPLICATIONCONFIG._serialized_start = 146 - _CLUSTERREPLICATIONCONFIG._serialized_end = 194 - _NAMESPACEREPLICATIONCONFIG._serialized_start = 197 - _NAMESPACEREPLICATIONCONFIG._serialized_end = 383 - _FAILOVERSTATUS._serialized_start = 385 - _FAILOVERSTATUS._serialized_end = 478 + _CLUSTERREPLICATIONCONFIG._serialized_start = 178 + _CLUSTERREPLICATIONCONFIG._serialized_end = 288 + _NAMESPACEREPLICATIONCONFIG._serialized_start = 291 + _NAMESPACEREPLICATIONCONFIG._serialized_end = 477 + _FAILOVERSTATUS._serialized_start = 479 + _FAILOVERSTATUS._serialized_end = 572 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/replication/v1/message_pb2.pyi b/temporalio/api/replication/v1/message_pb2.pyi index e6f04334fa..3ca4ec4cab 100644 --- a/temporalio/api/replication/v1/message_pb2.pyi +++ b/temporalio/api/replication/v1/message_pb2.pyi @@ -5,38 +5,56 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor +import google.protobuf.duration_pb2 import google.protobuf.internal.containers import google.protobuf.message import google.protobuf.timestamp_pb2 import temporalio.api.enums.v1.namespace_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class ClusterReplicationConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor CLUSTER_NAME_FIELD_NUMBER: builtins.int + REPLICATION_RAMP_DURATION_FIELD_NUMBER: builtins.int cluster_name: builtins.str + @property + def replication_ramp_duration(self) -> google.protobuf.duration_pb2.Duration: + """Ramp duration when this cluster is added as passive by UpdateNamespace; unset or non-positive disables gradual connect. + This field is not persisted and is omitted from namespace responses. + """ + def __init__( self, *, cluster_name: builtins.str = ..., + replication_ramp_duration: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "replication_ramp_duration", b"replication_ramp_duration" + ], + ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["cluster_name", b"cluster_name"] + self, + field_name: typing.Literal[ + "cluster_name", + b"cluster_name", + "replication_ramp_duration", + b"replication_ramp_duration", + ], ) -> None: ... global___ClusterReplicationConfig = ClusterReplicationConfig +@typing.final class NamespaceReplicationConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -44,13 +62,13 @@ class NamespaceReplicationConfig(google.protobuf.message.Message): CLUSTERS_FIELD_NUMBER: builtins.int STATE_FIELD_NUMBER: builtins.int active_cluster_name: builtins.str + state: temporalio.api.enums.v1.namespace_pb2.ReplicationState.ValueType @property def clusters( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ global___ClusterReplicationConfig ]: ... - state: temporalio.api.enums.v1.namespace_pb2.ReplicationState.ValueType def __init__( self, *, @@ -61,7 +79,7 @@ class NamespaceReplicationConfig(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "active_cluster_name", b"active_cluster_name", "clusters", @@ -73,6 +91,7 @@ class NamespaceReplicationConfig(google.protobuf.message.Message): global___NamespaceReplicationConfig = NamespaceReplicationConfig +@typing.final class FailoverStatus(google.protobuf.message.Message): """Represents a historical replication status of a Namespace""" @@ -80,10 +99,11 @@ class FailoverStatus(google.protobuf.message.Message): FAILOVER_TIME_FIELD_NUMBER: builtins.int FAILOVER_VERSION_FIELD_NUMBER: builtins.int + failover_version: builtins.int @property def failover_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Timestamp when the Cluster switched to the following failover_version""" - failover_version: builtins.int + def __init__( self, *, @@ -91,11 +111,11 @@ class FailoverStatus(google.protobuf.message.Message): failover_version: builtins.int = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failover_time", b"failover_time"] + self, field_name: typing.Literal["failover_time", b"failover_time"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failover_time", b"failover_time", "failover_version", b"failover_version" ], ) -> None: ... diff --git a/temporalio/api/rules/v1/message_pb2.py b/temporalio/api/rules/v1/message_pb2.py index ad0d0014c4..d705cc13c6 100644 --- a/temporalio/api/rules/v1/message_pb2.py +++ b/temporalio/api/rules/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -20,69 +19,8 @@ b'\n#temporal/api/rules/v1/message.proto\x12\x15temporal.api.rules.v1\x1a\x1fgoogle/protobuf/timestamp.proto"\x8f\x01\n\x12WorkflowRuleAction\x12W\n\x0e\x61\x63tivity_pause\x18\x01 \x01(\x0b\x32=.temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPauseH\x00\x1a\x15\n\x13\x41\x63tionActivityPauseB\t\n\x07variant"\xbd\x02\n\x10WorkflowRuleSpec\x12\n\n\x02id\x18\x01 \x01(\t\x12Y\n\x0e\x61\x63tivity_start\x18\x02 \x01(\x0b\x32?.temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTriggerH\x00\x12\x18\n\x10visibility_query\x18\x03 \x01(\t\x12:\n\x07\x61\x63tions\x18\x04 \x03(\x0b\x32).temporal.api.rules.v1.WorkflowRuleAction\x12\x33\n\x0f\x65xpiration_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a,\n\x17\x41\x63tivityStartingTrigger\x12\x11\n\tpredicate\x18\x01 \x01(\tB\t\n\x07trigger"\xa8\x01\n\x0cWorkflowRule\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x04spec\x18\x02 \x01(\x0b\x32\'.temporal.api.rules.v1.WorkflowRuleSpec\x12\x1b\n\x13\x63reated_by_identity\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x84\x01\n\x18io.temporal.api.rules.v1B\x0cMessageProtoP\x01Z!go.temporal.io/api/rules/v1;rules\xaa\x02\x17Temporalio.Api.Rules.V1\xea\x02\x1aTemporalio::Api::Rules::V1b\x06proto3' ) - -_WORKFLOWRULEACTION = DESCRIPTOR.message_types_by_name["WorkflowRuleAction"] -_WORKFLOWRULEACTION_ACTIONACTIVITYPAUSE = _WORKFLOWRULEACTION.nested_types_by_name[ - "ActionActivityPause" -] -_WORKFLOWRULESPEC = DESCRIPTOR.message_types_by_name["WorkflowRuleSpec"] -_WORKFLOWRULESPEC_ACTIVITYSTARTINGTRIGGER = _WORKFLOWRULESPEC.nested_types_by_name[ - "ActivityStartingTrigger" -] -_WORKFLOWRULE = DESCRIPTOR.message_types_by_name["WorkflowRule"] -WorkflowRuleAction = _reflection.GeneratedProtocolMessageType( - "WorkflowRuleAction", - (_message.Message,), - { - "ActionActivityPause": _reflection.GeneratedProtocolMessageType( - "ActionActivityPause", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWRULEACTION_ACTIONACTIVITYPAUSE, - "__module__": "temporalio.api.rules.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.rules.v1.WorkflowRuleAction.ActionActivityPause) - }, - ), - "DESCRIPTOR": _WORKFLOWRULEACTION, - "__module__": "temporalio.api.rules.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.rules.v1.WorkflowRuleAction) - }, -) -_sym_db.RegisterMessage(WorkflowRuleAction) -_sym_db.RegisterMessage(WorkflowRuleAction.ActionActivityPause) - -WorkflowRuleSpec = _reflection.GeneratedProtocolMessageType( - "WorkflowRuleSpec", - (_message.Message,), - { - "ActivityStartingTrigger": _reflection.GeneratedProtocolMessageType( - "ActivityStartingTrigger", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWRULESPEC_ACTIVITYSTARTINGTRIGGER, - "__module__": "temporalio.api.rules.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.rules.v1.WorkflowRuleSpec.ActivityStartingTrigger) - }, - ), - "DESCRIPTOR": _WORKFLOWRULESPEC, - "__module__": "temporalio.api.rules.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.rules.v1.WorkflowRuleSpec) - }, -) -_sym_db.RegisterMessage(WorkflowRuleSpec) -_sym_db.RegisterMessage(WorkflowRuleSpec.ActivityStartingTrigger) - -WorkflowRule = _reflection.GeneratedProtocolMessageType( - "WorkflowRule", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWRULE, - "__module__": "temporalio.api.rules.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.rules.v1.WorkflowRule) - }, -) -_sym_db.RegisterMessage(WorkflowRule) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\030io.temporal.api.rules.v1B\014MessageProtoP\001Z!go.temporal.io/api/rules/v1;rules\252\002\027Temporalio.Api.Rules.V1\352\002\032Temporalio::Api::Rules::V1" diff --git a/temporalio/api/rules/v1/message_pb2.pyi b/temporalio/api/rules/v1/message_pb2.pyi index ef036f5544..3215b7c12a 100644 --- a/temporalio/api/rules/v1/message_pb2.pyi +++ b/temporalio/api/rules/v1/message_pb2.pyi @@ -5,23 +5,20 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message import google.protobuf.timestamp_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowRuleAction(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class ActionActivityPause(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -39,25 +36,27 @@ class WorkflowRuleAction(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_pause", b"activity_pause", "variant", b"variant" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_pause", b"activity_pause", "variant", b"variant" ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["activity_pause"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["activity_pause"] | None: ... global___WorkflowRuleAction = WorkflowRuleAction +@typing.final class WorkflowRuleSpec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class ActivityStartingTrigger(google.protobuf.message.Message): """Activity trigger will be triggered when an activity is about to start.""" @@ -86,7 +85,7 @@ class WorkflowRuleSpec(google.protobuf.message.Message): predicate: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["predicate", b"predicate"] + self, field_name: typing.Literal["predicate", b"predicate"] ) -> None: ... ID_FIELD_NUMBER: builtins.int @@ -98,8 +97,6 @@ class WorkflowRuleSpec(google.protobuf.message.Message): """The id of the new workflow rule. Must be unique within the namespace. Can be set by the user, and can have business meaning. """ - @property - def activity_start(self) -> global___WorkflowRuleSpec.ActivityStartingTrigger: ... visibility_query: builtins.str """Restricted Visibility query. This query is used to filter workflows in this namespace to which this rule should apply. @@ -111,17 +108,21 @@ class WorkflowRuleSpec(google.protobuf.message.Message): - ExecutionStatus """ @property + def activity_start(self) -> global___WorkflowRuleSpec.ActivityStartingTrigger: ... + @property def actions( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ global___WorkflowRuleAction ]: """WorkflowRuleAction to be taken when the rule is triggered and predicate is matched.""" + @property def expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Expiration time of the rule. After this time, the rule will be deleted. Can be empty if the rule should never expire. """ + def __init__( self, *, @@ -133,7 +134,7 @@ class WorkflowRuleSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_start", b"activity_start", "expiration_time", @@ -144,7 +145,7 @@ class WorkflowRuleSpec(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "actions", b"actions", "activity_start", @@ -160,11 +161,12 @@ class WorkflowRuleSpec(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["trigger", b"trigger"] - ) -> typing_extensions.Literal["activity_start"] | None: ... + self, oneof_group: typing.Literal["trigger", b"trigger"] + ) -> typing.Literal["activity_start"] | None: ... global___WorkflowRuleSpec = WorkflowRuleSpec +@typing.final class WorkflowRule(google.protobuf.message.Message): """WorkflowRule describes a rule that can be applied to any workflow in this namespace.""" @@ -174,12 +176,6 @@ class WorkflowRule(google.protobuf.message.Message): SPEC_FIELD_NUMBER: builtins.int CREATED_BY_IDENTITY_FIELD_NUMBER: builtins.int DESCRIPTION_FIELD_NUMBER: builtins.int - @property - def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: - """Rule creation time.""" - @property - def spec(self) -> global___WorkflowRuleSpec: - """Rule specification""" created_by_identity: builtins.str """Identity of the actor that created the rule (-- api-linter: core::0140::prepositions=disabled @@ -189,6 +185,14 @@ class WorkflowRule(google.protobuf.message.Message): """ description: builtins.str """Rule description.""" + @property + def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Rule creation time.""" + + @property + def spec(self) -> global___WorkflowRuleSpec: + """Rule specification""" + def __init__( self, *, @@ -198,14 +202,11 @@ class WorkflowRule(google.protobuf.message.Message): description: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "create_time", b"create_time", "spec", b"spec" - ], + self, field_name: typing.Literal["create_time", b"create_time", "spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "created_by_identity", diff --git a/temporalio/api/schedule/v1/message_pb2.py b/temporalio/api/schedule/v1/message_pb2.py index 77fc3ce572..5975b25808 100644 --- a/temporalio/api/schedule/v1/message_pb2.py +++ b/temporalio/api/schedule/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -31,204 +30,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n&temporal/api/schedule/v1/message.proto\x12\x18temporal.api.schedule.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/schedule.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a&temporal/api/workflow/v1/message.proto"\x95\x01\n\x0c\x43\x61lendarSpec\x12\x0e\n\x06second\x18\x01 \x01(\t\x12\x0e\n\x06minute\x18\x02 \x01(\t\x12\x0c\n\x04hour\x18\x03 \x01(\t\x12\x14\n\x0c\x64\x61y_of_month\x18\x04 \x01(\t\x12\r\n\x05month\x18\x05 \x01(\t\x12\x0c\n\x04year\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x61y_of_week\x18\x07 \x01(\t\x12\x0f\n\x07\x63omment\x18\x08 \x01(\t"1\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x12\x0c\n\x04step\x18\x03 \x01(\x05"\x86\x03\n\x16StructuredCalendarSpec\x12/\n\x06second\x18\x01 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12/\n\x06minute\x18\x02 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12-\n\x04hour\x18\x03 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12\x35\n\x0c\x64\x61y_of_month\x18\x04 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12.\n\x05month\x18\x05 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12-\n\x04year\x18\x06 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12\x34\n\x0b\x64\x61y_of_week\x18\x07 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12\x0f\n\x07\x63omment\x18\x08 \x01(\t"e\n\x0cIntervalSpec\x12+\n\x08interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x05phase\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration"\xba\x04\n\x0cScheduleSpec\x12M\n\x13structured_calendar\x18\x07 \x03(\x0b\x32\x30.temporal.api.schedule.v1.StructuredCalendarSpec\x12\x13\n\x0b\x63ron_string\x18\x08 \x03(\t\x12\x38\n\x08\x63\x61lendar\x18\x01 \x03(\x0b\x32&.temporal.api.schedule.v1.CalendarSpec\x12\x38\n\x08interval\x18\x02 \x03(\x0b\x32&.temporal.api.schedule.v1.IntervalSpec\x12\x44\n\x10\x65xclude_calendar\x18\x03 \x03(\x0b\x32&.temporal.api.schedule.v1.CalendarSpecB\x02\x18\x01\x12U\n\x1b\x65xclude_structured_calendar\x18\t \x03(\x0b\x32\x30.temporal.api.schedule.v1.StructuredCalendarSpec\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x06jitter\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rtimezone_name\x18\n \x01(\t\x12\x15\n\rtimezone_data\x18\x0b \x01(\x0c"\xc8\x01\n\x10SchedulePolicies\x12\x44\n\x0eoverlap_policy\x18\x01 \x01(\x0e\x32,.temporal.api.enums.v1.ScheduleOverlapPolicy\x12\x31\n\x0e\x63\x61tchup_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10pause_on_failure\x18\x03 \x01(\x08\x12!\n\x19keep_original_workflow_id\x18\x04 \x01(\x08"h\n\x0eScheduleAction\x12L\n\x0estart_workflow\x18\x01 \x01(\x0b\x32\x32.temporal.api.workflow.v1.NewWorkflowExecutionInfoH\x00\x42\x08\n\x06\x61\x63tion"\x93\x02\n\x14ScheduleActionResult\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x61\x63tual_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12H\n\x15start_workflow_result\x18\x0b \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12M\n\x15start_workflow_status\x18\x0c \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatus"b\n\rScheduleState\x12\r\n\x05notes\x18\x01 \x01(\t\x12\x0e\n\x06paused\x18\x02 \x01(\x08\x12\x17\n\x0flimited_actions\x18\x03 \x01(\x08\x12\x19\n\x11remaining_actions\x18\x04 \x01(\x03"\x95\x01\n\x19TriggerImmediatelyRequest\x12\x44\n\x0eoverlap_policy\x18\x01 \x01(\x0e\x32,.temporal.api.enums.v1.ScheduleOverlapPolicy\x12\x32\n\x0escheduled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xb5\x01\n\x0f\x42\x61\x63kfillRequest\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x0eoverlap_policy\x18\x03 \x01(\x0e\x32,.temporal.api.enums.v1.ScheduleOverlapPolicy"\xc6\x01\n\rSchedulePatch\x12P\n\x13trigger_immediately\x18\x01 \x01(\x0b\x32\x33.temporal.api.schedule.v1.TriggerImmediatelyRequest\x12\x43\n\x10\x62\x61\x63kfill_request\x18\x02 \x03(\x0b\x32).temporal.api.schedule.v1.BackfillRequest\x12\r\n\x05pause\x18\x03 \x01(\t\x12\x0f\n\x07unpause\x18\x04 \x01(\t"\xd6\x03\n\x0cScheduleInfo\x12\x14\n\x0c\x61\x63tion_count\x18\x01 \x01(\x03\x12\x1d\n\x15missed_catchup_window\x18\x02 \x01(\x03\x12\x17\n\x0foverlap_skipped\x18\x03 \x01(\x03\x12\x16\n\x0e\x62uffer_dropped\x18\n \x01(\x03\x12\x13\n\x0b\x62uffer_size\x18\x0b \x01(\x03\x12\x44\n\x11running_workflows\x18\t \x03(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x46\n\x0erecent_actions\x18\x04 \x03(\x0b\x32..temporal.api.schedule.v1.ScheduleActionResult\x12\x37\n\x13\x66uture_action_times\x18\x05 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12"\n\x16invalid_schedule_error\x18\x08 \x01(\tB\x02\x18\x01"\xf0\x01\n\x08Schedule\x12\x34\n\x04spec\x18\x01 \x01(\x0b\x32&.temporal.api.schedule.v1.ScheduleSpec\x12\x38\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32(.temporal.api.schedule.v1.ScheduleAction\x12<\n\x08policies\x18\x03 \x01(\x0b\x32*.temporal.api.schedule.v1.SchedulePolicies\x12\x36\n\x05state\x18\x04 \x01(\x0b\x32\'.temporal.api.schedule.v1.ScheduleState"\xa5\x02\n\x10ScheduleListInfo\x12\x34\n\x04spec\x18\x01 \x01(\x0b\x32&.temporal.api.schedule.v1.ScheduleSpec\x12;\n\rworkflow_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\r\n\x05notes\x18\x03 \x01(\t\x12\x0e\n\x06paused\x18\x04 \x01(\x08\x12\x46\n\x0erecent_actions\x18\x05 \x03(\x0b\x32..temporal.api.schedule.v1.ScheduleActionResult\x12\x37\n\x13\x66uture_action_times\x18\x06 \x03(\x0b\x32\x1a.google.protobuf.Timestamp"\xd3\x01\n\x11ScheduleListEntry\x12\x13\n\x0bschedule_id\x18\x01 \x01(\t\x12*\n\x04memo\x18\x02 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x03 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x38\n\x04info\x18\x04 \x01(\x0b\x32*.temporal.api.schedule.v1.ScheduleListInfoB\x93\x01\n\x1bio.temporal.api.schedule.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/schedule/v1;schedule\xaa\x02\x1aTemporalio.Api.Schedule.V1\xea\x02\x1dTemporalio::Api::Schedule::V1b\x06proto3' + b'\n&temporal/api/schedule/v1/message.proto\x12\x18temporal.api.schedule.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/schedule.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a&temporal/api/workflow/v1/message.proto"\x95\x01\n\x0c\x43\x61lendarSpec\x12\x0e\n\x06second\x18\x01 \x01(\t\x12\x0e\n\x06minute\x18\x02 \x01(\t\x12\x0c\n\x04hour\x18\x03 \x01(\t\x12\x14\n\x0c\x64\x61y_of_month\x18\x04 \x01(\t\x12\r\n\x05month\x18\x05 \x01(\t\x12\x0c\n\x04year\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x61y_of_week\x18\x07 \x01(\t\x12\x0f\n\x07\x63omment\x18\x08 \x01(\t"1\n\x05Range\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x12\x0c\n\x04step\x18\x03 \x01(\x05"\x86\x03\n\x16StructuredCalendarSpec\x12/\n\x06second\x18\x01 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12/\n\x06minute\x18\x02 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12-\n\x04hour\x18\x03 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12\x35\n\x0c\x64\x61y_of_month\x18\x04 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12.\n\x05month\x18\x05 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12-\n\x04year\x18\x06 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12\x34\n\x0b\x64\x61y_of_week\x18\x07 \x03(\x0b\x32\x1f.temporal.api.schedule.v1.Range\x12\x0f\n\x07\x63omment\x18\x08 \x01(\t"e\n\x0cIntervalSpec\x12+\n\x08interval\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12(\n\x05phase\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration"\xba\x04\n\x0cScheduleSpec\x12M\n\x13structured_calendar\x18\x07 \x03(\x0b\x32\x30.temporal.api.schedule.v1.StructuredCalendarSpec\x12\x13\n\x0b\x63ron_string\x18\x08 \x03(\t\x12\x38\n\x08\x63\x61lendar\x18\x01 \x03(\x0b\x32&.temporal.api.schedule.v1.CalendarSpec\x12\x38\n\x08interval\x18\x02 \x03(\x0b\x32&.temporal.api.schedule.v1.IntervalSpec\x12\x44\n\x10\x65xclude_calendar\x18\x03 \x03(\x0b\x32&.temporal.api.schedule.v1.CalendarSpecB\x02\x18\x01\x12U\n\x1b\x65xclude_structured_calendar\x18\t \x03(\x0b\x32\x30.temporal.api.schedule.v1.StructuredCalendarSpec\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x06jitter\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rtimezone_name\x18\n \x01(\t\x12\x15\n\rtimezone_data\x18\x0b \x01(\x0c"\xc8\x01\n\x10SchedulePolicies\x12\x44\n\x0eoverlap_policy\x18\x01 \x01(\x0e\x32,.temporal.api.enums.v1.ScheduleOverlapPolicy\x12\x31\n\x0e\x63\x61tchup_window\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10pause_on_failure\x18\x03 \x01(\x08\x12!\n\x19keep_original_workflow_id\x18\x04 \x01(\x08"h\n\x0eScheduleAction\x12L\n\x0estart_workflow\x18\x01 \x01(\x0b\x32\x32.temporal.api.workflow.v1.NewWorkflowExecutionInfoH\x00\x42\x08\n\x06\x61\x63tion"\x93\x02\n\x14ScheduleActionResult\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x61\x63tual_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12H\n\x15start_workflow_result\x18\x0b \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12M\n\x15start_workflow_status\x18\x0c \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatus"b\n\rScheduleState\x12\r\n\x05notes\x18\x01 \x01(\t\x12\x0e\n\x06paused\x18\x02 \x01(\x08\x12\x17\n\x0flimited_actions\x18\x03 \x01(\x08\x12\x19\n\x11remaining_actions\x18\x04 \x01(\x03"\x95\x01\n\x19TriggerImmediatelyRequest\x12\x44\n\x0eoverlap_policy\x18\x01 \x01(\x0e\x32,.temporal.api.enums.v1.ScheduleOverlapPolicy\x12\x32\n\x0escheduled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xb5\x01\n\x0f\x42\x61\x63kfillRequest\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x0eoverlap_policy\x18\x03 \x01(\x0e\x32,.temporal.api.enums.v1.ScheduleOverlapPolicy"\x90\x02\n\rSchedulePatch\x12P\n\x13trigger_immediately\x18\x01 \x01(\x0b\x32\x33.temporal.api.schedule.v1.TriggerImmediatelyRequest\x12\x43\n\x10\x62\x61\x63kfill_request\x18\x02 \x03(\x0b\x32).temporal.api.schedule.v1.BackfillRequest\x12\r\n\x05pause\x18\x03 \x01(\t\x12\x0f\n\x07unpause\x18\x04 \x01(\t\x12H\n\x14time_skipping_config\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.TimeSkippingConfig"\xb6\x04\n\x0cScheduleInfo\x12\x14\n\x0c\x61\x63tion_count\x18\x01 \x01(\x03\x12\x1d\n\x15missed_catchup_window\x18\x02 \x01(\x03\x12\x17\n\x0foverlap_skipped\x18\x03 \x01(\x03\x12\x16\n\x0e\x62uffer_dropped\x18\n \x01(\x03\x12\x13\n\x0b\x62uffer_size\x18\x0b \x01(\x03\x12\x44\n\x11running_workflows\x18\t \x03(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x46\n\x0erecent_actions\x18\x04 \x03(\x0b\x32..temporal.api.schedule.v1.ScheduleActionResult\x12\x37\n\x13\x66uture_action_times\x18\x05 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12"\n\x16invalid_schedule_error\x18\x08 \x01(\tB\x02\x18\x01\x12\x18\n\x10state_size_bytes\x18\x0c \x01(\x03\x12\x44\n\x12time_skipping_info\x18\r \x01(\x0b\x32(.temporal.api.common.v1.TimeSkippingInfo"\xf0\x01\n\x08Schedule\x12\x34\n\x04spec\x18\x01 \x01(\x0b\x32&.temporal.api.schedule.v1.ScheduleSpec\x12\x38\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32(.temporal.api.schedule.v1.ScheduleAction\x12<\n\x08policies\x18\x03 \x01(\x0b\x32*.temporal.api.schedule.v1.SchedulePolicies\x12\x36\n\x05state\x18\x04 \x01(\x0b\x32\'.temporal.api.schedule.v1.ScheduleState"\xbf\x02\n\x10ScheduleListInfo\x12\x34\n\x04spec\x18\x01 \x01(\x0b\x32&.temporal.api.schedule.v1.ScheduleSpec\x12;\n\rworkflow_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\r\n\x05notes\x18\x03 \x01(\t\x12\x0e\n\x06paused\x18\x04 \x01(\x08\x12\x46\n\x0erecent_actions\x18\x05 \x03(\x0b\x32..temporal.api.schedule.v1.ScheduleActionResult\x12\x37\n\x13\x66uture_action_times\x18\x06 \x03(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10state_size_bytes\x18\x07 \x01(\x03"\xd3\x01\n\x11ScheduleListEntry\x12\x13\n\x0bschedule_id\x18\x01 \x01(\t\x12*\n\x04memo\x18\x02 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x03 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x38\n\x04info\x18\x04 \x01(\x0b\x32*.temporal.api.schedule.v1.ScheduleListInfoB\x93\x01\n\x1bio.temporal.api.schedule.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/schedule/v1;schedule\xaa\x02\x1aTemporalio.Api.Schedule.V1\xea\x02\x1dTemporalio::Api::Schedule::V1b\x06proto3' ) - -_CALENDARSPEC = DESCRIPTOR.message_types_by_name["CalendarSpec"] -_RANGE = DESCRIPTOR.message_types_by_name["Range"] -_STRUCTUREDCALENDARSPEC = DESCRIPTOR.message_types_by_name["StructuredCalendarSpec"] -_INTERVALSPEC = DESCRIPTOR.message_types_by_name["IntervalSpec"] -_SCHEDULESPEC = DESCRIPTOR.message_types_by_name["ScheduleSpec"] -_SCHEDULEPOLICIES = DESCRIPTOR.message_types_by_name["SchedulePolicies"] -_SCHEDULEACTION = DESCRIPTOR.message_types_by_name["ScheduleAction"] -_SCHEDULEACTIONRESULT = DESCRIPTOR.message_types_by_name["ScheduleActionResult"] -_SCHEDULESTATE = DESCRIPTOR.message_types_by_name["ScheduleState"] -_TRIGGERIMMEDIATELYREQUEST = DESCRIPTOR.message_types_by_name[ - "TriggerImmediatelyRequest" -] -_BACKFILLREQUEST = DESCRIPTOR.message_types_by_name["BackfillRequest"] -_SCHEDULEPATCH = DESCRIPTOR.message_types_by_name["SchedulePatch"] -_SCHEDULEINFO = DESCRIPTOR.message_types_by_name["ScheduleInfo"] -_SCHEDULE = DESCRIPTOR.message_types_by_name["Schedule"] -_SCHEDULELISTINFO = DESCRIPTOR.message_types_by_name["ScheduleListInfo"] -_SCHEDULELISTENTRY = DESCRIPTOR.message_types_by_name["ScheduleListEntry"] -CalendarSpec = _reflection.GeneratedProtocolMessageType( - "CalendarSpec", - (_message.Message,), - { - "DESCRIPTOR": _CALENDARSPEC, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.CalendarSpec) - }, -) -_sym_db.RegisterMessage(CalendarSpec) - -Range = _reflection.GeneratedProtocolMessageType( - "Range", - (_message.Message,), - { - "DESCRIPTOR": _RANGE, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.Range) - }, -) -_sym_db.RegisterMessage(Range) - -StructuredCalendarSpec = _reflection.GeneratedProtocolMessageType( - "StructuredCalendarSpec", - (_message.Message,), - { - "DESCRIPTOR": _STRUCTUREDCALENDARSPEC, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.StructuredCalendarSpec) - }, -) -_sym_db.RegisterMessage(StructuredCalendarSpec) - -IntervalSpec = _reflection.GeneratedProtocolMessageType( - "IntervalSpec", - (_message.Message,), - { - "DESCRIPTOR": _INTERVALSPEC, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.IntervalSpec) - }, -) -_sym_db.RegisterMessage(IntervalSpec) - -ScheduleSpec = _reflection.GeneratedProtocolMessageType( - "ScheduleSpec", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULESPEC, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.ScheduleSpec) - }, -) -_sym_db.RegisterMessage(ScheduleSpec) - -SchedulePolicies = _reflection.GeneratedProtocolMessageType( - "SchedulePolicies", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULEPOLICIES, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.SchedulePolicies) - }, -) -_sym_db.RegisterMessage(SchedulePolicies) - -ScheduleAction = _reflection.GeneratedProtocolMessageType( - "ScheduleAction", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULEACTION, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.ScheduleAction) - }, -) -_sym_db.RegisterMessage(ScheduleAction) - -ScheduleActionResult = _reflection.GeneratedProtocolMessageType( - "ScheduleActionResult", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULEACTIONRESULT, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.ScheduleActionResult) - }, -) -_sym_db.RegisterMessage(ScheduleActionResult) - -ScheduleState = _reflection.GeneratedProtocolMessageType( - "ScheduleState", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULESTATE, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.ScheduleState) - }, -) -_sym_db.RegisterMessage(ScheduleState) - -TriggerImmediatelyRequest = _reflection.GeneratedProtocolMessageType( - "TriggerImmediatelyRequest", - (_message.Message,), - { - "DESCRIPTOR": _TRIGGERIMMEDIATELYREQUEST, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.TriggerImmediatelyRequest) - }, -) -_sym_db.RegisterMessage(TriggerImmediatelyRequest) - -BackfillRequest = _reflection.GeneratedProtocolMessageType( - "BackfillRequest", - (_message.Message,), - { - "DESCRIPTOR": _BACKFILLREQUEST, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.BackfillRequest) - }, -) -_sym_db.RegisterMessage(BackfillRequest) - -SchedulePatch = _reflection.GeneratedProtocolMessageType( - "SchedulePatch", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULEPATCH, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.SchedulePatch) - }, -) -_sym_db.RegisterMessage(SchedulePatch) - -ScheduleInfo = _reflection.GeneratedProtocolMessageType( - "ScheduleInfo", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULEINFO, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.ScheduleInfo) - }, -) -_sym_db.RegisterMessage(ScheduleInfo) - -Schedule = _reflection.GeneratedProtocolMessageType( - "Schedule", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULE, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.Schedule) - }, -) -_sym_db.RegisterMessage(Schedule) - -ScheduleListInfo = _reflection.GeneratedProtocolMessageType( - "ScheduleListInfo", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULELISTINFO, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.ScheduleListInfo) - }, -) -_sym_db.RegisterMessage(ScheduleListInfo) - -ScheduleListEntry = _reflection.GeneratedProtocolMessageType( - "ScheduleListEntry", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULELISTENTRY, - "__module__": "temporalio.api.schedule.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.schedule.v1.ScheduleListEntry) - }, -) -_sym_db.RegisterMessage(ScheduleListEntry) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\033io.temporal.api.schedule.v1B\014MessageProtoP\001Z'go.temporal.io/api/schedule/v1;schedule\252\002\032Temporalio.Api.Schedule.V1\352\002\035Temporalio::Api::Schedule::V1" @@ -261,13 +67,13 @@ _BACKFILLREQUEST._serialized_start = 2399 _BACKFILLREQUEST._serialized_end = 2580 _SCHEDULEPATCH._serialized_start = 2583 - _SCHEDULEPATCH._serialized_end = 2781 - _SCHEDULEINFO._serialized_start = 2784 - _SCHEDULEINFO._serialized_end = 3254 - _SCHEDULE._serialized_start = 3257 - _SCHEDULE._serialized_end = 3497 - _SCHEDULELISTINFO._serialized_start = 3500 - _SCHEDULELISTINFO._serialized_end = 3793 - _SCHEDULELISTENTRY._serialized_start = 3796 - _SCHEDULELISTENTRY._serialized_end = 4007 + _SCHEDULEPATCH._serialized_end = 2855 + _SCHEDULEINFO._serialized_start = 2858 + _SCHEDULEINFO._serialized_end = 3424 + _SCHEDULE._serialized_start = 3427 + _SCHEDULE._serialized_end = 3667 + _SCHEDULELISTINFO._serialized_start = 3670 + _SCHEDULELISTINFO._serialized_end = 3989 + _SCHEDULELISTENTRY._serialized_start = 3992 + _SCHEDULELISTENTRY._serialized_end = 4203 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/schedule/v1/message_pb2.pyi b/temporalio/api/schedule/v1/message_pb2.pyi index b7a65ad0fa..445d59ccca 100644 --- a/temporalio/api/schedule/v1/message_pb2.pyi +++ b/temporalio/api/schedule/v1/message_pb2.pyi @@ -9,7 +9,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -22,13 +22,9 @@ import temporalio.api.enums.v1.schedule_pb2 import temporalio.api.enums.v1.workflow_pb2 import temporalio.api.workflow.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class CalendarSpec(google.protobuf.message.Message): """CalendarSpec describes an event specification relative to the calendar, similar to a traditional cron specification, but with labeled fields. Each @@ -93,7 +89,7 @@ class CalendarSpec(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "comment", b"comment", "day_of_month", @@ -115,6 +111,7 @@ class CalendarSpec(google.protobuf.message.Message): global___CalendarSpec = CalendarSpec +@typing.final class Range(google.protobuf.message.Message): """Range represents a set of integer values, used to match fields of a calendar time in StructuredCalendarSpec. If end < start, then end is interpreted as @@ -142,13 +139,12 @@ class Range(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "end", b"end", "start", b"start", "step", b"step" - ], + field_name: typing.Literal["end", b"end", "start", b"start", "step", b"step"], ) -> None: ... global___Range = Range +@typing.final class StructuredCalendarSpec(google.protobuf.message.Message): """StructuredCalendarSpec describes an event specification relative to the calendar, in a form that's easy to work with programmatically. Each field can @@ -157,8 +153,8 @@ class StructuredCalendarSpec(google.protobuf.message.Message): corresponding fields of the timestamp, except for year: if year is missing, that means all years match. For all fields besides year, at least one Range must be present to match anything. - TODO: add relative-to-end-of-month - TODO: add nth day-of-week in month + Relative expressions such as "last day of the month" or "third Monday" are not currently + representable; callers must enumerate the concrete days they require. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -171,6 +167,8 @@ class StructuredCalendarSpec(google.protobuf.message.Message): YEAR_FIELD_NUMBER: builtins.int DAY_OF_WEEK_FIELD_NUMBER: builtins.int COMMENT_FIELD_NUMBER: builtins.int + comment: builtins.str + """Free-form comment describing the intention of this spec.""" @property def second( self, @@ -178,6 +176,7 @@ class StructuredCalendarSpec(google.protobuf.message.Message): global___Range ]: """Match seconds (0-59)""" + @property def minute( self, @@ -185,6 +184,7 @@ class StructuredCalendarSpec(google.protobuf.message.Message): global___Range ]: """Match minutes (0-59)""" + @property def hour( self, @@ -192,6 +192,7 @@ class StructuredCalendarSpec(google.protobuf.message.Message): global___Range ]: """Match hours (0-23)""" + @property def day_of_month( self, @@ -202,6 +203,7 @@ class StructuredCalendarSpec(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: standard name of field --) """ + @property def month( self, @@ -209,6 +211,7 @@ class StructuredCalendarSpec(google.protobuf.message.Message): global___Range ]: """Match months (1-12)""" + @property def year( self, @@ -216,6 +219,7 @@ class StructuredCalendarSpec(google.protobuf.message.Message): global___Range ]: """Match years.""" + @property def day_of_week( self, @@ -223,8 +227,7 @@ class StructuredCalendarSpec(google.protobuf.message.Message): global___Range ]: """Match days of the week (0-6; 0 is Sunday).""" - comment: builtins.str - """Free-form comment describing the intention of this spec.""" + def __init__( self, *, @@ -239,7 +242,7 @@ class StructuredCalendarSpec(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "comment", b"comment", "day_of_month", @@ -261,6 +264,7 @@ class StructuredCalendarSpec(google.protobuf.message.Message): global___StructuredCalendarSpec = StructuredCalendarSpec +@typing.final class IntervalSpec(google.protobuf.message.Message): """IntervalSpec matches times that can be expressed as: epoch + n * interval + phase @@ -290,20 +294,15 @@ class IntervalSpec(google.protobuf.message.Message): phase: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "interval", b"interval", "phase", b"phase" - ], + self, field_name: typing.Literal["interval", b"interval", "phase", b"phase"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "interval", b"interval", "phase", b"phase" - ], + self, field_name: typing.Literal["interval", b"interval", "phase", b"phase"] ) -> None: ... global___IntervalSpec = IntervalSpec +@typing.final class ScheduleSpec(google.protobuf.message.Message): """ScheduleSpec is a complete description of a set of absolute timestamps (possibly infinite) that an action should occur at. The meaning of a @@ -338,6 +337,31 @@ class ScheduleSpec(google.protobuf.message.Message): JITTER_FIELD_NUMBER: builtins.int TIMEZONE_NAME_FIELD_NUMBER: builtins.int TIMEZONE_DATA_FIELD_NUMBER: builtins.int + timezone_name: builtins.str + """Time zone to interpret all calendar-based specs in. + + If unset, defaults to UTC. We recommend using UTC for your application if + at all possible, to avoid various surprising properties of time zones. + + Time zones may be provided by name, corresponding to names in the IANA + time zone database (see https://www.iana.org/time-zones). The definition + will be loaded by the Temporal server from the environment it runs in. + + If your application requires more control over the time zone definition + used, it may pass in a complete definition in the form of a TZif file + from the time zone database. If present, this will be used instead of + loading anything from the environment. You are then responsible for + updating timezone_data when the definition changes. + + Calendar spec matching is based on literal matching of the clock time + with no special handling of DST: if you write a calendar spec that fires + at 2:30am and specify a time zone that follows DST, that action will not + be triggered on the day that has no 2:30am. Similarly, an action that + fires at 1:30am will be triggered twice on the day that has two 1:30s. + + Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). + """ + timezone_data: builtins.bytes @property def structured_calendar( self, @@ -345,6 +369,7 @@ class ScheduleSpec(google.protobuf.message.Message): global___StructuredCalendarSpec ]: """Calendar-based specifications of times.""" + @property def cron_string( self, @@ -370,6 +395,7 @@ class ScheduleSpec(google.protobuf.message.Message): IntervalSpec instead. and should be a decimal integer with a unit suffix s, m, h, or d. """ + @property def calendar( self, @@ -377,6 +403,7 @@ class ScheduleSpec(google.protobuf.message.Message): global___CalendarSpec ]: """Calendar-based specifications of times.""" + @property def interval( self, @@ -384,6 +411,7 @@ class ScheduleSpec(google.protobuf.message.Message): global___IntervalSpec ]: """Interval-based specifications of times.""" + @property def exclude_calendar( self, @@ -393,6 +421,7 @@ class ScheduleSpec(google.protobuf.message.Message): """Any timestamps matching any of exclude_* will be skipped. Deprecated. Use exclude_structured_calendar. """ + @property def exclude_structured_calendar( self, @@ -404,39 +433,17 @@ class ScheduleSpec(google.protobuf.message.Message): """If start_time is set, any timestamps before start_time will be skipped. (Together, start_time and end_time make an inclusive interval.) """ + @property def end_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """If end_time is set, any timestamps after end_time will be skipped.""" + @property def jitter(self) -> google.protobuf.duration_pb2.Duration: """All timestamps will be incremented by a random value from 0 to this amount of jitter. Default: 0 """ - timezone_name: builtins.str - """Time zone to interpret all calendar-based specs in. - - If unset, defaults to UTC. We recommend using UTC for your application if - at all possible, to avoid various surprising properties of time zones. - - Time zones may be provided by name, corresponding to names in the IANA - time zone database (see https://www.iana.org/time-zones). The definition - will be loaded by the Temporal server from the environment it runs in. - If your application requires more control over the time zone definition - used, it may pass in a complete definition in the form of a TZif file - from the time zone database. If present, this will be used instead of - loading anything from the environment. You are then responsible for - updating timezone_data when the definition changes. - - Calendar spec matching is based on literal matching of the clock time - with no special handling of DST: if you write a calendar spec that fires - at 2:30am and specify a time zone that follows DST, that action will not - be triggered on the day that has no 2:30am. Similarly, an action that - fires at 1:30am will be triggered twice on the day that has two 1:30s. - - Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). - """ - timezone_data: builtins.bytes def __init__( self, *, @@ -458,13 +465,13 @@ class ScheduleSpec(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "end_time", b"end_time", "jitter", b"jitter", "start_time", b"start_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "calendar", b"calendar", "cron_string", @@ -492,6 +499,7 @@ class ScheduleSpec(google.protobuf.message.Message): global___ScheduleSpec = ScheduleSpec +@typing.final class SchedulePolicies(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -505,14 +513,6 @@ class SchedulePolicies(google.protobuf.message.Message): and some changes might produce unintuitive results. In general, the later policy overrides the earlier policy. """ - @property - def catchup_window(self) -> google.protobuf.duration_pb2.Duration: - """Policy for catchups: - If the Temporal server misses an action due to one or more components - being down, and comes back up, the action will be run if the scheduled - time is within this window from the current time. - This value defaults to one year, and can't be less than 10 seconds. - """ pause_on_failure: builtins.bool """If true, and a workflow run fails or times out, turn on "paused". This applies after retry policies: the full chain of retries must fail to @@ -522,6 +522,15 @@ class SchedulePolicies(google.protobuf.message.Message): """If true, and the action would start a workflow, a timestamp will not be appended to the scheduled workflow id. """ + @property + def catchup_window(self) -> google.protobuf.duration_pb2.Duration: + """Policy for catchups: + If the Temporal server misses an action due to one or more components + being down, and comes back up, the action will be run if the scheduled + time is within this window from the current time. + This value defaults to one year, and can't be less than 10 seconds. + """ + def __init__( self, *, @@ -531,11 +540,11 @@ class SchedulePolicies(google.protobuf.message.Message): keep_original_workflow_id: builtins.bool = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["catchup_window", b"catchup_window"] + self, field_name: typing.Literal["catchup_window", b"catchup_window"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "catchup_window", b"catchup_window", "keep_original_workflow_id", @@ -549,6 +558,7 @@ class SchedulePolicies(google.protobuf.message.Message): global___SchedulePolicies = SchedulePolicies +@typing.final class ScheduleAction(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -563,6 +573,7 @@ class ScheduleAction(google.protobuf.message.Message): The workflow id of the started workflow may not match this exactly, it may have a timestamp appended for uniqueness. """ + def __init__( self, *, @@ -571,22 +582,23 @@ class ScheduleAction(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "action", b"action", "start_workflow", b"start_workflow" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "action", b"action", "start_workflow", b"start_workflow" ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["action", b"action"] - ) -> typing_extensions.Literal["start_workflow"] | None: ... + self, oneof_group: typing.Literal["action", b"action"] + ) -> typing.Literal["start_workflow"] | None: ... global___ScheduleAction = ScheduleAction +@typing.final class ScheduleActionResult(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -594,23 +606,26 @@ class ScheduleActionResult(google.protobuf.message.Message): ACTUAL_TIME_FIELD_NUMBER: builtins.int START_WORKFLOW_RESULT_FIELD_NUMBER: builtins.int START_WORKFLOW_STATUS_FIELD_NUMBER: builtins.int + start_workflow_status: ( + temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType + ) + """If the action was start_workflow, this field will reflect an + eventually-consistent view of the started workflow's status. + """ @property def schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Time that the action was taken (according to the schedule, including jitter).""" + @property def actual_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Time that the action was taken (real time).""" + @property def start_workflow_result( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: """If action was start_workflow:""" - start_workflow_status: ( - temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType - ) - """If the action was start_workflow, this field will reflect an - eventually-consistent view of the started workflow's status. - """ + def __init__( self, *, @@ -622,7 +637,7 @@ class ScheduleActionResult(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "actual_time", b"actual_time", "schedule_time", @@ -633,7 +648,7 @@ class ScheduleActionResult(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "actual_time", b"actual_time", "schedule_time", @@ -647,6 +662,7 @@ class ScheduleActionResult(google.protobuf.message.Message): global___ScheduleActionResult = ScheduleActionResult +@typing.final class ScheduleState(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -681,7 +697,7 @@ class ScheduleState(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "limited_actions", b"limited_actions", "notes", @@ -695,6 +711,7 @@ class ScheduleState(google.protobuf.message.Message): global___ScheduleState = ScheduleState +@typing.final class TriggerImmediatelyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -707,6 +724,7 @@ class TriggerImmediatelyRequest(google.protobuf.message.Message): """Timestamp used for the identity of the target workflow. If not set the default value is the current time. """ + def __init__( self, *, @@ -714,23 +732,26 @@ class TriggerImmediatelyRequest(google.protobuf.message.Message): scheduled_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["scheduled_time", b"scheduled_time"] + self, field_name: typing.Literal["scheduled_time", b"scheduled_time"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "overlap_policy", b"overlap_policy", "scheduled_time", b"scheduled_time" ], ) -> None: ... global___TriggerImmediatelyRequest = TriggerImmediatelyRequest +@typing.final class BackfillRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor START_TIME_FIELD_NUMBER: builtins.int END_TIME_FIELD_NUMBER: builtins.int OVERLAP_POLICY_FIELD_NUMBER: builtins.int + overlap_policy: temporalio.api.enums.v1.schedule_pb2.ScheduleOverlapPolicy.ValueType + """If set, override overlap policy for this request.""" @property def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Time range to evaluate schedule in. Currently, this time range is @@ -740,10 +761,9 @@ class BackfillRequest(google.protobuf.message.Message): nominally scheduled in the interval but with jitter that pushes it after end_time will not be included. """ + @property def end_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - overlap_policy: temporalio.api.enums.v1.schedule_pb2.ScheduleOverlapPolicy.ValueType - """If set, override overlap policy for this request.""" def __init__( self, *, @@ -753,13 +773,13 @@ class BackfillRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "end_time", b"end_time", "start_time", b"start_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "end_time", b"end_time", "overlap_policy", @@ -771,6 +791,7 @@ class BackfillRequest(google.protobuf.message.Message): global___BackfillRequest = BackfillRequest +@typing.final class SchedulePatch(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -778,9 +799,16 @@ class SchedulePatch(google.protobuf.message.Message): BACKFILL_REQUEST_FIELD_NUMBER: builtins.int PAUSE_FIELD_NUMBER: builtins.int UNPAUSE_FIELD_NUMBER: builtins.int + TIME_SKIPPING_CONFIG_FIELD_NUMBER: builtins.int + pause: builtins.str + """If set, change the state to paused or unpaused (respectively) and set the + notes field to the value of the string. + """ + unpause: builtins.str @property def trigger_immediately(self) -> global___TriggerImmediatelyRequest: """If set, trigger one action immediately.""" + @property def backfill_request( self, @@ -791,11 +819,15 @@ class SchedulePatch(google.protobuf.message.Message): passed by right now, all at once. The overlap policy can be overridden for the scope of the backfill. """ - pause: builtins.str - """If set, change the state to paused or unpaused (respectively) and set the - notes field to the value of the string. - """ - unpause: builtins.str + + @property + def time_skipping_config( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingConfig: + """If set, applies the specified time-skipping configuration to this schedule, + replacing any existing time-skipping configuration. + """ + def __init__( self, *, @@ -804,20 +836,27 @@ class SchedulePatch(google.protobuf.message.Message): | None = ..., pause: builtins.str = ..., unpause: builtins.str = ..., + time_skipping_config: temporalio.api.common.v1.message_pb2.TimeSkippingConfig + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "trigger_immediately", b"trigger_immediately" + field_name: typing.Literal[ + "time_skipping_config", + b"time_skipping_config", + "trigger_immediately", + b"trigger_immediately", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "backfill_request", b"backfill_request", "pause", b"pause", + "time_skipping_config", + b"time_skipping_config", "trigger_immediately", b"trigger_immediately", "unpause", @@ -827,6 +866,7 @@ class SchedulePatch(google.protobuf.message.Message): global___SchedulePatch = SchedulePatch +@typing.final class ScheduleInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -841,6 +881,8 @@ class ScheduleInfo(google.protobuf.message.Message): CREATE_TIME_FIELD_NUMBER: builtins.int UPDATE_TIME_FIELD_NUMBER: builtins.int INVALID_SCHEDULE_ERROR_FIELD_NUMBER: builtins.int + STATE_SIZE_BYTES_FIELD_NUMBER: builtins.int + TIME_SKIPPING_INFO_FIELD_NUMBER: builtins.int action_count: builtins.int """Number of actions taken so far.""" missed_catchup_window: builtins.int @@ -854,6 +896,10 @@ class ScheduleInfo(google.protobuf.message.Message): be immediately triggered (due to the overlap policy). These actions can be a result of the normal schedule or a backfill. """ + invalid_schedule_error: builtins.str + """Deprecated.""" + state_size_bytes: builtins.int + """Size of the schedule's internal state (including payloads) in bytes.""" @property def running_workflows( self, @@ -866,6 +912,7 @@ class ScheduleInfo(google.protobuf.message.Message): started by the schedule. If the workflows retried, did continue-as-new, or were reset, they might still be running but with a different run_id. """ + @property def recent_actions( self, @@ -873,6 +920,7 @@ class ScheduleInfo(google.protobuf.message.Message): global___ScheduleActionResult ]: """Most recent ten actual action times (including manual triggers).""" + @property def future_action_times( self, @@ -880,13 +928,21 @@ class ScheduleInfo(google.protobuf.message.Message): google.protobuf.timestamp_pb2.Timestamp ]: """Next ten scheduled action times.""" + @property def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Timestamps of schedule creation and last update.""" + @property def update_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - invalid_schedule_error: builtins.str - """Deprecated.""" + @property + def time_skipping_info( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingInfo: + """Information about time skipping for this schedule. + If the schedule has never enabled time skipping, this will be unset. + """ + def __init__( self, *, @@ -908,16 +964,24 @@ class ScheduleInfo(google.protobuf.message.Message): create_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., update_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., invalid_schedule_error: builtins.str = ..., + state_size_bytes: builtins.int = ..., + time_skipping_info: temporalio.api.common.v1.message_pb2.TimeSkippingInfo + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "create_time", b"create_time", "update_time", b"update_time" + field_name: typing.Literal[ + "create_time", + b"create_time", + "time_skipping_info", + b"time_skipping_info", + "update_time", + b"update_time", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "action_count", b"action_count", "buffer_dropped", @@ -938,6 +1002,10 @@ class ScheduleInfo(google.protobuf.message.Message): b"recent_actions", "running_workflows", b"running_workflows", + "state_size_bytes", + b"state_size_bytes", + "time_skipping_info", + b"time_skipping_info", "update_time", b"update_time", ], @@ -945,6 +1013,7 @@ class ScheduleInfo(google.protobuf.message.Message): global___ScheduleInfo = ScheduleInfo +@typing.final class Schedule(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -970,7 +1039,7 @@ class Schedule(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "action", b"action", "policies", @@ -983,7 +1052,7 @@ class Schedule(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "action", b"action", "policies", @@ -997,6 +1066,7 @@ class Schedule(google.protobuf.message.Message): global___Schedule = Schedule +@typing.final class ScheduleListInfo(google.protobuf.message.Message): """ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo that's returned in ListSchedules. @@ -1010,20 +1080,25 @@ class ScheduleListInfo(google.protobuf.message.Message): PAUSED_FIELD_NUMBER: builtins.int RECENT_ACTIONS_FIELD_NUMBER: builtins.int FUTURE_ACTION_TIMES_FIELD_NUMBER: builtins.int + STATE_SIZE_BYTES_FIELD_NUMBER: builtins.int + notes: builtins.str + """From state:""" + paused: builtins.bool + state_size_bytes: builtins.int + """Size of the schedule's internal state (including payloads) in bytes.""" @property def spec(self) -> global___ScheduleSpec: """From spec: Some fields are dropped from this copy of spec: timezone_data """ + @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: """From action: Action is a oneof field, but we need to encode this in JSON and oneof fields don't work well with JSON. If action is start_workflow, this is set: """ - notes: builtins.str - """From state:""" - paused: builtins.bool + @property def recent_actions( self, @@ -1031,6 +1106,7 @@ class ScheduleListInfo(google.protobuf.message.Message): global___ScheduleActionResult ]: """From info (maybe fewer entries):""" + @property def future_action_times( self, @@ -1050,16 +1126,15 @@ class ScheduleListInfo(google.protobuf.message.Message): google.protobuf.timestamp_pb2.Timestamp ] | None = ..., + state_size_bytes: builtins.int = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "spec", b"spec", "workflow_type", b"workflow_type" - ], + field_name: typing.Literal["spec", b"spec", "workflow_type", b"workflow_type"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "future_action_times", b"future_action_times", "notes", @@ -1070,6 +1145,8 @@ class ScheduleListInfo(google.protobuf.message.Message): b"recent_actions", "spec", b"spec", + "state_size_bytes", + b"state_size_bytes", "workflow_type", b"workflow_type", ], @@ -1077,6 +1154,7 @@ class ScheduleListInfo(google.protobuf.message.Message): global___ScheduleListInfo = ScheduleListInfo +@typing.final class ScheduleListEntry(google.protobuf.message.Message): """ScheduleListEntry is returned by ListSchedules.""" @@ -1106,13 +1184,13 @@ class ScheduleListEntry(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "info", b"info", "memo", b"memo", "search_attributes", b"search_attributes" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "info", b"info", "memo", diff --git a/temporalio/api/sdk/v1/__init__.py b/temporalio/api/sdk/v1/__init__.py index 2657df3004..4f23aac6a6 100644 --- a/temporalio/api/sdk/v1/__init__.py +++ b/temporalio/api/sdk/v1/__init__.py @@ -5,6 +5,8 @@ StackTraceFileSlice, StackTraceSDKInfo, ) +from .event_group_marker_pb2 import EventGroupMarker +from .external_storage_pb2 import ExternalStorageReference from .task_complete_metadata_pb2 import WorkflowTaskCompletedMetadata from .user_metadata_pb2 import UserMetadata from .worker_config_pb2 import WorkerConfig @@ -16,6 +18,8 @@ __all__ = [ "EnhancedStackTrace", + "EventGroupMarker", + "ExternalStorageReference", "StackTrace", "StackTraceFileLocation", "StackTraceFileSlice", diff --git a/temporalio/api/sdk/v1/enhanced_stack_trace_pb2.py b/temporalio/api/sdk/v1/enhanced_stack_trace_pb2.py index 0890a547ae..71040f6c2b 100644 --- a/temporalio/api/sdk/v1/enhanced_stack_trace_pb2.py +++ b/temporalio/api/sdk/v1/enhanced_stack_trace_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -18,80 +17,8 @@ b'\n.temporal/api/sdk/v1/enhanced_stack_trace.proto\x12\x13temporal.api.sdk.v1"\x9b\x02\n\x12\x45nhancedStackTrace\x12\x33\n\x03sdk\x18\x01 \x01(\x0b\x32&.temporal.api.sdk.v1.StackTraceSDKInfo\x12\x45\n\x07sources\x18\x02 \x03(\x0b\x32\x34.temporal.api.sdk.v1.EnhancedStackTrace.SourcesEntry\x12/\n\x06stacks\x18\x03 \x03(\x0b\x32\x1f.temporal.api.sdk.v1.StackTrace\x1aX\n\x0cSourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.temporal.api.sdk.v1.StackTraceFileSlice:\x02\x38\x01"2\n\x11StackTraceSDKInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t";\n\x13StackTraceFileSlice\x12\x13\n\x0bline_offset\x18\x01 \x01(\r\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t"w\n\x16StackTraceFileLocation\x12\x11\n\tfile_path\x18\x01 \x01(\t\x12\x0c\n\x04line\x18\x02 \x01(\x05\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\x05\x12\x15\n\rfunction_name\x18\x04 \x01(\t\x12\x15\n\rinternal_code\x18\x05 \x01(\x08"L\n\nStackTrace\x12>\n\tlocations\x18\x01 \x03(\x0b\x32+.temporal.api.sdk.v1.StackTraceFileLocationB\x85\x01\n\x16io.temporal.api.sdk.v1B\x17\x45nhancedStackTraceProtoP\x01Z\x1dgo.temporal.io/api/sdk/v1;sdk\xaa\x02\x15Temporalio.Api.Sdk.V1\xea\x02\x18Temporalio::Api::Sdk::V1b\x06proto3' ) - -_ENHANCEDSTACKTRACE = DESCRIPTOR.message_types_by_name["EnhancedStackTrace"] -_ENHANCEDSTACKTRACE_SOURCESENTRY = _ENHANCEDSTACKTRACE.nested_types_by_name[ - "SourcesEntry" -] -_STACKTRACESDKINFO = DESCRIPTOR.message_types_by_name["StackTraceSDKInfo"] -_STACKTRACEFILESLICE = DESCRIPTOR.message_types_by_name["StackTraceFileSlice"] -_STACKTRACEFILELOCATION = DESCRIPTOR.message_types_by_name["StackTraceFileLocation"] -_STACKTRACE = DESCRIPTOR.message_types_by_name["StackTrace"] -EnhancedStackTrace = _reflection.GeneratedProtocolMessageType( - "EnhancedStackTrace", - (_message.Message,), - { - "SourcesEntry": _reflection.GeneratedProtocolMessageType( - "SourcesEntry", - (_message.Message,), - { - "DESCRIPTOR": _ENHANCEDSTACKTRACE_SOURCESENTRY, - "__module__": "temporalio.api.sdk.v1.enhanced_stack_trace_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.EnhancedStackTrace.SourcesEntry) - }, - ), - "DESCRIPTOR": _ENHANCEDSTACKTRACE, - "__module__": "temporalio.api.sdk.v1.enhanced_stack_trace_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.EnhancedStackTrace) - }, -) -_sym_db.RegisterMessage(EnhancedStackTrace) -_sym_db.RegisterMessage(EnhancedStackTrace.SourcesEntry) - -StackTraceSDKInfo = _reflection.GeneratedProtocolMessageType( - "StackTraceSDKInfo", - (_message.Message,), - { - "DESCRIPTOR": _STACKTRACESDKINFO, - "__module__": "temporalio.api.sdk.v1.enhanced_stack_trace_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.StackTraceSDKInfo) - }, -) -_sym_db.RegisterMessage(StackTraceSDKInfo) - -StackTraceFileSlice = _reflection.GeneratedProtocolMessageType( - "StackTraceFileSlice", - (_message.Message,), - { - "DESCRIPTOR": _STACKTRACEFILESLICE, - "__module__": "temporalio.api.sdk.v1.enhanced_stack_trace_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.StackTraceFileSlice) - }, -) -_sym_db.RegisterMessage(StackTraceFileSlice) - -StackTraceFileLocation = _reflection.GeneratedProtocolMessageType( - "StackTraceFileLocation", - (_message.Message,), - { - "DESCRIPTOR": _STACKTRACEFILELOCATION, - "__module__": "temporalio.api.sdk.v1.enhanced_stack_trace_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.StackTraceFileLocation) - }, -) -_sym_db.RegisterMessage(StackTraceFileLocation) - -StackTrace = _reflection.GeneratedProtocolMessageType( - "StackTrace", - (_message.Message,), - { - "DESCRIPTOR": _STACKTRACE, - "__module__": "temporalio.api.sdk.v1.enhanced_stack_trace_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.StackTrace) - }, -) -_sym_db.RegisterMessage(StackTrace) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\026io.temporal.api.sdk.v1B\027EnhancedStackTraceProtoP\001Z\035go.temporal.io/api/sdk/v1;sdk\252\002\025Temporalio.Api.Sdk.V1\352\002\030Temporalio::Api::Sdk::V1" diff --git a/temporalio/api/sdk/v1/enhanced_stack_trace_pb2.pyi b/temporalio/api/sdk/v1/enhanced_stack_trace_pb2.pyi index 29767cbf83..6fd5a9c152 100644 --- a/temporalio/api/sdk/v1/enhanced_stack_trace_pb2.pyi +++ b/temporalio/api/sdk/v1/enhanced_stack_trace_pb2.pyi @@ -5,24 +5,21 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class EnhancedStackTrace(google.protobuf.message.Message): """Internal structure used to create worker stack traces with references to code.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class SourcesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -38,11 +35,10 @@ class EnhancedStackTrace(google.protobuf.message.Message): value: global___StackTraceFileSlice | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SDK_FIELD_NUMBER: builtins.int @@ -51,6 +47,7 @@ class EnhancedStackTrace(google.protobuf.message.Message): @property def sdk(self) -> global___StackTraceSDKInfo: """Information pertaining to the SDK that the trace has been captured from.""" + @property def sources( self, @@ -58,6 +55,7 @@ class EnhancedStackTrace(google.protobuf.message.Message): builtins.str, global___StackTraceFileSlice ]: """Mapping of file path to file contents.""" + @property def stacks( self, @@ -65,6 +63,7 @@ class EnhancedStackTrace(google.protobuf.message.Message): global___StackTrace ]: """Collection of stacks captured.""" + def __init__( self, *, @@ -73,18 +72,17 @@ class EnhancedStackTrace(google.protobuf.message.Message): | None = ..., stacks: collections.abc.Iterable[global___StackTrace] | None = ..., ) -> None: ... - def HasField( - self, field_name: typing_extensions.Literal["sdk", b"sdk"] - ) -> builtins.bool: ... + def HasField(self, field_name: typing.Literal["sdk", b"sdk"]) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "sdk", b"sdk", "sources", b"sources", "stacks", b"stacks" ], ) -> None: ... global___EnhancedStackTrace = EnhancedStackTrace +@typing.final class StackTraceSDKInfo(google.protobuf.message.Message): """Information pertaining to the SDK that the trace has been captured from. (-- api-linter: core::0123::resource-annotation=disabled @@ -106,12 +104,12 @@ class StackTraceSDKInfo(google.protobuf.message.Message): version: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["name", b"name", "version", b"version"], + self, field_name: typing.Literal["name", b"name", "version", b"version"] ) -> None: ... global___StackTraceSDKInfo = StackTraceSDKInfo +@typing.final class StackTraceFileSlice(google.protobuf.message.Message): """ "Slice" of a file starting at line_offset -- a line offset and code fragment corresponding to the worker's stack.""" @@ -135,13 +133,14 @@ class StackTraceFileSlice(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "content", b"content", "line_offset", b"line_offset" ], ) -> None: ... global___StackTraceFileSlice = StackTraceFileSlice +@typing.final class StackTraceFileLocation(google.protobuf.message.Message): """More specific location details of a file: its path, precise line and column numbers if applicable, and function name if available. In essence, a pointer to a location in a file @@ -183,7 +182,7 @@ class StackTraceFileLocation(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "column", b"column", "file_path", @@ -199,6 +198,7 @@ class StackTraceFileLocation(google.protobuf.message.Message): global___StackTraceFileLocation = StackTraceFileLocation +@typing.final class StackTrace(google.protobuf.message.Message): """Collection of FileLocation messages from a single stack.""" @@ -212,6 +212,7 @@ class StackTrace(google.protobuf.message.Message): global___StackTraceFileLocation ]: """Collection of `FileLocation`s, each for a stack frame that comprise a stack trace.""" + def __init__( self, *, @@ -219,7 +220,7 @@ class StackTrace(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["locations", b"locations"] + self, field_name: typing.Literal["locations", b"locations"] ) -> None: ... global___StackTrace = StackTrace diff --git a/temporalio/api/sdk/v1/event_group_marker_pb2.py b/temporalio/api/sdk/v1/event_group_marker_pb2.py new file mode 100644 index 0000000000..fee5111e4e --- /dev/null +++ b/temporalio/api/sdk/v1/event_group_marker_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/sdk/v1/event_group_marker.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from temporalio.api.common.v1 import ( + message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, +) + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n,temporal/api/sdk/v1/event_group_marker.proto\x12\x13temporal.api.sdk.v1\x1a$temporal/api/common/v1/message.proto"\x92\x03\n\x10\x45ventGroupMarker\x12<\n\x05label\x18\x01 \x01(\x0b\x32+.temporal.api.sdk.v1.EventGroupMarker.LabelH\x00\x12K\n\rinbound_event\x18\x02 \x01(\x0b\x32\x32.temporal.api.sdk.v1.EventGroupMarker.InboundEventH\x00\x12M\n\x0einbound_update\x18\x03 \x01(\x0b\x32\x33.temporal.api.sdk.v1.EventGroupMarker.InboundUpdateH\x00\x1a\x43\n\x05Label\x12\n\n\x02id\x18\x01 \x01(\t\x12.\n\x05label\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x1a(\n\x0cInboundEvent\x12\x18\n\x10inbound_event_id\x18\x01 \x01(\x03\x1a*\n\rInboundUpdate\x12\x19\n\x11inbound_update_id\x18\x01 \x01(\tB\t\n\x07variantB\x83\x01\n\x16io.temporal.api.sdk.v1B\x15\x45ventGroupMarkerProtoP\x01Z\x1dgo.temporal.io/api/sdk/v1;sdk\xaa\x02\x15Temporalio.Api.Sdk.V1\xea\x02\x18Temporalio::Api::Sdk::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\026io.temporal.api.sdk.v1B\025EventGroupMarkerProtoP\001Z\035go.temporal.io/api/sdk/v1;sdk\252\002\025Temporalio.Api.Sdk.V1\352\002\030Temporalio::Api::Sdk::V1" + _EVENTGROUPMARKER._serialized_start = 108 + _EVENTGROUPMARKER._serialized_end = 510 + _EVENTGROUPMARKER_LABEL._serialized_start = 346 + _EVENTGROUPMARKER_LABEL._serialized_end = 413 + _EVENTGROUPMARKER_INBOUNDEVENT._serialized_start = 415 + _EVENTGROUPMARKER_INBOUNDEVENT._serialized_end = 455 + _EVENTGROUPMARKER_INBOUNDUPDATE._serialized_start = 457 + _EVENTGROUPMARKER_INBOUNDUPDATE._serialized_end = 499 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/sdk/v1/event_group_marker_pb2.pyi b/temporalio/api/sdk/v1/event_group_marker_pb2.pyi new file mode 100644 index 0000000000..5af116843a --- /dev/null +++ b/temporalio/api/sdk/v1/event_group_marker_pb2.pyi @@ -0,0 +1,151 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import typing + +import google.protobuf.descriptor +import google.protobuf.message + +import temporalio.api.common.v1.message_pb2 + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class EventGroupMarker(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class Label(google.protobuf.message.Message): + """A user-defined short-form string value to be used as the group's label.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + LABEL_FIELD_NUMBER: builtins.int + id: builtins.str + """Opaque identifier assigned by the SDK.""" + @property + def label(self) -> temporalio.api.common.v1.message_pb2.Payload: + """This payload should be a "json/plain"-encoded payload that is a single + JSON string for use in user interfaces. User interface formatting may not + apply to this text when used in "label" situations. The payload data + section is limited to 400 bytes by default. + + Payload only needs to be set on the first use of a given Marker ID; + further references to an existing Marker ID reuse existing attributes of + the referenced Marker -- i.e. further label payloads are ignored. + + Note that it is valid to have distinct Markers (i.e. distinct Marker IDs) + in a given workflow execution that carry the same label, provided that + they have the distinct ID. + """ + + def __init__( + self, + *, + id: builtins.str = ..., + label: temporalio.api.common.v1.message_pb2.Payload | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["label", b"label"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["id", b"id", "label", b"label"] + ) -> None: ... + + @typing.final + class InboundEvent(google.protobuf.message.Message): + """The event ID of an event in the present workflow that triggered implicit + creation of this group Marker. + + The target event's type must be one of the following: + - `WORKFLOW_EXECUTION_STARTED` + - `WORKFLOW_EXECUTION_SIGNALED` + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + INBOUND_EVENT_ID_FIELD_NUMBER: builtins.int + inbound_event_id: builtins.int + def __init__( + self, + *, + inbound_event_id: builtins.int = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["inbound_event_id", b"inbound_event_id"] + ) -> None: ... + + @typing.final + class InboundUpdate(google.protobuf.message.Message): + """The identifier of an inbound Update (request.meta.update_id) + whose handler triggered implicit creation of this group Marker. + + Used in place of `inbound_event_id` for Updates because the event ID of the + UpdateAccepted history event is not known until the Workflow Task is + completed and recorded by the server, which may be too late. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + INBOUND_UPDATE_ID_FIELD_NUMBER: builtins.int + inbound_update_id: builtins.str + def __init__( + self, + *, + inbound_update_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["inbound_update_id", b"inbound_update_id"] + ) -> None: ... + + LABEL_FIELD_NUMBER: builtins.int + INBOUND_EVENT_FIELD_NUMBER: builtins.int + INBOUND_UPDATE_FIELD_NUMBER: builtins.int + @property + def label(self) -> global___EventGroupMarker.Label: ... + @property + def inbound_event(self) -> global___EventGroupMarker.InboundEvent: ... + @property + def inbound_update(self) -> global___EventGroupMarker.InboundUpdate: ... + def __init__( + self, + *, + label: global___EventGroupMarker.Label | None = ..., + inbound_event: global___EventGroupMarker.InboundEvent | None = ..., + inbound_update: global___EventGroupMarker.InboundUpdate | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "inbound_event", + b"inbound_event", + "inbound_update", + b"inbound_update", + "label", + b"label", + "variant", + b"variant", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "inbound_event", + b"inbound_event", + "inbound_update", + b"inbound_update", + "label", + b"label", + "variant", + b"variant", + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["label", "inbound_event", "inbound_update"] | None: ... + +global___EventGroupMarker = EventGroupMarker diff --git a/temporalio/api/sdk/v1/external_storage_pb2.py b/temporalio/api/sdk/v1/external_storage_pb2.py new file mode 100644 index 0000000000..e17d372dc4 --- /dev/null +++ b/temporalio/api/sdk/v1/external_storage_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: temporal/api/sdk/v1/external_storage.proto +"""Generated protocol buffer code.""" + +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n*temporal/api/sdk/v1/external_storage.proto\x12\x13temporal.api.sdk.v1"\xb3\x01\n\x18\x45xternalStorageReference\x12\x13\n\x0b\x64river_name\x18\x01 \x01(\t\x12P\n\nclaim_data\x18\x02 \x03(\x0b\x32<.temporal.api.sdk.v1.ExternalStorageReference.ClaimDataEntry\x1a\x30\n\x0e\x43laimDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x82\x01\n\x16io.temporal.api.sdk.v1B\x14\x45xternalStorageProtoP\x01Z\x1dgo.temporal.io/api/sdk/v1;sdk\xaa\x02\x15Temporalio.Api.Sdk.V1\xea\x02\x18Temporalio::Api::Sdk::V1b\x06proto3' +) + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\026io.temporal.api.sdk.v1B\024ExternalStorageProtoP\001Z\035go.temporal.io/api/sdk/v1;sdk\252\002\025Temporalio.Api.Sdk.V1\352\002\030Temporalio::Api::Sdk::V1" + _EXTERNALSTORAGEREFERENCE_CLAIMDATAENTRY._options = None + _EXTERNALSTORAGEREFERENCE_CLAIMDATAENTRY._serialized_options = b"8\001" + _EXTERNALSTORAGEREFERENCE._serialized_start = 68 + _EXTERNALSTORAGEREFERENCE._serialized_end = 247 + _EXTERNALSTORAGEREFERENCE_CLAIMDATAENTRY._serialized_start = 199 + _EXTERNALSTORAGEREFERENCE_CLAIMDATAENTRY._serialized_end = 247 +# @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/sdk/v1/external_storage_pb2.pyi b/temporalio/api/sdk/v1/external_storage_pb2.pyi new file mode 100644 index 0000000000..239a9837f1 --- /dev/null +++ b/temporalio/api/sdk/v1/external_storage_pb2.pyi @@ -0,0 +1,66 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" + +import builtins +import collections.abc +import typing + +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.message + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class ExternalStorageReference(google.protobuf.message.Message): + """ExternalStorageReference identifies a payload stored in an external storage system. + It is used as a claim-check token, allowing the actual payload data to be retrieved + from the named driver using the provided claim data. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ClaimDataEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.str + def __init__( + self, + *, + key: builtins.str = ..., + value: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + DRIVER_NAME_FIELD_NUMBER: builtins.int + CLAIM_DATA_FIELD_NUMBER: builtins.int + driver_name: builtins.str + """The name of the storage driver responsible for retrieving the payload.""" + @property + def claim_data( + self, + ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + """Driver-specific key-value pairs that identify and provide access to the stored payload.""" + + def __init__( + self, + *, + driver_name: builtins.str = ..., + claim_data: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "claim_data", b"claim_data", "driver_name", b"driver_name" + ], + ) -> None: ... + +global___ExternalStorageReference = ExternalStorageReference diff --git a/temporalio/api/sdk/v1/task_complete_metadata_pb2.py b/temporalio/api/sdk/v1/task_complete_metadata_pb2.py index 0b95e1710b..411a4216bf 100644 --- a/temporalio/api/sdk/v1/task_complete_metadata_pb2.py +++ b/temporalio/api/sdk/v1/task_complete_metadata_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -18,21 +17,8 @@ b'\n0temporal/api/sdk/v1/task_complete_metadata.proto\x12\x13temporal.api.sdk.v1"x\n\x1dWorkflowTaskCompletedMetadata\x12\x17\n\x0f\x63ore_used_flags\x18\x01 \x03(\r\x12\x17\n\x0flang_used_flags\x18\x02 \x03(\r\x12\x10\n\x08sdk_name\x18\x03 \x01(\t\x12\x13\n\x0bsdk_version\x18\x04 \x01(\tB\x87\x01\n\x16io.temporal.api.sdk.v1B\x19TaskCompleteMetadataProtoP\x01Z\x1dgo.temporal.io/api/sdk/v1;sdk\xaa\x02\x15Temporalio.Api.Sdk.V1\xea\x02\x18Temporalio::Api::Sdk::V1b\x06proto3' ) - -_WORKFLOWTASKCOMPLETEDMETADATA = DESCRIPTOR.message_types_by_name[ - "WorkflowTaskCompletedMetadata" -] -WorkflowTaskCompletedMetadata = _reflection.GeneratedProtocolMessageType( - "WorkflowTaskCompletedMetadata", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWTASKCOMPLETEDMETADATA, - "__module__": "temporalio.api.sdk.v1.task_complete_metadata_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.WorkflowTaskCompletedMetadata) - }, -) -_sym_db.RegisterMessage(WorkflowTaskCompletedMetadata) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\026io.temporal.api.sdk.v1B\031TaskCompleteMetadataProtoP\001Z\035go.temporal.io/api/sdk/v1;sdk\252\002\025Temporalio.Api.Sdk.V1\352\002\030Temporalio::Api::Sdk::V1" diff --git a/temporalio/api/sdk/v1/task_complete_metadata_pb2.pyi b/temporalio/api/sdk/v1/task_complete_metadata_pb2.pyi index 2491881a30..c4efd608b6 100644 --- a/temporalio/api/sdk/v1/task_complete_metadata_pb2.pyi +++ b/temporalio/api/sdk/v1/task_complete_metadata_pb2.pyi @@ -5,19 +5,15 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowTaskCompletedMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -25,6 +21,19 @@ class WorkflowTaskCompletedMetadata(google.protobuf.message.Message): LANG_USED_FLAGS_FIELD_NUMBER: builtins.int SDK_NAME_FIELD_NUMBER: builtins.int SDK_VERSION_FIELD_NUMBER: builtins.int + sdk_name: builtins.str + """Name of the SDK that processed the task. This is usually something like "temporal-go" and is + usually the same as client-name gRPC header. This should only be set if its value changed + since the last time recorded on the workflow (or be set on the first task). + + (-- api-linter: core::0122::name-suffix=disabled + aip.dev/not-precedent: We're ok with a name suffix here. --) + """ + sdk_version: builtins.str + """Version of the SDK that processed the task. This is usually something like "1.20.0" and is + usually the same as client-version gRPC header. This should only be set if its value changed + since the last time recorded on the workflow (or be set on the first task). + """ @property def core_used_flags( self, @@ -49,6 +58,7 @@ class WorkflowTaskCompletedMetadata(google.protobuf.message.Message): (-- api-linter: core::0141::forbidden-types=disabled aip.dev/not-precedent: These really shouldn't have negative values. --) """ + @property def lang_used_flags( self, @@ -60,19 +70,7 @@ class WorkflowTaskCompletedMetadata(google.protobuf.message.Message): (-- api-linter: core::0141::forbidden-types=disabled aip.dev/not-precedent: These really shouldn't have negative values. --) """ - sdk_name: builtins.str - """Name of the SDK that processed the task. This is usually something like "temporal-go" and is - usually the same as client-name gRPC header. This should only be set if its value changed - since the last time recorded on the workflow (or be set on the first task). - (-- api-linter: core::0122::name-suffix=disabled - aip.dev/not-precedent: We're ok with a name suffix here. --) - """ - sdk_version: builtins.str - """Version of the SDK that processed the task. This is usually something like "1.20.0" and is - usually the same as client-version gRPC header. This should only be set if its value changed - since the last time recorded on the workflow (or be set on the first task). - """ def __init__( self, *, @@ -83,7 +81,7 @@ class WorkflowTaskCompletedMetadata(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "core_used_flags", b"core_used_flags", "lang_used_flags", diff --git a/temporalio/api/sdk/v1/user_metadata_pb2.py b/temporalio/api/sdk/v1/user_metadata_pb2.py index 4fcbee2bb3..a991dac09e 100644 --- a/temporalio/api/sdk/v1/user_metadata_pb2.py +++ b/temporalio/api/sdk/v1/user_metadata_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -22,19 +21,8 @@ b"\n'temporal/api/sdk/v1/user_metadata.proto\x12\x13temporal.api.sdk.v1\x1a$temporal/api/common/v1/message.proto\"r\n\x0cUserMetadata\x12\x30\n\x07summary\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x30\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadB\x7f\n\x16io.temporal.api.sdk.v1B\x11UserMetadataProtoP\x01Z\x1dgo.temporal.io/api/sdk/v1;sdk\xaa\x02\x15Temporalio.Api.Sdk.V1\xea\x02\x18Temporalio::Api::Sdk::V1b\x06proto3" ) - -_USERMETADATA = DESCRIPTOR.message_types_by_name["UserMetadata"] -UserMetadata = _reflection.GeneratedProtocolMessageType( - "UserMetadata", - (_message.Message,), - { - "DESCRIPTOR": _USERMETADATA, - "__module__": "temporalio.api.sdk.v1.user_metadata_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.UserMetadata) - }, -) -_sym_db.RegisterMessage(UserMetadata) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\026io.temporal.api.sdk.v1B\021UserMetadataProtoP\001Z\035go.temporal.io/api/sdk/v1;sdk\252\002\025Temporalio.Api.Sdk.V1\352\002\030Temporalio::Api::Sdk::V1" diff --git a/temporalio/api/sdk/v1/user_metadata_pb2.pyi b/temporalio/api/sdk/v1/user_metadata_pb2.pyi index d198be8a8f..3d99bd06c1 100644 --- a/temporalio/api/sdk/v1/user_metadata_pb2.pyi +++ b/temporalio/api/sdk/v1/user_metadata_pb2.pyi @@ -4,20 +4,16 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.message import temporalio.api.common.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class UserMetadata(google.protobuf.message.Message): """Information a user can set, often for use by user interfaces.""" @@ -32,12 +28,14 @@ class UserMetadata(google.protobuf.message.Message): apply to this text when used in "title" situations. The payload data section is limited to 400 bytes by default. """ + @property def details(self) -> temporalio.api.common.v1.message_pb2.Payload: """Long-form text that provides details. This payload should be a "json/plain"-encoded payload that is a single JSON string for use in user interfaces. User interface formatting may apply to this text in common use. The payload data section is limited to 20000 bytes by default. """ + def __init__( self, *, @@ -45,16 +43,10 @@ class UserMetadata(google.protobuf.message.Message): details: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "details", b"details", "summary", b"summary" - ], + self, field_name: typing.Literal["details", b"details", "summary", b"summary"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "details", b"details", "summary", b"summary" - ], + self, field_name: typing.Literal["details", b"details", "summary", b"summary"] ) -> None: ... global___UserMetadata = UserMetadata diff --git a/temporalio/api/sdk/v1/worker_config_pb2.py b/temporalio/api/sdk/v1/worker_config_pb2.py index 2a1304f6b9..0871cb106e 100644 --- a/temporalio/api/sdk/v1/worker_config_pb2.py +++ b/temporalio/api/sdk/v1/worker_config_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -18,45 +17,8 @@ b"\n'temporal/api/sdk/v1/worker_config.proto\x12\x13temporal.api.sdk.v1\"\x89\x03\n\x0cWorkerConfig\x12\x1b\n\x13workflow_cache_size\x18\x01 \x01(\x05\x12X\n\x16simple_poller_behavior\x18\x02 \x01(\x0b\x32\x36.temporal.api.sdk.v1.WorkerConfig.SimplePollerBehaviorH\x00\x12\x62\n\x1b\x61utoscaling_poller_behavior\x18\x03 \x01(\x0b\x32;.temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehaviorH\x00\x1a+\n\x14SimplePollerBehavior\x12\x13\n\x0bmax_pollers\x18\x01 \x01(\x05\x1a^\n\x19\x41utoscalingPollerBehavior\x12\x13\n\x0bmin_pollers\x18\x01 \x01(\x05\x12\x13\n\x0bmax_pollers\x18\x02 \x01(\x05\x12\x17\n\x0finitial_pollers\x18\x03 \x01(\x05\x42\x11\n\x0fpoller_behaviorB\x7f\n\x16io.temporal.api.sdk.v1B\x11WorkerConfigProtoP\x01Z\x1dgo.temporal.io/api/sdk/v1;sdk\xaa\x02\x15Temporalio.Api.Sdk.V1\xea\x02\x18Temporalio::Api::Sdk::V1b\x06proto3" ) - -_WORKERCONFIG = DESCRIPTOR.message_types_by_name["WorkerConfig"] -_WORKERCONFIG_SIMPLEPOLLERBEHAVIOR = _WORKERCONFIG.nested_types_by_name[ - "SimplePollerBehavior" -] -_WORKERCONFIG_AUTOSCALINGPOLLERBEHAVIOR = _WORKERCONFIG.nested_types_by_name[ - "AutoscalingPollerBehavior" -] -WorkerConfig = _reflection.GeneratedProtocolMessageType( - "WorkerConfig", - (_message.Message,), - { - "SimplePollerBehavior": _reflection.GeneratedProtocolMessageType( - "SimplePollerBehavior", - (_message.Message,), - { - "DESCRIPTOR": _WORKERCONFIG_SIMPLEPOLLERBEHAVIOR, - "__module__": "temporalio.api.sdk.v1.worker_config_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.WorkerConfig.SimplePollerBehavior) - }, - ), - "AutoscalingPollerBehavior": _reflection.GeneratedProtocolMessageType( - "AutoscalingPollerBehavior", - (_message.Message,), - { - "DESCRIPTOR": _WORKERCONFIG_AUTOSCALINGPOLLERBEHAVIOR, - "__module__": "temporalio.api.sdk.v1.worker_config_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehavior) - }, - ), - "DESCRIPTOR": _WORKERCONFIG, - "__module__": "temporalio.api.sdk.v1.worker_config_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.WorkerConfig) - }, -) -_sym_db.RegisterMessage(WorkerConfig) -_sym_db.RegisterMessage(WorkerConfig.SimplePollerBehavior) -_sym_db.RegisterMessage(WorkerConfig.AutoscalingPollerBehavior) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\026io.temporal.api.sdk.v1B\021WorkerConfigProtoP\001Z\035go.temporal.io/api/sdk/v1;sdk\252\002\025Temporalio.Api.Sdk.V1\352\002\030Temporalio::Api::Sdk::V1" diff --git a/temporalio/api/sdk/v1/worker_config_pb2.pyi b/temporalio/api/sdk/v1/worker_config_pb2.pyi index cc0906d242..ea29765894 100644 --- a/temporalio/api/sdk/v1/worker_config_pb2.pyi +++ b/temporalio/api/sdk/v1/worker_config_pb2.pyi @@ -4,21 +4,18 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.message -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkerConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class SimplePollerBehavior(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -30,9 +27,10 @@ class WorkerConfig(google.protobuf.message.Message): max_pollers: builtins.int = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["max_pollers", b"max_pollers"] + self, field_name: typing.Literal["max_pollers", b"max_pollers"] ) -> None: ... + @typing.final class AutoscalingPollerBehavior(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -58,7 +56,7 @@ class WorkerConfig(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "initial_pollers", b"initial_pollers", "max_pollers", @@ -88,7 +86,7 @@ class WorkerConfig(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "autoscaling_poller_behavior", b"autoscaling_poller_behavior", "poller_behavior", @@ -99,7 +97,7 @@ class WorkerConfig(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "autoscaling_poller_behavior", b"autoscaling_poller_behavior", "poller_behavior", @@ -111,13 +109,9 @@ class WorkerConfig(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, - oneof_group: typing_extensions.Literal["poller_behavior", b"poller_behavior"], + self, oneof_group: typing.Literal["poller_behavior", b"poller_behavior"] ) -> ( - typing_extensions.Literal[ - "simple_poller_behavior", "autoscaling_poller_behavior" - ] - | None + typing.Literal["simple_poller_behavior", "autoscaling_poller_behavior"] | None ): ... global___WorkerConfig = WorkerConfig diff --git a/temporalio/api/sdk/v1/workflow_metadata_pb2.py b/temporalio/api/sdk/v1/workflow_metadata_pb2.py index c872c59f2b..6eba1057d4 100644 --- a/temporalio/api/sdk/v1/workflow_metadata_pb2.py +++ b/temporalio/api/sdk/v1/workflow_metadata_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -18,45 +17,8 @@ b'\n+temporal/api/sdk/v1/workflow_metadata.proto\x12\x13temporal.api.sdk.v1"h\n\x10WorkflowMetadata\x12;\n\ndefinition\x18\x01 \x01(\x0b\x32\'.temporal.api.sdk.v1.WorkflowDefinition\x12\x17\n\x0f\x63urrent_details\x18\x02 \x01(\t"\x91\x02\n\x12WorkflowDefinition\x12\x0c\n\x04type\x18\x01 \x01(\t\x12M\n\x11query_definitions\x18\x02 \x03(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowInteractionDefinition\x12N\n\x12signal_definitions\x18\x03 \x03(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowInteractionDefinition\x12N\n\x12update_definitions\x18\x04 \x03(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowInteractionDefinition"B\n\x1dWorkflowInteractionDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x83\x01\n\x16io.temporal.api.sdk.v1B\x15WorkflowMetadataProtoP\x01Z\x1dgo.temporal.io/api/sdk/v1;sdk\xaa\x02\x15Temporalio.Api.Sdk.V1\xea\x02\x18Temporalio::Api::Sdk::V1b\x06proto3' ) - -_WORKFLOWMETADATA = DESCRIPTOR.message_types_by_name["WorkflowMetadata"] -_WORKFLOWDEFINITION = DESCRIPTOR.message_types_by_name["WorkflowDefinition"] -_WORKFLOWINTERACTIONDEFINITION = DESCRIPTOR.message_types_by_name[ - "WorkflowInteractionDefinition" -] -WorkflowMetadata = _reflection.GeneratedProtocolMessageType( - "WorkflowMetadata", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWMETADATA, - "__module__": "temporalio.api.sdk.v1.workflow_metadata_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.WorkflowMetadata) - }, -) -_sym_db.RegisterMessage(WorkflowMetadata) - -WorkflowDefinition = _reflection.GeneratedProtocolMessageType( - "WorkflowDefinition", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWDEFINITION, - "__module__": "temporalio.api.sdk.v1.workflow_metadata_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.WorkflowDefinition) - }, -) -_sym_db.RegisterMessage(WorkflowDefinition) - -WorkflowInteractionDefinition = _reflection.GeneratedProtocolMessageType( - "WorkflowInteractionDefinition", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWINTERACTIONDEFINITION, - "__module__": "temporalio.api.sdk.v1.workflow_metadata_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.sdk.v1.WorkflowInteractionDefinition) - }, -) -_sym_db.RegisterMessage(WorkflowInteractionDefinition) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\026io.temporal.api.sdk.v1B\025WorkflowMetadataProtoP\001Z\035go.temporal.io/api/sdk/v1;sdk\252\002\025Temporalio.Api.Sdk.V1\352\002\030Temporalio::Api::Sdk::V1" diff --git a/temporalio/api/sdk/v1/workflow_metadata_pb2.pyi b/temporalio/api/sdk/v1/workflow_metadata_pb2.pyi index ded58390b5..4f0856e143 100644 --- a/temporalio/api/sdk/v1/workflow_metadata_pb2.pyi +++ b/temporalio/api/sdk/v1/workflow_metadata_pb2.pyi @@ -5,19 +5,15 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowMetadata(google.protobuf.message.Message): """The name of the query to retrieve this information is `__temporal_workflow_metadata`.""" @@ -25,13 +21,14 @@ class WorkflowMetadata(google.protobuf.message.Message): DEFINITION_FIELD_NUMBER: builtins.int CURRENT_DETAILS_FIELD_NUMBER: builtins.int - @property - def definition(self) -> global___WorkflowDefinition: - """Metadata provided at declaration or creation time.""" current_details: builtins.str """Current long-form details of the workflow's state. This is used by user interfaces to show long-form text. This text may be formatted by the user interface. """ + @property + def definition(self) -> global___WorkflowDefinition: + """Metadata provided at declaration or creation time.""" + def __init__( self, *, @@ -39,17 +36,18 @@ class WorkflowMetadata(google.protobuf.message.Message): current_details: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["definition", b"definition"] + self, field_name: typing.Literal["definition", b"definition"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_details", b"current_details", "definition", b"definition" ], ) -> None: ... global___WorkflowMetadata = WorkflowMetadata +@typing.final class WorkflowDefinition(google.protobuf.message.Message): """(-- api-linter: core::0203::optional=disabled --)""" @@ -70,6 +68,7 @@ class WorkflowDefinition(google.protobuf.message.Message): global___WorkflowInteractionDefinition ]: """Query definitions, sorted by name.""" + @property def signal_definitions( self, @@ -77,6 +76,7 @@ class WorkflowDefinition(google.protobuf.message.Message): global___WorkflowInteractionDefinition ]: """Signal definitions, sorted by name.""" + @property def update_definitions( self, @@ -84,6 +84,7 @@ class WorkflowDefinition(google.protobuf.message.Message): global___WorkflowInteractionDefinition ]: """Update definitions, sorted by name.""" + def __init__( self, *, @@ -103,7 +104,7 @@ class WorkflowDefinition(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "query_definitions", b"query_definitions", "signal_definitions", @@ -117,6 +118,7 @@ class WorkflowDefinition(google.protobuf.message.Message): global___WorkflowDefinition = WorkflowDefinition +@typing.final class WorkflowInteractionDefinition(google.protobuf.message.Message): """(-- api-linter: core::0123::resource-annotation=disabled aip.dev/not-precedent: The `name` field is optional. --) @@ -144,10 +146,7 @@ class WorkflowInteractionDefinition(google.protobuf.message.Message): description: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "description", b"description", "name", b"name" - ], + self, field_name: typing.Literal["description", b"description", "name", b"name"] ) -> None: ... global___WorkflowInteractionDefinition = WorkflowInteractionDefinition diff --git a/temporalio/api/taskqueue/v1/__init__.py b/temporalio/api/taskqueue/v1/__init__.py index 888c7ff2ab..325d6ab8e5 100644 --- a/temporalio/api/taskqueue/v1/__init__.py +++ b/temporalio/api/taskqueue/v1/__init__.py @@ -4,7 +4,10 @@ CompatibleBuildIdRedirectRule, CompatibleVersionSet, ConfigMetadata, + PollerGroupInfo, + PollerGroupsInfo, PollerInfo, + PollerPoolInfo, PollerScalingDecision, RampByPercentage, RateLimit, @@ -32,7 +35,10 @@ "CompatibleBuildIdRedirectRule", "CompatibleVersionSet", "ConfigMetadata", + "PollerGroupInfo", + "PollerGroupsInfo", "PollerInfo", + "PollerPoolInfo", "PollerScalingDecision", "RampByPercentage", "RateLimit", diff --git a/temporalio/api/taskqueue/v1/message_pb2.py b/temporalio/api/taskqueue/v1/message_pb2.py index 03ccf47e24..dc62a7f520 100644 --- a/temporalio/api/taskqueue/v1/message_pb2.py +++ b/temporalio/api/taskqueue/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -29,335 +28,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\'temporal/api/taskqueue/v1/message.proto\x12\x19temporal.api.taskqueue.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a&temporal/api/enums/v1/task_queue.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto"b\n\tTaskQueue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04kind\x18\x02 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueKind\x12\x13\n\x0bnormal_name\x18\x03 \x01(\t"O\n\x11TaskQueueMetadata\x12:\n\x14max_tasks_per_second\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue"\xda\x02\n\x17TaskQueueVersioningInfo\x12W\n\x1a\x63urrent_deployment_version\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1b\n\x0f\x63urrent_version\x18\x01 \x01(\tB\x02\x18\x01\x12W\n\x1aramping_deployment_version\x18\t \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1b\n\x0framping_version\x18\x02 \x01(\tB\x02\x18\x01\x12"\n\x1aramping_version_percentage\x18\x03 \x01(\x02\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"W\n\x19TaskQueueVersionSelection\x12\x11\n\tbuild_ids\x18\x01 \x03(\t\x12\x13\n\x0bunversioned\x18\x02 \x01(\x08\x12\x12\n\nall_active\x18\x03 \x01(\x08"\x95\x02\n\x14TaskQueueVersionInfo\x12R\n\ntypes_info\x18\x01 \x03(\x0b\x32>.temporal.api.taskqueue.v1.TaskQueueVersionInfo.TypesInfoEntry\x12I\n\x11task_reachability\x18\x02 \x01(\x0e\x32..temporal.api.enums.v1.BuildIdTaskReachability\x1a^\n\x0eTypesInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.temporal.api.taskqueue.v1.TaskQueueTypeInfo:\x02\x38\x01"\x85\x01\n\x11TaskQueueTypeInfo\x12\x36\n\x07pollers\x18\x01 \x03(\x0b\x32%.temporal.api.taskqueue.v1.PollerInfo\x12\x38\n\x05stats\x18\x02 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats"\xa4\x01\n\x0eTaskQueueStats\x12!\n\x19\x61pproximate_backlog_count\x18\x01 \x01(\x03\x12:\n\x17\x61pproximate_backlog_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x16\n\x0etasks_add_rate\x18\x03 \x01(\x02\x12\x1b\n\x13tasks_dispatch_rate\x18\x04 \x01(\x02"\xac\x01\n\x0fTaskQueueStatus\x12\x1a\n\x12\x62\x61\x63klog_count_hint\x18\x01 \x01(\x03\x12\x12\n\nread_level\x18\x02 \x01(\x03\x12\x11\n\tack_level\x18\x03 \x01(\x03\x12\x17\n\x0frate_per_second\x18\x04 \x01(\x01\x12=\n\rtask_id_block\x18\x05 \x01(\x0b\x32&.temporal.api.taskqueue.v1.TaskIdBlock"/\n\x0bTaskIdBlock\x12\x10\n\x08start_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x65nd_id\x18\x02 \x01(\x03"B\n\x1aTaskQueuePartitionMetadata\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x17\n\x0fowner_host_name\x18\x02 \x01(\t"\x9a\x02\n\nPollerInfo\x12\x34\n\x10last_access_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x17\n\x0frate_per_second\x18\x03 \x01(\x01\x12Z\n\x1bworker_version_capabilities\x18\x04 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilitiesB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x05 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"\x9a\x01\n\x19StickyExecutionAttributes\x12?\n\x11worker_task_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12<\n\x19schedule_to_start_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration")\n\x14\x43ompatibleVersionSet\x12\x11\n\tbuild_ids\x18\x01 \x03(\t"j\n\x15TaskQueueReachability\x12\x12\n\ntask_queue\x18\x01 \x01(\t\x12=\n\x0creachability\x18\x02 \x03(\x0e\x32\'.temporal.api.enums.v1.TaskReachability"z\n\x13\x42uildIdReachability\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12Q\n\x17task_queue_reachability\x18\x02 \x03(\x0b\x32\x30.temporal.api.taskqueue.v1.TaskQueueReachability"+\n\x10RampByPercentage\x12\x17\n\x0framp_percentage\x18\x01 \x01(\x02"\x80\x01\n\x15\x42uildIdAssignmentRule\x12\x17\n\x0ftarget_build_id\x18\x01 \x01(\t\x12\x46\n\x0fpercentage_ramp\x18\x03 \x01(\x0b\x32+.temporal.api.taskqueue.v1.RampByPercentageH\x00\x42\x06\n\x04ramp"Q\n\x1d\x43ompatibleBuildIdRedirectRule\x12\x17\n\x0fsource_build_id\x18\x01 \x01(\t\x12\x17\n\x0ftarget_build_id\x18\x02 \x01(\t"\x93\x01\n TimestampedBuildIdAssignmentRule\x12>\n\x04rule\x18\x01 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.BuildIdAssignmentRule\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xa3\x01\n(TimestampedCompatibleBuildIdRedirectRule\x12\x46\n\x04rule\x18\x01 \x01(\x0b\x32\x38.temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp">\n\x15PollerScalingDecision\x12%\n\x1dpoll_request_delta_suggestion\x18\x01 \x01(\x05"(\n\tRateLimit\x12\x1b\n\x13requests_per_second\x18\x01 \x01(\x02"j\n\x0e\x43onfigMetadata\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x17\n\x0fupdate_identity\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x88\x01\n\x0fRateLimitConfig\x12\x38\n\nrate_limit\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.RateLimit\x12;\n\x08metadata\x18\x02 \x01(\x0b\x32).temporal.api.taskqueue.v1.ConfigMetadata"\xad\x01\n\x0fTaskQueueConfig\x12\x44\n\x10queue_rate_limit\x18\x01 \x01(\x0b\x32*.temporal.api.taskqueue.v1.RateLimitConfig\x12T\n fairness_keys_rate_limit_default\x18\x02 \x01(\x0b\x32*.temporal.api.taskqueue.v1.RateLimitConfigB\x98\x01\n\x1cio.temporal.api.taskqueue.v1B\x0cMessageProtoP\x01Z)go.temporal.io/api/taskqueue/v1;taskqueue\xaa\x02\x1bTemporalio.Api.TaskQueue.V1\xea\x02\x1eTemporalio::Api::TaskQueue::V1b\x06proto3' + b'\n\'temporal/api/taskqueue/v1/message.proto\x12\x19temporal.api.taskqueue.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a&temporal/api/enums/v1/task_queue.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto"b\n\tTaskQueue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04kind\x18\x02 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueKind\x12\x13\n\x0bnormal_name\x18\x03 \x01(\t"O\n\x11TaskQueueMetadata\x12:\n\x14max_tasks_per_second\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue"(\n\x0ePollerPoolInfo\x12\x16\n\x0etarget_pollers\x18\x01 \x01(\x05"\xda\x02\n\x17TaskQueueVersioningInfo\x12W\n\x1a\x63urrent_deployment_version\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1b\n\x0f\x63urrent_version\x18\x01 \x01(\tB\x02\x18\x01\x12W\n\x1aramping_deployment_version\x18\t \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1b\n\x0framping_version\x18\x02 \x01(\tB\x02\x18\x01\x12"\n\x1aramping_version_percentage\x18\x03 \x01(\x02\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"W\n\x19TaskQueueVersionSelection\x12\x11\n\tbuild_ids\x18\x01 \x03(\t\x12\x13\n\x0bunversioned\x18\x02 \x01(\x08\x12\x12\n\nall_active\x18\x03 \x01(\x08"\x95\x02\n\x14TaskQueueVersionInfo\x12R\n\ntypes_info\x18\x01 \x03(\x0b\x32>.temporal.api.taskqueue.v1.TaskQueueVersionInfo.TypesInfoEntry\x12I\n\x11task_reachability\x18\x02 \x01(\x0e\x32..temporal.api.enums.v1.BuildIdTaskReachability\x1a^\n\x0eTypesInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.temporal.api.taskqueue.v1.TaskQueueTypeInfo:\x02\x38\x01"\x85\x01\n\x11TaskQueueTypeInfo\x12\x36\n\x07pollers\x18\x01 \x03(\x0b\x32%.temporal.api.taskqueue.v1.PollerInfo\x12\x38\n\x05stats\x18\x02 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats"\xc2\x01\n\x0eTaskQueueStats\x12!\n\x19\x61pproximate_backlog_count\x18\x01 \x01(\x03\x12:\n\x17\x61pproximate_backlog_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x16\n\x0etasks_add_rate\x18\x03 \x01(\x02\x12\x1b\n\x13tasks_dispatch_rate\x18\x04 \x01(\x02\x12\x1c\n\x14rate_limiting_active\x18\x05 \x01(\x08"\xac\x01\n\x0fTaskQueueStatus\x12\x1a\n\x12\x62\x61\x63klog_count_hint\x18\x01 \x01(\x03\x12\x12\n\nread_level\x18\x02 \x01(\x03\x12\x11\n\tack_level\x18\x03 \x01(\x03\x12\x17\n\x0frate_per_second\x18\x04 \x01(\x01\x12=\n\rtask_id_block\x18\x05 \x01(\x0b\x32&.temporal.api.taskqueue.v1.TaskIdBlock"/\n\x0bTaskIdBlock\x12\x10\n\x08start_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x65nd_id\x18\x02 \x01(\x03"B\n\x1aTaskQueuePartitionMetadata\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x17\n\x0fowner_host_name\x18\x02 \x01(\t"\x9a\x02\n\nPollerInfo\x12\x34\n\x10last_access_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x17\n\x0frate_per_second\x18\x03 \x01(\x01\x12Z\n\x1bworker_version_capabilities\x18\x04 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilitiesB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x05 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"\x9a\x01\n\x19StickyExecutionAttributes\x12?\n\x11worker_task_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12<\n\x19schedule_to_start_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration")\n\x14\x43ompatibleVersionSet\x12\x11\n\tbuild_ids\x18\x01 \x03(\t"j\n\x15TaskQueueReachability\x12\x12\n\ntask_queue\x18\x01 \x01(\t\x12=\n\x0creachability\x18\x02 \x03(\x0e\x32\'.temporal.api.enums.v1.TaskReachability"z\n\x13\x42uildIdReachability\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12Q\n\x17task_queue_reachability\x18\x02 \x03(\x0b\x32\x30.temporal.api.taskqueue.v1.TaskQueueReachability"+\n\x10RampByPercentage\x12\x17\n\x0framp_percentage\x18\x01 \x01(\x02"\x80\x01\n\x15\x42uildIdAssignmentRule\x12\x17\n\x0ftarget_build_id\x18\x01 \x01(\t\x12\x46\n\x0fpercentage_ramp\x18\x03 \x01(\x0b\x32+.temporal.api.taskqueue.v1.RampByPercentageH\x00\x42\x06\n\x04ramp"Q\n\x1d\x43ompatibleBuildIdRedirectRule\x12\x17\n\x0fsource_build_id\x18\x01 \x01(\t\x12\x17\n\x0ftarget_build_id\x18\x02 \x01(\t"\x93\x01\n TimestampedBuildIdAssignmentRule\x12>\n\x04rule\x18\x01 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.BuildIdAssignmentRule\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xa3\x01\n(TimestampedCompatibleBuildIdRedirectRule\x12\x46\n\x04rule\x18\x01 \x01(\x0b\x32\x38.temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"-\n\x0fPollerGroupInfo\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06weight\x18\x02 \x01(\x02"f\n\x10PollerGroupsInfo\x12\x0f\n\x07version\x18\x01 \x01(\x03\x12\x41\n\rpoller_groups\x18\x02 \x03(\x0b\x32*.temporal.api.taskqueue.v1.PollerGroupInfo">\n\x15PollerScalingDecision\x12%\n\x1dpoll_request_delta_suggestion\x18\x01 \x01(\x05"(\n\tRateLimit\x12\x1b\n\x13requests_per_second\x18\x01 \x01(\x02"j\n\x0e\x43onfigMetadata\x12\x0e\n\x06reason\x18\x01 \x01(\t\x12\x17\n\x0fupdate_identity\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x88\x01\n\x0fRateLimitConfig\x12\x38\n\nrate_limit\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.RateLimit\x12;\n\x08metadata\x18\x02 \x01(\x0b\x32).temporal.api.taskqueue.v1.ConfigMetadata"\xd9\x02\n\x0fTaskQueueConfig\x12\x44\n\x10queue_rate_limit\x18\x01 \x01(\x0b\x32*.temporal.api.taskqueue.v1.RateLimitConfig\x12T\n fairness_keys_rate_limit_default\x18\x02 \x01(\x0b\x32*.temporal.api.taskqueue.v1.RateLimitConfig\x12j\n\x19\x66\x61irness_weight_overrides\x18\x03 \x03(\x0b\x32G.temporal.api.taskqueue.v1.TaskQueueConfig.FairnessWeightOverridesEntry\x1a>\n\x1c\x46\x61irnessWeightOverridesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x42\x98\x01\n\x1cio.temporal.api.taskqueue.v1B\x0cMessageProtoP\x01Z)go.temporal.io/api/taskqueue/v1;taskqueue\xaa\x02\x1bTemporalio.Api.TaskQueue.V1\xea\x02\x1eTemporalio::Api::TaskQueue::V1b\x06proto3' ) - -_TASKQUEUE = DESCRIPTOR.message_types_by_name["TaskQueue"] -_TASKQUEUEMETADATA = DESCRIPTOR.message_types_by_name["TaskQueueMetadata"] -_TASKQUEUEVERSIONINGINFO = DESCRIPTOR.message_types_by_name["TaskQueueVersioningInfo"] -_TASKQUEUEVERSIONSELECTION = DESCRIPTOR.message_types_by_name[ - "TaskQueueVersionSelection" -] -_TASKQUEUEVERSIONINFO = DESCRIPTOR.message_types_by_name["TaskQueueVersionInfo"] -_TASKQUEUEVERSIONINFO_TYPESINFOENTRY = _TASKQUEUEVERSIONINFO.nested_types_by_name[ - "TypesInfoEntry" -] -_TASKQUEUETYPEINFO = DESCRIPTOR.message_types_by_name["TaskQueueTypeInfo"] -_TASKQUEUESTATS = DESCRIPTOR.message_types_by_name["TaskQueueStats"] -_TASKQUEUESTATUS = DESCRIPTOR.message_types_by_name["TaskQueueStatus"] -_TASKIDBLOCK = DESCRIPTOR.message_types_by_name["TaskIdBlock"] -_TASKQUEUEPARTITIONMETADATA = DESCRIPTOR.message_types_by_name[ - "TaskQueuePartitionMetadata" -] -_POLLERINFO = DESCRIPTOR.message_types_by_name["PollerInfo"] -_STICKYEXECUTIONATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "StickyExecutionAttributes" -] -_COMPATIBLEVERSIONSET = DESCRIPTOR.message_types_by_name["CompatibleVersionSet"] -_TASKQUEUEREACHABILITY = DESCRIPTOR.message_types_by_name["TaskQueueReachability"] -_BUILDIDREACHABILITY = DESCRIPTOR.message_types_by_name["BuildIdReachability"] -_RAMPBYPERCENTAGE = DESCRIPTOR.message_types_by_name["RampByPercentage"] -_BUILDIDASSIGNMENTRULE = DESCRIPTOR.message_types_by_name["BuildIdAssignmentRule"] -_COMPATIBLEBUILDIDREDIRECTRULE = DESCRIPTOR.message_types_by_name[ - "CompatibleBuildIdRedirectRule" -] -_TIMESTAMPEDBUILDIDASSIGNMENTRULE = DESCRIPTOR.message_types_by_name[ - "TimestampedBuildIdAssignmentRule" -] -_TIMESTAMPEDCOMPATIBLEBUILDIDREDIRECTRULE = DESCRIPTOR.message_types_by_name[ - "TimestampedCompatibleBuildIdRedirectRule" -] -_POLLERSCALINGDECISION = DESCRIPTOR.message_types_by_name["PollerScalingDecision"] -_RATELIMIT = DESCRIPTOR.message_types_by_name["RateLimit"] -_CONFIGMETADATA = DESCRIPTOR.message_types_by_name["ConfigMetadata"] -_RATELIMITCONFIG = DESCRIPTOR.message_types_by_name["RateLimitConfig"] -_TASKQUEUECONFIG = DESCRIPTOR.message_types_by_name["TaskQueueConfig"] -TaskQueue = _reflection.GeneratedProtocolMessageType( - "TaskQueue", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUE, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueue) - }, -) -_sym_db.RegisterMessage(TaskQueue) - -TaskQueueMetadata = _reflection.GeneratedProtocolMessageType( - "TaskQueueMetadata", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUEMETADATA, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueMetadata) - }, -) -_sym_db.RegisterMessage(TaskQueueMetadata) - -TaskQueueVersioningInfo = _reflection.GeneratedProtocolMessageType( - "TaskQueueVersioningInfo", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUEVERSIONINGINFO, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueVersioningInfo) - }, -) -_sym_db.RegisterMessage(TaskQueueVersioningInfo) - -TaskQueueVersionSelection = _reflection.GeneratedProtocolMessageType( - "TaskQueueVersionSelection", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUEVERSIONSELECTION, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueVersionSelection) - }, -) -_sym_db.RegisterMessage(TaskQueueVersionSelection) - -TaskQueueVersionInfo = _reflection.GeneratedProtocolMessageType( - "TaskQueueVersionInfo", - (_message.Message,), - { - "TypesInfoEntry": _reflection.GeneratedProtocolMessageType( - "TypesInfoEntry", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUEVERSIONINFO_TYPESINFOENTRY, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueVersionInfo.TypesInfoEntry) - }, - ), - "DESCRIPTOR": _TASKQUEUEVERSIONINFO, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueVersionInfo) - }, -) -_sym_db.RegisterMessage(TaskQueueVersionInfo) -_sym_db.RegisterMessage(TaskQueueVersionInfo.TypesInfoEntry) - -TaskQueueTypeInfo = _reflection.GeneratedProtocolMessageType( - "TaskQueueTypeInfo", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUETYPEINFO, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueTypeInfo) - }, -) -_sym_db.RegisterMessage(TaskQueueTypeInfo) - -TaskQueueStats = _reflection.GeneratedProtocolMessageType( - "TaskQueueStats", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUESTATS, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueStats) - }, -) -_sym_db.RegisterMessage(TaskQueueStats) - -TaskQueueStatus = _reflection.GeneratedProtocolMessageType( - "TaskQueueStatus", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUESTATUS, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueStatus) - }, -) -_sym_db.RegisterMessage(TaskQueueStatus) - -TaskIdBlock = _reflection.GeneratedProtocolMessageType( - "TaskIdBlock", - (_message.Message,), - { - "DESCRIPTOR": _TASKIDBLOCK, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskIdBlock) - }, -) -_sym_db.RegisterMessage(TaskIdBlock) - -TaskQueuePartitionMetadata = _reflection.GeneratedProtocolMessageType( - "TaskQueuePartitionMetadata", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUEPARTITIONMETADATA, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueuePartitionMetadata) - }, -) -_sym_db.RegisterMessage(TaskQueuePartitionMetadata) - -PollerInfo = _reflection.GeneratedProtocolMessageType( - "PollerInfo", - (_message.Message,), - { - "DESCRIPTOR": _POLLERINFO, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.PollerInfo) - }, -) -_sym_db.RegisterMessage(PollerInfo) - -StickyExecutionAttributes = _reflection.GeneratedProtocolMessageType( - "StickyExecutionAttributes", - (_message.Message,), - { - "DESCRIPTOR": _STICKYEXECUTIONATTRIBUTES, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.StickyExecutionAttributes) - }, -) -_sym_db.RegisterMessage(StickyExecutionAttributes) - -CompatibleVersionSet = _reflection.GeneratedProtocolMessageType( - "CompatibleVersionSet", - (_message.Message,), - { - "DESCRIPTOR": _COMPATIBLEVERSIONSET, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.CompatibleVersionSet) - }, -) -_sym_db.RegisterMessage(CompatibleVersionSet) - -TaskQueueReachability = _reflection.GeneratedProtocolMessageType( - "TaskQueueReachability", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUEREACHABILITY, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueReachability) - }, -) -_sym_db.RegisterMessage(TaskQueueReachability) - -BuildIdReachability = _reflection.GeneratedProtocolMessageType( - "BuildIdReachability", - (_message.Message,), - { - "DESCRIPTOR": _BUILDIDREACHABILITY, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.BuildIdReachability) - }, -) -_sym_db.RegisterMessage(BuildIdReachability) - -RampByPercentage = _reflection.GeneratedProtocolMessageType( - "RampByPercentage", - (_message.Message,), - { - "DESCRIPTOR": _RAMPBYPERCENTAGE, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.RampByPercentage) - }, -) -_sym_db.RegisterMessage(RampByPercentage) - -BuildIdAssignmentRule = _reflection.GeneratedProtocolMessageType( - "BuildIdAssignmentRule", - (_message.Message,), - { - "DESCRIPTOR": _BUILDIDASSIGNMENTRULE, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.BuildIdAssignmentRule) - }, -) -_sym_db.RegisterMessage(BuildIdAssignmentRule) - -CompatibleBuildIdRedirectRule = _reflection.GeneratedProtocolMessageType( - "CompatibleBuildIdRedirectRule", - (_message.Message,), - { - "DESCRIPTOR": _COMPATIBLEBUILDIDREDIRECTRULE, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule) - }, -) -_sym_db.RegisterMessage(CompatibleBuildIdRedirectRule) - -TimestampedBuildIdAssignmentRule = _reflection.GeneratedProtocolMessageType( - "TimestampedBuildIdAssignmentRule", - (_message.Message,), - { - "DESCRIPTOR": _TIMESTAMPEDBUILDIDASSIGNMENTRULE, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule) - }, -) -_sym_db.RegisterMessage(TimestampedBuildIdAssignmentRule) - -TimestampedCompatibleBuildIdRedirectRule = _reflection.GeneratedProtocolMessageType( - "TimestampedCompatibleBuildIdRedirectRule", - (_message.Message,), - { - "DESCRIPTOR": _TIMESTAMPEDCOMPATIBLEBUILDIDREDIRECTRULE, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule) - }, -) -_sym_db.RegisterMessage(TimestampedCompatibleBuildIdRedirectRule) - -PollerScalingDecision = _reflection.GeneratedProtocolMessageType( - "PollerScalingDecision", - (_message.Message,), - { - "DESCRIPTOR": _POLLERSCALINGDECISION, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.PollerScalingDecision) - }, -) -_sym_db.RegisterMessage(PollerScalingDecision) - -RateLimit = _reflection.GeneratedProtocolMessageType( - "RateLimit", - (_message.Message,), - { - "DESCRIPTOR": _RATELIMIT, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.RateLimit) - }, -) -_sym_db.RegisterMessage(RateLimit) - -ConfigMetadata = _reflection.GeneratedProtocolMessageType( - "ConfigMetadata", - (_message.Message,), - { - "DESCRIPTOR": _CONFIGMETADATA, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.ConfigMetadata) - }, -) -_sym_db.RegisterMessage(ConfigMetadata) - -RateLimitConfig = _reflection.GeneratedProtocolMessageType( - "RateLimitConfig", - (_message.Message,), - { - "DESCRIPTOR": _RATELIMITCONFIG, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.RateLimitConfig) - }, -) -_sym_db.RegisterMessage(RateLimitConfig) - -TaskQueueConfig = _reflection.GeneratedProtocolMessageType( - "TaskQueueConfig", - (_message.Message,), - { - "DESCRIPTOR": _TASKQUEUECONFIG, - "__module__": "temporalio.api.taskqueue.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.taskqueue.v1.TaskQueueConfig) - }, -) -_sym_db.RegisterMessage(TaskQueueConfig) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\034io.temporal.api.taskqueue.v1B\014MessageProtoP\001Z)go.temporal.io/api/taskqueue/v1;taskqueue\252\002\033Temporalio.Api.TaskQueue.V1\352\002\036Temporalio::Api::TaskQueue::V1" @@ -375,56 +50,66 @@ _POLLERINFO.fields_by_name[ "worker_version_capabilities" ]._serialized_options = b"\030\001" + _TASKQUEUECONFIG_FAIRNESSWEIGHTOVERRIDESENTRY._options = None + _TASKQUEUECONFIG_FAIRNESSWEIGHTOVERRIDESENTRY._serialized_options = b"8\001" _TASKQUEUE._serialized_start = 287 _TASKQUEUE._serialized_end = 385 _TASKQUEUEMETADATA._serialized_start = 387 _TASKQUEUEMETADATA._serialized_end = 466 - _TASKQUEUEVERSIONINGINFO._serialized_start = 469 - _TASKQUEUEVERSIONINGINFO._serialized_end = 815 - _TASKQUEUEVERSIONSELECTION._serialized_start = 817 - _TASKQUEUEVERSIONSELECTION._serialized_end = 904 - _TASKQUEUEVERSIONINFO._serialized_start = 907 - _TASKQUEUEVERSIONINFO._serialized_end = 1184 - _TASKQUEUEVERSIONINFO_TYPESINFOENTRY._serialized_start = 1090 - _TASKQUEUEVERSIONINFO_TYPESINFOENTRY._serialized_end = 1184 - _TASKQUEUETYPEINFO._serialized_start = 1187 - _TASKQUEUETYPEINFO._serialized_end = 1320 - _TASKQUEUESTATS._serialized_start = 1323 - _TASKQUEUESTATS._serialized_end = 1487 - _TASKQUEUESTATUS._serialized_start = 1490 - _TASKQUEUESTATUS._serialized_end = 1662 - _TASKIDBLOCK._serialized_start = 1664 - _TASKIDBLOCK._serialized_end = 1711 - _TASKQUEUEPARTITIONMETADATA._serialized_start = 1713 - _TASKQUEUEPARTITIONMETADATA._serialized_end = 1779 - _POLLERINFO._serialized_start = 1782 - _POLLERINFO._serialized_end = 2064 - _STICKYEXECUTIONATTRIBUTES._serialized_start = 2067 - _STICKYEXECUTIONATTRIBUTES._serialized_end = 2221 - _COMPATIBLEVERSIONSET._serialized_start = 2223 - _COMPATIBLEVERSIONSET._serialized_end = 2264 - _TASKQUEUEREACHABILITY._serialized_start = 2266 - _TASKQUEUEREACHABILITY._serialized_end = 2372 - _BUILDIDREACHABILITY._serialized_start = 2374 - _BUILDIDREACHABILITY._serialized_end = 2496 - _RAMPBYPERCENTAGE._serialized_start = 2498 - _RAMPBYPERCENTAGE._serialized_end = 2541 - _BUILDIDASSIGNMENTRULE._serialized_start = 2544 - _BUILDIDASSIGNMENTRULE._serialized_end = 2672 - _COMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 2674 - _COMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 2755 - _TIMESTAMPEDBUILDIDASSIGNMENTRULE._serialized_start = 2758 - _TIMESTAMPEDBUILDIDASSIGNMENTRULE._serialized_end = 2905 - _TIMESTAMPEDCOMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 2908 - _TIMESTAMPEDCOMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 3071 - _POLLERSCALINGDECISION._serialized_start = 3073 - _POLLERSCALINGDECISION._serialized_end = 3135 - _RATELIMIT._serialized_start = 3137 - _RATELIMIT._serialized_end = 3177 - _CONFIGMETADATA._serialized_start = 3179 - _CONFIGMETADATA._serialized_end = 3285 - _RATELIMITCONFIG._serialized_start = 3288 - _RATELIMITCONFIG._serialized_end = 3424 - _TASKQUEUECONFIG._serialized_start = 3427 - _TASKQUEUECONFIG._serialized_end = 3600 + _POLLERPOOLINFO._serialized_start = 468 + _POLLERPOOLINFO._serialized_end = 508 + _TASKQUEUEVERSIONINGINFO._serialized_start = 511 + _TASKQUEUEVERSIONINGINFO._serialized_end = 857 + _TASKQUEUEVERSIONSELECTION._serialized_start = 859 + _TASKQUEUEVERSIONSELECTION._serialized_end = 946 + _TASKQUEUEVERSIONINFO._serialized_start = 949 + _TASKQUEUEVERSIONINFO._serialized_end = 1226 + _TASKQUEUEVERSIONINFO_TYPESINFOENTRY._serialized_start = 1132 + _TASKQUEUEVERSIONINFO_TYPESINFOENTRY._serialized_end = 1226 + _TASKQUEUETYPEINFO._serialized_start = 1229 + _TASKQUEUETYPEINFO._serialized_end = 1362 + _TASKQUEUESTATS._serialized_start = 1365 + _TASKQUEUESTATS._serialized_end = 1559 + _TASKQUEUESTATUS._serialized_start = 1562 + _TASKQUEUESTATUS._serialized_end = 1734 + _TASKIDBLOCK._serialized_start = 1736 + _TASKIDBLOCK._serialized_end = 1783 + _TASKQUEUEPARTITIONMETADATA._serialized_start = 1785 + _TASKQUEUEPARTITIONMETADATA._serialized_end = 1851 + _POLLERINFO._serialized_start = 1854 + _POLLERINFO._serialized_end = 2136 + _STICKYEXECUTIONATTRIBUTES._serialized_start = 2139 + _STICKYEXECUTIONATTRIBUTES._serialized_end = 2293 + _COMPATIBLEVERSIONSET._serialized_start = 2295 + _COMPATIBLEVERSIONSET._serialized_end = 2336 + _TASKQUEUEREACHABILITY._serialized_start = 2338 + _TASKQUEUEREACHABILITY._serialized_end = 2444 + _BUILDIDREACHABILITY._serialized_start = 2446 + _BUILDIDREACHABILITY._serialized_end = 2568 + _RAMPBYPERCENTAGE._serialized_start = 2570 + _RAMPBYPERCENTAGE._serialized_end = 2613 + _BUILDIDASSIGNMENTRULE._serialized_start = 2616 + _BUILDIDASSIGNMENTRULE._serialized_end = 2744 + _COMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 2746 + _COMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 2827 + _TIMESTAMPEDBUILDIDASSIGNMENTRULE._serialized_start = 2830 + _TIMESTAMPEDBUILDIDASSIGNMENTRULE._serialized_end = 2977 + _TIMESTAMPEDCOMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 2980 + _TIMESTAMPEDCOMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 3143 + _POLLERGROUPINFO._serialized_start = 3145 + _POLLERGROUPINFO._serialized_end = 3190 + _POLLERGROUPSINFO._serialized_start = 3192 + _POLLERGROUPSINFO._serialized_end = 3294 + _POLLERSCALINGDECISION._serialized_start = 3296 + _POLLERSCALINGDECISION._serialized_end = 3358 + _RATELIMIT._serialized_start = 3360 + _RATELIMIT._serialized_end = 3400 + _CONFIGMETADATA._serialized_start = 3402 + _CONFIGMETADATA._serialized_end = 3508 + _RATELIMITCONFIG._serialized_start = 3511 + _RATELIMITCONFIG._serialized_end = 3647 + _TASKQUEUECONFIG._serialized_start = 3650 + _TASKQUEUECONFIG._serialized_end = 3995 + _TASKQUEUECONFIG_FAIRNESSWEIGHTOVERRIDESENTRY._serialized_start = 3933 + _TASKQUEUECONFIG_FAIRNESSWEIGHTOVERRIDESENTRY._serialized_end = 3995 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/taskqueue/v1/message_pb2.pyi b/temporalio/api/taskqueue/v1/message_pb2.pyi index 7ea6e9fdb9..4ca005a6e0 100644 --- a/temporalio/api/taskqueue/v1/message_pb2.pyi +++ b/temporalio/api/taskqueue/v1/message_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -18,13 +18,9 @@ import temporalio.api.common.v1.message_pb2 import temporalio.api.deployment.v1.message_pb2 import temporalio.api.enums.v1.task_queue_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class TaskQueue(google.protobuf.message.Message): """See https://docs.temporal.io/docs/concepts/task-queues/""" @@ -49,13 +45,14 @@ class TaskQueue(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "kind", b"kind", "name", b"name", "normal_name", b"normal_name" ], ) -> None: ... global___TaskQueue = TaskQueue +@typing.final class TaskQueueMetadata(google.protobuf.message.Message): """Only applies to activity task queues""" @@ -65,6 +62,7 @@ class TaskQueueMetadata(google.protobuf.message.Message): @property def max_tasks_per_second(self) -> google.protobuf.wrappers_pb2.DoubleValue: """Allows throttling dispatch of tasks from this queue""" + def __init__( self, *, @@ -72,30 +70,59 @@ class TaskQueueMetadata(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "max_tasks_per_second", b"max_tasks_per_second" - ], + field_name: typing.Literal["max_tasks_per_second", b"max_tasks_per_second"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "max_tasks_per_second", b"max_tasks_per_second" - ], + field_name: typing.Literal["max_tasks_per_second", b"max_tasks_per_second"], ) -> None: ... global___TaskQueueMetadata = TaskQueueMetadata -class TaskQueueVersioningInfo(google.protobuf.message.Message): - """Experimental. Worker Deployments are experimental and might significantly change in the future.""" +@typing.final +class PollerPoolInfo(google.protobuf.message.Message): + """Worker-reported state about the poller pool issuing a poll, used by the server to spread + poller scaling suggestions across a fleet. + """ DESCRIPTOR: google.protobuf.descriptor.Descriptor + TARGET_POLLERS_FIELD_NUMBER: builtins.int + target_pollers: builtins.int + """Number of concurrent poll requests this worker is currently targeting for this task + queue and task type. 0 if unknown, such as a poller pool of fixed size. + """ + def __init__( + self, + *, + target_pollers: builtins.int = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["target_pollers", b"target_pollers"] + ) -> None: ... + +global___PollerPoolInfo = PollerPoolInfo + +@typing.final +class TaskQueueVersioningInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + CURRENT_DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int CURRENT_VERSION_FIELD_NUMBER: builtins.int RAMPING_DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int RAMPING_VERSION_FIELD_NUMBER: builtins.int RAMPING_VERSION_PERCENTAGE_FIELD_NUMBER: builtins.int UPDATE_TIME_FIELD_NUMBER: builtins.int + current_version: builtins.str + """Deprecated. Use `current_deployment_version`.""" + ramping_version: builtins.str + """Deprecated. Use `ramping_deployment_version`.""" + ramping_version_percentage: builtins.float + """Percentage of tasks that are routed to the Ramping Version instead of the Current Version. + Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but + not yet "promoted" to be the Current Version, likely due to pending validations. + A 0% value means the Ramping Version is receiving no traffic. + """ @property def current_deployment_version( self, @@ -106,8 +133,7 @@ class TaskQueueVersioningInfo(google.protobuf.message.Message): Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). """ - current_version: builtins.str - """Deprecated. Use `current_deployment_version`.""" + @property def ramping_deployment_version( self, @@ -118,17 +144,11 @@ class TaskQueueVersioningInfo(google.protobuf.message.Message): Note that it is possible to ramp from one Version to another Version, or from unversioned workers to a particular Version, or from a particular Version to unversioned workers. """ - ramping_version: builtins.str - """Deprecated. Use `ramping_deployment_version`.""" - ramping_version_percentage: builtins.float - """Percentage of tasks that are routed to the Ramping Version instead of the Current Version. - Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but - not yet "promoted" to be the Current Version, likely due to pending validations. - A 0% value means the Ramping Version is receiving no traffic. - """ + @property def update_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Last time versioning information of this Task Queue changed.""" + def __init__( self, *, @@ -143,7 +163,7 @@ class TaskQueueVersioningInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_deployment_version", b"current_deployment_version", "ramping_deployment_version", @@ -154,7 +174,7 @@ class TaskQueueVersioningInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_deployment_version", b"current_deployment_version", "current_version", @@ -172,6 +192,7 @@ class TaskQueueVersioningInfo(google.protobuf.message.Message): global___TaskQueueVersioningInfo = TaskQueueVersioningInfo +@typing.final class TaskQueueVersionSelection(google.protobuf.message.Message): """Used for specifying versions the caller is interested in.""" @@ -180,17 +201,18 @@ class TaskQueueVersionSelection(google.protobuf.message.Message): BUILD_IDS_FIELD_NUMBER: builtins.int UNVERSIONED_FIELD_NUMBER: builtins.int ALL_ACTIVE_FIELD_NUMBER: builtins.int - @property - def build_ids( - self, - ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: - """Include specific Build IDs.""" unversioned: builtins.bool """Include the unversioned queue.""" all_active: builtins.bool """Include all active versions. A version is considered active if, in the last few minutes, it has had new tasks or polls, or it has been the subject of certain task queue API calls. """ + @property + def build_ids( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Include specific Build IDs.""" + def __init__( self, *, @@ -200,7 +222,7 @@ class TaskQueueVersionSelection(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "all_active", b"all_active", "build_ids", @@ -212,9 +234,11 @@ class TaskQueueVersionSelection(google.protobuf.message.Message): global___TaskQueueVersionSelection = TaskQueueVersionSelection +@typing.final class TaskQueueVersionInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class TypesInfoEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -230,22 +254,14 @@ class TaskQueueVersionInfo(google.protobuf.message.Message): value: global___TaskQueueTypeInfo | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... TYPES_INFO_FIELD_NUMBER: builtins.int TASK_REACHABILITY_FIELD_NUMBER: builtins.int - @property - def types_info( - self, - ) -> google.protobuf.internal.containers.MessageMap[ - builtins.int, global___TaskQueueTypeInfo - ]: - """Task Queue info per Task Type. Key is the numerical value of the temporalio.api.enums.v1.TaskQueueType enum.""" task_reachability: ( temporalio.api.enums.v1.task_queue_pb2.BuildIdTaskReachability.ValueType ) @@ -259,6 +275,14 @@ class TaskQueueVersionInfo(google.protobuf.message.Message): who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make sure to query reachability for the parent/previous workflow's Task Queue as well. """ + @property + def types_info( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.int, global___TaskQueueTypeInfo + ]: + """Task Queue info per Task Type. Key is the numerical value of the temporalio.api.enums.v1.TaskQueueType enum.""" + def __init__( self, *, @@ -268,13 +292,14 @@ class TaskQueueVersionInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "task_reachability", b"task_reachability", "types_info", b"types_info" ], ) -> None: ... global___TaskQueueVersionInfo = TaskQueueVersionInfo +@typing.final class TaskQueueTypeInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -287,6 +312,7 @@ class TaskQueueTypeInfo(google.protobuf.message.Message): global___PollerInfo ]: """Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID.""" + @property def stats(self) -> global___TaskQueueStats: ... def __init__( @@ -296,15 +322,15 @@ class TaskQueueTypeInfo(google.protobuf.message.Message): stats: global___TaskQueueStats | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["stats", b"stats"] + self, field_name: typing.Literal["stats", b"stats"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["pollers", b"pollers", "stats", b"stats"], + self, field_name: typing.Literal["pollers", b"pollers", "stats", b"stats"] ) -> None: ... global___TaskQueueTypeInfo = TaskQueueTypeInfo +@typing.final class TaskQueueStats(google.protobuf.message.Message): """TaskQueueStats contains statistics about task queue backlog and activity. @@ -318,6 +344,7 @@ class TaskQueueStats(google.protobuf.message.Message): APPROXIMATE_BACKLOG_AGE_FIELD_NUMBER: builtins.int TASKS_ADD_RATE_FIELD_NUMBER: builtins.int TASKS_DISPATCH_RATE_FIELD_NUMBER: builtins.int + RATE_LIMITING_ACTIVE_FIELD_NUMBER: builtins.int approximate_backlog_count: builtins.int """The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges to the right value. Can be relied upon for scaling decisions. @@ -326,15 +353,6 @@ class TaskQueueStats(google.protobuf.message.Message): those tasks only remain valid for a few seconds, the inaccuracy becomes less significant as the backlog size grows. """ - @property - def approximate_backlog_age(self) -> google.protobuf.duration_pb2.Duration: - """Approximate age of the oldest task in the backlog based on the creation time of the task at the head of - the queue. Can be relied upon for scaling decisions. - - Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because - those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than - few seconds. - """ tasks_add_rate: builtins.float """The approximate tasks per second added to the task queue, averaging the last 30 seconds. These includes tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going @@ -367,6 +385,22 @@ class TaskQueueStats(google.protobuf.message.Message): workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance. """ + rate_limiting_active: builtins.bool + """Whether rate limiting blocked any dispatches within the recent observation window (approximately + 30 seconds). When true, adding more workers will not increase throughput — the bottleneck is the + rate limit, not worker count. This field is useful for auto-scaling systems to avoid unnecessary + scale-up. + """ + @property + def approximate_backlog_age(self) -> google.protobuf.duration_pb2.Duration: + """Approximate age of the oldest task in the backlog based on the creation time of the task at the head of + the queue. Can be relied upon for scaling decisions. + + Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because + those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than + few seconds. + """ + def __init__( self, *, @@ -374,20 +408,23 @@ class TaskQueueStats(google.protobuf.message.Message): approximate_backlog_age: google.protobuf.duration_pb2.Duration | None = ..., tasks_add_rate: builtins.float = ..., tasks_dispatch_rate: builtins.float = ..., + rate_limiting_active: builtins.bool = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "approximate_backlog_age", b"approximate_backlog_age" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "approximate_backlog_age", b"approximate_backlog_age", "approximate_backlog_count", b"approximate_backlog_count", + "rate_limiting_active", + b"rate_limiting_active", "tasks_add_rate", b"tasks_add_rate", "tasks_dispatch_rate", @@ -397,6 +434,7 @@ class TaskQueueStats(google.protobuf.message.Message): global___TaskQueueStats = TaskQueueStats +@typing.final class TaskQueueStatus(google.protobuf.message.Message): """Deprecated. Use `InternalTaskQueueStatus`. This is kept until `DescribeTaskQueue` supports legacy behavior.""" @@ -423,11 +461,11 @@ class TaskQueueStatus(google.protobuf.message.Message): task_id_block: global___TaskIdBlock | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["task_id_block", b"task_id_block"] + self, field_name: typing.Literal["task_id_block", b"task_id_block"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "ack_level", b"ack_level", "backlog_count_hint", @@ -443,6 +481,7 @@ class TaskQueueStatus(google.protobuf.message.Message): global___TaskQueueStatus = TaskQueueStatus +@typing.final class TaskIdBlock(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -457,14 +496,12 @@ class TaskIdBlock(google.protobuf.message.Message): end_id: builtins.int = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "end_id", b"end_id", "start_id", b"start_id" - ], + self, field_name: typing.Literal["end_id", b"end_id", "start_id", b"start_id"] ) -> None: ... global___TaskIdBlock = TaskIdBlock +@typing.final class TaskQueuePartitionMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -480,13 +517,14 @@ class TaskQueuePartitionMetadata(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "key", b"key", "owner_host_name", b"owner_host_name" ], ) -> None: ... global___TaskQueuePartitionMetadata = TaskQueuePartitionMetadata +@typing.final class PollerInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -495,11 +533,11 @@ class PollerInfo(google.protobuf.message.Message): RATE_PER_SECOND_FIELD_NUMBER: builtins.int WORKER_VERSION_CAPABILITIES_FIELD_NUMBER: builtins.int DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int - @property - def last_access_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... identity: builtins.str rate_per_second: builtins.float @property + def last_access_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property def worker_version_capabilities( self, ) -> temporalio.api.common.v1.message_pb2.WorkerVersionCapabilities: @@ -507,11 +545,13 @@ class PollerInfo(google.protobuf.message.Message): appear here. Deprecated. Replaced by deployment_options. """ + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Worker deployment options that SDK sent to server.""" + def __init__( self, *, @@ -525,7 +565,7 @@ class PollerInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_options", b"deployment_options", "last_access_time", @@ -536,7 +576,7 @@ class PollerInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_options", b"deployment_options", "identity", @@ -552,6 +592,7 @@ class PollerInfo(google.protobuf.message.Message): global___PollerInfo = PollerInfo +@typing.final class StickyExecutionAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -564,6 +605,7 @@ class StickyExecutionAttributes(google.protobuf.message.Message): """(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + def __init__( self, *, @@ -572,7 +614,7 @@ class StickyExecutionAttributes(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "schedule_to_start_timeout", b"schedule_to_start_timeout", "worker_task_queue", @@ -581,7 +623,7 @@ class StickyExecutionAttributes(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "schedule_to_start_timeout", b"schedule_to_start_timeout", "worker_task_queue", @@ -591,6 +633,7 @@ class StickyExecutionAttributes(google.protobuf.message.Message): global___StickyExecutionAttributes = StickyExecutionAttributes +@typing.final class CompatibleVersionSet(google.protobuf.message.Message): """Used by the worker versioning APIs, represents an unordered set of one or more versions which are considered to be compatible with each other. Currently the versions are always worker build IDs. @@ -604,17 +647,19 @@ class CompatibleVersionSet(google.protobuf.message.Message): self, ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """All the compatible versions, unordered, except for the last element, which is considered the set "default".""" + def __init__( self, *, build_ids: collections.abc.Iterable[builtins.str] | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["build_ids", b"build_ids"] + self, field_name: typing.Literal["build_ids", b"build_ids"] ) -> None: ... global___CompatibleVersionSet = CompatibleVersionSet +@typing.final class TaskQueueReachability(google.protobuf.message.Message): """Reachability of tasks for a worker on a single task queue.""" @@ -633,6 +678,7 @@ class TaskQueueReachability(google.protobuf.message.Message): See the TaskReachability docstring for information about each enum variant. If reachability is empty, this worker is considered unreachable in this task queue. """ + def __init__( self, *, @@ -644,13 +690,14 @@ class TaskQueueReachability(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "reachability", b"reachability", "task_queue", b"task_queue" ], ) -> None: ... global___TaskQueueReachability = TaskQueueReachability +@typing.final class BuildIdReachability(google.protobuf.message.Message): """Reachability of tasks for a worker by build id, in one or more task queues.""" @@ -667,6 +714,7 @@ class BuildIdReachability(google.protobuf.message.Message): global___TaskQueueReachability ]: """Reachability per task queue.""" + def __init__( self, *, @@ -678,7 +726,7 @@ class BuildIdReachability(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id", b"build_id", "task_queue_reachability", @@ -688,6 +736,7 @@ class BuildIdReachability(google.protobuf.message.Message): global___BuildIdReachability = BuildIdReachability +@typing.final class RampByPercentage(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -700,12 +749,12 @@ class RampByPercentage(google.protobuf.message.Message): ramp_percentage: builtins.float = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["ramp_percentage", b"ramp_percentage"], + self, field_name: typing.Literal["ramp_percentage", b"ramp_percentage"] ) -> None: ... global___RampByPercentage = RampByPercentage +@typing.final class BuildIdAssignmentRule(google.protobuf.message.Message): """Assignment rules are applied to *new* Workflow and Activity executions at schedule time to assign them to a Build ID. @@ -757,6 +806,7 @@ class BuildIdAssignmentRule(google.protobuf.message.Message): where you want to send a certain portion of the traffic to the target Build ID. """ + def __init__( self, *, @@ -765,13 +815,13 @@ class BuildIdAssignmentRule(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "percentage_ramp", b"percentage_ramp", "ramp", b"ramp" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "percentage_ramp", b"percentage_ramp", "ramp", @@ -781,11 +831,12 @@ class BuildIdAssignmentRule(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["ramp", b"ramp"] - ) -> typing_extensions.Literal["percentage_ramp"] | None: ... + self, oneof_group: typing.Literal["ramp", b"ramp"] + ) -> typing.Literal["percentage_ramp"] | None: ... global___BuildIdAssignmentRule = BuildIdAssignmentRule +@typing.final class CompatibleBuildIdRedirectRule(google.protobuf.message.Message): """These rules apply to tasks assigned to a particular Build ID (`source_build_id`) to redirect them to another *compatible* Build ID @@ -828,13 +879,14 @@ class CompatibleBuildIdRedirectRule(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "source_build_id", b"source_build_id", "target_build_id", b"target_build_id" ], ) -> None: ... global___CompatibleBuildIdRedirectRule = CompatibleBuildIdRedirectRule +@typing.final class TimestampedBuildIdAssignmentRule(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -851,20 +903,15 @@ class TimestampedBuildIdAssignmentRule(google.protobuf.message.Message): create_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "create_time", b"create_time", "rule", b"rule" - ], + self, field_name: typing.Literal["create_time", b"create_time", "rule", b"rule"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "create_time", b"create_time", "rule", b"rule" - ], + self, field_name: typing.Literal["create_time", b"create_time", "rule", b"rule"] ) -> None: ... global___TimestampedBuildIdAssignmentRule = TimestampedBuildIdAssignmentRule +@typing.final class TimestampedCompatibleBuildIdRedirectRule(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -881,22 +928,75 @@ class TimestampedCompatibleBuildIdRedirectRule(google.protobuf.message.Message): create_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "create_time", b"create_time", "rule", b"rule" - ], + self, field_name: typing.Literal["create_time", b"create_time", "rule", b"rule"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "create_time", b"create_time", "rule", b"rule" - ], + self, field_name: typing.Literal["create_time", b"create_time", "rule", b"rule"] ) -> None: ... global___TimestampedCompatibleBuildIdRedirectRule = ( TimestampedCompatibleBuildIdRedirectRule ) +@typing.final +class PollerGroupInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + WEIGHT_FIELD_NUMBER: builtins.int + id: builtins.str + weight: builtins.float + def __init__( + self, + *, + id: builtins.str = ..., + weight: builtins.float = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["id", b"id", "weight", b"weight"] + ) -> None: ... + +global___PollerGroupInfo = PollerGroupInfo + +@typing.final +class PollerGroupsInfo(google.protobuf.message.Message): + """A versioned snapshot of the poller groups the client should use for future polls to a task + queue. The version is monotonically increasing so that a client can ignore a snapshot that is + older than the one it has already applied. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + VERSION_FIELD_NUMBER: builtins.int + POLLER_GROUPS_FIELD_NUMBER: builtins.int + version: builtins.int + """Monotonically increasing version of this snapshot. A client should ignore any snapshot whose + version is not greater than the one it last applied. + """ + @property + def poller_groups( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___PollerGroupInfo + ]: + """The weighted list of poller groups the client should use for future polls to this task queue.""" + + def __init__( + self, + *, + version: builtins.int = ..., + poller_groups: collections.abc.Iterable[global___PollerGroupInfo] | None = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "poller_groups", b"poller_groups", "version", b"version" + ], + ) -> None: ... + +global___PollerGroupsInfo = PollerGroupsInfo + +@typing.final class PollerScalingDecision(google.protobuf.message.Message): """Attached to task responses to give hints to the SDK about how it may adjust its number of pollers. @@ -920,13 +1020,14 @@ class PollerScalingDecision(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "poll_request_delta_suggestion", b"poll_request_delta_suggestion" ], ) -> None: ... global___PollerScalingDecision = PollerScalingDecision +@typing.final class RateLimit(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -939,14 +1040,12 @@ class RateLimit(google.protobuf.message.Message): requests_per_second: builtins.float = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "requests_per_second", b"requests_per_second" - ], + self, field_name: typing.Literal["requests_per_second", b"requests_per_second"] ) -> None: ... global___RateLimit = RateLimit +@typing.final class ConfigMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -962,6 +1061,7 @@ class ConfigMetadata(google.protobuf.message.Message): @property def update_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Time of the last update.""" + def __init__( self, *, @@ -970,11 +1070,11 @@ class ConfigMetadata(google.protobuf.message.Message): update_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["update_time", b"update_time"] + self, field_name: typing.Literal["update_time", b"update_time"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "reason", b"reason", "update_identity", @@ -986,6 +1086,7 @@ class ConfigMetadata(google.protobuf.message.Message): global___ConfigMetadata = ConfigMetadata +@typing.final class RateLimitConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1003,39 +1104,69 @@ class RateLimitConfig(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "metadata", b"metadata", "rate_limit", b"rate_limit" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "metadata", b"metadata", "rate_limit", b"rate_limit" ], ) -> None: ... global___RateLimitConfig = RateLimitConfig +@typing.final class TaskQueueConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final + class FairnessWeightOverridesEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.float + def __init__( + self, + *, + key: builtins.str = ..., + value: builtins.float = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + QUEUE_RATE_LIMIT_FIELD_NUMBER: builtins.int FAIRNESS_KEYS_RATE_LIMIT_DEFAULT_FIELD_NUMBER: builtins.int + FAIRNESS_WEIGHT_OVERRIDES_FIELD_NUMBER: builtins.int @property def queue_rate_limit(self) -> global___RateLimitConfig: """Unless modified, this is the system-defined rate limit.""" + @property def fairness_keys_rate_limit_default(self) -> global___RateLimitConfig: """If set, each individual fairness key will be limited to this rate, scaled by the weight of the fairness key.""" + + @property + def fairness_weight_overrides( + self, + ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.float]: + """If set, overrides the fairness weights for the corresponding fairness keys.""" + def __init__( self, *, queue_rate_limit: global___RateLimitConfig | None = ..., fairness_keys_rate_limit_default: global___RateLimitConfig | None = ..., + fairness_weight_overrides: collections.abc.Mapping[builtins.str, builtins.float] + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "fairness_keys_rate_limit_default", b"fairness_keys_rate_limit_default", "queue_rate_limit", @@ -1044,9 +1175,11 @@ class TaskQueueConfig(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "fairness_keys_rate_limit_default", b"fairness_keys_rate_limit_default", + "fairness_weight_overrides", + b"fairness_weight_overrides", "queue_rate_limit", b"queue_rate_limit", ], diff --git a/temporalio/api/testservice/v1/__init__.py b/temporalio/api/testservice/v1/__init__.py index 8539030d3d..329bbb47dc 100644 --- a/temporalio/api/testservice/v1/__init__.py +++ b/temporalio/api/testservice/v1/__init__.py @@ -25,13 +25,19 @@ import grpc from .service_pb2_grpc import ( + TestService, # type: ignore TestServiceServicer, TestServiceStub, add_TestServiceServicer_to_server, ) __all__.extend( - ["TestServiceServicer", "TestServiceStub", "add_TestServiceServicer_to_server"] + [ + "TestService", + "TestServiceServicer", + "TestServiceStub", + "add_TestServiceServicer_to_server", + ] ) except ImportError: pass diff --git a/temporalio/api/testservice/v1/request_response_pb2.py b/temporalio/api/testservice/v1/request_response_pb2.py index 65e52f72a9..485a2902b2 100644 --- a/temporalio/api/testservice/v1/request_response_pb2.py +++ b/temporalio/api/testservice/v1/request_response_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -21,107 +20,8 @@ b'\n2temporal/api/testservice/v1/request_response.proto\x12\x1btemporal.api.testservice.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x19\n\x17LockTimeSkippingRequest"\x1a\n\x18LockTimeSkippingResponse"\x1b\n\x19UnlockTimeSkippingRequest"\x1c\n\x1aUnlockTimeSkippingResponse"B\n\x11SleepUntilRequest\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp";\n\x0cSleepRequest\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration"\x0f\n\rSleepResponse"B\n\x16GetCurrentTimeResponse\x12(\n\x04time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xaa\x01\n\x1eio.temporal.api.testservice.v1B\x14RequestResponseProtoP\x01Z-go.temporal.io/api/testservice/v1;testservice\xaa\x02\x1dTemporalio.Api.TestService.V1\xea\x02 Temporalio::Api::TestService::V1b\x06proto3' ) - -_LOCKTIMESKIPPINGREQUEST = DESCRIPTOR.message_types_by_name["LockTimeSkippingRequest"] -_LOCKTIMESKIPPINGRESPONSE = DESCRIPTOR.message_types_by_name["LockTimeSkippingResponse"] -_UNLOCKTIMESKIPPINGREQUEST = DESCRIPTOR.message_types_by_name[ - "UnlockTimeSkippingRequest" -] -_UNLOCKTIMESKIPPINGRESPONSE = DESCRIPTOR.message_types_by_name[ - "UnlockTimeSkippingResponse" -] -_SLEEPUNTILREQUEST = DESCRIPTOR.message_types_by_name["SleepUntilRequest"] -_SLEEPREQUEST = DESCRIPTOR.message_types_by_name["SleepRequest"] -_SLEEPRESPONSE = DESCRIPTOR.message_types_by_name["SleepResponse"] -_GETCURRENTTIMERESPONSE = DESCRIPTOR.message_types_by_name["GetCurrentTimeResponse"] -LockTimeSkippingRequest = _reflection.GeneratedProtocolMessageType( - "LockTimeSkippingRequest", - (_message.Message,), - { - "DESCRIPTOR": _LOCKTIMESKIPPINGREQUEST, - "__module__": "temporalio.api.testservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.testservice.v1.LockTimeSkippingRequest) - }, -) -_sym_db.RegisterMessage(LockTimeSkippingRequest) - -LockTimeSkippingResponse = _reflection.GeneratedProtocolMessageType( - "LockTimeSkippingResponse", - (_message.Message,), - { - "DESCRIPTOR": _LOCKTIMESKIPPINGRESPONSE, - "__module__": "temporalio.api.testservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.testservice.v1.LockTimeSkippingResponse) - }, -) -_sym_db.RegisterMessage(LockTimeSkippingResponse) - -UnlockTimeSkippingRequest = _reflection.GeneratedProtocolMessageType( - "UnlockTimeSkippingRequest", - (_message.Message,), - { - "DESCRIPTOR": _UNLOCKTIMESKIPPINGREQUEST, - "__module__": "temporalio.api.testservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.testservice.v1.UnlockTimeSkippingRequest) - }, -) -_sym_db.RegisterMessage(UnlockTimeSkippingRequest) - -UnlockTimeSkippingResponse = _reflection.GeneratedProtocolMessageType( - "UnlockTimeSkippingResponse", - (_message.Message,), - { - "DESCRIPTOR": _UNLOCKTIMESKIPPINGRESPONSE, - "__module__": "temporalio.api.testservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.testservice.v1.UnlockTimeSkippingResponse) - }, -) -_sym_db.RegisterMessage(UnlockTimeSkippingResponse) - -SleepUntilRequest = _reflection.GeneratedProtocolMessageType( - "SleepUntilRequest", - (_message.Message,), - { - "DESCRIPTOR": _SLEEPUNTILREQUEST, - "__module__": "temporalio.api.testservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.testservice.v1.SleepUntilRequest) - }, -) -_sym_db.RegisterMessage(SleepUntilRequest) - -SleepRequest = _reflection.GeneratedProtocolMessageType( - "SleepRequest", - (_message.Message,), - { - "DESCRIPTOR": _SLEEPREQUEST, - "__module__": "temporalio.api.testservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.testservice.v1.SleepRequest) - }, -) -_sym_db.RegisterMessage(SleepRequest) - -SleepResponse = _reflection.GeneratedProtocolMessageType( - "SleepResponse", - (_message.Message,), - { - "DESCRIPTOR": _SLEEPRESPONSE, - "__module__": "temporalio.api.testservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.testservice.v1.SleepResponse) - }, -) -_sym_db.RegisterMessage(SleepResponse) - -GetCurrentTimeResponse = _reflection.GeneratedProtocolMessageType( - "GetCurrentTimeResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETCURRENTTIMERESPONSE, - "__module__": "temporalio.api.testservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.testservice.v1.GetCurrentTimeResponse) - }, -) -_sym_db.RegisterMessage(GetCurrentTimeResponse) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\036io.temporal.api.testservice.v1B\024RequestResponseProtoP\001Z-go.temporal.io/api/testservice/v1;testservice\252\002\035Temporalio.Api.TestService.V1\352\002 Temporalio::Api::TestService::V1" diff --git a/temporalio/api/testservice/v1/request_response_pb2.pyi b/temporalio/api/testservice/v1/request_response_pb2.pyi index e86bba03d6..5d273be6d5 100644 --- a/temporalio/api/testservice/v1/request_response_pb2.pyi +++ b/temporalio/api/testservice/v1/request_response_pb2.pyi @@ -25,20 +25,16 @@ THE SOFTWARE. """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 import google.protobuf.message import google.protobuf.timestamp_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class LockTimeSkippingRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -48,6 +44,7 @@ class LockTimeSkippingRequest(google.protobuf.message.Message): global___LockTimeSkippingRequest = LockTimeSkippingRequest +@typing.final class LockTimeSkippingResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -57,6 +54,7 @@ class LockTimeSkippingResponse(google.protobuf.message.Message): global___LockTimeSkippingResponse = LockTimeSkippingResponse +@typing.final class UnlockTimeSkippingRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -66,6 +64,7 @@ class UnlockTimeSkippingRequest(google.protobuf.message.Message): global___UnlockTimeSkippingRequest = UnlockTimeSkippingRequest +@typing.final class UnlockTimeSkippingResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -75,6 +74,7 @@ class UnlockTimeSkippingResponse(google.protobuf.message.Message): global___UnlockTimeSkippingResponse = UnlockTimeSkippingResponse +@typing.final class SleepUntilRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -87,14 +87,15 @@ class SleepUntilRequest(google.protobuf.message.Message): timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["timestamp", b"timestamp"] + self, field_name: typing.Literal["timestamp", b"timestamp"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["timestamp", b"timestamp"] + self, field_name: typing.Literal["timestamp", b"timestamp"] ) -> None: ... global___SleepUntilRequest = SleepUntilRequest +@typing.final class SleepRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -107,14 +108,15 @@ class SleepRequest(google.protobuf.message.Message): duration: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["duration", b"duration"] + self, field_name: typing.Literal["duration", b"duration"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["duration", b"duration"] + self, field_name: typing.Literal["duration", b"duration"] ) -> None: ... global___SleepRequest = SleepRequest +@typing.final class SleepResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -124,6 +126,7 @@ class SleepResponse(google.protobuf.message.Message): global___SleepResponse = SleepResponse +@typing.final class GetCurrentTimeResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -136,10 +139,8 @@ class GetCurrentTimeResponse(google.protobuf.message.Message): time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["time", b"time"] + self, field_name: typing.Literal["time", b"time"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["time", b"time"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["time", b"time"]) -> None: ... global___GetCurrentTimeResponse = GetCurrentTimeResponse diff --git a/temporalio/api/testservice/v1/request_response_pb2_grpc.pyi b/temporalio/api/testservice/v1/request_response_pb2_grpc.pyi index 4fb00c5bef..8f72596243 100644 --- a/temporalio/api/testservice/v1/request_response_pb2_grpc.pyi +++ b/temporalio/api/testservice/v1/request_response_pb2_grpc.pyi @@ -23,3 +23,20 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ + +import abc +import collections.abc +import typing + +import grpc +import grpc.aio + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator( + collections.abc.AsyncIterator[_T], + collections.abc.Iterator[_T], + metaclass=abc.ABCMeta, +): ... +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... diff --git a/temporalio/api/testservice/v1/service_pb2.py b/temporalio/api/testservice/v1/service_pb2.py index 86a4260fda..7afbaf8afc 100644 --- a/temporalio/api/testservice/v1/service_pb2.py +++ b/temporalio/api/testservice/v1/service_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -24,8 +23,8 @@ b'\n)temporal/api/testservice/v1/service.proto\x12\x1btemporal.api.testservice.v1\x1a\x32temporal/api/testservice/v1/request_response.proto\x1a\x1bgoogle/protobuf/empty.proto2\xc2\x05\n\x0bTestService\x12\x81\x01\n\x10LockTimeSkipping\x12\x34.temporal.api.testservice.v1.LockTimeSkippingRequest\x1a\x35.temporal.api.testservice.v1.LockTimeSkippingResponse"\x00\x12\x87\x01\n\x12UnlockTimeSkipping\x12\x36.temporal.api.testservice.v1.UnlockTimeSkippingRequest\x1a\x37.temporal.api.testservice.v1.UnlockTimeSkippingResponse"\x00\x12`\n\x05Sleep\x12).temporal.api.testservice.v1.SleepRequest\x1a*.temporal.api.testservice.v1.SleepResponse"\x00\x12j\n\nSleepUntil\x12..temporal.api.testservice.v1.SleepUntilRequest\x1a*.temporal.api.testservice.v1.SleepResponse"\x00\x12v\n\x1bUnlockTimeSkippingWithSleep\x12).temporal.api.testservice.v1.SleepRequest\x1a*.temporal.api.testservice.v1.SleepResponse"\x00\x12_\n\x0eGetCurrentTime\x12\x16.google.protobuf.Empty\x1a\x33.temporal.api.testservice.v1.GetCurrentTimeResponse"\x00\x42\xa2\x01\n\x1eio.temporal.api.testservice.v1B\x0cServiceProtoP\x01Z-go.temporal.io/api/testservice/v1;testservice\xaa\x02\x1dTemporalio.Api.TestService.V1\xea\x02 Temporalio::Api::TestService::V1b\x06proto3' ) - -_TESTSERVICE = DESCRIPTOR.services_by_name["TestService"] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\036io.temporal.api.testservice.v1B\014ServiceProtoP\001Z-go.temporal.io/api/testservice/v1;testservice\252\002\035Temporalio.Api.TestService.V1\352\002 Temporalio::Api::TestService::V1" diff --git a/temporalio/api/testservice/v1/service_pb2_grpc.pyi b/temporalio/api/testservice/v1/service_pb2_grpc.pyi index f3162f0037..e3b6ab1fda 100644 --- a/temporalio/api/testservice/v1/service_pb2_grpc.pyi +++ b/temporalio/api/testservice/v1/service_pb2_grpc.pyi @@ -25,12 +25,25 @@ THE SOFTWARE. """ import abc +import collections.abc +import typing import google.protobuf.empty_pb2 import grpc +import grpc.aio import temporalio.api.testservice.v1.request_response_pb2 +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator( + collections.abc.AsyncIterator[_T], + collections.abc.Iterator[_T], + metaclass=abc.ABCMeta, +): ... +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... + class TestServiceStub: """TestService API defines an interface supported only by the Temporal Test Server. It provides functionality needed or supported for testing purposes only. @@ -38,7 +51,9 @@ class TestServiceStub: This is an EXPERIMENTAL API. """ - def __init__(self, channel: grpc.Channel) -> None: ... + def __init__( + self, channel: typing.Union[grpc.Channel, grpc.aio.Channel] + ) -> None: ... LockTimeSkipping: grpc.UnaryUnaryMultiCallable[ temporalio.api.testservice.v1.request_response_pb2.LockTimeSkippingRequest, temporalio.api.testservice.v1.request_response_pb2.LockTimeSkippingResponse, @@ -51,6 +66,7 @@ class TestServiceStub: LockTimeSkipping and UnlockTimeSkipping calls are counted. """ + UnlockTimeSkipping: grpc.UnaryUnaryMultiCallable[ temporalio.api.testservice.v1.request_response_pb2.UnlockTimeSkippingRequest, temporalio.api.testservice.v1.request_response_pb2.UnlockTimeSkippingResponse, @@ -63,6 +79,7 @@ class TestServiceStub: Time Locking Counter can't be negative, unbalanced calls to UnlockTimeSkipping will lead to rpc call failure """ + Sleep: grpc.UnaryUnaryMultiCallable[ temporalio.api.testservice.v1.request_response_pb2.SleepRequest, temporalio.api.testservice.v1.request_response_pb2.SleepResponse, @@ -70,6 +87,7 @@ class TestServiceStub: """This call returns only when the Test Server Time advances by the specified duration. This is an EXPERIMENTAL API. """ + SleepUntil: grpc.UnaryUnaryMultiCallable[ temporalio.api.testservice.v1.request_response_pb2.SleepUntilRequest, temporalio.api.testservice.v1.request_response_pb2.SleepResponse, @@ -78,6 +96,7 @@ class TestServiceStub: If the current Test Server Time is beyond the specified timestamp, returns immediately. This is an EXPERIMENTAL API. """ + UnlockTimeSkippingWithSleep: grpc.UnaryUnaryMultiCallable[ temporalio.api.testservice.v1.request_response_pb2.SleepRequest, temporalio.api.testservice.v1.request_response_pb2.SleepResponse, @@ -92,6 +111,7 @@ class TestServiceStub: - 1, it will lead to fast forwarding of the time by the duration specified in the request and quick return of this rpc call. - 0 will lead to rpc call failure same way as an unbalanced UnlockTimeSkipping. """ + GetCurrentTime: grpc.UnaryUnaryMultiCallable[ google.protobuf.empty_pb2.Empty, temporalio.api.testservice.v1.request_response_pb2.GetCurrentTimeResponse, @@ -101,6 +121,80 @@ class TestServiceStub: This time might not be equal to {@link System#currentTimeMillis()} due to time skipping. """ +class TestServiceAsyncStub: + """TestService API defines an interface supported only by the Temporal Test Server. + It provides functionality needed or supported for testing purposes only. + + This is an EXPERIMENTAL API. + """ + + LockTimeSkipping: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.testservice.v1.request_response_pb2.LockTimeSkippingRequest, + temporalio.api.testservice.v1.request_response_pb2.LockTimeSkippingResponse, + ] + """LockTimeSkipping increments Time Locking Counter by one. + + If Time Locking Counter is positive, time skipping is locked (disabled). + When time skipping is disabled, the time in test server is moving normally, with a real time pace. + Test Server is typically started with locked time skipping and Time Locking Counter = 1. + + LockTimeSkipping and UnlockTimeSkipping calls are counted. + """ + + UnlockTimeSkipping: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.testservice.v1.request_response_pb2.UnlockTimeSkippingRequest, + temporalio.api.testservice.v1.request_response_pb2.UnlockTimeSkippingResponse, + ] + """UnlockTimeSkipping decrements Time Locking Counter by one. + + If the counter reaches 0, it unlocks time skipping and fast forwards time. + LockTimeSkipping and UnlockTimeSkipping calls are counted. Calling UnlockTimeSkipping does not + guarantee that time is going to be fast forwarded as another lock can be holding it. + + Time Locking Counter can't be negative, unbalanced calls to UnlockTimeSkipping will lead to rpc call failure + """ + + Sleep: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.testservice.v1.request_response_pb2.SleepRequest, + temporalio.api.testservice.v1.request_response_pb2.SleepResponse, + ] + """This call returns only when the Test Server Time advances by the specified duration. + This is an EXPERIMENTAL API. + """ + + SleepUntil: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.testservice.v1.request_response_pb2.SleepUntilRequest, + temporalio.api.testservice.v1.request_response_pb2.SleepResponse, + ] + """This call returns only when the Test Server Time advances to the specified timestamp. + If the current Test Server Time is beyond the specified timestamp, returns immediately. + This is an EXPERIMENTAL API. + """ + + UnlockTimeSkippingWithSleep: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.testservice.v1.request_response_pb2.SleepRequest, + temporalio.api.testservice.v1.request_response_pb2.SleepResponse, + ] + """UnlockTimeSkippingWhileSleep decreases time locking counter by one and increases it back + once the Test Server Time advances by the duration specified in the request. + + This call returns only when the Test Server Time advances by the specified duration. + + If it is called when Time Locking Counter is + - more than 1 and no other unlocks are coming in, rpc call will block for the specified duration, time will not be fast forwarded. + - 1, it will lead to fast forwarding of the time by the duration specified in the request and quick return of this rpc call. + - 0 will lead to rpc call failure same way as an unbalanced UnlockTimeSkipping. + """ + + GetCurrentTime: grpc.aio.UnaryUnaryMultiCallable[ + google.protobuf.empty_pb2.Empty, + temporalio.api.testservice.v1.request_response_pb2.GetCurrentTimeResponse, + ] + """GetCurrentTime returns the current Temporal Test Server time + + This time might not be equal to {@link System#currentTimeMillis()} due to time skipping. + """ + class TestServiceServicer(metaclass=abc.ABCMeta): """TestService API defines an interface supported only by the Temporal Test Server. It provides functionality needed or supported for testing purposes only. @@ -112,8 +206,13 @@ class TestServiceServicer(metaclass=abc.ABCMeta): def LockTimeSkipping( self, request: temporalio.api.testservice.v1.request_response_pb2.LockTimeSkippingRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.testservice.v1.request_response_pb2.LockTimeSkippingResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.testservice.v1.request_response_pb2.LockTimeSkippingResponse, + collections.abc.Awaitable[ + temporalio.api.testservice.v1.request_response_pb2.LockTimeSkippingResponse + ], + ]: """LockTimeSkipping increments Time Locking Counter by one. If Time Locking Counter is positive, time skipping is locked (disabled). @@ -122,12 +221,18 @@ class TestServiceServicer(metaclass=abc.ABCMeta): LockTimeSkipping and UnlockTimeSkipping calls are counted. """ + @abc.abstractmethod def UnlockTimeSkipping( self, request: temporalio.api.testservice.v1.request_response_pb2.UnlockTimeSkippingRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.testservice.v1.request_response_pb2.UnlockTimeSkippingResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.testservice.v1.request_response_pb2.UnlockTimeSkippingResponse, + collections.abc.Awaitable[ + temporalio.api.testservice.v1.request_response_pb2.UnlockTimeSkippingResponse + ], + ]: """UnlockTimeSkipping decrements Time Locking Counter by one. If the counter reaches 0, it unlocks time skipping and fast forwards time. @@ -136,31 +241,49 @@ class TestServiceServicer(metaclass=abc.ABCMeta): Time Locking Counter can't be negative, unbalanced calls to UnlockTimeSkipping will lead to rpc call failure """ + @abc.abstractmethod def Sleep( self, request: temporalio.api.testservice.v1.request_response_pb2.SleepRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.testservice.v1.request_response_pb2.SleepResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.testservice.v1.request_response_pb2.SleepResponse, + collections.abc.Awaitable[ + temporalio.api.testservice.v1.request_response_pb2.SleepResponse + ], + ]: """This call returns only when the Test Server Time advances by the specified duration. This is an EXPERIMENTAL API. """ + @abc.abstractmethod def SleepUntil( self, request: temporalio.api.testservice.v1.request_response_pb2.SleepUntilRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.testservice.v1.request_response_pb2.SleepResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.testservice.v1.request_response_pb2.SleepResponse, + collections.abc.Awaitable[ + temporalio.api.testservice.v1.request_response_pb2.SleepResponse + ], + ]: """This call returns only when the Test Server Time advances to the specified timestamp. If the current Test Server Time is beyond the specified timestamp, returns immediately. This is an EXPERIMENTAL API. """ + @abc.abstractmethod def UnlockTimeSkippingWithSleep( self, request: temporalio.api.testservice.v1.request_response_pb2.SleepRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.testservice.v1.request_response_pb2.SleepResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.testservice.v1.request_response_pb2.SleepResponse, + collections.abc.Awaitable[ + temporalio.api.testservice.v1.request_response_pb2.SleepResponse + ], + ]: """UnlockTimeSkippingWhileSleep decreases time locking counter by one and increases it back once the Test Server Time advances by the duration specified in the request. @@ -171,17 +294,23 @@ class TestServiceServicer(metaclass=abc.ABCMeta): - 1, it will lead to fast forwarding of the time by the duration specified in the request and quick return of this rpc call. - 0 will lead to rpc call failure same way as an unbalanced UnlockTimeSkipping. """ + @abc.abstractmethod def GetCurrentTime( self, request: google.protobuf.empty_pb2.Empty, - context: grpc.ServicerContext, - ) -> temporalio.api.testservice.v1.request_response_pb2.GetCurrentTimeResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.testservice.v1.request_response_pb2.GetCurrentTimeResponse, + collections.abc.Awaitable[ + temporalio.api.testservice.v1.request_response_pb2.GetCurrentTimeResponse + ], + ]: """GetCurrentTime returns the current Temporal Test Server time This time might not be equal to {@link System#currentTimeMillis()} due to time skipping. """ def add_TestServiceServicer_to_server( - servicer: TestServiceServicer, server: grpc.Server + servicer: TestServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server] ) -> None: ... diff --git a/temporalio/api/update/v1/message_pb2.py b/temporalio/api/update/v1/message_pb2.py index b0517a662d..bfed69a922 100644 --- a/temporalio/api/update/v1/message_pb2.py +++ b/temporalio/api/update/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -23,139 +22,35 @@ from temporalio.api.failure.v1 import ( message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, ) - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n$temporal/api/update/v1/message.proto\x12\x16temporal.api.update.v1\x1a$temporal/api/common/v1/message.proto\x1a"temporal/api/enums/v1/update.proto\x1a%temporal/api/failure/v1/message.proto"c\n\nWaitPolicy\x12U\n\x0flifecycle_stage\x18\x01 \x01(\x0e\x32<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage"e\n\tUpdateRef\x12\x45\n\x12workflow_execution\x18\x01 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x11\n\tupdate_id\x18\x02 \x01(\t"|\n\x07Outcome\x12\x33\n\x07success\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.PayloadsH\x00\x12\x33\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x07\n\x05value"+\n\x04Meta\x12\x11\n\tupdate_id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t"u\n\x05Input\x12.\n\x06header\x18\x01 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x0c\n\x04name\x18\x02 \x01(\t\x12.\n\x04\x61rgs\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"c\n\x07Request\x12*\n\x04meta\x18\x01 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12,\n\x05input\x18\x02 \x01(\x0b\x32\x1d.temporal.api.update.v1.Input"\xcc\x01\n\tRejection\x12#\n\x1brejected_request_message_id\x18\x01 \x01(\t\x12,\n$rejected_request_sequencing_event_id\x18\x02 \x01(\x03\x12\x39\n\x10rejected_request\x18\x03 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"\x9a\x01\n\nAcceptance\x12#\n\x1b\x61\x63\x63\x65pted_request_message_id\x18\x01 \x01(\t\x12,\n$accepted_request_sequencing_event_id\x18\x02 \x01(\x03\x12\x39\n\x10\x61\x63\x63\x65pted_request\x18\x03 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request"h\n\x08Response\x12*\n\x04meta\x18\x01 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x30\n\x07outcome\x18\x02 \x01(\x0b\x32\x1f.temporal.api.update.v1.OutcomeB\x89\x01\n\x19io.temporal.api.update.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/update/v1;update\xaa\x02\x18Temporalio.Api.Update.V1\xea\x02\x1bTemporalio::Api::Update::V1b\x06proto3' -) - - -_WAITPOLICY = DESCRIPTOR.message_types_by_name["WaitPolicy"] -_UPDATEREF = DESCRIPTOR.message_types_by_name["UpdateRef"] -_OUTCOME = DESCRIPTOR.message_types_by_name["Outcome"] -_META = DESCRIPTOR.message_types_by_name["Meta"] -_INPUT = DESCRIPTOR.message_types_by_name["Input"] -_REQUEST = DESCRIPTOR.message_types_by_name["Request"] -_REJECTION = DESCRIPTOR.message_types_by_name["Rejection"] -_ACCEPTANCE = DESCRIPTOR.message_types_by_name["Acceptance"] -_RESPONSE = DESCRIPTOR.message_types_by_name["Response"] -WaitPolicy = _reflection.GeneratedProtocolMessageType( - "WaitPolicy", - (_message.Message,), - { - "DESCRIPTOR": _WAITPOLICY, - "__module__": "temporalio.api.update.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.update.v1.WaitPolicy) - }, -) -_sym_db.RegisterMessage(WaitPolicy) - -UpdateRef = _reflection.GeneratedProtocolMessageType( - "UpdateRef", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEREF, - "__module__": "temporalio.api.update.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.update.v1.UpdateRef) - }, -) -_sym_db.RegisterMessage(UpdateRef) - -Outcome = _reflection.GeneratedProtocolMessageType( - "Outcome", - (_message.Message,), - { - "DESCRIPTOR": _OUTCOME, - "__module__": "temporalio.api.update.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.update.v1.Outcome) - }, -) -_sym_db.RegisterMessage(Outcome) - -Meta = _reflection.GeneratedProtocolMessageType( - "Meta", - (_message.Message,), - { - "DESCRIPTOR": _META, - "__module__": "temporalio.api.update.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.update.v1.Meta) - }, -) -_sym_db.RegisterMessage(Meta) - -Input = _reflection.GeneratedProtocolMessageType( - "Input", - (_message.Message,), - { - "DESCRIPTOR": _INPUT, - "__module__": "temporalio.api.update.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.update.v1.Input) - }, -) -_sym_db.RegisterMessage(Input) - -Request = _reflection.GeneratedProtocolMessageType( - "Request", - (_message.Message,), - { - "DESCRIPTOR": _REQUEST, - "__module__": "temporalio.api.update.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.update.v1.Request) - }, +from temporalio.api.nexus.v1 import ( + message_pb2 as temporal_dot_api_dot_nexus_dot_v1_dot_message__pb2, ) -_sym_db.RegisterMessage(Request) -Rejection = _reflection.GeneratedProtocolMessageType( - "Rejection", - (_message.Message,), - { - "DESCRIPTOR": _REJECTION, - "__module__": "temporalio.api.update.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.update.v1.Rejection) - }, -) -_sym_db.RegisterMessage(Rejection) - -Acceptance = _reflection.GeneratedProtocolMessageType( - "Acceptance", - (_message.Message,), - { - "DESCRIPTOR": _ACCEPTANCE, - "__module__": "temporalio.api.update.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.update.v1.Acceptance) - }, -) -_sym_db.RegisterMessage(Acceptance) - -Response = _reflection.GeneratedProtocolMessageType( - "Response", - (_message.Message,), - { - "DESCRIPTOR": _RESPONSE, - "__module__": "temporalio.api.update.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.update.v1.Response) - }, +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n$temporal/api/update/v1/message.proto\x12\x16temporal.api.update.v1\x1a$temporal/api/common/v1/message.proto\x1a"temporal/api/enums/v1/update.proto\x1a%temporal/api/failure/v1/message.proto\x1a#temporal/api/nexus/v1/message.proto"c\n\nWaitPolicy\x12U\n\x0flifecycle_stage\x18\x01 \x01(\x0e\x32<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage"e\n\tUpdateRef\x12\x45\n\x12workflow_execution\x18\x01 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x11\n\tupdate_id\x18\x02 \x01(\t"|\n\x07Outcome\x12\x33\n\x07success\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.PayloadsH\x00\x12\x33\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x07\n\x05value"+\n\x04Meta\x12\x11\n\tupdate_id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t"u\n\x05Input\x12.\n\x06header\x18\x01 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x0c\n\x04name\x18\x02 \x01(\t\x12.\n\x04\x61rgs\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"\xcb\x02\n\x07Request\x12*\n\x04meta\x18\x01 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12,\n\x05input\x18\x02 \x01(\x0b\x32\x1d.temporal.api.update.v1.Input\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12>\n\x14\x63ompletion_callbacks\x18\x04 \x03(\x0b\x32 .temporal.api.common.v1.Callback\x12+\n\x05links\x18\x05 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12\x65\n&propagated_nexus_serialization_context\x18\x06 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext"\xcc\x01\n\tRejection\x12#\n\x1brejected_request_message_id\x18\x01 \x01(\t\x12,\n$rejected_request_sequencing_event_id\x18\x02 \x01(\x03\x12\x39\n\x10rejected_request\x18\x03 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request\x12\x31\n\x07\x66\x61ilure\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"\x9a\x01\n\nAcceptance\x12#\n\x1b\x61\x63\x63\x65pted_request_message_id\x18\x01 \x01(\t\x12,\n$accepted_request_sequencing_event_id\x18\x02 \x01(\x03\x12\x39\n\x10\x61\x63\x63\x65pted_request\x18\x03 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request"h\n\x08Response\x12*\n\x04meta\x18\x01 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x30\n\x07outcome\x18\x02 \x01(\x0b\x32\x1f.temporal.api.update.v1.OutcomeB\x89\x01\n\x19io.temporal.api.update.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/update/v1;update\xaa\x02\x18Temporalio.Api.Update.V1\xea\x02\x1bTemporalio::Api::Update::V1b\x06proto3' ) -_sym_db.RegisterMessage(Response) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\031io.temporal.api.update.v1B\014MessageProtoP\001Z#go.temporal.io/api/update/v1;update\252\002\030Temporalio.Api.Update.V1\352\002\033Temporalio::Api::Update::V1" - _WAITPOLICY._serialized_start = 177 - _WAITPOLICY._serialized_end = 276 - _UPDATEREF._serialized_start = 278 - _UPDATEREF._serialized_end = 379 - _OUTCOME._serialized_start = 381 - _OUTCOME._serialized_end = 505 - _META._serialized_start = 507 - _META._serialized_end = 550 - _INPUT._serialized_start = 552 - _INPUT._serialized_end = 669 - _REQUEST._serialized_start = 671 - _REQUEST._serialized_end = 770 - _REJECTION._serialized_start = 773 - _REJECTION._serialized_end = 977 - _ACCEPTANCE._serialized_start = 980 - _ACCEPTANCE._serialized_end = 1134 - _RESPONSE._serialized_start = 1136 - _RESPONSE._serialized_end = 1240 + _WAITPOLICY._serialized_start = 214 + _WAITPOLICY._serialized_end = 313 + _UPDATEREF._serialized_start = 315 + _UPDATEREF._serialized_end = 416 + _OUTCOME._serialized_start = 418 + _OUTCOME._serialized_end = 542 + _META._serialized_start = 544 + _META._serialized_end = 587 + _INPUT._serialized_start = 589 + _INPUT._serialized_end = 706 + _REQUEST._serialized_start = 709 + _REQUEST._serialized_end = 1040 + _REJECTION._serialized_start = 1043 + _REJECTION._serialized_end = 1247 + _ACCEPTANCE._serialized_start = 1250 + _ACCEPTANCE._serialized_end = 1404 + _RESPONSE._serialized_start = 1406 + _RESPONSE._serialized_end = 1510 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/update/v1/message_pb2.pyi b/temporalio/api/update/v1/message_pb2.pyi index 072821a0cb..9ebc326e0b 100644 --- a/temporalio/api/update/v1/message_pb2.pyi +++ b/temporalio/api/update/v1/message_pb2.pyi @@ -4,22 +4,21 @@ isort:skip_file """ import builtins -import sys +import collections.abc +import typing import google.protobuf.descriptor +import google.protobuf.internal.containers import google.protobuf.message import temporalio.api.common.v1.message_pb2 import temporalio.api.enums.v1.update_pb2 import temporalio.api.failure.v1.message_pb2 - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import temporalio.api.nexus.v1.message_pb2 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WaitPolicy(google.protobuf.message.Message): """Specifies client's intent to wait for Update results.""" @@ -39,12 +38,12 @@ class WaitPolicy(google.protobuf.message.Message): lifecycle_stage: temporalio.api.enums.v1.update_pb2.UpdateWorkflowExecutionLifecycleStage.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["lifecycle_stage", b"lifecycle_stage"], + self, field_name: typing.Literal["lifecycle_stage", b"lifecycle_stage"] ) -> None: ... global___WaitPolicy = WaitPolicy +@typing.final class UpdateRef(google.protobuf.message.Message): """The data needed by a client to refer to a previously invoked Workflow Update.""" @@ -52,11 +51,11 @@ class UpdateRef(google.protobuf.message.Message): WORKFLOW_EXECUTION_FIELD_NUMBER: builtins.int UPDATE_ID_FIELD_NUMBER: builtins.int + update_id: builtins.str @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... - update_id: builtins.str def __init__( self, *, @@ -65,20 +64,18 @@ class UpdateRef(google.protobuf.message.Message): update_id: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "update_id", b"update_id", "workflow_execution", b"workflow_execution" ], ) -> None: ... global___UpdateRef = UpdateRef +@typing.final class Outcome(google.protobuf.message.Message): """The outcome of a Workflow Update: success or failure.""" @@ -98,22 +95,23 @@ class Outcome(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "success", b"success", "value", b"value" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "success", b"success", "value", b"value" ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["value", b"value"] - ) -> typing_extensions.Literal["success", "failure"] | None: ... + self, oneof_group: typing.Literal["value", b"value"] + ) -> typing.Literal["success", "failure"] | None: ... global___Outcome = Outcome +@typing.final class Meta(google.protobuf.message.Message): """Metadata about a Workflow Update.""" @@ -133,29 +131,30 @@ class Meta(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "identity", b"identity", "update_id", b"update_id" - ], + field_name: typing.Literal["identity", b"identity", "update_id", b"update_id"], ) -> None: ... global___Meta = Meta +@typing.final class Input(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor HEADER_FIELD_NUMBER: builtins.int NAME_FIELD_NUMBER: builtins.int ARGS_FIELD_NUMBER: builtins.int + name: builtins.str + """The name of the Update handler to invoke on the target Workflow.""" @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: """Headers that are passed with the Update from the requesting entity. These can include things like auth or tracing tokens. """ - name: builtins.str - """The name of the Update handler to invoke on the target Workflow.""" + @property def args(self) -> temporalio.api.common.v1.message_pb2.Payloads: """The arguments to pass to the named Update handler.""" + def __init__( self, *, @@ -164,18 +163,18 @@ class Input(google.protobuf.message.Message): args: temporalio.api.common.v1.message_pb2.Payloads | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["args", b"args", "header", b"header"], + self, field_name: typing.Literal["args", b"args", "header", b"header"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "args", b"args", "header", b"header", "name", b"name" ], ) -> None: ... global___Input = Input +@typing.final class Request(google.protobuf.message.Message): """The client request that triggers a Workflow Update.""" @@ -183,25 +182,85 @@ class Request(google.protobuf.message.Message): META_FIELD_NUMBER: builtins.int INPUT_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + COMPLETION_CALLBACKS_FIELD_NUMBER: builtins.int + LINKS_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int + request_id: builtins.str + """The request ID of the request.""" @property def meta(self) -> global___Meta: ... @property def input(self) -> global___Input: ... + @property + def completion_callbacks( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Callback + ]: + """Callbacks to be called by the server when this update reaches a terminal state.""" + + @property + def links( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Link + ]: + """Links to be associated with this update.""" + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this update.""" + def __init__( self, *, meta: global___Meta | None = ..., input: global___Input | None = ..., + request_id: builtins.str = ..., + completion_callbacks: collections.abc.Iterable[ + temporalio.api.common.v1.message_pb2.Callback + ] + | None = ..., + links: collections.abc.Iterable[temporalio.api.common.v1.message_pb2.Link] + | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["input", b"input", "meta", b"meta"] + self, + field_name: typing.Literal[ + "input", + b"input", + "meta", + b"meta", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + ], ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["input", b"input", "meta", b"meta"] + self, + field_name: typing.Literal[ + "completion_callbacks", + b"completion_callbacks", + "input", + b"input", + "links", + b"links", + "meta", + b"meta", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "request_id", + b"request_id", + ], ) -> None: ... global___Request = Request +@typing.final class Rejection(google.protobuf.message.Message): """An Update protocol message indicating that a Workflow Update has been rejected.""" @@ -227,13 +286,13 @@ class Rejection(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "rejected_request", b"rejected_request" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "rejected_request", @@ -247,6 +306,7 @@ class Rejection(google.protobuf.message.Message): global___Rejection = Rejection +@typing.final class Acceptance(google.protobuf.message.Message): """An Update protocol message indicating that a Workflow Update has been accepted (i.e. passed the worker-side validation phase). @@ -269,12 +329,11 @@ class Acceptance(google.protobuf.message.Message): accepted_request: global___Request | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["accepted_request", b"accepted_request"], + self, field_name: typing.Literal["accepted_request", b"accepted_request"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "accepted_request", b"accepted_request", "accepted_request_message_id", @@ -286,6 +345,7 @@ class Acceptance(google.protobuf.message.Message): global___Acceptance = Acceptance +@typing.final class Response(google.protobuf.message.Message): """An Update protocol message indicating that a Workflow Update has completed with the contained outcome. @@ -306,12 +366,10 @@ class Response(google.protobuf.message.Message): outcome: global___Outcome | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["meta", b"meta", "outcome", b"outcome"], + self, field_name: typing.Literal["meta", b"meta", "outcome", b"outcome"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["meta", b"meta", "outcome", b"outcome"], + self, field_name: typing.Literal["meta", b"meta", "outcome", b"outcome"] ) -> None: ... global___Response = Response diff --git a/temporalio/api/version/v1/message_pb2.py b/temporalio/api/version/v1/message_pb2.py index e17a3ed9fd..2351dc8eac 100644 --- a/temporalio/api/version/v1/message_pb2.py +++ b/temporalio/api/version/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -24,43 +23,8 @@ b'\n%temporal/api/version/v1/message.proto\x12\x17temporal.api.version.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a"temporal/api/enums/v1/common.proto"_\n\x0bReleaseInfo\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x30\n\x0crelease_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05notes\x18\x03 \x01(\t"K\n\x05\x41lert\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x31\n\x08severity\x18\x02 \x01(\x0e\x32\x1f.temporal.api.enums.v1.Severity"\xfb\x01\n\x0bVersionInfo\x12\x35\n\x07\x63urrent\x18\x01 \x01(\x0b\x32$.temporal.api.version.v1.ReleaseInfo\x12\x39\n\x0brecommended\x18\x02 \x01(\x0b\x32$.temporal.api.version.v1.ReleaseInfo\x12\x14\n\x0cinstructions\x18\x03 \x01(\t\x12.\n\x06\x61lerts\x18\x04 \x03(\x0b\x32\x1e.temporal.api.version.v1.Alert\x12\x34\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x8e\x01\n\x1aio.temporal.api.version.v1B\x0cMessageProtoP\x01Z%go.temporal.io/api/version/v1;version\xaa\x02\x19Temporalio.Api.Version.V1\xea\x02\x1cTemporalio::Api::Version::V1b\x06proto3' ) - -_RELEASEINFO = DESCRIPTOR.message_types_by_name["ReleaseInfo"] -_ALERT = DESCRIPTOR.message_types_by_name["Alert"] -_VERSIONINFO = DESCRIPTOR.message_types_by_name["VersionInfo"] -ReleaseInfo = _reflection.GeneratedProtocolMessageType( - "ReleaseInfo", - (_message.Message,), - { - "DESCRIPTOR": _RELEASEINFO, - "__module__": "temporalio.api.version.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.version.v1.ReleaseInfo) - }, -) -_sym_db.RegisterMessage(ReleaseInfo) - -Alert = _reflection.GeneratedProtocolMessageType( - "Alert", - (_message.Message,), - { - "DESCRIPTOR": _ALERT, - "__module__": "temporalio.api.version.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.version.v1.Alert) - }, -) -_sym_db.RegisterMessage(Alert) - -VersionInfo = _reflection.GeneratedProtocolMessageType( - "VersionInfo", - (_message.Message,), - { - "DESCRIPTOR": _VERSIONINFO, - "__module__": "temporalio.api.version.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.version.v1.VersionInfo) - }, -) -_sym_db.RegisterMessage(VersionInfo) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\032io.temporal.api.version.v1B\014MessageProtoP\001Z%go.temporal.io/api/version/v1;version\252\002\031Temporalio.Api.Version.V1\352\002\034Temporalio::Api::Version::V1" diff --git a/temporalio/api/version/v1/message_pb2.pyi b/temporalio/api/version/v1/message_pb2.pyi index dc481aeda8..777ef69a2d 100644 --- a/temporalio/api/version/v1/message_pb2.pyi +++ b/temporalio/api/version/v1/message_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers @@ -14,13 +14,9 @@ import google.protobuf.timestamp_pb2 import temporalio.api.enums.v1.common_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class ReleaseInfo(google.protobuf.message.Message): """ReleaseInfo contains information about specific version of temporal.""" @@ -30,9 +26,9 @@ class ReleaseInfo(google.protobuf.message.Message): RELEASE_TIME_FIELD_NUMBER: builtins.int NOTES_FIELD_NUMBER: builtins.int version: builtins.str + notes: builtins.str @property def release_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - notes: builtins.str def __init__( self, *, @@ -41,17 +37,18 @@ class ReleaseInfo(google.protobuf.message.Message): notes: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["release_time", b"release_time"] + self, field_name: typing.Literal["release_time", b"release_time"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "notes", b"notes", "release_time", b"release_time", "version", b"version" ], ) -> None: ... global___ReleaseInfo = ReleaseInfo +@typing.final class Alert(google.protobuf.message.Message): """Alert contains notification and severity.""" @@ -68,14 +65,12 @@ class Alert(google.protobuf.message.Message): severity: temporalio.api.enums.v1.common_pb2.Severity.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "message", b"message", "severity", b"severity" - ], + self, field_name: typing.Literal["message", b"message", "severity", b"severity"] ) -> None: ... global___Alert = Alert +@typing.final class VersionInfo(google.protobuf.message.Message): """VersionInfo contains details about current and recommended release versions as well as alerts and upgrade instructions.""" @@ -86,11 +81,11 @@ class VersionInfo(google.protobuf.message.Message): INSTRUCTIONS_FIELD_NUMBER: builtins.int ALERTS_FIELD_NUMBER: builtins.int LAST_UPDATE_TIME_FIELD_NUMBER: builtins.int + instructions: builtins.str @property def current(self) -> global___ReleaseInfo: ... @property def recommended(self) -> global___ReleaseInfo: ... - instructions: builtins.str @property def alerts( self, @@ -110,7 +105,7 @@ class VersionInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current", b"current", "last_update_time", @@ -121,7 +116,7 @@ class VersionInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "alerts", b"alerts", "current", diff --git a/temporalio/api/worker/v1/__init__.py b/temporalio/api/worker/v1/__init__.py index ba261cbe3c..8b6e343e5d 100644 --- a/temporalio/api/worker/v1/__init__.py +++ b/temporalio/api/worker/v1/__init__.py @@ -1,17 +1,31 @@ from .message_pb2 import ( + CancelActivityCommand, + CancelActivityResult, + EnvironmentInfo, PluginInfo, + StorageDriverInfo, + WorkerCommand, + WorkerCommandResult, WorkerHeartbeat, WorkerHostInfo, WorkerInfo, + WorkerListInfo, WorkerPollerInfo, WorkerSlotsInfo, ) __all__ = [ + "CancelActivityCommand", + "CancelActivityResult", + "EnvironmentInfo", "PluginInfo", + "StorageDriverInfo", + "WorkerCommand", + "WorkerCommandResult", "WorkerHeartbeat", "WorkerHostInfo", "WorkerInfo", + "WorkerListInfo", "WorkerPollerInfo", "WorkerSlotsInfo", ] diff --git a/temporalio/api/worker/v1/message_pb2.py b/temporalio/api/worker/v1/message_pb2.py index 71302f579b..488f29f3ca 100644 --- a/temporalio/api/worker/v1/message_pb2.py +++ b/temporalio/api/worker/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -25,95 +24,60 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n$temporal/api/worker/v1/message.proto\x12\x16temporal.api.worker.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a(temporal/api/deployment/v1/message.proto\x1a"temporal/api/enums/v1/common.proto"\x82\x01\n\x10WorkerPollerInfo\x12\x17\n\x0f\x63urrent_pollers\x18\x01 \x01(\x05\x12=\n\x19last_successful_poll_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0eis_autoscaling\x18\x03 \x01(\x08"\xf1\x01\n\x0fWorkerSlotsInfo\x12\x1f\n\x17\x63urrent_available_slots\x18\x01 \x01(\x05\x12\x1a\n\x12\x63urrent_used_slots\x18\x02 \x01(\x05\x12\x1a\n\x12slot_supplier_kind\x18\x03 \x01(\t\x12\x1d\n\x15total_processed_tasks\x18\x04 \x01(\x05\x12\x1a\n\x12total_failed_tasks\x18\x05 \x01(\x05\x12%\n\x1dlast_interval_processed_tasks\x18\x06 \x01(\x05\x12#\n\x1blast_interval_failure_tasks\x18\x07 \x01(\x05"\x8c\x01\n\x0eWorkerHostInfo\x12\x11\n\thost_name\x18\x01 \x01(\t\x12\x13\n\x0bprocess_key\x18\x05 \x01(\t\x12\x12\n\nprocess_id\x18\x02 \x01(\t\x12\x1e\n\x16\x63urrent_host_cpu_usage\x18\x03 \x01(\x02\x12\x1e\n\x16\x63urrent_host_mem_usage\x18\x04 \x01(\x02"\xcf\t\n\x0fWorkerHeartbeat\x12\x1b\n\x13worker_instance_key\x18\x01 \x01(\t\x12\x17\n\x0fworker_identity\x18\x02 \x01(\t\x12\x39\n\thost_info\x18\x03 \x01(\x0b\x32&.temporal.api.worker.v1.WorkerHostInfo\x12\x12\n\ntask_queue\x18\x04 \x01(\t\x12O\n\x12\x64\x65ployment_version\x18\x05 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x10\n\x08sdk_name\x18\x06 \x01(\t\x12\x13\n\x0bsdk_version\x18\x07 \x01(\t\x12\x33\n\x06status\x18\x08 \x01(\x0e\x32#.temporal.api.enums.v1.WorkerStatus\x12.\n\nstart_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0eheartbeat_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\x1c\x65lapsed_since_last_heartbeat\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12I\n\x18workflow_task_slots_info\x18\x0c \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerSlotsInfo\x12I\n\x18\x61\x63tivity_task_slots_info\x18\r \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerSlotsInfo\x12\x46\n\x15nexus_task_slots_info\x18\x0e \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerSlotsInfo\x12J\n\x19local_activity_slots_info\x18\x0f \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerSlotsInfo\x12\x46\n\x14workflow_poller_info\x18\x10 \x01(\x0b\x32(.temporal.api.worker.v1.WorkerPollerInfo\x12M\n\x1bworkflow_sticky_poller_info\x18\x11 \x01(\x0b\x32(.temporal.api.worker.v1.WorkerPollerInfo\x12\x46\n\x14\x61\x63tivity_poller_info\x18\x12 \x01(\x0b\x32(.temporal.api.worker.v1.WorkerPollerInfo\x12\x43\n\x11nexus_poller_info\x18\x13 \x01(\x0b\x32(.temporal.api.worker.v1.WorkerPollerInfo\x12\x1e\n\x16total_sticky_cache_hit\x18\x14 \x01(\x05\x12\x1f\n\x17total_sticky_cache_miss\x18\x15 \x01(\x05\x12!\n\x19\x63urrent_sticky_cache_size\x18\x16 \x01(\x05\x12\x33\n\x07plugins\x18\x17 \x03(\x0b\x32".temporal.api.worker.v1.PluginInfo"O\n\nWorkerInfo\x12\x41\n\x10worker_heartbeat\x18\x01 \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat"+\n\nPluginInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\tB\x89\x01\n\x19io.temporal.api.worker.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/worker/v1;worker\xaa\x02\x18Temporalio.Api.Worker.V1\xea\x02\x1bTemporalio::Api::Worker::V1b\x06proto3' + b'\n$temporal/api/worker/v1/message.proto\x12\x16temporal.api.worker.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a(temporal/api/deployment/v1/message.proto\x1a"temporal/api/enums/v1/common.proto"\x9a\x01\n\x10WorkerPollerInfo\x12\x17\n\x0f\x63urrent_pollers\x18\x01 \x01(\x05\x12=\n\x19last_successful_poll_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0eis_autoscaling\x18\x03 \x01(\x08\x12\x16\n\x0etarget_pollers\x18\x04 \x01(\x05"\xf1\x01\n\x0fWorkerSlotsInfo\x12\x1f\n\x17\x63urrent_available_slots\x18\x01 \x01(\x05\x12\x1a\n\x12\x63urrent_used_slots\x18\x02 \x01(\x05\x12\x1a\n\x12slot_supplier_kind\x18\x03 \x01(\t\x12\x1d\n\x15total_processed_tasks\x18\x04 \x01(\x05\x12\x1a\n\x12total_failed_tasks\x18\x05 \x01(\x05\x12%\n\x1dlast_interval_processed_tasks\x18\x06 \x01(\x05\x12#\n\x1blast_interval_failure_tasks\x18\x07 \x01(\x05"\x94\x01\n\x0eWorkerHostInfo\x12\x11\n\thost_name\x18\x01 \x01(\t\x12\x1b\n\x13worker_grouping_key\x18\x05 \x01(\t\x12\x12\n\nprocess_id\x18\x02 \x01(\t\x12\x1e\n\x16\x63urrent_host_cpu_usage\x18\x03 \x01(\x02\x12\x1e\n\x16\x63urrent_host_mem_usage\x18\x04 \x01(\x02"\xc9\n\n\x0fWorkerHeartbeat\x12\x1b\n\x13worker_instance_key\x18\x01 \x01(\t\x12\x17\n\x0fworker_identity\x18\x02 \x01(\t\x12\x39\n\thost_info\x18\x03 \x01(\x0b\x32&.temporal.api.worker.v1.WorkerHostInfo\x12\x12\n\ntask_queue\x18\x04 \x01(\t\x12O\n\x12\x64\x65ployment_version\x18\x05 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x10\n\x08sdk_name\x18\x06 \x01(\t\x12\x13\n\x0bsdk_version\x18\x07 \x01(\t\x12\x33\n\x06status\x18\x08 \x01(\x0e\x32#.temporal.api.enums.v1.WorkerStatus\x12.\n\nstart_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0eheartbeat_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\x1c\x65lapsed_since_last_heartbeat\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12I\n\x18workflow_task_slots_info\x18\x0c \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerSlotsInfo\x12I\n\x18\x61\x63tivity_task_slots_info\x18\r \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerSlotsInfo\x12\x46\n\x15nexus_task_slots_info\x18\x0e \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerSlotsInfo\x12J\n\x19local_activity_slots_info\x18\x0f \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerSlotsInfo\x12\x46\n\x14workflow_poller_info\x18\x10 \x01(\x0b\x32(.temporal.api.worker.v1.WorkerPollerInfo\x12M\n\x1bworkflow_sticky_poller_info\x18\x11 \x01(\x0b\x32(.temporal.api.worker.v1.WorkerPollerInfo\x12\x46\n\x14\x61\x63tivity_poller_info\x18\x12 \x01(\x0b\x32(.temporal.api.worker.v1.WorkerPollerInfo\x12\x43\n\x11nexus_poller_info\x18\x13 \x01(\x0b\x32(.temporal.api.worker.v1.WorkerPollerInfo\x12\x1e\n\x16total_sticky_cache_hit\x18\x14 \x01(\x05\x12\x1f\n\x17total_sticky_cache_miss\x18\x15 \x01(\x05\x12!\n\x19\x63urrent_sticky_cache_size\x18\x16 \x01(\x05\x12\x33\n\x07plugins\x18\x17 \x03(\x0b\x32".temporal.api.worker.v1.PluginInfo\x12:\n\x07\x64rivers\x18\x18 \x03(\x0b\x32).temporal.api.worker.v1.StorageDriverInfo\x12<\n\x0b\x65nvironment\x18\x19 \x01(\x0b\x32\'.temporal.api.worker.v1.EnvironmentInfo"O\n\nWorkerInfo\x12\x41\n\x10worker_heartbeat\x18\x01 \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat"\xec\x03\n\x0eWorkerListInfo\x12\x1b\n\x13worker_instance_key\x18\x01 \x01(\t\x12\x17\n\x0fworker_identity\x18\x02 \x01(\t\x12\x12\n\ntask_queue\x18\x03 \x01(\t\x12O\n\x12\x64\x65ployment_version\x18\x04 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x10\n\x08sdk_name\x18\x05 \x01(\t\x12\x13\n\x0bsdk_version\x18\x06 \x01(\t\x12\x33\n\x06status\x18\x07 \x01(\x0e\x32#.temporal.api.enums.v1.WorkerStatus\x12.\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\thost_name\x18\t \x01(\t\x12\x1b\n\x13worker_grouping_key\x18\n \x01(\t\x12\x12\n\nprocess_id\x18\x0b \x01(\t\x12\x33\n\x07plugins\x18\x0c \x03(\x0b\x32".temporal.api.worker.v1.PluginInfo\x12:\n\x07\x64rivers\x18\r \x03(\x0b\x32).temporal.api.worker.v1.StorageDriverInfo"+\n\nPluginInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t"!\n\x11StorageDriverInfo\x12\x0c\n\x04type\x18\x01 \x01(\t"\xdc\x11\n\x0f\x45nvironmentInfo\x12\x41\n\x08runtimes\x18\x01 \x03(\x0b\x32/.temporal.api.worker.v1.EnvironmentInfo.Runtime\x12X\n\x14hosting_environments\x18\x02 \x03(\x0b\x32:.temporal.api.worker.v1.EnvironmentInfo.HostingEnvironment\x12\x42\n\x08platform\x18\x03 \x01(\x0b\x32\x30.temporal.api.worker.v1.EnvironmentInfo.Platform\x1a\xc9\x03\n\x07Runtime\x12I\n\x04type\x18\x01 \x01(\x0e\x32;.temporal.api.worker.v1.EnvironmentInfo.Runtime.RuntimeType\x12\x0f\n\x07version\x18\x02 \x01(\t"\xe1\x02\n\x0bRuntimeType\x12\x1c\n\x18RUNTIME_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10RUNTIME_TYPE_JVM\x10\x01\x12\x18\n\x14RUNTIME_TYPE_CPYTHON\x10\x02\x12\x15\n\x11RUNTIME_TYPE_NODE\x10\x03\x12\x14\n\x10RUNTIME_TYPE_BUN\x10\x04\x12\x16\n\x12RUNTIME_TYPE_CRUBY\x10\x05\x12\x13\n\x0fRUNTIME_TYPE_GO\x10\x06\x12!\n\x1dRUNTIME_TYPE_DOTNET_FRAMEWORK\x10\x07\x12\x1c\n\x18RUNTIME_TYPE_DOTNET_CORE\x10\x08\x12\x17\n\x13RUNTIME_TYPE_NATIVE\x10\t\x12\x1b\n\x17RUNTIME_TYPE_ROADRUNNER\x10\n\x12\x1a\n\x16RUNTIME_TYPE_GRAAL_AOT\x10\x0b\x12\x17\n\x13RUNTIME_TYPE_KOTLIN\x10\x0c\x1a\xd1\x04\n\x12HostingEnvironment\x12_\n\x04type\x18\x01 \x01(\x0e\x32Q.temporal.api.worker.v1.EnvironmentInfo.HostingEnvironment.HostingEnvironmentType\x12\x0f\n\x07version\x18\x02 \x01(\t"\xc8\x03\n\x16HostingEnvironmentType\x12(\n$HOSTING_ENVIRONMENT_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1fHOSTING_ENVIRONMENT_TYPE_DOCKER\x10\x01\x12 \n\x1cHOSTING_ENVIRONMENT_TYPE_K8S\x10\x02\x12\'\n#HOSTING_ENVIRONMENT_TYPE_AWS_LAMBDA\x10\x03\x12$\n HOSTING_ENVIRONMENT_TYPE_AWS_ECS\x10\x04\x12-\n)HOSTING_ENVIRONMENT_TYPE_GOOGLE_CLOUD_RUN\x10\x06\x12.\n*HOSTING_ENVIRONMENT_TYPE_GOOGLE_APP_ENGINE\x10\x07\x12.\n*HOSTING_ENVIRONMENT_TYPE_AZURE_APP_SERVICE\x10\x08\x12,\n(HOSTING_ENVIRONMENT_TYPE_AZURE_FUNCTIONS\x10\t\x12\x31\n-HOSTING_ENVIRONMENT_TYPE_AZURE_CONTAINER_APPS\x10\n\x1a\xf1\x01\n\x08Platform\x12\x46\n\x05linux\x18\x01 \x01(\x0b\x32\x35.temporal.api.worker.v1.EnvironmentInfo.LinuxPlatformH\x00\x12\x46\n\x05macos\x18\x02 \x01(\x0b\x32\x35.temporal.api.worker.v1.EnvironmentInfo.MacOSPlatformH\x00\x12J\n\x07windows\x18\x03 \x01(\x0b\x32\x37.temporal.api.worker.v1.EnvironmentInfo.WindowsPlatformH\x00\x42\t\n\x07variant\x1a\xf3\x01\n\rLinuxPlatform\x12\x0f\n\x07version\x18\x01 \x01(\t\x12J\n\x0c\x61rchitecture\x18\x02 \x01(\x0e\x32\x34.temporal.api.worker.v1.EnvironmentInfo.Architecture\x12H\n\x04libc\x18\x03 \x01(\x0e\x32:.temporal.api.worker.v1.EnvironmentInfo.LinuxPlatform.Libc";\n\x04Libc\x12\x14\n\x10LIBC_UNSPECIFIED\x10\x00\x12\x0e\n\nLIBC_GLIBC\x10\x01\x12\r\n\tLIBC_MUSL\x10\x02\x1al\n\rMacOSPlatform\x12\x0f\n\x07version\x18\x01 \x01(\t\x12J\n\x0c\x61rchitecture\x18\x02 \x01(\x0e\x32\x34.temporal.api.worker.v1.EnvironmentInfo.Architecture\x1a\x91\x02\n\x0fWindowsPlatform\x12\x0f\n\x07version\x18\x01 \x01(\t\x12J\n\x0c\x61rchitecture\x18\x02 \x01(\x0e\x32\x34.temporal.api.worker.v1.EnvironmentInfo.Architecture\x12H\n\x03\x63rt\x18\x03 \x01(\x0e\x32;.temporal.api.worker.v1.EnvironmentInfo.WindowsPlatform.Crt"W\n\x03\x43rt\x12\x13\n\x0f\x43RT_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RT_UCRT\x10\x01\x12\x0e\n\nCRT_MSVCRT\x10\x02\x12\r\n\tCRT_MINGW\x10\x03\x12\x0e\n\nCRT_CYGWIN\x10\x04"\\\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41RCHITECTURE_AMD64\x10\x01\x12\x16\n\x12\x41RCHITECTURE_ARM64\x10\x02"a\n\rWorkerCommand\x12H\n\x0f\x63\x61ncel_activity\x18\x01 \x01(\x0b\x32-.temporal.api.worker.v1.CancelActivityCommandH\x00\x42\x06\n\x04type"+\n\x15\x43\x61ncelActivityCommand\x12\x12\n\ntask_token\x18\x01 \x01(\x0c"f\n\x13WorkerCommandResult\x12G\n\x0f\x63\x61ncel_activity\x18\x01 \x01(\x0b\x32,.temporal.api.worker.v1.CancelActivityResultH\x00\x42\x06\n\x04type"\x16\n\x14\x43\x61ncelActivityResultB\x89\x01\n\x19io.temporal.api.worker.v1B\x0cMessageProtoP\x01Z#go.temporal.io/api/worker/v1;worker\xaa\x02\x18Temporalio.Api.Worker.V1\xea\x02\x1bTemporalio::Api::Worker::V1b\x06proto3' ) - -_WORKERPOLLERINFO = DESCRIPTOR.message_types_by_name["WorkerPollerInfo"] -_WORKERSLOTSINFO = DESCRIPTOR.message_types_by_name["WorkerSlotsInfo"] -_WORKERHOSTINFO = DESCRIPTOR.message_types_by_name["WorkerHostInfo"] -_WORKERHEARTBEAT = DESCRIPTOR.message_types_by_name["WorkerHeartbeat"] -_WORKERINFO = DESCRIPTOR.message_types_by_name["WorkerInfo"] -_PLUGININFO = DESCRIPTOR.message_types_by_name["PluginInfo"] -WorkerPollerInfo = _reflection.GeneratedProtocolMessageType( - "WorkerPollerInfo", - (_message.Message,), - { - "DESCRIPTOR": _WORKERPOLLERINFO, - "__module__": "temporalio.api.worker.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.worker.v1.WorkerPollerInfo) - }, -) -_sym_db.RegisterMessage(WorkerPollerInfo) - -WorkerSlotsInfo = _reflection.GeneratedProtocolMessageType( - "WorkerSlotsInfo", - (_message.Message,), - { - "DESCRIPTOR": _WORKERSLOTSINFO, - "__module__": "temporalio.api.worker.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.worker.v1.WorkerSlotsInfo) - }, -) -_sym_db.RegisterMessage(WorkerSlotsInfo) - -WorkerHostInfo = _reflection.GeneratedProtocolMessageType( - "WorkerHostInfo", - (_message.Message,), - { - "DESCRIPTOR": _WORKERHOSTINFO, - "__module__": "temporalio.api.worker.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.worker.v1.WorkerHostInfo) - }, -) -_sym_db.RegisterMessage(WorkerHostInfo) - -WorkerHeartbeat = _reflection.GeneratedProtocolMessageType( - "WorkerHeartbeat", - (_message.Message,), - { - "DESCRIPTOR": _WORKERHEARTBEAT, - "__module__": "temporalio.api.worker.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.worker.v1.WorkerHeartbeat) - }, -) -_sym_db.RegisterMessage(WorkerHeartbeat) - -WorkerInfo = _reflection.GeneratedProtocolMessageType( - "WorkerInfo", - (_message.Message,), - { - "DESCRIPTOR": _WORKERINFO, - "__module__": "temporalio.api.worker.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.worker.v1.WorkerInfo) - }, -) -_sym_db.RegisterMessage(WorkerInfo) - -PluginInfo = _reflection.GeneratedProtocolMessageType( - "PluginInfo", - (_message.Message,), - { - "DESCRIPTOR": _PLUGININFO, - "__module__": "temporalio.api.worker.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.worker.v1.PluginInfo) - }, -) -_sym_db.RegisterMessage(PluginInfo) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\031io.temporal.api.worker.v1B\014MessageProtoP\001Z#go.temporal.io/api/worker/v1;worker\252\002\030Temporalio.Api.Worker.V1\352\002\033Temporalio::Api::Worker::V1" _WORKERPOLLERINFO._serialized_start = 208 - _WORKERPOLLERINFO._serialized_end = 338 - _WORKERSLOTSINFO._serialized_start = 341 - _WORKERSLOTSINFO._serialized_end = 582 - _WORKERHOSTINFO._serialized_start = 585 - _WORKERHOSTINFO._serialized_end = 725 - _WORKERHEARTBEAT._serialized_start = 728 - _WORKERHEARTBEAT._serialized_end = 1959 - _WORKERINFO._serialized_start = 1961 - _WORKERINFO._serialized_end = 2040 - _PLUGININFO._serialized_start = 2042 - _PLUGININFO._serialized_end = 2085 + _WORKERPOLLERINFO._serialized_end = 362 + _WORKERSLOTSINFO._serialized_start = 365 + _WORKERSLOTSINFO._serialized_end = 606 + _WORKERHOSTINFO._serialized_start = 609 + _WORKERHOSTINFO._serialized_end = 757 + _WORKERHEARTBEAT._serialized_start = 760 + _WORKERHEARTBEAT._serialized_end = 2113 + _WORKERINFO._serialized_start = 2115 + _WORKERINFO._serialized_end = 2194 + _WORKERLISTINFO._serialized_start = 2197 + _WORKERLISTINFO._serialized_end = 2689 + _PLUGININFO._serialized_start = 2691 + _PLUGININFO._serialized_end = 2734 + _STORAGEDRIVERINFO._serialized_start = 2736 + _STORAGEDRIVERINFO._serialized_end = 2769 + _ENVIRONMENTINFO._serialized_start = 2772 + _ENVIRONMENTINFO._serialized_end = 5040 + _ENVIRONMENTINFO_RUNTIME._serialized_start = 3017 + _ENVIRONMENTINFO_RUNTIME._serialized_end = 3474 + _ENVIRONMENTINFO_RUNTIME_RUNTIMETYPE._serialized_start = 3121 + _ENVIRONMENTINFO_RUNTIME_RUNTIMETYPE._serialized_end = 3474 + _ENVIRONMENTINFO_HOSTINGENVIRONMENT._serialized_start = 3477 + _ENVIRONMENTINFO_HOSTINGENVIRONMENT._serialized_end = 4070 + _ENVIRONMENTINFO_HOSTINGENVIRONMENT_HOSTINGENVIRONMENTTYPE._serialized_start = 3614 + _ENVIRONMENTINFO_HOSTINGENVIRONMENT_HOSTINGENVIRONMENTTYPE._serialized_end = 4070 + _ENVIRONMENTINFO_PLATFORM._serialized_start = 4073 + _ENVIRONMENTINFO_PLATFORM._serialized_end = 4314 + _ENVIRONMENTINFO_LINUXPLATFORM._serialized_start = 4317 + _ENVIRONMENTINFO_LINUXPLATFORM._serialized_end = 4560 + _ENVIRONMENTINFO_LINUXPLATFORM_LIBC._serialized_start = 4501 + _ENVIRONMENTINFO_LINUXPLATFORM_LIBC._serialized_end = 4560 + _ENVIRONMENTINFO_MACOSPLATFORM._serialized_start = 4562 + _ENVIRONMENTINFO_MACOSPLATFORM._serialized_end = 4670 + _ENVIRONMENTINFO_WINDOWSPLATFORM._serialized_start = 4673 + _ENVIRONMENTINFO_WINDOWSPLATFORM._serialized_end = 4946 + _ENVIRONMENTINFO_WINDOWSPLATFORM_CRT._serialized_start = 4859 + _ENVIRONMENTINFO_WINDOWSPLATFORM_CRT._serialized_end = 4946 + _ENVIRONMENTINFO_ARCHITECTURE._serialized_start = 4948 + _ENVIRONMENTINFO_ARCHITECTURE._serialized_end = 5040 + _WORKERCOMMAND._serialized_start = 5042 + _WORKERCOMMAND._serialized_end = 5139 + _CANCELACTIVITYCOMMAND._serialized_start = 5141 + _CANCELACTIVITYCOMMAND._serialized_end = 5184 + _WORKERCOMMANDRESULT._serialized_start = 5186 + _WORKERCOMMANDRESULT._serialized_end = 5288 + _CANCELACTIVITYRESULT._serialized_start = 5290 + _CANCELACTIVITYRESULT._serialized_end = 5312 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/worker/v1/message_pb2.pyi b/temporalio/api/worker/v1/message_pb2.pyi index e4c2a47251..68fa449887 100644 --- a/temporalio/api/worker/v1/message_pb2.pyi +++ b/temporalio/api/worker/v1/message_pb2.pyi @@ -6,62 +6,74 @@ isort:skip_file import builtins import collections.abc import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper import google.protobuf.message import google.protobuf.timestamp_pb2 import temporalio.api.deployment.v1.message_pb2 import temporalio.api.enums.v1.common_pb2 -if sys.version_info >= (3, 8): +if sys.version_info >= (3, 10): import typing as typing_extensions else: import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkerPollerInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor CURRENT_POLLERS_FIELD_NUMBER: builtins.int LAST_SUCCESSFUL_POLL_TIME_FIELD_NUMBER: builtins.int IS_AUTOSCALING_FIELD_NUMBER: builtins.int + TARGET_POLLERS_FIELD_NUMBER: builtins.int current_pollers: builtins.int """Number of polling RPCs that are currently in flight.""" - @property - def last_successful_poll_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... is_autoscaling: builtins.bool """Set true if the number of concurrent pollers is auto-scaled""" + target_pollers: builtins.int + """Number of concurrent poll requests this poller pool is currently targeting, which may + differ from current_pollers. 0 if unknown, such as a poller pool of fixed size. + """ + @property + def last_successful_poll_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... def __init__( self, *, current_pollers: builtins.int = ..., last_successful_poll_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., is_autoscaling: builtins.bool = ..., + target_pollers: builtins.int = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "last_successful_poll_time", b"last_successful_poll_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_pollers", b"current_pollers", "is_autoscaling", b"is_autoscaling", "last_successful_poll_time", b"last_successful_poll_time", + "target_pollers", + b"target_pollers", ], ) -> None: ... global___WorkerPollerInfo = WorkerPollerInfo +@typing.final class WorkerSlotsInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -108,7 +120,7 @@ class WorkerSlotsInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_available_slots", b"current_available_slots", "current_used_slots", @@ -128,27 +140,26 @@ class WorkerSlotsInfo(google.protobuf.message.Message): global___WorkerSlotsInfo = WorkerSlotsInfo +@typing.final class WorkerHostInfo(google.protobuf.message.Message): """Holds everything needed to identify the worker host/process context""" DESCRIPTOR: google.protobuf.descriptor.Descriptor HOST_NAME_FIELD_NUMBER: builtins.int - PROCESS_KEY_FIELD_NUMBER: builtins.int + WORKER_GROUPING_KEY_FIELD_NUMBER: builtins.int PROCESS_ID_FIELD_NUMBER: builtins.int CURRENT_HOST_CPU_USAGE_FIELD_NUMBER: builtins.int CURRENT_HOST_MEM_USAGE_FIELD_NUMBER: builtins.int host_name: builtins.str """Worker host identifier.""" - process_key: builtins.str - """Worker process identifier. This id should be unique for all _processes_ - running workers in the namespace, and should be shared by all workers - in the same process. + worker_grouping_key: builtins.str + """Worker grouping identifier. A key to group workers that share the same client+namespace+process. This will be used to build the worker command nexus task queue name: - "temporal-sys/worker-commands/{process_key}" + "temporal-sys/worker-commands/{worker_grouping_key}" """ process_id: builtins.str - """Worker process identifier. Unlike process_key, this id only needs to be unique + """Worker process identifier. This id only needs to be unique within one host (so using e.g. a unix pid would be appropriate). """ current_host_cpu_usage: builtins.float @@ -163,14 +174,14 @@ class WorkerHostInfo(google.protobuf.message.Message): self, *, host_name: builtins.str = ..., - process_key: builtins.str = ..., + worker_grouping_key: builtins.str = ..., process_id: builtins.str = ..., current_host_cpu_usage: builtins.float = ..., current_host_mem_usage: builtins.float = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_host_cpu_usage", b"current_host_cpu_usage", "current_host_mem_usage", @@ -179,13 +190,14 @@ class WorkerHostInfo(google.protobuf.message.Message): b"host_name", "process_id", b"process_id", - "process_key", - b"process_key", + "worker_grouping_key", + b"worker_grouping_key", ], ) -> None: ... global___WorkerHostInfo = WorkerHostInfo +@typing.final class WorkerHeartbeat(google.protobuf.message.Message): """Worker info message, contains information about the worker and its current state. All information is provided by the worker itself. @@ -218,6 +230,8 @@ class WorkerHeartbeat(google.protobuf.message.Message): TOTAL_STICKY_CACHE_MISS_FIELD_NUMBER: builtins.int CURRENT_STICKY_CACHE_SIZE_FIELD_NUMBER: builtins.int PLUGINS_FIELD_NUMBER: builtins.int + DRIVERS_FIELD_NUMBER: builtins.int + ENVIRONMENT_FIELD_NUMBER: builtins.int worker_instance_key: builtins.str """Worker identifier, should be unique for the namespace. It is distinct from worker identity, which is not necessarily namespace-unique. @@ -226,32 +240,42 @@ class WorkerHeartbeat(google.protobuf.message.Message): """Worker identity, set by the client, may not be unique. Usually host_name+(user group name)+process_id, but can be overwritten by the user. """ + task_queue: builtins.str + """Task queue this worker is polling for tasks.""" + sdk_name: builtins.str + sdk_version: builtins.str + status: temporalio.api.enums.v1.common_pb2.WorkerStatus.ValueType + """Worker status. Defined by SDK.""" + total_sticky_cache_hit: builtins.int + """A Workflow Task found a cached Workflow Execution to run against.""" + total_sticky_cache_miss: builtins.int + """A Workflow Task did not find a cached Workflow execution to run against.""" + current_sticky_cache_size: builtins.int + """Current cache size, expressed in number of Workflow Executions.""" @property def host_info(self) -> global___WorkerHostInfo: """Worker host information.""" - task_queue: builtins.str - """Task queue this worker is polling for tasks.""" + @property def deployment_version( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: ... - sdk_name: builtins.str - sdk_version: builtins.str - status: temporalio.api.enums.v1.common_pb2.WorkerStatus.ValueType - """Worker status. Defined by SDK.""" @property def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Worker start time. It can be used to determine worker uptime. (current time - start time) """ + @property def heartbeat_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Timestamp of this heartbeat, coming from the worker. Worker should set it to "now". Note that this timestamp comes directly from the worker and is subject to workers' clock skew. """ + @property def elapsed_since_last_heartbeat(self) -> google.protobuf.duration_pb2.Duration: """Elapsed time since the last heartbeat from the worker.""" + @property def workflow_task_slots_info(self) -> global___WorkerSlotsInfo: ... @property @@ -268,12 +292,6 @@ class WorkerHeartbeat(google.protobuf.message.Message): def activity_poller_info(self) -> global___WorkerPollerInfo: ... @property def nexus_poller_info(self) -> global___WorkerPollerInfo: ... - total_sticky_cache_hit: builtins.int - """A Workflow Task found a cached Workflow Execution to run against.""" - total_sticky_cache_miss: builtins.int - """A Workflow Task did not find a cached Workflow execution to run against.""" - current_sticky_cache_size: builtins.int - """Current cache size, expressed in number of Workflow Executions.""" @property def plugins( self, @@ -281,6 +299,19 @@ class WorkerHeartbeat(google.protobuf.message.Message): global___PluginInfo ]: """Plugins currently in use by this SDK.""" + + @property + def drivers( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___StorageDriverInfo + ]: + """Storage drivers in use by this SDK.""" + + @property + def environment(self) -> global___EnvironmentInfo: + """Information about the environment this SDK is running in.""" + def __init__( self, *, @@ -309,10 +340,12 @@ class WorkerHeartbeat(google.protobuf.message.Message): total_sticky_cache_miss: builtins.int = ..., current_sticky_cache_size: builtins.int = ..., plugins: collections.abc.Iterable[global___PluginInfo] | None = ..., + drivers: collections.abc.Iterable[global___StorageDriverInfo] | None = ..., + environment: global___EnvironmentInfo | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_poller_info", b"activity_poller_info", "activity_task_slots_info", @@ -321,6 +354,8 @@ class WorkerHeartbeat(google.protobuf.message.Message): b"deployment_version", "elapsed_since_last_heartbeat", b"elapsed_since_last_heartbeat", + "environment", + b"environment", "heartbeat_time", b"heartbeat_time", "host_info", @@ -343,7 +378,7 @@ class WorkerHeartbeat(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_poller_info", b"activity_poller_info", "activity_task_slots_info", @@ -352,8 +387,12 @@ class WorkerHeartbeat(google.protobuf.message.Message): b"current_sticky_cache_size", "deployment_version", b"deployment_version", + "drivers", + b"drivers", "elapsed_since_last_heartbeat", b"elapsed_since_last_heartbeat", + "environment", + b"environment", "heartbeat_time", b"heartbeat_time", "host_info", @@ -395,7 +434,10 @@ class WorkerHeartbeat(google.protobuf.message.Message): global___WorkerHeartbeat = WorkerHeartbeat +@typing.final class WorkerInfo(google.protobuf.message.Message): + """Detailed worker information.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor WORKER_HEARTBEAT_FIELD_NUMBER: builtins.int @@ -407,16 +449,145 @@ class WorkerInfo(google.protobuf.message.Message): worker_heartbeat: global___WorkerHeartbeat | None = ..., ) -> None: ... def HasField( + self, field_name: typing.Literal["worker_heartbeat", b"worker_heartbeat"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["worker_heartbeat", b"worker_heartbeat"] + ) -> None: ... + +global___WorkerInfo = WorkerInfo + +@typing.final +class WorkerListInfo(google.protobuf.message.Message): + """Limited worker information returned in the list response. + When adding fields here, ensure that it is also added to WorkerInfo (as it carries the full worker information). + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + WORKER_INSTANCE_KEY_FIELD_NUMBER: builtins.int + WORKER_IDENTITY_FIELD_NUMBER: builtins.int + TASK_QUEUE_FIELD_NUMBER: builtins.int + DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int + SDK_NAME_FIELD_NUMBER: builtins.int + SDK_VERSION_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: builtins.int + START_TIME_FIELD_NUMBER: builtins.int + HOST_NAME_FIELD_NUMBER: builtins.int + WORKER_GROUPING_KEY_FIELD_NUMBER: builtins.int + PROCESS_ID_FIELD_NUMBER: builtins.int + PLUGINS_FIELD_NUMBER: builtins.int + DRIVERS_FIELD_NUMBER: builtins.int + worker_instance_key: builtins.str + """Worker identifier, should be unique for the namespace. + It is distinct from worker identity, which is not necessarily namespace-unique. + """ + worker_identity: builtins.str + """Worker identity, set by the client, may not be unique. + Usually host_name+(user group name)+process_id, but can be overwritten by the user. + """ + task_queue: builtins.str + """Task queue this worker is polling for tasks.""" + sdk_name: builtins.str + sdk_version: builtins.str + status: temporalio.api.enums.v1.common_pb2.WorkerStatus.ValueType + """Worker status. Defined by SDK.""" + host_name: builtins.str + """Worker host identifier.""" + worker_grouping_key: builtins.str + """Worker grouping identifier. A key to group workers that share the same client+namespace+process. + This will be used to build the worker command nexus task queue name: + "temporal-sys/worker-commands/{worker_grouping_key}" + """ + process_id: builtins.str + """Worker process identifier. This id only needs to be unique + within one host (so using e.g. a unix pid would be appropriate). + """ + @property + def deployment_version( + self, + ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: ... + @property + def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Worker start time. + It can be used to determine worker uptime. (current time - start time) + """ + + @property + def plugins( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___PluginInfo + ]: + """Plugins currently in use by this SDK.""" + + @property + def drivers( self, - field_name: typing_extensions.Literal["worker_heartbeat", b"worker_heartbeat"], + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___StorageDriverInfo + ]: + """Storage drivers in use by this SDK.""" + + def __init__( + self, + *, + worker_instance_key: builtins.str = ..., + worker_identity: builtins.str = ..., + task_queue: builtins.str = ..., + deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion + | None = ..., + sdk_name: builtins.str = ..., + sdk_version: builtins.str = ..., + status: temporalio.api.enums.v1.common_pb2.WorkerStatus.ValueType = ..., + start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + host_name: builtins.str = ..., + worker_grouping_key: builtins.str = ..., + process_id: builtins.str = ..., + plugins: collections.abc.Iterable[global___PluginInfo] | None = ..., + drivers: collections.abc.Iterable[global___StorageDriverInfo] | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "deployment_version", b"deployment_version", "start_time", b"start_time" + ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal["worker_heartbeat", b"worker_heartbeat"], + field_name: typing.Literal[ + "deployment_version", + b"deployment_version", + "drivers", + b"drivers", + "host_name", + b"host_name", + "plugins", + b"plugins", + "process_id", + b"process_id", + "sdk_name", + b"sdk_name", + "sdk_version", + b"sdk_version", + "start_time", + b"start_time", + "status", + b"status", + "task_queue", + b"task_queue", + "worker_grouping_key", + b"worker_grouping_key", + "worker_identity", + b"worker_identity", + "worker_instance_key", + b"worker_instance_key", + ], ) -> None: ... -global___WorkerInfo = WorkerInfo +global___WorkerListInfo = WorkerListInfo +@typing.final class PluginInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -433,8 +604,572 @@ class PluginInfo(google.protobuf.message.Message): version: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["name", b"name", "version", b"version"], + self, field_name: typing.Literal["name", b"name", "version", b"version"] ) -> None: ... global___PluginInfo = PluginInfo + +@typing.final +class StorageDriverInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + type: builtins.str + """The type of the driver, required.""" + def __init__( + self, + *, + type: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["type", b"type"]) -> None: ... + +global___StorageDriverInfo = StorageDriverInfo + +@typing.final +class EnvironmentInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Architecture: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ArchitectureEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + EnvironmentInfo._Architecture.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + ARCHITECTURE_UNSPECIFIED: EnvironmentInfo._Architecture.ValueType # 0 + ARCHITECTURE_AMD64: EnvironmentInfo._Architecture.ValueType # 1 + ARCHITECTURE_ARM64: EnvironmentInfo._Architecture.ValueType # 2 + + class Architecture(_Architecture, metaclass=_ArchitectureEnumTypeWrapper): ... + ARCHITECTURE_UNSPECIFIED: EnvironmentInfo.Architecture.ValueType # 0 + ARCHITECTURE_AMD64: EnvironmentInfo.Architecture.ValueType # 1 + ARCHITECTURE_ARM64: EnvironmentInfo.Architecture.ValueType # 2 + + @typing.final + class Runtime(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _RuntimeType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _RuntimeTypeEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + EnvironmentInfo.Runtime._RuntimeType.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + RUNTIME_TYPE_UNSPECIFIED: ( + EnvironmentInfo.Runtime._RuntimeType.ValueType + ) # 0 + """Should never actually be set, exists to follow convention of having a default. + SDKs should just leave `runtimes` empty if none can be determined. + """ + RUNTIME_TYPE_JVM: EnvironmentInfo.Runtime._RuntimeType.ValueType # 1 + RUNTIME_TYPE_CPYTHON: EnvironmentInfo.Runtime._RuntimeType.ValueType # 2 + RUNTIME_TYPE_NODE: EnvironmentInfo.Runtime._RuntimeType.ValueType # 3 + RUNTIME_TYPE_BUN: EnvironmentInfo.Runtime._RuntimeType.ValueType # 4 + RUNTIME_TYPE_CRUBY: EnvironmentInfo.Runtime._RuntimeType.ValueType # 5 + RUNTIME_TYPE_GO: EnvironmentInfo.Runtime._RuntimeType.ValueType # 6 + RUNTIME_TYPE_DOTNET_FRAMEWORK: ( + EnvironmentInfo.Runtime._RuntimeType.ValueType + ) # 7 + RUNTIME_TYPE_DOTNET_CORE: ( + EnvironmentInfo.Runtime._RuntimeType.ValueType + ) # 8 + RUNTIME_TYPE_NATIVE: EnvironmentInfo.Runtime._RuntimeType.ValueType # 9 + RUNTIME_TYPE_ROADRUNNER: ( + EnvironmentInfo.Runtime._RuntimeType.ValueType + ) # 10 + RUNTIME_TYPE_GRAAL_AOT: EnvironmentInfo.Runtime._RuntimeType.ValueType # 11 + """Report when the application is compiled ahead-of-time as a GraalVM native image.""" + RUNTIME_TYPE_KOTLIN: EnvironmentInfo.Runtime._RuntimeType.ValueType # 12 + """Report when any registered Workflow or Activity implementation is a Kotlin class.""" + + class RuntimeType(_RuntimeType, metaclass=_RuntimeTypeEnumTypeWrapper): ... + RUNTIME_TYPE_UNSPECIFIED: EnvironmentInfo.Runtime.RuntimeType.ValueType # 0 + """Should never actually be set, exists to follow convention of having a default. + SDKs should just leave `runtimes` empty if none can be determined. + """ + RUNTIME_TYPE_JVM: EnvironmentInfo.Runtime.RuntimeType.ValueType # 1 + RUNTIME_TYPE_CPYTHON: EnvironmentInfo.Runtime.RuntimeType.ValueType # 2 + RUNTIME_TYPE_NODE: EnvironmentInfo.Runtime.RuntimeType.ValueType # 3 + RUNTIME_TYPE_BUN: EnvironmentInfo.Runtime.RuntimeType.ValueType # 4 + RUNTIME_TYPE_CRUBY: EnvironmentInfo.Runtime.RuntimeType.ValueType # 5 + RUNTIME_TYPE_GO: EnvironmentInfo.Runtime.RuntimeType.ValueType # 6 + RUNTIME_TYPE_DOTNET_FRAMEWORK: ( + EnvironmentInfo.Runtime.RuntimeType.ValueType + ) # 7 + RUNTIME_TYPE_DOTNET_CORE: EnvironmentInfo.Runtime.RuntimeType.ValueType # 8 + RUNTIME_TYPE_NATIVE: EnvironmentInfo.Runtime.RuntimeType.ValueType # 9 + RUNTIME_TYPE_ROADRUNNER: EnvironmentInfo.Runtime.RuntimeType.ValueType # 10 + RUNTIME_TYPE_GRAAL_AOT: EnvironmentInfo.Runtime.RuntimeType.ValueType # 11 + """Report when the application is compiled ahead-of-time as a GraalVM native image.""" + RUNTIME_TYPE_KOTLIN: EnvironmentInfo.Runtime.RuntimeType.ValueType # 12 + """Report when any registered Workflow or Activity implementation is a Kotlin class.""" + + TYPE_FIELD_NUMBER: builtins.int + VERSION_FIELD_NUMBER: builtins.int + type: global___EnvironmentInfo.Runtime.RuntimeType.ValueType + """The type of the runtime.""" + version: builtins.str + """The version of the runtime, if obtainable.""" + def __init__( + self, + *, + type: global___EnvironmentInfo.Runtime.RuntimeType.ValueType = ..., + version: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["type", b"type", "version", b"version"] + ) -> None: ... + + @typing.final + class HostingEnvironment(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _HostingEnvironmentType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _HostingEnvironmentTypeEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + HOSTING_ENVIRONMENT_TYPE_UNSPECIFIED: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 0 + """Should never actually be set, exists to follow convention of having a default. + SDKs should just leave `hosting_environments` empty if none can be determined. + """ + HOSTING_ENVIRONMENT_TYPE_DOCKER: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 1 + """Should always be in the list if we're running inside a docker container""" + HOSTING_ENVIRONMENT_TYPE_K8S: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 2 + """Should always be in the list if we're running inside any k8s environment""" + HOSTING_ENVIRONMENT_TYPE_AWS_LAMBDA: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 3 + """Detect via `AWS_LAMBDA_FUNCTION_NAME`""" + HOSTING_ENVIRONMENT_TYPE_AWS_ECS: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 4 + """Detect via `ECS_CONTAINER_METADATA_URI_V4` or `ECS_CONTAINER_METADATA_URI`""" + HOSTING_ENVIRONMENT_TYPE_GOOGLE_CLOUD_RUN: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 6 + """Detect via `K_SERVICE`""" + HOSTING_ENVIRONMENT_TYPE_GOOGLE_APP_ENGINE: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 7 + """Detect via `GAE_SERVICE`""" + HOSTING_ENVIRONMENT_TYPE_AZURE_APP_SERVICE: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 8 + """Detect via `WEBSITE_SITE_NAME`""" + HOSTING_ENVIRONMENT_TYPE_AZURE_FUNCTIONS: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 9 + """Detect via `FUNCTIONS_EXTENSION_VERSION`""" + HOSTING_ENVIRONMENT_TYPE_AZURE_CONTAINER_APPS: ( + EnvironmentInfo.HostingEnvironment._HostingEnvironmentType.ValueType + ) # 10 + """Detect via `CONTAINER_APP_NAME`""" + + class HostingEnvironmentType( + _HostingEnvironmentType, metaclass=_HostingEnvironmentTypeEnumTypeWrapper + ): + """What kind of hosting environment we're running in. This list is about what can actually be + detected reliably and is unrelated to what SDKs can actually run in. + """ + + HOSTING_ENVIRONMENT_TYPE_UNSPECIFIED: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 0 + """Should never actually be set, exists to follow convention of having a default. + SDKs should just leave `hosting_environments` empty if none can be determined. + """ + HOSTING_ENVIRONMENT_TYPE_DOCKER: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 1 + """Should always be in the list if we're running inside a docker container""" + HOSTING_ENVIRONMENT_TYPE_K8S: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 2 + """Should always be in the list if we're running inside any k8s environment""" + HOSTING_ENVIRONMENT_TYPE_AWS_LAMBDA: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 3 + """Detect via `AWS_LAMBDA_FUNCTION_NAME`""" + HOSTING_ENVIRONMENT_TYPE_AWS_ECS: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 4 + """Detect via `ECS_CONTAINER_METADATA_URI_V4` or `ECS_CONTAINER_METADATA_URI`""" + HOSTING_ENVIRONMENT_TYPE_GOOGLE_CLOUD_RUN: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 6 + """Detect via `K_SERVICE`""" + HOSTING_ENVIRONMENT_TYPE_GOOGLE_APP_ENGINE: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 7 + """Detect via `GAE_SERVICE`""" + HOSTING_ENVIRONMENT_TYPE_AZURE_APP_SERVICE: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 8 + """Detect via `WEBSITE_SITE_NAME`""" + HOSTING_ENVIRONMENT_TYPE_AZURE_FUNCTIONS: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 9 + """Detect via `FUNCTIONS_EXTENSION_VERSION`""" + HOSTING_ENVIRONMENT_TYPE_AZURE_CONTAINER_APPS: ( + EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) # 10 + """Detect via `CONTAINER_APP_NAME`""" + + TYPE_FIELD_NUMBER: builtins.int + VERSION_FIELD_NUMBER: builtins.int + type: ( + global___EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType + ) + """The type of hosting environment.""" + version: builtins.str + """The version of the hosting environment, if obtainable.""" + def __init__( + self, + *, + type: global___EnvironmentInfo.HostingEnvironment.HostingEnvironmentType.ValueType = ..., + version: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["type", b"type", "version", b"version"] + ) -> None: ... + + @typing.final + class Platform(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LINUX_FIELD_NUMBER: builtins.int + MACOS_FIELD_NUMBER: builtins.int + WINDOWS_FIELD_NUMBER: builtins.int + @property + def linux(self) -> global___EnvironmentInfo.LinuxPlatform: ... + @property + def macos(self) -> global___EnvironmentInfo.MacOSPlatform: ... + @property + def windows(self) -> global___EnvironmentInfo.WindowsPlatform: ... + def __init__( + self, + *, + linux: global___EnvironmentInfo.LinuxPlatform | None = ..., + macos: global___EnvironmentInfo.MacOSPlatform | None = ..., + windows: global___EnvironmentInfo.WindowsPlatform | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "linux", + b"linux", + "macos", + b"macos", + "variant", + b"variant", + "windows", + b"windows", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "linux", + b"linux", + "macos", + b"macos", + "variant", + b"variant", + "windows", + b"windows", + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["linux", "macos", "windows"] | None: ... + + @typing.final + class LinuxPlatform(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Libc: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _LibcEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + EnvironmentInfo.LinuxPlatform._Libc.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + LIBC_UNSPECIFIED: EnvironmentInfo.LinuxPlatform._Libc.ValueType # 0 + LIBC_GLIBC: EnvironmentInfo.LinuxPlatform._Libc.ValueType # 1 + LIBC_MUSL: EnvironmentInfo.LinuxPlatform._Libc.ValueType # 2 + + class Libc(_Libc, metaclass=_LibcEnumTypeWrapper): ... + LIBC_UNSPECIFIED: EnvironmentInfo.LinuxPlatform.Libc.ValueType # 0 + LIBC_GLIBC: EnvironmentInfo.LinuxPlatform.Libc.ValueType # 1 + LIBC_MUSL: EnvironmentInfo.LinuxPlatform.Libc.ValueType # 2 + + VERSION_FIELD_NUMBER: builtins.int + ARCHITECTURE_FIELD_NUMBER: builtins.int + LIBC_FIELD_NUMBER: builtins.int + version: builtins.str + """The Linux kernel or distribution version, if obtainable.""" + architecture: global___EnvironmentInfo.Architecture.ValueType + """The architecture of the worker process.""" + libc: global___EnvironmentInfo.LinuxPlatform.Libc.ValueType + """The libc used by the worker process.""" + def __init__( + self, + *, + version: builtins.str = ..., + architecture: global___EnvironmentInfo.Architecture.ValueType = ..., + libc: global___EnvironmentInfo.LinuxPlatform.Libc.ValueType = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "architecture", b"architecture", "libc", b"libc", "version", b"version" + ], + ) -> None: ... + + @typing.final + class MacOSPlatform(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + VERSION_FIELD_NUMBER: builtins.int + ARCHITECTURE_FIELD_NUMBER: builtins.int + version: builtins.str + """The macOS version, if obtainable.""" + architecture: global___EnvironmentInfo.Architecture.ValueType + """The architecture of the worker process.""" + def __init__( + self, + *, + version: builtins.str = ..., + architecture: global___EnvironmentInfo.Architecture.ValueType = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "architecture", b"architecture", "version", b"version" + ], + ) -> None: ... + + @typing.final + class WindowsPlatform(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Crt: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _CrtEnumTypeWrapper( + google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ + EnvironmentInfo.WindowsPlatform._Crt.ValueType + ], + builtins.type, + ): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + CRT_UNSPECIFIED: EnvironmentInfo.WindowsPlatform._Crt.ValueType # 0 + CRT_UCRT: EnvironmentInfo.WindowsPlatform._Crt.ValueType # 1 + CRT_MSVCRT: EnvironmentInfo.WindowsPlatform._Crt.ValueType # 2 + CRT_MINGW: EnvironmentInfo.WindowsPlatform._Crt.ValueType # 3 + CRT_CYGWIN: EnvironmentInfo.WindowsPlatform._Crt.ValueType # 4 + + class Crt(_Crt, metaclass=_CrtEnumTypeWrapper): ... + CRT_UNSPECIFIED: EnvironmentInfo.WindowsPlatform.Crt.ValueType # 0 + CRT_UCRT: EnvironmentInfo.WindowsPlatform.Crt.ValueType # 1 + CRT_MSVCRT: EnvironmentInfo.WindowsPlatform.Crt.ValueType # 2 + CRT_MINGW: EnvironmentInfo.WindowsPlatform.Crt.ValueType # 3 + CRT_CYGWIN: EnvironmentInfo.WindowsPlatform.Crt.ValueType # 4 + + VERSION_FIELD_NUMBER: builtins.int + ARCHITECTURE_FIELD_NUMBER: builtins.int + CRT_FIELD_NUMBER: builtins.int + version: builtins.str + """The Windows version, if obtainable.""" + architecture: global___EnvironmentInfo.Architecture.ValueType + """The architecture of the worker process.""" + crt: global___EnvironmentInfo.WindowsPlatform.Crt.ValueType + """The C runtime used by the worker process, if obtainable.""" + def __init__( + self, + *, + version: builtins.str = ..., + architecture: global___EnvironmentInfo.Architecture.ValueType = ..., + crt: global___EnvironmentInfo.WindowsPlatform.Crt.ValueType = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "architecture", b"architecture", "crt", b"crt", "version", b"version" + ], + ) -> None: ... + + RUNTIMES_FIELD_NUMBER: builtins.int + HOSTING_ENVIRONMENTS_FIELD_NUMBER: builtins.int + PLATFORM_FIELD_NUMBER: builtins.int + @property + def runtimes( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___EnvironmentInfo.Runtime + ]: + """The runtime(s) the SDK is operating in.""" + + @property + def hosting_environments( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___EnvironmentInfo.HostingEnvironment + ]: + """The hosting environment(s) the SDK is operating in. Repeated to allow for layering (ex: Docker inside k8s).""" + + @property + def platform(self) -> global___EnvironmentInfo.Platform: + """The platform the SDK is operating on.""" + + def __init__( + self, + *, + runtimes: collections.abc.Iterable[global___EnvironmentInfo.Runtime] + | None = ..., + hosting_environments: collections.abc.Iterable[ + global___EnvironmentInfo.HostingEnvironment + ] + | None = ..., + platform: global___EnvironmentInfo.Platform | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["platform", b"platform"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "hosting_environments", + b"hosting_environments", + "platform", + b"platform", + "runtimes", + b"runtimes", + ], + ) -> None: ... + +global___EnvironmentInfo = EnvironmentInfo + +@typing.final +class WorkerCommand(google.protobuf.message.Message): + """A command sent from the server to a worker.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CANCEL_ACTIVITY_FIELD_NUMBER: builtins.int + @property + def cancel_activity(self) -> global___CancelActivityCommand: ... + def __init__( + self, + *, + cancel_activity: global___CancelActivityCommand | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "cancel_activity", b"cancel_activity", "type", b"type" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "cancel_activity", b"cancel_activity", "type", b"type" + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["type", b"type"] + ) -> typing.Literal["cancel_activity"] | None: ... + +global___WorkerCommand = WorkerCommand + +@typing.final +class CancelActivityCommand(google.protobuf.message.Message): + """Cancel an activity if it is still running. Otherwise, do nothing.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TASK_TOKEN_FIELD_NUMBER: builtins.int + task_token: builtins.bytes + def __init__( + self, + *, + task_token: builtins.bytes = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["task_token", b"task_token"] + ) -> None: ... + +global___CancelActivityCommand = CancelActivityCommand + +@typing.final +class WorkerCommandResult(google.protobuf.message.Message): + """The result of executing a WorkerCommand.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CANCEL_ACTIVITY_FIELD_NUMBER: builtins.int + @property + def cancel_activity(self) -> global___CancelActivityResult: ... + def __init__( + self, + *, + cancel_activity: global___CancelActivityResult | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "cancel_activity", b"cancel_activity", "type", b"type" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "cancel_activity", b"cancel_activity", "type", b"type" + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["type", b"type"] + ) -> typing.Literal["cancel_activity"] | None: ... + +global___WorkerCommandResult = WorkerCommandResult + +@typing.final +class CancelActivityResult(google.protobuf.message.Message): + """Result of a CancelActivityCommand. + Treat both successful cancellation and no-op (activity is no longer running) as success. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___CancelActivityResult = CancelActivityResult diff --git a/temporalio/api/workflow/v1/__init__.py b/temporalio/api/workflow/v1/__init__.py index 30a251fa10..ae647ab673 100644 --- a/temporalio/api/workflow/v1/__init__.py +++ b/temporalio/api/workflow/v1/__init__.py @@ -18,6 +18,7 @@ WorkflowExecutionExtendedInfo, WorkflowExecutionInfo, WorkflowExecutionOptions, + WorkflowExecutionPauseInfo, WorkflowExecutionVersioningInfo, ) @@ -41,5 +42,6 @@ "WorkflowExecutionExtendedInfo", "WorkflowExecutionInfo", "WorkflowExecutionOptions", + "WorkflowExecutionPauseInfo", "WorkflowExecutionVersioningInfo", ] diff --git a/temporalio/api/workflow/v1/message_pb2.py b/temporalio/api/workflow/v1/message_pb2.py index c0ea1d636e..2cd0116c21 100644 --- a/temporalio/api/workflow/v1/message_pb2.py +++ b/temporalio/api/workflow/v1/message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -40,6 +39,9 @@ from temporalio.api.failure.v1 import ( message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, ) +from temporalio.api.nexus.v1 import ( + message_pb2 as temporal_dot_api_dot_nexus_dot_v1_dot_message__pb2, +) from temporalio.api.sdk.v1 import ( user_metadata_pb2 as temporal_dot_api_dot_sdk_dot_v1_dot_user__metadata__pb2, ) @@ -48,376 +50,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n&temporal/api/workflow/v1/message.proto\x12\x18temporal.api.workflow.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/protobuf/field_mask.proto\x1a&temporal/api/activity/v1/message.proto\x1a"temporal/api/enums/v1/common.proto\x1a&temporal/api/enums/v1/event_type.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto"\xab\t\n\x15WorkflowExecutionInfo\x12<\n\texecution\x18\x01 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x04type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x06status\x18\x05 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatus\x12\x16\n\x0ehistory_length\x18\x06 \x01(\x03\x12\x1b\n\x13parent_namespace_id\x18\x07 \x01(\t\x12\x43\n\x10parent_execution\x18\x08 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x0e\x65xecution_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x04memo\x18\n \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0b \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12@\n\x11\x61uto_reset_points\x18\x0c \x01(\x0b\x32%.temporal.api.workflow.v1.ResetPoints\x12\x12\n\ntask_queue\x18\r \x01(\t\x12\x1e\n\x16state_transition_count\x18\x0e \x01(\x03\x12\x1a\n\x12history_size_bytes\x18\x0f \x01(\x03\x12X\n most_recent_worker_version_stamp\x18\x10 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12\x35\n\x12\x65xecution_duration\x18\x11 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x41\n\x0eroot_execution\x18\x12 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1d\n\x11\x61ssigned_build_id\x18\x13 \x01(\tB\x02\x18\x01\x12\x1e\n\x12inherited_build_id\x18\x14 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x66irst_run_id\x18\x15 \x01(\t\x12R\n\x0fversioning_info\x18\x16 \x01(\x0b\x32\x39.temporal.api.workflow.v1.WorkflowExecutionVersioningInfo\x12\x1e\n\x16worker_deployment_name\x18\x17 \x01(\t\x12\x32\n\x08priority\x18\x18 \x01(\x0b\x32 .temporal.api.common.v1.Priority"\xfc\x03\n\x1dWorkflowExecutionExtendedInfo\x12=\n\x19\x65xecution_expiration_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13run_expiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10\x63\x61ncel_requested\x18\x03 \x01(\x08\x12\x33\n\x0flast_reset_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13original_start_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0creset_run_id\x18\x06 \x01(\t\x12\x65\n\x10request_id_infos\x18\x07 \x03(\x0b\x32K.temporal.api.workflow.v1.WorkflowExecutionExtendedInfo.RequestIdInfosEntry\x1a^\n\x13RequestIdInfosEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.temporal.api.workflow.v1.RequestIdInfo:\x02\x38\x01"\xf5\x03\n\x1fWorkflowExecutionVersioningInfo\x12;\n\x08\x62\x65havior\x18\x01 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehavior\x12>\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12\x13\n\x07version\x18\x05 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12I\n\x13versioning_override\x18\x03 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12Q\n\x15\x64\x65ployment_transition\x18\x04 \x01(\x0b\x32..temporal.api.workflow.v1.DeploymentTransitionB\x02\x18\x01\x12Q\n\x12version_transition\x18\x06 \x01(\x0b\x32\x35.temporal.api.workflow.v1.DeploymentVersionTransition"R\n\x14\x44\x65ploymentTransition\x12:\n\ndeployment\x18\x01 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment"\x83\x01\n\x1b\x44\x65ploymentVersionTransition\x12\x13\n\x07version\x18\x01 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x02 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion"\xc7\x02\n\x17WorkflowExecutionConfig\x12\x38\n\ntask_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12=\n\x1aworkflow_execution_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\x1d\x64\x65\x66\x61ult_workflow_task_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\ruser_metadata\x18\x05 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata"\xbd\r\n\x13PendingActivityInfo\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12;\n\ractivity_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12:\n\x05state\x18\x03 \x01(\x0e\x32+.temporal.api.enums.v1.PendingActivityState\x12;\n\x11heartbeat_details\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x13last_heartbeat_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_started_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x07 \x01(\x05\x12\x18\n\x10maximum_attempts\x18\x08 \x01(\x05\x12\x32\n\x0escheduled_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x0clast_failure\x18\x0b \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1c\n\x14last_worker_identity\x18\x0c \x01(\t\x12;\n\x15use_workflow_build_id\x18\r \x01(\x0b\x32\x16.google.protobuf.EmptyB\x02\x18\x01H\x00\x12\x32\n$last_independently_assigned_build_id\x18\x0e \x01(\tB\x02\x18\x01H\x00\x12Q\n\x19last_worker_version_stamp\x18\x0f \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12\x39\n\x16\x63urrent_retry_interval\x18\x10 \x01(\x0b\x32\x19.google.protobuf.Duration\x12>\n\x1alast_attempt_complete_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x1anext_attempt_schedule_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06paused\x18\x13 \x01(\x08\x12\x43\n\x0flast_deployment\x18\x14 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12*\n\x1elast_worker_deployment_version\x18\x15 \x01(\tB\x02\x18\x01\x12T\n\x17last_deployment_version\x18\x19 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x32\n\x08priority\x18\x16 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12K\n\npause_info\x18\x17 \x01(\x0b\x32\x37.temporal.api.workflow.v1.PendingActivityInfo.PauseInfo\x12\x43\n\x10\x61\x63tivity_options\x18\x18 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions\x1a\xcf\x02\n\tPauseInfo\x12.\n\npause_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12P\n\x06manual\x18\x02 \x01(\x0b\x32>.temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.ManualH\x00\x12L\n\x04rule\x18\x04 \x01(\x0b\x32<.temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.RuleH\x00\x1a*\n\x06Manual\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t\x1a\x39\n\x04Rule\x12\x0f\n\x07rule_id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\tB\x0b\n\tpaused_byB\x13\n\x11\x61ssigned_build_id"\xb9\x01\n\x19PendingChildExecutionInfo\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12\x1a\n\x12workflow_type_name\x18\x03 \x01(\t\x12\x14\n\x0cinitiated_id\x18\x04 \x01(\x03\x12\x45\n\x13parent_close_policy\x18\x05 \x01(\x0e\x32(.temporal.api.enums.v1.ParentClosePolicy"\x8d\x02\n\x17PendingWorkflowTaskInfo\x12>\n\x05state\x18\x01 \x01(\x0e\x32/.temporal.api.enums.v1.PendingWorkflowTaskState\x12\x32\n\x0escheduled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x17original_scheduled_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x05 \x01(\x05"G\n\x0bResetPoints\x12\x38\n\x06points\x18\x01 \x03(\x0b\x32(.temporal.api.workflow.v1.ResetPointInfo"\xef\x01\n\x0eResetPointInfo\x12\x10\n\x08\x62uild_id\x18\x07 \x01(\t\x12\x1b\n\x0f\x62inary_checksum\x18\x01 \x01(\tB\x02\x18\x01\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12(\n first_workflow_task_completed_id\x18\x03 \x01(\x03\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nresettable\x18\x06 \x01(\x08"\x85\x07\n\x18NewWorkflowExecutionInfo\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12;\n\rworkflow_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x03 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12N\n\x18workflow_id_reuse_policy\x18\x08 \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\t \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\n \x01(\t\x12*\n\x04memo\x18\x0b \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0c \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\r \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x38\n\ruser_metadata\x18\x0e \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12I\n\x13versioning_override\x18\x0f \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12\x32\n\x08priority\x18\x10 \x01(\x0b\x32 .temporal.api.common.v1.Priority"\xd2\x04\n\x0c\x43\x61llbackInfo\x12\x32\n\x08\x63\x61llback\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Callback\x12?\n\x07trigger\x18\x02 \x01(\x0b\x32..temporal.api.workflow.v1.CallbackInfo.Trigger\x12\x35\n\x11registration_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x05state\x18\x04 \x01(\x0e\x32$.temporal.api.enums.v1.CallbackState\x12\x0f\n\x07\x61ttempt\x18\x05 \x01(\x05\x12>\n\x1alast_attempt_complete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x14last_attempt_failure\x18\x07 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12>\n\x1anext_attempt_schedule_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0e\x62locked_reason\x18\t \x01(\t\x1a\x10\n\x0eWorkflowClosed\x1a\x66\n\x07Trigger\x12P\n\x0fworkflow_closed\x18\x01 \x01(\x0b\x32\x35.temporal.api.workflow.v1.CallbackInfo.WorkflowClosedH\x00\x42\t\n\x07variant"\x92\x05\n\x19PendingNexusOperationInfo\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x11\n\toperation\x18\x03 \x01(\t\x12\x18\n\x0coperation_id\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x19schedule_to_close_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0escheduled_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x05state\x18\x07 \x01(\x0e\x32\x31.temporal.api.enums.v1.PendingNexusOperationState\x12\x0f\n\x07\x61ttempt\x18\x08 \x01(\x05\x12>\n\x1alast_attempt_complete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x14last_attempt_failure\x18\n \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12>\n\x1anext_attempt_schedule_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12S\n\x11\x63\x61ncellation_info\x18\x0c \x01(\x0b\x32\x38.temporal.api.workflow.v1.NexusOperationCancellationInfo\x12\x1a\n\x12scheduled_event_id\x18\r \x01(\x03\x12\x16\n\x0e\x62locked_reason\x18\x0e \x01(\t\x12\x17\n\x0foperation_token\x18\x0f \x01(\t"\x84\x03\n\x1eNexusOperationCancellationInfo\x12\x32\n\x0erequested_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\x05state\x18\x02 \x01(\x0e\x32\x36.temporal.api.enums.v1.NexusOperationCancellationState\x12\x0f\n\x07\x61ttempt\x18\x03 \x01(\x05\x12>\n\x1alast_attempt_complete_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x14last_attempt_failure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12>\n\x1anext_attempt_schedule_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0e\x62locked_reason\x18\x07 \x01(\t"e\n\x18WorkflowExecutionOptions\x12I\n\x13versioning_override\x18\x01 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride"\xbd\x04\n\x12VersioningOverride\x12M\n\x06pinned\x18\x03 \x01(\x0b\x32;.temporal.api.workflow.v1.VersioningOverride.PinnedOverrideH\x00\x12\x16\n\x0c\x61uto_upgrade\x18\x04 \x01(\x08H\x00\x12?\n\x08\x62\x65havior\x18\x01 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehaviorB\x02\x18\x01\x12>\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12\x1a\n\x0epinned_version\x18\t \x01(\tB\x02\x18\x01\x1a\xad\x01\n\x0ePinnedOverride\x12U\n\x08\x62\x65havior\x18\x01 \x01(\x0e\x32\x43.temporal.api.workflow.v1.VersioningOverride.PinnedOverrideBehavior\x12\x44\n\x07version\x18\x02 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion"g\n\x16PinnedOverrideBehavior\x12(\n$PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED\x10\x00\x12#\n\x1fPINNED_OVERRIDE_BEHAVIOR_PINNED\x10\x01\x42\n\n\x08override"i\n\x11OnConflictOptions\x12\x19\n\x11\x61ttach_request_id\x18\x01 \x01(\x08\x12#\n\x1b\x61ttach_completion_callbacks\x18\x02 \x01(\x08\x12\x14\n\x0c\x61ttach_links\x18\x03 \x01(\x08"i\n\rRequestIdInfo\x12\x34\n\nevent_type\x18\x01 \x01(\x0e\x32 .temporal.api.enums.v1.EventType\x12\x10\n\x08\x65vent_id\x18\x02 \x01(\x03\x12\x10\n\x08\x62uffered\x18\x03 \x01(\x08"\xb7\x04\n\x12PostResetOperation\x12V\n\x0fsignal_workflow\x18\x01 \x01(\x0b\x32;.temporal.api.workflow.v1.PostResetOperation.SignalWorkflowH\x00\x12\x65\n\x17update_workflow_options\x18\x02 \x01(\x0b\x32\x42.temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptionsH\x00\x1a\xb3\x01\n\x0eSignalWorkflow\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12/\n\x05input\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12+\n\x05links\x18\x04 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x1a\xa0\x01\n\x15UpdateWorkflowOptions\x12V\n\x1aworkflow_execution_options\x18\x01 \x01(\x0b\x32\x32.temporal.api.workflow.v1.WorkflowExecutionOptions\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\t\n\x07variantB\x93\x01\n\x1bio.temporal.api.workflow.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/workflow/v1;workflow\xaa\x02\x1aTemporalio.Api.Workflow.V1\xea\x02\x1dTemporalio::Api::Workflow::V1b\x06proto3' -) - - -_WORKFLOWEXECUTIONINFO = DESCRIPTOR.message_types_by_name["WorkflowExecutionInfo"] -_WORKFLOWEXECUTIONEXTENDEDINFO = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionExtendedInfo" -] -_WORKFLOWEXECUTIONEXTENDEDINFO_REQUESTIDINFOSENTRY = ( - _WORKFLOWEXECUTIONEXTENDEDINFO.nested_types_by_name["RequestIdInfosEntry"] -) -_WORKFLOWEXECUTIONVERSIONINGINFO = DESCRIPTOR.message_types_by_name[ - "WorkflowExecutionVersioningInfo" -] -_DEPLOYMENTTRANSITION = DESCRIPTOR.message_types_by_name["DeploymentTransition"] -_DEPLOYMENTVERSIONTRANSITION = DESCRIPTOR.message_types_by_name[ - "DeploymentVersionTransition" -] -_WORKFLOWEXECUTIONCONFIG = DESCRIPTOR.message_types_by_name["WorkflowExecutionConfig"] -_PENDINGACTIVITYINFO = DESCRIPTOR.message_types_by_name["PendingActivityInfo"] -_PENDINGACTIVITYINFO_PAUSEINFO = _PENDINGACTIVITYINFO.nested_types_by_name["PauseInfo"] -_PENDINGACTIVITYINFO_PAUSEINFO_MANUAL = ( - _PENDINGACTIVITYINFO_PAUSEINFO.nested_types_by_name["Manual"] -) -_PENDINGACTIVITYINFO_PAUSEINFO_RULE = ( - _PENDINGACTIVITYINFO_PAUSEINFO.nested_types_by_name["Rule"] -) -_PENDINGCHILDEXECUTIONINFO = DESCRIPTOR.message_types_by_name[ - "PendingChildExecutionInfo" -] -_PENDINGWORKFLOWTASKINFO = DESCRIPTOR.message_types_by_name["PendingWorkflowTaskInfo"] -_RESETPOINTS = DESCRIPTOR.message_types_by_name["ResetPoints"] -_RESETPOINTINFO = DESCRIPTOR.message_types_by_name["ResetPointInfo"] -_NEWWORKFLOWEXECUTIONINFO = DESCRIPTOR.message_types_by_name["NewWorkflowExecutionInfo"] -_CALLBACKINFO = DESCRIPTOR.message_types_by_name["CallbackInfo"] -_CALLBACKINFO_WORKFLOWCLOSED = _CALLBACKINFO.nested_types_by_name["WorkflowClosed"] -_CALLBACKINFO_TRIGGER = _CALLBACKINFO.nested_types_by_name["Trigger"] -_PENDINGNEXUSOPERATIONINFO = DESCRIPTOR.message_types_by_name[ - "PendingNexusOperationInfo" -] -_NEXUSOPERATIONCANCELLATIONINFO = DESCRIPTOR.message_types_by_name[ - "NexusOperationCancellationInfo" -] -_WORKFLOWEXECUTIONOPTIONS = DESCRIPTOR.message_types_by_name["WorkflowExecutionOptions"] -_VERSIONINGOVERRIDE = DESCRIPTOR.message_types_by_name["VersioningOverride"] -_VERSIONINGOVERRIDE_PINNEDOVERRIDE = _VERSIONINGOVERRIDE.nested_types_by_name[ - "PinnedOverride" -] -_ONCONFLICTOPTIONS = DESCRIPTOR.message_types_by_name["OnConflictOptions"] -_REQUESTIDINFO = DESCRIPTOR.message_types_by_name["RequestIdInfo"] -_POSTRESETOPERATION = DESCRIPTOR.message_types_by_name["PostResetOperation"] -_POSTRESETOPERATION_SIGNALWORKFLOW = _POSTRESETOPERATION.nested_types_by_name[ - "SignalWorkflow" -] -_POSTRESETOPERATION_UPDATEWORKFLOWOPTIONS = _POSTRESETOPERATION.nested_types_by_name[ - "UpdateWorkflowOptions" -] -_VERSIONINGOVERRIDE_PINNEDOVERRIDEBEHAVIOR = _VERSIONINGOVERRIDE.enum_types_by_name[ - "PinnedOverrideBehavior" -] -WorkflowExecutionInfo = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionInfo", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.WorkflowExecutionInfo) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionInfo) - -WorkflowExecutionExtendedInfo = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionExtendedInfo", - (_message.Message,), - { - "RequestIdInfosEntry": _reflection.GeneratedProtocolMessageType( - "RequestIdInfosEntry", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONEXTENDEDINFO_REQUESTIDINFOSENTRY, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.WorkflowExecutionExtendedInfo.RequestIdInfosEntry) - }, - ), - "DESCRIPTOR": _WORKFLOWEXECUTIONEXTENDEDINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.WorkflowExecutionExtendedInfo) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionExtendedInfo) -_sym_db.RegisterMessage(WorkflowExecutionExtendedInfo.RequestIdInfosEntry) - -WorkflowExecutionVersioningInfo = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionVersioningInfo", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONVERSIONINGINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.WorkflowExecutionVersioningInfo) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionVersioningInfo) - -DeploymentTransition = _reflection.GeneratedProtocolMessageType( - "DeploymentTransition", - (_message.Message,), - { - "DESCRIPTOR": _DEPLOYMENTTRANSITION, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.DeploymentTransition) - }, -) -_sym_db.RegisterMessage(DeploymentTransition) - -DeploymentVersionTransition = _reflection.GeneratedProtocolMessageType( - "DeploymentVersionTransition", - (_message.Message,), - { - "DESCRIPTOR": _DEPLOYMENTVERSIONTRANSITION, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.DeploymentVersionTransition) - }, -) -_sym_db.RegisterMessage(DeploymentVersionTransition) - -WorkflowExecutionConfig = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionConfig", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONCONFIG, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.WorkflowExecutionConfig) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionConfig) - -PendingActivityInfo = _reflection.GeneratedProtocolMessageType( - "PendingActivityInfo", - (_message.Message,), - { - "PauseInfo": _reflection.GeneratedProtocolMessageType( - "PauseInfo", - (_message.Message,), - { - "Manual": _reflection.GeneratedProtocolMessageType( - "Manual", - (_message.Message,), - { - "DESCRIPTOR": _PENDINGACTIVITYINFO_PAUSEINFO_MANUAL, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Manual) - }, - ), - "Rule": _reflection.GeneratedProtocolMessageType( - "Rule", - (_message.Message,), - { - "DESCRIPTOR": _PENDINGACTIVITYINFO_PAUSEINFO_RULE, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.Rule) - }, - ), - "DESCRIPTOR": _PENDINGACTIVITYINFO_PAUSEINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PendingActivityInfo.PauseInfo) - }, - ), - "DESCRIPTOR": _PENDINGACTIVITYINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PendingActivityInfo) - }, -) -_sym_db.RegisterMessage(PendingActivityInfo) -_sym_db.RegisterMessage(PendingActivityInfo.PauseInfo) -_sym_db.RegisterMessage(PendingActivityInfo.PauseInfo.Manual) -_sym_db.RegisterMessage(PendingActivityInfo.PauseInfo.Rule) - -PendingChildExecutionInfo = _reflection.GeneratedProtocolMessageType( - "PendingChildExecutionInfo", - (_message.Message,), - { - "DESCRIPTOR": _PENDINGCHILDEXECUTIONINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PendingChildExecutionInfo) - }, -) -_sym_db.RegisterMessage(PendingChildExecutionInfo) - -PendingWorkflowTaskInfo = _reflection.GeneratedProtocolMessageType( - "PendingWorkflowTaskInfo", - (_message.Message,), - { - "DESCRIPTOR": _PENDINGWORKFLOWTASKINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PendingWorkflowTaskInfo) - }, -) -_sym_db.RegisterMessage(PendingWorkflowTaskInfo) - -ResetPoints = _reflection.GeneratedProtocolMessageType( - "ResetPoints", - (_message.Message,), - { - "DESCRIPTOR": _RESETPOINTS, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.ResetPoints) - }, -) -_sym_db.RegisterMessage(ResetPoints) - -ResetPointInfo = _reflection.GeneratedProtocolMessageType( - "ResetPointInfo", - (_message.Message,), - { - "DESCRIPTOR": _RESETPOINTINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.ResetPointInfo) - }, -) -_sym_db.RegisterMessage(ResetPointInfo) - -NewWorkflowExecutionInfo = _reflection.GeneratedProtocolMessageType( - "NewWorkflowExecutionInfo", - (_message.Message,), - { - "DESCRIPTOR": _NEWWORKFLOWEXECUTIONINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.NewWorkflowExecutionInfo) - }, -) -_sym_db.RegisterMessage(NewWorkflowExecutionInfo) - -CallbackInfo = _reflection.GeneratedProtocolMessageType( - "CallbackInfo", - (_message.Message,), - { - "WorkflowClosed": _reflection.GeneratedProtocolMessageType( - "WorkflowClosed", - (_message.Message,), - { - "DESCRIPTOR": _CALLBACKINFO_WORKFLOWCLOSED, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.CallbackInfo.WorkflowClosed) - }, - ), - "Trigger": _reflection.GeneratedProtocolMessageType( - "Trigger", - (_message.Message,), - { - "DESCRIPTOR": _CALLBACKINFO_TRIGGER, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.CallbackInfo.Trigger) - }, - ), - "DESCRIPTOR": _CALLBACKINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.CallbackInfo) - }, -) -_sym_db.RegisterMessage(CallbackInfo) -_sym_db.RegisterMessage(CallbackInfo.WorkflowClosed) -_sym_db.RegisterMessage(CallbackInfo.Trigger) - -PendingNexusOperationInfo = _reflection.GeneratedProtocolMessageType( - "PendingNexusOperationInfo", - (_message.Message,), - { - "DESCRIPTOR": _PENDINGNEXUSOPERATIONINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PendingNexusOperationInfo) - }, -) -_sym_db.RegisterMessage(PendingNexusOperationInfo) - -NexusOperationCancellationInfo = _reflection.GeneratedProtocolMessageType( - "NexusOperationCancellationInfo", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONCANCELLATIONINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.NexusOperationCancellationInfo) - }, -) -_sym_db.RegisterMessage(NexusOperationCancellationInfo) - -WorkflowExecutionOptions = _reflection.GeneratedProtocolMessageType( - "WorkflowExecutionOptions", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWEXECUTIONOPTIONS, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.WorkflowExecutionOptions) - }, -) -_sym_db.RegisterMessage(WorkflowExecutionOptions) - -VersioningOverride = _reflection.GeneratedProtocolMessageType( - "VersioningOverride", - (_message.Message,), - { - "PinnedOverride": _reflection.GeneratedProtocolMessageType( - "PinnedOverride", - (_message.Message,), - { - "DESCRIPTOR": _VERSIONINGOVERRIDE_PINNEDOVERRIDE, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.VersioningOverride.PinnedOverride) - }, - ), - "DESCRIPTOR": _VERSIONINGOVERRIDE, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.VersioningOverride) - }, -) -_sym_db.RegisterMessage(VersioningOverride) -_sym_db.RegisterMessage(VersioningOverride.PinnedOverride) - -OnConflictOptions = _reflection.GeneratedProtocolMessageType( - "OnConflictOptions", - (_message.Message,), - { - "DESCRIPTOR": _ONCONFLICTOPTIONS, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.OnConflictOptions) - }, -) -_sym_db.RegisterMessage(OnConflictOptions) - -RequestIdInfo = _reflection.GeneratedProtocolMessageType( - "RequestIdInfo", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTIDINFO, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.RequestIdInfo) - }, -) -_sym_db.RegisterMessage(RequestIdInfo) - -PostResetOperation = _reflection.GeneratedProtocolMessageType( - "PostResetOperation", - (_message.Message,), - { - "SignalWorkflow": _reflection.GeneratedProtocolMessageType( - "SignalWorkflow", - (_message.Message,), - { - "DESCRIPTOR": _POSTRESETOPERATION_SIGNALWORKFLOW, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PostResetOperation.SignalWorkflow) - }, - ), - "UpdateWorkflowOptions": _reflection.GeneratedProtocolMessageType( - "UpdateWorkflowOptions", - (_message.Message,), - { - "DESCRIPTOR": _POSTRESETOPERATION_UPDATEWORKFLOWOPTIONS, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions) - }, - ), - "DESCRIPTOR": _POSTRESETOPERATION, - "__module__": "temporalio.api.workflow.v1.message_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflow.v1.PostResetOperation) - }, + b'\n&temporal/api/workflow/v1/message.proto\x12\x18temporal.api.workflow.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/protobuf/field_mask.proto\x1a&temporal/api/activity/v1/message.proto\x1a"temporal/api/enums/v1/common.proto\x1a&temporal/api/enums/v1/event_type.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a#temporal/api/nexus/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto"\xf0\t\n\x15WorkflowExecutionInfo\x12<\n\texecution\x18\x01 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x04type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x06status\x18\x05 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatus\x12\x16\n\x0ehistory_length\x18\x06 \x01(\x03\x12\x1b\n\x13parent_namespace_id\x18\x07 \x01(\t\x12\x43\n\x10parent_execution\x18\x08 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x0e\x65xecution_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x04memo\x18\n \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0b \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12@\n\x11\x61uto_reset_points\x18\x0c \x01(\x0b\x32%.temporal.api.workflow.v1.ResetPoints\x12\x12\n\ntask_queue\x18\r \x01(\t\x12\x1e\n\x16state_transition_count\x18\x0e \x01(\x03\x12\x1a\n\x12history_size_bytes\x18\x0f \x01(\x03\x12X\n most_recent_worker_version_stamp\x18\x10 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12\x35\n\x12\x65xecution_duration\x18\x11 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x41\n\x0eroot_execution\x18\x12 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1d\n\x11\x61ssigned_build_id\x18\x13 \x01(\tB\x02\x18\x01\x12\x1e\n\x12inherited_build_id\x18\x14 \x01(\tB\x02\x18\x01\x12\x14\n\x0c\x66irst_run_id\x18\x15 \x01(\t\x12R\n\x0fversioning_info\x18\x16 \x01(\x0b\x32\x39.temporal.api.workflow.v1.WorkflowExecutionVersioningInfo\x12\x1e\n\x16worker_deployment_name\x18\x17 \x01(\t\x12\x32\n\x08priority\x18\x18 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12#\n\x1b\x65xternal_payload_size_bytes\x18\x19 \x01(\x03\x12\x1e\n\x16\x65xternal_payload_count\x18\x1a \x01(\x03"\xf3\x05\n\x1dWorkflowExecutionExtendedInfo\x12=\n\x19\x65xecution_expiration_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13run_expiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10\x63\x61ncel_requested\x18\x03 \x01(\x08\x12\x33\n\x0flast_reset_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13original_start_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0creset_run_id\x18\x06 \x01(\t\x12\x65\n\x10request_id_infos\x18\x07 \x03(\x0b\x32K.temporal.api.workflow.v1.WorkflowExecutionExtendedInfo.RequestIdInfosEntry\x12H\n\npause_info\x18\x08 \x01(\x0b\x32\x34.temporal.api.workflow.v1.WorkflowExecutionPauseInfo\x12\x44\n\x12time_skipping_info\x18\t \x01(\x0b\x32(.temporal.api.common.v1.TimeSkippingInfo\x12\x65\n&propagated_nexus_serialization_context\x18\n \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext\x1a^\n\x13RequestIdInfosEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.temporal.api.workflow.v1.RequestIdInfo:\x02\x38\x01"\xfb\x04\n\x1fWorkflowExecutionVersioningInfo\x12;\n\x08\x62\x65havior\x18\x01 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehavior\x12>\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12\x13\n\x07version\x18\x05 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12I\n\x13versioning_override\x18\x03 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12Q\n\x15\x64\x65ployment_transition\x18\x04 \x01(\x0b\x32..temporal.api.workflow.v1.DeploymentTransitionB\x02\x18\x01\x12Q\n\x12version_transition\x18\x06 \x01(\x0b\x32\x35.temporal.api.workflow.v1.DeploymentVersionTransition\x12\x17\n\x0frevision_number\x18\x08 \x01(\x03\x12k\n+continue_as_new_initial_versioning_behavior\x18\t \x01(\x0e\x32\x36.temporal.api.enums.v1.ContinueAsNewVersioningBehavior"R\n\x14\x44\x65ploymentTransition\x12:\n\ndeployment\x18\x01 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment"\x83\x01\n\x1b\x44\x65ploymentVersionTransition\x12\x13\n\x07version\x18\x01 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x02 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion"\xc7\x02\n\x17WorkflowExecutionConfig\x12\x38\n\ntask_queue\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12=\n\x1aworkflow_execution_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\x1d\x64\x65\x66\x61ult_workflow_task_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\ruser_metadata\x18\x05 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata"\xbd\r\n\x13PendingActivityInfo\x12\x13\n\x0b\x61\x63tivity_id\x18\x01 \x01(\t\x12;\n\ractivity_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12:\n\x05state\x18\x03 \x01(\x0e\x32+.temporal.api.enums.v1.PendingActivityState\x12;\n\x11heartbeat_details\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x13last_heartbeat_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11last_started_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x07 \x01(\x05\x12\x18\n\x10maximum_attempts\x18\x08 \x01(\x05\x12\x32\n\x0escheduled_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x65xpiration_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x0clast_failure\x18\x0b \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x1c\n\x14last_worker_identity\x18\x0c \x01(\t\x12;\n\x15use_workflow_build_id\x18\r \x01(\x0b\x32\x16.google.protobuf.EmptyB\x02\x18\x01H\x00\x12\x32\n$last_independently_assigned_build_id\x18\x0e \x01(\tB\x02\x18\x01H\x00\x12Q\n\x19last_worker_version_stamp\x18\x0f \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12\x39\n\x16\x63urrent_retry_interval\x18\x10 \x01(\x0b\x32\x19.google.protobuf.Duration\x12>\n\x1alast_attempt_complete_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x1anext_attempt_schedule_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06paused\x18\x13 \x01(\x08\x12\x43\n\x0flast_deployment\x18\x14 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12*\n\x1elast_worker_deployment_version\x18\x15 \x01(\tB\x02\x18\x01\x12T\n\x17last_deployment_version\x18\x19 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x32\n\x08priority\x18\x16 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12K\n\npause_info\x18\x17 \x01(\x0b\x32\x37.temporal.api.workflow.v1.PendingActivityInfo.PauseInfo\x12\x43\n\x10\x61\x63tivity_options\x18\x18 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions\x1a\xcf\x02\n\tPauseInfo\x12.\n\npause_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12P\n\x06manual\x18\x02 \x01(\x0b\x32>.temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.ManualH\x00\x12L\n\x04rule\x18\x04 \x01(\x0b\x32<.temporal.api.workflow.v1.PendingActivityInfo.PauseInfo.RuleH\x00\x1a*\n\x06Manual\x12\x10\n\x08identity\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t\x1a\x39\n\x04Rule\x12\x0f\n\x07rule_id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\tB\x0b\n\tpaused_byB\x13\n\x11\x61ssigned_build_id"\xb9\x01\n\x19PendingChildExecutionInfo\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12\x1a\n\x12workflow_type_name\x18\x03 \x01(\t\x12\x14\n\x0cinitiated_id\x18\x04 \x01(\x03\x12\x45\n\x13parent_close_policy\x18\x05 \x01(\x0e\x32(.temporal.api.enums.v1.ParentClosePolicy"\x8d\x02\n\x17PendingWorkflowTaskInfo\x12>\n\x05state\x18\x01 \x01(\x0e\x32/.temporal.api.enums.v1.PendingWorkflowTaskState\x12\x32\n\x0escheduled_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x17original_scheduled_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x05 \x01(\x05"G\n\x0bResetPoints\x12\x38\n\x06points\x18\x01 \x03(\x0b\x32(.temporal.api.workflow.v1.ResetPointInfo"\xef\x01\n\x0eResetPointInfo\x12\x10\n\x08\x62uild_id\x18\x07 \x01(\t\x12\x1b\n\x0f\x62inary_checksum\x18\x01 \x01(\tB\x02\x18\x01\x12\x0e\n\x06run_id\x18\x02 \x01(\t\x12(\n first_workflow_task_completed_id\x18\x03 \x01(\x03\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nresettable\x18\x06 \x01(\x08"\x85\x07\n\x18NewWorkflowExecutionInfo\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12;\n\rworkflow_type\x18\x02 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x03 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12N\n\x18workflow_id_reuse_policy\x18\x08 \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\t \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\n \x01(\t\x12*\n\x04memo\x18\x0b \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0c \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\r \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x38\n\ruser_metadata\x18\x0e \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12I\n\x13versioning_override\x18\x0f \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12\x32\n\x08priority\x18\x10 \x01(\x0b\x32 .temporal.api.common.v1.Priority"\x96\x06\n\x0c\x43\x61llbackInfo\x12\x32\n\x08\x63\x61llback\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Callback\x12?\n\x07trigger\x18\x02 \x01(\x0b\x32..temporal.api.workflow.v1.CallbackInfo.Trigger\x12\x35\n\x11registration_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x05state\x18\x04 \x01(\x0e\x32$.temporal.api.enums.v1.CallbackState\x12\x0f\n\x07\x61ttempt\x18\x05 \x01(\x05\x12>\n\x1alast_attempt_complete_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x14last_attempt_failure\x18\x07 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12>\n\x1anext_attempt_schedule_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0e\x62locked_reason\x18\t \x01(\t\x12\x12\n\nrequest_id\x18\n \x01(\t\x1a\x10\n\x0eWorkflowClosed\x1a\x35\n UpdateWorkflowExecutionCompleted\x12\x11\n\tupdate_id\x18\x01 \x01(\t\x1a\xde\x01\n\x07Trigger\x12P\n\x0fworkflow_closed\x18\x01 \x01(\x0b\x32\x35.temporal.api.workflow.v1.CallbackInfo.WorkflowClosedH\x00\x12v\n#update_workflow_execution_completed\x18\x02 \x01(\x0b\x32G.temporal.api.workflow.v1.CallbackInfo.UpdateWorkflowExecutionCompletedH\x00\x42\t\n\x07variant"\x8b\x06\n\x19PendingNexusOperationInfo\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x11\n\toperation\x18\x03 \x01(\t\x12\x18\n\x0coperation_id\x18\x04 \x01(\tB\x02\x18\x01\x12<\n\x19schedule_to_close_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0escheduled_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x05state\x18\x07 \x01(\x0e\x32\x31.temporal.api.enums.v1.PendingNexusOperationState\x12\x0f\n\x07\x61ttempt\x18\x08 \x01(\x05\x12>\n\x1alast_attempt_complete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x14last_attempt_failure\x18\n \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12>\n\x1anext_attempt_schedule_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12S\n\x11\x63\x61ncellation_info\x18\x0c \x01(\x0b\x32\x38.temporal.api.workflow.v1.NexusOperationCancellationInfo\x12\x1a\n\x12scheduled_event_id\x18\r \x01(\x03\x12\x16\n\x0e\x62locked_reason\x18\x0e \x01(\t\x12\x17\n\x0foperation_token\x18\x0f \x01(\t\x12<\n\x19schedule_to_start_timeout\x18\x10 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x11 \x01(\x0b\x32\x19.google.protobuf.Duration"\x84\x03\n\x1eNexusOperationCancellationInfo\x12\x32\n\x0erequested_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\x05state\x18\x02 \x01(\x0e\x32\x36.temporal.api.enums.v1.NexusOperationCancellationState\x12\x0f\n\x07\x61ttempt\x18\x03 \x01(\x05\x12>\n\x1alast_attempt_complete_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x14last_attempt_failure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12>\n\x1anext_attempt_schedule_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0e\x62locked_reason\x18\x07 \x01(\t"\xe3\x01\n\x18WorkflowExecutionOptions\x12I\n\x13versioning_override\x18\x01 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12\x32\n\x08priority\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12H\n\x14time_skipping_config\x18\x03 \x01(\x0b\x32*.temporal.api.common.v1.TimeSkippingConfig"\xfa\x05\n\x12VersioningOverride\x12M\n\x06pinned\x18\x03 \x01(\x0b\x32;.temporal.api.workflow.v1.VersioningOverride.PinnedOverrideH\x00\x12\x16\n\x0c\x61uto_upgrade\x18\x04 \x01(\x08H\x00\x12P\n\x08one_time\x18\x05 \x01(\x0b\x32<.temporal.api.workflow.v1.VersioningOverride.OneTimeOverrideH\x00\x12?\n\x08\x62\x65havior\x18\x01 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehaviorB\x02\x18\x01\x12>\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12\x1a\n\x0epinned_version\x18\t \x01(\tB\x02\x18\x01\x1a\xad\x01\n\x0ePinnedOverride\x12U\n\x08\x62\x65havior\x18\x01 \x01(\x0e\x32\x43.temporal.api.workflow.v1.VersioningOverride.PinnedOverrideBehavior\x12\x44\n\x07version\x18\x02 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x1ai\n\x0fOneTimeOverride\x12V\n\x19target_deployment_version\x18\x01 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion"g\n\x16PinnedOverrideBehavior\x12(\n$PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED\x10\x00\x12#\n\x1fPINNED_OVERRIDE_BEHAVIOR_PINNED\x10\x01\x42\n\n\x08override"i\n\x11OnConflictOptions\x12\x19\n\x11\x61ttach_request_id\x18\x01 \x01(\x08\x12#\n\x1b\x61ttach_completion_callbacks\x18\x02 \x01(\x08\x12\x14\n\x0c\x61ttach_links\x18\x03 \x01(\x08"i\n\rRequestIdInfo\x12\x34\n\nevent_type\x18\x01 \x01(\x0e\x32 .temporal.api.enums.v1.EventType\x12\x10\n\x08\x65vent_id\x18\x02 \x01(\x03\x12\x10\n\x08\x62uffered\x18\x03 \x01(\x08"\xb7\x04\n\x12PostResetOperation\x12V\n\x0fsignal_workflow\x18\x01 \x01(\x0b\x32;.temporal.api.workflow.v1.PostResetOperation.SignalWorkflowH\x00\x12\x65\n\x17update_workflow_options\x18\x02 \x01(\x0b\x32\x42.temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptionsH\x00\x1a\xb3\x01\n\x0eSignalWorkflow\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12/\n\x05input\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12.\n\x06header\x18\x03 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12+\n\x05links\x18\x04 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x1a\xa0\x01\n\x15UpdateWorkflowOptions\x12V\n\x1aworkflow_execution_options\x18\x01 \x01(\x0b\x32\x32.temporal.api.workflow.v1.WorkflowExecutionOptions\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\t\n\x07variant"o\n\x1aWorkflowExecutionPauseInfo\x12\x10\n\x08identity\x18\x01 \x01(\t\x12/\n\x0bpaused_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06reason\x18\x03 \x01(\tB\x93\x01\n\x1bio.temporal.api.workflow.v1B\x0cMessageProtoP\x01Z\'go.temporal.io/api/workflow/v1;workflow\xaa\x02\x1aTemporalio.Api.Workflow.V1\xea\x02\x1dTemporalio::Api::Workflow::V1b\x06proto3' ) -_sym_db.RegisterMessage(PostResetOperation) -_sym_db.RegisterMessage(PostResetOperation.SignalWorkflow) -_sym_db.RegisterMessage(PostResetOperation.UpdateWorkflowOptions) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\033io.temporal.api.workflow.v1B\014MessageProtoP\001Z'go.temporal.io/api/workflow/v1;workflow\252\002\032Temporalio.Api.Workflow.V1\352\002\035Temporalio::Api::Workflow::V1" @@ -493,64 +130,70 @@ _VERSIONINGOVERRIDE.fields_by_name[ "pinned_version" ]._serialized_options = b"\030\001" - _WORKFLOWEXECUTIONINFO._serialized_start = 552 - _WORKFLOWEXECUTIONINFO._serialized_end = 1747 - _WORKFLOWEXECUTIONEXTENDEDINFO._serialized_start = 1750 - _WORKFLOWEXECUTIONEXTENDEDINFO._serialized_end = 2258 - _WORKFLOWEXECUTIONEXTENDEDINFO_REQUESTIDINFOSENTRY._serialized_start = 2164 - _WORKFLOWEXECUTIONEXTENDEDINFO_REQUESTIDINFOSENTRY._serialized_end = 2258 - _WORKFLOWEXECUTIONVERSIONINGINFO._serialized_start = 2261 - _WORKFLOWEXECUTIONVERSIONINGINFO._serialized_end = 2762 - _DEPLOYMENTTRANSITION._serialized_start = 2764 - _DEPLOYMENTTRANSITION._serialized_end = 2846 - _DEPLOYMENTVERSIONTRANSITION._serialized_start = 2849 - _DEPLOYMENTVERSIONTRANSITION._serialized_end = 2980 - _WORKFLOWEXECUTIONCONFIG._serialized_start = 2983 - _WORKFLOWEXECUTIONCONFIG._serialized_end = 3310 - _PENDINGACTIVITYINFO._serialized_start = 3313 - _PENDINGACTIVITYINFO._serialized_end = 5038 - _PENDINGACTIVITYINFO_PAUSEINFO._serialized_start = 4682 - _PENDINGACTIVITYINFO_PAUSEINFO._serialized_end = 5017 - _PENDINGACTIVITYINFO_PAUSEINFO_MANUAL._serialized_start = 4903 - _PENDINGACTIVITYINFO_PAUSEINFO_MANUAL._serialized_end = 4945 - _PENDINGACTIVITYINFO_PAUSEINFO_RULE._serialized_start = 4947 - _PENDINGACTIVITYINFO_PAUSEINFO_RULE._serialized_end = 5004 - _PENDINGCHILDEXECUTIONINFO._serialized_start = 5041 - _PENDINGCHILDEXECUTIONINFO._serialized_end = 5226 - _PENDINGWORKFLOWTASKINFO._serialized_start = 5229 - _PENDINGWORKFLOWTASKINFO._serialized_end = 5498 - _RESETPOINTS._serialized_start = 5500 - _RESETPOINTS._serialized_end = 5571 - _RESETPOINTINFO._serialized_start = 5574 - _RESETPOINTINFO._serialized_end = 5813 - _NEWWORKFLOWEXECUTIONINFO._serialized_start = 5816 - _NEWWORKFLOWEXECUTIONINFO._serialized_end = 6717 - _CALLBACKINFO._serialized_start = 6720 - _CALLBACKINFO._serialized_end = 7314 - _CALLBACKINFO_WORKFLOWCLOSED._serialized_start = 7194 - _CALLBACKINFO_WORKFLOWCLOSED._serialized_end = 7210 - _CALLBACKINFO_TRIGGER._serialized_start = 7212 - _CALLBACKINFO_TRIGGER._serialized_end = 7314 - _PENDINGNEXUSOPERATIONINFO._serialized_start = 7317 - _PENDINGNEXUSOPERATIONINFO._serialized_end = 7975 - _NEXUSOPERATIONCANCELLATIONINFO._serialized_start = 7978 - _NEXUSOPERATIONCANCELLATIONINFO._serialized_end = 8366 - _WORKFLOWEXECUTIONOPTIONS._serialized_start = 8368 - _WORKFLOWEXECUTIONOPTIONS._serialized_end = 8469 - _VERSIONINGOVERRIDE._serialized_start = 8472 - _VERSIONINGOVERRIDE._serialized_end = 9045 - _VERSIONINGOVERRIDE_PINNEDOVERRIDE._serialized_start = 8755 - _VERSIONINGOVERRIDE_PINNEDOVERRIDE._serialized_end = 8928 - _VERSIONINGOVERRIDE_PINNEDOVERRIDEBEHAVIOR._serialized_start = 8930 - _VERSIONINGOVERRIDE_PINNEDOVERRIDEBEHAVIOR._serialized_end = 9033 - _ONCONFLICTOPTIONS._serialized_start = 9047 - _ONCONFLICTOPTIONS._serialized_end = 9152 - _REQUESTIDINFO._serialized_start = 9154 - _REQUESTIDINFO._serialized_end = 9259 - _POSTRESETOPERATION._serialized_start = 9262 - _POSTRESETOPERATION._serialized_end = 9829 - _POSTRESETOPERATION_SIGNALWORKFLOW._serialized_start = 9476 - _POSTRESETOPERATION_SIGNALWORKFLOW._serialized_end = 9655 - _POSTRESETOPERATION_UPDATEWORKFLOWOPTIONS._serialized_start = 9658 - _POSTRESETOPERATION_UPDATEWORKFLOWOPTIONS._serialized_end = 9818 + _WORKFLOWEXECUTIONINFO._serialized_start = 589 + _WORKFLOWEXECUTIONINFO._serialized_end = 1853 + _WORKFLOWEXECUTIONEXTENDEDINFO._serialized_start = 1856 + _WORKFLOWEXECUTIONEXTENDEDINFO._serialized_end = 2611 + _WORKFLOWEXECUTIONEXTENDEDINFO_REQUESTIDINFOSENTRY._serialized_start = 2517 + _WORKFLOWEXECUTIONEXTENDEDINFO_REQUESTIDINFOSENTRY._serialized_end = 2611 + _WORKFLOWEXECUTIONVERSIONINGINFO._serialized_start = 2614 + _WORKFLOWEXECUTIONVERSIONINGINFO._serialized_end = 3249 + _DEPLOYMENTTRANSITION._serialized_start = 3251 + _DEPLOYMENTTRANSITION._serialized_end = 3333 + _DEPLOYMENTVERSIONTRANSITION._serialized_start = 3336 + _DEPLOYMENTVERSIONTRANSITION._serialized_end = 3467 + _WORKFLOWEXECUTIONCONFIG._serialized_start = 3470 + _WORKFLOWEXECUTIONCONFIG._serialized_end = 3797 + _PENDINGACTIVITYINFO._serialized_start = 3800 + _PENDINGACTIVITYINFO._serialized_end = 5525 + _PENDINGACTIVITYINFO_PAUSEINFO._serialized_start = 5169 + _PENDINGACTIVITYINFO_PAUSEINFO._serialized_end = 5504 + _PENDINGACTIVITYINFO_PAUSEINFO_MANUAL._serialized_start = 5390 + _PENDINGACTIVITYINFO_PAUSEINFO_MANUAL._serialized_end = 5432 + _PENDINGACTIVITYINFO_PAUSEINFO_RULE._serialized_start = 5434 + _PENDINGACTIVITYINFO_PAUSEINFO_RULE._serialized_end = 5491 + _PENDINGCHILDEXECUTIONINFO._serialized_start = 5528 + _PENDINGCHILDEXECUTIONINFO._serialized_end = 5713 + _PENDINGWORKFLOWTASKINFO._serialized_start = 5716 + _PENDINGWORKFLOWTASKINFO._serialized_end = 5985 + _RESETPOINTS._serialized_start = 5987 + _RESETPOINTS._serialized_end = 6058 + _RESETPOINTINFO._serialized_start = 6061 + _RESETPOINTINFO._serialized_end = 6300 + _NEWWORKFLOWEXECUTIONINFO._serialized_start = 6303 + _NEWWORKFLOWEXECUTIONINFO._serialized_end = 7204 + _CALLBACKINFO._serialized_start = 7207 + _CALLBACKINFO._serialized_end = 7997 + _CALLBACKINFO_WORKFLOWCLOSED._serialized_start = 7701 + _CALLBACKINFO_WORKFLOWCLOSED._serialized_end = 7717 + _CALLBACKINFO_UPDATEWORKFLOWEXECUTIONCOMPLETED._serialized_start = 7719 + _CALLBACKINFO_UPDATEWORKFLOWEXECUTIONCOMPLETED._serialized_end = 7772 + _CALLBACKINFO_TRIGGER._serialized_start = 7775 + _CALLBACKINFO_TRIGGER._serialized_end = 7997 + _PENDINGNEXUSOPERATIONINFO._serialized_start = 8000 + _PENDINGNEXUSOPERATIONINFO._serialized_end = 8779 + _NEXUSOPERATIONCANCELLATIONINFO._serialized_start = 8782 + _NEXUSOPERATIONCANCELLATIONINFO._serialized_end = 9170 + _WORKFLOWEXECUTIONOPTIONS._serialized_start = 9173 + _WORKFLOWEXECUTIONOPTIONS._serialized_end = 9400 + _VERSIONINGOVERRIDE._serialized_start = 9403 + _VERSIONINGOVERRIDE._serialized_end = 10165 + _VERSIONINGOVERRIDE_PINNEDOVERRIDE._serialized_start = 9768 + _VERSIONINGOVERRIDE_PINNEDOVERRIDE._serialized_end = 9941 + _VERSIONINGOVERRIDE_ONETIMEOVERRIDE._serialized_start = 9943 + _VERSIONINGOVERRIDE_ONETIMEOVERRIDE._serialized_end = 10048 + _VERSIONINGOVERRIDE_PINNEDOVERRIDEBEHAVIOR._serialized_start = 10050 + _VERSIONINGOVERRIDE_PINNEDOVERRIDEBEHAVIOR._serialized_end = 10153 + _ONCONFLICTOPTIONS._serialized_start = 10167 + _ONCONFLICTOPTIONS._serialized_end = 10272 + _REQUESTIDINFO._serialized_start = 10274 + _REQUESTIDINFO._serialized_end = 10379 + _POSTRESETOPERATION._serialized_start = 10382 + _POSTRESETOPERATION._serialized_end = 10949 + _POSTRESETOPERATION_SIGNALWORKFLOW._serialized_start = 10596 + _POSTRESETOPERATION_SIGNALWORKFLOW._serialized_end = 10775 + _POSTRESETOPERATION_UPDATEWORKFLOWOPTIONS._serialized_start = 10778 + _POSTRESETOPERATION_UPDATEWORKFLOWOPTIONS._serialized_end = 10938 + _WORKFLOWEXECUTIONPAUSEINFO._serialized_start = 10951 + _WORKFLOWEXECUTIONPAUSEINFO._serialized_end = 11062 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/workflow/v1/message_pb2.pyi b/temporalio/api/workflow/v1/message_pb2.pyi index 8697908096..493e2062e7 100644 --- a/temporalio/api/workflow/v1/message_pb2.pyi +++ b/temporalio/api/workflow/v1/message_pb2.pyi @@ -24,6 +24,7 @@ import temporalio.api.enums.v1.common_pb2 import temporalio.api.enums.v1.event_type_pb2 import temporalio.api.enums.v1.workflow_pb2 import temporalio.api.failure.v1.message_pb2 +import temporalio.api.nexus.v1.message_pb2 import temporalio.api.sdk.v1.user_metadata_pb2 import temporalio.api.taskqueue.v1.message_pb2 @@ -34,6 +35,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowExecutionInfo(google.protobuf.message.Message): """Hold basic information about a workflow execution. This structure is a part of visibility, and thus contain a limited subset of information. @@ -65,6 +67,42 @@ class WorkflowExecutionInfo(google.protobuf.message.Message): VERSIONING_INFO_FIELD_NUMBER: builtins.int WORKER_DEPLOYMENT_NAME_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int + EXTERNAL_PAYLOAD_SIZE_BYTES_FIELD_NUMBER: builtins.int + EXTERNAL_PAYLOAD_COUNT_FIELD_NUMBER: builtins.int + status: temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType + history_length: builtins.int + parent_namespace_id: builtins.str + task_queue: builtins.str + state_transition_count: builtins.int + history_size_bytes: builtins.int + assigned_build_id: builtins.str + """The currently assigned build ID for this execution. Presence of this value means worker versioning is used + for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules + when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled + again, the assigned build ID may change according to the latest versioning rules. + Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to + this execution. + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + """ + inherited_build_id: builtins.str + """Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead + of using the assignment rules. + Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] + """ + first_run_id: builtins.str + """The first run ID in the execution chain. + Executions created via the following operations are considered to be in the same chain + - ContinueAsNew + - Workflow Retry + - Workflow Reset + - Cron Schedule + """ + worker_deployment_name: builtins.str + """The name of Worker Deployment that completed the most recent workflow task.""" + external_payload_size_bytes: builtins.int + """Total size in bytes of all external payloads referenced in workflow history.""" + external_payload_count: builtins.int + """Count of external payloads referenced in workflow history.""" @property def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... @property @@ -73,9 +111,6 @@ class WorkflowExecutionInfo(google.protobuf.message.Message): def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... @property def close_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - status: temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType - history_length: builtins.int - parent_namespace_id: builtins.str @property def parent_execution( self, @@ -90,9 +125,6 @@ class WorkflowExecutionInfo(google.protobuf.message.Message): ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ... @property def auto_reset_points(self) -> global___ResetPoints: ... - task_queue: builtins.str - state_transition_count: builtins.int - history_size_bytes: builtins.int @property def most_recent_worker_version_stamp( self, @@ -100,11 +132,13 @@ class WorkflowExecutionInfo(google.protobuf.message.Message): """If set, the most recent worker version stamp that appeared in a workflow task completion Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] """ + @property def execution_duration(self) -> google.protobuf.duration_pb2.Duration: """Workflow execution duration is defined as difference between close time and execution time. This field is only populated if the workflow is closed. """ + @property def root_execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: """Contains information about the root workflow execution. @@ -125,41 +159,18 @@ class WorkflowExecutionInfo(google.protobuf.message.Message): Scenario 5: Workflow W1 is reseted, creating W2. - The root workflow of W1 is W1 and the root workflow of W2 is W2. """ - assigned_build_id: builtins.str - """The currently assigned build ID for this execution. Presence of this value means worker versioning is used - for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules - when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled - again, the assigned build ID may change according to the latest versioning rules. - Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to - this execution. - Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - """ - inherited_build_id: builtins.str - """Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead - of using the assignment rules. - Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] - """ - first_run_id: builtins.str - """The first run ID in the execution chain. - Executions created via the following operations are considered to be in the same chain - - ContinueAsNew - - Workflow Retry - - Workflow Reset - - Cron Schedule - """ + @property def versioning_info(self) -> global___WorkflowExecutionVersioningInfo: """Absent value means the workflow execution is not versioned. When present, the execution might be versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`. Experimental. Versioning info is experimental and might change in the future. """ - worker_deployment_name: builtins.str - """The name of Worker Deployment that completed the most recent workflow task. - Experimental. Worker Deployments are experimental and might change in the future. - """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata""" + def __init__( self, *, @@ -191,10 +202,12 @@ class WorkflowExecutionInfo(google.protobuf.message.Message): versioning_info: global___WorkflowExecutionVersioningInfo | None = ..., worker_deployment_name: builtins.str = ..., priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + external_payload_size_bytes: builtins.int = ..., + external_payload_count: builtins.int = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "auto_reset_points", b"auto_reset_points", "close_time", @@ -227,7 +240,7 @@ class WorkflowExecutionInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "assigned_build_id", b"assigned_build_id", "auto_reset_points", @@ -240,6 +253,10 @@ class WorkflowExecutionInfo(google.protobuf.message.Message): b"execution_duration", "execution_time", b"execution_time", + "external_payload_count", + b"external_payload_count", + "external_payload_size_bytes", + b"external_payload_size_bytes", "first_run_id", b"first_run_id", "history_length", @@ -281,11 +298,13 @@ class WorkflowExecutionInfo(google.protobuf.message.Message): global___WorkflowExecutionInfo = WorkflowExecutionInfo +@typing.final class WorkflowExecutionExtendedInfo(google.protobuf.message.Message): """Holds all the extra information about workflow execution that is not part of Visibility.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class RequestIdInfosEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -301,11 +320,10 @@ class WorkflowExecutionExtendedInfo(google.protobuf.message.Message): value: global___RequestIdInfo | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... EXECUTION_EXPIRATION_TIME_FIELD_NUMBER: builtins.int @@ -315,24 +333,31 @@ class WorkflowExecutionExtendedInfo(google.protobuf.message.Message): ORIGINAL_START_TIME_FIELD_NUMBER: builtins.int RESET_RUN_ID_FIELD_NUMBER: builtins.int REQUEST_ID_INFOS_FIELD_NUMBER: builtins.int + PAUSE_INFO_FIELD_NUMBER: builtins.int + TIME_SKIPPING_INFO_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int + cancel_requested: builtins.bool + """indicates if the workflow received a cancel request""" + reset_run_id: builtins.str + """Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run.""" @property def execution_expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Workflow execution expiration time is defined as workflow start time plus expiration timeout. Workflow start time may change after workflow reset. """ + @property def run_expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Workflow run expiration time is defined as current workflow run start time plus workflow run timeout.""" - cancel_requested: builtins.bool - """indicates if the workflow received a cancel request""" + @property def last_reset_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Last workflow reset time. Nil if the workflow was never reset.""" + @property def original_start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Original workflow start time.""" - reset_run_id: builtins.str - """Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run.""" + @property def request_id_infos( self, @@ -344,6 +369,25 @@ class WorkflowExecutionExtendedInfo(google.protobuf.message.Message): calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is used in the StartWorkflowExecution request). """ + + @property + def pause_info(self) -> global___WorkflowExecutionPauseInfo: + """Information about the workflow execution pause operation.""" + + @property + def time_skipping_info( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingInfo: + """Information about time skipping of the workflow execution. + If the execution has never enabled time skipping, it will be nil. + """ + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this workflow.""" + def __init__( self, *, @@ -355,23 +399,34 @@ class WorkflowExecutionExtendedInfo(google.protobuf.message.Message): reset_run_id: builtins.str = ..., request_id_infos: collections.abc.Mapping[builtins.str, global___RequestIdInfo] | None = ..., + pause_info: global___WorkflowExecutionPauseInfo | None = ..., + time_skipping_info: temporalio.api.common.v1.message_pb2.TimeSkippingInfo + | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution_expiration_time", b"execution_expiration_time", "last_reset_time", b"last_reset_time", "original_start_time", b"original_start_time", + "pause_info", + b"pause_info", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "run_expiration_time", b"run_expiration_time", + "time_skipping_info", + b"time_skipping_info", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel_requested", b"cancel_requested", "execution_expiration_time", @@ -380,17 +435,24 @@ class WorkflowExecutionExtendedInfo(google.protobuf.message.Message): b"last_reset_time", "original_start_time", b"original_start_time", + "pause_info", + b"pause_info", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "request_id_infos", b"request_id_infos", "reset_run_id", b"reset_run_id", "run_expiration_time", b"run_expiration_time", + "time_skipping_info", + b"time_skipping_info", ], ) -> None: ... global___WorkflowExecutionExtendedInfo = WorkflowExecutionExtendedInfo +@typing.final class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): """Holds all the information about worker versioning for a particular workflow execution. Experimental. Versioning info is experimental and might change in the future. @@ -405,19 +467,48 @@ class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int DEPLOYMENT_TRANSITION_FIELD_NUMBER: builtins.int VERSION_TRANSITION_FIELD_NUMBER: builtins.int + REVISION_NUMBER_FIELD_NUMBER: builtins.int + CONTINUE_AS_NEW_INITIAL_VERSIONING_BEHAVIOR_FIELD_NUMBER: builtins.int behavior: temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType """Versioning behavior determines how the server should treat this execution when workers are upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means unversioned. See the comments in `VersioningBehavior` enum for more info about different behaviors. - This field is first set after an execution completes its first workflow task on a versioned - worker, and set again on completion of every subsequent workflow task. - For child workflows of Pinned parents, this will be set to Pinned (along with `deployment_version`) when - the the child starts so that child's first workflow task goes to the same Version as the - parent. After the first workflow task, it depends on the child workflow itself if it wants - to stay pinned or become unpinned (according to Versioning Behavior set in the worker). + + Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning + Behavior and Version (except when the new execution runs on a task queue not belonging to the + same deployment version as the parent/previous run's task queue). The first workflow task will + be dispatched according to the inherited behavior (or to the current version of the task-queue's + deployment in the case of AutoUpgrade.) After completion of their first workflow task the + Deployment Version and Behavior of the execution will update according to configuration on the worker. + Note that `behavior` is overridden by `versioning_override` if the latter is present. """ + version: builtins.str + """Deprecated. Use `deployment_version`.""" + revision_number: builtins.int + """Monotonic counter reflecting the latest routing decision for this workflow execution. + Used for staleness detection between history and matching when dispatching tasks to workers. + Incremented when a workflow execution routes to a new deployment version, which happens + when a worker of the new deployment version completes a workflow task. + Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not + face the problem of inconsistent dispatching that arises from eventual consistency between + task queues and their partitions. + """ + continue_as_new_initial_versioning_behavior: ( + temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType + ) + """Experimental. + If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior + specified in that command. + Only used for the initial task of this run and the initial task of any retries of this run. + Not passed to children or to future continue-as-new. + + Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, + a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility + with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent + to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade. + """ @property def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: """The worker deployment that completed the last workflow task of this workflow execution. Must @@ -428,8 +519,7 @@ class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): Note that `deployment` is overridden by `versioning_override` if the latter is present. Deprecated. Use `deployment_version`. """ - version: builtins.str - """Deprecated. Use `deployment_version`.""" + @property def deployment_version( self, @@ -439,11 +529,17 @@ class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed by a worker that is not using versioning but _is_ passing Deployment Name and Build ID. - For child workflows of Pinned parents, this will be set to the parent's Pinned Version when - the child starts, so that the child's first workflow task goes to the same Version as the parent. + Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning + Behavior and Version (except when the new execution runs on a task queue not belonging to the + same deployment version as the parent/previous run's task queue). The first workflow task will + be dispatched according to the inherited behavior (or to the current version of the task-queue's + deployment in the case of AutoUpgrade.) After completion of their first workflow task the + Deployment Version and Behavior of the execution will update according to configuration on the worker. + Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version` will override this value. """ + @property def versioning_override(self) -> global___VersioningOverride: """Present if user has set an execution-specific versioning override. This override takes @@ -453,6 +549,7 @@ class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, workflow retries, and cron workflows. """ + @property def deployment_transition(self) -> global___DeploymentTransition: """When present, indicates the workflow is transitioning to a different deployment. Can @@ -474,6 +571,7 @@ class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): completed, pending activities will start their next attempt on the new deployment. Deprecated. Use version_transition. """ + @property def version_transition(self) -> global___DeploymentVersionTransition: """When present, indicates the workflow is transitioning to a different deployment version @@ -495,6 +593,7 @@ class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): Pending activities will not start new attempts during a transition. Once the transition is completed, pending activities will start their next attempt on the new version. """ + def __init__( self, *, @@ -506,10 +605,12 @@ class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): versioning_override: global___VersioningOverride | None = ..., deployment_transition: global___DeploymentTransition | None = ..., version_transition: global___DeploymentVersionTransition | None = ..., + revision_number: builtins.int = ..., + continue_as_new_initial_versioning_behavior: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "deployment_transition", @@ -524,15 +625,19 @@ class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "behavior", b"behavior", + "continue_as_new_initial_versioning_behavior", + b"continue_as_new_initial_versioning_behavior", "deployment", b"deployment", "deployment_transition", b"deployment_transition", "deployment_version", b"deployment_version", + "revision_number", + b"revision_number", "version", b"version", "version_transition", @@ -544,6 +649,7 @@ class WorkflowExecutionVersioningInfo(google.protobuf.message.Message): global___WorkflowExecutionVersioningInfo = WorkflowExecutionVersioningInfo +@typing.final class DeploymentTransition(google.protobuf.message.Message): """Holds information about ongoing transition of a workflow execution from one deployment to another. Deprecated. Use DeploymentVersionTransition. @@ -557,20 +663,22 @@ class DeploymentTransition(google.protobuf.message.Message): """The target deployment of the transition. Null means a so-far-versioned workflow is transitioning to unversioned workers. """ + def __init__( self, *, deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["deployment", b"deployment"] + self, field_name: typing.Literal["deployment", b"deployment"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["deployment", b"deployment"] + self, field_name: typing.Literal["deployment", b"deployment"] ) -> None: ... global___DeploymentTransition = DeploymentTransition +@typing.final class DeploymentVersionTransition(google.protobuf.message.Message): """Holds information about ongoing transition of a workflow execution from one worker deployment version to another. @@ -590,6 +698,7 @@ class DeploymentVersionTransition(google.protobuf.message.Message): """The target Version of the transition. If nil, a so-far-versioned workflow is transitioning to unversioned workers. """ + def __init__( self, *, @@ -598,20 +707,18 @@ class DeploymentVersionTransition(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "deployment_version", b"deployment_version" - ], + self, field_name: typing.Literal["deployment_version", b"deployment_version"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_version", b"deployment_version", "version", b"version" ], ) -> None: ... global___DeploymentVersionTransition = DeploymentVersionTransition +@typing.final class WorkflowExecutionConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -633,6 +740,7 @@ class WorkflowExecutionConfig(google.protobuf.message.Message): @property def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata: """User metadata provided on start workflow.""" + def __init__( self, *, @@ -646,7 +754,7 @@ class WorkflowExecutionConfig(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "default_workflow_task_timeout", b"default_workflow_task_timeout", "task_queue", @@ -661,7 +769,7 @@ class WorkflowExecutionConfig(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "default_workflow_task_timeout", b"default_workflow_task_timeout", "task_queue", @@ -677,12 +785,15 @@ class WorkflowExecutionConfig(google.protobuf.message.Message): global___WorkflowExecutionConfig = WorkflowExecutionConfig +@typing.final class PendingActivityInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class PauseInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class Manual(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -700,11 +811,12 @@ class PendingActivityInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "reason", b"reason" ], ) -> None: ... + @typing.final class Rule(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -726,7 +838,7 @@ class PendingActivityInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "reason", b"reason", "rule_id", b"rule_id" ], ) -> None: ... @@ -737,12 +849,15 @@ class PendingActivityInfo(google.protobuf.message.Message): @property def pause_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the activity was paused.""" + @property def manual(self) -> global___PendingActivityInfo.PauseInfo.Manual: """activity was paused by the manual intervention""" + @property def rule(self) -> global___PendingActivityInfo.PauseInfo.Rule: """activity was paused by the rule""" + def __init__( self, *, @@ -752,7 +867,7 @@ class PendingActivityInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "manual", b"manual", "pause_time", @@ -765,7 +880,7 @@ class PendingActivityInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "manual", b"manual", "pause_time", @@ -777,8 +892,8 @@ class PendingActivityInfo(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["paused_by", b"paused_by"] - ) -> typing_extensions.Literal["manual", "rule"] | None: ... + self, oneof_group: typing.Literal["paused_by", b"paused_by"] + ) -> typing.Literal["manual", "rule"] | None: ... ACTIVITY_ID_FIELD_NUMBER: builtins.int ACTIVITY_TYPE_FIELD_NUMBER: builtins.int @@ -806,33 +921,40 @@ class PendingActivityInfo(google.protobuf.message.Message): PAUSE_INFO_FIELD_NUMBER: builtins.int ACTIVITY_OPTIONS_FIELD_NUMBER: builtins.int activity_id: builtins.str + state: temporalio.api.enums.v1.workflow_pb2.PendingActivityState.ValueType + attempt: builtins.int + maximum_attempts: builtins.int + last_worker_identity: builtins.str + last_independently_assigned_build_id: builtins.str + """Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow. + The activity will use the build id in this field instead. + If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning + rules. + """ + paused: builtins.bool + """Indicates if activity is paused.""" + last_worker_deployment_version: builtins.str + """The Worker Deployment Version this activity was dispatched to most recently. + Deprecated. Use `last_deployment_version`. + """ @property def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: ... - state: temporalio.api.enums.v1.workflow_pb2.PendingActivityState.ValueType @property def heartbeat_details(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... @property def last_heartbeat_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... @property def last_started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - attempt: builtins.int - maximum_attempts: builtins.int @property def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... @property def expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... @property def last_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ... - last_worker_identity: builtins.str @property def use_workflow_build_id(self) -> google.protobuf.empty_pb2.Empty: """Deprecated. When present, it means this activity is assigned to the build ID of its workflow.""" - last_independently_assigned_build_id: builtins.str - """Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow. - The activity will use the build id in this field instead. - If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning - rules. - """ + @property def last_worker_version_stamp( self, @@ -840,6 +962,7 @@ class PendingActivityInfo(google.protobuf.message.Message): """Deprecated. The version stamp of the worker to whom this activity was most recently dispatched This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] """ + @property def current_retry_interval(self) -> google.protobuf.duration_pb2.Duration: """The time activity will wait until the next retry. @@ -847,26 +970,24 @@ class PendingActivityInfo(google.protobuf.message.Message): If activity is currently waiting it will be current retry interval. If there will be no retry it will be null. """ + @property def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the last activity attempt was completed. If activity has not been completed yet then it will be null.""" + @property def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Next time when activity will be scheduled. If activity is currently scheduled or started it will be null. """ - paused: builtins.bool - """Indicates if activity is paused.""" + @property def last_deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: """The deployment this activity was dispatched to most recently. Present only if the activity was dispatched to a versioned worker. Deprecated. Use `last_deployment_version`. """ - last_worker_deployment_version: builtins.str - """The Worker Deployment Version this activity was dispatched to most recently. - Deprecated. Use `last_deployment_version`. - """ + @property def last_deployment_version( self, @@ -874,9 +995,13 @@ class PendingActivityInfo(google.protobuf.message.Message): """The Worker Deployment Version this activity was dispatched to most recently. If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: - """Priority metadata""" + """Priority metadata. If this message is not present, or any fields are not + present, they inherit the values from the workflow. + """ + @property def pause_info(self) -> global___PendingActivityInfo.PauseInfo: ... @property @@ -884,6 +1009,7 @@ class PendingActivityInfo(google.protobuf.message.Message): self, ) -> temporalio.api.activity.v1.message_pb2.ActivityOptions: """Current activity options. May be different from the one used to start the activity.""" + def __init__( self, *, @@ -921,7 +1047,7 @@ class PendingActivityInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_options", b"activity_options", "activity_type", @@ -964,7 +1090,7 @@ class PendingActivityInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "activity_options", @@ -1020,19 +1146,15 @@ class PendingActivityInfo(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, - oneof_group: typing_extensions.Literal[ - "assigned_build_id", b"assigned_build_id" - ], + self, oneof_group: typing.Literal["assigned_build_id", b"assigned_build_id"] ) -> ( - typing_extensions.Literal[ - "use_workflow_build_id", "last_independently_assigned_build_id" - ] + typing.Literal["use_workflow_build_id", "last_independently_assigned_build_id"] | None ): ... global___PendingActivityInfo = PendingActivityInfo +@typing.final class PendingChildExecutionInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1060,7 +1182,7 @@ class PendingChildExecutionInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "initiated_id", b"initiated_id", "parent_close_policy", @@ -1076,6 +1198,7 @@ class PendingChildExecutionInfo(google.protobuf.message.Message): global___PendingChildExecutionInfo = PendingChildExecutionInfo +@typing.final class PendingWorkflowTaskInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1085,6 +1208,7 @@ class PendingWorkflowTaskInfo(google.protobuf.message.Message): STARTED_TIME_FIELD_NUMBER: builtins.int ATTEMPT_FIELD_NUMBER: builtins.int state: temporalio.api.enums.v1.workflow_pb2.PendingWorkflowTaskState.ValueType + attempt: builtins.int @property def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... @property @@ -1094,9 +1218,9 @@ class PendingWorkflowTaskInfo(google.protobuf.message.Message): In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds some threshold, the workflow task will be forced timeout. """ + @property def started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... - attempt: builtins.int def __init__( self, *, @@ -1108,7 +1232,7 @@ class PendingWorkflowTaskInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "original_scheduled_time", b"original_scheduled_time", "scheduled_time", @@ -1119,7 +1243,7 @@ class PendingWorkflowTaskInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attempt", b"attempt", "original_scheduled_time", @@ -1135,6 +1259,7 @@ class PendingWorkflowTaskInfo(google.protobuf.message.Message): global___PendingWorkflowTaskInfo = PendingWorkflowTaskInfo +@typing.final class ResetPoints(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1150,12 +1275,11 @@ class ResetPoints(google.protobuf.message.Message): *, points: collections.abc.Iterable[global___ResetPointInfo] | None = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["points", b"points"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["points", b"points"]) -> None: ... global___ResetPoints = ResetPoints +@typing.final class ResetPointInfo(google.protobuf.message.Message): """ResetPointInfo records the workflow event id that is the first one processed by a given build id or binary checksum. A new reset point will be created if either build id or binary @@ -1179,6 +1303,8 @@ class ResetPointInfo(google.protobuf.message.Message): """The first run ID in the execution chain that was touched by this worker build.""" first_workflow_task_completed_id: builtins.int """Event ID of the first WorkflowTaskCompleted event processed by this worker build.""" + resettable: builtins.bool + """false if the reset point has pending childWFs/reqCancels/signalExternals.""" @property def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... @property @@ -1187,8 +1313,7 @@ class ResetPointInfo(google.protobuf.message.Message): aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --) The time that the run is deleted due to retention. """ - resettable: builtins.bool - """false if the reset point has pending childWFs/reqCancels/signalExternals.""" + def __init__( self, *, @@ -1202,13 +1327,13 @@ class ResetPointInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "expire_time", b"expire_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "binary_checksum", b"binary_checksum", "build_id", @@ -1228,6 +1353,7 @@ class ResetPointInfo(google.protobuf.message.Message): global___ResetPointInfo = ResetPointInfo +@typing.final class NewWorkflowExecutionInfo(google.protobuf.message.Message): """NewWorkflowExecutionInfo is a shared message that encapsulates all the required arguments to starting a workflow in different contexts. @@ -1252,6 +1378,12 @@ class NewWorkflowExecutionInfo(google.protobuf.message.Message): VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int workflow_id: builtins.str + workflow_id_reuse_policy: ( + temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType + ) + """Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.""" + cron_schedule: builtins.str + """See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/""" @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... @property @@ -1259,24 +1391,23 @@ class NewWorkflowExecutionInfo(google.protobuf.message.Message): @property def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Serialized arguments to the workflow.""" + @property def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: """Total workflow execution timeout including retries and continue as new.""" + @property def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow run.""" + @property def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow task.""" - workflow_id_reuse_policy: ( - temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType - ) - """Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.""" - cron_schedule: builtins.str - """See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/""" + @property def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: ... @property @@ -1291,14 +1422,17 @@ class NewWorkflowExecutionInfo(google.protobuf.message.Message): for use by user interfaces to display the fixed as-of-start summary and details of the workflow. """ + @property def versioning_override(self) -> global___VersioningOverride: """If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata""" + def __init__( self, *, @@ -1323,7 +1457,7 @@ class NewWorkflowExecutionInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "input", @@ -1354,7 +1488,7 @@ class NewWorkflowExecutionInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cron_schedule", b"cron_schedule", "header", @@ -1392,11 +1526,13 @@ class NewWorkflowExecutionInfo(google.protobuf.message.Message): global___NewWorkflowExecutionInfo = NewWorkflowExecutionInfo +@typing.final class CallbackInfo(google.protobuf.message.Message): """CallbackInfo contains the state of an attached workflow callback.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class WorkflowClosed(google.protobuf.message.Message): """Trigger for when the workflow is closed.""" @@ -1406,32 +1542,70 @@ class CallbackInfo(google.protobuf.message.Message): self, ) -> None: ... + @typing.final + class UpdateWorkflowExecutionCompleted(google.protobuf.message.Message): + """Trigger for when a workflow update is completed.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UPDATE_ID_FIELD_NUMBER: builtins.int + update_id: builtins.str + def __init__( + self, + *, + update_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["update_id", b"update_id"] + ) -> None: ... + + @typing.final class Trigger(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor WORKFLOW_CLOSED_FIELD_NUMBER: builtins.int + UPDATE_WORKFLOW_EXECUTION_COMPLETED_FIELD_NUMBER: builtins.int @property def workflow_closed(self) -> global___CallbackInfo.WorkflowClosed: ... + @property + def update_workflow_execution_completed( + self, + ) -> global___CallbackInfo.UpdateWorkflowExecutionCompleted: ... def __init__( self, *, workflow_closed: global___CallbackInfo.WorkflowClosed | None = ..., + update_workflow_execution_completed: global___CallbackInfo.UpdateWorkflowExecutionCompleted + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "variant", b"variant", "workflow_closed", b"workflow_closed" + field_name: typing.Literal[ + "update_workflow_execution_completed", + b"update_workflow_execution_completed", + "variant", + b"variant", + "workflow_closed", + b"workflow_closed", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "variant", b"variant", "workflow_closed", b"workflow_closed" + field_name: typing.Literal[ + "update_workflow_execution_completed", + b"update_workflow_execution_completed", + "variant", + b"variant", + "workflow_closed", + b"workflow_closed", ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["workflow_closed"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> ( + typing.Literal["workflow_closed", "update_workflow_execution_completed"] + | None + ): ... CALLBACK_FIELD_NUMBER: builtins.int TRIGGER_FIELD_NUMBER: builtins.int @@ -1442,31 +1616,42 @@ class CallbackInfo(google.protobuf.message.Message): LAST_ATTEMPT_FAILURE_FIELD_NUMBER: builtins.int NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int BLOCKED_REASON_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + state: temporalio.api.enums.v1.common_pb2.CallbackState.ValueType + attempt: builtins.int + """The number of attempts made to deliver the callback. + This number represents a minimum bound since the attempt is incremented after the callback request completes. + """ + blocked_reason: builtins.str + """If the state is BLOCKED, blocked reason provides additional information.""" + request_id: builtins.str + """Server-generated request ID used as an idempotency token when invoking callbacks. + It has no relation to caller-side request_id sent in operations like StartWorkflowExecutionRequest. + """ @property def callback(self) -> temporalio.api.common.v1.message_pb2.Callback: """Information on how this callback should be invoked (e.g. its URL and type).""" + @property def trigger(self) -> global___CallbackInfo.Trigger: """Trigger for this callback.""" + @property def registration_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the callback was registered.""" - state: temporalio.api.enums.v1.common_pb2.CallbackState.ValueType - attempt: builtins.int - """The number of attempts made to deliver the callback. - This number represents a minimum bound since the attempt is incremented after the callback request completes. - """ + @property def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the last attempt completed.""" + @property def last_attempt_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """The last attempt's failure, if any.""" + @property def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the next attempt is scheduled.""" - blocked_reason: builtins.str - """If the state is BLOCKED, blocked reason provides additional information.""" + def __init__( self, *, @@ -1482,10 +1667,11 @@ class CallbackInfo(google.protobuf.message.Message): next_attempt_schedule_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., blocked_reason: builtins.str = ..., + request_id: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "callback", b"callback", "last_attempt_complete_time", @@ -1502,7 +1688,7 @@ class CallbackInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attempt", b"attempt", "blocked_reason", @@ -1517,6 +1703,8 @@ class CallbackInfo(google.protobuf.message.Message): b"next_attempt_schedule_time", "registration_time", b"registration_time", + "request_id", + b"request_id", "state", b"state", "trigger", @@ -1526,6 +1714,7 @@ class CallbackInfo(google.protobuf.message.Message): global___CallbackInfo = CallbackInfo +@typing.final class PendingNexusOperationInfo(google.protobuf.message.Message): """PendingNexusOperationInfo contains the state of a pending Nexus operation.""" @@ -1546,6 +1735,8 @@ class PendingNexusOperationInfo(google.protobuf.message.Message): SCHEDULED_EVENT_ID_FIELD_NUMBER: builtins.int BLOCKED_REASON_FIELD_NUMBER: builtins.int OPERATION_TOKEN_FIELD_NUMBER: builtins.int + SCHEDULE_TO_START_TIMEOUT_FIELD_NUMBER: builtins.int + START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int endpoint: builtins.str """Endpoint name. Resolved to a URL via the cluster's endpoint registry. @@ -1559,6 +1750,21 @@ class PendingNexusOperationInfo(google.protobuf.message.Message): Deprecated. Renamed to operation_token. """ + state: temporalio.api.enums.v1.common_pb2.PendingNexusOperationState.ValueType + attempt: builtins.int + """The number of attempts made to deliver the start operation request. + This number is approximate, it is incremented when a task is added to the history queue. + In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task + was never executed. + """ + scheduled_event_id: builtins.int + """The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the + DescribeWorkflowExecution response with workflow history. + """ + blocked_reason: builtins.str + """If the state is BLOCKED, blocked reason provides additional information.""" + operation_token: builtins.str + """Operation token. Only set for asynchronous operations after a successful StartOperation call.""" @property def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Schedule-to-close timeout for this operation. @@ -1566,33 +1772,39 @@ class PendingNexusOperationInfo(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the operation was scheduled.""" - state: temporalio.api.enums.v1.common_pb2.PendingNexusOperationState.ValueType - attempt: builtins.int - """The number of attempts made to deliver the start operation request. - This number represents a minimum bound since the attempt is incremented after the request completes. - """ + @property def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the last attempt completed.""" + @property def last_attempt_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """The last attempt's failure, if any.""" + @property def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the next attempt is scheduled.""" + @property def cancellation_info(self) -> global___NexusOperationCancellationInfo: ... - scheduled_event_id: builtins.int - """The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the - DescribeWorkflowExecution response with workflow history. - """ - blocked_reason: builtins.str - """If the state is BLOCKED, blocked reason provides additional information.""" - operation_token: builtins.str - """Operation token. Only set for asynchronous operations after a successful StartOperation call.""" + @property + def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Schedule-to-start timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Start-to-close timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + def __init__( self, *, @@ -1614,10 +1826,12 @@ class PendingNexusOperationInfo(google.protobuf.message.Message): scheduled_event_id: builtins.int = ..., blocked_reason: builtins.str = ..., operation_token: builtins.str = ..., + schedule_to_start_timeout: google.protobuf.duration_pb2.Duration | None = ..., + start_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancellation_info", b"cancellation_info", "last_attempt_complete_time", @@ -1628,13 +1842,17 @@ class PendingNexusOperationInfo(google.protobuf.message.Message): b"next_attempt_schedule_time", "schedule_to_close_timeout", b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", "scheduled_time", b"scheduled_time", + "start_to_close_timeout", + b"start_to_close_timeout", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attempt", b"attempt", "blocked_reason", @@ -1657,12 +1875,16 @@ class PendingNexusOperationInfo(google.protobuf.message.Message): b"operation_token", "schedule_to_close_timeout", b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", "scheduled_event_id", b"scheduled_event_id", "scheduled_time", b"scheduled_time", "service", b"service", + "start_to_close_timeout", + b"start_to_close_timeout", "state", b"state", ], @@ -1670,6 +1892,7 @@ class PendingNexusOperationInfo(google.protobuf.message.Message): global___PendingNexusOperationInfo = PendingNexusOperationInfo +@typing.final class NexusOperationCancellationInfo(google.protobuf.message.Message): """NexusOperationCancellationInfo contains the state of a nexus operation cancellation.""" @@ -1682,25 +1905,29 @@ class NexusOperationCancellationInfo(google.protobuf.message.Message): LAST_ATTEMPT_FAILURE_FIELD_NUMBER: builtins.int NEXT_ATTEMPT_SCHEDULE_TIME_FIELD_NUMBER: builtins.int BLOCKED_REASON_FIELD_NUMBER: builtins.int - @property - def requested_time(self) -> google.protobuf.timestamp_pb2.Timestamp: - """The time when cancellation was requested.""" state: temporalio.api.enums.v1.common_pb2.NexusOperationCancellationState.ValueType attempt: builtins.int """The number of attempts made to deliver the cancel operation request. This number represents a minimum bound since the attempt is incremented after the request completes. """ + blocked_reason: builtins.str + """If the state is BLOCKED, blocked reason provides additional information.""" + @property + def requested_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when cancellation was requested.""" + @property def last_attempt_complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the last attempt completed.""" + @property def last_attempt_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """The last attempt's failure, if any.""" + @property def next_attempt_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time when the next attempt is scheduled.""" - blocked_reason: builtins.str - """If the state is BLOCKED, blocked reason provides additional information.""" + def __init__( self, *, @@ -1717,7 +1944,7 @@ class NexusOperationCancellationInfo(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "last_attempt_complete_time", b"last_attempt_complete_time", "last_attempt_failure", @@ -1730,7 +1957,7 @@ class NexusOperationCancellationInfo(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attempt", b"attempt", "blocked_reason", @@ -1750,41 +1977,80 @@ class NexusOperationCancellationInfo(google.protobuf.message.Message): global___NexusOperationCancellationInfo = NexusOperationCancellationInfo +@typing.final class WorkflowExecutionOptions(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int + PRIORITY_FIELD_NUMBER: builtins.int + TIME_SKIPPING_CONFIG_FIELD_NUMBER: builtins.int @property def versioning_override(self) -> global___VersioningOverride: """If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.""" + + @property + def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: + """If set, overrides the workflow's priority sent by the SDK.""" + + @property + def time_skipping_config( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingConfig: + """The time-skipping configuration for this workflow execution. + When `fast_forward` is set, time will be fast-forwarded to a future point relative + to the current workflow timestamp. Each call takes effect, even if + `fast_forward` is set to the same duration, since the target time is recalculated + from the current timestamp on every call. + + This field must be updated as a whole; updating individual sub-fields is not supported. + When setting the update mask in `UpdateWorkflowExecutionOptionsRequest`, + `BatchOperationUpdateWorkflowExecutionOptions`, etc., use a mask that covers the entire field. + """ + def __init__( self, *, versioning_override: global___VersioningOverride | None = ..., + priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + time_skipping_config: temporalio.api.common.v1.message_pb2.TimeSkippingConfig + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "versioning_override", b"versioning_override" + field_name: typing.Literal[ + "priority", + b"priority", + "time_skipping_config", + b"time_skipping_config", + "versioning_override", + b"versioning_override", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "versioning_override", b"versioning_override" + field_name: typing.Literal[ + "priority", + b"priority", + "time_skipping_config", + b"time_skipping_config", + "versioning_override", + b"versioning_override", ], ) -> None: ... global___WorkflowExecutionOptions = WorkflowExecutionOptions +@typing.final class VersioningOverride(google.protobuf.message.Message): """Used to override the versioning behavior (and pinned deployment version, if applicable) of a - specific workflow execution. If set, takes precedence over the worker-sent values. See - `WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call - `UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask` - to indicate that it should be mutated. - Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, - workflow retries, and cron workflows. + specific workflow execution. If set, this override takes precedence over worker-sent values. + See `WorkflowExecutionInfo.VersioningInfo` for more information. + + To remove the override, call `UpdateWorkflowExecutionOptions` with a null + `VersioningOverride`, and use the `update_mask` to indicate that it should be mutated. + + Pinned behavior overrides are automatically inherited by child workflows, workflow retries, continue-as-new + workflows, and cron workflows. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1798,7 +2064,7 @@ class VersioningOverride(google.protobuf.message.Message): VersioningOverride._PinnedOverrideBehavior.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED: ( VersioningOverride._PinnedOverrideBehavior.ValueType @@ -1811,9 +2077,7 @@ class VersioningOverride(google.protobuf.message.Message): class PinnedOverrideBehavior( _PinnedOverrideBehavior, metaclass=_PinnedOverrideBehaviorEnumTypeWrapper - ): - """Used to specify different sub-types of Pinned override that we plan to add in the future.""" - + ): ... PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED: ( VersioningOverride.PinnedOverrideBehavior.ValueType ) # 0 @@ -1823,6 +2087,7 @@ class VersioningOverride(google.protobuf.message.Message): ) # 1 """Override workflow behavior to be Pinned.""" + @typing.final class PinnedOverride(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1836,7 +2101,16 @@ class VersioningOverride(google.protobuf.message.Message): def version( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: - """Required.""" + """Specifies the Worker Deployment Version to pin this workflow to. + Required if the target workflow is not already pinned to a version. + + If omitted and the target workflow is already pinned, the effective + pinned version will be the existing pinned version. + + If omitted and the target workflow is not pinned, the override request + will be rejected with a PreconditionFailed error. + """ + def __init__( self, *, @@ -1845,59 +2119,125 @@ class VersioningOverride(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["version", b"version"] + self, field_name: typing.Literal["version", b"version"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal["behavior", b"behavior", "version", b"version"], + ) -> None: ... + + @typing.final + class OneTimeOverride(google.protobuf.message.Message): + """Routes Workflow Tasks for this execution to `target_deployment_version` + until a Workflow Task completes on that version, then clears the override. + + This does not force the workflow's normal Versioning Behavior to become + Pinned. After the Workflow Task completes on `target_deployment_version`, + the workflow execution's normal Versioning Behavior and Deployment Version + are taken from the worker's completion response. + + Example: if an execution is one-time moved from version X to version Y, and + version Z later becomes current: + - if worker Y reports Pinned, the execution stays on Y; + - if worker Y reports AutoUpgrade, the execution routes to Z on a future + Workflow Task; + - if worker Y reports Pinned and the workflow uses upgrade-on-continue-as-new, + the current run stays on Y and the execution can route to Z after + continue-as-new. + + If no Workflow Task completes on `target_deployment_version`, this override + remains pending. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TARGET_DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int + @property + def target_deployment_version( + self, + ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: + """Required. Worker Deployment Version to receive the one-time Workflow Task.""" + + def __init__( + self, + *, + target_deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion + | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "target_deployment_version", b"target_deployment_version" + ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "behavior", b"behavior", "version", b"version" + field_name: typing.Literal[ + "target_deployment_version", b"target_deployment_version" ], ) -> None: ... PINNED_FIELD_NUMBER: builtins.int AUTO_UPGRADE_FIELD_NUMBER: builtins.int + ONE_TIME_FIELD_NUMBER: builtins.int BEHAVIOR_FIELD_NUMBER: builtins.int DEPLOYMENT_FIELD_NUMBER: builtins.int PINNED_VERSION_FIELD_NUMBER: builtins.int - @property - def pinned(self) -> global___VersioningOverride.PinnedOverride: - """Send the next workflow task to the Version specified in the override.""" auto_upgrade: builtins.bool - """Send the next workflow task to the Current Deployment Version - of its Task Queue when the next workflow task is dispatched. - """ + """Override the workflow to have AutoUpgrade behavior.""" behavior: temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType """Required. Deprecated. Use `override`. """ - @property - def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: - """Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`. - Identifies the worker deployment to pin the workflow to. - Deprecated. Use `override.pinned.version`. - """ pinned_version: builtins.str """Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`. Identifies the worker deployment version to pin the workflow to, in the format ".". Deprecated. Use `override.pinned.version`. """ + @property + def pinned(self) -> global___VersioningOverride.PinnedOverride: + """Override the workflow to have Pinned behavior. This is a sticky override: + Workflow Tasks continue to route according to this override until it is + explicitly removed. + """ + + @property + def one_time(self) -> global___VersioningOverride.OneTimeOverride: + """Override Workflow Task routing to a specific Worker Deployment Version until + one Workflow Task completes there. After completion, the workflow execution's + Versioning Behavior and Deployment Version come from the worker's completion + response. + (-- api-linter: core::0142::time-field-type=disabled + aip.dev/not-precedent: one_time describes one-time routing semantics, not a timestamp or duration. --) + """ + + @property + def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: + """Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`. + Identifies the worker deployment to pin the workflow to. + Deprecated. Use `override.pinned.version`. + """ + def __init__( self, *, pinned: global___VersioningOverride.PinnedOverride | None = ..., auto_upgrade: builtins.bool = ..., + one_time: global___VersioningOverride.OneTimeOverride | None = ..., behavior: temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType = ..., deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ..., pinned_version: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "auto_upgrade", b"auto_upgrade", "deployment", b"deployment", + "one_time", + b"one_time", "override", b"override", "pinned", @@ -1906,13 +2246,15 @@ class VersioningOverride(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "auto_upgrade", b"auto_upgrade", "behavior", b"behavior", "deployment", b"deployment", + "one_time", + b"one_time", "override", b"override", "pinned", @@ -1922,11 +2264,12 @@ class VersioningOverride(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["override", b"override"] - ) -> typing_extensions.Literal["pinned", "auto_upgrade"] | None: ... + self, oneof_group: typing.Literal["override", b"override"] + ) -> typing.Literal["pinned", "auto_upgrade", "one_time"] | None: ... global___VersioningOverride = VersioningOverride +@typing.final class OnConflictOptions(google.protobuf.message.Message): """When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and there is already an existing running workflow, OnConflictOptions defines actions to be taken on @@ -1954,7 +2297,7 @@ class OnConflictOptions(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attach_completion_callbacks", b"attach_completion_callbacks", "attach_links", @@ -1966,6 +2309,7 @@ class OnConflictOptions(google.protobuf.message.Message): global___OnConflictOptions = OnConflictOptions +@typing.final class RequestIdInfo(google.protobuf.message.Message): """RequestIdInfo contains details of a request ID.""" @@ -1994,7 +2338,7 @@ class RequestIdInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "buffered", b"buffered", "event_id", @@ -2006,11 +2350,13 @@ class RequestIdInfo(google.protobuf.message.Message): global___RequestIdInfo = RequestIdInfo +@typing.final class PostResetOperation(google.protobuf.message.Message): """PostResetOperation represents an operation to be performed on the new workflow execution after a workflow reset.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class SignalWorkflow(google.protobuf.message.Message): """SignalWorkflow represents sending a signal after a workflow reset. Keep the parameter in sync with temporalio.api.workflowservice.v1.SignalWorkflowExecutionRequest. @@ -2027,9 +2373,11 @@ class PostResetOperation(google.protobuf.message.Message): @property def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Serialized value(s) to provide with the signal.""" + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: """Headers that are passed with the signal to the processing workflow.""" + @property def links( self, @@ -2037,6 +2385,7 @@ class PostResetOperation(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Link ]: """Links to be associated with the WorkflowExecutionSignaled event.""" + def __init__( self, *, @@ -2047,14 +2396,11 @@ class PostResetOperation(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "header", b"header", "input", b"input" - ], + self, field_name: typing.Literal["header", b"header", "input", b"input"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "input", @@ -2066,6 +2412,7 @@ class PostResetOperation(google.protobuf.message.Message): ], ) -> None: ... + @typing.final class UpdateWorkflowOptions(google.protobuf.message.Message): """UpdateWorkflowOptions represents updating workflow execution options after a workflow reset. Keep the parameters in sync with temporalio.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest. @@ -2078,11 +2425,13 @@ class PostResetOperation(google.protobuf.message.Message): @property def workflow_execution_options(self) -> global___WorkflowExecutionOptions: """Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask.""" + @property def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: """Controls which fields from `workflow_execution_options` will be applied. To unset a field, set it to null and use the update mask to indicate that it should be mutated. """ + def __init__( self, *, @@ -2091,7 +2440,7 @@ class PostResetOperation(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "update_mask", b"update_mask", "workflow_execution_options", @@ -2100,7 +2449,7 @@ class PostResetOperation(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "update_mask", b"update_mask", "workflow_execution_options", @@ -2125,7 +2474,7 @@ class PostResetOperation(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "signal_workflow", b"signal_workflow", "update_workflow_options", @@ -2136,7 +2485,7 @@ class PostResetOperation(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "signal_workflow", b"signal_workflow", "update_workflow_options", @@ -2146,9 +2495,43 @@ class PostResetOperation(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> ( - typing_extensions.Literal["signal_workflow", "update_workflow_options"] | None - ): ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["signal_workflow", "update_workflow_options"] | None: ... global___PostResetOperation = PostResetOperation + +@typing.final +class WorkflowExecutionPauseInfo(google.protobuf.message.Message): + """WorkflowExecutionPauseInfo contains the information about a workflow execution pause.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + IDENTITY_FIELD_NUMBER: builtins.int + PAUSED_TIME_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + identity: builtins.str + """The identity of the client who paused the workflow execution.""" + reason: builtins.str + """The reason for pausing the workflow execution.""" + @property + def paused_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The time when the workflow execution was paused.""" + + def __init__( + self, + *, + identity: builtins.str = ..., + paused_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + reason: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["paused_time", b"paused_time"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "identity", b"identity", "paused_time", b"paused_time", "reason", b"reason" + ], + ) -> None: ... + +global___WorkflowExecutionPauseInfo = WorkflowExecutionPauseInfo diff --git a/temporalio/api/workflowservice/v1/__init__.py b/temporalio/api/workflowservice/v1/__init__.py index 0ca53de25f..c0d646eb44 100644 --- a/temporalio/api/workflowservice/v1/__init__.py +++ b/temporalio/api/workflowservice/v1/__init__.py @@ -1,10 +1,26 @@ from .request_response_pb2 import ( + CountActivityExecutionsRequest, + CountActivityExecutionsResponse, + CountNexusOperationExecutionsRequest, + CountNexusOperationExecutionsResponse, + CountSchedulesRequest, + CountSchedulesResponse, + CountWorkersRequest, + CountWorkersResponse, CountWorkflowExecutionsRequest, CountWorkflowExecutionsResponse, CreateScheduleRequest, CreateScheduleResponse, + CreateWorkerDeploymentRequest, + CreateWorkerDeploymentResponse, + CreateWorkerDeploymentVersionRequest, + CreateWorkerDeploymentVersionResponse, CreateWorkflowRuleRequest, CreateWorkflowRuleResponse, + DeleteActivityExecutionRequest, + DeleteActivityExecutionResponse, + DeleteNexusOperationExecutionRequest, + DeleteNexusOperationExecutionResponse, DeleteScheduleRequest, DeleteScheduleResponse, DeleteWorkerDeploymentRequest, @@ -17,12 +33,16 @@ DeleteWorkflowRuleResponse, DeprecateNamespaceRequest, DeprecateNamespaceResponse, + DescribeActivityExecutionRequest, + DescribeActivityExecutionResponse, DescribeBatchOperationRequest, DescribeBatchOperationResponse, DescribeDeploymentRequest, DescribeDeploymentResponse, DescribeNamespaceRequest, DescribeNamespaceResponse, + DescribeNexusOperationExecutionRequest, + DescribeNexusOperationExecutionResponse, DescribeScheduleRequest, DescribeScheduleResponse, DescribeTaskQueueRequest, @@ -61,6 +81,8 @@ GetWorkflowExecutionHistoryResponse, GetWorkflowExecutionHistoryReverseRequest, GetWorkflowExecutionHistoryReverseResponse, + ListActivityExecutionsRequest, + ListActivityExecutionsResponse, ListArchivedWorkflowExecutionsRequest, ListArchivedWorkflowExecutionsResponse, ListBatchOperationsRequest, @@ -71,6 +93,8 @@ ListDeploymentsResponse, ListNamespacesRequest, ListNamespacesResponse, + ListNexusOperationExecutionsRequest, + ListNexusOperationExecutionsResponse, ListOpenWorkflowExecutionsRequest, ListOpenWorkflowExecutionsResponse, ListScheduleMatchingTimesRequest, @@ -89,12 +113,22 @@ ListWorkflowRulesResponse, PatchScheduleRequest, PatchScheduleResponse, + PauseActivityExecutionRequest, + PauseActivityExecutionResponse, PauseActivityRequest, PauseActivityResponse, + PauseWorkflowExecutionRequest, + PauseWorkflowExecutionResponse, + PollActivityExecutionRequest, + PollActivityExecutionResponse, PollActivityTaskQueueRequest, PollActivityTaskQueueResponse, + PollNexusOperationExecutionRequest, + PollNexusOperationExecutionResponse, PollNexusTaskQueueRequest, PollNexusTaskQueueResponse, + PollWorkflowExecutionTimeSkippingRequest, + PollWorkflowExecutionTimeSkippingResponse, PollWorkflowExecutionUpdateRequest, PollWorkflowExecutionUpdateResponse, PollWorkflowTaskQueueRequest, @@ -109,8 +143,14 @@ RecordWorkerHeartbeatResponse, RegisterNamespaceRequest, RegisterNamespaceResponse, + RequestCancelActivityExecutionRequest, + RequestCancelActivityExecutionResponse, + RequestCancelNexusOperationExecutionRequest, + RequestCancelNexusOperationExecutionResponse, RequestCancelWorkflowExecutionRequest, RequestCancelWorkflowExecutionResponse, + ResetActivityExecutionRequest, + ResetActivityExecutionResponse, ResetActivityRequest, ResetActivityResponse, ResetStickyTaskQueueRequest, @@ -155,18 +195,32 @@ SignalWithStartWorkflowExecutionResponse, SignalWorkflowExecutionRequest, SignalWorkflowExecutionResponse, + StartActivityExecutionRequest, + StartActivityExecutionResponse, StartBatchOperationRequest, StartBatchOperationResponse, + StartNexusOperationExecutionRequest, + StartNexusOperationExecutionResponse, StartWorkflowExecutionRequest, StartWorkflowExecutionResponse, StopBatchOperationRequest, StopBatchOperationResponse, + TerminateActivityExecutionRequest, + TerminateActivityExecutionResponse, + TerminateNexusOperationExecutionRequest, + TerminateNexusOperationExecutionResponse, TerminateWorkflowExecutionRequest, TerminateWorkflowExecutionResponse, TriggerWorkflowRuleRequest, TriggerWorkflowRuleResponse, + UnpauseActivityExecutionRequest, + UnpauseActivityExecutionResponse, UnpauseActivityRequest, UnpauseActivityResponse, + UnpauseWorkflowExecutionRequest, + UnpauseWorkflowExecutionResponse, + UpdateActivityExecutionOptionsRequest, + UpdateActivityExecutionOptionsResponse, UpdateActivityOptionsRequest, UpdateActivityOptionsResponse, UpdateNamespaceRequest, @@ -179,6 +233,8 @@ UpdateWorkerBuildIdCompatibilityResponse, UpdateWorkerConfigRequest, UpdateWorkerConfigResponse, + UpdateWorkerDeploymentVersionComputeConfigRequest, + UpdateWorkerDeploymentVersionComputeConfigResponse, UpdateWorkerDeploymentVersionMetadataRequest, UpdateWorkerDeploymentVersionMetadataResponse, UpdateWorkerVersioningRulesRequest, @@ -187,15 +243,33 @@ UpdateWorkflowExecutionOptionsResponse, UpdateWorkflowExecutionRequest, UpdateWorkflowExecutionResponse, + ValidateWorkerDeploymentVersionComputeConfigRequest, + ValidateWorkerDeploymentVersionComputeConfigResponse, ) __all__ = [ + "CountActivityExecutionsRequest", + "CountActivityExecutionsResponse", + "CountNexusOperationExecutionsRequest", + "CountNexusOperationExecutionsResponse", + "CountSchedulesRequest", + "CountSchedulesResponse", + "CountWorkersRequest", + "CountWorkersResponse", "CountWorkflowExecutionsRequest", "CountWorkflowExecutionsResponse", "CreateScheduleRequest", "CreateScheduleResponse", + "CreateWorkerDeploymentRequest", + "CreateWorkerDeploymentResponse", + "CreateWorkerDeploymentVersionRequest", + "CreateWorkerDeploymentVersionResponse", "CreateWorkflowRuleRequest", "CreateWorkflowRuleResponse", + "DeleteActivityExecutionRequest", + "DeleteActivityExecutionResponse", + "DeleteNexusOperationExecutionRequest", + "DeleteNexusOperationExecutionResponse", "DeleteScheduleRequest", "DeleteScheduleResponse", "DeleteWorkerDeploymentRequest", @@ -208,12 +282,16 @@ "DeleteWorkflowRuleResponse", "DeprecateNamespaceRequest", "DeprecateNamespaceResponse", + "DescribeActivityExecutionRequest", + "DescribeActivityExecutionResponse", "DescribeBatchOperationRequest", "DescribeBatchOperationResponse", "DescribeDeploymentRequest", "DescribeDeploymentResponse", "DescribeNamespaceRequest", "DescribeNamespaceResponse", + "DescribeNexusOperationExecutionRequest", + "DescribeNexusOperationExecutionResponse", "DescribeScheduleRequest", "DescribeScheduleResponse", "DescribeTaskQueueRequest", @@ -252,6 +330,8 @@ "GetWorkflowExecutionHistoryResponse", "GetWorkflowExecutionHistoryReverseRequest", "GetWorkflowExecutionHistoryReverseResponse", + "ListActivityExecutionsRequest", + "ListActivityExecutionsResponse", "ListArchivedWorkflowExecutionsRequest", "ListArchivedWorkflowExecutionsResponse", "ListBatchOperationsRequest", @@ -262,6 +342,8 @@ "ListDeploymentsResponse", "ListNamespacesRequest", "ListNamespacesResponse", + "ListNexusOperationExecutionsRequest", + "ListNexusOperationExecutionsResponse", "ListOpenWorkflowExecutionsRequest", "ListOpenWorkflowExecutionsResponse", "ListScheduleMatchingTimesRequest", @@ -280,12 +362,22 @@ "ListWorkflowRulesResponse", "PatchScheduleRequest", "PatchScheduleResponse", + "PauseActivityExecutionRequest", + "PauseActivityExecutionResponse", "PauseActivityRequest", "PauseActivityResponse", + "PauseWorkflowExecutionRequest", + "PauseWorkflowExecutionResponse", + "PollActivityExecutionRequest", + "PollActivityExecutionResponse", "PollActivityTaskQueueRequest", "PollActivityTaskQueueResponse", + "PollNexusOperationExecutionRequest", + "PollNexusOperationExecutionResponse", "PollNexusTaskQueueRequest", "PollNexusTaskQueueResponse", + "PollWorkflowExecutionTimeSkippingRequest", + "PollWorkflowExecutionTimeSkippingResponse", "PollWorkflowExecutionUpdateRequest", "PollWorkflowExecutionUpdateResponse", "PollWorkflowTaskQueueRequest", @@ -300,8 +392,14 @@ "RecordWorkerHeartbeatResponse", "RegisterNamespaceRequest", "RegisterNamespaceResponse", + "RequestCancelActivityExecutionRequest", + "RequestCancelActivityExecutionResponse", + "RequestCancelNexusOperationExecutionRequest", + "RequestCancelNexusOperationExecutionResponse", "RequestCancelWorkflowExecutionRequest", "RequestCancelWorkflowExecutionResponse", + "ResetActivityExecutionRequest", + "ResetActivityExecutionResponse", "ResetActivityRequest", "ResetActivityResponse", "ResetStickyTaskQueueRequest", @@ -346,18 +444,32 @@ "SignalWithStartWorkflowExecutionResponse", "SignalWorkflowExecutionRequest", "SignalWorkflowExecutionResponse", + "StartActivityExecutionRequest", + "StartActivityExecutionResponse", "StartBatchOperationRequest", "StartBatchOperationResponse", + "StartNexusOperationExecutionRequest", + "StartNexusOperationExecutionResponse", "StartWorkflowExecutionRequest", "StartWorkflowExecutionResponse", "StopBatchOperationRequest", "StopBatchOperationResponse", + "TerminateActivityExecutionRequest", + "TerminateActivityExecutionResponse", + "TerminateNexusOperationExecutionRequest", + "TerminateNexusOperationExecutionResponse", "TerminateWorkflowExecutionRequest", "TerminateWorkflowExecutionResponse", "TriggerWorkflowRuleRequest", "TriggerWorkflowRuleResponse", + "UnpauseActivityExecutionRequest", + "UnpauseActivityExecutionResponse", "UnpauseActivityRequest", "UnpauseActivityResponse", + "UnpauseWorkflowExecutionRequest", + "UnpauseWorkflowExecutionResponse", + "UpdateActivityExecutionOptionsRequest", + "UpdateActivityExecutionOptionsResponse", "UpdateActivityOptionsRequest", "UpdateActivityOptionsResponse", "UpdateNamespaceRequest", @@ -370,6 +482,8 @@ "UpdateWorkerBuildIdCompatibilityResponse", "UpdateWorkerConfigRequest", "UpdateWorkerConfigResponse", + "UpdateWorkerDeploymentVersionComputeConfigRequest", + "UpdateWorkerDeploymentVersionComputeConfigResponse", "UpdateWorkerDeploymentVersionMetadataRequest", "UpdateWorkerDeploymentVersionMetadataResponse", "UpdateWorkerVersioningRulesRequest", @@ -378,6 +492,8 @@ "UpdateWorkflowExecutionOptionsResponse", "UpdateWorkflowExecutionRequest", "UpdateWorkflowExecutionResponse", + "ValidateWorkerDeploymentVersionComputeConfigRequest", + "ValidateWorkerDeploymentVersionComputeConfigResponse", ] # gRPC is optional @@ -385,6 +501,7 @@ import grpc from .service_pb2_grpc import ( + WorkflowService, # type: ignore WorkflowServiceServicer, WorkflowServiceStub, add_WorkflowServiceServicer_to_server, @@ -392,6 +509,7 @@ __all__.extend( [ + "WorkflowService", "WorkflowServiceServicer", "WorkflowServiceStub", "add_WorkflowServiceServicer_to_server", diff --git a/temporalio/api/workflowservice/v1/request_response_pb2.py b/temporalio/api/workflowservice/v1/request_response_pb2.py index c7cce3d1a6..0a42ea3af4 100644 --- a/temporalio/api/workflowservice/v1/request_response_pb2.py +++ b/temporalio/api/workflowservice/v1/request_response_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -30,9 +29,15 @@ from temporalio.api.common.v1 import ( message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, ) +from temporalio.api.compute.v1 import ( + config_pb2 as temporal_dot_api_dot_compute_dot_v1_dot_config__pb2, +) from temporalio.api.deployment.v1 import ( message_pb2 as temporal_dot_api_dot_deployment_dot_v1_dot_message__pb2, ) +from temporalio.api.enums.v1 import ( + activity_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_activity__pb2, +) from temporalio.api.enums.v1 import ( batch_operation_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_batch__operation__pb2, ) @@ -48,6 +53,9 @@ from temporalio.api.enums.v1 import ( namespace_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_namespace__pb2, ) +from temporalio.api.enums.v1 import ( + nexus_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_nexus__pb2, +) from temporalio.api.enums.v1 import ( query_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_query__pb2, ) @@ -57,6 +65,9 @@ from temporalio.api.enums.v1 import ( task_queue_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_task__queue__pb2, ) +from temporalio.api.enums.v1 import ( + time_skipping_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_time__skipping__pb2, +) from temporalio.api.enums.v1 import ( update_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_update__pb2, ) @@ -78,6 +89,9 @@ from temporalio.api.nexus.v1 import ( message_pb2 as temporal_dot_api_dot_nexus_dot_v1_dot_message__pb2, ) +from temporalio.api.nexusoperation.v1 import ( + message_pb2 as temporal_dot_api_dot_nexusoperation_dot_v1_dot_message__pb2, +) from temporalio.api.protocol.v1 import ( message_pb2 as temporal_dot_api_dot_protocol_dot_v1_dot_message__pb2, ) @@ -119,2944 +133,20 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n6temporal/api/workflowservice/v1/request_response.proto\x12\x1ftemporal.api.workflowservice.v1\x1a+temporal/api/enums/v1/batch_operation.proto\x1a"temporal/api/enums/v1/common.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a%temporal/api/enums/v1/namespace.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a!temporal/api/enums/v1/query.proto\x1a!temporal/api/enums/v1/reset.proto\x1a&temporal/api/enums/v1/task_queue.proto\x1a&temporal/api/enums/v1/deployment.proto\x1a"temporal/api/enums/v1/update.proto\x1a&temporal/api/activity/v1/message.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/history/v1/message.proto\x1a&temporal/api/workflow/v1/message.proto\x1a%temporal/api/command/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a$temporal/api/filter/v1/message.proto\x1a&temporal/api/protocol/v1/message.proto\x1a\'temporal/api/namespace/v1/message.proto\x1a#temporal/api/query/v1/message.proto\x1a)temporal/api/replication/v1/message.proto\x1a#temporal/api/rules/v1/message.proto\x1a\'temporal/api/sdk/v1/worker_config.proto\x1a&temporal/api/schedule/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a%temporal/api/version/v1/message.proto\x1a#temporal/api/batch/v1/message.proto\x1a\x30temporal/api/sdk/v1/task_complete_metadata.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto\x1a#temporal/api/nexus/v1/message.proto\x1a$temporal/api/worker/v1/message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x88\x05\n\x18RegisterNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x13\n\x0bowner_email\x18\x03 \x01(\t\x12\x46\n#workflow_execution_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12G\n\x08\x63lusters\x18\x05 \x03(\x0b\x32\x35.temporal.api.replication.v1.ClusterReplicationConfig\x12\x1b\n\x13\x61\x63tive_cluster_name\x18\x06 \x01(\t\x12Q\n\x04\x64\x61ta\x18\x07 \x03(\x0b\x32\x43.temporal.api.workflowservice.v1.RegisterNamespaceRequest.DataEntry\x12\x16\n\x0esecurity_token\x18\x08 \x01(\t\x12\x1b\n\x13is_global_namespace\x18\t \x01(\x08\x12\x44\n\x16history_archival_state\x18\n \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1c\n\x14history_archival_uri\x18\x0b \x01(\t\x12G\n\x19visibility_archival_state\x18\x0c \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1f\n\x17visibility_archival_uri\x18\r \x01(\t\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1b\n\x19RegisterNamespaceResponse"\x89\x01\n\x15ListNamespacesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\x12\x44\n\x10namespace_filter\x18\x03 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceFilter"\x81\x01\n\x16ListNamespacesResponse\x12N\n\nnamespaces\x18\x01 \x03(\x0b\x32:.temporal.api.workflowservice.v1.DescribeNamespaceResponse\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"9\n\x18\x44\x65scribeNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t"\xec\x02\n\x19\x44\x65scribeNamespaceResponse\x12@\n\x0enamespace_info\x18\x01 \x01(\x0b\x32(.temporal.api.namespace.v1.NamespaceInfo\x12:\n\x06\x63onfig\x18\x02 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceConfig\x12S\n\x12replication_config\x18\x03 \x01(\x0b\x32\x37.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x18\n\x10\x66\x61ilover_version\x18\x04 \x01(\x03\x12\x1b\n\x13is_global_namespace\x18\x05 \x01(\x08\x12\x45\n\x10\x66\x61ilover_history\x18\x06 \x03(\x0b\x32+.temporal.api.replication.v1.FailoverStatus"\xcf\x02\n\x16UpdateNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x43\n\x0bupdate_info\x18\x02 \x01(\x0b\x32..temporal.api.namespace.v1.UpdateNamespaceInfo\x12:\n\x06\x63onfig\x18\x03 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceConfig\x12S\n\x12replication_config\x18\x04 \x01(\x0b\x32\x37.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x16\n\x0esecurity_token\x18\x05 \x01(\t\x12\x19\n\x11\x64\x65lete_bad_binary\x18\x06 \x01(\t\x12\x19\n\x11promote_namespace\x18\x07 \x01(\x08"\xa3\x02\n\x17UpdateNamespaceResponse\x12@\n\x0enamespace_info\x18\x01 \x01(\x0b\x32(.temporal.api.namespace.v1.NamespaceInfo\x12:\n\x06\x63onfig\x18\x02 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceConfig\x12S\n\x12replication_config\x18\x03 \x01(\x0b\x32\x37.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x18\n\x10\x66\x61ilover_version\x18\x04 \x01(\x03\x12\x1b\n\x13is_global_namespace\x18\x05 \x01(\x08"F\n\x19\x44\x65precateNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x16\n\x0esecurity_token\x18\x02 \x01(\t"\x1c\n\x1a\x44\x65precateNamespaceResponse"\x87\x0c\n\x1dStartWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x10\n\x08identity\x18\t \x01(\t\x12\x12\n\nrequest_id\x18\n \x01(\t\x12N\n\x18workflow_id_reuse_policy\x18\x0b \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12T\n\x1bworkflow_id_conflict_policy\x18\x16 \x01(\x0e\x32/.temporal.api.enums.v1.WorkflowIdConflictPolicy\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\r \x01(\t\x12*\n\x04memo\x18\x0e \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0f \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\x10 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x1f\n\x17request_eager_execution\x18\x11 \x01(\x08\x12;\n\x11\x63ontinued_failure\x18\x12 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\x13 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x14workflow_start_delay\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12>\n\x14\x63ompletion_callbacks\x18\x15 \x03(\x0b\x32 .temporal.api.common.v1.Callback\x12\x38\n\ruser_metadata\x18\x17 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12+\n\x05links\x18\x18 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12I\n\x13versioning_override\x18\x19 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12H\n\x13on_conflict_options\x18\x1a \x01(\x0b\x32+.temporal.api.workflow.v1.OnConflictOptions\x12\x32\n\x08priority\x18\x1b \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12\\\n\x1f\x65\x61ger_worker_deployment_options\x18\x1c \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"\x8a\x02\n\x1eStartWorkflowExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x0f\n\x07started\x18\x03 \x01(\x08\x12>\n\x06status\x18\x05 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatus\x12[\n\x13\x65\x61ger_workflow_task\x18\x02 \x01(\x0b\x32>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\x12*\n\x04link\x18\x04 \x01(\x0b\x32\x1c.temporal.api.common.v1.Link"\xaa\x02\n"GetWorkflowExecutionHistoryRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x19\n\x11maximum_page_size\x18\x03 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\x0c\x12\x16\n\x0ewait_new_event\x18\x05 \x01(\x08\x12P\n\x19history_event_filter_type\x18\x06 \x01(\x0e\x32-.temporal.api.enums.v1.HistoryEventFilterType\x12\x15\n\rskip_archival\x18\x07 \x01(\x08"\xba\x01\n#GetWorkflowExecutionHistoryResponse\x12\x31\n\x07history\x18\x01 \x01(\x0b\x32 .temporal.api.history.v1.History\x12\x35\n\x0braw_history\x18\x02 \x03(\x0b\x32 .temporal.api.common.v1.DataBlob\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x10\n\x08\x61rchived\x18\x04 \x01(\x08"\xb0\x01\n)GetWorkflowExecutionHistoryReverseRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x19\n\x11maximum_page_size\x18\x03 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\x0c"x\n*GetWorkflowExecutionHistoryReverseResponse\x12\x31\n\x07history\x18\x01 \x01(\x0b\x32 .temporal.api.history.v1.History\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c"\x8a\x03\n\x1cPollWorkflowTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x1b\n\x0f\x62inary_checksum\x18\x04 \x01(\tB\x02\x18\x01\x12Z\n\x1bworker_version_capabilities\x18\x05 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilitiesB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x06 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12\x41\n\x10worker_heartbeat\x18\x07 \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat"\x91\x07\n\x1dPollWorkflowTaskQueueResponse\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12!\n\x19previous_started_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03\x12\x0f\n\x07\x61ttempt\x18\x06 \x01(\x05\x12\x1a\n\x12\x62\x61\x63klog_count_hint\x18\x07 \x01(\x03\x12\x31\n\x07history\x18\x08 \x01(\x0b\x32 .temporal.api.history.v1.History\x12\x17\n\x0fnext_page_token\x18\t \x01(\x0c\x12\x33\n\x05query\x18\n \x01(\x0b\x32$.temporal.api.query.v1.WorkflowQuery\x12K\n\x1dworkflow_execution_task_queue\x18\x0b \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x32\n\x0escheduled_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\\\n\x07queries\x18\x0e \x03(\x0b\x32K.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse.QueriesEntry\x12\x33\n\x08messages\x18\x0f \x03(\x0b\x32!.temporal.api.protocol.v1.Message\x12Q\n\x17poller_scaling_decision\x18\x10 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.PollerScalingDecision\x1aT\n\x0cQueriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.temporal.api.query.v1.WorkflowQuery:\x02\x38\x01"\xb5\t\n#RespondWorkflowTaskCompletedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x32\n\x08\x63ommands\x18\x02 \x03(\x0b\x32 .temporal.api.command.v1.Command\x12\x10\n\x08identity\x18\x03 \x01(\t\x12O\n\x11sticky_attributes\x18\x04 \x01(\x0b\x32\x34.temporal.api.taskqueue.v1.StickyExecutionAttributes\x12 \n\x18return_new_workflow_task\x18\x05 \x01(\x08\x12&\n\x1e\x66orce_create_new_workflow_task\x18\x06 \x01(\x08\x12\x1b\n\x0f\x62inary_checksum\x18\x07 \x01(\tB\x02\x18\x01\x12m\n\rquery_results\x18\x08 \x03(\x0b\x32V.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.QueryResultsEntry\x12\x11\n\tnamespace\x18\t \x01(\t\x12L\n\x14worker_version_stamp\x18\n \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12\x33\n\x08messages\x18\x0b \x03(\x0b\x32!.temporal.api.protocol.v1.Message\x12H\n\x0csdk_metadata\x18\x0c \x01(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowTaskCompletedMetadata\x12\x43\n\x11metering_metadata\x18\r \x01(\x0b\x32(.temporal.api.common.v1.MeteringMetadata\x12g\n\x0c\x63\x61pabilities\x18\x0e \x01(\x0b\x32Q.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities\x12>\n\ndeployment\x18\x0f \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12\x46\n\x13versioning_behavior\x18\x10 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehavior\x12O\n\x12\x64\x65ployment_options\x18\x11 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x1a_\n\x11QueryResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.temporal.api.query.v1.WorkflowQueryResult:\x02\x38\x01\x1a\x45\n\x0c\x43\x61pabilities\x12\x35\n-discard_speculative_workflow_task_with_events\x18\x01 \x01(\x08"\xf5\x01\n$RespondWorkflowTaskCompletedResponse\x12U\n\rworkflow_task\x18\x01 \x01(\x0b\x32>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\x12V\n\x0e\x61\x63tivity_tasks\x18\x02 \x03(\x0b\x32>.temporal.api.workflowservice.v1.PollActivityTaskQueueResponse\x12\x1e\n\x16reset_history_event_id\x18\x03 \x01(\x03"\xf8\x03\n RespondWorkflowTaskFailedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12=\n\x05\x63\x61use\x18\x02 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCause\x12\x31\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x1b\n\x0f\x62inary_checksum\x18\x05 \x01(\tB\x02\x18\x01\x12\x11\n\tnamespace\x18\x06 \x01(\t\x12\x33\n\x08messages\x18\x07 \x03(\x0b\x32!.temporal.api.protocol.v1.Message\x12\x46\n\x0eworker_version\x18\x08 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\ndeployment\x18\t \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\n \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"#\n!RespondWorkflowTaskFailedResponse"\xb8\x03\n\x1cPollActivityTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x10\n\x08identity\x18\x03 \x01(\t\x12I\n\x13task_queue_metadata\x18\x04 \x01(\x0b\x32,.temporal.api.taskqueue.v1.TaskQueueMetadata\x12Z\n\x1bworker_version_capabilities\x18\x05 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilitiesB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x06 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12\x41\n\x10worker_heartbeat\x18\x07 \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat"\xef\x07\n\x1dPollActivityTaskQueueResponse\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x1a\n\x12workflow_namespace\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x45\n\x12workflow_execution\x18\x04 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\ractivity_type\x18\x05 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x13\n\x0b\x61\x63tivity_id\x18\x06 \x01(\t\x12.\n\x06header\x18\x07 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12/\n\x05input\x18\x08 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12;\n\x11heartbeat_details\x18\t \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x32\n\x0escheduled_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x1e\x63urrent_attempt_scheduled_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\r \x01(\x05\x12<\n\x19schedule_to_close_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x0f \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x10 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x11 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12Q\n\x17poller_scaling_decision\x18\x12 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.PollerScalingDecision\x12\x32\n\x08priority\x18\x13 \x01(\x0b\x32 .temporal.api.common.v1.Priority"\x90\x01\n"RecordActivityTaskHeartbeatRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t"p\n#RecordActivityTaskHeartbeatResponse\x12\x18\n\x10\x63\x61ncel_requested\x18\x01 \x01(\x08\x12\x17\n\x0f\x61\x63tivity_paused\x18\x02 \x01(\x08\x12\x16\n\x0e\x61\x63tivity_reset\x18\x03 \x01(\x08"\xba\x01\n&RecordActivityTaskHeartbeatByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x06 \x01(\t"t\n\'RecordActivityTaskHeartbeatByIdResponse\x12\x18\n\x10\x63\x61ncel_requested\x18\x01 \x01(\x08\x12\x17\n\x0f\x61\x63tivity_paused\x18\x02 \x01(\x08\x12\x16\n\x0e\x61\x63tivity_reset\x18\x03 \x01(\x08"\xe9\x02\n#RespondActivityTaskCompletedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x30\n\x06result\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12\x46\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\ndeployment\x18\x06 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"&\n$RespondActivityTaskCompletedResponse"\xba\x01\n\'RespondActivityTaskCompletedByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x30\n\x06result\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x06 \x01(\t"*\n(RespondActivityTaskCompletedByIdResponse"\xa9\x03\n RespondActivityTaskFailedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12@\n\x16last_heartbeat_details\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\ndeployment\x18\x07 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x08 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"W\n!RespondActivityTaskFailedResponse\x12\x32\n\x08\x66\x61ilures\x18\x01 \x03(\x0b\x32 .temporal.api.failure.v1.Failure"\xfa\x01\n$RespondActivityTaskFailedByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x06 \x01(\t\x12@\n\x16last_heartbeat_details\x18\x07 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"[\n%RespondActivityTaskFailedByIdResponse\x12\x32\n\x08\x66\x61ilures\x18\x01 \x03(\x0b\x32 .temporal.api.failure.v1.Failure"\xe9\x02\n"RespondActivityTaskCanceledRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12\x46\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\ndeployment\x18\x06 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"%\n#RespondActivityTaskCanceledResponse"\x8b\x02\n&RespondActivityTaskCanceledByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x06 \x01(\t\x12O\n\x12\x64\x65ployment_options\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions")\n\'RespondActivityTaskCanceledByIdResponse"\x84\x02\n%RequestCancelWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x05 \x01(\t\x12\x0e\n\x06reason\x18\x06 \x01(\t\x12+\n\x05links\x18\x07 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link"(\n&RequestCancelWorkflowExecutionResponse"\xde\x02\n\x1eSignalWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0bsignal_name\x18\x03 \x01(\t\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t\x12\x13\n\x07\x63ontrol\x18\x07 \x01(\tB\x02\x18\x01\x12.\n\x06header\x18\x08 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12+\n\x05links\x18\n \x03(\x0b\x32\x1c.temporal.api.common.v1.LinkJ\x04\x08\t\x10\n"!\n\x1fSignalWorkflowExecutionResponse"\xf1\t\n\'SignalWithStartWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x10\n\x08identity\x18\t \x01(\t\x12\x12\n\nrequest_id\x18\n \x01(\t\x12N\n\x18workflow_id_reuse_policy\x18\x0b \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12T\n\x1bworkflow_id_conflict_policy\x18\x16 \x01(\x0e\x32/.temporal.api.enums.v1.WorkflowIdConflictPolicy\x12\x13\n\x0bsignal_name\x18\x0c \x01(\t\x12\x36\n\x0csignal_input\x18\r \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x13\n\x07\x63ontrol\x18\x0e \x01(\tB\x02\x18\x01\x12\x39\n\x0cretry_policy\x18\x0f \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\x10 \x01(\t\x12*\n\x04memo\x18\x11 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x12 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\x13 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x37\n\x14workflow_start_delay\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\ruser_metadata\x18\x17 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12+\n\x05links\x18\x18 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12I\n\x13versioning_override\x18\x19 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12\x32\n\x08priority\x18\x1a \x01(\x0b\x32 .temporal.api.common.v1.PriorityJ\x04\x08\x15\x10\x16"K\n(SignalWithStartWorkflowExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x0f\n\x07started\x18\x02 \x01(\x08"\xc1\x03\n\x1dResetWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12%\n\x1dworkflow_task_finish_event_id\x18\x04 \x01(\x03\x12\x12\n\nrequest_id\x18\x05 \x01(\t\x12G\n\x12reset_reapply_type\x18\x06 \x01(\x0e\x32\'.temporal.api.enums.v1.ResetReapplyTypeB\x02\x18\x01\x12S\n\x1breset_reapply_exclude_types\x18\x07 \x03(\x0e\x32..temporal.api.enums.v1.ResetReapplyExcludeType\x12K\n\x15post_reset_operations\x18\x08 \x03(\x0b\x32,.temporal.api.workflow.v1.PostResetOperation\x12\x10\n\x08identity\x18\t \x01(\t"0\n\x1eResetWorkflowExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t"\x9f\x02\n!TerminateWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x06 \x01(\t\x12+\n\x05links\x18\x07 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link"$\n"TerminateWorkflowExecutionResponse"z\n\x1e\x44\x65leteWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution"!\n\x1f\x44\x65leteWorkflowExecutionResponse"\xc9\x02\n!ListOpenWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x42\n\x11start_time_filter\x18\x04 \x01(\x0b\x32\'.temporal.api.filter.v1.StartTimeFilter\x12K\n\x10\x65xecution_filter\x18\x05 \x01(\x0b\x32/.temporal.api.filter.v1.WorkflowExecutionFilterH\x00\x12\x41\n\x0btype_filter\x18\x06 \x01(\x0b\x32*.temporal.api.filter.v1.WorkflowTypeFilterH\x00\x42\t\n\x07\x66ilters"\x82\x01\n"ListOpenWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\x8a\x03\n#ListClosedWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x42\n\x11start_time_filter\x18\x04 \x01(\x0b\x32\'.temporal.api.filter.v1.StartTimeFilter\x12K\n\x10\x65xecution_filter\x18\x05 \x01(\x0b\x32/.temporal.api.filter.v1.WorkflowExecutionFilterH\x00\x12\x41\n\x0btype_filter\x18\x06 \x01(\x0b\x32*.temporal.api.filter.v1.WorkflowTypeFilterH\x00\x12=\n\rstatus_filter\x18\x07 \x01(\x0b\x32$.temporal.api.filter.v1.StatusFilterH\x00\x42\t\n\x07\x66ilters"\x84\x01\n$ListClosedWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"m\n\x1dListWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"~\n\x1eListWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"u\n%ListArchivedWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"\x86\x01\n&ListArchivedWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"m\n\x1dScanWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"~\n\x1eScanWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"B\n\x1e\x43ountWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t"\xed\x01\n\x1f\x43ountWorkflowExecutionsResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x61\n\x06groups\x18\x02 \x03(\x0b\x32Q.temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup\x1aX\n\x10\x41ggregationGroup\x12\x35\n\x0cgroup_values\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\r\n\x05\x63ount\x18\x02 \x01(\x03"\x1c\n\x1aGetSearchAttributesRequest"\xc9\x01\n\x1bGetSearchAttributesResponse\x12T\n\x04keys\x18\x01 \x03(\x0b\x32\x46.temporal.api.workflowservice.v1.GetSearchAttributesResponse.KeysEntry\x1aT\n\tKeysEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01"\xd0\x02\n RespondQueryTaskCompletedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12>\n\x0e\x63ompleted_type\x18\x02 \x01(\x0e\x32&.temporal.api.enums.v1.QueryResultType\x12\x36\n\x0cquery_result\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x15\n\rerror_message\x18\x04 \x01(\t\x12\x11\n\tnamespace\x18\x06 \x01(\t\x12\x31\n\x07\x66\x61ilure\x18\x07 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12=\n\x05\x63\x61use\x18\x08 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCauseJ\x04\x08\x05\x10\x06"#\n!RespondQueryTaskCompletedResponse"n\n\x1bResetStickyTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution"\x1e\n\x1cResetStickyTaskQueueResponse"\xaa\x01\n\x15ShutdownWorkerRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11sticky_task_queue\x18\x02 \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x0e\n\x06reason\x18\x04 \x01(\t\x12\x41\n\x10worker_heartbeat\x18\x05 \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat"\x18\n\x16ShutdownWorkerResponse"\xe9\x01\n\x14QueryWorkflowRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x33\n\x05query\x18\x03 \x01(\x0b\x32$.temporal.api.query.v1.WorkflowQuery\x12K\n\x16query_reject_condition\x18\x04 \x01(\x0e\x32+.temporal.api.enums.v1.QueryRejectCondition"\x8d\x01\n\x15QueryWorkflowResponse\x12\x36\n\x0cquery_result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12<\n\x0equery_rejected\x18\x02 \x01(\x0b\x32$.temporal.api.query.v1.QueryRejected"s\n DescribeWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution"\x99\x05\n!DescribeWorkflowExecutionResponse\x12K\n\x10\x65xecution_config\x18\x01 \x01(\x0b\x32\x31.temporal.api.workflow.v1.WorkflowExecutionConfig\x12P\n\x17workflow_execution_info\x18\x02 \x01(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12I\n\x12pending_activities\x18\x03 \x03(\x0b\x32-.temporal.api.workflow.v1.PendingActivityInfo\x12M\n\x10pending_children\x18\x04 \x03(\x0b\x32\x33.temporal.api.workflow.v1.PendingChildExecutionInfo\x12P\n\x15pending_workflow_task\x18\x05 \x01(\x0b\x32\x31.temporal.api.workflow.v1.PendingWorkflowTaskInfo\x12\x39\n\tcallbacks\x18\x06 \x03(\x0b\x32&.temporal.api.workflow.v1.CallbackInfo\x12U\n\x18pending_nexus_operations\x18\x07 \x03(\x0b\x32\x33.temporal.api.workflow.v1.PendingNexusOperationInfo\x12W\n\x16workflow_extended_info\x18\x08 \x01(\x0b\x32\x37.temporal.api.workflow.v1.WorkflowExecutionExtendedInfo"\x90\x04\n\x18\x44\x65scribeTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12=\n\x0ftask_queue_type\x18\x03 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12\x14\n\x0creport_stats\x18\x08 \x01(\x08\x12\x15\n\rreport_config\x18\x0b \x01(\x08\x12%\n\x19include_task_queue_status\x18\x04 \x01(\x08\x42\x02\x18\x01\x12\x42\n\x08\x61pi_mode\x18\x05 \x01(\x0e\x32,.temporal.api.enums.v1.DescribeTaskQueueModeB\x02\x18\x01\x12J\n\x08versions\x18\x06 \x01(\x0b\x32\x34.temporal.api.taskqueue.v1.TaskQueueVersionSelectionB\x02\x18\x01\x12\x42\n\x10task_queue_types\x18\x07 \x03(\x0e\x32$.temporal.api.enums.v1.TaskQueueTypeB\x02\x18\x01\x12\x1a\n\x0ereport_pollers\x18\t \x01(\x08\x42\x02\x18\x01\x12$\n\x18report_task_reachability\x18\n \x01(\x08\x42\x02\x18\x01"\xec\x07\n\x19\x44\x65scribeTaskQueueResponse\x12\x36\n\x07pollers\x18\x01 \x03(\x0b\x32%.temporal.api.taskqueue.v1.PollerInfo\x12\x38\n\x05stats\x18\x05 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats\x12q\n\x15stats_by_priority_key\x18\x08 \x03(\x0b\x32R.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.StatsByPriorityKeyEntry\x12K\n\x0fversioning_info\x18\x04 \x01(\x0b\x32\x32.temporal.api.taskqueue.v1.TaskQueueVersioningInfo\x12:\n\x06\x63onfig\x18\x06 \x01(\x0b\x32*.temporal.api.taskqueue.v1.TaskQueueConfig\x12k\n\x14\x65\x66\x66\x65\x63tive_rate_limit\x18\x07 \x01(\x0b\x32M.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit\x12I\n\x11task_queue_status\x18\x02 \x01(\x0b\x32*.temporal.api.taskqueue.v1.TaskQueueStatusB\x02\x18\x01\x12g\n\rversions_info\x18\x03 \x03(\x0b\x32L.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.VersionsInfoEntryB\x02\x18\x01\x1a\x64\n\x17StatsByPriorityKeyEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats:\x02\x38\x01\x1at\n\x12\x45\x66\x66\x65\x63tiveRateLimit\x12\x1b\n\x13requests_per_second\x18\x01 \x01(\x02\x12\x41\n\x11rate_limit_source\x18\x02 \x01(\x0e\x32&.temporal.api.enums.v1.RateLimitSource\x1a\x64\n\x11VersionsInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.temporal.api.taskqueue.v1.TaskQueueVersionInfo:\x02\x38\x01"\x17\n\x15GetClusterInfoRequest"\xd1\x03\n\x16GetClusterInfoResponse\x12h\n\x11supported_clients\x18\x01 \x03(\x0b\x32M.temporal.api.workflowservice.v1.GetClusterInfoResponse.SupportedClientsEntry\x12\x16\n\x0eserver_version\x18\x02 \x01(\t\x12\x12\n\ncluster_id\x18\x03 \x01(\t\x12:\n\x0cversion_info\x18\x04 \x01(\x0b\x32$.temporal.api.version.v1.VersionInfo\x12\x14\n\x0c\x63luster_name\x18\x05 \x01(\t\x12\x1b\n\x13history_shard_count\x18\x06 \x01(\x05\x12\x19\n\x11persistence_store\x18\x07 \x01(\t\x12\x18\n\x10visibility_store\x18\x08 \x01(\t\x12 \n\x18initial_failover_version\x18\t \x01(\x03\x12"\n\x1a\x66\x61ilover_version_increment\x18\n \x01(\x03\x1a\x37\n\x15SupportedClientsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x16\n\x14GetSystemInfoRequest"\xf4\x03\n\x15GetSystemInfoResponse\x12\x16\n\x0eserver_version\x18\x01 \x01(\t\x12Y\n\x0c\x63\x61pabilities\x18\x02 \x01(\x0b\x32\x43.temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities\x1a\xe7\x02\n\x0c\x43\x61pabilities\x12\x1f\n\x17signal_and_query_header\x18\x01 \x01(\x08\x12&\n\x1einternal_error_differentiation\x18\x02 \x01(\x08\x12*\n"activity_failure_include_heartbeat\x18\x03 \x01(\x08\x12\x1a\n\x12supports_schedules\x18\x04 \x01(\x08\x12"\n\x1a\x65ncoded_failure_attributes\x18\x05 \x01(\x08\x12!\n\x19\x62uild_id_based_versioning\x18\x06 \x01(\x08\x12\x13\n\x0bupsert_memo\x18\x07 \x01(\x08\x12\x1c\n\x14\x65\x61ger_workflow_start\x18\x08 \x01(\x08\x12\x14\n\x0csdk_metadata\x18\t \x01(\x08\x12\'\n\x1f\x63ount_group_by_execution_status\x18\n \x01(\x08\x12\r\n\x05nexus\x18\x0b \x01(\x08"m\n\x1eListTaskQueuePartitionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue"\xdf\x01\n\x1fListTaskQueuePartitionsResponse\x12]\n\x1e\x61\x63tivity_task_queue_partitions\x18\x01 \x03(\x0b\x32\x35.temporal.api.taskqueue.v1.TaskQueuePartitionMetadata\x12]\n\x1eworkflow_task_queue_partitions\x18\x02 \x03(\x0b\x32\x35.temporal.api.taskqueue.v1.TaskQueuePartitionMetadata"\xcc\x02\n\x15\x43reateScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x34\n\x08schedule\x18\x03 \x01(\x0b\x32".temporal.api.schedule.v1.Schedule\x12>\n\rinitial_patch\x18\x04 \x01(\x0b\x32\'.temporal.api.schedule.v1.SchedulePatch\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t\x12*\n\x04memo\x18\x07 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x08 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes"0\n\x16\x43reateScheduleResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c"A\n\x17\x44\x65scribeScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t"\x8f\x02\n\x18\x44\x65scribeScheduleResponse\x12\x34\n\x08schedule\x18\x01 \x01(\x0b\x32".temporal.api.schedule.v1.Schedule\x12\x34\n\x04info\x18\x02 \x01(\x0b\x32&.temporal.api.schedule.v1.ScheduleInfo\x12*\n\x04memo\x18\x03 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x04 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x16\n\x0e\x63onflict_token\x18\x05 \x01(\x0c"\xf8\x01\n\x15UpdateScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x34\n\x08schedule\x18\x03 \x01(\x0b\x32".temporal.api.schedule.v1.Schedule\x12\x16\n\x0e\x63onflict_token\x18\x04 \x01(\x0c\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t\x12\x43\n\x11search_attributes\x18\x07 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes"\x18\n\x16UpdateScheduleResponse"\x9c\x01\n\x14PatchScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x36\n\x05patch\x18\x03 \x01(\x0b\x32\'.temporal.api.schedule.v1.SchedulePatch\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x12\n\nrequest_id\x18\x05 \x01(\t"\x17\n\x15PatchScheduleResponse"\xa8\x01\n ListScheduleMatchingTimesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"S\n!ListScheduleMatchingTimesResponse\x12.\n\nstart_time\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.Timestamp"Q\n\x15\x44\x65leteScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t"\x18\n\x16\x44\x65leteScheduleResponse"l\n\x14ListSchedulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"p\n\x15ListSchedulesResponse\x12>\n\tschedules\x18\x01 \x03(\x0b\x32+.temporal.api.schedule.v1.ScheduleListEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\x86\x05\n\'UpdateWorkerBuildIdCompatibilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12-\n#add_new_build_id_in_new_default_set\x18\x03 \x01(\tH\x00\x12\x87\x01\n\x1b\x61\x64\x64_new_compatible_build_id\x18\x04 \x01(\x0b\x32`.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersionH\x00\x12!\n\x17promote_set_by_build_id\x18\x05 \x01(\tH\x00\x12%\n\x1bpromote_build_id_within_set\x18\x06 \x01(\tH\x00\x12h\n\nmerge_sets\x18\x07 \x01(\x0b\x32R.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSetsH\x00\x1ao\n\x17\x41\x64\x64NewCompatibleVersion\x12\x14\n\x0cnew_build_id\x18\x01 \x01(\t\x12$\n\x1c\x65xisting_compatible_build_id\x18\x02 \x01(\t\x12\x18\n\x10make_set_default\x18\x03 \x01(\x08\x1aI\n\tMergeSets\x12\x1c\n\x14primary_set_build_id\x18\x01 \x01(\t\x12\x1e\n\x16secondary_set_build_id\x18\x02 \x01(\tB\x0b\n\toperation"@\n(UpdateWorkerBuildIdCompatibilityResponseJ\x04\x08\x01\x10\x02R\x0eversion_set_id"_\n$GetWorkerBuildIdCompatibilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12\x10\n\x08max_sets\x18\x03 \x01(\x05"t\n%GetWorkerBuildIdCompatibilityResponse\x12K\n\x12major_version_sets\x18\x01 \x03(\x0b\x32/.temporal.api.taskqueue.v1.CompatibleVersionSet"\xb5\r\n"UpdateWorkerVersioningRulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12\x16\n\x0e\x63onflict_token\x18\x03 \x01(\x0c\x12\x81\x01\n\x16insert_assignment_rule\x18\x04 \x01(\x0b\x32_.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRuleH\x00\x12\x83\x01\n\x17replace_assignment_rule\x18\x05 \x01(\x0b\x32`.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRuleH\x00\x12\x81\x01\n\x16\x64\x65lete_assignment_rule\x18\x06 \x01(\x0b\x32_.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRuleH\x00\x12\x8c\x01\n\x1c\x61\x64\x64_compatible_redirect_rule\x18\x07 \x01(\x0b\x32\x64.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRuleH\x00\x12\x94\x01\n replace_compatible_redirect_rule\x18\x08 \x01(\x0b\x32h.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRuleH\x00\x12\x92\x01\n\x1f\x64\x65lete_compatible_redirect_rule\x18\t \x01(\x0b\x32g.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRuleH\x00\x12l\n\x0f\x63ommit_build_id\x18\n \x01(\x0b\x32Q.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildIdH\x00\x1aq\n\x1bInsertBuildIdAssignmentRule\x12\x12\n\nrule_index\x18\x01 \x01(\x05\x12>\n\x04rule\x18\x02 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.BuildIdAssignmentRule\x1a\x81\x01\n\x1cReplaceBuildIdAssignmentRule\x12\x12\n\nrule_index\x18\x01 \x01(\x05\x12>\n\x04rule\x18\x02 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.BuildIdAssignmentRule\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\x1a@\n\x1b\x44\x65leteBuildIdAssignmentRule\x12\x12\n\nrule_index\x18\x01 \x01(\x05\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x1aj\n AddCompatibleBuildIdRedirectRule\x12\x46\n\x04rule\x18\x01 \x01(\x0b\x32\x38.temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule\x1an\n$ReplaceCompatibleBuildIdRedirectRule\x12\x46\n\x04rule\x18\x01 \x01(\x0b\x32\x38.temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule\x1a>\n#DeleteCompatibleBuildIdRedirectRule\x12\x17\n\x0fsource_build_id\x18\x01 \x01(\t\x1a\x37\n\rCommitBuildId\x12\x17\n\x0ftarget_build_id\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x42\x0b\n\toperation"\xfc\x01\n#UpdateWorkerVersioningRulesResponse\x12U\n\x10\x61ssignment_rules\x18\x01 \x03(\x0b\x32;.temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule\x12\x66\n\x19\x63ompatible_redirect_rules\x18\x02 \x03(\x0b\x32\x43.temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule\x12\x16\n\x0e\x63onflict_token\x18\x03 \x01(\x0c"H\n\x1fGetWorkerVersioningRulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t"\xf9\x01\n GetWorkerVersioningRulesResponse\x12U\n\x10\x61ssignment_rules\x18\x01 \x03(\x0b\x32;.temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule\x12\x66\n\x19\x63ompatible_redirect_rules\x18\x02 \x03(\x0b\x32\x43.temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule\x12\x16\n\x0e\x63onflict_token\x18\x03 \x01(\x0c"\x9c\x01\n GetWorkerTaskReachabilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tbuild_ids\x18\x02 \x03(\t\x12\x13\n\x0btask_queues\x18\x03 \x03(\t\x12=\n\x0creachability\x18\x04 \x01(\x0e\x32\'.temporal.api.enums.v1.TaskReachability"r\n!GetWorkerTaskReachabilityResponse\x12M\n\x15\x62uild_id_reachability\x18\x01 \x03(\x0b\x32..temporal.api.taskqueue.v1.BuildIdReachability"\x85\x02\n\x1eUpdateWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1e\n\x16\x66irst_execution_run_id\x18\x03 \x01(\t\x12\x37\n\x0bwait_policy\x18\x04 \x01(\x0b\x32".temporal.api.update.v1.WaitPolicy\x12\x30\n\x07request\x18\x05 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request"\xd7\x01\n\x1fUpdateWorkflowExecutionResponse\x12\x35\n\nupdate_ref\x18\x01 \x01(\x0b\x32!.temporal.api.update.v1.UpdateRef\x12\x30\n\x07outcome\x18\x02 \x01(\x0b\x32\x1f.temporal.api.update.v1.Outcome\x12K\n\x05stage\x18\x03 \x01(\x0e\x32<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage"\xf4\x07\n\x1aStartBatchOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x18\n\x10visibility_query\x18\x02 \x01(\t\x12\x0e\n\x06job_id\x18\x03 \x01(\t\x12\x0e\n\x06reason\x18\x04 \x01(\t\x12=\n\nexecutions\x18\x05 \x03(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12!\n\x19max_operations_per_second\x18\x06 \x01(\x02\x12Q\n\x15termination_operation\x18\n \x01(\x0b\x32\x30.temporal.api.batch.v1.BatchOperationTerminationH\x00\x12G\n\x10signal_operation\x18\x0b \x01(\x0b\x32+.temporal.api.batch.v1.BatchOperationSignalH\x00\x12S\n\x16\x63\x61ncellation_operation\x18\x0c \x01(\x0b\x32\x31.temporal.api.batch.v1.BatchOperationCancellationH\x00\x12K\n\x12\x64\x65letion_operation\x18\r \x01(\x0b\x32-.temporal.api.batch.v1.BatchOperationDeletionH\x00\x12\x45\n\x0freset_operation\x18\x0e \x01(\x0b\x32*.temporal.api.batch.v1.BatchOperationResetH\x00\x12p\n!update_workflow_options_operation\x18\x0f \x01(\x0b\x32\x43.temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptionsH\x00\x12^\n\x1cunpause_activities_operation\x18\x10 \x01(\x0b\x32\x36.temporal.api.batch.v1.BatchOperationUnpauseActivitiesH\x00\x12Z\n\x1areset_activities_operation\x18\x11 \x01(\x0b\x32\x34.temporal.api.batch.v1.BatchOperationResetActivitiesH\x00\x12g\n!update_activity_options_operation\x18\x12 \x01(\x0b\x32:.temporal.api.batch.v1.BatchOperationUpdateActivityOptionsH\x00\x42\x0b\n\toperation"\x1d\n\x1bStartBatchOperationResponse"`\n\x19StopBatchOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t"\x1c\n\x1aStopBatchOperationResponse"B\n\x1d\x44\x65scribeBatchOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t"\x92\x03\n\x1e\x44\x65scribeBatchOperationResponse\x12\x41\n\x0eoperation_type\x18\x01 \x01(\x0e\x32).temporal.api.enums.v1.BatchOperationType\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.temporal.api.enums.v1.BatchOperationState\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1d\n\x15total_operation_count\x18\x06 \x01(\x03\x12 \n\x18\x63omplete_operation_count\x18\x07 \x01(\x03\x12\x1f\n\x17\x66\x61ilure_operation_count\x18\x08 \x01(\x03\x12\x10\n\x08identity\x18\t \x01(\t\x12\x0e\n\x06reason\x18\n \x01(\t"[\n\x1aListBatchOperationsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c"y\n\x1bListBatchOperationsResponse\x12\x41\n\x0eoperation_info\x18\x01 \x03(\x0b\x32).temporal.api.batch.v1.BatchOperationInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\xb9\x01\n"PollWorkflowExecutionUpdateRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x35\n\nupdate_ref\x18\x02 \x01(\x0b\x32!.temporal.api.update.v1.UpdateRef\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x37\n\x0bwait_policy\x18\x04 \x01(\x0b\x32".temporal.api.update.v1.WaitPolicy"\xdb\x01\n#PollWorkflowExecutionUpdateResponse\x12\x30\n\x07outcome\x18\x01 \x01(\x0b\x32\x1f.temporal.api.update.v1.Outcome\x12K\n\x05stage\x18\x02 \x01(\x0e\x32<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage\x12\x35\n\nupdate_ref\x18\x03 \x01(\x0b\x32!.temporal.api.update.v1.UpdateRef"\xea\x02\n\x19PollNexusTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x38\n\ntask_queue\x18\x03 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12Z\n\x1bworker_version_capabilities\x18\x04 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilitiesB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x06 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12\x41\n\x10worker_heartbeat\x18\x07 \x03(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat"\xb4\x01\n\x1aPollNexusTaskQueueResponse\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12/\n\x07request\x18\x02 \x01(\x0b\x32\x1e.temporal.api.nexus.v1.Request\x12Q\n\x17poller_scaling_decision\x18\x03 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.PollerScalingDecision"\x8e\x01\n RespondNexusTaskCompletedRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\ntask_token\x18\x03 \x01(\x0c\x12\x31\n\x08response\x18\x04 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.Response"#\n!RespondNexusTaskCompletedResponse"\x8c\x01\n\x1dRespondNexusTaskFailedRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\ntask_token\x18\x03 \x01(\x0c\x12\x32\n\x05\x65rror\x18\x04 \x01(\x0b\x32#.temporal.api.nexus.v1.HandlerError" \n\x1eRespondNexusTaskFailedResponse"\xdf\x02\n\x1c\x45xecuteMultiOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12[\n\noperations\x18\x02 \x03(\x0b\x32G.temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation\x1a\xce\x01\n\tOperation\x12X\n\x0estart_workflow\x18\x01 \x01(\x0b\x32>.temporal.api.workflowservice.v1.StartWorkflowExecutionRequestH\x00\x12Z\n\x0fupdate_workflow\x18\x02 \x01(\x0b\x32?.temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequestH\x00\x42\x0b\n\toperation"\xcc\x02\n\x1d\x45xecuteMultiOperationResponse\x12Z\n\tresponses\x18\x01 \x03(\x0b\x32G.temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response\x1a\xce\x01\n\x08Response\x12Y\n\x0estart_workflow\x18\x01 \x01(\x0b\x32?.temporal.api.workflowservice.v1.StartWorkflowExecutionResponseH\x00\x12[\n\x0fupdate_workflow\x18\x02 \x01(\x0b\x32@.temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponseH\x00\x42\n\n\x08response"\xd0\x02\n\x1cUpdateActivityOptionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x43\n\x10\x61\x63tivity_options\x18\x04 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x0c\n\x02id\x18\x06 \x01(\tH\x00\x12\x0e\n\x04type\x18\x07 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\t \x01(\x08H\x00\x12\x18\n\x10restore_original\x18\x08 \x01(\x08\x42\n\n\x08\x61\x63tivity"d\n\x1dUpdateActivityOptionsResponse\x12\x43\n\x10\x61\x63tivity_options\x18\x01 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions"\xb3\x01\n\x14PauseActivityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x0c\n\x02id\x18\x04 \x01(\tH\x00\x12\x0e\n\x04type\x18\x05 \x01(\tH\x00\x12\x0e\n\x06reason\x18\x06 \x01(\tB\n\n\x08\x61\x63tivity"\x17\n\x15PauseActivityResponse"\x98\x02\n\x16UnpauseActivityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x0c\n\x02id\x18\x04 \x01(\tH\x00\x12\x0e\n\x04type\x18\x05 \x01(\tH\x00\x12\x15\n\x0bunpause_all\x18\x06 \x01(\x08H\x00\x12\x16\n\x0ereset_attempts\x18\x07 \x01(\x08\x12\x17\n\x0freset_heartbeat\x18\x08 \x01(\x08\x12)\n\x06jitter\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\n\n\x08\x61\x63tivity"\x19\n\x17UnpauseActivityResponse"\xb3\x02\n\x14ResetActivityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x0c\n\x02id\x18\x04 \x01(\tH\x00\x12\x0e\n\x04type\x18\x05 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\n \x01(\x08H\x00\x12\x17\n\x0freset_heartbeat\x18\x06 \x01(\x08\x12\x13\n\x0bkeep_paused\x18\x07 \x01(\x08\x12)\n\x06jitter\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x18restore_original_options\x18\t \x01(\x08\x42\n\n\x08\x61\x63tivity"\x17\n\x15ResetActivityResponse"\x8a\x02\n%UpdateWorkflowExecutionOptionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12V\n\x1aworkflow_execution_options\x18\x03 \x01(\x0b\x32\x32.temporal.api.workflow.v1.WorkflowExecutionOptions\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"\x80\x01\n&UpdateWorkflowExecutionOptionsResponse\x12V\n\x1aworkflow_execution_options\x18\x01 \x01(\x0b\x32\x32.temporal.api.workflow.v1.WorkflowExecutionOptions"j\n\x19\x44\x65scribeDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12:\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment"a\n\x1a\x44\x65scribeDeploymentResponse\x12\x43\n\x0f\x64\x65ployment_info\x18\x01 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo"\xc2\x01\n&DescribeWorkerDeploymentVersionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x07version\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x03 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1f\n\x17report_task_queue_stats\x18\x04 \x01(\x08"\x8c\x05\n\'DescribeWorkerDeploymentVersionResponse\x12_\n\x1eworker_deployment_version_info\x18\x01 \x01(\x0b\x32\x37.temporal.api.deployment.v1.WorkerDeploymentVersionInfo\x12v\n\x13version_task_queues\x18\x02 \x03(\x0b\x32Y.temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue\x1a\x87\x03\n\x10VersionTaskQueue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12\x38\n\x05stats\x18\x03 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats\x12\x90\x01\n\x15stats_by_priority_key\x18\x04 \x03(\x0b\x32q.temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue.StatsByPriorityKeyEntry\x1a\x64\n\x17StatsByPriorityKeyEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats:\x02\x38\x01"M\n\x1f\x44\x65scribeWorkerDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t"\x8c\x01\n DescribeWorkerDeploymentResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c\x12P\n\x16worker_deployment_info\x18\x02 \x01(\x0b\x32\x30.temporal.api.deployment.v1.WorkerDeploymentInfo"l\n\x16ListDeploymentsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x13\n\x0bseries_name\x18\x04 \x01(\t"w\n\x17ListDeploymentsResponse\x12\x17\n\x0fnext_page_token\x18\x01 \x01(\x0c\x12\x43\n\x0b\x64\x65ployments\x18\x02 \x03(\x0b\x32..temporal.api.deployment.v1.DeploymentListInfo"\xcd\x01\n\x1bSetCurrentDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12:\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment\x12\x10\n\x08identity\x18\x03 \x01(\t\x12M\n\x0fupdate_metadata\x18\x04 \x01(\x0b\x32\x34.temporal.api.deployment.v1.UpdateDeploymentMetadata"\xb9\x01\n\x1cSetCurrentDeploymentResponse\x12K\n\x17\x63urrent_deployment_info\x18\x01 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo\x12L\n\x18previous_deployment_info\x18\x02 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo"\xe5\x01\n(SetWorkerDeploymentCurrentVersionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12\x13\n\x07version\x18\x03 \x01(\tB\x02\x18\x01\x12\x10\n\x08\x62uild_id\x18\x07 \x01(\t\x12\x16\n\x0e\x63onflict_token\x18\x04 \x01(\x0c\x12\x10\n\x08identity\x18\x05 \x01(\t\x12"\n\x1aignore_missing_task_queues\x18\x06 \x01(\x08\x12\x18\n\x10\x61llow_no_pollers\x18\t \x01(\x08"\xbb\x01\n)SetWorkerDeploymentCurrentVersionResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c\x12\x1c\n\x10previous_version\x18\x02 \x01(\tB\x02\x18\x01\x12X\n\x1bprevious_deployment_version\x18\x03 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion"\xf9\x01\n(SetWorkerDeploymentRampingVersionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12\x13\n\x07version\x18\x03 \x01(\tB\x02\x18\x01\x12\x10\n\x08\x62uild_id\x18\x08 \x01(\t\x12\x12\n\npercentage\x18\x04 \x01(\x02\x12\x16\n\x0e\x63onflict_token\x18\x05 \x01(\x0c\x12\x10\n\x08identity\x18\x06 \x01(\t\x12"\n\x1aignore_missing_task_queues\x18\x07 \x01(\x08\x12\x18\n\x10\x61llow_no_pollers\x18\n \x01(\x08"\xd8\x01\n)SetWorkerDeploymentRampingVersionResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c\x12\x1c\n\x10previous_version\x18\x02 \x01(\tB\x02\x18\x01\x12X\n\x1bprevious_deployment_version\x18\x04 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1b\n\x13previous_percentage\x18\x03 \x01(\x02"]\n\x1cListWorkerDeploymentsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c"\x9f\x05\n\x1dListWorkerDeploymentsResponse\x12\x17\n\x0fnext_page_token\x18\x01 \x01(\x0c\x12r\n\x12worker_deployments\x18\x02 \x03(\x0b\x32V.temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary\x1a\xf0\x03\n\x17WorkerDeploymentSummary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0erouting_config\x18\x03 \x01(\x0b\x32).temporal.api.deployment.v1.RoutingConfig\x12o\n\x16latest_version_summary\x18\x04 \x01(\x0b\x32O.temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary\x12p\n\x17\x63urrent_version_summary\x18\x05 \x01(\x0b\x32O.temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary\x12p\n\x17ramping_version_summary\x18\x06 \x01(\x0b\x32O.temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary"\xc8\x01\n$DeleteWorkerDeploymentVersionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x07version\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x05 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x15\n\rskip_drainage\x18\x03 \x01(\x08\x12\x10\n\x08identity\x18\x04 \x01(\t"\'\n%DeleteWorkerDeploymentVersionResponse"]\n\x1d\x44\x65leteWorkerDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t" \n\x1e\x44\x65leteWorkerDeploymentResponse"\xa2\x03\n,UpdateWorkerDeploymentVersionMetadataRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x07version\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x05 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12x\n\x0eupsert_entries\x18\x03 \x03(\x0b\x32`.temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest.UpsertEntriesEntry\x12\x16\n\x0eremove_entries\x18\x04 \x03(\t\x12\x10\n\x08identity\x18\x06 \x01(\t\x1aU\n\x12UpsertEntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"n\n-UpdateWorkerDeploymentVersionMetadataResponse\x12=\n\x08metadata\x18\x01 \x01(\x0b\x32+.temporal.api.deployment.v1.VersionMetadata"\xbd\x01\n!SetWorkerDeploymentManagerRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12\x1a\n\x10manager_identity\x18\x03 \x01(\tH\x00\x12\x0e\n\x04self\x18\x04 \x01(\x08H\x00\x12\x16\n\x0e\x63onflict_token\x18\x05 \x01(\x0c\x12\x10\n\x08identity\x18\x06 \x01(\tB\x16\n\x14new_manager_identity"_\n"SetWorkerDeploymentManagerResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c\x12!\n\x19previous_manager_identity\x18\x02 \x01(\t"E\n\x1bGetCurrentDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bseries_name\x18\x02 \x01(\t"k\n\x1cGetCurrentDeploymentResponse\x12K\n\x17\x63urrent_deployment_info\x18\x01 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo"q\n GetDeploymentReachabilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12:\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment"\xe3\x01\n!GetDeploymentReachabilityResponse\x12\x43\n\x0f\x64\x65ployment_info\x18\x01 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo\x12\x43\n\x0creachability\x18\x02 \x01(\x0e\x32-.temporal.api.enums.v1.DeploymentReachability\x12\x34\n\x10last_update_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xb4\x01\n\x19\x43reateWorkflowRuleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x35\n\x04spec\x18\x02 \x01(\x0b\x32\'.temporal.api.rules.v1.WorkflowRuleSpec\x12\x12\n\nforce_scan\x18\x03 \x01(\x08\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t"_\n\x1a\x43reateWorkflowRuleResponse\x12\x31\n\x04rule\x18\x01 \x01(\x0b\x32#.temporal.api.rules.v1.WorkflowRule\x12\x0e\n\x06job_id\x18\x02 \x01(\t"A\n\x1b\x44\x65scribeWorkflowRuleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0f\n\x07rule_id\x18\x02 \x01(\t"Q\n\x1c\x44\x65scribeWorkflowRuleResponse\x12\x31\n\x04rule\x18\x01 \x01(\x0b\x32#.temporal.api.rules.v1.WorkflowRule"?\n\x19\x44\x65leteWorkflowRuleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0f\n\x07rule_id\x18\x02 \x01(\t"\x1c\n\x1a\x44\x65leteWorkflowRuleResponse"F\n\x18ListWorkflowRulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"h\n\x19ListWorkflowRulesResponse\x12\x32\n\x05rules\x18\x01 \x03(\x0b\x32#.temporal.api.rules.v1.WorkflowRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\xce\x01\n\x1aTriggerWorkflowRuleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0c\n\x02id\x18\x04 \x01(\tH\x00\x12\x37\n\x04spec\x18\x05 \x01(\x0b\x32\'.temporal.api.rules.v1.WorkflowRuleSpecH\x00\x12\x10\n\x08identity\x18\x03 \x01(\tB\x06\n\x04rule".\n\x1bTriggerWorkflowRuleResponse\x12\x0f\n\x07\x61pplied\x18\x01 \x01(\x08"\x86\x01\n\x1cRecordWorkerHeartbeatRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x41\n\x10worker_heartbeat\x18\x03 \x03(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat"\x1f\n\x1dRecordWorkerHeartbeatResponse"b\n\x12ListWorkersRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"h\n\x13ListWorkersResponse\x12\x38\n\x0cworkers_info\x18\x01 \x03(\x0b\x32".temporal.api.worker.v1.WorkerInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\xe2\x03\n\x1cUpdateTaskQueueConfigRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\ntask_queue\x18\x03 \x01(\t\x12=\n\x0ftask_queue_type\x18\x04 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12n\n\x17update_queue_rate_limit\x18\x05 \x01(\x0b\x32M.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate\x12}\n&update_fairness_key_rate_limit_default\x18\x06 \x01(\x0b\x32M.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate\x1a[\n\x0fRateLimitUpdate\x12\x38\n\nrate_limit\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.RateLimit\x12\x0e\n\x06reason\x18\x02 \x01(\t"[\n\x1dUpdateTaskQueueConfigResponse\x12:\n\x06\x63onfig\x18\x01 \x01(\x0b\x32*.temporal.api.taskqueue.v1.TaskQueueConfig"\x89\x01\n\x18\x46\x65tchWorkerConfigRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x38\n\x08selector\x18\x06 \x01(\x0b\x32&.temporal.api.common.v1.WorkerSelector"U\n\x19\x46\x65tchWorkerConfigResponse\x12\x38\n\rworker_config\x18\x01 \x01(\x0b\x32!.temporal.api.sdk.v1.WorkerConfig"\xf5\x01\n\x19UpdateWorkerConfigRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x38\n\rworker_config\x18\x04 \x01(\x0b\x32!.temporal.api.sdk.v1.WorkerConfig\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x38\n\x08selector\x18\x06 \x01(\x0b\x32&.temporal.api.common.v1.WorkerSelector"d\n\x1aUpdateWorkerConfigResponse\x12:\n\rworker_config\x18\x01 \x01(\x0b\x32!.temporal.api.sdk.v1.WorkerConfigH\x00\x42\n\n\x08response"G\n\x15\x44\x65scribeWorkerRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x1b\n\x13worker_instance_key\x18\x02 \x01(\t"Q\n\x16\x44\x65scribeWorkerResponse\x12\x37\n\x0bworker_info\x18\x01 \x01(\x0b\x32".temporal.api.worker.v1.WorkerInfoB\xbe\x01\n"io.temporal.api.workflowservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/workflowservice/v1;workflowservice\xaa\x02!Temporalio.Api.WorkflowService.V1\xea\x02$Temporalio::Api::WorkflowService::V1b\x06proto3' -) - - -_REGISTERNAMESPACEREQUEST = DESCRIPTOR.message_types_by_name["RegisterNamespaceRequest"] -_REGISTERNAMESPACEREQUEST_DATAENTRY = _REGISTERNAMESPACEREQUEST.nested_types_by_name[ - "DataEntry" -] -_REGISTERNAMESPACERESPONSE = DESCRIPTOR.message_types_by_name[ - "RegisterNamespaceResponse" -] -_LISTNAMESPACESREQUEST = DESCRIPTOR.message_types_by_name["ListNamespacesRequest"] -_LISTNAMESPACESRESPONSE = DESCRIPTOR.message_types_by_name["ListNamespacesResponse"] -_DESCRIBENAMESPACEREQUEST = DESCRIPTOR.message_types_by_name["DescribeNamespaceRequest"] -_DESCRIBENAMESPACERESPONSE = DESCRIPTOR.message_types_by_name[ - "DescribeNamespaceResponse" -] -_UPDATENAMESPACEREQUEST = DESCRIPTOR.message_types_by_name["UpdateNamespaceRequest"] -_UPDATENAMESPACERESPONSE = DESCRIPTOR.message_types_by_name["UpdateNamespaceResponse"] -_DEPRECATENAMESPACEREQUEST = DESCRIPTOR.message_types_by_name[ - "DeprecateNamespaceRequest" -] -_DEPRECATENAMESPACERESPONSE = DESCRIPTOR.message_types_by_name[ - "DeprecateNamespaceResponse" -] -_STARTWORKFLOWEXECUTIONREQUEST = DESCRIPTOR.message_types_by_name[ - "StartWorkflowExecutionRequest" -] -_STARTWORKFLOWEXECUTIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "StartWorkflowExecutionResponse" -] -_GETWORKFLOWEXECUTIONHISTORYREQUEST = DESCRIPTOR.message_types_by_name[ - "GetWorkflowExecutionHistoryRequest" -] -_GETWORKFLOWEXECUTIONHISTORYRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetWorkflowExecutionHistoryResponse" -] -_GETWORKFLOWEXECUTIONHISTORYREVERSEREQUEST = DESCRIPTOR.message_types_by_name[ - "GetWorkflowExecutionHistoryReverseRequest" -] -_GETWORKFLOWEXECUTIONHISTORYREVERSERESPONSE = DESCRIPTOR.message_types_by_name[ - "GetWorkflowExecutionHistoryReverseResponse" -] -_POLLWORKFLOWTASKQUEUEREQUEST = DESCRIPTOR.message_types_by_name[ - "PollWorkflowTaskQueueRequest" -] -_POLLWORKFLOWTASKQUEUERESPONSE = DESCRIPTOR.message_types_by_name[ - "PollWorkflowTaskQueueResponse" -] -_POLLWORKFLOWTASKQUEUERESPONSE_QUERIESENTRY = ( - _POLLWORKFLOWTASKQUEUERESPONSE.nested_types_by_name["QueriesEntry"] -) -_RESPONDWORKFLOWTASKCOMPLETEDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondWorkflowTaskCompletedRequest" -] -_RESPONDWORKFLOWTASKCOMPLETEDREQUEST_QUERYRESULTSENTRY = ( - _RESPONDWORKFLOWTASKCOMPLETEDREQUEST.nested_types_by_name["QueryResultsEntry"] -) -_RESPONDWORKFLOWTASKCOMPLETEDREQUEST_CAPABILITIES = ( - _RESPONDWORKFLOWTASKCOMPLETEDREQUEST.nested_types_by_name["Capabilities"] -) -_RESPONDWORKFLOWTASKCOMPLETEDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondWorkflowTaskCompletedResponse" -] -_RESPONDWORKFLOWTASKFAILEDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondWorkflowTaskFailedRequest" -] -_RESPONDWORKFLOWTASKFAILEDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondWorkflowTaskFailedResponse" -] -_POLLACTIVITYTASKQUEUEREQUEST = DESCRIPTOR.message_types_by_name[ - "PollActivityTaskQueueRequest" -] -_POLLACTIVITYTASKQUEUERESPONSE = DESCRIPTOR.message_types_by_name[ - "PollActivityTaskQueueResponse" -] -_RECORDACTIVITYTASKHEARTBEATREQUEST = DESCRIPTOR.message_types_by_name[ - "RecordActivityTaskHeartbeatRequest" -] -_RECORDACTIVITYTASKHEARTBEATRESPONSE = DESCRIPTOR.message_types_by_name[ - "RecordActivityTaskHeartbeatResponse" -] -_RECORDACTIVITYTASKHEARTBEATBYIDREQUEST = DESCRIPTOR.message_types_by_name[ - "RecordActivityTaskHeartbeatByIdRequest" -] -_RECORDACTIVITYTASKHEARTBEATBYIDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RecordActivityTaskHeartbeatByIdResponse" -] -_RESPONDACTIVITYTASKCOMPLETEDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskCompletedRequest" -] -_RESPONDACTIVITYTASKCOMPLETEDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskCompletedResponse" -] -_RESPONDACTIVITYTASKCOMPLETEDBYIDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskCompletedByIdRequest" -] -_RESPONDACTIVITYTASKCOMPLETEDBYIDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskCompletedByIdResponse" -] -_RESPONDACTIVITYTASKFAILEDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskFailedRequest" -] -_RESPONDACTIVITYTASKFAILEDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskFailedResponse" -] -_RESPONDACTIVITYTASKFAILEDBYIDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskFailedByIdRequest" -] -_RESPONDACTIVITYTASKFAILEDBYIDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskFailedByIdResponse" -] -_RESPONDACTIVITYTASKCANCELEDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskCanceledRequest" -] -_RESPONDACTIVITYTASKCANCELEDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskCanceledResponse" -] -_RESPONDACTIVITYTASKCANCELEDBYIDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskCanceledByIdRequest" -] -_RESPONDACTIVITYTASKCANCELEDBYIDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondActivityTaskCanceledByIdResponse" -] -_REQUESTCANCELWORKFLOWEXECUTIONREQUEST = DESCRIPTOR.message_types_by_name[ - "RequestCancelWorkflowExecutionRequest" -] -_REQUESTCANCELWORKFLOWEXECUTIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "RequestCancelWorkflowExecutionResponse" -] -_SIGNALWORKFLOWEXECUTIONREQUEST = DESCRIPTOR.message_types_by_name[ - "SignalWorkflowExecutionRequest" -] -_SIGNALWORKFLOWEXECUTIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "SignalWorkflowExecutionResponse" -] -_SIGNALWITHSTARTWORKFLOWEXECUTIONREQUEST = DESCRIPTOR.message_types_by_name[ - "SignalWithStartWorkflowExecutionRequest" -] -_SIGNALWITHSTARTWORKFLOWEXECUTIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "SignalWithStartWorkflowExecutionResponse" -] -_RESETWORKFLOWEXECUTIONREQUEST = DESCRIPTOR.message_types_by_name[ - "ResetWorkflowExecutionRequest" -] -_RESETWORKFLOWEXECUTIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "ResetWorkflowExecutionResponse" -] -_TERMINATEWORKFLOWEXECUTIONREQUEST = DESCRIPTOR.message_types_by_name[ - "TerminateWorkflowExecutionRequest" -] -_TERMINATEWORKFLOWEXECUTIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "TerminateWorkflowExecutionResponse" -] -_DELETEWORKFLOWEXECUTIONREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteWorkflowExecutionRequest" -] -_DELETEWORKFLOWEXECUTIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteWorkflowExecutionResponse" -] -_LISTOPENWORKFLOWEXECUTIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "ListOpenWorkflowExecutionsRequest" -] -_LISTOPENWORKFLOWEXECUTIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListOpenWorkflowExecutionsResponse" -] -_LISTCLOSEDWORKFLOWEXECUTIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "ListClosedWorkflowExecutionsRequest" -] -_LISTCLOSEDWORKFLOWEXECUTIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListClosedWorkflowExecutionsResponse" -] -_LISTWORKFLOWEXECUTIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "ListWorkflowExecutionsRequest" -] -_LISTWORKFLOWEXECUTIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListWorkflowExecutionsResponse" -] -_LISTARCHIVEDWORKFLOWEXECUTIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "ListArchivedWorkflowExecutionsRequest" -] -_LISTARCHIVEDWORKFLOWEXECUTIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListArchivedWorkflowExecutionsResponse" -] -_SCANWORKFLOWEXECUTIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "ScanWorkflowExecutionsRequest" -] -_SCANWORKFLOWEXECUTIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "ScanWorkflowExecutionsResponse" -] -_COUNTWORKFLOWEXECUTIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "CountWorkflowExecutionsRequest" -] -_COUNTWORKFLOWEXECUTIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "CountWorkflowExecutionsResponse" -] -_COUNTWORKFLOWEXECUTIONSRESPONSE_AGGREGATIONGROUP = ( - _COUNTWORKFLOWEXECUTIONSRESPONSE.nested_types_by_name["AggregationGroup"] -) -_GETSEARCHATTRIBUTESREQUEST = DESCRIPTOR.message_types_by_name[ - "GetSearchAttributesRequest" -] -_GETSEARCHATTRIBUTESRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetSearchAttributesResponse" -] -_GETSEARCHATTRIBUTESRESPONSE_KEYSENTRY = ( - _GETSEARCHATTRIBUTESRESPONSE.nested_types_by_name["KeysEntry"] -) -_RESPONDQUERYTASKCOMPLETEDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondQueryTaskCompletedRequest" -] -_RESPONDQUERYTASKCOMPLETEDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondQueryTaskCompletedResponse" -] -_RESETSTICKYTASKQUEUEREQUEST = DESCRIPTOR.message_types_by_name[ - "ResetStickyTaskQueueRequest" -] -_RESETSTICKYTASKQUEUERESPONSE = DESCRIPTOR.message_types_by_name[ - "ResetStickyTaskQueueResponse" -] -_SHUTDOWNWORKERREQUEST = DESCRIPTOR.message_types_by_name["ShutdownWorkerRequest"] -_SHUTDOWNWORKERRESPONSE = DESCRIPTOR.message_types_by_name["ShutdownWorkerResponse"] -_QUERYWORKFLOWREQUEST = DESCRIPTOR.message_types_by_name["QueryWorkflowRequest"] -_QUERYWORKFLOWRESPONSE = DESCRIPTOR.message_types_by_name["QueryWorkflowResponse"] -_DESCRIBEWORKFLOWEXECUTIONREQUEST = DESCRIPTOR.message_types_by_name[ - "DescribeWorkflowExecutionRequest" -] -_DESCRIBEWORKFLOWEXECUTIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "DescribeWorkflowExecutionResponse" -] -_DESCRIBETASKQUEUEREQUEST = DESCRIPTOR.message_types_by_name["DescribeTaskQueueRequest"] -_DESCRIBETASKQUEUERESPONSE = DESCRIPTOR.message_types_by_name[ - "DescribeTaskQueueResponse" -] -_DESCRIBETASKQUEUERESPONSE_STATSBYPRIORITYKEYENTRY = ( - _DESCRIBETASKQUEUERESPONSE.nested_types_by_name["StatsByPriorityKeyEntry"] -) -_DESCRIBETASKQUEUERESPONSE_EFFECTIVERATELIMIT = ( - _DESCRIBETASKQUEUERESPONSE.nested_types_by_name["EffectiveRateLimit"] -) -_DESCRIBETASKQUEUERESPONSE_VERSIONSINFOENTRY = ( - _DESCRIBETASKQUEUERESPONSE.nested_types_by_name["VersionsInfoEntry"] -) -_GETCLUSTERINFOREQUEST = DESCRIPTOR.message_types_by_name["GetClusterInfoRequest"] -_GETCLUSTERINFORESPONSE = DESCRIPTOR.message_types_by_name["GetClusterInfoResponse"] -_GETCLUSTERINFORESPONSE_SUPPORTEDCLIENTSENTRY = ( - _GETCLUSTERINFORESPONSE.nested_types_by_name["SupportedClientsEntry"] -) -_GETSYSTEMINFOREQUEST = DESCRIPTOR.message_types_by_name["GetSystemInfoRequest"] -_GETSYSTEMINFORESPONSE = DESCRIPTOR.message_types_by_name["GetSystemInfoResponse"] -_GETSYSTEMINFORESPONSE_CAPABILITIES = _GETSYSTEMINFORESPONSE.nested_types_by_name[ - "Capabilities" -] -_LISTTASKQUEUEPARTITIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "ListTaskQueuePartitionsRequest" -] -_LISTTASKQUEUEPARTITIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListTaskQueuePartitionsResponse" -] -_CREATESCHEDULEREQUEST = DESCRIPTOR.message_types_by_name["CreateScheduleRequest"] -_CREATESCHEDULERESPONSE = DESCRIPTOR.message_types_by_name["CreateScheduleResponse"] -_DESCRIBESCHEDULEREQUEST = DESCRIPTOR.message_types_by_name["DescribeScheduleRequest"] -_DESCRIBESCHEDULERESPONSE = DESCRIPTOR.message_types_by_name["DescribeScheduleResponse"] -_UPDATESCHEDULEREQUEST = DESCRIPTOR.message_types_by_name["UpdateScheduleRequest"] -_UPDATESCHEDULERESPONSE = DESCRIPTOR.message_types_by_name["UpdateScheduleResponse"] -_PATCHSCHEDULEREQUEST = DESCRIPTOR.message_types_by_name["PatchScheduleRequest"] -_PATCHSCHEDULERESPONSE = DESCRIPTOR.message_types_by_name["PatchScheduleResponse"] -_LISTSCHEDULEMATCHINGTIMESREQUEST = DESCRIPTOR.message_types_by_name[ - "ListScheduleMatchingTimesRequest" -] -_LISTSCHEDULEMATCHINGTIMESRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListScheduleMatchingTimesResponse" -] -_DELETESCHEDULEREQUEST = DESCRIPTOR.message_types_by_name["DeleteScheduleRequest"] -_DELETESCHEDULERESPONSE = DESCRIPTOR.message_types_by_name["DeleteScheduleResponse"] -_LISTSCHEDULESREQUEST = DESCRIPTOR.message_types_by_name["ListSchedulesRequest"] -_LISTSCHEDULESRESPONSE = DESCRIPTOR.message_types_by_name["ListSchedulesResponse"] -_UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateWorkerBuildIdCompatibilityRequest" -] -_UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_ADDNEWCOMPATIBLEVERSION = ( - _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST.nested_types_by_name[ - "AddNewCompatibleVersion" - ] -) -_UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_MERGESETS = ( - _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST.nested_types_by_name["MergeSets"] -) -_UPDATEWORKERBUILDIDCOMPATIBILITYRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateWorkerBuildIdCompatibilityResponse" -] -_GETWORKERBUILDIDCOMPATIBILITYREQUEST = DESCRIPTOR.message_types_by_name[ - "GetWorkerBuildIdCompatibilityRequest" -] -_GETWORKERBUILDIDCOMPATIBILITYRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetWorkerBuildIdCompatibilityResponse" -] -_UPDATEWORKERVERSIONINGRULESREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateWorkerVersioningRulesRequest" -] -_UPDATEWORKERVERSIONINGRULESREQUEST_INSERTBUILDIDASSIGNMENTRULE = ( - _UPDATEWORKERVERSIONINGRULESREQUEST.nested_types_by_name[ - "InsertBuildIdAssignmentRule" - ] -) -_UPDATEWORKERVERSIONINGRULESREQUEST_REPLACEBUILDIDASSIGNMENTRULE = ( - _UPDATEWORKERVERSIONINGRULESREQUEST.nested_types_by_name[ - "ReplaceBuildIdAssignmentRule" - ] -) -_UPDATEWORKERVERSIONINGRULESREQUEST_DELETEBUILDIDASSIGNMENTRULE = ( - _UPDATEWORKERVERSIONINGRULESREQUEST.nested_types_by_name[ - "DeleteBuildIdAssignmentRule" - ] -) -_UPDATEWORKERVERSIONINGRULESREQUEST_ADDCOMPATIBLEBUILDIDREDIRECTRULE = ( - _UPDATEWORKERVERSIONINGRULESREQUEST.nested_types_by_name[ - "AddCompatibleBuildIdRedirectRule" - ] -) -_UPDATEWORKERVERSIONINGRULESREQUEST_REPLACECOMPATIBLEBUILDIDREDIRECTRULE = ( - _UPDATEWORKERVERSIONINGRULESREQUEST.nested_types_by_name[ - "ReplaceCompatibleBuildIdRedirectRule" - ] -) -_UPDATEWORKERVERSIONINGRULESREQUEST_DELETECOMPATIBLEBUILDIDREDIRECTRULE = ( - _UPDATEWORKERVERSIONINGRULESREQUEST.nested_types_by_name[ - "DeleteCompatibleBuildIdRedirectRule" - ] -) -_UPDATEWORKERVERSIONINGRULESREQUEST_COMMITBUILDID = ( - _UPDATEWORKERVERSIONINGRULESREQUEST.nested_types_by_name["CommitBuildId"] -) -_UPDATEWORKERVERSIONINGRULESRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateWorkerVersioningRulesResponse" -] -_GETWORKERVERSIONINGRULESREQUEST = DESCRIPTOR.message_types_by_name[ - "GetWorkerVersioningRulesRequest" -] -_GETWORKERVERSIONINGRULESRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetWorkerVersioningRulesResponse" -] -_GETWORKERTASKREACHABILITYREQUEST = DESCRIPTOR.message_types_by_name[ - "GetWorkerTaskReachabilityRequest" -] -_GETWORKERTASKREACHABILITYRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetWorkerTaskReachabilityResponse" -] -_UPDATEWORKFLOWEXECUTIONREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateWorkflowExecutionRequest" -] -_UPDATEWORKFLOWEXECUTIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateWorkflowExecutionResponse" -] -_STARTBATCHOPERATIONREQUEST = DESCRIPTOR.message_types_by_name[ - "StartBatchOperationRequest" -] -_STARTBATCHOPERATIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "StartBatchOperationResponse" -] -_STOPBATCHOPERATIONREQUEST = DESCRIPTOR.message_types_by_name[ - "StopBatchOperationRequest" -] -_STOPBATCHOPERATIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "StopBatchOperationResponse" -] -_DESCRIBEBATCHOPERATIONREQUEST = DESCRIPTOR.message_types_by_name[ - "DescribeBatchOperationRequest" -] -_DESCRIBEBATCHOPERATIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "DescribeBatchOperationResponse" -] -_LISTBATCHOPERATIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "ListBatchOperationsRequest" -] -_LISTBATCHOPERATIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListBatchOperationsResponse" -] -_POLLWORKFLOWEXECUTIONUPDATEREQUEST = DESCRIPTOR.message_types_by_name[ - "PollWorkflowExecutionUpdateRequest" -] -_POLLWORKFLOWEXECUTIONUPDATERESPONSE = DESCRIPTOR.message_types_by_name[ - "PollWorkflowExecutionUpdateResponse" -] -_POLLNEXUSTASKQUEUEREQUEST = DESCRIPTOR.message_types_by_name[ - "PollNexusTaskQueueRequest" -] -_POLLNEXUSTASKQUEUERESPONSE = DESCRIPTOR.message_types_by_name[ - "PollNexusTaskQueueResponse" -] -_RESPONDNEXUSTASKCOMPLETEDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondNexusTaskCompletedRequest" -] -_RESPONDNEXUSTASKCOMPLETEDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondNexusTaskCompletedResponse" -] -_RESPONDNEXUSTASKFAILEDREQUEST = DESCRIPTOR.message_types_by_name[ - "RespondNexusTaskFailedRequest" -] -_RESPONDNEXUSTASKFAILEDRESPONSE = DESCRIPTOR.message_types_by_name[ - "RespondNexusTaskFailedResponse" -] -_EXECUTEMULTIOPERATIONREQUEST = DESCRIPTOR.message_types_by_name[ - "ExecuteMultiOperationRequest" -] -_EXECUTEMULTIOPERATIONREQUEST_OPERATION = ( - _EXECUTEMULTIOPERATIONREQUEST.nested_types_by_name["Operation"] -) -_EXECUTEMULTIOPERATIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "ExecuteMultiOperationResponse" -] -_EXECUTEMULTIOPERATIONRESPONSE_RESPONSE = ( - _EXECUTEMULTIOPERATIONRESPONSE.nested_types_by_name["Response"] -) -_UPDATEACTIVITYOPTIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateActivityOptionsRequest" -] -_UPDATEACTIVITYOPTIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateActivityOptionsResponse" -] -_PAUSEACTIVITYREQUEST = DESCRIPTOR.message_types_by_name["PauseActivityRequest"] -_PAUSEACTIVITYRESPONSE = DESCRIPTOR.message_types_by_name["PauseActivityResponse"] -_UNPAUSEACTIVITYREQUEST = DESCRIPTOR.message_types_by_name["UnpauseActivityRequest"] -_UNPAUSEACTIVITYRESPONSE = DESCRIPTOR.message_types_by_name["UnpauseActivityResponse"] -_RESETACTIVITYREQUEST = DESCRIPTOR.message_types_by_name["ResetActivityRequest"] -_RESETACTIVITYRESPONSE = DESCRIPTOR.message_types_by_name["ResetActivityResponse"] -_UPDATEWORKFLOWEXECUTIONOPTIONSREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateWorkflowExecutionOptionsRequest" -] -_UPDATEWORKFLOWEXECUTIONOPTIONSRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateWorkflowExecutionOptionsResponse" -] -_DESCRIBEDEPLOYMENTREQUEST = DESCRIPTOR.message_types_by_name[ - "DescribeDeploymentRequest" -] -_DESCRIBEDEPLOYMENTRESPONSE = DESCRIPTOR.message_types_by_name[ - "DescribeDeploymentResponse" -] -_DESCRIBEWORKERDEPLOYMENTVERSIONREQUEST = DESCRIPTOR.message_types_by_name[ - "DescribeWorkerDeploymentVersionRequest" -] -_DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "DescribeWorkerDeploymentVersionResponse" -] -_DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE = ( - _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE.nested_types_by_name["VersionTaskQueue"] -) -_DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE_STATSBYPRIORITYKEYENTRY = ( - _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE.nested_types_by_name[ - "StatsByPriorityKeyEntry" - ] -) -_DESCRIBEWORKERDEPLOYMENTREQUEST = DESCRIPTOR.message_types_by_name[ - "DescribeWorkerDeploymentRequest" -] -_DESCRIBEWORKERDEPLOYMENTRESPONSE = DESCRIPTOR.message_types_by_name[ - "DescribeWorkerDeploymentResponse" -] -_LISTDEPLOYMENTSREQUEST = DESCRIPTOR.message_types_by_name["ListDeploymentsRequest"] -_LISTDEPLOYMENTSRESPONSE = DESCRIPTOR.message_types_by_name["ListDeploymentsResponse"] -_SETCURRENTDEPLOYMENTREQUEST = DESCRIPTOR.message_types_by_name[ - "SetCurrentDeploymentRequest" -] -_SETCURRENTDEPLOYMENTRESPONSE = DESCRIPTOR.message_types_by_name[ - "SetCurrentDeploymentResponse" -] -_SETWORKERDEPLOYMENTCURRENTVERSIONREQUEST = DESCRIPTOR.message_types_by_name[ - "SetWorkerDeploymentCurrentVersionRequest" -] -_SETWORKERDEPLOYMENTCURRENTVERSIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "SetWorkerDeploymentCurrentVersionResponse" -] -_SETWORKERDEPLOYMENTRAMPINGVERSIONREQUEST = DESCRIPTOR.message_types_by_name[ - "SetWorkerDeploymentRampingVersionRequest" -] -_SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "SetWorkerDeploymentRampingVersionResponse" -] -_LISTWORKERDEPLOYMENTSREQUEST = DESCRIPTOR.message_types_by_name[ - "ListWorkerDeploymentsRequest" -] -_LISTWORKERDEPLOYMENTSRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListWorkerDeploymentsResponse" -] -_LISTWORKERDEPLOYMENTSRESPONSE_WORKERDEPLOYMENTSUMMARY = ( - _LISTWORKERDEPLOYMENTSRESPONSE.nested_types_by_name["WorkerDeploymentSummary"] -) -_DELETEWORKERDEPLOYMENTVERSIONREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteWorkerDeploymentVersionRequest" -] -_DELETEWORKERDEPLOYMENTVERSIONRESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteWorkerDeploymentVersionResponse" -] -_DELETEWORKERDEPLOYMENTREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteWorkerDeploymentRequest" -] -_DELETEWORKERDEPLOYMENTRESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteWorkerDeploymentResponse" -] -_UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateWorkerDeploymentVersionMetadataRequest" -] -_UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST_UPSERTENTRIESENTRY = ( - _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST.nested_types_by_name[ - "UpsertEntriesEntry" - ] -) -_UPDATEWORKERDEPLOYMENTVERSIONMETADATARESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateWorkerDeploymentVersionMetadataResponse" -] -_SETWORKERDEPLOYMENTMANAGERREQUEST = DESCRIPTOR.message_types_by_name[ - "SetWorkerDeploymentManagerRequest" -] -_SETWORKERDEPLOYMENTMANAGERRESPONSE = DESCRIPTOR.message_types_by_name[ - "SetWorkerDeploymentManagerResponse" -] -_GETCURRENTDEPLOYMENTREQUEST = DESCRIPTOR.message_types_by_name[ - "GetCurrentDeploymentRequest" -] -_GETCURRENTDEPLOYMENTRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetCurrentDeploymentResponse" -] -_GETDEPLOYMENTREACHABILITYREQUEST = DESCRIPTOR.message_types_by_name[ - "GetDeploymentReachabilityRequest" -] -_GETDEPLOYMENTREACHABILITYRESPONSE = DESCRIPTOR.message_types_by_name[ - "GetDeploymentReachabilityResponse" -] -_CREATEWORKFLOWRULEREQUEST = DESCRIPTOR.message_types_by_name[ - "CreateWorkflowRuleRequest" -] -_CREATEWORKFLOWRULERESPONSE = DESCRIPTOR.message_types_by_name[ - "CreateWorkflowRuleResponse" -] -_DESCRIBEWORKFLOWRULEREQUEST = DESCRIPTOR.message_types_by_name[ - "DescribeWorkflowRuleRequest" -] -_DESCRIBEWORKFLOWRULERESPONSE = DESCRIPTOR.message_types_by_name[ - "DescribeWorkflowRuleResponse" -] -_DELETEWORKFLOWRULEREQUEST = DESCRIPTOR.message_types_by_name[ - "DeleteWorkflowRuleRequest" -] -_DELETEWORKFLOWRULERESPONSE = DESCRIPTOR.message_types_by_name[ - "DeleteWorkflowRuleResponse" -] -_LISTWORKFLOWRULESREQUEST = DESCRIPTOR.message_types_by_name["ListWorkflowRulesRequest"] -_LISTWORKFLOWRULESRESPONSE = DESCRIPTOR.message_types_by_name[ - "ListWorkflowRulesResponse" -] -_TRIGGERWORKFLOWRULEREQUEST = DESCRIPTOR.message_types_by_name[ - "TriggerWorkflowRuleRequest" -] -_TRIGGERWORKFLOWRULERESPONSE = DESCRIPTOR.message_types_by_name[ - "TriggerWorkflowRuleResponse" -] -_RECORDWORKERHEARTBEATREQUEST = DESCRIPTOR.message_types_by_name[ - "RecordWorkerHeartbeatRequest" -] -_RECORDWORKERHEARTBEATRESPONSE = DESCRIPTOR.message_types_by_name[ - "RecordWorkerHeartbeatResponse" -] -_LISTWORKERSREQUEST = DESCRIPTOR.message_types_by_name["ListWorkersRequest"] -_LISTWORKERSRESPONSE = DESCRIPTOR.message_types_by_name["ListWorkersResponse"] -_UPDATETASKQUEUECONFIGREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateTaskQueueConfigRequest" -] -_UPDATETASKQUEUECONFIGREQUEST_RATELIMITUPDATE = ( - _UPDATETASKQUEUECONFIGREQUEST.nested_types_by_name["RateLimitUpdate"] -) -_UPDATETASKQUEUECONFIGRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateTaskQueueConfigResponse" -] -_FETCHWORKERCONFIGREQUEST = DESCRIPTOR.message_types_by_name["FetchWorkerConfigRequest"] -_FETCHWORKERCONFIGRESPONSE = DESCRIPTOR.message_types_by_name[ - "FetchWorkerConfigResponse" -] -_UPDATEWORKERCONFIGREQUEST = DESCRIPTOR.message_types_by_name[ - "UpdateWorkerConfigRequest" -] -_UPDATEWORKERCONFIGRESPONSE = DESCRIPTOR.message_types_by_name[ - "UpdateWorkerConfigResponse" -] -_DESCRIBEWORKERREQUEST = DESCRIPTOR.message_types_by_name["DescribeWorkerRequest"] -_DESCRIBEWORKERRESPONSE = DESCRIPTOR.message_types_by_name["DescribeWorkerResponse"] -RegisterNamespaceRequest = _reflection.GeneratedProtocolMessageType( - "RegisterNamespaceRequest", - (_message.Message,), - { - "DataEntry": _reflection.GeneratedProtocolMessageType( - "DataEntry", - (_message.Message,), - { - "DESCRIPTOR": _REGISTERNAMESPACEREQUEST_DATAENTRY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RegisterNamespaceRequest.DataEntry) - }, - ), - "DESCRIPTOR": _REGISTERNAMESPACEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RegisterNamespaceRequest) - }, -) -_sym_db.RegisterMessage(RegisterNamespaceRequest) -_sym_db.RegisterMessage(RegisterNamespaceRequest.DataEntry) - -RegisterNamespaceResponse = _reflection.GeneratedProtocolMessageType( - "RegisterNamespaceResponse", - (_message.Message,), - { - "DESCRIPTOR": _REGISTERNAMESPACERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RegisterNamespaceResponse) - }, -) -_sym_db.RegisterMessage(RegisterNamespaceResponse) - -ListNamespacesRequest = _reflection.GeneratedProtocolMessageType( - "ListNamespacesRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTNAMESPACESREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListNamespacesRequest) - }, -) -_sym_db.RegisterMessage(ListNamespacesRequest) - -ListNamespacesResponse = _reflection.GeneratedProtocolMessageType( - "ListNamespacesResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTNAMESPACESRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListNamespacesResponse) - }, -) -_sym_db.RegisterMessage(ListNamespacesResponse) - -DescribeNamespaceRequest = _reflection.GeneratedProtocolMessageType( - "DescribeNamespaceRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBENAMESPACEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeNamespaceRequest) - }, -) -_sym_db.RegisterMessage(DescribeNamespaceRequest) - -DescribeNamespaceResponse = _reflection.GeneratedProtocolMessageType( - "DescribeNamespaceResponse", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBENAMESPACERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeNamespaceResponse) - }, -) -_sym_db.RegisterMessage(DescribeNamespaceResponse) - -UpdateNamespaceRequest = _reflection.GeneratedProtocolMessageType( - "UpdateNamespaceRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENAMESPACEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateNamespaceRequest) - }, -) -_sym_db.RegisterMessage(UpdateNamespaceRequest) - -UpdateNamespaceResponse = _reflection.GeneratedProtocolMessageType( - "UpdateNamespaceResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATENAMESPACERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateNamespaceResponse) - }, -) -_sym_db.RegisterMessage(UpdateNamespaceResponse) - -DeprecateNamespaceRequest = _reflection.GeneratedProtocolMessageType( - "DeprecateNamespaceRequest", - (_message.Message,), - { - "DESCRIPTOR": _DEPRECATENAMESPACEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeprecateNamespaceRequest) - }, -) -_sym_db.RegisterMessage(DeprecateNamespaceRequest) - -DeprecateNamespaceResponse = _reflection.GeneratedProtocolMessageType( - "DeprecateNamespaceResponse", - (_message.Message,), - { - "DESCRIPTOR": _DEPRECATENAMESPACERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeprecateNamespaceResponse) - }, -) -_sym_db.RegisterMessage(DeprecateNamespaceResponse) - -StartWorkflowExecutionRequest = _reflection.GeneratedProtocolMessageType( - "StartWorkflowExecutionRequest", - (_message.Message,), - { - "DESCRIPTOR": _STARTWORKFLOWEXECUTIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.StartWorkflowExecutionRequest) - }, -) -_sym_db.RegisterMessage(StartWorkflowExecutionRequest) - -StartWorkflowExecutionResponse = _reflection.GeneratedProtocolMessageType( - "StartWorkflowExecutionResponse", - (_message.Message,), - { - "DESCRIPTOR": _STARTWORKFLOWEXECUTIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.StartWorkflowExecutionResponse) - }, -) -_sym_db.RegisterMessage(StartWorkflowExecutionResponse) - -GetWorkflowExecutionHistoryRequest = _reflection.GeneratedProtocolMessageType( - "GetWorkflowExecutionHistoryRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKFLOWEXECUTIONHISTORYREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest) - }, -) -_sym_db.RegisterMessage(GetWorkflowExecutionHistoryRequest) - -GetWorkflowExecutionHistoryResponse = _reflection.GeneratedProtocolMessageType( - "GetWorkflowExecutionHistoryResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKFLOWEXECUTIONHISTORYRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse) - }, -) -_sym_db.RegisterMessage(GetWorkflowExecutionHistoryResponse) - -GetWorkflowExecutionHistoryReverseRequest = _reflection.GeneratedProtocolMessageType( - "GetWorkflowExecutionHistoryReverseRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKFLOWEXECUTIONHISTORYREVERSEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest) - }, -) -_sym_db.RegisterMessage(GetWorkflowExecutionHistoryReverseRequest) - -GetWorkflowExecutionHistoryReverseResponse = _reflection.GeneratedProtocolMessageType( - "GetWorkflowExecutionHistoryReverseResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKFLOWEXECUTIONHISTORYREVERSERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse) - }, -) -_sym_db.RegisterMessage(GetWorkflowExecutionHistoryReverseResponse) - -PollWorkflowTaskQueueRequest = _reflection.GeneratedProtocolMessageType( - "PollWorkflowTaskQueueRequest", - (_message.Message,), - { - "DESCRIPTOR": _POLLWORKFLOWTASKQUEUEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest) - }, -) -_sym_db.RegisterMessage(PollWorkflowTaskQueueRequest) - -PollWorkflowTaskQueueResponse = _reflection.GeneratedProtocolMessageType( - "PollWorkflowTaskQueueResponse", - (_message.Message,), - { - "QueriesEntry": _reflection.GeneratedProtocolMessageType( - "QueriesEntry", - (_message.Message,), - { - "DESCRIPTOR": _POLLWORKFLOWTASKQUEUERESPONSE_QUERIESENTRY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse.QueriesEntry) - }, - ), - "DESCRIPTOR": _POLLWORKFLOWTASKQUEUERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse) - }, -) -_sym_db.RegisterMessage(PollWorkflowTaskQueueResponse) -_sym_db.RegisterMessage(PollWorkflowTaskQueueResponse.QueriesEntry) - -RespondWorkflowTaskCompletedRequest = _reflection.GeneratedProtocolMessageType( - "RespondWorkflowTaskCompletedRequest", - (_message.Message,), - { - "QueryResultsEntry": _reflection.GeneratedProtocolMessageType( - "QueryResultsEntry", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_QUERYRESULTSENTRY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.QueryResultsEntry) - }, - ), - "Capabilities": _reflection.GeneratedProtocolMessageType( - "Capabilities", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_CAPABILITIES, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities) - }, - ), - "DESCRIPTOR": _RESPONDWORKFLOWTASKCOMPLETEDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest) - }, -) -_sym_db.RegisterMessage(RespondWorkflowTaskCompletedRequest) -_sym_db.RegisterMessage(RespondWorkflowTaskCompletedRequest.QueryResultsEntry) -_sym_db.RegisterMessage(RespondWorkflowTaskCompletedRequest.Capabilities) - -RespondWorkflowTaskCompletedResponse = _reflection.GeneratedProtocolMessageType( - "RespondWorkflowTaskCompletedResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDWORKFLOWTASKCOMPLETEDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse) - }, -) -_sym_db.RegisterMessage(RespondWorkflowTaskCompletedResponse) - -RespondWorkflowTaskFailedRequest = _reflection.GeneratedProtocolMessageType( - "RespondWorkflowTaskFailedRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDWORKFLOWTASKFAILEDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest) - }, -) -_sym_db.RegisterMessage(RespondWorkflowTaskFailedRequest) - -RespondWorkflowTaskFailedResponse = _reflection.GeneratedProtocolMessageType( - "RespondWorkflowTaskFailedResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDWORKFLOWTASKFAILEDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse) - }, -) -_sym_db.RegisterMessage(RespondWorkflowTaskFailedResponse) - -PollActivityTaskQueueRequest = _reflection.GeneratedProtocolMessageType( - "PollActivityTaskQueueRequest", - (_message.Message,), - { - "DESCRIPTOR": _POLLACTIVITYTASKQUEUEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PollActivityTaskQueueRequest) - }, -) -_sym_db.RegisterMessage(PollActivityTaskQueueRequest) - -PollActivityTaskQueueResponse = _reflection.GeneratedProtocolMessageType( - "PollActivityTaskQueueResponse", - (_message.Message,), - { - "DESCRIPTOR": _POLLACTIVITYTASKQUEUERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PollActivityTaskQueueResponse) - }, -) -_sym_db.RegisterMessage(PollActivityTaskQueueResponse) - -RecordActivityTaskHeartbeatRequest = _reflection.GeneratedProtocolMessageType( - "RecordActivityTaskHeartbeatRequest", - (_message.Message,), - { - "DESCRIPTOR": _RECORDACTIVITYTASKHEARTBEATREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest) - }, -) -_sym_db.RegisterMessage(RecordActivityTaskHeartbeatRequest) - -RecordActivityTaskHeartbeatResponse = _reflection.GeneratedProtocolMessageType( - "RecordActivityTaskHeartbeatResponse", - (_message.Message,), - { - "DESCRIPTOR": _RECORDACTIVITYTASKHEARTBEATRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse) - }, -) -_sym_db.RegisterMessage(RecordActivityTaskHeartbeatResponse) - -RecordActivityTaskHeartbeatByIdRequest = _reflection.GeneratedProtocolMessageType( - "RecordActivityTaskHeartbeatByIdRequest", - (_message.Message,), - { - "DESCRIPTOR": _RECORDACTIVITYTASKHEARTBEATBYIDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest) - }, -) -_sym_db.RegisterMessage(RecordActivityTaskHeartbeatByIdRequest) - -RecordActivityTaskHeartbeatByIdResponse = _reflection.GeneratedProtocolMessageType( - "RecordActivityTaskHeartbeatByIdResponse", - (_message.Message,), - { - "DESCRIPTOR": _RECORDACTIVITYTASKHEARTBEATBYIDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse) - }, -) -_sym_db.RegisterMessage(RecordActivityTaskHeartbeatByIdResponse) - -RespondActivityTaskCompletedRequest = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskCompletedRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKCOMPLETEDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskCompletedRequest) - -RespondActivityTaskCompletedResponse = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskCompletedResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKCOMPLETEDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskCompletedResponse) - -RespondActivityTaskCompletedByIdRequest = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskCompletedByIdRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKCOMPLETEDBYIDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskCompletedByIdRequest) - -RespondActivityTaskCompletedByIdResponse = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskCompletedByIdResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKCOMPLETEDBYIDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskCompletedByIdResponse) - -RespondActivityTaskFailedRequest = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskFailedRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKFAILEDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskFailedRequest) - -RespondActivityTaskFailedResponse = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskFailedResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKFAILEDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskFailedResponse) - -RespondActivityTaskFailedByIdRequest = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskFailedByIdRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKFAILEDBYIDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskFailedByIdRequest) - -RespondActivityTaskFailedByIdResponse = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskFailedByIdResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKFAILEDBYIDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskFailedByIdResponse) - -RespondActivityTaskCanceledRequest = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskCanceledRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKCANCELEDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskCanceledRequest) - -RespondActivityTaskCanceledResponse = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskCanceledResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKCANCELEDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskCanceledResponse) - -RespondActivityTaskCanceledByIdRequest = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskCanceledByIdRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKCANCELEDBYIDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskCanceledByIdRequest) - -RespondActivityTaskCanceledByIdResponse = _reflection.GeneratedProtocolMessageType( - "RespondActivityTaskCanceledByIdResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDACTIVITYTASKCANCELEDBYIDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse) - }, -) -_sym_db.RegisterMessage(RespondActivityTaskCanceledByIdResponse) - -RequestCancelWorkflowExecutionRequest = _reflection.GeneratedProtocolMessageType( - "RequestCancelWorkflowExecutionRequest", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELWORKFLOWEXECUTIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest) - }, -) -_sym_db.RegisterMessage(RequestCancelWorkflowExecutionRequest) - -RequestCancelWorkflowExecutionResponse = _reflection.GeneratedProtocolMessageType( - "RequestCancelWorkflowExecutionResponse", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELWORKFLOWEXECUTIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse) - }, -) -_sym_db.RegisterMessage(RequestCancelWorkflowExecutionResponse) - -SignalWorkflowExecutionRequest = _reflection.GeneratedProtocolMessageType( - "SignalWorkflowExecutionRequest", - (_message.Message,), - { - "DESCRIPTOR": _SIGNALWORKFLOWEXECUTIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest) - }, -) -_sym_db.RegisterMessage(SignalWorkflowExecutionRequest) - -SignalWorkflowExecutionResponse = _reflection.GeneratedProtocolMessageType( - "SignalWorkflowExecutionResponse", - (_message.Message,), - { - "DESCRIPTOR": _SIGNALWORKFLOWEXECUTIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse) - }, -) -_sym_db.RegisterMessage(SignalWorkflowExecutionResponse) - -SignalWithStartWorkflowExecutionRequest = _reflection.GeneratedProtocolMessageType( - "SignalWithStartWorkflowExecutionRequest", - (_message.Message,), - { - "DESCRIPTOR": _SIGNALWITHSTARTWORKFLOWEXECUTIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest) - }, -) -_sym_db.RegisterMessage(SignalWithStartWorkflowExecutionRequest) - -SignalWithStartWorkflowExecutionResponse = _reflection.GeneratedProtocolMessageType( - "SignalWithStartWorkflowExecutionResponse", - (_message.Message,), - { - "DESCRIPTOR": _SIGNALWITHSTARTWORKFLOWEXECUTIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse) - }, -) -_sym_db.RegisterMessage(SignalWithStartWorkflowExecutionResponse) - -ResetWorkflowExecutionRequest = _reflection.GeneratedProtocolMessageType( - "ResetWorkflowExecutionRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESETWORKFLOWEXECUTIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest) - }, -) -_sym_db.RegisterMessage(ResetWorkflowExecutionRequest) - -ResetWorkflowExecutionResponse = _reflection.GeneratedProtocolMessageType( - "ResetWorkflowExecutionResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESETWORKFLOWEXECUTIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse) - }, -) -_sym_db.RegisterMessage(ResetWorkflowExecutionResponse) - -TerminateWorkflowExecutionRequest = _reflection.GeneratedProtocolMessageType( - "TerminateWorkflowExecutionRequest", - (_message.Message,), - { - "DESCRIPTOR": _TERMINATEWORKFLOWEXECUTIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest) - }, -) -_sym_db.RegisterMessage(TerminateWorkflowExecutionRequest) - -TerminateWorkflowExecutionResponse = _reflection.GeneratedProtocolMessageType( - "TerminateWorkflowExecutionResponse", - (_message.Message,), - { - "DESCRIPTOR": _TERMINATEWORKFLOWEXECUTIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse) - }, -) -_sym_db.RegisterMessage(TerminateWorkflowExecutionResponse) - -DeleteWorkflowExecutionRequest = _reflection.GeneratedProtocolMessageType( - "DeleteWorkflowExecutionRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETEWORKFLOWEXECUTIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest) - }, -) -_sym_db.RegisterMessage(DeleteWorkflowExecutionRequest) - -DeleteWorkflowExecutionResponse = _reflection.GeneratedProtocolMessageType( - "DeleteWorkflowExecutionResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETEWORKFLOWEXECUTIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse) - }, -) -_sym_db.RegisterMessage(DeleteWorkflowExecutionResponse) - -ListOpenWorkflowExecutionsRequest = _reflection.GeneratedProtocolMessageType( - "ListOpenWorkflowExecutionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTOPENWORKFLOWEXECUTIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest) - }, -) -_sym_db.RegisterMessage(ListOpenWorkflowExecutionsRequest) - -ListOpenWorkflowExecutionsResponse = _reflection.GeneratedProtocolMessageType( - "ListOpenWorkflowExecutionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTOPENWORKFLOWEXECUTIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse) - }, -) -_sym_db.RegisterMessage(ListOpenWorkflowExecutionsResponse) - -ListClosedWorkflowExecutionsRequest = _reflection.GeneratedProtocolMessageType( - "ListClosedWorkflowExecutionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTCLOSEDWORKFLOWEXECUTIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest) - }, -) -_sym_db.RegisterMessage(ListClosedWorkflowExecutionsRequest) - -ListClosedWorkflowExecutionsResponse = _reflection.GeneratedProtocolMessageType( - "ListClosedWorkflowExecutionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTCLOSEDWORKFLOWEXECUTIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse) - }, -) -_sym_db.RegisterMessage(ListClosedWorkflowExecutionsResponse) - -ListWorkflowExecutionsRequest = _reflection.GeneratedProtocolMessageType( - "ListWorkflowExecutionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTWORKFLOWEXECUTIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest) - }, -) -_sym_db.RegisterMessage(ListWorkflowExecutionsRequest) - -ListWorkflowExecutionsResponse = _reflection.GeneratedProtocolMessageType( - "ListWorkflowExecutionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTWORKFLOWEXECUTIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse) - }, -) -_sym_db.RegisterMessage(ListWorkflowExecutionsResponse) - -ListArchivedWorkflowExecutionsRequest = _reflection.GeneratedProtocolMessageType( - "ListArchivedWorkflowExecutionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTARCHIVEDWORKFLOWEXECUTIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest) - }, -) -_sym_db.RegisterMessage(ListArchivedWorkflowExecutionsRequest) - -ListArchivedWorkflowExecutionsResponse = _reflection.GeneratedProtocolMessageType( - "ListArchivedWorkflowExecutionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTARCHIVEDWORKFLOWEXECUTIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse) - }, -) -_sym_db.RegisterMessage(ListArchivedWorkflowExecutionsResponse) - -ScanWorkflowExecutionsRequest = _reflection.GeneratedProtocolMessageType( - "ScanWorkflowExecutionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _SCANWORKFLOWEXECUTIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest) - }, -) -_sym_db.RegisterMessage(ScanWorkflowExecutionsRequest) - -ScanWorkflowExecutionsResponse = _reflection.GeneratedProtocolMessageType( - "ScanWorkflowExecutionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _SCANWORKFLOWEXECUTIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse) - }, -) -_sym_db.RegisterMessage(ScanWorkflowExecutionsResponse) - -CountWorkflowExecutionsRequest = _reflection.GeneratedProtocolMessageType( - "CountWorkflowExecutionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _COUNTWORKFLOWEXECUTIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest) - }, -) -_sym_db.RegisterMessage(CountWorkflowExecutionsRequest) - -CountWorkflowExecutionsResponse = _reflection.GeneratedProtocolMessageType( - "CountWorkflowExecutionsResponse", - (_message.Message,), - { - "AggregationGroup": _reflection.GeneratedProtocolMessageType( - "AggregationGroup", - (_message.Message,), - { - "DESCRIPTOR": _COUNTWORKFLOWEXECUTIONSRESPONSE_AGGREGATIONGROUP, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup) - }, - ), - "DESCRIPTOR": _COUNTWORKFLOWEXECUTIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse) - }, -) -_sym_db.RegisterMessage(CountWorkflowExecutionsResponse) -_sym_db.RegisterMessage(CountWorkflowExecutionsResponse.AggregationGroup) - -GetSearchAttributesRequest = _reflection.GeneratedProtocolMessageType( - "GetSearchAttributesRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETSEARCHATTRIBUTESREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetSearchAttributesRequest) - }, -) -_sym_db.RegisterMessage(GetSearchAttributesRequest) - -GetSearchAttributesResponse = _reflection.GeneratedProtocolMessageType( - "GetSearchAttributesResponse", - (_message.Message,), - { - "KeysEntry": _reflection.GeneratedProtocolMessageType( - "KeysEntry", - (_message.Message,), - { - "DESCRIPTOR": _GETSEARCHATTRIBUTESRESPONSE_KEYSENTRY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetSearchAttributesResponse.KeysEntry) - }, - ), - "DESCRIPTOR": _GETSEARCHATTRIBUTESRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetSearchAttributesResponse) - }, -) -_sym_db.RegisterMessage(GetSearchAttributesResponse) -_sym_db.RegisterMessage(GetSearchAttributesResponse.KeysEntry) - -RespondQueryTaskCompletedRequest = _reflection.GeneratedProtocolMessageType( - "RespondQueryTaskCompletedRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDQUERYTASKCOMPLETEDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest) - }, -) -_sym_db.RegisterMessage(RespondQueryTaskCompletedRequest) - -RespondQueryTaskCompletedResponse = _reflection.GeneratedProtocolMessageType( - "RespondQueryTaskCompletedResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDQUERYTASKCOMPLETEDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse) - }, -) -_sym_db.RegisterMessage(RespondQueryTaskCompletedResponse) - -ResetStickyTaskQueueRequest = _reflection.GeneratedProtocolMessageType( - "ResetStickyTaskQueueRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESETSTICKYTASKQUEUEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest) - }, -) -_sym_db.RegisterMessage(ResetStickyTaskQueueRequest) - -ResetStickyTaskQueueResponse = _reflection.GeneratedProtocolMessageType( - "ResetStickyTaskQueueResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESETSTICKYTASKQUEUERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse) - }, -) -_sym_db.RegisterMessage(ResetStickyTaskQueueResponse) - -ShutdownWorkerRequest = _reflection.GeneratedProtocolMessageType( - "ShutdownWorkerRequest", - (_message.Message,), - { - "DESCRIPTOR": _SHUTDOWNWORKERREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ShutdownWorkerRequest) - }, -) -_sym_db.RegisterMessage(ShutdownWorkerRequest) - -ShutdownWorkerResponse = _reflection.GeneratedProtocolMessageType( - "ShutdownWorkerResponse", - (_message.Message,), - { - "DESCRIPTOR": _SHUTDOWNWORKERRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ShutdownWorkerResponse) - }, -) -_sym_db.RegisterMessage(ShutdownWorkerResponse) - -QueryWorkflowRequest = _reflection.GeneratedProtocolMessageType( - "QueryWorkflowRequest", - (_message.Message,), - { - "DESCRIPTOR": _QUERYWORKFLOWREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.QueryWorkflowRequest) - }, -) -_sym_db.RegisterMessage(QueryWorkflowRequest) - -QueryWorkflowResponse = _reflection.GeneratedProtocolMessageType( - "QueryWorkflowResponse", - (_message.Message,), - { - "DESCRIPTOR": _QUERYWORKFLOWRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.QueryWorkflowResponse) - }, -) -_sym_db.RegisterMessage(QueryWorkflowResponse) - -DescribeWorkflowExecutionRequest = _reflection.GeneratedProtocolMessageType( - "DescribeWorkflowExecutionRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKFLOWEXECUTIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest) - }, -) -_sym_db.RegisterMessage(DescribeWorkflowExecutionRequest) - -DescribeWorkflowExecutionResponse = _reflection.GeneratedProtocolMessageType( - "DescribeWorkflowExecutionResponse", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKFLOWEXECUTIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse) - }, -) -_sym_db.RegisterMessage(DescribeWorkflowExecutionResponse) - -DescribeTaskQueueRequest = _reflection.GeneratedProtocolMessageType( - "DescribeTaskQueueRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBETASKQUEUEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeTaskQueueRequest) - }, -) -_sym_db.RegisterMessage(DescribeTaskQueueRequest) - -DescribeTaskQueueResponse = _reflection.GeneratedProtocolMessageType( - "DescribeTaskQueueResponse", - (_message.Message,), - { - "StatsByPriorityKeyEntry": _reflection.GeneratedProtocolMessageType( - "StatsByPriorityKeyEntry", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBETASKQUEUERESPONSE_STATSBYPRIORITYKEYENTRY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeTaskQueueResponse.StatsByPriorityKeyEntry) - }, - ), - "EffectiveRateLimit": _reflection.GeneratedProtocolMessageType( - "EffectiveRateLimit", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBETASKQUEUERESPONSE_EFFECTIVERATELIMIT, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit) - }, - ), - "VersionsInfoEntry": _reflection.GeneratedProtocolMessageType( - "VersionsInfoEntry", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBETASKQUEUERESPONSE_VERSIONSINFOENTRY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeTaskQueueResponse.VersionsInfoEntry) - }, - ), - "DESCRIPTOR": _DESCRIBETASKQUEUERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeTaskQueueResponse) - }, -) -_sym_db.RegisterMessage(DescribeTaskQueueResponse) -_sym_db.RegisterMessage(DescribeTaskQueueResponse.StatsByPriorityKeyEntry) -_sym_db.RegisterMessage(DescribeTaskQueueResponse.EffectiveRateLimit) -_sym_db.RegisterMessage(DescribeTaskQueueResponse.VersionsInfoEntry) - -GetClusterInfoRequest = _reflection.GeneratedProtocolMessageType( - "GetClusterInfoRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETCLUSTERINFOREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetClusterInfoRequest) - }, -) -_sym_db.RegisterMessage(GetClusterInfoRequest) - -GetClusterInfoResponse = _reflection.GeneratedProtocolMessageType( - "GetClusterInfoResponse", - (_message.Message,), - { - "SupportedClientsEntry": _reflection.GeneratedProtocolMessageType( - "SupportedClientsEntry", - (_message.Message,), - { - "DESCRIPTOR": _GETCLUSTERINFORESPONSE_SUPPORTEDCLIENTSENTRY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetClusterInfoResponse.SupportedClientsEntry) - }, - ), - "DESCRIPTOR": _GETCLUSTERINFORESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetClusterInfoResponse) - }, -) -_sym_db.RegisterMessage(GetClusterInfoResponse) -_sym_db.RegisterMessage(GetClusterInfoResponse.SupportedClientsEntry) - -GetSystemInfoRequest = _reflection.GeneratedProtocolMessageType( - "GetSystemInfoRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETSYSTEMINFOREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetSystemInfoRequest) - }, -) -_sym_db.RegisterMessage(GetSystemInfoRequest) - -GetSystemInfoResponse = _reflection.GeneratedProtocolMessageType( - "GetSystemInfoResponse", - (_message.Message,), - { - "Capabilities": _reflection.GeneratedProtocolMessageType( - "Capabilities", - (_message.Message,), - { - "DESCRIPTOR": _GETSYSTEMINFORESPONSE_CAPABILITIES, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities) - }, - ), - "DESCRIPTOR": _GETSYSTEMINFORESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetSystemInfoResponse) - }, -) -_sym_db.RegisterMessage(GetSystemInfoResponse) -_sym_db.RegisterMessage(GetSystemInfoResponse.Capabilities) - -ListTaskQueuePartitionsRequest = _reflection.GeneratedProtocolMessageType( - "ListTaskQueuePartitionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTTASKQUEUEPARTITIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListTaskQueuePartitionsRequest) - }, -) -_sym_db.RegisterMessage(ListTaskQueuePartitionsRequest) - -ListTaskQueuePartitionsResponse = _reflection.GeneratedProtocolMessageType( - "ListTaskQueuePartitionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTTASKQUEUEPARTITIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListTaskQueuePartitionsResponse) - }, -) -_sym_db.RegisterMessage(ListTaskQueuePartitionsResponse) - -CreateScheduleRequest = _reflection.GeneratedProtocolMessageType( - "CreateScheduleRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATESCHEDULEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.CreateScheduleRequest) - }, -) -_sym_db.RegisterMessage(CreateScheduleRequest) - -CreateScheduleResponse = _reflection.GeneratedProtocolMessageType( - "CreateScheduleResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATESCHEDULERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.CreateScheduleResponse) - }, -) -_sym_db.RegisterMessage(CreateScheduleResponse) - -DescribeScheduleRequest = _reflection.GeneratedProtocolMessageType( - "DescribeScheduleRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBESCHEDULEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeScheduleRequest) - }, -) -_sym_db.RegisterMessage(DescribeScheduleRequest) - -DescribeScheduleResponse = _reflection.GeneratedProtocolMessageType( - "DescribeScheduleResponse", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBESCHEDULERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeScheduleResponse) - }, -) -_sym_db.RegisterMessage(DescribeScheduleResponse) - -UpdateScheduleRequest = _reflection.GeneratedProtocolMessageType( - "UpdateScheduleRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATESCHEDULEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateScheduleRequest) - }, -) -_sym_db.RegisterMessage(UpdateScheduleRequest) - -UpdateScheduleResponse = _reflection.GeneratedProtocolMessageType( - "UpdateScheduleResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATESCHEDULERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateScheduleResponse) - }, -) -_sym_db.RegisterMessage(UpdateScheduleResponse) - -PatchScheduleRequest = _reflection.GeneratedProtocolMessageType( - "PatchScheduleRequest", - (_message.Message,), - { - "DESCRIPTOR": _PATCHSCHEDULEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PatchScheduleRequest) - }, -) -_sym_db.RegisterMessage(PatchScheduleRequest) - -PatchScheduleResponse = _reflection.GeneratedProtocolMessageType( - "PatchScheduleResponse", - (_message.Message,), - { - "DESCRIPTOR": _PATCHSCHEDULERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PatchScheduleResponse) - }, + b'\n6temporal/api/workflowservice/v1/request_response.proto\x12\x1ftemporal.api.workflowservice.v1\x1a+temporal/api/enums/v1/batch_operation.proto\x1a"temporal/api/enums/v1/common.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a%temporal/api/enums/v1/namespace.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a!temporal/api/enums/v1/query.proto\x1a!temporal/api/enums/v1/reset.proto\x1a&temporal/api/enums/v1/task_queue.proto\x1a&temporal/api/enums/v1/deployment.proto\x1a"temporal/api/enums/v1/update.proto\x1a)temporal/api/enums/v1/time_skipping.proto\x1a$temporal/api/enums/v1/activity.proto\x1a!temporal/api/enums/v1/nexus.proto\x1a&temporal/api/activity/v1/message.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/history/v1/message.proto\x1a&temporal/api/workflow/v1/message.proto\x1a%temporal/api/command/v1/message.proto\x1a$temporal/api/compute/v1/config.proto\x1a(temporal/api/deployment/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a$temporal/api/filter/v1/message.proto\x1a&temporal/api/protocol/v1/message.proto\x1a\'temporal/api/namespace/v1/message.proto\x1a#temporal/api/query/v1/message.proto\x1a)temporal/api/replication/v1/message.proto\x1a#temporal/api/rules/v1/message.proto\x1a\'temporal/api/sdk/v1/worker_config.proto\x1a&temporal/api/schedule/v1/message.proto\x1a\'temporal/api/taskqueue/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a%temporal/api/version/v1/message.proto\x1a#temporal/api/batch/v1/message.proto\x1a\x30temporal/api/sdk/v1/task_complete_metadata.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto\x1a#temporal/api/nexus/v1/message.proto\x1a,temporal/api/nexusoperation/v1/message.proto\x1a$temporal/api/worker/v1/message.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x88\x05\n\x18RegisterNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x13\n\x0bowner_email\x18\x03 \x01(\t\x12\x46\n#workflow_execution_retention_period\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12G\n\x08\x63lusters\x18\x05 \x03(\x0b\x32\x35.temporal.api.replication.v1.ClusterReplicationConfig\x12\x1b\n\x13\x61\x63tive_cluster_name\x18\x06 \x01(\t\x12Q\n\x04\x64\x61ta\x18\x07 \x03(\x0b\x32\x43.temporal.api.workflowservice.v1.RegisterNamespaceRequest.DataEntry\x12\x16\n\x0esecurity_token\x18\x08 \x01(\t\x12\x1b\n\x13is_global_namespace\x18\t \x01(\x08\x12\x44\n\x16history_archival_state\x18\n \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1c\n\x14history_archival_uri\x18\x0b \x01(\t\x12G\n\x19visibility_archival_state\x18\x0c \x01(\x0e\x32$.temporal.api.enums.v1.ArchivalState\x12\x1f\n\x17visibility_archival_uri\x18\r \x01(\t\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x1b\n\x19RegisterNamespaceResponse"\x89\x01\n\x15ListNamespacesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c\x12\x44\n\x10namespace_filter\x18\x03 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceFilter"\x81\x01\n\x16ListNamespacesResponse\x12N\n\nnamespaces\x18\x01 \x03(\x0b\x32:.temporal.api.workflowservice.v1.DescribeNamespaceResponse\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"S\n\x18\x44\x65scribeNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x18\n\x10weak_consistency\x18\x03 \x01(\x08"\x81\x04\n\x19\x44\x65scribeNamespaceResponse\x12@\n\x0enamespace_info\x18\x01 \x01(\x0b\x32(.temporal.api.namespace.v1.NamespaceInfo\x12:\n\x06\x63onfig\x18\x02 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceConfig\x12S\n\x12replication_config\x18\x03 \x01(\x0b\x32\x37.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x18\n\x10\x66\x61ilover_version\x18\x04 \x01(\x03\x12\x1b\n\x13is_global_namespace\x18\x05 \x01(\x08\x12\x45\n\x10\x66\x61ilover_history\x18\x06 \x03(\x0b\x32+.temporal.api.replication.v1.FailoverStatus\x12J\n\x12poller_group_infos\x18\x07 \x03(\x0b\x32*.temporal.api.taskqueue.v1.PollerGroupInfoB\x02\x18\x01\x12G\n\x12poller_groups_info\x18\x08 \x01(\x0b\x32+.temporal.api.taskqueue.v1.PollerGroupsInfo"\xcf\x02\n\x16UpdateNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x43\n\x0bupdate_info\x18\x02 \x01(\x0b\x32..temporal.api.namespace.v1.UpdateNamespaceInfo\x12:\n\x06\x63onfig\x18\x03 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceConfig\x12S\n\x12replication_config\x18\x04 \x01(\x0b\x32\x37.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x16\n\x0esecurity_token\x18\x05 \x01(\t\x12\x19\n\x11\x64\x65lete_bad_binary\x18\x06 \x01(\t\x12\x19\n\x11promote_namespace\x18\x07 \x01(\x08"\xa3\x02\n\x17UpdateNamespaceResponse\x12@\n\x0enamespace_info\x18\x01 \x01(\x0b\x32(.temporal.api.namespace.v1.NamespaceInfo\x12:\n\x06\x63onfig\x18\x02 \x01(\x0b\x32*.temporal.api.namespace.v1.NamespaceConfig\x12S\n\x12replication_config\x18\x03 \x01(\x0b\x32\x37.temporal.api.replication.v1.NamespaceReplicationConfig\x12\x18\n\x10\x66\x61ilover_version\x18\x04 \x01(\x03\x12\x1b\n\x13is_global_namespace\x18\x05 \x01(\x08"F\n\x19\x44\x65precateNamespaceRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x16\n\x0esecurity_token\x18\x02 \x01(\t"\x1c\n\x1a\x44\x65precateNamespaceResponse"\x97\x0e\n\x1dStartWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x10\n\x08identity\x18\t \x01(\t\x12\x12\n\nrequest_id\x18\n \x01(\t\x12N\n\x18workflow_id_reuse_policy\x18\x0b \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12T\n\x1bworkflow_id_conflict_policy\x18\x16 \x01(\x0e\x32/.temporal.api.enums.v1.WorkflowIdConflictPolicy\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\r \x01(\t\x12*\n\x04memo\x18\x0e \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x0f \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\x10 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x1f\n\x17request_eager_execution\x18\x11 \x01(\x08\x12;\n\x11\x63ontinued_failure\x18\x12 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\x13 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x37\n\x14workflow_start_delay\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12>\n\x14\x63ompletion_callbacks\x18\x15 \x03(\x0b\x32 .temporal.api.common.v1.Callback\x12\x38\n\ruser_metadata\x18\x17 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12+\n\x05links\x18\x18 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12I\n\x13versioning_override\x18\x19 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12H\n\x13on_conflict_options\x18\x1a \x01(\x0b\x32+.temporal.api.workflow.v1.OnConflictOptions\x12\x32\n\x08priority\x18\x1b \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12\\\n\x1f\x65\x61ger_worker_deployment_options\x18\x1c \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12H\n\x14time_skipping_config\x18\x1d \x01(\x0b\x32*.temporal.api.common.v1.TimeSkippingConfig\x12\x65\n&propagated_nexus_serialization_context\x18\x1e \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext\x12]\n\x1ftime_skipping_state_propagation\x18\x1f \x01(\x0b\x32\x34.temporal.api.common.v1.TimeSkippingStatePropagation"\xaa\x02\n\x1eStartWorkflowExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x06 \x01(\t\x12\x0f\n\x07started\x18\x03 \x01(\x08\x12>\n\x06status\x18\x05 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowExecutionStatus\x12[\n\x13\x65\x61ger_workflow_task\x18\x02 \x01(\x0b\x32>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\x12*\n\x04link\x18\x04 \x01(\x0b\x32\x1c.temporal.api.common.v1.Link"\xaa\x02\n"GetWorkflowExecutionHistoryRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x19\n\x11maximum_page_size\x18\x03 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\x0c\x12\x16\n\x0ewait_new_event\x18\x05 \x01(\x08\x12P\n\x19history_event_filter_type\x18\x06 \x01(\x0e\x32-.temporal.api.enums.v1.HistoryEventFilterType\x12\x15\n\rskip_archival\x18\x07 \x01(\x08"\xa1\x02\n#GetWorkflowExecutionHistoryResponse\x12\x31\n\x07history\x18\x01 \x01(\x0b\x32 .temporal.api.history.v1.History\x12\x35\n\x0braw_history\x18\x02 \x03(\x0b\x32 .temporal.api.common.v1.DataBlob\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x10\n\x08\x61rchived\x18\x04 \x01(\x08\x12\x65\n&propagated_nexus_serialization_context\x18\x05 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext"\xb0\x01\n)GetWorkflowExecutionHistoryReverseRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x19\n\x11maximum_page_size\x18\x03 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\x0c"x\n*GetWorkflowExecutionHistoryReverseResponse\x12\x31\n\x07history\x18\x01 \x01(\x0b\x32 .temporal.api.history.v1.History\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c"\xfd\x03\n\x1cPollWorkflowTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x17\n\x0fpoller_group_id\x18\n \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x1b\n\x13worker_instance_key\x18\x08 \x01(\t\x12!\n\x19worker_control_task_queue\x18\t \x01(\t\x12\x1b\n\x0f\x62inary_checksum\x18\x04 \x01(\tB\x02\x18\x01\x12Z\n\x1bworker_version_capabilities\x18\x05 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilitiesB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x06 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12\x43\n\x10poller_pool_info\x18\x0b \x01(\x0b\x32).temporal.api.taskqueue.v1.PollerPoolInfoJ\x04\x08\x07\x10\x08R\x10worker_heartbeat"\xbf\x08\n\x1dPollWorkflowTaskQueueResponse\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12!\n\x19previous_started_event_id\x18\x04 \x01(\x03\x12\x18\n\x10started_event_id\x18\x05 \x01(\x03\x12\x0f\n\x07\x61ttempt\x18\x06 \x01(\x05\x12\x1a\n\x12\x62\x61\x63klog_count_hint\x18\x07 \x01(\x03\x12\x31\n\x07history\x18\x08 \x01(\x0b\x32 .temporal.api.history.v1.History\x12\x17\n\x0fnext_page_token\x18\t \x01(\x0c\x12\x33\n\x05query\x18\n \x01(\x0b\x32$.temporal.api.query.v1.WorkflowQuery\x12K\n\x1dworkflow_execution_task_queue\x18\x0b \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x32\n\x0escheduled_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\\\n\x07queries\x18\x0e \x03(\x0b\x32K.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse.QueriesEntry\x12\x33\n\x08messages\x18\x0f \x03(\x0b\x32!.temporal.api.protocol.v1.Message\x12Q\n\x17poller_scaling_decision\x18\x10 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.PollerScalingDecision\x12\x17\n\x0fpoller_group_id\x18\x11 \x01(\t\x12J\n\x12poller_group_infos\x18\x12 \x03(\x0b\x32*.temporal.api.taskqueue.v1.PollerGroupInfoB\x02\x18\x01\x12G\n\x12poller_groups_info\x18\x13 \x01(\x0b\x32+.temporal.api.taskqueue.v1.PollerGroupsInfo\x1aT\n\x0cQueriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.temporal.api.query.v1.WorkflowQuery:\x02\x38\x01"\xba\n\n#RespondWorkflowTaskCompletedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x32\n\x08\x63ommands\x18\x02 \x03(\x0b\x32 .temporal.api.command.v1.Command\x12\x10\n\x08identity\x18\x03 \x01(\t\x12O\n\x11sticky_attributes\x18\x04 \x01(\x0b\x32\x34.temporal.api.taskqueue.v1.StickyExecutionAttributes\x12 \n\x18return_new_workflow_task\x18\x05 \x01(\x08\x12&\n\x1e\x66orce_create_new_workflow_task\x18\x06 \x01(\x08\x12\x1b\n\x0f\x62inary_checksum\x18\x07 \x01(\tB\x02\x18\x01\x12m\n\rquery_results\x18\x08 \x03(\x0b\x32V.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.QueryResultsEntry\x12\x11\n\tnamespace\x18\t \x01(\t\x12\x13\n\x0bresource_id\x18\x12 \x01(\t\x12L\n\x14worker_version_stamp\x18\n \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12\x33\n\x08messages\x18\x0b \x03(\x0b\x32!.temporal.api.protocol.v1.Message\x12H\n\x0csdk_metadata\x18\x0c \x01(\x0b\x32\x32.temporal.api.sdk.v1.WorkflowTaskCompletedMetadata\x12\x43\n\x11metering_metadata\x18\r \x01(\x0b\x32(.temporal.api.common.v1.MeteringMetadata\x12g\n\x0c\x63\x61pabilities\x18\x0e \x01(\x0b\x32Q.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest.Capabilities\x12>\n\ndeployment\x18\x0f \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12\x46\n\x13versioning_behavior\x18\x10 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehavior\x12O\n\x12\x64\x65ployment_options\x18\x11 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12\x1b\n\x13worker_instance_key\x18\x13 \x01(\t\x12!\n\x19worker_control_task_queue\x18\x14 \x01(\t\x12\x13\n\x0bpage_number\x18\x15 \x01(\x05\x12\x19\n\x11intermediate_page\x18\x16 \x01(\x08\x1a_\n\x11QueryResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.temporal.api.query.v1.WorkflowQueryResult:\x02\x38\x01\x1a\x45\n\x0c\x43\x61pabilities\x12\x35\n-discard_speculative_workflow_task_with_events\x18\x01 \x01(\x08"\xf5\x01\n$RespondWorkflowTaskCompletedResponse\x12U\n\rworkflow_task\x18\x01 \x01(\x0b\x32>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse\x12V\n\x0e\x61\x63tivity_tasks\x18\x02 \x03(\x0b\x32>.temporal.api.workflowservice.v1.PollActivityTaskQueueResponse\x12\x1e\n\x16reset_history_event_id\x18\x03 \x01(\x03"\x8d\x04\n RespondWorkflowTaskFailedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12=\n\x05\x63\x61use\x18\x02 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCause\x12\x31\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x1b\n\x0f\x62inary_checksum\x18\x05 \x01(\tB\x02\x18\x01\x12\x11\n\tnamespace\x18\x06 \x01(\t\x12\x13\n\x0bresource_id\x18\x0b \x01(\t\x12\x33\n\x08messages\x18\x07 \x03(\x0b\x32!.temporal.api.protocol.v1.Message\x12\x46\n\x0eworker_version\x18\x08 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\ndeployment\x18\t \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\n \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"#\n!RespondWorkflowTaskFailedResponse"\xab\x04\n\x1cPollActivityTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x17\n\x0fpoller_group_id\x18\n \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x1b\n\x13worker_instance_key\x18\x08 \x01(\t\x12!\n\x19worker_control_task_queue\x18\t \x01(\t\x12I\n\x13task_queue_metadata\x18\x04 \x01(\x0b\x32,.temporal.api.taskqueue.v1.TaskQueueMetadata\x12Z\n\x1bworker_version_capabilities\x18\x05 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilitiesB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x06 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12\x43\n\x10poller_pool_info\x18\x0b \x01(\x0b\x32).temporal.api.taskqueue.v1.PollerPoolInfoJ\x04\x08\x07\x10\x08R\x10worker_heartbeat"\x84\n\n\x1dPollActivityTaskQueueResponse\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x1a\n\x12workflow_namespace\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x45\n\x12workflow_execution\x18\x04 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12;\n\ractivity_type\x18\x05 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x13\n\x0b\x61\x63tivity_id\x18\x06 \x01(\t\x12.\n\x06header\x18\x07 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12/\n\x05input\x18\x08 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12;\n\x11heartbeat_details\x18\t \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x32\n\x0escheduled_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x1e\x63urrent_attempt_scheduled_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\r \x01(\x05\x12<\n\x19schedule_to_close_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x0f \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x10 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x11 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12Q\n\x17poller_scaling_decision\x18\x12 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.PollerScalingDecision\x12\x32\n\x08priority\x18\x13 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12\x17\n\x0f\x61\x63tivity_run_id\x18\x14 \x01(\t\x12J\n\x12poller_group_infos\x18\x15 \x03(\x0b\x32*.temporal.api.taskqueue.v1.PollerGroupInfoB\x02\x18\x01\x12G\n\x12poller_groups_info\x18\x16 \x01(\x0b\x32+.temporal.api.taskqueue.v1.PollerGroupsInfo\x12\x65\n&propagated_nexus_serialization_context\x18\x17 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext"\xa5\x01\n"RecordActivityTaskHeartbeatRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12\x13\n\x0bresource_id\x18\x05 \x01(\t"p\n#RecordActivityTaskHeartbeatResponse\x12\x18\n\x10\x63\x61ncel_requested\x18\x01 \x01(\x08\x12\x17\n\x0f\x61\x63tivity_paused\x18\x02 \x01(\x08\x12\x16\n\x0e\x61\x63tivity_reset\x18\x03 \x01(\x08"\xcf\x01\n&RecordActivityTaskHeartbeatByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x06 \x01(\t\x12\x13\n\x0bresource_id\x18\x07 \x01(\t"t\n\'RecordActivityTaskHeartbeatByIdResponse\x12\x18\n\x10\x63\x61ncel_requested\x18\x01 \x01(\x08\x12\x17\n\x0f\x61\x63tivity_paused\x18\x02 \x01(\x08\x12\x16\n\x0e\x61\x63tivity_reset\x18\x03 \x01(\x08"\xfe\x02\n#RespondActivityTaskCompletedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x30\n\x06result\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12\x13\n\x0bresource_id\x18\x08 \x01(\t\x12\x46\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\ndeployment\x18\x06 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"&\n$RespondActivityTaskCompletedResponse"\xcf\x01\n\'RespondActivityTaskCompletedByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x30\n\x06result\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x06 \x01(\t\x12\x13\n\x0bresource_id\x18\x07 \x01(\t"*\n(RespondActivityTaskCompletedByIdResponse"\xfd\x03\n RespondActivityTaskFailedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12\x13\n\x0bresource_id\x18\t \x01(\t\x12@\n\x16last_heartbeat_details\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x46\n\x0eworker_version\x18\x06 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\ndeployment\x18\x07 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x08 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12=\n\x05\x63\x61use\x18\n \x01(\x0e\x32..temporal.api.enums.v1.ActivityTaskFailedCause"W\n!RespondActivityTaskFailedResponse\x12\x32\n\x08\x66\x61ilures\x18\x01 \x03(\x0b\x32 .temporal.api.failure.v1.Failure"\xce\x02\n$RespondActivityTaskFailedByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x10\n\x08identity\x18\x06 \x01(\t\x12@\n\x16last_heartbeat_details\x18\x07 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x13\n\x0bresource_id\x18\x08 \x01(\t\x12=\n\x05\x63\x61use\x18\t \x01(\x0e\x32..temporal.api.enums.v1.ActivityTaskFailedCause"[\n%RespondActivityTaskFailedByIdResponse\x12\x32\n\x08\x66\x61ilures\x18\x01 \x03(\x0b\x32 .temporal.api.failure.v1.Failure"\xfe\x02\n"RespondActivityTaskCanceledRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x31\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x11\n\tnamespace\x18\x04 \x01(\t\x12\x13\n\x0bresource_id\x18\x08 \x01(\t\x12\x46\n\x0eworker_version\x18\x05 \x01(\x0b\x32*.temporal.api.common.v1.WorkerVersionStampB\x02\x18\x01\x12>\n\ndeployment\x18\x06 \x01(\x0b\x32&.temporal.api.deployment.v1.DeploymentB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions"%\n#RespondActivityTaskCanceledResponse"\xa0\x02\n&RespondActivityTaskCanceledByIdRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x06 \x01(\t\x12O\n\x12\x64\x65ployment_options\x18\x07 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12\x13\n\x0bresource_id\x18\x08 \x01(\t")\n\'RespondActivityTaskCanceledByIdResponse"\x84\x02\n%RequestCancelWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x05 \x01(\t\x12\x0e\n\x06reason\x18\x06 \x01(\t\x12+\n\x05links\x18\x07 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link"(\n&RequestCancelWorkflowExecutionResponse"\xde\x02\n\x1eSignalWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0bsignal_name\x18\x03 \x01(\t\x12/\n\x05input\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t\x12\x13\n\x07\x63ontrol\x18\x07 \x01(\tB\x02\x18\x01\x12.\n\x06header\x18\x08 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12+\n\x05links\x18\n \x03(\x0b\x32\x1c.temporal.api.common.v1.LinkJ\x04\x08\t\x10\n"M\n\x1fSignalWorkflowExecutionResponse\x12*\n\x04link\x18\x01 \x01(\x0b\x32\x1c.temporal.api.common.v1.Link"\xbb\n\n\'SignalWithStartWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12;\n\rworkflow_type\x18\x03 \x01(\x0b\x32$.temporal.api.common.v1.WorkflowType\x12\x38\n\ntask_queue\x18\x04 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12/\n\x05input\x18\x05 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12=\n\x1aworkflow_execution_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x10\n\x08identity\x18\t \x01(\t\x12\x12\n\nrequest_id\x18\n \x01(\t\x12N\n\x18workflow_id_reuse_policy\x18\x0b \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12T\n\x1bworkflow_id_conflict_policy\x18\x16 \x01(\x0e\x32/.temporal.api.enums.v1.WorkflowIdConflictPolicy\x12\x13\n\x0bsignal_name\x18\x0c \x01(\t\x12\x36\n\x0csignal_input\x18\r \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x13\n\x07\x63ontrol\x18\x0e \x01(\tB\x02\x18\x01\x12\x39\n\x0cretry_policy\x18\x0f \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\x10 \x01(\t\x12*\n\x04memo\x18\x11 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x12 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\x13 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x37\n\x14workflow_start_delay\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\ruser_metadata\x18\x17 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12+\n\x05links\x18\x18 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12I\n\x13versioning_override\x18\x19 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x12\x32\n\x08priority\x18\x1a \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12H\n\x14time_skipping_config\x18\x1b \x01(\x0b\x32*.temporal.api.common.v1.TimeSkippingConfigJ\x04\x08\x15\x10\x16"\x9e\x01\n(SignalWithStartWorkflowExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x04 \x01(\t\x12\x0f\n\x07started\x18\x02 \x01(\x08\x12\x31\n\x0bsignal_link\x18\x03 \x01(\x0b\x32\x1c.temporal.api.common.v1.Link"\xc1\x03\n\x1dResetWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12%\n\x1dworkflow_task_finish_event_id\x18\x04 \x01(\x03\x12\x12\n\nrequest_id\x18\x05 \x01(\t\x12G\n\x12reset_reapply_type\x18\x06 \x01(\x0e\x32\'.temporal.api.enums.v1.ResetReapplyTypeB\x02\x18\x01\x12S\n\x1breset_reapply_exclude_types\x18\x07 \x03(\x0e\x32..temporal.api.enums.v1.ResetReapplyExcludeType\x12K\n\x15post_reset_operations\x18\x08 \x03(\x0b\x32,.temporal.api.workflow.v1.PostResetOperation\x12\x10\n\x08identity\x18\t \x01(\t"0\n\x1eResetWorkflowExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t"\x9f\x02\n!TerminateWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x31\n\x07\x64\x65tails\x18\x04 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x1e\n\x16\x66irst_execution_run_id\x18\x06 \x01(\t\x12+\n\x05links\x18\x07 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link"$\n"TerminateWorkflowExecutionResponse"z\n\x1e\x44\x65leteWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution"!\n\x1f\x44\x65leteWorkflowExecutionResponse"\xc9\x02\n!ListOpenWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x42\n\x11start_time_filter\x18\x04 \x01(\x0b\x32\'.temporal.api.filter.v1.StartTimeFilter\x12K\n\x10\x65xecution_filter\x18\x05 \x01(\x0b\x32/.temporal.api.filter.v1.WorkflowExecutionFilterH\x00\x12\x41\n\x0btype_filter\x18\x06 \x01(\x0b\x32*.temporal.api.filter.v1.WorkflowTypeFilterH\x00\x42\t\n\x07\x66ilters"\x82\x01\n"ListOpenWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\x8a\x03\n#ListClosedWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x42\n\x11start_time_filter\x18\x04 \x01(\x0b\x32\'.temporal.api.filter.v1.StartTimeFilter\x12K\n\x10\x65xecution_filter\x18\x05 \x01(\x0b\x32/.temporal.api.filter.v1.WorkflowExecutionFilterH\x00\x12\x41\n\x0btype_filter\x18\x06 \x01(\x0b\x32*.temporal.api.filter.v1.WorkflowTypeFilterH\x00\x12=\n\rstatus_filter\x18\x07 \x01(\x0b\x32$.temporal.api.filter.v1.StatusFilterH\x00\x42\t\n\x07\x66ilters"\x84\x01\n$ListClosedWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"m\n\x1dListWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"~\n\x1eListWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"u\n%ListArchivedWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"\x86\x01\n&ListArchivedWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"m\n\x1dScanWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"~\n\x1eScanWorkflowExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"B\n\x1e\x43ountWorkflowExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t"\xed\x01\n\x1f\x43ountWorkflowExecutionsResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x61\n\x06groups\x18\x02 \x03(\x0b\x32Q.temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup\x1aX\n\x10\x41ggregationGroup\x12\x35\n\x0cgroup_values\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\r\n\x05\x63ount\x18\x02 \x01(\x03"\x1c\n\x1aGetSearchAttributesRequest"\xc9\x01\n\x1bGetSearchAttributesResponse\x12T\n\x04keys\x18\x01 \x03(\x0b\x32\x46.temporal.api.workflowservice.v1.GetSearchAttributesResponse.KeysEntry\x1aT\n\tKeysEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0e\x32\'.temporal.api.enums.v1.IndexedValueType:\x02\x38\x01"\xe9\x02\n RespondQueryTaskCompletedRequest\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12>\n\x0e\x63ompleted_type\x18\x02 \x01(\x0e\x32&.temporal.api.enums.v1.QueryResultType\x12\x36\n\x0cquery_result\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x15\n\rerror_message\x18\x04 \x01(\t\x12\x11\n\tnamespace\x18\x06 \x01(\t\x12\x31\n\x07\x66\x61ilure\x18\x07 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12=\n\x05\x63\x61use\x18\x08 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCause\x12\x17\n\x0fpoller_group_id\x18\t \x01(\tJ\x04\x08\x05\x10\x06"#\n!RespondQueryTaskCompletedResponse"n\n\x1bResetStickyTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution"\x1e\n\x1cResetStickyTaskQueueResponse"\x9b\x02\n\x15ShutdownWorkerRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11sticky_task_queue\x18\x02 \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x0e\n\x06reason\x18\x04 \x01(\t\x12\x41\n\x10worker_heartbeat\x18\x05 \x01(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat\x12\x1b\n\x13worker_instance_key\x18\x06 \x01(\t\x12\x12\n\ntask_queue\x18\x07 \x01(\t\x12>\n\x10task_queue_types\x18\x08 \x03(\x0e\x32$.temporal.api.enums.v1.TaskQueueType"\x18\n\x16ShutdownWorkerResponse"\xe9\x01\n\x14QueryWorkflowRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x33\n\x05query\x18\x03 \x01(\x0b\x32$.temporal.api.query.v1.WorkflowQuery\x12K\n\x16query_reject_condition\x18\x04 \x01(\x0e\x32+.temporal.api.enums.v1.QueryRejectCondition"\xb9\x01\n\x15QueryWorkflowResponse\x12\x36\n\x0cquery_result\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12<\n\x0equery_rejected\x18\x02 \x01(\x0b\x32$.temporal.api.query.v1.QueryRejected\x12*\n\x04link\x18\x03 \x01(\x0b\x32\x1c.temporal.api.common.v1.Link"s\n DescribeWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution"\x99\x05\n!DescribeWorkflowExecutionResponse\x12K\n\x10\x65xecution_config\x18\x01 \x01(\x0b\x32\x31.temporal.api.workflow.v1.WorkflowExecutionConfig\x12P\n\x17workflow_execution_info\x18\x02 \x01(\x0b\x32/.temporal.api.workflow.v1.WorkflowExecutionInfo\x12I\n\x12pending_activities\x18\x03 \x03(\x0b\x32-.temporal.api.workflow.v1.PendingActivityInfo\x12M\n\x10pending_children\x18\x04 \x03(\x0b\x32\x33.temporal.api.workflow.v1.PendingChildExecutionInfo\x12P\n\x15pending_workflow_task\x18\x05 \x01(\x0b\x32\x31.temporal.api.workflow.v1.PendingWorkflowTaskInfo\x12\x39\n\tcallbacks\x18\x06 \x03(\x0b\x32&.temporal.api.workflow.v1.CallbackInfo\x12U\n\x18pending_nexus_operations\x18\x07 \x03(\x0b\x32\x33.temporal.api.workflow.v1.PendingNexusOperationInfo\x12W\n\x16workflow_extended_info\x18\x08 \x01(\x0b\x32\x37.temporal.api.workflow.v1.WorkflowExecutionExtendedInfo"\x90\x04\n\x18\x44\x65scribeTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12=\n\x0ftask_queue_type\x18\x03 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12\x14\n\x0creport_stats\x18\x08 \x01(\x08\x12\x15\n\rreport_config\x18\x0b \x01(\x08\x12%\n\x19include_task_queue_status\x18\x04 \x01(\x08\x42\x02\x18\x01\x12\x42\n\x08\x61pi_mode\x18\x05 \x01(\x0e\x32,.temporal.api.enums.v1.DescribeTaskQueueModeB\x02\x18\x01\x12J\n\x08versions\x18\x06 \x01(\x0b\x32\x34.temporal.api.taskqueue.v1.TaskQueueVersionSelectionB\x02\x18\x01\x12\x42\n\x10task_queue_types\x18\x07 \x03(\x0e\x32$.temporal.api.enums.v1.TaskQueueTypeB\x02\x18\x01\x12\x1a\n\x0ereport_pollers\x18\t \x01(\x08\x42\x02\x18\x01\x12$\n\x18report_task_reachability\x18\n \x01(\x08\x42\x02\x18\x01"\xec\x07\n\x19\x44\x65scribeTaskQueueResponse\x12\x36\n\x07pollers\x18\x01 \x03(\x0b\x32%.temporal.api.taskqueue.v1.PollerInfo\x12\x38\n\x05stats\x18\x05 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats\x12q\n\x15stats_by_priority_key\x18\x08 \x03(\x0b\x32R.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.StatsByPriorityKeyEntry\x12K\n\x0fversioning_info\x18\x04 \x01(\x0b\x32\x32.temporal.api.taskqueue.v1.TaskQueueVersioningInfo\x12:\n\x06\x63onfig\x18\x06 \x01(\x0b\x32*.temporal.api.taskqueue.v1.TaskQueueConfig\x12k\n\x14\x65\x66\x66\x65\x63tive_rate_limit\x18\x07 \x01(\x0b\x32M.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit\x12I\n\x11task_queue_status\x18\x02 \x01(\x0b\x32*.temporal.api.taskqueue.v1.TaskQueueStatusB\x02\x18\x01\x12g\n\rversions_info\x18\x03 \x03(\x0b\x32L.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.VersionsInfoEntryB\x02\x18\x01\x1a\x64\n\x17StatsByPriorityKeyEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats:\x02\x38\x01\x1at\n\x12\x45\x66\x66\x65\x63tiveRateLimit\x12\x1b\n\x13requests_per_second\x18\x01 \x01(\x02\x12\x41\n\x11rate_limit_source\x18\x02 \x01(\x0e\x32&.temporal.api.enums.v1.RateLimitSource\x1a\x64\n\x11VersionsInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.temporal.api.taskqueue.v1.TaskQueueVersionInfo:\x02\x38\x01"\x17\n\x15GetClusterInfoRequest"\xd1\x03\n\x16GetClusterInfoResponse\x12h\n\x11supported_clients\x18\x01 \x03(\x0b\x32M.temporal.api.workflowservice.v1.GetClusterInfoResponse.SupportedClientsEntry\x12\x16\n\x0eserver_version\x18\x02 \x01(\t\x12\x12\n\ncluster_id\x18\x03 \x01(\t\x12:\n\x0cversion_info\x18\x04 \x01(\x0b\x32$.temporal.api.version.v1.VersionInfo\x12\x14\n\x0c\x63luster_name\x18\x05 \x01(\t\x12\x1b\n\x13history_shard_count\x18\x06 \x01(\x05\x12\x19\n\x11persistence_store\x18\x07 \x01(\t\x12\x18\n\x10visibility_store\x18\x08 \x01(\t\x12 \n\x18initial_failover_version\x18\t \x01(\x03\x12"\n\x1a\x66\x61ilover_version_increment\x18\n \x01(\x03\x1a\x37\n\x15SupportedClientsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x16\n\x14GetSystemInfoRequest"\xc1\x04\n\x15GetSystemInfoResponse\x12\x16\n\x0eserver_version\x18\x01 \x01(\t\x12Y\n\x0c\x63\x61pabilities\x18\x02 \x01(\x0b\x32\x43.temporal.api.workflowservice.v1.GetSystemInfoResponse.Capabilities\x1a\xb4\x03\n\x0c\x43\x61pabilities\x12\x1f\n\x17signal_and_query_header\x18\x01 \x01(\x08\x12&\n\x1einternal_error_differentiation\x18\x02 \x01(\x08\x12*\n"activity_failure_include_heartbeat\x18\x03 \x01(\x08\x12\x1a\n\x12supports_schedules\x18\x04 \x01(\x08\x12"\n\x1a\x65ncoded_failure_attributes\x18\x05 \x01(\x08\x12!\n\x19\x62uild_id_based_versioning\x18\x06 \x01(\x08\x12\x13\n\x0bupsert_memo\x18\x07 \x01(\x08\x12\x1c\n\x14\x65\x61ger_workflow_start\x18\x08 \x01(\x08\x12\x14\n\x0csdk_metadata\x18\t \x01(\x08\x12\'\n\x1f\x63ount_group_by_execution_status\x18\n \x01(\x08\x12\r\n\x05nexus\x18\x0b \x01(\x08\x12!\n\x19server_scaled_deployments\x18\x0c \x01(\x08\x12(\n server_scaled_provider_cloud_run\x18\r \x01(\x08"m\n\x1eListTaskQueuePartitionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x02 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue"\xdf\x01\n\x1fListTaskQueuePartitionsResponse\x12]\n\x1e\x61\x63tivity_task_queue_partitions\x18\x01 \x03(\x0b\x32\x35.temporal.api.taskqueue.v1.TaskQueuePartitionMetadata\x12]\n\x1eworkflow_task_queue_partitions\x18\x02 \x03(\x0b\x32\x35.temporal.api.taskqueue.v1.TaskQueuePartitionMetadata"\xcc\x02\n\x15\x43reateScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x34\n\x08schedule\x18\x03 \x01(\x0b\x32".temporal.api.schedule.v1.Schedule\x12>\n\rinitial_patch\x18\x04 \x01(\x0b\x32\'.temporal.api.schedule.v1.SchedulePatch\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t\x12*\n\x04memo\x18\x07 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x08 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes"0\n\x16\x43reateScheduleResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c"A\n\x17\x44\x65scribeScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t"\x8f\x02\n\x18\x44\x65scribeScheduleResponse\x12\x34\n\x08schedule\x18\x01 \x01(\x0b\x32".temporal.api.schedule.v1.Schedule\x12\x34\n\x04info\x18\x02 \x01(\x0b\x32&.temporal.api.schedule.v1.ScheduleInfo\x12*\n\x04memo\x18\x03 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x04 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x16\n\x0e\x63onflict_token\x18\x05 \x01(\x0c"\xa4\x02\n\x15UpdateScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x34\n\x08schedule\x18\x03 \x01(\x0b\x32".temporal.api.schedule.v1.Schedule\x12\x16\n\x0e\x63onflict_token\x18\x04 \x01(\x0c\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t\x12\x43\n\x11search_attributes\x18\x07 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12*\n\x04memo\x18\x08 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo"\x18\n\x16UpdateScheduleResponse"\x9c\x01\n\x14PatchScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x36\n\x05patch\x18\x03 \x01(\x0b\x32\'.temporal.api.schedule.v1.SchedulePatch\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x12\n\nrequest_id\x18\x05 \x01(\t"\x17\n\x15PatchScheduleResponse"\xa8\x01\n ListScheduleMatchingTimesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"S\n!ListScheduleMatchingTimesResponse\x12.\n\nstart_time\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.Timestamp"Q\n\x15\x44\x65leteScheduleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bschedule_id\x18\x02 \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t"\x18\n\x16\x44\x65leteScheduleResponse"l\n\x14ListSchedulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x19\n\x11maximum_page_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"p\n\x15ListSchedulesResponse\x12>\n\tschedules\x18\x01 \x03(\x0b\x32+.temporal.api.schedule.v1.ScheduleListEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"9\n\x15\x43ountSchedulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t"\xdb\x01\n\x16\x43ountSchedulesResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12X\n\x06groups\x18\x02 \x03(\x0b\x32H.temporal.api.workflowservice.v1.CountSchedulesResponse.AggregationGroup\x1aX\n\x10\x41ggregationGroup\x12\x35\n\x0cgroup_values\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\r\n\x05\x63ount\x18\x02 \x01(\x03"\x86\x05\n\'UpdateWorkerBuildIdCompatibilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12-\n#add_new_build_id_in_new_default_set\x18\x03 \x01(\tH\x00\x12\x87\x01\n\x1b\x61\x64\x64_new_compatible_build_id\x18\x04 \x01(\x0b\x32`.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersionH\x00\x12!\n\x17promote_set_by_build_id\x18\x05 \x01(\tH\x00\x12%\n\x1bpromote_build_id_within_set\x18\x06 \x01(\tH\x00\x12h\n\nmerge_sets\x18\x07 \x01(\x0b\x32R.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSetsH\x00\x1ao\n\x17\x41\x64\x64NewCompatibleVersion\x12\x14\n\x0cnew_build_id\x18\x01 \x01(\t\x12$\n\x1c\x65xisting_compatible_build_id\x18\x02 \x01(\t\x12\x18\n\x10make_set_default\x18\x03 \x01(\x08\x1aI\n\tMergeSets\x12\x1c\n\x14primary_set_build_id\x18\x01 \x01(\t\x12\x1e\n\x16secondary_set_build_id\x18\x02 \x01(\tB\x0b\n\toperation"@\n(UpdateWorkerBuildIdCompatibilityResponseJ\x04\x08\x01\x10\x02R\x0eversion_set_id"_\n$GetWorkerBuildIdCompatibilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12\x10\n\x08max_sets\x18\x03 \x01(\x05"t\n%GetWorkerBuildIdCompatibilityResponse\x12K\n\x12major_version_sets\x18\x01 \x03(\x0b\x32/.temporal.api.taskqueue.v1.CompatibleVersionSet"\xb5\r\n"UpdateWorkerVersioningRulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12\x16\n\x0e\x63onflict_token\x18\x03 \x01(\x0c\x12\x81\x01\n\x16insert_assignment_rule\x18\x04 \x01(\x0b\x32_.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRuleH\x00\x12\x83\x01\n\x17replace_assignment_rule\x18\x05 \x01(\x0b\x32`.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRuleH\x00\x12\x81\x01\n\x16\x64\x65lete_assignment_rule\x18\x06 \x01(\x0b\x32_.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRuleH\x00\x12\x8c\x01\n\x1c\x61\x64\x64_compatible_redirect_rule\x18\x07 \x01(\x0b\x32\x64.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRuleH\x00\x12\x94\x01\n replace_compatible_redirect_rule\x18\x08 \x01(\x0b\x32h.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRuleH\x00\x12\x92\x01\n\x1f\x64\x65lete_compatible_redirect_rule\x18\t \x01(\x0b\x32g.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRuleH\x00\x12l\n\x0f\x63ommit_build_id\x18\n \x01(\x0b\x32Q.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildIdH\x00\x1aq\n\x1bInsertBuildIdAssignmentRule\x12\x12\n\nrule_index\x18\x01 \x01(\x05\x12>\n\x04rule\x18\x02 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.BuildIdAssignmentRule\x1a\x81\x01\n\x1cReplaceBuildIdAssignmentRule\x12\x12\n\nrule_index\x18\x01 \x01(\x05\x12>\n\x04rule\x18\x02 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.BuildIdAssignmentRule\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\x1a@\n\x1b\x44\x65leteBuildIdAssignmentRule\x12\x12\n\nrule_index\x18\x01 \x01(\x05\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x1aj\n AddCompatibleBuildIdRedirectRule\x12\x46\n\x04rule\x18\x01 \x01(\x0b\x32\x38.temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule\x1an\n$ReplaceCompatibleBuildIdRedirectRule\x12\x46\n\x04rule\x18\x01 \x01(\x0b\x32\x38.temporal.api.taskqueue.v1.CompatibleBuildIdRedirectRule\x1a>\n#DeleteCompatibleBuildIdRedirectRule\x12\x17\n\x0fsource_build_id\x18\x01 \x01(\t\x1a\x37\n\rCommitBuildId\x12\x17\n\x0ftarget_build_id\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x42\x0b\n\toperation"\xfc\x01\n#UpdateWorkerVersioningRulesResponse\x12U\n\x10\x61ssignment_rules\x18\x01 \x03(\x0b\x32;.temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule\x12\x66\n\x19\x63ompatible_redirect_rules\x18\x02 \x03(\x0b\x32\x43.temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule\x12\x16\n\x0e\x63onflict_token\x18\x03 \x01(\x0c"H\n\x1fGetWorkerVersioningRulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t"\xf9\x01\n GetWorkerVersioningRulesResponse\x12U\n\x10\x61ssignment_rules\x18\x01 \x03(\x0b\x32;.temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule\x12\x66\n\x19\x63ompatible_redirect_rules\x18\x02 \x03(\x0b\x32\x43.temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule\x12\x16\n\x0e\x63onflict_token\x18\x03 \x01(\x0c"\x9c\x01\n GetWorkerTaskReachabilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tbuild_ids\x18\x02 \x03(\t\x12\x13\n\x0btask_queues\x18\x03 \x03(\t\x12=\n\x0creachability\x18\x04 \x01(\x0e\x32\'.temporal.api.enums.v1.TaskReachability"r\n!GetWorkerTaskReachabilityResponse\x12M\n\x15\x62uild_id_reachability\x18\x01 \x03(\x0b\x32..temporal.api.taskqueue.v1.BuildIdReachability"\x85\x02\n\x1eUpdateWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x1e\n\x16\x66irst_execution_run_id\x18\x03 \x01(\t\x12\x37\n\x0bwait_policy\x18\x04 \x01(\x0b\x32".temporal.api.update.v1.WaitPolicy\x12\x30\n\x07request\x18\x05 \x01(\x0b\x32\x1f.temporal.api.update.v1.Request"\xea\x02\n\x1fUpdateWorkflowExecutionResponse\x12\x35\n\nupdate_ref\x18\x01 \x01(\x0b\x32!.temporal.api.update.v1.UpdateRef\x12\x30\n\x07outcome\x18\x02 \x01(\x0b\x32\x1f.temporal.api.update.v1.Outcome\x12K\n\x05stage\x18\x03 \x01(\x0e\x32<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage\x12*\n\x04link\x18\x04 \x01(\x0b\x32\x1c.temporal.api.common.v1.Link\x12\x65\n&propagated_nexus_serialization_context\x18\x05 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext"\xd6\n\n\x1aStartBatchOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x18\n\x10visibility_query\x18\x02 \x01(\t\x12\x0e\n\x06job_id\x18\x03 \x01(\t\x12\x0e\n\x06reason\x18\x04 \x01(\t\x12\x41\n\nexecutions\x18\x05 \x03(\x0b\x32).temporal.api.common.v1.WorkflowExecutionB\x02\x18\x01\x12<\n\x11target_executions\x18\x16 \x03(\x0b\x32!.temporal.api.common.v1.Execution\x12!\n\x19max_operations_per_second\x18\x06 \x01(\x02\x12Q\n\x15termination_operation\x18\n \x01(\x0b\x32\x30.temporal.api.batch.v1.BatchOperationTerminationH\x00\x12G\n\x10signal_operation\x18\x0b \x01(\x0b\x32+.temporal.api.batch.v1.BatchOperationSignalH\x00\x12S\n\x16\x63\x61ncellation_operation\x18\x0c \x01(\x0b\x32\x31.temporal.api.batch.v1.BatchOperationCancellationH\x00\x12K\n\x12\x64\x65letion_operation\x18\r \x01(\x0b\x32-.temporal.api.batch.v1.BatchOperationDeletionH\x00\x12\x45\n\x0freset_operation\x18\x0e \x01(\x0b\x32*.temporal.api.batch.v1.BatchOperationResetH\x00\x12p\n!update_workflow_options_operation\x18\x0f \x01(\x0b\x32\x43.temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptionsH\x00\x12^\n\x1cunpause_activities_operation\x18\x10 \x01(\x0b\x32\x36.temporal.api.batch.v1.BatchOperationUnpauseActivitiesH\x00\x12Z\n\x1areset_activities_operation\x18\x11 \x01(\x0b\x32\x34.temporal.api.batch.v1.BatchOperationResetActivitiesH\x00\x12g\n!update_activity_options_operation\x18\x12 \x01(\x0b\x32:.temporal.api.batch.v1.BatchOperationUpdateActivityOptionsH\x00\x12\\\n\x1b\x63\x61ncel_activities_operation\x18\x13 \x01(\x0b\x32\x35.temporal.api.batch.v1.BatchOperationCancelActivitiesH\x00\x12\x62\n\x1eterminate_activities_operation\x18\x14 \x01(\x0b\x32\x38.temporal.api.batch.v1.BatchOperationTerminateActivitiesH\x00\x12\\\n\x1b\x64\x65lete_activities_operation\x18\x15 \x01(\x0b\x32\x35.temporal.api.batch.v1.BatchOperationDeleteActivitiesH\x00\x42\x0b\n\toperation"\x1d\n\x1bStartBatchOperationResponse"`\n\x19StopBatchOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t"\x1c\n\x1aStopBatchOperationResponse"B\n\x1d\x44\x65scribeBatchOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t"\xd8\x03\n\x1e\x44\x65scribeBatchOperationResponse\x12\x41\n\x0eoperation_type\x18\x01 \x01(\x0e\x32).temporal.api.enums.v1.BatchOperationType\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12\x39\n\x05state\x18\x03 \x01(\x0e\x32*.temporal.api.enums.v1.BatchOperationState\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nclose_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1d\n\x15total_operation_count\x18\x06 \x01(\x03\x12 \n\x18\x63omplete_operation_count\x18\x07 \x01(\x03\x12\x1f\n\x17\x66\x61ilure_operation_count\x18\x08 \x01(\x03\x12\x10\n\x08identity\x18\t \x01(\t\x12\x0e\n\x06reason\x18\n \x01(\t\x12\r\n\x05query\x18\x0b \x01(\t\x12\x35\n\nexecutions\x18\x0c \x03(\x0b\x32!.temporal.api.common.v1.Execution"[\n\x1aListBatchOperationsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c"y\n\x1bListBatchOperationsResponse\x12\x41\n\x0eoperation_info\x18\x01 \x03(\x0b\x32).temporal.api.batch.v1.BatchOperationInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\xb9\x01\n"PollWorkflowExecutionUpdateRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x35\n\nupdate_ref\x18\x02 \x01(\x0b\x32!.temporal.api.update.v1.UpdateRef\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x37\n\x0bwait_policy\x18\x04 \x01(\x0b\x32".temporal.api.update.v1.WaitPolicy"\xc2\x02\n#PollWorkflowExecutionUpdateResponse\x12\x30\n\x07outcome\x18\x01 \x01(\x0b\x32\x1f.temporal.api.update.v1.Outcome\x12K\n\x05stage\x18\x02 \x01(\x0e\x32<.temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage\x12\x35\n\nupdate_ref\x18\x03 \x01(\x0b\x32!.temporal.api.update.v1.UpdateRef\x12\x65\n&propagated_nexus_serialization_context\x18\x04 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext"\xe5\x03\n\x19PollNexusTaskQueueRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x38\n\ntask_queue\x18\x03 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12\x17\n\x0fpoller_group_id\x18\t \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x1b\n\x13worker_instance_key\x18\x08 \x01(\t\x12Z\n\x1bworker_version_capabilities\x18\x04 \x01(\x0b\x32\x31.temporal.api.common.v1.WorkerVersionCapabilitiesB\x02\x18\x01\x12O\n\x12\x64\x65ployment_options\x18\x06 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentOptions\x12\x41\n\x10worker_heartbeat\x18\x07 \x03(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat\x12\x43\n\x10poller_pool_info\x18\n \x01(\x0b\x32).temporal.api.taskqueue.v1.PollerPoolInfo"\xe2\x02\n\x1aPollNexusTaskQueueResponse\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12/\n\x07request\x18\x02 \x01(\x0b\x32\x1e.temporal.api.nexus.v1.Request\x12Q\n\x17poller_scaling_decision\x18\x03 \x01(\x0b\x32\x30.temporal.api.taskqueue.v1.PollerScalingDecision\x12\x17\n\x0fpoller_group_id\x18\x04 \x01(\t\x12J\n\x12poller_group_infos\x18\x05 \x03(\x0b\x32*.temporal.api.taskqueue.v1.PollerGroupInfoB\x02\x18\x01\x12G\n\x12poller_groups_info\x18\x06 \x01(\x0b\x32+.temporal.api.taskqueue.v1.PollerGroupsInfo"\xa7\x01\n RespondNexusTaskCompletedRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\ntask_token\x18\x03 \x01(\x0c\x12\x31\n\x08response\x18\x04 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.Response\x12\x17\n\x0fpoller_group_id\x18\x05 \x01(\t"#\n!RespondNexusTaskCompletedResponse"\xdc\x01\n\x1dRespondNexusTaskFailedRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\ntask_token\x18\x03 \x01(\x0c\x12\x36\n\x05\x65rror\x18\x04 \x01(\x0b\x32#.temporal.api.nexus.v1.HandlerErrorB\x02\x18\x01\x12\x31\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x17\n\x0fpoller_group_id\x18\x06 \x01(\t" \n\x1eRespondNexusTaskFailedResponse"\xf4\x02\n\x1c\x45xecuteMultiOperationRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12[\n\noperations\x18\x02 \x03(\x0b\x32G.temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation\x12\x13\n\x0bresource_id\x18\x03 \x01(\t\x1a\xce\x01\n\tOperation\x12X\n\x0estart_workflow\x18\x01 \x01(\x0b\x32>.temporal.api.workflowservice.v1.StartWorkflowExecutionRequestH\x00\x12Z\n\x0fupdate_workflow\x18\x02 \x01(\x0b\x32?.temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequestH\x00\x42\x0b\n\toperation"\xcc\x02\n\x1d\x45xecuteMultiOperationResponse\x12Z\n\tresponses\x18\x01 \x03(\x0b\x32G.temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response\x1a\xce\x01\n\x08Response\x12Y\n\x0estart_workflow\x18\x01 \x01(\x0b\x32?.temporal.api.workflowservice.v1.StartWorkflowExecutionResponseH\x00\x12[\n\x0fupdate_workflow\x18\x02 \x01(\x0b\x32@.temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponseH\x00\x42\n\n\x08response"\xd0\x02\n\x1cUpdateActivityOptionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x43\n\x10\x61\x63tivity_options\x18\x04 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x0c\n\x02id\x18\x06 \x01(\tH\x00\x12\x0e\n\x04type\x18\x07 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\t \x01(\x08H\x00\x12\x18\n\x10restore_original\x18\x08 \x01(\x08\x42\n\n\x08\x61\x63tivity"\xbf\x02\n%UpdateActivityExecutionOptionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x03 \x01(\t\x12\x0e\n\x06run_id\x18\x04 \x01(\t\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x43\n\x10\x61\x63tivity_options\x18\x06 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions\x12/\n\x0bupdate_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x18\n\x10restore_original\x18\x08 \x01(\x08\x12\x13\n\x0bresource_id\x18\t \x01(\t\x12\x12\n\nrequest_id\x18\n \x01(\t"d\n\x1dUpdateActivityOptionsResponse\x12\x43\n\x10\x61\x63tivity_options\x18\x01 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions"m\n&UpdateActivityExecutionOptionsResponse\x12\x43\n\x10\x61\x63tivity_options\x18\x01 \x01(\x0b\x32).temporal.api.activity.v1.ActivityOptions"\xc7\x01\n\x14PauseActivityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x0c\n\x02id\x18\x04 \x01(\tH\x00\x12\x0e\n\x04type\x18\x05 \x01(\tH\x00\x12\x0e\n\x06reason\x18\x06 \x01(\t\x12\x12\n\nrequest_id\x18\x07 \x01(\tB\n\n\x08\x61\x63tivity"\xb7\x01\n\x1dPauseActivityExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x03 \x01(\t\x12\x0e\n\x06run_id\x18\x04 \x01(\t\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x0e\n\x06reason\x18\x06 \x01(\t\x12\x13\n\x0bresource_id\x18\x07 \x01(\t\x12\x12\n\nrequest_id\x18\x08 \x01(\t"\x17\n\x15PauseActivityResponse" \n\x1ePauseActivityExecutionResponse"\x98\x02\n\x16UnpauseActivityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x0c\n\x02id\x18\x04 \x01(\tH\x00\x12\x0e\n\x04type\x18\x05 \x01(\tH\x00\x12\x15\n\x0bunpause_all\x18\x06 \x01(\x08H\x00\x12\x16\n\x0ereset_attempts\x18\x07 \x01(\x08\x12\x17\n\x0freset_heartbeat\x18\x08 \x01(\x08\x12)\n\x06jitter\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\n\n\x08\x61\x63tivity"\x91\x02\n\x1fUnpauseActivityExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x03 \x01(\t\x12\x0e\n\x06run_id\x18\x04 \x01(\t\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x0e\n\x06reason\x18\x08 \x01(\t\x12)\n\x06jitter\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0bresource_id\x18\n \x01(\t\x12\x12\n\nrequest_id\x18\x0b \x01(\tJ\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08R\x0ereset_attemptsR\x0freset_heartbeat"\x19\n\x17UnpauseActivityResponse""\n UnpauseActivityExecutionResponse"\xb3\x02\n\x14ResetActivityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x0c\n\x02id\x18\x04 \x01(\tH\x00\x12\x0e\n\x04type\x18\x05 \x01(\tH\x00\x12\x13\n\tmatch_all\x18\n \x01(\x08H\x00\x12\x17\n\x0freset_heartbeat\x18\x06 \x01(\x08\x12\x13\n\x0bkeep_paused\x18\x07 \x01(\x08\x12)\n\x06jitter\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x18restore_original_options\x18\t \x01(\x08\x42\n\n\x08\x61\x63tivity"\xa2\x02\n\x1dResetActivityExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x03 \x01(\t\x12\x0e\n\x06run_id\x18\x04 \x01(\t\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x13\n\x0bkeep_paused\x18\x06 \x01(\x08\x12)\n\x06jitter\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12 \n\x18restore_original_options\x18\x08 \x01(\x08\x12\x13\n\x0bresource_id\x18\t \x01(\t\x12\x12\n\nrequest_id\x18\n \x01(\t\x12\x17\n\x0freset_heartbeat\x18\x0b \x01(\x08"\x17\n\x15ResetActivityResponse" \n\x1eResetActivityExecutionResponse"\x9c\x02\n%UpdateWorkflowExecutionOptionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12V\n\x1aworkflow_execution_options\x18\x03 \x01(\x0b\x32\x32.temporal.api.workflow.v1.WorkflowExecutionOptions\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x10\n\x08identity\x18\x05 \x01(\t"\xb1\x01\n&UpdateWorkflowExecutionOptionsResponse\x12V\n\x1aworkflow_execution_options\x18\x01 \x01(\x0b\x32\x32.temporal.api.workflow.v1.WorkflowExecutionOptions\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"j\n\x19\x44\x65scribeDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12:\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment"a\n\x1a\x44\x65scribeDeploymentResponse\x12\x43\n\x0f\x64\x65ployment_info\x18\x01 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo"\xc2\x01\n&DescribeWorkerDeploymentVersionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x07version\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x03 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x1f\n\x17report_task_queue_stats\x18\x04 \x01(\x08"\x8c\x05\n\'DescribeWorkerDeploymentVersionResponse\x12_\n\x1eworker_deployment_version_info\x18\x01 \x01(\x0b\x32\x37.temporal.api.deployment.v1.WorkerDeploymentVersionInfo\x12v\n\x13version_task_queues\x18\x02 \x03(\x0b\x32Y.temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue\x1a\x87\x03\n\x10VersionTaskQueue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12\x38\n\x05stats\x18\x03 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats\x12\x90\x01\n\x15stats_by_priority_key\x18\x04 \x03(\x0b\x32q.temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue.StatsByPriorityKeyEntry\x1a\x64\n\x17StatsByPriorityKeyEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).temporal.api.taskqueue.v1.TaskQueueStats:\x02\x38\x01"M\n\x1f\x44\x65scribeWorkerDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t"\x8c\x01\n DescribeWorkerDeploymentResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c\x12P\n\x16worker_deployment_info\x18\x02 \x01(\x0b\x32\x30.temporal.api.deployment.v1.WorkerDeploymentInfo"l\n\x16ListDeploymentsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\x13\n\x0bseries_name\x18\x04 \x01(\t"w\n\x17ListDeploymentsResponse\x12\x17\n\x0fnext_page_token\x18\x01 \x01(\x0c\x12\x43\n\x0b\x64\x65ployments\x18\x02 \x03(\x0b\x32..temporal.api.deployment.v1.DeploymentListInfo"\xcd\x01\n\x1bSetCurrentDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12:\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment\x12\x10\n\x08identity\x18\x03 \x01(\t\x12M\n\x0fupdate_metadata\x18\x04 \x01(\x0b\x32\x34.temporal.api.deployment.v1.UpdateDeploymentMetadata"\xb9\x01\n\x1cSetCurrentDeploymentResponse\x12K\n\x17\x63urrent_deployment_info\x18\x01 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo\x12L\n\x18previous_deployment_info\x18\x02 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo"\xe5\x01\n(SetWorkerDeploymentCurrentVersionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12\x13\n\x07version\x18\x03 \x01(\tB\x02\x18\x01\x12\x10\n\x08\x62uild_id\x18\x07 \x01(\t\x12\x16\n\x0e\x63onflict_token\x18\x04 \x01(\x0c\x12\x10\n\x08identity\x18\x05 \x01(\t\x12"\n\x1aignore_missing_task_queues\x18\x06 \x01(\x08\x12\x18\n\x10\x61llow_no_pollers\x18\t \x01(\x08"\xbf\x01\n)SetWorkerDeploymentCurrentVersionResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c\x12\x1c\n\x10previous_version\x18\x02 \x01(\tB\x02\x18\x01\x12\\\n\x1bprevious_deployment_version\x18\x03 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersionB\x02\x18\x01"\xf9\x01\n(SetWorkerDeploymentRampingVersionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12\x13\n\x07version\x18\x03 \x01(\tB\x02\x18\x01\x12\x10\n\x08\x62uild_id\x18\x08 \x01(\t\x12\x12\n\npercentage\x18\x04 \x01(\x02\x12\x16\n\x0e\x63onflict_token\x18\x05 \x01(\x0c\x12\x10\n\x08identity\x18\x06 \x01(\t\x12"\n\x1aignore_missing_task_queues\x18\x07 \x01(\x08\x12\x18\n\x10\x61llow_no_pollers\x18\n \x01(\x08"\xe0\x01\n)SetWorkerDeploymentRampingVersionResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c\x12\x1c\n\x10previous_version\x18\x02 \x01(\tB\x02\x18\x01\x12\\\n\x1bprevious_deployment_version\x18\x04 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersionB\x02\x18\x01\x12\x1f\n\x13previous_percentage\x18\x03 \x01(\x02\x42\x02\x18\x01"q\n\x1d\x43reateWorkerDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x12\n\nrequest_id\x18\x05 \x01(\t"8\n\x1e\x43reateWorkerDeploymentResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c"]\n\x1cListWorkerDeploymentsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c"\x9f\x05\n\x1dListWorkerDeploymentsResponse\x12\x17\n\x0fnext_page_token\x18\x01 \x01(\x0c\x12r\n\x12worker_deployments\x18\x02 \x03(\x0b\x32V.temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary\x1a\xf0\x03\n\x17WorkerDeploymentSummary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0erouting_config\x18\x03 \x01(\x0b\x32).temporal.api.deployment.v1.RoutingConfig\x12o\n\x16latest_version_summary\x18\x04 \x01(\x0b\x32O.temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary\x12p\n\x17\x63urrent_version_summary\x18\x05 \x01(\x0b\x32O.temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary\x12p\n\x17ramping_version_summary\x18\x06 \x01(\x0b\x32O.temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary"\xf0\x01\n$CreateWorkerDeploymentVersionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12O\n\x12\x64\x65ployment_version\x18\x02 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12>\n\x0e\x63ompute_config\x18\x04 \x01(\x0b\x32&.temporal.api.compute.v1.ComputeConfig\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x05 \x01(\t"\'\n%CreateWorkerDeploymentVersionResponse"\xc8\x01\n$DeleteWorkerDeploymentVersionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x07version\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x05 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x15\n\rskip_drainage\x18\x03 \x01(\x08\x12\x10\n\x08identity\x18\x04 \x01(\t"\'\n%DeleteWorkerDeploymentVersionResponse"]\n\x1d\x44\x65leteWorkerDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t" \n\x1e\x44\x65leteWorkerDeploymentResponse"\x84\x04\n1UpdateWorkerDeploymentVersionComputeConfigRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12O\n\x12\x64\x65ployment_version\x18\x02 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x99\x01\n\x1d\x63ompute_config_scaling_groups\x18\x06 \x03(\x0b\x32r.temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionComputeConfigRequest.ComputeConfigScalingGroupsEntry\x12,\n$remove_compute_config_scaling_groups\x18\x07 \x03(\t\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x1a{\n\x1f\x43omputeConfigScalingGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.temporal.api.compute.v1.ComputeConfigScalingGroupUpdate:\x02\x38\x01"4\n2UpdateWorkerDeploymentVersionComputeConfigResponse"\xf4\x03\n3ValidateWorkerDeploymentVersionComputeConfigRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12O\n\x12\x64\x65ployment_version\x18\x02 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12\x9b\x01\n\x1d\x63ompute_config_scaling_groups\x18\x06 \x03(\x0b\x32t.temporal.api.workflowservice.v1.ValidateWorkerDeploymentVersionComputeConfigRequest.ComputeConfigScalingGroupsEntry\x12,\n$remove_compute_config_scaling_groups\x18\x07 \x03(\t\x12\x10\n\x08identity\x18\x03 \x01(\t\x1a{\n\x1f\x43omputeConfigScalingGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.temporal.api.compute.v1.ComputeConfigScalingGroupUpdate:\x02\x38\x01"6\n4ValidateWorkerDeploymentVersionComputeConfigResponse"\xa2\x03\n,UpdateWorkerDeploymentVersionMetadataRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x07version\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x12\x64\x65ployment_version\x18\x05 \x01(\x0b\x32\x33.temporal.api.deployment.v1.WorkerDeploymentVersion\x12x\n\x0eupsert_entries\x18\x03 \x03(\x0b\x32`.temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest.UpsertEntriesEntry\x12\x16\n\x0eremove_entries\x18\x04 \x03(\t\x12\x10\n\x08identity\x18\x06 \x01(\t\x1aU\n\x12UpsertEntriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"n\n-UpdateWorkerDeploymentVersionMetadataResponse\x12=\n\x08metadata\x18\x01 \x01(\x0b\x32+.temporal.api.deployment.v1.VersionMetadata"\xbd\x01\n!SetWorkerDeploymentManagerRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0f\x64\x65ployment_name\x18\x02 \x01(\t\x12\x1a\n\x10manager_identity\x18\x03 \x01(\tH\x00\x12\x0e\n\x04self\x18\x04 \x01(\x08H\x00\x12\x16\n\x0e\x63onflict_token\x18\x05 \x01(\x0c\x12\x10\n\x08identity\x18\x06 \x01(\tB\x16\n\x14new_manager_identity"c\n"SetWorkerDeploymentManagerResponse\x12\x16\n\x0e\x63onflict_token\x18\x01 \x01(\x0c\x12%\n\x19previous_manager_identity\x18\x02 \x01(\tB\x02\x18\x01"E\n\x1bGetCurrentDeploymentRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bseries_name\x18\x02 \x01(\t"k\n\x1cGetCurrentDeploymentResponse\x12K\n\x17\x63urrent_deployment_info\x18\x01 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo"q\n GetDeploymentReachabilityRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12:\n\ndeployment\x18\x02 \x01(\x0b\x32&.temporal.api.deployment.v1.Deployment"\xe3\x01\n!GetDeploymentReachabilityResponse\x12\x43\n\x0f\x64\x65ployment_info\x18\x01 \x01(\x0b\x32*.temporal.api.deployment.v1.DeploymentInfo\x12\x43\n\x0creachability\x18\x02 \x01(\x0e\x32-.temporal.api.enums.v1.DeploymentReachability\x12\x34\n\x10last_update_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\xb4\x01\n\x19\x43reateWorkflowRuleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x35\n\x04spec\x18\x02 \x01(\x0b\x32\'.temporal.api.rules.v1.WorkflowRuleSpec\x12\x12\n\nforce_scan\x18\x03 \x01(\x08\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x10\n\x08identity\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t"_\n\x1a\x43reateWorkflowRuleResponse\x12\x31\n\x04rule\x18\x01 \x01(\x0b\x32#.temporal.api.rules.v1.WorkflowRule\x12\x0e\n\x06job_id\x18\x02 \x01(\t"A\n\x1b\x44\x65scribeWorkflowRuleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0f\n\x07rule_id\x18\x02 \x01(\t"Q\n\x1c\x44\x65scribeWorkflowRuleResponse\x12\x31\n\x04rule\x18\x01 \x01(\x0b\x32#.temporal.api.rules.v1.WorkflowRule"?\n\x19\x44\x65leteWorkflowRuleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0f\n\x07rule_id\x18\x02 \x01(\t"\x1c\n\x1a\x44\x65leteWorkflowRuleResponse"F\n\x18ListWorkflowRulesRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"h\n\x19ListWorkflowRulesResponse\x12\x32\n\x05rules\x18\x01 \x03(\x0b\x32#.temporal.api.rules.v1.WorkflowRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\xce\x01\n\x1aTriggerWorkflowRuleRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12<\n\texecution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x0c\n\x02id\x18\x04 \x01(\tH\x00\x12\x37\n\x04spec\x18\x05 \x01(\x0b\x32\'.temporal.api.rules.v1.WorkflowRuleSpecH\x00\x12\x10\n\x08identity\x18\x03 \x01(\tB\x06\n\x04rule".\n\x1bTriggerWorkflowRuleResponse\x12\x0f\n\x07\x61pplied\x18\x01 \x01(\x08"\x9b\x01\n\x1cRecordWorkerHeartbeatRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x41\n\x10worker_heartbeat\x18\x03 \x03(\x0b\x32\'.temporal.api.worker.v1.WorkerHeartbeat\x12\x13\n\x0bresource_id\x18\x04 \x01(\t"\x1f\n\x1dRecordWorkerHeartbeatResponse"\x82\x01\n\x12ListWorkersRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t\x12\x1e\n\x16include_system_workers\x18\x05 \x01(\x08"\xa5\x01\n\x13ListWorkersResponse\x12<\n\x0cworkers_info\x18\x01 \x03(\x0b\x32".temporal.api.worker.v1.WorkerInfoB\x02\x18\x01\x12\x37\n\x07workers\x18\x03 \x03(\x0b\x32&.temporal.api.worker.v1.WorkerListInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\xd5\x05\n\x1cUpdateTaskQueueConfigRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\ntask_queue\x18\x03 \x01(\t\x12=\n\x0ftask_queue_type\x18\x04 \x01(\x0e\x32$.temporal.api.enums.v1.TaskQueueType\x12n\n\x17update_queue_rate_limit\x18\x05 \x01(\x0b\x32M.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate\x12}\n&update_fairness_key_rate_limit_default\x18\x06 \x01(\x0b\x32M.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate\x12\x84\x01\n\x1dset_fairness_weight_overrides\x18\x07 \x03(\x0b\x32].temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.SetFairnessWeightOverridesEntry\x12\'\n\x1funset_fairness_weight_overrides\x18\x08 \x03(\t\x1a[\n\x0fRateLimitUpdate\x12\x38\n\nrate_limit\x18\x01 \x01(\x0b\x32$.temporal.api.taskqueue.v1.RateLimit\x12\x0e\n\x06reason\x18\x02 \x01(\t\x1a\x41\n\x1fSetFairnessWeightOverridesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01"[\n\x1dUpdateTaskQueueConfigResponse\x12:\n\x06\x63onfig\x18\x01 \x01(\x0b\x32*.temporal.api.taskqueue.v1.TaskQueueConfig"\x9e\x01\n\x18\x46\x65tchWorkerConfigRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x38\n\x08selector\x18\x06 \x01(\x0b\x32&.temporal.api.common.v1.WorkerSelector\x12\x13\n\x0bresource_id\x18\x07 \x01(\t"U\n\x19\x46\x65tchWorkerConfigResponse\x12\x38\n\rworker_config\x18\x01 \x01(\x0b\x32!.temporal.api.sdk.v1.WorkerConfig"\x8a\x02\n\x19UpdateWorkerConfigRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x38\n\rworker_config\x18\x04 \x01(\x0b\x32!.temporal.api.sdk.v1.WorkerConfig\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x38\n\x08selector\x18\x06 \x01(\x0b\x32&.temporal.api.common.v1.WorkerSelector\x12\x13\n\x0bresource_id\x18\x07 \x01(\t"d\n\x1aUpdateWorkerConfigResponse\x12:\n\rworker_config\x18\x01 \x01(\x0b\x32!.temporal.api.sdk.v1.WorkerConfigH\x00\x42\n\n\x08response"G\n\x15\x44\x65scribeWorkerRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x1b\n\x13worker_instance_key\x18\x02 \x01(\t"Q\n\x16\x44\x65scribeWorkerResponse\x12\x37\n\x0bworker_info\x18\x01 \x01(\x0b\x32".temporal.api.worker.v1.WorkerInfo"W\n\x13\x43ountWorkersRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t\x12\x1e\n\x16include_system_workers\x18\x03 \x01(\x08"%\n\x14\x43ountWorkersResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03"\x8d\x01\n\x1dPauseWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x0e\n\x06reason\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t" \n\x1ePauseWorkflowExecutionResponse"\x8f\x01\n\x1fUnpauseWorkflowExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x0e\n\x06reason\x18\x05 \x01(\t\x12\x12\n\nrequest_id\x18\x06 \x01(\t""\n UnpauseWorkflowExecutionResponse"\xa1\n\n\x1dStartActivityExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12;\n\ractivity_type\x18\x05 \x01(\x0b\x32$.temporal.api.common.v1.ActivityType\x12\x38\n\ntask_queue\x18\x06 \x01(\x0b\x32$.temporal.api.taskqueue.v1.TaskQueue\x12<\n\x19schedule_to_close_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x0b \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12/\n\x05input\x18\x0c \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x45\n\x0fid_reuse_policy\x18\r \x01(\x0e\x32,.temporal.api.enums.v1.ActivityIdReusePolicy\x12K\n\x12id_conflict_policy\x18\x0e \x01(\x0e\x32/.temporal.api.enums.v1.ActivityIdConflictPolicy\x12\x43\n\x11search_attributes\x18\x0f \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\x06header\x18\x10 \x01(\x0b\x32\x1e.temporal.api.common.v1.Header\x12\x38\n\ruser_metadata\x18\x11 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12\x32\n\x08priority\x18\x12 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12>\n\x14\x63ompletion_callbacks\x18\x13 \x03(\x0b\x32 .temporal.api.common.v1.Callback\x12+\n\x05links\x18\x14 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x12\x46\n\x13on_conflict_options\x18\x15 \x01(\x0b\x32).temporal.api.common.v1.OnConflictOptions\x12.\n\x0bstart_delay\x18\x16 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x65\n&propagated_nexus_serialization_context\x18\x17 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext\x12\x1f\n\x17request_eager_execution\x18\x18 \x01(\x08"\xca\x01\n\x1eStartActivityExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x0f\n\x07started\x18\x02 \x01(\x08\x12*\n\x04link\x18\x03 \x01(\x0b\x32\x1c.temporal.api.common.v1.Link\x12[\n\x13\x65\x61ger_activity_task\x18\x04 \x01(\x0b\x32>.temporal.api.workflowservice.v1.PollActivityTaskQueueResponse"\xe4\x01\n DescribeActivityExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x15\n\rinclude_input\x18\x04 \x01(\x08\x12\x17\n\x0finclude_outcome\x18\x05 \x01(\x08\x12\x17\n\x0flong_poll_token\x18\x06 \x01(\x0c\x12!\n\x19include_heartbeat_details\x18\x07 \x01(\x08\x12\x1c\n\x14include_last_failure\x18\x08 \x01(\x08"\xbc\x02\n!DescribeActivityExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12=\n\x04info\x18\x02 \x01(\x0b\x32/.temporal.api.activity.v1.ActivityExecutionInfo\x12/\n\x05input\x18\x03 \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x43\n\x07outcome\x18\x04 \x01(\x0b\x32\x32.temporal.api.activity.v1.ActivityExecutionOutcome\x12\x17\n\x0flong_poll_token\x18\x05 \x01(\x0c\x12\x39\n\tcallbacks\x18\x06 \x03(\x0b\x32&.temporal.api.activity.v1.CallbackInfo"V\n\x1cPollActivityExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t"\xdb\x01\n\x1dPollActivityExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x43\n\x07outcome\x18\x02 \x01(\x0b\x32\x32.temporal.api.activity.v1.ActivityExecutionOutcome\x12\x65\n&propagated_nexus_serialization_context\x18\x03 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext"m\n\x1dListActivityExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"\x82\x01\n\x1eListActivityExecutionsResponse\x12G\n\nexecutions\x18\x01 \x03(\x0b\x32\x33.temporal.api.activity.v1.ActivityExecutionListInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"\x8e\x08\n#StartNexusOperationExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x14\n\x0coperation_id\x18\x04 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x05 \x01(\t\x12\x0f\n\x07service\x18\x06 \x01(\t\x12\x11\n\toperation\x18\x07 \x01(\t\x12<\n\x19schedule_to_close_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x05input\x18\x0b \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12K\n\x0fid_reuse_policy\x18\x0c \x01(\x0e\x32\x32.temporal.api.enums.v1.NexusOperationIdReusePolicy\x12Q\n\x12id_conflict_policy\x18\r \x01(\x0e\x32\x35.temporal.api.enums.v1.NexusOperationIdConflictPolicy\x12N\n\x13on_conflict_options\x18\x11 \x01(\x0b\x32\x31.temporal.api.nexusoperation.v1.OnConflictOptions\x12\x43\n\x11search_attributes\x18\x0e \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12k\n\x0cnexus_header\x18\x0f \x03(\x0b\x32U.temporal.api.workflowservice.v1.StartNexusOperationExecutionRequest.NexusHeaderEntry\x12\x38\n\ruser_metadata\x18\x10 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12>\n\x14\x63ompletion_callbacks\x18\x12 \x03(\x0b\x32 .temporal.api.common.v1.Callback\x12+\n\x05links\x18\x13 \x03(\x0b\x32\x1c.temporal.api.common.v1.Link\x1a\x32\n\x10NexusHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"G\n$StartNexusOperationExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x0f\n\x07started\x18\x02 \x01(\x08"\xaa\x01\n&DescribeNexusOperationExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0coperation_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x15\n\rinclude_input\x18\x04 \x01(\x08\x12\x17\n\x0finclude_outcome\x18\x05 \x01(\x08\x12\x17\n\x0flong_poll_token\x18\x06 \x01(\x0c"\x83\x03\n\'DescribeNexusOperationExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12@\n\x04info\x18\x02 \x01(\x0b\x32\x32.temporal.api.nexus.v1.NexusOperationExecutionInfo\x12.\n\x05input\x18\x03 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x31\n\x06result\x18\x04 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadH\x00\x12\x33\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x17\n\x0flong_poll_token\x18\x06 \x01(\x0c\x12J\n\x14\x63ompletion_callbacks\x18\x07 \x03(\x0b\x32,.temporal.api.nexusoperation.v1.CallbackInfoB\t\n\x07outcome"\xa1\x01\n"PollNexusOperationExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0coperation_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x42\n\nwait_stage\x18\x04 \x01(\x0e\x32..temporal.api.enums.v1.NexusOperationWaitStage"\xec\x02\n#PollNexusOperationExecutionResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x42\n\nwait_stage\x18\x02 \x01(\x0e\x32..temporal.api.enums.v1.NexusOperationWaitStage\x12\x17\n\x0foperation_token\x18\x03 \x01(\t\x12\x65\n&propagated_nexus_serialization_context\x18\x06 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext\x12\x31\n\x06result\x18\x04 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadH\x00\x12\x33\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\t\n\x07outcome"s\n#ListNexusOperationExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\x0c\x12\r\n\x05query\x18\x04 \x01(\t"\x8b\x01\n$ListNexusOperationExecutionsResponse\x12J\n\noperations\x18\x01 \x03(\x0b\x32\x36.temporal.api.nexus.v1.NexusOperationExecutionListInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\x0c"B\n\x1e\x43ountActivityExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t"\xed\x01\n\x1f\x43ountActivityExecutionsResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x61\n\x06groups\x18\x02 \x03(\x0b\x32Q.temporal.api.workflowservice.v1.CountActivityExecutionsResponse.AggregationGroup\x1aX\n\x10\x41ggregationGroup\x12\x35\n\x0cgroup_values\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\r\n\x05\x63ount\x18\x02 \x01(\x03"H\n$CountNexusOperationExecutionsRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\r\n\x05query\x18\x02 \x01(\t"\xf9\x01\n%CountNexusOperationExecutionsResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12g\n\x06groups\x18\x02 \x03(\x0b\x32W.temporal.api.workflowservice.v1.CountNexusOperationExecutionsResponse.AggregationGroup\x1aX\n\x10\x41ggregationGroup\x12\x35\n\x0cgroup_values\x18\x01 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\r\n\x05\x63ount\x18\x02 \x01(\x03"\x95\x01\n%RequestCancelActivityExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x12\n\nrequest_id\x18\x05 \x01(\t\x12\x0e\n\x06reason\x18\x06 \x01(\t"(\n&RequestCancelActivityExecutionResponse"\x91\x01\n!TerminateActivityExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x12\n\nrequest_id\x18\x05 \x01(\t\x12\x0e\n\x06reason\x18\x06 \x01(\t"$\n"TerminateActivityExecutionResponse"X\n\x1e\x44\x65leteActivityExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t"!\n\x1f\x44\x65leteActivityExecutionResponse"\x9c\x01\n+RequestCancelNexusOperationExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0coperation_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x12\n\nrequest_id\x18\x05 \x01(\t\x12\x0e\n\x06reason\x18\x06 \x01(\t".\n,RequestCancelNexusOperationExecutionResponse"\x98\x01\n\'TerminateNexusOperationExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0coperation_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x10\n\x08identity\x18\x04 \x01(\t\x12\x12\n\nrequest_id\x18\x05 \x01(\t\x12\x0e\n\x06reason\x18\x06 \x01(\t"*\n(TerminateNexusOperationExecutionResponse"_\n$DeleteNexusOperationExecutionRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x14\n\x0coperation_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t"\'\n%DeleteNexusOperationExecutionResponse"\x9d\x01\n(PollWorkflowExecutionTimeSkippingRequest\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x45\n\x12workflow_execution\x18\x02 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x17\n\x0f\x66\x61st_forward_id\x18\x03 \x01(\t"\xe8\x01\n)PollWorkflowExecutionTimeSkippingResponse\x12T\n\x1b\x66\x61st_forward_polling_result\x18\x01 \x01(\x0e\x32/.temporal.api.enums.v1.FastForwardPollingResult\x12\x15\n\rfailed_reason\x18\x02 \x01(\t\x12N\n\x11\x66\x61st_forward_info\x18\x03 \x01(\x0b\x32\x33.temporal.api.common.v1.TimeSkippingFastForwardInfoB\xbe\x01\n"io.temporal.api.workflowservice.v1B\x14RequestResponseProtoP\x01Z5go.temporal.io/api/workflowservice/v1;workflowservice\xaa\x02!Temporalio.Api.WorkflowService.V1\xea\x02$Temporalio::Api::WorkflowService::V1b\x06proto3' ) -_sym_db.RegisterMessage(PatchScheduleResponse) - -ListScheduleMatchingTimesRequest = _reflection.GeneratedProtocolMessageType( - "ListScheduleMatchingTimesRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTSCHEDULEMATCHINGTIMESREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListScheduleMatchingTimesRequest) - }, -) -_sym_db.RegisterMessage(ListScheduleMatchingTimesRequest) - -ListScheduleMatchingTimesResponse = _reflection.GeneratedProtocolMessageType( - "ListScheduleMatchingTimesResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTSCHEDULEMATCHINGTIMESRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListScheduleMatchingTimesResponse) - }, -) -_sym_db.RegisterMessage(ListScheduleMatchingTimesResponse) - -DeleteScheduleRequest = _reflection.GeneratedProtocolMessageType( - "DeleteScheduleRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETESCHEDULEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteScheduleRequest) - }, -) -_sym_db.RegisterMessage(DeleteScheduleRequest) - -DeleteScheduleResponse = _reflection.GeneratedProtocolMessageType( - "DeleteScheduleResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETESCHEDULERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteScheduleResponse) - }, -) -_sym_db.RegisterMessage(DeleteScheduleResponse) - -ListSchedulesRequest = _reflection.GeneratedProtocolMessageType( - "ListSchedulesRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTSCHEDULESREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListSchedulesRequest) - }, -) -_sym_db.RegisterMessage(ListSchedulesRequest) - -ListSchedulesResponse = _reflection.GeneratedProtocolMessageType( - "ListSchedulesResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTSCHEDULESRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListSchedulesResponse) - }, -) -_sym_db.RegisterMessage(ListSchedulesResponse) - -UpdateWorkerBuildIdCompatibilityRequest = _reflection.GeneratedProtocolMessageType( - "UpdateWorkerBuildIdCompatibilityRequest", - (_message.Message,), - { - "AddNewCompatibleVersion": _reflection.GeneratedProtocolMessageType( - "AddNewCompatibleVersion", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_ADDNEWCOMPATIBLEVERSION, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion) - }, - ), - "MergeSets": _reflection.GeneratedProtocolMessageType( - "MergeSets", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_MERGESETS, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets) - }, - ), - "DESCRIPTOR": _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest) - }, -) -_sym_db.RegisterMessage(UpdateWorkerBuildIdCompatibilityRequest) -_sym_db.RegisterMessage(UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion) -_sym_db.RegisterMessage(UpdateWorkerBuildIdCompatibilityRequest.MergeSets) - -UpdateWorkerBuildIdCompatibilityResponse = _reflection.GeneratedProtocolMessageType( - "UpdateWorkerBuildIdCompatibilityResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERBUILDIDCOMPATIBILITYRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse) - }, -) -_sym_db.RegisterMessage(UpdateWorkerBuildIdCompatibilityResponse) - -GetWorkerBuildIdCompatibilityRequest = _reflection.GeneratedProtocolMessageType( - "GetWorkerBuildIdCompatibilityRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKERBUILDIDCOMPATIBILITYREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest) - }, -) -_sym_db.RegisterMessage(GetWorkerBuildIdCompatibilityRequest) - -GetWorkerBuildIdCompatibilityResponse = _reflection.GeneratedProtocolMessageType( - "GetWorkerBuildIdCompatibilityResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKERBUILDIDCOMPATIBILITYRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse) - }, -) -_sym_db.RegisterMessage(GetWorkerBuildIdCompatibilityResponse) - -UpdateWorkerVersioningRulesRequest = _reflection.GeneratedProtocolMessageType( - "UpdateWorkerVersioningRulesRequest", - (_message.Message,), - { - "InsertBuildIdAssignmentRule": _reflection.GeneratedProtocolMessageType( - "InsertBuildIdAssignmentRule", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERVERSIONINGRULESREQUEST_INSERTBUILDIDASSIGNMENTRULE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule) - }, - ), - "ReplaceBuildIdAssignmentRule": _reflection.GeneratedProtocolMessageType( - "ReplaceBuildIdAssignmentRule", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERVERSIONINGRULESREQUEST_REPLACEBUILDIDASSIGNMENTRULE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule) - }, - ), - "DeleteBuildIdAssignmentRule": _reflection.GeneratedProtocolMessageType( - "DeleteBuildIdAssignmentRule", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERVERSIONINGRULESREQUEST_DELETEBUILDIDASSIGNMENTRULE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule) - }, - ), - "AddCompatibleBuildIdRedirectRule": _reflection.GeneratedProtocolMessageType( - "AddCompatibleBuildIdRedirectRule", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERVERSIONINGRULESREQUEST_ADDCOMPATIBLEBUILDIDREDIRECTRULE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule) - }, - ), - "ReplaceCompatibleBuildIdRedirectRule": _reflection.GeneratedProtocolMessageType( - "ReplaceCompatibleBuildIdRedirectRule", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERVERSIONINGRULESREQUEST_REPLACECOMPATIBLEBUILDIDREDIRECTRULE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule) - }, - ), - "DeleteCompatibleBuildIdRedirectRule": _reflection.GeneratedProtocolMessageType( - "DeleteCompatibleBuildIdRedirectRule", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERVERSIONINGRULESREQUEST_DELETECOMPATIBLEBUILDIDREDIRECTRULE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule) - }, - ), - "CommitBuildId": _reflection.GeneratedProtocolMessageType( - "CommitBuildId", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERVERSIONINGRULESREQUEST_COMMITBUILDID, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId) - }, - ), - "DESCRIPTOR": _UPDATEWORKERVERSIONINGRULESREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest) - }, -) -_sym_db.RegisterMessage(UpdateWorkerVersioningRulesRequest) -_sym_db.RegisterMessage(UpdateWorkerVersioningRulesRequest.InsertBuildIdAssignmentRule) -_sym_db.RegisterMessage(UpdateWorkerVersioningRulesRequest.ReplaceBuildIdAssignmentRule) -_sym_db.RegisterMessage(UpdateWorkerVersioningRulesRequest.DeleteBuildIdAssignmentRule) -_sym_db.RegisterMessage( - UpdateWorkerVersioningRulesRequest.AddCompatibleBuildIdRedirectRule -) -_sym_db.RegisterMessage( - UpdateWorkerVersioningRulesRequest.ReplaceCompatibleBuildIdRedirectRule -) -_sym_db.RegisterMessage( - UpdateWorkerVersioningRulesRequest.DeleteCompatibleBuildIdRedirectRule -) -_sym_db.RegisterMessage(UpdateWorkerVersioningRulesRequest.CommitBuildId) - -UpdateWorkerVersioningRulesResponse = _reflection.GeneratedProtocolMessageType( - "UpdateWorkerVersioningRulesResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERVERSIONINGRULESRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse) - }, -) -_sym_db.RegisterMessage(UpdateWorkerVersioningRulesResponse) - -GetWorkerVersioningRulesRequest = _reflection.GeneratedProtocolMessageType( - "GetWorkerVersioningRulesRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKERVERSIONINGRULESREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest) - }, -) -_sym_db.RegisterMessage(GetWorkerVersioningRulesRequest) - -GetWorkerVersioningRulesResponse = _reflection.GeneratedProtocolMessageType( - "GetWorkerVersioningRulesResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKERVERSIONINGRULESRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse) - }, -) -_sym_db.RegisterMessage(GetWorkerVersioningRulesResponse) - -GetWorkerTaskReachabilityRequest = _reflection.GeneratedProtocolMessageType( - "GetWorkerTaskReachabilityRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKERTASKREACHABILITYREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest) - }, -) -_sym_db.RegisterMessage(GetWorkerTaskReachabilityRequest) - -GetWorkerTaskReachabilityResponse = _reflection.GeneratedProtocolMessageType( - "GetWorkerTaskReachabilityResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETWORKERTASKREACHABILITYRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse) - }, -) -_sym_db.RegisterMessage(GetWorkerTaskReachabilityResponse) - -UpdateWorkflowExecutionRequest = _reflection.GeneratedProtocolMessageType( - "UpdateWorkflowExecutionRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKFLOWEXECUTIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest) - }, -) -_sym_db.RegisterMessage(UpdateWorkflowExecutionRequest) - -UpdateWorkflowExecutionResponse = _reflection.GeneratedProtocolMessageType( - "UpdateWorkflowExecutionResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKFLOWEXECUTIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse) - }, -) -_sym_db.RegisterMessage(UpdateWorkflowExecutionResponse) - -StartBatchOperationRequest = _reflection.GeneratedProtocolMessageType( - "StartBatchOperationRequest", - (_message.Message,), - { - "DESCRIPTOR": _STARTBATCHOPERATIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.StartBatchOperationRequest) - }, -) -_sym_db.RegisterMessage(StartBatchOperationRequest) - -StartBatchOperationResponse = _reflection.GeneratedProtocolMessageType( - "StartBatchOperationResponse", - (_message.Message,), - { - "DESCRIPTOR": _STARTBATCHOPERATIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.StartBatchOperationResponse) - }, -) -_sym_db.RegisterMessage(StartBatchOperationResponse) - -StopBatchOperationRequest = _reflection.GeneratedProtocolMessageType( - "StopBatchOperationRequest", - (_message.Message,), - { - "DESCRIPTOR": _STOPBATCHOPERATIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.StopBatchOperationRequest) - }, -) -_sym_db.RegisterMessage(StopBatchOperationRequest) - -StopBatchOperationResponse = _reflection.GeneratedProtocolMessageType( - "StopBatchOperationResponse", - (_message.Message,), - { - "DESCRIPTOR": _STOPBATCHOPERATIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.StopBatchOperationResponse) - }, -) -_sym_db.RegisterMessage(StopBatchOperationResponse) - -DescribeBatchOperationRequest = _reflection.GeneratedProtocolMessageType( - "DescribeBatchOperationRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEBATCHOPERATIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeBatchOperationRequest) - }, -) -_sym_db.RegisterMessage(DescribeBatchOperationRequest) - -DescribeBatchOperationResponse = _reflection.GeneratedProtocolMessageType( - "DescribeBatchOperationResponse", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEBATCHOPERATIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeBatchOperationResponse) - }, -) -_sym_db.RegisterMessage(DescribeBatchOperationResponse) - -ListBatchOperationsRequest = _reflection.GeneratedProtocolMessageType( - "ListBatchOperationsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTBATCHOPERATIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListBatchOperationsRequest) - }, -) -_sym_db.RegisterMessage(ListBatchOperationsRequest) - -ListBatchOperationsResponse = _reflection.GeneratedProtocolMessageType( - "ListBatchOperationsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTBATCHOPERATIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListBatchOperationsResponse) - }, -) -_sym_db.RegisterMessage(ListBatchOperationsResponse) - -PollWorkflowExecutionUpdateRequest = _reflection.GeneratedProtocolMessageType( - "PollWorkflowExecutionUpdateRequest", - (_message.Message,), - { - "DESCRIPTOR": _POLLWORKFLOWEXECUTIONUPDATEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest) - }, -) -_sym_db.RegisterMessage(PollWorkflowExecutionUpdateRequest) - -PollWorkflowExecutionUpdateResponse = _reflection.GeneratedProtocolMessageType( - "PollWorkflowExecutionUpdateResponse", - (_message.Message,), - { - "DESCRIPTOR": _POLLWORKFLOWEXECUTIONUPDATERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse) - }, -) -_sym_db.RegisterMessage(PollWorkflowExecutionUpdateResponse) - -PollNexusTaskQueueRequest = _reflection.GeneratedProtocolMessageType( - "PollNexusTaskQueueRequest", - (_message.Message,), - { - "DESCRIPTOR": _POLLNEXUSTASKQUEUEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PollNexusTaskQueueRequest) - }, -) -_sym_db.RegisterMessage(PollNexusTaskQueueRequest) - -PollNexusTaskQueueResponse = _reflection.GeneratedProtocolMessageType( - "PollNexusTaskQueueResponse", - (_message.Message,), - { - "DESCRIPTOR": _POLLNEXUSTASKQUEUERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PollNexusTaskQueueResponse) - }, -) -_sym_db.RegisterMessage(PollNexusTaskQueueResponse) - -RespondNexusTaskCompletedRequest = _reflection.GeneratedProtocolMessageType( - "RespondNexusTaskCompletedRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDNEXUSTASKCOMPLETEDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest) - }, -) -_sym_db.RegisterMessage(RespondNexusTaskCompletedRequest) - -RespondNexusTaskCompletedResponse = _reflection.GeneratedProtocolMessageType( - "RespondNexusTaskCompletedResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDNEXUSTASKCOMPLETEDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse) - }, -) -_sym_db.RegisterMessage(RespondNexusTaskCompletedResponse) - -RespondNexusTaskFailedRequest = _reflection.GeneratedProtocolMessageType( - "RespondNexusTaskFailedRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDNEXUSTASKFAILEDREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest) - }, -) -_sym_db.RegisterMessage(RespondNexusTaskFailedRequest) - -RespondNexusTaskFailedResponse = _reflection.GeneratedProtocolMessageType( - "RespondNexusTaskFailedResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESPONDNEXUSTASKFAILEDRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse) - }, -) -_sym_db.RegisterMessage(RespondNexusTaskFailedResponse) - -ExecuteMultiOperationRequest = _reflection.GeneratedProtocolMessageType( - "ExecuteMultiOperationRequest", - (_message.Message,), - { - "Operation": _reflection.GeneratedProtocolMessageType( - "Operation", - (_message.Message,), - { - "DESCRIPTOR": _EXECUTEMULTIOPERATIONREQUEST_OPERATION, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation) - }, - ), - "DESCRIPTOR": _EXECUTEMULTIOPERATIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ExecuteMultiOperationRequest) - }, -) -_sym_db.RegisterMessage(ExecuteMultiOperationRequest) -_sym_db.RegisterMessage(ExecuteMultiOperationRequest.Operation) - -ExecuteMultiOperationResponse = _reflection.GeneratedProtocolMessageType( - "ExecuteMultiOperationResponse", - (_message.Message,), - { - "Response": _reflection.GeneratedProtocolMessageType( - "Response", - (_message.Message,), - { - "DESCRIPTOR": _EXECUTEMULTIOPERATIONRESPONSE_RESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ExecuteMultiOperationResponse.Response) - }, - ), - "DESCRIPTOR": _EXECUTEMULTIOPERATIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ExecuteMultiOperationResponse) - }, -) -_sym_db.RegisterMessage(ExecuteMultiOperationResponse) -_sym_db.RegisterMessage(ExecuteMultiOperationResponse.Response) - -UpdateActivityOptionsRequest = _reflection.GeneratedProtocolMessageType( - "UpdateActivityOptionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEACTIVITYOPTIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateActivityOptionsRequest) - }, -) -_sym_db.RegisterMessage(UpdateActivityOptionsRequest) - -UpdateActivityOptionsResponse = _reflection.GeneratedProtocolMessageType( - "UpdateActivityOptionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEACTIVITYOPTIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateActivityOptionsResponse) - }, -) -_sym_db.RegisterMessage(UpdateActivityOptionsResponse) - -PauseActivityRequest = _reflection.GeneratedProtocolMessageType( - "PauseActivityRequest", - (_message.Message,), - { - "DESCRIPTOR": _PAUSEACTIVITYREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PauseActivityRequest) - }, -) -_sym_db.RegisterMessage(PauseActivityRequest) - -PauseActivityResponse = _reflection.GeneratedProtocolMessageType( - "PauseActivityResponse", - (_message.Message,), - { - "DESCRIPTOR": _PAUSEACTIVITYRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.PauseActivityResponse) - }, -) -_sym_db.RegisterMessage(PauseActivityResponse) - -UnpauseActivityRequest = _reflection.GeneratedProtocolMessageType( - "UnpauseActivityRequest", - (_message.Message,), - { - "DESCRIPTOR": _UNPAUSEACTIVITYREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UnpauseActivityRequest) - }, -) -_sym_db.RegisterMessage(UnpauseActivityRequest) - -UnpauseActivityResponse = _reflection.GeneratedProtocolMessageType( - "UnpauseActivityResponse", - (_message.Message,), - { - "DESCRIPTOR": _UNPAUSEACTIVITYRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UnpauseActivityResponse) - }, -) -_sym_db.RegisterMessage(UnpauseActivityResponse) - -ResetActivityRequest = _reflection.GeneratedProtocolMessageType( - "ResetActivityRequest", - (_message.Message,), - { - "DESCRIPTOR": _RESETACTIVITYREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ResetActivityRequest) - }, -) -_sym_db.RegisterMessage(ResetActivityRequest) - -ResetActivityResponse = _reflection.GeneratedProtocolMessageType( - "ResetActivityResponse", - (_message.Message,), - { - "DESCRIPTOR": _RESETACTIVITYRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ResetActivityResponse) - }, -) -_sym_db.RegisterMessage(ResetActivityResponse) - -UpdateWorkflowExecutionOptionsRequest = _reflection.GeneratedProtocolMessageType( - "UpdateWorkflowExecutionOptionsRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKFLOWEXECUTIONOPTIONSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest) - }, -) -_sym_db.RegisterMessage(UpdateWorkflowExecutionOptionsRequest) - -UpdateWorkflowExecutionOptionsResponse = _reflection.GeneratedProtocolMessageType( - "UpdateWorkflowExecutionOptionsResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKFLOWEXECUTIONOPTIONSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse) - }, -) -_sym_db.RegisterMessage(UpdateWorkflowExecutionOptionsResponse) - -DescribeDeploymentRequest = _reflection.GeneratedProtocolMessageType( - "DescribeDeploymentRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEDEPLOYMENTREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeDeploymentRequest) - }, -) -_sym_db.RegisterMessage(DescribeDeploymentRequest) - -DescribeDeploymentResponse = _reflection.GeneratedProtocolMessageType( - "DescribeDeploymentResponse", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEDEPLOYMENTRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeDeploymentResponse) - }, -) -_sym_db.RegisterMessage(DescribeDeploymentResponse) - -DescribeWorkerDeploymentVersionRequest = _reflection.GeneratedProtocolMessageType( - "DescribeWorkerDeploymentVersionRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKERDEPLOYMENTVERSIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest) - }, -) -_sym_db.RegisterMessage(DescribeWorkerDeploymentVersionRequest) - -DescribeWorkerDeploymentVersionResponse = _reflection.GeneratedProtocolMessageType( - "DescribeWorkerDeploymentVersionResponse", - (_message.Message,), - { - "VersionTaskQueue": _reflection.GeneratedProtocolMessageType( - "VersionTaskQueue", - (_message.Message,), - { - "StatsByPriorityKeyEntry": _reflection.GeneratedProtocolMessageType( - "StatsByPriorityKeyEntry", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE_STATSBYPRIORITYKEYENTRY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue.StatsByPriorityKeyEntry) - }, - ), - "DESCRIPTOR": _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse.VersionTaskQueue) - }, - ), - "DESCRIPTOR": _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse) - }, -) -_sym_db.RegisterMessage(DescribeWorkerDeploymentVersionResponse) -_sym_db.RegisterMessage(DescribeWorkerDeploymentVersionResponse.VersionTaskQueue) -_sym_db.RegisterMessage( - DescribeWorkerDeploymentVersionResponse.VersionTaskQueue.StatsByPriorityKeyEntry -) - -DescribeWorkerDeploymentRequest = _reflection.GeneratedProtocolMessageType( - "DescribeWorkerDeploymentRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKERDEPLOYMENTREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest) - }, -) -_sym_db.RegisterMessage(DescribeWorkerDeploymentRequest) - -DescribeWorkerDeploymentResponse = _reflection.GeneratedProtocolMessageType( - "DescribeWorkerDeploymentResponse", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKERDEPLOYMENTRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse) - }, -) -_sym_db.RegisterMessage(DescribeWorkerDeploymentResponse) - -ListDeploymentsRequest = _reflection.GeneratedProtocolMessageType( - "ListDeploymentsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTDEPLOYMENTSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListDeploymentsRequest) - }, -) -_sym_db.RegisterMessage(ListDeploymentsRequest) - -ListDeploymentsResponse = _reflection.GeneratedProtocolMessageType( - "ListDeploymentsResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTDEPLOYMENTSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListDeploymentsResponse) - }, -) -_sym_db.RegisterMessage(ListDeploymentsResponse) - -SetCurrentDeploymentRequest = _reflection.GeneratedProtocolMessageType( - "SetCurrentDeploymentRequest", - (_message.Message,), - { - "DESCRIPTOR": _SETCURRENTDEPLOYMENTREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SetCurrentDeploymentRequest) - }, -) -_sym_db.RegisterMessage(SetCurrentDeploymentRequest) - -SetCurrentDeploymentResponse = _reflection.GeneratedProtocolMessageType( - "SetCurrentDeploymentResponse", - (_message.Message,), - { - "DESCRIPTOR": _SETCURRENTDEPLOYMENTRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SetCurrentDeploymentResponse) - }, -) -_sym_db.RegisterMessage(SetCurrentDeploymentResponse) - -SetWorkerDeploymentCurrentVersionRequest = _reflection.GeneratedProtocolMessageType( - "SetWorkerDeploymentCurrentVersionRequest", - (_message.Message,), - { - "DESCRIPTOR": _SETWORKERDEPLOYMENTCURRENTVERSIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest) - }, -) -_sym_db.RegisterMessage(SetWorkerDeploymentCurrentVersionRequest) - -SetWorkerDeploymentCurrentVersionResponse = _reflection.GeneratedProtocolMessageType( - "SetWorkerDeploymentCurrentVersionResponse", - (_message.Message,), - { - "DESCRIPTOR": _SETWORKERDEPLOYMENTCURRENTVERSIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse) - }, -) -_sym_db.RegisterMessage(SetWorkerDeploymentCurrentVersionResponse) - -SetWorkerDeploymentRampingVersionRequest = _reflection.GeneratedProtocolMessageType( - "SetWorkerDeploymentRampingVersionRequest", - (_message.Message,), - { - "DESCRIPTOR": _SETWORKERDEPLOYMENTRAMPINGVERSIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionRequest) - }, -) -_sym_db.RegisterMessage(SetWorkerDeploymentRampingVersionRequest) - -SetWorkerDeploymentRampingVersionResponse = _reflection.GeneratedProtocolMessageType( - "SetWorkerDeploymentRampingVersionResponse", - (_message.Message,), - { - "DESCRIPTOR": _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SetWorkerDeploymentRampingVersionResponse) - }, -) -_sym_db.RegisterMessage(SetWorkerDeploymentRampingVersionResponse) - -ListWorkerDeploymentsRequest = _reflection.GeneratedProtocolMessageType( - "ListWorkerDeploymentsRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTWORKERDEPLOYMENTSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListWorkerDeploymentsRequest) - }, -) -_sym_db.RegisterMessage(ListWorkerDeploymentsRequest) - -ListWorkerDeploymentsResponse = _reflection.GeneratedProtocolMessageType( - "ListWorkerDeploymentsResponse", - (_message.Message,), - { - "WorkerDeploymentSummary": _reflection.GeneratedProtocolMessageType( - "WorkerDeploymentSummary", - (_message.Message,), - { - "DESCRIPTOR": _LISTWORKERDEPLOYMENTSRESPONSE_WORKERDEPLOYMENTSUMMARY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse.WorkerDeploymentSummary) - }, - ), - "DESCRIPTOR": _LISTWORKERDEPLOYMENTSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse) - }, -) -_sym_db.RegisterMessage(ListWorkerDeploymentsResponse) -_sym_db.RegisterMessage(ListWorkerDeploymentsResponse.WorkerDeploymentSummary) - -DeleteWorkerDeploymentVersionRequest = _reflection.GeneratedProtocolMessageType( - "DeleteWorkerDeploymentVersionRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETEWORKERDEPLOYMENTVERSIONREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionRequest) - }, -) -_sym_db.RegisterMessage(DeleteWorkerDeploymentVersionRequest) - -DeleteWorkerDeploymentVersionResponse = _reflection.GeneratedProtocolMessageType( - "DeleteWorkerDeploymentVersionResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETEWORKERDEPLOYMENTVERSIONRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteWorkerDeploymentVersionResponse) - }, -) -_sym_db.RegisterMessage(DeleteWorkerDeploymentVersionResponse) - -DeleteWorkerDeploymentRequest = _reflection.GeneratedProtocolMessageType( - "DeleteWorkerDeploymentRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETEWORKERDEPLOYMENTREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest) - }, -) -_sym_db.RegisterMessage(DeleteWorkerDeploymentRequest) - -DeleteWorkerDeploymentResponse = _reflection.GeneratedProtocolMessageType( - "DeleteWorkerDeploymentResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETEWORKERDEPLOYMENTRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse) - }, -) -_sym_db.RegisterMessage(DeleteWorkerDeploymentResponse) - -UpdateWorkerDeploymentVersionMetadataRequest = _reflection.GeneratedProtocolMessageType( - "UpdateWorkerDeploymentVersionMetadataRequest", - (_message.Message,), - { - "UpsertEntriesEntry": _reflection.GeneratedProtocolMessageType( - "UpsertEntriesEntry", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST_UPSERTENTRIESENTRY, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest.UpsertEntriesEntry) - }, - ), - "DESCRIPTOR": _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest) - }, -) -_sym_db.RegisterMessage(UpdateWorkerDeploymentVersionMetadataRequest) -_sym_db.RegisterMessage(UpdateWorkerDeploymentVersionMetadataRequest.UpsertEntriesEntry) - -UpdateWorkerDeploymentVersionMetadataResponse = ( - _reflection.GeneratedProtocolMessageType( - "UpdateWorkerDeploymentVersionMetadataResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERDEPLOYMENTVERSIONMETADATARESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse) - }, - ) -) -_sym_db.RegisterMessage(UpdateWorkerDeploymentVersionMetadataResponse) - -SetWorkerDeploymentManagerRequest = _reflection.GeneratedProtocolMessageType( - "SetWorkerDeploymentManagerRequest", - (_message.Message,), - { - "DESCRIPTOR": _SETWORKERDEPLOYMENTMANAGERREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SetWorkerDeploymentManagerRequest) - }, -) -_sym_db.RegisterMessage(SetWorkerDeploymentManagerRequest) - -SetWorkerDeploymentManagerResponse = _reflection.GeneratedProtocolMessageType( - "SetWorkerDeploymentManagerResponse", - (_message.Message,), - { - "DESCRIPTOR": _SETWORKERDEPLOYMENTMANAGERRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse) - }, -) -_sym_db.RegisterMessage(SetWorkerDeploymentManagerResponse) - -GetCurrentDeploymentRequest = _reflection.GeneratedProtocolMessageType( - "GetCurrentDeploymentRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETCURRENTDEPLOYMENTREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetCurrentDeploymentRequest) - }, -) -_sym_db.RegisterMessage(GetCurrentDeploymentRequest) - -GetCurrentDeploymentResponse = _reflection.GeneratedProtocolMessageType( - "GetCurrentDeploymentResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETCURRENTDEPLOYMENTRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetCurrentDeploymentResponse) - }, -) -_sym_db.RegisterMessage(GetCurrentDeploymentResponse) - -GetDeploymentReachabilityRequest = _reflection.GeneratedProtocolMessageType( - "GetDeploymentReachabilityRequest", - (_message.Message,), - { - "DESCRIPTOR": _GETDEPLOYMENTREACHABILITYREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest) - }, -) -_sym_db.RegisterMessage(GetDeploymentReachabilityRequest) - -GetDeploymentReachabilityResponse = _reflection.GeneratedProtocolMessageType( - "GetDeploymentReachabilityResponse", - (_message.Message,), - { - "DESCRIPTOR": _GETDEPLOYMENTREACHABILITYRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse) - }, -) -_sym_db.RegisterMessage(GetDeploymentReachabilityResponse) - -CreateWorkflowRuleRequest = _reflection.GeneratedProtocolMessageType( - "CreateWorkflowRuleRequest", - (_message.Message,), - { - "DESCRIPTOR": _CREATEWORKFLOWRULEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.CreateWorkflowRuleRequest) - }, -) -_sym_db.RegisterMessage(CreateWorkflowRuleRequest) - -CreateWorkflowRuleResponse = _reflection.GeneratedProtocolMessageType( - "CreateWorkflowRuleResponse", - (_message.Message,), - { - "DESCRIPTOR": _CREATEWORKFLOWRULERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.CreateWorkflowRuleResponse) - }, -) -_sym_db.RegisterMessage(CreateWorkflowRuleResponse) - -DescribeWorkflowRuleRequest = _reflection.GeneratedProtocolMessageType( - "DescribeWorkflowRuleRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKFLOWRULEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkflowRuleRequest) - }, -) -_sym_db.RegisterMessage(DescribeWorkflowRuleRequest) - -DescribeWorkflowRuleResponse = _reflection.GeneratedProtocolMessageType( - "DescribeWorkflowRuleResponse", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKFLOWRULERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse) - }, -) -_sym_db.RegisterMessage(DescribeWorkflowRuleResponse) - -DeleteWorkflowRuleRequest = _reflection.GeneratedProtocolMessageType( - "DeleteWorkflowRuleRequest", - (_message.Message,), - { - "DESCRIPTOR": _DELETEWORKFLOWRULEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteWorkflowRuleRequest) - }, -) -_sym_db.RegisterMessage(DeleteWorkflowRuleRequest) - -DeleteWorkflowRuleResponse = _reflection.GeneratedProtocolMessageType( - "DeleteWorkflowRuleResponse", - (_message.Message,), - { - "DESCRIPTOR": _DELETEWORKFLOWRULERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse) - }, -) -_sym_db.RegisterMessage(DeleteWorkflowRuleResponse) - -ListWorkflowRulesRequest = _reflection.GeneratedProtocolMessageType( - "ListWorkflowRulesRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTWORKFLOWRULESREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListWorkflowRulesRequest) - }, -) -_sym_db.RegisterMessage(ListWorkflowRulesRequest) - -ListWorkflowRulesResponse = _reflection.GeneratedProtocolMessageType( - "ListWorkflowRulesResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTWORKFLOWRULESRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListWorkflowRulesResponse) - }, -) -_sym_db.RegisterMessage(ListWorkflowRulesResponse) - -TriggerWorkflowRuleRequest = _reflection.GeneratedProtocolMessageType( - "TriggerWorkflowRuleRequest", - (_message.Message,), - { - "DESCRIPTOR": _TRIGGERWORKFLOWRULEREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.TriggerWorkflowRuleRequest) - }, -) -_sym_db.RegisterMessage(TriggerWorkflowRuleRequest) - -TriggerWorkflowRuleResponse = _reflection.GeneratedProtocolMessageType( - "TriggerWorkflowRuleResponse", - (_message.Message,), - { - "DESCRIPTOR": _TRIGGERWORKFLOWRULERESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse) - }, -) -_sym_db.RegisterMessage(TriggerWorkflowRuleResponse) - -RecordWorkerHeartbeatRequest = _reflection.GeneratedProtocolMessageType( - "RecordWorkerHeartbeatRequest", - (_message.Message,), - { - "DESCRIPTOR": _RECORDWORKERHEARTBEATREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest) - }, -) -_sym_db.RegisterMessage(RecordWorkerHeartbeatRequest) - -RecordWorkerHeartbeatResponse = _reflection.GeneratedProtocolMessageType( - "RecordWorkerHeartbeatResponse", - (_message.Message,), - { - "DESCRIPTOR": _RECORDWORKERHEARTBEATRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse) - }, -) -_sym_db.RegisterMessage(RecordWorkerHeartbeatResponse) - -ListWorkersRequest = _reflection.GeneratedProtocolMessageType( - "ListWorkersRequest", - (_message.Message,), - { - "DESCRIPTOR": _LISTWORKERSREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListWorkersRequest) - }, -) -_sym_db.RegisterMessage(ListWorkersRequest) - -ListWorkersResponse = _reflection.GeneratedProtocolMessageType( - "ListWorkersResponse", - (_message.Message,), - { - "DESCRIPTOR": _LISTWORKERSRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.ListWorkersResponse) - }, -) -_sym_db.RegisterMessage(ListWorkersResponse) - -UpdateTaskQueueConfigRequest = _reflection.GeneratedProtocolMessageType( - "UpdateTaskQueueConfigRequest", - (_message.Message,), - { - "RateLimitUpdate": _reflection.GeneratedProtocolMessageType( - "RateLimitUpdate", - (_message.Message,), - { - "DESCRIPTOR": _UPDATETASKQUEUECONFIGREQUEST_RATELIMITUPDATE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate) - }, - ), - "DESCRIPTOR": _UPDATETASKQUEUECONFIGREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest) - }, -) -_sym_db.RegisterMessage(UpdateTaskQueueConfigRequest) -_sym_db.RegisterMessage(UpdateTaskQueueConfigRequest.RateLimitUpdate) - -UpdateTaskQueueConfigResponse = _reflection.GeneratedProtocolMessageType( - "UpdateTaskQueueConfigResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATETASKQUEUECONFIGRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse) - }, -) -_sym_db.RegisterMessage(UpdateTaskQueueConfigResponse) - -FetchWorkerConfigRequest = _reflection.GeneratedProtocolMessageType( - "FetchWorkerConfigRequest", - (_message.Message,), - { - "DESCRIPTOR": _FETCHWORKERCONFIGREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.FetchWorkerConfigRequest) - }, -) -_sym_db.RegisterMessage(FetchWorkerConfigRequest) - -FetchWorkerConfigResponse = _reflection.GeneratedProtocolMessageType( - "FetchWorkerConfigResponse", - (_message.Message,), - { - "DESCRIPTOR": _FETCHWORKERCONFIGRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.FetchWorkerConfigResponse) - }, -) -_sym_db.RegisterMessage(FetchWorkerConfigResponse) - -UpdateWorkerConfigRequest = _reflection.GeneratedProtocolMessageType( - "UpdateWorkerConfigRequest", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERCONFIGREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerConfigRequest) - }, -) -_sym_db.RegisterMessage(UpdateWorkerConfigRequest) - -UpdateWorkerConfigResponse = _reflection.GeneratedProtocolMessageType( - "UpdateWorkerConfigResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATEWORKERCONFIGRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.UpdateWorkerConfigResponse) - }, -) -_sym_db.RegisterMessage(UpdateWorkerConfigResponse) - -DescribeWorkerRequest = _reflection.GeneratedProtocolMessageType( - "DescribeWorkerRequest", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKERREQUEST, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkerRequest) - }, -) -_sym_db.RegisterMessage(DescribeWorkerRequest) - -DescribeWorkerResponse = _reflection.GeneratedProtocolMessageType( - "DescribeWorkerResponse", - (_message.Message,), - { - "DESCRIPTOR": _DESCRIBEWORKERRESPONSE, - "__module__": "temporalio.api.workflowservice.v1.request_response_pb2", - # @@protoc_insertion_point(class_scope:temporal.api.workflowservice.v1.DescribeWorkerResponse) - }, -) -_sym_db.RegisterMessage(DescribeWorkerResponse) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n"io.temporal.api.workflowservice.v1B\024RequestResponseProtoP\001Z5go.temporal.io/api/workflowservice/v1;workflowservice\252\002!Temporalio.Api.WorkflowService.V1\352\002$Temporalio::Api::WorkflowService::V1' _REGISTERNAMESPACEREQUEST_DATAENTRY._options = None _REGISTERNAMESPACEREQUEST_DATAENTRY._serialized_options = b"8\001" + _DESCRIBENAMESPACERESPONSE.fields_by_name["poller_group_infos"]._options = None + _DESCRIBENAMESPACERESPONSE.fields_by_name[ + "poller_group_infos" + ]._serialized_options = b"\030\001" _POLLWORKFLOWTASKQUEUEREQUEST.fields_by_name["binary_checksum"]._options = None _POLLWORKFLOWTASKQUEUEREQUEST.fields_by_name[ "binary_checksum" @@ -3069,6 +159,10 @@ ]._serialized_options = b"\030\001" _POLLWORKFLOWTASKQUEUERESPONSE_QUERIESENTRY._options = None _POLLWORKFLOWTASKQUEUERESPONSE_QUERIESENTRY._serialized_options = b"8\001" + _POLLWORKFLOWTASKQUEUERESPONSE.fields_by_name["poller_group_infos"]._options = None + _POLLWORKFLOWTASKQUEUERESPONSE.fields_by_name[ + "poller_group_infos" + ]._serialized_options = b"\030\001" _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_QUERYRESULTSENTRY._options = None _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_QUERYRESULTSENTRY._serialized_options = ( b"8\001" @@ -3107,6 +201,10 @@ _POLLACTIVITYTASKQUEUEREQUEST.fields_by_name[ "worker_version_capabilities" ]._serialized_options = b"\030\001" + _POLLACTIVITYTASKQUEUERESPONSE.fields_by_name["poller_group_infos"]._options = None + _POLLACTIVITYTASKQUEUERESPONSE.fields_by_name[ + "poller_group_infos" + ]._serialized_options = b"\030\001" _RESPONDACTIVITYTASKCOMPLETEDREQUEST.fields_by_name[ "worker_version" ]._options = None @@ -3187,12 +285,24 @@ ]._serialized_options = b"\030\001" _GETCLUSTERINFORESPONSE_SUPPORTEDCLIENTSENTRY._options = None _GETCLUSTERINFORESPONSE_SUPPORTEDCLIENTSENTRY._serialized_options = b"8\001" + _STARTBATCHOPERATIONREQUEST.fields_by_name["executions"]._options = None + _STARTBATCHOPERATIONREQUEST.fields_by_name[ + "executions" + ]._serialized_options = b"\030\001" _POLLNEXUSTASKQUEUEREQUEST.fields_by_name[ "worker_version_capabilities" ]._options = None _POLLNEXUSTASKQUEUEREQUEST.fields_by_name[ "worker_version_capabilities" ]._serialized_options = b"\030\001" + _POLLNEXUSTASKQUEUERESPONSE.fields_by_name["poller_group_infos"]._options = None + _POLLNEXUSTASKQUEUERESPONSE.fields_by_name[ + "poller_group_infos" + ]._serialized_options = b"\030\001" + _RESPONDNEXUSTASKFAILEDREQUEST.fields_by_name["error"]._options = None + _RESPONDNEXUSTASKFAILEDREQUEST.fields_by_name[ + "error" + ]._serialized_options = b"\030\001" _DESCRIBEWORKERDEPLOYMENTVERSIONREQUEST.fields_by_name["version"]._options = None _DESCRIBEWORKERDEPLOYMENTVERSIONREQUEST.fields_by_name[ "version" @@ -3209,6 +319,12 @@ _SETWORKERDEPLOYMENTCURRENTVERSIONRESPONSE.fields_by_name[ "previous_version" ]._serialized_options = b"\030\001" + _SETWORKERDEPLOYMENTCURRENTVERSIONRESPONSE.fields_by_name[ + "previous_deployment_version" + ]._options = None + _SETWORKERDEPLOYMENTCURRENTVERSIONRESPONSE.fields_by_name[ + "previous_deployment_version" + ]._serialized_options = b"\030\001" _SETWORKERDEPLOYMENTRAMPINGVERSIONREQUEST.fields_by_name["version"]._options = None _SETWORKERDEPLOYMENTRAMPINGVERSIONREQUEST.fields_by_name[ "version" @@ -3219,10 +335,26 @@ _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE.fields_by_name[ "previous_version" ]._serialized_options = b"\030\001" + _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE.fields_by_name[ + "previous_deployment_version" + ]._options = None + _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE.fields_by_name[ + "previous_deployment_version" + ]._serialized_options = b"\030\001" + _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE.fields_by_name[ + "previous_percentage" + ]._options = None + _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE.fields_by_name[ + "previous_percentage" + ]._serialized_options = b"\030\001" _DELETEWORKERDEPLOYMENTVERSIONREQUEST.fields_by_name["version"]._options = None _DELETEWORKERDEPLOYMENTVERSIONREQUEST.fields_by_name[ "version" ]._serialized_options = b"\030\001" + _UPDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST_COMPUTECONFIGSCALINGGROUPSENTRY._options = None + _UPDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST_COMPUTECONFIGSCALINGGROUPSENTRY._serialized_options = b"8\001" + _VALIDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST_COMPUTECONFIGSCALINGGROUPSENTRY._options = None + _VALIDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST_COMPUTECONFIGSCALINGGROUPSENTRY._serialized_options = b"8\001" _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST_UPSERTENTRIESENTRY._options = None _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST_UPSERTENTRIESENTRY._serialized_options = b"8\001" _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST.fields_by_name[ @@ -3231,444 +363,592 @@ _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST.fields_by_name[ "version" ]._serialized_options = b"\030\001" - _REGISTERNAMESPACEREQUEST._serialized_start = 1492 - _REGISTERNAMESPACEREQUEST._serialized_end = 2140 - _REGISTERNAMESPACEREQUEST_DATAENTRY._serialized_start = 2097 - _REGISTERNAMESPACEREQUEST_DATAENTRY._serialized_end = 2140 - _REGISTERNAMESPACERESPONSE._serialized_start = 2142 - _REGISTERNAMESPACERESPONSE._serialized_end = 2169 - _LISTNAMESPACESREQUEST._serialized_start = 2172 - _LISTNAMESPACESREQUEST._serialized_end = 2309 - _LISTNAMESPACESRESPONSE._serialized_start = 2312 - _LISTNAMESPACESRESPONSE._serialized_end = 2441 - _DESCRIBENAMESPACEREQUEST._serialized_start = 2443 - _DESCRIBENAMESPACEREQUEST._serialized_end = 2500 - _DESCRIBENAMESPACERESPONSE._serialized_start = 2503 - _DESCRIBENAMESPACERESPONSE._serialized_end = 2867 - _UPDATENAMESPACEREQUEST._serialized_start = 2870 - _UPDATENAMESPACEREQUEST._serialized_end = 3205 - _UPDATENAMESPACERESPONSE._serialized_start = 3208 - _UPDATENAMESPACERESPONSE._serialized_end = 3499 - _DEPRECATENAMESPACEREQUEST._serialized_start = 3501 - _DEPRECATENAMESPACEREQUEST._serialized_end = 3571 - _DEPRECATENAMESPACERESPONSE._serialized_start = 3573 - _DEPRECATENAMESPACERESPONSE._serialized_end = 3601 - _STARTWORKFLOWEXECUTIONREQUEST._serialized_start = 3604 - _STARTWORKFLOWEXECUTIONREQUEST._serialized_end = 5147 - _STARTWORKFLOWEXECUTIONRESPONSE._serialized_start = 5150 - _STARTWORKFLOWEXECUTIONRESPONSE._serialized_end = 5416 - _GETWORKFLOWEXECUTIONHISTORYREQUEST._serialized_start = 5419 - _GETWORKFLOWEXECUTIONHISTORYREQUEST._serialized_end = 5717 - _GETWORKFLOWEXECUTIONHISTORYRESPONSE._serialized_start = 5720 - _GETWORKFLOWEXECUTIONHISTORYRESPONSE._serialized_end = 5906 - _GETWORKFLOWEXECUTIONHISTORYREVERSEREQUEST._serialized_start = 5909 - _GETWORKFLOWEXECUTIONHISTORYREVERSEREQUEST._serialized_end = 6085 - _GETWORKFLOWEXECUTIONHISTORYREVERSERESPONSE._serialized_start = 6087 - _GETWORKFLOWEXECUTIONHISTORYREVERSERESPONSE._serialized_end = 6207 - _POLLWORKFLOWTASKQUEUEREQUEST._serialized_start = 6210 - _POLLWORKFLOWTASKQUEUEREQUEST._serialized_end = 6604 - _POLLWORKFLOWTASKQUEUERESPONSE._serialized_start = 6607 - _POLLWORKFLOWTASKQUEUERESPONSE._serialized_end = 7520 - _POLLWORKFLOWTASKQUEUERESPONSE_QUERIESENTRY._serialized_start = 7436 - _POLLWORKFLOWTASKQUEUERESPONSE_QUERIESENTRY._serialized_end = 7520 - _RESPONDWORKFLOWTASKCOMPLETEDREQUEST._serialized_start = 7523 - _RESPONDWORKFLOWTASKCOMPLETEDREQUEST._serialized_end = 8728 - _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_QUERYRESULTSENTRY._serialized_start = 8562 - _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_QUERYRESULTSENTRY._serialized_end = 8657 - _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_CAPABILITIES._serialized_start = 8659 - _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_CAPABILITIES._serialized_end = 8728 - _RESPONDWORKFLOWTASKCOMPLETEDRESPONSE._serialized_start = 8731 - _RESPONDWORKFLOWTASKCOMPLETEDRESPONSE._serialized_end = 8976 - _RESPONDWORKFLOWTASKFAILEDREQUEST._serialized_start = 8979 - _RESPONDWORKFLOWTASKFAILEDREQUEST._serialized_end = 9483 - _RESPONDWORKFLOWTASKFAILEDRESPONSE._serialized_start = 9485 - _RESPONDWORKFLOWTASKFAILEDRESPONSE._serialized_end = 9520 - _POLLACTIVITYTASKQUEUEREQUEST._serialized_start = 9523 - _POLLACTIVITYTASKQUEUEREQUEST._serialized_end = 9963 - _POLLACTIVITYTASKQUEUERESPONSE._serialized_start = 9966 - _POLLACTIVITYTASKQUEUERESPONSE._serialized_end = 10973 - _RECORDACTIVITYTASKHEARTBEATREQUEST._serialized_start = 10976 - _RECORDACTIVITYTASKHEARTBEATREQUEST._serialized_end = 11120 - _RECORDACTIVITYTASKHEARTBEATRESPONSE._serialized_start = 11122 - _RECORDACTIVITYTASKHEARTBEATRESPONSE._serialized_end = 11234 - _RECORDACTIVITYTASKHEARTBEATBYIDREQUEST._serialized_start = 11237 - _RECORDACTIVITYTASKHEARTBEATBYIDREQUEST._serialized_end = 11423 - _RECORDACTIVITYTASKHEARTBEATBYIDRESPONSE._serialized_start = 11425 - _RECORDACTIVITYTASKHEARTBEATBYIDRESPONSE._serialized_end = 11541 - _RESPONDACTIVITYTASKCOMPLETEDREQUEST._serialized_start = 11544 - _RESPONDACTIVITYTASKCOMPLETEDREQUEST._serialized_end = 11905 - _RESPONDACTIVITYTASKCOMPLETEDRESPONSE._serialized_start = 11907 - _RESPONDACTIVITYTASKCOMPLETEDRESPONSE._serialized_end = 11945 - _RESPONDACTIVITYTASKCOMPLETEDBYIDREQUEST._serialized_start = 11948 - _RESPONDACTIVITYTASKCOMPLETEDBYIDREQUEST._serialized_end = 12134 - _RESPONDACTIVITYTASKCOMPLETEDBYIDRESPONSE._serialized_start = 12136 - _RESPONDACTIVITYTASKCOMPLETEDBYIDRESPONSE._serialized_end = 12178 - _RESPONDACTIVITYTASKFAILEDREQUEST._serialized_start = 12181 - _RESPONDACTIVITYTASKFAILEDREQUEST._serialized_end = 12606 - _RESPONDACTIVITYTASKFAILEDRESPONSE._serialized_start = 12608 - _RESPONDACTIVITYTASKFAILEDRESPONSE._serialized_end = 12695 - _RESPONDACTIVITYTASKFAILEDBYIDREQUEST._serialized_start = 12698 - _RESPONDACTIVITYTASKFAILEDBYIDREQUEST._serialized_end = 12948 - _RESPONDACTIVITYTASKFAILEDBYIDRESPONSE._serialized_start = 12950 - _RESPONDACTIVITYTASKFAILEDBYIDRESPONSE._serialized_end = 13041 - _RESPONDACTIVITYTASKCANCELEDREQUEST._serialized_start = 13044 - _RESPONDACTIVITYTASKCANCELEDREQUEST._serialized_end = 13405 - _RESPONDACTIVITYTASKCANCELEDRESPONSE._serialized_start = 13407 - _RESPONDACTIVITYTASKCANCELEDRESPONSE._serialized_end = 13444 - _RESPONDACTIVITYTASKCANCELEDBYIDREQUEST._serialized_start = 13447 - _RESPONDACTIVITYTASKCANCELEDBYIDREQUEST._serialized_end = 13714 - _RESPONDACTIVITYTASKCANCELEDBYIDRESPONSE._serialized_start = 13716 - _RESPONDACTIVITYTASKCANCELEDBYIDRESPONSE._serialized_end = 13757 - _REQUESTCANCELWORKFLOWEXECUTIONREQUEST._serialized_start = 13760 - _REQUESTCANCELWORKFLOWEXECUTIONREQUEST._serialized_end = 14020 - _REQUESTCANCELWORKFLOWEXECUTIONRESPONSE._serialized_start = 14022 - _REQUESTCANCELWORKFLOWEXECUTIONRESPONSE._serialized_end = 14062 - _SIGNALWORKFLOWEXECUTIONREQUEST._serialized_start = 14065 - _SIGNALWORKFLOWEXECUTIONREQUEST._serialized_end = 14415 - _SIGNALWORKFLOWEXECUTIONRESPONSE._serialized_start = 14417 - _SIGNALWORKFLOWEXECUTIONRESPONSE._serialized_end = 14450 - _SIGNALWITHSTARTWORKFLOWEXECUTIONREQUEST._serialized_start = 14453 - _SIGNALWITHSTARTWORKFLOWEXECUTIONREQUEST._serialized_end = 15718 - _SIGNALWITHSTARTWORKFLOWEXECUTIONRESPONSE._serialized_start = 15720 - _SIGNALWITHSTARTWORKFLOWEXECUTIONRESPONSE._serialized_end = 15795 - _RESETWORKFLOWEXECUTIONREQUEST._serialized_start = 15798 - _RESETWORKFLOWEXECUTIONREQUEST._serialized_end = 16247 - _RESETWORKFLOWEXECUTIONRESPONSE._serialized_start = 16249 - _RESETWORKFLOWEXECUTIONRESPONSE._serialized_end = 16297 - _TERMINATEWORKFLOWEXECUTIONREQUEST._serialized_start = 16300 - _TERMINATEWORKFLOWEXECUTIONREQUEST._serialized_end = 16587 - _TERMINATEWORKFLOWEXECUTIONRESPONSE._serialized_start = 16589 - _TERMINATEWORKFLOWEXECUTIONRESPONSE._serialized_end = 16625 - _DELETEWORKFLOWEXECUTIONREQUEST._serialized_start = 16627 - _DELETEWORKFLOWEXECUTIONREQUEST._serialized_end = 16749 - _DELETEWORKFLOWEXECUTIONRESPONSE._serialized_start = 16751 - _DELETEWORKFLOWEXECUTIONRESPONSE._serialized_end = 16784 - _LISTOPENWORKFLOWEXECUTIONSREQUEST._serialized_start = 16787 - _LISTOPENWORKFLOWEXECUTIONSREQUEST._serialized_end = 17116 - _LISTOPENWORKFLOWEXECUTIONSRESPONSE._serialized_start = 17119 - _LISTOPENWORKFLOWEXECUTIONSRESPONSE._serialized_end = 17249 - _LISTCLOSEDWORKFLOWEXECUTIONSREQUEST._serialized_start = 17252 - _LISTCLOSEDWORKFLOWEXECUTIONSREQUEST._serialized_end = 17646 - _LISTCLOSEDWORKFLOWEXECUTIONSRESPONSE._serialized_start = 17649 - _LISTCLOSEDWORKFLOWEXECUTIONSRESPONSE._serialized_end = 17781 - _LISTWORKFLOWEXECUTIONSREQUEST._serialized_start = 17783 - _LISTWORKFLOWEXECUTIONSREQUEST._serialized_end = 17892 - _LISTWORKFLOWEXECUTIONSRESPONSE._serialized_start = 17894 - _LISTWORKFLOWEXECUTIONSRESPONSE._serialized_end = 18020 - _LISTARCHIVEDWORKFLOWEXECUTIONSREQUEST._serialized_start = 18022 - _LISTARCHIVEDWORKFLOWEXECUTIONSREQUEST._serialized_end = 18139 - _LISTARCHIVEDWORKFLOWEXECUTIONSRESPONSE._serialized_start = 18142 - _LISTARCHIVEDWORKFLOWEXECUTIONSRESPONSE._serialized_end = 18276 - _SCANWORKFLOWEXECUTIONSREQUEST._serialized_start = 18278 - _SCANWORKFLOWEXECUTIONSREQUEST._serialized_end = 18387 - _SCANWORKFLOWEXECUTIONSRESPONSE._serialized_start = 18389 - _SCANWORKFLOWEXECUTIONSRESPONSE._serialized_end = 18515 - _COUNTWORKFLOWEXECUTIONSREQUEST._serialized_start = 18517 - _COUNTWORKFLOWEXECUTIONSREQUEST._serialized_end = 18583 - _COUNTWORKFLOWEXECUTIONSRESPONSE._serialized_start = 18586 - _COUNTWORKFLOWEXECUTIONSRESPONSE._serialized_end = 18823 - _COUNTWORKFLOWEXECUTIONSRESPONSE_AGGREGATIONGROUP._serialized_start = 18735 - _COUNTWORKFLOWEXECUTIONSRESPONSE_AGGREGATIONGROUP._serialized_end = 18823 - _GETSEARCHATTRIBUTESREQUEST._serialized_start = 18825 - _GETSEARCHATTRIBUTESREQUEST._serialized_end = 18853 - _GETSEARCHATTRIBUTESRESPONSE._serialized_start = 18856 - _GETSEARCHATTRIBUTESRESPONSE._serialized_end = 19057 - _GETSEARCHATTRIBUTESRESPONSE_KEYSENTRY._serialized_start = 18973 - _GETSEARCHATTRIBUTESRESPONSE_KEYSENTRY._serialized_end = 19057 - _RESPONDQUERYTASKCOMPLETEDREQUEST._serialized_start = 19060 - _RESPONDQUERYTASKCOMPLETEDREQUEST._serialized_end = 19396 - _RESPONDQUERYTASKCOMPLETEDRESPONSE._serialized_start = 19398 - _RESPONDQUERYTASKCOMPLETEDRESPONSE._serialized_end = 19433 - _RESETSTICKYTASKQUEUEREQUEST._serialized_start = 19435 - _RESETSTICKYTASKQUEUEREQUEST._serialized_end = 19545 - _RESETSTICKYTASKQUEUERESPONSE._serialized_start = 19547 - _RESETSTICKYTASKQUEUERESPONSE._serialized_end = 19577 - _SHUTDOWNWORKERREQUEST._serialized_start = 19580 - _SHUTDOWNWORKERREQUEST._serialized_end = 19750 - _SHUTDOWNWORKERRESPONSE._serialized_start = 19752 - _SHUTDOWNWORKERRESPONSE._serialized_end = 19776 - _QUERYWORKFLOWREQUEST._serialized_start = 19779 - _QUERYWORKFLOWREQUEST._serialized_end = 20012 - _QUERYWORKFLOWRESPONSE._serialized_start = 20015 - _QUERYWORKFLOWRESPONSE._serialized_end = 20156 - _DESCRIBEWORKFLOWEXECUTIONREQUEST._serialized_start = 20158 - _DESCRIBEWORKFLOWEXECUTIONREQUEST._serialized_end = 20273 - _DESCRIBEWORKFLOWEXECUTIONRESPONSE._serialized_start = 20276 - _DESCRIBEWORKFLOWEXECUTIONRESPONSE._serialized_end = 20941 - _DESCRIBETASKQUEUEREQUEST._serialized_start = 20944 - _DESCRIBETASKQUEUEREQUEST._serialized_end = 21472 - _DESCRIBETASKQUEUERESPONSE._serialized_start = 21475 - _DESCRIBETASKQUEUERESPONSE._serialized_end = 22479 - _DESCRIBETASKQUEUERESPONSE_STATSBYPRIORITYKEYENTRY._serialized_start = 22159 - _DESCRIBETASKQUEUERESPONSE_STATSBYPRIORITYKEYENTRY._serialized_end = 22259 - _DESCRIBETASKQUEUERESPONSE_EFFECTIVERATELIMIT._serialized_start = 22261 - _DESCRIBETASKQUEUERESPONSE_EFFECTIVERATELIMIT._serialized_end = 22377 - _DESCRIBETASKQUEUERESPONSE_VERSIONSINFOENTRY._serialized_start = 22379 - _DESCRIBETASKQUEUERESPONSE_VERSIONSINFOENTRY._serialized_end = 22479 - _GETCLUSTERINFOREQUEST._serialized_start = 22481 - _GETCLUSTERINFOREQUEST._serialized_end = 22504 - _GETCLUSTERINFORESPONSE._serialized_start = 22507 - _GETCLUSTERINFORESPONSE._serialized_end = 22972 - _GETCLUSTERINFORESPONSE_SUPPORTEDCLIENTSENTRY._serialized_start = 22917 - _GETCLUSTERINFORESPONSE_SUPPORTEDCLIENTSENTRY._serialized_end = 22972 - _GETSYSTEMINFOREQUEST._serialized_start = 22974 - _GETSYSTEMINFOREQUEST._serialized_end = 22996 - _GETSYSTEMINFORESPONSE._serialized_start = 22999 - _GETSYSTEMINFORESPONSE._serialized_end = 23499 - _GETSYSTEMINFORESPONSE_CAPABILITIES._serialized_start = 23140 - _GETSYSTEMINFORESPONSE_CAPABILITIES._serialized_end = 23499 - _LISTTASKQUEUEPARTITIONSREQUEST._serialized_start = 23501 - _LISTTASKQUEUEPARTITIONSREQUEST._serialized_end = 23610 - _LISTTASKQUEUEPARTITIONSRESPONSE._serialized_start = 23613 - _LISTTASKQUEUEPARTITIONSRESPONSE._serialized_end = 23836 - _CREATESCHEDULEREQUEST._serialized_start = 23839 - _CREATESCHEDULEREQUEST._serialized_end = 24171 - _CREATESCHEDULERESPONSE._serialized_start = 24173 - _CREATESCHEDULERESPONSE._serialized_end = 24221 - _DESCRIBESCHEDULEREQUEST._serialized_start = 24223 - _DESCRIBESCHEDULEREQUEST._serialized_end = 24288 - _DESCRIBESCHEDULERESPONSE._serialized_start = 24291 - _DESCRIBESCHEDULERESPONSE._serialized_end = 24562 - _UPDATESCHEDULEREQUEST._serialized_start = 24565 - _UPDATESCHEDULEREQUEST._serialized_end = 24813 - _UPDATESCHEDULERESPONSE._serialized_start = 24815 - _UPDATESCHEDULERESPONSE._serialized_end = 24839 - _PATCHSCHEDULEREQUEST._serialized_start = 24842 - _PATCHSCHEDULEREQUEST._serialized_end = 24998 - _PATCHSCHEDULERESPONSE._serialized_start = 25000 - _PATCHSCHEDULERESPONSE._serialized_end = 25023 - _LISTSCHEDULEMATCHINGTIMESREQUEST._serialized_start = 25026 - _LISTSCHEDULEMATCHINGTIMESREQUEST._serialized_end = 25194 - _LISTSCHEDULEMATCHINGTIMESRESPONSE._serialized_start = 25196 - _LISTSCHEDULEMATCHINGTIMESRESPONSE._serialized_end = 25279 - _DELETESCHEDULEREQUEST._serialized_start = 25281 - _DELETESCHEDULEREQUEST._serialized_end = 25362 - _DELETESCHEDULERESPONSE._serialized_start = 25364 - _DELETESCHEDULERESPONSE._serialized_end = 25388 - _LISTSCHEDULESREQUEST._serialized_start = 25390 - _LISTSCHEDULESREQUEST._serialized_end = 25498 - _LISTSCHEDULESRESPONSE._serialized_start = 25500 - _LISTSCHEDULESRESPONSE._serialized_end = 25612 - _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST._serialized_start = 25615 - _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST._serialized_end = 26261 - _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_ADDNEWCOMPATIBLEVERSION._serialized_start = 26062 + _SETWORKERDEPLOYMENTMANAGERRESPONSE.fields_by_name[ + "previous_manager_identity" + ]._options = None + _SETWORKERDEPLOYMENTMANAGERRESPONSE.fields_by_name[ + "previous_manager_identity" + ]._serialized_options = b"\030\001" + _LISTWORKERSRESPONSE.fields_by_name["workers_info"]._options = None + _LISTWORKERSRESPONSE.fields_by_name[ + "workers_info" + ]._serialized_options = b"\030\001" + _UPDATETASKQUEUECONFIGREQUEST_SETFAIRNESSWEIGHTOVERRIDESENTRY._options = None + _UPDATETASKQUEUECONFIGREQUEST_SETFAIRNESSWEIGHTOVERRIDESENTRY._serialized_options = b"8\001" + _STARTNEXUSOPERATIONEXECUTIONREQUEST_NEXUSHEADERENTRY._options = None + _STARTNEXUSOPERATIONEXECUTIONREQUEST_NEXUSHEADERENTRY._serialized_options = b"8\001" + _REGISTERNAMESPACEREQUEST._serialized_start = 1692 + _REGISTERNAMESPACEREQUEST._serialized_end = 2340 + _REGISTERNAMESPACEREQUEST_DATAENTRY._serialized_start = 2297 + _REGISTERNAMESPACEREQUEST_DATAENTRY._serialized_end = 2340 + _REGISTERNAMESPACERESPONSE._serialized_start = 2342 + _REGISTERNAMESPACERESPONSE._serialized_end = 2369 + _LISTNAMESPACESREQUEST._serialized_start = 2372 + _LISTNAMESPACESREQUEST._serialized_end = 2509 + _LISTNAMESPACESRESPONSE._serialized_start = 2512 + _LISTNAMESPACESRESPONSE._serialized_end = 2641 + _DESCRIBENAMESPACEREQUEST._serialized_start = 2643 + _DESCRIBENAMESPACEREQUEST._serialized_end = 2726 + _DESCRIBENAMESPACERESPONSE._serialized_start = 2729 + _DESCRIBENAMESPACERESPONSE._serialized_end = 3242 + _UPDATENAMESPACEREQUEST._serialized_start = 3245 + _UPDATENAMESPACEREQUEST._serialized_end = 3580 + _UPDATENAMESPACERESPONSE._serialized_start = 3583 + _UPDATENAMESPACERESPONSE._serialized_end = 3874 + _DEPRECATENAMESPACEREQUEST._serialized_start = 3876 + _DEPRECATENAMESPACEREQUEST._serialized_end = 3946 + _DEPRECATENAMESPACERESPONSE._serialized_start = 3948 + _DEPRECATENAMESPACERESPONSE._serialized_end = 3976 + _STARTWORKFLOWEXECUTIONREQUEST._serialized_start = 3979 + _STARTWORKFLOWEXECUTIONREQUEST._serialized_end = 5794 + _STARTWORKFLOWEXECUTIONRESPONSE._serialized_start = 5797 + _STARTWORKFLOWEXECUTIONRESPONSE._serialized_end = 6095 + _GETWORKFLOWEXECUTIONHISTORYREQUEST._serialized_start = 6098 + _GETWORKFLOWEXECUTIONHISTORYREQUEST._serialized_end = 6396 + _GETWORKFLOWEXECUTIONHISTORYRESPONSE._serialized_start = 6399 + _GETWORKFLOWEXECUTIONHISTORYRESPONSE._serialized_end = 6688 + _GETWORKFLOWEXECUTIONHISTORYREVERSEREQUEST._serialized_start = 6691 + _GETWORKFLOWEXECUTIONHISTORYREVERSEREQUEST._serialized_end = 6867 + _GETWORKFLOWEXECUTIONHISTORYREVERSERESPONSE._serialized_start = 6869 + _GETWORKFLOWEXECUTIONHISTORYREVERSERESPONSE._serialized_end = 6989 + _POLLWORKFLOWTASKQUEUEREQUEST._serialized_start = 6992 + _POLLWORKFLOWTASKQUEUEREQUEST._serialized_end = 7501 + _POLLWORKFLOWTASKQUEUERESPONSE._serialized_start = 7504 + _POLLWORKFLOWTASKQUEUERESPONSE._serialized_end = 8591 + _POLLWORKFLOWTASKQUEUERESPONSE_QUERIESENTRY._serialized_start = 8507 + _POLLWORKFLOWTASKQUEUERESPONSE_QUERIESENTRY._serialized_end = 8591 + _RESPONDWORKFLOWTASKCOMPLETEDREQUEST._serialized_start = 8594 + _RESPONDWORKFLOWTASKCOMPLETEDREQUEST._serialized_end = 9932 + _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_QUERYRESULTSENTRY._serialized_start = 9766 + _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_QUERYRESULTSENTRY._serialized_end = 9861 + _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_CAPABILITIES._serialized_start = 9863 + _RESPONDWORKFLOWTASKCOMPLETEDREQUEST_CAPABILITIES._serialized_end = 9932 + _RESPONDWORKFLOWTASKCOMPLETEDRESPONSE._serialized_start = 9935 + _RESPONDWORKFLOWTASKCOMPLETEDRESPONSE._serialized_end = 10180 + _RESPONDWORKFLOWTASKFAILEDREQUEST._serialized_start = 10183 + _RESPONDWORKFLOWTASKFAILEDREQUEST._serialized_end = 10708 + _RESPONDWORKFLOWTASKFAILEDRESPONSE._serialized_start = 10710 + _RESPONDWORKFLOWTASKFAILEDRESPONSE._serialized_end = 10745 + _POLLACTIVITYTASKQUEUEREQUEST._serialized_start = 10748 + _POLLACTIVITYTASKQUEUEREQUEST._serialized_end = 11303 + _POLLACTIVITYTASKQUEUERESPONSE._serialized_start = 11306 + _POLLACTIVITYTASKQUEUERESPONSE._serialized_end = 12590 + _RECORDACTIVITYTASKHEARTBEATREQUEST._serialized_start = 12593 + _RECORDACTIVITYTASKHEARTBEATREQUEST._serialized_end = 12758 + _RECORDACTIVITYTASKHEARTBEATRESPONSE._serialized_start = 12760 + _RECORDACTIVITYTASKHEARTBEATRESPONSE._serialized_end = 12872 + _RECORDACTIVITYTASKHEARTBEATBYIDREQUEST._serialized_start = 12875 + _RECORDACTIVITYTASKHEARTBEATBYIDREQUEST._serialized_end = 13082 + _RECORDACTIVITYTASKHEARTBEATBYIDRESPONSE._serialized_start = 13084 + _RECORDACTIVITYTASKHEARTBEATBYIDRESPONSE._serialized_end = 13200 + _RESPONDACTIVITYTASKCOMPLETEDREQUEST._serialized_start = 13203 + _RESPONDACTIVITYTASKCOMPLETEDREQUEST._serialized_end = 13585 + _RESPONDACTIVITYTASKCOMPLETEDRESPONSE._serialized_start = 13587 + _RESPONDACTIVITYTASKCOMPLETEDRESPONSE._serialized_end = 13625 + _RESPONDACTIVITYTASKCOMPLETEDBYIDREQUEST._serialized_start = 13628 + _RESPONDACTIVITYTASKCOMPLETEDBYIDREQUEST._serialized_end = 13835 + _RESPONDACTIVITYTASKCOMPLETEDBYIDRESPONSE._serialized_start = 13837 + _RESPONDACTIVITYTASKCOMPLETEDBYIDRESPONSE._serialized_end = 13879 + _RESPONDACTIVITYTASKFAILEDREQUEST._serialized_start = 13882 + _RESPONDACTIVITYTASKFAILEDREQUEST._serialized_end = 14391 + _RESPONDACTIVITYTASKFAILEDRESPONSE._serialized_start = 14393 + _RESPONDACTIVITYTASKFAILEDRESPONSE._serialized_end = 14480 + _RESPONDACTIVITYTASKFAILEDBYIDREQUEST._serialized_start = 14483 + _RESPONDACTIVITYTASKFAILEDBYIDREQUEST._serialized_end = 14817 + _RESPONDACTIVITYTASKFAILEDBYIDRESPONSE._serialized_start = 14819 + _RESPONDACTIVITYTASKFAILEDBYIDRESPONSE._serialized_end = 14910 + _RESPONDACTIVITYTASKCANCELEDREQUEST._serialized_start = 14913 + _RESPONDACTIVITYTASKCANCELEDREQUEST._serialized_end = 15295 + _RESPONDACTIVITYTASKCANCELEDRESPONSE._serialized_start = 15297 + _RESPONDACTIVITYTASKCANCELEDRESPONSE._serialized_end = 15334 + _RESPONDACTIVITYTASKCANCELEDBYIDREQUEST._serialized_start = 15337 + _RESPONDACTIVITYTASKCANCELEDBYIDREQUEST._serialized_end = 15625 + _RESPONDACTIVITYTASKCANCELEDBYIDRESPONSE._serialized_start = 15627 + _RESPONDACTIVITYTASKCANCELEDBYIDRESPONSE._serialized_end = 15668 + _REQUESTCANCELWORKFLOWEXECUTIONREQUEST._serialized_start = 15671 + _REQUESTCANCELWORKFLOWEXECUTIONREQUEST._serialized_end = 15931 + _REQUESTCANCELWORKFLOWEXECUTIONRESPONSE._serialized_start = 15933 + _REQUESTCANCELWORKFLOWEXECUTIONRESPONSE._serialized_end = 15973 + _SIGNALWORKFLOWEXECUTIONREQUEST._serialized_start = 15976 + _SIGNALWORKFLOWEXECUTIONREQUEST._serialized_end = 16326 + _SIGNALWORKFLOWEXECUTIONRESPONSE._serialized_start = 16328 + _SIGNALWORKFLOWEXECUTIONRESPONSE._serialized_end = 16405 + _SIGNALWITHSTARTWORKFLOWEXECUTIONREQUEST._serialized_start = 16408 + _SIGNALWITHSTARTWORKFLOWEXECUTIONREQUEST._serialized_end = 17747 + _SIGNALWITHSTARTWORKFLOWEXECUTIONRESPONSE._serialized_start = 17750 + _SIGNALWITHSTARTWORKFLOWEXECUTIONRESPONSE._serialized_end = 17908 + _RESETWORKFLOWEXECUTIONREQUEST._serialized_start = 17911 + _RESETWORKFLOWEXECUTIONREQUEST._serialized_end = 18360 + _RESETWORKFLOWEXECUTIONRESPONSE._serialized_start = 18362 + _RESETWORKFLOWEXECUTIONRESPONSE._serialized_end = 18410 + _TERMINATEWORKFLOWEXECUTIONREQUEST._serialized_start = 18413 + _TERMINATEWORKFLOWEXECUTIONREQUEST._serialized_end = 18700 + _TERMINATEWORKFLOWEXECUTIONRESPONSE._serialized_start = 18702 + _TERMINATEWORKFLOWEXECUTIONRESPONSE._serialized_end = 18738 + _DELETEWORKFLOWEXECUTIONREQUEST._serialized_start = 18740 + _DELETEWORKFLOWEXECUTIONREQUEST._serialized_end = 18862 + _DELETEWORKFLOWEXECUTIONRESPONSE._serialized_start = 18864 + _DELETEWORKFLOWEXECUTIONRESPONSE._serialized_end = 18897 + _LISTOPENWORKFLOWEXECUTIONSREQUEST._serialized_start = 18900 + _LISTOPENWORKFLOWEXECUTIONSREQUEST._serialized_end = 19229 + _LISTOPENWORKFLOWEXECUTIONSRESPONSE._serialized_start = 19232 + _LISTOPENWORKFLOWEXECUTIONSRESPONSE._serialized_end = 19362 + _LISTCLOSEDWORKFLOWEXECUTIONSREQUEST._serialized_start = 19365 + _LISTCLOSEDWORKFLOWEXECUTIONSREQUEST._serialized_end = 19759 + _LISTCLOSEDWORKFLOWEXECUTIONSRESPONSE._serialized_start = 19762 + _LISTCLOSEDWORKFLOWEXECUTIONSRESPONSE._serialized_end = 19894 + _LISTWORKFLOWEXECUTIONSREQUEST._serialized_start = 19896 + _LISTWORKFLOWEXECUTIONSREQUEST._serialized_end = 20005 + _LISTWORKFLOWEXECUTIONSRESPONSE._serialized_start = 20007 + _LISTWORKFLOWEXECUTIONSRESPONSE._serialized_end = 20133 + _LISTARCHIVEDWORKFLOWEXECUTIONSREQUEST._serialized_start = 20135 + _LISTARCHIVEDWORKFLOWEXECUTIONSREQUEST._serialized_end = 20252 + _LISTARCHIVEDWORKFLOWEXECUTIONSRESPONSE._serialized_start = 20255 + _LISTARCHIVEDWORKFLOWEXECUTIONSRESPONSE._serialized_end = 20389 + _SCANWORKFLOWEXECUTIONSREQUEST._serialized_start = 20391 + _SCANWORKFLOWEXECUTIONSREQUEST._serialized_end = 20500 + _SCANWORKFLOWEXECUTIONSRESPONSE._serialized_start = 20502 + _SCANWORKFLOWEXECUTIONSRESPONSE._serialized_end = 20628 + _COUNTWORKFLOWEXECUTIONSREQUEST._serialized_start = 20630 + _COUNTWORKFLOWEXECUTIONSREQUEST._serialized_end = 20696 + _COUNTWORKFLOWEXECUTIONSRESPONSE._serialized_start = 20699 + _COUNTWORKFLOWEXECUTIONSRESPONSE._serialized_end = 20936 + _COUNTWORKFLOWEXECUTIONSRESPONSE_AGGREGATIONGROUP._serialized_start = 20848 + _COUNTWORKFLOWEXECUTIONSRESPONSE_AGGREGATIONGROUP._serialized_end = 20936 + _GETSEARCHATTRIBUTESREQUEST._serialized_start = 20938 + _GETSEARCHATTRIBUTESREQUEST._serialized_end = 20966 + _GETSEARCHATTRIBUTESRESPONSE._serialized_start = 20969 + _GETSEARCHATTRIBUTESRESPONSE._serialized_end = 21170 + _GETSEARCHATTRIBUTESRESPONSE_KEYSENTRY._serialized_start = 21086 + _GETSEARCHATTRIBUTESRESPONSE_KEYSENTRY._serialized_end = 21170 + _RESPONDQUERYTASKCOMPLETEDREQUEST._serialized_start = 21173 + _RESPONDQUERYTASKCOMPLETEDREQUEST._serialized_end = 21534 + _RESPONDQUERYTASKCOMPLETEDRESPONSE._serialized_start = 21536 + _RESPONDQUERYTASKCOMPLETEDRESPONSE._serialized_end = 21571 + _RESETSTICKYTASKQUEUEREQUEST._serialized_start = 21573 + _RESETSTICKYTASKQUEUEREQUEST._serialized_end = 21683 + _RESETSTICKYTASKQUEUERESPONSE._serialized_start = 21685 + _RESETSTICKYTASKQUEUERESPONSE._serialized_end = 21715 + _SHUTDOWNWORKERREQUEST._serialized_start = 21718 + _SHUTDOWNWORKERREQUEST._serialized_end = 22001 + _SHUTDOWNWORKERRESPONSE._serialized_start = 22003 + _SHUTDOWNWORKERRESPONSE._serialized_end = 22027 + _QUERYWORKFLOWREQUEST._serialized_start = 22030 + _QUERYWORKFLOWREQUEST._serialized_end = 22263 + _QUERYWORKFLOWRESPONSE._serialized_start = 22266 + _QUERYWORKFLOWRESPONSE._serialized_end = 22451 + _DESCRIBEWORKFLOWEXECUTIONREQUEST._serialized_start = 22453 + _DESCRIBEWORKFLOWEXECUTIONREQUEST._serialized_end = 22568 + _DESCRIBEWORKFLOWEXECUTIONRESPONSE._serialized_start = 22571 + _DESCRIBEWORKFLOWEXECUTIONRESPONSE._serialized_end = 23236 + _DESCRIBETASKQUEUEREQUEST._serialized_start = 23239 + _DESCRIBETASKQUEUEREQUEST._serialized_end = 23767 + _DESCRIBETASKQUEUERESPONSE._serialized_start = 23770 + _DESCRIBETASKQUEUERESPONSE._serialized_end = 24774 + _DESCRIBETASKQUEUERESPONSE_STATSBYPRIORITYKEYENTRY._serialized_start = 24454 + _DESCRIBETASKQUEUERESPONSE_STATSBYPRIORITYKEYENTRY._serialized_end = 24554 + _DESCRIBETASKQUEUERESPONSE_EFFECTIVERATELIMIT._serialized_start = 24556 + _DESCRIBETASKQUEUERESPONSE_EFFECTIVERATELIMIT._serialized_end = 24672 + _DESCRIBETASKQUEUERESPONSE_VERSIONSINFOENTRY._serialized_start = 24674 + _DESCRIBETASKQUEUERESPONSE_VERSIONSINFOENTRY._serialized_end = 24774 + _GETCLUSTERINFOREQUEST._serialized_start = 24776 + _GETCLUSTERINFOREQUEST._serialized_end = 24799 + _GETCLUSTERINFORESPONSE._serialized_start = 24802 + _GETCLUSTERINFORESPONSE._serialized_end = 25267 + _GETCLUSTERINFORESPONSE_SUPPORTEDCLIENTSENTRY._serialized_start = 25212 + _GETCLUSTERINFORESPONSE_SUPPORTEDCLIENTSENTRY._serialized_end = 25267 + _GETSYSTEMINFOREQUEST._serialized_start = 25269 + _GETSYSTEMINFOREQUEST._serialized_end = 25291 + _GETSYSTEMINFORESPONSE._serialized_start = 25294 + _GETSYSTEMINFORESPONSE._serialized_end = 25871 + _GETSYSTEMINFORESPONSE_CAPABILITIES._serialized_start = 25435 + _GETSYSTEMINFORESPONSE_CAPABILITIES._serialized_end = 25871 + _LISTTASKQUEUEPARTITIONSREQUEST._serialized_start = 25873 + _LISTTASKQUEUEPARTITIONSREQUEST._serialized_end = 25982 + _LISTTASKQUEUEPARTITIONSRESPONSE._serialized_start = 25985 + _LISTTASKQUEUEPARTITIONSRESPONSE._serialized_end = 26208 + _CREATESCHEDULEREQUEST._serialized_start = 26211 + _CREATESCHEDULEREQUEST._serialized_end = 26543 + _CREATESCHEDULERESPONSE._serialized_start = 26545 + _CREATESCHEDULERESPONSE._serialized_end = 26593 + _DESCRIBESCHEDULEREQUEST._serialized_start = 26595 + _DESCRIBESCHEDULEREQUEST._serialized_end = 26660 + _DESCRIBESCHEDULERESPONSE._serialized_start = 26663 + _DESCRIBESCHEDULERESPONSE._serialized_end = 26934 + _UPDATESCHEDULEREQUEST._serialized_start = 26937 + _UPDATESCHEDULEREQUEST._serialized_end = 27229 + _UPDATESCHEDULERESPONSE._serialized_start = 27231 + _UPDATESCHEDULERESPONSE._serialized_end = 27255 + _PATCHSCHEDULEREQUEST._serialized_start = 27258 + _PATCHSCHEDULEREQUEST._serialized_end = 27414 + _PATCHSCHEDULERESPONSE._serialized_start = 27416 + _PATCHSCHEDULERESPONSE._serialized_end = 27439 + _LISTSCHEDULEMATCHINGTIMESREQUEST._serialized_start = 27442 + _LISTSCHEDULEMATCHINGTIMESREQUEST._serialized_end = 27610 + _LISTSCHEDULEMATCHINGTIMESRESPONSE._serialized_start = 27612 + _LISTSCHEDULEMATCHINGTIMESRESPONSE._serialized_end = 27695 + _DELETESCHEDULEREQUEST._serialized_start = 27697 + _DELETESCHEDULEREQUEST._serialized_end = 27778 + _DELETESCHEDULERESPONSE._serialized_start = 27780 + _DELETESCHEDULERESPONSE._serialized_end = 27804 + _LISTSCHEDULESREQUEST._serialized_start = 27806 + _LISTSCHEDULESREQUEST._serialized_end = 27914 + _LISTSCHEDULESRESPONSE._serialized_start = 27916 + _LISTSCHEDULESRESPONSE._serialized_end = 28028 + _COUNTSCHEDULESREQUEST._serialized_start = 28030 + _COUNTSCHEDULESREQUEST._serialized_end = 28087 + _COUNTSCHEDULESRESPONSE._serialized_start = 28090 + _COUNTSCHEDULESRESPONSE._serialized_end = 28309 + _COUNTSCHEDULESRESPONSE_AGGREGATIONGROUP._serialized_start = 20848 + _COUNTSCHEDULESRESPONSE_AGGREGATIONGROUP._serialized_end = 20936 + _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST._serialized_start = 28312 + _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST._serialized_end = 28958 + _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_ADDNEWCOMPATIBLEVERSION._serialized_start = 28759 _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_ADDNEWCOMPATIBLEVERSION._serialized_end = ( - 26173 + 28870 ) - _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_MERGESETS._serialized_start = 26175 - _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_MERGESETS._serialized_end = 26248 - _UPDATEWORKERBUILDIDCOMPATIBILITYRESPONSE._serialized_start = 26263 - _UPDATEWORKERBUILDIDCOMPATIBILITYRESPONSE._serialized_end = 26327 - _GETWORKERBUILDIDCOMPATIBILITYREQUEST._serialized_start = 26329 - _GETWORKERBUILDIDCOMPATIBILITYREQUEST._serialized_end = 26424 - _GETWORKERBUILDIDCOMPATIBILITYRESPONSE._serialized_start = 26426 - _GETWORKERBUILDIDCOMPATIBILITYRESPONSE._serialized_end = 26542 - _UPDATEWORKERVERSIONINGRULESREQUEST._serialized_start = 26545 - _UPDATEWORKERVERSIONINGRULESREQUEST._serialized_end = 28262 - _UPDATEWORKERVERSIONINGRULESREQUEST_INSERTBUILDIDASSIGNMENTRULE._serialized_start = 27597 + _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_MERGESETS._serialized_start = 28872 + _UPDATEWORKERBUILDIDCOMPATIBILITYREQUEST_MERGESETS._serialized_end = 28945 + _UPDATEWORKERBUILDIDCOMPATIBILITYRESPONSE._serialized_start = 28960 + _UPDATEWORKERBUILDIDCOMPATIBILITYRESPONSE._serialized_end = 29024 + _GETWORKERBUILDIDCOMPATIBILITYREQUEST._serialized_start = 29026 + _GETWORKERBUILDIDCOMPATIBILITYREQUEST._serialized_end = 29121 + _GETWORKERBUILDIDCOMPATIBILITYRESPONSE._serialized_start = 29123 + _GETWORKERBUILDIDCOMPATIBILITYRESPONSE._serialized_end = 29239 + _UPDATEWORKERVERSIONINGRULESREQUEST._serialized_start = 29242 + _UPDATEWORKERVERSIONINGRULESREQUEST._serialized_end = 30959 + _UPDATEWORKERVERSIONINGRULESREQUEST_INSERTBUILDIDASSIGNMENTRULE._serialized_start = 30294 _UPDATEWORKERVERSIONINGRULESREQUEST_INSERTBUILDIDASSIGNMENTRULE._serialized_end = ( - 27710 + 30407 ) - _UPDATEWORKERVERSIONINGRULESREQUEST_REPLACEBUILDIDASSIGNMENTRULE._serialized_start = 27713 + _UPDATEWORKERVERSIONINGRULESREQUEST_REPLACEBUILDIDASSIGNMENTRULE._serialized_start = 30410 _UPDATEWORKERVERSIONINGRULESREQUEST_REPLACEBUILDIDASSIGNMENTRULE._serialized_end = ( - 27842 + 30539 ) - _UPDATEWORKERVERSIONINGRULESREQUEST_DELETEBUILDIDASSIGNMENTRULE._serialized_start = 27844 + _UPDATEWORKERVERSIONINGRULESREQUEST_DELETEBUILDIDASSIGNMENTRULE._serialized_start = 30541 _UPDATEWORKERVERSIONINGRULESREQUEST_DELETEBUILDIDASSIGNMENTRULE._serialized_end = ( - 27908 + 30605 ) - _UPDATEWORKERVERSIONINGRULESREQUEST_ADDCOMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 27910 - _UPDATEWORKERVERSIONINGRULESREQUEST_ADDCOMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 28016 - _UPDATEWORKERVERSIONINGRULESREQUEST_REPLACECOMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 28018 - _UPDATEWORKERVERSIONINGRULESREQUEST_REPLACECOMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 28128 - _UPDATEWORKERVERSIONINGRULESREQUEST_DELETECOMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 28130 - _UPDATEWORKERVERSIONINGRULESREQUEST_DELETECOMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 28192 - _UPDATEWORKERVERSIONINGRULESREQUEST_COMMITBUILDID._serialized_start = 28194 - _UPDATEWORKERVERSIONINGRULESREQUEST_COMMITBUILDID._serialized_end = 28249 - _UPDATEWORKERVERSIONINGRULESRESPONSE._serialized_start = 28265 - _UPDATEWORKERVERSIONINGRULESRESPONSE._serialized_end = 28517 - _GETWORKERVERSIONINGRULESREQUEST._serialized_start = 28519 - _GETWORKERVERSIONINGRULESREQUEST._serialized_end = 28591 - _GETWORKERVERSIONINGRULESRESPONSE._serialized_start = 28594 - _GETWORKERVERSIONINGRULESRESPONSE._serialized_end = 28843 - _GETWORKERTASKREACHABILITYREQUEST._serialized_start = 28846 - _GETWORKERTASKREACHABILITYREQUEST._serialized_end = 29002 - _GETWORKERTASKREACHABILITYRESPONSE._serialized_start = 29004 - _GETWORKERTASKREACHABILITYRESPONSE._serialized_end = 29118 - _UPDATEWORKFLOWEXECUTIONREQUEST._serialized_start = 29121 - _UPDATEWORKFLOWEXECUTIONREQUEST._serialized_end = 29382 - _UPDATEWORKFLOWEXECUTIONRESPONSE._serialized_start = 29385 - _UPDATEWORKFLOWEXECUTIONRESPONSE._serialized_end = 29600 - _STARTBATCHOPERATIONREQUEST._serialized_start = 29603 - _STARTBATCHOPERATIONREQUEST._serialized_end = 30615 - _STARTBATCHOPERATIONRESPONSE._serialized_start = 30617 - _STARTBATCHOPERATIONRESPONSE._serialized_end = 30646 - _STOPBATCHOPERATIONREQUEST._serialized_start = 30648 - _STOPBATCHOPERATIONREQUEST._serialized_end = 30744 - _STOPBATCHOPERATIONRESPONSE._serialized_start = 30746 - _STOPBATCHOPERATIONRESPONSE._serialized_end = 30774 - _DESCRIBEBATCHOPERATIONREQUEST._serialized_start = 30776 - _DESCRIBEBATCHOPERATIONREQUEST._serialized_end = 30842 - _DESCRIBEBATCHOPERATIONRESPONSE._serialized_start = 30845 - _DESCRIBEBATCHOPERATIONRESPONSE._serialized_end = 31247 - _LISTBATCHOPERATIONSREQUEST._serialized_start = 31249 - _LISTBATCHOPERATIONSREQUEST._serialized_end = 31340 - _LISTBATCHOPERATIONSRESPONSE._serialized_start = 31342 - _LISTBATCHOPERATIONSRESPONSE._serialized_end = 31463 - _POLLWORKFLOWEXECUTIONUPDATEREQUEST._serialized_start = 31466 - _POLLWORKFLOWEXECUTIONUPDATEREQUEST._serialized_end = 31651 - _POLLWORKFLOWEXECUTIONUPDATERESPONSE._serialized_start = 31654 - _POLLWORKFLOWEXECUTIONUPDATERESPONSE._serialized_end = 31873 - _POLLNEXUSTASKQUEUEREQUEST._serialized_start = 31876 - _POLLNEXUSTASKQUEUEREQUEST._serialized_end = 32238 - _POLLNEXUSTASKQUEUERESPONSE._serialized_start = 32241 - _POLLNEXUSTASKQUEUERESPONSE._serialized_end = 32421 - _RESPONDNEXUSTASKCOMPLETEDREQUEST._serialized_start = 32424 - _RESPONDNEXUSTASKCOMPLETEDREQUEST._serialized_end = 32566 - _RESPONDNEXUSTASKCOMPLETEDRESPONSE._serialized_start = 32568 - _RESPONDNEXUSTASKCOMPLETEDRESPONSE._serialized_end = 32603 - _RESPONDNEXUSTASKFAILEDREQUEST._serialized_start = 32606 - _RESPONDNEXUSTASKFAILEDREQUEST._serialized_end = 32746 - _RESPONDNEXUSTASKFAILEDRESPONSE._serialized_start = 32748 - _RESPONDNEXUSTASKFAILEDRESPONSE._serialized_end = 32780 - _EXECUTEMULTIOPERATIONREQUEST._serialized_start = 32783 - _EXECUTEMULTIOPERATIONREQUEST._serialized_end = 33134 - _EXECUTEMULTIOPERATIONREQUEST_OPERATION._serialized_start = 32928 - _EXECUTEMULTIOPERATIONREQUEST_OPERATION._serialized_end = 33134 - _EXECUTEMULTIOPERATIONRESPONSE._serialized_start = 33137 - _EXECUTEMULTIOPERATIONRESPONSE._serialized_end = 33469 - _EXECUTEMULTIOPERATIONRESPONSE_RESPONSE._serialized_start = 33263 - _EXECUTEMULTIOPERATIONRESPONSE_RESPONSE._serialized_end = 33469 - _UPDATEACTIVITYOPTIONSREQUEST._serialized_start = 33472 - _UPDATEACTIVITYOPTIONSREQUEST._serialized_end = 33808 - _UPDATEACTIVITYOPTIONSRESPONSE._serialized_start = 33810 - _UPDATEACTIVITYOPTIONSRESPONSE._serialized_end = 33910 - _PAUSEACTIVITYREQUEST._serialized_start = 33913 - _PAUSEACTIVITYREQUEST._serialized_end = 34092 - _PAUSEACTIVITYRESPONSE._serialized_start = 34094 - _PAUSEACTIVITYRESPONSE._serialized_end = 34117 - _UNPAUSEACTIVITYREQUEST._serialized_start = 34120 - _UNPAUSEACTIVITYREQUEST._serialized_end = 34400 - _UNPAUSEACTIVITYRESPONSE._serialized_start = 34402 - _UNPAUSEACTIVITYRESPONSE._serialized_end = 34427 - _RESETACTIVITYREQUEST._serialized_start = 34430 - _RESETACTIVITYREQUEST._serialized_end = 34737 - _RESETACTIVITYRESPONSE._serialized_start = 34739 - _RESETACTIVITYRESPONSE._serialized_end = 34762 - _UPDATEWORKFLOWEXECUTIONOPTIONSREQUEST._serialized_start = 34765 - _UPDATEWORKFLOWEXECUTIONOPTIONSREQUEST._serialized_end = 35031 - _UPDATEWORKFLOWEXECUTIONOPTIONSRESPONSE._serialized_start = 35034 - _UPDATEWORKFLOWEXECUTIONOPTIONSRESPONSE._serialized_end = 35162 - _DESCRIBEDEPLOYMENTREQUEST._serialized_start = 35164 - _DESCRIBEDEPLOYMENTREQUEST._serialized_end = 35270 - _DESCRIBEDEPLOYMENTRESPONSE._serialized_start = 35272 - _DESCRIBEDEPLOYMENTRESPONSE._serialized_end = 35369 - _DESCRIBEWORKERDEPLOYMENTVERSIONREQUEST._serialized_start = 35372 - _DESCRIBEWORKERDEPLOYMENTVERSIONREQUEST._serialized_end = 35566 - _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_start = 35569 - _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_end = 36221 - _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE._serialized_start = 35830 - _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE._serialized_end = 36221 - _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE_STATSBYPRIORITYKEYENTRY._serialized_start = 22159 - _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE_STATSBYPRIORITYKEYENTRY._serialized_end = 22259 - _DESCRIBEWORKERDEPLOYMENTREQUEST._serialized_start = 36223 - _DESCRIBEWORKERDEPLOYMENTREQUEST._serialized_end = 36300 - _DESCRIBEWORKERDEPLOYMENTRESPONSE._serialized_start = 36303 - _DESCRIBEWORKERDEPLOYMENTRESPONSE._serialized_end = 36443 - _LISTDEPLOYMENTSREQUEST._serialized_start = 36445 - _LISTDEPLOYMENTSREQUEST._serialized_end = 36553 - _LISTDEPLOYMENTSRESPONSE._serialized_start = 36555 - _LISTDEPLOYMENTSRESPONSE._serialized_end = 36674 - _SETCURRENTDEPLOYMENTREQUEST._serialized_start = 36677 - _SETCURRENTDEPLOYMENTREQUEST._serialized_end = 36882 - _SETCURRENTDEPLOYMENTRESPONSE._serialized_start = 36885 - _SETCURRENTDEPLOYMENTRESPONSE._serialized_end = 37070 - _SETWORKERDEPLOYMENTCURRENTVERSIONREQUEST._serialized_start = 37073 - _SETWORKERDEPLOYMENTCURRENTVERSIONREQUEST._serialized_end = 37302 - _SETWORKERDEPLOYMENTCURRENTVERSIONRESPONSE._serialized_start = 37305 - _SETWORKERDEPLOYMENTCURRENTVERSIONRESPONSE._serialized_end = 37492 - _SETWORKERDEPLOYMENTRAMPINGVERSIONREQUEST._serialized_start = 37495 - _SETWORKERDEPLOYMENTRAMPINGVERSIONREQUEST._serialized_end = 37744 - _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE._serialized_start = 37747 - _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE._serialized_end = 37963 - _LISTWORKERDEPLOYMENTSREQUEST._serialized_start = 37965 - _LISTWORKERDEPLOYMENTSREQUEST._serialized_end = 38058 - _LISTWORKERDEPLOYMENTSRESPONSE._serialized_start = 38061 - _LISTWORKERDEPLOYMENTSRESPONSE._serialized_end = 38732 - _LISTWORKERDEPLOYMENTSRESPONSE_WORKERDEPLOYMENTSUMMARY._serialized_start = 38236 - _LISTWORKERDEPLOYMENTSRESPONSE_WORKERDEPLOYMENTSUMMARY._serialized_end = 38732 - _DELETEWORKERDEPLOYMENTVERSIONREQUEST._serialized_start = 38735 - _DELETEWORKERDEPLOYMENTVERSIONREQUEST._serialized_end = 38935 - _DELETEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_start = 38937 - _DELETEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_end = 38976 - _DELETEWORKERDEPLOYMENTREQUEST._serialized_start = 38978 - _DELETEWORKERDEPLOYMENTREQUEST._serialized_end = 39071 - _DELETEWORKERDEPLOYMENTRESPONSE._serialized_start = 39073 - _DELETEWORKERDEPLOYMENTRESPONSE._serialized_end = 39105 - _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST._serialized_start = 39108 - _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST._serialized_end = 39526 - _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST_UPSERTENTRIESENTRY._serialized_start = 39441 + _UPDATEWORKERVERSIONINGRULESREQUEST_ADDCOMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 30607 + _UPDATEWORKERVERSIONINGRULESREQUEST_ADDCOMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 30713 + _UPDATEWORKERVERSIONINGRULESREQUEST_REPLACECOMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 30715 + _UPDATEWORKERVERSIONINGRULESREQUEST_REPLACECOMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 30825 + _UPDATEWORKERVERSIONINGRULESREQUEST_DELETECOMPATIBLEBUILDIDREDIRECTRULE._serialized_start = 30827 + _UPDATEWORKERVERSIONINGRULESREQUEST_DELETECOMPATIBLEBUILDIDREDIRECTRULE._serialized_end = 30889 + _UPDATEWORKERVERSIONINGRULESREQUEST_COMMITBUILDID._serialized_start = 30891 + _UPDATEWORKERVERSIONINGRULESREQUEST_COMMITBUILDID._serialized_end = 30946 + _UPDATEWORKERVERSIONINGRULESRESPONSE._serialized_start = 30962 + _UPDATEWORKERVERSIONINGRULESRESPONSE._serialized_end = 31214 + _GETWORKERVERSIONINGRULESREQUEST._serialized_start = 31216 + _GETWORKERVERSIONINGRULESREQUEST._serialized_end = 31288 + _GETWORKERVERSIONINGRULESRESPONSE._serialized_start = 31291 + _GETWORKERVERSIONINGRULESRESPONSE._serialized_end = 31540 + _GETWORKERTASKREACHABILITYREQUEST._serialized_start = 31543 + _GETWORKERTASKREACHABILITYREQUEST._serialized_end = 31699 + _GETWORKERTASKREACHABILITYRESPONSE._serialized_start = 31701 + _GETWORKERTASKREACHABILITYRESPONSE._serialized_end = 31815 + _UPDATEWORKFLOWEXECUTIONREQUEST._serialized_start = 31818 + _UPDATEWORKFLOWEXECUTIONREQUEST._serialized_end = 32079 + _UPDATEWORKFLOWEXECUTIONRESPONSE._serialized_start = 32082 + _UPDATEWORKFLOWEXECUTIONRESPONSE._serialized_end = 32444 + _STARTBATCHOPERATIONREQUEST._serialized_start = 32447 + _STARTBATCHOPERATIONREQUEST._serialized_end = 33813 + _STARTBATCHOPERATIONRESPONSE._serialized_start = 33815 + _STARTBATCHOPERATIONRESPONSE._serialized_end = 33844 + _STOPBATCHOPERATIONREQUEST._serialized_start = 33846 + _STOPBATCHOPERATIONREQUEST._serialized_end = 33942 + _STOPBATCHOPERATIONRESPONSE._serialized_start = 33944 + _STOPBATCHOPERATIONRESPONSE._serialized_end = 33972 + _DESCRIBEBATCHOPERATIONREQUEST._serialized_start = 33974 + _DESCRIBEBATCHOPERATIONREQUEST._serialized_end = 34040 + _DESCRIBEBATCHOPERATIONRESPONSE._serialized_start = 34043 + _DESCRIBEBATCHOPERATIONRESPONSE._serialized_end = 34515 + _LISTBATCHOPERATIONSREQUEST._serialized_start = 34517 + _LISTBATCHOPERATIONSREQUEST._serialized_end = 34608 + _LISTBATCHOPERATIONSRESPONSE._serialized_start = 34610 + _LISTBATCHOPERATIONSRESPONSE._serialized_end = 34731 + _POLLWORKFLOWEXECUTIONUPDATEREQUEST._serialized_start = 34734 + _POLLWORKFLOWEXECUTIONUPDATEREQUEST._serialized_end = 34919 + _POLLWORKFLOWEXECUTIONUPDATERESPONSE._serialized_start = 34922 + _POLLWORKFLOWEXECUTIONUPDATERESPONSE._serialized_end = 35244 + _POLLNEXUSTASKQUEUEREQUEST._serialized_start = 35247 + _POLLNEXUSTASKQUEUEREQUEST._serialized_end = 35732 + _POLLNEXUSTASKQUEUERESPONSE._serialized_start = 35735 + _POLLNEXUSTASKQUEUERESPONSE._serialized_end = 36089 + _RESPONDNEXUSTASKCOMPLETEDREQUEST._serialized_start = 36092 + _RESPONDNEXUSTASKCOMPLETEDREQUEST._serialized_end = 36259 + _RESPONDNEXUSTASKCOMPLETEDRESPONSE._serialized_start = 36261 + _RESPONDNEXUSTASKCOMPLETEDRESPONSE._serialized_end = 36296 + _RESPONDNEXUSTASKFAILEDREQUEST._serialized_start = 36299 + _RESPONDNEXUSTASKFAILEDREQUEST._serialized_end = 36519 + _RESPONDNEXUSTASKFAILEDRESPONSE._serialized_start = 36521 + _RESPONDNEXUSTASKFAILEDRESPONSE._serialized_end = 36553 + _EXECUTEMULTIOPERATIONREQUEST._serialized_start = 36556 + _EXECUTEMULTIOPERATIONREQUEST._serialized_end = 36928 + _EXECUTEMULTIOPERATIONREQUEST_OPERATION._serialized_start = 36722 + _EXECUTEMULTIOPERATIONREQUEST_OPERATION._serialized_end = 36928 + _EXECUTEMULTIOPERATIONRESPONSE._serialized_start = 36931 + _EXECUTEMULTIOPERATIONRESPONSE._serialized_end = 37263 + _EXECUTEMULTIOPERATIONRESPONSE_RESPONSE._serialized_start = 37057 + _EXECUTEMULTIOPERATIONRESPONSE_RESPONSE._serialized_end = 37263 + _UPDATEACTIVITYOPTIONSREQUEST._serialized_start = 37266 + _UPDATEACTIVITYOPTIONSREQUEST._serialized_end = 37602 + _UPDATEACTIVITYEXECUTIONOPTIONSREQUEST._serialized_start = 37605 + _UPDATEACTIVITYEXECUTIONOPTIONSREQUEST._serialized_end = 37924 + _UPDATEACTIVITYOPTIONSRESPONSE._serialized_start = 37926 + _UPDATEACTIVITYOPTIONSRESPONSE._serialized_end = 38026 + _UPDATEACTIVITYEXECUTIONOPTIONSRESPONSE._serialized_start = 38028 + _UPDATEACTIVITYEXECUTIONOPTIONSRESPONSE._serialized_end = 38137 + _PAUSEACTIVITYREQUEST._serialized_start = 38140 + _PAUSEACTIVITYREQUEST._serialized_end = 38339 + _PAUSEACTIVITYEXECUTIONREQUEST._serialized_start = 38342 + _PAUSEACTIVITYEXECUTIONREQUEST._serialized_end = 38525 + _PAUSEACTIVITYRESPONSE._serialized_start = 38527 + _PAUSEACTIVITYRESPONSE._serialized_end = 38550 + _PAUSEACTIVITYEXECUTIONRESPONSE._serialized_start = 38552 + _PAUSEACTIVITYEXECUTIONRESPONSE._serialized_end = 38584 + _UNPAUSEACTIVITYREQUEST._serialized_start = 38587 + _UNPAUSEACTIVITYREQUEST._serialized_end = 38867 + _UNPAUSEACTIVITYEXECUTIONREQUEST._serialized_start = 38870 + _UNPAUSEACTIVITYEXECUTIONREQUEST._serialized_end = 39143 + _UNPAUSEACTIVITYRESPONSE._serialized_start = 39145 + _UNPAUSEACTIVITYRESPONSE._serialized_end = 39170 + _UNPAUSEACTIVITYEXECUTIONRESPONSE._serialized_start = 39172 + _UNPAUSEACTIVITYEXECUTIONRESPONSE._serialized_end = 39206 + _RESETACTIVITYREQUEST._serialized_start = 39209 + _RESETACTIVITYREQUEST._serialized_end = 39516 + _RESETACTIVITYEXECUTIONREQUEST._serialized_start = 39519 + _RESETACTIVITYEXECUTIONREQUEST._serialized_end = 39809 + _RESETACTIVITYRESPONSE._serialized_start = 39811 + _RESETACTIVITYRESPONSE._serialized_end = 39834 + _RESETACTIVITYEXECUTIONRESPONSE._serialized_start = 39836 + _RESETACTIVITYEXECUTIONRESPONSE._serialized_end = 39868 + _UPDATEWORKFLOWEXECUTIONOPTIONSREQUEST._serialized_start = 39871 + _UPDATEWORKFLOWEXECUTIONOPTIONSREQUEST._serialized_end = 40155 + _UPDATEWORKFLOWEXECUTIONOPTIONSRESPONSE._serialized_start = 40158 + _UPDATEWORKFLOWEXECUTIONOPTIONSRESPONSE._serialized_end = 40335 + _DESCRIBEDEPLOYMENTREQUEST._serialized_start = 40337 + _DESCRIBEDEPLOYMENTREQUEST._serialized_end = 40443 + _DESCRIBEDEPLOYMENTRESPONSE._serialized_start = 40445 + _DESCRIBEDEPLOYMENTRESPONSE._serialized_end = 40542 + _DESCRIBEWORKERDEPLOYMENTVERSIONREQUEST._serialized_start = 40545 + _DESCRIBEWORKERDEPLOYMENTVERSIONREQUEST._serialized_end = 40739 + _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_start = 40742 + _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_end = 41394 + _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE._serialized_start = 41003 + _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE._serialized_end = 41394 + _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE_STATSBYPRIORITYKEYENTRY._serialized_start = 24454 + _DESCRIBEWORKERDEPLOYMENTVERSIONRESPONSE_VERSIONTASKQUEUE_STATSBYPRIORITYKEYENTRY._serialized_end = 24554 + _DESCRIBEWORKERDEPLOYMENTREQUEST._serialized_start = 41396 + _DESCRIBEWORKERDEPLOYMENTREQUEST._serialized_end = 41473 + _DESCRIBEWORKERDEPLOYMENTRESPONSE._serialized_start = 41476 + _DESCRIBEWORKERDEPLOYMENTRESPONSE._serialized_end = 41616 + _LISTDEPLOYMENTSREQUEST._serialized_start = 41618 + _LISTDEPLOYMENTSREQUEST._serialized_end = 41726 + _LISTDEPLOYMENTSRESPONSE._serialized_start = 41728 + _LISTDEPLOYMENTSRESPONSE._serialized_end = 41847 + _SETCURRENTDEPLOYMENTREQUEST._serialized_start = 41850 + _SETCURRENTDEPLOYMENTREQUEST._serialized_end = 42055 + _SETCURRENTDEPLOYMENTRESPONSE._serialized_start = 42058 + _SETCURRENTDEPLOYMENTRESPONSE._serialized_end = 42243 + _SETWORKERDEPLOYMENTCURRENTVERSIONREQUEST._serialized_start = 42246 + _SETWORKERDEPLOYMENTCURRENTVERSIONREQUEST._serialized_end = 42475 + _SETWORKERDEPLOYMENTCURRENTVERSIONRESPONSE._serialized_start = 42478 + _SETWORKERDEPLOYMENTCURRENTVERSIONRESPONSE._serialized_end = 42669 + _SETWORKERDEPLOYMENTRAMPINGVERSIONREQUEST._serialized_start = 42672 + _SETWORKERDEPLOYMENTRAMPINGVERSIONREQUEST._serialized_end = 42921 + _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE._serialized_start = 42924 + _SETWORKERDEPLOYMENTRAMPINGVERSIONRESPONSE._serialized_end = 43148 + _CREATEWORKERDEPLOYMENTREQUEST._serialized_start = 43150 + _CREATEWORKERDEPLOYMENTREQUEST._serialized_end = 43263 + _CREATEWORKERDEPLOYMENTRESPONSE._serialized_start = 43265 + _CREATEWORKERDEPLOYMENTRESPONSE._serialized_end = 43321 + _LISTWORKERDEPLOYMENTSREQUEST._serialized_start = 43323 + _LISTWORKERDEPLOYMENTSREQUEST._serialized_end = 43416 + _LISTWORKERDEPLOYMENTSRESPONSE._serialized_start = 43419 + _LISTWORKERDEPLOYMENTSRESPONSE._serialized_end = 44090 + _LISTWORKERDEPLOYMENTSRESPONSE_WORKERDEPLOYMENTSUMMARY._serialized_start = 43594 + _LISTWORKERDEPLOYMENTSRESPONSE_WORKERDEPLOYMENTSUMMARY._serialized_end = 44090 + _CREATEWORKERDEPLOYMENTVERSIONREQUEST._serialized_start = 44093 + _CREATEWORKERDEPLOYMENTVERSIONREQUEST._serialized_end = 44333 + _CREATEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_start = 44335 + _CREATEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_end = 44374 + _DELETEWORKERDEPLOYMENTVERSIONREQUEST._serialized_start = 44377 + _DELETEWORKERDEPLOYMENTVERSIONREQUEST._serialized_end = 44577 + _DELETEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_start = 44579 + _DELETEWORKERDEPLOYMENTVERSIONRESPONSE._serialized_end = 44618 + _DELETEWORKERDEPLOYMENTREQUEST._serialized_start = 44620 + _DELETEWORKERDEPLOYMENTREQUEST._serialized_end = 44713 + _DELETEWORKERDEPLOYMENTRESPONSE._serialized_start = 44715 + _DELETEWORKERDEPLOYMENTRESPONSE._serialized_end = 44747 + _UPDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST._serialized_start = 44750 + _UPDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST._serialized_end = 45266 + _UPDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST_COMPUTECONFIGSCALINGGROUPSENTRY._serialized_start = 45143 + _UPDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST_COMPUTECONFIGSCALINGGROUPSENTRY._serialized_end = 45266 + _UPDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGRESPONSE._serialized_start = 45268 + _UPDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGRESPONSE._serialized_end = 45320 + _VALIDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST._serialized_start = 45323 + _VALIDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST._serialized_end = 45823 + _VALIDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST_COMPUTECONFIGSCALINGGROUPSENTRY._serialized_start = 45143 + _VALIDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGREQUEST_COMPUTECONFIGSCALINGGROUPSENTRY._serialized_end = 45266 + _VALIDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGRESPONSE._serialized_start = 45825 + _VALIDATEWORKERDEPLOYMENTVERSIONCOMPUTECONFIGRESPONSE._serialized_end = 45879 + _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST._serialized_start = 45882 + _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST._serialized_end = 46300 + _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST_UPSERTENTRIESENTRY._serialized_start = 46215 _UPDATEWORKERDEPLOYMENTVERSIONMETADATAREQUEST_UPSERTENTRIESENTRY._serialized_end = ( - 39526 + 46300 + ) + _UPDATEWORKERDEPLOYMENTVERSIONMETADATARESPONSE._serialized_start = 46302 + _UPDATEWORKERDEPLOYMENTVERSIONMETADATARESPONSE._serialized_end = 46412 + _SETWORKERDEPLOYMENTMANAGERREQUEST._serialized_start = 46415 + _SETWORKERDEPLOYMENTMANAGERREQUEST._serialized_end = 46604 + _SETWORKERDEPLOYMENTMANAGERRESPONSE._serialized_start = 46606 + _SETWORKERDEPLOYMENTMANAGERRESPONSE._serialized_end = 46705 + _GETCURRENTDEPLOYMENTREQUEST._serialized_start = 46707 + _GETCURRENTDEPLOYMENTREQUEST._serialized_end = 46776 + _GETCURRENTDEPLOYMENTRESPONSE._serialized_start = 46778 + _GETCURRENTDEPLOYMENTRESPONSE._serialized_end = 46885 + _GETDEPLOYMENTREACHABILITYREQUEST._serialized_start = 46887 + _GETDEPLOYMENTREACHABILITYREQUEST._serialized_end = 47000 + _GETDEPLOYMENTREACHABILITYRESPONSE._serialized_start = 47003 + _GETDEPLOYMENTREACHABILITYRESPONSE._serialized_end = 47230 + _CREATEWORKFLOWRULEREQUEST._serialized_start = 47233 + _CREATEWORKFLOWRULEREQUEST._serialized_end = 47413 + _CREATEWORKFLOWRULERESPONSE._serialized_start = 47415 + _CREATEWORKFLOWRULERESPONSE._serialized_end = 47510 + _DESCRIBEWORKFLOWRULEREQUEST._serialized_start = 47512 + _DESCRIBEWORKFLOWRULEREQUEST._serialized_end = 47577 + _DESCRIBEWORKFLOWRULERESPONSE._serialized_start = 47579 + _DESCRIBEWORKFLOWRULERESPONSE._serialized_end = 47660 + _DELETEWORKFLOWRULEREQUEST._serialized_start = 47662 + _DELETEWORKFLOWRULEREQUEST._serialized_end = 47725 + _DELETEWORKFLOWRULERESPONSE._serialized_start = 47727 + _DELETEWORKFLOWRULERESPONSE._serialized_end = 47755 + _LISTWORKFLOWRULESREQUEST._serialized_start = 47757 + _LISTWORKFLOWRULESREQUEST._serialized_end = 47827 + _LISTWORKFLOWRULESRESPONSE._serialized_start = 47829 + _LISTWORKFLOWRULESRESPONSE._serialized_end = 47933 + _TRIGGERWORKFLOWRULEREQUEST._serialized_start = 47936 + _TRIGGERWORKFLOWRULEREQUEST._serialized_end = 48142 + _TRIGGERWORKFLOWRULERESPONSE._serialized_start = 48144 + _TRIGGERWORKFLOWRULERESPONSE._serialized_end = 48190 + _RECORDWORKERHEARTBEATREQUEST._serialized_start = 48193 + _RECORDWORKERHEARTBEATREQUEST._serialized_end = 48348 + _RECORDWORKERHEARTBEATRESPONSE._serialized_start = 48350 + _RECORDWORKERHEARTBEATRESPONSE._serialized_end = 48381 + _LISTWORKERSREQUEST._serialized_start = 48384 + _LISTWORKERSREQUEST._serialized_end = 48514 + _LISTWORKERSRESPONSE._serialized_start = 48517 + _LISTWORKERSRESPONSE._serialized_end = 48682 + _UPDATETASKQUEUECONFIGREQUEST._serialized_start = 48685 + _UPDATETASKQUEUECONFIGREQUEST._serialized_end = 49410 + _UPDATETASKQUEUECONFIGREQUEST_RATELIMITUPDATE._serialized_start = 49252 + _UPDATETASKQUEUECONFIGREQUEST_RATELIMITUPDATE._serialized_end = 49343 + _UPDATETASKQUEUECONFIGREQUEST_SETFAIRNESSWEIGHTOVERRIDESENTRY._serialized_start = ( + 49345 + ) + _UPDATETASKQUEUECONFIGREQUEST_SETFAIRNESSWEIGHTOVERRIDESENTRY._serialized_end = ( + 49410 ) - _UPDATEWORKERDEPLOYMENTVERSIONMETADATARESPONSE._serialized_start = 39528 - _UPDATEWORKERDEPLOYMENTVERSIONMETADATARESPONSE._serialized_end = 39638 - _SETWORKERDEPLOYMENTMANAGERREQUEST._serialized_start = 39641 - _SETWORKERDEPLOYMENTMANAGERREQUEST._serialized_end = 39830 - _SETWORKERDEPLOYMENTMANAGERRESPONSE._serialized_start = 39832 - _SETWORKERDEPLOYMENTMANAGERRESPONSE._serialized_end = 39927 - _GETCURRENTDEPLOYMENTREQUEST._serialized_start = 39929 - _GETCURRENTDEPLOYMENTREQUEST._serialized_end = 39998 - _GETCURRENTDEPLOYMENTRESPONSE._serialized_start = 40000 - _GETCURRENTDEPLOYMENTRESPONSE._serialized_end = 40107 - _GETDEPLOYMENTREACHABILITYREQUEST._serialized_start = 40109 - _GETDEPLOYMENTREACHABILITYREQUEST._serialized_end = 40222 - _GETDEPLOYMENTREACHABILITYRESPONSE._serialized_start = 40225 - _GETDEPLOYMENTREACHABILITYRESPONSE._serialized_end = 40452 - _CREATEWORKFLOWRULEREQUEST._serialized_start = 40455 - _CREATEWORKFLOWRULEREQUEST._serialized_end = 40635 - _CREATEWORKFLOWRULERESPONSE._serialized_start = 40637 - _CREATEWORKFLOWRULERESPONSE._serialized_end = 40732 - _DESCRIBEWORKFLOWRULEREQUEST._serialized_start = 40734 - _DESCRIBEWORKFLOWRULEREQUEST._serialized_end = 40799 - _DESCRIBEWORKFLOWRULERESPONSE._serialized_start = 40801 - _DESCRIBEWORKFLOWRULERESPONSE._serialized_end = 40882 - _DELETEWORKFLOWRULEREQUEST._serialized_start = 40884 - _DELETEWORKFLOWRULEREQUEST._serialized_end = 40947 - _DELETEWORKFLOWRULERESPONSE._serialized_start = 40949 - _DELETEWORKFLOWRULERESPONSE._serialized_end = 40977 - _LISTWORKFLOWRULESREQUEST._serialized_start = 40979 - _LISTWORKFLOWRULESREQUEST._serialized_end = 41049 - _LISTWORKFLOWRULESRESPONSE._serialized_start = 41051 - _LISTWORKFLOWRULESRESPONSE._serialized_end = 41155 - _TRIGGERWORKFLOWRULEREQUEST._serialized_start = 41158 - _TRIGGERWORKFLOWRULEREQUEST._serialized_end = 41364 - _TRIGGERWORKFLOWRULERESPONSE._serialized_start = 41366 - _TRIGGERWORKFLOWRULERESPONSE._serialized_end = 41412 - _RECORDWORKERHEARTBEATREQUEST._serialized_start = 41415 - _RECORDWORKERHEARTBEATREQUEST._serialized_end = 41549 - _RECORDWORKERHEARTBEATRESPONSE._serialized_start = 41551 - _RECORDWORKERHEARTBEATRESPONSE._serialized_end = 41582 - _LISTWORKERSREQUEST._serialized_start = 41584 - _LISTWORKERSREQUEST._serialized_end = 41682 - _LISTWORKERSRESPONSE._serialized_start = 41684 - _LISTWORKERSRESPONSE._serialized_end = 41788 - _UPDATETASKQUEUECONFIGREQUEST._serialized_start = 41791 - _UPDATETASKQUEUECONFIGREQUEST._serialized_end = 42273 - _UPDATETASKQUEUECONFIGREQUEST_RATELIMITUPDATE._serialized_start = 42182 - _UPDATETASKQUEUECONFIGREQUEST_RATELIMITUPDATE._serialized_end = 42273 - _UPDATETASKQUEUECONFIGRESPONSE._serialized_start = 42275 - _UPDATETASKQUEUECONFIGRESPONSE._serialized_end = 42366 - _FETCHWORKERCONFIGREQUEST._serialized_start = 42369 - _FETCHWORKERCONFIGREQUEST._serialized_end = 42506 - _FETCHWORKERCONFIGRESPONSE._serialized_start = 42508 - _FETCHWORKERCONFIGRESPONSE._serialized_end = 42593 - _UPDATEWORKERCONFIGREQUEST._serialized_start = 42596 - _UPDATEWORKERCONFIGREQUEST._serialized_end = 42841 - _UPDATEWORKERCONFIGRESPONSE._serialized_start = 42843 - _UPDATEWORKERCONFIGRESPONSE._serialized_end = 42943 - _DESCRIBEWORKERREQUEST._serialized_start = 42945 - _DESCRIBEWORKERREQUEST._serialized_end = 43016 - _DESCRIBEWORKERRESPONSE._serialized_start = 43018 - _DESCRIBEWORKERRESPONSE._serialized_end = 43099 + _UPDATETASKQUEUECONFIGRESPONSE._serialized_start = 49412 + _UPDATETASKQUEUECONFIGRESPONSE._serialized_end = 49503 + _FETCHWORKERCONFIGREQUEST._serialized_start = 49506 + _FETCHWORKERCONFIGREQUEST._serialized_end = 49664 + _FETCHWORKERCONFIGRESPONSE._serialized_start = 49666 + _FETCHWORKERCONFIGRESPONSE._serialized_end = 49751 + _UPDATEWORKERCONFIGREQUEST._serialized_start = 49754 + _UPDATEWORKERCONFIGREQUEST._serialized_end = 50020 + _UPDATEWORKERCONFIGRESPONSE._serialized_start = 50022 + _UPDATEWORKERCONFIGRESPONSE._serialized_end = 50122 + _DESCRIBEWORKERREQUEST._serialized_start = 50124 + _DESCRIBEWORKERREQUEST._serialized_end = 50195 + _DESCRIBEWORKERRESPONSE._serialized_start = 50197 + _DESCRIBEWORKERRESPONSE._serialized_end = 50278 + _COUNTWORKERSREQUEST._serialized_start = 50280 + _COUNTWORKERSREQUEST._serialized_end = 50367 + _COUNTWORKERSRESPONSE._serialized_start = 50369 + _COUNTWORKERSRESPONSE._serialized_end = 50406 + _PAUSEWORKFLOWEXECUTIONREQUEST._serialized_start = 50409 + _PAUSEWORKFLOWEXECUTIONREQUEST._serialized_end = 50550 + _PAUSEWORKFLOWEXECUTIONRESPONSE._serialized_start = 50552 + _PAUSEWORKFLOWEXECUTIONRESPONSE._serialized_end = 50584 + _UNPAUSEWORKFLOWEXECUTIONREQUEST._serialized_start = 50587 + _UNPAUSEWORKFLOWEXECUTIONREQUEST._serialized_end = 50730 + _UNPAUSEWORKFLOWEXECUTIONRESPONSE._serialized_start = 50732 + _UNPAUSEWORKFLOWEXECUTIONRESPONSE._serialized_end = 50766 + _STARTACTIVITYEXECUTIONREQUEST._serialized_start = 50769 + _STARTACTIVITYEXECUTIONREQUEST._serialized_end = 52082 + _STARTACTIVITYEXECUTIONRESPONSE._serialized_start = 52085 + _STARTACTIVITYEXECUTIONRESPONSE._serialized_end = 52287 + _DESCRIBEACTIVITYEXECUTIONREQUEST._serialized_start = 52290 + _DESCRIBEACTIVITYEXECUTIONREQUEST._serialized_end = 52518 + _DESCRIBEACTIVITYEXECUTIONRESPONSE._serialized_start = 52521 + _DESCRIBEACTIVITYEXECUTIONRESPONSE._serialized_end = 52837 + _POLLACTIVITYEXECUTIONREQUEST._serialized_start = 52839 + _POLLACTIVITYEXECUTIONREQUEST._serialized_end = 52925 + _POLLACTIVITYEXECUTIONRESPONSE._serialized_start = 52928 + _POLLACTIVITYEXECUTIONRESPONSE._serialized_end = 53147 + _LISTACTIVITYEXECUTIONSREQUEST._serialized_start = 53149 + _LISTACTIVITYEXECUTIONSREQUEST._serialized_end = 53258 + _LISTACTIVITYEXECUTIONSRESPONSE._serialized_start = 53261 + _LISTACTIVITYEXECUTIONSRESPONSE._serialized_end = 53391 + _STARTNEXUSOPERATIONEXECUTIONREQUEST._serialized_start = 53394 + _STARTNEXUSOPERATIONEXECUTIONREQUEST._serialized_end = 54432 + _STARTNEXUSOPERATIONEXECUTIONREQUEST_NEXUSHEADERENTRY._serialized_start = 54382 + _STARTNEXUSOPERATIONEXECUTIONREQUEST_NEXUSHEADERENTRY._serialized_end = 54432 + _STARTNEXUSOPERATIONEXECUTIONRESPONSE._serialized_start = 54434 + _STARTNEXUSOPERATIONEXECUTIONRESPONSE._serialized_end = 54505 + _DESCRIBENEXUSOPERATIONEXECUTIONREQUEST._serialized_start = 54508 + _DESCRIBENEXUSOPERATIONEXECUTIONREQUEST._serialized_end = 54678 + _DESCRIBENEXUSOPERATIONEXECUTIONRESPONSE._serialized_start = 54681 + _DESCRIBENEXUSOPERATIONEXECUTIONRESPONSE._serialized_end = 55068 + _POLLNEXUSOPERATIONEXECUTIONREQUEST._serialized_start = 55071 + _POLLNEXUSOPERATIONEXECUTIONREQUEST._serialized_end = 55232 + _POLLNEXUSOPERATIONEXECUTIONRESPONSE._serialized_start = 55235 + _POLLNEXUSOPERATIONEXECUTIONRESPONSE._serialized_end = 55599 + _LISTNEXUSOPERATIONEXECUTIONSREQUEST._serialized_start = 55601 + _LISTNEXUSOPERATIONEXECUTIONSREQUEST._serialized_end = 55716 + _LISTNEXUSOPERATIONEXECUTIONSRESPONSE._serialized_start = 55719 + _LISTNEXUSOPERATIONEXECUTIONSRESPONSE._serialized_end = 55858 + _COUNTACTIVITYEXECUTIONSREQUEST._serialized_start = 55860 + _COUNTACTIVITYEXECUTIONSREQUEST._serialized_end = 55926 + _COUNTACTIVITYEXECUTIONSRESPONSE._serialized_start = 55929 + _COUNTACTIVITYEXECUTIONSRESPONSE._serialized_end = 56166 + _COUNTACTIVITYEXECUTIONSRESPONSE_AGGREGATIONGROUP._serialized_start = 20848 + _COUNTACTIVITYEXECUTIONSRESPONSE_AGGREGATIONGROUP._serialized_end = 20936 + _COUNTNEXUSOPERATIONEXECUTIONSREQUEST._serialized_start = 56168 + _COUNTNEXUSOPERATIONEXECUTIONSREQUEST._serialized_end = 56240 + _COUNTNEXUSOPERATIONEXECUTIONSRESPONSE._serialized_start = 56243 + _COUNTNEXUSOPERATIONEXECUTIONSRESPONSE._serialized_end = 56492 + _COUNTNEXUSOPERATIONEXECUTIONSRESPONSE_AGGREGATIONGROUP._serialized_start = 20848 + _COUNTNEXUSOPERATIONEXECUTIONSRESPONSE_AGGREGATIONGROUP._serialized_end = 20936 + _REQUESTCANCELACTIVITYEXECUTIONREQUEST._serialized_start = 56495 + _REQUESTCANCELACTIVITYEXECUTIONREQUEST._serialized_end = 56644 + _REQUESTCANCELACTIVITYEXECUTIONRESPONSE._serialized_start = 56646 + _REQUESTCANCELACTIVITYEXECUTIONRESPONSE._serialized_end = 56686 + _TERMINATEACTIVITYEXECUTIONREQUEST._serialized_start = 56689 + _TERMINATEACTIVITYEXECUTIONREQUEST._serialized_end = 56834 + _TERMINATEACTIVITYEXECUTIONRESPONSE._serialized_start = 56836 + _TERMINATEACTIVITYEXECUTIONRESPONSE._serialized_end = 56872 + _DELETEACTIVITYEXECUTIONREQUEST._serialized_start = 56874 + _DELETEACTIVITYEXECUTIONREQUEST._serialized_end = 56962 + _DELETEACTIVITYEXECUTIONRESPONSE._serialized_start = 56964 + _DELETEACTIVITYEXECUTIONRESPONSE._serialized_end = 56997 + _REQUESTCANCELNEXUSOPERATIONEXECUTIONREQUEST._serialized_start = 57000 + _REQUESTCANCELNEXUSOPERATIONEXECUTIONREQUEST._serialized_end = 57156 + _REQUESTCANCELNEXUSOPERATIONEXECUTIONRESPONSE._serialized_start = 57158 + _REQUESTCANCELNEXUSOPERATIONEXECUTIONRESPONSE._serialized_end = 57204 + _TERMINATENEXUSOPERATIONEXECUTIONREQUEST._serialized_start = 57207 + _TERMINATENEXUSOPERATIONEXECUTIONREQUEST._serialized_end = 57359 + _TERMINATENEXUSOPERATIONEXECUTIONRESPONSE._serialized_start = 57361 + _TERMINATENEXUSOPERATIONEXECUTIONRESPONSE._serialized_end = 57403 + _DELETENEXUSOPERATIONEXECUTIONREQUEST._serialized_start = 57405 + _DELETENEXUSOPERATIONEXECUTIONREQUEST._serialized_end = 57500 + _DELETENEXUSOPERATIONEXECUTIONRESPONSE._serialized_start = 57502 + _DELETENEXUSOPERATIONEXECUTIONRESPONSE._serialized_end = 57541 + _POLLWORKFLOWEXECUTIONTIMESKIPPINGREQUEST._serialized_start = 57544 + _POLLWORKFLOWEXECUTIONTIMESKIPPINGREQUEST._serialized_end = 57701 + _POLLWORKFLOWEXECUTIONTIMESKIPPINGRESPONSE._serialized_start = 57704 + _POLLWORKFLOWEXECUTIONTIMESKIPPINGRESPONSE._serialized_end = 57936 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/workflowservice/v1/request_response_pb2.pyi b/temporalio/api/workflowservice/v1/request_response_pb2.pyi index 0cb4e27108..4dd766505c 100644 --- a/temporalio/api/workflowservice/v1/request_response_pb2.pyi +++ b/temporalio/api/workflowservice/v1/request_response_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -18,15 +18,19 @@ import temporalio.api.activity.v1.message_pb2 import temporalio.api.batch.v1.message_pb2 import temporalio.api.command.v1.message_pb2 import temporalio.api.common.v1.message_pb2 +import temporalio.api.compute.v1.config_pb2 import temporalio.api.deployment.v1.message_pb2 +import temporalio.api.enums.v1.activity_pb2 import temporalio.api.enums.v1.batch_operation_pb2 import temporalio.api.enums.v1.common_pb2 import temporalio.api.enums.v1.deployment_pb2 import temporalio.api.enums.v1.failed_cause_pb2 import temporalio.api.enums.v1.namespace_pb2 +import temporalio.api.enums.v1.nexus_pb2 import temporalio.api.enums.v1.query_pb2 import temporalio.api.enums.v1.reset_pb2 import temporalio.api.enums.v1.task_queue_pb2 +import temporalio.api.enums.v1.time_skipping_pb2 import temporalio.api.enums.v1.update_pb2 import temporalio.api.enums.v1.workflow_pb2 import temporalio.api.failure.v1.message_pb2 @@ -34,6 +38,7 @@ import temporalio.api.filter.v1.message_pb2 import temporalio.api.history.v1.message_pb2 import temporalio.api.namespace.v1.message_pb2 import temporalio.api.nexus.v1.message_pb2 +import temporalio.api.nexusoperation.v1.message_pb2 import temporalio.api.protocol.v1.message_pb2 import temporalio.api.query.v1.message_pb2 import temporalio.api.replication.v1.message_pb2 @@ -48,16 +53,13 @@ import temporalio.api.version.v1.message_pb2 import temporalio.api.worker.v1.message_pb2 import temporalio.api.workflow.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class RegisterNamespaceRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class DataEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -72,8 +74,7 @@ class RegisterNamespaceRequest(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... NAMESPACE_FIELD_NUMBER: builtins.int @@ -92,6 +93,19 @@ class RegisterNamespaceRequest(google.protobuf.message.Message): namespace: builtins.str description: builtins.str owner_email: builtins.str + active_cluster_name: builtins.str + security_token: builtins.str + is_global_namespace: builtins.bool + history_archival_state: ( + temporalio.api.enums.v1.namespace_pb2.ArchivalState.ValueType + ) + """If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.""" + history_archival_uri: builtins.str + visibility_archival_state: ( + temporalio.api.enums.v1.namespace_pb2.ArchivalState.ValueType + ) + """If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.""" + visibility_archival_uri: builtins.str @property def workflow_execution_retention_period( self, @@ -102,24 +116,12 @@ class RegisterNamespaceRequest(google.protobuf.message.Message): ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.replication.v1.message_pb2.ClusterReplicationConfig ]: ... - active_cluster_name: builtins.str @property def data( self, ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: """A key-value map for any customized purpose.""" - security_token: builtins.str - is_global_namespace: builtins.bool - history_archival_state: ( - temporalio.api.enums.v1.namespace_pb2.ArchivalState.ValueType - ) - """If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.""" - history_archival_uri: builtins.str - visibility_archival_state: ( - temporalio.api.enums.v1.namespace_pb2.ArchivalState.ValueType - ) - """If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.""" - visibility_archival_uri: builtins.str + def __init__( self, *, @@ -143,14 +145,14 @@ class RegisterNamespaceRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "workflow_execution_retention_period", b"workflow_execution_retention_period", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "active_cluster_name", b"active_cluster_name", "clusters", @@ -182,6 +184,7 @@ class RegisterNamespaceRequest(google.protobuf.message.Message): global___RegisterNamespaceRequest = RegisterNamespaceRequest +@typing.final class RegisterNamespaceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -191,6 +194,7 @@ class RegisterNamespaceResponse(google.protobuf.message.Message): global___RegisterNamespaceResponse = RegisterNamespaceResponse +@typing.final class ListNamespacesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -212,12 +216,11 @@ class ListNamespacesRequest(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["namespace_filter", b"namespace_filter"], + self, field_name: typing.Literal["namespace_filter", b"namespace_filter"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace_filter", b"namespace_filter", "next_page_token", @@ -229,18 +232,19 @@ class ListNamespacesRequest(google.protobuf.message.Message): global___ListNamespacesRequest = ListNamespacesRequest +@typing.final class ListNamespacesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMESPACES_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def namespaces( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ global___DescribeNamespaceResponse ]: ... - next_page_token: builtins.bytes def __init__( self, *, @@ -250,33 +254,50 @@ class ListNamespacesResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespaces", b"namespaces", "next_page_token", b"next_page_token" ], ) -> None: ... global___ListNamespacesResponse = ListNamespacesResponse +@typing.final class DescribeNamespaceRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMESPACE_FIELD_NUMBER: builtins.int ID_FIELD_NUMBER: builtins.int + WEAK_CONSISTENCY_FIELD_NUMBER: builtins.int namespace: builtins.str id: builtins.str + weak_consistency: builtins.bool + """If true, the server may serve the response from an eventually-consistent + source instead of reading through to persistence. Defaults to false, + which preserves read-after-write consistency. SDKs should set this when + fetching namespace capabilities on worker/client startup. + """ def __init__( self, *, namespace: builtins.str = ..., id: builtins.str = ..., + weak_consistency: builtins.bool = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal["id", b"id", "namespace", b"namespace"], + field_name: typing.Literal[ + "id", + b"id", + "namespace", + b"namespace", + "weak_consistency", + b"weak_consistency", + ], ) -> None: ... global___DescribeNamespaceRequest = DescribeNamespaceRequest +@typing.final class DescribeNamespaceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -286,6 +307,10 @@ class DescribeNamespaceResponse(google.protobuf.message.Message): FAILOVER_VERSION_FIELD_NUMBER: builtins.int IS_GLOBAL_NAMESPACE_FIELD_NUMBER: builtins.int FAILOVER_HISTORY_FIELD_NUMBER: builtins.int + POLLER_GROUP_INFOS_FIELD_NUMBER: builtins.int + POLLER_GROUPS_INFO_FIELD_NUMBER: builtins.int + failover_version: builtins.int + is_global_namespace: builtins.bool @property def namespace_info( self, @@ -296,8 +321,6 @@ class DescribeNamespaceResponse(google.protobuf.message.Message): def replication_config( self, ) -> temporalio.api.replication.v1.message_pb2.NamespaceReplicationConfig: ... - failover_version: builtins.int - is_global_namespace: builtins.bool @property def failover_history( self, @@ -307,6 +330,29 @@ class DescribeNamespaceResponse(google.protobuf.message.Message): """Contains the historical state of failover_versions for the cluster, truncated to contain only the last N states to ensure that the list does not grow unbounded. """ + + @property + def poller_group_infos( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.taskqueue.v1.message_pb2.PollerGroupInfo + ]: + """Deprecated. Use `poller_groups_info` instead, which carries a version so the client can + ignore stale updates. + The initial info that client should use for poller group assignment. This information is + updated through poll response. Client is supposed to use the info received in the latest + poll response. + """ + + @property + def poller_groups_info( + self, + ) -> temporalio.api.taskqueue.v1.message_pb2.PollerGroupsInfo: + """The initial, versioned info that client should use for poller group assignment. This + information is updated through poll responses. Client is supposed to use the info with the + highest version it has received. + """ + def __init__( self, *, @@ -321,21 +367,29 @@ class DescribeNamespaceResponse(google.protobuf.message.Message): temporalio.api.replication.v1.message_pb2.FailoverStatus ] | None = ..., + poller_group_infos: collections.abc.Iterable[ + temporalio.api.taskqueue.v1.message_pb2.PollerGroupInfo + ] + | None = ..., + poller_groups_info: temporalio.api.taskqueue.v1.message_pb2.PollerGroupsInfo + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "config", b"config", "namespace_info", b"namespace_info", + "poller_groups_info", + b"poller_groups_info", "replication_config", b"replication_config", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "config", b"config", "failover_history", @@ -346,6 +400,10 @@ class DescribeNamespaceResponse(google.protobuf.message.Message): b"is_global_namespace", "namespace_info", b"namespace_info", + "poller_group_infos", + b"poller_group_infos", + "poller_groups_info", + b"poller_groups_info", "replication_config", b"replication_config", ], @@ -353,6 +411,7 @@ class DescribeNamespaceResponse(google.protobuf.message.Message): global___DescribeNamespaceResponse = DescribeNamespaceResponse +@typing.final class UpdateNamespaceRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -364,6 +423,10 @@ class UpdateNamespaceRequest(google.protobuf.message.Message): DELETE_BAD_BINARY_FIELD_NUMBER: builtins.int PROMOTE_NAMESPACE_FIELD_NUMBER: builtins.int namespace: builtins.str + security_token: builtins.str + delete_bad_binary: builtins.str + promote_namespace: builtins.bool + """promote local namespace to global namespace. Ignored if namespace is already global namespace.""" @property def update_info( self, @@ -374,10 +437,6 @@ class UpdateNamespaceRequest(google.protobuf.message.Message): def replication_config( self, ) -> temporalio.api.replication.v1.message_pb2.NamespaceReplicationConfig: ... - security_token: builtins.str - delete_bad_binary: builtins.str - promote_namespace: builtins.bool - """promote local namespace to global namespace. Ignored if namespace is already global namespace.""" def __init__( self, *, @@ -393,7 +452,7 @@ class UpdateNamespaceRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "config", b"config", "replication_config", @@ -404,7 +463,7 @@ class UpdateNamespaceRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "config", b"config", "delete_bad_binary", @@ -424,6 +483,7 @@ class UpdateNamespaceRequest(google.protobuf.message.Message): global___UpdateNamespaceRequest = UpdateNamespaceRequest +@typing.final class UpdateNamespaceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -432,6 +492,8 @@ class UpdateNamespaceResponse(google.protobuf.message.Message): REPLICATION_CONFIG_FIELD_NUMBER: builtins.int FAILOVER_VERSION_FIELD_NUMBER: builtins.int IS_GLOBAL_NAMESPACE_FIELD_NUMBER: builtins.int + failover_version: builtins.int + is_global_namespace: builtins.bool @property def namespace_info( self, @@ -442,8 +504,6 @@ class UpdateNamespaceResponse(google.protobuf.message.Message): def replication_config( self, ) -> temporalio.api.replication.v1.message_pb2.NamespaceReplicationConfig: ... - failover_version: builtins.int - is_global_namespace: builtins.bool def __init__( self, *, @@ -457,7 +517,7 @@ class UpdateNamespaceResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "config", b"config", "namespace_info", @@ -468,7 +528,7 @@ class UpdateNamespaceResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "config", b"config", "failover_version", @@ -484,6 +544,7 @@ class UpdateNamespaceResponse(google.protobuf.message.Message): global___UpdateNamespaceResponse = UpdateNamespaceResponse +@typing.final class DeprecateNamespaceRequest(google.protobuf.message.Message): """Deprecated.""" @@ -501,13 +562,14 @@ class DeprecateNamespaceRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "security_token", b"security_token" ], ) -> None: ... global___DeprecateNamespaceRequest = DeprecateNamespaceRequest +@typing.final class DeprecateNamespaceResponse(google.protobuf.message.Message): """Deprecated.""" @@ -519,6 +581,7 @@ class DeprecateNamespaceResponse(google.protobuf.message.Message): global___DeprecateNamespaceResponse = DeprecateNamespaceResponse +@typing.final class StartWorkflowExecutionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -550,24 +613,11 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): ON_CONFLICT_OPTIONS_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int EAGER_WORKER_DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int + TIME_SKIPPING_CONFIG_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int + TIME_SKIPPING_STATE_PROPAGATION_FIELD_NUMBER: builtins.int namespace: builtins.str workflow_id: builtins.str - @property - def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... - @property - def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ... - @property - def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Serialized arguments to the workflow. These are passed as arguments to the workflow function.""" - @property - def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: - """Total workflow execution timeout including retries and continue as new.""" - @property - def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: - """Timeout of a single workflow run.""" - @property - def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: - """Timeout of a single workflow task.""" identity: builtins.str """The identity of the client who initiated this request""" request_id: builtins.str @@ -588,11 +638,38 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. """ + cron_schedule: builtins.str + """See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/""" + request_eager_execution: builtins.bool + """Request to get the first workflow task inline in the response bypassing matching service and worker polling. + If set to `true` the caller is expected to have a worker available and capable of processing the task. + The returned task will be marked as started and is expected to be completed by the specified + `workflow_task_timeout`. + """ + @property + def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... + @property + def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ... + @property + def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized arguments to the workflow. These are passed as arguments to the workflow function.""" + + @property + def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Total workflow execution timeout including retries and continue as new.""" + + @property + def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Timeout of a single workflow run.""" + + @property + def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Timeout of a single workflow task.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.""" - cron_schedule: builtins.str - """See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/""" + @property def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: ... @property @@ -601,12 +678,6 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ... @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... - request_eager_execution: builtins.bool - """Request to get the first workflow task inline in the response bypassing matching service and worker polling. - If set to `true` the caller is expected to have a worker available and capable of processing the task. - The returned task will be marked as started and is expected to be completed by the specified - `workflow_task_timeout`. - """ @property def continued_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """These values will be available as ContinuedFailure and LastCompletionResult in the @@ -614,16 +685,18 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): server itself (for the schedules feature) and are not intended to be exposed in StartWorkflowExecution. """ + @property def last_completion_result( self, ) -> temporalio.api.common.v1.message_pb2.Payloads: ... @property def workflow_start_delay(self) -> google.protobuf.duration_pb2.Duration: - """Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. - If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest + """Time to wait before making the first workflow task available for dispatch. Cannot be used with `cron_schedule`. + If the workflow gets a signal before the delay, a workflow task will be made available for dispatch and the rest of the delay will be ignored. """ + @property def completion_callbacks( self, @@ -634,12 +707,14 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): If the workflow continues-as-new, these callbacks will be carried over to the new execution. Callback addresses must be whitelisted in the server's dynamic configuration. """ + @property def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata: """Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo for use by user interfaces to display the fixed as-of-start summary and details of the workflow. """ + @property def links( self, @@ -647,6 +722,7 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Link ]: """Links to be associated with the workflow.""" + @property def versioning_override( self, @@ -654,6 +730,7 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): """If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. """ + @property def on_conflict_options( self, @@ -663,14 +740,38 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): empty object (ie., all options with default value), it won't do anything to the existing running workflow. If set, it will add a history event to the running workflow. """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata""" + @property def eager_worker_deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`.""" + + @property + def time_skipping_config( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingConfig: + """Time-skipping configuration. If not set, time skipping is disabled.""" + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this workflow.""" + + @property + def time_skipping_state_propagation( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingStatePropagation: + """Time-skipping state propagated by the execution that started this workflow. + This field is intended for use by the Temporal server, for example when a schedule + starts a workflow, and is not intended to be set by external clients. + """ + def __init__( self, *, @@ -712,10 +813,16 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., eager_worker_deployment_options: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions | None = ..., + time_skipping_config: temporalio.api.common.v1.message_pb2.TimeSkippingConfig + | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., + time_skipping_state_propagation: temporalio.api.common.v1.message_pb2.TimeSkippingStatePropagation + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "continued_failure", b"continued_failure", "eager_worker_deployment_options", @@ -732,12 +839,18 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): b"on_conflict_options", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "retry_policy", b"retry_policy", "search_attributes", b"search_attributes", "task_queue", b"task_queue", + "time_skipping_config", + b"time_skipping_config", + "time_skipping_state_propagation", + b"time_skipping_state_propagation", "user_metadata", b"user_metadata", "versioning_override", @@ -756,7 +869,7 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "completion_callbacks", b"completion_callbacks", "continued_failure", @@ -783,6 +896,8 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): b"on_conflict_options", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "request_eager_execution", b"request_eager_execution", "request_id", @@ -793,6 +908,10 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): b"search_attributes", "task_queue", b"task_queue", + "time_skipping_config", + b"time_skipping_config", + "time_skipping_state_propagation", + b"time_skipping_state_propagation", "user_metadata", b"user_metadata", "versioning_override", @@ -818,16 +937,20 @@ class StartWorkflowExecutionRequest(google.protobuf.message.Message): global___StartWorkflowExecutionRequest = StartWorkflowExecutionRequest +@typing.final class StartWorkflowExecutionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor RUN_ID_FIELD_NUMBER: builtins.int + FIRST_EXECUTION_RUN_ID_FIELD_NUMBER: builtins.int STARTED_FIELD_NUMBER: builtins.int STATUS_FIELD_NUMBER: builtins.int EAGER_WORKFLOW_TASK_FIELD_NUMBER: builtins.int LINK_FIELD_NUMBER: builtins.int run_id: builtins.str """The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING).""" + first_execution_run_id: builtins.str + """If the workflow was started as a result of a de-dupe, this field will contain the run id of the first execution in the chain.""" started: builtins.bool """If true, a new workflow was started.""" status: temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType @@ -840,13 +963,16 @@ class StartWorkflowExecutionResponse(google.protobuf.message.Message): return the first workflow task to be eagerly executed. The caller is expected to have a worker available to process the task. """ + @property def link(self) -> temporalio.api.common.v1.message_pb2.Link: """Link to the workflow event.""" + def __init__( self, *, run_id: builtins.str = ..., + first_execution_run_id: builtins.str = ..., started: builtins.bool = ..., status: temporalio.api.enums.v1.workflow_pb2.WorkflowExecutionStatus.ValueType = ..., eager_workflow_task: global___PollWorkflowTaskQueueResponse | None = ..., @@ -854,15 +980,17 @@ class StartWorkflowExecutionResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "eager_workflow_task", b"eager_workflow_task", "link", b"link" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "eager_workflow_task", b"eager_workflow_task", + "first_execution_run_id", + b"first_execution_run_id", "link", b"link", "run_id", @@ -876,6 +1004,7 @@ class StartWorkflowExecutionResponse(google.protobuf.message.Message): global___StartWorkflowExecutionResponse = StartWorkflowExecutionResponse +@typing.final class GetWorkflowExecutionHistoryRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -887,8 +1016,6 @@ class GetWorkflowExecutionHistoryRequest(google.protobuf.message.Message): HISTORY_EVENT_FILTER_TYPE_FIELD_NUMBER: builtins.int SKIP_ARCHIVAL_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... maximum_page_size: builtins.int next_page_token: builtins.bytes """If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of @@ -905,6 +1032,8 @@ class GetWorkflowExecutionHistoryRequest(google.protobuf.message.Message): Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT. """ skip_archival: builtins.bool + @property + def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... def __init__( self, *, @@ -917,11 +1046,11 @@ class GetWorkflowExecutionHistoryRequest(google.protobuf.message.Message): skip_archival: builtins.bool = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["execution", b"execution"] + self, field_name: typing.Literal["execution", b"execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution", b"execution", "history_event_filter_type", @@ -941,6 +1070,7 @@ class GetWorkflowExecutionHistoryRequest(google.protobuf.message.Message): global___GetWorkflowExecutionHistoryRequest = GetWorkflowExecutionHistoryRequest +@typing.final class GetWorkflowExecutionHistoryResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -948,6 +1078,10 @@ class GetWorkflowExecutionHistoryResponse(google.protobuf.message.Message): RAW_HISTORY_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int ARCHIVED_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes + """Will be set if there are more history events than were included in this response""" + archived: builtins.bool @property def history(self) -> temporalio.api.history.v1.message_pb2.History: ... @property @@ -959,9 +1093,16 @@ class GetWorkflowExecutionHistoryResponse(google.protobuf.message.Message): """Raw history is an alternate representation of history that may be returned if configured on the frontend. This is not supported by all SDKs. Either this or `history` will be set. """ - next_page_token: builtins.bytes - """Will be set if there are more history events than were included in this response""" - archived: builtins.bool + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this run. + Returned on the initial request (without next_page_token) when present. Clients should + retain it across paginated responses, which may omit it. + """ + def __init__( self, *, @@ -972,19 +1113,29 @@ class GetWorkflowExecutionHistoryResponse(google.protobuf.message.Message): | None = ..., next_page_token: builtins.bytes = ..., archived: builtins.bool = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["history", b"history"] + self, + field_name: typing.Literal[ + "history", + b"history", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "archived", b"archived", "history", b"history", "next_page_token", b"next_page_token", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "raw_history", b"raw_history", ], @@ -992,6 +1143,7 @@ class GetWorkflowExecutionHistoryResponse(google.protobuf.message.Message): global___GetWorkflowExecutionHistoryResponse = GetWorkflowExecutionHistoryResponse +@typing.final class GetWorkflowExecutionHistoryReverseRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1000,10 +1152,10 @@ class GetWorkflowExecutionHistoryReverseRequest(google.protobuf.message.Message) MAXIMUM_PAGE_SIZE_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... maximum_page_size: builtins.int next_page_token: builtins.bytes + @property + def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... def __init__( self, *, @@ -1013,11 +1165,11 @@ class GetWorkflowExecutionHistoryReverseRequest(google.protobuf.message.Message) next_page_token: builtins.bytes = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["execution", b"execution"] + self, field_name: typing.Literal["execution", b"execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution", b"execution", "maximum_page_size", @@ -1033,15 +1185,16 @@ global___GetWorkflowExecutionHistoryReverseRequest = ( GetWorkflowExecutionHistoryReverseRequest ) +@typing.final class GetWorkflowExecutionHistoryReverseResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor HISTORY_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int - @property - def history(self) -> temporalio.api.history.v1.message_pb2.History: ... next_page_token: builtins.bytes """Will be set if there are more history events than were included in this response""" + @property + def history(self) -> temporalio.api.history.v1.message_pb2.History: ... def __init__( self, *, @@ -1049,11 +1202,11 @@ class GetWorkflowExecutionHistoryReverseResponse(google.protobuf.message.Message next_page_token: builtins.bytes = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["history", b"history"] + self, field_name: typing.Literal["history", b"history"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "history", b"history", "next_page_token", b"next_page_token" ], ) -> None: ... @@ -1062,27 +1215,45 @@ global___GetWorkflowExecutionHistoryReverseResponse = ( GetWorkflowExecutionHistoryReverseResponse ) +@typing.final class PollWorkflowTaskQueueRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMESPACE_FIELD_NUMBER: builtins.int TASK_QUEUE_FIELD_NUMBER: builtins.int + POLLER_GROUP_ID_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int + WORKER_INSTANCE_KEY_FIELD_NUMBER: builtins.int + WORKER_CONTROL_TASK_QUEUE_FIELD_NUMBER: builtins.int BINARY_CHECKSUM_FIELD_NUMBER: builtins.int WORKER_VERSION_CAPABILITIES_FIELD_NUMBER: builtins.int DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int - WORKER_HEARTBEAT_FIELD_NUMBER: builtins.int + POLLER_POOL_INFO_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ... + poller_group_id: builtins.str + """Unless this is the first poll, the client must pass one of the poller group IDs received in + `poller_group_infos` of the last the PollWorkflowTaskQueueResponse according to the + instructions. If not set, the poll is routed randomly which can cause it to be blocked + without receiving a task while the queue actually has tasks in another server location. + """ identity: builtins.str """The identity of the worker/client who is polling this task queue""" + worker_instance_key: builtins.str + """A unique key for this worker instance, used for tracking worker lifecycle. + This is guaranteed to be unique, whereas identity is not guaranteed to be unique. + """ + worker_control_task_queue: builtins.str + """A dedicated per-worker Nexus task queue on which the server sends control + tasks (e.g. activity cancellation) to this specific worker instance. + """ binary_checksum: builtins.str """Deprecated. Use deployment_options instead. Each worker process should provide an ID unique to the specific set of code it is running "checksum" in this field name isn't very accurate, it should be though of as an id. """ @property + def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ... + @property def worker_version_capabilities( self, ) -> temporalio.api.common.v1.message_pb2.WorkerVersionCapabilities: @@ -1090,46 +1261,54 @@ class PollWorkflowTaskQueueRequest(google.protobuf.message.Message): Information about this worker's build identifier and if it is choosing to use the versioning feature. See the `WorkerVersionCapabilities` docstring for more. """ + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: - """Worker deployment options that user has set in the worker. - Experimental. Worker Deployments are experimental and might significantly change in the future. - """ + """Worker deployment options that user has set in the worker.""" + @property - def worker_heartbeat(self) -> temporalio.api.worker.v1.message_pb2.WorkerHeartbeat: - """Worker info to be sent to the server.""" + def poller_pool_info( + self, + ) -> temporalio.api.taskqueue.v1.message_pb2.PollerPoolInfo: + """Worker-reported poller pool state, used to spread poller scaling suggestions across + a fleet. Optional. + """ + def __init__( self, *, namespace: builtins.str = ..., task_queue: temporalio.api.taskqueue.v1.message_pb2.TaskQueue | None = ..., + poller_group_id: builtins.str = ..., identity: builtins.str = ..., + worker_instance_key: builtins.str = ..., + worker_control_task_queue: builtins.str = ..., binary_checksum: builtins.str = ..., worker_version_capabilities: temporalio.api.common.v1.message_pb2.WorkerVersionCapabilities | None = ..., deployment_options: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions | None = ..., - worker_heartbeat: temporalio.api.worker.v1.message_pb2.WorkerHeartbeat + poller_pool_info: temporalio.api.taskqueue.v1.message_pb2.PollerPoolInfo | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_options", b"deployment_options", + "poller_pool_info", + b"poller_pool_info", "task_queue", b"task_queue", - "worker_heartbeat", - b"worker_heartbeat", "worker_version_capabilities", b"worker_version_capabilities", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "binary_checksum", b"binary_checksum", "deployment_options", @@ -1138,10 +1317,16 @@ class PollWorkflowTaskQueueRequest(google.protobuf.message.Message): b"identity", "namespace", b"namespace", + "poller_group_id", + b"poller_group_id", + "poller_pool_info", + b"poller_pool_info", "task_queue", b"task_queue", - "worker_heartbeat", - b"worker_heartbeat", + "worker_control_task_queue", + b"worker_control_task_queue", + "worker_instance_key", + b"worker_instance_key", "worker_version_capabilities", b"worker_version_capabilities", ], @@ -1149,9 +1334,11 @@ class PollWorkflowTaskQueueRequest(google.protobuf.message.Message): global___PollWorkflowTaskQueueRequest = PollWorkflowTaskQueueRequest +@typing.final class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class QueriesEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1167,11 +1354,10 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): value: temporalio.api.query.v1.message_pb2.WorkflowQuery | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... TASK_TOKEN_FIELD_NUMBER: builtins.int @@ -1190,14 +1376,11 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): QUERIES_FIELD_NUMBER: builtins.int MESSAGES_FIELD_NUMBER: builtins.int POLLER_SCALING_DECISION_FIELD_NUMBER: builtins.int + POLLER_GROUP_ID_FIELD_NUMBER: builtins.int + POLLER_GROUP_INFOS_FIELD_NUMBER: builtins.int + POLLER_GROUPS_INFO_FIELD_NUMBER: builtins.int task_token: builtins.bytes """A unique identifier for this task""" - @property - def workflow_execution( - self, - ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... - @property - def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... previous_started_event_id: builtins.int """The last workflow task started event which was processed by some worker for this execution. Will be zero if no task has ever started. @@ -1222,16 +1405,27 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): overall backlog. Subsequent RPCs may not hit the same partition as this call. """ + next_page_token: builtins.bytes + """Will be set if there are more history events than were included in this response. Such events + should be fetched via `GetWorkflowExecutionHistory`. + """ + poller_group_id: builtins.str + """This poller group ID identifies the owner of the workflow task awaiting for query response. + Corresponding RespondQueryTaskCompleted should pass this value for proper routing. + """ + @property + def workflow_execution( + self, + ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... + @property + def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... @property def history(self) -> temporalio.api.history.v1.message_pb2.History: """The history for this workflow, which will either be complete or partial. Partial histories are sent to workers who have signaled that they are using a sticky queue when completing a workflow task. """ - next_page_token: builtins.bytes - """Will be set if there are more history events than were included in this response. Such events - should be fetched via `GetWorkflowExecutionHistory`. - """ + @property def query(self) -> temporalio.api.query.v1.message_pb2.WorkflowQuery: """Legacy queries appear in this field. The query must be responded to via @@ -1239,6 +1433,7 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): closed workflows) then the `history` field will be populated with the entire history. It may also be populated if this task originates on a non-sticky queue. """ + @property def workflow_execution_task_queue( self, @@ -1246,12 +1441,15 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): """The task queue this task originated from, which will always be the original non-sticky name for the queue, even if this response came from polling a sticky queue. """ + @property def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When this task was scheduled by the server""" + @property def started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When the current workflow task started event was generated, meaning the current attempt.""" + @property def queries( self, @@ -1261,6 +1459,7 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): """Queries that should be executed after applying the history in this task. Responses should be attached to `RespondWorkflowTaskCompletedRequest::query_results` """ + @property def messages( self, @@ -1268,11 +1467,42 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): temporalio.api.protocol.v1.message_pb2.Message ]: """Protocol messages piggybacking on a WFT as a transport""" + @property def poller_scaling_decision( self, ) -> temporalio.api.taskqueue.v1.message_pb2.PollerScalingDecision: """Server-advised information the SDK may use to adjust its poller count.""" + + @property + def poller_group_infos( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.taskqueue.v1.message_pb2.PollerGroupInfo + ]: + """Deprecated. Use `poller_groups_info` instead, which carries a version so the client can + ignore stale updates. + The weighted list of poller groups IDs that client should use for future polls to this task + queue. Client is expected to: + 1. Maintain minimum number of pollers no less than the number of groups. + 2. Try to assign the next poll to a group without any pending polls, + 3. If every group has some pending polls, assign the next poll to a group randomly + according to the weights. + """ + + @property + def poller_groups_info( + self, + ) -> temporalio.api.taskqueue.v1.message_pb2.PollerGroupsInfo: + """The weighted, versioned list of poller groups IDs that client should use for future polls to + this task queue. Client should ignore this if it has already applied a snapshot with a + version greater than or equal to `poller_groups_info.version`. Client is expected to: + 1. Maintain minimum number of pollers no less than the number of groups. + 2. Try to assign the next poll to a group without any pending polls, + 3. If every group has some pending polls, assign the next poll to a group randomly + according to the weights. + """ + def __init__( self, *, @@ -1301,12 +1531,21 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): | None = ..., poller_scaling_decision: temporalio.api.taskqueue.v1.message_pb2.PollerScalingDecision | None = ..., + poller_group_id: builtins.str = ..., + poller_group_infos: collections.abc.Iterable[ + temporalio.api.taskqueue.v1.message_pb2.PollerGroupInfo + ] + | None = ..., + poller_groups_info: temporalio.api.taskqueue.v1.message_pb2.PollerGroupsInfo + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "history", b"history", + "poller_groups_info", + b"poller_groups_info", "poller_scaling_decision", b"poller_scaling_decision", "query", @@ -1325,7 +1564,7 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attempt", b"attempt", "backlog_count_hint", @@ -1336,6 +1575,12 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): b"messages", "next_page_token", b"next_page_token", + "poller_group_id", + b"poller_group_id", + "poller_group_infos", + b"poller_group_infos", + "poller_groups_info", + b"poller_groups_info", "poller_scaling_decision", b"poller_scaling_decision", "previous_started_event_id", @@ -1363,9 +1608,11 @@ class PollWorkflowTaskQueueResponse(google.protobuf.message.Message): global___PollWorkflowTaskQueueResponse = PollWorkflowTaskQueueResponse +@typing.final class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class QueryResultsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1381,13 +1628,13 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): value: temporalio.api.query.v1.message_pb2.WorkflowQueryResult | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class Capabilities(google.protobuf.message.Message): """SDK capability details.""" @@ -1409,7 +1656,7 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "discard_speculative_workflow_task_with_events", b"discard_speculative_workflow_task_with_events", ], @@ -1424,6 +1671,7 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): BINARY_CHECKSUM_FIELD_NUMBER: builtins.int QUERY_RESULTS_FIELD_NUMBER: builtins.int NAMESPACE_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int WORKER_VERSION_STAMP_FIELD_NUMBER: builtins.int MESSAGES_FIELD_NUMBER: builtins.int SDK_METADATA_FIELD_NUMBER: builtins.int @@ -1432,24 +1680,14 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): DEPLOYMENT_FIELD_NUMBER: builtins.int VERSIONING_BEHAVIOR_FIELD_NUMBER: builtins.int DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int + WORKER_INSTANCE_KEY_FIELD_NUMBER: builtins.int + WORKER_CONTROL_TASK_QUEUE_FIELD_NUMBER: builtins.int + PAGE_NUMBER_FIELD_NUMBER: builtins.int + INTERMEDIATE_PAGE_FIELD_NUMBER: builtins.int task_token: builtins.bytes """The task token as received in `PollWorkflowTaskQueueResponse`""" - @property - def commands( - self, - ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ - temporalio.api.command.v1.message_pb2.Command - ]: - """A list of commands generated when driving the workflow code in response to the new task""" identity: builtins.str """The identity of the worker/client""" - @property - def sticky_attributes( - self, - ) -> temporalio.api.taskqueue.v1.message_pb2.StickyExecutionAttributes: - """May be set by workers to indicate that the worker desires future tasks to be provided with - incremental history on a sticky queue. - """ return_new_workflow_task: builtins.bool """If set, the worker wishes to immediately receive the next workflow task as a response to this completion. This can save on polling round-trips. @@ -1464,6 +1702,49 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): """Deprecated. Use `deployment_options` instead. Worker process' unique binary id """ + namespace: builtins.str + resource_id: builtins.str + """Resource ID for routing. Contains the workflow ID from the original task.""" + versioning_behavior: ( + temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType + ) + """Versioning behavior of this workflow execution as set on the worker that completed this task. + UNSPECIFIED means versioning is not enabled in the worker. + """ + worker_instance_key: builtins.str + """A unique key for this worker instance, used for tracking worker lifecycle. + This is guaranteed to be unique, whereas identity is not guaranteed to be unique. + """ + worker_control_task_queue: builtins.str + """A dedicated per-worker Nexus task queue on which the server sends control + tasks (e.g. activity cancellation) to this specific worker instance. + """ + page_number: builtins.int + """0-indexed page number when the workflow task completion is split across multiple + requests ("pages"). 0 for single-page requests. May only be set to non-zero value + when the namespace capability workflow_task_completion_pagination is true. + """ + intermediate_page: builtins.bool + """True for non-final pages of a paginated workflow task completion. The final page's + `page_number` tells the server how many intermediate pages (0..page_number-1) preceded it. + May only be used when the namespace capability workflow_task_completion_pagination is true. + """ + @property + def commands( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.command.v1.message_pb2.Command + ]: + """A list of commands generated when driving the workflow code in response to the new task""" + + @property + def sticky_attributes( + self, + ) -> temporalio.api.taskqueue.v1.message_pb2.StickyExecutionAttributes: + """May be set by workers to indicate that the worker desires future tasks to be provided with + incremental history on a sticky queue. + """ + @property def query_results( self, @@ -1471,7 +1752,7 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): builtins.str, temporalio.api.query.v1.message_pb2.WorkflowQueryResult ]: """Responses to the `queries` field in the task being responded to""" - namespace: builtins.str + @property def worker_version_stamp( self, @@ -1481,6 +1762,7 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): field to true. See message docstrings for more. Deprecated. Use `deployment_options` and `versioning_behavior` instead. """ + @property def messages( self, @@ -1488,6 +1770,7 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): temporalio.api.protocol.v1.message_pb2.Message ]: """Protocol messages piggybacking on a WFT as a transport""" + @property def sdk_metadata( self, @@ -1495,31 +1778,30 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): """Data the SDK wishes to record for itself, but server need not interpret, and does not directly impact workflow state. """ + @property def metering_metadata( self, ) -> temporalio.api.common.v1.message_pb2.MeteringMetadata: """Local usage data collected for metering""" + @property def capabilities(self) -> global___RespondWorkflowTaskCompletedRequest.Capabilities: """All capabilities the SDK supports.""" + @property def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: """Deployment info of the worker that completed this task. Must be present if user has set `WorkerDeploymentOptions` regardless of versioning being enabled or not. Deprecated. Replaced with `deployment_options`. """ - versioning_behavior: ( - temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType - ) - """Versioning behavior of this workflow execution as set on the worker that completed this task. - UNSPECIFIED means versioning is not enabled in the worker. - """ + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Worker deployment options that user has set in the worker.""" + def __init__( self, *, @@ -1539,6 +1821,7 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): ] | None = ..., namespace: builtins.str = ..., + resource_id: builtins.str = ..., worker_version_stamp: temporalio.api.common.v1.message_pb2.WorkerVersionStamp | None = ..., messages: collections.abc.Iterable[ @@ -1555,10 +1838,14 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): versioning_behavior: temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType = ..., deployment_options: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions | None = ..., + worker_instance_key: builtins.str = ..., + worker_control_task_queue: builtins.str = ..., + page_number: builtins.int = ..., + intermediate_page: builtins.bool = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "capabilities", b"capabilities", "deployment", @@ -1577,7 +1864,7 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "binary_checksum", b"binary_checksum", "capabilities", @@ -1592,14 +1879,20 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): b"force_create_new_workflow_task", "identity", b"identity", + "intermediate_page", + b"intermediate_page", "messages", b"messages", "metering_metadata", b"metering_metadata", "namespace", b"namespace", + "page_number", + b"page_number", "query_results", b"query_results", + "resource_id", + b"resource_id", "return_new_workflow_task", b"return_new_workflow_task", "sdk_metadata", @@ -1610,6 +1903,10 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): b"task_token", "versioning_behavior", b"versioning_behavior", + "worker_control_task_queue", + b"worker_control_task_queue", + "worker_instance_key", + b"worker_instance_key", "worker_version_stamp", b"worker_version_stamp", ], @@ -1617,15 +1914,22 @@ class RespondWorkflowTaskCompletedRequest(google.protobuf.message.Message): global___RespondWorkflowTaskCompletedRequest = RespondWorkflowTaskCompletedRequest +@typing.final class RespondWorkflowTaskCompletedResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor WORKFLOW_TASK_FIELD_NUMBER: builtins.int ACTIVITY_TASKS_FIELD_NUMBER: builtins.int RESET_HISTORY_EVENT_ID_FIELD_NUMBER: builtins.int + reset_history_event_id: builtins.int + """If non zero, indicates the server has discarded the workflow task that was being responded to. + Will be the event ID of the last workflow task started event in the history before the new workflow task. + Server is only expected to discard a workflow task if it could not have modified the workflow state. + """ @property def workflow_task(self) -> global___PollWorkflowTaskQueueResponse: """See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task`""" + @property def activity_tasks( self, @@ -1633,11 +1937,7 @@ class RespondWorkflowTaskCompletedResponse(google.protobuf.message.Message): global___PollActivityTaskQueueResponse ]: """See `ScheduleActivityTaskCommandAttributes::request_eager_execution`""" - reset_history_event_id: builtins.int - """If non zero, indicates the server has discarded the workflow task that was being responded to. - Will be the event ID of the last workflow task started event in the history before the new workflow task. - Server is only expected to discard a workflow task if it could not have modified the workflow state. - """ + def __init__( self, *, @@ -1647,11 +1947,11 @@ class RespondWorkflowTaskCompletedResponse(google.protobuf.message.Message): reset_history_event_id: builtins.int = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["workflow_task", b"workflow_task"] + self, field_name: typing.Literal["workflow_task", b"workflow_task"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_tasks", b"activity_tasks", "reset_history_event_id", @@ -1663,6 +1963,7 @@ class RespondWorkflowTaskCompletedResponse(google.protobuf.message.Message): global___RespondWorkflowTaskCompletedResponse = RespondWorkflowTaskCompletedResponse +@typing.final class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1672,6 +1973,7 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int BINARY_CHECKSUM_FIELD_NUMBER: builtins.int NAMESPACE_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int MESSAGES_FIELD_NUMBER: builtins.int WORKER_VERSION_FIELD_NUMBER: builtins.int DEPLOYMENT_FIELD_NUMBER: builtins.int @@ -1682,9 +1984,6 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): """Why did the task fail? It's important to note that many of the variants in this enum cannot apply to worker responses. See the type's doc for more. """ - @property - def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: - """Failure details""" identity: builtins.str """The identity of the worker/client""" binary_checksum: builtins.str @@ -1692,6 +1991,12 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): Worker process' unique binary id """ namespace: builtins.str + resource_id: builtins.str + """Resource ID for routing. Contains the workflow ID from the original task.""" + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """Failure details""" + @property def messages( self, @@ -1699,6 +2004,7 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): temporalio.api.protocol.v1.message_pb2.Message ]: """Protocol messages piggybacking on a WFT as a transport""" + @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker who processed this task. This message's `build_id` field should @@ -1706,17 +2012,20 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): field to true. See message docstrings for more. Deprecated. Use `deployment_options` instead. """ + @property def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: """Deployment info of the worker that completed this task. Must be present if user has set `WorkerDeploymentOptions` regardless of versioning being enabled or not. Deprecated. Replaced with `deployment_options`. """ + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Worker deployment options that user has set in the worker.""" + def __init__( self, *, @@ -1726,6 +2035,7 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): identity: builtins.str = ..., binary_checksum: builtins.str = ..., namespace: builtins.str = ..., + resource_id: builtins.str = ..., messages: collections.abc.Iterable[ temporalio.api.protocol.v1.message_pb2.Message ] @@ -1738,7 +2048,7 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "deployment_options", @@ -1751,7 +2061,7 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "binary_checksum", b"binary_checksum", "cause", @@ -1768,6 +2078,8 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): b"messages", "namespace", b"namespace", + "resource_id", + b"resource_id", "task_token", b"task_token", "worker_version", @@ -1777,6 +2089,7 @@ class RespondWorkflowTaskFailedRequest(google.protobuf.message.Message): global___RespondWorkflowTaskFailedRequest = RespondWorkflowTaskFailedRequest +@typing.final class RespondWorkflowTaskFailedResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1786,21 +2099,39 @@ class RespondWorkflowTaskFailedResponse(google.protobuf.message.Message): global___RespondWorkflowTaskFailedResponse = RespondWorkflowTaskFailedResponse +@typing.final class PollActivityTaskQueueRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMESPACE_FIELD_NUMBER: builtins.int TASK_QUEUE_FIELD_NUMBER: builtins.int + POLLER_GROUP_ID_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int + WORKER_INSTANCE_KEY_FIELD_NUMBER: builtins.int + WORKER_CONTROL_TASK_QUEUE_FIELD_NUMBER: builtins.int TASK_QUEUE_METADATA_FIELD_NUMBER: builtins.int WORKER_VERSION_CAPABILITIES_FIELD_NUMBER: builtins.int DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int - WORKER_HEARTBEAT_FIELD_NUMBER: builtins.int + POLLER_POOL_INFO_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ... + poller_group_id: builtins.str + """Unless this is the first poll, the client must pass one of the poller group IDs received in + `poller_group_infos` of the last the PollActivityTaskQueueResponse according to the + instructions. If not set, the poll is routed randomly which can cause it to be blocked + without receiving a task while the queue actually has tasks in another server location. + """ identity: builtins.str """The identity of the worker/client""" + worker_instance_key: builtins.str + """A unique key for this worker instance, used for tracking worker lifecycle. + This is guaranteed to be unique, whereas identity is not guaranteed to be unique. + """ + worker_control_task_queue: builtins.str + """A dedicated per-worker Nexus task queue on which the server sends control + tasks (e.g. activity cancellation) to this specific worker instance. + """ + @property + def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ... @property def task_queue_metadata( self, @@ -1813,59 +2144,75 @@ class PollActivityTaskQueueRequest(google.protobuf.message.Message): feature. See the `WorkerVersionCapabilities` docstring for more. Deprecated. Replaced by deployment_options. """ + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Worker deployment options that user has set in the worker.""" + @property - def worker_heartbeat(self) -> temporalio.api.worker.v1.message_pb2.WorkerHeartbeat: - """Worker info to be sent to the server.""" + def poller_pool_info( + self, + ) -> temporalio.api.taskqueue.v1.message_pb2.PollerPoolInfo: + """Worker-reported poller pool state, used to spread poller scaling suggestions across + a fleet. Optional. + """ + def __init__( self, *, namespace: builtins.str = ..., task_queue: temporalio.api.taskqueue.v1.message_pb2.TaskQueue | None = ..., + poller_group_id: builtins.str = ..., identity: builtins.str = ..., + worker_instance_key: builtins.str = ..., + worker_control_task_queue: builtins.str = ..., task_queue_metadata: temporalio.api.taskqueue.v1.message_pb2.TaskQueueMetadata | None = ..., worker_version_capabilities: temporalio.api.common.v1.message_pb2.WorkerVersionCapabilities | None = ..., deployment_options: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions | None = ..., - worker_heartbeat: temporalio.api.worker.v1.message_pb2.WorkerHeartbeat + poller_pool_info: temporalio.api.taskqueue.v1.message_pb2.PollerPoolInfo | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_options", b"deployment_options", + "poller_pool_info", + b"poller_pool_info", "task_queue", b"task_queue", "task_queue_metadata", b"task_queue_metadata", - "worker_heartbeat", - b"worker_heartbeat", "worker_version_capabilities", b"worker_version_capabilities", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_options", b"deployment_options", "identity", b"identity", "namespace", b"namespace", + "poller_group_id", + b"poller_group_id", + "poller_pool_info", + b"poller_pool_info", "task_queue", b"task_queue", "task_queue_metadata", b"task_queue_metadata", - "worker_heartbeat", - b"worker_heartbeat", + "worker_control_task_queue", + b"worker_control_task_queue", + "worker_instance_key", + b"worker_instance_key", "worker_version_capabilities", b"worker_version_capabilities", ], @@ -1873,6 +2220,7 @@ class PollActivityTaskQueueRequest(google.protobuf.message.Message): global___PollActivityTaskQueueRequest = PollActivityTaskQueueRequest +@typing.final class PollActivityTaskQueueResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1895,49 +2243,67 @@ class PollActivityTaskQueueResponse(google.protobuf.message.Message): RETRY_POLICY_FIELD_NUMBER: builtins.int POLLER_SCALING_DECISION_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int + ACTIVITY_RUN_ID_FIELD_NUMBER: builtins.int + POLLER_GROUP_INFOS_FIELD_NUMBER: builtins.int + POLLER_GROUPS_INFO_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int task_token: builtins.bytes """A unique identifier for this task""" workflow_namespace: builtins.str - """The namespace the workflow which requested this activity lives in""" + """The namespace of the activity. If this is a workflow activity then this is the namespace of + the workflow also. If this is a standalone activity then the name of this field is + misleading, but retained for compatibility with workflow activities. + """ + activity_id: builtins.str + """The autogenerated or user specified identifier of this activity. Can be used to complete the + activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage + has resolved, but unique IDs for every activity invocation is a good idea. + Note that only a workflow activity ID may be autogenerated. + """ + attempt: builtins.int + """Starting at 1, the number of attempts to perform this activity""" + activity_run_id: builtins.str + """The run ID of the activity execution, only set for standalone activities.""" @property def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: - """Type of the requesting workflow""" + """Type of the requesting workflow (if this is a workflow activity).""" + @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: - """Execution info of the requesting workflow""" + """Execution info of the requesting workflow (if this is a workflow activity)""" + @property def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: ... - activity_id: builtins.str - """The autogenerated or user specified identifier of this activity. Can be used to complete the - activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage - has resolved, but unique IDs for every activity invocation is a good idea. - """ @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: """Headers specified by the scheduling workflow. Commonly used to propagate contextual info from the workflow to its activities. For example, tracing contexts. """ + @property def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Arguments to the activity invocation""" + @property def heartbeat_details(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Details of the last heartbeat that was recorded for this activity as of the time this task was delivered. """ + @property def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When was this task first scheduled""" + @property def current_attempt_scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When was this task attempt scheduled""" + @property def started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When was this task started (this attempt)""" - attempt: builtins.int - """Starting at 1, the number of attempts to perform this activity""" + @property def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """First scheduled -> final result reported timeout @@ -1945,6 +2311,7 @@ class PollActivityTaskQueueResponse(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Current attempt start -> final result reported timeout @@ -1952,23 +2319,61 @@ class PollActivityTaskQueueResponse(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) """ + @property def heartbeat_timeout(self) -> google.protobuf.duration_pb2.Duration: """Window within which the activity must report a heartbeat, or be timed out.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """This is the retry policy the service uses which may be different from the one provided (or not) during activity scheduling. The service can override the provided one if some values are not specified or exceed configured system limits. """ + @property def poller_scaling_decision( self, ) -> temporalio.api.taskqueue.v1.message_pb2.PollerScalingDecision: """Server-advised information the SDK may use to adjust its poller count.""" + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata""" + + @property + def poller_group_infos( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.taskqueue.v1.message_pb2.PollerGroupInfo + ]: + """The weighted list of poller groups IDs that client should use for future polls to this task + queue. Client is expected to: + 1. Maintain minimum number of pollers no less than the number of groups. + 2. Try to assign the next poll to a group without any pending polls, + 3. If every group has some pending polls, assign the next poll to a group randomly + according to the weights. + """ + + @property + def poller_groups_info( + self, + ) -> temporalio.api.taskqueue.v1.message_pb2.PollerGroupsInfo: + """The weighted, versioned list of poller groups IDs that client should use for future polls to + this task queue. Client should ignore this if it has already applied a snapshot with a + version greater than or equal to `poller_groups_info.version`. Client is expected to: + 1. Maintain minimum number of pollers no less than the number of groups. + 2. Try to assign the next poll to a group without any pending polls, + 3. If every group has some pending polls, assign the next poll to a group randomly + according to the weights. + """ + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this activity.""" + def __init__( self, *, @@ -1994,10 +2399,19 @@ class PollActivityTaskQueueResponse(google.protobuf.message.Message): poller_scaling_decision: temporalio.api.taskqueue.v1.message_pb2.PollerScalingDecision | None = ..., priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + activity_run_id: builtins.str = ..., + poller_group_infos: collections.abc.Iterable[ + temporalio.api.taskqueue.v1.message_pb2.PollerGroupInfo + ] + | None = ..., + poller_groups_info: temporalio.api.taskqueue.v1.message_pb2.PollerGroupsInfo + | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_type", b"activity_type", "current_attempt_scheduled_time", @@ -2010,10 +2424,14 @@ class PollActivityTaskQueueResponse(google.protobuf.message.Message): b"heartbeat_timeout", "input", b"input", + "poller_groups_info", + b"poller_groups_info", "poller_scaling_decision", b"poller_scaling_decision", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "retry_policy", b"retry_policy", "schedule_to_close_timeout", @@ -2032,9 +2450,11 @@ class PollActivityTaskQueueResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", + "activity_run_id", + b"activity_run_id", "activity_type", b"activity_type", "attempt", @@ -2049,10 +2469,16 @@ class PollActivityTaskQueueResponse(google.protobuf.message.Message): b"heartbeat_timeout", "input", b"input", + "poller_group_infos", + b"poller_group_infos", + "poller_groups_info", + b"poller_groups_info", "poller_scaling_decision", b"poller_scaling_decision", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "retry_policy", b"retry_policy", "schedule_to_close_timeout", @@ -2076,6 +2502,7 @@ class PollActivityTaskQueueResponse(google.protobuf.message.Message): global___PollActivityTaskQueueResponse = PollActivityTaskQueueResponse +@typing.final class RecordActivityTaskHeartbeatRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2083,14 +2510,18 @@ class RecordActivityTaskHeartbeatRequest(google.protobuf.message.Message): DETAILS_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int NAMESPACE_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int task_token: builtins.bytes """The task token as received in `PollActivityTaskQueueResponse`""" - @property - def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Arbitrary data, of which the most recent call is kept, to store for this activity""" identity: builtins.str """The identity of the worker/client""" namespace: builtins.str + resource_id: builtins.str + """Resource ID for routing. Contains the workflow ID or activity ID for standalone activities.""" + @property + def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Arbitrary data, of which the most recent call is kept, to store for this activity""" + def __init__( self, *, @@ -2098,19 +2529,22 @@ class RecordActivityTaskHeartbeatRequest(google.protobuf.message.Message): details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., identity: builtins.str = ..., namespace: builtins.str = ..., + resource_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["details", b"details"] + self, field_name: typing.Literal["details", b"details"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "identity", b"identity", "namespace", b"namespace", + "resource_id", + b"resource_id", "task_token", b"task_token", ], @@ -2118,6 +2552,7 @@ class RecordActivityTaskHeartbeatRequest(google.protobuf.message.Message): global___RecordActivityTaskHeartbeatRequest = RecordActivityTaskHeartbeatRequest +@typing.final class RecordActivityTaskHeartbeatResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2143,7 +2578,7 @@ class RecordActivityTaskHeartbeatResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_paused", b"activity_paused", "activity_reset", @@ -2155,6 +2590,7 @@ class RecordActivityTaskHeartbeatResponse(google.protobuf.message.Message): global___RecordActivityTaskHeartbeatResponse = RecordActivityTaskHeartbeatResponse +@typing.final class RecordActivityTaskHeartbeatByIdRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2164,19 +2600,25 @@ class RecordActivityTaskHeartbeatByIdRequest(google.protobuf.message.Message): ACTIVITY_ID_FIELD_NUMBER: builtins.int DETAILS_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace of the workflow which scheduled this activity""" workflow_id: builtins.str - """Id of the workflow which scheduled this activity""" + """Id of the workflow which scheduled this activity, leave empty to target a standalone activity""" run_id: builtins.str - """Run Id of the workflow which scheduled this activity""" + """For a workflow activity - the run ID of the workflow which scheduled this activity. + For a standalone activity - the run ID of the activity. + """ activity_id: builtins.str """Id of the activity we're heartbeating""" + identity: builtins.str + """The identity of the worker/client""" + resource_id: builtins.str + """Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.""" @property def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Arbitrary data, of which the most recent call is kept, to store for this activity""" - identity: builtins.str - """The identity of the worker/client""" + def __init__( self, *, @@ -2186,13 +2628,14 @@ class RecordActivityTaskHeartbeatByIdRequest(google.protobuf.message.Message): activity_id: builtins.str = ..., details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., identity: builtins.str = ..., + resource_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["details", b"details"] + self, field_name: typing.Literal["details", b"details"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "details", @@ -2201,6 +2644,8 @@ class RecordActivityTaskHeartbeatByIdRequest(google.protobuf.message.Message): b"identity", "namespace", b"namespace", + "resource_id", + b"resource_id", "run_id", b"run_id", "workflow_id", @@ -2210,6 +2655,7 @@ class RecordActivityTaskHeartbeatByIdRequest(google.protobuf.message.Message): global___RecordActivityTaskHeartbeatByIdRequest = RecordActivityTaskHeartbeatByIdRequest +@typing.final class RecordActivityTaskHeartbeatByIdResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2235,7 +2681,7 @@ class RecordActivityTaskHeartbeatByIdResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_paused", b"activity_paused", "activity_reset", @@ -2249,6 +2695,7 @@ global___RecordActivityTaskHeartbeatByIdResponse = ( RecordActivityTaskHeartbeatByIdResponse ) +@typing.final class RespondActivityTaskCompletedRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2256,17 +2703,21 @@ class RespondActivityTaskCompletedRequest(google.protobuf.message.Message): RESULT_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int NAMESPACE_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int WORKER_VERSION_FIELD_NUMBER: builtins.int DEPLOYMENT_FIELD_NUMBER: builtins.int DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int task_token: builtins.bytes """The task token as received in `PollActivityTaskQueueResponse`""" - @property - def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """The result of successfully executing the activity""" identity: builtins.str """The identity of the worker/client""" namespace: builtins.str + resource_id: builtins.str + """Resource ID for routing. Contains the workflow ID or activity ID for standalone activities.""" + @property + def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """The result of successfully executing the activity""" + @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker who processed this task. This message's `build_id` field should @@ -2274,17 +2725,20 @@ class RespondActivityTaskCompletedRequest(google.protobuf.message.Message): field to true. See message docstrings for more. Deprecated. Use `deployment_options` instead. """ + @property def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: """Deployment info of the worker that completed this task. Must be present if user has set `WorkerDeploymentOptions` regardless of versioning being enabled or not. Deprecated. Replaced with `deployment_options`. """ + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Worker deployment options that user has set in the worker.""" + def __init__( self, *, @@ -2292,6 +2746,7 @@ class RespondActivityTaskCompletedRequest(google.protobuf.message.Message): result: temporalio.api.common.v1.message_pb2.Payloads | None = ..., identity: builtins.str = ..., namespace: builtins.str = ..., + resource_id: builtins.str = ..., worker_version: temporalio.api.common.v1.message_pb2.WorkerVersionStamp | None = ..., deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ..., @@ -2300,7 +2755,7 @@ class RespondActivityTaskCompletedRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "deployment_options", @@ -2313,7 +2768,7 @@ class RespondActivityTaskCompletedRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "deployment_options", @@ -2322,6 +2777,8 @@ class RespondActivityTaskCompletedRequest(google.protobuf.message.Message): b"identity", "namespace", b"namespace", + "resource_id", + b"resource_id", "result", b"result", "task_token", @@ -2333,6 +2790,7 @@ class RespondActivityTaskCompletedRequest(google.protobuf.message.Message): global___RespondActivityTaskCompletedRequest = RespondActivityTaskCompletedRequest +@typing.final class RespondActivityTaskCompletedResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2342,6 +2800,7 @@ class RespondActivityTaskCompletedResponse(google.protobuf.message.Message): global___RespondActivityTaskCompletedResponse = RespondActivityTaskCompletedResponse +@typing.final class RespondActivityTaskCompletedByIdRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2351,19 +2810,25 @@ class RespondActivityTaskCompletedByIdRequest(google.protobuf.message.Message): ACTIVITY_ID_FIELD_NUMBER: builtins.int RESULT_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace of the workflow which scheduled this activity""" workflow_id: builtins.str - """Id of the workflow which scheduled this activity""" + """Id of the workflow which scheduled this activity, leave empty to target a standalone activity""" run_id: builtins.str - """Run Id of the workflow which scheduled this activity""" + """For a workflow activity - the run ID of the workflow which scheduled this activity. + For a standalone activity - the run ID of the activity. + """ activity_id: builtins.str """Id of the activity to complete""" + identity: builtins.str + """The identity of the worker/client""" + resource_id: builtins.str + """Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.""" @property def result(self) -> temporalio.api.common.v1.message_pb2.Payloads: """The serialized result of activity execution""" - identity: builtins.str - """The identity of the worker/client""" + def __init__( self, *, @@ -2373,19 +2838,22 @@ class RespondActivityTaskCompletedByIdRequest(google.protobuf.message.Message): activity_id: builtins.str = ..., result: temporalio.api.common.v1.message_pb2.Payloads | None = ..., identity: builtins.str = ..., + resource_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "identity", b"identity", "namespace", b"namespace", + "resource_id", + b"resource_id", "result", b"result", "run_id", @@ -2399,6 +2867,7 @@ global___RespondActivityTaskCompletedByIdRequest = ( RespondActivityTaskCompletedByIdRequest ) +@typing.final class RespondActivityTaskCompletedByIdResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2410,6 +2879,7 @@ global___RespondActivityTaskCompletedByIdResponse = ( RespondActivityTaskCompletedByIdResponse ) +@typing.final class RespondActivityTaskFailedRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2417,21 +2887,29 @@ class RespondActivityTaskFailedRequest(google.protobuf.message.Message): FAILURE_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int NAMESPACE_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int LAST_HEARTBEAT_DETAILS_FIELD_NUMBER: builtins.int WORKER_VERSION_FIELD_NUMBER: builtins.int DEPLOYMENT_FIELD_NUMBER: builtins.int DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int + CAUSE_FIELD_NUMBER: builtins.int task_token: builtins.bytes """The task token as received in `PollActivityTaskQueueResponse`""" - @property - def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: - """Detailed failure information""" identity: builtins.str """The identity of the worker/client""" namespace: builtins.str + resource_id: builtins.str + """Resource ID for routing. Contains the workflow ID or activity ID for standalone activities.""" + cause: temporalio.api.enums.v1.failed_cause_pb2.ActivityTaskFailedCause.ValueType + """Why did the task fail? When unset, the failure is treated as an unspecified activity failure.""" + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """Detailed failure information""" + @property def last_heartbeat_details(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Additional details to be stored as last activity heartbeat""" + @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker who processed this task. This message's `build_id` field should @@ -2439,17 +2917,20 @@ class RespondActivityTaskFailedRequest(google.protobuf.message.Message): field to true. See message docstrings for more. Deprecated. Use `deployment_options` instead. """ + @property def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: """Deployment info of the worker that completed this task. Must be present if user has set `WorkerDeploymentOptions` regardless of versioning being enabled or not. Deprecated. Replaced with `deployment_options`. """ + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Worker deployment options that user has set in the worker.""" + def __init__( self, *, @@ -2457,6 +2938,7 @@ class RespondActivityTaskFailedRequest(google.protobuf.message.Message): failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., identity: builtins.str = ..., namespace: builtins.str = ..., + resource_id: builtins.str = ..., last_heartbeat_details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., worker_version: temporalio.api.common.v1.message_pb2.WorkerVersionStamp @@ -2464,10 +2946,11 @@ class RespondActivityTaskFailedRequest(google.protobuf.message.Message): deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ..., deployment_options: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions | None = ..., + cause: temporalio.api.enums.v1.failed_cause_pb2.ActivityTaskFailedCause.ValueType = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "deployment_options", @@ -2482,7 +2965,9 @@ class RespondActivityTaskFailedRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "cause", + b"cause", "deployment", b"deployment", "deployment_options", @@ -2495,6 +2980,8 @@ class RespondActivityTaskFailedRequest(google.protobuf.message.Message): b"last_heartbeat_details", "namespace", b"namespace", + "resource_id", + b"resource_id", "task_token", b"task_token", "worker_version", @@ -2504,6 +2991,7 @@ class RespondActivityTaskFailedRequest(google.protobuf.message.Message): global___RespondActivityTaskFailedRequest = RespondActivityTaskFailedRequest +@typing.final class RespondActivityTaskFailedResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2517,6 +3005,7 @@ class RespondActivityTaskFailedResponse(google.protobuf.message.Message): """Server validation failures could include last_heartbeat_details payload is too large, request failure is too large """ + def __init__( self, *, @@ -2526,11 +3015,12 @@ class RespondActivityTaskFailedResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["failures", b"failures"] + self, field_name: typing.Literal["failures", b"failures"] ) -> None: ... global___RespondActivityTaskFailedResponse = RespondActivityTaskFailedResponse +@typing.final class RespondActivityTaskFailedByIdRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2541,22 +3031,34 @@ class RespondActivityTaskFailedByIdRequest(google.protobuf.message.Message): FAILURE_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int LAST_HEARTBEAT_DETAILS_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int + CAUSE_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace of the workflow which scheduled this activity""" workflow_id: builtins.str - """Id of the workflow which scheduled this activity""" + """Id of the workflow which scheduled this activity, leave empty to target a standalone activity""" run_id: builtins.str - """Run Id of the workflow which scheduled this activity""" + """For a workflow activity - the run ID of the workflow which scheduled this activity. + For a standalone activity - the run ID of the activity. + """ activity_id: builtins.str """Id of the activity to fail""" + identity: builtins.str + """The identity of the worker/client""" + resource_id: builtins.str + """Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.""" + cause: temporalio.api.enums.v1.failed_cause_pb2.ActivityTaskFailedCause.ValueType + """Why did the activity task fail? Optional; when unset the failure is treated as a normal + activity failure. See the type's doc for more. + """ @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """Detailed failure information""" - identity: builtins.str - """The identity of the worker/client""" + @property def last_heartbeat_details(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Additional details to be stored as last activity heartbeat""" + def __init__( self, *, @@ -2568,18 +3070,22 @@ class RespondActivityTaskFailedByIdRequest(google.protobuf.message.Message): identity: builtins.str = ..., last_heartbeat_details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., + resource_id: builtins.str = ..., + cause: temporalio.api.enums.v1.failed_cause_pb2.ActivityTaskFailedCause.ValueType = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "last_heartbeat_details", b"last_heartbeat_details" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", + "cause", + b"cause", "failure", b"failure", "identity", @@ -2588,6 +3094,8 @@ class RespondActivityTaskFailedByIdRequest(google.protobuf.message.Message): b"last_heartbeat_details", "namespace", b"namespace", + "resource_id", + b"resource_id", "run_id", b"run_id", "workflow_id", @@ -2597,6 +3105,7 @@ class RespondActivityTaskFailedByIdRequest(google.protobuf.message.Message): global___RespondActivityTaskFailedByIdRequest = RespondActivityTaskFailedByIdRequest +@typing.final class RespondActivityTaskFailedByIdResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2610,6 +3119,7 @@ class RespondActivityTaskFailedByIdResponse(google.protobuf.message.Message): """Server validation failures could include last_heartbeat_details payload is too large, request failure is too large """ + def __init__( self, *, @@ -2619,11 +3129,12 @@ class RespondActivityTaskFailedByIdResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["failures", b"failures"] + self, field_name: typing.Literal["failures", b"failures"] ) -> None: ... global___RespondActivityTaskFailedByIdResponse = RespondActivityTaskFailedByIdResponse +@typing.final class RespondActivityTaskCanceledRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2631,17 +3142,21 @@ class RespondActivityTaskCanceledRequest(google.protobuf.message.Message): DETAILS_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int NAMESPACE_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int WORKER_VERSION_FIELD_NUMBER: builtins.int DEPLOYMENT_FIELD_NUMBER: builtins.int DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int task_token: builtins.bytes """The task token as received in `PollActivityTaskQueueResponse`""" - @property - def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Serialized additional information to attach to the cancellation""" identity: builtins.str """The identity of the worker/client""" namespace: builtins.str + resource_id: builtins.str + """Resource ID for routing. Contains the workflow ID or activity ID for standalone activities.""" + @property + def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized additional information to attach to the cancellation""" + @property def worker_version(self) -> temporalio.api.common.v1.message_pb2.WorkerVersionStamp: """Version info of the worker who processed this task. This message's `build_id` field should @@ -2649,17 +3164,20 @@ class RespondActivityTaskCanceledRequest(google.protobuf.message.Message): field to true. See message docstrings for more. Deprecated. Use `deployment_options` instead. """ + @property def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: """Deployment info of the worker that completed this task. Must be present if user has set `WorkerDeploymentOptions` regardless of versioning being enabled or not. Deprecated. Replaced with `deployment_options`. """ + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Worker deployment options that user has set in the worker.""" + def __init__( self, *, @@ -2667,6 +3185,7 @@ class RespondActivityTaskCanceledRequest(google.protobuf.message.Message): details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., identity: builtins.str = ..., namespace: builtins.str = ..., + resource_id: builtins.str = ..., worker_version: temporalio.api.common.v1.message_pb2.WorkerVersionStamp | None = ..., deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ..., @@ -2675,7 +3194,7 @@ class RespondActivityTaskCanceledRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "deployment_options", @@ -2688,7 +3207,7 @@ class RespondActivityTaskCanceledRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "deployment_options", @@ -2699,6 +3218,8 @@ class RespondActivityTaskCanceledRequest(google.protobuf.message.Message): b"identity", "namespace", b"namespace", + "resource_id", + b"resource_id", "task_token", b"task_token", "worker_version", @@ -2708,6 +3229,7 @@ class RespondActivityTaskCanceledRequest(google.protobuf.message.Message): global___RespondActivityTaskCanceledRequest = RespondActivityTaskCanceledRequest +@typing.final class RespondActivityTaskCanceledResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2717,6 +3239,7 @@ class RespondActivityTaskCanceledResponse(google.protobuf.message.Message): global___RespondActivityTaskCanceledResponse = RespondActivityTaskCanceledResponse +@typing.final class RespondActivityTaskCanceledByIdRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2727,24 +3250,31 @@ class RespondActivityTaskCanceledByIdRequest(google.protobuf.message.Message): DETAILS_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace of the workflow which scheduled this activity""" workflow_id: builtins.str - """Id of the workflow which scheduled this activity""" + """Id of the workflow which scheduled this activity, leave empty to target a standalone activity""" run_id: builtins.str - """Run Id of the workflow which scheduled this activity""" + """For a workflow activity - the run ID of the workflow which scheduled this activity. + For a standalone activity - the run ID of the activity. + """ activity_id: builtins.str """Id of the activity to confirm is cancelled""" + identity: builtins.str + """The identity of the worker/client""" + resource_id: builtins.str + """Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities.""" @property def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Serialized additional information to attach to the cancellation""" - identity: builtins.str - """The identity of the worker/client""" + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Worker deployment options that user has set in the worker.""" + def __init__( self, *, @@ -2756,16 +3286,17 @@ class RespondActivityTaskCanceledByIdRequest(google.protobuf.message.Message): identity: builtins.str = ..., deployment_options: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions | None = ..., + resource_id: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_options", b"deployment_options", "details", b"details" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "deployment_options", @@ -2776,6 +3307,8 @@ class RespondActivityTaskCanceledByIdRequest(google.protobuf.message.Message): b"identity", "namespace", b"namespace", + "resource_id", + b"resource_id", "run_id", b"run_id", "workflow_id", @@ -2785,6 +3318,7 @@ class RespondActivityTaskCanceledByIdRequest(google.protobuf.message.Message): global___RespondActivityTaskCanceledByIdRequest = RespondActivityTaskCanceledByIdRequest +@typing.final class RespondActivityTaskCanceledByIdResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2796,6 +3330,7 @@ global___RespondActivityTaskCanceledByIdResponse = ( RespondActivityTaskCanceledByIdResponse ) +@typing.final class RequestCancelWorkflowExecutionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2807,10 +3342,6 @@ class RequestCancelWorkflowExecutionRequest(google.protobuf.message.Message): REASON_FIELD_NUMBER: builtins.int LINKS_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def workflow_execution( - self, - ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... identity: builtins.str """The identity of the worker/client""" request_id: builtins.str @@ -2823,12 +3354,17 @@ class RequestCancelWorkflowExecutionRequest(google.protobuf.message.Message): reason: builtins.str """Reason for requesting the cancellation""" @property + def workflow_execution( + self, + ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... + @property def links( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.common.v1.message_pb2.Link ]: """Links to be associated with the WorkflowExecutionCanceled event.""" + def __init__( self, *, @@ -2843,14 +3379,11 @@ class RequestCancelWorkflowExecutionRequest(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "first_execution_run_id", b"first_execution_run_id", "identity", @@ -2870,6 +3403,7 @@ class RequestCancelWorkflowExecutionRequest(google.protobuf.message.Message): global___RequestCancelWorkflowExecutionRequest = RequestCancelWorkflowExecutionRequest +@typing.final class RequestCancelWorkflowExecutionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -2879,6 +3413,7 @@ class RequestCancelWorkflowExecutionResponse(google.protobuf.message.Message): global___RequestCancelWorkflowExecutionResponse = RequestCancelWorkflowExecutionResponse +@typing.final class SignalWorkflowExecutionRequest(google.protobuf.message.Message): """Keep the parameters in sync with: - temporalio.api.batch.v1.BatchOperationSignal. @@ -2897,26 +3432,28 @@ class SignalWorkflowExecutionRequest(google.protobuf.message.Message): HEADER_FIELD_NUMBER: builtins.int LINKS_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def workflow_execution( - self, - ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... signal_name: builtins.str """The workflow author-defined name of the signal to send to the workflow""" - @property - def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Serialized value(s) to provide with the signal""" identity: builtins.str """The identity of the worker/client""" request_id: builtins.str """Used to de-dupe sent signals""" control: builtins.str """Deprecated.""" + @property + def workflow_execution( + self, + ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... + @property + def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized value(s) to provide with the signal""" + @property def header(self) -> temporalio.api.common.v1.message_pb2.Header: """Headers that are passed with the signal to the processing workflow. These can include things like auth or tracing tokens. """ + @property def links( self, @@ -2924,6 +3461,7 @@ class SignalWorkflowExecutionRequest(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Link ]: """Links to be associated with the WorkflowExecutionSignaled event.""" + def __init__( self, *, @@ -2941,7 +3479,7 @@ class SignalWorkflowExecutionRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "input", @@ -2952,7 +3490,7 @@ class SignalWorkflowExecutionRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "control", b"control", "header", @@ -2976,15 +3514,31 @@ class SignalWorkflowExecutionRequest(google.protobuf.message.Message): global___SignalWorkflowExecutionRequest = SignalWorkflowExecutionRequest +@typing.final class SignalWorkflowExecutionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + LINK_FIELD_NUMBER: builtins.int + @property + def link(self) -> temporalio.api.common.v1.message_pb2.Link: + """Link to be associated with the WorkflowExecutionSignaled event. + Added on the response to propagate the backlink. + Available from Temporal server 1.31 and up. + """ + def __init__( self, + *, + link: temporalio.api.common.v1.message_pb2.Link | None = ..., ) -> None: ... + def HasField( + self, field_name: typing.Literal["link", b"link"] + ) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["link", b"link"]) -> None: ... global___SignalWorkflowExecutionResponse = SignalWorkflowExecutionResponse +@typing.final class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3013,25 +3567,9 @@ class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): LINKS_FIELD_NUMBER: builtins.int VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int + TIME_SKIPPING_CONFIG_FIELD_NUMBER: builtins.int namespace: builtins.str workflow_id: builtins.str - @property - def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... - @property - def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: - """The task queue to start this workflow on, if it will be started""" - @property - def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Serialized arguments to the workflow. These are passed as arguments to the workflow function.""" - @property - def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: - """Total workflow execution timeout including retries and continue as new""" - @property - def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: - """Timeout of a single workflow run""" - @property - def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: - """Timeout of a single workflow task""" identity: builtins.str """The identity of the worker/client""" request_id: builtins.str @@ -3055,16 +3593,40 @@ class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): """ signal_name: builtins.str """The workflow author-defined name of the signal to send to the workflow""" + control: builtins.str + """Deprecated.""" + cron_schedule: builtins.str + """See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/""" + @property + def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ... + @property + def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: + """The task queue to start this workflow on, if it will be started""" + + @property + def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized arguments to the workflow. These are passed as arguments to the workflow function.""" + + @property + def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Total workflow execution timeout including retries and continue as new""" + + @property + def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Timeout of a single workflow run""" + + @property + def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Timeout of a single workflow task""" + @property def signal_input(self) -> temporalio.api.common.v1.message_pb2.Payloads: """Serialized value(s) to provide with the signal""" - control: builtins.str - """Deprecated.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """Retry policy for the workflow""" - cron_schedule: builtins.str - """See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/""" + @property def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: ... @property @@ -3075,18 +3637,20 @@ class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): def header(self) -> temporalio.api.common.v1.message_pb2.Header: ... @property def workflow_start_delay(self) -> google.protobuf.duration_pb2.Duration: - """Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. + """Time to wait before making the first workflow task available for dispatch. Cannot be used with `cron_schedule`. Note that the signal will be delivered with the first workflow task. If the workflow gets - another SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately + another SignalWithStartWorkflow before the delay a workflow task will be made available for dispatch immediately and the rest of the delay period will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution will not unblock the workflow. """ + @property def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata: """Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo for use by user interfaces to display the fixed as-of-start summary and details of the workflow. """ + @property def links( self, @@ -3094,6 +3658,7 @@ class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Link ]: """Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events.""" + @property def versioning_override( self, @@ -3101,9 +3666,17 @@ class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): """If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority metadata""" + + @property + def time_skipping_config( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingConfig: + """Time-skipping configuration. If not set, time skipping is disabled.""" + def __init__( self, *, @@ -3136,10 +3709,12 @@ class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): versioning_override: temporalio.api.workflow.v1.message_pb2.VersioningOverride | None = ..., priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + time_skipping_config: temporalio.api.common.v1.message_pb2.TimeSkippingConfig + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "header", b"header", "input", @@ -3156,6 +3731,8 @@ class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): b"signal_input", "task_queue", b"task_queue", + "time_skipping_config", + b"time_skipping_config", "user_metadata", b"user_metadata", "versioning_override", @@ -3174,7 +3751,7 @@ class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "control", b"control", "cron_schedule", @@ -3205,6 +3782,8 @@ class SignalWithStartWorkflowExecutionRequest(google.protobuf.message.Message): b"signal_name", "task_queue", b"task_queue", + "time_skipping_config", + b"time_skipping_config", "user_metadata", b"user_metadata", "versioning_override", @@ -3232,25 +3811,49 @@ global___SignalWithStartWorkflowExecutionRequest = ( SignalWithStartWorkflowExecutionRequest ) +@typing.final class SignalWithStartWorkflowExecutionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor RUN_ID_FIELD_NUMBER: builtins.int + FIRST_EXECUTION_RUN_ID_FIELD_NUMBER: builtins.int STARTED_FIELD_NUMBER: builtins.int + SIGNAL_LINK_FIELD_NUMBER: builtins.int run_id: builtins.str """The run id of the workflow that was started - or just signaled, if it was already running.""" + first_execution_run_id: builtins.str + """If the workflow was started as a result of a de-dupe, this field will contain the run id of the first execution in the chain.""" started: builtins.bool """If true, a new workflow was started.""" + @property + def signal_link(self) -> temporalio.api.common.v1.message_pb2.Link: + """Link to be associated with the WorkflowExecutionSignaled event. + Added on the response to propagate the backlink. + Available from Temporal server 1.31 and up. + """ + def __init__( self, *, run_id: builtins.str = ..., + first_execution_run_id: builtins.str = ..., started: builtins.bool = ..., + signal_link: temporalio.api.common.v1.message_pb2.Link | None = ..., ) -> None: ... + def HasField( + self, field_name: typing.Literal["signal_link", b"signal_link"] + ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "run_id", b"run_id", "started", b"started" + field_name: typing.Literal[ + "first_execution_run_id", + b"first_execution_run_id", + "run_id", + b"run_id", + "signal_link", + b"signal_link", + "started", + b"started", ], ) -> None: ... @@ -3258,6 +3861,7 @@ global___SignalWithStartWorkflowExecutionResponse = ( SignalWithStartWorkflowExecutionResponse ) +@typing.final class ResetWorkflowExecutionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3271,14 +3875,6 @@ class ResetWorkflowExecutionRequest(google.protobuf.message.Message): POST_RESET_OPERATIONS_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def workflow_execution( - self, - ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: - """The workflow to reset. If this contains a run ID then the workflow will be reset back to the - provided event ID in that run. Otherwise it will be reset to the provided event ID in the - current run. In all cases the current run will be terminated and a new run started. - """ reason: builtins.str workflow_task_finish_event_id: builtins.int """The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or @@ -3290,6 +3886,17 @@ class ResetWorkflowExecutionRequest(google.protobuf.message.Message): """Deprecated. Use `options`. Default: RESET_REAPPLY_TYPE_SIGNAL """ + identity: builtins.str + """The identity of the worker/client""" + @property + def workflow_execution( + self, + ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: + """The workflow to reset. If this contains a run ID then the workflow will be reset back to the + provided event ID in that run. Otherwise it will be reset to the provided event ID in the + current run. In all cases the current run will be terminated and a new run started. + """ + @property def reset_reapply_exclude_types( self, @@ -3297,6 +3904,7 @@ class ResetWorkflowExecutionRequest(google.protobuf.message.Message): temporalio.api.enums.v1.reset_pb2.ResetReapplyExcludeType.ValueType ]: """Event types not to be reapplied""" + @property def post_reset_operations( self, @@ -3307,8 +3915,7 @@ class ResetWorkflowExecutionRequest(google.protobuf.message.Message): to the *new* run of the workflow execution in the order they are provided. All operations are applied to the workflow before the first new workflow task is generated """ - identity: builtins.str - """The identity of the worker/client""" + def __init__( self, *, @@ -3330,14 +3937,11 @@ class ResetWorkflowExecutionRequest(google.protobuf.message.Message): identity: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", @@ -3361,6 +3965,7 @@ class ResetWorkflowExecutionRequest(google.protobuf.message.Message): global___ResetWorkflowExecutionRequest = ResetWorkflowExecutionRequest +@typing.final class ResetWorkflowExecutionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3371,12 +3976,11 @@ class ResetWorkflowExecutionResponse(google.protobuf.message.Message): *, run_id: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["run_id", b"run_id"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["run_id", b"run_id"]) -> None: ... global___ResetWorkflowExecutionResponse = ResetWorkflowExecutionResponse +@typing.final class TerminateWorkflowExecutionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3388,14 +3992,7 @@ class TerminateWorkflowExecutionRequest(google.protobuf.message.Message): FIRST_EXECUTION_RUN_ID_FIELD_NUMBER: builtins.int LINKS_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def workflow_execution( - self, - ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... reason: builtins.str - @property - def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """Serialized additional information to attach to the termination event""" identity: builtins.str """The identity of the worker/client""" first_execution_run_id: builtins.str @@ -3403,6 +4000,14 @@ class TerminateWorkflowExecutionRequest(google.protobuf.message.Message): `workflow_execution`), or specified (if it is) workflow execution is not part of the same execution chain as this id. """ + @property + def workflow_execution( + self, + ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... + @property + def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized additional information to attach to the termination event""" + @property def links( self, @@ -3410,6 +4015,7 @@ class TerminateWorkflowExecutionRequest(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Link ]: """Links to be associated with the WorkflowExecutionTerminated event.""" + def __init__( self, *, @@ -3425,13 +4031,13 @@ class TerminateWorkflowExecutionRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "workflow_execution", b"workflow_execution" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "details", b"details", "first_execution_run_id", @@ -3451,6 +4057,7 @@ class TerminateWorkflowExecutionRequest(google.protobuf.message.Message): global___TerminateWorkflowExecutionRequest = TerminateWorkflowExecutionRequest +@typing.final class TerminateWorkflowExecutionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3460,6 +4067,7 @@ class TerminateWorkflowExecutionResponse(google.protobuf.message.Message): global___TerminateWorkflowExecutionResponse = TerminateWorkflowExecutionResponse +@typing.final class DeleteWorkflowExecutionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3471,6 +4079,7 @@ class DeleteWorkflowExecutionRequest(google.protobuf.message.Message): self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: """Workflow Execution to delete. If run_id is not specified, the latest one is used.""" + def __init__( self, *, @@ -3479,20 +4088,18 @@ class DeleteWorkflowExecutionRequest(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "workflow_execution", b"workflow_execution" ], ) -> None: ... global___DeleteWorkflowExecutionRequest = DeleteWorkflowExecutionRequest +@typing.final class DeleteWorkflowExecutionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3502,6 +4109,7 @@ class DeleteWorkflowExecutionResponse(google.protobuf.message.Message): global___DeleteWorkflowExecutionResponse = DeleteWorkflowExecutionResponse +@typing.final class ListOpenWorkflowExecutionsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3541,7 +4149,7 @@ class ListOpenWorkflowExecutionsRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution_filter", b"execution_filter", "filters", @@ -3554,7 +4162,7 @@ class ListOpenWorkflowExecutionsRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution_filter", b"execution_filter", "filters", @@ -3572,23 +4180,24 @@ class ListOpenWorkflowExecutionsRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["filters", b"filters"] - ) -> typing_extensions.Literal["execution_filter", "type_filter"] | None: ... + self, oneof_group: typing.Literal["filters", b"filters"] + ) -> typing.Literal["execution_filter", "type_filter"] | None: ... global___ListOpenWorkflowExecutionsRequest = ListOpenWorkflowExecutionsRequest +@typing.final class ListOpenWorkflowExecutionsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor EXECUTIONS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def executions( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.workflow.v1.message_pb2.WorkflowExecutionInfo ]: ... - next_page_token: builtins.bytes def __init__( self, *, @@ -3600,13 +4209,14 @@ class ListOpenWorkflowExecutionsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "executions", b"executions", "next_page_token", b"next_page_token" ], ) -> None: ... global___ListOpenWorkflowExecutionsResponse = ListOpenWorkflowExecutionsResponse +@typing.final class ListClosedWorkflowExecutionsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3650,7 +4260,7 @@ class ListClosedWorkflowExecutionsRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution_filter", b"execution_filter", "filters", @@ -3665,7 +4275,7 @@ class ListClosedWorkflowExecutionsRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution_filter", b"execution_filter", "filters", @@ -3685,26 +4295,24 @@ class ListClosedWorkflowExecutionsRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["filters", b"filters"] - ) -> ( - typing_extensions.Literal["execution_filter", "type_filter", "status_filter"] - | None - ): ... + self, oneof_group: typing.Literal["filters", b"filters"] + ) -> typing.Literal["execution_filter", "type_filter", "status_filter"] | None: ... global___ListClosedWorkflowExecutionsRequest = ListClosedWorkflowExecutionsRequest +@typing.final class ListClosedWorkflowExecutionsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor EXECUTIONS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def executions( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.workflow.v1.message_pb2.WorkflowExecutionInfo ]: ... - next_page_token: builtins.bytes def __init__( self, *, @@ -3716,13 +4324,14 @@ class ListClosedWorkflowExecutionsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "executions", b"executions", "next_page_token", b"next_page_token" ], ) -> None: ... global___ListClosedWorkflowExecutionsResponse = ListClosedWorkflowExecutionsResponse +@typing.final class ListWorkflowExecutionsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3744,7 +4353,7 @@ class ListWorkflowExecutionsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "next_page_token", @@ -3758,18 +4367,19 @@ class ListWorkflowExecutionsRequest(google.protobuf.message.Message): global___ListWorkflowExecutionsRequest = ListWorkflowExecutionsRequest +@typing.final class ListWorkflowExecutionsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor EXECUTIONS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def executions( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.workflow.v1.message_pb2.WorkflowExecutionInfo ]: ... - next_page_token: builtins.bytes def __init__( self, *, @@ -3781,13 +4391,14 @@ class ListWorkflowExecutionsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "executions", b"executions", "next_page_token", b"next_page_token" ], ) -> None: ... global___ListWorkflowExecutionsResponse = ListWorkflowExecutionsResponse +@typing.final class ListArchivedWorkflowExecutionsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3809,7 +4420,7 @@ class ListArchivedWorkflowExecutionsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "next_page_token", @@ -3823,18 +4434,19 @@ class ListArchivedWorkflowExecutionsRequest(google.protobuf.message.Message): global___ListArchivedWorkflowExecutionsRequest = ListArchivedWorkflowExecutionsRequest +@typing.final class ListArchivedWorkflowExecutionsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor EXECUTIONS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def executions( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.workflow.v1.message_pb2.WorkflowExecutionInfo ]: ... - next_page_token: builtins.bytes def __init__( self, *, @@ -3846,13 +4458,14 @@ class ListArchivedWorkflowExecutionsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "executions", b"executions", "next_page_token", b"next_page_token" ], ) -> None: ... global___ListArchivedWorkflowExecutionsResponse = ListArchivedWorkflowExecutionsResponse +@typing.final class ScanWorkflowExecutionsRequest(google.protobuf.message.Message): """Deprecated: Use with `ListWorkflowExecutions`.""" @@ -3876,7 +4489,7 @@ class ScanWorkflowExecutionsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "next_page_token", @@ -3890,6 +4503,7 @@ class ScanWorkflowExecutionsRequest(google.protobuf.message.Message): global___ScanWorkflowExecutionsRequest = ScanWorkflowExecutionsRequest +@typing.final class ScanWorkflowExecutionsResponse(google.protobuf.message.Message): """Deprecated: Use with `ListWorkflowExecutions`.""" @@ -3897,13 +4511,13 @@ class ScanWorkflowExecutionsResponse(google.protobuf.message.Message): EXECUTIONS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def executions( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.workflow.v1.message_pb2.WorkflowExecutionInfo ]: ... - next_page_token: builtins.bytes def __init__( self, *, @@ -3915,13 +4529,14 @@ class ScanWorkflowExecutionsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "executions", b"executions", "next_page_token", b"next_page_token" ], ) -> None: ... global___ScanWorkflowExecutionsResponse = ScanWorkflowExecutionsResponse +@typing.final class CountWorkflowExecutionsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -3936,29 +4551,28 @@ class CountWorkflowExecutionsRequest(google.protobuf.message.Message): query: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "namespace", b"namespace", "query", b"query" - ], + self, field_name: typing.Literal["namespace", b"namespace", "query", b"query"] ) -> None: ... global___CountWorkflowExecutionsRequest = CountWorkflowExecutionsRequest +@typing.final class CountWorkflowExecutionsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class AggregationGroup(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor GROUP_VALUES_FIELD_NUMBER: builtins.int COUNT_FIELD_NUMBER: builtins.int + count: builtins.int @property def group_values( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.common.v1.message_pb2.Payload ]: ... - count: builtins.int def __init__( self, *, @@ -3970,7 +4584,7 @@ class CountWorkflowExecutionsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "count", b"count", "group_values", b"group_values" ], ) -> None: ... @@ -3993,6 +4607,7 @@ class CountWorkflowExecutionsResponse(google.protobuf.message.Message): """`groups` contains the groups if the request is grouping by a field. The list might not be complete, and the counts of each group is approximate. """ + def __init__( self, *, @@ -4003,12 +4618,12 @@ class CountWorkflowExecutionsResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["count", b"count", "groups", b"groups"], + self, field_name: typing.Literal["count", b"count", "groups", b"groups"] ) -> None: ... global___CountWorkflowExecutionsResponse = CountWorkflowExecutionsResponse +@typing.final class GetSearchAttributesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4018,9 +4633,11 @@ class GetSearchAttributesRequest(google.protobuf.message.Message): global___GetSearchAttributesRequest = GetSearchAttributesRequest +@typing.final class GetSearchAttributesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class KeysEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4035,8 +4652,7 @@ class GetSearchAttributesResponse(google.protobuf.message.Message): value: temporalio.api.enums.v1.common_pb2.IndexedValueType.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... KEYS_FIELD_NUMBER: builtins.int @@ -4054,12 +4670,11 @@ class GetSearchAttributesResponse(google.protobuf.message.Message): ] | None = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["keys", b"keys"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["keys", b"keys"]) -> None: ... global___GetSearchAttributesResponse = GetSearchAttributesResponse +@typing.final class RespondQueryTaskCompletedRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4070,13 +4685,9 @@ class RespondQueryTaskCompletedRequest(google.protobuf.message.Message): NAMESPACE_FIELD_NUMBER: builtins.int FAILURE_FIELD_NUMBER: builtins.int CAUSE_FIELD_NUMBER: builtins.int + POLLER_GROUP_ID_FIELD_NUMBER: builtins.int task_token: builtins.bytes completed_type: temporalio.api.enums.v1.query_pb2.QueryResultType.ValueType - @property - def query_result(self) -> temporalio.api.common.v1.message_pb2.Payloads: - """The result of the query. - Mutually exclusive with `error_message` and `failure`. Set when the query succeeds. - """ error_message: builtins.str """A plain error message that must be set if completed_type is QUERY_RESULT_TYPE_FAILED. SDKs should also fill in the more complete `failure` field to provide the full context and @@ -4087,6 +4698,20 @@ class RespondQueryTaskCompletedRequest(google.protobuf.message.Message): Mutually exclusive with `query_result`. Set when the query fails. """ namespace: builtins.str + cause: temporalio.api.enums.v1.failed_cause_pb2.WorkflowTaskFailedCause.ValueType + """Why did the task fail? It's important to note that many of the variants in this enum cannot + apply to worker responses. See the type's doc for more. + """ + poller_group_id: builtins.str + """Client must forward the poller_group_id received in PollWorkflowTaskQueueResponse for proper + routing of the response. + """ + @property + def query_result(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """The result of the query. + Mutually exclusive with `error_message` and `failure`. Set when the query succeeds. + """ + @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """The full reason for this query failure. This field is newer than `error_message` and can be @@ -4094,10 +4719,7 @@ class RespondQueryTaskCompletedRequest(google.protobuf.message.Message): traces. Mutually exclusive with `query_result`. Set when the query fails. """ - cause: temporalio.api.enums.v1.failed_cause_pb2.WorkflowTaskFailedCause.ValueType - """Why did the task fail? It's important to note that many of the variants in this enum cannot - apply to worker responses. See the type's doc for more. - """ + def __init__( self, *, @@ -4108,16 +4730,17 @@ class RespondQueryTaskCompletedRequest(google.protobuf.message.Message): namespace: builtins.str = ..., failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., cause: temporalio.api.enums.v1.failed_cause_pb2.WorkflowTaskFailedCause.ValueType = ..., + poller_group_id: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "query_result", b"query_result" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cause", b"cause", "completed_type", @@ -4128,6 +4751,8 @@ class RespondQueryTaskCompletedRequest(google.protobuf.message.Message): b"failure", "namespace", b"namespace", + "poller_group_id", + b"poller_group_id", "query_result", b"query_result", "task_token", @@ -4137,6 +4762,7 @@ class RespondQueryTaskCompletedRequest(google.protobuf.message.Message): global___RespondQueryTaskCompletedRequest = RespondQueryTaskCompletedRequest +@typing.final class RespondQueryTaskCompletedResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4146,6 +4772,7 @@ class RespondQueryTaskCompletedResponse(google.protobuf.message.Message): global___RespondQueryTaskCompletedResponse = RespondQueryTaskCompletedResponse +@typing.final class ResetStickyTaskQueueRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4161,17 +4788,18 @@ class ResetStickyTaskQueueRequest(google.protobuf.message.Message): execution: temporalio.api.common.v1.message_pb2.WorkflowExecution | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["execution", b"execution"] + self, field_name: typing.Literal["execution", b"execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution", b"execution", "namespace", b"namespace" ], ) -> None: ... global___ResetStickyTaskQueueRequest = ResetStickyTaskQueueRequest +@typing.final class ResetStickyTaskQueueResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4181,6 +4809,7 @@ class ResetStickyTaskQueueResponse(google.protobuf.message.Message): global___ResetStickyTaskQueueResponse = ResetStickyTaskQueueResponse +@typing.final class ShutdownWorkerRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4189,14 +4818,41 @@ class ShutdownWorkerRequest(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int REASON_FIELD_NUMBER: builtins.int WORKER_HEARTBEAT_FIELD_NUMBER: builtins.int + WORKER_INSTANCE_KEY_FIELD_NUMBER: builtins.int + TASK_QUEUE_FIELD_NUMBER: builtins.int + TASK_QUEUE_TYPES_FIELD_NUMBER: builtins.int namespace: builtins.str sticky_task_queue: builtins.str + """sticky_task_queue may not always be populated. We want to ensure all workers + send a shutdown request to update worker state for heartbeating, as well + as cancel pending poll calls early, instead of waiting for timeouts. + """ identity: builtins.str reason: builtins.str + worker_instance_key: builtins.str + """Technically this is also sent in the WorkerHeartbeat, but + since worker heartbeating can be turned off, this needs + to be a separate, top-level field. + """ + task_queue: builtins.str + """Task queue name the worker is polling on. This allows server to cancel + all outstanding poll RPC calls from SDK. This avoids a race condition that + can lead to tasks being lost. + """ @property def worker_heartbeat( self, ) -> temporalio.api.worker.v1.message_pb2.WorkerHeartbeat: ... + @property + def task_queue_types( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType + ]: + """Task queue types that help server cancel outstanding poll RPC + calls from SDK. This avoids a race condition that can lead to tasks being lost. + """ + def __init__( self, *, @@ -4206,14 +4862,19 @@ class ShutdownWorkerRequest(google.protobuf.message.Message): reason: builtins.str = ..., worker_heartbeat: temporalio.api.worker.v1.message_pb2.WorkerHeartbeat | None = ..., + worker_instance_key: builtins.str = ..., + task_queue: builtins.str = ..., + task_queue_types: collections.abc.Iterable[ + temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType + ] + | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["worker_heartbeat", b"worker_heartbeat"], + self, field_name: typing.Literal["worker_heartbeat", b"worker_heartbeat"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", @@ -4222,13 +4883,20 @@ class ShutdownWorkerRequest(google.protobuf.message.Message): b"reason", "sticky_task_queue", b"sticky_task_queue", + "task_queue", + b"task_queue", + "task_queue_types", + b"task_queue_types", "worker_heartbeat", b"worker_heartbeat", + "worker_instance_key", + b"worker_instance_key", ], ) -> None: ... global___ShutdownWorkerRequest = ShutdownWorkerRequest +@typing.final class ShutdownWorkerResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4238,6 +4906,7 @@ class ShutdownWorkerResponse(google.protobuf.message.Message): global___ShutdownWorkerResponse = ShutdownWorkerResponse +@typing.final class QueryWorkflowRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4246,16 +4915,16 @@ class QueryWorkflowRequest(google.protobuf.message.Message): QUERY_FIELD_NUMBER: builtins.int QUERY_REJECT_CONDITION_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... - @property - def query(self) -> temporalio.api.query.v1.message_pb2.WorkflowQuery: ... query_reject_condition: ( temporalio.api.enums.v1.query_pb2.QueryRejectCondition.ValueType ) """QueryRejectCondition can used to reject the query if workflow state does not satisfy condition. Default: QUERY_REJECT_CONDITION_NONE. """ + @property + def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... + @property + def query(self) -> temporalio.api.query.v1.message_pb2.WorkflowQuery: ... def __init__( self, *, @@ -4265,14 +4934,11 @@ class QueryWorkflowRequest(google.protobuf.message.Message): query_reject_condition: temporalio.api.enums.v1.query_pb2.QueryRejectCondition.ValueType = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "execution", b"execution", "query", b"query" - ], + self, field_name: typing.Literal["execution", b"execution", "query", b"query"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution", b"execution", "namespace", @@ -4286,36 +4952,54 @@ class QueryWorkflowRequest(google.protobuf.message.Message): global___QueryWorkflowRequest = QueryWorkflowRequest +@typing.final class QueryWorkflowResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor QUERY_RESULT_FIELD_NUMBER: builtins.int QUERY_REJECTED_FIELD_NUMBER: builtins.int + LINK_FIELD_NUMBER: builtins.int @property def query_result(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... @property def query_rejected(self) -> temporalio.api.query.v1.message_pb2.QueryRejected: ... + @property + def link(self) -> temporalio.api.common.v1.message_pb2.Link: + """Holds the link to the Workflow execution that processed the Query.""" + def __init__( self, *, query_result: temporalio.api.common.v1.message_pb2.Payloads | None = ..., query_rejected: temporalio.api.query.v1.message_pb2.QueryRejected | None = ..., + link: temporalio.api.common.v1.message_pb2.Link | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "query_rejected", b"query_rejected", "query_result", b"query_result" + field_name: typing.Literal[ + "link", + b"link", + "query_rejected", + b"query_rejected", + "query_result", + b"query_result", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "query_rejected", b"query_rejected", "query_result", b"query_result" + field_name: typing.Literal[ + "link", + b"link", + "query_rejected", + b"query_rejected", + "query_result", + b"query_result", ], ) -> None: ... global___QueryWorkflowResponse = QueryWorkflowResponse +@typing.final class DescribeWorkflowExecutionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4331,17 +5015,18 @@ class DescribeWorkflowExecutionRequest(google.protobuf.message.Message): execution: temporalio.api.common.v1.message_pb2.WorkflowExecution | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["execution", b"execution"] + self, field_name: typing.Literal["execution", b"execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution", b"execution", "namespace", b"namespace" ], ) -> None: ... global___DescribeWorkflowExecutionRequest = DescribeWorkflowExecutionRequest +@typing.final class DescribeWorkflowExecutionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4423,7 +5108,7 @@ class DescribeWorkflowExecutionResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution_config", b"execution_config", "pending_workflow_task", @@ -4436,7 +5121,7 @@ class DescribeWorkflowExecutionResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "callbacks", b"callbacks", "execution_config", @@ -4458,6 +5143,7 @@ class DescribeWorkflowExecutionResponse(google.protobuf.message.Message): global___DescribeWorkflowExecutionResponse = DescribeWorkflowExecutionResponse +@typing.final class DescribeTaskQueueRequest(google.protobuf.message.Message): """(-- api-linter: core::0203::optional=disabled aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --) @@ -4477,9 +5163,6 @@ class DescribeTaskQueueRequest(google.protobuf.message.Message): REPORT_POLLERS_FIELD_NUMBER: builtins.int REPORT_TASK_REACHABILITY_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: - """Sticky queues are not supported in deprecated ENHANCED mode.""" task_queue_type: temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType """If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used. Only supported in default mode (use `task_queue_types` in ENHANCED mode instead). @@ -4497,6 +5180,19 @@ class DescribeTaskQueueRequest(google.protobuf.message.Message): Select the API mode to use for this request: DEFAULT mode (if unset) or ENHANCED mode. Consult the documentation for each field to understand which mode it is supported in. """ + report_pollers: builtins.bool + """Deprecated (as part of the ENHANCED mode deprecation). + Report list of pollers for requested task queue types and versions. + """ + report_task_reachability: builtins.bool + """Deprecated (as part of the ENHANCED mode deprecation). + Report task reachability for the requested versions and all task types (task reachability is not reported + per task type). + """ + @property + def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: + """Sticky queues are not supported in deprecated ENHANCED mode.""" + @property def versions( self, @@ -4507,6 +5203,7 @@ class DescribeTaskQueueRequest(google.protobuf.message.Message): unversioned queue will be returned. (-- api-linter: core::0140::prepositions --) """ + @property def task_queue_types( self, @@ -4516,15 +5213,7 @@ class DescribeTaskQueueRequest(google.protobuf.message.Message): """Deprecated (as part of the ENHANCED mode deprecation). Task queue types to report info about. If not specified, all types are considered. """ - report_pollers: builtins.bool - """Deprecated (as part of the ENHANCED mode deprecation). - Report list of pollers for requested task queue types and versions. - """ - report_task_reachability: builtins.bool - """Deprecated (as part of the ENHANCED mode deprecation). - Report task reachability for the requested versions and all task types (task reachability is not reported - per task type). - """ + def __init__( self, *, @@ -4546,13 +5235,13 @@ class DescribeTaskQueueRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "task_queue", b"task_queue", "versions", b"versions" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "api_mode", b"api_mode", "include_task_queue_status", @@ -4580,9 +5269,11 @@ class DescribeTaskQueueRequest(google.protobuf.message.Message): global___DescribeTaskQueueRequest = DescribeTaskQueueRequest +@typing.final class DescribeTaskQueueResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class StatsByPriorityKeyEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4598,13 +5289,13 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): value: temporalio.api.taskqueue.v1.message_pb2.TaskQueueStats | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class EffectiveRateLimit(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4628,7 +5319,7 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "rate_limit_source", b"rate_limit_source", "requests_per_second", @@ -4636,6 +5327,7 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): ], ) -> None: ... + @typing.final class VersionsInfoEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4654,11 +5346,10 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... POLLERS_FIELD_NUMBER: builtins.int @@ -4680,6 +5371,7 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): """Statistics for the task queue. Only set if `report_stats` is set on the request. """ + @property def stats_by_priority_key( self, @@ -4691,6 +5383,7 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "by" is used to clarify the keys and values. --) """ + @property def versioning_info( self, @@ -4705,9 +5398,11 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): are typically not Pinned until they complete their first task (unless they are started with a Pinned VersioningOverride or are Child Workflows of a Pinned parent). """ + @property def config(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueueConfig: """Only populated if report_task_queue_config is set to true.""" + @property def effective_rate_limit( self, @@ -4719,6 +5414,7 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): """Deprecated. Status of the task queue. Only populated when `include_task_queue_status` is set to true in the request. """ + @property def versions_info( self, @@ -4729,6 +5425,7 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): Only returned in ENHANCED mode. This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. """ + def __init__( self, *, @@ -4755,7 +5452,7 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "config", b"config", "effective_rate_limit", @@ -4770,7 +5467,7 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "config", b"config", "effective_rate_limit", @@ -4792,6 +5489,7 @@ class DescribeTaskQueueResponse(google.protobuf.message.Message): global___DescribeTaskQueueResponse = DescribeTaskQueueResponse +@typing.final class GetClusterInfoRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4801,11 +5499,13 @@ class GetClusterInfoRequest(google.protobuf.message.Message): global___GetClusterInfoRequest = GetClusterInfoRequest +@typing.final class GetClusterInfoResponse(google.protobuf.message.Message): """GetClusterInfoResponse contains information about Temporal cluster.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class SupportedClientsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4820,8 +5520,7 @@ class GetClusterInfoResponse(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SUPPORTED_CLIENTS_FIELD_NUMBER: builtins.int @@ -4834,28 +5533,29 @@ class GetClusterInfoResponse(google.protobuf.message.Message): VISIBILITY_STORE_FIELD_NUMBER: builtins.int INITIAL_FAILOVER_VERSION_FIELD_NUMBER: builtins.int FAILOVER_VERSION_INCREMENT_FIELD_NUMBER: builtins.int - @property - def supported_clients( - self, - ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: - """Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". - Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". - """ server_version: builtins.str cluster_id: builtins.str - @property - def version_info(self) -> temporalio.api.version.v1.message_pb2.VersionInfo: ... cluster_name: builtins.str history_shard_count: builtins.int persistence_store: builtins.str visibility_store: builtins.str initial_failover_version: builtins.int failover_version_increment: builtins.int - def __init__( + @property + def supported_clients( self, - *, - supported_clients: collections.abc.Mapping[builtins.str, builtins.str] - | None = ..., + ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + """Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". + Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". + """ + + @property + def version_info(self) -> temporalio.api.version.v1.message_pb2.VersionInfo: ... + def __init__( + self, + *, + supported_clients: collections.abc.Mapping[builtins.str, builtins.str] + | None = ..., server_version: builtins.str = ..., cluster_id: builtins.str = ..., version_info: temporalio.api.version.v1.message_pb2.VersionInfo | None = ..., @@ -4867,11 +5567,11 @@ class GetClusterInfoResponse(google.protobuf.message.Message): failover_version_increment: builtins.int = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["version_info", b"version_info"] + self, field_name: typing.Literal["version_info", b"version_info"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cluster_id", b"cluster_id", "cluster_name", @@ -4897,6 +5597,7 @@ class GetClusterInfoResponse(google.protobuf.message.Message): global___GetClusterInfoResponse = GetClusterInfoResponse +@typing.final class GetSystemInfoRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -4906,9 +5607,11 @@ class GetSystemInfoRequest(google.protobuf.message.Message): global___GetSystemInfoRequest = GetSystemInfoRequest +@typing.final class GetSystemInfoResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class Capabilities(google.protobuf.message.Message): """System capability details.""" @@ -4925,6 +5628,8 @@ class GetSystemInfoResponse(google.protobuf.message.Message): SDK_METADATA_FIELD_NUMBER: builtins.int COUNT_GROUP_BY_EXECUTION_STATUS_FIELD_NUMBER: builtins.int NEXUS_FIELD_NUMBER: builtins.int + SERVER_SCALED_DEPLOYMENTS_FIELD_NUMBER: builtins.int + SERVER_SCALED_PROVIDER_CLOUD_RUN_FIELD_NUMBER: builtins.int signal_and_query_header: builtins.bool """True if signal and query headers are supported.""" internal_error_differentiation: builtins.bool @@ -4961,6 +5666,16 @@ class GetSystemInfoResponse(google.protobuf.message.Message): """True if the server supports Nexus operations. This flag is dependent both on server version and for Nexus to be enabled via server configuration. """ + server_scaled_deployments: builtins.bool + """True if the server supports server-scaled deployments. + This flag is dependent both on server version and for server-scaled deployments + to be enabled via server configuration. + """ + server_scaled_provider_cloud_run: builtins.bool + """True if the server supports the Cloud Run compute provider for + server-scaled deployments. Dependent on server version and the + provider being enabled via server configuration. + """ def __init__( self, *, @@ -4975,10 +5690,12 @@ class GetSystemInfoResponse(google.protobuf.message.Message): sdk_metadata: builtins.bool = ..., count_group_by_execution_status: builtins.bool = ..., nexus: builtins.bool = ..., + server_scaled_deployments: builtins.bool = ..., + server_scaled_provider_cloud_run: builtins.bool = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_failure_include_heartbeat", b"activity_failure_include_heartbeat", "build_id_based_versioning", @@ -4995,6 +5712,10 @@ class GetSystemInfoResponse(google.protobuf.message.Message): b"nexus", "sdk_metadata", b"sdk_metadata", + "server_scaled_deployments", + b"server_scaled_deployments", + "server_scaled_provider_cloud_run", + b"server_scaled_provider_cloud_run", "signal_and_query_header", b"signal_and_query_header", "supports_schedules", @@ -5011,6 +5732,7 @@ class GetSystemInfoResponse(google.protobuf.message.Message): @property def capabilities(self) -> global___GetSystemInfoResponse.Capabilities: """All capabilities the system supports.""" + def __init__( self, *, @@ -5018,17 +5740,18 @@ class GetSystemInfoResponse(google.protobuf.message.Message): capabilities: global___GetSystemInfoResponse.Capabilities | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["capabilities", b"capabilities"] + self, field_name: typing.Literal["capabilities", b"capabilities"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "capabilities", b"capabilities", "server_version", b"server_version" ], ) -> None: ... global___GetSystemInfoResponse = GetSystemInfoResponse +@typing.final class ListTaskQueuePartitionsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5044,17 +5767,18 @@ class ListTaskQueuePartitionsRequest(google.protobuf.message.Message): task_queue: temporalio.api.taskqueue.v1.message_pb2.TaskQueue | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["task_queue", b"task_queue"] + self, field_name: typing.Literal["task_queue", b"task_queue"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "task_queue", b"task_queue" ], ) -> None: ... global___ListTaskQueuePartitionsRequest = ListTaskQueuePartitionsRequest +@typing.final class ListTaskQueuePartitionsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5086,7 +5810,7 @@ class ListTaskQueuePartitionsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_task_queue_partitions", b"activity_task_queue_partitions", "workflow_task_queue_partitions", @@ -5096,6 +5820,7 @@ class ListTaskQueuePartitionsResponse(google.protobuf.message.Message): global___ListTaskQueuePartitionsResponse = ListTaskQueuePartitionsResponse +@typing.final class CreateScheduleRequest(google.protobuf.message.Message): """(-- api-linter: core::0203::optional=disabled aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --) @@ -5115,19 +5840,22 @@ class CreateScheduleRequest(google.protobuf.message.Message): """The namespace the schedule should be created in.""" schedule_id: builtins.str """The id of the new schedule.""" + identity: builtins.str + """The identity of the client who initiated this request.""" + request_id: builtins.str + """A unique identifier for this create request for idempotence. Typically UUIDv4.""" @property def schedule(self) -> temporalio.api.schedule.v1.message_pb2.Schedule: """The schedule spec, policies, action, and initial state.""" + @property def initial_patch(self) -> temporalio.api.schedule.v1.message_pb2.SchedulePatch: """Optional initial patch (e.g. to run the action once immediately).""" - identity: builtins.str - """The identity of the client who initiated this request.""" - request_id: builtins.str - """A unique identifier for this create request for idempotence. Typically UUIDv4.""" + @property def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: """Memo and search attributes to attach to the schedule itself.""" + @property def search_attributes( self, @@ -5148,7 +5876,7 @@ class CreateScheduleRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "initial_patch", b"initial_patch", "memo", @@ -5161,7 +5889,7 @@ class CreateScheduleRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "initial_patch", @@ -5183,6 +5911,7 @@ class CreateScheduleRequest(google.protobuf.message.Message): global___CreateScheduleRequest = CreateScheduleRequest +@typing.final class CreateScheduleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5194,11 +5923,12 @@ class CreateScheduleResponse(google.protobuf.message.Message): conflict_token: builtins.bytes = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["conflict_token", b"conflict_token"] + self, field_name: typing.Literal["conflict_token", b"conflict_token"] ) -> None: ... global___CreateScheduleResponse = CreateScheduleResponse +@typing.final class DescribeScheduleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5216,13 +5946,14 @@ class DescribeScheduleRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "schedule_id", b"schedule_id" ], ) -> None: ... global___DescribeScheduleRequest = DescribeScheduleRequest +@typing.final class DescribeScheduleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5231,6 +5962,11 @@ class DescribeScheduleResponse(google.protobuf.message.Message): MEMO_FIELD_NUMBER: builtins.int SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int CONFLICT_TOKEN_FIELD_NUMBER: builtins.int + conflict_token: builtins.bytes + """This value can be passed back to UpdateSchedule to ensure that the + schedule was not modified between a Describe and an Update, which could + lead to lost updates and other confusion. + """ @property def schedule(self) -> temporalio.api.schedule.v1.message_pb2.Schedule: """The complete current schedule details. This may not match the schedule as @@ -5241,21 +5977,19 @@ class DescribeScheduleResponse(google.protobuf.message.Message): - some fields in the state are modified automatically - the schedule may have been modified by UpdateSchedule or PatchSchedule """ + @property def info(self) -> temporalio.api.schedule.v1.message_pb2.ScheduleInfo: """Extra schedule state info.""" + @property def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: """The memo and search attributes that the schedule was created with.""" + @property def search_attributes( self, ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: ... - conflict_token: builtins.bytes - """This value can be passed back to UpdateSchedule to ensure that the - schedule was not modified between a Describe and an Update, which could - lead to lost updates and other confusion. - """ def __init__( self, *, @@ -5268,7 +6002,7 @@ class DescribeScheduleResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "info", b"info", "memo", @@ -5281,7 +6015,7 @@ class DescribeScheduleResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "conflict_token", b"conflict_token", "info", @@ -5297,6 +6031,7 @@ class DescribeScheduleResponse(google.protobuf.message.Message): global___DescribeScheduleResponse = DescribeScheduleResponse +@typing.final class UpdateScheduleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5307,15 +6042,11 @@ class UpdateScheduleRequest(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int REQUEST_ID_FIELD_NUMBER: builtins.int SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int + MEMO_FIELD_NUMBER: builtins.int namespace: builtins.str """The namespace of the schedule to update.""" schedule_id: builtins.str """The id of the schedule to update.""" - @property - def schedule(self) -> temporalio.api.schedule.v1.message_pb2.Schedule: - """The new schedule. The four main fields of the schedule (spec, action, - policies, state) are replaced completely by the values in this message. - """ conflict_token: builtins.bytes """This can be the value of conflict_token from a DescribeScheduleResponse, which will cause this request to fail if the schedule has been modified @@ -5326,6 +6057,12 @@ class UpdateScheduleRequest(google.protobuf.message.Message): """The identity of the client who initiated this request.""" request_id: builtins.str """A unique identifier for this update request for idempotence. Typically UUIDv4.""" + @property + def schedule(self) -> temporalio.api.schedule.v1.message_pb2.Schedule: + """The new schedule. The four main fields of the schedule (spec, action, + policies, state) are replaced completely by the values in this message. + """ + @property def search_attributes( self, @@ -5336,6 +6073,14 @@ class UpdateScheduleRequest(google.protobuf.message.Message): Note: you cannot only update the search attributes with `UpdateScheduleRequest`, you must also set the `schedule` field; otherwise, it will unset the schedule. """ + + @property + def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: + """Schedule memo to replace. If set, replaces the entire memo. + Do not set this field if you do not want to update the memo. + A non-null empty object will clear the memo. + """ + def __init__( self, *, @@ -5347,20 +6092,28 @@ class UpdateScheduleRequest(google.protobuf.message.Message): request_id: builtins.str = ..., search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes | None = ..., + memo: temporalio.api.common.v1.message_pb2.Memo | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "schedule", b"schedule", "search_attributes", b"search_attributes" + field_name: typing.Literal[ + "memo", + b"memo", + "schedule", + b"schedule", + "search_attributes", + b"search_attributes", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "conflict_token", b"conflict_token", "identity", b"identity", + "memo", + b"memo", "namespace", b"namespace", "request_id", @@ -5376,6 +6129,7 @@ class UpdateScheduleRequest(google.protobuf.message.Message): global___UpdateScheduleRequest = UpdateScheduleRequest +@typing.final class UpdateScheduleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5385,6 +6139,7 @@ class UpdateScheduleResponse(google.protobuf.message.Message): global___UpdateScheduleResponse = UpdateScheduleResponse +@typing.final class PatchScheduleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5397,12 +6152,12 @@ class PatchScheduleRequest(google.protobuf.message.Message): """The namespace of the schedule to patch.""" schedule_id: builtins.str """The id of the schedule to patch.""" - @property - def patch(self) -> temporalio.api.schedule.v1.message_pb2.SchedulePatch: ... identity: builtins.str """The identity of the client who initiated this request.""" request_id: builtins.str """A unique identifier for this update request for idempotence. Typically UUIDv4.""" + @property + def patch(self) -> temporalio.api.schedule.v1.message_pb2.SchedulePatch: ... def __init__( self, *, @@ -5413,11 +6168,11 @@ class PatchScheduleRequest(google.protobuf.message.Message): request_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["patch", b"patch"] + self, field_name: typing.Literal["patch", b"patch"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", @@ -5433,6 +6188,7 @@ class PatchScheduleRequest(google.protobuf.message.Message): global___PatchScheduleRequest = PatchScheduleRequest +@typing.final class PatchScheduleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5442,6 +6198,7 @@ class PatchScheduleResponse(google.protobuf.message.Message): global___PatchScheduleResponse = PatchScheduleResponse +@typing.final class ListScheduleMatchingTimesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5456,6 +6213,7 @@ class ListScheduleMatchingTimesRequest(google.protobuf.message.Message): @property def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Time range to query.""" + @property def end_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... def __init__( @@ -5468,13 +6226,13 @@ class ListScheduleMatchingTimesRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "end_time", b"end_time", "start_time", b"start_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "end_time", b"end_time", "namespace", @@ -5488,6 +6246,7 @@ class ListScheduleMatchingTimesRequest(google.protobuf.message.Message): global___ListScheduleMatchingTimesRequest = ListScheduleMatchingTimesRequest +@typing.final class ListScheduleMatchingTimesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5505,11 +6264,12 @@ class ListScheduleMatchingTimesResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["start_time", b"start_time"] + self, field_name: typing.Literal["start_time", b"start_time"] ) -> None: ... global___ListScheduleMatchingTimesResponse = ListScheduleMatchingTimesResponse +@typing.final class DeleteScheduleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5531,7 +6291,7 @@ class DeleteScheduleRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", @@ -5543,6 +6303,7 @@ class DeleteScheduleRequest(google.protobuf.message.Message): global___DeleteScheduleRequest = DeleteScheduleRequest +@typing.final class DeleteScheduleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5552,6 +6313,7 @@ class DeleteScheduleResponse(google.protobuf.message.Message): global___DeleteScheduleResponse = DeleteScheduleResponse +@typing.final class ListSchedulesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5577,7 +6339,7 @@ class ListSchedulesRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "maximum_page_size", b"maximum_page_size", "namespace", @@ -5591,18 +6353,19 @@ class ListSchedulesRequest(google.protobuf.message.Message): global___ListSchedulesRequest = ListSchedulesRequest +@typing.final class ListSchedulesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SCHEDULES_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def schedules( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.schedule.v1.message_pb2.ScheduleListEntry ]: ... - next_page_token: builtins.bytes def __init__( self, *, @@ -5614,18 +6377,108 @@ class ListSchedulesResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "next_page_token", b"next_page_token", "schedules", b"schedules" ], ) -> None: ... global___ListSchedulesResponse = ListSchedulesResponse +@typing.final +class CountSchedulesRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + namespace: builtins.str + query: builtins.str + """Visibility query, see https://docs.temporal.io/list-filter for the syntax.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + query: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["namespace", b"namespace", "query", b"query"] + ) -> None: ... + +global___CountSchedulesRequest = CountSchedulesRequest + +@typing.final +class CountSchedulesResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class AggregationGroup(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + GROUP_VALUES_FIELD_NUMBER: builtins.int + COUNT_FIELD_NUMBER: builtins.int + count: builtins.int + @property + def group_values( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Payload + ]: ... + def __init__( + self, + *, + group_values: collections.abc.Iterable[ + temporalio.api.common.v1.message_pb2.Payload + ] + | None = ..., + count: builtins.int = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "count", b"count", "group_values", b"group_values" + ], + ) -> None: ... + + COUNT_FIELD_NUMBER: builtins.int + GROUPS_FIELD_NUMBER: builtins.int + count: builtins.int + """If `query` is not grouping by any field, the count is an approximate number + of schedules that match the query. + If `query` is grouping by a field, the count is simply the sum of the counts + of the groups returned in the response. This number can be smaller than the + total number of schedules matching the query. + """ + @property + def groups( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___CountSchedulesResponse.AggregationGroup + ]: + """Contains the groups if the request is grouping by a field. + The list might not be complete, and the counts of each group is approximate. + """ + + def __init__( + self, + *, + count: builtins.int = ..., + groups: collections.abc.Iterable[ + global___CountSchedulesResponse.AggregationGroup + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["count", b"count", "groups", b"groups"] + ) -> None: ... + +global___CountSchedulesResponse = CountSchedulesResponse + +@typing.final class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): """[cleanup-wv-pre-release]""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class AddNewCompatibleVersion(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5653,7 +6506,7 @@ class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "existing_compatible_build_id", b"existing_compatible_build_id", "make_set_default", @@ -5663,6 +6516,7 @@ class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): ], ) -> None: ... + @typing.final class MergeSets(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5680,7 +6534,7 @@ class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "primary_set_build_id", b"primary_set_build_id", "secondary_set_build_id", @@ -5709,11 +6563,6 @@ class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: In makes perfect sense here. --) """ - @property - def add_new_compatible_build_id( - self, - ) -> global___UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion: - """Adds a new id to an existing compatible set, see sub-message definition for more.""" promote_set_by_build_id: builtins.str """Promote an existing set to be the current default (if it isn't already) by targeting an existing build id within it. This field's value is the extant build id. @@ -5727,6 +6576,12 @@ class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: Within makes perfect sense here. --) """ + @property + def add_new_compatible_build_id( + self, + ) -> global___UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion: + """Adds a new id to an existing compatible set, see sub-message definition for more.""" + @property def merge_sets(self) -> global___UpdateWorkerBuildIdCompatibilityRequest.MergeSets: """Merge two existing sets together, thus declaring all build IDs in both sets compatible @@ -5735,6 +6590,7 @@ class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): declare as compatible. The unusual case of incomplete replication during failover could also result in a split set, which this operation can repair. """ + def __init__( self, *, @@ -5750,7 +6606,7 @@ class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "add_new_build_id_in_new_default_set", b"add_new_build_id_in_new_default_set", "add_new_compatible_build_id", @@ -5767,7 +6623,7 @@ class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "add_new_build_id_in_new_default_set", b"add_new_build_id_in_new_default_set", "add_new_compatible_build_id", @@ -5787,9 +6643,9 @@ class UpdateWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["operation", b"operation"] + self, oneof_group: typing.Literal["operation", b"operation"] ) -> ( - typing_extensions.Literal[ + typing.Literal[ "add_new_build_id_in_new_default_set", "add_new_compatible_build_id", "promote_set_by_build_id", @@ -5803,6 +6659,7 @@ global___UpdateWorkerBuildIdCompatibilityRequest = ( UpdateWorkerBuildIdCompatibilityRequest ) +@typing.final class UpdateWorkerBuildIdCompatibilityResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release]""" @@ -5816,6 +6673,7 @@ global___UpdateWorkerBuildIdCompatibilityResponse = ( UpdateWorkerBuildIdCompatibilityResponse ) +@typing.final class GetWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): """[cleanup-wv-pre-release]""" @@ -5840,7 +6698,7 @@ class GetWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "max_sets", b"max_sets", "namespace", @@ -5852,6 +6710,7 @@ class GetWorkerBuildIdCompatibilityRequest(google.protobuf.message.Message): global___GetWorkerBuildIdCompatibilityRequest = GetWorkerBuildIdCompatibilityRequest +@typing.final class GetWorkerBuildIdCompatibilityResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release]""" @@ -5870,6 +6729,7 @@ class GetWorkerBuildIdCompatibilityResponse(google.protobuf.message.Message): There may be fewer sets returned than exist, if the request chose to limit this response. """ + def __init__( self, *, @@ -5879,14 +6739,12 @@ class GetWorkerBuildIdCompatibilityResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "major_version_sets", b"major_version_sets" - ], + self, field_name: typing.Literal["major_version_sets", b"major_version_sets"] ) -> None: ... global___GetWorkerBuildIdCompatibilityResponse = GetWorkerBuildIdCompatibilityResponse +@typing.final class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): """(-- api-linter: core::0134::request-mask-required=disabled aip.dev/not-precedent: UpdateNamespace RPC doesn't follow Google API format. --) @@ -5897,6 +6755,7 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class InsertBuildIdAssignmentRule(google.protobuf.message.Message): """Inserts the rule to the list of assignment rules for this Task Queue. The rules are evaluated in order, starting from index 0. The first @@ -5925,15 +6784,14 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["rule", b"rule"] + self, field_name: typing.Literal["rule", b"rule"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "rule", b"rule", "rule_index", b"rule_index" - ], + field_name: typing.Literal["rule", b"rule", "rule_index", b"rule_index"], ) -> None: ... + @typing.final class ReplaceBuildIdAssignmentRule(google.protobuf.message.Message): """Replaces the assignment rule at a given index.""" @@ -5943,10 +6801,6 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): RULE_FIELD_NUMBER: builtins.int FORCE_FIELD_NUMBER: builtins.int rule_index: builtins.int - @property - def rule( - self, - ) -> temporalio.api.taskqueue.v1.message_pb2.BuildIdAssignmentRule: ... force: builtins.bool """By default presence of one unconditional rule is enforced, otherwise the replace operation will be rejected. Set `force` to true to @@ -5954,6 +6808,10 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): - Has no hint filter - Has no ramp """ + @property + def rule( + self, + ) -> temporalio.api.taskqueue.v1.message_pb2.BuildIdAssignmentRule: ... def __init__( self, *, @@ -5963,15 +6821,16 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): force: builtins.bool = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["rule", b"rule"] + self, field_name: typing.Literal["rule", b"rule"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "force", b"force", "rule", b"rule", "rule_index", b"rule_index" ], ) -> None: ... + @typing.final class DeleteBuildIdAssignmentRule(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -5993,11 +6852,10 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "force", b"force", "rule_index", b"rule_index" - ], + field_name: typing.Literal["force", b"force", "rule_index", b"rule_index"], ) -> None: ... + @typing.final class AddCompatibleBuildIdRedirectRule(google.protobuf.message.Message): """Adds the rule to the list of redirect rules for this Task Queue. There can be at most one redirect rule for each distinct Source Build ID. @@ -6017,12 +6875,11 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["rule", b"rule"] + self, field_name: typing.Literal["rule", b"rule"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["rule", b"rule"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["rule", b"rule"]) -> None: ... + @typing.final class ReplaceCompatibleBuildIdRedirectRule(google.protobuf.message.Message): """Replaces the routing rule with the given source Build ID.""" @@ -6040,12 +6897,11 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["rule", b"rule"] + self, field_name: typing.Literal["rule", b"rule"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["rule", b"rule"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["rule", b"rule"]) -> None: ... + @typing.final class DeleteCompatibleBuildIdRedirectRule(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -6057,12 +6913,10 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): source_build_id: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "source_build_id", b"source_build_id" - ], + self, field_name: typing.Literal["source_build_id", b"source_build_id"] ) -> None: ... + @typing.final class CommitBuildId(google.protobuf.message.Message): """This command is intended to be used to complete the rollout of a Build ID and cleanup unnecessary rules possibly created during a gradual @@ -6093,7 +6947,7 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "force", b"force", "target_build_id", b"target_build_id" ], ) -> None: ... @@ -6174,7 +7028,7 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "add_compatible_redirect_rule", b"add_compatible_redirect_rule", "commit_build_id", @@ -6195,7 +7049,7 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "add_compatible_redirect_rule", b"add_compatible_redirect_rule", "commit_build_id", @@ -6221,9 +7075,9 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["operation", b"operation"] + self, oneof_group: typing.Literal["operation", b"operation"] ) -> ( - typing_extensions.Literal[ + typing.Literal[ "insert_assignment_rule", "replace_assignment_rule", "delete_assignment_rule", @@ -6237,6 +7091,7 @@ class UpdateWorkerVersioningRulesRequest(google.protobuf.message.Message): global___UpdateWorkerVersioningRulesRequest = UpdateWorkerVersioningRulesRequest +@typing.final class UpdateWorkerVersioningRulesResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release]""" @@ -6245,6 +7100,11 @@ class UpdateWorkerVersioningRulesResponse(google.protobuf.message.Message): ASSIGNMENT_RULES_FIELD_NUMBER: builtins.int COMPATIBLE_REDIRECT_RULES_FIELD_NUMBER: builtins.int CONFLICT_TOKEN_FIELD_NUMBER: builtins.int + conflict_token: builtins.bytes + """This value can be passed back to UpdateWorkerVersioningRulesRequest to + ensure that the rules were not modified between the two updates, which + could lead to lost updates and other confusion. + """ @property def assignment_rules( self, @@ -6257,11 +7117,6 @@ class UpdateWorkerVersioningRulesResponse(google.protobuf.message.Message): ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.taskqueue.v1.message_pb2.TimestampedCompatibleBuildIdRedirectRule ]: ... - conflict_token: builtins.bytes - """This value can be passed back to UpdateWorkerVersioningRulesRequest to - ensure that the rules were not modified between the two updates, which - could lead to lost updates and other confusion. - """ def __init__( self, *, @@ -6277,7 +7132,7 @@ class UpdateWorkerVersioningRulesResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "assignment_rules", b"assignment_rules", "compatible_redirect_rules", @@ -6289,6 +7144,7 @@ class UpdateWorkerVersioningRulesResponse(google.protobuf.message.Message): global___UpdateWorkerVersioningRulesResponse = UpdateWorkerVersioningRulesResponse +@typing.final class GetWorkerVersioningRulesRequest(google.protobuf.message.Message): """[cleanup-wv-pre-release]""" @@ -6306,13 +7162,14 @@ class GetWorkerVersioningRulesRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "task_queue", b"task_queue" ], ) -> None: ... global___GetWorkerVersioningRulesRequest = GetWorkerVersioningRulesRequest +@typing.final class GetWorkerVersioningRulesResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release]""" @@ -6321,6 +7178,11 @@ class GetWorkerVersioningRulesResponse(google.protobuf.message.Message): ASSIGNMENT_RULES_FIELD_NUMBER: builtins.int COMPATIBLE_REDIRECT_RULES_FIELD_NUMBER: builtins.int CONFLICT_TOKEN_FIELD_NUMBER: builtins.int + conflict_token: builtins.bytes + """This value can be passed back to UpdateWorkerVersioningRulesRequest to + ensure that the rules were not modified between this List and the Update, + which could lead to lost updates and other confusion. + """ @property def assignment_rules( self, @@ -6333,11 +7195,6 @@ class GetWorkerVersioningRulesResponse(google.protobuf.message.Message): ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.taskqueue.v1.message_pb2.TimestampedCompatibleBuildIdRedirectRule ]: ... - conflict_token: builtins.bytes - """This value can be passed back to UpdateWorkerVersioningRulesRequest to - ensure that the rules were not modified between this List and the Update, - which could lead to lost updates and other confusion. - """ def __init__( self, *, @@ -6353,7 +7210,7 @@ class GetWorkerVersioningRulesResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "assignment_rules", b"assignment_rules", "compatible_redirect_rules", @@ -6365,6 +7222,7 @@ class GetWorkerVersioningRulesResponse(google.protobuf.message.Message): global___GetWorkerVersioningRulesResponse = GetWorkerVersioningRulesResponse +@typing.final class GetWorkerTaskReachabilityRequest(google.protobuf.message.Message): """[cleanup-wv-pre-release] Deprecated. Use `DescribeTaskQueue`. @@ -6377,6 +7235,14 @@ class GetWorkerTaskReachabilityRequest(google.protobuf.message.Message): TASK_QUEUES_FIELD_NUMBER: builtins.int REACHABILITY_FIELD_NUMBER: builtins.int namespace: builtins.str + reachability: temporalio.api.enums.v1.task_queue_pb2.TaskReachability.ValueType + """Type of reachability to query for. + `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response. + Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows. + Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left + unspecified. + See the TaskReachability docstring for information about each enum variant. + """ @property def build_ids( self, @@ -6386,6 +7252,7 @@ class GetWorkerTaskReachabilityRequest(google.protobuf.message.Message): Open source users can adjust this limit by setting the server's dynamic config value for `limit.reachabilityQueryBuildIds` with the caveat that this call can strain the visibility store. """ + @property def task_queues( self, @@ -6396,14 +7263,7 @@ class GetWorkerTaskReachabilityRequest(google.protobuf.message.Message): The number of task queues that the server will fetch reachability information for is limited. See the `GetWorkerTaskReachabilityResponse` documentation for more information. """ - reachability: temporalio.api.enums.v1.task_queue_pb2.TaskReachability.ValueType - """Type of reachability to query for. - `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response. - Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows. - Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left - unspecified. - See the TaskReachability docstring for information about each enum variant. - """ + def __init__( self, *, @@ -6414,7 +7274,7 @@ class GetWorkerTaskReachabilityRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_ids", b"build_ids", "namespace", @@ -6428,6 +7288,7 @@ class GetWorkerTaskReachabilityRequest(google.protobuf.message.Message): global___GetWorkerTaskReachabilityRequest = GetWorkerTaskReachabilityRequest +@typing.final class GetWorkerTaskReachabilityResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release] Deprecated. Use `DescribeTaskQueue`. @@ -6452,6 +7313,7 @@ class GetWorkerTaskReachabilityResponse(google.protobuf.message.Message): Open source users can adjust this limit by setting the server's dynamic config value for `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. """ + def __init__( self, *, @@ -6462,13 +7324,12 @@ class GetWorkerTaskReachabilityResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "build_id_reachability", b"build_id_reachability" - ], + field_name: typing.Literal["build_id_reachability", b"build_id_reachability"], ) -> None: ... global___GetWorkerTaskReachabilityResponse = GetWorkerTaskReachabilityResponse +@typing.final class UpdateWorkflowExecutionRequest(google.protobuf.message.Message): """(-- api-linter: core::0134=disabled aip.dev/not-precedent: Update RPCs don't follow Google API format. --) @@ -6483,6 +7344,11 @@ class UpdateWorkflowExecutionRequest(google.protobuf.message.Message): REQUEST_FIELD_NUMBER: builtins.int namespace: builtins.str """The namespace name of the target Workflow.""" + first_execution_run_id: builtins.str + """If set, this call will error if the most recent (if no Run Id is set on + `workflow_execution`), or specified (if it is) Workflow Execution is not + part of the same execution chain as this Id. + """ @property def workflow_execution( self, @@ -6491,11 +7357,7 @@ class UpdateWorkflowExecutionRequest(google.protobuf.message.Message): (-- api-linter: core::0203::optional=disabled aip.dev/not-precedent: false positive triggered by the word "optional" --) """ - first_execution_run_id: builtins.str - """If set, this call will error if the most recent (if no Run Id is set on - `workflow_execution`), or specified (if it is) Workflow Execution is not - part of the same execution chain as this Id. - """ + @property def wait_policy(self) -> temporalio.api.update.v1.message_pb2.WaitPolicy: """Specifies client's intent to wait for Update results. @@ -6504,11 +7366,13 @@ class UpdateWorkflowExecutionRequest(google.protobuf.message.Message): user specified timeout, API call returns even if specified stage is not reached. Actual reached stage will be included in the response. """ + @property def request(self) -> temporalio.api.update.v1.message_pb2.Request: """The request information that will be delivered all the way down to the Workflow Execution. """ + def __init__( self, *, @@ -6521,7 +7385,7 @@ class UpdateWorkflowExecutionRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "request", b"request", "wait_policy", @@ -6532,7 +7396,7 @@ class UpdateWorkflowExecutionRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "first_execution_run_id", b"first_execution_run_id", "namespace", @@ -6548,21 +7412,15 @@ class UpdateWorkflowExecutionRequest(google.protobuf.message.Message): global___UpdateWorkflowExecutionRequest = UpdateWorkflowExecutionRequest +@typing.final class UpdateWorkflowExecutionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor UPDATE_REF_FIELD_NUMBER: builtins.int OUTCOME_FIELD_NUMBER: builtins.int STAGE_FIELD_NUMBER: builtins.int - @property - def update_ref(self) -> temporalio.api.update.v1.message_pb2.UpdateRef: - """Enough information for subsequent poll calls if needed. Never null.""" - @property - def outcome(self) -> temporalio.api.update.v1.message_pb2.Outcome: - """The outcome of the Update if and only if the Workflow Update - has completed. If this response is being returned before the Update has - completed then this field will not be set. - """ + LINK_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int stage: temporalio.api.enums.v1.update_pb2.UpdateWorkflowExecutionLifecycleStage.ValueType """The most advanced lifecycle stage that the Update is known to have reached, where lifecycle stages are ordered @@ -6575,28 +7433,69 @@ class UpdateWorkflowExecutionResponse(google.protobuf.message.Message): request WaitPolicy, and before the context deadline expired; clients may may then retry the call as needed. """ + @property + def update_ref(self) -> temporalio.api.update.v1.message_pb2.UpdateRef: + """Enough information for subsequent poll calls if needed. Never null.""" + + @property + def outcome(self) -> temporalio.api.update.v1.message_pb2.Outcome: + """The outcome of the Update if and only if the Workflow Update + has completed. If this response is being returned before the Update has + completed then this field will not be set. + """ + + @property + def link(self) -> temporalio.api.common.v1.message_pb2.Link: + """Link to the update event. May be null if the update has not yet been accepted.""" + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this update.""" + def __init__( self, *, update_ref: temporalio.api.update.v1.message_pb2.UpdateRef | None = ..., outcome: temporalio.api.update.v1.message_pb2.Outcome | None = ..., stage: temporalio.api.enums.v1.update_pb2.UpdateWorkflowExecutionLifecycleStage.ValueType = ..., - ) -> None: ... + link: temporalio.api.common.v1.message_pb2.Link | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., + ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "outcome", b"outcome", "update_ref", b"update_ref" + field_name: typing.Literal[ + "link", + b"link", + "outcome", + b"outcome", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "update_ref", + b"update_ref", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "outcome", b"outcome", "stage", b"stage", "update_ref", b"update_ref" + field_name: typing.Literal[ + "link", + b"link", + "outcome", + b"outcome", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "stage", + b"stage", + "update_ref", + b"update_ref", ], ) -> None: ... global___UpdateWorkflowExecutionResponse = UpdateWorkflowExecutionResponse +@typing.final class StartBatchOperationRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -6605,6 +7504,7 @@ class StartBatchOperationRequest(google.protobuf.message.Message): JOB_ID_FIELD_NUMBER: builtins.int REASON_FIELD_NUMBER: builtins.int EXECUTIONS_FIELD_NUMBER: builtins.int + TARGET_EXECUTIONS_FIELD_NUMBER: builtins.int MAX_OPERATIONS_PER_SECOND_FIELD_NUMBER: builtins.int TERMINATION_OPERATION_FIELD_NUMBER: builtins.int SIGNAL_OPERATION_FIELD_NUMBER: builtins.int @@ -6615,6 +7515,9 @@ class StartBatchOperationRequest(google.protobuf.message.Message): UNPAUSE_ACTIVITIES_OPERATION_FIELD_NUMBER: builtins.int RESET_ACTIVITIES_OPERATION_FIELD_NUMBER: builtins.int UPDATE_ACTIVITY_OPTIONS_OPERATION_FIELD_NUMBER: builtins.int + CANCEL_ACTIVITIES_OPERATION_FIELD_NUMBER: builtins.int + TERMINATE_ACTIVITIES_OPERATION_FIELD_NUMBER: builtins.int + DELETE_ACTIVITIES_OPERATION_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace that contains the batch operation""" visibility_query: builtins.str @@ -6625,6 +7528,14 @@ class StartBatchOperationRequest(google.protobuf.message.Message): """Job ID defines the unique ID for the batch job""" reason: builtins.str """Reason to perform the batch operation""" + max_operations_per_second: builtins.float + """Limit for the number of operations processed per second within this batch. + Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system + overload and minimize potential delays in executing ongoing tasks for user workers. + Note that when no explicit limit is provided, the server will operate according to its limit defined by the + dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the + server's configured limit. + """ @property def executions( self, @@ -6633,15 +7544,19 @@ class StartBatchOperationRequest(google.protobuf.message.Message): ]: """Executions to apply the batch operation This field and `visibility_query` are mutually exclusive + DEPRECATED: Use `target_executions` instead. """ - max_operations_per_second: builtins.float - """Limit for the number of operations processed per second within this batch. - Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system - overload and minimize potential delays in executing ongoing tasks for user workers. - Note that when no explicit limit is provided, the server will operate according to its limit defined by the - dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the - server's configured limit. - """ + + @property + def target_executions( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Execution + ]: + """Target executions to apply the batch operation. This field and `visibility_query` + are mutually exclusive. + """ + @property def termination_operation( self, @@ -6680,6 +7595,18 @@ class StartBatchOperationRequest(google.protobuf.message.Message): def update_activity_options_operation( self, ) -> temporalio.api.batch.v1.message_pb2.BatchOperationUpdateActivityOptions: ... + @property + def cancel_activities_operation( + self, + ) -> temporalio.api.batch.v1.message_pb2.BatchOperationCancelActivities: ... + @property + def terminate_activities_operation( + self, + ) -> temporalio.api.batch.v1.message_pb2.BatchOperationTerminateActivities: ... + @property + def delete_activities_operation( + self, + ) -> temporalio.api.batch.v1.message_pb2.BatchOperationDeleteActivities: ... def __init__( self, *, @@ -6691,6 +7618,10 @@ class StartBatchOperationRequest(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.WorkflowExecution ] | None = ..., + target_executions: collections.abc.Iterable[ + temporalio.api.common.v1.message_pb2.Execution + ] + | None = ..., max_operations_per_second: builtins.float = ..., termination_operation: temporalio.api.batch.v1.message_pb2.BatchOperationTermination | None = ..., @@ -6710,12 +7641,22 @@ class StartBatchOperationRequest(google.protobuf.message.Message): | None = ..., update_activity_options_operation: temporalio.api.batch.v1.message_pb2.BatchOperationUpdateActivityOptions | None = ..., + cancel_activities_operation: temporalio.api.batch.v1.message_pb2.BatchOperationCancelActivities + | None = ..., + terminate_activities_operation: temporalio.api.batch.v1.message_pb2.BatchOperationTerminateActivities + | None = ..., + delete_activities_operation: temporalio.api.batch.v1.message_pb2.BatchOperationDeleteActivities + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "cancel_activities_operation", + b"cancel_activities_operation", "cancellation_operation", b"cancellation_operation", + "delete_activities_operation", + b"delete_activities_operation", "deletion_operation", b"deletion_operation", "operation", @@ -6726,6 +7667,8 @@ class StartBatchOperationRequest(google.protobuf.message.Message): b"reset_operation", "signal_operation", b"signal_operation", + "terminate_activities_operation", + b"terminate_activities_operation", "termination_operation", b"termination_operation", "unpause_activities_operation", @@ -6738,9 +7681,13 @@ class StartBatchOperationRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "cancel_activities_operation", + b"cancel_activities_operation", "cancellation_operation", b"cancellation_operation", + "delete_activities_operation", + b"delete_activities_operation", "deletion_operation", b"deletion_operation", "executions", @@ -6761,6 +7708,10 @@ class StartBatchOperationRequest(google.protobuf.message.Message): b"reset_operation", "signal_operation", b"signal_operation", + "target_executions", + b"target_executions", + "terminate_activities_operation", + b"terminate_activities_operation", "termination_operation", b"termination_operation", "unpause_activities_operation", @@ -6774,9 +7725,9 @@ class StartBatchOperationRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["operation", b"operation"] + self, oneof_group: typing.Literal["operation", b"operation"] ) -> ( - typing_extensions.Literal[ + typing.Literal[ "termination_operation", "signal_operation", "cancellation_operation", @@ -6786,12 +7737,16 @@ class StartBatchOperationRequest(google.protobuf.message.Message): "unpause_activities_operation", "reset_activities_operation", "update_activity_options_operation", + "cancel_activities_operation", + "terminate_activities_operation", + "delete_activities_operation", ] | None ): ... global___StartBatchOperationRequest = StartBatchOperationRequest +@typing.final class StartBatchOperationResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -6801,6 +7756,7 @@ class StartBatchOperationResponse(google.protobuf.message.Message): global___StartBatchOperationResponse = StartBatchOperationResponse +@typing.final class StopBatchOperationRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -6826,7 +7782,7 @@ class StopBatchOperationRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "job_id", @@ -6840,6 +7796,7 @@ class StopBatchOperationRequest(google.protobuf.message.Message): global___StopBatchOperationRequest = StopBatchOperationRequest +@typing.final class StopBatchOperationResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -6849,6 +7806,7 @@ class StopBatchOperationResponse(google.protobuf.message.Message): global___StopBatchOperationResponse = StopBatchOperationResponse +@typing.final class DescribeBatchOperationRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -6865,14 +7823,12 @@ class DescribeBatchOperationRequest(google.protobuf.message.Message): job_id: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "job_id", b"job_id", "namespace", b"namespace" - ], + self, field_name: typing.Literal["job_id", b"job_id", "namespace", b"namespace"] ) -> None: ... global___DescribeBatchOperationRequest = DescribeBatchOperationRequest +@typing.final class DescribeBatchOperationResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -6886,6 +7842,8 @@ class DescribeBatchOperationResponse(google.protobuf.message.Message): FAILURE_OPERATION_COUNT_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int REASON_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + EXECUTIONS_FIELD_NUMBER: builtins.int operation_type: ( temporalio.api.enums.v1.batch_operation_pb2.BatchOperationType.ValueType ) @@ -6894,12 +7852,6 @@ class DescribeBatchOperationResponse(google.protobuf.message.Message): """Batch job ID""" state: temporalio.api.enums.v1.batch_operation_pb2.BatchOperationState.ValueType """Batch operation state""" - @property - def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: - """Batch operation start time""" - @property - def close_time(self) -> google.protobuf.timestamp_pb2.Timestamp: - """Batch operation close time""" total_operation_count: builtins.int """Total operation count""" complete_operation_count: builtins.int @@ -6910,6 +7862,24 @@ class DescribeBatchOperationResponse(google.protobuf.message.Message): """Identity indicates the operator identity""" reason: builtins.str """Reason indicates the reason to stop a operation""" + query: builtins.str + """Query is the visibility query that defines the group of workflow to apply the batch operation""" + @property + def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Batch operation start time""" + + @property + def close_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Batch operation close time""" + + @property + def executions( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Execution + ]: + """Executions is the list of workflow OR standalone activity executions to apply the batch operation""" + def __init__( self, *, @@ -6923,20 +7893,27 @@ class DescribeBatchOperationResponse(google.protobuf.message.Message): failure_operation_count: builtins.int = ..., identity: builtins.str = ..., reason: builtins.str = ..., + query: builtins.str = ..., + executions: collections.abc.Iterable[ + temporalio.api.common.v1.message_pb2.Execution + ] + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "close_time", b"close_time", "start_time", b"start_time" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "close_time", b"close_time", "complete_operation_count", b"complete_operation_count", + "executions", + b"executions", "failure_operation_count", b"failure_operation_count", "identity", @@ -6945,6 +7922,8 @@ class DescribeBatchOperationResponse(google.protobuf.message.Message): b"job_id", "operation_type", b"operation_type", + "query", + b"query", "reason", b"reason", "start_time", @@ -6958,6 +7937,7 @@ class DescribeBatchOperationResponse(google.protobuf.message.Message): global___DescribeBatchOperationResponse = DescribeBatchOperationResponse +@typing.final class ListBatchOperationsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -6979,7 +7959,7 @@ class ListBatchOperationsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "next_page_token", @@ -6991,11 +7971,13 @@ class ListBatchOperationsRequest(google.protobuf.message.Message): global___ListBatchOperationsRequest = ListBatchOperationsRequest +@typing.final class ListBatchOperationsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor OPERATION_INFO_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def operation_info( self, @@ -7003,7 +7985,7 @@ class ListBatchOperationsResponse(google.protobuf.message.Message): temporalio.api.batch.v1.message_pb2.BatchOperationInfo ]: """BatchOperationInfo contains the basic info about batch operation""" - next_page_token: builtins.bytes + def __init__( self, *, @@ -7015,13 +7997,14 @@ class ListBatchOperationsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "next_page_token", b"next_page_token", "operation_info", b"operation_info" ], ) -> None: ... global___ListBatchOperationsResponse = ListBatchOperationsResponse +@typing.final class PollWorkflowExecutionUpdateRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -7033,16 +8016,18 @@ class PollWorkflowExecutionUpdateRequest(google.protobuf.message.Message): """The namespace of the Workflow Execution to which the Update was originally issued. """ + identity: builtins.str + """The identity of the worker/client who is polling this Update outcome.""" @property def update_ref(self) -> temporalio.api.update.v1.message_pb2.UpdateRef: """The Update reference returned in the initial UpdateWorkflowExecutionResponse.""" - identity: builtins.str - """The identity of the worker/client who is polling this Update outcome.""" + @property def wait_policy(self) -> temporalio.api.update.v1.message_pb2.WaitPolicy: """Specifies client's intent to wait for Update results. Omit to request a non-blocking poll. """ + def __init__( self, *, @@ -7053,13 +8038,13 @@ class PollWorkflowExecutionUpdateRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "update_ref", b"update_ref", "wait_policy", b"wait_policy" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", @@ -7073,20 +8058,14 @@ class PollWorkflowExecutionUpdateRequest(google.protobuf.message.Message): global___PollWorkflowExecutionUpdateRequest = PollWorkflowExecutionUpdateRequest +@typing.final class PollWorkflowExecutionUpdateResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor OUTCOME_FIELD_NUMBER: builtins.int STAGE_FIELD_NUMBER: builtins.int UPDATE_REF_FIELD_NUMBER: builtins.int - @property - def outcome(self) -> temporalio.api.update.v1.message_pb2.Outcome: - """The outcome of the update if and only if the update has completed. If - this response is being returned before the update has completed (e.g. due - to the specification of a wait policy that only waits on - UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED) then this field will - not be set. - """ + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int stage: temporalio.api.enums.v1.update_pb2.UpdateWorkflowExecutionLifecycleStage.ValueType """The most advanced lifecycle stage that the Update is known to have reached, where lifecycle stages are ordered @@ -7099,43 +8078,87 @@ class PollWorkflowExecutionUpdateResponse(google.protobuf.message.Message): request WaitPolicy, and before the context deadline expired; clients may may then retry the call as needed. """ + @property + def outcome(self) -> temporalio.api.update.v1.message_pb2.Outcome: + """The outcome of the update if and only if the update has completed. If + this response is being returned before the update has completed (e.g. due + to the specification of a wait policy that only waits on + UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED) then this field will + not be set. + """ + @property def update_ref(self) -> temporalio.api.update.v1.message_pb2.UpdateRef: """Sufficient information to address this Update.""" + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this update.""" + def __init__( self, *, outcome: temporalio.api.update.v1.message_pb2.Outcome | None = ..., stage: temporalio.api.enums.v1.update_pb2.UpdateWorkflowExecutionLifecycleStage.ValueType = ..., update_ref: temporalio.api.update.v1.message_pb2.UpdateRef | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "outcome", b"outcome", "update_ref", b"update_ref" + field_name: typing.Literal[ + "outcome", + b"outcome", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "update_ref", + b"update_ref", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "outcome", b"outcome", "stage", b"stage", "update_ref", b"update_ref" + field_name: typing.Literal[ + "outcome", + b"outcome", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "stage", + b"stage", + "update_ref", + b"update_ref", ], ) -> None: ... global___PollWorkflowExecutionUpdateResponse = PollWorkflowExecutionUpdateResponse +@typing.final class PollNexusTaskQueueRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMESPACE_FIELD_NUMBER: builtins.int - IDENTITY_FIELD_NUMBER: builtins.int TASK_QUEUE_FIELD_NUMBER: builtins.int + POLLER_GROUP_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + WORKER_INSTANCE_KEY_FIELD_NUMBER: builtins.int WORKER_VERSION_CAPABILITIES_FIELD_NUMBER: builtins.int DEPLOYMENT_OPTIONS_FIELD_NUMBER: builtins.int WORKER_HEARTBEAT_FIELD_NUMBER: builtins.int + POLLER_POOL_INFO_FIELD_NUMBER: builtins.int namespace: builtins.str + poller_group_id: builtins.str + """Unless this is the first poll, the client must pass one of the poller group IDs received in + `poller_group_infos` of the last the PollNexusTaskQueueResponse according to the + instructions. If not set, the poll is routed randomly which can cause it to be blocked + without receiving a task while the queue actually has tasks in another server location. + """ identity: builtins.str """The identity of the client who initiated this request.""" + worker_instance_key: builtins.str + """A unique key for this worker instance, used for tracking worker lifecycle. + This is guaranteed to be unique, whereas identity is not guaranteed to be unique. + """ @property def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: ... @property @@ -7146,11 +8169,13 @@ class PollNexusTaskQueueRequest(google.protobuf.message.Message): feature. See the `WorkerVersionCapabilities` docstring for more. Deprecated. Replaced by deployment_options. """ + @property def deployment_options( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions: """Worker deployment options that user has set in the worker.""" + @property def worker_heartbeat( self, @@ -7158,12 +8183,21 @@ class PollNexusTaskQueueRequest(google.protobuf.message.Message): temporalio.api.worker.v1.message_pb2.WorkerHeartbeat ]: """Worker info to be sent to the server.""" + + @property + def poller_pool_info( + self, + ) -> temporalio.api.taskqueue.v1.message_pb2.PollerPoolInfo: + """Worker-reported poller pool state. Optional.""" + def __init__( self, *, namespace: builtins.str = ..., - identity: builtins.str = ..., task_queue: temporalio.api.taskqueue.v1.message_pb2.TaskQueue | None = ..., + poller_group_id: builtins.str = ..., + identity: builtins.str = ..., + worker_instance_key: builtins.str = ..., worker_version_capabilities: temporalio.api.common.v1.message_pb2.WorkerVersionCapabilities | None = ..., deployment_options: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentOptions @@ -7172,12 +8206,16 @@ class PollNexusTaskQueueRequest(google.protobuf.message.Message): temporalio.api.worker.v1.message_pb2.WorkerHeartbeat ] | None = ..., + poller_pool_info: temporalio.api.taskqueue.v1.message_pb2.PollerPoolInfo + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_options", b"deployment_options", + "poller_pool_info", + b"poller_pool_info", "task_queue", b"task_queue", "worker_version_capabilities", @@ -7186,17 +8224,23 @@ class PollNexusTaskQueueRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_options", b"deployment_options", "identity", b"identity", "namespace", b"namespace", + "poller_group_id", + b"poller_group_id", + "poller_pool_info", + b"poller_pool_info", "task_queue", b"task_queue", "worker_heartbeat", b"worker_heartbeat", + "worker_instance_key", + b"worker_instance_key", "worker_version_capabilities", b"worker_version_capabilities", ], @@ -7204,22 +8248,61 @@ class PollNexusTaskQueueRequest(google.protobuf.message.Message): global___PollNexusTaskQueueRequest = PollNexusTaskQueueRequest +@typing.final class PollNexusTaskQueueResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor TASK_TOKEN_FIELD_NUMBER: builtins.int REQUEST_FIELD_NUMBER: builtins.int POLLER_SCALING_DECISION_FIELD_NUMBER: builtins.int + POLLER_GROUP_ID_FIELD_NUMBER: builtins.int + POLLER_GROUP_INFOS_FIELD_NUMBER: builtins.int + POLLER_GROUPS_INFO_FIELD_NUMBER: builtins.int task_token: builtins.bytes """An opaque unique identifier for this task for correlating a completion request the embedded request.""" + poller_group_id: builtins.str + """This poller group ID identifies the owner of the nexus task awaiting for synchronous + response. + Corresponding `RespondNexusTaskCompleted` and `RespondNexusTaskFailed` calls should pass this + value for proper response routing. + """ @property def request(self) -> temporalio.api.nexus.v1.message_pb2.Request: """Embedded request as translated from the incoming frontend request.""" + @property def poller_scaling_decision( self, ) -> temporalio.api.taskqueue.v1.message_pb2.PollerScalingDecision: """Server-advised information the SDK may use to adjust its poller count.""" + + @property + def poller_group_infos( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.taskqueue.v1.message_pb2.PollerGroupInfo + ]: + """The weighted list of poller groups IDs that client should use for future polls to this task + queue. Client is expected to: + 1. Maintain minimum number of pollers no less than the number of groups. + 2. Try to assign the next poll to a group without any pending polls, + 3. If every group has some pending polls, assign the next poll to a group randomly + according to the weights. + """ + + @property + def poller_groups_info( + self, + ) -> temporalio.api.taskqueue.v1.message_pb2.PollerGroupsInfo: + """The weighted, versioned list of poller groups IDs that client should use for future polls to + this task queue. Client should ignore this if it has already applied a snapshot with a + version greater than or equal to `poller_groups_info.version`. Client is expected to: + 1. Maintain minimum number of pollers no less than the number of groups. + 2. Try to assign the next poll to a group without any pending polls, + 3. If every group has some pending polls, assign the next poll to a group randomly + according to the weights. + """ + def __init__( self, *, @@ -7227,16 +8310,34 @@ class PollNexusTaskQueueResponse(google.protobuf.message.Message): request: temporalio.api.nexus.v1.message_pb2.Request | None = ..., poller_scaling_decision: temporalio.api.taskqueue.v1.message_pb2.PollerScalingDecision | None = ..., + poller_group_id: builtins.str = ..., + poller_group_infos: collections.abc.Iterable[ + temporalio.api.taskqueue.v1.message_pb2.PollerGroupInfo + ] + | None = ..., + poller_groups_info: temporalio.api.taskqueue.v1.message_pb2.PollerGroupsInfo + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "poller_scaling_decision", b"poller_scaling_decision", "request", b"request" + field_name: typing.Literal[ + "poller_groups_info", + b"poller_groups_info", + "poller_scaling_decision", + b"poller_scaling_decision", + "request", + b"request", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "poller_group_id", + b"poller_group_id", + "poller_group_infos", + b"poller_group_infos", + "poller_groups_info", + b"poller_groups_info", "poller_scaling_decision", b"poller_scaling_decision", "request", @@ -7248,6 +8349,7 @@ class PollNexusTaskQueueResponse(google.protobuf.message.Message): global___PollNexusTaskQueueResponse = PollNexusTaskQueueResponse +@typing.final class RespondNexusTaskCompletedRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -7255,14 +8357,20 @@ class RespondNexusTaskCompletedRequest(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int TASK_TOKEN_FIELD_NUMBER: builtins.int RESPONSE_FIELD_NUMBER: builtins.int + POLLER_GROUP_ID_FIELD_NUMBER: builtins.int namespace: builtins.str identity: builtins.str """The identity of the client who initiated this request.""" task_token: builtins.bytes """A unique identifier for this task as received via a poll response.""" + poller_group_id: builtins.str + """Client must forward the poller_group_id received in PollNexusTaskQueueResponse for proper + routing of the response. + """ @property def response(self) -> temporalio.api.nexus.v1.message_pb2.Response: """Embedded response to be translated into a frontend response.""" + def __init__( self, *, @@ -7270,17 +8378,20 @@ class RespondNexusTaskCompletedRequest(google.protobuf.message.Message): identity: builtins.str = ..., task_token: builtins.bytes = ..., response: temporalio.api.nexus.v1.message_pb2.Response | None = ..., + poller_group_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["response", b"response"] + self, field_name: typing.Literal["response", b"response"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", b"namespace", + "poller_group_id", + b"poller_group_id", "response", b"response", "task_token", @@ -7290,6 +8401,7 @@ class RespondNexusTaskCompletedRequest(google.protobuf.message.Message): global___RespondNexusTaskCompletedRequest = RespondNexusTaskCompletedRequest +@typing.final class RespondNexusTaskCompletedResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -7299,6 +8411,7 @@ class RespondNexusTaskCompletedResponse(google.protobuf.message.Message): global___RespondNexusTaskCompletedResponse = RespondNexusTaskCompletedResponse +@typing.final class RespondNexusTaskFailedRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -7306,14 +8419,25 @@ class RespondNexusTaskFailedRequest(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int TASK_TOKEN_FIELD_NUMBER: builtins.int ERROR_FIELD_NUMBER: builtins.int + FAILURE_FIELD_NUMBER: builtins.int + POLLER_GROUP_ID_FIELD_NUMBER: builtins.int namespace: builtins.str identity: builtins.str """The identity of the client who initiated this request.""" task_token: builtins.bytes """A unique identifier for this task.""" + poller_group_id: builtins.str + """Client must forward the poller_group_id received in PollNexusTaskQueueResponse for proper + routing of the response. + """ @property def error(self) -> temporalio.api.nexus.v1.message_pb2.HandlerError: - """The error the handler failed with.""" + """Deprecated. Use the failure field instead.""" + + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The error the handler failed with. Must contain a NexusHandlerFailureInfo object.""" + def __init__( self, *, @@ -7321,19 +8445,25 @@ class RespondNexusTaskFailedRequest(google.protobuf.message.Message): identity: builtins.str = ..., task_token: builtins.bytes = ..., error: temporalio.api.nexus.v1.message_pb2.HandlerError | None = ..., + failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., + poller_group_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["error", b"error"] + self, field_name: typing.Literal["error", b"error", "failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "error", b"error", + "failure", + b"failure", "identity", b"identity", "namespace", b"namespace", + "poller_group_id", + b"poller_group_id", "task_token", b"task_token", ], @@ -7341,6 +8471,7 @@ class RespondNexusTaskFailedRequest(google.protobuf.message.Message): global___RespondNexusTaskFailedRequest = RespondNexusTaskFailedRequest +@typing.final class RespondNexusTaskFailedResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -7350,9 +8481,11 @@ class RespondNexusTaskFailedResponse(google.protobuf.message.Message): global___RespondNexusTaskFailedResponse = RespondNexusTaskFailedResponse +@typing.final class ExecuteMultiOperationRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class Operation(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -7365,12 +8498,14 @@ class ExecuteMultiOperationRequest(google.protobuf.message.Message): - setting `request_eager_execution` is invalid - setting `workflow_start_delay` is invalid """ + @property def update_workflow(self) -> global___UpdateWorkflowExecutionRequest: """Additional restrictions: - setting `first_execution_run_id` is invalid - setting `workflow_execution.run_id` is invalid """ + def __init__( self, *, @@ -7379,7 +8514,7 @@ class ExecuteMultiOperationRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "operation", b"operation", "start_workflow", @@ -7390,7 +8525,7 @@ class ExecuteMultiOperationRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "operation", b"operation", "start_workflow", @@ -7400,12 +8535,15 @@ class ExecuteMultiOperationRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["operation", b"operation"] - ) -> typing_extensions.Literal["start_workflow", "update_workflow"] | None: ... + self, oneof_group: typing.Literal["operation", b"operation"] + ) -> typing.Literal["start_workflow", "update_workflow"] | None: ... NAMESPACE_FIELD_NUMBER: builtins.int OPERATIONS_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int namespace: builtins.str + resource_id: builtins.str + """Resource ID for routing. Should match operations[0].start_workflow.workflow_id""" @property def operations( self, @@ -7421,6 +8559,7 @@ class ExecuteMultiOperationRequest(google.protobuf.message.Message): Note that additional operation-specific restrictions have to be considered. """ + def __init__( self, *, @@ -7429,16 +8568,23 @@ class ExecuteMultiOperationRequest(google.protobuf.message.Message): global___ExecuteMultiOperationRequest.Operation ] | None = ..., + resource_id: builtins.str = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "namespace", b"namespace", "operations", b"operations" + field_name: typing.Literal[ + "namespace", + b"namespace", + "operations", + b"operations", + "resource_id", + b"resource_id", ], ) -> None: ... global___ExecuteMultiOperationRequest = ExecuteMultiOperationRequest +@typing.final class ExecuteMultiOperationResponse(google.protobuf.message.Message): """IMPORTANT: For [StartWorkflow, UpdateWorkflow] combination ("Update-with-Start") when both 1. the workflow update for the requested update ID has already completed, and @@ -7450,6 +8596,7 @@ class ExecuteMultiOperationResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class Response(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -7467,7 +8614,7 @@ class ExecuteMultiOperationResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "response", b"response", "start_workflow", @@ -7478,7 +8625,7 @@ class ExecuteMultiOperationResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "response", b"response", "start_workflow", @@ -7488,8 +8635,8 @@ class ExecuteMultiOperationResponse(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["response", b"response"] - ) -> typing_extensions.Literal["start_workflow", "update_workflow"] | None: ... + self, oneof_group: typing.Literal["response", b"response"] + ) -> typing.Literal["start_workflow", "update_workflow"] | None: ... RESPONSES_FIELD_NUMBER: builtins.int @property @@ -7507,13 +8654,16 @@ class ExecuteMultiOperationResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["responses", b"responses"] + self, field_name: typing.Literal["responses", b"responses"] ) -> None: ... global___ExecuteMultiOperationResponse = ExecuteMultiOperationResponse +@typing.final class UpdateActivityOptionsRequest(google.protobuf.message.Message): - """NOTE: keep in sync with temporalio.api.batch.v1.BatchOperationUpdateActivityOptions""" + """NOTE: keep in sync with temporalio.api.batch.v1.BatchOperationUpdateActivityOptions + Deprecated. Use `UpdateActivityExecutionOptionsRequest`. + """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -7528,19 +8678,8 @@ class UpdateActivityOptionsRequest(google.protobuf.message.Message): RESTORE_ORIGINAL_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace of the workflow which scheduled this activity""" - @property - def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: - """Execution info of the workflow which scheduled this activity""" identity: builtins.str """The identity of the client who initiated this request""" - @property - def activity_options( - self, - ) -> temporalio.api.activity.v1.message_pb2.ActivityOptions: - """Activity options. Partial updates are accepted and controlled by update_mask""" - @property - def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: - """Controls which fields from `activity_options` will be applied""" id: builtins.str """Only activity with this ID will be updated.""" type: builtins.str @@ -7550,10 +8689,24 @@ class UpdateActivityOptionsRequest(google.protobuf.message.Message): restore_original: builtins.bool """If set, the activity options will be restored to the default. Default options are then options activity was created with. - They are part of the first SCHEDULE event. + They are part of the first schedule event. This flag cannot be combined with any other option; if you supply restore_original together with other options, the request will be rejected. """ + @property + def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: + """Execution info of the workflow which scheduled this activity""" + + @property + def activity_options( + self, + ) -> temporalio.api.activity.v1.message_pb2.ActivityOptions: + """Activity options. Partial updates are accepted and controlled by update_mask""" + + @property + def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: + """Controls which fields from `activity_options` will be applied""" + def __init__( self, *, @@ -7570,7 +8723,7 @@ class UpdateActivityOptionsRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "activity_options", @@ -7589,7 +8742,7 @@ class UpdateActivityOptionsRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "activity_options", @@ -7613,51 +8766,176 @@ class UpdateActivityOptionsRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["activity", b"activity"] - ) -> typing_extensions.Literal["id", "type", "match_all"] | None: ... + self, oneof_group: typing.Literal["activity", b"activity"] + ) -> typing.Literal["id", "type", "match_all"] | None: ... global___UpdateActivityOptionsRequest = UpdateActivityOptionsRequest -class UpdateActivityOptionsResponse(google.protobuf.message.Message): +@typing.final +class UpdateActivityExecutionOptionsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + NAMESPACE_FIELD_NUMBER: builtins.int + WORKFLOW_ID_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int ACTIVITY_OPTIONS_FIELD_NUMBER: builtins.int + UPDATE_MASK_FIELD_NUMBER: builtins.int + RESTORE_ORIGINAL_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + """Namespace of the workflow which scheduled this activity""" + workflow_id: builtins.str + """If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. + """ + activity_id: builtins.str + """The ID of the activity to target.""" + run_id: builtins.str + """Run ID of the workflow or standalone activity. If empty, targets the latest run.""" + identity: builtins.str + """The identity of the client who initiated this request""" + restore_original: builtins.bool + """If set, the activity options will be restored to the default. + Default options are then options activity was created with. + They are part of the first schedule event. + This flag cannot be combined with any other option; if you supply + restore_original together with other options, the request will be rejected. + """ + resource_id: builtins.str + """Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities.""" + request_id: builtins.str + """Used to de-dupe update requests.""" @property def activity_options( self, ) -> temporalio.api.activity.v1.message_pb2.ActivityOptions: - """Activity options after an update""" + """Activity options. Partial updates are accepted and controlled by update_mask""" + + @property + def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: + """Controls which fields from `activity_options` will be applied""" + def __init__( self, *, + namespace: builtins.str = ..., + workflow_id: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., activity_options: temporalio.api.activity.v1.message_pb2.ActivityOptions | None = ..., + update_mask: google.protobuf.field_mask_pb2.FieldMask | None = ..., + restore_original: builtins.bool = ..., + resource_id: builtins.str = ..., + request_id: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal["activity_options", b"activity_options"], + field_name: typing.Literal[ + "activity_options", b"activity_options", "update_mask", b"update_mask" + ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal["activity_options", b"activity_options"], + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "activity_options", + b"activity_options", + "identity", + b"identity", + "namespace", + b"namespace", + "request_id", + b"request_id", + "resource_id", + b"resource_id", + "restore_original", + b"restore_original", + "run_id", + b"run_id", + "update_mask", + b"update_mask", + "workflow_id", + b"workflow_id", + ], ) -> None: ... -global___UpdateActivityOptionsResponse = UpdateActivityOptionsResponse +global___UpdateActivityExecutionOptionsRequest = UpdateActivityExecutionOptionsRequest + +@typing.final +class UpdateActivityOptionsResponse(google.protobuf.message.Message): + """Deprecated. Use `UpdateActivityExecutionOptionsResponse`.""" -class PauseActivityRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - NAMESPACE_FIELD_NUMBER: builtins.int - EXECUTION_FIELD_NUMBER: builtins.int + ACTIVITY_OPTIONS_FIELD_NUMBER: builtins.int + @property + def activity_options( + self, + ) -> temporalio.api.activity.v1.message_pb2.ActivityOptions: + """Activity options after an update""" + + def __init__( + self, + *, + activity_options: temporalio.api.activity.v1.message_pb2.ActivityOptions + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["activity_options", b"activity_options"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["activity_options", b"activity_options"] + ) -> None: ... + +global___UpdateActivityOptionsResponse = UpdateActivityOptionsResponse + +@typing.final +class UpdateActivityExecutionOptionsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACTIVITY_OPTIONS_FIELD_NUMBER: builtins.int + @property + def activity_options( + self, + ) -> temporalio.api.activity.v1.message_pb2.ActivityOptions: + """Activity options after an update""" + + def __init__( + self, + *, + activity_options: temporalio.api.activity.v1.message_pb2.ActivityOptions + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["activity_options", b"activity_options"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["activity_options", b"activity_options"] + ) -> None: ... + +global___UpdateActivityExecutionOptionsResponse = UpdateActivityExecutionOptionsResponse + +@typing.final +class PauseActivityRequest(google.protobuf.message.Message): + """Deprecated. Use `PauseActivityExecutionRequest`.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + EXECUTION_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int ID_FIELD_NUMBER: builtins.int TYPE_FIELD_NUMBER: builtins.int REASON_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace of the workflow which scheduled this activity.""" - @property - def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: - """Execution info of the workflow which scheduled this activity""" identity: builtins.str """The identity of the client who initiated this request.""" id: builtins.str @@ -7668,6 +8946,12 @@ class PauseActivityRequest(google.protobuf.message.Message): """ reason: builtins.str """Reason to pause the activity.""" + request_id: builtins.str + """Used to de-dupe pause requests.""" + @property + def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: + """Execution info of the workflow which scheduled this activity""" + def __init__( self, *, @@ -7677,10 +8961,11 @@ class PauseActivityRequest(google.protobuf.message.Message): id: builtins.str = ..., type: builtins.str = ..., reason: builtins.str = ..., + request_id: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "execution", @@ -7693,7 +8978,7 @@ class PauseActivityRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "execution", @@ -7706,17 +8991,88 @@ class PauseActivityRequest(google.protobuf.message.Message): b"namespace", "reason", b"reason", + "request_id", + b"request_id", "type", b"type", ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["activity", b"activity"] - ) -> typing_extensions.Literal["id", "type"] | None: ... + self, oneof_group: typing.Literal["activity", b"activity"] + ) -> typing.Literal["id", "type"] | None: ... global___PauseActivityRequest = PauseActivityRequest +@typing.final +class PauseActivityExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + WORKFLOW_ID_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + """Namespace of the workflow which scheduled this activity.""" + workflow_id: builtins.str + """If provided, pause a workflow activity (or activities) for the given workflow ID. + If empty, targets a standalone activity. + """ + activity_id: builtins.str + """The ID of the activity to target.""" + run_id: builtins.str + """Run ID of the workflow or standalone activity. If empty, targets the latest run.""" + identity: builtins.str + """The identity of the client who initiated this request.""" + reason: builtins.str + """Reason to pause the activity.""" + resource_id: builtins.str + """Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities.""" + request_id: builtins.str + """Used to de-dupe pause requests.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + workflow_id: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., + reason: builtins.str = ..., + resource_id: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "identity", + b"identity", + "namespace", + b"namespace", + "reason", + b"reason", + "request_id", + b"request_id", + "resource_id", + b"resource_id", + "run_id", + b"run_id", + "workflow_id", + b"workflow_id", + ], + ) -> None: ... + +global___PauseActivityExecutionRequest = PauseActivityExecutionRequest + +@typing.final class PauseActivityResponse(google.protobuf.message.Message): + """Deprecated. Use `PauseActivityExecutionResponse`.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor def __init__( @@ -7725,7 +9081,20 @@ class PauseActivityResponse(google.protobuf.message.Message): global___PauseActivityResponse = PauseActivityResponse +@typing.final +class PauseActivityExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___PauseActivityExecutionResponse = PauseActivityExecutionResponse + +@typing.final class UnpauseActivityRequest(google.protobuf.message.Message): + """Deprecated. Use `UnpauseActivityExecutionRequest`.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMESPACE_FIELD_NUMBER: builtins.int @@ -7739,9 +9108,6 @@ class UnpauseActivityRequest(google.protobuf.message.Message): JITTER_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace of the workflow which scheduled this activity.""" - @property - def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: - """Execution info of the workflow which scheduled this activity""" identity: builtins.str """The identity of the client who initiated this request.""" id: builtins.str @@ -7754,9 +9120,14 @@ class UnpauseActivityRequest(google.protobuf.message.Message): """Providing this flag will also reset the number of attempts.""" reset_heartbeat: builtins.bool """Providing this flag will also reset the heartbeat details.""" + @property + def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: + """Execution info of the workflow which scheduled this activity""" + @property def jitter(self) -> google.protobuf.duration_pb2.Duration: """If set, the activity will start at a random time within the specified jitter duration.""" + def __init__( self, *, @@ -7772,7 +9143,7 @@ class UnpauseActivityRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "execution", @@ -7789,7 +9160,7 @@ class UnpauseActivityRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "execution", @@ -7813,12 +9184,92 @@ class UnpauseActivityRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["activity", b"activity"] - ) -> typing_extensions.Literal["id", "type", "unpause_all"] | None: ... + self, oneof_group: typing.Literal["activity", b"activity"] + ) -> typing.Literal["id", "type", "unpause_all"] | None: ... global___UnpauseActivityRequest = UnpauseActivityRequest +@typing.final +class UnpauseActivityExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + WORKFLOW_ID_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + JITTER_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + """Namespace of the workflow which scheduled this activity.""" + workflow_id: builtins.str + """If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. + """ + activity_id: builtins.str + """The ID of the activity to target.""" + run_id: builtins.str + """Run ID of the workflow or standalone activity. If empty, targets the latest run.""" + identity: builtins.str + """The identity of the client who initiated this request.""" + reason: builtins.str + """Reason to unpause the activity.""" + resource_id: builtins.str + """Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities.""" + request_id: builtins.str + """Used to de-dupe unpause requests.""" + @property + def jitter(self) -> google.protobuf.duration_pb2.Duration: + """If set, the activity will start at a random time within the specified jitter duration.""" + + def __init__( + self, + *, + namespace: builtins.str = ..., + workflow_id: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., + reason: builtins.str = ..., + jitter: google.protobuf.duration_pb2.Duration | None = ..., + resource_id: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["jitter", b"jitter"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "identity", + b"identity", + "jitter", + b"jitter", + "namespace", + b"namespace", + "reason", + b"reason", + "request_id", + b"request_id", + "resource_id", + b"resource_id", + "run_id", + b"run_id", + "workflow_id", + b"workflow_id", + ], + ) -> None: ... + +global___UnpauseActivityExecutionRequest = UnpauseActivityExecutionRequest + +@typing.final class UnpauseActivityResponse(google.protobuf.message.Message): + """Deprecated. Use `UnpauseActivityExecutionResponse`.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor def __init__( @@ -7827,8 +9278,21 @@ class UnpauseActivityResponse(google.protobuf.message.Message): global___UnpauseActivityResponse = UnpauseActivityResponse +@typing.final +class UnpauseActivityExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___UnpauseActivityExecutionResponse = UnpauseActivityExecutionResponse + +@typing.final class ResetActivityRequest(google.protobuf.message.Message): - """NOTE: keep in sync with temporalio.api.batch.v1.BatchOperationResetActivities""" + """NOTE: keep in sync with temporalio.api.batch.v1.BatchOperationResetActivities + Deprecated. Use `ResetActivityExecutionRequest`. + """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -7844,9 +9308,6 @@ class ResetActivityRequest(google.protobuf.message.Message): RESTORE_ORIGINAL_OPTIONS_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace of the workflow which scheduled this activity.""" - @property - def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: - """Execution info of the workflow which scheduled this activity""" identity: builtins.str """The identity of the client who initiated this request.""" id: builtins.str @@ -7861,16 +9322,21 @@ class ResetActivityRequest(google.protobuf.message.Message): """ keep_paused: builtins.bool """If activity is paused, it will remain paused after reset""" + restore_original_options: builtins.bool + """If set, the activity options will be restored to the defaults. + Default options are then options activity was created with. + They are part of the first schedule event. + """ + @property + def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: + """Execution info of the workflow which scheduled this activity""" + @property def jitter(self) -> google.protobuf.duration_pb2.Duration: """If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. (unless it is paused and keep_paused is set) """ - restore_original_options: builtins.bool - """If set, the activity options will be restored to the defaults. - Default options are then options activity was created with. - They are part of the first SCHEDULE event. - """ + def __init__( self, *, @@ -7887,7 +9353,7 @@ class ResetActivityRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "execution", @@ -7904,7 +9370,7 @@ class ResetActivityRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity", b"activity", "execution", @@ -7930,34 +9396,148 @@ class ResetActivityRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["activity", b"activity"] - ) -> typing_extensions.Literal["id", "type", "match_all"] | None: ... + self, oneof_group: typing.Literal["activity", b"activity"] + ) -> typing.Literal["id", "type", "match_all"] | None: ... global___ResetActivityRequest = ResetActivityRequest -class ResetActivityResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - def __init__( - self, - ) -> None: ... - -global___ResetActivityResponse = ResetActivityResponse - -class UpdateWorkflowExecutionOptionsRequest(google.protobuf.message.Message): - """Keep the parameters in sync with: - - temporalio.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions. - - temporalio.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions. - """ - +@typing.final +class ResetActivityExecutionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMESPACE_FIELD_NUMBER: builtins.int - WORKFLOW_EXECUTION_FIELD_NUMBER: builtins.int - WORKFLOW_EXECUTION_OPTIONS_FIELD_NUMBER: builtins.int - UPDATE_MASK_FIELD_NUMBER: builtins.int + WORKFLOW_ID_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + KEEP_PAUSED_FIELD_NUMBER: builtins.int + JITTER_FIELD_NUMBER: builtins.int + RESTORE_ORIGINAL_OPTIONS_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + RESET_HEARTBEAT_FIELD_NUMBER: builtins.int namespace: builtins.str - """The namespace name of the target Workflow.""" + """Namespace of the workflow which scheduled this activity.""" + workflow_id: builtins.str + """If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. + """ + activity_id: builtins.str + """The ID of the activity to target.""" + run_id: builtins.str + """Run ID of the workflow or standalone activity. If empty, targets the latest run.""" + identity: builtins.str + """The identity of the client who initiated this request.""" + keep_paused: builtins.bool + """If activity is paused, it will remain paused after reset""" + restore_original_options: builtins.bool + """If set, the activity options will be restored to the defaults. + Default options are then options activity was created with. + They are part of the first schedule event. + """ + resource_id: builtins.str + """Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities.""" + request_id: builtins.str + """Used to de-dupe reset requests.""" + reset_heartbeat: builtins.bool + """Reset persisted heartbeat details. + Reset always resets the attempt counter. Passing this flag causes reset to additionally + discard any persisted heartbeat details. + """ + @property + def jitter(self) -> google.protobuf.duration_pb2.Duration: + """If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. + (unless it is paused and keep_paused is set) + """ + + def __init__( + self, + *, + namespace: builtins.str = ..., + workflow_id: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., + keep_paused: builtins.bool = ..., + jitter: google.protobuf.duration_pb2.Duration | None = ..., + restore_original_options: builtins.bool = ..., + resource_id: builtins.str = ..., + request_id: builtins.str = ..., + reset_heartbeat: builtins.bool = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["jitter", b"jitter"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "identity", + b"identity", + "jitter", + b"jitter", + "keep_paused", + b"keep_paused", + "namespace", + b"namespace", + "request_id", + b"request_id", + "reset_heartbeat", + b"reset_heartbeat", + "resource_id", + b"resource_id", + "restore_original_options", + b"restore_original_options", + "run_id", + b"run_id", + "workflow_id", + b"workflow_id", + ], + ) -> None: ... + +global___ResetActivityExecutionRequest = ResetActivityExecutionRequest + +@typing.final +class ResetActivityResponse(google.protobuf.message.Message): + """Deprecated. Use `ResetActivityExecutionRequest`.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ResetActivityResponse = ResetActivityResponse + +@typing.final +class ResetActivityExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ResetActivityExecutionResponse = ResetActivityExecutionResponse + +@typing.final +class UpdateWorkflowExecutionOptionsRequest(google.protobuf.message.Message): + """Keep the parameters in sync with: + - temporalio.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions. + - temporalio.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + WORKFLOW_EXECUTION_FIELD_NUMBER: builtins.int + WORKFLOW_EXECUTION_OPTIONS_FIELD_NUMBER: builtins.int + UPDATE_MASK_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + namespace: builtins.str + """The namespace name of the target Workflow.""" + identity: builtins.str + """Optional. The identity of the client who initiated this request.""" @property def workflow_execution( self, @@ -7966,16 +9546,19 @@ class UpdateWorkflowExecutionOptionsRequest(google.protobuf.message.Message): (-- api-linter: core::0203::optional=disabled aip.dev/not-precedent: false positive triggered by the word "optional" --) """ + @property def workflow_execution_options( self, ) -> temporalio.api.workflow.v1.message_pb2.WorkflowExecutionOptions: """Workflow Execution options. Partial updates are accepted and controlled by update_mask.""" + @property def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: """Controls which fields from `workflow_execution_options` will be applied. To unset a field, set it to null and use the update mask to indicate that it should be mutated. """ + def __init__( self, *, @@ -7985,10 +9568,11 @@ class UpdateWorkflowExecutionOptionsRequest(google.protobuf.message.Message): workflow_execution_options: temporalio.api.workflow.v1.message_pb2.WorkflowExecutionOptions | None = ..., update_mask: google.protobuf.field_mask_pb2.FieldMask | None = ..., + identity: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "update_mask", b"update_mask", "workflow_execution", @@ -7999,7 +9583,9 @@ class UpdateWorkflowExecutionOptionsRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "identity", + b"identity", "namespace", b"namespace", "update_mask", @@ -8013,36 +9599,56 @@ class UpdateWorkflowExecutionOptionsRequest(google.protobuf.message.Message): global___UpdateWorkflowExecutionOptionsRequest = UpdateWorkflowExecutionOptionsRequest +@typing.final class UpdateWorkflowExecutionOptionsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor WORKFLOW_EXECUTION_OPTIONS_FIELD_NUMBER: builtins.int + UPDATE_TIME_FIELD_NUMBER: builtins.int @property def workflow_execution_options( self, ) -> temporalio.api.workflow.v1.message_pb2.WorkflowExecutionOptions: """Workflow Execution options after update.""" + + @property + def update_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The Workflow Execution time when the options were updated. When time skipping is + enabled, this is the workflow's virtual time rather than wall-clock time. + + This timestamp cannot be used for time-skipping fast-forward verification, + use `fast_forward_id` in `PollWorkflowExecutionTimeSkippingRequest` instead. + """ + def __init__( self, *, workflow_execution_options: temporalio.api.workflow.v1.message_pb2.WorkflowExecutionOptions | None = ..., + update_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "workflow_execution_options", b"workflow_execution_options" + field_name: typing.Literal[ + "update_time", + b"update_time", + "workflow_execution_options", + b"workflow_execution_options", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "workflow_execution_options", b"workflow_execution_options" + field_name: typing.Literal[ + "update_time", + b"update_time", + "workflow_execution_options", + b"workflow_execution_options", ], ) -> None: ... global___UpdateWorkflowExecutionOptionsResponse = UpdateWorkflowExecutionOptionsResponse +@typing.final class DescribeDeploymentRequest(google.protobuf.message.Message): """[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later""" @@ -8060,17 +9666,18 @@ class DescribeDeploymentRequest(google.protobuf.message.Message): deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["deployment", b"deployment"] + self, field_name: typing.Literal["deployment", b"deployment"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "namespace", b"namespace" ], ) -> None: ... global___DescribeDeploymentRequest = DescribeDeploymentRequest +@typing.final class DescribeDeploymentResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later""" @@ -8088,16 +9695,15 @@ class DescribeDeploymentResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal["deployment_info", b"deployment_info"], + self, field_name: typing.Literal["deployment_info", b"deployment_info"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["deployment_info", b"deployment_info"], + self, field_name: typing.Literal["deployment_info", b"deployment_info"] ) -> None: ... global___DescribeDeploymentResponse = DescribeDeploymentResponse +@typing.final class DescribeWorkerDeploymentVersionRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -8108,13 +9714,14 @@ class DescribeWorkerDeploymentVersionRequest(google.protobuf.message.Message): namespace: builtins.str version: builtins.str """Deprecated. Use `deployment_version`.""" + report_task_queue_stats: builtins.bool + """Report stats for task queues which have been polled by this version.""" @property def deployment_version( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: """Required.""" - report_task_queue_stats: builtins.bool - """Report stats for task queues which have been polled by this version.""" + def __init__( self, *, @@ -8125,14 +9732,11 @@ class DescribeWorkerDeploymentVersionRequest(google.protobuf.message.Message): report_task_queue_stats: builtins.bool = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "deployment_version", b"deployment_version" - ], + self, field_name: typing.Literal["deployment_version", b"deployment_version"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_version", b"deployment_version", "namespace", @@ -8146,14 +9750,17 @@ class DescribeWorkerDeploymentVersionRequest(google.protobuf.message.Message): global___DescribeWorkerDeploymentVersionRequest = DescribeWorkerDeploymentVersionRequest +@typing.final class DescribeWorkerDeploymentVersionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class VersionTaskQueue(google.protobuf.message.Message): """(-- api-linter: core::0123::resource-annotation=disabled --)""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class StatsByPriorityKeyEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -8172,11 +9779,10 @@ class DescribeWorkerDeploymentVersionResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... NAME_FIELD_NUMBER: builtins.int @@ -8188,6 +9794,7 @@ class DescribeWorkerDeploymentVersionResponse(google.protobuf.message.Message): @property def stats(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueueStats: """Only set if `report_task_queue_stats` is set on the request.""" + @property def stats_by_priority_key( self, @@ -8199,6 +9806,7 @@ class DescribeWorkerDeploymentVersionResponse(google.protobuf.message.Message): (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "by" is used to clarify the key. --) """ + def __init__( self, *, @@ -8211,11 +9819,11 @@ class DescribeWorkerDeploymentVersionResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["stats", b"stats"] + self, field_name: typing.Literal["stats", b"stats"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "name", b"name", "stats", @@ -8240,6 +9848,7 @@ class DescribeWorkerDeploymentVersionResponse(google.protobuf.message.Message): global___DescribeWorkerDeploymentVersionResponse.VersionTaskQueue ]: """All the Task Queues that have ever polled from this Deployment version.""" + def __init__( self, *, @@ -8252,13 +9861,13 @@ class DescribeWorkerDeploymentVersionResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "worker_deployment_version_info", b"worker_deployment_version_info" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "version_task_queues", b"version_task_queues", "worker_deployment_version_info", @@ -8270,6 +9879,7 @@ global___DescribeWorkerDeploymentVersionResponse = ( DescribeWorkerDeploymentVersionResponse ) +@typing.final class DescribeWorkerDeploymentRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -8285,13 +9895,14 @@ class DescribeWorkerDeploymentRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_name", b"deployment_name", "namespace", b"namespace" ], ) -> None: ... global___DescribeWorkerDeploymentRequest = DescribeWorkerDeploymentRequest +@typing.final class DescribeWorkerDeploymentResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -8315,13 +9926,11 @@ class DescribeWorkerDeploymentResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "worker_deployment_info", b"worker_deployment_info" - ], + field_name: typing.Literal["worker_deployment_info", b"worker_deployment_info"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "conflict_token", b"conflict_token", "worker_deployment_info", @@ -8331,6 +9940,7 @@ class DescribeWorkerDeploymentResponse(google.protobuf.message.Message): global___DescribeWorkerDeploymentResponse = DescribeWorkerDeploymentResponse +@typing.final class ListDeploymentsRequest(google.protobuf.message.Message): """[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later""" @@ -8355,7 +9965,7 @@ class ListDeploymentsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "next_page_token", @@ -8369,6 +9979,7 @@ class ListDeploymentsRequest(google.protobuf.message.Message): global___ListDeploymentsRequest = ListDeploymentsRequest +@typing.final class ListDeploymentsResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later""" @@ -8394,13 +10005,14 @@ class ListDeploymentsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployments", b"deployments", "next_page_token", b"next_page_token" ], ) -> None: ... global___ListDeploymentsResponse = ListDeploymentsResponse +@typing.final class SetCurrentDeploymentRequest(google.protobuf.message.Message): """[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later""" @@ -8411,11 +10023,11 @@ class SetCurrentDeploymentRequest(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int UPDATE_METADATA_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: ... identity: builtins.str """Optional. The identity of the client who initiated this request.""" @property + def deployment(self) -> temporalio.api.deployment.v1.message_pb2.Deployment: ... + @property def update_metadata( self, ) -> temporalio.api.deployment.v1.message_pb2.UpdateDeploymentMetadata: @@ -8423,6 +10035,7 @@ class SetCurrentDeploymentRequest(google.protobuf.message.Message): when describing a deployment. It is a good place for information such as operator name, links to internal deployment pipelines, etc. """ + def __init__( self, *, @@ -8434,13 +10047,13 @@ class SetCurrentDeploymentRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "update_metadata", b"update_metadata" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "identity", @@ -8454,6 +10067,7 @@ class SetCurrentDeploymentRequest(google.protobuf.message.Message): global___SetCurrentDeploymentRequest = SetCurrentDeploymentRequest +@typing.final class SetCurrentDeploymentResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later""" @@ -8470,6 +10084,7 @@ class SetCurrentDeploymentResponse(google.protobuf.message.Message): self, ) -> temporalio.api.deployment.v1.message_pb2.DeploymentInfo: """Info of the deployment that was current before executing this operation.""" + def __init__( self, *, @@ -8480,7 +10095,7 @@ class SetCurrentDeploymentResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_deployment_info", b"current_deployment_info", "previous_deployment_info", @@ -8489,7 +10104,7 @@ class SetCurrentDeploymentResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_deployment_info", b"current_deployment_info", "previous_deployment_info", @@ -8499,6 +10114,7 @@ class SetCurrentDeploymentResponse(google.protobuf.message.Message): global___SetCurrentDeploymentResponse = SetCurrentDeploymentResponse +@typing.final class SetWorkerDeploymentCurrentVersionRequest(google.protobuf.message.Message): """Set/unset the Current Version of a Worker Deployment.""" @@ -8563,7 +10179,7 @@ class SetWorkerDeploymentCurrentVersionRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "allow_no_pollers", b"allow_no_pollers", "build_id", @@ -8587,6 +10203,7 @@ global___SetWorkerDeploymentCurrentVersionRequest = ( SetWorkerDeploymentCurrentVersionRequest ) +@typing.final class SetWorkerDeploymentCurrentVersionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -8604,7 +10221,13 @@ class SetWorkerDeploymentCurrentVersionResponse(google.protobuf.message.Message) def previous_deployment_version( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: - """The version that was current before executing this operation.""" + """The version that was current before executing this operation. + Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the + Current version info before calling this API. By passing the `conflict_token` got from the + `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes + between the two calls. + """ + def __init__( self, *, @@ -8615,13 +10238,13 @@ class SetWorkerDeploymentCurrentVersionResponse(google.protobuf.message.Message) ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "previous_deployment_version", b"previous_deployment_version" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "conflict_token", b"conflict_token", "previous_deployment_version", @@ -8635,6 +10258,7 @@ global___SetWorkerDeploymentCurrentVersionResponse = ( SetWorkerDeploymentCurrentVersionResponse ) +@typing.final class SetWorkerDeploymentRampingVersionRequest(google.protobuf.message.Message): """Set/unset the Ramping Version of a Worker Deployment and its ramp percentage.""" @@ -8706,7 +10330,7 @@ class SetWorkerDeploymentRampingVersionRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "allow_no_pollers", b"allow_no_pollers", "build_id", @@ -8732,6 +10356,7 @@ global___SetWorkerDeploymentRampingVersionRequest = ( SetWorkerDeploymentRampingVersionRequest ) +@typing.final class SetWorkerDeploymentRampingVersionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -8746,13 +10371,24 @@ class SetWorkerDeploymentRampingVersionResponse(google.protobuf.message.Message) """ previous_version: builtins.str """Deprecated. Use `previous_deployment_version`.""" + previous_percentage: builtins.float + """The ramping version percentage before executing this operation. + Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the + Ramping version info before calling this API. By passing the `conflict_token` got from the + `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes + between the two calls. + """ @property def previous_deployment_version( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: - """The version that was ramping before executing this operation.""" - previous_percentage: builtins.float - """The ramping version percentage before executing this operation.""" + """The version that was ramping before executing this operation. + Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the + Ramping version info before calling this API. By passing the `conflict_token` got from the + `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes + between the two calls. + """ + def __init__( self, *, @@ -8764,13 +10400,13 @@ class SetWorkerDeploymentRampingVersionResponse(google.protobuf.message.Message) ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "previous_deployment_version", b"previous_deployment_version" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "conflict_token", b"conflict_token", "previous_deployment_version", @@ -8786,6 +10422,71 @@ global___SetWorkerDeploymentRampingVersionResponse = ( SetWorkerDeploymentRampingVersionResponse ) +@typing.final +class CreateWorkerDeploymentRequest(google.protobuf.message.Message): + """Creates a new WorkerDeployment.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + DEPLOYMENT_NAME_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + deployment_name: builtins.str + """The name of the Worker Deployment to create. If a Worker Deployment with + this name already exists, an error will be returned. + """ + identity: builtins.str + """Optional. The identity of the client who initiated this request.""" + request_id: builtins.str + """A unique identifier for this create request for idempotence. Typically UUIDv4.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + deployment_name: builtins.str = ..., + identity: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "deployment_name", + b"deployment_name", + "identity", + b"identity", + "namespace", + b"namespace", + "request_id", + b"request_id", + ], + ) -> None: ... + +global___CreateWorkerDeploymentRequest = CreateWorkerDeploymentRequest + +@typing.final +class CreateWorkerDeploymentResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CONFLICT_TOKEN_FIELD_NUMBER: builtins.int + conflict_token: builtins.bytes + """This value is returned so that it can be optionally passed to APIs that + write to the WorkerDeployment state to ensure that the state did not + change between this API call and a future write. + """ + def __init__( + self, + *, + conflict_token: builtins.bytes = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["conflict_token", b"conflict_token"] + ) -> None: ... + +global___CreateWorkerDeploymentResponse = CreateWorkerDeploymentResponse + +@typing.final class ListWorkerDeploymentsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -8804,7 +10505,7 @@ class ListWorkerDeploymentsRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "next_page_token", @@ -8816,9 +10517,11 @@ class ListWorkerDeploymentsRequest(google.protobuf.message.Message): global___ListWorkerDeploymentsRequest = ListWorkerDeploymentsRequest +@typing.final class ListWorkerDeploymentsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class WorkerDeploymentSummary(google.protobuf.message.Message): """(-- api-linter: core::0123::resource-annotation=disabled --) A subset of WorkerDeploymentInfo @@ -8844,16 +10547,19 @@ class ListWorkerDeploymentsResponse(google.protobuf.message.Message): self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentInfo.WorkerDeploymentVersionSummary: """Summary of the version that was added most recently in the Worker Deployment.""" + @property def current_version_summary( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentInfo.WorkerDeploymentVersionSummary: """Summary of the current version of the Worker Deployment.""" + @property def ramping_version_summary( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentInfo.WorkerDeploymentVersionSummary: """Summary of the ramping version of the Worker Deployment.""" + def __init__( self, *, @@ -8870,7 +10576,7 @@ class ListWorkerDeploymentsResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "current_version_summary", @@ -8885,7 +10591,7 @@ class ListWorkerDeploymentsResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "create_time", b"create_time", "current_version_summary", @@ -8911,6 +10617,7 @@ class ListWorkerDeploymentsResponse(google.protobuf.message.Message): global___ListWorkerDeploymentsResponse.WorkerDeploymentSummary ]: """The list of worker deployments.""" + def __init__( self, *, @@ -8922,7 +10629,7 @@ class ListWorkerDeploymentsResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "next_page_token", b"next_page_token", "worker_deployments", @@ -8932,6 +10639,85 @@ class ListWorkerDeploymentsResponse(google.protobuf.message.Message): global___ListWorkerDeploymentsResponse = ListWorkerDeploymentsResponse +@typing.final +class CreateWorkerDeploymentVersionRequest(google.protobuf.message.Message): + """Creates a new WorkerDeploymentVersion.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int + COMPUTE_CONFIG_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + identity: builtins.str + """Optional. The identity of the client who initiated this request.""" + request_id: builtins.str + """A unique identifier for this create request for idempotence. Typically UUIDv4. + If a second request with the same ID is recieved, it is considered a successful no-op. + Retrying with a different request ID for the same deployment name + build ID is an error. + """ + @property + def deployment_version( + self, + ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: + """Required.""" + + @property + def compute_config(self) -> temporalio.api.compute.v1.config_pb2.ComputeConfig: + """Optional. Contains the new worker compute configuration for the Worker + Deployment. Used for worker scale management. + """ + + def __init__( + self, + *, + namespace: builtins.str = ..., + deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion + | None = ..., + compute_config: temporalio.api.compute.v1.config_pb2.ComputeConfig | None = ..., + identity: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "compute_config", + b"compute_config", + "deployment_version", + b"deployment_version", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "compute_config", + b"compute_config", + "deployment_version", + b"deployment_version", + "identity", + b"identity", + "namespace", + b"namespace", + "request_id", + b"request_id", + ], + ) -> None: ... + +global___CreateWorkerDeploymentVersionRequest = CreateWorkerDeploymentVersionRequest + +@typing.final +class CreateWorkerDeploymentVersionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___CreateWorkerDeploymentVersionResponse = CreateWorkerDeploymentVersionResponse + +@typing.final class DeleteWorkerDeploymentVersionRequest(google.protobuf.message.Message): """Used for manual deletion of Versions. User can delete a Version only when all the following conditions are met: @@ -8951,17 +10737,18 @@ class DeleteWorkerDeploymentVersionRequest(google.protobuf.message.Message): namespace: builtins.str version: builtins.str """Deprecated. Use `deployment_version`.""" - @property - def deployment_version( - self, - ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: - """Required.""" skip_drainage: builtins.bool """Pass to force deletion even if the Version is draining. In this case the open pinned workflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions. """ identity: builtins.str """Optional. The identity of the client who initiated this request.""" + @property + def deployment_version( + self, + ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: + """Required.""" + def __init__( self, *, @@ -8973,14 +10760,11 @@ class DeleteWorkerDeploymentVersionRequest(google.protobuf.message.Message): identity: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "deployment_version", b"deployment_version" - ], + self, field_name: typing.Literal["deployment_version", b"deployment_version"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_version", b"deployment_version", "identity", @@ -8996,6 +10780,7 @@ class DeleteWorkerDeploymentVersionRequest(google.protobuf.message.Message): global___DeleteWorkerDeploymentVersionRequest = DeleteWorkerDeploymentVersionRequest +@typing.final class DeleteWorkerDeploymentVersionResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9005,6 +10790,7 @@ class DeleteWorkerDeploymentVersionResponse(google.protobuf.message.Message): global___DeleteWorkerDeploymentVersionResponse = DeleteWorkerDeploymentVersionResponse +@typing.final class DeleteWorkerDeploymentRequest(google.protobuf.message.Message): """Deletes records of (an old) Deployment. A deployment can only be deleted if it has no Version in it. @@ -9028,7 +10814,7 @@ class DeleteWorkerDeploymentRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_name", b"deployment_name", "identity", @@ -9040,6 +10826,7 @@ class DeleteWorkerDeploymentRequest(google.protobuf.message.Message): global___DeleteWorkerDeploymentRequest = DeleteWorkerDeploymentRequest +@typing.final class DeleteWorkerDeploymentResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9049,31 +10836,273 @@ class DeleteWorkerDeploymentResponse(google.protobuf.message.Message): global___DeleteWorkerDeploymentResponse = DeleteWorkerDeploymentResponse -class UpdateWorkerDeploymentVersionMetadataRequest(google.protobuf.message.Message): - """Used to update the user-defined metadata of a Worker Deployment Version.""" +@typing.final +class UpdateWorkerDeploymentVersionComputeConfigRequest( + google.protobuf.message.Message +): + """Used to update the compute config of a Worker Deployment Version.""" DESCRIPTOR: google.protobuf.descriptor.Descriptor - class UpsertEntriesEntry(google.protobuf.message.Message): + @typing.final + class ComputeConfigScalingGroupsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor KEY_FIELD_NUMBER: builtins.int VALUE_FIELD_NUMBER: builtins.int key: builtins.str @property - def value(self) -> temporalio.api.common.v1.message_pb2.Payload: ... + def value( + self, + ) -> temporalio.api.compute.v1.config_pb2.ComputeConfigScalingGroupUpdate: ... def __init__( self, *, key: builtins.str = ..., - value: temporalio.api.common.v1.message_pb2.Payload | None = ..., + value: temporalio.api.compute.v1.config_pb2.ComputeConfigScalingGroupUpdate + | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + NAMESPACE_FIELD_NUMBER: builtins.int + DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int + COMPUTE_CONFIG_SCALING_GROUPS_FIELD_NUMBER: builtins.int + REMOVE_COMPUTE_CONFIG_SCALING_GROUPS_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + identity: builtins.str + """Optional. The identity of the client who initiated this request.""" + request_id: builtins.str + """A unique identifier for this create request for idempotence. Typically UUIDv4. + If a second request with the same ID is recieved, it is considered a successful no-op. + Retrying with a different request ID for the same deployment name + build ID is an error. + """ + @property + def deployment_version( + self, + ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: + """Required.""" + + @property + def compute_config_scaling_groups( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, + temporalio.api.compute.v1.config_pb2.ComputeConfigScalingGroupUpdate, + ]: + """Optional. Contains the compute config scaling groups to add or update for the Worker + Deployment. + """ + + @property + def remove_compute_config_scaling_groups( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Optional. Contains the compute config scaling groups to remove from the Worker Deployment.""" + + def __init__( + self, + *, + namespace: builtins.str = ..., + deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion + | None = ..., + compute_config_scaling_groups: collections.abc.Mapping[ + builtins.str, + temporalio.api.compute.v1.config_pb2.ComputeConfigScalingGroupUpdate, + ] + | None = ..., + remove_compute_config_scaling_groups: collections.abc.Iterable[builtins.str] + | None = ..., + identity: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["deployment_version", b"deployment_version"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "compute_config_scaling_groups", + b"compute_config_scaling_groups", + "deployment_version", + b"deployment_version", + "identity", + b"identity", + "namespace", + b"namespace", + "remove_compute_config_scaling_groups", + b"remove_compute_config_scaling_groups", + "request_id", + b"request_id", + ], + ) -> None: ... + +global___UpdateWorkerDeploymentVersionComputeConfigRequest = ( + UpdateWorkerDeploymentVersionComputeConfigRequest +) + +@typing.final +class UpdateWorkerDeploymentVersionComputeConfigResponse( + google.protobuf.message.Message +): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___UpdateWorkerDeploymentVersionComputeConfigResponse = ( + UpdateWorkerDeploymentVersionComputeConfigResponse +) + +@typing.final +class ValidateWorkerDeploymentVersionComputeConfigRequest( + google.protobuf.message.Message +): + """Used to validate the compute config without attaching it to a Worker Deployment Version.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class ComputeConfigScalingGroupsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value( + self, + ) -> temporalio.api.compute.v1.config_pb2.ComputeConfigScalingGroupUpdate: ... + def __init__( + self, + *, + key: builtins.str = ..., + value: temporalio.api.compute.v1.config_pb2.ComputeConfigScalingGroupUpdate + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + NAMESPACE_FIELD_NUMBER: builtins.int + DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int + COMPUTE_CONFIG_SCALING_GROUPS_FIELD_NUMBER: builtins.int + REMOVE_COMPUTE_CONFIG_SCALING_GROUPS_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + namespace: builtins.str + identity: builtins.str + """Optional. The identity of the client who initiated this request.""" + @property + def deployment_version( + self, + ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: + """Required.""" + + @property + def compute_config_scaling_groups( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, + temporalio.api.compute.v1.config_pb2.ComputeConfigScalingGroupUpdate, + ]: + """Optional. Contains the compute config scaling groups to add or update for the Worker + Deployment. + """ + + @property + def remove_compute_config_scaling_groups( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Optional. Contains the compute config scaling groups to remove from the Worker Deployment.""" + + def __init__( + self, + *, + namespace: builtins.str = ..., + deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion + | None = ..., + compute_config_scaling_groups: collections.abc.Mapping[ + builtins.str, + temporalio.api.compute.v1.config_pb2.ComputeConfigScalingGroupUpdate, + ] + | None = ..., + remove_compute_config_scaling_groups: collections.abc.Iterable[builtins.str] + | None = ..., + identity: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["deployment_version", b"deployment_version"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "compute_config_scaling_groups", + b"compute_config_scaling_groups", + "deployment_version", + b"deployment_version", + "identity", + b"identity", + "namespace", + b"namespace", + "remove_compute_config_scaling_groups", + b"remove_compute_config_scaling_groups", + ], + ) -> None: ... + +global___ValidateWorkerDeploymentVersionComputeConfigRequest = ( + ValidateWorkerDeploymentVersionComputeConfigRequest +) + +@typing.final +class ValidateWorkerDeploymentVersionComputeConfigResponse( + google.protobuf.message.Message +): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ValidateWorkerDeploymentVersionComputeConfigResponse = ( + ValidateWorkerDeploymentVersionComputeConfigResponse +) + +@typing.final +class UpdateWorkerDeploymentVersionMetadataRequest(google.protobuf.message.Message): + """Used to update the user-defined metadata of a Worker Deployment Version.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class UpsertEntriesEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + @property + def value(self) -> temporalio.api.common.v1.message_pb2.Payload: ... + def __init__( self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + *, + key: builtins.str = ..., + value: temporalio.api.common.v1.message_pb2.Payload | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... NAMESPACE_FIELD_NUMBER: builtins.int @@ -9085,11 +11114,14 @@ class UpdateWorkerDeploymentVersionMetadataRequest(google.protobuf.message.Messa namespace: builtins.str version: builtins.str """Deprecated. Use `deployment_version`.""" + identity: builtins.str + """Optional. The identity of the client who initiated this request.""" @property def deployment_version( self, ) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: """Required.""" + @property def upsert_entries( self, @@ -9101,8 +11133,7 @@ class UpdateWorkerDeploymentVersionMetadataRequest(google.protobuf.message.Messa self, ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """List of keys to remove from the metadata.""" - identity: builtins.str - """Optional. The identity of the client who initiated this request.""" + def __init__( self, *, @@ -9118,14 +11149,11 @@ class UpdateWorkerDeploymentVersionMetadataRequest(google.protobuf.message.Messa identity: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "deployment_version", b"deployment_version" - ], + self, field_name: typing.Literal["deployment_version", b"deployment_version"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_version", b"deployment_version", "identity", @@ -9145,6 +11173,7 @@ global___UpdateWorkerDeploymentVersionMetadataRequest = ( UpdateWorkerDeploymentVersionMetadataRequest ) +@typing.final class UpdateWorkerDeploymentVersionMetadataResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9152,22 +11181,24 @@ class UpdateWorkerDeploymentVersionMetadataResponse(google.protobuf.message.Mess @property def metadata(self) -> temporalio.api.deployment.v1.message_pb2.VersionMetadata: """Full metadata after performing the update.""" + def __init__( self, *, metadata: temporalio.api.deployment.v1.message_pb2.VersionMetadata | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["metadata", b"metadata"] + self, field_name: typing.Literal["metadata", b"metadata"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["metadata", b"metadata"] + self, field_name: typing.Literal["metadata", b"metadata"] ) -> None: ... global___UpdateWorkerDeploymentVersionMetadataResponse = ( UpdateWorkerDeploymentVersionMetadataResponse ) +@typing.final class SetWorkerDeploymentManagerRequest(google.protobuf.message.Message): """Update the ManagerIdentity of a Worker Deployment.""" @@ -9196,8 +11227,7 @@ class SetWorkerDeploymentManagerRequest(google.protobuf.message.Message): identity: builtins.str """Required. The identity of the client who initiated this request.""" def __init__( - # pyright: reportSelfClsParameterName=false - self_, + self_, # pyright: ignore[reportSelfClsParameterName] *, namespace: builtins.str = ..., deployment_name: builtins.str = ..., @@ -9208,7 +11238,7 @@ class SetWorkerDeploymentManagerRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "manager_identity", b"manager_identity", "new_manager_identity", @@ -9219,7 +11249,7 @@ class SetWorkerDeploymentManagerRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "conflict_token", b"conflict_token", "deployment_name", @@ -9238,13 +11268,12 @@ class SetWorkerDeploymentManagerRequest(google.protobuf.message.Message): ) -> None: ... def WhichOneof( self, - oneof_group: typing_extensions.Literal[ - "new_manager_identity", b"new_manager_identity" - ], - ) -> typing_extensions.Literal["manager_identity", "self"] | None: ... + oneof_group: typing.Literal["new_manager_identity", b"new_manager_identity"], + ) -> typing.Literal["manager_identity", "self"] | None: ... global___SetWorkerDeploymentManagerRequest = SetWorkerDeploymentManagerRequest +@typing.final class SetWorkerDeploymentManagerResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9256,7 +11285,12 @@ class SetWorkerDeploymentManagerResponse(google.protobuf.message.Message): did not change between this API call and a future write. """ previous_manager_identity: builtins.str - """What the `manager_identity` field was before this change.""" + """What the `manager_identity` field was before this change. + Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the + manager identity before calling this API. By passing the `conflict_token` got from the + `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes + between the two calls. + """ def __init__( self, *, @@ -9265,7 +11299,7 @@ class SetWorkerDeploymentManagerResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "conflict_token", b"conflict_token", "previous_manager_identity", @@ -9275,6 +11309,7 @@ class SetWorkerDeploymentManagerResponse(google.protobuf.message.Message): global___SetWorkerDeploymentManagerResponse = SetWorkerDeploymentManagerResponse +@typing.final class GetCurrentDeploymentRequest(google.protobuf.message.Message): """Returns the Current Deployment of a deployment series. [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later @@ -9294,13 +11329,14 @@ class GetCurrentDeploymentRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "series_name", b"series_name" ], ) -> None: ... global___GetCurrentDeploymentRequest = GetCurrentDeploymentRequest +@typing.final class GetCurrentDeploymentResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later""" @@ -9319,19 +11355,20 @@ class GetCurrentDeploymentResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_deployment_info", b"current_deployment_info" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_deployment_info", b"current_deployment_info" ], ) -> None: ... global___GetCurrentDeploymentResponse = GetCurrentDeploymentResponse +@typing.final class GetDeploymentReachabilityRequest(google.protobuf.message.Message): """[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later""" @@ -9349,17 +11386,18 @@ class GetDeploymentReachabilityRequest(google.protobuf.message.Message): deployment: temporalio.api.deployment.v1.message_pb2.Deployment | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["deployment", b"deployment"] + self, field_name: typing.Literal["deployment", b"deployment"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment", b"deployment", "namespace", b"namespace" ], ) -> None: ... global___GetDeploymentReachabilityRequest = GetDeploymentReachabilityRequest +@typing.final class GetDeploymentReachabilityResponse(google.protobuf.message.Message): """[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later""" @@ -9368,18 +11406,19 @@ class GetDeploymentReachabilityResponse(google.protobuf.message.Message): DEPLOYMENT_INFO_FIELD_NUMBER: builtins.int REACHABILITY_FIELD_NUMBER: builtins.int LAST_UPDATE_TIME_FIELD_NUMBER: builtins.int + reachability: ( + temporalio.api.enums.v1.deployment_pb2.DeploymentReachability.ValueType + ) @property def deployment_info( self, ) -> temporalio.api.deployment.v1.message_pb2.DeploymentInfo: ... - reachability: ( - temporalio.api.enums.v1.deployment_pb2.DeploymentReachability.ValueType - ) @property def last_update_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """Reachability level might come from server cache. This timestamp specifies when the value was actually calculated. """ + def __init__( self, *, @@ -9390,7 +11429,7 @@ class GetDeploymentReachabilityResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_info", b"deployment_info", "last_update_time", @@ -9399,7 +11438,7 @@ class GetDeploymentReachabilityResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_info", b"deployment_info", "last_update_time", @@ -9411,6 +11450,7 @@ class GetDeploymentReachabilityResponse(google.protobuf.message.Message): global___GetDeploymentReachabilityResponse = GetDeploymentReachabilityResponse +@typing.final class CreateWorkflowRuleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9421,9 +11461,6 @@ class CreateWorkflowRuleRequest(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int DESCRIPTION_FIELD_NUMBER: builtins.int namespace: builtins.str - @property - def spec(self) -> temporalio.api.rules.v1.message_pb2.WorkflowRuleSpec: - """The rule specification .""" force_scan: builtins.bool """If true, the rule will be applied to the currently running workflows via batch job. If not set , the rule will only be applied when triggering condition is satisfied. @@ -9435,6 +11472,10 @@ class CreateWorkflowRuleRequest(google.protobuf.message.Message): """Identity of the actor who created the rule. Will be stored with the rule.""" description: builtins.str """Rule description.Will be stored with the rule.""" + @property + def spec(self) -> temporalio.api.rules.v1.message_pb2.WorkflowRuleSpec: + """The rule specification .""" + def __init__( self, *, @@ -9446,11 +11487,11 @@ class CreateWorkflowRuleRequest(google.protobuf.message.Message): description: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["spec", b"spec"] + self, field_name: typing.Literal["spec", b"spec"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "description", b"description", "force_scan", @@ -9468,16 +11509,18 @@ class CreateWorkflowRuleRequest(google.protobuf.message.Message): global___CreateWorkflowRuleRequest = CreateWorkflowRuleRequest +@typing.final class CreateWorkflowRuleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor RULE_FIELD_NUMBER: builtins.int JOB_ID_FIELD_NUMBER: builtins.int + job_id: builtins.str + """Batch Job ID if force-scan flag was provided. Otherwise empty.""" @property def rule(self) -> temporalio.api.rules.v1.message_pb2.WorkflowRule: """Created rule.""" - job_id: builtins.str - """Batch Job ID if force-scan flag was provided. Otherwise empty.""" + def __init__( self, *, @@ -9485,15 +11528,15 @@ class CreateWorkflowRuleResponse(google.protobuf.message.Message): job_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["rule", b"rule"] + self, field_name: typing.Literal["rule", b"rule"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["job_id", b"job_id", "rule", b"rule"], + self, field_name: typing.Literal["job_id", b"job_id", "rule", b"rule"] ) -> None: ... global___CreateWorkflowRuleResponse = CreateWorkflowRuleResponse +@typing.final class DescribeWorkflowRuleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9510,13 +11553,12 @@ class DescribeWorkflowRuleRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "namespace", b"namespace", "rule_id", b"rule_id" - ], + field_name: typing.Literal["namespace", b"namespace", "rule_id", b"rule_id"], ) -> None: ... global___DescribeWorkflowRuleRequest = DescribeWorkflowRuleRequest +@typing.final class DescribeWorkflowRuleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9524,20 +11566,20 @@ class DescribeWorkflowRuleResponse(google.protobuf.message.Message): @property def rule(self) -> temporalio.api.rules.v1.message_pb2.WorkflowRule: """The rule that was read.""" + def __init__( self, *, rule: temporalio.api.rules.v1.message_pb2.WorkflowRule | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["rule", b"rule"] + self, field_name: typing.Literal["rule", b"rule"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["rule", b"rule"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["rule", b"rule"]) -> None: ... global___DescribeWorkflowRuleResponse = DescribeWorkflowRuleResponse +@typing.final class DeleteWorkflowRuleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9554,13 +11596,12 @@ class DeleteWorkflowRuleRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "namespace", b"namespace", "rule_id", b"rule_id" - ], + field_name: typing.Literal["namespace", b"namespace", "rule_id", b"rule_id"], ) -> None: ... global___DeleteWorkflowRuleRequest = DeleteWorkflowRuleRequest +@typing.final class DeleteWorkflowRuleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9570,6 +11611,7 @@ class DeleteWorkflowRuleResponse(google.protobuf.message.Message): global___DeleteWorkflowRuleResponse = DeleteWorkflowRuleResponse +@typing.final class ListWorkflowRulesRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9585,25 +11627,26 @@ class ListWorkflowRulesRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "next_page_token", b"next_page_token" ], ) -> None: ... global___ListWorkflowRulesRequest = ListWorkflowRulesRequest +@typing.final class ListWorkflowRulesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor RULES_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes @property def rules( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.rules.v1.message_pb2.WorkflowRule ]: ... - next_page_token: builtins.bytes def __init__( self, *, @@ -9615,13 +11658,14 @@ class ListWorkflowRulesResponse(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "next_page_token", b"next_page_token", "rules", b"rules" ], ) -> None: ... global___ListWorkflowRulesResponse = ListWorkflowRulesResponse +@typing.final class TriggerWorkflowRuleRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9631,15 +11675,17 @@ class TriggerWorkflowRuleRequest(google.protobuf.message.Message): SPEC_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int namespace: builtins.str + id: builtins.str + identity: builtins.str + """The identity of the client who initiated this request""" @property def execution(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: """Execution info of the workflow which scheduled this activity""" - id: builtins.str + @property def spec(self) -> temporalio.api.rules.v1.message_pb2.WorkflowRuleSpec: """Note: Rule ID and expiration date are not used in the trigger request.""" - identity: builtins.str - """The identity of the client who initiated this request""" + def __init__( self, *, @@ -9651,13 +11697,13 @@ class TriggerWorkflowRuleRequest(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution", b"execution", "id", b"id", "rule", b"rule", "spec", b"spec" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "execution", b"execution", "id", @@ -9673,11 +11719,12 @@ class TriggerWorkflowRuleRequest(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["rule", b"rule"] - ) -> typing_extensions.Literal["id", "spec"] | None: ... + self, oneof_group: typing.Literal["rule", b"rule"] + ) -> typing.Literal["id", "spec"] | None: ... global___TriggerWorkflowRuleRequest = TriggerWorkflowRuleRequest +@typing.final class TriggerWorkflowRuleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9689,22 +11736,24 @@ class TriggerWorkflowRuleResponse(google.protobuf.message.Message): *, applied: builtins.bool = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["applied", b"applied"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["applied", b"applied"]) -> None: ... global___TriggerWorkflowRuleResponse = TriggerWorkflowRuleResponse +@typing.final class RecordWorkerHeartbeatRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMESPACE_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int WORKER_HEARTBEAT_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace this worker belongs to.""" identity: builtins.str """The identity of the client who initiated this request.""" + resource_id: builtins.str + """Resource ID for routing. Contains the worker grouping key.""" @property def worker_heartbeat( self, @@ -9720,14 +11769,17 @@ class RecordWorkerHeartbeatRequest(google.protobuf.message.Message): temporalio.api.worker.v1.message_pb2.WorkerHeartbeat ] | None = ..., + resource_id: builtins.str = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", b"namespace", + "resource_id", + b"resource_id", "worker_heartbeat", b"worker_heartbeat", ], @@ -9735,6 +11787,7 @@ class RecordWorkerHeartbeatRequest(google.protobuf.message.Message): global___RecordWorkerHeartbeatRequest = RecordWorkerHeartbeatRequest +@typing.final class RecordWorkerHeartbeatResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9744,6 +11797,7 @@ class RecordWorkerHeartbeatResponse(google.protobuf.message.Message): global___RecordWorkerHeartbeatResponse = RecordWorkerHeartbeatResponse +@typing.final class ListWorkersRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9751,12 +11805,13 @@ class ListWorkersRequest(google.protobuf.message.Message): PAGE_SIZE_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int QUERY_FIELD_NUMBER: builtins.int + INCLUDE_SYSTEM_WORKERS_FIELD_NUMBER: builtins.int namespace: builtins.str page_size: builtins.int next_page_token: builtins.bytes query: builtins.str - """`query` in ListWorkers is used to filter workers based on worker status info. - The following worker status attributes are expected are supported as part of the query: + """`query` in ListWorkers is used to filter workers based on worker attributes. + Supported attributes: * WorkerInstanceKey * WorkerIdentity * HostName @@ -9766,9 +11821,11 @@ class ListWorkersRequest(google.protobuf.message.Message): * SdkName * SdkVersion * StartTime - * LastHeartbeatTime * Status - Currently metrics are not supported as a part of ListWorkers query. + """ + include_system_workers: builtins.bool + """When true, the response will include system workers that are created implicitly + by the server and not by the user. By default, system workers are excluded. """ def __init__( self, @@ -9777,10 +11834,13 @@ class ListWorkersRequest(google.protobuf.message.Message): page_size: builtins.int = ..., next_page_token: builtins.bytes = ..., query: builtins.str = ..., + include_system_workers: builtins.bool = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "include_system_workers", + b"include_system_workers", "namespace", b"namespace", "next_page_token", @@ -9794,19 +11854,33 @@ class ListWorkersRequest(google.protobuf.message.Message): global___ListWorkersRequest = ListWorkersRequest +@typing.final class ListWorkersResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor WORKERS_INFO_FIELD_NUMBER: builtins.int + WORKERS_FIELD_NUMBER: builtins.int NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes + """Next page token""" @property def workers_info( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.worker.v1.message_pb2.WorkerInfo - ]: ... - next_page_token: builtins.bytes - """Next page token""" + ]: + """Deprecated: Use workers instead. This field returns full WorkerInfo which + includes expensive runtime metrics. We will stop populating this field in the future. + """ + + @property + def workers( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.worker.v1.message_pb2.WorkerListInfo + ]: + """Limited worker information.""" + def __init__( self, *, @@ -9814,30 +11888,42 @@ class ListWorkersResponse(google.protobuf.message.Message): temporalio.api.worker.v1.message_pb2.WorkerInfo ] | None = ..., + workers: collections.abc.Iterable[ + temporalio.api.worker.v1.message_pb2.WorkerListInfo + ] + | None = ..., next_page_token: builtins.bytes = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "next_page_token", b"next_page_token", "workers_info", b"workers_info" + field_name: typing.Literal[ + "next_page_token", + b"next_page_token", + "workers", + b"workers", + "workers_info", + b"workers_info", ], ) -> None: ... global___ListWorkersResponse = ListWorkersResponse +@typing.final class UpdateTaskQueueConfigRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class RateLimitUpdate(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor RATE_LIMIT_FIELD_NUMBER: builtins.int REASON_FIELD_NUMBER: builtins.int + reason: builtins.str + """Reason for why the rate limit was set.""" @property def rate_limit(self) -> temporalio.api.taskqueue.v1.message_pb2.RateLimit: """Rate Limit to be updated""" - reason: builtins.str - """Reason for why the rate limit was set.""" + def __init__( self, *, @@ -9845,21 +11931,41 @@ class UpdateTaskQueueConfigRequest(google.protobuf.message.Message): reason: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["rate_limit", b"rate_limit"] + self, field_name: typing.Literal["rate_limit", b"rate_limit"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "rate_limit", b"rate_limit", "reason", b"reason" ], ) -> None: ... + @typing.final + class SetFairnessWeightOverridesEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.float + def __init__( + self, + *, + key: builtins.str = ..., + value: builtins.float = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + NAMESPACE_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int TASK_QUEUE_FIELD_NUMBER: builtins.int TASK_QUEUE_TYPE_FIELD_NUMBER: builtins.int UPDATE_QUEUE_RATE_LIMIT_FIELD_NUMBER: builtins.int UPDATE_FAIRNESS_KEY_RATE_LIMIT_DEFAULT_FIELD_NUMBER: builtins.int + SET_FAIRNESS_WEIGHT_OVERRIDES_FIELD_NUMBER: builtins.int + UNSET_FAIRNESS_WEIGHT_OVERRIDES_FIELD_NUMBER: builtins.int namespace: builtins.str identity: builtins.str task_queue: builtins.str @@ -9874,6 +11980,7 @@ class UpdateTaskQueueConfigRequest(google.protobuf.message.Message): NOTE: A limit set by the worker is overriden; and restored again when reset. If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit. """ + @property def update_fairness_key_rate_limit_default( self, @@ -9882,21 +11989,45 @@ class UpdateTaskQueueConfigRequest(google.protobuf.message.Message): If not set, this configuration is unchanged. If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit. """ - def __init__( + + @property + def set_fairness_weight_overrides( self, - *, - namespace: builtins.str = ..., - identity: builtins.str = ..., - task_queue: builtins.str = ..., - task_queue_type: temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType = ..., + ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.float]: + """If set, overrides the fairness weight for each specified fairness key. + Fairness keys not listed in this map will keep their existing overrides (if any). + """ + + @property + def unset_fairness_weight_overrides( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """If set, removes any existing fairness weight overrides for each specified fairness key. + Fairness weights for corresponding keys fall back to the values set during task creation (if any), + or to the default weight of 1.0. + """ + + def __init__( + self, + *, + namespace: builtins.str = ..., + identity: builtins.str = ..., + task_queue: builtins.str = ..., + task_queue_type: temporalio.api.enums.v1.task_queue_pb2.TaskQueueType.ValueType = ..., update_queue_rate_limit: global___UpdateTaskQueueConfigRequest.RateLimitUpdate | None = ..., update_fairness_key_rate_limit_default: global___UpdateTaskQueueConfigRequest.RateLimitUpdate | None = ..., + set_fairness_weight_overrides: collections.abc.Mapping[ + builtins.str, builtins.float + ] + | None = ..., + unset_fairness_weight_overrides: collections.abc.Iterable[builtins.str] + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "update_fairness_key_rate_limit_default", b"update_fairness_key_rate_limit_default", "update_queue_rate_limit", @@ -9905,15 +12036,19 @@ class UpdateTaskQueueConfigRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", b"namespace", + "set_fairness_weight_overrides", + b"set_fairness_weight_overrides", "task_queue", b"task_queue", "task_queue_type", b"task_queue_type", + "unset_fairness_weight_overrides", + b"unset_fairness_weight_overrides", "update_fairness_key_rate_limit_default", b"update_fairness_key_rate_limit_default", "update_queue_rate_limit", @@ -9923,6 +12058,7 @@ class UpdateTaskQueueConfigRequest(google.protobuf.message.Message): global___UpdateTaskQueueConfigRequest = UpdateTaskQueueConfigRequest +@typing.final class UpdateTaskQueueConfigResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9935,14 +12071,13 @@ class UpdateTaskQueueConfigResponse(google.protobuf.message.Message): config: temporalio.api.taskqueue.v1.message_pb2.TaskQueueConfig | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["config", b"config"] + self, field_name: typing.Literal["config", b"config"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["config", b"config"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["config", b"config"]) -> None: ... global___UpdateTaskQueueConfigResponse = UpdateTaskQueueConfigResponse +@typing.final class FetchWorkerConfigRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9950,17 +12085,21 @@ class FetchWorkerConfigRequest(google.protobuf.message.Message): IDENTITY_FIELD_NUMBER: builtins.int REASON_FIELD_NUMBER: builtins.int SELECTOR_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace this worker belongs to.""" identity: builtins.str """The identity of the client who initiated this request.""" reason: builtins.str """Reason for sending worker command, can be used for audit purpose.""" + resource_id: builtins.str + """Resource ID for routing. Contains the worker grouping key.""" @property def selector(self) -> temporalio.api.common.v1.message_pb2.WorkerSelector: """Defines which workers should receive this command. only single worker is supported at this time. """ + def __init__( self, *, @@ -9968,19 +12107,22 @@ class FetchWorkerConfigRequest(google.protobuf.message.Message): identity: builtins.str = ..., reason: builtins.str = ..., selector: temporalio.api.common.v1.message_pb2.WorkerSelector | None = ..., + resource_id: builtins.str = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["selector", b"selector"] + self, field_name: typing.Literal["selector", b"selector"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", b"namespace", "reason", b"reason", + "resource_id", + b"resource_id", "selector", b"selector", ], @@ -9988,6 +12130,7 @@ class FetchWorkerConfigRequest(google.protobuf.message.Message): global___FetchWorkerConfigRequest = FetchWorkerConfigRequest +@typing.final class FetchWorkerConfigResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -9995,6 +12138,7 @@ class FetchWorkerConfigResponse(google.protobuf.message.Message): @property def worker_config(self) -> temporalio.api.sdk.v1.worker_config_pb2.WorkerConfig: """The worker configuration.""" + def __init__( self, *, @@ -10002,14 +12146,15 @@ class FetchWorkerConfigResponse(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["worker_config", b"worker_config"] + self, field_name: typing.Literal["worker_config", b"worker_config"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["worker_config", b"worker_config"] + self, field_name: typing.Literal["worker_config", b"worker_config"] ) -> None: ... global___FetchWorkerConfigResponse = FetchWorkerConfigResponse +@typing.final class UpdateWorkerConfigRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -10019,23 +12164,29 @@ class UpdateWorkerConfigRequest(google.protobuf.message.Message): WORKER_CONFIG_FIELD_NUMBER: builtins.int UPDATE_MASK_FIELD_NUMBER: builtins.int SELECTOR_FIELD_NUMBER: builtins.int + RESOURCE_ID_FIELD_NUMBER: builtins.int namespace: builtins.str """Namespace this worker belongs to.""" identity: builtins.str """The identity of the client who initiated this request.""" reason: builtins.str """Reason for sending worker command, can be used for audit purpose.""" + resource_id: builtins.str + """Resource ID for routing. Contains the worker grouping key.""" @property def worker_config(self) -> temporalio.api.sdk.v1.worker_config_pb2.WorkerConfig: """Partial updates are accepted and controlled by update_mask. The worker configuration to set. """ + @property def update_mask(self) -> google.protobuf.field_mask_pb2.FieldMask: """Controls which fields from `worker_config` will be applied""" + @property def selector(self) -> temporalio.api.common.v1.message_pb2.WorkerSelector: """Defines which workers should receive this command.""" + def __init__( self, *, @@ -10046,10 +12197,11 @@ class UpdateWorkerConfigRequest(google.protobuf.message.Message): | None = ..., update_mask: google.protobuf.field_mask_pb2.FieldMask | None = ..., selector: temporalio.api.common.v1.message_pb2.WorkerSelector | None = ..., + resource_id: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "selector", b"selector", "update_mask", @@ -10060,13 +12212,15 @@ class UpdateWorkerConfigRequest(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "identity", b"identity", "namespace", b"namespace", "reason", b"reason", + "resource_id", + b"resource_id", "selector", b"selector", "update_mask", @@ -10078,6 +12232,7 @@ class UpdateWorkerConfigRequest(google.protobuf.message.Message): global___UpdateWorkerConfigRequest = UpdateWorkerConfigRequest +@typing.final class UpdateWorkerConfigResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -10085,6 +12240,7 @@ class UpdateWorkerConfigResponse(google.protobuf.message.Message): @property def worker_config(self) -> temporalio.api.sdk.v1.worker_config_pb2.WorkerConfig: """The worker configuration. Will be returned if the command was sent to a single worker.""" + def __init__( self, *, @@ -10093,22 +12249,23 @@ class UpdateWorkerConfigResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "response", b"response", "worker_config", b"worker_config" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "response", b"response", "worker_config", b"worker_config" ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["response", b"response"] - ) -> typing_extensions.Literal["worker_config"] | None: ... + self, oneof_group: typing.Literal["response", b"response"] + ) -> typing.Literal["worker_config"] | None: ... global___UpdateWorkerConfigResponse = UpdateWorkerConfigResponse +@typing.final class DescribeWorkerRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -10126,13 +12283,14 @@ class DescribeWorkerRequest(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "worker_instance_key", b"worker_instance_key" ], ) -> None: ... global___DescribeWorkerRequest = DescribeWorkerRequest +@typing.final class DescribeWorkerResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -10145,10 +12303,2074 @@ class DescribeWorkerResponse(google.protobuf.message.Message): worker_info: temporalio.api.worker.v1.message_pb2.WorkerInfo | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["worker_info", b"worker_info"] + self, field_name: typing.Literal["worker_info", b"worker_info"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["worker_info", b"worker_info"] + self, field_name: typing.Literal["worker_info", b"worker_info"] ) -> None: ... global___DescribeWorkerResponse = DescribeWorkerResponse + +@typing.final +class CountWorkersRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + INCLUDE_SYSTEM_WORKERS_FIELD_NUMBER: builtins.int + namespace: builtins.str + query: builtins.str + """Query to filter workers before counting. + Supported filter fields are the same as in ListWorkersRequest. + """ + include_system_workers: builtins.bool + """When true, the count will include system workers that are created implicitly + by the server and not by the user. By default, system workers are excluded. + """ + def __init__( + self, + *, + namespace: builtins.str = ..., + query: builtins.str = ..., + include_system_workers: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "include_system_workers", + b"include_system_workers", + "namespace", + b"namespace", + "query", + b"query", + ], + ) -> None: ... + +global___CountWorkersRequest = CountWorkersRequest + +@typing.final +class CountWorkersResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + COUNT_FIELD_NUMBER: builtins.int + count: builtins.int + """Number of workers matching the query.""" + def __init__( + self, + *, + count: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["count", b"count"]) -> None: ... + +global___CountWorkersResponse = CountWorkersResponse + +@typing.final +class PauseWorkflowExecutionRequest(google.protobuf.message.Message): + """Request to pause a workflow execution.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + WORKFLOW_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + """Namespace of the workflow to pause.""" + workflow_id: builtins.str + """ID of the workflow execution to be paused. Required.""" + run_id: builtins.str + """Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused.""" + identity: builtins.str + """The identity of the client who initiated this request.""" + reason: builtins.str + """Reason to pause the workflow execution.""" + request_id: builtins.str + """A unique identifier for this pause request for idempotence. Typically UUIDv4.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + workflow_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., + reason: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "identity", + b"identity", + "namespace", + b"namespace", + "reason", + b"reason", + "request_id", + b"request_id", + "run_id", + b"run_id", + "workflow_id", + b"workflow_id", + ], + ) -> None: ... + +global___PauseWorkflowExecutionRequest = PauseWorkflowExecutionRequest + +@typing.final +class PauseWorkflowExecutionResponse(google.protobuf.message.Message): + """Response to a successful PauseWorkflowExecution request.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___PauseWorkflowExecutionResponse = PauseWorkflowExecutionResponse + +@typing.final +class UnpauseWorkflowExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + WORKFLOW_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + """Namespace of the workflow to unpause.""" + workflow_id: builtins.str + """ID of the workflow execution to be paused. Required.""" + run_id: builtins.str + """Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused.""" + identity: builtins.str + """The identity of the client who initiated this request.""" + reason: builtins.str + """Reason to unpause the workflow execution.""" + request_id: builtins.str + """A unique identifier for this unpause request for idempotence. Typically UUIDv4.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + workflow_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., + reason: builtins.str = ..., + request_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "identity", + b"identity", + "namespace", + b"namespace", + "reason", + b"reason", + "request_id", + b"request_id", + "run_id", + b"run_id", + "workflow_id", + b"workflow_id", + ], + ) -> None: ... + +global___UnpauseWorkflowExecutionRequest = UnpauseWorkflowExecutionRequest + +@typing.final +class UnpauseWorkflowExecutionResponse(google.protobuf.message.Message): + """Response to a successful UnpauseWorkflowExecution request.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___UnpauseWorkflowExecutionResponse = UnpauseWorkflowExecutionResponse + +@typing.final +class StartActivityExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + ACTIVITY_TYPE_FIELD_NUMBER: builtins.int + TASK_QUEUE_FIELD_NUMBER: builtins.int + SCHEDULE_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int + SCHEDULE_TO_START_TIMEOUT_FIELD_NUMBER: builtins.int + START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int + HEARTBEAT_TIMEOUT_FIELD_NUMBER: builtins.int + RETRY_POLICY_FIELD_NUMBER: builtins.int + INPUT_FIELD_NUMBER: builtins.int + ID_REUSE_POLICY_FIELD_NUMBER: builtins.int + ID_CONFLICT_POLICY_FIELD_NUMBER: builtins.int + SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int + HEADER_FIELD_NUMBER: builtins.int + USER_METADATA_FIELD_NUMBER: builtins.int + PRIORITY_FIELD_NUMBER: builtins.int + COMPLETION_CALLBACKS_FIELD_NUMBER: builtins.int + LINKS_FIELD_NUMBER: builtins.int + ON_CONFLICT_OPTIONS_FIELD_NUMBER: builtins.int + START_DELAY_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int + REQUEST_EAGER_EXECUTION_FIELD_NUMBER: builtins.int + namespace: builtins.str + identity: builtins.str + """The identity of the client who initiated this request""" + request_id: builtins.str + """A unique identifier for this start request. Typically UUIDv4.""" + activity_id: builtins.str + """Identifier for this activity. Required. This identifier should be meaningful in the user's + own system. It must be unique among activities in the same namespace, subject to the rules + imposed by id_reuse_policy and id_conflict_policy. + """ + id_reuse_policy: ( + temporalio.api.enums.v1.activity_pb2.ActivityIdReusePolicy.ValueType + ) + """Defines whether to allow re-using the activity id from a previously *closed* activity. + The default policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE. + """ + id_conflict_policy: ( + temporalio.api.enums.v1.activity_pb2.ActivityIdConflictPolicy.ValueType + ) + """Defines how to resolve an activity id conflict with a *running* activity. + The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL. + """ + request_eager_execution: builtins.bool + """Request that the first activity task be returned directly in the start response instead of + being dispatched through a task queue. If set to true, the caller is expected to have a + worker available and capable of processing the task. The returned task will be marked as + started. The server may ignore this request. + """ + @property + def activity_type(self) -> temporalio.api.common.v1.message_pb2.ActivityType: + """The type of the activity, a string that corresponds to a registered activity on a worker.""" + + @property + def task_queue(self) -> temporalio.api.taskqueue.v1.message_pb2.TaskQueue: + """Task queue to schedule this activity on.""" + + @property + def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Indicates how long the caller is willing to wait for an activity completion. Limits how long + retries will be attempted. Either this or `start_to_close_timeout` must be specified. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Limits time an activity task can stay in a task queue before a worker picks it up. This + timeout is always non retryable, as all a retry would achieve is to put it back into the same + queue. Defaults to `schedule_to_close_timeout` if not specified. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Maximum time an activity is allowed to execute after being picked up by a worker. This + timeout is always retryable. Either this or `schedule_to_close_timeout` must be + specified. + + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def heartbeat_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Maximum permitted time between successful worker heartbeats.""" + + @property + def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: + """The retry policy for the activity. Will never exceed `schedule_to_close_timeout`.""" + + @property + def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized arguments to the activity. These are passed as arguments to the activity function.""" + + @property + def search_attributes( + self, + ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: + """Search attributes for indexing.""" + + @property + def header(self) -> temporalio.api.common.v1.message_pb2.Header: + """Header for context propagation and tracing purposes.""" + + @property + def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata: + """Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity.""" + + @property + def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: + """Priority metadata.""" + + @property + def completion_callbacks( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Callback + ]: + """Callbacks to be called by the server when this activity reaches a terminal state. + Callback addresses must be whitelisted in the server's dynamic configuration. + """ + + @property + def links( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Link + ]: + """Links to be associated with the activity. Callbacks may also have associated links; + links already included with a callback should not be duplicated here. + """ + + @property + def on_conflict_options( + self, + ) -> temporalio.api.common.v1.message_pb2.OnConflictOptions: + """Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING.""" + + @property + def start_delay(self) -> google.protobuf.duration_pb2.Duration: + """Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts.""" + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this activity.""" + + def __init__( + self, + *, + namespace: builtins.str = ..., + identity: builtins.str = ..., + request_id: builtins.str = ..., + activity_id: builtins.str = ..., + activity_type: temporalio.api.common.v1.message_pb2.ActivityType | None = ..., + task_queue: temporalio.api.taskqueue.v1.message_pb2.TaskQueue | None = ..., + schedule_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., + schedule_to_start_timeout: google.protobuf.duration_pb2.Duration | None = ..., + start_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., + heartbeat_timeout: google.protobuf.duration_pb2.Duration | None = ..., + retry_policy: temporalio.api.common.v1.message_pb2.RetryPolicy | None = ..., + input: temporalio.api.common.v1.message_pb2.Payloads | None = ..., + id_reuse_policy: temporalio.api.enums.v1.activity_pb2.ActivityIdReusePolicy.ValueType = ..., + id_conflict_policy: temporalio.api.enums.v1.activity_pb2.ActivityIdConflictPolicy.ValueType = ..., + search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes + | None = ..., + header: temporalio.api.common.v1.message_pb2.Header | None = ..., + user_metadata: temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata + | None = ..., + priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + completion_callbacks: collections.abc.Iterable[ + temporalio.api.common.v1.message_pb2.Callback + ] + | None = ..., + links: collections.abc.Iterable[temporalio.api.common.v1.message_pb2.Link] + | None = ..., + on_conflict_options: temporalio.api.common.v1.message_pb2.OnConflictOptions + | None = ..., + start_delay: google.protobuf.duration_pb2.Duration | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., + request_eager_execution: builtins.bool = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "activity_type", + b"activity_type", + "header", + b"header", + "heartbeat_timeout", + b"heartbeat_timeout", + "input", + b"input", + "on_conflict_options", + b"on_conflict_options", + "priority", + b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "retry_policy", + b"retry_policy", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "search_attributes", + b"search_attributes", + "start_delay", + b"start_delay", + "start_to_close_timeout", + b"start_to_close_timeout", + "task_queue", + b"task_queue", + "user_metadata", + b"user_metadata", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "activity_type", + b"activity_type", + "completion_callbacks", + b"completion_callbacks", + "header", + b"header", + "heartbeat_timeout", + b"heartbeat_timeout", + "id_conflict_policy", + b"id_conflict_policy", + "id_reuse_policy", + b"id_reuse_policy", + "identity", + b"identity", + "input", + b"input", + "links", + b"links", + "namespace", + b"namespace", + "on_conflict_options", + b"on_conflict_options", + "priority", + b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "request_eager_execution", + b"request_eager_execution", + "request_id", + b"request_id", + "retry_policy", + b"retry_policy", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "search_attributes", + b"search_attributes", + "start_delay", + b"start_delay", + "start_to_close_timeout", + b"start_to_close_timeout", + "task_queue", + b"task_queue", + "user_metadata", + b"user_metadata", + ], + ) -> None: ... + +global___StartActivityExecutionRequest = StartActivityExecutionRequest + +@typing.final +class StartActivityExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RUN_ID_FIELD_NUMBER: builtins.int + STARTED_FIELD_NUMBER: builtins.int + LINK_FIELD_NUMBER: builtins.int + EAGER_ACTIVITY_TASK_FIELD_NUMBER: builtins.int + run_id: builtins.str + """The run ID of the activity that was started - or used (via ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING).""" + started: builtins.bool + """If true, a new activity was started.""" + @property + def link(self) -> temporalio.api.common.v1.message_pb2.Link: + """Link to the started activity.""" + + @property + def eager_activity_task(self) -> global___PollActivityTaskQueueResponse: + """The first activity task when eager execution was requested and accepted. + This is set only for the first attempt of a newly started activity. + """ + + def __init__( + self, + *, + run_id: builtins.str = ..., + started: builtins.bool = ..., + link: temporalio.api.common.v1.message_pb2.Link | None = ..., + eager_activity_task: global___PollActivityTaskQueueResponse | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "eager_activity_task", b"eager_activity_task", "link", b"link" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "eager_activity_task", + b"eager_activity_task", + "link", + b"link", + "run_id", + b"run_id", + "started", + b"started", + ], + ) -> None: ... + +global___StartActivityExecutionResponse = StartActivityExecutionResponse + +@typing.final +class DescribeActivityExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + INCLUDE_INPUT_FIELD_NUMBER: builtins.int + INCLUDE_OUTCOME_FIELD_NUMBER: builtins.int + LONG_POLL_TOKEN_FIELD_NUMBER: builtins.int + INCLUDE_HEARTBEAT_DETAILS_FIELD_NUMBER: builtins.int + INCLUDE_LAST_FAILURE_FIELD_NUMBER: builtins.int + namespace: builtins.str + activity_id: builtins.str + run_id: builtins.str + """Activity run ID. If empty the request targets the latest run.""" + include_input: builtins.bool + """Include the input field in the response.""" + include_outcome: builtins.bool + """Include the outcome (result/failure) in the response if the activity has completed.""" + long_poll_token: builtins.bytes + """Token from a previous DescribeActivityExecutionResponse. If present, long-poll until activity + state changes from the state encoded in this token. If absent, return current state immediately. + If present, run_id must also be present. + Note that activity state may change multiple times between requests, therefore it is not + guaranteed that a client making a sequence of long-poll requests will see a complete + sequence of state changes. + """ + include_heartbeat_details: builtins.bool + """Include the heartbeat_details field inside info in the response if available.""" + include_last_failure: builtins.bool + """Include the last_failure field inside info in the response if available.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + include_input: builtins.bool = ..., + include_outcome: builtins.bool = ..., + long_poll_token: builtins.bytes = ..., + include_heartbeat_details: builtins.bool = ..., + include_last_failure: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "include_heartbeat_details", + b"include_heartbeat_details", + "include_input", + b"include_input", + "include_last_failure", + b"include_last_failure", + "include_outcome", + b"include_outcome", + "long_poll_token", + b"long_poll_token", + "namespace", + b"namespace", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___DescribeActivityExecutionRequest = DescribeActivityExecutionRequest + +@typing.final +class DescribeActivityExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RUN_ID_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + INPUT_FIELD_NUMBER: builtins.int + OUTCOME_FIELD_NUMBER: builtins.int + LONG_POLL_TOKEN_FIELD_NUMBER: builtins.int + CALLBACKS_FIELD_NUMBER: builtins.int + run_id: builtins.str + """The run ID of the activity, useful when run_id was not specified in the request.""" + long_poll_token: builtins.bytes + """Token for follow-on long-poll requests. Absent only if the activity is complete.""" + @property + def info(self) -> temporalio.api.activity.v1.message_pb2.ActivityExecutionInfo: + """Information about the activity execution. Fields heartbeat_details and last_failure are omitted unless + the request has include_heartbeat_details or include_last_failure set to true, respectively. + """ + + @property + def input(self) -> temporalio.api.common.v1.message_pb2.Payloads: + """Serialized activity input, passed as arguments to the activity function. + Only set if include_input was true in the request. + """ + + @property + def outcome( + self, + ) -> temporalio.api.activity.v1.message_pb2.ActivityExecutionOutcome: + """Only set if the activity is completed and include_outcome was true in the request.""" + + @property + def callbacks( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.activity.v1.message_pb2.CallbackInfo + ]: + """Callbacks attached to this activity execution and their current state.""" + + def __init__( + self, + *, + run_id: builtins.str = ..., + info: temporalio.api.activity.v1.message_pb2.ActivityExecutionInfo | None = ..., + input: temporalio.api.common.v1.message_pb2.Payloads | None = ..., + outcome: temporalio.api.activity.v1.message_pb2.ActivityExecutionOutcome + | None = ..., + long_poll_token: builtins.bytes = ..., + callbacks: collections.abc.Iterable[ + temporalio.api.activity.v1.message_pb2.CallbackInfo + ] + | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "info", b"info", "input", b"input", "outcome", b"outcome" + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "callbacks", + b"callbacks", + "info", + b"info", + "input", + b"input", + "long_poll_token", + b"long_poll_token", + "outcome", + b"outcome", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___DescribeActivityExecutionResponse = DescribeActivityExecutionResponse + +@typing.final +class PollActivityExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + activity_id: builtins.str + run_id: builtins.str + """Activity run ID. If empty the request targets the latest run.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "namespace", + b"namespace", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___PollActivityExecutionRequest = PollActivityExecutionRequest + +@typing.final +class PollActivityExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RUN_ID_FIELD_NUMBER: builtins.int + OUTCOME_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int + run_id: builtins.str + """The run ID of the activity, useful when run_id was not specified in the request.""" + @property + def outcome( + self, + ) -> temporalio.api.activity.v1.message_pb2.ActivityExecutionOutcome: ... + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context propagated from the Nexus caller that started this activity.""" + + def __init__( + self, + *, + run_id: builtins.str = ..., + outcome: temporalio.api.activity.v1.message_pb2.ActivityExecutionOutcome + | None = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "outcome", + b"outcome", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "outcome", + b"outcome", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___PollActivityExecutionResponse = PollActivityExecutionResponse + +@typing.final +class ListActivityExecutionsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + PAGE_SIZE_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + namespace: builtins.str + page_size: builtins.int + """Max number of executions to return per page.""" + next_page_token: builtins.bytes + """Token returned in ListActivityExecutionsResponse.""" + query: builtins.str + """Visibility query, see https://docs.temporal.io/list-filter for the syntax.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + page_size: builtins.int = ..., + next_page_token: builtins.bytes = ..., + query: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "namespace", + b"namespace", + "next_page_token", + b"next_page_token", + "page_size", + b"page_size", + "query", + b"query", + ], + ) -> None: ... + +global___ListActivityExecutionsRequest = ListActivityExecutionsRequest + +@typing.final +class ListActivityExecutionsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + EXECUTIONS_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes + """Token to use to fetch the next page. If empty, there is no next page.""" + @property + def executions( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.activity.v1.message_pb2.ActivityExecutionListInfo + ]: ... + def __init__( + self, + *, + executions: collections.abc.Iterable[ + temporalio.api.activity.v1.message_pb2.ActivityExecutionListInfo + ] + | None = ..., + next_page_token: builtins.bytes = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "executions", b"executions", "next_page_token", b"next_page_token" + ], + ) -> None: ... + +global___ListActivityExecutionsResponse = ListActivityExecutionsResponse + +@typing.final +class StartNexusOperationExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class NexusHeaderEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.str + def __init__( + self, + *, + key: builtins.str = ..., + value: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... + + NAMESPACE_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + OPERATION_ID_FIELD_NUMBER: builtins.int + ENDPOINT_FIELD_NUMBER: builtins.int + SERVICE_FIELD_NUMBER: builtins.int + OPERATION_FIELD_NUMBER: builtins.int + SCHEDULE_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int + SCHEDULE_TO_START_TIMEOUT_FIELD_NUMBER: builtins.int + START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int + INPUT_FIELD_NUMBER: builtins.int + ID_REUSE_POLICY_FIELD_NUMBER: builtins.int + ID_CONFLICT_POLICY_FIELD_NUMBER: builtins.int + ON_CONFLICT_OPTIONS_FIELD_NUMBER: builtins.int + SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int + NEXUS_HEADER_FIELD_NUMBER: builtins.int + USER_METADATA_FIELD_NUMBER: builtins.int + COMPLETION_CALLBACKS_FIELD_NUMBER: builtins.int + LINKS_FIELD_NUMBER: builtins.int + namespace: builtins.str + identity: builtins.str + """The identity of the client who initiated this request.""" + request_id: builtins.str + """A unique identifier for this caller-side start request. Typically UUIDv4. + StartOperation requests sent to the handler will use a server-generated request ID. + """ + operation_id: builtins.str + """Identifier for this operation. This is a caller-side ID, distinct from any internal + operation identifiers generated by the handler. Must be unique among operations in the + same namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy. + """ + endpoint: builtins.str + """Endpoint name, resolved to a URL via the cluster's endpoint registry.""" + service: builtins.str + """Service name.""" + operation: builtins.str + """Operation name.""" + id_reuse_policy: ( + temporalio.api.enums.v1.nexus_pb2.NexusOperationIdReusePolicy.ValueType + ) + """Defines whether to allow re-using the operation id from a previously *closed* operation. + The default policy is NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE. + """ + id_conflict_policy: ( + temporalio.api.enums.v1.nexus_pb2.NexusOperationIdConflictPolicy.ValueType + ) + """Defines how to resolve an operation id conflict with a *running* operation. + The default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL. + """ + @property + def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Schedule-to-close timeout for this operation. + Indicates how long the caller is willing to wait for operation completion. + Calls are retried internally by the server. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Schedule-to-start timeout for this operation. + Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) + by the handler. + If not set or zero, no schedule-to-start timeout is enforced. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Start-to-close timeout for this operation. + Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been + started. Synchronous operations ignore this timeout. + If not set or zero, no start-to-close timeout is enforced. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + """ + + @property + def input(self) -> temporalio.api.common.v1.message_pb2.Payload: + """Serialized input to the operation. Passed as the request payload.""" + + @property + def on_conflict_options( + self, + ) -> temporalio.api.nexusoperation.v1.message_pb2.OnConflictOptions: + """Defines actions to be done to the existing running standalone Nexus when the conflict policy + NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set or set to a empty object + (all options with default value), it will not modify the running operation. + """ + + @property + def search_attributes( + self, + ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: + """Search attributes for indexing.""" + + @property + def nexus_header( + self, + ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: + """Header to attach to the Nexus request. + Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and + transmitted to external services as-is. + This is useful for propagating tracing information. + Note these headers are not the same as Temporal headers on internal activities and child workflows, these are + transmitted to Nexus operations that may be external and are not traditional payloads. + """ + + @property + def user_metadata(self) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata: + """Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation.""" + + @property + def completion_callbacks( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Callback + ]: + """Completion callbacks to be invoked once the Nexus operation reaches a terminal state.""" + + @property + def links( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Link + ]: + """Links to be associated with the Nexus operation. Callbacks may also have associated links; + links already included with a callback should not be duplicated here. + """ + + def __init__( + self, + *, + namespace: builtins.str = ..., + identity: builtins.str = ..., + request_id: builtins.str = ..., + operation_id: builtins.str = ..., + endpoint: builtins.str = ..., + service: builtins.str = ..., + operation: builtins.str = ..., + schedule_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., + schedule_to_start_timeout: google.protobuf.duration_pb2.Duration | None = ..., + start_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., + input: temporalio.api.common.v1.message_pb2.Payload | None = ..., + id_reuse_policy: temporalio.api.enums.v1.nexus_pb2.NexusOperationIdReusePolicy.ValueType = ..., + id_conflict_policy: temporalio.api.enums.v1.nexus_pb2.NexusOperationIdConflictPolicy.ValueType = ..., + on_conflict_options: temporalio.api.nexusoperation.v1.message_pb2.OnConflictOptions + | None = ..., + search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes + | None = ..., + nexus_header: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., + user_metadata: temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata + | None = ..., + completion_callbacks: collections.abc.Iterable[ + temporalio.api.common.v1.message_pb2.Callback + ] + | None = ..., + links: collections.abc.Iterable[temporalio.api.common.v1.message_pb2.Link] + | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "input", + b"input", + "on_conflict_options", + b"on_conflict_options", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "search_attributes", + b"search_attributes", + "start_to_close_timeout", + b"start_to_close_timeout", + "user_metadata", + b"user_metadata", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "completion_callbacks", + b"completion_callbacks", + "endpoint", + b"endpoint", + "id_conflict_policy", + b"id_conflict_policy", + "id_reuse_policy", + b"id_reuse_policy", + "identity", + b"identity", + "input", + b"input", + "links", + b"links", + "namespace", + b"namespace", + "nexus_header", + b"nexus_header", + "on_conflict_options", + b"on_conflict_options", + "operation", + b"operation", + "operation_id", + b"operation_id", + "request_id", + b"request_id", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "search_attributes", + b"search_attributes", + "service", + b"service", + "start_to_close_timeout", + b"start_to_close_timeout", + "user_metadata", + b"user_metadata", + ], + ) -> None: ... + +global___StartNexusOperationExecutionRequest = StartNexusOperationExecutionRequest + +@typing.final +class StartNexusOperationExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RUN_ID_FIELD_NUMBER: builtins.int + STARTED_FIELD_NUMBER: builtins.int + run_id: builtins.str + """The run ID of the operation that was started - or used (via NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING).""" + started: builtins.bool + """If true, a new operation was started.""" + def __init__( + self, + *, + run_id: builtins.str = ..., + started: builtins.bool = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["run_id", b"run_id", "started", b"started"] + ) -> None: ... + +global___StartNexusOperationExecutionResponse = StartNexusOperationExecutionResponse + +@typing.final +class DescribeNexusOperationExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + OPERATION_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + INCLUDE_INPUT_FIELD_NUMBER: builtins.int + INCLUDE_OUTCOME_FIELD_NUMBER: builtins.int + LONG_POLL_TOKEN_FIELD_NUMBER: builtins.int + namespace: builtins.str + operation_id: builtins.str + run_id: builtins.str + """Operation run ID. If empty the request targets the latest run.""" + include_input: builtins.bool + """Include the input field in the response.""" + include_outcome: builtins.bool + """Include the outcome (result/failure) in the response if the operation has completed.""" + long_poll_token: builtins.bytes + """Token from a previous DescribeNexusOperationExecutionResponse. If present, this RPC will long-poll until operation + state changes from the state encoded in this token. If absent, return current state immediately. + If present, run_id must also be present. + Note that operation state may change multiple times between requests, therefore it is not + guaranteed that a client making a sequence of long-poll requests will see a complete + sequence of state changes. + """ + def __init__( + self, + *, + namespace: builtins.str = ..., + operation_id: builtins.str = ..., + run_id: builtins.str = ..., + include_input: builtins.bool = ..., + include_outcome: builtins.bool = ..., + long_poll_token: builtins.bytes = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "include_input", + b"include_input", + "include_outcome", + b"include_outcome", + "long_poll_token", + b"long_poll_token", + "namespace", + b"namespace", + "operation_id", + b"operation_id", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___DescribeNexusOperationExecutionRequest = DescribeNexusOperationExecutionRequest + +@typing.final +class DescribeNexusOperationExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RUN_ID_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + INPUT_FIELD_NUMBER: builtins.int + RESULT_FIELD_NUMBER: builtins.int + FAILURE_FIELD_NUMBER: builtins.int + LONG_POLL_TOKEN_FIELD_NUMBER: builtins.int + COMPLETION_CALLBACKS_FIELD_NUMBER: builtins.int + run_id: builtins.str + """The run ID of the operation, useful when run_id was not specified in the request.""" + long_poll_token: builtins.bytes + """Token for follow-on long-poll requests. Absent only if the operation is complete.""" + @property + def info(self) -> temporalio.api.nexus.v1.message_pb2.NexusOperationExecutionInfo: + """Information about the operation.""" + + @property + def input(self) -> temporalio.api.common.v1.message_pb2.Payload: + """Serialized operation input, passed as the request payload. + Only set if include_input was true in the request. + """ + + @property + def result(self) -> temporalio.api.common.v1.message_pb2.Payload: + """The result if the operation completed successfully.""" + + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The failure if the operation completed unsuccessfully.""" + + @property + def completion_callbacks( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.nexusoperation.v1.message_pb2.CallbackInfo + ]: + """Completion callbacks to be invoked once the Nexus operation reaches a terminal state. + They will remain in the CALLBACK_STATE_STANDBY state until the Nexus operation is finished. + """ + + def __init__( + self, + *, + run_id: builtins.str = ..., + info: temporalio.api.nexus.v1.message_pb2.NexusOperationExecutionInfo + | None = ..., + input: temporalio.api.common.v1.message_pb2.Payload | None = ..., + result: temporalio.api.common.v1.message_pb2.Payload | None = ..., + failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., + long_poll_token: builtins.bytes = ..., + completion_callbacks: collections.abc.Iterable[ + temporalio.api.nexusoperation.v1.message_pb2.CallbackInfo + ] + | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "failure", + b"failure", + "info", + b"info", + "input", + b"input", + "outcome", + b"outcome", + "result", + b"result", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "completion_callbacks", + b"completion_callbacks", + "failure", + b"failure", + "info", + b"info", + "input", + b"input", + "long_poll_token", + b"long_poll_token", + "outcome", + b"outcome", + "result", + b"result", + "run_id", + b"run_id", + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["outcome", b"outcome"] + ) -> typing.Literal["result", "failure"] | None: ... + +global___DescribeNexusOperationExecutionResponse = ( + DescribeNexusOperationExecutionResponse +) + +@typing.final +class PollNexusOperationExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + OPERATION_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + WAIT_STAGE_FIELD_NUMBER: builtins.int + namespace: builtins.str + operation_id: builtins.str + run_id: builtins.str + """Operation run ID. If empty the request targets the latest run.""" + wait_stage: temporalio.api.enums.v1.nexus_pb2.NexusOperationWaitStage.ValueType + """Stage to wait for. The operation may be in a more advanced stage when the poll is unblocked.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + operation_id: builtins.str = ..., + run_id: builtins.str = ..., + wait_stage: temporalio.api.enums.v1.nexus_pb2.NexusOperationWaitStage.ValueType = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "namespace", + b"namespace", + "operation_id", + b"operation_id", + "run_id", + b"run_id", + "wait_stage", + b"wait_stage", + ], + ) -> None: ... + +global___PollNexusOperationExecutionRequest = PollNexusOperationExecutionRequest + +@typing.final +class PollNexusOperationExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RUN_ID_FIELD_NUMBER: builtins.int + WAIT_STAGE_FIELD_NUMBER: builtins.int + OPERATION_TOKEN_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int + RESULT_FIELD_NUMBER: builtins.int + FAILURE_FIELD_NUMBER: builtins.int + run_id: builtins.str + """The run ID of the operation, useful when run_id was not specified in the request.""" + wait_stage: temporalio.api.enums.v1.nexus_pb2.NexusOperationWaitStage.ValueType + """The current stage of the operation. May be more advanced than the stage requested in the poll.""" + operation_token: builtins.str + """Operation token. Only populated for asynchronous operations after a successful StartOperation call.""" + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context for this operation's payloads, derived from its stored target. + For a reused operation, this is the original execution's context. + """ + + @property + def result(self) -> temporalio.api.common.v1.message_pb2.Payload: + """The result if the operation completed successfully.""" + + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: + """The failure if the operation completed unsuccessfully.""" + + def __init__( + self, + *, + run_id: builtins.str = ..., + wait_stage: temporalio.api.enums.v1.nexus_pb2.NexusOperationWaitStage.ValueType = ..., + operation_token: builtins.str = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., + result: temporalio.api.common.v1.message_pb2.Payload | None = ..., + failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "failure", + b"failure", + "outcome", + b"outcome", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "result", + b"result", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "failure", + b"failure", + "operation_token", + b"operation_token", + "outcome", + b"outcome", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + "result", + b"result", + "run_id", + b"run_id", + "wait_stage", + b"wait_stage", + ], + ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["outcome", b"outcome"] + ) -> typing.Literal["result", "failure"] | None: ... + +global___PollNexusOperationExecutionResponse = PollNexusOperationExecutionResponse + +@typing.final +class ListNexusOperationExecutionsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + PAGE_SIZE_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + namespace: builtins.str + page_size: builtins.int + """Max number of operations to return per page.""" + next_page_token: builtins.bytes + """Token returned in ListNexusOperationExecutionsResponse.""" + query: builtins.str + """Visibility query, see https://docs.temporal.io/list-filter for the syntax. + Search attributes that are avaialble for Nexus operations include: + - OperationId + - RunId + - Endpoint + - Service + - Operation + - RequestId + - StartTime + - ExecutionTime + - CloseTime + - ExecutionStatus + - ExecutionDuration + - StateTransitionCount + """ + def __init__( + self, + *, + namespace: builtins.str = ..., + page_size: builtins.int = ..., + next_page_token: builtins.bytes = ..., + query: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "namespace", + b"namespace", + "next_page_token", + b"next_page_token", + "page_size", + b"page_size", + "query", + b"query", + ], + ) -> None: ... + +global___ListNexusOperationExecutionsRequest = ListNexusOperationExecutionsRequest + +@typing.final +class ListNexusOperationExecutionsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + OPERATIONS_FIELD_NUMBER: builtins.int + NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int + next_page_token: builtins.bytes + """Token to use to fetch the next page. If empty, there is no next page.""" + @property + def operations( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.nexus.v1.message_pb2.NexusOperationExecutionListInfo + ]: ... + def __init__( + self, + *, + operations: collections.abc.Iterable[ + temporalio.api.nexus.v1.message_pb2.NexusOperationExecutionListInfo + ] + | None = ..., + next_page_token: builtins.bytes = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "next_page_token", b"next_page_token", "operations", b"operations" + ], + ) -> None: ... + +global___ListNexusOperationExecutionsResponse = ListNexusOperationExecutionsResponse + +@typing.final +class CountActivityExecutionsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + namespace: builtins.str + query: builtins.str + """Visibility query, see https://docs.temporal.io/list-filter for the syntax.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + query: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["namespace", b"namespace", "query", b"query"] + ) -> None: ... + +global___CountActivityExecutionsRequest = CountActivityExecutionsRequest + +@typing.final +class CountActivityExecutionsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class AggregationGroup(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + GROUP_VALUES_FIELD_NUMBER: builtins.int + COUNT_FIELD_NUMBER: builtins.int + count: builtins.int + @property + def group_values( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Payload + ]: ... + def __init__( + self, + *, + group_values: collections.abc.Iterable[ + temporalio.api.common.v1.message_pb2.Payload + ] + | None = ..., + count: builtins.int = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "count", b"count", "group_values", b"group_values" + ], + ) -> None: ... + + COUNT_FIELD_NUMBER: builtins.int + GROUPS_FIELD_NUMBER: builtins.int + count: builtins.int + """If `query` is not grouping by any field, the count is an approximate number + of activities that match the query. + If `query` is grouping by a field, the count is simply the sum of the counts + of the groups returned in the response. This number can be smaller than the + total number of activities matching the query. + """ + @property + def groups( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___CountActivityExecutionsResponse.AggregationGroup + ]: + """Contains the groups if the request is grouping by a field. + The list might not be complete, and the counts of each group is approximate. + """ + + def __init__( + self, + *, + count: builtins.int = ..., + groups: collections.abc.Iterable[ + global___CountActivityExecutionsResponse.AggregationGroup + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["count", b"count", "groups", b"groups"] + ) -> None: ... + +global___CountActivityExecutionsResponse = CountActivityExecutionsResponse + +@typing.final +class CountNexusOperationExecutionsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + namespace: builtins.str + query: builtins.str + """Visibility query, see https://docs.temporal.io/list-filter for the syntax. + See also ListNexusOperationExecutionsRequest for search attributes available for Nexus operations. + """ + def __init__( + self, + *, + namespace: builtins.str = ..., + query: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["namespace", b"namespace", "query", b"query"] + ) -> None: ... + +global___CountNexusOperationExecutionsRequest = CountNexusOperationExecutionsRequest + +@typing.final +class CountNexusOperationExecutionsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class AggregationGroup(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + GROUP_VALUES_FIELD_NUMBER: builtins.int + COUNT_FIELD_NUMBER: builtins.int + count: builtins.int + @property + def group_values( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.common.v1.message_pb2.Payload + ]: ... + def __init__( + self, + *, + group_values: collections.abc.Iterable[ + temporalio.api.common.v1.message_pb2.Payload + ] + | None = ..., + count: builtins.int = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "count", b"count", "group_values", b"group_values" + ], + ) -> None: ... + + COUNT_FIELD_NUMBER: builtins.int + GROUPS_FIELD_NUMBER: builtins.int + count: builtins.int + """If `query` is not grouping by any field, the count is an approximate number + of operations that match the query. + If `query` is grouping by a field, the count is simply the sum of the counts + of the groups returned in the response. This number can be smaller than the + total number of operations matching the query. + """ + @property + def groups( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___CountNexusOperationExecutionsResponse.AggregationGroup + ]: + """Contains the groups if the request is grouping by a field. + The list might not be complete, and the counts of each group is approximate. + """ + + def __init__( + self, + *, + count: builtins.int = ..., + groups: collections.abc.Iterable[ + global___CountNexusOperationExecutionsResponse.AggregationGroup + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["count", b"count", "groups", b"groups"] + ) -> None: ... + +global___CountNexusOperationExecutionsResponse = CountNexusOperationExecutionsResponse + +@typing.final +class RequestCancelActivityExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + namespace: builtins.str + activity_id: builtins.str + run_id: builtins.str + """Activity run ID. If empty, targets the latest run.""" + identity: builtins.str + """The identity of the worker/client.""" + request_id: builtins.str + """Used to de-dupe cancellation requests.""" + reason: builtins.str + """Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. + Not propagated to a worker if an activity attempt is currently running. + """ + def __init__( + self, + *, + namespace: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., + request_id: builtins.str = ..., + reason: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "identity", + b"identity", + "namespace", + b"namespace", + "reason", + b"reason", + "request_id", + b"request_id", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___RequestCancelActivityExecutionRequest = RequestCancelActivityExecutionRequest + +@typing.final +class RequestCancelActivityExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestCancelActivityExecutionResponse = RequestCancelActivityExecutionResponse + +@typing.final +class TerminateActivityExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + namespace: builtins.str + activity_id: builtins.str + run_id: builtins.str + """Activity run ID. If empty, targets the latest run.""" + identity: builtins.str + """The identity of the worker/client.""" + request_id: builtins.str + """Used to de-dupe termination requests.""" + reason: builtins.str + """Reason for requesting the termination, recorded in in the activity's result failure outcome.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., + request_id: builtins.str = ..., + reason: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "identity", + b"identity", + "namespace", + b"namespace", + "reason", + b"reason", + "request_id", + b"request_id", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___TerminateActivityExecutionRequest = TerminateActivityExecutionRequest + +@typing.final +class TerminateActivityExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___TerminateActivityExecutionResponse = TerminateActivityExecutionResponse + +@typing.final +class DeleteActivityExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + ACTIVITY_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + activity_id: builtins.str + run_id: builtins.str + """Activity run ID, targets the latest run if run_id is empty.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + activity_id: builtins.str = ..., + run_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "activity_id", + b"activity_id", + "namespace", + b"namespace", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___DeleteActivityExecutionRequest = DeleteActivityExecutionRequest + +@typing.final +class DeleteActivityExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___DeleteActivityExecutionResponse = DeleteActivityExecutionResponse + +@typing.final +class RequestCancelNexusOperationExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + OPERATION_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + namespace: builtins.str + operation_id: builtins.str + run_id: builtins.str + """Operation run ID, targets the latest run if empty.""" + identity: builtins.str + """The identity of the client who initiated this request.""" + request_id: builtins.str + """Used to de-dupe cancellation requests.""" + reason: builtins.str + """Reason for requesting the cancellation, recorded and available via the DescribeNexusOperationExecution API.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + operation_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., + request_id: builtins.str = ..., + reason: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "identity", + b"identity", + "namespace", + b"namespace", + "operation_id", + b"operation_id", + "reason", + b"reason", + "request_id", + b"request_id", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___RequestCancelNexusOperationExecutionRequest = ( + RequestCancelNexusOperationExecutionRequest +) + +@typing.final +class RequestCancelNexusOperationExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestCancelNexusOperationExecutionResponse = ( + RequestCancelNexusOperationExecutionResponse +) + +@typing.final +class TerminateNexusOperationExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + OPERATION_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + REASON_FIELD_NUMBER: builtins.int + namespace: builtins.str + operation_id: builtins.str + run_id: builtins.str + """Operation run ID, targets the latest run if empty.""" + identity: builtins.str + """The identity of the client who initiated this request.""" + request_id: builtins.str + """Used to de-dupe termination requests.""" + reason: builtins.str + """Reason for requesting the termination, recorded in the operation's result failure outcome.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + operation_id: builtins.str = ..., + run_id: builtins.str = ..., + identity: builtins.str = ..., + request_id: builtins.str = ..., + reason: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "identity", + b"identity", + "namespace", + b"namespace", + "operation_id", + b"operation_id", + "reason", + b"reason", + "request_id", + b"request_id", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___TerminateNexusOperationExecutionRequest = ( + TerminateNexusOperationExecutionRequest +) + +@typing.final +class TerminateNexusOperationExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___TerminateNexusOperationExecutionResponse = ( + TerminateNexusOperationExecutionResponse +) + +@typing.final +class DeleteNexusOperationExecutionRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + OPERATION_ID_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + operation_id: builtins.str + run_id: builtins.str + """Operation run ID, targets the latest run if empty.""" + def __init__( + self, + *, + namespace: builtins.str = ..., + operation_id: builtins.str = ..., + run_id: builtins.str = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "namespace", + b"namespace", + "operation_id", + b"operation_id", + "run_id", + b"run_id", + ], + ) -> None: ... + +global___DeleteNexusOperationExecutionRequest = DeleteNexusOperationExecutionRequest + +@typing.final +class DeleteNexusOperationExecutionResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___DeleteNexusOperationExecutionResponse = DeleteNexusOperationExecutionResponse + +@typing.final +class PollWorkflowExecutionTimeSkippingRequest(google.protobuf.message.Message): + """A long-poll request that blocks according to a time-skipping waiting policy on the workflow + execution. Currently the only supported policy is waiting for completion of the fast-forward + identified by `fast_forward_id`; the poll also returns once anything else settles that outcome + (e.g. the execution ends or time skipping is disabled). + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_FIELD_NUMBER: builtins.int + WORKFLOW_EXECUTION_FIELD_NUMBER: builtins.int + FAST_FORWARD_ID_FIELD_NUMBER: builtins.int + namespace: builtins.str + fast_forward_id: builtins.str + """Required. Identifies the fast-forward whose completion the caller wants to wait for. + Must match the `fast_forward_id` set in the execution's TimeSkippingConfig. + """ + @property + def workflow_execution( + self, + ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: ... + def __init__( + self, + *, + namespace: builtins.str = ..., + workflow_execution: temporalio.api.common.v1.message_pb2.WorkflowExecution + | None = ..., + fast_forward_id: builtins.str = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "fast_forward_id", + b"fast_forward_id", + "namespace", + b"namespace", + "workflow_execution", + b"workflow_execution", + ], + ) -> None: ... + +global___PollWorkflowExecutionTimeSkippingRequest = ( + PollWorkflowExecutionTimeSkippingRequest +) + +@typing.final +class PollWorkflowExecutionTimeSkippingResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + FAST_FORWARD_POLLING_RESULT_FIELD_NUMBER: builtins.int + FAILED_REASON_FIELD_NUMBER: builtins.int + FAST_FORWARD_INFO_FIELD_NUMBER: builtins.int + fast_forward_polling_result: ( + temporalio.api.enums.v1.time_skipping_pb2.FastForwardPollingResult.ValueType + ) + """The outcome of the poll for the fast-forward identified by the request's `fast_forward_id`.""" + failed_reason: builtins.str + """Set only when the result is FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED; explains why + the fast-forward can no longer complete. + """ + @property + def fast_forward_info( + self, + ) -> temporalio.api.common.v1.message_pb2.TimeSkippingFastForwardInfo: + """The execution's current fast-forward, if any.""" + + def __init__( + self, + *, + fast_forward_polling_result: temporalio.api.enums.v1.time_skipping_pb2.FastForwardPollingResult.ValueType = ..., + failed_reason: builtins.str = ..., + fast_forward_info: temporalio.api.common.v1.message_pb2.TimeSkippingFastForwardInfo + | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["fast_forward_info", b"fast_forward_info"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "failed_reason", + b"failed_reason", + "fast_forward_info", + b"fast_forward_info", + "fast_forward_polling_result", + b"fast_forward_polling_result", + ], + ) -> None: ... + +global___PollWorkflowExecutionTimeSkippingResponse = ( + PollWorkflowExecutionTimeSkippingResponse +) diff --git a/temporalio/api/workflowservice/v1/request_response_pb2_grpc.pyi b/temporalio/api/workflowservice/v1/request_response_pb2_grpc.pyi index f3a5a087ef..de236ac811 100644 --- a/temporalio/api/workflowservice/v1/request_response_pb2_grpc.pyi +++ b/temporalio/api/workflowservice/v1/request_response_pb2_grpc.pyi @@ -2,3 +2,20 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + +import abc +import collections.abc +import typing + +import grpc +import grpc.aio + +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator( + collections.abc.AsyncIterator[_T], + collections.abc.Iterator[_T], + metaclass=abc.ABCMeta, +): ... +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... diff --git a/temporalio/api/workflowservice/v1/service_pb2.py b/temporalio/api/workflowservice/v1/service_pb2.py index fd664f39fd..a0e5ad183d 100644 --- a/temporalio/api/workflowservice/v1/service_pb2.py +++ b/temporalio/api/workflowservice/v1/service_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -16,16 +15,22 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from temporalio.api.dependencies.nexusannotations.v1 import ( + options_pb2 as nexusannotations_dot_v1_dot_options__pb2, +) +from temporalio.api.protometa.v1 import ( + annotations_pb2 as temporal_dot_api_dot_protometa_dot_v1_dot_annotations__pb2, +) from temporalio.api.workflowservice.v1 import ( request_response_pb2 as temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2, ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n-temporal/api/workflowservice/v1/service.proto\x12\x1ftemporal.api.workflowservice.v1\x1a\x36temporal/api/workflowservice/v1/request_response.proto\x1a\x1cgoogle/api/annotations.proto2\xfb\xc1\x01\n\x0fWorkflowService\x12\xc3\x01\n\x11RegisterNamespace\x12\x39.temporal.api.workflowservice.v1.RegisterNamespaceRequest\x1a:.temporal.api.workflowservice.v1.RegisterNamespaceResponse"7\x82\xd3\xe4\x93\x02\x31"\x13/cluster/namespaces:\x01*Z\x17"\x12/api/v1/namespaces:\x01*\x12\xd5\x01\n\x11\x44\x65scribeNamespace\x12\x39.temporal.api.workflowservice.v1.DescribeNamespaceRequest\x1a:.temporal.api.workflowservice.v1.DescribeNamespaceResponse"I\x82\xd3\xe4\x93\x02\x43\x12\x1f/cluster/namespaces/{namespace}Z \x12\x1e/api/v1/namespaces/{namespace}\x12\xb4\x01\n\x0eListNamespaces\x12\x36.temporal.api.workflowservice.v1.ListNamespacesRequest\x1a\x37.temporal.api.workflowservice.v1.ListNamespacesResponse"1\x82\xd3\xe4\x93\x02+\x12\x13/cluster/namespacesZ\x14\x12\x12/api/v1/namespaces\x12\xe3\x01\n\x0fUpdateNamespace\x12\x37.temporal.api.workflowservice.v1.UpdateNamespaceRequest\x1a\x38.temporal.api.workflowservice.v1.UpdateNamespaceResponse"]\x82\xd3\xe4\x93\x02W"&/cluster/namespaces/{namespace}/update:\x01*Z*"%/api/v1/namespaces/{namespace}/update:\x01*\x12\x8f\x01\n\x12\x44\x65precateNamespace\x12:.temporal.api.workflowservice.v1.DeprecateNamespaceRequest\x1a;.temporal.api.workflowservice.v1.DeprecateNamespaceResponse"\x00\x12\x92\x02\n\x16StartWorkflowExecution\x12>.temporal.api.workflowservice.v1.StartWorkflowExecutionRequest\x1a?.temporal.api.workflowservice.v1.StartWorkflowExecutionResponse"w\x82\xd3\xe4\x93\x02q"//namespaces/{namespace}/workflows/{workflow_id}:\x01*Z;"6/api/v1/namespaces/{namespace}/workflows/{workflow_id}:\x01*\x12\xa5\x02\n\x15\x45xecuteMultiOperation\x12=.temporal.api.workflowservice.v1.ExecuteMultiOperationRequest\x1a>.temporal.api.workflowservice.v1.ExecuteMultiOperationResponse"\x8c\x01\x82\xd3\xe4\x93\x02\x85\x01"9/namespaces/{namespace}/workflows/execute-multi-operation:\x01*ZE"@/api/v1/namespaces/{namespace}/workflows/execute-multi-operation:\x01*\x12\xc1\x02\n\x1bGetWorkflowExecutionHistory\x12\x43.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest\x1a\x44.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse"\x96\x01\x82\xd3\xe4\x93\x02\x8f\x01\x12\x41/namespaces/{namespace}/workflows/{execution.workflow_id}/historyZJ\x12H/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history\x12\xe6\x02\n"GetWorkflowExecutionHistoryReverse\x12J.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest\x1aK.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse"\xa6\x01\x82\xd3\xe4\x93\x02\x9f\x01\x12I/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverseZR\x12P/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse\x12\x98\x01\n\x15PollWorkflowTaskQueue\x12=.temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest\x1a>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse"\x00\x12\xad\x01\n\x1cRespondWorkflowTaskCompleted\x12\x44.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest\x1a\x45.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse"\x00\x12\xa4\x01\n\x19RespondWorkflowTaskFailed\x12\x41.temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse"\x00\x12\x98\x01\n\x15PollActivityTaskQueue\x12=.temporal.api.workflowservice.v1.PollActivityTaskQueueRequest\x1a>.temporal.api.workflowservice.v1.PollActivityTaskQueueResponse"\x00\x12\x9b\x02\n\x1bRecordActivityTaskHeartbeat\x12\x43.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest\x1a\x44.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse"q\x82\xd3\xe4\x93\x02k",/namespaces/{namespace}/activities/heartbeat:\x01*Z8"3/api/v1/namespaces/{namespace}/activities/heartbeat:\x01*\x12\xb3\x02\n\x1fRecordActivityTaskHeartbeatById\x12G.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest\x1aH.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse"}\x82\xd3\xe4\x93\x02w"2/namespaces/{namespace}/activities/heartbeat-by-id:\x01*Z>"9/api/v1/namespaces/{namespace}/activities/heartbeat-by-id:\x01*\x12\x9c\x02\n\x1cRespondActivityTaskCompleted\x12\x44.temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest\x1a\x45.temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse"o\x82\xd3\xe4\x93\x02i"+/namespaces/{namespace}/activities/complete:\x01*Z7"2/api/v1/namespaces/{namespace}/activities/complete:\x01*\x12\xb4\x02\n RespondActivityTaskCompletedById\x12H.temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest\x1aI.temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse"{\x82\xd3\xe4\x93\x02u"1/namespaces/{namespace}/activities/complete-by-id:\x01*Z="8/api/v1/namespaces/{namespace}/activities/complete-by-id:\x01*\x12\x8b\x02\n\x19RespondActivityTaskFailed\x12\x41.temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse"g\x82\xd3\xe4\x93\x02\x61"\'/namespaces/{namespace}/activities/fail:\x01*Z3"./api/v1/namespaces/{namespace}/activities/fail:\x01*\x12\xa3\x02\n\x1dRespondActivityTaskFailedById\x12\x45.temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest\x1a\x46.temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse"s\x82\xd3\xe4\x93\x02m"-/namespaces/{namespace}/activities/fail-by-id:\x01*Z9"4/api/v1/namespaces/{namespace}/activities/fail-by-id:\x01*\x12\x95\x02\n\x1bRespondActivityTaskCanceled\x12\x43.temporal.api.workflowservice.v1.RespondActivityTaskCanceledRequest\x1a\x44.temporal.api.workflowservice.v1.RespondActivityTaskCanceledResponse"k\x82\xd3\xe4\x93\x02\x65")/namespaces/{namespace}/activities/cancel:\x01*Z5"0/api/v1/namespaces/{namespace}/activities/cancel:\x01*\x12\xad\x02\n\x1fRespondActivityTaskCanceledById\x12G.temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest\x1aH.temporal.api.workflowservice.v1.RespondActivityTaskCanceledByIdResponse"w\x82\xd3\xe4\x93\x02q"//namespaces/{namespace}/activities/cancel-by-id:\x01*Z;"6/api/v1/namespaces/{namespace}/activities/cancel-by-id:\x01*\x12\xe0\x02\n\x1eRequestCancelWorkflowExecution\x12\x46.temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest\x1aG.temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionResponse"\xac\x01\x82\xd3\xe4\x93\x02\xa5\x01"I/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel:\x01*ZU"P/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel:\x01*\x12\xe7\x02\n\x17SignalWorkflowExecution\x12?.temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest\x1a@.temporal.api.workflowservice.v1.SignalWorkflowExecutionResponse"\xc8\x01\x82\xd3\xe4\x93\x02\xc1\x01"W/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}:\x01*Zc"^/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signal_name}:\x01*\x12\xf2\x02\n SignalWithStartWorkflowExecution\x12H.temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest\x1aI.temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse"\xb8\x01\x82\xd3\xe4\x93\x02\xb1\x01"O/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}:\x01*Z["V/api/v1/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}:\x01*\x12\xc6\x02\n\x16ResetWorkflowExecution\x12>.temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest\x1a?.temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse"\xaa\x01\x82\xd3\xe4\x93\x02\xa3\x01"H/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset:\x01*ZT"O/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset:\x01*\x12\xda\x02\n\x1aTerminateWorkflowExecution\x12\x42.temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest\x1a\x43.temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse"\xb2\x01\x82\xd3\xe4\x93\x02\xab\x01"L/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate:\x01*ZX"S/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate:\x01*\x12\x9e\x01\n\x17\x44\x65leteWorkflowExecution\x12?.temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest\x1a@.temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse"\x00\x12\xa7\x01\n\x1aListOpenWorkflowExecutions\x12\x42.temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest\x1a\x43.temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse"\x00\x12\xad\x01\n\x1cListClosedWorkflowExecutions\x12\x44.temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest\x1a\x45.temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse"\x00\x12\xf0\x01\n\x16ListWorkflowExecutions\x12>.temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest\x1a?.temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse"U\x82\xd3\xe4\x93\x02O\x12!/namespaces/{namespace}/workflowsZ*\x12(/api/v1/namespaces/{namespace}/workflows\x12\x9a\x02\n\x1eListArchivedWorkflowExecutions\x12\x46.temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest\x1aG.temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse"g\x82\xd3\xe4\x93\x02\x61\x12*/namespaces/{namespace}/archived-workflowsZ3\x12\x31/api/v1/namespaces/{namespace}/archived-workflows\x12\x9b\x01\n\x16ScanWorkflowExecutions\x12>.temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest\x1a?.temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse"\x00\x12\xfd\x01\n\x17\x43ountWorkflowExecutions\x12?.temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest\x1a@.temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse"_\x82\xd3\xe4\x93\x02Y\x12&/namespaces/{namespace}/workflow-countZ/\x12-/api/v1/namespaces/{namespace}/workflow-count\x12\x92\x01\n\x13GetSearchAttributes\x12;.temporal.api.workflowservice.v1.GetSearchAttributesRequest\x1a<.temporal.api.workflowservice.v1.GetSearchAttributesResponse"\x00\x12\xa4\x01\n\x19RespondQueryTaskCompleted\x12\x41.temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse"\x00\x12\x95\x01\n\x14ResetStickyTaskQueue\x12<.temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest\x1a=.temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse"\x00\x12\x83\x01\n\x0eShutdownWorker\x12\x36.temporal.api.workflowservice.v1.ShutdownWorkerRequest\x1a\x37.temporal.api.workflowservice.v1.ShutdownWorkerResponse"\x00\x12\xbf\x02\n\rQueryWorkflow\x12\x35.temporal.api.workflowservice.v1.QueryWorkflowRequest\x1a\x36.temporal.api.workflowservice.v1.QueryWorkflowResponse"\xbe\x01\x82\xd3\xe4\x93\x02\xb7\x01"R/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}:\x01*Z^"Y/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}:\x01*\x12\xaa\x02\n\x19\x44\x65scribeWorkflowExecution\x12\x41.temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest\x1a\x42.temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse"\x85\x01\x82\xd3\xe4\x93\x02\x7f\x12\x39/namespaces/{namespace}/workflows/{execution.workflow_id}ZB\x12@/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}\x12\x89\x02\n\x11\x44\x65scribeTaskQueue\x12\x39.temporal.api.workflowservice.v1.DescribeTaskQueueRequest\x1a:.temporal.api.workflowservice.v1.DescribeTaskQueueResponse"}\x82\xd3\xe4\x93\x02w\x12\x35/namespaces/{namespace}/task-queues/{task_queue.name}Z>\x12/namespaces/{namespace}/schedules/{schedule_id}/matching-timesZG\x12\x45/api/v1/namespaces/{namespace}/schedules/{schedule_id}/matching-times\x12\xf4\x01\n\x0e\x44\x65leteSchedule\x12\x36.temporal.api.workflowservice.v1.DeleteScheduleRequest\x1a\x37.temporal.api.workflowservice.v1.DeleteScheduleResponse"q\x82\xd3\xe4\x93\x02k*//namespaces/{namespace}/schedules/{schedule_id}Z8*6/api/v1/namespaces/{namespace}/schedules/{schedule_id}\x12\xd5\x01\n\rListSchedules\x12\x35.temporal.api.workflowservice.v1.ListSchedulesRequest\x1a\x36.temporal.api.workflowservice.v1.ListSchedulesResponse"U\x82\xd3\xe4\x93\x02O\x12!/namespaces/{namespace}/schedulesZ*\x12(/api/v1/namespaces/{namespace}/schedules\x12\xb9\x01\n UpdateWorkerBuildIdCompatibility\x12H.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest\x1aI.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse"\x00\x12\xe1\x02\n\x1dGetWorkerBuildIdCompatibility\x12\x45.temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest\x1a\x46.temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse"\xb0\x01\x82\xd3\xe4\x93\x02\xa9\x01\x12N/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibilityZW\x12U/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility\x12\xaa\x01\n\x1bUpdateWorkerVersioningRules\x12\x43.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest\x1a\x44.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse"\x00\x12\xc6\x02\n\x18GetWorkerVersioningRules\x12@.temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest\x1a\x41.temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse"\xa4\x01\x82\xd3\xe4\x93\x02\x9d\x01\x12H/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rulesZQ\x12O/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules\x12\x97\x02\n\x19GetWorkerTaskReachability\x12\x41.temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest\x1a\x42.temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse"s\x82\xd3\xe4\x93\x02m\x12\x30/namespaces/{namespace}/worker-task-reachabilityZ9\x12\x37/api/v1/namespaces/{namespace}/worker-task-reachability\x12\xc8\x02\n\x12\x44\x65scribeDeployment\x12:.temporal.api.workflowservice.v1.DescribeDeploymentRequest\x1a;.temporal.api.workflowservice.v1.DescribeDeploymentResponse"\xb8\x01\x82\xd3\xe4\x93\x02\xb1\x01\x12R/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}Z[\x12Y/api/v1/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}\x12\xb5\x03\n\x1f\x44\x65scribeWorkerDeploymentVersion\x12G.temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest\x1aH.temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse"\xfe\x01\x82\xd3\xe4\x93\x02\xf7\x01\x12u/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}Z~\x12|/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}\x12\xdf\x01\n\x0fListDeployments\x12\x37.temporal.api.workflowservice.v1.ListDeploymentsRequest\x1a\x38.temporal.api.workflowservice.v1.ListDeploymentsResponse"Y\x82\xd3\xe4\x93\x02S\x12#/namespaces/{namespace}/deploymentsZ,\x12*/api/v1/namespaces/{namespace}/deployments\x12\xf7\x02\n\x19GetDeploymentReachability\x12\x41.temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest\x1a\x42.temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse"\xd2\x01\x82\xd3\xe4\x93\x02\xcb\x01\x12_/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachabilityZh\x12\x66/api/v1/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachability\x12\x99\x02\n\x14GetCurrentDeployment\x12<.temporal.api.workflowservice.v1.GetCurrentDeploymentRequest\x1a=.temporal.api.workflowservice.v1.GetCurrentDeploymentResponse"\x83\x01\x82\xd3\xe4\x93\x02}\x12\x38/namespaces/{namespace}/current-deployment/{series_name}ZA\x12?/api/v1/namespaces/{namespace}/current-deployment/{series_name}\x12\xb6\x02\n\x14SetCurrentDeployment\x12<.temporal.api.workflowservice.v1.SetCurrentDeploymentRequest\x1a=.temporal.api.workflowservice.v1.SetCurrentDeploymentResponse"\xa0\x01\x82\xd3\xe4\x93\x02\x99\x01"C/namespaces/{namespace}/current-deployment/{deployment.series_name}:\x01*ZO"J/api/v1/namespaces/{namespace}/current-deployment/{deployment.series_name}:\x01*\x12\xf7\x02\n!SetWorkerDeploymentCurrentVersion\x12I.temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest\x1aJ.temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse"\xba\x01\x82\xd3\xe4\x93\x02\xb3\x01"P/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version:\x01*Z\\"W/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version:\x01*\x12\xae\x02\n\x18\x44\x65scribeWorkerDeployment\x12@.temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest\x1a\x41.temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse"\x8c\x01\x82\xd3\xe4\x93\x02\x85\x01\x12.temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest\x1a?.temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse"\x8c\x01\x82\xd3\xe4\x93\x02\x85\x01*.temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse"g\x82\xd3\xe4\x93\x02\x61\x12*/namespaces/{namespace}/worker-deploymentsZ3\x12\x31/api/v1/namespaces/{namespace}/worker-deployments\x12\xf0\x03\n%UpdateWorkerDeploymentVersionMetadata\x12M.temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest\x1aN.temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataResponse"\xa7\x02\x82\xd3\xe4\x93\x02\xa0\x02"\x85\x01/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata:\x01*Z\x92\x01"\x8c\x01/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}/update-metadata:\x01*\x12\xd2\x02\n\x1aSetWorkerDeploymentManager\x12\x42.temporal.api.workflowservice.v1.SetWorkerDeploymentManagerRequest\x1a\x43.temporal.api.workflowservice.v1.SetWorkerDeploymentManagerResponse"\xaa\x01\x82\xd3\xe4\x93\x02\xa3\x01"H/namespaces/{namespace}/worker-deployments/{deployment_name}/set-manager:\x01*ZT"O/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-manager:\x01*\x12\xf5\x02\n\x17UpdateWorkflowExecution\x12?.temporal.api.workflowservice.v1.UpdateWorkflowExecutionRequest\x1a@.temporal.api.workflowservice.v1.UpdateWorkflowExecutionResponse"\xd6\x01\x82\xd3\xe4\x93\x02\xcf\x01"^/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}:\x01*Zj"e/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update/{request.input.name}:\x01*\x12\xaa\x01\n\x1bPollWorkflowExecutionUpdate\x12\x43.temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest\x1a\x44.temporal.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse"\x00\x12\x8d\x02\n\x13StartBatchOperation\x12;.temporal.api.workflowservice.v1.StartBatchOperationRequest\x1a<.temporal.api.workflowservice.v1.StartBatchOperationResponse"{\x82\xd3\xe4\x93\x02u"1/namespaces/{namespace}/batch-operations/{job_id}:\x01*Z="8/api/v1/namespaces/{namespace}/batch-operations/{job_id}:\x01*\x12\x95\x02\n\x12StopBatchOperation\x12:.temporal.api.workflowservice.v1.StopBatchOperationRequest\x1a;.temporal.api.workflowservice.v1.StopBatchOperationResponse"\x85\x01\x82\xd3\xe4\x93\x02\x7f"6/namespaces/{namespace}/batch-operations/{job_id}/stop:\x01*ZB"=/api/v1/namespaces/{namespace}/batch-operations/{job_id}/stop:\x01*\x12\x90\x02\n\x16\x44\x65scribeBatchOperation\x12>.temporal.api.workflowservice.v1.DescribeBatchOperationRequest\x1a?.temporal.api.workflowservice.v1.DescribeBatchOperationResponse"u\x82\xd3\xe4\x93\x02o\x12\x31/namespaces/{namespace}/batch-operations/{job_id}Z:\x12\x38/api/v1/namespaces/{namespace}/batch-operations/{job_id}\x12\xf5\x01\n\x13ListBatchOperations\x12;.temporal.api.workflowservice.v1.ListBatchOperationsRequest\x1a<.temporal.api.workflowservice.v1.ListBatchOperationsResponse"c\x82\xd3\xe4\x93\x02]\x12(/namespaces/{namespace}/batch-operationsZ1\x12//api/v1/namespaces/{namespace}/batch-operations\x12\x8f\x01\n\x12PollNexusTaskQueue\x12:.temporal.api.workflowservice.v1.PollNexusTaskQueueRequest\x1a;.temporal.api.workflowservice.v1.PollNexusTaskQueueResponse"\x00\x12\xa4\x01\n\x19RespondNexusTaskCompleted\x12\x41.temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse"\x00\x12\x9b\x01\n\x16RespondNexusTaskFailed\x12>.temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest\x1a?.temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse"\x00\x12\x93\x02\n\x15UpdateActivityOptions\x12=.temporal.api.workflowservice.v1.UpdateActivityOptionsRequest\x1a>.temporal.api.workflowservice.v1.UpdateActivityOptionsResponse"{\x82\xd3\xe4\x93\x02u"1/namespaces/{namespace}/activities/update-options:\x01*Z="8/api/v1/namespaces/{namespace}/activities/update-options:\x01*\x12\xf0\x02\n\x1eUpdateWorkflowExecutionOptions\x12\x46.temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest\x1aG.temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse"\xbc\x01\x82\xd3\xe4\x93\x02\xb5\x01"Q/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update-options:\x01*Z]"X/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/update-options:\x01*\x12\xe9\x01\n\rPauseActivity\x12\x35.temporal.api.workflowservice.v1.PauseActivityRequest\x1a\x36.temporal.api.workflowservice.v1.PauseActivityResponse"i\x82\xd3\xe4\x93\x02\x63"(/namespaces/{namespace}/activities/pause:\x01*Z4"//api/v1/namespaces/{namespace}/activities/pause:\x01*\x12\xf3\x01\n\x0fUnpauseActivity\x12\x37.temporal.api.workflowservice.v1.UnpauseActivityRequest\x1a\x38.temporal.api.workflowservice.v1.UnpauseActivityResponse"m\x82\xd3\xe4\x93\x02g"*/namespaces/{namespace}/activities/unpause:\x01*Z6"1/api/v1/namespaces/{namespace}/activities/unpause:\x01*\x12\xe9\x01\n\rResetActivity\x12\x35.temporal.api.workflowservice.v1.ResetActivityRequest\x1a\x36.temporal.api.workflowservice.v1.ResetActivityResponse"i\x82\xd3\xe4\x93\x02\x63"(/namespaces/{namespace}/activities/reset:\x01*Z4"//api/v1/namespaces/{namespace}/activities/reset:\x01*\x12\xf4\x01\n\x12\x43reateWorkflowRule\x12:.temporal.api.workflowservice.v1.CreateWorkflowRuleRequest\x1a;.temporal.api.workflowservice.v1.CreateWorkflowRuleResponse"e\x82\xd3\xe4\x93\x02_"&/namespaces/{namespace}/workflow-rules:\x01*Z2"-/api/v1/namespaces/{namespace}/workflow-rules:\x01*\x12\x88\x02\n\x14\x44\x65scribeWorkflowRule\x12<.temporal.api.workflowservice.v1.DescribeWorkflowRuleRequest\x1a=.temporal.api.workflowservice.v1.DescribeWorkflowRuleResponse"s\x82\xd3\xe4\x93\x02m\x12\x30/namespaces/{namespace}/workflow-rules/{rule_id}Z9\x12\x37/api/v1/namespaces/{namespace}/workflow-rules/{rule_id}\x12\x82\x02\n\x12\x44\x65leteWorkflowRule\x12:.temporal.api.workflowservice.v1.DeleteWorkflowRuleRequest\x1a;.temporal.api.workflowservice.v1.DeleteWorkflowRuleResponse"s\x82\xd3\xe4\x93\x02m*0/namespaces/{namespace}/workflow-rules/{rule_id}Z9*7/api/v1/namespaces/{namespace}/workflow-rules/{rule_id}\x12\xeb\x01\n\x11ListWorkflowRules\x12\x39.temporal.api.workflowservice.v1.ListWorkflowRulesRequest\x1a:.temporal.api.workflowservice.v1.ListWorkflowRulesResponse"_\x82\xd3\xe4\x93\x02Y\x12&/namespaces/{namespace}/workflow-rulesZ/\x12-/api/v1/namespaces/{namespace}/workflow-rules\x12\xb9\x02\n\x13TriggerWorkflowRule\x12;.temporal.api.workflowservice.v1.TriggerWorkflowRuleRequest\x1a<.temporal.api.workflowservice.v1.TriggerWorkflowRuleResponse"\xa6\x01\x82\xd3\xe4\x93\x02\x9f\x01"F/namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule:\x01*ZR"M/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule:\x01*\x12\x83\x02\n\x15RecordWorkerHeartbeat\x12=.temporal.api.workflowservice.v1.RecordWorkerHeartbeatRequest\x1a>.temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse"k\x82\xd3\xe4\x93\x02\x65")/namespaces/{namespace}/workers/heartbeat:\x01*Z5"0/api/v1/namespaces/{namespace}/workers/heartbeat:\x01*\x12\xcb\x01\n\x0bListWorkers\x12\x33.temporal.api.workflowservice.v1.ListWorkersRequest\x1a\x34.temporal.api.workflowservice.v1.ListWorkersResponse"Q\x82\xd3\xe4\x93\x02K\x12\x1f/namespaces/{namespace}/workersZ(\x12&/api/v1/namespaces/{namespace}/workers\x12\xaf\x02\n\x15UpdateTaskQueueConfig\x12=.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest\x1a>.temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse"\x96\x01\x82\xd3\xe4\x93\x02\x8f\x01">/namespaces/{namespace}/task-queues/{task_queue}/update-config:\x01*ZJ"E/api/v1/namespaces/{namespace}/task-queues/{task_queue}/update-config:\x01*\x12\xfd\x01\n\x11\x46\x65tchWorkerConfig\x12\x39.temporal.api.workflowservice.v1.FetchWorkerConfigRequest\x1a:.temporal.api.workflowservice.v1.FetchWorkerConfigResponse"q\x82\xd3\xe4\x93\x02k",/namespaces/{namespace}/workers/fetch-config:\x01*Z8"3/api/v1/namespaces/{namespace}/workers/fetch-config:\x01*\x12\x82\x02\n\x12UpdateWorkerConfig\x12:.temporal.api.workflowservice.v1.UpdateWorkerConfigRequest\x1a;.temporal.api.workflowservice.v1.UpdateWorkerConfigResponse"s\x82\xd3\xe4\x93\x02m"-/namespaces/{namespace}/workers/update-config:\x01*Z9"4/api/v1/namespaces/{namespace}/workers/update-config:\x01*\x12\x94\x02\n\x0e\x44\x65scribeWorker\x12\x36.temporal.api.workflowservice.v1.DescribeWorkerRequest\x1a\x37.temporal.api.workflowservice.v1.DescribeWorkerResponse"\x90\x01\x82\xd3\xe4\x93\x02\x89\x01\x12>/namespaces/{namespace}/workers/describe/{worker_instance_key}ZG\x12\x45/api/v1/namespaces/{namespace}/workers/describe/{worker_instance_key}B\xb6\x01\n"io.temporal.api.workflowservice.v1B\x0cServiceProtoP\x01Z5go.temporal.io/api/workflowservice/v1;workflowservice\xaa\x02!Temporalio.Api.WorkflowService.V1\xea\x02$Temporalio::Api::WorkflowService::V1b\x06proto3' + b'\n-temporal/api/workflowservice/v1/service.proto\x12\x1ftemporal.api.workflowservice.v1\x1a\x1cgoogle/api/annotations.proto\x1a!nexusannotations/v1/options.proto\x1a+temporal/api/protometa/v1/annotations.proto\x1a\x36temporal/api/workflowservice/v1/request_response.proto2\xdc\xb2\x02\n\x0fWorkflowService\x12\xc3\x01\n\x11RegisterNamespace\x12\x39.temporal.api.workflowservice.v1.RegisterNamespaceRequest\x1a:.temporal.api.workflowservice.v1.RegisterNamespaceResponse"7\x82\xd3\xe4\x93\x02\x31"\x13/cluster/namespaces:\x01*Z\x17"\x12/api/v1/namespaces:\x01*\x12\xd5\x01\n\x11\x44\x65scribeNamespace\x12\x39.temporal.api.workflowservice.v1.DescribeNamespaceRequest\x1a:.temporal.api.workflowservice.v1.DescribeNamespaceResponse"I\x82\xd3\xe4\x93\x02\x43\x12\x1f/cluster/namespaces/{namespace}Z \x12\x1e/api/v1/namespaces/{namespace}\x12\xb4\x01\n\x0eListNamespaces\x12\x36.temporal.api.workflowservice.v1.ListNamespacesRequest\x1a\x37.temporal.api.workflowservice.v1.ListNamespacesResponse"1\x82\xd3\xe4\x93\x02+\x12\x13/cluster/namespacesZ\x14\x12\x12/api/v1/namespaces\x12\xe3\x01\n\x0fUpdateNamespace\x12\x37.temporal.api.workflowservice.v1.UpdateNamespaceRequest\x1a\x38.temporal.api.workflowservice.v1.UpdateNamespaceResponse"]\x82\xd3\xe4\x93\x02W"&/cluster/namespaces/{namespace}/update:\x01*Z*"%/api/v1/namespaces/{namespace}/update:\x01*\x12\x8f\x01\n\x12\x44\x65precateNamespace\x12:.temporal.api.workflowservice.v1.DeprecateNamespaceRequest\x1a;.temporal.api.workflowservice.v1.DeprecateNamespaceResponse"\x00\x12\xc6\x02\n\x16StartWorkflowExecution\x12>.temporal.api.workflowservice.v1.StartWorkflowExecutionRequest\x1a?.temporal.api.workflowservice.v1.StartWorkflowExecutionResponse"\xaa\x01\x82\xd3\xe4\x93\x02q"//namespaces/{namespace}/workflows/{workflow_id}:\x01*Z;"6/api/v1/namespaces/{namespace}/workflows/{workflow_id}:\x01*\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16workflow:{workflow_id}\x12\xc2\x01\n\x15\x45xecuteMultiOperation\x12=.temporal.api.workflowservice.v1.ExecuteMultiOperationRequest\x1a>.temporal.api.workflowservice.v1.ExecuteMultiOperationResponse"*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xfe\x02\n\x1bGetWorkflowExecutionHistory\x12\x43.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest\x1a\x44.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse"\xd3\x01\x82\xd3\xe4\x93\x02\x8f\x01\x12\x41/namespaces/{namespace}/workflows/{execution.workflow_id}/historyZJ\x12H/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history\x8a\x9d\xcc\x1b\x38\n\x14temporal-resource-id\x12 workflow:{execution.workflow_id}\x12\xa3\x03\n"GetWorkflowExecutionHistoryReverse\x12J.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseRequest\x1aK.temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryReverseResponse"\xe3\x01\x82\xd3\xe4\x93\x02\x9f\x01\x12I/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverseZR\x12P/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse\x8a\x9d\xcc\x1b\x38\n\x14temporal-resource-id\x12 workflow:{execution.workflow_id}\x12\xcd\x01\n\x15PollWorkflowTaskQueue\x12=.temporal.api.workflowservice.v1.PollWorkflowTaskQueueRequest\x1a>.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse"5\x8a\x9d\xcc\x1b\x30\n\x14temporal-resource-id\x12\x18poller:{poller_group_id}\x12\xd7\x01\n\x1cRespondWorkflowTaskCompleted\x12\x44.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedRequest\x1a\x45.temporal.api.workflowservice.v1.RespondWorkflowTaskCompletedResponse"*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xce\x01\n\x19RespondWorkflowTaskFailed\x12\x41.temporal.api.workflowservice.v1.RespondWorkflowTaskFailedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondWorkflowTaskFailedResponse"*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xcd\x01\n\x15PollActivityTaskQueue\x12=.temporal.api.workflowservice.v1.PollActivityTaskQueueRequest\x1a>.temporal.api.workflowservice.v1.PollActivityTaskQueueResponse"5\x8a\x9d\xcc\x1b\x30\n\x14temporal-resource-id\x12\x18poller:{poller_group_id}\x12\xc2\x02\n\x1bRecordActivityTaskHeartbeat\x12\x43.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest\x1a\x44.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse"\x97\x01\x82\xd3\xe4\x93\x02g"*/namespaces/{namespace}/activity-heartbeat:\x01*Z6"1/api/v1/namespaces/{namespace}/activity-heartbeat:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xa8\x04\n\x1fRecordActivityTaskHeartbeatById\x12G.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest\x1aH.temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse"\xf1\x02\x82\xd3\xe4\x93\x02\xc0\x02":/namespaces/{namespace}/activities/{activity_id}/heartbeat:\x01*ZF"A/api/v1/namespaces/{namespace}/activities/{activity_id}/heartbeat:\x01*ZW"R/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/heartbeat:\x01*Z^"Y/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/heartbeat:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xc3\x02\n\x1cRespondActivityTaskCompleted\x12\x44.temporal.api.workflowservice.v1.RespondActivityTaskCompletedRequest\x1a\x45.temporal.api.workflowservice.v1.RespondActivityTaskCompletedResponse"\x95\x01\x82\xd3\xe4\x93\x02\x65")/namespaces/{namespace}/activity-complete:\x01*Z5"0/api/v1/namespaces/{namespace}/activity-complete:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xa7\x04\n RespondActivityTaskCompletedById\x12H.temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest\x1aI.temporal.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse"\xed\x02\x82\xd3\xe4\x93\x02\xbc\x02"9/namespaces/{namespace}/activities/{activity_id}/complete:\x01*ZE"@/api/v1/namespaces/{namespace}/activities/{activity_id}/complete:\x01*ZV"Q/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/complete:\x01*Z]"X/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/complete:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xb2\x02\n\x19RespondActivityTaskFailed\x12\x41.temporal.api.workflowservice.v1.RespondActivityTaskFailedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondActivityTaskFailedResponse"\x8d\x01\x82\xd3\xe4\x93\x02]"%/namespaces/{namespace}/activity-fail:\x01*Z1",/api/v1/namespaces/{namespace}/activity-fail:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\x8e\x04\n\x1dRespondActivityTaskFailedById\x12\x45.temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest\x1a\x46.temporal.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse"\xdd\x02\x82\xd3\xe4\x93\x02\xac\x02"5/namespaces/{namespace}/activities/{activity_id}/fail:\x01*ZA".temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest\x1a?.temporal.api.workflowservice.v1.ResetWorkflowExecutionResponse"\xf0\x01\x82\xd3\xe4\x93\x02\xa3\x01"H/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset:\x01*ZT"O/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset:\x01*\x8a\x9d\xcc\x1b\x41\n\x14temporal-resource-id\x12)workflow:{workflow_execution.workflow_id}\x12\xa0\x03\n\x1aTerminateWorkflowExecution\x12\x42.temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest\x1a\x43.temporal.api.workflowservice.v1.TerminateWorkflowExecutionResponse"\xf8\x01\x82\xd3\xe4\x93\x02\xab\x01"L/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate:\x01*ZX"S/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/terminate:\x01*\x8a\x9d\xcc\x1b\x41\n\x14temporal-resource-id\x12)workflow:{workflow_execution.workflow_id}\x12\xe4\x01\n\x17\x44\x65leteWorkflowExecution\x12?.temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest\x1a@.temporal.api.workflowservice.v1.DeleteWorkflowExecutionResponse"F\x8a\x9d\xcc\x1b\x41\n\x14temporal-resource-id\x12)workflow:{workflow_execution.workflow_id}\x12\xa7\x01\n\x1aListOpenWorkflowExecutions\x12\x42.temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest\x1a\x43.temporal.api.workflowservice.v1.ListOpenWorkflowExecutionsResponse"\x00\x12\xad\x01\n\x1cListClosedWorkflowExecutions\x12\x44.temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsRequest\x1a\x45.temporal.api.workflowservice.v1.ListClosedWorkflowExecutionsResponse"\x00\x12\xf0\x01\n\x16ListWorkflowExecutions\x12>.temporal.api.workflowservice.v1.ListWorkflowExecutionsRequest\x1a?.temporal.api.workflowservice.v1.ListWorkflowExecutionsResponse"U\x82\xd3\xe4\x93\x02O\x12!/namespaces/{namespace}/workflowsZ*\x12(/api/v1/namespaces/{namespace}/workflows\x12\x9a\x02\n\x1eListArchivedWorkflowExecutions\x12\x46.temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest\x1aG.temporal.api.workflowservice.v1.ListArchivedWorkflowExecutionsResponse"g\x82\xd3\xe4\x93\x02\x61\x12*/namespaces/{namespace}/archived-workflowsZ3\x12\x31/api/v1/namespaces/{namespace}/archived-workflows\x12\x9b\x01\n\x16ScanWorkflowExecutions\x12>.temporal.api.workflowservice.v1.ScanWorkflowExecutionsRequest\x1a?.temporal.api.workflowservice.v1.ScanWorkflowExecutionsResponse"\x00\x12\xfd\x01\n\x17\x43ountWorkflowExecutions\x12?.temporal.api.workflowservice.v1.CountWorkflowExecutionsRequest\x1a@.temporal.api.workflowservice.v1.CountWorkflowExecutionsResponse"_\x82\xd3\xe4\x93\x02Y\x12&/namespaces/{namespace}/workflow-countZ/\x12-/api/v1/namespaces/{namespace}/workflow-count\x12\x92\x01\n\x13GetSearchAttributes\x12;.temporal.api.workflowservice.v1.GetSearchAttributesRequest\x1a<.temporal.api.workflowservice.v1.GetSearchAttributesResponse"\x00\x12\xd9\x01\n\x19RespondQueryTaskCompleted\x12\x41.temporal.api.workflowservice.v1.RespondQueryTaskCompletedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondQueryTaskCompletedResponse"5\x8a\x9d\xcc\x1b\x30\n\x14temporal-resource-id\x12\x18poller:{poller_group_id}\x12\xd2\x01\n\x14ResetStickyTaskQueue\x12<.temporal.api.workflowservice.v1.ResetStickyTaskQueueRequest\x1a=.temporal.api.workflowservice.v1.ResetStickyTaskQueueResponse"=\x8a\x9d\xcc\x1b\x38\n\x14temporal-resource-id\x12 workflow:{execution.workflow_id}\x12\x83\x01\n\x0eShutdownWorker\x12\x36.temporal.api.workflowservice.v1.ShutdownWorkerRequest\x1a\x37.temporal.api.workflowservice.v1.ShutdownWorkerResponse"\x00\x12\xfc\x02\n\rQueryWorkflow\x12\x35.temporal.api.workflowservice.v1.QueryWorkflowRequest\x1a\x36.temporal.api.workflowservice.v1.QueryWorkflowResponse"\xfb\x01\x82\xd3\xe4\x93\x02\xb7\x01"R/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}:\x01*Z^"Y/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}:\x01*\x8a\x9d\xcc\x1b\x38\n\x14temporal-resource-id\x12 workflow:{execution.workflow_id}\x12\xe7\x02\n\x19\x44\x65scribeWorkflowExecution\x12\x41.temporal.api.workflowservice.v1.DescribeWorkflowExecutionRequest\x1a\x42.temporal.api.workflowservice.v1.DescribeWorkflowExecutionResponse"\xc2\x01\x82\xd3\xe4\x93\x02\x7f\x12\x39/namespaces/{namespace}/workflows/{execution.workflow_id}ZB\x12@/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}\x8a\x9d\xcc\x1b\x38\n\x14temporal-resource-id\x12 workflow:{execution.workflow_id}\x12\xc2\x02\n\x11\x44\x65scribeTaskQueue\x12\x39.temporal.api.workflowservice.v1.DescribeTaskQueueRequest\x1a:.temporal.api.workflowservice.v1.DescribeTaskQueueResponse"\xb5\x01\x82\xd3\xe4\x93\x02w\x12\x35/namespaces/{namespace}/task-queues/{task_queue.name}Z>\x12/namespaces/{namespace}/schedules/{schedule_id}/matching-timesZG\x12\x45/api/v1/namespaces/{namespace}/schedules/{schedule_id}/matching-times\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16schedule:{schedule_id}\x12\xa8\x02\n\x0e\x44\x65leteSchedule\x12\x36.temporal.api.workflowservice.v1.DeleteScheduleRequest\x1a\x37.temporal.api.workflowservice.v1.DeleteScheduleResponse"\xa4\x01\x82\xd3\xe4\x93\x02k*//namespaces/{namespace}/schedules/{schedule_id}Z8*6/api/v1/namespaces/{namespace}/schedules/{schedule_id}\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16schedule:{schedule_id}\x12\xd5\x01\n\rListSchedules\x12\x35.temporal.api.workflowservice.v1.ListSchedulesRequest\x1a\x36.temporal.api.workflowservice.v1.ListSchedulesResponse"U\x82\xd3\xe4\x93\x02O\x12!/namespaces/{namespace}/schedulesZ*\x12(/api/v1/namespaces/{namespace}/schedules\x12\xe2\x01\n\x0e\x43ountSchedules\x12\x36.temporal.api.workflowservice.v1.CountSchedulesRequest\x1a\x37.temporal.api.workflowservice.v1.CountSchedulesResponse"_\x82\xd3\xe4\x93\x02Y\x12&/namespaces/{namespace}/schedule-countZ/\x12-/api/v1/namespaces/{namespace}/schedule-count\x12\xb9\x01\n UpdateWorkerBuildIdCompatibility\x12H.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest\x1aI.temporal.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityResponse"\x00\x12\xe1\x02\n\x1dGetWorkerBuildIdCompatibility\x12\x45.temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest\x1a\x46.temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse"\xb0\x01\x82\xd3\xe4\x93\x02\xa9\x01\x12N/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibilityZW\x12U/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-build-id-compatibility\x12\xaa\x01\n\x1bUpdateWorkerVersioningRules\x12\x43.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest\x1a\x44.temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse"\x00\x12\xc6\x02\n\x18GetWorkerVersioningRules\x12@.temporal.api.workflowservice.v1.GetWorkerVersioningRulesRequest\x1a\x41.temporal.api.workflowservice.v1.GetWorkerVersioningRulesResponse"\xa4\x01\x82\xd3\xe4\x93\x02\x9d\x01\x12H/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rulesZQ\x12O/api/v1/namespaces/{namespace}/task-queues/{task_queue}/worker-versioning-rules\x12\x97\x02\n\x19GetWorkerTaskReachability\x12\x41.temporal.api.workflowservice.v1.GetWorkerTaskReachabilityRequest\x1a\x42.temporal.api.workflowservice.v1.GetWorkerTaskReachabilityResponse"s\x82\xd3\xe4\x93\x02m\x12\x30/namespaces/{namespace}/worker-task-reachabilityZ9\x12\x37/api/v1/namespaces/{namespace}/worker-task-reachability\x12\xc8\x02\n\x12\x44\x65scribeDeployment\x12:.temporal.api.workflowservice.v1.DescribeDeploymentRequest\x1a;.temporal.api.workflowservice.v1.DescribeDeploymentResponse"\xb8\x01\x82\xd3\xe4\x93\x02\xb1\x01\x12R/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}Z[\x12Y/api/v1/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}\x12\x81\x04\n\x1f\x44\x65scribeWorkerDeploymentVersion\x12G.temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionRequest\x1aH.temporal.api.workflowservice.v1.DescribeWorkerDeploymentVersionResponse"\xca\x02\x82\xd3\xe4\x93\x02\xf7\x01\x12u/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}Z~\x12|/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}\x8a\x9d\xcc\x1bG\n\x14temporal-resource-id\x12/deployment:{deployment_version.deployment_name}\x12\xdf\x01\n\x0fListDeployments\x12\x37.temporal.api.workflowservice.v1.ListDeploymentsRequest\x1a\x38.temporal.api.workflowservice.v1.ListDeploymentsResponse"Y\x82\xd3\xe4\x93\x02S\x12#/namespaces/{namespace}/deploymentsZ,\x12*/api/v1/namespaces/{namespace}/deployments\x12\xf7\x02\n\x19GetDeploymentReachability\x12\x41.temporal.api.workflowservice.v1.GetDeploymentReachabilityRequest\x1a\x42.temporal.api.workflowservice.v1.GetDeploymentReachabilityResponse"\xd2\x01\x82\xd3\xe4\x93\x02\xcb\x01\x12_/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachabilityZh\x12\x66/api/v1/namespaces/{namespace}/deployments/{deployment.series_name}/{deployment.build_id}/reachability\x12\x99\x02\n\x14GetCurrentDeployment\x12<.temporal.api.workflowservice.v1.GetCurrentDeploymentRequest\x1a=.temporal.api.workflowservice.v1.GetCurrentDeploymentResponse"\x83\x01\x82\xd3\xe4\x93\x02}\x12\x38/namespaces/{namespace}/current-deployment/{series_name}ZA\x12?/api/v1/namespaces/{namespace}/current-deployment/{series_name}\x12\xb6\x02\n\x14SetCurrentDeployment\x12<.temporal.api.workflowservice.v1.SetCurrentDeploymentRequest\x1a=.temporal.api.workflowservice.v1.SetCurrentDeploymentResponse"\xa0\x01\x82\xd3\xe4\x93\x02\x99\x01"C/namespaces/{namespace}/current-deployment/{deployment.series_name}:\x01*ZO"J/api/v1/namespaces/{namespace}/current-deployment/{deployment.series_name}:\x01*\x12\xb0\x03\n!SetWorkerDeploymentCurrentVersion\x12I.temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest\x1aJ.temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionResponse"\xf3\x01\x82\xd3\xe4\x93\x02\xb3\x01"P/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version:\x01*Z\\"W/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version:\x01*\x8a\x9d\xcc\x1b\x34\n\x14temporal-resource-id\x12\x1c\x64\x65ployment:{deployment_name}\x12\xe7\x02\n\x18\x44\x65scribeWorkerDeployment\x12@.temporal.api.workflowservice.v1.DescribeWorkerDeploymentRequest\x1a\x41.temporal.api.workflowservice.v1.DescribeWorkerDeploymentResponse"\xc5\x01\x82\xd3\xe4\x93\x02\x85\x01\x12.temporal.api.workflowservice.v1.DeleteWorkerDeploymentRequest\x1a?.temporal.api.workflowservice.v1.DeleteWorkerDeploymentResponse"\xc5\x01\x82\xd3\xe4\x93\x02\x85\x01*.temporal.api.workflowservice.v1.ListWorkerDeploymentsResponse"g\x82\xd3\xe4\x93\x02\x61\x12*/namespaces/{namespace}/worker-deploymentsZ3\x12\x31/api/v1/namespaces/{namespace}/worker-deployments\x12\xae\x02\n\x16\x43reateWorkerDeployment\x12>.temporal.api.workflowservice.v1.CreateWorkerDeploymentRequest\x1a?.temporal.api.workflowservice.v1.CreateWorkerDeploymentResponse"\x92\x01\x82\xd3\xe4\x93\x02\x8b\x01".temporal.api.workflowservice.v1.DescribeBatchOperationRequest\x1a?.temporal.api.workflowservice.v1.DescribeBatchOperationResponse"\xa0\x01\x82\xd3\xe4\x93\x02o\x12\x31/namespaces/{namespace}/batch-operations/{job_id}Z:\x12\x38/api/v1/namespaces/{namespace}/batch-operations/{job_id}\x8a\x9d\xcc\x1b&\n\x14temporal-resource-id\x12\x0e\x62\x61tch:{job_id}\x12\xf5\x01\n\x13ListBatchOperations\x12;.temporal.api.workflowservice.v1.ListBatchOperationsRequest\x1a<.temporal.api.workflowservice.v1.ListBatchOperationsResponse"c\x82\xd3\xe4\x93\x02]\x12(/namespaces/{namespace}/batch-operationsZ1\x12//api/v1/namespaces/{namespace}/batch-operations\x12\xc4\x01\n\x12PollNexusTaskQueue\x12:.temporal.api.workflowservice.v1.PollNexusTaskQueueRequest\x1a;.temporal.api.workflowservice.v1.PollNexusTaskQueueResponse"5\x8a\x9d\xcc\x1b\x30\n\x14temporal-resource-id\x12\x18poller:{poller_group_id}\x12\xd9\x01\n\x19RespondNexusTaskCompleted\x12\x41.temporal.api.workflowservice.v1.RespondNexusTaskCompletedRequest\x1a\x42.temporal.api.workflowservice.v1.RespondNexusTaskCompletedResponse"5\x8a\x9d\xcc\x1b\x30\n\x14temporal-resource-id\x12\x18poller:{poller_group_id}\x12\xd0\x01\n\x16RespondNexusTaskFailed\x12>.temporal.api.workflowservice.v1.RespondNexusTaskFailedRequest\x1a?.temporal.api.workflowservice.v1.RespondNexusTaskFailedResponse"5\x8a\x9d\xcc\x1b\x30\n\x14temporal-resource-id\x12\x18poller:{poller_group_id}\x12\xe8\x02\n\x15UpdateActivityOptions\x12=.temporal.api.workflowservice.v1.UpdateActivityOptionsRequest\x1a>.temporal.api.workflowservice.v1.UpdateActivityOptionsResponse"\xcf\x01\x82\xd3\xe4\x93\x02\x8b\x01".temporal.api.workflowservice.v1.RecordWorkerHeartbeatResponse"\x95\x01\x82\xd3\xe4\x93\x02\x65")/namespaces/{namespace}/workers/heartbeat:\x01*Z5"0/api/v1/namespaces/{namespace}/workers/heartbeat:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xcb\x01\n\x0bListWorkers\x12\x33.temporal.api.workflowservice.v1.ListWorkersRequest\x1a\x34.temporal.api.workflowservice.v1.ListWorkersResponse"Q\x82\xd3\xe4\x93\x02K\x12\x1f/namespaces/{namespace}/workersZ(\x12&/api/v1/namespaces/{namespace}/workers\x12\xd8\x01\n\x0c\x43ountWorkers\x12\x34.temporal.api.workflowservice.v1.CountWorkersRequest\x1a\x35.temporal.api.workflowservice.v1.CountWorkersResponse"[\x82\xd3\xe4\x93\x02U\x12$/namespaces/{namespace}/worker-countZ-\x12+/api/v1/namespaces/{namespace}/worker-count\x12\xe2\x02\n\x15UpdateTaskQueueConfig\x12=.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest\x1a>.temporal.api.workflowservice.v1.UpdateTaskQueueConfigResponse"\xc9\x01\x82\xd3\xe4\x93\x02\x8f\x01">/namespaces/{namespace}/task-queues/{task_queue}/update-config:\x01*ZJ"E/api/v1/namespaces/{namespace}/task-queues/{task_queue}/update-config:\x01*\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16taskqueue:{task_queue}\x12\xa8\x02\n\x11\x46\x65tchWorkerConfig\x12\x39.temporal.api.workflowservice.v1.FetchWorkerConfigRequest\x1a:.temporal.api.workflowservice.v1.FetchWorkerConfigResponse"\x9b\x01\x82\xd3\xe4\x93\x02k",/namespaces/{namespace}/workers/fetch-config:\x01*Z8"3/api/v1/namespaces/{namespace}/workers/fetch-config:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xad\x02\n\x12UpdateWorkerConfig\x12:.temporal.api.workflowservice.v1.UpdateWorkerConfigRequest\x1a;.temporal.api.workflowservice.v1.UpdateWorkerConfigResponse"\x9d\x01\x82\xd3\xe4\x93\x02m"-/namespaces/{namespace}/workers/update-config:\x01*Z9"4/api/v1/namespaces/{namespace}/workers/update-config:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xcd\x02\n\x0e\x44\x65scribeWorker\x12\x36.temporal.api.workflowservice.v1.DescribeWorkerRequest\x1a\x37.temporal.api.workflowservice.v1.DescribeWorkerResponse"\xc9\x01\x82\xd3\xe4\x93\x02\x89\x01\x12>/namespaces/{namespace}/workers/describe/{worker_instance_key}ZG\x12\x45/api/v1/namespaces/{namespace}/workers/describe/{worker_instance_key}\x8a\x9d\xcc\x1b\x34\n\x14temporal-resource-id\x12\x1cworker:{worker_instance_key}\x12\xd2\x02\n\x16PauseWorkflowExecution\x12>.temporal.api.workflowservice.v1.PauseWorkflowExecutionRequest\x1a?.temporal.api.workflowservice.v1.PauseWorkflowExecutionResponse"\xb6\x01\x82\xd3\xe4\x93\x02}"5/namespaces/{namespace}/workflows/{workflow_id}/pause:\x01*ZA"/api/v1/namespaces/{namespace}/workflows/{workflow_id}/unpause:\x01*\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16workflow:{workflow_id}\x12\xc8\x02\n\x16StartActivityExecution\x12>.temporal.api.workflowservice.v1.StartActivityExecutionRequest\x1a?.temporal.api.workflowservice.v1.StartActivityExecutionResponse"\xac\x01\x82\xd3\xe4\x93\x02s"0/namespaces/{namespace}/activities/{activity_id}:\x01*Z<"7/api/v1/namespaces/{namespace}/activities/{activity_id}:\x01*\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16\x61\x63tivity:{activity_id}\x12\xb6\x02\n\x1cStartNexusOperationExecution\x12\x44.temporal.api.workflowservice.v1.StartNexusOperationExecutionRequest\x1a\x45.temporal.api.workflowservice.v1.StartNexusOperationExecutionResponse"\x88\x01\x82\xd3\xe4\x93\x02\x81\x01"7/namespaces/{namespace}/nexus-operations/{operation_id}:\x01*ZC">/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}:\x01*\x12\xcb\x02\n\x19\x44\x65scribeActivityExecution\x12\x41.temporal.api.workflowservice.v1.DescribeActivityExecutionRequest\x1a\x42.temporal.api.workflowservice.v1.DescribeActivityExecutionResponse"\xa6\x01\x82\xd3\xe4\x93\x02m\x12\x30/namespaces/{namespace}/activities/{activity_id}Z9\x12\x37/api/v1/namespaces/{namespace}/activities/{activity_id}\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16\x61\x63tivity:{activity_id}\x12\xb8\x02\n\x1f\x44\x65scribeNexusOperationExecution\x12G.temporal.api.workflowservice.v1.DescribeNexusOperationExecutionRequest\x1aH.temporal.api.workflowservice.v1.DescribeNexusOperationExecutionResponse"\x81\x01\x82\xd3\xe4\x93\x02{\x12\x37/namespaces/{namespace}/nexus-operations/{operation_id}Z@\x12>/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}\x12\xcf\x02\n\x15PollActivityExecution\x12=.temporal.api.workflowservice.v1.PollActivityExecutionRequest\x1a>.temporal.api.workflowservice.v1.PollActivityExecutionResponse"\xb6\x01\x82\xd3\xe4\x93\x02}\x12\x38/namespaces/{namespace}/activities/{activity_id}/outcomeZA\x12?/api/v1/namespaces/{namespace}/activities/{activity_id}/outcome\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16\x61\x63tivity:{activity_id}\x12\xb7\x02\n\x1bPollNexusOperationExecution\x12\x43.temporal.api.workflowservice.v1.PollNexusOperationExecutionRequest\x1a\x44.temporal.api.workflowservice.v1.PollNexusOperationExecutionResponse"\x8c\x01\x82\xd3\xe4\x93\x02\x85\x01\x12.temporal.api.workflowservice.v1.ListActivityExecutionsRequest\x1a?.temporal.api.workflowservice.v1.ListActivityExecutionsResponse"W\x82\xd3\xe4\x93\x02Q\x12"/namespaces/{namespace}/activitiesZ+\x12)/api/v1/namespaces/{namespace}/activities\x12\x90\x02\n\x1cListNexusOperationExecutions\x12\x44.temporal.api.workflowservice.v1.ListNexusOperationExecutionsRequest\x1a\x45.temporal.api.workflowservice.v1.ListNexusOperationExecutionsResponse"c\x82\xd3\xe4\x93\x02]\x12(/namespaces/{namespace}/nexus-operationsZ1\x12//api/v1/namespaces/{namespace}/nexus-operations\x12\xfd\x01\n\x17\x43ountActivityExecutions\x12?.temporal.api.workflowservice.v1.CountActivityExecutionsRequest\x1a@.temporal.api.workflowservice.v1.CountActivityExecutionsResponse"_\x82\xd3\xe4\x93\x02Y\x12&/namespaces/{namespace}/activity-countZ/\x12-/api/v1/namespaces/{namespace}/activity-count\x12\x9d\x02\n\x1d\x43ountNexusOperationExecutions\x12\x45.temporal.api.workflowservice.v1.CountNexusOperationExecutionsRequest\x1a\x46.temporal.api.workflowservice.v1.CountNexusOperationExecutionsResponse"m\x82\xd3\xe4\x93\x02g\x12-/namespaces/{namespace}/nexus-operation-countZ6\x12\x34/api/v1/namespaces/{namespace}/nexus-operation-count\x12\xef\x02\n\x1eRequestCancelActivityExecution\x12\x46.temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest\x1aG.temporal.api.workflowservice.v1.RequestCancelActivityExecutionResponse"\xbb\x01\x82\xd3\xe4\x93\x02\x81\x01"7/namespaces/{namespace}/activities/{activity_id}/cancel:\x01*ZC">/api/v1/namespaces/{namespace}/activities/{activity_id}/cancel:\x01*\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16\x61\x63tivity:{activity_id}\x12\xdc\x02\n$RequestCancelNexusOperationExecution\x12L.temporal.api.workflowservice.v1.RequestCancelNexusOperationExecutionRequest\x1aM.temporal.api.workflowservice.v1.RequestCancelNexusOperationExecutionResponse"\x96\x01\x82\xd3\xe4\x93\x02\x8f\x01">/namespaces/{namespace}/nexus-operations/{operation_id}/cancel:\x01*ZJ"E/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}/cancel:\x01*\x12\xe9\x02\n\x1aTerminateActivityExecution\x12\x42.temporal.api.workflowservice.v1.TerminateActivityExecutionRequest\x1a\x43.temporal.api.workflowservice.v1.TerminateActivityExecutionResponse"\xc1\x01\x82\xd3\xe4\x93\x02\x87\x01":/namespaces/{namespace}/activities/{activity_id}/terminate:\x01*ZF"A/api/v1/namespaces/{namespace}/activities/{activity_id}/terminate:\x01*\x8a\x9d\xcc\x1b.\n\x14temporal-resource-id\x12\x16\x61\x63tivity:{activity_id}\x12\x9e\x01\n\x17\x44\x65leteActivityExecution\x12?.temporal.api.workflowservice.v1.DeleteActivityExecutionRequest\x1a@.temporal.api.workflowservice.v1.DeleteActivityExecutionResponse"\x00\x12\xfd\x03\n\x16PauseActivityExecution\x12>.temporal.api.workflowservice.v1.PauseActivityExecutionRequest\x1a?.temporal.api.workflowservice.v1.PauseActivityExecutionResponse"\xe1\x02\x82\xd3\xe4\x93\x02\xb0\x02"6/namespaces/{namespace}/activities/{activity_id}/pause:\x01*ZB"=/api/v1/namespaces/{namespace}/activities/{activity_id}/pause:\x01*ZS"N/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/pause:\x01*ZZ"U/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/pause:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xfd\x03\n\x16ResetActivityExecution\x12>.temporal.api.workflowservice.v1.ResetActivityExecutionRequest\x1a?.temporal.api.workflowservice.v1.ResetActivityExecutionResponse"\xe1\x02\x82\xd3\xe4\x93\x02\xb0\x02"6/namespaces/{namespace}/activities/{activity_id}/reset:\x01*ZB"=/api/v1/namespaces/{namespace}/activities/{activity_id}/reset:\x01*ZS"N/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset:\x01*ZZ"U/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\x8b\x04\n\x18UnpauseActivityExecution\x12@.temporal.api.workflowservice.v1.UnpauseActivityExecutionRequest\x1a\x41.temporal.api.workflowservice.v1.UnpauseActivityExecutionResponse"\xe9\x02\x82\xd3\xe4\x93\x02\xb8\x02"8/namespaces/{namespace}/activities/{activity_id}/unpause:\x01*ZD"?/api/v1/namespaces/{namespace}/activities/{activity_id}/unpause:\x01*ZU"P/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/unpause:\x01*Z\\"W/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/unpause:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xb9\x04\n\x1eUpdateActivityExecutionOptions\x12\x46.temporal.api.workflowservice.v1.UpdateActivityExecutionOptionsRequest\x1aG.temporal.api.workflowservice.v1.UpdateActivityExecutionOptionsResponse"\x85\x03\x82\xd3\xe4\x93\x02\xd4\x02"?/namespaces/{namespace}/activities/{activity_id}/update-options:\x01*ZK"F/api/v1/namespaces/{namespace}/activities/{activity_id}/update-options:\x01*Z\\"W/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/update-options:\x01*Zc"^/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/update-options:\x01*\x8a\x9d\xcc\x1b%\n\x14temporal-resource-id\x12\r{resource_id}\x12\xd6\x02\n TerminateNexusOperationExecution\x12H.temporal.api.workflowservice.v1.TerminateNexusOperationExecutionRequest\x1aI.temporal.api.workflowservice.v1.TerminateNexusOperationExecutionResponse"\x9c\x01\x82\xd3\xe4\x93\x02\x95\x01"A/namespaces/{namespace}/nexus-operations/{operation_id}/terminate:\x01*ZM"H/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}/terminate:\x01*\x12\xb0\x01\n\x1d\x44\x65leteNexusOperationExecution\x12\x45.temporal.api.workflowservice.v1.DeleteNexusOperationExecutionRequest\x1a\x46.temporal.api.workflowservice.v1.DeleteNexusOperationExecutionResponse"\x00\x12\xc1\x03\n!PollWorkflowExecutionTimeSkipping\x12I.temporal.api.workflowservice.v1.PollWorkflowExecutionTimeSkippingRequest\x1aJ.temporal.api.workflowservice.v1.PollWorkflowExecutionTimeSkippingResponse"\x84\x02\x82\xd3\xe4\x93\x02\xb7\x01\x12U/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/time-skipping/pollZ^\x12\\/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/time-skipping/poll\x8a\x9d\xcc\x1b\x41\n\x14temporal-resource-id\x12)workflow:{workflow_execution.workflow_id}B\xb6\x01\n"io.temporal.api.workflowservice.v1B\x0cServiceProtoP\x01Z5go.temporal.io/api/workflowservice/v1;workflowservice\xaa\x02!Temporalio.Api.WorkflowService.V1\xea\x02$Temporalio::Api::WorkflowService::V1b\x06proto3' ) - -_WORKFLOWSERVICE = DESCRIPTOR.services_by_name["WorkflowService"] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n"io.temporal.api.workflowservice.v1B\014ServiceProtoP\001Z5go.temporal.io/api/workflowservice/v1;workflowservice\252\002!Temporalio.Api.WorkflowService.V1\352\002$Temporalio::Api::WorkflowService::V1' @@ -48,73 +53,103 @@ _WORKFLOWSERVICE.methods_by_name["StartWorkflowExecution"]._options = None _WORKFLOWSERVICE.methods_by_name[ "StartWorkflowExecution" - ]._serialized_options = b'\202\323\344\223\002q"//namespaces/{namespace}/workflows/{workflow_id}:\001*Z;"6/api/v1/namespaces/{namespace}/workflows/{workflow_id}:\001*' + ]._serialized_options = b'\202\323\344\223\002q"//namespaces/{namespace}/workflows/{workflow_id}:\001*Z;"6/api/v1/namespaces/{namespace}/workflows/{workflow_id}:\001*\212\235\314\033.\n\024temporal-resource-id\022\026workflow:{workflow_id}' _WORKFLOWSERVICE.methods_by_name["ExecuteMultiOperation"]._options = None _WORKFLOWSERVICE.methods_by_name[ "ExecuteMultiOperation" - ]._serialized_options = b'\202\323\344\223\002\205\001"9/namespaces/{namespace}/workflows/execute-multi-operation:\001*ZE"@/api/v1/namespaces/{namespace}/workflows/execute-multi-operation:\001*' + ]._serialized_options = ( + b"\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}" + ) _WORKFLOWSERVICE.methods_by_name["GetWorkflowExecutionHistory"]._options = None _WORKFLOWSERVICE.methods_by_name[ "GetWorkflowExecutionHistory" - ]._serialized_options = b"\202\323\344\223\002\217\001\022A/namespaces/{namespace}/workflows/{execution.workflow_id}/historyZJ\022H/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history" + ]._serialized_options = b"\202\323\344\223\002\217\001\022A/namespaces/{namespace}/workflows/{execution.workflow_id}/historyZJ\022H/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history\212\235\314\0338\n\024temporal-resource-id\022 workflow:{execution.workflow_id}" _WORKFLOWSERVICE.methods_by_name[ "GetWorkflowExecutionHistoryReverse" ]._options = None _WORKFLOWSERVICE.methods_by_name[ "GetWorkflowExecutionHistoryReverse" - ]._serialized_options = b"\202\323\344\223\002\237\001\022I/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverseZR\022P/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse" + ]._serialized_options = b"\202\323\344\223\002\237\001\022I/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverseZR\022P/api/v1/namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse\212\235\314\0338\n\024temporal-resource-id\022 workflow:{execution.workflow_id}" + _WORKFLOWSERVICE.methods_by_name["PollWorkflowTaskQueue"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "PollWorkflowTaskQueue" + ]._serialized_options = ( + b"\212\235\314\0330\n\024temporal-resource-id\022\030poller:{poller_group_id}" + ) + _WORKFLOWSERVICE.methods_by_name["RespondWorkflowTaskCompleted"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "RespondWorkflowTaskCompleted" + ]._serialized_options = ( + b"\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}" + ) + _WORKFLOWSERVICE.methods_by_name["RespondWorkflowTaskFailed"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "RespondWorkflowTaskFailed" + ]._serialized_options = ( + b"\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}" + ) + _WORKFLOWSERVICE.methods_by_name["PollActivityTaskQueue"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "PollActivityTaskQueue" + ]._serialized_options = ( + b"\212\235\314\0330\n\024temporal-resource-id\022\030poller:{poller_group_id}" + ) _WORKFLOWSERVICE.methods_by_name["RecordActivityTaskHeartbeat"]._options = None _WORKFLOWSERVICE.methods_by_name[ "RecordActivityTaskHeartbeat" - ]._serialized_options = b'\202\323\344\223\002k",/namespaces/{namespace}/activities/heartbeat:\001*Z8"3/api/v1/namespaces/{namespace}/activities/heartbeat:\001*' + ]._serialized_options = b'\202\323\344\223\002g"*/namespaces/{namespace}/activity-heartbeat:\001*Z6"1/api/v1/namespaces/{namespace}/activity-heartbeat:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' _WORKFLOWSERVICE.methods_by_name["RecordActivityTaskHeartbeatById"]._options = None _WORKFLOWSERVICE.methods_by_name[ "RecordActivityTaskHeartbeatById" - ]._serialized_options = b'\202\323\344\223\002w"2/namespaces/{namespace}/activities/heartbeat-by-id:\001*Z>"9/api/v1/namespaces/{namespace}/activities/heartbeat-by-id:\001*' + ]._serialized_options = b'\202\323\344\223\002\300\002":/namespaces/{namespace}/activities/{activity_id}/heartbeat:\001*ZF"A/api/v1/namespaces/{namespace}/activities/{activity_id}/heartbeat:\001*ZW"R/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/heartbeat:\001*Z^"Y/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/heartbeat:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' _WORKFLOWSERVICE.methods_by_name["RespondActivityTaskCompleted"]._options = None _WORKFLOWSERVICE.methods_by_name[ "RespondActivityTaskCompleted" - ]._serialized_options = b'\202\323\344\223\002i"+/namespaces/{namespace}/activities/complete:\001*Z7"2/api/v1/namespaces/{namespace}/activities/complete:\001*' + ]._serialized_options = b'\202\323\344\223\002e")/namespaces/{namespace}/activity-complete:\001*Z5"0/api/v1/namespaces/{namespace}/activity-complete:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' _WORKFLOWSERVICE.methods_by_name["RespondActivityTaskCompletedById"]._options = None _WORKFLOWSERVICE.methods_by_name[ "RespondActivityTaskCompletedById" - ]._serialized_options = b'\202\323\344\223\002u"1/namespaces/{namespace}/activities/complete-by-id:\001*Z="8/api/v1/namespaces/{namespace}/activities/complete-by-id:\001*' + ]._serialized_options = b'\202\323\344\223\002\274\002"9/namespaces/{namespace}/activities/{activity_id}/complete:\001*ZE"@/api/v1/namespaces/{namespace}/activities/{activity_id}/complete:\001*ZV"Q/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/complete:\001*Z]"X/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/complete:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' _WORKFLOWSERVICE.methods_by_name["RespondActivityTaskFailed"]._options = None _WORKFLOWSERVICE.methods_by_name[ "RespondActivityTaskFailed" - ]._serialized_options = b'\202\323\344\223\002a"\'/namespaces/{namespace}/activities/fail:\001*Z3"./api/v1/namespaces/{namespace}/activities/fail:\001*' + ]._serialized_options = b'\202\323\344\223\002]"%/namespaces/{namespace}/activity-fail:\001*Z1",/api/v1/namespaces/{namespace}/activity-fail:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' _WORKFLOWSERVICE.methods_by_name["RespondActivityTaskFailedById"]._options = None _WORKFLOWSERVICE.methods_by_name[ "RespondActivityTaskFailedById" - ]._serialized_options = b'\202\323\344\223\002m"-/namespaces/{namespace}/activities/fail-by-id:\001*Z9"4/api/v1/namespaces/{namespace}/activities/fail-by-id:\001*' + ]._serialized_options = b'\202\323\344\223\002\254\002"5/namespaces/{namespace}/activities/{activity_id}/fail:\001*ZA"\022\022/namespaces/{namespace}/schedules/{schedule_id}/matching-timesZG\022E/api/v1/namespaces/{namespace}/schedules/{schedule_id}/matching-times" + ]._serialized_options = b"\202\323\344\223\002\211\001\022>/namespaces/{namespace}/schedules/{schedule_id}/matching-timesZG\022E/api/v1/namespaces/{namespace}/schedules/{schedule_id}/matching-times\212\235\314\033.\n\024temporal-resource-id\022\026schedule:{schedule_id}" _WORKFLOWSERVICE.methods_by_name["DeleteSchedule"]._options = None _WORKFLOWSERVICE.methods_by_name[ "DeleteSchedule" - ]._serialized_options = b"\202\323\344\223\002k*//namespaces/{namespace}/schedules/{schedule_id}Z8*6/api/v1/namespaces/{namespace}/schedules/{schedule_id}" + ]._serialized_options = b"\202\323\344\223\002k*//namespaces/{namespace}/schedules/{schedule_id}Z8*6/api/v1/namespaces/{namespace}/schedules/{schedule_id}\212\235\314\033.\n\024temporal-resource-id\022\026schedule:{schedule_id}" _WORKFLOWSERVICE.methods_by_name["ListSchedules"]._options = None _WORKFLOWSERVICE.methods_by_name[ "ListSchedules" ]._serialized_options = b"\202\323\344\223\002O\022!/namespaces/{namespace}/schedulesZ*\022(/api/v1/namespaces/{namespace}/schedules" + _WORKFLOWSERVICE.methods_by_name["CountSchedules"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "CountSchedules" + ]._serialized_options = b"\202\323\344\223\002Y\022&/namespaces/{namespace}/schedule-countZ/\022-/api/v1/namespaces/{namespace}/schedule-count" _WORKFLOWSERVICE.methods_by_name["GetWorkerBuildIdCompatibility"]._options = None _WORKFLOWSERVICE.methods_by_name[ "GetWorkerBuildIdCompatibility" @@ -198,7 +251,7 @@ _WORKFLOWSERVICE.methods_by_name["DescribeWorkerDeploymentVersion"]._options = None _WORKFLOWSERVICE.methods_by_name[ "DescribeWorkerDeploymentVersion" - ]._serialized_options = b"\202\323\344\223\002\367\001\022u/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}Z~\022|/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}" + ]._serialized_options = b"\202\323\344\223\002\367\001\022u/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}Z~\022|/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version.deployment_name}/{deployment_version.build_id}\212\235\314\033G\n\024temporal-resource-id\022/deployment:{deployment_version.deployment_name}" _WORKFLOWSERVICE.methods_by_name["ListDeployments"]._options = None _WORKFLOWSERVICE.methods_by_name[ "ListDeployments" @@ -220,79 +273,121 @@ ]._options = None _WORKFLOWSERVICE.methods_by_name[ "SetWorkerDeploymentCurrentVersion" - ]._serialized_options = b'\202\323\344\223\002\263\001"P/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version:\001*Z\\"W/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version:\001*' + ]._serialized_options = b'\202\323\344\223\002\263\001"P/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version:\001*Z\\"W/api/v1/namespaces/{namespace}/worker-deployments/{deployment_name}/set-current-version:\001*\212\235\314\0334\n\024temporal-resource-id\022\034deployment:{deployment_name}' _WORKFLOWSERVICE.methods_by_name["DescribeWorkerDeployment"]._options = None _WORKFLOWSERVICE.methods_by_name[ "DescribeWorkerDeployment" - ]._serialized_options = b"\202\323\344\223\002\205\001\022/namespaces/{namespace}/task-queues/{task_queue}/update-config:\001*ZJ"E/api/v1/namespaces/{namespace}/task-queues/{task_queue}/update-config:\001*' + ]._serialized_options = b'\202\323\344\223\002\217\001">/namespaces/{namespace}/task-queues/{task_queue}/update-config:\001*ZJ"E/api/v1/namespaces/{namespace}/task-queues/{task_queue}/update-config:\001*\212\235\314\033.\n\024temporal-resource-id\022\026taskqueue:{task_queue}' _WORKFLOWSERVICE.methods_by_name["FetchWorkerConfig"]._options = None _WORKFLOWSERVICE.methods_by_name[ "FetchWorkerConfig" - ]._serialized_options = b'\202\323\344\223\002k",/namespaces/{namespace}/workers/fetch-config:\001*Z8"3/api/v1/namespaces/{namespace}/workers/fetch-config:\001*' + ]._serialized_options = b'\202\323\344\223\002k",/namespaces/{namespace}/workers/fetch-config:\001*Z8"3/api/v1/namespaces/{namespace}/workers/fetch-config:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' _WORKFLOWSERVICE.methods_by_name["UpdateWorkerConfig"]._options = None _WORKFLOWSERVICE.methods_by_name[ "UpdateWorkerConfig" - ]._serialized_options = b'\202\323\344\223\002m"-/namespaces/{namespace}/workers/update-config:\001*Z9"4/api/v1/namespaces/{namespace}/workers/update-config:\001*' + ]._serialized_options = b'\202\323\344\223\002m"-/namespaces/{namespace}/workers/update-config:\001*Z9"4/api/v1/namespaces/{namespace}/workers/update-config:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' _WORKFLOWSERVICE.methods_by_name["DescribeWorker"]._options = None _WORKFLOWSERVICE.methods_by_name[ "DescribeWorker" - ]._serialized_options = b"\202\323\344\223\002\211\001\022>/namespaces/{namespace}/workers/describe/{worker_instance_key}ZG\022E/api/v1/namespaces/{namespace}/workers/describe/{worker_instance_key}" - _WORKFLOWSERVICE._serialized_start = 170 - _WORKFLOWSERVICE._serialized_end = 24997 + ]._serialized_options = b"\202\323\344\223\002\211\001\022>/namespaces/{namespace}/workers/describe/{worker_instance_key}ZG\022E/api/v1/namespaces/{namespace}/workers/describe/{worker_instance_key}\212\235\314\0334\n\024temporal-resource-id\022\034worker:{worker_instance_key}" + _WORKFLOWSERVICE.methods_by_name["PauseWorkflowExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "PauseWorkflowExecution" + ]._serialized_options = b'\202\323\344\223\002}"5/namespaces/{namespace}/workflows/{workflow_id}/pause:\001*ZA"/api/v1/namespaces/{namespace}/workflows/{workflow_id}/unpause:\001*\212\235\314\033.\n\024temporal-resource-id\022\026workflow:{workflow_id}' + _WORKFLOWSERVICE.methods_by_name["StartActivityExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "StartActivityExecution" + ]._serialized_options = b'\202\323\344\223\002s"0/namespaces/{namespace}/activities/{activity_id}:\001*Z<"7/api/v1/namespaces/{namespace}/activities/{activity_id}:\001*\212\235\314\033.\n\024temporal-resource-id\022\026activity:{activity_id}' + _WORKFLOWSERVICE.methods_by_name["StartNexusOperationExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "StartNexusOperationExecution" + ]._serialized_options = b'\202\323\344\223\002\201\001"7/namespaces/{namespace}/nexus-operations/{operation_id}:\001*ZC">/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}:\001*' + _WORKFLOWSERVICE.methods_by_name["DescribeActivityExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "DescribeActivityExecution" + ]._serialized_options = b"\202\323\344\223\002m\0220/namespaces/{namespace}/activities/{activity_id}Z9\0227/api/v1/namespaces/{namespace}/activities/{activity_id}\212\235\314\033.\n\024temporal-resource-id\022\026activity:{activity_id}" + _WORKFLOWSERVICE.methods_by_name["DescribeNexusOperationExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "DescribeNexusOperationExecution" + ]._serialized_options = b"\202\323\344\223\002{\0227/namespaces/{namespace}/nexus-operations/{operation_id}Z@\022>/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}" + _WORKFLOWSERVICE.methods_by_name["PollActivityExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "PollActivityExecution" + ]._serialized_options = b"\202\323\344\223\002}\0228/namespaces/{namespace}/activities/{activity_id}/outcomeZA\022?/api/v1/namespaces/{namespace}/activities/{activity_id}/outcome\212\235\314\033.\n\024temporal-resource-id\022\026activity:{activity_id}" + _WORKFLOWSERVICE.methods_by_name["PollNexusOperationExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "PollNexusOperationExecution" + ]._serialized_options = b"\202\323\344\223\002\205\001\022/api/v1/namespaces/{namespace}/activities/{activity_id}/cancel:\001*\212\235\314\033.\n\024temporal-resource-id\022\026activity:{activity_id}' + _WORKFLOWSERVICE.methods_by_name[ + "RequestCancelNexusOperationExecution" + ]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "RequestCancelNexusOperationExecution" + ]._serialized_options = b'\202\323\344\223\002\217\001">/namespaces/{namespace}/nexus-operations/{operation_id}/cancel:\001*ZJ"E/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}/cancel:\001*' + _WORKFLOWSERVICE.methods_by_name["TerminateActivityExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "TerminateActivityExecution" + ]._serialized_options = b'\202\323\344\223\002\207\001":/namespaces/{namespace}/activities/{activity_id}/terminate:\001*ZF"A/api/v1/namespaces/{namespace}/activities/{activity_id}/terminate:\001*\212\235\314\033.\n\024temporal-resource-id\022\026activity:{activity_id}' + _WORKFLOWSERVICE.methods_by_name["PauseActivityExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "PauseActivityExecution" + ]._serialized_options = b'\202\323\344\223\002\260\002"6/namespaces/{namespace}/activities/{activity_id}/pause:\001*ZB"=/api/v1/namespaces/{namespace}/activities/{activity_id}/pause:\001*ZS"N/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/pause:\001*ZZ"U/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/pause:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' + _WORKFLOWSERVICE.methods_by_name["ResetActivityExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "ResetActivityExecution" + ]._serialized_options = b'\202\323\344\223\002\260\002"6/namespaces/{namespace}/activities/{activity_id}/reset:\001*ZB"=/api/v1/namespaces/{namespace}/activities/{activity_id}/reset:\001*ZS"N/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset:\001*ZZ"U/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' + _WORKFLOWSERVICE.methods_by_name["UnpauseActivityExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "UnpauseActivityExecution" + ]._serialized_options = b'\202\323\344\223\002\270\002"8/namespaces/{namespace}/activities/{activity_id}/unpause:\001*ZD"?/api/v1/namespaces/{namespace}/activities/{activity_id}/unpause:\001*ZU"P/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/unpause:\001*Z\\"W/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/unpause:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' + _WORKFLOWSERVICE.methods_by_name["UpdateActivityExecutionOptions"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "UpdateActivityExecutionOptions" + ]._serialized_options = b'\202\323\344\223\002\324\002"?/namespaces/{namespace}/activities/{activity_id}/update-options:\001*ZK"F/api/v1/namespaces/{namespace}/activities/{activity_id}/update-options:\001*Z\\"W/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/update-options:\001*Zc"^/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/update-options:\001*\212\235\314\033%\n\024temporal-resource-id\022\r{resource_id}' + _WORKFLOWSERVICE.methods_by_name["TerminateNexusOperationExecution"]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "TerminateNexusOperationExecution" + ]._serialized_options = b'\202\323\344\223\002\225\001"A/namespaces/{namespace}/nexus-operations/{operation_id}/terminate:\001*ZM"H/api/v1/namespaces/{namespace}/nexus-operations/{operation_id}/terminate:\001*' + _WORKFLOWSERVICE.methods_by_name[ + "PollWorkflowExecutionTimeSkipping" + ]._options = None + _WORKFLOWSERVICE.methods_by_name[ + "PollWorkflowExecutionTimeSkipping" + ]._serialized_options = b"\202\323\344\223\002\267\001\022U/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/time-skipping/pollZ^\022\\/api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/time-skipping/poll\212\235\314\033A\n\024temporal-resource-id\022)workflow:{workflow_execution.workflow_id}" + _WORKFLOWSERVICE._serialized_start = 250 + _WORKFLOWSERVICE._serialized_end = 39510 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/api/workflowservice/v1/service_pb2_grpc.py b/temporalio/api/workflowservice/v1/service_pb2_grpc.py index ebc0a353b3..ac29720a33 100644 --- a/temporalio/api/workflowservice/v1/service_pb2_grpc.py +++ b/temporalio/api/workflowservice/v1/service_pb2_grpc.py @@ -278,6 +278,11 @@ def __init__(self, channel): request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListSchedulesRequest.SerializeToString, response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListSchedulesResponse.FromString, ) + self.CountSchedules = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/CountSchedules", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountSchedulesRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountSchedulesResponse.FromString, + ) self.UpdateWorkerBuildIdCompatibility = channel.unary_unary( "/temporal.api.workflowservice.v1.WorkflowService/UpdateWorkerBuildIdCompatibility", request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerBuildIdCompatibilityRequest.SerializeToString, @@ -363,6 +368,26 @@ def __init__(self, channel): request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListWorkerDeploymentsRequest.SerializeToString, response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListWorkerDeploymentsResponse.FromString, ) + self.CreateWorkerDeployment = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/CreateWorkerDeployment", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentResponse.FromString, + ) + self.CreateWorkerDeploymentVersion = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/CreateWorkerDeploymentVersion", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentVersionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentVersionResponse.FromString, + ) + self.UpdateWorkerDeploymentVersionComputeConfig = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/UpdateWorkerDeploymentVersionComputeConfig", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionComputeConfigRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionComputeConfigResponse.FromString, + ) + self.ValidateWorkerDeploymentVersionComputeConfig = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/ValidateWorkerDeploymentVersionComputeConfig", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ValidateWorkerDeploymentVersionComputeConfigRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ValidateWorkerDeploymentVersionComputeConfigResponse.FromString, + ) self.UpdateWorkerDeploymentVersionMetadata = channel.unary_unary( "/temporal.api.workflowservice.v1.WorkflowService/UpdateWorkerDeploymentVersionMetadata", request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionMetadataRequest.SerializeToString, @@ -478,6 +503,11 @@ def __init__(self, channel): request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListWorkersRequest.SerializeToString, response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListWorkersResponse.FromString, ) + self.CountWorkers = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/CountWorkers", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountWorkersRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountWorkersResponse.FromString, + ) self.UpdateTaskQueueConfig = channel.unary_unary( "/temporal.api.workflowservice.v1.WorkflowService/UpdateTaskQueueConfig", request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateTaskQueueConfigRequest.SerializeToString, @@ -498,6 +528,121 @@ def __init__(self, channel): request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeWorkerRequest.SerializeToString, response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeWorkerResponse.FromString, ) + self.PauseWorkflowExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/PauseWorkflowExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseWorkflowExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseWorkflowExecutionResponse.FromString, + ) + self.UnpauseWorkflowExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/UnpauseWorkflowExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseWorkflowExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseWorkflowExecutionResponse.FromString, + ) + self.StartActivityExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/StartActivityExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartActivityExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartActivityExecutionResponse.FromString, + ) + self.StartNexusOperationExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/StartNexusOperationExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartNexusOperationExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartNexusOperationExecutionResponse.FromString, + ) + self.DescribeActivityExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/DescribeActivityExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeActivityExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeActivityExecutionResponse.FromString, + ) + self.DescribeNexusOperationExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/DescribeNexusOperationExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeNexusOperationExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeNexusOperationExecutionResponse.FromString, + ) + self.PollActivityExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/PollActivityExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollActivityExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollActivityExecutionResponse.FromString, + ) + self.PollNexusOperationExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/PollNexusOperationExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollNexusOperationExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollNexusOperationExecutionResponse.FromString, + ) + self.ListActivityExecutions = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/ListActivityExecutions", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListActivityExecutionsRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListActivityExecutionsResponse.FromString, + ) + self.ListNexusOperationExecutions = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/ListNexusOperationExecutions", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListNexusOperationExecutionsRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListNexusOperationExecutionsResponse.FromString, + ) + self.CountActivityExecutions = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/CountActivityExecutions", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountActivityExecutionsRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountActivityExecutionsResponse.FromString, + ) + self.CountNexusOperationExecutions = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/CountNexusOperationExecutions", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountNexusOperationExecutionsRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountNexusOperationExecutionsResponse.FromString, + ) + self.RequestCancelActivityExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/RequestCancelActivityExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelActivityExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelActivityExecutionResponse.FromString, + ) + self.RequestCancelNexusOperationExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/RequestCancelNexusOperationExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelNexusOperationExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelNexusOperationExecutionResponse.FromString, + ) + self.TerminateActivityExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/TerminateActivityExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateActivityExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateActivityExecutionResponse.FromString, + ) + self.DeleteActivityExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/DeleteActivityExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteActivityExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteActivityExecutionResponse.FromString, + ) + self.PauseActivityExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/PauseActivityExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseActivityExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseActivityExecutionResponse.FromString, + ) + self.ResetActivityExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/ResetActivityExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ResetActivityExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ResetActivityExecutionResponse.FromString, + ) + self.UnpauseActivityExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/UnpauseActivityExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseActivityExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseActivityExecutionResponse.FromString, + ) + self.UpdateActivityExecutionOptions = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/UpdateActivityExecutionOptions", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateActivityExecutionOptionsRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateActivityExecutionOptionsResponse.FromString, + ) + self.TerminateNexusOperationExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/TerminateNexusOperationExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateNexusOperationExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateNexusOperationExecutionResponse.FromString, + ) + self.DeleteNexusOperationExecution = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/DeleteNexusOperationExecution", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteNexusOperationExecutionRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteNexusOperationExecutionResponse.FromString, + ) + self.PollWorkflowExecutionTimeSkipping = channel.unary_unary( + "/temporal.api.workflowservice.v1.WorkflowService/PollWorkflowExecutionTimeSkipping", + request_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollWorkflowExecutionTimeSkippingRequest.SerializeToString, + response_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollWorkflowExecutionTimeSkippingResponse.FromString, + ) class WorkflowServiceServicer(object): @@ -580,7 +725,8 @@ def ExecuteMultiOperation(self, request, context): Upon failure, it returns `MultiOperationExecutionFailure` where the status code equals the status code of the *first* operation that failed to be started. - NOTE: Experimental API. + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: To be exposed over HTTP in the future. --) """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -675,10 +821,17 @@ def PollActivityTaskQueue(self, request, context): def RecordActivityTaskHeartbeat(self, request, context): """RecordActivityTaskHeartbeat is optionally called by workers while they execute activities. - If worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, - then it will be marked as timed out and an `ACTIVITY_TASK_TIMED_OUT` event will be written to - the workflow history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in - such situations, in that event, the SDK should request cancellation of the activity. + If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, + then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or + time out the activity. + + For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow + history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations, + in that event, the SDK should request cancellation of the activity. + + The request may contain response `details` which will be persisted by the server and may be + used by the activity to checkpoint progress. The `cancel_requested` field in the response + indicates whether cancellation has been requested for the activity. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -699,7 +852,7 @@ def RespondActivityTaskCompleted(self, request, context): """RespondActivityTaskCompleted is called by workers when they successfully complete an activity task. - This results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history + For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. """ @@ -708,7 +861,7 @@ def RespondActivityTaskCompleted(self, request, context): raise NotImplementedError("Method not implemented!") def RespondActivityTaskCompletedById(self, request, context): - """See `RecordActivityTaskCompleted`. This version allows clients to record completions by + """See `RespondActivityTaskCompleted`. This version allows clients to record completions by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled @@ -743,7 +896,7 @@ def RespondActivityTaskFailedById(self, request, context): def RespondActivityTaskCanceled(self, request, context): """RespondActivityTaskFailed is called by workers when processing an activity task fails. - This results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history + For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. """ @@ -752,7 +905,7 @@ def RespondActivityTaskCanceled(self, request, context): raise NotImplementedError("Method not implemented!") def RespondActivityTaskCanceledById(self, request, context): - """See `RecordActivityTaskCanceled`. This version allows clients to record failures by + """See `RespondActivityTaskCanceled`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled @@ -805,8 +958,9 @@ def SignalWithStartWorkflowExecution(self, request, context): def ResetWorkflowExecution(self, request, context): """ResetWorkflowExecution will reset an existing workflow execution to a specified `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current - execution instance. - TODO: Does exclusive here mean *just* the completed event, or also WFT started? Otherwise the task is doomed to time out? + execution instance. "Exclusive" means the identified completed event itself is not replayed + in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed + immediately, and a new workflow task will be scheduled to retry it. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -1031,8 +1185,15 @@ def ListSchedules(self, request, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") + def CountSchedules(self, request, context): + """CountSchedules is a visibility API to count schedules in a specific namespace.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def UpdateWorkerBuildIdCompatibility(self, request, context): """Deprecated. Use `UpdateWorkerVersioningRules`. + Will be removed in server version v1.32.0. Allows users to specify sets of worker build id versions on a per task queue basis. Versions are ordered, and may be either compatible with some extant version, or a new incompatible @@ -1056,6 +1217,7 @@ def UpdateWorkerBuildIdCompatibility(self, request, context): def GetWorkerBuildIdCompatibility(self, request, context): """Deprecated. Use `GetWorkerVersioningRules`. + Will be removed in server version v1.32.0. Fetches the worker build id versioning sets for a task queue. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -1084,7 +1246,7 @@ def UpdateWorkerVersioningRules(self, request, context): the target Build ID of a redirect rule is able to process event histories made by the source Build ID by using [Patching](https://docs.temporal.io/workflows#patching) or other means. - WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. + Will be removed in server version v1.32.0. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) """ @@ -1094,7 +1256,7 @@ def UpdateWorkerVersioningRules(self, request, context): def GetWorkerVersioningRules(self, request, context): """Fetches the Build ID assignment and redirect rules for a Task Queue. - WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. + Will be removed in server version v1.32.0. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -1102,6 +1264,7 @@ def GetWorkerVersioningRules(self, request, context): def GetWorkerTaskReachability(self, request, context): """Deprecated. Use `DescribeTaskQueue`. + Will be removed in server version v1.32.0. Fetches task reachability to determine whether a worker may be retired. The request may specify task queues to query for or let the server fetch all task queues mapped to the given @@ -1122,7 +1285,6 @@ def GetWorkerTaskReachability(self, request, context): def DescribeDeployment(self, request, context): """Describes a worker deployment. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `DescribeWorkerDeploymentVersion`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -1130,9 +1292,7 @@ def DescribeDeployment(self, request, context): raise NotImplementedError("Method not implemented!") def DescribeWorkerDeploymentVersion(self, request, context): - """Describes a worker deployment version. - Experimental. This API might significantly change or be removed in a future release. - """ + """Describes a worker deployment version.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -1140,7 +1300,6 @@ def DescribeWorkerDeploymentVersion(self, request, context): def ListDeployments(self, request, context): """Lists worker deployments in the namespace. Optionally can filter based on deployment series name. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `ListWorkerDeployments`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -1154,7 +1313,6 @@ def GetDeploymentReachability(self, request, context): Calculating reachability is relatively expensive. Therefore, server might return a recently cached value. In such a case, the `last_update_time` will inform you about the actual reachability calculation time. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -1163,7 +1321,6 @@ def GetDeploymentReachability(self, request, context): def GetCurrentDeployment(self, request, context): """Returns the current deployment (and its info) for a given deployment series. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -1173,7 +1330,6 @@ def GetCurrentDeployment(self, request, context): def SetCurrentDeployment(self, request, context): """Sets a deployment as the current deployment for its deployment series. Can optionally update the metadata of the deployment as well. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced by `SetWorkerDeploymentCurrentVersion`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -1183,16 +1339,13 @@ def SetCurrentDeployment(self, request, context): def SetWorkerDeploymentCurrentVersion(self, request, context): """Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping Version if it is the Version being set as Current. - Experimental. This API might significantly change or be removed in a future release. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DescribeWorkerDeployment(self, request, context): - """Describes a Worker Deployment. - Experimental. This API might significantly change or be removed in a future release. - """ + """Describes a Worker Deployment.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -1200,7 +1353,6 @@ def DescribeWorkerDeployment(self, request, context): def DeleteWorkerDeployment(self, request, context): """Deletes records of (an old) Deployment. A deployment can only be deleted if it has no Version in it. - Experimental. This API might significantly change or be removed in a future release. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -1213,7 +1365,6 @@ def DeleteWorkerDeploymentVersion(self, request, context): - It has no active pollers (none of the task queues in the Version have pollers) - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition can be skipped by passing `skip-drainage=true`. - Experimental. This API might significantly change or be removed in a future release. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -1222,28 +1373,59 @@ def DeleteWorkerDeploymentVersion(self, request, context): def SetWorkerDeploymentRampingVersion(self, request, context): """Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for gradual ramp to unversioned workers too. - Experimental. This API might significantly change or be removed in a future release. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListWorkerDeployments(self, request, context): - """Lists all Worker Deployments that are tracked in the Namespace. + """Lists all Worker Deployments that are tracked in the Namespace.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CreateWorkerDeployment(self, request, context): + """Creates a new Worker Deployment. + + Experimental. This API might significantly change or be removed in a + future release. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CreateWorkerDeploymentVersion(self, request, context): + """Creates a new Worker Deployment Version. + + Experimental. This API might significantly change or be removed in a + future release. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def UpdateWorkerDeploymentVersionComputeConfig(self, request, context): + """Updates the compute config attached to a Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") - def UpdateWorkerDeploymentVersionMetadata(self, request, context): - """Updates the user-given metadata attached to a Worker Deployment Version. + def ValidateWorkerDeploymentVersionComputeConfig(self, request, context): + """Validates the compute config without attaching it to a Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") + def UpdateWorkerDeploymentVersionMetadata(self, request, context): + """Updates the user-given metadata attached to a Worker Deployment Version.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def SetWorkerDeploymentManager(self, request, context): """Set/unset the ManagerIdentity of a Worker Deployment. Experimental. This API might significantly change or be removed in a future release. @@ -1325,6 +1507,8 @@ def RespondNexusTaskFailed(self, request, context): def UpdateActivityOptions(self, request, context): """UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. If there are multiple pending activities of the provided type - all of them will be updated. + This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and + structured to work well for standalone activities. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -1353,6 +1537,8 @@ def PauseActivity(self, request, context): - The activity should respond to the cancellation accordingly. Returns a `NotFound` error if there is no pending activity with the provided ID or type + This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and + structured to work well for standalone activities. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -1372,6 +1558,8 @@ def UnpauseActivity(self, request, context): 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type + This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and + structured to work well for standalone activities. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -1395,6 +1583,8 @@ def ResetActivity(self, request, context): 'keep_paused': if the activity is paused, it will remain paused. Returns a `NotFound` error if there is no pending activity with the provided ID or type. + This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and + structured to work well for standalone activities. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -1453,6 +1643,12 @@ def ListWorkers(self, request, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") + def CountWorkers(self, request, context): + """CountWorkers counts the number of workers in a specific namespace.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def UpdateTaskQueueConfig(self, request, context): """Updates task queue configuration. For the overall queue rate limit: the rate limit set by this api overrides the worker-set rate limit, @@ -1484,6 +1680,246 @@ def DescribeWorker(self, request, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") + def PauseWorkflowExecution(self, request, context): + """Note: This is an experimental API and the behavior may change in a future release. + PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in + - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history + - No new workflow tasks or activity tasks are dispatched. + - Any workflow task currently executing on the worker will be allowed to complete. + - Any activity task currently executing will be paused. + - All server-side events will continue to be processed by the server. + - Queries & Updates on a paused workflow will be rejected. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def UnpauseWorkflowExecution(self, request, context): + """Note: This is an experimental API and the behavior may change in a future release. + UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request. + Unpausing a workflow execution results in + - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history + - Workflow tasks and activity tasks are resumed. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def StartActivityExecution(self, request, context): + """StartActivityExecution starts a new activity execution. + + Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace + unless permitted by the specified ID conflict policy. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def StartNexusOperationExecution(self, request, context): + """StartNexusOperationExecution starts a new Nexus operation. + + Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this + namespace unless permitted by the specified ID conflict policy. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def DescribeActivityExecution(self, request, context): + """DescribeActivityExecution returns information about an activity execution. + It can be used to: + - Get current activity info without waiting + - Long-poll for next state change and return new activity info + Response can optionally include activity input or outcome (if the activity has completed). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def DescribeNexusOperationExecution(self, request, context): + """DescribeNexusOperationExecution returns information about a Nexus operation. + Supported use cases include: + - Get current operation info without waiting + - Long-poll for next state change and return new operation info + Response can optionally include operation input or outcome (if the operation has completed). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def PollActivityExecution(self, request, context): + """PollActivityExecution long-polls for an activity execution to complete and returns the + outcome (result or failure). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def PollNexusOperationExecution(self, request, context): + """PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns + the outcome (result or failure). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ListActivityExecutions(self, request, context): + """ListActivityExecutions is a visibility API to list activity executions in a specific namespace.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ListNexusOperationExecutions(self, request, context): + """ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CountActivityExecutions(self, request, context): + """CountActivityExecutions is a visibility API to count activity executions in a specific namespace.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CountNexusOperationExecutions(self, request, context): + """CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def RequestCancelActivityExecution(self, request, context): + """RequestCancelActivityExecution requests cancellation of an activity execution. + + Cancellation is cooperative: this call records the request, but the activity must detect and + acknowledge it for the activity to reach CANCELED status. The cancellation signal is + delivered via `cancel_requested` in the heartbeat response; SDKs surface this via + language-idiomatic mechanisms (context cancellation, exceptions, abort signals). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def RequestCancelNexusOperationExecution(self, request, context): + """RequestCancelNexusOperationExecution requests cancellation of a Nexus operation. + + Requesting to cancel an operation does not automatically transition the operation to canceled status. + The operation will only transition to canceled status if it supports cancellation and the handler + processes the cancellation request. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def TerminateActivityExecution(self, request, context): + """TerminateActivityExecution terminates an existing activity execution immediately. + + Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a + running attempt. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def DeleteActivityExecution(self, request, context): + """DeleteActivityExecution asynchronously deletes a specific activity execution (when + ActivityExecution.run_id is provided) or the latest activity execution (when + ActivityExecution.run_id is not provided). If the activity Execution is running, it will be + terminated before deletion. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def PauseActivityExecution(self, request, context): + """PauseActivityExecution pauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity + + Pausing an activity means: + - If the activity is currently waiting for a retry or is running and subsequently fails, + it will not be rescheduled until it is unpaused. + - If the activity is already paused, calling this method will have no effect. + - If the activity is running and finishes successfully, the activity will be completed. + - If the activity is running and finishes with failure: + * if there is no retry left - the activity will be completed. + * if there are more retries left - the activity will be paused. + For long-running activities: + - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + + Returns a `NotFound` error if there is no pending activity with the provided ID + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ResetActivityExecution(self, request, context): + """ResetActivityExecution resets the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + Resetting an activity means: + * number of attempts will be reset to 0. + * activity timeouts will be reset. + * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + it will be scheduled immediately (* see 'jitter' flag) + + Returns a `NotFound` error if there is no pending activity with the provided ID or type. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def UnpauseActivityExecution(self, request, context): + """UnpauseActivityExecution unpauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + If activity is not paused, this call will have no effect. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Once the activity is unpaused, all timeout timers will be regenerated. + + Returns a `NotFound` error if there is no pending activity with the provided ID + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def UpdateActivityExecutionOptions(self, request, context): + """UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. + This API can be used to target a workflow activity or a standalone activity. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def TerminateNexusOperationExecution(self, request, context): + """TerminateNexusOperationExecution terminates an existing Nexus operation immediately. + + Termination happens immediately and the operation handler cannot react to it. A terminated operation will have + its outcome set to a failure with a termination reason. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def DeleteNexusOperationExecution(self, request, context): + """DeleteNexusOperationExecution asynchronously deletes a specific Nexus operation run (when + run_id is provided) or the latest run (when run_id is not provided). If the operation + is running, it will be terminated before deletion. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Nexus operation deletion not exposed to HTTP, users should use cancel or terminate. --) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def PollWorkflowExecutionTimeSkipping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def add_WorkflowServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -1737,6 +2173,11 @@ def add_WorkflowServiceServicer_to_server(servicer, server): request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListSchedulesRequest.FromString, response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListSchedulesResponse.SerializeToString, ), + "CountSchedules": grpc.unary_unary_rpc_method_handler( + servicer.CountSchedules, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountSchedulesRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountSchedulesResponse.SerializeToString, + ), "UpdateWorkerBuildIdCompatibility": grpc.unary_unary_rpc_method_handler( servicer.UpdateWorkerBuildIdCompatibility, request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerBuildIdCompatibilityRequest.FromString, @@ -1822,6 +2263,26 @@ def add_WorkflowServiceServicer_to_server(servicer, server): request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListWorkerDeploymentsRequest.FromString, response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListWorkerDeploymentsResponse.SerializeToString, ), + "CreateWorkerDeployment": grpc.unary_unary_rpc_method_handler( + servicer.CreateWorkerDeployment, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentResponse.SerializeToString, + ), + "CreateWorkerDeploymentVersion": grpc.unary_unary_rpc_method_handler( + servicer.CreateWorkerDeploymentVersion, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentVersionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentVersionResponse.SerializeToString, + ), + "UpdateWorkerDeploymentVersionComputeConfig": grpc.unary_unary_rpc_method_handler( + servicer.UpdateWorkerDeploymentVersionComputeConfig, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionComputeConfigRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionComputeConfigResponse.SerializeToString, + ), + "ValidateWorkerDeploymentVersionComputeConfig": grpc.unary_unary_rpc_method_handler( + servicer.ValidateWorkerDeploymentVersionComputeConfig, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ValidateWorkerDeploymentVersionComputeConfigRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ValidateWorkerDeploymentVersionComputeConfigResponse.SerializeToString, + ), "UpdateWorkerDeploymentVersionMetadata": grpc.unary_unary_rpc_method_handler( servicer.UpdateWorkerDeploymentVersionMetadata, request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionMetadataRequest.FromString, @@ -1937,6 +2398,11 @@ def add_WorkflowServiceServicer_to_server(servicer, server): request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListWorkersRequest.FromString, response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListWorkersResponse.SerializeToString, ), + "CountWorkers": grpc.unary_unary_rpc_method_handler( + servicer.CountWorkers, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountWorkersRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountWorkersResponse.SerializeToString, + ), "UpdateTaskQueueConfig": grpc.unary_unary_rpc_method_handler( servicer.UpdateTaskQueueConfig, request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateTaskQueueConfigRequest.FromString, @@ -1957,6 +2423,121 @@ def add_WorkflowServiceServicer_to_server(servicer, server): request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeWorkerRequest.FromString, response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeWorkerResponse.SerializeToString, ), + "PauseWorkflowExecution": grpc.unary_unary_rpc_method_handler( + servicer.PauseWorkflowExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseWorkflowExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseWorkflowExecutionResponse.SerializeToString, + ), + "UnpauseWorkflowExecution": grpc.unary_unary_rpc_method_handler( + servicer.UnpauseWorkflowExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseWorkflowExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseWorkflowExecutionResponse.SerializeToString, + ), + "StartActivityExecution": grpc.unary_unary_rpc_method_handler( + servicer.StartActivityExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartActivityExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartActivityExecutionResponse.SerializeToString, + ), + "StartNexusOperationExecution": grpc.unary_unary_rpc_method_handler( + servicer.StartNexusOperationExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartNexusOperationExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartNexusOperationExecutionResponse.SerializeToString, + ), + "DescribeActivityExecution": grpc.unary_unary_rpc_method_handler( + servicer.DescribeActivityExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeActivityExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeActivityExecutionResponse.SerializeToString, + ), + "DescribeNexusOperationExecution": grpc.unary_unary_rpc_method_handler( + servicer.DescribeNexusOperationExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeNexusOperationExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeNexusOperationExecutionResponse.SerializeToString, + ), + "PollActivityExecution": grpc.unary_unary_rpc_method_handler( + servicer.PollActivityExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollActivityExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollActivityExecutionResponse.SerializeToString, + ), + "PollNexusOperationExecution": grpc.unary_unary_rpc_method_handler( + servicer.PollNexusOperationExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollNexusOperationExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollNexusOperationExecutionResponse.SerializeToString, + ), + "ListActivityExecutions": grpc.unary_unary_rpc_method_handler( + servicer.ListActivityExecutions, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListActivityExecutionsRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListActivityExecutionsResponse.SerializeToString, + ), + "ListNexusOperationExecutions": grpc.unary_unary_rpc_method_handler( + servicer.ListNexusOperationExecutions, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListNexusOperationExecutionsRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListNexusOperationExecutionsResponse.SerializeToString, + ), + "CountActivityExecutions": grpc.unary_unary_rpc_method_handler( + servicer.CountActivityExecutions, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountActivityExecutionsRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountActivityExecutionsResponse.SerializeToString, + ), + "CountNexusOperationExecutions": grpc.unary_unary_rpc_method_handler( + servicer.CountNexusOperationExecutions, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountNexusOperationExecutionsRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountNexusOperationExecutionsResponse.SerializeToString, + ), + "RequestCancelActivityExecution": grpc.unary_unary_rpc_method_handler( + servicer.RequestCancelActivityExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelActivityExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelActivityExecutionResponse.SerializeToString, + ), + "RequestCancelNexusOperationExecution": grpc.unary_unary_rpc_method_handler( + servicer.RequestCancelNexusOperationExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelNexusOperationExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelNexusOperationExecutionResponse.SerializeToString, + ), + "TerminateActivityExecution": grpc.unary_unary_rpc_method_handler( + servicer.TerminateActivityExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateActivityExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateActivityExecutionResponse.SerializeToString, + ), + "DeleteActivityExecution": grpc.unary_unary_rpc_method_handler( + servicer.DeleteActivityExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteActivityExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteActivityExecutionResponse.SerializeToString, + ), + "PauseActivityExecution": grpc.unary_unary_rpc_method_handler( + servicer.PauseActivityExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseActivityExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseActivityExecutionResponse.SerializeToString, + ), + "ResetActivityExecution": grpc.unary_unary_rpc_method_handler( + servicer.ResetActivityExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ResetActivityExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ResetActivityExecutionResponse.SerializeToString, + ), + "UnpauseActivityExecution": grpc.unary_unary_rpc_method_handler( + servicer.UnpauseActivityExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseActivityExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseActivityExecutionResponse.SerializeToString, + ), + "UpdateActivityExecutionOptions": grpc.unary_unary_rpc_method_handler( + servicer.UpdateActivityExecutionOptions, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateActivityExecutionOptionsRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateActivityExecutionOptionsResponse.SerializeToString, + ), + "TerminateNexusOperationExecution": grpc.unary_unary_rpc_method_handler( + servicer.TerminateNexusOperationExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateNexusOperationExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateNexusOperationExecutionResponse.SerializeToString, + ), + "DeleteNexusOperationExecution": grpc.unary_unary_rpc_method_handler( + servicer.DeleteNexusOperationExecution, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteNexusOperationExecutionRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteNexusOperationExecutionResponse.SerializeToString, + ), + "PollWorkflowExecutionTimeSkipping": grpc.unary_unary_rpc_method_handler( + servicer.PollWorkflowExecutionTimeSkipping, + request_deserializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollWorkflowExecutionTimeSkippingRequest.FromString, + response_serializer=temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollWorkflowExecutionTimeSkippingResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( "temporal.api.workflowservice.v1.WorkflowService", rpc_method_handlers @@ -3429,6 +4010,35 @@ def ListSchedules( metadata, ) + @staticmethod + def CountSchedules( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/CountSchedules", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountSchedulesRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountSchedulesResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + @staticmethod def UpdateWorkerBuildIdCompatibility( request, @@ -3923,7 +4533,7 @@ def ListWorkerDeployments( ) @staticmethod - def UpdateWorkerDeploymentVersionMetadata( + def CreateWorkerDeployment( request, target, options=(), @@ -3938,8 +4548,124 @@ def UpdateWorkerDeploymentVersionMetadata( return grpc.experimental.unary_unary( request, target, - "/temporal.api.workflowservice.v1.WorkflowService/UpdateWorkerDeploymentVersionMetadata", - temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionMetadataRequest.SerializeToString, + "/temporal.api.workflowservice.v1.WorkflowService/CreateWorkerDeployment", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateWorkerDeploymentVersion( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/CreateWorkerDeploymentVersion", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentVersionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CreateWorkerDeploymentVersionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateWorkerDeploymentVersionComputeConfig( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/UpdateWorkerDeploymentVersionComputeConfig", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionComputeConfigRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionComputeConfigResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ValidateWorkerDeploymentVersionComputeConfig( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/ValidateWorkerDeploymentVersionComputeConfig", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ValidateWorkerDeploymentVersionComputeConfigRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ValidateWorkerDeploymentVersionComputeConfigResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateWorkerDeploymentVersionMetadata( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/UpdateWorkerDeploymentVersionMetadata", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionMetadataRequest.SerializeToString, temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateWorkerDeploymentVersionMetadataResponse.FromString, options, channel_credentials, @@ -4589,6 +5315,35 @@ def ListWorkers( metadata, ) + @staticmethod + def CountWorkers( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/CountWorkers", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountWorkersRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountWorkersResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + @staticmethod def UpdateTaskQueueConfig( request, @@ -4704,3 +5459,670 @@ def DescribeWorker( timeout, metadata, ) + + @staticmethod + def PauseWorkflowExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/PauseWorkflowExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseWorkflowExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseWorkflowExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UnpauseWorkflowExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/UnpauseWorkflowExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseWorkflowExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseWorkflowExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def StartActivityExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/StartActivityExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartActivityExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartActivityExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def StartNexusOperationExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/StartNexusOperationExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartNexusOperationExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.StartNexusOperationExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DescribeActivityExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/DescribeActivityExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeActivityExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeActivityExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DescribeNexusOperationExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/DescribeNexusOperationExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeNexusOperationExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DescribeNexusOperationExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def PollActivityExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/PollActivityExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollActivityExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollActivityExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def PollNexusOperationExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/PollNexusOperationExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollNexusOperationExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollNexusOperationExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListActivityExecutions( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/ListActivityExecutions", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListActivityExecutionsRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListActivityExecutionsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListNexusOperationExecutions( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/ListNexusOperationExecutions", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListNexusOperationExecutionsRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ListNexusOperationExecutionsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CountActivityExecutions( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/CountActivityExecutions", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountActivityExecutionsRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountActivityExecutionsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CountNexusOperationExecutions( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/CountNexusOperationExecutions", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountNexusOperationExecutionsRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.CountNexusOperationExecutionsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def RequestCancelActivityExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/RequestCancelActivityExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelActivityExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelActivityExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def RequestCancelNexusOperationExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/RequestCancelNexusOperationExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelNexusOperationExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.RequestCancelNexusOperationExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def TerminateActivityExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/TerminateActivityExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateActivityExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateActivityExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteActivityExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/DeleteActivityExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteActivityExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteActivityExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def PauseActivityExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/PauseActivityExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseActivityExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PauseActivityExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ResetActivityExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/ResetActivityExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ResetActivityExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.ResetActivityExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UnpauseActivityExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/UnpauseActivityExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseActivityExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UnpauseActivityExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateActivityExecutionOptions( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/UpdateActivityExecutionOptions", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateActivityExecutionOptionsRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.UpdateActivityExecutionOptionsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def TerminateNexusOperationExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/TerminateNexusOperationExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateNexusOperationExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.TerminateNexusOperationExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteNexusOperationExecution( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/DeleteNexusOperationExecution", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteNexusOperationExecutionRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.DeleteNexusOperationExecutionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def PollWorkflowExecutionTimeSkipping( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/temporal.api.workflowservice.v1.WorkflowService/PollWorkflowExecutionTimeSkipping", + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollWorkflowExecutionTimeSkippingRequest.SerializeToString, + temporal_dot_api_dot_workflowservice_dot_v1_dot_request__response__pb2.PollWorkflowExecutionTimeSkippingResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/temporalio/api/workflowservice/v1/service_pb2_grpc.pyi b/temporalio/api/workflowservice/v1/service_pb2_grpc.pyi index 9673214742..8f9ff69ff7 100644 --- a/temporalio/api/workflowservice/v1/service_pb2_grpc.pyi +++ b/temporalio/api/workflowservice/v1/service_pb2_grpc.pyi @@ -4,11 +4,24 @@ isort:skip_file """ import abc +import collections.abc +import typing import grpc +import grpc.aio import temporalio.api.workflowservice.v1.request_response_pb2 +_T = typing.TypeVar("_T") + +class _MaybeAsyncIterator( + collections.abc.AsyncIterator[_T], + collections.abc.Iterator[_T], + metaclass=abc.ABCMeta, +): ... +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg] + ... + class WorkflowServiceStub: """WorkflowService API defines how Temporal SDKs and other clients interact with the Temporal server to create and interact with workflows and activities. @@ -23,7 +36,9 @@ class WorkflowServiceStub: activity, responding with completion or failure. """ - def __init__(self, channel: grpc.Channel) -> None: ... + def __init__( + self, channel: typing.Union[grpc.Channel, grpc.aio.Channel] + ) -> None: ... RegisterNamespace: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RegisterNamespaceRequest, temporalio.api.workflowservice.v1.request_response_pb2.RegisterNamespaceResponse, @@ -35,16 +50,19 @@ class WorkflowServiceStub: isolation for all resources within the namespace. All resources belongs to exactly one namespace. """ + DescribeNamespace: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeNamespaceRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeNamespaceResponse, ] """DescribeNamespace returns the information and configuration for a registered namespace.""" + ListNamespaces: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListNamespacesRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListNamespacesResponse, ] """ListNamespaces returns the information and configuration for all namespaces.""" + UpdateNamespace: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateNamespaceRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateNamespaceResponse, @@ -52,6 +70,7 @@ class WorkflowServiceStub: """UpdateNamespace is used to update the information and configuration of a registered namespace. """ + DeprecateNamespace: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DeprecateNamespaceRequest, temporalio.api.workflowservice.v1.request_response_pb2.DeprecateNamespaceResponse, @@ -65,6 +84,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Deprecated --) """ + StartWorkflowExecution: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.StartWorkflowExecutionRequest, temporalio.api.workflowservice.v1.request_response_pb2.StartWorkflowExecutionResponse, @@ -75,6 +95,7 @@ class WorkflowServiceStub: also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an instance already exists with same workflow id. """ + ExecuteMultiOperation: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ExecuteMultiOperationRequest, temporalio.api.workflowservice.v1.request_response_pb2.ExecuteMultiOperationResponse, @@ -87,8 +108,10 @@ class WorkflowServiceStub: Upon failure, it returns `MultiOperationExecutionFailure` where the status code equals the status code of the *first* operation that failed to be started. - NOTE: Experimental API. + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: To be exposed over HTTP in the future. --) """ + GetWorkflowExecutionHistory: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryResponse, @@ -96,6 +119,7 @@ class WorkflowServiceStub: """GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with `NotFound` if the specified workflow execution is unknown to the service. """ + GetWorkflowExecutionHistoryReverse: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryReverseRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryReverseResponse, @@ -104,6 +128,7 @@ class WorkflowServiceStub: order (starting from last event). Fails with`NotFound` if the specified workflow execution is unknown to the service. """ + PollWorkflowTaskQueue: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowTaskQueueRequest, temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowTaskQueueResponse, @@ -118,6 +143,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + RespondWorkflowTaskCompleted: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskCompletedRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskCompletedResponse, @@ -132,6 +158,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + RespondWorkflowTaskFailed: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskFailedRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskFailedResponse, @@ -149,6 +176,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + PollActivityTaskQueue: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.PollActivityTaskQueueRequest, temporalio.api.workflowservice.v1.request_response_pb2.PollActivityTaskQueueResponse, @@ -169,17 +197,26 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + RecordActivityTaskHeartbeat: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatRequest, temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatResponse, ] """RecordActivityTaskHeartbeat is optionally called by workers while they execute activities. - If worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, - then it will be marked as timed out and an `ACTIVITY_TASK_TIMED_OUT` event will be written to - the workflow history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in - such situations, in that event, the SDK should request cancellation of the activity. + If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, + then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or + time out the activity. + + For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow + history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations, + in that event, the SDK should request cancellation of the activity. + + The request may contain response `details` which will be persisted by the server and may be + used by the activity to checkpoint progress. The `cancel_requested` field in the response + indicates whether cancellation has been requested for the activity. """ + RecordActivityTaskHeartbeatById: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatByIdRequest, temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatByIdResponse, @@ -190,6 +227,7 @@ class WorkflowServiceStub: (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) """ + RespondActivityTaskCompleted: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedResponse, @@ -197,20 +235,22 @@ class WorkflowServiceStub: """RespondActivityTaskCompleted is called by workers when they successfully complete an activity task. - This results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history + For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. """ + RespondActivityTaskCompletedById: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedByIdRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedByIdResponse, ] - """See `RecordActivityTaskCompleted`. This version allows clients to record completions by + """See `RespondActivityTaskCompleted`. This version allows clients to record completions by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) """ + RespondActivityTaskFailed: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedResponse, @@ -221,6 +261,7 @@ class WorkflowServiceStub: a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. """ + RespondActivityTaskFailedById: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedByIdRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedByIdResponse, @@ -231,26 +272,29 @@ class WorkflowServiceStub: (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) """ + RespondActivityTaskCanceled: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledResponse, ] """RespondActivityTaskFailed is called by workers when processing an activity task fails. - This results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history + For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. """ + RespondActivityTaskCanceledById: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledByIdRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledByIdResponse, ] - """See `RecordActivityTaskCanceled`. This version allows clients to record failures by + """See `RespondActivityTaskCanceled`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) """ + RequestCancelWorkflowExecution: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelWorkflowExecutionRequest, temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelWorkflowExecutionResponse, @@ -262,6 +306,7 @@ class WorkflowServiceStub: workflow history and a new workflow task created for the workflow. It returns success if the requested workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist. """ + SignalWorkflowExecution: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.SignalWorkflowExecutionRequest, temporalio.api.workflowservice.v1.request_response_pb2.SignalWorkflowExecutionResponse, @@ -271,6 +316,7 @@ class WorkflowServiceStub: This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow task being created for the execution. """ + SignalWithStartWorkflowExecution: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionRequest, temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse, @@ -288,15 +334,18 @@ class WorkflowServiceStub: (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "With" is used to indicate combined operation. --) """ + ResetWorkflowExecution: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ResetWorkflowExecutionRequest, temporalio.api.workflowservice.v1.request_response_pb2.ResetWorkflowExecutionResponse, ] """ResetWorkflowExecution will reset an existing workflow execution to a specified `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current - execution instance. - TODO: Does exclusive here mean *just* the completed event, or also WFT started? Otherwise the task is doomed to time out? + execution instance. "Exclusive" means the identified completed event itself is not replayed + in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed + immediately, and a new workflow task will be scheduled to retry it. """ + TerminateWorkflowExecution: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.TerminateWorkflowExecutionRequest, temporalio.api.workflowservice.v1.request_response_pb2.TerminateWorkflowExecutionResponse, @@ -305,6 +354,7 @@ class WorkflowServiceStub: `WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the execution instance. """ + DeleteWorkflowExecution: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowExecutionRequest, temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowExecutionResponse, @@ -317,6 +367,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Workflow deletion not exposed to HTTP, users should use cancel or terminate. --) """ + ListOpenWorkflowExecutions: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListOpenWorkflowExecutionsRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListOpenWorkflowExecutionsResponse, @@ -326,6 +377,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) """ + ListClosedWorkflowExecutions: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListClosedWorkflowExecutionsRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListClosedWorkflowExecutionsResponse, @@ -335,16 +387,19 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) """ + ListWorkflowExecutions: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowExecutionsRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowExecutionsResponse, ] """ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.""" + ListArchivedWorkflowExecutions: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListArchivedWorkflowExecutionsRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListArchivedWorkflowExecutionsResponse, ] """ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.""" + ScanWorkflowExecutions: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ScanWorkflowExecutionsRequest, temporalio.api.workflowservice.v1.request_response_pb2.ScanWorkflowExecutionsResponse, @@ -356,11 +411,13 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) """ + CountWorkflowExecutions: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.CountWorkflowExecutionsRequest, temporalio.api.workflowservice.v1.request_response_pb2.CountWorkflowExecutionsResponse, ] """CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.""" + GetSearchAttributes: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetSearchAttributesRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetSearchAttributesResponse, @@ -370,6 +427,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose this search attribute API to HTTP (but may expose on OperatorService). --) """ + RespondQueryTaskCompleted: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondQueryTaskCompletedRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondQueryTaskCompletedResponse, @@ -383,6 +441,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + ResetStickyTaskQueue: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ResetStickyTaskQueueRequest, temporalio.api.workflowservice.v1.request_response_pb2.ResetStickyTaskQueueResponse, @@ -402,6 +461,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + ShutdownWorker: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ShutdownWorkerRequest, temporalio.api.workflowservice.v1.request_response_pb2.ShutdownWorkerResponse, @@ -420,16 +480,19 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + QueryWorkflow: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.QueryWorkflowRequest, temporalio.api.workflowservice.v1.request_response_pb2.QueryWorkflowResponse, ] """QueryWorkflow requests a query be executed for a specified workflow execution.""" + DescribeWorkflowExecution: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowExecutionRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowExecutionResponse, ] """DescribeWorkflowExecution returns information about the specified workflow execution.""" + DescribeTaskQueue: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeTaskQueueRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeTaskQueueResponse, @@ -439,16 +502,19 @@ class WorkflowServiceStub: - Workflow Reachability status - Backlog info for Workflow and/or Activity tasks """ + GetClusterInfo: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetClusterInfoRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetClusterInfoResponse, ] """GetClusterInfo returns information about temporal cluster""" + GetSystemInfo: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetSystemInfoRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetSystemInfoResponse, ] """GetSystemInfo returns information about the system.""" + ListTaskQueuePartitions: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListTaskQueuePartitionsRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListTaskQueuePartitionsResponse, @@ -456,46 +522,61 @@ class WorkflowServiceStub: """(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose this low-level API to HTTP. --) """ + CreateSchedule: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.CreateScheduleRequest, temporalio.api.workflowservice.v1.request_response_pb2.CreateScheduleResponse, ] """Creates a new schedule.""" + DescribeSchedule: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeScheduleRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeScheduleResponse, ] """Returns the schedule description and current state of an existing schedule.""" + UpdateSchedule: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateScheduleRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateScheduleResponse, ] """Changes the configuration or state of an existing schedule.""" + PatchSchedule: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.PatchScheduleRequest, temporalio.api.workflowservice.v1.request_response_pb2.PatchScheduleResponse, ] """Makes a specific change to a schedule or triggers an immediate action.""" + ListScheduleMatchingTimes: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListScheduleMatchingTimesRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListScheduleMatchingTimesResponse, ] """Lists matching times within a range.""" + DeleteSchedule: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DeleteScheduleRequest, temporalio.api.workflowservice.v1.request_response_pb2.DeleteScheduleResponse, ] """Deletes a schedule, removing it from the system.""" + ListSchedules: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListSchedulesRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListSchedulesResponse, ] """List all schedules in a namespace.""" + + CountSchedules: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountSchedulesRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CountSchedulesResponse, + ] + """CountSchedules is a visibility API to count schedules in a specific namespace.""" + UpdateWorkerBuildIdCompatibility: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerBuildIdCompatibilityRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerBuildIdCompatibilityResponse, ] """Deprecated. Use `UpdateWorkerVersioningRules`. + Will be removed in server version v1.32.0. Allows users to specify sets of worker build id versions on a per task queue basis. Versions are ordered, and may be either compatible with some extant version, or a new incompatible @@ -513,13 +594,16 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) """ + GetWorkerBuildIdCompatibility: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerBuildIdCompatibilityRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerBuildIdCompatibilityResponse, ] """Deprecated. Use `GetWorkerVersioningRules`. + Will be removed in server version v1.32.0. Fetches the worker build id versioning sets for a task queue. """ + UpdateWorkerVersioningRules: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerVersioningRulesRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerVersioningRulesResponse, @@ -545,22 +629,25 @@ class WorkflowServiceStub: the target Build ID of a redirect rule is able to process event histories made by the source Build ID by using [Patching](https://docs.temporal.io/workflows#patching) or other means. - WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. + Will be removed in server version v1.32.0. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) """ + GetWorkerVersioningRules: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerVersioningRulesRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerVersioningRulesResponse, ] """Fetches the Build ID assignment and redirect rules for a Task Queue. - WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. + Will be removed in server version v1.32.0. """ + GetWorkerTaskReachability: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerTaskReachabilityRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerTaskReachabilityResponse, ] """Deprecated. Use `DescribeTaskQueue`. + Will be removed in server version v1.32.0. Fetches task reachability to determine whether a worker may be retired. The request may specify task queues to query for or let the server fetch all task queues mapped to the given @@ -575,30 +662,30 @@ class WorkflowServiceStub: Open source users can adjust this limit by setting the server's dynamic config value for `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. """ + DescribeDeployment: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeDeploymentRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeDeploymentResponse, ] """Describes a worker deployment. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `DescribeWorkerDeploymentVersion`. """ + DescribeWorkerDeploymentVersion: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentVersionRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentVersionResponse, ] - """Describes a worker deployment version. - Experimental. This API might significantly change or be removed in a future release. - """ + """Describes a worker deployment version.""" + ListDeployments: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListDeploymentsRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListDeploymentsResponse, ] """Lists worker deployments in the namespace. Optionally can filter based on deployment series name. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `ListWorkerDeployments`. """ + GetDeploymentReachability: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetDeploymentReachabilityRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetDeploymentReachabilityResponse, @@ -609,49 +696,48 @@ class WorkflowServiceStub: Calculating reachability is relatively expensive. Therefore, server might return a recently cached value. In such a case, the `last_update_time` will inform you about the actual reachability calculation time. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`. """ + GetCurrentDeployment: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.GetCurrentDeploymentRequest, temporalio.api.workflowservice.v1.request_response_pb2.GetCurrentDeploymentResponse, ] """Returns the current deployment (and its info) for a given deployment series. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`. """ + SetCurrentDeployment: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.SetCurrentDeploymentRequest, temporalio.api.workflowservice.v1.request_response_pb2.SetCurrentDeploymentResponse, ] """Sets a deployment as the current deployment for its deployment series. Can optionally update the metadata of the deployment as well. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced by `SetWorkerDeploymentCurrentVersion`. """ + SetWorkerDeploymentCurrentVersion: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentCurrentVersionRequest, temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentCurrentVersionResponse, ] """Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping Version if it is the Version being set as Current. - Experimental. This API might significantly change or be removed in a future release. """ + DescribeWorkerDeployment: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentResponse, ] - """Describes a Worker Deployment. - Experimental. This API might significantly change or be removed in a future release. - """ + """Describes a Worker Deployment.""" + DeleteWorkerDeployment: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentRequest, temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentResponse, ] """Deletes records of (an old) Deployment. A deployment can only be deleted if it has no Version in it. - Experimental. This API might significantly change or be removed in a future release. """ + DeleteWorkerDeploymentVersion: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentVersionRequest, temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentVersionResponse, @@ -662,30 +748,64 @@ class WorkflowServiceStub: - It has no active pollers (none of the task queues in the Version have pollers) - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition can be skipped by passing `skip-drainage=true`. - Experimental. This API might significantly change or be removed in a future release. """ + SetWorkerDeploymentRampingVersion: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentRampingVersionRequest, temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentRampingVersionResponse, ] """Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for gradual ramp to unversioned workers too. - Experimental. This API might significantly change or be removed in a future release. """ + ListWorkerDeployments: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListWorkerDeploymentsRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListWorkerDeploymentsResponse, ] - """Lists all Worker Deployments that are tracked in the Namespace. + """Lists all Worker Deployments that are tracked in the Namespace.""" + + CreateWorkerDeployment: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentResponse, + ] + """Creates a new Worker Deployment. + + Experimental. This API might significantly change or be removed in a + future release. + """ + + CreateWorkerDeploymentVersion: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentVersionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentVersionResponse, + ] + """Creates a new Worker Deployment Version. + + Experimental. This API might significantly change or be removed in a + future release. + """ + + UpdateWorkerDeploymentVersionComputeConfig: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionComputeConfigRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionComputeConfigResponse, + ] + """Updates the compute config attached to a Worker Deployment Version. + Experimental. This API might significantly change or be removed in a future release. + """ + + ValidateWorkerDeploymentVersionComputeConfig: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ValidateWorkerDeploymentVersionComputeConfigRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ValidateWorkerDeploymentVersionComputeConfigResponse, + ] + """Validates the compute config without attaching it to a Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. """ + UpdateWorkerDeploymentVersionMetadata: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionMetadataRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionMetadataResponse, ] - """Updates the user-given metadata attached to a Worker Deployment Version. - Experimental. This API might significantly change or be removed in a future release. - """ + """Updates the user-given metadata attached to a Worker Deployment Version.""" + SetWorkerDeploymentManager: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentManagerRequest, temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentManagerResponse, @@ -693,11 +813,13 @@ class WorkflowServiceStub: """Set/unset the ManagerIdentity of a Worker Deployment. Experimental. This API might significantly change or be removed in a future release. """ + UpdateWorkflowExecution: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionResponse, ] """Invokes the specified Update function on user Workflow code.""" + PollWorkflowExecutionUpdate: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionUpdateRequest, temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionUpdateResponse, @@ -710,26 +832,31 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We don't expose update polling API to HTTP in favor of a potential future non-blocking form. --) """ + StartBatchOperation: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.StartBatchOperationRequest, temporalio.api.workflowservice.v1.request_response_pb2.StartBatchOperationResponse, ] """StartBatchOperation starts a new batch operation""" + StopBatchOperation: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.StopBatchOperationRequest, temporalio.api.workflowservice.v1.request_response_pb2.StopBatchOperationResponse, ] """StopBatchOperation stops a batch operation""" + DescribeBatchOperation: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeBatchOperationRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeBatchOperationResponse, ] """DescribeBatchOperation returns the information about a batch operation""" + ListBatchOperations: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListBatchOperationsRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListBatchOperationsResponse, ] """ListBatchOperations returns a list of batch operations""" + PollNexusTaskQueue: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueRequest, temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueResponse, @@ -738,6 +865,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + RespondNexusTaskCompleted: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskCompletedRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskCompletedResponse, @@ -746,6 +874,7 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + RespondNexusTaskFailed: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskFailedRequest, temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskFailedResponse, @@ -754,18 +883,23 @@ class WorkflowServiceStub: (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + UpdateActivityOptions: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityOptionsRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityOptionsResponse, ] """UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. If there are multiple pending activities of the provided type - all of them will be updated. + This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and + structured to work well for standalone activities. """ + UpdateWorkflowExecutionOptions: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionOptionsRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionOptionsResponse, ] """UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution.""" + PauseActivity: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityRequest, temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityResponse, @@ -786,7 +920,10 @@ class WorkflowServiceStub: - The activity should respond to the cancellation accordingly. Returns a `NotFound` error if there is no pending activity with the provided ID or type + This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and + structured to work well for standalone activities. """ + UnpauseActivity: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityRequest, temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityResponse, @@ -804,7 +941,10 @@ class WorkflowServiceStub: 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type + This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and + structured to work well for standalone activities. """ + ResetActivity: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityRequest, temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityResponse, @@ -826,7 +966,10 @@ class WorkflowServiceStub: 'keep_paused': if the activity is paused, it will remain paused. Returns a `NotFound` error if there is no pending activity with the provided ID or type. + This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and + structured to work well for standalone activities. """ + CreateWorkflowRule: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkflowRuleRequest, temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkflowRuleResponse, @@ -837,6 +980,7 @@ class WorkflowServiceStub: Note: the rules are part of namespace configuration and will be stored in the namespace config. Namespace config is eventually consistent. """ + DescribeWorkflowRule: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowRuleRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowRuleResponse, @@ -844,16 +988,19 @@ class WorkflowServiceStub: """DescribeWorkflowRule return the rule specification for existing rule id. If there is no rule with such id - NOT FOUND error will be returned. """ + DeleteWorkflowRule: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowRuleRequest, temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowRuleResponse, ] """Delete rule by rule id""" + ListWorkflowRules: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowRulesRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowRulesResponse, ] """Return all namespace workflow rules""" + TriggerWorkflowRule: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.TriggerWorkflowRuleRequest, temporalio.api.workflowservice.v1.request_response_pb2.TriggerWorkflowRuleResponse, @@ -863,16 +1010,25 @@ class WorkflowServiceStub: * trigger rule for a specific workflow execution without creating a rule; This is useful for one-off operations. """ + RecordWorkerHeartbeat: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.RecordWorkerHeartbeatRequest, temporalio.api.workflowservice.v1.request_response_pb2.RecordWorkerHeartbeatResponse, ] """WorkerHeartbeat receive heartbeat request from the worker.""" + ListWorkers: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.ListWorkersRequest, temporalio.api.workflowservice.v1.request_response_pb2.ListWorkersResponse, ] """ListWorkers is a visibility API to list worker status information in a specific namespace.""" + + CountWorkers: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkersRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkersResponse, + ] + """CountWorkers counts the number of workers in a specific namespace.""" + UpdateTaskQueueConfig: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateTaskQueueConfigRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateTaskQueueConfigResponse, @@ -882,11 +1038,13 @@ class WorkflowServiceStub: which uncouples the rate limit from the worker lifecycle. If the overall queue rate limit is unset, the worker-set rate limit takes effect. """ + FetchWorkerConfig: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.FetchWorkerConfigRequest, temporalio.api.workflowservice.v1.request_response_pb2.FetchWorkerConfigResponse, ] """FetchWorkerConfig returns the worker configuration for a specific worker.""" + UpdateWorkerConfig: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerConfigRequest, temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerConfigResponse, @@ -895,166 +1053,1748 @@ class WorkflowServiceStub: Can be used to partially update the worker configuration. Can be used to update the configuration of multiple workers. """ + DescribeWorker: grpc.UnaryUnaryMultiCallable[ temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerRequest, temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerResponse, ] """DescribeWorker returns information about the specified worker.""" -class WorkflowServiceServicer(metaclass=abc.ABCMeta): - """WorkflowService API defines how Temporal SDKs and other clients interact with the Temporal server - to create and interact with workflows and activities. + PauseWorkflowExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PauseWorkflowExecutionResponse, + ] + """Note: This is an experimental API and the behavior may change in a future release. + PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in + - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history + - No new workflow tasks or activity tasks are dispatched. + - Any workflow task currently executing on the worker will be allowed to complete. + - Any activity task currently executing will be paused. + - All server-side events will continue to be processed by the server. + - Queries & Updates on a paused workflow will be rejected. + """ - Users are expected to call `StartWorkflowExecution` to create a new workflow execution. + UnpauseWorkflowExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseWorkflowExecutionResponse, + ] + """Note: This is an experimental API and the behavior may change in a future release. + UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request. + Unpausing a workflow execution results in + - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history + - Workflow tasks and activity tasks are resumed. + """ - To drive workflows, a worker using a Temporal SDK must exist which regularly polls for workflow - and activity tasks from the service. For each workflow task, the sdk must process the - (incremental or complete) event history and respond back with any newly generated commands. + StartActivityExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.StartActivityExecutionResponse, + ] + """StartActivityExecution starts a new activity execution. - For each activity task, the worker is expected to execute the user's code which implements that - activity, responding with completion or failure. + Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace + unless permitted by the specified ID conflict policy. """ - @abc.abstractmethod - def RegisterNamespace( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.RegisterNamespaceRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.workflowservice.v1.request_response_pb2.RegisterNamespaceResponse - ): - """RegisterNamespace creates a new namespace which can be used as a container for all resources. + StartNexusOperationExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.StartNexusOperationExecutionResponse, + ] + """StartNexusOperationExecution starts a new Nexus operation. - A Namespace is a top level entity within Temporal, and is used as a container for resources - like workflow executions, task queues, etc. A Namespace acts as a sandbox and provides - isolation for all resources within the namespace. All resources belongs to exactly one - namespace. - """ - @abc.abstractmethod - def DescribeNamespace( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeNamespaceRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.workflowservice.v1.request_response_pb2.DescribeNamespaceResponse - ): - """DescribeNamespace returns the information and configuration for a registered namespace.""" - @abc.abstractmethod - def ListNamespaces( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.ListNamespacesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListNamespacesResponse: - """ListNamespaces returns the information and configuration for all namespaces.""" - @abc.abstractmethod - def UpdateNamespace( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateNamespaceRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateNamespaceResponse: - """UpdateNamespace is used to update the information and configuration of a registered - namespace. - """ - @abc.abstractmethod - def DeprecateNamespace( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.DeprecateNamespaceRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DeprecateNamespaceResponse: - """DeprecateNamespace is used to update the state of a registered namespace to DEPRECATED. + Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this + namespace unless permitted by the specified ID conflict policy. + """ - Once the namespace is deprecated it cannot be used to start new workflow executions. Existing - workflow executions will continue to run on deprecated namespaces. - Deprecated. + DescribeActivityExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeActivityExecutionResponse, + ] + """DescribeActivityExecution returns information about an activity execution. + It can be used to: + - Get current activity info without waiting + - Long-poll for next state change and return new activity info + Response can optionally include activity input or outcome (if the activity has completed). + """ - (-- api-linter: core::0127::http-annotation=disabled - aip.dev/not-precedent: Deprecated --) - """ - @abc.abstractmethod - def StartWorkflowExecution( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.StartWorkflowExecutionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.StartWorkflowExecutionResponse: - """StartWorkflowExecution starts a new workflow execution. + DescribeNexusOperationExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNexusOperationExecutionResponse, + ] + """DescribeNexusOperationExecution returns information about a Nexus operation. + Supported use cases include: + - Get current operation info without waiting + - Long-poll for next state change and return new operation info + Response can optionally include operation input or outcome (if the operation has completed). + """ - It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and - also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an - instance already exists with same workflow id. - """ - @abc.abstractmethod - def ExecuteMultiOperation( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.ExecuteMultiOperationRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ExecuteMultiOperationResponse: - """ExecuteMultiOperation executes multiple operations within a single workflow. + PollActivityExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityExecutionResponse, + ] + """PollActivityExecution long-polls for an activity execution to complete and returns the + outcome (result or failure). + """ - Operations are started atomically, meaning if *any* operation fails to be started, none are, - and the request fails. Upon start, the API returns only when *all* operations have a response. + PollNexusOperationExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusOperationExecutionResponse, + ] + """PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns + the outcome (result or failure). + """ - Upon failure, it returns `MultiOperationExecutionFailure` where the status code - equals the status code of the *first* operation that failed to be started. + ListActivityExecutions: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListActivityExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListActivityExecutionsResponse, + ] + """ListActivityExecutions is a visibility API to list activity executions in a specific namespace.""" - NOTE: Experimental API. - """ - @abc.abstractmethod - def GetWorkflowExecutionHistory( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryResponse: - """GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with - `NotFound` if the specified workflow execution is unknown to the service. - """ - @abc.abstractmethod - def GetWorkflowExecutionHistoryReverse( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryReverseRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryReverseResponse: - """GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse - order (starting from last event). Fails with`NotFound` if the specified workflow execution is - unknown to the service. - """ - @abc.abstractmethod - def PollWorkflowTaskQueue( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowTaskQueueRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowTaskQueueResponse: - """PollWorkflowTaskQueue is called by workers to make progress on workflows. + ListNexusOperationExecutions: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListNexusOperationExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListNexusOperationExecutionsResponse, + ] + """ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace.""" - A WorkflowTask is dispatched to callers for active workflow executions with pending workflow - tasks. The worker is expected to call `RespondWorkflowTaskCompleted` when it is done - processing the task. The service will create a `WorkflowTaskStarted` event in the history for - this task before handing it to the worker. + CountActivityExecutions: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountActivityExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CountActivityExecutionsResponse, + ] + """CountActivityExecutions is a visibility API to count activity executions in a specific namespace.""" - (-- api-linter: core::0127::http-annotation=disabled - aip.dev/not-precedent: We do not expose worker API to HTTP. --) - """ - @abc.abstractmethod - def RespondWorkflowTaskCompleted( - self, - request: temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskCompletedRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskCompletedResponse: - """RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks - they received from `PollWorkflowTaskQueue`. + CountNexusOperationExecutions: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountNexusOperationExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CountNexusOperationExecutionsResponse, + ] + """CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace.""" - Completing a WorkflowTask will write a `WORKFLOW_TASK_COMPLETED` event to the workflow's - history, along with events corresponding to whatever commands the SDK generated while - executing the task (ex timer started, activity task scheduled, etc). + RequestCancelActivityExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelActivityExecutionResponse, + ] + """RequestCancelActivityExecution requests cancellation of an activity execution. - (-- api-linter: core::0127::http-annotation=disabled - aip.dev/not-precedent: We do not expose worker API to HTTP. --) + Cancellation is cooperative: this call records the request, but the activity must detect and + acknowledge it for the activity to reach CANCELED status. The cancellation signal is + delivered via `cancel_requested` in the heartbeat response; SDKs surface this via + language-idiomatic mechanisms (context cancellation, exceptions, abort signals). + """ + + RequestCancelNexusOperationExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelNexusOperationExecutionResponse, + ] + """RequestCancelNexusOperationExecution requests cancellation of a Nexus operation. + + Requesting to cancel an operation does not automatically transition the operation to canceled status. + The operation will only transition to canceled status if it supports cancellation and the handler + processes the cancellation request. + """ + + TerminateActivityExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.TerminateActivityExecutionResponse, + ] + """TerminateActivityExecution terminates an existing activity execution immediately. + + Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a + running attempt. + """ + + DeleteActivityExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeleteActivityExecutionResponse, + ] + """DeleteActivityExecution asynchronously deletes a specific activity execution (when + ActivityExecution.run_id is provided) or the latest activity execution (when + ActivityExecution.run_id is not provided). If the activity Execution is running, it will be + terminated before deletion. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --) + """ + + PauseActivityExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityExecutionResponse, + ] + """PauseActivityExecution pauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity + + Pausing an activity means: + - If the activity is currently waiting for a retry or is running and subsequently fails, + it will not be rescheduled until it is unpaused. + - If the activity is already paused, calling this method will have no effect. + - If the activity is running and finishes successfully, the activity will be completed. + - If the activity is running and finishes with failure: + * if there is no retry left - the activity will be completed. + * if there are more retries left - the activity will be paused. + For long-running activities: + - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + + Returns a `NotFound` error if there is no pending activity with the provided ID + """ + + ResetActivityExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityExecutionResponse, + ] + """ResetActivityExecution resets the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + Resetting an activity means: + * number of attempts will be reset to 0. + * activity timeouts will be reset. + * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + it will be scheduled immediately (* see 'jitter' flag) + + Returns a `NotFound` error if there is no pending activity with the provided ID or type. + """ + + UnpauseActivityExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityExecutionResponse, + ] + """UnpauseActivityExecution unpauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + If activity is not paused, this call will have no effect. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Once the activity is unpaused, all timeout timers will be regenerated. + + Returns a `NotFound` error if there is no pending activity with the provided ID + """ + + UpdateActivityExecutionOptions: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityExecutionOptionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityExecutionOptionsResponse, + ] + """UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. + This API can be used to target a workflow activity or a standalone activity. + """ + + TerminateNexusOperationExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.TerminateNexusOperationExecutionResponse, + ] + """TerminateNexusOperationExecution terminates an existing Nexus operation immediately. + + Termination happens immediately and the operation handler cannot react to it. A terminated operation will have + its outcome set to a failure with a termination reason. + """ + + DeleteNexusOperationExecution: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeleteNexusOperationExecutionResponse, + ] + """DeleteNexusOperationExecution asynchronously deletes a specific Nexus operation run (when + run_id is provided) or the latest run (when run_id is not provided). If the operation + is running, it will be terminated before deletion. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Nexus operation deletion not exposed to HTTP, users should use cancel or terminate. --) + """ + + PollWorkflowExecutionTimeSkipping: grpc.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionTimeSkippingRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionTimeSkippingResponse, + ] + +class WorkflowServiceAsyncStub: + """WorkflowService API defines how Temporal SDKs and other clients interact with the Temporal server + to create and interact with workflows and activities. + + Users are expected to call `StartWorkflowExecution` to create a new workflow execution. + + To drive workflows, a worker using a Temporal SDK must exist which regularly polls for workflow + and activity tasks from the service. For each workflow task, the sdk must process the + (incremental or complete) event history and respond back with any newly generated commands. + + For each activity task, the worker is expected to execute the user's code which implements that + activity, responding with completion or failure. + """ + + RegisterNamespace: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RegisterNamespaceRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RegisterNamespaceResponse, + ] + """RegisterNamespace creates a new namespace which can be used as a container for all resources. + + A Namespace is a top level entity within Temporal, and is used as a container for resources + like workflow executions, task queues, etc. A Namespace acts as a sandbox and provides + isolation for all resources within the namespace. All resources belongs to exactly one + namespace. + """ + + DescribeNamespace: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNamespaceRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNamespaceResponse, + ] + """DescribeNamespace returns the information and configuration for a registered namespace.""" + + ListNamespaces: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListNamespacesRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListNamespacesResponse, + ] + """ListNamespaces returns the information and configuration for all namespaces.""" + + UpdateNamespace: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateNamespaceRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateNamespaceResponse, + ] + """UpdateNamespace is used to update the information and configuration of a registered + namespace. + """ + + DeprecateNamespace: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeprecateNamespaceRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeprecateNamespaceResponse, + ] + """DeprecateNamespace is used to update the state of a registered namespace to DEPRECATED. + + Once the namespace is deprecated it cannot be used to start new workflow executions. Existing + workflow executions will continue to run on deprecated namespaces. + Deprecated. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Deprecated --) + """ + + StartWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.StartWorkflowExecutionResponse, + ] + """StartWorkflowExecution starts a new workflow execution. + + It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and + also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an + instance already exists with same workflow id. + """ + + ExecuteMultiOperation: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ExecuteMultiOperationRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ExecuteMultiOperationResponse, + ] + """ExecuteMultiOperation executes multiple operations within a single workflow. + + Operations are started atomically, meaning if *any* operation fails to be started, none are, + and the request fails. Upon start, the API returns only when *all* operations have a response. + + Upon failure, it returns `MultiOperationExecutionFailure` where the status code + equals the status code of the *first* operation that failed to be started. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: To be exposed over HTTP in the future. --) + """ + + GetWorkflowExecutionHistory: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryResponse, + ] + """GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with + `NotFound` if the specified workflow execution is unknown to the service. + """ + + GetWorkflowExecutionHistoryReverse: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryReverseRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryReverseResponse, + ] + """GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse + order (starting from last event). Fails with`NotFound` if the specified workflow execution is + unknown to the service. + """ + + PollWorkflowTaskQueue: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowTaskQueueRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowTaskQueueResponse, + ] + """PollWorkflowTaskQueue is called by workers to make progress on workflows. + + A WorkflowTask is dispatched to callers for active workflow executions with pending workflow + tasks. The worker is expected to call `RespondWorkflowTaskCompleted` when it is done + processing the task. The service will create a `WorkflowTaskStarted` event in the history for + this task before handing it to the worker. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + RespondWorkflowTaskCompleted: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskCompletedRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskCompletedResponse, + ] + """RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks + they received from `PollWorkflowTaskQueue`. + + Completing a WorkflowTask will write a `WORKFLOW_TASK_COMPLETED` event to the workflow's + history, along with events corresponding to whatever commands the SDK generated while + executing the task (ex timer started, activity task scheduled, etc). + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + RespondWorkflowTaskFailed: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskFailedRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskFailedResponse, + ] + """RespondWorkflowTaskFailed is called by workers to indicate the processing of a workflow task + failed. + + This results in a `WORKFLOW_TASK_FAILED` event written to the history, and a new workflow + task will be scheduled. This API can be used to report unhandled failures resulting from + applying the workflow task. + + Temporal will only append first WorkflowTaskFailed event to the history of workflow execution + for consecutive failures. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + PollActivityTaskQueue: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityTaskQueueRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityTaskQueueResponse, + ] + """PollActivityTaskQueue is called by workers to process activity tasks from a specific task + queue. + + The worker is expected to call one of the `RespondActivityTaskXXX` methods when it is done + processing the task. + + An activity task is dispatched whenever a `SCHEDULE_ACTIVITY_TASK` command is produced during + workflow execution. An in memory `ACTIVITY_TASK_STARTED` event is written to mutable state + before the task is dispatched to the worker. The started event, and the final event + (`ACTIVITY_TASK_COMPLETED` / `ACTIVITY_TASK_FAILED` / `ACTIVITY_TASK_TIMED_OUT`) will both be + written permanently to Workflow execution history when Activity is finished. This is done to + avoid writing many events in the case of a failure/retry loop. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + RecordActivityTaskHeartbeat: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatResponse, + ] + """RecordActivityTaskHeartbeat is optionally called by workers while they execute activities. + + If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, + then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or + time out the activity. + + For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow + history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations, + in that event, the SDK should request cancellation of the activity. + + The request may contain response `details` which will be persisted by the server and may be + used by the activity to checkpoint progress. The `cancel_requested` field in the response + indicates whether cancellation has been requested for the activity. + """ + + RecordActivityTaskHeartbeatById: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatByIdRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatByIdResponse, + ] + """See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by + namespace/workflow id/activity id instead of task token. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "By" is used to indicate request type. --) + """ + + RespondActivityTaskCompleted: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedResponse, + ] + """RespondActivityTaskCompleted is called by workers when they successfully complete an activity + task. + + For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history + and a new workflow task created for the workflow. Fails with `NotFound` if the task token is + no longer valid due to activity timeout, already being completed, or never having existed. + """ + + RespondActivityTaskCompletedById: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedByIdRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedByIdResponse, + ] + """See `RespondActivityTaskCompleted`. This version allows clients to record completions by + namespace/workflow id/activity id instead of task token. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "By" is used to indicate request type. --) + """ + + RespondActivityTaskFailed: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedResponse, + ] + """RespondActivityTaskFailed is called by workers when processing an activity task fails. + + This results in a new `ACTIVITY_TASK_FAILED` event being written to the workflow history and + a new workflow task created for the workflow. Fails with `NotFound` if the task token is no + longer valid due to activity timeout, already being completed, or never having existed. + """ + + RespondActivityTaskFailedById: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedByIdRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedByIdResponse, + ] + """See `RecordActivityTaskFailed`. This version allows clients to record failures by + namespace/workflow id/activity id instead of task token. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "By" is used to indicate request type. --) + """ + + RespondActivityTaskCanceled: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledResponse, + ] + """RespondActivityTaskFailed is called by workers when processing an activity task fails. + + For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history + and a new workflow task created for the workflow. Fails with `NotFound` if the task token is + no longer valid due to activity timeout, already being completed, or never having existed. + """ + + RespondActivityTaskCanceledById: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledByIdRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledByIdResponse, + ] + """See `RespondActivityTaskCanceled`. This version allows clients to record failures by + namespace/workflow id/activity id instead of task token. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "By" is used to indicate request type. --) + """ + + RequestCancelWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelWorkflowExecutionResponse, + ] + """RequestCancelWorkflowExecution is called by workers when they want to request cancellation of + a workflow execution. + + This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the + workflow history and a new workflow task created for the workflow. It returns success if the requested + workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist. + """ + + SignalWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.SignalWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.SignalWorkflowExecutionResponse, + ] + """SignalWorkflowExecution is used to send a signal to a running workflow execution. + + This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow + task being created for the execution. + """ + + SignalWithStartWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse, + ] + """SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if + it isn't yet started. + + If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history + and a workflow task is generated. + + If the workflow is not running or not found, then the workflow is created with + `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a + workflow task is generated. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "With" is used to indicate combined operation. --) + """ + + ResetWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ResetWorkflowExecutionResponse, + ] + """ResetWorkflowExecution will reset an existing workflow execution to a specified + `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current + execution instance. "Exclusive" means the identified completed event itself is not replayed + in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed + immediately, and a new workflow task will be scheduled to retry it. + """ + + TerminateWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.TerminateWorkflowExecutionResponse, + ] + """TerminateWorkflowExecution terminates an existing workflow execution by recording a + `WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the + execution instance. + """ + + DeleteWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowExecutionResponse, + ] + """DeleteWorkflowExecution asynchronously deletes a specific Workflow Execution (when + WorkflowExecution.run_id is provided) or the latest Workflow Execution (when + WorkflowExecution.run_id is not provided). If the Workflow Execution is Running, it will be + terminated before deletion. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Workflow deletion not exposed to HTTP, users should use cancel or terminate. --) + """ + + ListOpenWorkflowExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListOpenWorkflowExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListOpenWorkflowExecutionsResponse, + ] + """ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) + """ + + ListClosedWorkflowExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListClosedWorkflowExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListClosedWorkflowExecutionsResponse, + ] + """ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) + """ + + ListWorkflowExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowExecutionsResponse, + ] + """ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.""" + + ListArchivedWorkflowExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListArchivedWorkflowExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListArchivedWorkflowExecutionsResponse, + ] + """ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.""" + + ScanWorkflowExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ScanWorkflowExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ScanWorkflowExecutionsResponse, + ] + """ScanWorkflowExecutions _was_ a visibility API to list large amount of workflow executions in a specific namespace without order. + It has since been deprecated in favor of `ListWorkflowExecutions` and rewritten to use `ListWorkflowExecutions` internally. + + Deprecated: Replaced with `ListWorkflowExecutions`. + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) + """ + + CountWorkflowExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkflowExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkflowExecutionsResponse, + ] + """CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.""" + + GetSearchAttributes: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetSearchAttributesRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetSearchAttributesResponse, + ] + """GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose this search attribute API to HTTP (but may expose on OperatorService). --) + """ + + RespondQueryTaskCompleted: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondQueryTaskCompletedRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondQueryTaskCompletedResponse, + ] + """RespondQueryTaskCompleted is called by workers to complete queries which were delivered on + the `query` (not `queries`) field of a `PollWorkflowTaskQueueResponse`. + + Completing the query will unblock the corresponding client call to `QueryWorkflow` and return + the query result a response. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + ResetStickyTaskQueue: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetStickyTaskQueueRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ResetStickyTaskQueueResponse, + ] + """ResetStickyTaskQueue resets the sticky task queue related information in the mutable state of + a given workflow. This is prudent for workers to perform if a workflow has been paged out of + their cache. + + Things cleared are: + 1. StickyTaskQueue + 2. StickyScheduleToStartTimeout + + When possible, ShutdownWorker should be preferred over + ResetStickyTaskQueue (particularly when a worker is shutting down or + cycling). + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + ShutdownWorker: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ShutdownWorkerRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ShutdownWorkerResponse, + ] + """ShutdownWorker is used to indicate that the given sticky task + queue is no longer being polled by its worker. Following the completion of + ShutdownWorker, newly-added workflow tasks will instead be placed + in the normal task queue, eligible for any worker to pick up. + + ShutdownWorker should be called by workers while shutting down, + after they've shut down their pollers. If another sticky poll + request is issued, the sticky task queue will be revived. + + As of Temporal Server v1.25.0, ShutdownWorker hasn't yet been implemented. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + QueryWorkflow: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.QueryWorkflowRequest, + temporalio.api.workflowservice.v1.request_response_pb2.QueryWorkflowResponse, + ] + """QueryWorkflow requests a query be executed for a specified workflow execution.""" + + DescribeWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowExecutionResponse, + ] + """DescribeWorkflowExecution returns information about the specified workflow execution.""" + + DescribeTaskQueue: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeTaskQueueRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeTaskQueueResponse, + ] + """DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID: + - List of pollers + - Workflow Reachability status + - Backlog info for Workflow and/or Activity tasks + """ + + GetClusterInfo: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetClusterInfoRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetClusterInfoResponse, + ] + """GetClusterInfo returns information about temporal cluster""" + + GetSystemInfo: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetSystemInfoRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetSystemInfoResponse, + ] + """GetSystemInfo returns information about the system.""" + + ListTaskQueuePartitions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListTaskQueuePartitionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListTaskQueuePartitionsResponse, + ] + """(-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose this low-level API to HTTP. --) + """ + + CreateSchedule: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateScheduleRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CreateScheduleResponse, + ] + """Creates a new schedule.""" + + DescribeSchedule: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeScheduleRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeScheduleResponse, + ] + """Returns the schedule description and current state of an existing schedule.""" + + UpdateSchedule: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateScheduleRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateScheduleResponse, + ] + """Changes the configuration or state of an existing schedule.""" + + PatchSchedule: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PatchScheduleRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PatchScheduleResponse, + ] + """Makes a specific change to a schedule or triggers an immediate action.""" + + ListScheduleMatchingTimes: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListScheduleMatchingTimesRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListScheduleMatchingTimesResponse, + ] + """Lists matching times within a range.""" + + DeleteSchedule: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteScheduleRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeleteScheduleResponse, + ] + """Deletes a schedule, removing it from the system.""" + + ListSchedules: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListSchedulesRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListSchedulesResponse, + ] + """List all schedules in a namespace.""" + + CountSchedules: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountSchedulesRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CountSchedulesResponse, + ] + """CountSchedules is a visibility API to count schedules in a specific namespace.""" + + UpdateWorkerBuildIdCompatibility: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerBuildIdCompatibilityRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerBuildIdCompatibilityResponse, + ] + """Deprecated. Use `UpdateWorkerVersioningRules`. + Will be removed in server version v1.32.0. + + Allows users to specify sets of worker build id versions on a per task queue basis. Versions + are ordered, and may be either compatible with some extant version, or a new incompatible + version, forming sets of ids which are incompatible with each other, but whose contained + members are compatible with one another. + + A single build id may be mapped to multiple task queues using this API for cases where a single process hosts + multiple workers. + + To query which workers can be retired, use the `GetWorkerTaskReachability` API. + + NOTE: The number of task queues mapped to a single build id is limited by the `limit.taskQueuesPerBuildId` + (default is 20), if this limit is exceeded this API will error with a FailedPrecondition. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) + """ + + GetWorkerBuildIdCompatibility: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerBuildIdCompatibilityRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerBuildIdCompatibilityResponse, + ] + """Deprecated. Use `GetWorkerVersioningRules`. + Will be removed in server version v1.32.0. + Fetches the worker build id versioning sets for a task queue. + """ + + UpdateWorkerVersioningRules: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerVersioningRulesRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerVersioningRulesResponse, + ] + """Use this API to manage Worker Versioning Rules for a given Task Queue. There are two types of + rules: Build ID Assignment rules and Compatible Build ID Redirect rules. + + Assignment rules determine how to assign new executions to a Build IDs. Their primary + use case is to specify the latest Build ID but they have powerful features for gradual rollout + of a new Build ID. + + Once a workflow execution is assigned to a Build ID and it completes its first Workflow Task, + the workflow stays on the assigned Build ID regardless of changes in assignment rules. This + eliminates the need for compatibility between versions when you only care about using the new + version for new workflows and let existing workflows finish in their own version. + + Activities, Child Workflows and Continue-as-New executions have the option to inherit the + Build ID of their parent/previous workflow or use the latest assignment rules to independently + select a Build ID. + + Redirect rules should only be used when you want to move workflows and activities assigned to + one Build ID (source) to another compatible Build ID (target). You are responsible to make sure + the target Build ID of a redirect rule is able to process event histories made by the source + Build ID by using [Patching](https://docs.temporal.io/workflows#patching) or other means. + + Will be removed in server version v1.32.0. + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) + """ + + GetWorkerVersioningRules: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerVersioningRulesRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerVersioningRulesResponse, + ] + """Fetches the Build ID assignment and redirect rules for a Task Queue. + Will be removed in server version v1.32.0. + """ + + GetWorkerTaskReachability: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerTaskReachabilityRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerTaskReachabilityResponse, + ] + """Deprecated. Use `DescribeTaskQueue`. + Will be removed in server version v1.32.0. + + Fetches task reachability to determine whether a worker may be retired. + The request may specify task queues to query for or let the server fetch all task queues mapped to the given + build IDs. + + When requesting a large number of task queues or all task queues associated with the given build ids in a + namespace, all task queues will be listed in the response but some of them may not contain reachability + information due to a server enforced limit. When reaching the limit, task queues that reachability information + could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue + another call to get the reachability for those task queues. + + Open source users can adjust this limit by setting the server's dynamic config value for + `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. + """ + + DescribeDeployment: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeDeploymentRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeDeploymentResponse, + ] + """Describes a worker deployment. + Deprecated. Replaced with `DescribeWorkerDeploymentVersion`. + """ + + DescribeWorkerDeploymentVersion: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentVersionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentVersionResponse, + ] + """Describes a worker deployment version.""" + + ListDeployments: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListDeploymentsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListDeploymentsResponse, + ] + """Lists worker deployments in the namespace. Optionally can filter based on deployment series + name. + Deprecated. Replaced with `ListWorkerDeployments`. + """ + + GetDeploymentReachability: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetDeploymentReachabilityRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetDeploymentReachabilityResponse, + ] + """Returns the reachability level of a worker deployment to help users decide when it is time + to decommission a deployment. Reachability level is calculated based on the deployment's + `status` and existing workflows that depend on the given deployment for their execution. + Calculating reachability is relatively expensive. Therefore, server might return a recently + cached value. In such a case, the `last_update_time` will inform you about the actual + reachability calculation time. + Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`. + """ + + GetCurrentDeployment: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetCurrentDeploymentRequest, + temporalio.api.workflowservice.v1.request_response_pb2.GetCurrentDeploymentResponse, + ] + """Returns the current deployment (and its info) for a given deployment series. + Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`. + """ + + SetCurrentDeployment: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.SetCurrentDeploymentRequest, + temporalio.api.workflowservice.v1.request_response_pb2.SetCurrentDeploymentResponse, + ] + """Sets a deployment as the current deployment for its deployment series. Can optionally update + the metadata of the deployment as well. + Deprecated. Replaced by `SetWorkerDeploymentCurrentVersion`. + """ + + SetWorkerDeploymentCurrentVersion: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentCurrentVersionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentCurrentVersionResponse, + ] + """Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping + Version if it is the Version being set as Current. + """ + + DescribeWorkerDeployment: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentResponse, + ] + """Describes a Worker Deployment.""" + + DeleteWorkerDeployment: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentResponse, + ] + """Deletes records of (an old) Deployment. A deployment can only be deleted if + it has no Version in it. + """ + + DeleteWorkerDeploymentVersion: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentVersionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentVersionResponse, + ] + """Used for manual deletion of Versions. User can delete a Version only when all the + following conditions are met: + - It is not the Current or Ramping Version of its Deployment. + - It has no active pollers (none of the task queues in the Version have pollers) + - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition + can be skipped by passing `skip-drainage=true`. + """ + + SetWorkerDeploymentRampingVersion: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentRampingVersionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentRampingVersionResponse, + ] + """Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for + gradual ramp to unversioned workers too. + """ + + ListWorkerDeployments: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkerDeploymentsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkerDeploymentsResponse, + ] + """Lists all Worker Deployments that are tracked in the Namespace.""" + + CreateWorkerDeployment: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentResponse, + ] + """Creates a new Worker Deployment. + + Experimental. This API might significantly change or be removed in a + future release. + """ + + CreateWorkerDeploymentVersion: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentVersionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentVersionResponse, + ] + """Creates a new Worker Deployment Version. + + Experimental. This API might significantly change or be removed in a + future release. + """ + + UpdateWorkerDeploymentVersionComputeConfig: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionComputeConfigRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionComputeConfigResponse, + ] + """Updates the compute config attached to a Worker Deployment Version. + Experimental. This API might significantly change or be removed in a future release. + """ + + ValidateWorkerDeploymentVersionComputeConfig: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ValidateWorkerDeploymentVersionComputeConfigRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ValidateWorkerDeploymentVersionComputeConfigResponse, + ] + """Validates the compute config without attaching it to a Worker Deployment Version. + Experimental. This API might significantly change or be removed in a future release. + """ + + UpdateWorkerDeploymentVersionMetadata: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionMetadataRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionMetadataResponse, + ] + """Updates the user-given metadata attached to a Worker Deployment Version.""" + + SetWorkerDeploymentManager: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentManagerRequest, + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentManagerResponse, + ] + """Set/unset the ManagerIdentity of a Worker Deployment. + Experimental. This API might significantly change or be removed in a future release. + """ + + UpdateWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionResponse, + ] + """Invokes the specified Update function on user Workflow code.""" + + PollWorkflowExecutionUpdate: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionUpdateRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionUpdateResponse, + ] + """Polls a Workflow Execution for the outcome of a Workflow Update + previously issued through the UpdateWorkflowExecution RPC. The effective + timeout on this call will be shorter of the the caller-supplied gRPC + timeout and the server's configured long-poll timeout. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We don't expose update polling API to HTTP in favor of a potential future non-blocking form. --) + """ + + StartBatchOperation: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartBatchOperationRequest, + temporalio.api.workflowservice.v1.request_response_pb2.StartBatchOperationResponse, + ] + """StartBatchOperation starts a new batch operation""" + + StopBatchOperation: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.StopBatchOperationRequest, + temporalio.api.workflowservice.v1.request_response_pb2.StopBatchOperationResponse, + ] + """StopBatchOperation stops a batch operation""" + + DescribeBatchOperation: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeBatchOperationRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeBatchOperationResponse, + ] + """DescribeBatchOperation returns the information about a batch operation""" + + ListBatchOperations: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListBatchOperationsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListBatchOperationsResponse, + ] + """ListBatchOperations returns a list of batch operations""" + + PollNexusTaskQueue: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueResponse, + ] + """PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks. + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + RespondNexusTaskCompleted: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskCompletedRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskCompletedResponse, + ] + """RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue. + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + RespondNexusTaskFailed: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskFailedRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskFailedResponse, + ] + """RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue. + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + UpdateActivityOptions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityOptionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityOptionsResponse, + ] + """UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. + If there are multiple pending activities of the provided type - all of them will be updated. + This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and + structured to work well for standalone activities. + """ + + UpdateWorkflowExecutionOptions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionOptionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionOptionsResponse, + ] + """UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution.""" + + PauseActivity: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityResponse, + ] + """PauseActivity pauses the execution of an activity specified by its ID or type. + If there are multiple pending activities of the provided type - all of them will be paused + + Pausing an activity means: + - If the activity is currently waiting for a retry or is running and subsequently fails, + it will not be rescheduled until it is unpaused. + - If the activity is already paused, calling this method will have no effect. + - If the activity is running and finishes successfully, the activity will be completed. + - If the activity is running and finishes with failure: + * if there is no retry left - the activity will be completed. + * if there are more retries left - the activity will be paused. + For long-running activities: + - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + - The activity should respond to the cancellation accordingly. + + Returns a `NotFound` error if there is no pending activity with the provided ID or type + This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and + structured to work well for standalone activities. + """ + + UnpauseActivity: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityResponse, + ] + """UnpauseActivity unpauses the execution of an activity specified by its ID or type. + If there are multiple pending activities of the provided type - all of them will be unpaused. + + If activity is not paused, this call will have no effect. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Once the activity is unpaused, all timeout timers will be regenerated. + + Flags: + 'jitter': the activity will be scheduled at a random time within the jitter duration. + 'reset_attempts': the number of attempts will be reset. + 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. + + Returns a `NotFound` error if there is no pending activity with the provided ID or type + This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and + structured to work well for standalone activities. + """ + + ResetActivity: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityResponse, + ] + """ResetActivity resets the execution of an activity specified by its ID or type. + If there are multiple pending activities of the provided type - all of them will be reset. + + Resetting an activity means: + * number of attempts will be reset to 0. + * activity timeouts will be reset. + * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + it will be scheduled immediately (* see 'jitter' flag), + + Flags: + + 'jitter': the activity will be scheduled at a random time within the jitter duration. + If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided. + 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset. + 'keep_paused': if the activity is paused, it will remain paused. + + Returns a `NotFound` error if there is no pending activity with the provided ID or type. + This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and + structured to work well for standalone activities. + """ + + CreateWorkflowRule: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkflowRuleRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkflowRuleResponse, + ] + """Create a new workflow rule. The rules are used to control the workflow execution. + The rule will be applied to all running and new workflows in the namespace. + If the rule with such ID already exist this call will fail + Note: the rules are part of namespace configuration and will be stored in the namespace config. + Namespace config is eventually consistent. + """ + + DescribeWorkflowRule: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowRuleRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowRuleResponse, + ] + """DescribeWorkflowRule return the rule specification for existing rule id. + If there is no rule with such id - NOT FOUND error will be returned. + """ + + DeleteWorkflowRule: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowRuleRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowRuleResponse, + ] + """Delete rule by rule id""" + + ListWorkflowRules: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowRulesRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowRulesResponse, + ] + """Return all namespace workflow rules""" + + TriggerWorkflowRule: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.TriggerWorkflowRuleRequest, + temporalio.api.workflowservice.v1.request_response_pb2.TriggerWorkflowRuleResponse, + ] + """TriggerWorkflowRule allows to: + * trigger existing rule for a specific workflow execution; + * trigger rule for a specific workflow execution without creating a rule; + This is useful for one-off operations. + """ + + RecordWorkerHeartbeat: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RecordWorkerHeartbeatRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RecordWorkerHeartbeatResponse, + ] + """WorkerHeartbeat receive heartbeat request from the worker.""" + + ListWorkers: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkersRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkersResponse, + ] + """ListWorkers is a visibility API to list worker status information in a specific namespace.""" + + CountWorkers: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkersRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkersResponse, + ] + """CountWorkers counts the number of workers in a specific namespace.""" + + UpdateTaskQueueConfig: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateTaskQueueConfigRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateTaskQueueConfigResponse, + ] + """Updates task queue configuration. + For the overall queue rate limit: the rate limit set by this api overrides the worker-set rate limit, + which uncouples the rate limit from the worker lifecycle. + If the overall queue rate limit is unset, the worker-set rate limit takes effect. + """ + + FetchWorkerConfig: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.FetchWorkerConfigRequest, + temporalio.api.workflowservice.v1.request_response_pb2.FetchWorkerConfigResponse, + ] + """FetchWorkerConfig returns the worker configuration for a specific worker.""" + + UpdateWorkerConfig: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerConfigRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerConfigResponse, + ] + """UpdateWorkerConfig updates the worker configuration of one or more workers. + Can be used to partially update the worker configuration. + Can be used to update the configuration of multiple workers. + """ + + DescribeWorker: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerResponse, + ] + """DescribeWorker returns information about the specified worker.""" + + PauseWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PauseWorkflowExecutionResponse, + ] + """Note: This is an experimental API and the behavior may change in a future release. + PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in + - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history + - No new workflow tasks or activity tasks are dispatched. + - Any workflow task currently executing on the worker will be allowed to complete. + - Any activity task currently executing will be paused. + - All server-side events will continue to be processed by the server. + - Queries & Updates on a paused workflow will be rejected. + """ + + UnpauseWorkflowExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseWorkflowExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseWorkflowExecutionResponse, + ] + """Note: This is an experimental API and the behavior may change in a future release. + UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request. + Unpausing a workflow execution results in + - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history + - Workflow tasks and activity tasks are resumed. + """ + + StartActivityExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.StartActivityExecutionResponse, + ] + """StartActivityExecution starts a new activity execution. + + Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace + unless permitted by the specified ID conflict policy. + """ + + StartNexusOperationExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.StartNexusOperationExecutionResponse, + ] + """StartNexusOperationExecution starts a new Nexus operation. + + Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this + namespace unless permitted by the specified ID conflict policy. + """ + + DescribeActivityExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeActivityExecutionResponse, + ] + """DescribeActivityExecution returns information about an activity execution. + It can be used to: + - Get current activity info without waiting + - Long-poll for next state change and return new activity info + Response can optionally include activity input or outcome (if the activity has completed). + """ + + DescribeNexusOperationExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNexusOperationExecutionResponse, + ] + """DescribeNexusOperationExecution returns information about a Nexus operation. + Supported use cases include: + - Get current operation info without waiting + - Long-poll for next state change and return new operation info + Response can optionally include operation input or outcome (if the operation has completed). + """ + + PollActivityExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityExecutionResponse, + ] + """PollActivityExecution long-polls for an activity execution to complete and returns the + outcome (result or failure). + """ + + PollNexusOperationExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusOperationExecutionResponse, + ] + """PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns + the outcome (result or failure). + """ + + ListActivityExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListActivityExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListActivityExecutionsResponse, + ] + """ListActivityExecutions is a visibility API to list activity executions in a specific namespace.""" + + ListNexusOperationExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListNexusOperationExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ListNexusOperationExecutionsResponse, + ] + """ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace.""" + + CountActivityExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountActivityExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CountActivityExecutionsResponse, + ] + """CountActivityExecutions is a visibility API to count activity executions in a specific namespace.""" + + CountNexusOperationExecutions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountNexusOperationExecutionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.CountNexusOperationExecutionsResponse, + ] + """CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace.""" + + RequestCancelActivityExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelActivityExecutionResponse, + ] + """RequestCancelActivityExecution requests cancellation of an activity execution. + + Cancellation is cooperative: this call records the request, but the activity must detect and + acknowledge it for the activity to reach CANCELED status. The cancellation signal is + delivered via `cancel_requested` in the heartbeat response; SDKs surface this via + language-idiomatic mechanisms (context cancellation, exceptions, abort signals). + """ + + RequestCancelNexusOperationExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelNexusOperationExecutionResponse, + ] + """RequestCancelNexusOperationExecution requests cancellation of a Nexus operation. + + Requesting to cancel an operation does not automatically transition the operation to canceled status. + The operation will only transition to canceled status if it supports cancellation and the handler + processes the cancellation request. + """ + + TerminateActivityExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.TerminateActivityExecutionResponse, + ] + """TerminateActivityExecution terminates an existing activity execution immediately. + + Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a + running attempt. + """ + + DeleteActivityExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeleteActivityExecutionResponse, + ] + """DeleteActivityExecution asynchronously deletes a specific activity execution (when + ActivityExecution.run_id is provided) or the latest activity execution (when + ActivityExecution.run_id is not provided). If the activity Execution is running, it will be + terminated before deletion. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --) + """ + + PauseActivityExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityExecutionResponse, + ] + """PauseActivityExecution pauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity + + Pausing an activity means: + - If the activity is currently waiting for a retry or is running and subsequently fails, + it will not be rescheduled until it is unpaused. + - If the activity is already paused, calling this method will have no effect. + - If the activity is running and finishes successfully, the activity will be completed. + - If the activity is running and finishes with failure: + * if there is no retry left - the activity will be completed. + * if there are more retries left - the activity will be paused. + For long-running activities: + - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + + Returns a `NotFound` error if there is no pending activity with the provided ID + """ + + ResetActivityExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityExecutionResponse, + ] + """ResetActivityExecution resets the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + Resetting an activity means: + * number of attempts will be reset to 0. + * activity timeouts will be reset. + * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + it will be scheduled immediately (* see 'jitter' flag) + + Returns a `NotFound` error if there is no pending activity with the provided ID or type. + """ + + UnpauseActivityExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityExecutionResponse, + ] + """UnpauseActivityExecution unpauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + If activity is not paused, this call will have no effect. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Once the activity is unpaused, all timeout timers will be regenerated. + + Returns a `NotFound` error if there is no pending activity with the provided ID + """ + + UpdateActivityExecutionOptions: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityExecutionOptionsRequest, + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityExecutionOptionsResponse, + ] + """UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. + This API can be used to target a workflow activity or a standalone activity. + """ + + TerminateNexusOperationExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.TerminateNexusOperationExecutionResponse, + ] + """TerminateNexusOperationExecution terminates an existing Nexus operation immediately. + + Termination happens immediately and the operation handler cannot react to it. A terminated operation will have + its outcome set to a failure with a termination reason. + """ + + DeleteNexusOperationExecution: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteNexusOperationExecutionRequest, + temporalio.api.workflowservice.v1.request_response_pb2.DeleteNexusOperationExecutionResponse, + ] + """DeleteNexusOperationExecution asynchronously deletes a specific Nexus operation run (when + run_id is provided) or the latest run (when run_id is not provided). If the operation + is running, it will be terminated before deletion. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Nexus operation deletion not exposed to HTTP, users should use cancel or terminate. --) + """ + + PollWorkflowExecutionTimeSkipping: grpc.aio.UnaryUnaryMultiCallable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionTimeSkippingRequest, + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionTimeSkippingResponse, + ] + +class WorkflowServiceServicer(metaclass=abc.ABCMeta): + """WorkflowService API defines how Temporal SDKs and other clients interact with the Temporal server + to create and interact with workflows and activities. + + Users are expected to call `StartWorkflowExecution` to create a new workflow execution. + + To drive workflows, a worker using a Temporal SDK must exist which regularly polls for workflow + and activity tasks from the service. For each workflow task, the sdk must process the + (incremental or complete) event history and respond back with any newly generated commands. + + For each activity task, the worker is expected to execute the user's code which implements that + activity, responding with completion or failure. + """ + + @abc.abstractmethod + def RegisterNamespace( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.RegisterNamespaceRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RegisterNamespaceResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RegisterNamespaceResponse + ], + ]: + """RegisterNamespace creates a new namespace which can be used as a container for all resources. + + A Namespace is a top level entity within Temporal, and is used as a container for resources + like workflow executions, task queues, etc. A Namespace acts as a sandbox and provides + isolation for all resources within the namespace. All resources belongs to exactly one + namespace. + """ + + @abc.abstractmethod + def DescribeNamespace( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeNamespaceRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNamespaceResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNamespaceResponse + ], + ]: + """DescribeNamespace returns the information and configuration for a registered namespace.""" + + @abc.abstractmethod + def ListNamespaces( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.ListNamespacesRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListNamespacesResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListNamespacesResponse + ], + ]: + """ListNamespaces returns the information and configuration for all namespaces.""" + + @abc.abstractmethod + def UpdateNamespace( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateNamespaceRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateNamespaceResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateNamespaceResponse + ], + ]: + """UpdateNamespace is used to update the information and configuration of a registered + namespace. + """ + + @abc.abstractmethod + def DeprecateNamespace( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.DeprecateNamespaceRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DeprecateNamespaceResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeprecateNamespaceResponse + ], + ]: + """DeprecateNamespace is used to update the state of a registered namespace to DEPRECATED. + + Once the namespace is deprecated it cannot be used to start new workflow executions. Existing + workflow executions will continue to run on deprecated namespaces. + Deprecated. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Deprecated --) + """ + + @abc.abstractmethod + def StartWorkflowExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.StartWorkflowExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.StartWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartWorkflowExecutionResponse + ], + ]: + """StartWorkflowExecution starts a new workflow execution. + + It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and + also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an + instance already exists with same workflow id. + """ + + @abc.abstractmethod + def ExecuteMultiOperation( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.ExecuteMultiOperationRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ExecuteMultiOperationResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ExecuteMultiOperationResponse + ], + ]: + """ExecuteMultiOperation executes multiple operations within a single workflow. + + Operations are started atomically, meaning if *any* operation fails to be started, none are, + and the request fails. Upon start, the API returns only when *all* operations have a response. + + Upon failure, it returns `MultiOperationExecutionFailure` where the status code + equals the status code of the *first* operation that failed to be started. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: To be exposed over HTTP in the future. --) + """ + + @abc.abstractmethod + def GetWorkflowExecutionHistory( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryResponse + ], + ]: + """GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with + `NotFound` if the specified workflow execution is unknown to the service. + """ + + @abc.abstractmethod + def GetWorkflowExecutionHistoryReverse( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryReverseRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryReverseResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkflowExecutionHistoryReverseResponse + ], + ]: + """GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse + order (starting from last event). Fails with`NotFound` if the specified workflow execution is + unknown to the service. + """ + + @abc.abstractmethod + def PollWorkflowTaskQueue( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowTaskQueueRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowTaskQueueResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowTaskQueueResponse + ], + ]: + """PollWorkflowTaskQueue is called by workers to make progress on workflows. + + A WorkflowTask is dispatched to callers for active workflow executions with pending workflow + tasks. The worker is expected to call `RespondWorkflowTaskCompleted` when it is done + processing the task. The service will create a `WorkflowTaskStarted` event in the history for + this task before handing it to the worker. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) + """ + + @abc.abstractmethod + def RespondWorkflowTaskCompleted( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskCompletedRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskCompletedResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskCompletedResponse + ], + ]: + """RespondWorkflowTaskCompleted is called by workers to successfully complete workflow tasks + they received from `PollWorkflowTaskQueue`. + + Completing a WorkflowTask will write a `WORKFLOW_TASK_COMPLETED` event to the workflow's + history, along with events corresponding to whatever commands the SDK generated while + executing the task (ex timer started, activity task scheduled, etc). + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + @abc.abstractmethod def RespondWorkflowTaskFailed( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskFailedRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskFailedResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskFailedResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondWorkflowTaskFailedResponse + ], + ]: """RespondWorkflowTaskFailed is called by workers to indicate the processing of a workflow task failed. @@ -1068,12 +2808,18 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + @abc.abstractmethod def PollActivityTaskQueue( self, request: temporalio.api.workflowservice.v1.request_response_pb2.PollActivityTaskQueueRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.PollActivityTaskQueueResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityTaskQueueResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityTaskQueueResponse + ], + ]: """PollActivityTaskQueue is called by workers to process activity tasks from a specific task queue. @@ -1090,110 +2836,171 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + @abc.abstractmethod def RecordActivityTaskHeartbeat( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatResponse + ], + ]: """RecordActivityTaskHeartbeat is optionally called by workers while they execute activities. - If worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, - then it will be marked as timed out and an `ACTIVITY_TASK_TIMED_OUT` event will be written to - the workflow history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in - such situations, in that event, the SDK should request cancellation of the activity. + If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, + then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or + time out the activity. + + For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow + history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations, + in that event, the SDK should request cancellation of the activity. + + The request may contain response `details` which will be persisted by the server and may be + used by the activity to checkpoint progress. The `cancel_requested` field in the response + indicates whether cancellation has been requested for the activity. """ + @abc.abstractmethod def RecordActivityTaskHeartbeatById( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatByIdRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatByIdResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatByIdResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RecordActivityTaskHeartbeatByIdResponse + ], + ]: """See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) """ + @abc.abstractmethod def RespondActivityTaskCompleted( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedResponse + ], + ]: """RespondActivityTaskCompleted is called by workers when they successfully complete an activity task. - This results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history + For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. """ + @abc.abstractmethod def RespondActivityTaskCompletedById( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedByIdRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedByIdResponse: - """See `RecordActivityTaskCompleted`. This version allows clients to record completions by + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedByIdResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCompletedByIdResponse + ], + ]: + """See `RespondActivityTaskCompleted`. This version allows clients to record completions by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) """ + @abc.abstractmethod def RespondActivityTaskFailed( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedResponse + ], + ]: """RespondActivityTaskFailed is called by workers when processing an activity task fails. This results in a new `ACTIVITY_TASK_FAILED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. """ + @abc.abstractmethod def RespondActivityTaskFailedById( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedByIdRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedByIdResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedByIdResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskFailedByIdResponse + ], + ]: """See `RecordActivityTaskFailed`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) """ + @abc.abstractmethod def RespondActivityTaskCanceled( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledResponse + ], + ]: """RespondActivityTaskFailed is called by workers when processing an activity task fails. - This results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history + For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. """ + @abc.abstractmethod def RespondActivityTaskCanceledById( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledByIdRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledByIdResponse: - """See `RecordActivityTaskCanceled`. This version allows clients to record failures by + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledByIdResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondActivityTaskCanceledByIdResponse + ], + ]: + """See `RespondActivityTaskCanceled`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) """ + @abc.abstractmethod def RequestCancelWorkflowExecution( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelWorkflowExecutionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelWorkflowExecutionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelWorkflowExecutionResponse + ], + ]: """RequestCancelWorkflowExecution is called by workers when they want to request cancellation of a workflow execution. @@ -1201,23 +3008,35 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): workflow history and a new workflow task created for the workflow. It returns success if the requested workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist. """ + @abc.abstractmethod def SignalWorkflowExecution( self, request: temporalio.api.workflowservice.v1.request_response_pb2.SignalWorkflowExecutionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.SignalWorkflowExecutionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.SignalWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.SignalWorkflowExecutionResponse + ], + ]: """SignalWorkflowExecution is used to send a signal to a running workflow execution. This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow task being created for the execution. """ + @abc.abstractmethod def SignalWithStartWorkflowExecution( self, request: temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse + ], + ]: """SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if it isn't yet started. @@ -1231,33 +3050,52 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "With" is used to indicate combined operation. --) """ + @abc.abstractmethod def ResetWorkflowExecution( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ResetWorkflowExecutionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ResetWorkflowExecutionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetWorkflowExecutionResponse + ], + ]: """ResetWorkflowExecution will reset an existing workflow execution to a specified `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current - execution instance. - TODO: Does exclusive here mean *just* the completed event, or also WFT started? Otherwise the task is doomed to time out? + execution instance. "Exclusive" means the identified completed event itself is not replayed + in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed + immediately, and a new workflow task will be scheduled to retry it. """ + @abc.abstractmethod def TerminateWorkflowExecution( self, request: temporalio.api.workflowservice.v1.request_response_pb2.TerminateWorkflowExecutionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.TerminateWorkflowExecutionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateWorkflowExecutionResponse + ], + ]: """TerminateWorkflowExecution terminates an existing workflow execution by recording a `WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the execution instance. """ + @abc.abstractmethod def DeleteWorkflowExecution( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowExecutionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowExecutionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowExecutionResponse + ], + ]: """DeleteWorkflowExecution asynchronously deletes a specific Workflow Execution (when WorkflowExecution.run_id is provided) or the latest Workflow Execution (when WorkflowExecution.run_id is not provided). If the Workflow Execution is Running, it will be @@ -1266,48 +3104,78 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: Workflow deletion not exposed to HTTP, users should use cancel or terminate. --) """ + @abc.abstractmethod def ListOpenWorkflowExecutions( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListOpenWorkflowExecutionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListOpenWorkflowExecutionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListOpenWorkflowExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListOpenWorkflowExecutionsResponse + ], + ]: """ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) """ + @abc.abstractmethod def ListClosedWorkflowExecutions( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListClosedWorkflowExecutionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListClosedWorkflowExecutionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListClosedWorkflowExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListClosedWorkflowExecutionsResponse + ], + ]: """ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) """ + @abc.abstractmethod def ListWorkflowExecutions( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowExecutionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowExecutionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowExecutionsResponse + ], + ]: """ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.""" + @abc.abstractmethod def ListArchivedWorkflowExecutions( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListArchivedWorkflowExecutionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListArchivedWorkflowExecutionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListArchivedWorkflowExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListArchivedWorkflowExecutionsResponse + ], + ]: """ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.""" + @abc.abstractmethod def ScanWorkflowExecutions( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ScanWorkflowExecutionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ScanWorkflowExecutionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ScanWorkflowExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ScanWorkflowExecutionsResponse + ], + ]: """ScanWorkflowExecutions _was_ a visibility API to list large amount of workflow executions in a specific namespace without order. It has since been deprecated in favor of `ListWorkflowExecutions` and rewritten to use `ListWorkflowExecutions` internally. @@ -1315,30 +3183,48 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: HTTP users should use ListWorkflowExecutions instead. --) """ + @abc.abstractmethod def CountWorkflowExecutions( self, request: temporalio.api.workflowservice.v1.request_response_pb2.CountWorkflowExecutionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.CountWorkflowExecutionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkflowExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkflowExecutionsResponse + ], + ]: """CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.""" + @abc.abstractmethod def GetSearchAttributes( self, request: temporalio.api.workflowservice.v1.request_response_pb2.GetSearchAttributesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetSearchAttributesResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetSearchAttributesResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetSearchAttributesResponse + ], + ]: """GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose this search attribute API to HTTP (but may expose on OperatorService). --) """ + @abc.abstractmethod def RespondQueryTaskCompleted( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondQueryTaskCompletedRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondQueryTaskCompletedResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondQueryTaskCompletedResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondQueryTaskCompletedResponse + ], + ]: """RespondQueryTaskCompleted is called by workers to complete queries which were delivered on the `query` (not `queries`) field of a `PollWorkflowTaskQueueResponse`. @@ -1348,12 +3234,18 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + @abc.abstractmethod def ResetStickyTaskQueue( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ResetStickyTaskQueueRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ResetStickyTaskQueueResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetStickyTaskQueueResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetStickyTaskQueueResponse + ], + ]: """ResetStickyTaskQueue resets the sticky task queue related information in the mutable state of a given workflow. This is prudent for workers to perform if a workflow has been paged out of their cache. @@ -1369,12 +3261,18 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + @abc.abstractmethod def ShutdownWorker( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ShutdownWorkerRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ShutdownWorkerResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ShutdownWorkerResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ShutdownWorkerResponse + ], + ]: """ShutdownWorker is used to indicate that the given sticky task queue is no longer being polled by its worker. Following the completion of ShutdownWorker, newly-added workflow tasks will instead be placed @@ -1389,114 +3287,208 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + @abc.abstractmethod def QueryWorkflow( self, request: temporalio.api.workflowservice.v1.request_response_pb2.QueryWorkflowRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.QueryWorkflowResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.QueryWorkflowResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.QueryWorkflowResponse + ], + ]: """QueryWorkflow requests a query be executed for a specified workflow execution.""" + @abc.abstractmethod def DescribeWorkflowExecution( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowExecutionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowExecutionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowExecutionResponse + ], + ]: """DescribeWorkflowExecution returns information about the specified workflow execution.""" + @abc.abstractmethod def DescribeTaskQueue( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeTaskQueueRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.workflowservice.v1.request_response_pb2.DescribeTaskQueueResponse - ): + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeTaskQueueResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeTaskQueueResponse + ], + ]: """DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID: - List of pollers - Workflow Reachability status - Backlog info for Workflow and/or Activity tasks """ + @abc.abstractmethod def GetClusterInfo( self, request: temporalio.api.workflowservice.v1.request_response_pb2.GetClusterInfoRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetClusterInfoResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetClusterInfoResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetClusterInfoResponse + ], + ]: """GetClusterInfo returns information about temporal cluster""" + @abc.abstractmethod def GetSystemInfo( self, request: temporalio.api.workflowservice.v1.request_response_pb2.GetSystemInfoRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetSystemInfoResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetSystemInfoResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetSystemInfoResponse + ], + ]: """GetSystemInfo returns information about the system.""" + @abc.abstractmethod def ListTaskQueuePartitions( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListTaskQueuePartitionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListTaskQueuePartitionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListTaskQueuePartitionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListTaskQueuePartitionsResponse + ], + ]: """(-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose this low-level API to HTTP. --) """ + @abc.abstractmethod def CreateSchedule( self, request: temporalio.api.workflowservice.v1.request_response_pb2.CreateScheduleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.CreateScheduleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateScheduleResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateScheduleResponse + ], + ]: """Creates a new schedule.""" + @abc.abstractmethod def DescribeSchedule( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeScheduleRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.workflowservice.v1.request_response_pb2.DescribeScheduleResponse - ): + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeScheduleResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeScheduleResponse + ], + ]: """Returns the schedule description and current state of an existing schedule.""" + @abc.abstractmethod def UpdateSchedule( self, request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateScheduleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateScheduleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateScheduleResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateScheduleResponse + ], + ]: """Changes the configuration or state of an existing schedule.""" + @abc.abstractmethod def PatchSchedule( self, request: temporalio.api.workflowservice.v1.request_response_pb2.PatchScheduleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.PatchScheduleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PatchScheduleResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PatchScheduleResponse + ], + ]: """Makes a specific change to a schedule or triggers an immediate action.""" + @abc.abstractmethod def ListScheduleMatchingTimes( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListScheduleMatchingTimesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListScheduleMatchingTimesResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListScheduleMatchingTimesResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListScheduleMatchingTimesResponse + ], + ]: """Lists matching times within a range.""" + @abc.abstractmethod def DeleteSchedule( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DeleteScheduleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DeleteScheduleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteScheduleResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteScheduleResponse + ], + ]: """Deletes a schedule, removing it from the system.""" + @abc.abstractmethod def ListSchedules( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListSchedulesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListSchedulesResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListSchedulesResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListSchedulesResponse + ], + ]: """List all schedules in a namespace.""" + + @abc.abstractmethod + def CountSchedules( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.CountSchedulesRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.CountSchedulesResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountSchedulesResponse + ], + ]: + """CountSchedules is a visibility API to count schedules in a specific namespace.""" + @abc.abstractmethod def UpdateWorkerBuildIdCompatibility( self, request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerBuildIdCompatibilityRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerBuildIdCompatibilityResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerBuildIdCompatibilityResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerBuildIdCompatibilityResponse + ], + ]: """Deprecated. Use `UpdateWorkerVersioningRules`. + Will be removed in server version v1.32.0. Allows users to specify sets of worker build id versions on a per task queue basis. Versions are ordered, and may be either compatible with some extant version, or a new incompatible @@ -1514,21 +3506,34 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) """ + @abc.abstractmethod def GetWorkerBuildIdCompatibility( self, request: temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerBuildIdCompatibilityRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerBuildIdCompatibilityResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerBuildIdCompatibilityResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerBuildIdCompatibilityResponse + ], + ]: """Deprecated. Use `GetWorkerVersioningRules`. + Will be removed in server version v1.32.0. Fetches the worker build id versioning sets for a task queue. """ + @abc.abstractmethod def UpdateWorkerVersioningRules( self, request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerVersioningRulesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerVersioningRulesResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerVersioningRulesResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerVersioningRulesResponse + ], + ]: """Use this API to manage Worker Versioning Rules for a given Task Queue. There are two types of rules: Build ID Assignment rules and Compatible Build ID Redirect rules. @@ -1550,26 +3555,39 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): the target Build ID of a redirect rule is able to process event histories made by the source Build ID by using [Patching](https://docs.temporal.io/workflows#patching) or other means. - WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. + Will be removed in server version v1.32.0. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do yet expose versioning API to HTTP. --) """ + @abc.abstractmethod def GetWorkerVersioningRules( self, request: temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerVersioningRulesRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerVersioningRulesResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerVersioningRulesResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerVersioningRulesResponse + ], + ]: """Fetches the Build ID assignment and redirect rules for a Task Queue. - WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. + Will be removed in server version v1.32.0. """ + @abc.abstractmethod def GetWorkerTaskReachability( self, request: temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerTaskReachabilityRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerTaskReachabilityResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerTaskReachabilityResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetWorkerTaskReachabilityResponse + ], + ]: """Deprecated. Use `DescribeTaskQueue`. + Will be removed in server version v1.32.0. Fetches task reachability to determine whether a worker may be retired. The request may specify task queues to query for or let the server fetch all task queues mapped to the given @@ -1584,165 +3602,308 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): Open source users can adjust this limit by setting the server's dynamic config value for `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. """ + @abc.abstractmethod def DescribeDeployment( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeDeploymentRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DescribeDeploymentResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeDeploymentResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeDeploymentResponse + ], + ]: """Describes a worker deployment. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `DescribeWorkerDeploymentVersion`. """ + @abc.abstractmethod def DescribeWorkerDeploymentVersion( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentVersionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentVersionResponse: - """Describes a worker deployment version. - Experimental. This API might significantly change or be removed in a future release. - """ + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentVersionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentVersionResponse + ], + ]: + """Describes a worker deployment version.""" + @abc.abstractmethod def ListDeployments( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListDeploymentsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListDeploymentsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListDeploymentsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListDeploymentsResponse + ], + ]: """Lists worker deployments in the namespace. Optionally can filter based on deployment series name. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `ListWorkerDeployments`. """ + @abc.abstractmethod def GetDeploymentReachability( self, request: temporalio.api.workflowservice.v1.request_response_pb2.GetDeploymentReachabilityRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetDeploymentReachabilityResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetDeploymentReachabilityResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetDeploymentReachabilityResponse + ], + ]: """Returns the reachability level of a worker deployment to help users decide when it is time to decommission a deployment. Reachability level is calculated based on the deployment's `status` and existing workflows that depend on the given deployment for their execution. Calculating reachability is relatively expensive. Therefore, server might return a recently cached value. In such a case, the `last_update_time` will inform you about the actual reachability calculation time. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`. """ + @abc.abstractmethod def GetCurrentDeployment( self, request: temporalio.api.workflowservice.v1.request_response_pb2.GetCurrentDeploymentRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.GetCurrentDeploymentResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.GetCurrentDeploymentResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.GetCurrentDeploymentResponse + ], + ]: """Returns the current deployment (and its info) for a given deployment series. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`. """ + @abc.abstractmethod def SetCurrentDeployment( self, request: temporalio.api.workflowservice.v1.request_response_pb2.SetCurrentDeploymentRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.SetCurrentDeploymentResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.SetCurrentDeploymentResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.SetCurrentDeploymentResponse + ], + ]: """Sets a deployment as the current deployment for its deployment series. Can optionally update the metadata of the deployment as well. - Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced by `SetWorkerDeploymentCurrentVersion`. """ + @abc.abstractmethod def SetWorkerDeploymentCurrentVersion( self, request: temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentCurrentVersionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentCurrentVersionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentCurrentVersionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentCurrentVersionResponse + ], + ]: """Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping Version if it is the Version being set as Current. - Experimental. This API might significantly change or be removed in a future release. """ + @abc.abstractmethod def DescribeWorkerDeployment( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentResponse: - """Describes a Worker Deployment. - Experimental. This API might significantly change or be removed in a future release. - """ + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerDeploymentResponse + ], + ]: + """Describes a Worker Deployment.""" + @abc.abstractmethod def DeleteWorkerDeployment( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentResponse + ], + ]: """Deletes records of (an old) Deployment. A deployment can only be deleted if it has no Version in it. - Experimental. This API might significantly change or be removed in a future release. """ + @abc.abstractmethod def DeleteWorkerDeploymentVersion( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentVersionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentVersionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentVersionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkerDeploymentVersionResponse + ], + ]: """Used for manual deletion of Versions. User can delete a Version only when all the following conditions are met: - It is not the Current or Ramping Version of its Deployment. - It has no active pollers (none of the task queues in the Version have pollers) - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition can be skipped by passing `skip-drainage=true`. - Experimental. This API might significantly change or be removed in a future release. """ + @abc.abstractmethod def SetWorkerDeploymentRampingVersion( self, request: temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentRampingVersionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentRampingVersionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentRampingVersionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentRampingVersionResponse + ], + ]: """Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for gradual ramp to unversioned workers too. - Experimental. This API might significantly change or be removed in a future release. """ + @abc.abstractmethod def ListWorkerDeployments( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListWorkerDeploymentsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListWorkerDeploymentsResponse: - """Lists all Worker Deployments that are tracked in the Namespace. + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkerDeploymentsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkerDeploymentsResponse + ], + ]: + """Lists all Worker Deployments that are tracked in the Namespace.""" + + @abc.abstractmethod + def CreateWorkerDeployment( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentResponse + ], + ]: + """Creates a new Worker Deployment. + + Experimental. This API might significantly change or be removed in a + future release. + """ + + @abc.abstractmethod + def CreateWorkerDeploymentVersion( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentVersionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentVersionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkerDeploymentVersionResponse + ], + ]: + """Creates a new Worker Deployment Version. + + Experimental. This API might significantly change or be removed in a + future release. + """ + + @abc.abstractmethod + def UpdateWorkerDeploymentVersionComputeConfig( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionComputeConfigRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionComputeConfigResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionComputeConfigResponse + ], + ]: + """Updates the compute config attached to a Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. """ + @abc.abstractmethod - def UpdateWorkerDeploymentVersionMetadata( + def ValidateWorkerDeploymentVersionComputeConfig( self, - request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionMetadataRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionMetadataResponse: - """Updates the user-given metadata attached to a Worker Deployment Version. + request: temporalio.api.workflowservice.v1.request_response_pb2.ValidateWorkerDeploymentVersionComputeConfigRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ValidateWorkerDeploymentVersionComputeConfigResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ValidateWorkerDeploymentVersionComputeConfigResponse + ], + ]: + """Validates the compute config without attaching it to a Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. """ + + @abc.abstractmethod + def UpdateWorkerDeploymentVersionMetadata( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionMetadataRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionMetadataResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerDeploymentVersionMetadataResponse + ], + ]: + """Updates the user-given metadata attached to a Worker Deployment Version.""" + @abc.abstractmethod def SetWorkerDeploymentManager( self, request: temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentManagerRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentManagerResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentManagerResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.SetWorkerDeploymentManagerResponse + ], + ]: """Set/unset the ManagerIdentity of a Worker Deployment. Experimental. This API might significantly change or be removed in a future release. """ + @abc.abstractmethod def UpdateWorkflowExecution( self, request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionResponse + ], + ]: """Invokes the specified Update function on user Workflow code.""" + @abc.abstractmethod def PollWorkflowExecutionUpdate( self, request: temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionUpdateRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionUpdateResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionUpdateResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionUpdateResponse + ], + ]: """Polls a Workflow Execution for the outcome of a Workflow Update previously issued through the UpdateWorkflowExecution RPC. The effective timeout on this call will be shorter of the the caller-supplied gRPC @@ -1751,86 +3912,148 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We don't expose update polling API to HTTP in favor of a potential future non-blocking form. --) """ + @abc.abstractmethod def StartBatchOperation( self, request: temporalio.api.workflowservice.v1.request_response_pb2.StartBatchOperationRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.StartBatchOperationResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.StartBatchOperationResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartBatchOperationResponse + ], + ]: """StartBatchOperation starts a new batch operation""" + @abc.abstractmethod def StopBatchOperation( self, request: temporalio.api.workflowservice.v1.request_response_pb2.StopBatchOperationRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.StopBatchOperationResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.StopBatchOperationResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.StopBatchOperationResponse + ], + ]: """StopBatchOperation stops a batch operation""" + @abc.abstractmethod def DescribeBatchOperation( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeBatchOperationRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DescribeBatchOperationResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeBatchOperationResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeBatchOperationResponse + ], + ]: """DescribeBatchOperation returns the information about a batch operation""" + @abc.abstractmethod def ListBatchOperations( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListBatchOperationsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListBatchOperationsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListBatchOperationsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListBatchOperationsResponse + ], + ]: """ListBatchOperations returns a list of batch operations""" + @abc.abstractmethod def PollNexusTaskQueue( self, request: temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueResponse + ], + ]: """PollNexusTaskQueue is a long poll call used by workers to receive Nexus tasks. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + @abc.abstractmethod def RespondNexusTaskCompleted( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskCompletedRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskCompletedResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskCompletedResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskCompletedResponse + ], + ]: """RespondNexusTaskCompleted is called by workers to respond to Nexus tasks received via PollNexusTaskQueue. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + @abc.abstractmethod def RespondNexusTaskFailed( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskFailedRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskFailedResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskFailedResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RespondNexusTaskFailedResponse + ], + ]: """RespondNexusTaskFailed is called by workers to fail Nexus tasks received via PollNexusTaskQueue. (-- api-linter: core::0127::http-annotation=disabled aip.dev/not-precedent: We do not expose worker API to HTTP. --) """ + @abc.abstractmethod def UpdateActivityOptions( self, request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityOptionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityOptionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityOptionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityOptionsResponse + ], + ]: """UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. If there are multiple pending activities of the provided type - all of them will be updated. + This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and + structured to work well for standalone activities. """ + @abc.abstractmethod def UpdateWorkflowExecutionOptions( self, request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionOptionsRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionOptionsResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionOptionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkflowExecutionOptionsResponse + ], + ]: """UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution.""" + @abc.abstractmethod def PauseActivity( self, request: temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityResponse + ], + ]: """PauseActivity pauses the execution of an activity specified by its ID or type. If there are multiple pending activities of the provided type - all of them will be paused @@ -1847,13 +4070,21 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): - The activity should respond to the cancellation accordingly. Returns a `NotFound` error if there is no pending activity with the provided ID or type + This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and + structured to work well for standalone activities. """ + @abc.abstractmethod def UnpauseActivity( self, request: temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityResponse + ], + ]: """UnpauseActivity unpauses the execution of an activity specified by its ID or type. If there are multiple pending activities of the provided type - all of them will be unpaused. @@ -1867,13 +4098,21 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type + This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and + structured to work well for standalone activities. """ + @abc.abstractmethod def ResetActivity( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityResponse + ], + ]: """ResetActivity resets the execution of an activity specified by its ID or type. If there are multiple pending activities of the provided type - all of them will be reset. @@ -1891,107 +4130,585 @@ class WorkflowServiceServicer(metaclass=abc.ABCMeta): 'keep_paused': if the activity is paused, it will remain paused. Returns a `NotFound` error if there is no pending activity with the provided ID or type. + This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and + structured to work well for standalone activities. """ + @abc.abstractmethod def CreateWorkflowRule( self, request: temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkflowRuleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkflowRuleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkflowRuleResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.CreateWorkflowRuleResponse + ], + ]: """Create a new workflow rule. The rules are used to control the workflow execution. The rule will be applied to all running and new workflows in the namespace. If the rule with such ID already exist this call will fail Note: the rules are part of namespace configuration and will be stored in the namespace config. Namespace config is eventually consistent. """ + @abc.abstractmethod def DescribeWorkflowRule( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowRuleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowRuleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowRuleResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkflowRuleResponse + ], + ]: """DescribeWorkflowRule return the rule specification for existing rule id. If there is no rule with such id - NOT FOUND error will be returned. """ + @abc.abstractmethod def DeleteWorkflowRule( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowRuleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowRuleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowRuleResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteWorkflowRuleResponse + ], + ]: """Delete rule by rule id""" + @abc.abstractmethod def ListWorkflowRules( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowRulesRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowRulesResponse - ): + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowRulesResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkflowRulesResponse + ], + ]: """Return all namespace workflow rules""" + @abc.abstractmethod def TriggerWorkflowRule( self, request: temporalio.api.workflowservice.v1.request_response_pb2.TriggerWorkflowRuleRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.TriggerWorkflowRuleResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.TriggerWorkflowRuleResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.TriggerWorkflowRuleResponse + ], + ]: """TriggerWorkflowRule allows to: * trigger existing rule for a specific workflow execution; * trigger rule for a specific workflow execution without creating a rule; This is useful for one-off operations. """ + @abc.abstractmethod def RecordWorkerHeartbeat( self, request: temporalio.api.workflowservice.v1.request_response_pb2.RecordWorkerHeartbeatRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.RecordWorkerHeartbeatResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RecordWorkerHeartbeatResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RecordWorkerHeartbeatResponse + ], + ]: """WorkerHeartbeat receive heartbeat request from the worker.""" + @abc.abstractmethod def ListWorkers( self, request: temporalio.api.workflowservice.v1.request_response_pb2.ListWorkersRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.ListWorkersResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkersResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListWorkersResponse + ], + ]: """ListWorkers is a visibility API to list worker status information in a specific namespace.""" + + @abc.abstractmethod + def CountWorkers( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.CountWorkersRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkersResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountWorkersResponse + ], + ]: + """CountWorkers counts the number of workers in a specific namespace.""" + @abc.abstractmethod def UpdateTaskQueueConfig( self, request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateTaskQueueConfigRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateTaskQueueConfigResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateTaskQueueConfigResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateTaskQueueConfigResponse + ], + ]: """Updates task queue configuration. For the overall queue rate limit: the rate limit set by this api overrides the worker-set rate limit, which uncouples the rate limit from the worker lifecycle. If the overall queue rate limit is unset, the worker-set rate limit takes effect. """ + @abc.abstractmethod def FetchWorkerConfig( self, request: temporalio.api.workflowservice.v1.request_response_pb2.FetchWorkerConfigRequest, - context: grpc.ServicerContext, - ) -> ( - temporalio.api.workflowservice.v1.request_response_pb2.FetchWorkerConfigResponse - ): + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.FetchWorkerConfigResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.FetchWorkerConfigResponse + ], + ]: """FetchWorkerConfig returns the worker configuration for a specific worker.""" + @abc.abstractmethod def UpdateWorkerConfig( self, request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerConfigRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerConfigResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerConfigResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateWorkerConfigResponse + ], + ]: """UpdateWorkerConfig updates the worker configuration of one or more workers. Can be used to partially update the worker configuration. Can be used to update the configuration of multiple workers. """ + @abc.abstractmethod def DescribeWorker( self, request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerRequest, - context: grpc.ServicerContext, - ) -> temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerResponse: + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeWorkerResponse + ], + ]: """DescribeWorker returns information about the specified worker.""" + @abc.abstractmethod + def PauseWorkflowExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.PauseWorkflowExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseWorkflowExecutionResponse + ], + ]: + """Note: This is an experimental API and the behavior may change in a future release. + PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in + - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history + - No new workflow tasks or activity tasks are dispatched. + - Any workflow task currently executing on the worker will be allowed to complete. + - Any activity task currently executing will be paused. + - All server-side events will continue to be processed by the server. + - Queries & Updates on a paused workflow will be rejected. + """ + + @abc.abstractmethod + def UnpauseWorkflowExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.UnpauseWorkflowExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseWorkflowExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseWorkflowExecutionResponse + ], + ]: + """Note: This is an experimental API and the behavior may change in a future release. + UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request. + Unpausing a workflow execution results in + - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history + - Workflow tasks and activity tasks are resumed. + """ + + @abc.abstractmethod + def StartActivityExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.StartActivityExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.StartActivityExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartActivityExecutionResponse + ], + ]: + """StartActivityExecution starts a new activity execution. + + Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace + unless permitted by the specified ID conflict policy. + """ + + @abc.abstractmethod + def StartNexusOperationExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.StartNexusOperationExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.StartNexusOperationExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.StartNexusOperationExecutionResponse + ], + ]: + """StartNexusOperationExecution starts a new Nexus operation. + + Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this + namespace unless permitted by the specified ID conflict policy. + """ + + @abc.abstractmethod + def DescribeActivityExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeActivityExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeActivityExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeActivityExecutionResponse + ], + ]: + """DescribeActivityExecution returns information about an activity execution. + It can be used to: + - Get current activity info without waiting + - Long-poll for next state change and return new activity info + Response can optionally include activity input or outcome (if the activity has completed). + """ + + @abc.abstractmethod + def DescribeNexusOperationExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.DescribeNexusOperationExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNexusOperationExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DescribeNexusOperationExecutionResponse + ], + ]: + """DescribeNexusOperationExecution returns information about a Nexus operation. + Supported use cases include: + - Get current operation info without waiting + - Long-poll for next state change and return new operation info + Response can optionally include operation input or outcome (if the operation has completed). + """ + + @abc.abstractmethod + def PollActivityExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.PollActivityExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollActivityExecutionResponse + ], + ]: + """PollActivityExecution long-polls for an activity execution to complete and returns the + outcome (result or failure). + """ + + @abc.abstractmethod + def PollNexusOperationExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.PollNexusOperationExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusOperationExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollNexusOperationExecutionResponse + ], + ]: + """PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns + the outcome (result or failure). + """ + + @abc.abstractmethod + def ListActivityExecutions( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.ListActivityExecutionsRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListActivityExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListActivityExecutionsResponse + ], + ]: + """ListActivityExecutions is a visibility API to list activity executions in a specific namespace.""" + + @abc.abstractmethod + def ListNexusOperationExecutions( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.ListNexusOperationExecutionsRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ListNexusOperationExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ListNexusOperationExecutionsResponse + ], + ]: + """ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace.""" + + @abc.abstractmethod + def CountActivityExecutions( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.CountActivityExecutionsRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.CountActivityExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountActivityExecutionsResponse + ], + ]: + """CountActivityExecutions is a visibility API to count activity executions in a specific namespace.""" + + @abc.abstractmethod + def CountNexusOperationExecutions( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.CountNexusOperationExecutionsRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.CountNexusOperationExecutionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.CountNexusOperationExecutionsResponse + ], + ]: + """CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace.""" + + @abc.abstractmethod + def RequestCancelActivityExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelActivityExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelActivityExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelActivityExecutionResponse + ], + ]: + """RequestCancelActivityExecution requests cancellation of an activity execution. + + Cancellation is cooperative: this call records the request, but the activity must detect and + acknowledge it for the activity to reach CANCELED status. The cancellation signal is + delivered via `cancel_requested` in the heartbeat response; SDKs surface this via + language-idiomatic mechanisms (context cancellation, exceptions, abort signals). + """ + + @abc.abstractmethod + def RequestCancelNexusOperationExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelNexusOperationExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelNexusOperationExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.RequestCancelNexusOperationExecutionResponse + ], + ]: + """RequestCancelNexusOperationExecution requests cancellation of a Nexus operation. + + Requesting to cancel an operation does not automatically transition the operation to canceled status. + The operation will only transition to canceled status if it supports cancellation and the handler + processes the cancellation request. + """ + + @abc.abstractmethod + def TerminateActivityExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.TerminateActivityExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateActivityExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateActivityExecutionResponse + ], + ]: + """TerminateActivityExecution terminates an existing activity execution immediately. + + Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a + running attempt. + """ + + @abc.abstractmethod + def DeleteActivityExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.DeleteActivityExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteActivityExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteActivityExecutionResponse + ], + ]: + """DeleteActivityExecution asynchronously deletes a specific activity execution (when + ActivityExecution.run_id is provided) or the latest activity execution (when + ActivityExecution.run_id is not provided). If the activity Execution is running, it will be + terminated before deletion. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --) + """ + + @abc.abstractmethod + def PauseActivityExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PauseActivityExecutionResponse + ], + ]: + """PauseActivityExecution pauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity + + Pausing an activity means: + - If the activity is currently waiting for a retry or is running and subsequently fails, + it will not be rescheduled until it is unpaused. + - If the activity is already paused, calling this method will have no effect. + - If the activity is running and finishes successfully, the activity will be completed. + - If the activity is running and finishes with failure: + * if there is no retry left - the activity will be completed. + * if there are more retries left - the activity will be paused. + For long-running activities: + - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + + Returns a `NotFound` error if there is no pending activity with the provided ID + """ + + @abc.abstractmethod + def ResetActivityExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.ResetActivityExecutionResponse + ], + ]: + """ResetActivityExecution resets the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + Resetting an activity means: + * number of attempts will be reset to 0. + * activity timeouts will be reset. + * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + it will be scheduled immediately (* see 'jitter' flag) + + Returns a `NotFound` error if there is no pending activity with the provided ID or type. + """ + + @abc.abstractmethod + def UnpauseActivityExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UnpauseActivityExecutionResponse + ], + ]: + """UnpauseActivityExecution unpauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + If activity is not paused, this call will have no effect. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Once the activity is unpaused, all timeout timers will be regenerated. + + Returns a `NotFound` error if there is no pending activity with the provided ID + """ + + @abc.abstractmethod + def UpdateActivityExecutionOptions( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityExecutionOptionsRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityExecutionOptionsResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.UpdateActivityExecutionOptionsResponse + ], + ]: + """UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. + This API can be used to target a workflow activity or a standalone activity. + """ + + @abc.abstractmethod + def TerminateNexusOperationExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.TerminateNexusOperationExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateNexusOperationExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.TerminateNexusOperationExecutionResponse + ], + ]: + """TerminateNexusOperationExecution terminates an existing Nexus operation immediately. + + Termination happens immediately and the operation handler cannot react to it. A terminated operation will have + its outcome set to a failure with a termination reason. + """ + + @abc.abstractmethod + def DeleteNexusOperationExecution( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.DeleteNexusOperationExecutionRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteNexusOperationExecutionResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.DeleteNexusOperationExecutionResponse + ], + ]: + """DeleteNexusOperationExecution asynchronously deletes a specific Nexus operation run (when + run_id is provided) or the latest run (when run_id is not provided). If the operation + is running, it will be terminated before deletion. + + (-- api-linter: core::0127::http-annotation=disabled + aip.dev/not-precedent: Nexus operation deletion not exposed to HTTP, users should use cancel or terminate. --) + """ + + @abc.abstractmethod + def PollWorkflowExecutionTimeSkipping( + self, + request: temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionTimeSkippingRequest, + context: _ServicerContext, + ) -> typing.Union[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionTimeSkippingResponse, + collections.abc.Awaitable[ + temporalio.api.workflowservice.v1.request_response_pb2.PollWorkflowExecutionTimeSkippingResponse + ], + ]: ... + def add_WorkflowServiceServicer_to_server( - servicer: WorkflowServiceServicer, server: grpc.Server + servicer: WorkflowServiceServicer, + server: typing.Union[grpc.Server, grpc.aio.Server], ) -> None: ... diff --git a/temporalio/bridge/Cargo.lock b/temporalio/bridge/Cargo.lock index 4a971e6fa9..17055a9764 100644 --- a/temporalio/bridge/Cargo.lock +++ b/temporalio/bridge/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -19,49 +10,34 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - [[package]] name = "anstyle" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anyhow" -version = "1.0.99" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" - -[[package]] -name = "arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -dependencies = [ - "derive_arbitrary", -] +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "async-trait" -version = "0.1.89" +version = "0.1.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", ] [[package]] @@ -72,15 +48,55 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "aws-lc-fips-sys" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b744eed18cd75d814effdf2aba2880f912abe0fe1c327b361341d31aba9a7005" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", + "regex", +] + +[[package]] +name = "aws-lc-rs" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "048006790404103c488e6c5616b3e7e702a71292aadda08e8f7698a9e0d2eb53" +dependencies = [ + "aws-lc-fips-sys", + "aws-lc-sys", + "untrusted 0.7.1", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bfbe32ac36b3c428696ce315464181bc4029d689fd58e3f2a4e58c252242f52" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] [[package]] name = "axum" -version = "0.8.4" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" dependencies = [ "axum-core", "bytes", @@ -94,8 +110,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rustversion", - "serde", + "serde_core", "sync_wrapper", "tower", "tower-layer", @@ -104,9 +119,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.5.2" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", @@ -115,129 +130,203 @@ dependencies = [ "http-body-util", "mime", "pin-project-lite", - "rustversion", "sync_wrapper", "tower-layer", "tower-service", ] [[package]] -name = "backoff" -version = "0.4.0" +name = "backon" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +checksum = "cffb0e931875b666fc4fcb20fee52e9bbd1ef836fd9e9e04ec21555f9f85f7ef" dependencies = [ - "getrandom 0.2.16", - "instant", - "rand 0.8.5", + "fastrand", ] [[package]] -name = "backtrace" -version = "0.3.75" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64" -version = "0.22.1" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + +[[package]] +name = "bindgen" +version = "0.73.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "787ef8ef523575546b106a58213d6e6b06198a05c2f757258c68a74273670cfa" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "log", + "prettyplease 0.3.0", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 3.0.10", +] [[package]] name = "bitflags" -version = "2.9.2" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a65b545ab31d687cff52899d4890855fec459eb6afe0da6417b8a18da87aa29" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" [[package]] name = "bon" -version = "3.8.1" +version = "3.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebeb9aaf9329dff6ceb65c689ca3db33dbf15f324909c60e4e5eef5701ce31b1" +checksum = "a05442cd7005532d0cfedec676b5b9333d2b4c7c3afabe2b1a9ce2742fbe2ee6" dependencies = [ "bon-macros", - "rustversion", ] [[package]] name = "bon-macros" -version = "3.8.1" +version = "3.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e9d642a7e3a318e37c2c9427b5a6a48aa1ad55dcd986f3034ab2239045a645" +checksum = "93833e97ac7c46ba97045afcf247238c27057538fcf2f06344662ddd5f567be6" dependencies = [ "darling", "ident_case", - "prettyplease", + "prettyplease 0.3.0", "proc-macro2", "quote", - "rustversion", - "syn", + "syn 3.0.10", ] [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" [[package]] name = "bytes" -version = "1.10.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "bzip2" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea8dcd42434048e4f7a304411d9273a411f647446c1234a65ce0554923f4cff" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" dependencies = [ "libbz2-rs-sys", ] [[package]] name = "cc" -version = "1.2.33" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee0f8803222ba5a7e2777dd72ca451868909b1ac410621b676adf07280e9b5f" +checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" [[package]] name = "cfg_aliases" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.1", +] [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ "num-traits", "serde", ] +[[package]] +name = "clang-sys" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "constant_time_eq" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eb6feb175df65d0a3ccd3e73484e940d0ac664e8034f0519fd49a93db3071d9" +dependencies = [ + "rustversion", +] + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.10.1" @@ -255,43 +344,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] -name = "crc32fast" -version = "1.5.0" +name = "cpufeatures" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" dependencies = [ - "cfg-if", + "libc", ] [[package]] -name = "crossbeam-channel" -version = "0.5.15" +name = "crc32fast" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64" dependencies = [ - "crossbeam-utils", + "cfg-if", ] [[package]] -name = "crossbeam-queue" -version = "0.3.12" +name = "crossbeam-channel" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" [[package]] name = "darling" -version = "0.21.3" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" dependencies = [ "darling_core", "darling_macro", @@ -299,80 +388,56 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.21.3" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" dependencies = [ - "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn", + "syn 3.0.10", ] [[package]] name = "darling_macro" -version = "0.21.3" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" dependencies = [ "darling_core", "quote", - "syn", -] - -[[package]] -name = "dashmap" -version = "6.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "derive_arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "syn 3.0.10", ] [[package]] name = "derive_more" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ + "convert_case", "proc-macro2", "quote", - "syn", + "rustc_version", + "syn 2.0.119", "unicode-xid", ] [[package]] name = "dirs" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f" dependencies = [ "dirs-sys", ] @@ -386,18 +451,18 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", ] [[package]] @@ -406,6 +471,12 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.20" @@ -414,28 +485,28 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "either" -version = "1.15.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "enum-iterator" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c280b9e6b3ae19e152d8e31cf47f18389781e119d4013a2a2bb0180e5facc635" +checksum = "a4549325971814bda7a44061bf3fe7e487d447cba01e4220a4b454d630d7a016" dependencies = [ "enum-iterator-derive", ] [[package]] name = "enum-iterator-derive" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +checksum = "685adfa4d6f3d765a26bc5dbc936577de9abf756c1feeb3089b01dd395034842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -447,68 +518,73 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "equivalent" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" [[package]] name = "erased-serde" -version = "0.4.6" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e004d887f51fcb9fef17317a2f3525c887d8aa3f4f50fed920816a688284a5b7" +checksum = "1e59b668157f32d3459d4bd634861a06ffa2503a461ca5f0916b9f0252605e66" dependencies = [ "serde", + "serde_core", "typeid", ] [[package]] name = "errno" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "fastrand" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" [[package]] name = "filetime" -version = "0.2.25" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" dependencies = [ "cfg-if", "libc", - "libredox", - "windows-sys 0.59.0", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + [[package]] name = "fixedbitset" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" +checksum = "5905ec755cc8386d7928353e4d356d2be3e89e81e5ca01fe630a1ca4d08dc175" [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4" dependencies = [ "crc32fast", - "libz-rs-sys", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -523,26 +599,41 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] [[package]] name = "fragile" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" +checksum = "8878864ba14bb86e818a412bfd6f18f9eabd4ec0f008a28e8f7eb61db532fcf9" +dependencies = [ + "futures-core", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" dependencies = [ "futures-channel", "futures-core", @@ -555,9 +646,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" dependencies = [ "futures-core", "futures-sink", @@ -565,15 +656,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" dependencies = [ "futures-core", "futures-task", @@ -582,19 +673,19 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", ] [[package]] @@ -610,27 +701,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" [[package]] name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-timer" -version = "3.0.3" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" dependencies = [ "futures-channel", "futures-core", @@ -640,81 +725,69 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] [[package]] name = "gethostname" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc257fdb4038301ce4b9cd1b3b51704509692bb3ff716a410cbd07925d9dae55" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ "rustix", - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", - "r-efi", - "wasi 0.14.2+wasi-0.2.4", - "wasm-bindgen", + "r-efi 5.3.0", + "wasip2", ] [[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "governor" -version = "0.10.1" +name = "getrandom" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444405bbb1a762387aa22dd569429533b54a1d8759d35d3b64cb39b0293eaa19" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", - "dashmap", - "futures-sink", - "futures-timer", - "futures-util", - "getrandom 0.3.3", - "hashbrown 0.15.5", - "nonzero_ext", - "parking_lot", - "portable-atomic", - "quanta", - "rand 0.9.2", - "smallvec", - "spinning_top", - "web-time", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasm-bindgen", ] +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + [[package]] name = "h2" -version = "0.4.12" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118" dependencies = [ "atomic-waker", "bytes", @@ -731,19 +804,20 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash 0.1.5", +] [[package]] name = "hashbrown" -version = "0.15.5" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", + "foldhash 0.2.0", ] [[package]] @@ -754,20 +828,19 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "http" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" dependencies = [ "bytes", - "fnv", "itoa", ] [[package]] name = "http-body" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", "http", @@ -775,9 +848,9 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" dependencies = [ "bytes", "futures-core", @@ -800,9 +873,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.7.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" dependencies = [ "atomic-waker", "bytes", @@ -815,7 +888,6 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", "want", @@ -823,16 +895,14 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.7" +version = "0.27.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" dependencies = [ "http", "hyper", "hyper-util", "rustls", - "rustls-native-certs", - "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", @@ -853,23 +923,23 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.16" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" dependencies = [ - "base64", + "base64 0.23.1", "bytes", "futures-channel", - "futures-core", "futures-util", "http", "http-body", + "httparse", "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.0", + "socket2", "tokio", "tower-service", "tracing", @@ -877,12 +947,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -890,9 +961,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" dependencies = [ "displaydoc", "litemap", @@ -903,11 +974,10 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -918,42 +988,39 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" [[package]] name = "icu_properties" -version = "2.0.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" dependencies = [ "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", - "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" [[package]] name = "icu_provider" -version = "2.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" dependencies = [ "displaydoc", "icu_locale_core", - "stable_deref_trait", - "tinystr", "writeable", "yoke", "zerofrom", @@ -969,9 +1036,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -980,9 +1047,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -990,180 +1057,201 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", - "hashbrown 0.15.5", + "hashbrown 0.17.1", ] [[package]] -name = "indoc" -version = "2.0.6" +name = "inventory" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" +dependencies = [ + "rustversion", +] [[package]] -name = "instant" -version = "0.1.13" +name = "ipnet" +version = "2.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" [[package]] -name = "inventory" -version = "0.3.20" +name = "itertools" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab08d7cd2c5897f2c949e5383ea7c7db03fb19130ffcfbf7eda795137ae3cb83" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ - "rustversion", + "either", ] [[package]] -name = "io-uring" -version = "0.7.9" +name = "itertools" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc" dependencies = [ - "bitflags", - "cfg-if", - "libc", + "either", ] [[package]] -name = "ipnet" -version = "2.11.0" +name = "itoa" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" [[package]] -name = "iri-string" -version = "0.7.8" +name = "jni" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" dependencies = [ - "memchr", - "serde", + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror", + "walkdir", + "windows-link", ] [[package]] -name = "itertools" -version = "0.14.0" +name = "jni-macros" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" dependencies = [ - "either", + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", ] [[package]] -name = "itoa" -version = "1.0.15" +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.4.3", "libc", ] [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" dependencies = [ - "once_cell", + "cfg-if", + "futures-util", "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" [[package]] name = "libbz2-rs-sys" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" +checksum = "32f454fd6831a29c0e827ed075bca2a15be201bd57f4168f0fd1041124eab17e" [[package]] name = "libc" -version = "0.2.175" +version = "0.2.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" [[package]] -name = "libredox" -version = "0.1.9" +name = "libloading" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ - "bitflags", - "libc", - "redox_syscall", + "cfg-if", + "windows-link", ] [[package]] -name = "libz-rs-sys" -version = "0.5.2" +name = "libredox" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" dependencies = [ - "zlib-rs", + "libc", ] [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" [[package]] name = "lock_api" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.27" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" [[package]] name = "lru" -version = "0.16.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ea4e65087ff52f3862caff188d489f1fab49a0cb09e01b2e3f1a617b10aaed" +checksum = "4a9f71e3591c7ec44d3e563e87bf14ddc2bada8519dca046e5b0e560cd004e2d" dependencies = [ - "hashbrown 0.15.5", + "hashbrown 0.17.1", ] [[package]] name = "lru-slab" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" +checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" [[package]] name = "matchers" @@ -1182,50 +1270,48 @@ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "memchr" -version = "2.7.5" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] -name = "memoffset" -version = "0.9.1" +name = "mime" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] +checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1" [[package]] -name = "mime" -version = "0.3.17" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.9" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" dependencies = [ "adler2", + "simd-adler32", ] [[package]] name = "mio" -version = "1.0.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +checksum = "20521a903f02b0a573cd6840e9d0a5a0cc043d361fe924092cd70f8556cc9c4a" dependencies = [ "libc", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", + "wasi", + "windows-sys 0.61.2", ] [[package]] name = "mockall" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a6bfcc6c8c7eed5ee98b9c3e33adc726054389233e201c95dab2d41a3839d2" +checksum = "f58d964098a5f9c6b63d0798e5372fd04708193510a7af313c22e9f29b7b620b" dependencies = [ "cfg-if", "downcast", @@ -1237,14 +1323,14 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ca3004c2efe9011bd4e461bd8256445052b9615405b4f7ea43fc8ca5c20898" +checksum = "ca41ce716dda6a9be188b385aa78ee5260fc25cd3802cb2a8afdc6afbe6b6dbf" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -1254,27 +1340,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" [[package]] -name = "nonzero_ext" -version = "0.3.0" +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] [[package]] name = "ntapi" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" dependencies = [ "winapi", ] [[package]] name = "nu-ansi-term" -version = "0.50.1" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1288,63 +1390,53 @@ dependencies = [ [[package]] name = "objc2-core-foundation" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags", ] [[package]] name = "objc2-io-kit" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71c1c64d6120e51cd86033f67176b1cb66780c2efe34dec55176f77befd93c0a" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" dependencies = [ "libc", "objc2-core-foundation", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "openssl-probe" -version = "0.1.6" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1" [[package]] name = "opentelemetry" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bcd6ae87133e903af7ef497404dda70c60d0ea14895fc8a5e6722754fc2a0" +checksum = "b0142c63252a9e054e68a4c61a5778f7b14f576274d593f8ce883d191a099682" dependencies = [ "futures-core", "futures-sink", "js-sys", "pin-project-lite", - "thiserror 2.0.15", - "tracing", + "thiserror", ] [[package]] name = "opentelemetry-http" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a6d09a73194e6b66df7c8f1b680f156d916a1a942abf2de06823dd02b7855d" +checksum = "5683015d09e2df236ef005b17f6f196f0d5f6313c4fa43a7b6a53b52776e4331" dependencies = [ "async-trait", "bytes", @@ -1355,9 +1447,9 @@ dependencies = [ [[package]] name = "opentelemetry-otlp" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2366db2dca4d2ad033cad11e6ee42844fd727007af5ad04a1730f4cb8163bf" +checksum = "9966929966d17620d7c316c643ba62631826e10021409357772d5eea84f62c35" dependencies = [ "http", "opentelemetry", @@ -1366,17 +1458,17 @@ dependencies = [ "opentelemetry_sdk", "prost", "reqwest", - "thiserror 2.0.15", + "thiserror", "tokio", "tonic", - "tracing", + "tonic-types", ] [[package]] name = "opentelemetry-proto" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7175df06de5eaee9909d4805a3d07e28bb752c34cab57fa9cff549da596b30f" +checksum = "56d658ba1faf63f7b9c492cfbe6e0ec365440a16132d3270c1065f7b33f1b638" dependencies = [ "opentelemetry", "opentelemetry_sdk", @@ -1387,17 +1479,18 @@ dependencies = [ [[package]] name = "opentelemetry_sdk" -version = "0.31.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ae4f5991976fd48df6d843de219ca6d31b01daaab2dad5af2badeded372bd" +checksum = "9b59f80e1ac4d5ff7a2db8fb6c80badb7f0f3f858211fba08dd9aaec750894f9" dependencies = [ "futures-channel", "futures-executor", "futures-util", "opentelemetry", "percent-encoding", - "rand 0.9.2", - "thiserror 2.0.15", + "portable-atomic", + "rand 0.9.5", + "thiserror", "tokio", "tokio-stream", ] @@ -1410,9 +1503,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "parking_lot" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", @@ -1420,30 +1513,53 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.11" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-link", +] + +[[package]] +name = "pbjson" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8edd1efdd8ab23ba9cb9ace3d9987a72663d5d7c9f74fa00b51d6213645cf6c" +dependencies = [ + "base64 0.22.1", + "serde", +] + +[[package]] +name = "pbjson-build" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ed4d5c6ae95e08ac768883c8401cf0e8deb4e6e1d6a4e1fd3d2ec4f0ec63200" +dependencies = [ + "heck", + "itertools 0.14.0", + "prost", + "prost-types", ] [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.7.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", + "hashbrown 0.15.5", "indexmap", ] @@ -1458,62 +1574,56 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" [[package]] name = "portable-atomic-util" -version = "0.2.4" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" dependencies = [ "portable-atomic", ] [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" dependencies = [ "zerovec", ] @@ -1529,9 +1639,9 @@ dependencies = [ [[package]] name = "predicates" -version = "3.1.3" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" +checksum = "ada8f2932f28a27ee7b70dd6c1c39ea0675c55a36879ab92f3a715eaa1e63cfe" dependencies = [ "anstyle", "predicates-core", @@ -1539,15 +1649,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" +checksum = "cad38746f3166b4031b1a0d39ad9f954dd291e7854fcc0eed52ee41a0b50d144" [[package]] name = "predicates-tree" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" +checksum = "d0de1b847b39c8131db0467e9df1ff60e6d0562ab8e9a16e568ad0fdb372e2f2" dependencies = [ "predicates-core", "termtree", @@ -1560,14 +1670,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn", + "syn 2.0.119", +] + +[[package]] +name = "prettyplease" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bfe0f4c752e450fc2faf62654f1c134747922825d5b04ca717b8874f41a40c0" +dependencies = [ + "proc-macro2", + "syn 3.0.10", ] [[package]] name = "proc-macro2" -version = "1.0.101" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] @@ -1583,15 +1703,14 @@ dependencies = [ "lazy_static", "memchr", "parking_lot", - "protobuf", - "thiserror 2.0.15", + "thiserror", ] [[package]] name = "prost" -version = "0.14.1" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" +checksum = "3ef0b569d1d907ab3a28596aee62cf1f61dacb0529a4bedcd8e7460e2d5228b4" dependencies = [ "bytes", "prost-derive", @@ -1599,53 +1718,52 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.14.1" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" +checksum = "b6e4d69d0fa3e7f6f9cf6b53a0e83e4fc99ba3586f65ce166cff30bd13bb4ad2" dependencies = [ "heck", - "itertools", + "itertools 0.15.0", "log", "multimap", - "once_cell", "petgraph", - "prettyplease", + "prettyplease 0.3.0", "prost", "prost-types", "pulldown-cmark", "pulldown-cmark-to-cmark", "regex", - "syn", + "syn 3.0.10", "tempfile", ] [[package]] name = "prost-derive" -version = "0.14.1" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" +checksum = "1ad9c5423459fa2f729b8d9235fab810aa29628b171467744fc86d21460ad70d" dependencies = [ "anyhow", - "itertools", + "itertools 0.15.0", "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "prost-types" -version = "0.14.1" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" +checksum = "f29a7c4c7a84cef41a53d338a2d10d4f1b043ea5c3dde26db22ee2c9c1b1c75b" dependencies = [ "prost", ] [[package]] name = "prost-wkt" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655944d0ce015e71b3ec21279437e6a09e58433e50c7b0677901f3d5235e74f5" +checksum = "4bf89e78de037257a7be0177e894311c31bf7f0a02b752e74f402a5b324cc0fc" dependencies = [ "chrono", "inventory", @@ -1658,9 +1776,9 @@ dependencies = [ [[package]] name = "prost-wkt-build" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f869f1443fee474b785e935d92e1007f57443e485f51668ed41943fc01a321a2" +checksum = "cb5cd191fad9142d096efc97c64715db73db4adb60c38ebdf22f5b54cd6ea712" dependencies = [ "heck", "prost", @@ -1671,9 +1789,9 @@ dependencies = [ [[package]] name = "prost-wkt-types" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeeffd6b9becd4600dd461399f3f71aeda2ff0848802a9ed526cf12e8f42902a" +checksum = "9c46d9cbfee659aaabc63e8ab7d88e4814c2ad6eacdc09b404244ce3c7fbcdfc" dependencies = [ "chrono", "prost", @@ -1687,31 +1805,11 @@ dependencies = [ "serde_json", ] -[[package]] -name = "protobuf" -version = "3.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65a1d4ddae7d8b5de68153b48f6aa3bba8cb002b243dbdbc55a5afbc98f99f4" -dependencies = [ - "once_cell", - "protobuf-support", - "thiserror 1.0.69", -] - -[[package]] -name = "protobuf-support" -version = "3.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e36c2f31e0a47f9280fb347ef5e461ffcd2c52dd520d8e216b52f93b0b0d7d6" -dependencies = [ - "thiserror 1.0.69", -] - [[package]] name = "pulldown-cmark" -version = "0.13.0" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" +checksum = "3db2be46835f013dd3f4fa7f5f7402c537787b54ebb6fe2b94bbdd7e2669bb7b" dependencies = [ "bitflags", "memchr", @@ -1720,39 +1818,37 @@ dependencies = [ [[package]] name = "pulldown-cmark-to-cmark" -version = "21.0.0" +version = "22.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5b6a0769a491a08b31ea5c62494a8f144ee0987d86d670a8af4df1e1b7cde75" +checksum = "84bbb29c624230c4bd1047bbdb2aa47e41c860e9665ce62ba9504eebe91bf867" dependencies = [ "pulldown-cmark", ] [[package]] name = "pyo3" -version = "0.25.1" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a" +checksum = "700d18fa267b73b9b521fd7e13580e2f446916f176cacee1ab63fcc8191f1655" dependencies = [ "anyhow", - "indoc", "inventory", "libc", - "memoffset", "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", - "unindent", ] [[package]] name = "pyo3-async-runtimes" -version = "0.25.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73cc6b1b7d8b3cef02101d37390dbdfe7e450dfea14921cae80a9534ba59ef2" +checksum = "b3ef68daa7316a3fac65e5e18b2203f010346de1c1c53456811a2624673ab046" dependencies = [ - "futures", + "futures-channel", + "futures-util", "once_cell", "pin-project-lite", "pyo3", @@ -1761,19 +1857,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.25.1" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598" +checksum = "7b3fc0c4d08f6bb10e71fe39dfb9e2f59c6eb6854e22ec8092f50c69a4499adb" dependencies = [ - "once_cell", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.25.1" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c" +checksum = "dfc0b8e19df29aad7086cf977bb0c2a2f143e30567eb113e9cf72b62ca698330" dependencies = [ "libc", "pyo3-build-config", @@ -1781,59 +1876,43 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.25.1" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50" +checksum = "6100e8a4b5eba53afaa5ed078364851a0b2499c553a44c31026b929049b49dc6" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "pyo3-macros-backend" -version = "0.25.1" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc" +checksum = "6143877a16e82b5a727b7127ff4cd86858a24a28d745d72f43e6f227c7b1bdb3" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "pythonize" -version = "0.25.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597907139a488b22573158793aa7539df36ae863eba300c75f3a0d65fc475e27" +checksum = "6ec376e1216e0c929a74964ce2020012a1a39f32d80e78aa688721219ea7fb89" dependencies = [ "pyo3", "serde", ] -[[package]] -name = "quanta" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" -dependencies = [ - "crossbeam-utils", - "libc", - "once_cell", - "raw-cpuid", - "wasi 0.11.1+wasi-snapshot-preview1", - "web-sys", - "winapi", -] - [[package]] name = "quinn" -version = "0.11.8" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" +checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" dependencies = [ "bytes", "cfg_aliases", @@ -1842,8 +1921,8 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.5.10", - "thiserror 2.0.15", + "socket2", + "thiserror", "tokio", "tracing", "web-time", @@ -1851,20 +1930,22 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.12" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" dependencies = [ + "aws-lc-rs", "bytes", - "getrandom 0.3.3", + "getrandom 0.4.3", "lru-slab", - "rand 0.9.2", + "rand 0.10.3", + "rand_pcg", "ring", "rustc-hash", "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.15", + "thiserror", "tinyvec", "tracing", "web-time", @@ -1872,23 +1953,23 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.13" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" +checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016" dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.5.10", + "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -1900,34 +1981,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] -name = "rand" -version = "0.8.5" +name = "r-efi" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_chacha", + "rand_core 0.9.5", ] [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "rand" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", ] [[package]] @@ -1937,61 +2014,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] name = "rand_core" -version = "0.6.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.3.4", ] [[package]] name = "rand_core" -version = "0.9.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom 0.3.3", -] +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" [[package]] -name = "raw-cpuid" -version = "11.5.0" +name = "rand_pcg" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df7ab838ed27997ba19a4664507e6f82b41fe6e20be42929332156e5e85146" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" dependencies = [ - "bitflags", + "rand_core 0.10.1", ] [[package]] name = "redox_syscall" -version = "0.5.17" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ "bitflags", ] [[package]] name = "redox_users" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" dependencies = [ - "getrandom 0.2.16", "libredox", - "thiserror 2.0.15", + "thiserror", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" dependencies = [ "aho-corasick", "memchr", @@ -2001,9 +2074,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" dependencies = [ "aho-corasick", "memchr", @@ -2012,17 +2085,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "reqwest" -version = "0.12.23" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" dependencies = [ - "base64", + "base64 0.23.1", "bytes", "futures-channel", "futures-core", @@ -2039,8 +2112,8 @@ dependencies = [ "pin-project-lite", "quinn", "rustls", - "rustls-native-certs", "rustls-pki-types", + "rustls-platform-verifier", "serde", "serde_json", "serde_urlencoded", @@ -2066,17 +2139,17 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.16", + "getrandom 0.2.17", "libc", - "untrusted", + "untrusted 0.9.0", "windows-sys 0.52.0", ] [[package]] name = "ringbuf" -version = "0.4.8" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe47b720588c8702e34b5979cb3271a8b1842c7cb6f57408efa70c779363488c" +checksum = "b58b631e416dd7d84549d7e6a50f767e111f9b03e30d04f40072f6618f386aaf" dependencies = [ "crossbeam-utils", "portable-atomic", @@ -2084,36 +2157,40 @@ dependencies = [ ] [[package]] -name = "rustc-demangle" -version = "0.1.26" +name = "rustc-hash" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" [[package]] -name = "rustc-hash" -version = "2.1.1" +name = "rustc_version" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] [[package]] name = "rustix" -version = "1.0.8" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "rustls" -version = "0.23.31" +version = "0.23.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", @@ -2125,9 +2202,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" +checksum = "4a073f5dc7469f984c52ad2752b63b0807745133b6de880b7b64c1ac4c48aec4" dependencies = [ "openssl-probe", "rustls-pki-types", @@ -2137,44 +2214,81 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.12.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +checksum = "102f35f7de7b06d8c61f1cff6592f5253e0dea431c74867aad5dfd70f44663fb" dependencies = [ "web-time", "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1167586491e2b18b8bfbb293e8180ec17c201c4f076d7cb3070ca964e7598f98" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f" + [[package]] name = "rustls-webpki" -version = "0.103.4" +version = "0.103.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" +checksum = "e3a0760a887c14823fca5a1c970b01d47c328c696c0c64829d1df50e8f853fd5" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] [[package]] name = "schannel" -version = "0.1.27" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2185,9 +2299,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "3.3.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80fb1d92c5028aa318b4b8bd7302a5bfcf48be96a37fc6fc790f806b0004ee0c" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ "bitflags", "core-foundation", @@ -2198,53 +2312,70 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + [[package]] name = "serde" -version = "1.0.219" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", ] [[package]] name = "serde_json" -version = "1.0.143" +version = "1.0.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" dependencies = [ "itoa", "memchr", - "ryu", "serde", + "serde_core", + "zmij", ] [[package]] name = "serde_spanned" -version = "1.0.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" +checksum = "9c187e0a369471c550af028cba56d4f4fa2a489ad28151ae95a4d340a2a8b782" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -2270,86 +2401,84 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] [[package]] name = "simd-adler32" -version = "0.3.7" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "siphasher" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "slotmap" -version = "1.0.7" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" dependencies = [ "version_check", ] [[package]] name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "socket2" -version = "0.5.10" +version = "1.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] +checksum = "149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46" [[package]] name = "socket2" -version = "0.6.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "spinning_top" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" -dependencies = [ - "lock_api", + "windows-sys 0.61.2", ] [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "strsim" @@ -2365,9 +2494,20 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.106" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" dependencies = [ "proc-macro2", "quote", @@ -2385,20 +2525,20 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", ] [[package]] name = "sysinfo" -version = "0.37.0" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cec4dc2d2e357ca1e610cfb07de2fa7a10fc3e9fe89f72545f3d244ea87753" +checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" dependencies = [ "libc", "memchr", @@ -2410,9 +2550,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.44" +version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" +checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" dependencies = [ "filetime", "libc", @@ -2421,21 +2561,21 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.13.2" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" +checksum = "8c447be3a2abfa84b2d91680c56600bd6b2873866de27b36ec911be705e291da" [[package]] name = "tempfile" -version = "3.20.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2444,7 +2584,9 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", + "aws-lc-rs", "futures", + "parking_lot", "prost", "pyo3", "pyo3-async-runtimes", @@ -2453,6 +2595,7 @@ dependencies = [ "temporalio-common", "temporalio-sdk-core", "tokio", + "tokio-rustls", "tokio-stream", "tonic", "tracing", @@ -2461,12 +2604,12 @@ dependencies = [ [[package]] name = "temporalio-client" -version = "0.1.0" +version = "1.2.0" dependencies = [ "anyhow", "async-trait", - "backoff", - "base64", + "backon", + "base64 0.23.1", "bon", "bytes", "derive_more", @@ -2478,93 +2621,142 @@ dependencies = [ "hyper", "hyper-util", "parking_lot", - "rand 0.9.2", - "slotmap", + "rand 0.10.3", + "serde_json", "temporalio-common", - "thiserror 2.0.15", + "thiserror", + "tokio", + "tokio-rustls", + "tonic", + "tower", + "tracing", + "url", + "uuid", +] + +[[package]] +name = "temporalio-common" +version = "1.2.0" +dependencies = [ + "anyhow", + "async-trait", + "bon", + "crc32fast", + "derive_more", + "dirs", + "erased-serde", + "futures", + "futures-channel", + "http-body-util", + "hyper", + "hyper-util", + "opentelemetry", + "opentelemetry-otlp", + "opentelemetry_sdk", + "parking_lot", + "prometheus", + "prost", + "prost-types", + "reqwest", + "ringbuf", + "rustls", + "serde", + "serde_json", + "temporalio-common-wasm", + "temporalio-protos", + "thiserror", "tokio", + "toml", "tonic", - "tower", "tracing", + "tracing-core", + "tracing-subscriber", "url", "uuid", ] [[package]] -name = "temporalio-common" -version = "0.1.0" +name = "temporalio-common-wasm" +version = "1.2.0" dependencies = [ "anyhow", "async-trait", - "base64", "bon", + "chrono", + "crc32fast", "derive_more", - "dirs", - "opentelemetry", + "erased-serde", + "futures", + "parking_lot", "prost", - "prost-wkt", "prost-wkt-types", - "rand 0.9.2", "serde", "serde_json", - "thiserror 2.0.15", - "toml", - "tonic", - "tonic-prost", - "tonic-prost-build", + "temporalio-protos", + "thiserror", "tracing", "tracing-core", + "tracing-subscriber", "url", - "uuid", ] [[package]] name = "temporalio-macros" -version = "0.1.0" +version = "1.2.0" dependencies = [ - "derive_more", "proc-macro2", "quote", - "syn", + "syn 3.0.10", +] + +[[package]] +name = "temporalio-protos" +version = "0.11.0" +dependencies = [ + "anyhow", + "base64 0.23.1", + "derive_more", + "http", + "pbjson", + "pbjson-build", + "prost", + "prost-wkt-types", + "serde", + "serde_json", + "thiserror", + "tonic", + "tonic-prost", + "tonic-prost-build", ] [[package]] name = "temporalio-sdk-core" -version = "0.1.0" +version = "0.11.0" dependencies = [ "anyhow", "async-trait", + "backon", "bon", "crossbeam-channel", - "crossbeam-queue", "crossbeam-utils", - "dashmap", "derive_more", "enum-iterator", "enum_dispatch", "flate2", - "futures-channel", + "futures", "futures-util", "gethostname", - "governor", - "http-body-util", - "hyper", - "hyper-util", - "itertools", + "itertools 0.14.0", "lru", "mockall", - "opentelemetry", "opentelemetry-otlp", - "opentelemetry_sdk", "parking_lot", "pid", "pin-project", - "prometheus", "prost", "prost-wkt-types", - "rand 0.9.2", + "rand 0.10.3", "reqwest", - "ringbuf", "serde", "serde_json", "siphasher", @@ -2574,13 +2766,12 @@ dependencies = [ "temporalio-client", "temporalio-common", "temporalio-macros", - "thiserror 2.0.15", + "thiserror", "tokio", "tokio-stream", "tokio-util", "tonic", "tracing", - "tracing-subscriber", "url", "uuid", "zip", @@ -2594,58 +2785,38 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d76d3f064b981389ecb4b6b7f45a0bf9fdac1d5b9204c7bd6714fecc302850" -dependencies = [ - "thiserror-impl 2.0.15", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" dependencies = [ - "proc-macro2", - "quote", - "syn", + "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.15" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d29feb33e986b6ea906bd9c3559a856983f92371b3eaa5e83782a351623de0" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", ] [[package]] name = "thread_local" -version = "1.1.9" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" dependencies = [ "cfg-if", ] [[package]] name = "tinystr" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" dependencies = [ "displaydoc", "zerovec", @@ -2653,55 +2824,43 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" [[package]] name = "tokio" -version = "1.47.1" +version = "1.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" dependencies = [ - "backtrace", "bytes", - "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "slab", - "socket2 0.6.0", + "socket2", "tokio-macros", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", ] [[package]] name = "tokio-rustls" -version = "0.26.2" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db" dependencies = [ "rustls", "tokio", @@ -2709,9 +2868,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" dependencies = [ "futures-core", "pin-project-lite", @@ -2720,25 +2879,26 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.16" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" dependencies = [ "bytes", "futures-core", "futures-sink", + "libc", "pin-project-lite", "tokio", ] [[package]] name = "toml" -version = "0.9.5" +version = "1.2.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" +checksum = "d5755c51863cdac711f1956baf8eb9588e060755f7d3c4c979e70ea1e1f32cd7" dependencies = [ "indexmap", - "serde", + "serde_core", "serde_spanned", "toml_datetime", "toml_parser", @@ -2748,38 +2908,39 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" dependencies = [ - "serde", + "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.2" +version = "1.1.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.2" +version = "1.2.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" +checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" [[package]] name = "tonic" -version = "0.14.2" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" +checksum = "e2cdfc673aabd30fe8fee92e65837b644c37c5d47f0f97ae6d5e0f1237d15e1b" dependencies = [ "async-trait", "axum", - "base64", + "base64 0.22.1", "bytes", + "flate2", "h2", "http", "http-body", @@ -2790,11 +2951,12 @@ dependencies = [ "percent-encoding", "pin-project", "rustls-native-certs", - "socket2 0.6.0", + "socket2", "sync_wrapper", "tokio", "tokio-rustls", "tokio-stream", + "tokio-util", "tower", "tower-layer", "tower-service", @@ -2803,21 +2965,21 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.14.2" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40aaccc9f9eccf2cd82ebc111adc13030d23e887244bc9cfa5d1d636049de3" +checksum = "ac6d916d206ed7bdda1778ddff9bda43303789c258877e7bc22fb44ee5c984b4" dependencies = [ - "prettyplease", + "prettyplease 0.2.37", "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "tonic-prost" -version = "0.14.2" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66bd50ad6ce1252d87ef024b3d64fe4c3cf54a86fb9ef4c631fdd0ded7aeaa67" +checksum = "eba464054e2226f182a34489b8b079bf4c6e3e7ab5fd7fc30e024f24aa92a484" dependencies = [ "bytes", "prost", @@ -2826,25 +2988,36 @@ dependencies = [ [[package]] name = "tonic-prost-build" -version = "0.14.2" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a16cba4043dc3ff43fcb3f96b4c5c154c64cbd18ca8dce2ab2c6a451d058a2" +checksum = "2ea216ddc448e08e7839ab09e20e60b06b6a1c32745ccb212c0ebd161c199f1b" dependencies = [ - "prettyplease", + "prettyplease 0.2.37", "proc-macro2", "prost-build", "prost-types", "quote", - "syn", + "syn 2.0.119", "tempfile", "tonic-build", ] +[[package]] +name = "tonic-types" +version = "0.14.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccbb6c31deb8e99dcdf87df19c5289b7838a600da74a8224baa671e52fe7c5ad" +dependencies = [ + "prost", + "prost-types", + "tonic", +] + [[package]] name = "tower" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", @@ -2861,20 +3034,20 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.6" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ "bitflags", "bytes", "futures-util", "http", "http-body", - "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", + "url", ] [[package]] @@ -2891,9 +3064,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -2902,40 +3075,53 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", ] +[[package]] +name = "tracing-serde" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" -version = "0.3.20" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", "once_cell", "parking_lot", "regex-automata", + "serde", + "serde_json", "sharded-slab", "thread_local", "tracing", "tracing-core", + "tracing-serde", ] [[package]] @@ -2944,6 +3130,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "typed-path" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e" + [[package]] name = "typeid" version = "1.0.3" @@ -2952,9 +3144,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typetag" -version = "0.2.20" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f22b40dd7bfe8c14230cf9702081366421890435b2d625fa92b4acc4c3de6f" +checksum = "c90e86058a30d42a1a928dfb4b49bb33c98c3a2b4909492e6b0881cd94798ec2" dependencies = [ "erased-serde", "inventory", @@ -2965,26 +3157,32 @@ dependencies = [ [[package]] name = "typetag-impl" -version = "0.2.20" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35f5380909ffc31b4de4f4bdf96b877175a016aa2ca98cee39fcfd8c4d53d952" +checksum = "f153acc4e99a5f2a5aefa09fb078be54e26271b2813f6041200b224c098d8328" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", ] [[package]] name = "unicase" -version = "2.8.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] name = "unicode-xid" @@ -2993,10 +3191,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] -name = "unindent" -version = "0.2.4" +name = "untrusted" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "untrusted" @@ -3006,30 +3204,38 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.4" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] name = "utf8_iter" -version = "1.0.4" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + +[[package]] +name = "utf_types" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" [[package]] name = "uuid" -version = "1.18.1" +version = "1.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +checksum = "bed99139f7dac9b5cfe5f17be4d66dc7079a34dee1d74bcc77217119240e267c" dependencies = [ - "getrandom 0.3.3", - "js-sys", - "wasm-bindgen", + "getrandom 0.4.3", ] [[package]] @@ -3044,11 +3250,21 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" dependencies = [ "try-lock", ] @@ -3060,58 +3276,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" +name = "wasip2" +version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" dependencies = [ "cfg-if", - "once_cell", "rustversion", "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.50" +version = "0.4.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" dependencies = [ - "cfg-if", "js-sys", - "once_cell", + "tokio", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3119,31 +3319,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn", - "wasm-bindgen-backend", + "syn 3.0.10", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" dependencies = [ "unicode-ident", ] [[package]] name = "wasm-streams" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" dependencies = [ "futures-util", "js-sys", @@ -3154,9 +3354,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" dependencies = [ "js-sys", "wasm-bindgen", @@ -3172,6 +3372,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-root-certs" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "293198dcebfb821155b5092ab94b5a82ff180eddd7241df3bd6e66a4ffd1a585" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "winapi" version = "0.3.9" @@ -3188,6 +3397,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -3196,31 +3414,30 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.61.3" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ "windows-collections", "windows-core", "windows-future", - "windows-link", "windows-numerics", ] [[package]] name = "windows-collections" -version = "0.2.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ "windows-core", ] [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", @@ -3231,9 +3448,9 @@ dependencies = [ [[package]] name = "windows-future" -version = "0.2.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ "windows-core", "windows-link", @@ -3242,37 +3459,37 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.60.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "windows-link" -version = "0.1.3" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-numerics" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ "windows-core", "windows-link", @@ -3280,18 +3497,18 @@ dependencies = [ [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ "windows-link", ] @@ -3302,25 +3519,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] name = "windows-sys" -version = "0.60.2" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets 0.53.3", + "windows-link", ] [[package]] @@ -3329,38 +3537,21 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows-threading" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" dependencies = [ "windows-link", ] @@ -3371,122 +3562,71 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - [[package]] name = "winnow" -version = "0.7.12" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags", -] +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] name = "writeable" -version = "0.6.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" [[package]] name = "xattr" -version = "1.5.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af3a19837351dc82ba89f8a125e22a3c475f05aba604acc023d62b2739ae2909" +checksum = "963d6fab92d5504b971dc8bd90ca743c2575e590bc8071ea5bc571598667ae08" dependencies = [ "libc", "rustix", @@ -3494,11 +3634,10 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -3506,68 +3645,82 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.26" +version = "0.8.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.26" +version = "0.8.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", "synstructure", ] [[package]] name = "zeroize" -version = "1.8.1" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] name = "zerotrie" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" dependencies = [ "displaydoc", "yoke", @@ -3576,9 +3729,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.4" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" dependencies = [ "yoke", "zerofrom", @@ -3587,42 +3740,54 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.10", ] [[package]] name = "zip" -version = "4.6.1" +version = "9.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa8cd6af31c3b31c6631b8f483848b91589021b28fffe50adada48d4f4d2ed1" +checksum = "e3476fd497ac8af5b1ec7b51acab7bef380f7e8dd8e0487595bafd839417a302" dependencies = [ - "arbitrary", "bzip2", + "constant_time_eq", "crc32fast", "flate2", + "getrandom 0.4.3", "indexmap", + "libc", "memchr", + "nix", + "typed-path", + "windows-sys 0.61.2", + "zeroize", "zopfli", "zstd", ] [[package]] name = "zlib-rs" -version = "0.5.2" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" [[package]] name = "zopfli" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfc5ee405f504cd4984ecc6f14d02d55cfda60fa4b689434ef4102aae150cd7" +checksum = "aaf7fc5d30c28483d93805c4a5e12b05bbb52407fa67c5f8bd552374cd01fb11" dependencies = [ "bumpalo", "crc32fast", @@ -3632,27 +3797,27 @@ dependencies = [ [[package]] name = "zstd" -version = "0.13.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +checksum = "ad5020ab8f27bfc0024ad0a07aed6bf022a16208f479686fbed4fdd0c85eb0b3" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.2.4" +version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +checksum = "5a9ea9cc2576c2fcc104e9cec04f46e3ede564f4fbc206831e4ef7e859a4140d" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.15+zstd.1.5.7" +version = "2.1.3+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" +checksum = "f729a06d0257428fd9d997ac8db7e1407bd0262ab016b085b36bc52957c0052d" dependencies = [ "cc", "pkg-config", diff --git a/temporalio/bridge/Cargo.toml b/temporalio/bridge/Cargo.toml index b2d186b5eb..056d5e3e1b 100644 --- a/temporalio/bridge/Cargo.toml +++ b/temporalio/bridge/Cargo.toml @@ -15,27 +15,71 @@ module-name = "temporalio.bridge.temporal_sdk_bridge" name = "temporal_sdk_bridge" crate-type = ["cdylib"] +[features] +# Default builds keep the historical `ring` rustls provider (unchanged behavior). +# A FIPS build — `maturin build --no-default-features --features fips` +# (TEMPORALIO_FIPS=1) — swaps the entire rustls stack onto aws-lc-rs in FIPS +# mode (aws-lc-fips-sys) and eliminates `ring`: the transitive core/client/common +# TLS *and* this crate's own tokio-rustls use in client.rs. Ported from +# temporalio/sdk-ruby PR #466. +# The extra `tokio-rustls/*` entry is sdk-python-specific: the bridge has its own +# direct tokio-rustls dep (client.rs custom verifier) that Ruby lacked, so its +# provider must track the build too — else `cargo tree -i ring` would still find ring. +default = ["tls-ring"] +tls-ring = [ + "temporalio-sdk-core/tls-ring", + "temporalio-client/tls-ring", + "tokio-rustls/ring", +] +tls-aws-lc = [ + "temporalio-sdk-core/tls-aws-lc", + "temporalio-client/tls-aws-lc", + "tokio-rustls/aws_lc_rs", +] +fips = ["tls-aws-lc", "dep:aws-lc-rs"] + [dependencies] anyhow = "1.0" async-trait = "0.1" +# Only compiled under `fips`. Not called directly — its presence flips the +# shared aws-lc-rs crate (rustls' aws_lc_rs provider) into FIPS mode, linking +# aws-lc-fips-sys instead of aws-lc-sys. Ported from sdk-ruby PR #466. +aws-lc-rs = { version = "1", features = ["fips"], optional = true } futures = "0.3" +parking_lot = "0.12" prost = "0.14" -pyo3 = { version = "0.25", features = [ +pyo3 = { version = "0.29", features = [ "extension-module", - "abi3-py310", + "abi3-py311", "anyhow", "multiple-pymethods", ] } -pyo3-async-runtimes = { version = "0.25", features = ["tokio-runtime"] } -pythonize = "0.25" -temporalio-client = { version = "0.1.0", path = "./sdk-core/crates/client" } -temporalio-common = { version = "0.1.0", path = "./sdk-core/crates/common", features = [ +pyo3-async-runtimes = { version = "0.29", features = ["tokio-runtime"] } +pythonize = "0.29" +# default-features disabled so the rustls provider isn't pinned to `tls-ring`; +# the bridge's tls-ring/tls-aws-lc features (above) select it. Re-add the +# crate's non-TLS default (`envconfig`). +temporalio-client = { version = "1.2.0", path = "./sdk-core/crates/client", default-features = false, features = [ "envconfig", + "experimental", +] } +temporalio-common = { version = "1.2.0", path = "./sdk-core/crates/common", features = [ + "envconfig", "otel" ]} -temporalio-sdk-core = { version = "0.1.0", path = "./sdk-core/crates/sdk-core", features = [ +# default-features disabled (drops the pinned `tls-ring`); re-add the non-TLS +# defaults the bridge relied on (`envconfig`, `prometheus`) plus `ephemeral-server`. +temporalio-sdk-core = { version = "0.11.0", path = "./sdk-core/crates/sdk-core", default-features = false, features = [ "ephemeral-server", + "envconfig", + "prometheus", ] } tokio = "1.26" +# Matches the sdk-core client crate's rustls stack; used to build the custom +# server certificate verifier for ClientTlsConfig.verification_server_name. +# Provider is NOT pinned here — the bridge's tls-ring/tls-aws-lc features select +# `ring` (default) or `aws_lc_rs` (fips), so this crate's direct rustls use in +# client.rs tracks the rest of the stack and the `cargo tree -i ring` FIPS gate passes. +tokio-rustls = { version = "0.26", default-features = false } tokio-stream = "0.1" tonic = "0.14" tracing = "0.1" diff --git a/temporalio/bridge/_visitor.py b/temporalio/bridge/_visitor.py index 04ec95b3e2..ead09a986f 100644 --- a/temporalio/bridge/_visitor.py +++ b/temporalio/bridge/_visitor.py @@ -1,24 +1,15 @@ +from __future__ import annotations + # This file is generated by gen_payload_visitor.py. Changes should be made there. -import abc -from typing import Any, MutableSequence +from typing import Any +import temporalio.nexus.system from temporalio.api.common.v1.message_pb2 import Payload - - -class VisitorFunctions(abc.ABC): - """Set of functions which can be called by the visitor. - Allows handling payloads as a sequence. - """ - - @abc.abstractmethod - async def visit_payload(self, payload: Payload) -> None: - """Called when encountering a single payload.""" - raise NotImplementedError() - - @abc.abstractmethod - async def visit_payloads(self, payloads: MutableSequence[Payload]) -> None: - """Called when encountering multiple payloads together.""" - raise NotImplementedError() +from temporalio.bridge._visitor_functions import ( + BoundedVisitorFunctions, + PayloadSequence, + VisitorFunctions, +) class PayloadVisitor: @@ -27,51 +18,105 @@ class PayloadVisitor: """ def __init__( - self, *, skip_search_attributes: bool = False, skip_headers: bool = False + self, + *, + skip_search_attributes: bool = False, + skip_headers: bool = False, + concurrency_limit: int = 1, ): - """Creates a new payload visitor.""" + """Creates a new payload visitor. + + Args: + skip_search_attributes: If True, search attributes are not visited. + skip_headers: If True, headers are not visited. + concurrency_limit: Maximum number of payload visits that may run + concurrently during a single call to visit(). Defaults to 1 + (sequential). + """ + if concurrency_limit < 1: + raise ValueError("concurrency_limit must be positive") self.skip_search_attributes = skip_search_attributes self.skip_headers = skip_headers + self._concurrency_limit = concurrency_limit async def visit(self, fs: VisitorFunctions, root: Any) -> None: """Visits the given root message with the given function.""" method_name = "_visit_" + root.DESCRIPTOR.full_name.replace(".", "_") method = getattr(self, method_name, None) - if method is not None: - await method(fs, root) - else: + if method is None: raise ValueError(f"Unknown root message type: {root.DESCRIPTOR.full_name}") + if self._concurrency_limit == 1: + await method(fs, root) + return + + bounded = BoundedVisitorFunctions(fs, self._concurrency_limit) + try: + await method(bounded, root) + finally: + await bounded.drain() + + async def _visit_nexus_operation_input_payload( + self, + fs: VisitorFunctions, + payload: Payload, + ) -> None: + await self._visit_temporal_api_common_v1_Payload(fs, payload) + + async def _visit_temporal_api_common_v1_Payload( + self, fs: VisitorFunctions, payload: Payload + ) -> None: + new_payload = await temporalio.nexus.system.maybe_visit_payload( + payload, + fs, + self.skip_search_attributes, + ) + if new_payload is None: + await fs.visit_payload(payload) + return - async def _visit_temporal_api_common_v1_Payload(self, fs, o): - await fs.visit_payload(o) + if new_payload is not payload: + payload.CopyFrom(new_payload) + await fs.visit_system_nexus_envelope(payload) - async def _visit_temporal_api_common_v1_Payloads(self, fs, o): + async def _visit_temporal_api_common_v1_Payloads( + self, fs: VisitorFunctions, o: Any + ): await fs.visit_payloads(o.payloads) - async def _visit_payload_container(self, fs, o): + async def _visit_payload_container(self, fs: VisitorFunctions, o: PayloadSequence): await fs.visit_payloads(o) - async def _visit_temporal_api_failure_v1_ApplicationFailureInfo(self, fs, o): + async def _visit_temporal_api_failure_v1_ApplicationFailureInfo( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("details"): await self._visit_temporal_api_common_v1_Payloads(fs, o.details) - async def _visit_temporal_api_failure_v1_TimeoutFailureInfo(self, fs, o): + async def _visit_temporal_api_failure_v1_TimeoutFailureInfo( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("last_heartbeat_details"): await self._visit_temporal_api_common_v1_Payloads( fs, o.last_heartbeat_details ) - async def _visit_temporal_api_failure_v1_CanceledFailureInfo(self, fs, o): + async def _visit_temporal_api_failure_v1_CanceledFailureInfo( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("details"): await self._visit_temporal_api_common_v1_Payloads(fs, o.details) - async def _visit_temporal_api_failure_v1_ResetWorkflowFailureInfo(self, fs, o): + async def _visit_temporal_api_failure_v1_ResetWorkflowFailureInfo( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("last_heartbeat_details"): await self._visit_temporal_api_common_v1_Payloads( fs, o.last_heartbeat_details ) - async def _visit_temporal_api_failure_v1_Failure(self, fs, o): + async def _visit_temporal_api_failure_v1_Failure( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("encoded_attributes"): await self._visit_temporal_api_common_v1_Payload(fs, o.encoded_attributes) if o.HasField("cause"): @@ -93,17 +138,21 @@ async def _visit_temporal_api_failure_v1_Failure(self, fs, o): fs, o.reset_workflow_failure_info ) - async def _visit_temporal_api_common_v1_Memo(self, fs, o): + async def _visit_temporal_api_common_v1_Memo(self, fs: VisitorFunctions, o: Any): for v in o.fields.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) - async def _visit_temporal_api_common_v1_SearchAttributes(self, fs, o): + async def _visit_temporal_api_common_v1_SearchAttributes( + self, fs: VisitorFunctions, o: Any + ): if self.skip_search_attributes: return for v in o.indexed_fields.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) - async def _visit_coresdk_workflow_activation_InitializeWorkflow(self, fs, o): + async def _visit_coresdk_workflow_activation_InitializeWorkflow( + self, fs: VisitorFunctions, o: Any + ): await self._visit_payload_container(fs, o.arguments) if not self.skip_headers: for v in o.headers.values(): @@ -121,31 +170,43 @@ async def _visit_coresdk_workflow_activation_InitializeWorkflow(self, fs, o): fs, o.search_attributes ) - async def _visit_coresdk_workflow_activation_QueryWorkflow(self, fs, o): + async def _visit_coresdk_workflow_activation_QueryWorkflow( + self, fs: VisitorFunctions, o: Any + ): await self._visit_payload_container(fs, o.arguments) if not self.skip_headers: for v in o.headers.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) - async def _visit_coresdk_workflow_activation_SignalWorkflow(self, fs, o): + async def _visit_coresdk_workflow_activation_SignalWorkflow( + self, fs: VisitorFunctions, o: Any + ): await self._visit_payload_container(fs, o.input) if not self.skip_headers: for v in o.headers.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) - async def _visit_coresdk_activity_result_Success(self, fs, o): + async def _visit_coresdk_activity_result_Success( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("result"): await self._visit_temporal_api_common_v1_Payload(fs, o.result) - async def _visit_coresdk_activity_result_Failure(self, fs, o): + async def _visit_coresdk_activity_result_Failure( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("failure"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) - async def _visit_coresdk_activity_result_Cancellation(self, fs, o): + async def _visit_coresdk_activity_result_Cancellation( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("failure"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) - async def _visit_coresdk_activity_result_ActivityResolution(self, fs, o): + async def _visit_coresdk_activity_result_ActivityResolution( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("completed"): await self._visit_coresdk_activity_result_Success(fs, o.completed) elif o.HasField("failed"): @@ -153,37 +214,43 @@ async def _visit_coresdk_activity_result_ActivityResolution(self, fs, o): elif o.HasField("cancelled"): await self._visit_coresdk_activity_result_Cancellation(fs, o.cancelled) - async def _visit_coresdk_workflow_activation_ResolveActivity(self, fs, o): + async def _visit_coresdk_workflow_activation_ResolveActivity( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("result"): await self._visit_coresdk_activity_result_ActivityResolution(fs, o.result) async def _visit_coresdk_workflow_activation_ResolveChildWorkflowExecutionStartCancelled( - self, fs, o + self, fs: VisitorFunctions, o: Any ): if o.HasField("failure"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) async def _visit_coresdk_workflow_activation_ResolveChildWorkflowExecutionStart( - self, fs, o + self, fs: VisitorFunctions, o: Any ): if o.HasField("cancelled"): await self._visit_coresdk_workflow_activation_ResolveChildWorkflowExecutionStartCancelled( fs, o.cancelled ) - async def _visit_coresdk_child_workflow_Success(self, fs, o): + async def _visit_coresdk_child_workflow_Success(self, fs: VisitorFunctions, o: Any): if o.HasField("result"): await self._visit_temporal_api_common_v1_Payload(fs, o.result) - async def _visit_coresdk_child_workflow_Failure(self, fs, o): + async def _visit_coresdk_child_workflow_Failure(self, fs: VisitorFunctions, o: Any): if o.HasField("failure"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) - async def _visit_coresdk_child_workflow_Cancellation(self, fs, o): + async def _visit_coresdk_child_workflow_Cancellation( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("failure"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) - async def _visit_coresdk_child_workflow_ChildWorkflowResult(self, fs, o): + async def _visit_coresdk_child_workflow_ChildWorkflowResult( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("completed"): await self._visit_coresdk_child_workflow_Success(fs, o.completed) elif o.HasField("failed"): @@ -192,36 +259,40 @@ async def _visit_coresdk_child_workflow_ChildWorkflowResult(self, fs, o): await self._visit_coresdk_child_workflow_Cancellation(fs, o.cancelled) async def _visit_coresdk_workflow_activation_ResolveChildWorkflowExecution( - self, fs, o + self, fs: VisitorFunctions, o: Any ): if o.HasField("result"): await self._visit_coresdk_child_workflow_ChildWorkflowResult(fs, o.result) async def _visit_coresdk_workflow_activation_ResolveSignalExternalWorkflow( - self, fs, o + self, fs: VisitorFunctions, o: Any ): if o.HasField("failure"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) async def _visit_coresdk_workflow_activation_ResolveRequestCancelExternalWorkflow( - self, fs, o + self, fs: VisitorFunctions, o: Any ): if o.HasField("failure"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) - async def _visit_coresdk_workflow_activation_DoUpdate(self, fs, o): + async def _visit_coresdk_workflow_activation_DoUpdate( + self, fs: VisitorFunctions, o: Any + ): await self._visit_payload_container(fs, o.input) if not self.skip_headers: for v in o.headers.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) async def _visit_coresdk_workflow_activation_ResolveNexusOperationStart( - self, fs, o + self, fs: VisitorFunctions, o: Any ): if o.HasField("failed"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failed) - async def _visit_coresdk_nexus_NexusOperationResult(self, fs, o): + async def _visit_coresdk_nexus_NexusOperationResult( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("completed"): await self._visit_temporal_api_common_v1_Payload(fs, o.completed) elif o.HasField("failed"): @@ -231,11 +302,15 @@ async def _visit_coresdk_nexus_NexusOperationResult(self, fs, o): elif o.HasField("timed_out"): await self._visit_temporal_api_failure_v1_Failure(fs, o.timed_out) - async def _visit_coresdk_workflow_activation_ResolveNexusOperation(self, fs, o): + async def _visit_coresdk_workflow_activation_ResolveNexusOperation( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("result"): await self._visit_coresdk_nexus_NexusOperationResult(fs, o.result) - async def _visit_coresdk_workflow_activation_WorkflowActivationJob(self, fs, o): + async def _visit_coresdk_workflow_activation_WorkflowActivationJob( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("initialize_workflow"): await self._visit_coresdk_workflow_activation_InitializeWorkflow( fs, o.initialize_workflow @@ -279,42 +354,68 @@ async def _visit_coresdk_workflow_activation_WorkflowActivationJob(self, fs, o): fs, o.resolve_nexus_operation ) - async def _visit_coresdk_workflow_activation_WorkflowActivation(self, fs, o): + async def _visit_coresdk_workflow_activation_WorkflowActivation( + self, fs: VisitorFunctions, o: Any + ): for v in o.jobs: await self._visit_coresdk_workflow_activation_WorkflowActivationJob(fs, v) - async def _visit_temporal_api_sdk_v1_UserMetadata(self, fs, o): + async def _visit_temporal_api_sdk_v1_UserMetadata( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("summary"): await self._visit_temporal_api_common_v1_Payload(fs, o.summary) if o.HasField("details"): await self._visit_temporal_api_common_v1_Payload(fs, o.details) - async def _visit_coresdk_workflow_commands_ScheduleActivity(self, fs, o): + async def _visit_temporal_api_sdk_v1_EventGroupMarker_Label( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("label"): + await self._visit_temporal_api_common_v1_Payload(fs, o.label) + + async def _visit_temporal_api_sdk_v1_EventGroupMarker( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("label"): + await self._visit_temporal_api_sdk_v1_EventGroupMarker_Label(fs, o.label) + + async def _visit_coresdk_workflow_commands_ScheduleActivity( + self, fs: VisitorFunctions, o: Any + ): if not self.skip_headers: for v in o.headers.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) await self._visit_payload_container(fs, o.arguments) - async def _visit_coresdk_workflow_commands_QuerySuccess(self, fs, o): + async def _visit_coresdk_workflow_commands_QuerySuccess( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("response"): await self._visit_temporal_api_common_v1_Payload(fs, o.response) - async def _visit_coresdk_workflow_commands_QueryResult(self, fs, o): + async def _visit_coresdk_workflow_commands_QueryResult( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("succeeded"): await self._visit_coresdk_workflow_commands_QuerySuccess(fs, o.succeeded) elif o.HasField("failed"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failed) - async def _visit_coresdk_workflow_commands_CompleteWorkflowExecution(self, fs, o): + async def _visit_coresdk_workflow_commands_CompleteWorkflowExecution( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("result"): await self._visit_temporal_api_common_v1_Payload(fs, o.result) - async def _visit_coresdk_workflow_commands_FailWorkflowExecution(self, fs, o): + async def _visit_coresdk_workflow_commands_FailWorkflowExecution( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("failure"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) async def _visit_coresdk_workflow_commands_ContinueAsNewWorkflowExecution( - self, fs, o + self, fs: VisitorFunctions, o: Any ): await self._visit_payload_container(fs, o.arguments) for v in o.memo.values(): @@ -322,59 +423,82 @@ async def _visit_coresdk_workflow_commands_ContinueAsNewWorkflowExecution( if not self.skip_headers: for v in o.headers.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) - if not self.skip_search_attributes: - for v in o.search_attributes.values(): - await self._visit_temporal_api_common_v1_Payload(fs, v) + if o.HasField("search_attributes"): + await self._visit_temporal_api_common_v1_SearchAttributes( + fs, o.search_attributes + ) + + async def _visit_coresdk_workflow_commands_CancelWorkflowExecution( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("details"): + await self._visit_temporal_api_common_v1_Payloads(fs, o.details) - async def _visit_coresdk_workflow_commands_StartChildWorkflowExecution(self, fs, o): + async def _visit_coresdk_workflow_commands_StartChildWorkflowExecution( + self, fs: VisitorFunctions, o: Any + ): await self._visit_payload_container(fs, o.input) if not self.skip_headers: for v in o.headers.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) for v in o.memo.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) - if not self.skip_search_attributes: - for v in o.search_attributes.values(): - await self._visit_temporal_api_common_v1_Payload(fs, v) + if o.HasField("search_attributes"): + await self._visit_temporal_api_common_v1_SearchAttributes( + fs, o.search_attributes + ) async def _visit_coresdk_workflow_commands_SignalExternalWorkflowExecution( - self, fs, o + self, fs: VisitorFunctions, o: Any ): await self._visit_payload_container(fs, o.args) if not self.skip_headers: for v in o.headers.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) - async def _visit_coresdk_workflow_commands_ScheduleLocalActivity(self, fs, o): + async def _visit_coresdk_workflow_commands_ScheduleLocalActivity( + self, fs: VisitorFunctions, o: Any + ): if not self.skip_headers: for v in o.headers.values(): await self._visit_temporal_api_common_v1_Payload(fs, v) await self._visit_payload_container(fs, o.arguments) async def _visit_coresdk_workflow_commands_UpsertWorkflowSearchAttributes( - self, fs, o + self, fs: VisitorFunctions, o: Any ): - if not self.skip_search_attributes: - for v in o.search_attributes.values(): - await self._visit_temporal_api_common_v1_Payload(fs, v) + if o.HasField("search_attributes"): + await self._visit_temporal_api_common_v1_SearchAttributes( + fs, o.search_attributes + ) - async def _visit_coresdk_workflow_commands_ModifyWorkflowProperties(self, fs, o): + async def _visit_coresdk_workflow_commands_ModifyWorkflowProperties( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("upserted_memo"): await self._visit_temporal_api_common_v1_Memo(fs, o.upserted_memo) - async def _visit_coresdk_workflow_commands_UpdateResponse(self, fs, o): + async def _visit_coresdk_workflow_commands_UpdateResponse( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("rejected"): await self._visit_temporal_api_failure_v1_Failure(fs, o.rejected) elif o.HasField("completed"): await self._visit_temporal_api_common_v1_Payload(fs, o.completed) - async def _visit_coresdk_workflow_commands_ScheduleNexusOperation(self, fs, o): + async def _visit_coresdk_workflow_commands_ScheduleNexusOperation( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("input"): - await self._visit_temporal_api_common_v1_Payload(fs, o.input) + await self._visit_nexus_operation_input_payload(fs, o.input) - async def _visit_coresdk_workflow_commands_WorkflowCommand(self, fs, o): + async def _visit_coresdk_workflow_commands_WorkflowCommand( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("user_metadata"): await self._visit_temporal_api_sdk_v1_UserMetadata(fs, o.user_metadata) + for v in o.event_group_markers: + await self._visit_temporal_api_sdk_v1_EventGroupMarker(fs, v) if o.HasField("schedule_activity"): await self._visit_coresdk_workflow_commands_ScheduleActivity( fs, o.schedule_activity @@ -395,6 +519,10 @@ async def _visit_coresdk_workflow_commands_WorkflowCommand(self, fs, o): await self._visit_coresdk_workflow_commands_ContinueAsNewWorkflowExecution( fs, o.continue_as_new_workflow_execution ) + elif o.HasField("cancel_workflow_execution"): + await self._visit_coresdk_workflow_commands_CancelWorkflowExecution( + fs, o.cancel_workflow_execution + ) elif o.HasField("start_child_workflow_execution"): await self._visit_coresdk_workflow_commands_StartChildWorkflowExecution( fs, o.start_child_workflow_execution @@ -424,18 +552,116 @@ async def _visit_coresdk_workflow_commands_WorkflowCommand(self, fs, o): fs, o.schedule_nexus_operation ) - async def _visit_coresdk_workflow_completion_Success(self, fs, o): + async def _visit_coresdk_workflow_completion_Success( + self, fs: VisitorFunctions, o: Any + ): for v in o.commands: await self._visit_coresdk_workflow_commands_WorkflowCommand(fs, v) - async def _visit_coresdk_workflow_completion_Failure(self, fs, o): + async def _visit_coresdk_workflow_completion_Failure( + self, fs: VisitorFunctions, o: Any + ): if o.HasField("failure"): await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) async def _visit_coresdk_workflow_completion_WorkflowActivationCompletion( - self, fs, o + self, fs: VisitorFunctions, o: Any ): if o.HasField("successful"): await self._visit_coresdk_workflow_completion_Success(fs, o.successful) elif o.HasField("failed"): await self._visit_coresdk_workflow_completion_Failure(fs, o.failed) + + async def _visit_temporal_api_nexus_v1_StartOperationResponse_Sync( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("payload"): + await self._visit_temporal_api_common_v1_Payload(fs, o.payload) + + async def _visit_temporal_api_nexus_v1_Failure(self, fs: VisitorFunctions, o: Any): + if o.HasField("cause"): + await self._visit_temporal_api_nexus_v1_Failure(fs, o.cause) + + async def _visit_temporal_api_nexus_v1_UnsuccessfulOperationError( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("failure"): + await self._visit_temporal_api_nexus_v1_Failure(fs, o.failure) + + async def _visit_temporal_api_nexus_v1_StartOperationResponse( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("sync_success"): + await self._visit_temporal_api_nexus_v1_StartOperationResponse_Sync( + fs, o.sync_success + ) + elif o.HasField("operation_error"): + await self._visit_temporal_api_nexus_v1_UnsuccessfulOperationError( + fs, o.operation_error + ) + elif o.HasField("failure"): + await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) + + async def _visit_temporal_api_nexus_v1_Response(self, fs: VisitorFunctions, o: Any): + if o.HasField("start_operation"): + await self._visit_temporal_api_nexus_v1_StartOperationResponse( + fs, o.start_operation + ) + + async def _visit_temporal_api_nexus_v1_HandlerError( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("failure"): + await self._visit_temporal_api_nexus_v1_Failure(fs, o.failure) + + async def _visit_coresdk_nexus_NexusTaskCompletion( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("completed"): + await self._visit_temporal_api_nexus_v1_Response(fs, o.completed) + elif o.HasField("error"): + await self._visit_temporal_api_nexus_v1_HandlerError(fs, o.error) + elif o.HasField("failure"): + await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) + + async def _visit_temporal_api_notificationservice_v1_OnCompleteRequest( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("source_context"): + await self._visit_temporal_api_common_v1_Payload(fs, o.source_context) + if o.HasField("success"): + await self._visit_temporal_api_common_v1_Payload(fs, o.success) + elif o.HasField("failure"): + await self._visit_temporal_api_failure_v1_Failure(fs, o.failure) + + async def _visit_temporal_api_notificationservice_v1_OnCompleteResponse( + self, fs: VisitorFunctions, o: Any + ) -> None: + pass + + async def _visit_temporal_api_common_v1_Header(self, fs: VisitorFunctions, o: Any): + for v in o.fields.values(): + await self._visit_temporal_api_common_v1_Payload(fs, v) + + async def _visit_temporal_api_workflowservice_v1_SignalWithStartWorkflowExecutionRequest( + self, fs: VisitorFunctions, o: Any + ): + if o.HasField("input"): + await self._visit_temporal_api_common_v1_Payloads(fs, o.input) + if o.HasField("signal_input"): + await self._visit_temporal_api_common_v1_Payloads(fs, o.signal_input) + if o.HasField("memo"): + await self._visit_temporal_api_common_v1_Memo(fs, o.memo) + if o.HasField("search_attributes"): + await self._visit_temporal_api_common_v1_SearchAttributes( + fs, o.search_attributes + ) + if o.HasField("header"): + await self._visit_temporal_api_common_v1_Header(fs, o.header) + if o.HasField("user_metadata"): + await self._visit_temporal_api_sdk_v1_UserMetadata(fs, o.user_metadata) + + async def _visit_temporal_api_workflowservice_v1_SignalWithStartWorkflowExecutionResponse( + self, fs: VisitorFunctions, o: Any + ) -> None: + pass diff --git a/temporalio/bridge/_visitor_functions.py b/temporalio/bridge/_visitor_functions.py new file mode 100644 index 0000000000..da8c67ae2b --- /dev/null +++ b/temporalio/bridge/_visitor_functions.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +import asyncio +from abc import ABC, abstractmethod + +from google.protobuf.internal.containers import RepeatedCompositeFieldContainer + +from temporalio.api.common.v1.message_pb2 import Payload + +PayloadSequence = list[Payload] | RepeatedCompositeFieldContainer[Payload] + + +class VisitorFunctions(ABC): + """Functions invoked by generated payload visitors.""" + + @abstractmethod + async def visit_payload(self, payload: Payload) -> None: + """Visit a single payload.""" + ... + + @abstractmethod + async def visit_payloads(self, payloads: PayloadSequence) -> None: + """Visit a sequence of payloads together.""" + ... + + async def visit_system_nexus_envelope(self, _payload: Payload) -> None: + """Visit a recognized system Nexus envelope payload.""" + return None + + def checkpoint(self) -> int | None: + """Return a marker for visits scheduled after this point, if supported.""" + return None + + async def drain_since(self, _checkpoint: int) -> None: + """Wait for visits scheduled after ``checkpoint`` to finish.""" + return None + + +class BoundedVisitorFunctions(VisitorFunctions): + """Wraps VisitorFunctions to cap concurrent payload visits via a semaphore. + + After the full traversal, call drain() to await all in-flight tasks. + """ + + def __init__(self, inner: VisitorFunctions, concurrency_limit: int) -> None: + """Create a bounded wrapper around the given visitor functions.""" + self._inner = inner + self._sem = asyncio.Semaphore(concurrency_limit) + self._tasks: list[asyncio.Task[None]] = [] + + async def visit_payload(self, payload: Payload) -> None: + """Visit a single payload once capacity is available.""" + await self._sem.acquire() + + async def _run() -> None: + try: + await self._inner.visit_payload(payload) + finally: + self._sem.release() + + self._tasks.append(asyncio.create_task(_run())) + + async def visit_payloads(self, payloads: PayloadSequence) -> None: + """Visit a sequence of payloads once capacity is available.""" + await self._sem.acquire() + + async def _run() -> None: + try: + await self._inner.visit_payloads(payloads) + finally: + self._sem.release() + + self._tasks.append(asyncio.create_task(_run())) + + async def visit_system_nexus_envelope(self, payload: Payload) -> None: + """Visit a system Nexus envelope payload once capacity is available.""" + await self._sem.acquire() + + async def _run() -> None: + try: + await self._inner.visit_system_nexus_envelope(payload) + finally: + self._sem.release() + + self._tasks.append(asyncio.create_task(_run())) + + def checkpoint(self) -> int: + """Return a marker for tasks scheduled after this point.""" + return len(self._tasks) + + async def drain_since(self, checkpoint: int) -> None: + """Wait for tasks scheduled after ``checkpoint`` to finish. + + This lets system-envelope traversal finish mutating its decoded value + before that value is serialized again, without waiting for unrelated + visits that were already in progress. + """ + await self._drain_tasks(self._tasks[checkpoint:]) + + async def drain(self) -> None: + """Wait for all in-flight background tasks to complete. + + On cancellation or error, cancels all remaining tasks and awaits + them so their finally blocks run before this coroutine returns. + """ + await self._drain_tasks(self._tasks) + + async def _drain_tasks(self, tasks: list[asyncio.Task[None]]) -> None: + """Wait for the given tasks, cancelling all tasks if one fails.""" + if not tasks: + return + try: + await asyncio.gather(*tasks) + except BaseException: + for task in self._tasks: + task.cancel() + await asyncio.gather(*self._tasks, return_exceptions=True) + raise diff --git a/temporalio/bridge/client.py b/temporalio/bridge/client.py index d89b330fb7..10d5c6b545 100644 --- a/temporalio/bridge/client.py +++ b/temporalio/bridge/client.py @@ -8,13 +8,15 @@ from collections.abc import Mapping from dataclasses import dataclass from datetime import timedelta -from typing import Optional, Tuple, Type, TypeVar, Union +from typing import TypeVar import google.protobuf.message import temporalio.bridge.runtime import temporalio.bridge.temporal_sdk_bridge -from temporalio.bridge.temporal_sdk_bridge import RPCError +from temporalio.bridge.temporal_sdk_bridge import ( + RPCError, # type:ignore[reportUnusedImport] +) @dataclass @@ -25,6 +27,7 @@ class ClientTlsConfig: domain: str | None client_cert: bytes | None client_private_key: bytes | None + verification_server_name: str | None @dataclass @@ -55,6 +58,15 @@ class ClientHttpConnectProxyConfig: basic_auth: tuple[str, str] | None +@dataclass +class ClientDnsLoadBalancingConfig: + """Python representation of the Rust struct for configuring DNS load + balancing. + """ + + resolution_interval_millis: int + + @dataclass class ClientConfig: """Python representation of the Rust struct for configuring the client.""" @@ -69,6 +81,11 @@ class ClientConfig: client_name: str client_version: str http_connect_proxy_config: ClientHttpConnectProxyConfig | None + dns_load_balancing_config: ClientDnsLoadBalancingConfig | None + grpc_compression: str + payloads_warn_size: int + memo_warn_size: int + connect_timeout_millis: int | None = None @dataclass diff --git a/temporalio/bridge/metric.py b/temporalio/bridge/metric.py index 6bccb82ccd..4b8d7453da 100644 --- a/temporalio/bridge/metric.py +++ b/temporalio/bridge/metric.py @@ -6,7 +6,6 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Optional, Union import temporalio.bridge.runtime import temporalio.bridge.temporal_sdk_bridge diff --git a/temporalio/bridge/proto/__init__.py b/temporalio/bridge/proto/__init__.py index d4e90a2fcc..a48e10be77 100644 --- a/temporalio/bridge/proto/__init__.py +++ b/temporalio/bridge/proto/__init__.py @@ -3,6 +3,7 @@ ActivitySlotInfo, ActivityTaskCompletion, LocalActivitySlotInfo, + NamespaceInfo, NexusSlotInfo, WorkflowSlotInfo, ) @@ -12,6 +13,7 @@ "ActivitySlotInfo", "ActivityTaskCompletion", "LocalActivitySlotInfo", + "NamespaceInfo", "NexusSlotInfo", "WorkflowSlotInfo", ] diff --git a/temporalio/bridge/proto/activity_result/activity_result_pb2.py b/temporalio/bridge/proto/activity_result/activity_result_pb2.py index 77029baca3..c7ecc2a0ed 100644 --- a/temporalio/bridge/proto/activity_result/activity_result_pb2.py +++ b/temporalio/bridge/proto/activity_result/activity_result_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -20,116 +19,36 @@ from temporalio.api.common.v1 import ( message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, ) +from temporalio.api.enums.v1 import ( + failed_cause_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_failed__cause__pb2, +) from temporalio.api.failure.v1 import ( message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n7temporal/sdk/core/activity_result/activity_result.proto\x12\x17\x63oresdk.activity_result\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto"\x95\x02\n\x17\x41\x63tivityExecutionResult\x12\x35\n\tcompleted\x18\x01 \x01(\x0b\x32 .coresdk.activity_result.SuccessH\x00\x12\x32\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32 .coresdk.activity_result.FailureH\x00\x12:\n\tcancelled\x18\x03 \x01(\x0b\x32%.coresdk.activity_result.CancellationH\x00\x12I\n\x13will_complete_async\x18\x04 \x01(\x0b\x32*.coresdk.activity_result.WillCompleteAsyncH\x00\x42\x08\n\x06status"\xfc\x01\n\x12\x41\x63tivityResolution\x12\x35\n\tcompleted\x18\x01 \x01(\x0b\x32 .coresdk.activity_result.SuccessH\x00\x12\x32\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32 .coresdk.activity_result.FailureH\x00\x12:\n\tcancelled\x18\x03 \x01(\x0b\x32%.coresdk.activity_result.CancellationH\x00\x12\x35\n\x07\x62\x61\x63koff\x18\x04 \x01(\x0b\x32".coresdk.activity_result.DoBackoffH\x00\x42\x08\n\x06status":\n\x07Success\x12/\n\x06result\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload"<\n\x07\x46\x61ilure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"A\n\x0c\x43\x61ncellation\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"\x13\n\x11WillCompleteAsync"\x8d\x01\n\tDoBackoff\x12\x0f\n\x07\x61ttempt\x18\x01 \x01(\r\x12\x33\n\x10\x62\x61\x63koff_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x16original_schedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB4\xea\x02\x31Temporalio::Internal::Bridge::Api::ActivityResultb\x06proto3' -) - - -_ACTIVITYEXECUTIONRESULT = DESCRIPTOR.message_types_by_name["ActivityExecutionResult"] -_ACTIVITYRESOLUTION = DESCRIPTOR.message_types_by_name["ActivityResolution"] -_SUCCESS = DESCRIPTOR.message_types_by_name["Success"] -_FAILURE = DESCRIPTOR.message_types_by_name["Failure"] -_CANCELLATION = DESCRIPTOR.message_types_by_name["Cancellation"] -_WILLCOMPLETEASYNC = DESCRIPTOR.message_types_by_name["WillCompleteAsync"] -_DOBACKOFF = DESCRIPTOR.message_types_by_name["DoBackoff"] -ActivityExecutionResult = _reflection.GeneratedProtocolMessageType( - "ActivityExecutionResult", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYEXECUTIONRESULT, - "__module__": "temporal.sdk.core.activity_result.activity_result_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_result.ActivityExecutionResult) - }, -) -_sym_db.RegisterMessage(ActivityExecutionResult) - -ActivityResolution = _reflection.GeneratedProtocolMessageType( - "ActivityResolution", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYRESOLUTION, - "__module__": "temporal.sdk.core.activity_result.activity_result_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_result.ActivityResolution) - }, -) -_sym_db.RegisterMessage(ActivityResolution) - -Success = _reflection.GeneratedProtocolMessageType( - "Success", - (_message.Message,), - { - "DESCRIPTOR": _SUCCESS, - "__module__": "temporal.sdk.core.activity_result.activity_result_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_result.Success) - }, -) -_sym_db.RegisterMessage(Success) - -Failure = _reflection.GeneratedProtocolMessageType( - "Failure", - (_message.Message,), - { - "DESCRIPTOR": _FAILURE, - "__module__": "temporal.sdk.core.activity_result.activity_result_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_result.Failure) - }, -) -_sym_db.RegisterMessage(Failure) - -Cancellation = _reflection.GeneratedProtocolMessageType( - "Cancellation", - (_message.Message,), - { - "DESCRIPTOR": _CANCELLATION, - "__module__": "temporal.sdk.core.activity_result.activity_result_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_result.Cancellation) - }, -) -_sym_db.RegisterMessage(Cancellation) - -WillCompleteAsync = _reflection.GeneratedProtocolMessageType( - "WillCompleteAsync", - (_message.Message,), - { - "DESCRIPTOR": _WILLCOMPLETEASYNC, - "__module__": "temporal.sdk.core.activity_result.activity_result_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_result.WillCompleteAsync) - }, -) -_sym_db.RegisterMessage(WillCompleteAsync) - -DoBackoff = _reflection.GeneratedProtocolMessageType( - "DoBackoff", - (_message.Message,), - { - "DESCRIPTOR": _DOBACKOFF, - "__module__": "temporal.sdk.core.activity_result.activity_result_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_result.DoBackoff) - }, + b'\n7temporal/sdk/core/activity_result/activity_result.proto\x12\x17\x63oresdk.activity_result\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a%temporal/api/failure/v1/message.proto"\x95\x02\n\x17\x41\x63tivityExecutionResult\x12\x35\n\tcompleted\x18\x01 \x01(\x0b\x32 .coresdk.activity_result.SuccessH\x00\x12\x32\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32 .coresdk.activity_result.FailureH\x00\x12:\n\tcancelled\x18\x03 \x01(\x0b\x32%.coresdk.activity_result.CancellationH\x00\x12I\n\x13will_complete_async\x18\x04 \x01(\x0b\x32*.coresdk.activity_result.WillCompleteAsyncH\x00\x42\x08\n\x06status"\xfc\x01\n\x12\x41\x63tivityResolution\x12\x35\n\tcompleted\x18\x01 \x01(\x0b\x32 .coresdk.activity_result.SuccessH\x00\x12\x32\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32 .coresdk.activity_result.FailureH\x00\x12:\n\tcancelled\x18\x03 \x01(\x0b\x32%.coresdk.activity_result.CancellationH\x00\x12\x35\n\x07\x62\x61\x63koff\x18\x04 \x01(\x0b\x32".coresdk.activity_result.DoBackoffH\x00\x42\x08\n\x06status":\n\x07Success\x12/\n\x06result\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload"{\n\x07\x46\x61ilure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12=\n\x05\x63\x61use\x18\x02 \x01(\x0e\x32..temporal.api.enums.v1.ActivityTaskFailedCause"A\n\x0c\x43\x61ncellation\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"\x13\n\x11WillCompleteAsync"\x8d\x01\n\tDoBackoff\x12\x0f\n\x07\x61ttempt\x18\x01 \x01(\r\x12\x33\n\x10\x62\x61\x63koff_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x16original_schedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB4\xea\x02\x31Temporalio::Internal::Bridge::Api::ActivityResultb\x06proto3' ) -_sym_db.RegisterMessage(DoBackoff) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( b"\352\0021Temporalio::Internal::Bridge::Api::ActivityResult" ) - _ACTIVITYEXECUTIONRESULT._serialized_start = 227 - _ACTIVITYEXECUTIONRESULT._serialized_end = 504 - _ACTIVITYRESOLUTION._serialized_start = 507 - _ACTIVITYRESOLUTION._serialized_end = 759 - _SUCCESS._serialized_start = 761 - _SUCCESS._serialized_end = 819 - _FAILURE._serialized_start = 821 - _FAILURE._serialized_end = 881 - _CANCELLATION._serialized_start = 883 - _CANCELLATION._serialized_end = 948 - _WILLCOMPLETEASYNC._serialized_start = 950 - _WILLCOMPLETEASYNC._serialized_end = 969 - _DOBACKOFF._serialized_start = 972 - _DOBACKOFF._serialized_end = 1113 + _ACTIVITYEXECUTIONRESULT._serialized_start = 269 + _ACTIVITYEXECUTIONRESULT._serialized_end = 546 + _ACTIVITYRESOLUTION._serialized_start = 549 + _ACTIVITYRESOLUTION._serialized_end = 801 + _SUCCESS._serialized_start = 803 + _SUCCESS._serialized_end = 861 + _FAILURE._serialized_start = 863 + _FAILURE._serialized_end = 986 + _CANCELLATION._serialized_start = 988 + _CANCELLATION._serialized_end = 1053 + _WILLCOMPLETEASYNC._serialized_start = 1055 + _WILLCOMPLETEASYNC._serialized_end = 1074 + _DOBACKOFF._serialized_start = 1077 + _DOBACKOFF._serialized_end = 1218 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/bridge/proto/activity_result/activity_result_pb2.pyi b/temporalio/bridge/proto/activity_result/activity_result_pb2.pyi index bae35a91da..35647cbd3f 100644 --- a/temporalio/bridge/proto/activity_result/activity_result_pb2.pyi +++ b/temporalio/bridge/proto/activity_result/activity_result_pb2.pyi @@ -4,7 +4,7 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 @@ -12,15 +12,12 @@ import google.protobuf.message import google.protobuf.timestamp_pb2 import temporalio.api.common.v1.message_pb2 +import temporalio.api.enums.v1.failed_cause_pb2 import temporalio.api.failure.v1.message_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class ActivityExecutionResult(google.protobuf.message.Message): """Used to report activity completions to core""" @@ -48,7 +45,7 @@ class ActivityExecutionResult(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancelled", b"cancelled", "completed", @@ -63,7 +60,7 @@ class ActivityExecutionResult(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancelled", b"cancelled", "completed", @@ -77,16 +74,14 @@ class ActivityExecutionResult(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["status", b"status"] + self, oneof_group: typing.Literal["status", b"status"] ) -> ( - typing_extensions.Literal[ - "completed", "failed", "cancelled", "will_complete_async" - ] - | None + typing.Literal["completed", "failed", "cancelled", "will_complete_async"] | None ): ... global___ActivityExecutionResult = ActivityExecutionResult +@typing.final class ActivityResolution(google.protobuf.message.Message): """Used to report activity resolutions to lang. IE: This is what the activities are resolved with in the workflow. @@ -116,7 +111,7 @@ class ActivityResolution(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "backoff", b"backoff", "cancelled", @@ -131,7 +126,7 @@ class ActivityResolution(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "backoff", b"backoff", "cancelled", @@ -145,13 +140,12 @@ class ActivityResolution(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["status", b"status"] - ) -> ( - typing_extensions.Literal["completed", "failed", "cancelled", "backoff"] | None - ): ... + self, oneof_group: typing.Literal["status", b"status"] + ) -> typing.Literal["completed", "failed", "cancelled", "backoff"] | None: ... global___ActivityResolution = ActivityResolution +@typing.final class Success(google.protobuf.message.Message): """Used to report successful completion either when executing or resolving""" @@ -166,36 +160,42 @@ class Success(google.protobuf.message.Message): result: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["result", b"result"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["result", b"result"]) -> None: ... global___Success = Success +@typing.final class Failure(google.protobuf.message.Message): """Used to report activity failure either when executing or resolving""" DESCRIPTOR: google.protobuf.descriptor.Descriptor FAILURE_FIELD_NUMBER: builtins.int + CAUSE_FIELD_NUMBER: builtins.int + cause: temporalio.api.enums.v1.failed_cause_pb2.ActivityTaskFailedCause.ValueType + """Only meaningful on ActivityExecutionResult (lang -> core); ignored on ActivityResolution, + which reuses this message. + """ @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ... def __init__( self, *, failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., + cause: temporalio.api.enums.v1.failed_cause_pb2.ActivityTaskFailedCause.ValueType = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["cause", b"cause", "failure", b"failure"] ) -> None: ... global___Failure = Failure +@typing.final class Cancellation(google.protobuf.message.Message): """ Used to report cancellation from both Core and Lang. @@ -215,14 +215,13 @@ class Cancellation(google.protobuf.message.Message): failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["failure", b"failure"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["failure", b"failure"]) -> None: ... global___Cancellation = Cancellation +@typing.final class WillCompleteAsync(google.protobuf.message.Message): """ Used in ActivityExecutionResult to notify Core that this Activity will complete asynchronously. @@ -237,6 +236,7 @@ class WillCompleteAsync(google.protobuf.message.Message): global___WillCompleteAsync = WillCompleteAsync +@typing.final class DoBackoff(google.protobuf.message.Message): """ Issued when a local activity needs to retry but also wants to back off more than would be @@ -264,6 +264,7 @@ class DoBackoff(google.protobuf.message.Message): """The time the first attempt of this local activity was scheduled. Must be passed with attempt to the retry LA. """ + def __init__( self, *, @@ -273,7 +274,7 @@ class DoBackoff(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "backoff_duration", b"backoff_duration", "original_schedule_time", @@ -282,7 +283,7 @@ class DoBackoff(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "attempt", b"attempt", "backoff_duration", diff --git a/temporalio/bridge/proto/activity_task/__init__.py b/temporalio/bridge/proto/activity_task/__init__.py index 779ebf3535..9e69a0f894 100644 --- a/temporalio/bridge/proto/activity_task/__init__.py +++ b/temporalio/bridge/proto/activity_task/__init__.py @@ -4,6 +4,7 @@ ActivityTask, Cancel, Start, + WorkflowTaskAttempt, ) __all__ = [ @@ -12,4 +13,5 @@ "ActivityTask", "Cancel", "Start", + "WorkflowTaskAttempt", ] diff --git a/temporalio/bridge/proto/activity_task/activity_task_pb2.py b/temporalio/bridge/proto/activity_task/activity_task_pb2.py index abb166222b..25233f5241 100644 --- a/temporalio/bridge/proto/activity_task/activity_task_pb2.py +++ b/temporalio/bridge/proto/activity_task/activity_task_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -21,85 +19,19 @@ from temporalio.api.common.v1 import ( message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, ) +from temporalio.api.nexus.v1 import ( + message_pb2 as temporal_dot_api_dot_nexus_dot_v1_dot_message__pb2, +) from temporalio.bridge.proto.common import ( common_pb2 as temporal_dot_sdk_dot_core_dot_common_dot_common__pb2, ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n3temporal/sdk/core/activity_task/activity_task.proto\x12\x15\x63oresdk.activity_task\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/sdk/core/common/common.proto"\x8d\x01\n\x0c\x41\x63tivityTask\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12-\n\x05start\x18\x03 \x01(\x0b\x32\x1c.coresdk.activity_task.StartH\x00\x12/\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x1d.coresdk.activity_task.CancelH\x00\x42\t\n\x07variant"\xa1\x07\n\x05Start\x12\x1a\n\x12workflow_namespace\x18\x01 \x01(\t\x12\x15\n\rworkflow_type\x18\x02 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x15\n\ractivity_type\x18\x05 \x01(\t\x12\x45\n\rheader_fields\x18\x06 \x03(\x0b\x32..coresdk.activity_task.Start.HeaderFieldsEntry\x12.\n\x05input\x18\x07 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12:\n\x11heartbeat_details\x18\x08 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x32\n\x0escheduled_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x1e\x63urrent_attempt_scheduled_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x0c \x01(\r\x12<\n\x19schedule_to_close_timeout\x18\r \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x0f \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x10 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x32\n\x08priority\x18\x12 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12\x10\n\x08is_local\x18\x11 \x01(\x08\x1aT\n\x11HeaderFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x8a\x01\n\x06\x43\x61ncel\x12;\n\x06reason\x18\x01 \x01(\x0e\x32+.coresdk.activity_task.ActivityCancelReason\x12\x43\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x32.coresdk.activity_task.ActivityCancellationDetails"\xa0\x01\n\x1b\x41\x63tivityCancellationDetails\x12\x14\n\x0cis_not_found\x18\x01 \x01(\x08\x12\x14\n\x0cis_cancelled\x18\x02 \x01(\x08\x12\x11\n\tis_paused\x18\x03 \x01(\x08\x12\x14\n\x0cis_timed_out\x18\x04 \x01(\x08\x12\x1a\n\x12is_worker_shutdown\x18\x05 \x01(\x08\x12\x10\n\x08is_reset\x18\x06 \x01(\x08*o\n\x14\x41\x63tivityCancelReason\x12\r\n\tNOT_FOUND\x10\x00\x12\r\n\tCANCELLED\x10\x01\x12\r\n\tTIMED_OUT\x10\x02\x12\x13\n\x0fWORKER_SHUTDOWN\x10\x03\x12\n\n\x06PAUSED\x10\x04\x12\t\n\x05RESET\x10\x05\x42\x32\xea\x02/Temporalio::Internal::Bridge::Api::ActivityTaskb\x06proto3' -) - -_ACTIVITYCANCELREASON = DESCRIPTOR.enum_types_by_name["ActivityCancelReason"] -ActivityCancelReason = enum_type_wrapper.EnumTypeWrapper(_ACTIVITYCANCELREASON) -NOT_FOUND = 0 -CANCELLED = 1 -TIMED_OUT = 2 -WORKER_SHUTDOWN = 3 -PAUSED = 4 -RESET = 5 - - -_ACTIVITYTASK = DESCRIPTOR.message_types_by_name["ActivityTask"] -_START = DESCRIPTOR.message_types_by_name["Start"] -_START_HEADERFIELDSENTRY = _START.nested_types_by_name["HeaderFieldsEntry"] -_CANCEL = DESCRIPTOR.message_types_by_name["Cancel"] -_ACTIVITYCANCELLATIONDETAILS = DESCRIPTOR.message_types_by_name[ - "ActivityCancellationDetails" -] -ActivityTask = _reflection.GeneratedProtocolMessageType( - "ActivityTask", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTASK, - "__module__": "temporal.sdk.core.activity_task.activity_task_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_task.ActivityTask) - }, -) -_sym_db.RegisterMessage(ActivityTask) - -Start = _reflection.GeneratedProtocolMessageType( - "Start", - (_message.Message,), - { - "HeaderFieldsEntry": _reflection.GeneratedProtocolMessageType( - "HeaderFieldsEntry", - (_message.Message,), - { - "DESCRIPTOR": _START_HEADERFIELDSENTRY, - "__module__": "temporal.sdk.core.activity_task.activity_task_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_task.Start.HeaderFieldsEntry) - }, - ), - "DESCRIPTOR": _START, - "__module__": "temporal.sdk.core.activity_task.activity_task_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_task.Start) - }, -) -_sym_db.RegisterMessage(Start) -_sym_db.RegisterMessage(Start.HeaderFieldsEntry) - -Cancel = _reflection.GeneratedProtocolMessageType( - "Cancel", - (_message.Message,), - { - "DESCRIPTOR": _CANCEL, - "__module__": "temporal.sdk.core.activity_task.activity_task_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_task.Cancel) - }, -) -_sym_db.RegisterMessage(Cancel) - -ActivityCancellationDetails = _reflection.GeneratedProtocolMessageType( - "ActivityCancellationDetails", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYCANCELLATIONDETAILS, - "__module__": "temporal.sdk.core.activity_task.activity_task_pb2", - # @@protoc_insertion_point(class_scope:coresdk.activity_task.ActivityCancellationDetails) - }, + b'\n3temporal/sdk/core/activity_task/activity_task.proto\x12\x15\x63oresdk.activity_task\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a#temporal/api/nexus/v1/message.proto\x1a%temporal/sdk/core/common/common.proto"\x8d\x01\n\x0c\x41\x63tivityTask\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12-\n\x05start\x18\x03 \x01(\x0b\x32\x1c.coresdk.activity_task.StartH\x00\x12/\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x1d.coresdk.activity_task.CancelH\x00\x42\t\n\x07variant"\xdb\x08\n\x05Start\x12\x1a\n\x12workflow_namespace\x18\x01 \x01(\t\x12\x15\n\rworkflow_type\x18\x02 \x01(\t\x12\x45\n\x12workflow_execution\x18\x03 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x13\n\x0b\x61\x63tivity_id\x18\x04 \x01(\t\x12\x15\n\ractivity_type\x18\x05 \x01(\t\x12\x45\n\rheader_fields\x18\x06 \x03(\x0b\x32..coresdk.activity_task.Start.HeaderFieldsEntry\x12.\n\x05input\x18\x07 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12:\n\x11heartbeat_details\x18\x08 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x32\n\x0escheduled_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x1e\x63urrent_attempt_scheduled_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cstarted_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x61ttempt\x18\x0c \x01(\r\x12<\n\x19schedule_to_close_timeout\x18\r \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x0f \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x10 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x32\n\x08priority\x18\x12 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12\x10\n\x08is_local\x18\x11 \x01(\x08\x12\x0e\n\x06run_id\x18\x13 \x01(\t\x12\x65\n&propagated_nexus_serialization_context\x18\x14 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext\x12\x41\n\rworkflow_task\x18\x15 \x01(\x0b\x32*.coresdk.activity_task.WorkflowTaskAttempt\x1aT\n\x11HeaderFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x80\x02\n\x13WorkflowTaskAttempt\x12\x18\n\x10started_event_id\x18\x01 \x01(\x03\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\r\x12\x30\n\x0cstarted_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x19previous_started_event_id\x18\x04 \x01(\x03\x12\x14\n\x0c\x66\x61iled_tasks\x18\x05 \x03(\x03\x12\x18\n\x10previous_attempt\x18\x06 \x01(\r\x12\x39\n\x15previous_started_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"\x8a\x01\n\x06\x43\x61ncel\x12;\n\x06reason\x18\x01 \x01(\x0e\x32+.coresdk.activity_task.ActivityCancelReason\x12\x43\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x32.coresdk.activity_task.ActivityCancellationDetails"\xa0\x01\n\x1b\x41\x63tivityCancellationDetails\x12\x14\n\x0cis_not_found\x18\x01 \x01(\x08\x12\x14\n\x0cis_cancelled\x18\x02 \x01(\x08\x12\x11\n\tis_paused\x18\x03 \x01(\x08\x12\x14\n\x0cis_timed_out\x18\x04 \x01(\x08\x12\x1a\n\x12is_worker_shutdown\x18\x05 \x01(\x08\x12\x10\n\x08is_reset\x18\x06 \x01(\x08*o\n\x14\x41\x63tivityCancelReason\x12\r\n\tNOT_FOUND\x10\x00\x12\r\n\tCANCELLED\x10\x01\x12\r\n\tTIMED_OUT\x10\x02\x12\x13\n\x0fWORKER_SHUTDOWN\x10\x03\x12\n\n\x06PAUSED\x10\x04\x12\t\n\x05RESET\x10\x05\x42\x32\xea\x02/Temporalio::Internal::Bridge::Api::ActivityTaskb\x06proto3' ) -_sym_db.RegisterMessage(ActivityCancellationDetails) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( @@ -107,16 +39,18 @@ ) _START_HEADERFIELDSENTRY._options = None _START_HEADERFIELDSENTRY._serialized_options = b"8\001" - _ACTIVITYCANCELREASON._serialized_start = 1600 - _ACTIVITYCANCELREASON._serialized_end = 1711 - _ACTIVITYTASK._serialized_start = 221 - _ACTIVITYTASK._serialized_end = 362 - _START._serialized_start = 365 - _START._serialized_end = 1294 - _START_HEADERFIELDSENTRY._serialized_start = 1210 - _START_HEADERFIELDSENTRY._serialized_end = 1294 - _CANCEL._serialized_start = 1297 - _CANCEL._serialized_end = 1435 - _ACTIVITYCANCELLATIONDETAILS._serialized_start = 1438 - _ACTIVITYCANCELLATIONDETAILS._serialized_end = 1598 + _ACTIVITYCANCELREASON._serialized_start = 2082 + _ACTIVITYCANCELREASON._serialized_end = 2193 + _ACTIVITYTASK._serialized_start = 258 + _ACTIVITYTASK._serialized_end = 399 + _START._serialized_start = 402 + _START._serialized_end = 1517 + _START_HEADERFIELDSENTRY._serialized_start = 1433 + _START_HEADERFIELDSENTRY._serialized_end = 1517 + _WORKFLOWTASKATTEMPT._serialized_start = 1520 + _WORKFLOWTASKATTEMPT._serialized_end = 1776 + _CANCEL._serialized_start = 1779 + _CANCEL._serialized_end = 1917 + _ACTIVITYCANCELLATIONDETAILS._serialized_start = 1920 + _ACTIVITYCANCELLATIONDETAILS._serialized_end = 2080 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/bridge/proto/activity_task/activity_task_pb2.pyi b/temporalio/bridge/proto/activity_task/activity_task_pb2.pyi index 6d977759c5..345b0a6b1e 100644 --- a/temporalio/bridge/proto/activity_task/activity_task_pb2.pyi +++ b/temporalio/bridge/proto/activity_task/activity_task_pb2.pyi @@ -18,6 +18,7 @@ import google.protobuf.message import google.protobuf.timestamp_pb2 import temporalio.api.common.v1.message_pb2 +import temporalio.api.nexus.v1.message_pb2 if sys.version_info >= (3, 10): import typing as typing_extensions @@ -35,7 +36,7 @@ class _ActivityCancelReasonEnumTypeWrapper( _ActivityCancelReason.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor NOT_FOUND: _ActivityCancelReason.ValueType # 0 """The activity no longer exists according to server (may be already completed)""" @@ -68,6 +69,7 @@ RESET: ActivityCancelReason.ValueType # 5 """Activity was reset""" global___ActivityCancelReason = ActivityCancelReason +@typing.final class ActivityTask(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -79,9 +81,11 @@ class ActivityTask(google.protobuf.message.Message): @property def start(self) -> global___Start: """Start activity execution.""" + @property def cancel(self) -> global___Cancel: """Attempt to cancel activity execution.""" + def __init__( self, *, @@ -91,13 +95,13 @@ class ActivityTask(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel", b"cancel", "start", b"start", "variant", b"variant" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel", b"cancel", "start", @@ -109,16 +113,18 @@ class ActivityTask(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["start", "cancel"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["start", "cancel"] | None: ... global___ActivityTask = ActivityTask +@typing.final class Start(google.protobuf.message.Message): """Begin executing an activity""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeaderFieldsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -134,11 +140,10 @@ class Start(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... WORKFLOW_NAMESPACE_FIELD_NUMBER: builtins.int @@ -159,19 +164,30 @@ class Start(google.protobuf.message.Message): RETRY_POLICY_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int IS_LOCAL_FIELD_NUMBER: builtins.int + RUN_ID_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int + WORKFLOW_TASK_FIELD_NUMBER: builtins.int workflow_namespace: builtins.str """The namespace the workflow lives in""" workflow_type: builtins.str """The workflow's type name or function identifier""" + activity_id: builtins.str + """The activity's ID""" + activity_type: builtins.str + """The activity's type name or function identifier""" + attempt: builtins.int + is_local: builtins.bool + """Set to true if this is a local activity. Note that heartbeating does not apply to local + activities. + """ + run_id: builtins.str + """Run ID of this activity execution. Only set for standalone activities.""" @property def workflow_execution( self, ) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: """The workflow execution which requested this activity""" - activity_id: builtins.str - """The activity's ID""" - activity_type: builtins.str - """The activity's type name or function identifier""" + @property def header_fields( self, @@ -185,6 +201,7 @@ class Start(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Payload ]: """Arguments to the activity""" + @property def heartbeat_details( self, @@ -192,38 +209,57 @@ class Start(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Payload ]: """The last details that were recorded by a heartbeat when this task was generated""" + @property def scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When the task was *first* scheduled""" + @property def current_attempt_scheduled_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When this current attempt at the task was scheduled""" + @property def started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When this attempt was started, which is to say when core received it by polling.""" - attempt: builtins.int + @property def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout from the first schedule time to completion""" + @property def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout from starting an attempt to reporting its result""" + @property def heartbeat_timeout(self) -> google.protobuf.duration_pb2.Duration: """If set a heartbeat must be reported within this interval""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """This is an actual retry policy the service uses. It can be different from the one provided (or not) during activity scheduling as the service can override the provided one in case its values are not specified or exceed configured system limits. """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority of this activity. Local activities will always have this field set to the default.""" - is_local: builtins.bool - """Set to true if this is a local activity. Note that heartbeating does not apply to local - activities. - """ + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context of the Nexus operation handler that started this activity, if any. + Only set for standalone activities. Lang should use it to serialize the activity's result and + failure, which are returned to the Nexus caller. + """ + + @property + def workflow_task(self) -> global___WorkflowTaskAttempt: + """For a local activity, the workflow task in which Core dispatched this execution. Retries that + Core runs locally keep the value. Unset for other activities. + """ + def __init__( self, *, @@ -254,16 +290,22 @@ class Start(google.protobuf.message.Message): retry_policy: temporalio.api.common.v1.message_pb2.RetryPolicy | None = ..., priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., is_local: builtins.bool = ..., + run_id: builtins.str = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., + workflow_task: global___WorkflowTaskAttempt | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "current_attempt_scheduled_time", b"current_attempt_scheduled_time", "heartbeat_timeout", b"heartbeat_timeout", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "retry_policy", b"retry_policy", "schedule_to_close_timeout", @@ -276,11 +318,13 @@ class Start(google.protobuf.message.Message): b"started_time", "workflow_execution", b"workflow_execution", + "workflow_task", + b"workflow_task", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "activity_type", @@ -301,8 +345,12 @@ class Start(google.protobuf.message.Message): b"is_local", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "retry_policy", b"retry_policy", + "run_id", + b"run_id", "schedule_to_close_timeout", b"schedule_to_close_timeout", "scheduled_time", @@ -315,6 +363,8 @@ class Start(google.protobuf.message.Message): b"workflow_execution", "workflow_namespace", b"workflow_namespace", + "workflow_task", + b"workflow_task", "workflow_type", b"workflow_type", ], @@ -322,6 +372,87 @@ class Start(google.protobuf.message.Message): global___Start = Start +@typing.final +class WorkflowTaskAttempt(google.protobuf.message.Message): + """One attempt of a workflow task, from the poll response and the history of that attempt.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + STARTED_EVENT_ID_FIELD_NUMBER: builtins.int + ATTEMPT_FIELD_NUMBER: builtins.int + STARTED_TIME_FIELD_NUMBER: builtins.int + PREVIOUS_STARTED_EVENT_ID_FIELD_NUMBER: builtins.int + FAILED_TASKS_FIELD_NUMBER: builtins.int + PREVIOUS_ATTEMPT_FIELD_NUMBER: builtins.int + PREVIOUS_STARTED_TIME_FIELD_NUMBER: builtins.int + started_event_id: builtins.int + """The event id of the task's WorkflowTaskStarted event.""" + attempt: builtins.int + previous_started_event_id: builtins.int + """The started event id of the run's last completed workflow task, from the poll response. + 0 when no task of the run has completed. + """ + previous_attempt: builtins.int + """The attempt and the started time of the task at previous_started_event_id, from its + WorkflowTaskScheduled and WorkflowTaskStarted events. Unset when no task has completed. + """ + @property + def started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: + """When the server started the task.""" + + @property + def failed_tasks( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: + """The started event ids of the run's last 100 failed and timed out workflow tasks in history, + in event order. The cap keeps each start small. A transient attempt has no such event. + """ + + @property + def previous_started_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + def __init__( + self, + *, + started_event_id: builtins.int = ..., + attempt: builtins.int = ..., + started_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + previous_started_event_id: builtins.int = ..., + failed_tasks: collections.abc.Iterable[builtins.int] | None = ..., + previous_attempt: builtins.int = ..., + previous_started_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField( + self, + field_name: typing.Literal[ + "previous_started_time", + b"previous_started_time", + "started_time", + b"started_time", + ], + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "attempt", + b"attempt", + "failed_tasks", + b"failed_tasks", + "previous_attempt", + b"previous_attempt", + "previous_started_event_id", + b"previous_started_event_id", + "previous_started_time", + b"previous_started_time", + "started_event_id", + b"started_event_id", + "started_time", + b"started_time", + ], + ) -> None: ... + +global___WorkflowTaskAttempt = WorkflowTaskAttempt + +@typing.final class Cancel(google.protobuf.message.Message): """Attempt to cancel a running activity""" @@ -334,6 +465,7 @@ class Cancel(google.protobuf.message.Message): @property def details(self) -> global___ActivityCancellationDetails: """Activity cancellation details, surfaces all cancellation reasons.""" + def __init__( self, *, @@ -341,17 +473,15 @@ class Cancel(google.protobuf.message.Message): details: global___ActivityCancellationDetails | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["details", b"details"] + self, field_name: typing.Literal["details", b"details"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "details", b"details", "reason", b"reason" - ], + self, field_name: typing.Literal["details", b"details", "reason", b"reason"] ) -> None: ... global___Cancel = Cancel +@typing.final class ActivityCancellationDetails(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -379,7 +509,7 @@ class ActivityCancellationDetails(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "is_cancelled", b"is_cancelled", "is_not_found", diff --git a/temporalio/bridge/proto/child_workflow/child_workflow_pb2.py b/temporalio/bridge/proto/child_workflow/child_workflow_pb2.py index e8e485e02f..dd45fe6ddf 100644 --- a/temporalio/bridge/proto/child_workflow/child_workflow_pb2.py +++ b/temporalio/bridge/proto/child_workflow/child_workflow_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -26,83 +24,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n5temporal/sdk/core/child_workflow/child_workflow.proto\x12\x16\x63oresdk.child_workflow\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a%temporal/sdk/core/common/common.proto"\xc3\x01\n\x13\x43hildWorkflowResult\x12\x34\n\tcompleted\x18\x01 \x01(\x0b\x32\x1f.coresdk.child_workflow.SuccessH\x00\x12\x31\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32\x1f.coresdk.child_workflow.FailureH\x00\x12\x39\n\tcancelled\x18\x03 \x01(\x0b\x32$.coresdk.child_workflow.CancellationH\x00\x42\x08\n\x06status":\n\x07Success\x12/\n\x06result\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload"<\n\x07\x46\x61ilure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"A\n\x0c\x43\x61ncellation\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure*\xa4\x01\n\x11ParentClosePolicy\x12#\n\x1fPARENT_CLOSE_POLICY_UNSPECIFIED\x10\x00\x12!\n\x1dPARENT_CLOSE_POLICY_TERMINATE\x10\x01\x12\x1f\n\x1bPARENT_CLOSE_POLICY_ABANDON\x10\x02\x12&\n"PARENT_CLOSE_POLICY_REQUEST_CANCEL\x10\x03*\xae\x01\n&StartChildWorkflowExecutionFailedCause\x12;\n7START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED\x10\x00\x12G\nCSTART_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS\x10\x01*~\n\x1d\x43hildWorkflowCancellationType\x12\x0b\n\x07\x41\x42\x41NDON\x10\x00\x12\x0e\n\nTRY_CANCEL\x10\x01\x12\x1f\n\x1bWAIT_CANCELLATION_COMPLETED\x10\x02\x12\x1f\n\x1bWAIT_CANCELLATION_REQUESTED\x10\x03\x42\x33\xea\x02\x30Temporalio::Internal::Bridge::Api::ChildWorkflowb\x06proto3' + b'\n5temporal/sdk/core/child_workflow/child_workflow.proto\x12\x16\x63oresdk.child_workflow\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a%temporal/sdk/core/common/common.proto"\xc3\x01\n\x13\x43hildWorkflowResult\x12\x34\n\tcompleted\x18\x01 \x01(\x0b\x32\x1f.coresdk.child_workflow.SuccessH\x00\x12\x31\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32\x1f.coresdk.child_workflow.FailureH\x00\x12\x39\n\tcancelled\x18\x03 \x01(\x0b\x32$.coresdk.child_workflow.CancellationH\x00\x42\x08\n\x06status":\n\x07Success\x12/\n\x06result\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload"<\n\x07\x46\x61ilure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"A\n\x0c\x43\x61ncellation\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure*\xa4\x01\n\x11ParentClosePolicy\x12#\n\x1fPARENT_CLOSE_POLICY_UNSPECIFIED\x10\x00\x12!\n\x1dPARENT_CLOSE_POLICY_TERMINATE\x10\x01\x12\x1f\n\x1bPARENT_CLOSE_POLICY_ABANDON\x10\x02\x12&\n"PARENT_CLOSE_POLICY_REQUEST_CANCEL\x10\x03*\xc0\x02\n&StartChildWorkflowExecutionFailedCause\x12;\n7START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED\x10\x00\x12G\nCSTART_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS\x10\x01\x12\x43\n?START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND\x10\x02\x12K\nGSTART_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID_VERSIONING_OVERRIDE\x10\x03*~\n\x1d\x43hildWorkflowCancellationType\x12\x0b\n\x07\x41\x42\x41NDON\x10\x00\x12\x0e\n\nTRY_CANCEL\x10\x01\x12\x1f\n\x1bWAIT_CANCELLATION_COMPLETED\x10\x02\x12\x1f\n\x1bWAIT_CANCELLATION_REQUESTED\x10\x03\x42\x33\xea\x02\x30Temporalio::Internal::Bridge::Api::ChildWorkflowb\x06proto3' ) -_PARENTCLOSEPOLICY = DESCRIPTOR.enum_types_by_name["ParentClosePolicy"] -ParentClosePolicy = enum_type_wrapper.EnumTypeWrapper(_PARENTCLOSEPOLICY) -_STARTCHILDWORKFLOWEXECUTIONFAILEDCAUSE = DESCRIPTOR.enum_types_by_name[ - "StartChildWorkflowExecutionFailedCause" -] -StartChildWorkflowExecutionFailedCause = enum_type_wrapper.EnumTypeWrapper( - _STARTCHILDWORKFLOWEXECUTIONFAILEDCAUSE -) -_CHILDWORKFLOWCANCELLATIONTYPE = DESCRIPTOR.enum_types_by_name[ - "ChildWorkflowCancellationType" -] -ChildWorkflowCancellationType = enum_type_wrapper.EnumTypeWrapper( - _CHILDWORKFLOWCANCELLATIONTYPE -) -PARENT_CLOSE_POLICY_UNSPECIFIED = 0 -PARENT_CLOSE_POLICY_TERMINATE = 1 -PARENT_CLOSE_POLICY_ABANDON = 2 -PARENT_CLOSE_POLICY_REQUEST_CANCEL = 3 -START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED = 0 -START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS = 1 -ABANDON = 0 -TRY_CANCEL = 1 -WAIT_CANCELLATION_COMPLETED = 2 -WAIT_CANCELLATION_REQUESTED = 3 - - -_CHILDWORKFLOWRESULT = DESCRIPTOR.message_types_by_name["ChildWorkflowResult"] -_SUCCESS = DESCRIPTOR.message_types_by_name["Success"] -_FAILURE = DESCRIPTOR.message_types_by_name["Failure"] -_CANCELLATION = DESCRIPTOR.message_types_by_name["Cancellation"] -ChildWorkflowResult = _reflection.GeneratedProtocolMessageType( - "ChildWorkflowResult", - (_message.Message,), - { - "DESCRIPTOR": _CHILDWORKFLOWRESULT, - "__module__": "temporal.sdk.core.child_workflow.child_workflow_pb2", - # @@protoc_insertion_point(class_scope:coresdk.child_workflow.ChildWorkflowResult) - }, -) -_sym_db.RegisterMessage(ChildWorkflowResult) - -Success = _reflection.GeneratedProtocolMessageType( - "Success", - (_message.Message,), - { - "DESCRIPTOR": _SUCCESS, - "__module__": "temporal.sdk.core.child_workflow.child_workflow_pb2", - # @@protoc_insertion_point(class_scope:coresdk.child_workflow.Success) - }, -) -_sym_db.RegisterMessage(Success) - -Failure = _reflection.GeneratedProtocolMessageType( - "Failure", - (_message.Message,), - { - "DESCRIPTOR": _FAILURE, - "__module__": "temporal.sdk.core.child_workflow.child_workflow_pb2", - # @@protoc_insertion_point(class_scope:coresdk.child_workflow.Failure) - }, -) -_sym_db.RegisterMessage(Failure) - -Cancellation = _reflection.GeneratedProtocolMessageType( - "Cancellation", - (_message.Message,), - { - "DESCRIPTOR": _CANCELLATION, - "__module__": "temporal.sdk.core.child_workflow.child_workflow_pb2", - # @@protoc_insertion_point(class_scope:coresdk.child_workflow.Cancellation) - }, -) -_sym_db.RegisterMessage(Cancellation) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( @@ -111,9 +37,9 @@ _PARENTCLOSEPOLICY._serialized_start = 585 _PARENTCLOSEPOLICY._serialized_end = 749 _STARTCHILDWORKFLOWEXECUTIONFAILEDCAUSE._serialized_start = 752 - _STARTCHILDWORKFLOWEXECUTIONFAILEDCAUSE._serialized_end = 926 - _CHILDWORKFLOWCANCELLATIONTYPE._serialized_start = 928 - _CHILDWORKFLOWCANCELLATIONTYPE._serialized_end = 1054 + _STARTCHILDWORKFLOWEXECUTIONFAILEDCAUSE._serialized_end = 1072 + _CHILDWORKFLOWCANCELLATIONTYPE._serialized_start = 1074 + _CHILDWORKFLOWCANCELLATIONTYPE._serialized_end = 1200 _CHILDWORKFLOWRESULT._serialized_start = 198 _CHILDWORKFLOWRESULT._serialized_end = 393 _SUCCESS._serialized_start = 395 diff --git a/temporalio/bridge/proto/child_workflow/child_workflow_pb2.pyi b/temporalio/bridge/proto/child_workflow/child_workflow_pb2.pyi index a41c5b2be5..27a4edfd52 100644 --- a/temporalio/bridge/proto/child_workflow/child_workflow_pb2.pyi +++ b/temporalio/bridge/proto/child_workflow/child_workflow_pb2.pyi @@ -30,7 +30,7 @@ class _ParentClosePolicyEnumTypeWrapper( _ParentClosePolicy.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor PARENT_CLOSE_POLICY_UNSPECIFIED: _ParentClosePolicy.ValueType # 0 """Let's the server set the default.""" @@ -67,7 +67,7 @@ class _StartChildWorkflowExecutionFailedCauseEnumTypeWrapper( _StartChildWorkflowExecutionFailedCause.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED: ( _StartChildWorkflowExecutionFailedCause.ValueType @@ -75,6 +75,12 @@ class _StartChildWorkflowExecutionFailedCauseEnumTypeWrapper( START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS: ( _StartChildWorkflowExecutionFailedCause.ValueType ) # 1 + START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND: ( + _StartChildWorkflowExecutionFailedCause.ValueType + ) # 2 + START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID_VERSIONING_OVERRIDE: ( + _StartChildWorkflowExecutionFailedCause.ValueType + ) # 3 class StartChildWorkflowExecutionFailedCause( _StartChildWorkflowExecutionFailedCause, @@ -88,6 +94,12 @@ START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED: ( START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS: ( StartChildWorkflowExecutionFailedCause.ValueType ) # 1 +START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND: ( + StartChildWorkflowExecutionFailedCause.ValueType +) # 2 +START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID_VERSIONING_OVERRIDE: ( + StartChildWorkflowExecutionFailedCause.ValueType +) # 3 global___StartChildWorkflowExecutionFailedCause = StartChildWorkflowExecutionFailedCause class _ChildWorkflowCancellationType: @@ -99,7 +111,7 @@ class _ChildWorkflowCancellationTypeEnumTypeWrapper( _ChildWorkflowCancellationType.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor ABANDON: _ChildWorkflowCancellationType.ValueType # 0 """Do not request cancellation of the child workflow if already scheduled""" @@ -126,6 +138,7 @@ WAIT_CANCELLATION_REQUESTED: ChildWorkflowCancellationType.ValueType # 3 """Request cancellation of the child and wait for confirmation that the request was received.""" global___ChildWorkflowCancellationType = ChildWorkflowCancellationType +@typing.final class ChildWorkflowResult(google.protobuf.message.Message): """Used by core to resolve child workflow executions.""" @@ -149,7 +162,7 @@ class ChildWorkflowResult(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancelled", b"cancelled", "completed", @@ -162,7 +175,7 @@ class ChildWorkflowResult(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancelled", b"cancelled", "completed", @@ -174,11 +187,12 @@ class ChildWorkflowResult(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["status", b"status"] - ) -> typing_extensions.Literal["completed", "failed", "cancelled"] | None: ... + self, oneof_group: typing.Literal["status", b"status"] + ) -> typing.Literal["completed", "failed", "cancelled"] | None: ... global___ChildWorkflowResult = ChildWorkflowResult +@typing.final class Success(google.protobuf.message.Message): """Used in ChildWorkflowResult to report successful completion.""" @@ -193,14 +207,13 @@ class Success(google.protobuf.message.Message): result: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["result", b"result"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["result", b"result"]) -> None: ... global___Success = Success +@typing.final class Failure(google.protobuf.message.Message): """Used in ChildWorkflowResult to report non successful outcomes such as application failures, timeouts, terminations, and cancellations. @@ -217,14 +230,13 @@ class Failure(google.protobuf.message.Message): failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["failure", b"failure"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["failure", b"failure"]) -> None: ... global___Failure = Failure +@typing.final class Cancellation(google.protobuf.message.Message): """Used in ChildWorkflowResult to report cancellation. Failure should be ChildWorkflowFailure with a CanceledFailure cause. @@ -241,10 +253,8 @@ class Cancellation(google.protobuf.message.Message): failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["failure", b"failure"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["failure", b"failure"]) -> None: ... global___Cancellation = Cancellation diff --git a/temporalio/bridge/proto/common/__init__.py b/temporalio/bridge/proto/common/__init__.py index 5622fffb81..a8506090de 100644 --- a/temporalio/bridge/proto/common/__init__.py +++ b/temporalio/bridge/proto/common/__init__.py @@ -1,10 +1,12 @@ from .common_pb2 import ( + ExternalStorageMetrics, NamespacedWorkflowExecution, VersioningIntent, WorkerDeploymentVersion, ) __all__ = [ + "ExternalStorageMetrics", "NamespacedWorkflowExecution", "VersioningIntent", "WorkerDeploymentVersion", diff --git a/temporalio/bridge/proto/common/common_pb2.py b/temporalio/bridge/proto/common/common_pb2.py index c56456fceb..0b9a5c8169 100644 --- a/temporalio/bridge/proto/common/common_pb2.py +++ b/temporalio/bridge/proto/common/common_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -18,51 +16,22 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n%temporal/sdk/core/common/common.proto\x12\x0e\x63oresdk.common\x1a\x1egoogle/protobuf/duration.proto"U\n\x1bNamespacedWorkflowExecution\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t"D\n\x17WorkerDeploymentVersion\x12\x17\n\x0f\x64\x65ployment_name\x18\x01 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t*@\n\x10VersioningIntent\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nCOMPATIBLE\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x42,\xea\x02)Temporalio::Internal::Bridge::Api::Commonb\x06proto3' + b'\n%temporal/sdk/core/common/common.proto\x12\x0e\x63oresdk.common\x1a\x1egoogle/protobuf/duration.proto"U\n\x1bNamespacedWorkflowExecution\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t"D\n\x17WorkerDeploymentVersion\x12\x17\n\x0f\x64\x65ployment_name\x18\x01 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t"\x92\x01\n\x16\x45xternalStorageMetrics\x12\x15\n\rpayload_count\x18\x01 \x01(\x04\x12\x18\n\x10total_size_bytes\x18\x02 \x01(\x04\x12\x31\n\x0etotal_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0c\x64river_names\x18\x04 \x03(\t*@\n\x10VersioningIntent\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nCOMPATIBLE\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x42,\xea\x02)Temporalio::Internal::Bridge::Api::Commonb\x06proto3' ) -_VERSIONINGINTENT = DESCRIPTOR.enum_types_by_name["VersioningIntent"] -VersioningIntent = enum_type_wrapper.EnumTypeWrapper(_VERSIONINGINTENT) -UNSPECIFIED = 0 -COMPATIBLE = 1 -DEFAULT = 2 - - -_NAMESPACEDWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name[ - "NamespacedWorkflowExecution" -] -_WORKERDEPLOYMENTVERSION = DESCRIPTOR.message_types_by_name["WorkerDeploymentVersion"] -NamespacedWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "NamespacedWorkflowExecution", - (_message.Message,), - { - "DESCRIPTOR": _NAMESPACEDWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.common.common_pb2", - # @@protoc_insertion_point(class_scope:coresdk.common.NamespacedWorkflowExecution) - }, -) -_sym_db.RegisterMessage(NamespacedWorkflowExecution) - -WorkerDeploymentVersion = _reflection.GeneratedProtocolMessageType( - "WorkerDeploymentVersion", - (_message.Message,), - { - "DESCRIPTOR": _WORKERDEPLOYMENTVERSION, - "__module__": "temporal.sdk.core.common.common_pb2", - # @@protoc_insertion_point(class_scope:coresdk.common.WorkerDeploymentVersion) - }, -) -_sym_db.RegisterMessage(WorkerDeploymentVersion) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( b"\352\002)Temporalio::Internal::Bridge::Api::Common" ) - _VERSIONINGINTENT._serialized_start = 246 - _VERSIONINGINTENT._serialized_end = 310 + _VERSIONINGINTENT._serialized_start = 395 + _VERSIONINGINTENT._serialized_end = 459 _NAMESPACEDWORKFLOWEXECUTION._serialized_start = 89 _NAMESPACEDWORKFLOWEXECUTION._serialized_end = 174 _WORKERDEPLOYMENTVERSION._serialized_start = 176 _WORKERDEPLOYMENTVERSION._serialized_end = 244 + _EXTERNALSTORAGEMETRICS._serialized_start = 247 + _EXTERNALSTORAGEMETRICS._serialized_end = 393 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/bridge/proto/common/common_pb2.pyi b/temporalio/bridge/proto/common/common_pb2.pyi index 739a129e1c..7c2b057024 100644 --- a/temporalio/bridge/proto/common/common_pb2.pyi +++ b/temporalio/bridge/proto/common/common_pb2.pyi @@ -4,10 +4,13 @@ isort:skip_file """ import builtins +import collections.abc import sys import typing import google.protobuf.descriptor +import google.protobuf.duration_pb2 +import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message @@ -27,7 +30,7 @@ class _VersioningIntentEnumTypeWrapper( _VersioningIntent.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor UNSPECIFIED: _VersioningIntent.ValueType # 0 """Indicates that core should choose the most sensible default behavior for the type of @@ -65,6 +68,7 @@ build ID. """ global___VersioningIntent = VersioningIntent +@typing.final class NamespacedWorkflowExecution(google.protobuf.message.Message): """Identifying information about a particular workflow execution, including namespace""" @@ -88,7 +92,7 @@ class NamespacedWorkflowExecution(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "namespace", b"namespace", "run_id", @@ -100,6 +104,7 @@ class NamespacedWorkflowExecution(google.protobuf.message.Message): global___NamespacedWorkflowExecution = NamespacedWorkflowExecution +@typing.final class WorkerDeploymentVersion(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -115,9 +120,62 @@ class WorkerDeploymentVersion(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "build_id", b"build_id", "deployment_name", b"deployment_name" ], ) -> None: ... global___WorkerDeploymentVersion = WorkerDeploymentVersion + +@typing.final +class ExternalStorageMetrics(google.protobuf.message.Message): + """Metrics for a set of external payload storage operations (all uploads and downloads) + performed while processing a task, so core can emit unified logging and metrics. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PAYLOAD_COUNT_FIELD_NUMBER: builtins.int + TOTAL_SIZE_BYTES_FIELD_NUMBER: builtins.int + TOTAL_DURATION_FIELD_NUMBER: builtins.int + DRIVER_NAMES_FIELD_NUMBER: builtins.int + payload_count: builtins.int + """Number of payloads stored or retrieved externally.""" + total_size_bytes: builtins.int + """Total size in bytes of the externally stored or retrieved payloads.""" + @property + def total_duration(self) -> google.protobuf.duration_pb2.Duration: + """Wall-clock time spent on the external storage operations.""" + + @property + def driver_names( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """Names of the drivers that participated in the operations.""" + + def __init__( + self, + *, + payload_count: builtins.int = ..., + total_size_bytes: builtins.int = ..., + total_duration: google.protobuf.duration_pb2.Duration | None = ..., + driver_names: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["total_duration", b"total_duration"] + ) -> builtins.bool: ... + def ClearField( + self, + field_name: typing.Literal[ + "driver_names", + b"driver_names", + "payload_count", + b"payload_count", + "total_duration", + b"total_duration", + "total_size_bytes", + b"total_size_bytes", + ], + ) -> None: ... + +global___ExternalStorageMetrics = ExternalStorageMetrics diff --git a/temporalio/bridge/proto/core_interface_pb2.py b/temporalio/bridge/proto/core_interface_pb2.py index 7531a37a5f..250b1f28b2 100644 --- a/temporalio/bridge/proto/core_interface_pb2.py +++ b/temporalio/bridge/proto/core_interface_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -44,82 +43,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n&temporal/sdk/core/core_interface.proto\x12\x07\x63oresdk\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a\x37temporal/sdk/core/activity_result/activity_result.proto\x1a\x33temporal/sdk/core/activity_task/activity_task.proto\x1a%temporal/sdk/core/common/common.proto\x1a\x33temporal/sdk/core/external_data/external_data.proto\x1a?temporal/sdk/core/workflow_activation/workflow_activation.proto\x1a;temporal/sdk/core/workflow_commands/workflow_commands.proto\x1a?temporal/sdk/core/workflow_completion/workflow_completion.proto"Y\n\x11\x41\x63tivityHeartbeat\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x30\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload"n\n\x16\x41\x63tivityTaskCompletion\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12@\n\x06result\x18\x02 \x01(\x0b\x32\x30.coresdk.activity_result.ActivityExecutionResult"<\n\x10WorkflowSlotInfo\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x11\n\tis_sticky\x18\x02 \x01(\x08")\n\x10\x41\x63tivitySlotInfo\x12\x15\n\ractivity_type\x18\x01 \x01(\t".\n\x15LocalActivitySlotInfo\x12\x15\n\ractivity_type\x18\x01 \x01(\t"3\n\rNexusSlotInfo\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x11\n\toperation\x18\x02 \x01(\tB3\xea\x02\x30Temporalio::Internal::Bridge::Api::CoreInterfaceb\x06proto3' + b'\n&temporal/sdk/core/core_interface.proto\x12\x07\x63oresdk\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a\x37temporal/sdk/core/activity_result/activity_result.proto\x1a\x33temporal/sdk/core/activity_task/activity_task.proto\x1a%temporal/sdk/core/common/common.proto\x1a\x33temporal/sdk/core/external_data/external_data.proto\x1a?temporal/sdk/core/workflow_activation/workflow_activation.proto\x1a;temporal/sdk/core/workflow_commands/workflow_commands.proto\x1a?temporal/sdk/core/workflow_completion/workflow_completion.proto"Y\n\x11\x41\x63tivityHeartbeat\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x30\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload"n\n\x16\x41\x63tivityTaskCompletion\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12@\n\x06result\x18\x02 \x01(\x0b\x32\x30.coresdk.activity_result.ActivityExecutionResult"<\n\x10WorkflowSlotInfo\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x11\n\tis_sticky\x18\x02 \x01(\x08")\n\x10\x41\x63tivitySlotInfo\x12\x15\n\ractivity_type\x18\x01 \x01(\t".\n\x15LocalActivitySlotInfo\x12\x15\n\ractivity_type\x18\x01 \x01(\t"3\n\rNexusSlotInfo\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x11\n\toperation\x18\x02 \x01(\t"\x86\x01\n\rNamespaceInfo\x12-\n\x06limits\x18\x01 \x01(\x0b\x32\x1d.coresdk.NamespaceInfo.Limits\x1a\x46\n\x06Limits\x12\x1d\n\x15\x62lob_size_limit_error\x18\x01 \x01(\x03\x12\x1d\n\x15memo_size_limit_error\x18\x02 \x01(\x03\x42\x33\xea\x02\x30Temporalio::Internal::Bridge::Api::CoreInterfaceb\x06proto3' ) - -_ACTIVITYHEARTBEAT = DESCRIPTOR.message_types_by_name["ActivityHeartbeat"] -_ACTIVITYTASKCOMPLETION = DESCRIPTOR.message_types_by_name["ActivityTaskCompletion"] -_WORKFLOWSLOTINFO = DESCRIPTOR.message_types_by_name["WorkflowSlotInfo"] -_ACTIVITYSLOTINFO = DESCRIPTOR.message_types_by_name["ActivitySlotInfo"] -_LOCALACTIVITYSLOTINFO = DESCRIPTOR.message_types_by_name["LocalActivitySlotInfo"] -_NEXUSSLOTINFO = DESCRIPTOR.message_types_by_name["NexusSlotInfo"] -ActivityHeartbeat = _reflection.GeneratedProtocolMessageType( - "ActivityHeartbeat", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYHEARTBEAT, - "__module__": "temporal.sdk.core.core_interface_pb2", - # @@protoc_insertion_point(class_scope:coresdk.ActivityHeartbeat) - }, -) -_sym_db.RegisterMessage(ActivityHeartbeat) - -ActivityTaskCompletion = _reflection.GeneratedProtocolMessageType( - "ActivityTaskCompletion", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYTASKCOMPLETION, - "__module__": "temporal.sdk.core.core_interface_pb2", - # @@protoc_insertion_point(class_scope:coresdk.ActivityTaskCompletion) - }, -) -_sym_db.RegisterMessage(ActivityTaskCompletion) - -WorkflowSlotInfo = _reflection.GeneratedProtocolMessageType( - "WorkflowSlotInfo", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWSLOTINFO, - "__module__": "temporal.sdk.core.core_interface_pb2", - # @@protoc_insertion_point(class_scope:coresdk.WorkflowSlotInfo) - }, -) -_sym_db.RegisterMessage(WorkflowSlotInfo) - -ActivitySlotInfo = _reflection.GeneratedProtocolMessageType( - "ActivitySlotInfo", - (_message.Message,), - { - "DESCRIPTOR": _ACTIVITYSLOTINFO, - "__module__": "temporal.sdk.core.core_interface_pb2", - # @@protoc_insertion_point(class_scope:coresdk.ActivitySlotInfo) - }, -) -_sym_db.RegisterMessage(ActivitySlotInfo) - -LocalActivitySlotInfo = _reflection.GeneratedProtocolMessageType( - "LocalActivitySlotInfo", - (_message.Message,), - { - "DESCRIPTOR": _LOCALACTIVITYSLOTINFO, - "__module__": "temporal.sdk.core.core_interface_pb2", - # @@protoc_insertion_point(class_scope:coresdk.LocalActivitySlotInfo) - }, -) -_sym_db.RegisterMessage(LocalActivitySlotInfo) - -NexusSlotInfo = _reflection.GeneratedProtocolMessageType( - "NexusSlotInfo", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSSLOTINFO, - "__module__": "temporal.sdk.core.core_interface_pb2", - # @@protoc_insertion_point(class_scope:coresdk.NexusSlotInfo) - }, -) -_sym_db.RegisterMessage(NexusSlotInfo) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( @@ -137,4 +65,8 @@ _LOCALACTIVITYSLOTINFO._serialized_end = 930 _NEXUSSLOTINFO._serialized_start = 932 _NEXUSSLOTINFO._serialized_end = 983 + _NAMESPACEINFO._serialized_start = 986 + _NAMESPACEINFO._serialized_end = 1120 + _NAMESPACEINFO_LIMITS._serialized_start = 1050 + _NAMESPACEINFO_LIMITS._serialized_end = 1120 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/bridge/proto/core_interface_pb2.pyi b/temporalio/bridge/proto/core_interface_pb2.pyi index 020359cf0f..742525c57a 100644 --- a/temporalio/bridge/proto/core_interface_pb2.pyi +++ b/temporalio/bridge/proto/core_interface_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers @@ -14,13 +14,9 @@ import google.protobuf.message import temporalio.api.common.v1.message_pb2 import temporalio.bridge.proto.activity_result.activity_result_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class ActivityHeartbeat(google.protobuf.message.Message): """A request as given to `record_activity_heartbeat`""" @@ -44,13 +40,12 @@ class ActivityHeartbeat(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "details", b"details", "task_token", b"task_token" - ], + field_name: typing.Literal["details", b"details", "task_token", b"task_token"], ) -> None: ... global___ActivityHeartbeat = ActivityHeartbeat +@typing.final class ActivityTaskCompletion(google.protobuf.message.Message): """A request as given to `complete_activity_task`""" @@ -71,17 +66,16 @@ class ActivityTaskCompletion(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "result", b"result", "task_token", b"task_token" - ], + field_name: typing.Literal["result", b"result", "task_token", b"task_token"], ) -> None: ... global___ActivityTaskCompletion = ActivityTaskCompletion +@typing.final class WorkflowSlotInfo(google.protobuf.message.Message): """Info about workflow task slot usage""" @@ -99,13 +93,14 @@ class WorkflowSlotInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "is_sticky", b"is_sticky", "workflow_type", b"workflow_type" ], ) -> None: ... global___WorkflowSlotInfo = WorkflowSlotInfo +@typing.final class ActivitySlotInfo(google.protobuf.message.Message): """Info about activity task slot usage""" @@ -119,11 +114,12 @@ class ActivitySlotInfo(google.protobuf.message.Message): activity_type: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["activity_type", b"activity_type"] + self, field_name: typing.Literal["activity_type", b"activity_type"] ) -> None: ... global___ActivitySlotInfo = ActivitySlotInfo +@typing.final class LocalActivitySlotInfo(google.protobuf.message.Message): """Info about local activity slot usage""" @@ -137,11 +133,12 @@ class LocalActivitySlotInfo(google.protobuf.message.Message): activity_type: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["activity_type", b"activity_type"] + self, field_name: typing.Literal["activity_type", b"activity_type"] ) -> None: ... global___LocalActivitySlotInfo = LocalActivitySlotInfo +@typing.final class NexusSlotInfo(google.protobuf.message.Message): """Info about nexus task slot usage""" @@ -159,9 +156,59 @@ class NexusSlotInfo(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "operation", b"operation", "service", b"service" - ], + field_name: typing.Literal["operation", b"operation", "service", b"service"], ) -> None: ... global___NexusSlotInfo = NexusSlotInfo + +@typing.final +class NamespaceInfo(google.protobuf.message.Message): + """Info about a namespace""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing.final + class Limits(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BLOB_SIZE_LIMIT_ERROR_FIELD_NUMBER: builtins.int + MEMO_SIZE_LIMIT_ERROR_FIELD_NUMBER: builtins.int + blob_size_limit_error: builtins.int + """Maximum size in bytes for payload fields in workflow history events + (e.g., workflow/activity inputs and results, failure details, signal payloads). + When exceeded, the server will reject the operation with an error. + """ + memo_size_limit_error: builtins.int + """Maximum total memo size in bytes per workflow execution.""" + def __init__( + self, + *, + blob_size_limit_error: builtins.int = ..., + memo_size_limit_error: builtins.int = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "blob_size_limit_error", + b"blob_size_limit_error", + "memo_size_limit_error", + b"memo_size_limit_error", + ], + ) -> None: ... + + LIMITS_FIELD_NUMBER: builtins.int + @property + def limits(self) -> global___NamespaceInfo.Limits: + """Namespace configured limits""" + + def __init__( + self, + *, + limits: global___NamespaceInfo.Limits | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing.Literal["limits", b"limits"] + ) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["limits", b"limits"]) -> None: ... + +global___NamespaceInfo = NamespaceInfo diff --git a/temporalio/bridge/proto/external_data/external_data_pb2.py b/temporalio/bridge/proto/external_data/external_data_pb2.py index e8070efa79..4bda6f5144 100644 --- a/temporalio/bridge/proto/external_data/external_data_pb2.py +++ b/temporalio/bridge/proto/external_data/external_data_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -18,41 +17,18 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n3temporal/sdk/core/external_data/external_data.proto\x12\x15\x63oresdk.external_data\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xfe\x01\n\x17LocalActivityMarkerData\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\r\x12\x13\n\x0b\x61\x63tivity_id\x18\x03 \x01(\t\x12\x15\n\ractivity_type\x18\x04 \x01(\t\x12\x31\n\rcomplete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07\x62\x61\x63koff\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x16original_schedule_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"3\n\x11PatchedMarkerData\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\ndeprecated\x18\x02 \x01(\x08\x42\x32\xea\x02/Temporalio::Internal::Bridge::Api::ExternalDatab\x06proto3' + b'\n3temporal/sdk/core/external_data/external_data.proto\x12\x15\x63oresdk.external_data\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xb2\x02\n\x17LocalActivityMarkerData\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\r\x12\x13\n\x0b\x61\x63tivity_id\x18\x03 \x01(\t\x12\x15\n\ractivity_type\x18\x04 \x01(\t\x12\x31\n\rcomplete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07\x62\x61\x63koff\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x16original_schedule_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1d\n\x10\x61\x63tivation_index\x18\x08 \x01(\x04H\x00\x88\x01\x01\x42\x13\n\x11_activation_index"3\n\x11PatchedMarkerData\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\ndeprecated\x18\x02 \x01(\x08\x42\x32\xea\x02/Temporalio::Internal::Bridge::Api::ExternalDatab\x06proto3' ) - -_LOCALACTIVITYMARKERDATA = DESCRIPTOR.message_types_by_name["LocalActivityMarkerData"] -_PATCHEDMARKERDATA = DESCRIPTOR.message_types_by_name["PatchedMarkerData"] -LocalActivityMarkerData = _reflection.GeneratedProtocolMessageType( - "LocalActivityMarkerData", - (_message.Message,), - { - "DESCRIPTOR": _LOCALACTIVITYMARKERDATA, - "__module__": "temporal.sdk.core.external_data.external_data_pb2", - # @@protoc_insertion_point(class_scope:coresdk.external_data.LocalActivityMarkerData) - }, -) -_sym_db.RegisterMessage(LocalActivityMarkerData) - -PatchedMarkerData = _reflection.GeneratedProtocolMessageType( - "PatchedMarkerData", - (_message.Message,), - { - "DESCRIPTOR": _PATCHEDMARKERDATA, - "__module__": "temporal.sdk.core.external_data.external_data_pb2", - # @@protoc_insertion_point(class_scope:coresdk.external_data.PatchedMarkerData) - }, -) -_sym_db.RegisterMessage(PatchedMarkerData) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( b"\352\002/Temporalio::Internal::Bridge::Api::ExternalData" ) _LOCALACTIVITYMARKERDATA._serialized_start = 144 - _LOCALACTIVITYMARKERDATA._serialized_end = 398 - _PATCHEDMARKERDATA._serialized_start = 400 - _PATCHEDMARKERDATA._serialized_end = 451 + _LOCALACTIVITYMARKERDATA._serialized_end = 450 + _PATCHEDMARKERDATA._serialized_start = 452 + _PATCHEDMARKERDATA._serialized_end = 503 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/bridge/proto/external_data/external_data_pb2.pyi b/temporalio/bridge/proto/external_data/external_data_pb2.pyi index a1d29e39d8..edcd4581a1 100644 --- a/temporalio/bridge/proto/external_data/external_data_pb2.pyi +++ b/temporalio/bridge/proto/external_data/external_data_pb2.pyi @@ -4,20 +4,16 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 import google.protobuf.message import google.protobuf.timestamp_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class LocalActivityMarkerData(google.protobuf.message.Message): """This file defines data that Core might write externally. The first motivating case being storing data in markers in event history. Defining such data as protos provides an easy way @@ -33,6 +29,7 @@ class LocalActivityMarkerData(google.protobuf.message.Message): COMPLETE_TIME_FIELD_NUMBER: builtins.int BACKOFF_FIELD_NUMBER: builtins.int ORIGINAL_SCHEDULE_TIME_FIELD_NUMBER: builtins.int + ACTIVATION_INDEX_FIELD_NUMBER: builtins.int seq: builtins.int attempt: builtins.int """The number of attempts at execution before we recorded this result. Typically starts at 1, @@ -40,23 +37,31 @@ class LocalActivityMarkerData(google.protobuf.message.Message): """ activity_id: builtins.str activity_type: builtins.str + activation_index: builtins.int + """Position, within the workflow task, of the activation this resolution was delivered in. + Replay must deliver resolutions in the same activations because workflow code can branch on + which handles are ready. Absent in markers written by Core versions that predate this field. + """ @property def complete_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """You can think of this as "perceived completion time". It is the time the local activity thought it was when it completed. Which could be different from wall-clock time because of workflow replay. It's the WFT start time + the LA's runtime """ + @property def backoff(self) -> google.protobuf.duration_pb2.Duration: """If set, this local activity conceptually is retrying after the specified backoff. Implementation wise, they are really two different LA machines, but with the same type & input. The retry starts with an attempt number > 1. """ + @property def original_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """The time the LA was originally scheduled (wall clock time). This is used to track schedule-to-close timeouts when timer-based backoffs are used """ + def __init__( self, *, @@ -67,10 +72,15 @@ class LocalActivityMarkerData(google.protobuf.message.Message): complete_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., backoff: google.protobuf.duration_pb2.Duration | None = ..., original_schedule_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + activation_index: builtins.int | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "_activation_index", + b"_activation_index", + "activation_index", + b"activation_index", "backoff", b"backoff", "complete_time", @@ -81,7 +91,11 @@ class LocalActivityMarkerData(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "_activation_index", + b"_activation_index", + "activation_index", + b"activation_index", "activity_id", b"activity_id", "activity_type", @@ -98,9 +112,13 @@ class LocalActivityMarkerData(google.protobuf.message.Message): b"seq", ], ) -> None: ... + def WhichOneof( + self, oneof_group: typing.Literal["_activation_index", b"_activation_index"] + ) -> typing.Literal["activation_index"] | None: ... global___LocalActivityMarkerData = LocalActivityMarkerData +@typing.final class PatchedMarkerData(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -117,8 +135,7 @@ class PatchedMarkerData(google.protobuf.message.Message): deprecated: builtins.bool = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["deprecated", b"deprecated", "id", b"id"], + self, field_name: typing.Literal["deprecated", b"deprecated", "id", b"id"] ) -> None: ... global___PatchedMarkerData = PatchedMarkerData diff --git a/temporalio/bridge/proto/health/v1/health_pb2.py b/temporalio/bridge/proto/health/v1/health_pb2.py index 8e31dcecbf..c10a1ffe44 100644 --- a/temporalio/bridge/proto/health/v1/health_pb2.py +++ b/temporalio/bridge/proto/health/v1/health_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -18,35 +17,8 @@ b'\n\x16health/v1/health.proto\x12\x17temporal.grpc.health.v1"%\n\x12HealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t"\xb2\x01\n\x13HealthCheckResponse\x12J\n\x06status\x18\x01 \x01(\x0e\x32:.temporal.grpc.health.v1.HealthCheckResponse.ServingStatus"O\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x12\x13\n\x0fSERVICE_UNKNOWN\x10\x03\x32\xd2\x01\n\x06Health\x12\x62\n\x05\x43heck\x12+.temporal.grpc.health.v1.HealthCheckRequest\x1a,.temporal.grpc.health.v1.HealthCheckResponse\x12\x64\n\x05Watch\x12+.temporal.grpc.health.v1.HealthCheckRequest\x1a,.temporal.grpc.health.v1.HealthCheckResponse0\x01\x42\x61\n\x11io.grpc.health.v1B\x0bHealthProtoP\x01Z,google.golang.org/grpc/health/grpc_health_v1\xaa\x02\x0eGrpc.Health.V1b\x06proto3' ) - -_HEALTHCHECKREQUEST = DESCRIPTOR.message_types_by_name["HealthCheckRequest"] -_HEALTHCHECKRESPONSE = DESCRIPTOR.message_types_by_name["HealthCheckResponse"] -_HEALTHCHECKRESPONSE_SERVINGSTATUS = _HEALTHCHECKRESPONSE.enum_types_by_name[ - "ServingStatus" -] -HealthCheckRequest = _reflection.GeneratedProtocolMessageType( - "HealthCheckRequest", - (_message.Message,), - { - "DESCRIPTOR": _HEALTHCHECKREQUEST, - "__module__": "health.v1.health_pb2", - # @@protoc_insertion_point(class_scope:temporal.grpc.health.v1.HealthCheckRequest) - }, -) -_sym_db.RegisterMessage(HealthCheckRequest) - -HealthCheckResponse = _reflection.GeneratedProtocolMessageType( - "HealthCheckResponse", - (_message.Message,), - { - "DESCRIPTOR": _HEALTHCHECKRESPONSE, - "__module__": "health.v1.health_pb2", - # @@protoc_insertion_point(class_scope:temporal.grpc.health.v1.HealthCheckResponse) - }, -) -_sym_db.RegisterMessage(HealthCheckResponse) - -_HEALTH = DESCRIPTOR.services_by_name["Health"] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b"\n\021io.grpc.health.v1B\013HealthProtoP\001Z,google.golang.org/grpc/health/grpc_health_v1\252\002\016Grpc.Health.V1" diff --git a/temporalio/bridge/proto/health/v1/health_pb2.pyi b/temporalio/bridge/proto/health/v1/health_pb2.pyi index 2e1121e3cd..007e6c2c2b 100644 --- a/temporalio/bridge/proto/health/v1/health_pb2.pyi +++ b/temporalio/bridge/proto/health/v1/health_pb2.pyi @@ -18,6 +18,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class HealthCheckRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -28,12 +29,11 @@ class HealthCheckRequest(google.protobuf.message.Message): *, service: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["service", b"service"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["service", b"service"]) -> None: ... global___HealthCheckRequest = HealthCheckRequest +@typing.final class HealthCheckResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -46,7 +46,7 @@ class HealthCheckResponse(google.protobuf.message.Message): HealthCheckResponse._ServingStatus.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor UNKNOWN: HealthCheckResponse._ServingStatus.ValueType # 0 SERVING: HealthCheckResponse._ServingStatus.ValueType # 1 @@ -68,8 +68,6 @@ class HealthCheckResponse(google.protobuf.message.Message): *, status: global___HealthCheckResponse.ServingStatus.ValueType = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["status", b"status"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["status", b"status"]) -> None: ... global___HealthCheckResponse = HealthCheckResponse diff --git a/temporalio/bridge/proto/nexus/nexus_pb2.py b/temporalio/bridge/proto/nexus/nexus_pb2.py index 4dc3bea86a..51618a5ce1 100644 --- a/temporalio/bridge/proto/nexus/nexus_pb2.py +++ b/temporalio/bridge/proto/nexus/nexus_pb2.py @@ -5,16 +5,16 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + from temporalio.api.common.v1 import ( message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, ) @@ -32,88 +32,28 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n#temporal/sdk/core/nexus/nexus.proto\x12\rcoresdk.nexus\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a#temporal/api/nexus/v1/message.proto\x1a\x36temporal/api/workflowservice/v1/request_response.proto\x1a%temporal/sdk/core/common/common.proto"\xf8\x01\n\x14NexusOperationResult\x12\x34\n\tcompleted\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadH\x00\x12\x32\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x35\n\tcancelled\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x35\n\ttimed_out\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x08\n\x06status"\xb5\x01\n\x13NexusTaskCompletion\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x34\n\tcompleted\x18\x02 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.ResponseH\x00\x12\x34\n\x05\x65rror\x18\x03 \x01(\x0b\x32#.temporal.api.nexus.v1.HandlerErrorH\x00\x12\x14\n\nack_cancel\x18\x04 \x01(\x08H\x00\x42\x08\n\x06status"\x9a\x01\n\tNexusTask\x12K\n\x04task\x18\x01 \x01(\x0b\x32;.temporal.api.workflowservice.v1.PollNexusTaskQueueResponseH\x00\x12\x35\n\x0b\x63\x61ncel_task\x18\x02 \x01(\x0b\x32\x1e.coresdk.nexus.CancelNexusTaskH\x00\x42\t\n\x07variant"[\n\x0f\x43\x61ncelNexusTask\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x34\n\x06reason\x18\x02 \x01(\x0e\x32$.coresdk.nexus.NexusTaskCancelReason*;\n\x15NexusTaskCancelReason\x12\r\n\tTIMED_OUT\x10\x00\x12\x13\n\x0fWORKER_SHUTDOWN\x10\x01*\x7f\n\x1eNexusOperationCancellationType\x12\x1f\n\x1bWAIT_CANCELLATION_COMPLETED\x10\x00\x12\x0b\n\x07\x41\x42\x41NDON\x10\x01\x12\x0e\n\nTRY_CANCEL\x10\x02\x12\x1f\n\x1bWAIT_CANCELLATION_REQUESTED\x10\x03\x42+\xea\x02(Temporalio::Internal::Bridge::Api::Nexusb\x06proto3' -) - -_NEXUSTASKCANCELREASON = DESCRIPTOR.enum_types_by_name["NexusTaskCancelReason"] -NexusTaskCancelReason = enum_type_wrapper.EnumTypeWrapper(_NEXUSTASKCANCELREASON) -_NEXUSOPERATIONCANCELLATIONTYPE = DESCRIPTOR.enum_types_by_name[ - "NexusOperationCancellationType" -] -NexusOperationCancellationType = enum_type_wrapper.EnumTypeWrapper( - _NEXUSOPERATIONCANCELLATIONTYPE -) -TIMED_OUT = 0 -WORKER_SHUTDOWN = 1 -WAIT_CANCELLATION_COMPLETED = 0 -ABANDON = 1 -TRY_CANCEL = 2 -WAIT_CANCELLATION_REQUESTED = 3 - - -_NEXUSOPERATIONRESULT = DESCRIPTOR.message_types_by_name["NexusOperationResult"] -_NEXUSTASKCOMPLETION = DESCRIPTOR.message_types_by_name["NexusTaskCompletion"] -_NEXUSTASK = DESCRIPTOR.message_types_by_name["NexusTask"] -_CANCELNEXUSTASK = DESCRIPTOR.message_types_by_name["CancelNexusTask"] -NexusOperationResult = _reflection.GeneratedProtocolMessageType( - "NexusOperationResult", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSOPERATIONRESULT, - "__module__": "temporal.sdk.core.nexus.nexus_pb2", - # @@protoc_insertion_point(class_scope:coresdk.nexus.NexusOperationResult) - }, -) -_sym_db.RegisterMessage(NexusOperationResult) - -NexusTaskCompletion = _reflection.GeneratedProtocolMessageType( - "NexusTaskCompletion", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSTASKCOMPLETION, - "__module__": "temporal.sdk.core.nexus.nexus_pb2", - # @@protoc_insertion_point(class_scope:coresdk.nexus.NexusTaskCompletion) - }, -) -_sym_db.RegisterMessage(NexusTaskCompletion) - -NexusTask = _reflection.GeneratedProtocolMessageType( - "NexusTask", - (_message.Message,), - { - "DESCRIPTOR": _NEXUSTASK, - "__module__": "temporal.sdk.core.nexus.nexus_pb2", - # @@protoc_insertion_point(class_scope:coresdk.nexus.NexusTask) - }, -) -_sym_db.RegisterMessage(NexusTask) - -CancelNexusTask = _reflection.GeneratedProtocolMessageType( - "CancelNexusTask", - (_message.Message,), - { - "DESCRIPTOR": _CANCELNEXUSTASK, - "__module__": "temporal.sdk.core.nexus.nexus_pb2", - # @@protoc_insertion_point(class_scope:coresdk.nexus.CancelNexusTask) - }, + b'\n#temporal/sdk/core/nexus/nexus.proto\x12\rcoresdk.nexus\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a#temporal/api/nexus/v1/message.proto\x1a\x36temporal/api/workflowservice/v1/request_response.proto\x1a%temporal/sdk/core/common/common.proto"\xf8\x01\n\x14NexusOperationResult\x12\x34\n\tcompleted\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadH\x00\x12\x32\n\x06\x66\x61iled\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x35\n\tcancelled\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x35\n\ttimed_out\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x08\n\x06status"\xee\x01\n\x13NexusTaskCompletion\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x34\n\tcompleted\x18\x02 \x01(\x0b\x32\x1f.temporal.api.nexus.v1.ResponseH\x00\x12\x38\n\x05\x65rror\x18\x03 \x01(\x0b\x32#.temporal.api.nexus.v1.HandlerErrorB\x02\x18\x01H\x00\x12\x14\n\nack_cancel\x18\x04 \x01(\x08H\x00\x12\x33\n\x07\x66\x61ilure\x18\x05 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x08\n\x06status"\xe2\x01\n\tNexusTask\x12K\n\x04task\x18\x01 \x01(\x0b\x32;.temporal.api.workflowservice.v1.PollNexusTaskQueueResponseH\x00\x12\x35\n\x0b\x63\x61ncel_task\x18\x02 \x01(\x0b\x32\x1e.coresdk.nexus.CancelNexusTaskH\x00\x12\x34\n\x10request_deadline\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\tB\t\n\x07variant"[\n\x0f\x43\x61ncelNexusTask\x12\x12\n\ntask_token\x18\x01 \x01(\x0c\x12\x34\n\x06reason\x18\x02 \x01(\x0e\x32$.coresdk.nexus.NexusTaskCancelReason*;\n\x15NexusTaskCancelReason\x12\r\n\tTIMED_OUT\x10\x00\x12\x13\n\x0fWORKER_SHUTDOWN\x10\x01*\x7f\n\x1eNexusOperationCancellationType\x12\x1f\n\x1bWAIT_CANCELLATION_COMPLETED\x10\x00\x12\x0b\n\x07\x41\x42\x41NDON\x10\x01\x12\x0e\n\nTRY_CANCEL\x10\x02\x12\x1f\n\x1bWAIT_CANCELLATION_REQUESTED\x10\x03\x42+\xea\x02(Temporalio::Internal::Bridge::Api::Nexusb\x06proto3' ) -_sym_db.RegisterMessage(CancelNexusTask) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( b"\352\002(Temporalio::Internal::Bridge::Api::Nexus" ) - _NEXUSTASKCANCELREASON._serialized_start = 948 - _NEXUSTASKCANCELREASON._serialized_end = 1007 - _NEXUSOPERATIONCANCELLATIONTYPE._serialized_start = 1009 - _NEXUSOPERATIONCANCELLATIONTYPE._serialized_end = 1136 - _NEXUSOPERATIONRESULT._serialized_start = 264 - _NEXUSOPERATIONRESULT._serialized_end = 512 - _NEXUSTASKCOMPLETION._serialized_start = 515 - _NEXUSTASKCOMPLETION._serialized_end = 696 - _NEXUSTASK._serialized_start = 699 - _NEXUSTASK._serialized_end = 853 - _CANCELNEXUSTASK._serialized_start = 855 - _CANCELNEXUSTASK._serialized_end = 946 + _NEXUSTASKCOMPLETION.fields_by_name["error"]._options = None + _NEXUSTASKCOMPLETION.fields_by_name["error"]._serialized_options = b"\030\001" + _NEXUSTASKCANCELREASON._serialized_start = 1110 + _NEXUSTASKCANCELREASON._serialized_end = 1169 + _NEXUSOPERATIONCANCELLATIONTYPE._serialized_start = 1171 + _NEXUSOPERATIONCANCELLATIONTYPE._serialized_end = 1298 + _NEXUSOPERATIONRESULT._serialized_start = 297 + _NEXUSOPERATIONRESULT._serialized_end = 545 + _NEXUSTASKCOMPLETION._serialized_start = 548 + _NEXUSTASKCOMPLETION._serialized_end = 786 + _NEXUSTASK._serialized_start = 789 + _NEXUSTASK._serialized_end = 1015 + _CANCELNEXUSTASK._serialized_start = 1017 + _CANCELNEXUSTASK._serialized_end = 1108 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/bridge/proto/nexus/nexus_pb2.pyi b/temporalio/bridge/proto/nexus/nexus_pb2.pyi index 8dfe261b77..d1ccb9aa73 100644 --- a/temporalio/bridge/proto/nexus/nexus_pb2.pyi +++ b/temporalio/bridge/proto/nexus/nexus_pb2.pyi @@ -10,6 +10,7 @@ import typing import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper import google.protobuf.message +import google.protobuf.timestamp_pb2 import temporalio.api.common.v1.message_pb2 import temporalio.api.failure.v1.message_pb2 @@ -32,7 +33,7 @@ class _NexusTaskCancelReasonEnumTypeWrapper( _NexusTaskCancelReason.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor TIMED_OUT: _NexusTaskCancelReason.ValueType # 0 """The nexus task is known to have timed out""" @@ -58,7 +59,7 @@ class _NexusOperationCancellationTypeEnumTypeWrapper( _NexusOperationCancellationType.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor WAIT_CANCELLATION_COMPLETED: _NexusOperationCancellationType.ValueType # 0 """Wait for operation cancellation completion. Default.""" @@ -91,6 +92,7 @@ WAIT_CANCELLATION_REQUESTED: NexusOperationCancellationType.ValueType # 3 """Request cancellation of the operation and wait for confirmation that the request was received.""" global___NexusOperationCancellationType = NexusOperationCancellationType +@typing.final class NexusOperationResult(google.protobuf.message.Message): """Used by core to resolve nexus operations.""" @@ -118,7 +120,7 @@ class NexusOperationResult(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancelled", b"cancelled", "completed", @@ -133,7 +135,7 @@ class NexusOperationResult(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancelled", b"cancelled", "completed", @@ -147,14 +149,12 @@ class NexusOperationResult(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["status", b"status"] - ) -> ( - typing_extensions.Literal["completed", "failed", "cancelled", "timed_out"] - | None - ): ... + self, oneof_group: typing.Literal["status", b"status"] + ) -> typing.Literal["completed", "failed", "cancelled", "timed_out"] | None: ... global___NexusOperationResult = NexusOperationResult +@typing.final class NexusTaskCompletion(google.protobuf.message.Message): """A response to a Nexus task""" @@ -164,22 +164,29 @@ class NexusTaskCompletion(google.protobuf.message.Message): COMPLETED_FIELD_NUMBER: builtins.int ERROR_FIELD_NUMBER: builtins.int ACK_CANCEL_FIELD_NUMBER: builtins.int + FAILURE_FIELD_NUMBER: builtins.int task_token: builtins.bytes """The unique identifier for this task provided in the poll response""" + ack_cancel: builtins.bool + """The lang SDK acknowledges that it is responding to a `CancelNexusTask` and thus the + response is irrelevant. This is not the only way to respond to a cancel, the other + variants can still be used, but this variant should be used when the handler was aborted + by cancellation. + """ @property def completed(self) -> temporalio.api.nexus.v1.message_pb2.Response: """The handler completed (successfully or not). Note that the response kind must match the request kind (start or cancel). """ + @property def error(self) -> temporalio.api.nexus.v1.message_pb2.HandlerError: + """The handler could not complete the request for some reason. Deprecated, use failure.""" + + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """The handler could not complete the request for some reason.""" - ack_cancel: builtins.bool - """The lang SDK acknowledges that it is responding to a `CancelNexusTask` and thus the - response is irrelevant. This is not the only way to respond to a cancel, the other - variants can still be used, but this variant should be used when the handler was aborted - by cancellation. - """ + def __init__( self, *, @@ -187,29 +194,34 @@ class NexusTaskCompletion(google.protobuf.message.Message): completed: temporalio.api.nexus.v1.message_pb2.Response | None = ..., error: temporalio.api.nexus.v1.message_pb2.HandlerError | None = ..., ack_cancel: builtins.bool = ..., + failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "ack_cancel", b"ack_cancel", "completed", b"completed", "error", b"error", + "failure", + b"failure", "status", b"status", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "ack_cancel", b"ack_cancel", "completed", b"completed", "error", b"error", + "failure", + b"failure", "status", b"status", "task_token", @@ -217,21 +229,29 @@ class NexusTaskCompletion(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["status", b"status"] - ) -> typing_extensions.Literal["completed", "error", "ack_cancel"] | None: ... + self, oneof_group: typing.Literal["status", b"status"] + ) -> typing.Literal["completed", "error", "ack_cancel", "failure"] | None: ... global___NexusTaskCompletion = NexusTaskCompletion +@typing.final class NexusTask(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor TASK_FIELD_NUMBER: builtins.int CANCEL_TASK_FIELD_NUMBER: builtins.int + REQUEST_DEADLINE_FIELD_NUMBER: builtins.int + ENDPOINT_FIELD_NUMBER: builtins.int + endpoint: builtins.str + """The endpoint this request was addressed to. Extracted from the request for convenient access. + Only set when variant is `task`. + """ @property def task( self, ) -> temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueResponse: """A nexus task from server""" + @property def cancel_task(self) -> global___CancelNexusTask: """A request by Core to notify an in-progress operation handler that it should cancel. This @@ -246,31 +266,58 @@ class NexusTask(google.protobuf.message.Message): EX: Core knows the nexus operation has timed out, and it does not make sense for the user's operation handler to continue doing work. """ + + @property + def request_deadline(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The deadline for this request, parsed from the "Request-Timeout" header. + Only set when variant is `task` and the header was present with a valid value. + Represented as an absolute timestamp. + """ + def __init__( self, *, task: temporalio.api.workflowservice.v1.request_response_pb2.PollNexusTaskQueueResponse | None = ..., cancel_task: global___CancelNexusTask | None = ..., + request_deadline: google.protobuf.timestamp_pb2.Timestamp | None = ..., + endpoint: builtins.str = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "cancel_task", b"cancel_task", "task", b"task", "variant", b"variant" + field_name: typing.Literal[ + "cancel_task", + b"cancel_task", + "request_deadline", + b"request_deadline", + "task", + b"task", + "variant", + b"variant", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "cancel_task", b"cancel_task", "task", b"task", "variant", b"variant" + field_name: typing.Literal[ + "cancel_task", + b"cancel_task", + "endpoint", + b"endpoint", + "request_deadline", + b"request_deadline", + "task", + b"task", + "variant", + b"variant", ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["task", "cancel_task"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["task", "cancel_task"] | None: ... global___NexusTask = NexusTask +@typing.final class CancelNexusTask(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -288,9 +335,7 @@ class CancelNexusTask(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ - "reason", b"reason", "task_token", b"task_token" - ], + field_name: typing.Literal["reason", b"reason", "task_token", b"task_token"], ) -> None: ... global___CancelNexusTask = CancelNexusTask diff --git a/temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.py b/temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.py index 52f62ac8c8..589119c72b 100644 --- a/temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.py +++ b/temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -21,12 +20,18 @@ from temporalio.api.common.v1 import ( message_pb2 as temporal_dot_api_dot_common_dot_v1_dot_message__pb2, ) +from temporalio.api.enums.v1 import ( + failed_cause_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_failed__cause__pb2, +) from temporalio.api.enums.v1 import ( workflow_pb2 as temporal_dot_api_dot_enums_dot_v1_dot_workflow__pb2, ) from temporalio.api.failure.v1 import ( message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, ) +from temporalio.api.nexus.v1 import ( + message_pb2 as temporal_dot_api_dot_nexus_dot_v1_dot_message__pb2, +) from temporalio.api.update.v1 import ( message_pb2 as temporal_dot_api_dot_update_dot_v1_dot_message__pb2, ) @@ -44,325 +49,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n?temporal/sdk/core/workflow_activation/workflow_activation.proto\x12\x1b\x63oresdk.workflow_activation\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a%temporal/api/failure/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a\x37temporal/sdk/core/activity_result/activity_result.proto\x1a\x35temporal/sdk/core/child_workflow/child_workflow.proto\x1a%temporal/sdk/core/common/common.proto\x1a#temporal/sdk/core/nexus/nexus.proto"\x94\x03\n\x12WorkflowActivation\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cis_replaying\x18\x03 \x01(\x08\x12\x16\n\x0ehistory_length\x18\x04 \x01(\r\x12@\n\x04jobs\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.WorkflowActivationJob\x12 \n\x18\x61vailable_internal_flags\x18\x06 \x03(\r\x12\x1a\n\x12history_size_bytes\x18\x07 \x01(\x04\x12!\n\x19\x63ontinue_as_new_suggested\x18\x08 \x01(\x08\x12T\n#deployment_version_for_current_task\x18\t \x01(\x0b\x32\'.coresdk.common.WorkerDeploymentVersion\x12\x18\n\x10last_sdk_version\x18\n \x01(\t"\xe0\n\n\x15WorkflowActivationJob\x12N\n\x13initialize_workflow\x18\x01 \x01(\x0b\x32/.coresdk.workflow_activation.InitializeWorkflowH\x00\x12<\n\nfire_timer\x18\x02 \x01(\x0b\x32&.coresdk.workflow_activation.FireTimerH\x00\x12K\n\x12update_random_seed\x18\x04 \x01(\x0b\x32-.coresdk.workflow_activation.UpdateRandomSeedH\x00\x12\x44\n\x0equery_workflow\x18\x05 \x01(\x0b\x32*.coresdk.workflow_activation.QueryWorkflowH\x00\x12\x46\n\x0f\x63\x61ncel_workflow\x18\x06 \x01(\x0b\x32+.coresdk.workflow_activation.CancelWorkflowH\x00\x12\x46\n\x0fsignal_workflow\x18\x07 \x01(\x0b\x32+.coresdk.workflow_activation.SignalWorkflowH\x00\x12H\n\x10resolve_activity\x18\x08 \x01(\x0b\x32,.coresdk.workflow_activation.ResolveActivityH\x00\x12G\n\x10notify_has_patch\x18\t \x01(\x0b\x32+.coresdk.workflow_activation.NotifyHasPatchH\x00\x12q\n&resolve_child_workflow_execution_start\x18\n \x01(\x0b\x32?.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartH\x00\x12\x66\n resolve_child_workflow_execution\x18\x0b \x01(\x0b\x32:.coresdk.workflow_activation.ResolveChildWorkflowExecutionH\x00\x12\x66\n resolve_signal_external_workflow\x18\x0c \x01(\x0b\x32:.coresdk.workflow_activation.ResolveSignalExternalWorkflowH\x00\x12u\n(resolve_request_cancel_external_workflow\x18\r \x01(\x0b\x32\x41.coresdk.workflow_activation.ResolveRequestCancelExternalWorkflowH\x00\x12:\n\tdo_update\x18\x0e \x01(\x0b\x32%.coresdk.workflow_activation.DoUpdateH\x00\x12`\n\x1dresolve_nexus_operation_start\x18\x0f \x01(\x0b\x32\x37.coresdk.workflow_activation.ResolveNexusOperationStartH\x00\x12U\n\x17resolve_nexus_operation\x18\x10 \x01(\x0b\x32\x32.coresdk.workflow_activation.ResolveNexusOperationH\x00\x12I\n\x11remove_from_cache\x18\x32 \x01(\x0b\x32,.coresdk.workflow_activation.RemoveFromCacheH\x00\x42\t\n\x07variant"\xd9\n\n\x12InitializeWorkflow\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x17\n\x0frandomness_seed\x18\x04 \x01(\x04\x12M\n\x07headers\x18\x05 \x03(\x0b\x32<.coresdk.workflow_activation.InitializeWorkflow.HeadersEntry\x12\x10\n\x08identity\x18\x06 \x01(\t\x12I\n\x14parent_workflow_info\x18\x07 \x01(\x0b\x32+.coresdk.common.NamespacedWorkflowExecution\x12=\n\x1aworkflow_execution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\'\n\x1f\x63ontinued_from_execution_run_id\x18\x0b \x01(\t\x12J\n\x13\x63ontinued_initiator\x18\x0c \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12;\n\x11\x63ontinued_failure\x18\r \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\x0e \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x1e\n\x16\x66irst_execution_run_id\x18\x0f \x01(\t\x12\x39\n\x0cretry_policy\x18\x10 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x0f\n\x07\x61ttempt\x18\x11 \x01(\x05\x12\x15\n\rcron_schedule\x18\x12 \x01(\t\x12\x46\n"workflow_execution_expiration_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n"cron_schedule_to_schedule_interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x04memo\x18\x15 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x16 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\nstart_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\rroot_workflow\x18\x18 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x08priority\x18\x19 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x18\n\tFireTimer\x12\x0b\n\x03seq\x18\x01 \x01(\r"m\n\x0fResolveActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.activity_result.ActivityResolution\x12\x10\n\x08is_local\x18\x03 \x01(\x08"\xd1\x02\n"ResolveChildWorkflowExecutionStart\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12[\n\tsucceeded\x18\x02 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccessH\x00\x12X\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailureH\x00\x12]\n\tcancelled\x18\x04 \x01(\x0b\x32H.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelledH\x00\x42\x08\n\x06status";\n)ResolveChildWorkflowExecutionStartSuccess\x12\x0e\n\x06run_id\x18\x01 \x01(\t"\xa6\x01\n)ResolveChildWorkflowExecutionStartFailure\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x15\n\rworkflow_type\x18\x02 \x01(\t\x12M\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32>.coresdk.child_workflow.StartChildWorkflowExecutionFailedCause"`\n+ResolveChildWorkflowExecutionStartCancelled\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"i\n\x1dResolveChildWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.child_workflow.ChildWorkflowResult"+\n\x10UpdateRandomSeed\x12\x17\n\x0frandomness_seed\x18\x01 \x01(\x04"\x84\x02\n\rQueryWorkflow\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_type\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12H\n\x07headers\x18\x05 \x03(\x0b\x32\x37.coresdk.workflow_activation.QueryWorkflow.HeadersEntry\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01" \n\x0e\x43\x61ncelWorkflow\x12\x0e\n\x06reason\x18\x01 \x01(\t"\x83\x02\n\x0eSignalWorkflow\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12.\n\x05input\x18\x02 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x10\n\x08identity\x18\x03 \x01(\t\x12I\n\x07headers\x18\x05 \x03(\x0b\x32\x38.coresdk.workflow_activation.SignalWorkflow.HeadersEntry\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01""\n\x0eNotifyHasPatch\x12\x10\n\x08patch_id\x18\x01 \x01(\t"_\n\x1dResolveSignalExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"f\n$ResolveRequestCancelExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"\xcb\x02\n\x08\x44oUpdate\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x14protocol_instance_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12.\n\x05input\x18\x04 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x43\n\x07headers\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.DoUpdate.HeadersEntry\x12*\n\x04meta\x18\x06 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x15\n\rrun_validator\x18\x07 \x01(\x08\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x9a\x01\n\x1aResolveNexusOperationStart\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x19\n\x0foperation_token\x18\x02 \x01(\tH\x00\x12\x16\n\x0cstarted_sync\x18\x03 \x01(\x08H\x00\x12\x32\n\x06\x66\x61iled\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x08\n\x06status"Y\n\x15ResolveNexusOperation\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x33\n\x06result\x18\x02 \x01(\x0b\x32#.coresdk.nexus.NexusOperationResult"\xe0\x02\n\x0fRemoveFromCache\x12\x0f\n\x07message\x18\x01 \x01(\t\x12K\n\x06reason\x18\x02 \x01(\x0e\x32;.coresdk.workflow_activation.RemoveFromCache.EvictionReason"\xee\x01\n\x0e\x45victionReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nCACHE_FULL\x10\x01\x12\x0e\n\nCACHE_MISS\x10\x02\x12\x12\n\x0eNONDETERMINISM\x10\x03\x12\r\n\tLANG_FAIL\x10\x04\x12\x12\n\x0eLANG_REQUESTED\x10\x05\x12\x12\n\x0eTASK_NOT_FOUND\x10\x06\x12\x15\n\x11UNHANDLED_COMMAND\x10\x07\x12\t\n\x05\x46\x41TAL\x10\x08\x12\x1f\n\x1bPAGINATION_OR_HISTORY_FETCH\x10\t\x12\x1d\n\x19WORKFLOW_EXECUTION_ENDING\x10\nB8\xea\x02\x35Temporalio::Internal::Bridge::Api::WorkflowActivationb\x06proto3' -) - - -_WORKFLOWACTIVATION = DESCRIPTOR.message_types_by_name["WorkflowActivation"] -_WORKFLOWACTIVATIONJOB = DESCRIPTOR.message_types_by_name["WorkflowActivationJob"] -_INITIALIZEWORKFLOW = DESCRIPTOR.message_types_by_name["InitializeWorkflow"] -_INITIALIZEWORKFLOW_HEADERSENTRY = _INITIALIZEWORKFLOW.nested_types_by_name[ - "HeadersEntry" -] -_FIRETIMER = DESCRIPTOR.message_types_by_name["FireTimer"] -_RESOLVEACTIVITY = DESCRIPTOR.message_types_by_name["ResolveActivity"] -_RESOLVECHILDWORKFLOWEXECUTIONSTART = DESCRIPTOR.message_types_by_name[ - "ResolveChildWorkflowExecutionStart" -] -_RESOLVECHILDWORKFLOWEXECUTIONSTARTSUCCESS = DESCRIPTOR.message_types_by_name[ - "ResolveChildWorkflowExecutionStartSuccess" -] -_RESOLVECHILDWORKFLOWEXECUTIONSTARTFAILURE = DESCRIPTOR.message_types_by_name[ - "ResolveChildWorkflowExecutionStartFailure" -] -_RESOLVECHILDWORKFLOWEXECUTIONSTARTCANCELLED = DESCRIPTOR.message_types_by_name[ - "ResolveChildWorkflowExecutionStartCancelled" -] -_RESOLVECHILDWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name[ - "ResolveChildWorkflowExecution" -] -_UPDATERANDOMSEED = DESCRIPTOR.message_types_by_name["UpdateRandomSeed"] -_QUERYWORKFLOW = DESCRIPTOR.message_types_by_name["QueryWorkflow"] -_QUERYWORKFLOW_HEADERSENTRY = _QUERYWORKFLOW.nested_types_by_name["HeadersEntry"] -_CANCELWORKFLOW = DESCRIPTOR.message_types_by_name["CancelWorkflow"] -_SIGNALWORKFLOW = DESCRIPTOR.message_types_by_name["SignalWorkflow"] -_SIGNALWORKFLOW_HEADERSENTRY = _SIGNALWORKFLOW.nested_types_by_name["HeadersEntry"] -_NOTIFYHASPATCH = DESCRIPTOR.message_types_by_name["NotifyHasPatch"] -_RESOLVESIGNALEXTERNALWORKFLOW = DESCRIPTOR.message_types_by_name[ - "ResolveSignalExternalWorkflow" -] -_RESOLVEREQUESTCANCELEXTERNALWORKFLOW = DESCRIPTOR.message_types_by_name[ - "ResolveRequestCancelExternalWorkflow" -] -_DOUPDATE = DESCRIPTOR.message_types_by_name["DoUpdate"] -_DOUPDATE_HEADERSENTRY = _DOUPDATE.nested_types_by_name["HeadersEntry"] -_RESOLVENEXUSOPERATIONSTART = DESCRIPTOR.message_types_by_name[ - "ResolveNexusOperationStart" -] -_RESOLVENEXUSOPERATION = DESCRIPTOR.message_types_by_name["ResolveNexusOperation"] -_REMOVEFROMCACHE = DESCRIPTOR.message_types_by_name["RemoveFromCache"] -_REMOVEFROMCACHE_EVICTIONREASON = _REMOVEFROMCACHE.enum_types_by_name["EvictionReason"] -WorkflowActivation = _reflection.GeneratedProtocolMessageType( - "WorkflowActivation", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWACTIVATION, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.WorkflowActivation) - }, -) -_sym_db.RegisterMessage(WorkflowActivation) - -WorkflowActivationJob = _reflection.GeneratedProtocolMessageType( - "WorkflowActivationJob", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWACTIVATIONJOB, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.WorkflowActivationJob) - }, -) -_sym_db.RegisterMessage(WorkflowActivationJob) - -InitializeWorkflow = _reflection.GeneratedProtocolMessageType( - "InitializeWorkflow", - (_message.Message,), - { - "HeadersEntry": _reflection.GeneratedProtocolMessageType( - "HeadersEntry", - (_message.Message,), - { - "DESCRIPTOR": _INITIALIZEWORKFLOW_HEADERSENTRY, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.InitializeWorkflow.HeadersEntry) - }, - ), - "DESCRIPTOR": _INITIALIZEWORKFLOW, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.InitializeWorkflow) - }, -) -_sym_db.RegisterMessage(InitializeWorkflow) -_sym_db.RegisterMessage(InitializeWorkflow.HeadersEntry) - -FireTimer = _reflection.GeneratedProtocolMessageType( - "FireTimer", - (_message.Message,), - { - "DESCRIPTOR": _FIRETIMER, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.FireTimer) - }, -) -_sym_db.RegisterMessage(FireTimer) - -ResolveActivity = _reflection.GeneratedProtocolMessageType( - "ResolveActivity", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVEACTIVITY, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveActivity) - }, -) -_sym_db.RegisterMessage(ResolveActivity) - -ResolveChildWorkflowExecutionStart = _reflection.GeneratedProtocolMessageType( - "ResolveChildWorkflowExecutionStart", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVECHILDWORKFLOWEXECUTIONSTART, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveChildWorkflowExecutionStart) - }, -) -_sym_db.RegisterMessage(ResolveChildWorkflowExecutionStart) - -ResolveChildWorkflowExecutionStartSuccess = _reflection.GeneratedProtocolMessageType( - "ResolveChildWorkflowExecutionStartSuccess", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVECHILDWORKFLOWEXECUTIONSTARTSUCCESS, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccess) - }, -) -_sym_db.RegisterMessage(ResolveChildWorkflowExecutionStartSuccess) - -ResolveChildWorkflowExecutionStartFailure = _reflection.GeneratedProtocolMessageType( - "ResolveChildWorkflowExecutionStartFailure", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVECHILDWORKFLOWEXECUTIONSTARTFAILURE, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailure) - }, -) -_sym_db.RegisterMessage(ResolveChildWorkflowExecutionStartFailure) - -ResolveChildWorkflowExecutionStartCancelled = _reflection.GeneratedProtocolMessageType( - "ResolveChildWorkflowExecutionStartCancelled", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVECHILDWORKFLOWEXECUTIONSTARTCANCELLED, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelled) - }, -) -_sym_db.RegisterMessage(ResolveChildWorkflowExecutionStartCancelled) - -ResolveChildWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "ResolveChildWorkflowExecution", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVECHILDWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveChildWorkflowExecution) - }, -) -_sym_db.RegisterMessage(ResolveChildWorkflowExecution) - -UpdateRandomSeed = _reflection.GeneratedProtocolMessageType( - "UpdateRandomSeed", - (_message.Message,), - { - "DESCRIPTOR": _UPDATERANDOMSEED, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.UpdateRandomSeed) - }, -) -_sym_db.RegisterMessage(UpdateRandomSeed) - -QueryWorkflow = _reflection.GeneratedProtocolMessageType( - "QueryWorkflow", - (_message.Message,), - { - "HeadersEntry": _reflection.GeneratedProtocolMessageType( - "HeadersEntry", - (_message.Message,), - { - "DESCRIPTOR": _QUERYWORKFLOW_HEADERSENTRY, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.QueryWorkflow.HeadersEntry) - }, - ), - "DESCRIPTOR": _QUERYWORKFLOW, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.QueryWorkflow) - }, -) -_sym_db.RegisterMessage(QueryWorkflow) -_sym_db.RegisterMessage(QueryWorkflow.HeadersEntry) - -CancelWorkflow = _reflection.GeneratedProtocolMessageType( - "CancelWorkflow", - (_message.Message,), - { - "DESCRIPTOR": _CANCELWORKFLOW, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.CancelWorkflow) - }, -) -_sym_db.RegisterMessage(CancelWorkflow) - -SignalWorkflow = _reflection.GeneratedProtocolMessageType( - "SignalWorkflow", - (_message.Message,), - { - "HeadersEntry": _reflection.GeneratedProtocolMessageType( - "HeadersEntry", - (_message.Message,), - { - "DESCRIPTOR": _SIGNALWORKFLOW_HEADERSENTRY, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.SignalWorkflow.HeadersEntry) - }, - ), - "DESCRIPTOR": _SIGNALWORKFLOW, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.SignalWorkflow) - }, -) -_sym_db.RegisterMessage(SignalWorkflow) -_sym_db.RegisterMessage(SignalWorkflow.HeadersEntry) - -NotifyHasPatch = _reflection.GeneratedProtocolMessageType( - "NotifyHasPatch", - (_message.Message,), - { - "DESCRIPTOR": _NOTIFYHASPATCH, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.NotifyHasPatch) - }, -) -_sym_db.RegisterMessage(NotifyHasPatch) - -ResolveSignalExternalWorkflow = _reflection.GeneratedProtocolMessageType( - "ResolveSignalExternalWorkflow", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVESIGNALEXTERNALWORKFLOW, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveSignalExternalWorkflow) - }, -) -_sym_db.RegisterMessage(ResolveSignalExternalWorkflow) - -ResolveRequestCancelExternalWorkflow = _reflection.GeneratedProtocolMessageType( - "ResolveRequestCancelExternalWorkflow", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVEREQUESTCANCELEXTERNALWORKFLOW, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveRequestCancelExternalWorkflow) - }, -) -_sym_db.RegisterMessage(ResolveRequestCancelExternalWorkflow) - -DoUpdate = _reflection.GeneratedProtocolMessageType( - "DoUpdate", - (_message.Message,), - { - "HeadersEntry": _reflection.GeneratedProtocolMessageType( - "HeadersEntry", - (_message.Message,), - { - "DESCRIPTOR": _DOUPDATE_HEADERSENTRY, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.DoUpdate.HeadersEntry) - }, - ), - "DESCRIPTOR": _DOUPDATE, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.DoUpdate) - }, -) -_sym_db.RegisterMessage(DoUpdate) -_sym_db.RegisterMessage(DoUpdate.HeadersEntry) - -ResolveNexusOperationStart = _reflection.GeneratedProtocolMessageType( - "ResolveNexusOperationStart", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVENEXUSOPERATIONSTART, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveNexusOperationStart) - }, -) -_sym_db.RegisterMessage(ResolveNexusOperationStart) - -ResolveNexusOperation = _reflection.GeneratedProtocolMessageType( - "ResolveNexusOperation", - (_message.Message,), - { - "DESCRIPTOR": _RESOLVENEXUSOPERATION, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.ResolveNexusOperation) - }, -) -_sym_db.RegisterMessage(ResolveNexusOperation) - -RemoveFromCache = _reflection.GeneratedProtocolMessageType( - "RemoveFromCache", - (_message.Message,), - { - "DESCRIPTOR": _REMOVEFROMCACHE, - "__module__": "temporal.sdk.core.workflow_activation.workflow_activation_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_activation.RemoveFromCache) - }, + b'\n?temporal/sdk/core/workflow_activation/workflow_activation.proto\x12\x1b\x63oresdk.workflow_activation\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a%temporal/api/failure/v1/message.proto\x1a#temporal/api/nexus/v1/message.proto\x1a$temporal/api/update/v1/message.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a\x37temporal/sdk/core/activity_result/activity_result.proto\x1a\x35temporal/sdk/core/child_workflow/child_workflow.proto\x1a%temporal/sdk/core/common/common.proto\x1a#temporal/sdk/core/nexus/nexus.proto"\xa2\x04\n\x12WorkflowActivation\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cis_replaying\x18\x03 \x01(\x08\x12\x16\n\x0ehistory_length\x18\x04 \x01(\r\x12@\n\x04jobs\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.WorkflowActivationJob\x12 \n\x18\x61vailable_internal_flags\x18\x06 \x03(\r\x12\x1a\n\x12history_size_bytes\x18\x07 \x01(\x04\x12!\n\x19\x63ontinue_as_new_suggested\x18\x08 \x01(\x08\x12T\n#deployment_version_for_current_task\x18\t \x01(\x0b\x32\'.coresdk.common.WorkerDeploymentVersion\x12\x18\n\x10last_sdk_version\x18\n \x01(\t\x12Z\n\x1fsuggest_continue_as_new_reasons\x18\x0b \x03(\x0e\x32\x31.temporal.api.enums.v1.SuggestContinueAsNewReason\x12\x30\n(target_worker_deployment_version_changed\x18\x0c \x01(\x08"\xe0\n\n\x15WorkflowActivationJob\x12N\n\x13initialize_workflow\x18\x01 \x01(\x0b\x32/.coresdk.workflow_activation.InitializeWorkflowH\x00\x12<\n\nfire_timer\x18\x02 \x01(\x0b\x32&.coresdk.workflow_activation.FireTimerH\x00\x12K\n\x12update_random_seed\x18\x04 \x01(\x0b\x32-.coresdk.workflow_activation.UpdateRandomSeedH\x00\x12\x44\n\x0equery_workflow\x18\x05 \x01(\x0b\x32*.coresdk.workflow_activation.QueryWorkflowH\x00\x12\x46\n\x0f\x63\x61ncel_workflow\x18\x06 \x01(\x0b\x32+.coresdk.workflow_activation.CancelWorkflowH\x00\x12\x46\n\x0fsignal_workflow\x18\x07 \x01(\x0b\x32+.coresdk.workflow_activation.SignalWorkflowH\x00\x12H\n\x10resolve_activity\x18\x08 \x01(\x0b\x32,.coresdk.workflow_activation.ResolveActivityH\x00\x12G\n\x10notify_has_patch\x18\t \x01(\x0b\x32+.coresdk.workflow_activation.NotifyHasPatchH\x00\x12q\n&resolve_child_workflow_execution_start\x18\n \x01(\x0b\x32?.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartH\x00\x12\x66\n resolve_child_workflow_execution\x18\x0b \x01(\x0b\x32:.coresdk.workflow_activation.ResolveChildWorkflowExecutionH\x00\x12\x66\n resolve_signal_external_workflow\x18\x0c \x01(\x0b\x32:.coresdk.workflow_activation.ResolveSignalExternalWorkflowH\x00\x12u\n(resolve_request_cancel_external_workflow\x18\r \x01(\x0b\x32\x41.coresdk.workflow_activation.ResolveRequestCancelExternalWorkflowH\x00\x12:\n\tdo_update\x18\x0e \x01(\x0b\x32%.coresdk.workflow_activation.DoUpdateH\x00\x12`\n\x1dresolve_nexus_operation_start\x18\x0f \x01(\x0b\x32\x37.coresdk.workflow_activation.ResolveNexusOperationStartH\x00\x12U\n\x17resolve_nexus_operation\x18\x10 \x01(\x0b\x32\x32.coresdk.workflow_activation.ResolveNexusOperationH\x00\x12I\n\x11remove_from_cache\x18\x32 \x01(\x0b\x32,.coresdk.workflow_activation.RemoveFromCacheH\x00\x42\t\n\x07variant"\xe3\x0b\n\x12InitializeWorkflow\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x17\n\x0frandomness_seed\x18\x04 \x01(\x04\x12M\n\x07headers\x18\x05 \x03(\x0b\x32<.coresdk.workflow_activation.InitializeWorkflow.HeadersEntry\x12\x10\n\x08identity\x18\x06 \x01(\t\x12I\n\x14parent_workflow_info\x18\x07 \x01(\x0b\x32+.coresdk.common.NamespacedWorkflowExecution\x12=\n\x1aworkflow_execution_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\'\n\x1f\x63ontinued_from_execution_run_id\x18\x0b \x01(\t\x12J\n\x13\x63ontinued_initiator\x18\x0c \x01(\x0e\x32-.temporal.api.enums.v1.ContinueAsNewInitiator\x12;\n\x11\x63ontinued_failure\x18\r \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12@\n\x16last_completion_result\x18\x0e \x01(\x0b\x32 .temporal.api.common.v1.Payloads\x12\x1e\n\x16\x66irst_execution_run_id\x18\x0f \x01(\t\x12\x39\n\x0cretry_policy\x18\x10 \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x0f\n\x07\x61ttempt\x18\x11 \x01(\x05\x12\x15\n\rcron_schedule\x18\x12 \x01(\t\x12\x46\n"workflow_execution_expiration_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n"cron_schedule_to_schedule_interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.Duration\x12*\n\x04memo\x18\x15 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo\x12\x43\n\x11search_attributes\x18\x16 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12.\n\nstart_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\rroot_workflow\x18\x18 \x01(\x0b\x32).temporal.api.common.v1.WorkflowExecution\x12\x32\n\x08priority\x18\x19 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12!\n\x19original_execution_run_id\x18\x1a \x01(\t\x12\x65\n&propagated_nexus_serialization_context\x18\x1b \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x18\n\tFireTimer\x12\x0b\n\x03seq\x18\x01 \x01(\r"m\n\x0fResolveActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.activity_result.ActivityResolution\x12\x10\n\x08is_local\x18\x03 \x01(\x08"\xd1\x02\n"ResolveChildWorkflowExecutionStart\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12[\n\tsucceeded\x18\x02 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartSuccessH\x00\x12X\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32\x46.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartFailureH\x00\x12]\n\tcancelled\x18\x04 \x01(\x0b\x32H.coresdk.workflow_activation.ResolveChildWorkflowExecutionStartCancelledH\x00\x42\x08\n\x06status";\n)ResolveChildWorkflowExecutionStartSuccess\x12\x0e\n\x06run_id\x18\x01 \x01(\t"\xa6\x01\n)ResolveChildWorkflowExecutionStartFailure\x12\x13\n\x0bworkflow_id\x18\x01 \x01(\t\x12\x15\n\rworkflow_type\x18\x02 \x01(\t\x12M\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32>.coresdk.child_workflow.StartChildWorkflowExecutionFailedCause"`\n+ResolveChildWorkflowExecutionStartCancelled\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"i\n\x1dResolveChildWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12;\n\x06result\x18\x02 \x01(\x0b\x32+.coresdk.child_workflow.ChildWorkflowResult"+\n\x10UpdateRandomSeed\x12\x17\n\x0frandomness_seed\x18\x01 \x01(\x04"\x84\x02\n\rQueryWorkflow\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_type\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12H\n\x07headers\x18\x05 \x03(\x0b\x32\x37.coresdk.workflow_activation.QueryWorkflow.HeadersEntry\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01" \n\x0e\x43\x61ncelWorkflow\x12\x0e\n\x06reason\x18\x01 \x01(\t"\xa1\x02\n\x0eSignalWorkflow\x12\x13\n\x0bsignal_name\x18\x01 \x01(\t\x12.\n\x05input\x18\x02 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x10\n\x08identity\x18\x03 \x01(\t\x12I\n\x07headers\x18\x05 \x03(\x0b\x32\x38.coresdk.workflow_activation.SignalWorkflow.HeadersEntry\x12\x1c\n\x14originating_event_id\x18\x06 \x01(\x03\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01""\n\x0eNotifyHasPatch\x12\x10\n\x08patch_id\x18\x01 \x01(\t"\xb1\x01\n\x1dResolveSignalExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12P\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32\x41.temporal.api.enums.v1.SignalExternalWorkflowExecutionFailedCause"\xb8\x01\n$ResolveRequestCancelExternalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x31\n\x07\x66\x61ilure\x18\x02 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12P\n\x05\x63\x61use\x18\x03 \x01(\x0e\x32\x41.temporal.api.enums.v1.CancelExternalWorkflowExecutionFailedCause"\xb2\x03\n\x08\x44oUpdate\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x14protocol_instance_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12.\n\x05input\x18\x04 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x43\n\x07headers\x18\x05 \x03(\x0b\x32\x32.coresdk.workflow_activation.DoUpdate.HeadersEntry\x12*\n\x04meta\x18\x06 \x01(\x0b\x32\x1c.temporal.api.update.v1.Meta\x12\x15\n\rrun_validator\x18\x07 \x01(\x08\x12\x65\n&propagated_nexus_serialization_context\x18\x08 \x01(\x0b\x32\x35.temporal.api.nexus.v1.PropagatedSerializationContext\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x9a\x01\n\x1aResolveNexusOperationStart\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x19\n\x0foperation_token\x18\x02 \x01(\tH\x00\x12\x16\n\x0cstarted_sync\x18\x03 \x01(\x08H\x00\x12\x32\n\x06\x66\x61iled\x18\x04 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\x08\n\x06status"Y\n\x15ResolveNexusOperation\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x33\n\x06result\x18\x02 \x01(\x0b\x32#.coresdk.nexus.NexusOperationResult"\xe0\x02\n\x0fRemoveFromCache\x12\x0f\n\x07message\x18\x01 \x01(\t\x12K\n\x06reason\x18\x02 \x01(\x0e\x32;.coresdk.workflow_activation.RemoveFromCache.EvictionReason"\xee\x01\n\x0e\x45victionReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nCACHE_FULL\x10\x01\x12\x0e\n\nCACHE_MISS\x10\x02\x12\x12\n\x0eNONDETERMINISM\x10\x03\x12\r\n\tLANG_FAIL\x10\x04\x12\x12\n\x0eLANG_REQUESTED\x10\x05\x12\x12\n\x0eTASK_NOT_FOUND\x10\x06\x12\x15\n\x11UNHANDLED_COMMAND\x10\x07\x12\t\n\x05\x46\x41TAL\x10\x08\x12\x1f\n\x1bPAGINATION_OR_HISTORY_FETCH\x10\t\x12\x1d\n\x19WORKFLOW_EXECUTION_ENDING\x10\nB8\xea\x02\x35Temporalio::Internal::Bridge::Api::WorkflowActivationb\x06proto3' ) -_sym_db.RegisterMessage(RemoveFromCache) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( @@ -376,56 +67,56 @@ _SIGNALWORKFLOW_HEADERSENTRY._serialized_options = b"8\001" _DOUPDATE_HEADERSENTRY._options = None _DOUPDATE_HEADERSENTRY._serialized_options = b"8\001" - _WORKFLOWACTIVATION._serialized_start = 532 - _WORKFLOWACTIVATION._serialized_end = 936 - _WORKFLOWACTIVATIONJOB._serialized_start = 939 - _WORKFLOWACTIVATIONJOB._serialized_end = 2315 - _INITIALIZEWORKFLOW._serialized_start = 2318 - _INITIALIZEWORKFLOW._serialized_end = 3687 - _INITIALIZEWORKFLOW_HEADERSENTRY._serialized_start = 3608 - _INITIALIZEWORKFLOW_HEADERSENTRY._serialized_end = 3687 - _FIRETIMER._serialized_start = 3689 - _FIRETIMER._serialized_end = 3713 - _RESOLVEACTIVITY._serialized_start = 3715 - _RESOLVEACTIVITY._serialized_end = 3824 - _RESOLVECHILDWORKFLOWEXECUTIONSTART._serialized_start = 3827 - _RESOLVECHILDWORKFLOWEXECUTIONSTART._serialized_end = 4164 - _RESOLVECHILDWORKFLOWEXECUTIONSTARTSUCCESS._serialized_start = 4166 - _RESOLVECHILDWORKFLOWEXECUTIONSTARTSUCCESS._serialized_end = 4225 - _RESOLVECHILDWORKFLOWEXECUTIONSTARTFAILURE._serialized_start = 4228 - _RESOLVECHILDWORKFLOWEXECUTIONSTARTFAILURE._serialized_end = 4394 - _RESOLVECHILDWORKFLOWEXECUTIONSTARTCANCELLED._serialized_start = 4396 - _RESOLVECHILDWORKFLOWEXECUTIONSTARTCANCELLED._serialized_end = 4492 - _RESOLVECHILDWORKFLOWEXECUTION._serialized_start = 4494 - _RESOLVECHILDWORKFLOWEXECUTION._serialized_end = 4599 - _UPDATERANDOMSEED._serialized_start = 4601 - _UPDATERANDOMSEED._serialized_end = 4644 - _QUERYWORKFLOW._serialized_start = 4647 - _QUERYWORKFLOW._serialized_end = 4907 - _QUERYWORKFLOW_HEADERSENTRY._serialized_start = 3608 - _QUERYWORKFLOW_HEADERSENTRY._serialized_end = 3687 - _CANCELWORKFLOW._serialized_start = 4909 - _CANCELWORKFLOW._serialized_end = 4941 - _SIGNALWORKFLOW._serialized_start = 4944 - _SIGNALWORKFLOW._serialized_end = 5203 - _SIGNALWORKFLOW_HEADERSENTRY._serialized_start = 3608 - _SIGNALWORKFLOW_HEADERSENTRY._serialized_end = 3687 - _NOTIFYHASPATCH._serialized_start = 5205 - _NOTIFYHASPATCH._serialized_end = 5239 - _RESOLVESIGNALEXTERNALWORKFLOW._serialized_start = 5241 - _RESOLVESIGNALEXTERNALWORKFLOW._serialized_end = 5336 - _RESOLVEREQUESTCANCELEXTERNALWORKFLOW._serialized_start = 5338 - _RESOLVEREQUESTCANCELEXTERNALWORKFLOW._serialized_end = 5440 - _DOUPDATE._serialized_start = 5443 - _DOUPDATE._serialized_end = 5774 - _DOUPDATE_HEADERSENTRY._serialized_start = 3608 - _DOUPDATE_HEADERSENTRY._serialized_end = 3687 - _RESOLVENEXUSOPERATIONSTART._serialized_start = 5777 - _RESOLVENEXUSOPERATIONSTART._serialized_end = 5931 - _RESOLVENEXUSOPERATION._serialized_start = 5933 - _RESOLVENEXUSOPERATION._serialized_end = 6022 - _REMOVEFROMCACHE._serialized_start = 6025 - _REMOVEFROMCACHE._serialized_end = 6377 - _REMOVEFROMCACHE_EVICTIONREASON._serialized_start = 6139 - _REMOVEFROMCACHE_EVICTIONREASON._serialized_end = 6377 + _WORKFLOWACTIVATION._serialized_start = 611 + _WORKFLOWACTIVATION._serialized_end = 1157 + _WORKFLOWACTIVATIONJOB._serialized_start = 1160 + _WORKFLOWACTIVATIONJOB._serialized_end = 2536 + _INITIALIZEWORKFLOW._serialized_start = 2539 + _INITIALIZEWORKFLOW._serialized_end = 4046 + _INITIALIZEWORKFLOW_HEADERSENTRY._serialized_start = 3967 + _INITIALIZEWORKFLOW_HEADERSENTRY._serialized_end = 4046 + _FIRETIMER._serialized_start = 4048 + _FIRETIMER._serialized_end = 4072 + _RESOLVEACTIVITY._serialized_start = 4074 + _RESOLVEACTIVITY._serialized_end = 4183 + _RESOLVECHILDWORKFLOWEXECUTIONSTART._serialized_start = 4186 + _RESOLVECHILDWORKFLOWEXECUTIONSTART._serialized_end = 4523 + _RESOLVECHILDWORKFLOWEXECUTIONSTARTSUCCESS._serialized_start = 4525 + _RESOLVECHILDWORKFLOWEXECUTIONSTARTSUCCESS._serialized_end = 4584 + _RESOLVECHILDWORKFLOWEXECUTIONSTARTFAILURE._serialized_start = 4587 + _RESOLVECHILDWORKFLOWEXECUTIONSTARTFAILURE._serialized_end = 4753 + _RESOLVECHILDWORKFLOWEXECUTIONSTARTCANCELLED._serialized_start = 4755 + _RESOLVECHILDWORKFLOWEXECUTIONSTARTCANCELLED._serialized_end = 4851 + _RESOLVECHILDWORKFLOWEXECUTION._serialized_start = 4853 + _RESOLVECHILDWORKFLOWEXECUTION._serialized_end = 4958 + _UPDATERANDOMSEED._serialized_start = 4960 + _UPDATERANDOMSEED._serialized_end = 5003 + _QUERYWORKFLOW._serialized_start = 5006 + _QUERYWORKFLOW._serialized_end = 5266 + _QUERYWORKFLOW_HEADERSENTRY._serialized_start = 3967 + _QUERYWORKFLOW_HEADERSENTRY._serialized_end = 4046 + _CANCELWORKFLOW._serialized_start = 5268 + _CANCELWORKFLOW._serialized_end = 5300 + _SIGNALWORKFLOW._serialized_start = 5303 + _SIGNALWORKFLOW._serialized_end = 5592 + _SIGNALWORKFLOW_HEADERSENTRY._serialized_start = 3967 + _SIGNALWORKFLOW_HEADERSENTRY._serialized_end = 4046 + _NOTIFYHASPATCH._serialized_start = 5594 + _NOTIFYHASPATCH._serialized_end = 5628 + _RESOLVESIGNALEXTERNALWORKFLOW._serialized_start = 5631 + _RESOLVESIGNALEXTERNALWORKFLOW._serialized_end = 5808 + _RESOLVEREQUESTCANCELEXTERNALWORKFLOW._serialized_start = 5811 + _RESOLVEREQUESTCANCELEXTERNALWORKFLOW._serialized_end = 5995 + _DOUPDATE._serialized_start = 5998 + _DOUPDATE._serialized_end = 6432 + _DOUPDATE_HEADERSENTRY._serialized_start = 3967 + _DOUPDATE_HEADERSENTRY._serialized_end = 4046 + _RESOLVENEXUSOPERATIONSTART._serialized_start = 6435 + _RESOLVENEXUSOPERATIONSTART._serialized_end = 6589 + _RESOLVENEXUSOPERATION._serialized_start = 6591 + _RESOLVENEXUSOPERATION._serialized_end = 6680 + _REMOVEFROMCACHE._serialized_start = 6683 + _REMOVEFROMCACHE._serialized_end = 7035 + _REMOVEFROMCACHE_EVICTIONREASON._serialized_start = 6797 + _REMOVEFROMCACHE_EVICTIONREASON._serialized_end = 7035 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.pyi b/temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.pyi index 0c0c54733e..af1a2e38ad 100644 --- a/temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.pyi +++ b/temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.pyi @@ -19,8 +19,10 @@ import google.protobuf.message import google.protobuf.timestamp_pb2 import temporalio.api.common.v1.message_pb2 +import temporalio.api.enums.v1.failed_cause_pb2 import temporalio.api.enums.v1.workflow_pb2 import temporalio.api.failure.v1.message_pb2 +import temporalio.api.nexus.v1.message_pb2 import temporalio.api.update.v1.message_pb2 import temporalio.bridge.proto.activity_result.activity_result_pb2 import temporalio.bridge.proto.child_workflow.child_workflow_pb2 @@ -34,6 +36,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowActivation(google.protobuf.message.Message): """An instruction to the lang sdk to run some workflow code, whether for the first time or from a cached state. @@ -93,19 +96,33 @@ class WorkflowActivation(google.protobuf.message.Message): CONTINUE_AS_NEW_SUGGESTED_FIELD_NUMBER: builtins.int DEPLOYMENT_VERSION_FOR_CURRENT_TASK_FIELD_NUMBER: builtins.int LAST_SDK_VERSION_FIELD_NUMBER: builtins.int + SUGGEST_CONTINUE_AS_NEW_REASONS_FIELD_NUMBER: builtins.int + TARGET_WORKER_DEPLOYMENT_VERSION_CHANGED_FIELD_NUMBER: builtins.int run_id: builtins.str """The id of the currently active run of the workflow. Also used as a cache key. There may only ever be one active workflow task (and hence activation) of a run at one time. """ - @property - def timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: - """The current time as understood by the workflow, which is set by workflow task started events""" is_replaying: builtins.bool """Whether or not the activation is replaying past events""" history_length: builtins.int """Current history length as determined by the event id of the most recently processed event. This ensures that the number is always deterministic """ + history_size_bytes: builtins.int + """The history size in bytes as of the last WFT started event""" + continue_as_new_suggested: builtins.bool + """Set true if the most recent WFT started event had this suggestion""" + last_sdk_version: builtins.str + """The last seen SDK version from the most recent WFT completed event""" + target_worker_deployment_version_changed: builtins.bool + """True if Workflow's Target Worker Deployment Version is different from its Pinned Version and + the workflow is Pinned. + Experimental. + """ + @property + def timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: + """The current time as understood by the workflow, which is set by workflow task started events""" + @property def jobs( self, @@ -113,6 +130,7 @@ class WorkflowActivation(google.protobuf.message.Message): global___WorkflowActivationJob ]: """The things to do upon activating the workflow""" + @property def available_internal_flags( self, @@ -121,10 +139,7 @@ class WorkflowActivation(google.protobuf.message.Message): internal flags may be used. This is not a delta - all previously used flags always appear since this representation is cheap. """ - history_size_bytes: builtins.int - """The history size in bytes as of the last WFT started event""" - continue_as_new_suggested: builtins.bool - """Set true if the most recent WFT started event had this suggestion""" + @property def deployment_version_for_current_task( self, @@ -137,8 +152,18 @@ class WorkflowActivation(google.protobuf.message.Message): build id, if this worker was using the deprecated Build ID-only feature(s). """ - last_sdk_version: builtins.str - """The last seen SDK version from the most recent WFT completed event""" + + @property + def suggest_continue_as_new_reasons( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[ + temporalio.api.enums.v1.workflow_pb2.SuggestContinueAsNewReason.ValueType + ]: + """Experimental. Optionally decide the versioning behavior that the first task of the new run should use. + For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version + of the previous run. + """ + def __init__( self, *, @@ -153,10 +178,15 @@ class WorkflowActivation(google.protobuf.message.Message): deployment_version_for_current_task: temporalio.bridge.proto.common.common_pb2.WorkerDeploymentVersion | None = ..., last_sdk_version: builtins.str = ..., + suggest_continue_as_new_reasons: collections.abc.Iterable[ + temporalio.api.enums.v1.workflow_pb2.SuggestContinueAsNewReason.ValueType + ] + | None = ..., + target_worker_deployment_version_changed: builtins.bool = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deployment_version_for_current_task", b"deployment_version_for_current_task", "timestamp", @@ -165,7 +195,7 @@ class WorkflowActivation(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "available_internal_flags", b"available_internal_flags", "continue_as_new_suggested", @@ -184,6 +214,10 @@ class WorkflowActivation(google.protobuf.message.Message): b"last_sdk_version", "run_id", b"run_id", + "suggest_continue_as_new_reasons", + b"suggest_continue_as_new_reasons", + "target_worker_deployment_version_changed", + b"target_worker_deployment_version_changed", "timestamp", b"timestamp", ], @@ -191,6 +225,7 @@ class WorkflowActivation(google.protobuf.message.Message): global___WorkflowActivation = WorkflowActivation +@typing.final class WorkflowActivationJob(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -213,67 +248,83 @@ class WorkflowActivationJob(google.protobuf.message.Message): @property def initialize_workflow(self) -> global___InitializeWorkflow: """A workflow is starting, record all of the information from its start event""" + @property def fire_timer(self) -> global___FireTimer: """A timer has fired, allowing whatever was waiting on it (if anything) to proceed""" + @property def update_random_seed(self) -> global___UpdateRandomSeed: """Workflow was reset. The randomness seed must be updated.""" + @property def query_workflow(self) -> global___QueryWorkflow: """A request to query the workflow was received. It is guaranteed that queries (one or more) always come in their own activation after other mutating jobs. """ + @property def cancel_workflow(self) -> global___CancelWorkflow: """A request to cancel the workflow was received.""" + @property def signal_workflow(self) -> global___SignalWorkflow: """A request to signal the workflow was received.""" + @property def resolve_activity(self) -> global___ResolveActivity: """An activity was resolved, result could be completed, failed or cancelled""" + @property def notify_has_patch(self) -> global___NotifyHasPatch: """A patch marker has been detected and lang is being told that change exists. This job is strange in that it is sent pre-emptively to lang without any corresponding command being sent first. """ + @property def resolve_child_workflow_execution_start( self, ) -> global___ResolveChildWorkflowExecutionStart: """A child workflow execution has started or failed to start""" + @property def resolve_child_workflow_execution( self, ) -> global___ResolveChildWorkflowExecution: """A child workflow was resolved, result could be completed or failed""" + @property def resolve_signal_external_workflow( self, ) -> global___ResolveSignalExternalWorkflow: """An attempt to signal an external workflow resolved""" + @property def resolve_request_cancel_external_workflow( self, ) -> global___ResolveRequestCancelExternalWorkflow: """An attempt to cancel an external workflow resolved""" + @property def do_update(self) -> global___DoUpdate: """A request to handle a workflow update.""" + @property def resolve_nexus_operation_start(self) -> global___ResolveNexusOperationStart: """A nexus operation started.""" + @property def resolve_nexus_operation(self) -> global___ResolveNexusOperation: """A nexus operation resolved.""" + @property def remove_from_cache(self) -> global___RemoveFromCache: """Remove the workflow identified by the [WorkflowActivation] containing this job from the cache after performing the activation. It is guaranteed that this will be the only job in the activation if present. """ + def __init__( self, *, @@ -300,7 +351,7 @@ class WorkflowActivationJob(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel_workflow", b"cancel_workflow", "do_update", @@ -339,7 +390,7 @@ class WorkflowActivationJob(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel_workflow", b"cancel_workflow", "do_update", @@ -377,9 +428,9 @@ class WorkflowActivationJob(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] + self, oneof_group: typing.Literal["variant", b"variant"] ) -> ( - typing_extensions.Literal[ + typing.Literal[ "initialize_workflow", "fire_timer", "update_random_seed", @@ -402,11 +453,13 @@ class WorkflowActivationJob(google.protobuf.message.Message): global___WorkflowActivationJob = WorkflowActivationJob +@typing.final class InitializeWorkflow(google.protobuf.message.Message): """Initialize a new workflow""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeadersEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -422,11 +475,10 @@ class InitializeWorkflow(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... WORKFLOW_TYPE_FIELD_NUMBER: builtins.int @@ -454,10 +506,37 @@ class InitializeWorkflow(google.protobuf.message.Message): START_TIME_FIELD_NUMBER: builtins.int ROOT_WORKFLOW_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int + ORIGINAL_EXECUTION_RUN_ID_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int workflow_type: builtins.str """The identifier the lang-specific sdk uses to execute workflow code""" workflow_id: builtins.str """The workflow id used on the temporal server""" + randomness_seed: builtins.int + """The seed must be used to initialize the random generator used by SDK. + RandomSeedUpdatedAttributes are used to deliver seed updates. + """ + identity: builtins.str + """Identity of the client who requested this execution""" + continued_from_execution_run_id: builtins.str + """Run id of the previous workflow which continued-as-new or retired or cron executed into this + workflow, if any. + """ + continued_initiator: ( + temporalio.api.enums.v1.workflow_pb2.ContinueAsNewInitiator.ValueType + ) + """If this workflow was a continuation, indicates the type of continuation.""" + first_execution_run_id: builtins.str + """This is the very first run id the workflow ever had, following continuation chains.""" + attempt: builtins.int + """Starting at 1, the number of times we have tried to execute this workflow""" + cron_schedule: builtins.str + """If this workflow runs on a cron schedule, it will appear here""" + original_execution_run_id: builtins.str + """The run id recorded on the `WORKFLOW_EXECUTION_STARTED` event. Unlike the execution's current + run id, this value is preserved across workflow resets. Mirrors the `original_execution_run_id` + field from `WorkflowExecutionStartedEventAttributes`. + """ @property def arguments( self, @@ -465,10 +544,7 @@ class InitializeWorkflow(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Payload ]: """Inputs to the workflow code""" - randomness_seed: builtins.int - """The seed must be used to initialize the random generator used by SDK. - RandomSeedUpdatedAttributes are used to deliver seed updates. - """ + @property def headers( self, @@ -476,45 +552,37 @@ class InitializeWorkflow(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ]: """Used to add metadata e.g. for tracing and auth, meant to be read and written to by interceptors.""" - identity: builtins.str - """Identity of the client who requested this execution""" + @property def parent_workflow_info( self, ) -> temporalio.bridge.proto.common.common_pb2.NamespacedWorkflowExecution: """If this workflow is a child, information about the parent""" + @property def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: """Total workflow execution timeout including retries and continue as new.""" + @property def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow run.""" + @property def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow task.""" - continued_from_execution_run_id: builtins.str - """Run id of the previous workflow which continued-as-new or retired or cron executed into this - workflow, if any. - """ - continued_initiator: ( - temporalio.api.enums.v1.workflow_pb2.ContinueAsNewInitiator.ValueType - ) - """If this workflow was a continuation, indicates the type of continuation.""" + @property def continued_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """If this workflow was a continuation and that continuation failed, the details of that.""" + @property def last_completion_result(self) -> temporalio.api.common.v1.message_pb2.Payloads: """If this workflow was a continuation and that continuation completed, the details of that.""" - first_execution_run_id: builtins.str - """This is the very first run id the workflow ever had, following continuation chains.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """This workflow's retry policy""" - attempt: builtins.int - """Starting at 1, the number of times we have tried to execute this workflow""" - cron_schedule: builtins.str - """If this workflow runs on a cron schedule, it will appear here""" + @property def workflow_execution_expiration_time( self, @@ -522,6 +590,7 @@ class InitializeWorkflow(google.protobuf.message.Message): """The absolute time at which the workflow will be timed out. This is passed without change to the next run/retry of a workflow. """ + @property def cron_schedule_to_schedule_interval( self, @@ -529,17 +598,21 @@ class InitializeWorkflow(google.protobuf.message.Message): """For a cron workflow, this contains the amount of time between when this iteration of the cron workflow was scheduled and when it should run next per its cron_schedule. """ + @property def memo(self) -> temporalio.api.common.v1.message_pb2.Memo: """User-defined memo""" + @property def search_attributes( self, ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: """Search attributes created/updated when this workflow was started""" + @property def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """When the workflow execution started event was first written""" + @property def root_workflow(self) -> temporalio.api.common.v1.message_pb2.WorkflowExecution: """Contains information about the root workflow execution. It is possible for the namespace to @@ -553,9 +626,20 @@ class InitializeWorkflow(google.protobuf.message.Message): See field in WorkflowExecutionStarted for more detail. """ + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """Priority of this workflow execution""" + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context of the Nexus operation handler that started this workflow, if any. + Lang should use it to serialize the workflow's result and failure, which are returned to the + Nexus caller. + """ + def __init__( self, *, @@ -596,10 +680,13 @@ class InitializeWorkflow(google.protobuf.message.Message): root_workflow: temporalio.api.common.v1.message_pb2.WorkflowExecution | None = ..., priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + original_execution_run_id: builtins.str = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "continued_failure", b"continued_failure", "cron_schedule_to_schedule_interval", @@ -612,6 +699,8 @@ class InitializeWorkflow(google.protobuf.message.Message): b"parent_workflow_info", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "retry_policy", b"retry_policy", "root_workflow", @@ -632,7 +721,7 @@ class InitializeWorkflow(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "arguments", b"arguments", "attempt", @@ -657,10 +746,14 @@ class InitializeWorkflow(google.protobuf.message.Message): b"last_completion_result", "memo", b"memo", + "original_execution_run_id", + b"original_execution_run_id", "parent_workflow_info", b"parent_workflow_info", "priority", b"priority", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "randomness_seed", b"randomness_seed", "retry_policy", @@ -688,6 +781,7 @@ class InitializeWorkflow(google.protobuf.message.Message): global___InitializeWorkflow = InitializeWorkflow +@typing.final class FireTimer(google.protobuf.message.Message): """Notify a workflow that a timer has fired""" @@ -701,12 +795,11 @@ class FireTimer(google.protobuf.message.Message): *, seq: builtins.int = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["seq", b"seq"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["seq", b"seq"]) -> None: ... global___FireTimer = FireTimer +@typing.final class ResolveActivity(google.protobuf.message.Message): """Notify a workflow that an activity has been resolved""" @@ -717,16 +810,16 @@ class ResolveActivity(google.protobuf.message.Message): IS_LOCAL_FIELD_NUMBER: builtins.int seq: builtins.int """Sequence number as provided by lang in the corresponding ScheduleActivity command""" + is_local: builtins.bool + """Set to true if the resolution is for a local activity. This is used internally by Core and + lang does not need to care about it. + """ @property def result( self, ) -> ( temporalio.bridge.proto.activity_result.activity_result_pb2.ActivityResolution ): ... - is_local: builtins.bool - """Set to true if the resolution is for a local activity. This is used internally by Core and - lang does not need to care about it. - """ def __init__( self, *, @@ -736,17 +829,18 @@ class ResolveActivity(google.protobuf.message.Message): is_local: builtins.bool = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "is_local", b"is_local", "result", b"result", "seq", b"seq" ], ) -> None: ... global___ResolveActivity = ResolveActivity +@typing.final class ResolveChildWorkflowExecutionStart(google.protobuf.message.Message): """Notify a workflow that a start child workflow execution request has succeeded, failed or was cancelled. @@ -776,7 +870,7 @@ class ResolveChildWorkflowExecutionStart(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancelled", b"cancelled", "failed", @@ -789,7 +883,7 @@ class ResolveChildWorkflowExecutionStart(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancelled", b"cancelled", "failed", @@ -803,11 +897,12 @@ class ResolveChildWorkflowExecutionStart(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["status", b"status"] - ) -> typing_extensions.Literal["succeeded", "failed", "cancelled"] | None: ... + self, oneof_group: typing.Literal["status", b"status"] + ) -> typing.Literal["succeeded", "failed", "cancelled"] | None: ... global___ResolveChildWorkflowExecutionStart = ResolveChildWorkflowExecutionStart +@typing.final class ResolveChildWorkflowExecutionStartSuccess(google.protobuf.message.Message): """Simply pass the run_id to lang""" @@ -820,14 +915,13 @@ class ResolveChildWorkflowExecutionStartSuccess(google.protobuf.message.Message) *, run_id: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["run_id", b"run_id"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["run_id", b"run_id"]) -> None: ... global___ResolveChildWorkflowExecutionStartSuccess = ( ResolveChildWorkflowExecutionStartSuccess ) +@typing.final class ResolveChildWorkflowExecutionStartFailure(google.protobuf.message.Message): """Provide lang the cause of failure""" @@ -851,7 +945,7 @@ class ResolveChildWorkflowExecutionStartFailure(google.protobuf.message.Message) ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cause", b"cause", "workflow_id", @@ -865,6 +959,7 @@ global___ResolveChildWorkflowExecutionStartFailure = ( ResolveChildWorkflowExecutionStartFailure ) +@typing.final class ResolveChildWorkflowExecutionStartCancelled(google.protobuf.message.Message): """`failure` should be ChildWorkflowFailure with cause set to CancelledFailure. The failure is constructed in core for lang's convenience. @@ -881,16 +976,15 @@ class ResolveChildWorkflowExecutionStartCancelled(google.protobuf.message.Messag failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["failure", b"failure"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["failure", b"failure"]) -> None: ... global___ResolveChildWorkflowExecutionStartCancelled = ( ResolveChildWorkflowExecutionStartCancelled ) +@typing.final class ResolveChildWorkflowExecution(google.protobuf.message.Message): """Notify a workflow that a child workflow execution has been resolved""" @@ -914,14 +1008,15 @@ class ResolveChildWorkflowExecution(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["result", b"result", "seq", b"seq"] + self, field_name: typing.Literal["result", b"result", "seq", b"seq"] ) -> None: ... global___ResolveChildWorkflowExecution = ResolveChildWorkflowExecution +@typing.final class UpdateRandomSeed(google.protobuf.message.Message): """Update the workflow's random seed""" @@ -935,17 +1030,18 @@ class UpdateRandomSeed(google.protobuf.message.Message): randomness_seed: builtins.int = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["randomness_seed", b"randomness_seed"], + self, field_name: typing.Literal["randomness_seed", b"randomness_seed"] ) -> None: ... global___UpdateRandomSeed = UpdateRandomSeed +@typing.final class QueryWorkflow(google.protobuf.message.Message): """Query a workflow""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeadersEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -961,11 +1057,10 @@ class QueryWorkflow(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... QUERY_ID_FIELD_NUMBER: builtins.int @@ -992,6 +1087,7 @@ class QueryWorkflow(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ]: """Headers attached to the query""" + def __init__( self, *, @@ -1008,7 +1104,7 @@ class QueryWorkflow(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "arguments", b"arguments", "headers", @@ -1022,6 +1118,7 @@ class QueryWorkflow(google.protobuf.message.Message): global___QueryWorkflow = QueryWorkflow +@typing.final class CancelWorkflow(google.protobuf.message.Message): """Cancel a running workflow""" @@ -1035,17 +1132,17 @@ class CancelWorkflow(google.protobuf.message.Message): *, reason: builtins.str = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["reason", b"reason"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["reason", b"reason"]) -> None: ... global___CancelWorkflow = CancelWorkflow +@typing.final class SignalWorkflow(google.protobuf.message.Message): """Send a signal to a workflow""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeadersEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1061,26 +1158,28 @@ class SignalWorkflow(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SIGNAL_NAME_FIELD_NUMBER: builtins.int INPUT_FIELD_NUMBER: builtins.int IDENTITY_FIELD_NUMBER: builtins.int HEADERS_FIELD_NUMBER: builtins.int + ORIGINATING_EVENT_ID_FIELD_NUMBER: builtins.int signal_name: builtins.str + identity: builtins.str + """Identity of the sender of the signal""" + originating_event_id: builtins.int + """Event ID of the `WORKFLOW_EXECUTION_SIGNALED` history event that produced this job.""" @property def input( self, ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ temporalio.api.common.v1.message_pb2.Payload ]: ... - identity: builtins.str - """Identity of the sender of the signal""" @property def headers( self, @@ -1088,6 +1187,7 @@ class SignalWorkflow(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ]: """Headers attached to the signal""" + def __init__( self, *, @@ -1099,16 +1199,19 @@ class SignalWorkflow(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ] | None = ..., + originating_event_id: builtins.int = ..., ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "headers", b"headers", "identity", b"identity", "input", b"input", + "originating_event_id", + b"originating_event_id", "signal_name", b"signal_name", ], @@ -1116,6 +1219,7 @@ class SignalWorkflow(google.protobuf.message.Message): global___SignalWorkflow = SignalWorkflow +@typing.final class NotifyHasPatch(google.protobuf.message.Message): """Inform lang what the result of a call to `patched` or similar API should be -- this is always sent pre-emptively, so any time it is sent the change is present @@ -1131,71 +1235,88 @@ class NotifyHasPatch(google.protobuf.message.Message): patch_id: builtins.str = ..., ) -> None: ... def ClearField( - self, field_name: typing_extensions.Literal["patch_id", b"patch_id"] + self, field_name: typing.Literal["patch_id", b"patch_id"] ) -> None: ... global___NotifyHasPatch = NotifyHasPatch +@typing.final class ResolveSignalExternalWorkflow(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SEQ_FIELD_NUMBER: builtins.int FAILURE_FIELD_NUMBER: builtins.int + CAUSE_FIELD_NUMBER: builtins.int seq: builtins.int """Sequence number as provided by lang in the corresponding SignalExternalWorkflowExecution command """ + cause: temporalio.api.enums.v1.failed_cause_pb2.SignalExternalWorkflowExecutionFailedCause.ValueType + """The server-reported cause when the signal failed. Unspecified when the signal succeeded or + was cancelled before being sent. + """ @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: """If populated, this signal either failed to be sent or was cancelled depending on failure type / info. """ + def __init__( self, *, seq: builtins.int = ..., failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., + cause: temporalio.api.enums.v1.failed_cause_pb2.SignalExternalWorkflowExecutionFailedCause.ValueType = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal["failure", b"failure", "seq", b"seq"], + field_name: typing.Literal[ + "cause", b"cause", "failure", b"failure", "seq", b"seq" + ], ) -> None: ... global___ResolveSignalExternalWorkflow = ResolveSignalExternalWorkflow +@typing.final class ResolveRequestCancelExternalWorkflow(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor SEQ_FIELD_NUMBER: builtins.int FAILURE_FIELD_NUMBER: builtins.int + CAUSE_FIELD_NUMBER: builtins.int seq: builtins.int """Sequence number as provided by lang in the corresponding RequestCancelExternalWorkflowExecution command """ + cause: temporalio.api.enums.v1.failed_cause_pb2.CancelExternalWorkflowExecutionFailedCause.ValueType + """The server-reported cause when the cancellation request failed.""" @property def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: - """If populated, this signal either failed to be sent or was cancelled depending on failure - type / info. - """ + """If populated, the cancellation request failed.""" + def __init__( self, *, seq: builtins.int = ..., failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., + cause: temporalio.api.enums.v1.failed_cause_pb2.CancelExternalWorkflowExecutionFailedCause.ValueType = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal["failure", b"failure", "seq", b"seq"], + field_name: typing.Literal[ + "cause", b"cause", "failure", b"failure", "seq", b"seq" + ], ) -> None: ... global___ResolveRequestCancelExternalWorkflow = ResolveRequestCancelExternalWorkflow +@typing.final class DoUpdate(google.protobuf.message.Message): """Lang is requested to invoke an update handler on the workflow. Lang should invoke the update validator first (if requested). If it accepts the update, immediately invoke the update handler. @@ -1204,6 +1325,7 @@ class DoUpdate(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeadersEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1219,11 +1341,10 @@ class DoUpdate(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... ID_FIELD_NUMBER: builtins.int @@ -1233,6 +1354,7 @@ class DoUpdate(google.protobuf.message.Message): HEADERS_FIELD_NUMBER: builtins.int META_FIELD_NUMBER: builtins.int RUN_VALIDATOR_FIELD_NUMBER: builtins.int + PROPAGATED_NEXUS_SERIALIZATION_CONTEXT_FIELD_NUMBER: builtins.int id: builtins.str """A workflow-unique identifier for this update""" protocol_instance_id: builtins.str @@ -1241,6 +1363,10 @@ class DoUpdate(google.protobuf.message.Message): """ name: builtins.str """The name of the update handler""" + run_validator: builtins.bool + """If set true, lang must run the update's validator before running the handler. This will be + set false during replay, since validation is not re-run during replay. + """ @property def input( self, @@ -1248,6 +1374,7 @@ class DoUpdate(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Payload ]: """The input to the update""" + @property def headers( self, @@ -1255,15 +1382,22 @@ class DoUpdate(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ]: """Headers attached to the update""" + @property def meta(self) -> temporalio.api.update.v1.message_pb2.Meta: """Remaining metadata associated with the update. The `update_id` field is stripped from here and moved to `id`, since it is guaranteed to be present. """ - run_validator: builtins.bool - """If set true, lang must run the update's validator before running the handler. This will be - set false during replay, since validation is not re-run during replay. - """ + + @property + def propagated_nexus_serialization_context( + self, + ) -> temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext: + """Serialization context of the Nexus operation handler that sent this update, if any. Lang + should use it to serialize the update's result and failure, which are returned to the Nexus + caller. + """ + def __init__( self, *, @@ -1278,13 +1412,21 @@ class DoUpdate(google.protobuf.message.Message): | None = ..., meta: temporalio.api.update.v1.message_pb2.Meta | None = ..., run_validator: builtins.bool = ..., + propagated_nexus_serialization_context: temporalio.api.nexus.v1.message_pb2.PropagatedSerializationContext + | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["meta", b"meta"] + self, + field_name: typing.Literal[ + "meta", + b"meta", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", + ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "headers", b"headers", "id", @@ -1295,6 +1437,8 @@ class DoUpdate(google.protobuf.message.Message): b"meta", "name", b"name", + "propagated_nexus_serialization_context", + b"propagated_nexus_serialization_context", "protocol_instance_id", b"protocol_instance_id", "run_validator", @@ -1304,6 +1448,7 @@ class DoUpdate(google.protobuf.message.Message): global___DoUpdate = DoUpdate +@typing.final class ResolveNexusOperationStart(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1328,6 +1473,7 @@ class ResolveNexusOperationStart(google.protobuf.message.Message): failed synchronously. Details are included inside the message. In this case, the subsequent ResolveNexusOperation will never be sent. """ + def __init__( self, *, @@ -1338,7 +1484,7 @@ class ResolveNexusOperationStart(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failed", b"failed", "operation_token", @@ -1351,7 +1497,7 @@ class ResolveNexusOperationStart(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failed", b"failed", "operation_token", @@ -1365,13 +1511,12 @@ class ResolveNexusOperationStart(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["status", b"status"] - ) -> ( - typing_extensions.Literal["operation_token", "started_sync", "failed"] | None - ): ... + self, oneof_group: typing.Literal["status", b"status"] + ) -> typing.Literal["operation_token", "started_sync", "failed"] | None: ... global___ResolveNexusOperationStart = ResolveNexusOperationStart +@typing.final class ResolveNexusOperation(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1391,14 +1536,15 @@ class ResolveNexusOperation(google.protobuf.message.Message): | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["result", b"result", "seq", b"seq"] + self, field_name: typing.Literal["result", b"result", "seq", b"seq"] ) -> None: ... global___ResolveNexusOperation = ResolveNexusOperation +@typing.final class RemoveFromCache(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1411,7 +1557,7 @@ class RemoveFromCache(google.protobuf.message.Message): RemoveFromCache._EvictionReason.ValueType ], builtins.type, - ): # noqa: F821 + ): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor UNSPECIFIED: RemoveFromCache._EvictionReason.ValueType # 0 CACHE_FULL: RemoveFromCache._EvictionReason.ValueType # 1 @@ -1489,10 +1635,7 @@ class RemoveFromCache(google.protobuf.message.Message): reason: global___RemoveFromCache.EvictionReason.ValueType = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "message", b"message", "reason", b"reason" - ], + self, field_name: typing.Literal["message", b"message", "reason", b"reason"] ) -> None: ... global___RemoveFromCache = RemoveFromCache diff --git a/temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.py b/temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.py index 5181a38019..3573f36b11 100644 --- a/temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.py +++ b/temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.py @@ -5,10 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -28,9 +26,15 @@ from temporalio.api.failure.v1 import ( message_pb2 as temporal_dot_api_dot_failure_dot_v1_dot_message__pb2, ) +from temporalio.api.sdk.v1 import ( + event_group_marker_pb2 as temporal_dot_api_dot_sdk_dot_v1_dot_event__group__marker__pb2, +) from temporalio.api.sdk.v1 import ( user_metadata_pb2 as temporal_dot_api_dot_sdk_dot_v1_dot_user__metadata__pb2, ) +from temporalio.api.workflow.v1 import ( + message_pb2 as temporal_dot_api_dot_workflow_dot_v1_dot_message__pb2, +) from temporalio.bridge.proto.child_workflow import ( child_workflow_pb2 as temporal_dot_sdk_dot_core_dot_child__workflow_dot_child__workflow__pb2, ) @@ -42,463 +46,11 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n;temporal/sdk/core/workflow_commands/workflow_commands.proto\x12\x19\x63oresdk.workflow_commands\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto\x1a\x35temporal/sdk/core/child_workflow/child_workflow.proto\x1a#temporal/sdk/core/nexus/nexus.proto\x1a%temporal/sdk/core/common/common.proto"\xe5\x0f\n\x0fWorkflowCommand\x12\x38\n\ruser_metadata\x18\x64 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12<\n\x0bstart_timer\x18\x01 \x01(\x0b\x32%.coresdk.workflow_commands.StartTimerH\x00\x12H\n\x11schedule_activity\x18\x02 \x01(\x0b\x32+.coresdk.workflow_commands.ScheduleActivityH\x00\x12\x42\n\x10respond_to_query\x18\x03 \x01(\x0b\x32&.coresdk.workflow_commands.QueryResultH\x00\x12S\n\x17request_cancel_activity\x18\x04 \x01(\x0b\x32\x30.coresdk.workflow_commands.RequestCancelActivityH\x00\x12>\n\x0c\x63\x61ncel_timer\x18\x05 \x01(\x0b\x32&.coresdk.workflow_commands.CancelTimerH\x00\x12[\n\x1b\x63omplete_workflow_execution\x18\x06 \x01(\x0b\x32\x34.coresdk.workflow_commands.CompleteWorkflowExecutionH\x00\x12S\n\x17\x66\x61il_workflow_execution\x18\x07 \x01(\x0b\x32\x30.coresdk.workflow_commands.FailWorkflowExecutionH\x00\x12g\n"continue_as_new_workflow_execution\x18\x08 \x01(\x0b\x32\x39.coresdk.workflow_commands.ContinueAsNewWorkflowExecutionH\x00\x12W\n\x19\x63\x61ncel_workflow_execution\x18\t \x01(\x0b\x32\x32.coresdk.workflow_commands.CancelWorkflowExecutionH\x00\x12\x45\n\x10set_patch_marker\x18\n \x01(\x0b\x32).coresdk.workflow_commands.SetPatchMarkerH\x00\x12`\n\x1estart_child_workflow_execution\x18\x0b \x01(\x0b\x32\x36.coresdk.workflow_commands.StartChildWorkflowExecutionH\x00\x12\x62\n\x1f\x63\x61ncel_child_workflow_execution\x18\x0c \x01(\x0b\x32\x37.coresdk.workflow_commands.CancelChildWorkflowExecutionH\x00\x12w\n*request_cancel_external_workflow_execution\x18\r \x01(\x0b\x32\x41.coresdk.workflow_commands.RequestCancelExternalWorkflowExecutionH\x00\x12h\n"signal_external_workflow_execution\x18\x0e \x01(\x0b\x32:.coresdk.workflow_commands.SignalExternalWorkflowExecutionH\x00\x12Q\n\x16\x63\x61ncel_signal_workflow\x18\x0f \x01(\x0b\x32/.coresdk.workflow_commands.CancelSignalWorkflowH\x00\x12S\n\x17schedule_local_activity\x18\x10 \x01(\x0b\x32\x30.coresdk.workflow_commands.ScheduleLocalActivityH\x00\x12^\n\x1drequest_cancel_local_activity\x18\x11 \x01(\x0b\x32\x35.coresdk.workflow_commands.RequestCancelLocalActivityH\x00\x12\x66\n!upsert_workflow_search_attributes\x18\x12 \x01(\x0b\x32\x39.coresdk.workflow_commands.UpsertWorkflowSearchAttributesH\x00\x12Y\n\x1amodify_workflow_properties\x18\x13 \x01(\x0b\x32\x33.coresdk.workflow_commands.ModifyWorkflowPropertiesH\x00\x12\x44\n\x0fupdate_response\x18\x14 \x01(\x0b\x32).coresdk.workflow_commands.UpdateResponseH\x00\x12U\n\x18schedule_nexus_operation\x18\x15 \x01(\x0b\x32\x31.coresdk.workflow_commands.ScheduleNexusOperationH\x00\x12`\n\x1erequest_cancel_nexus_operation\x18\x16 \x01(\x0b\x32\x36.coresdk.workflow_commands.RequestCancelNexusOperationH\x00\x42\t\n\x07variant"S\n\nStartTimer\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x38\n\x15start_to_fire_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration"\x1a\n\x0b\x43\x61ncelTimer\x12\x0b\n\x03seq\x18\x01 \x01(\r"\xb8\x06\n\x10ScheduleActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x15\n\ractivity_type\x18\x03 \x01(\t\x12\x12\n\ntask_queue\x18\x05 \x01(\t\x12I\n\x07headers\x18\x06 \x03(\x0b\x32\x38.coresdk.workflow_commands.ScheduleActivity.HeadersEntry\x12\x32\n\targuments\x18\x07 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12N\n\x11\x63\x61ncellation_type\x18\r \x01(\x0e\x32\x33.coresdk.workflow_commands.ActivityCancellationType\x12\x1e\n\x16\x64o_not_eagerly_execute\x18\x0e \x01(\x08\x12;\n\x11versioning_intent\x18\x0f \x01(\x0e\x32 .coresdk.common.VersioningIntent\x12\x32\n\x08priority\x18\x10 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\xee\x05\n\x15ScheduleLocalActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x15\n\ractivity_type\x18\x03 \x01(\t\x12\x0f\n\x07\x61ttempt\x18\x04 \x01(\r\x12:\n\x16original_schedule_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\x07headers\x18\x06 \x03(\x0b\x32=.coresdk.workflow_commands.ScheduleLocalActivity.HeadersEntry\x12\x32\n\targuments\x18\x07 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x0b \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x38\n\x15local_retry_threshold\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x12N\n\x11\x63\x61ncellation_type\x18\r \x01(\x0e\x32\x33.coresdk.workflow_commands.ActivityCancellationType\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"$\n\x15RequestCancelActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r")\n\x1aRequestCancelLocalActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r"\x9c\x01\n\x0bQueryResult\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12<\n\tsucceeded\x18\x02 \x01(\x0b\x32\'.coresdk.workflow_commands.QuerySuccessH\x00\x12\x32\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\t\n\x07variant"A\n\x0cQuerySuccess\x12\x31\n\x08response\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload"L\n\x19\x43ompleteWorkflowExecution\x12/\n\x06result\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload"J\n\x15\x46\x61ilWorkflowExecution\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"\xfb\x06\n\x1e\x43ontinueAsNewWorkflowExecution\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x37\n\x14workflow_run_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12Q\n\x04memo\x18\x06 \x03(\x0b\x32\x43.coresdk.workflow_commands.ContinueAsNewWorkflowExecution.MemoEntry\x12W\n\x07headers\x18\x07 \x03(\x0b\x32\x46.coresdk.workflow_commands.ContinueAsNewWorkflowExecution.HeadersEntry\x12j\n\x11search_attributes\x18\x08 \x03(\x0b\x32O.coresdk.workflow_commands.ContinueAsNewWorkflowExecution.SearchAttributesEntry\x12\x39\n\x0cretry_policy\x18\t \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12;\n\x11versioning_intent\x18\n \x01(\x0e\x32 .coresdk.common.VersioningIntent\x1aL\n\tMemoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x1aX\n\x15SearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x19\n\x17\x43\x61ncelWorkflowExecution"6\n\x0eSetPatchMarker\x12\x10\n\x08patch_id\x18\x01 \x01(\t\x12\x12\n\ndeprecated\x18\x02 \x01(\x08"\x94\n\n\x1bStartChildWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x03 \x01(\t\x12\x15\n\rworkflow_type\x18\x04 \x01(\t\x12\x12\n\ntask_queue\x18\x05 \x01(\t\x12.\n\x05input\x18\x06 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12=\n\x1aworkflow_execution_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x46\n\x13parent_close_policy\x18\n \x01(\x0e\x32).coresdk.child_workflow.ParentClosePolicy\x12N\n\x18workflow_id_reuse_policy\x18\x0c \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\r \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\x0e \x01(\t\x12T\n\x07headers\x18\x0f \x03(\x0b\x32\x43.coresdk.workflow_commands.StartChildWorkflowExecution.HeadersEntry\x12N\n\x04memo\x18\x10 \x03(\x0b\x32@.coresdk.workflow_commands.StartChildWorkflowExecution.MemoEntry\x12g\n\x11search_attributes\x18\x11 \x03(\x0b\x32L.coresdk.workflow_commands.StartChildWorkflowExecution.SearchAttributesEntry\x12P\n\x11\x63\x61ncellation_type\x18\x12 \x01(\x0e\x32\x35.coresdk.child_workflow.ChildWorkflowCancellationType\x12;\n\x11versioning_intent\x18\x13 \x01(\x0e\x32 .coresdk.common.VersioningIntent\x12\x32\n\x08priority\x18\x14 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x1aL\n\tMemoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x1aX\n\x15SearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"J\n\x1c\x43\x61ncelChildWorkflowExecution\x12\x1a\n\x12\x63hild_workflow_seq\x18\x01 \x01(\r\x12\x0e\n\x06reason\x18\x02 \x01(\t"\x8e\x01\n&RequestCancelExternalWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12G\n\x12workflow_execution\x18\x02 \x01(\x0b\x32+.coresdk.common.NamespacedWorkflowExecution\x12\x0e\n\x06reason\x18\x03 \x01(\t"\x8f\x03\n\x1fSignalExternalWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12I\n\x12workflow_execution\x18\x02 \x01(\x0b\x32+.coresdk.common.NamespacedWorkflowExecutionH\x00\x12\x1b\n\x11\x63hild_workflow_id\x18\x03 \x01(\tH\x00\x12\x13\n\x0bsignal_name\x18\x04 \x01(\t\x12-\n\x04\x61rgs\x18\x05 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12X\n\x07headers\x18\x06 \x03(\x0b\x32G.coresdk.workflow_commands.SignalExternalWorkflowExecution.HeadersEntry\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x42\x08\n\x06target"#\n\x14\x43\x61ncelSignalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r"\xe6\x01\n\x1eUpsertWorkflowSearchAttributes\x12j\n\x11search_attributes\x18\x01 \x03(\x0b\x32O.coresdk.workflow_commands.UpsertWorkflowSearchAttributes.SearchAttributesEntry\x1aX\n\x15SearchAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"O\n\x18ModifyWorkflowProperties\x12\x33\n\rupserted_memo\x18\x01 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo"\xd2\x01\n\x0eUpdateResponse\x12\x1c\n\x14protocol_instance_id\x18\x01 \x01(\t\x12*\n\x08\x61\x63\x63\x65pted\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x34\n\x08rejected\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x34\n\tcompleted\x18\x04 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadH\x00\x42\n\n\x08response"\xa1\x03\n\x16ScheduleNexusOperation\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\t\x12\x11\n\toperation\x18\x04 \x01(\t\x12.\n\x05input\x18\x05 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12X\n\x0cnexus_header\x18\x07 \x03(\x0b\x32\x42.coresdk.workflow_commands.ScheduleNexusOperation.NexusHeaderEntry\x12H\n\x11\x63\x61ncellation_type\x18\x08 \x01(\x0e\x32-.coresdk.nexus.NexusOperationCancellationType\x1a\x32\n\x10NexusHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"*\n\x1bRequestCancelNexusOperation\x12\x0b\n\x03seq\x18\x01 \x01(\r*X\n\x18\x41\x63tivityCancellationType\x12\x0e\n\nTRY_CANCEL\x10\x00\x12\x1f\n\x1bWAIT_CANCELLATION_COMPLETED\x10\x01\x12\x0b\n\x07\x41\x42\x41NDON\x10\x02\x42\x36\xea\x02\x33Temporalio::Internal::Bridge::Api::WorkflowCommandsb\x06proto3' -) - -_ACTIVITYCANCELLATIONTYPE = DESCRIPTOR.enum_types_by_name["ActivityCancellationType"] -ActivityCancellationType = enum_type_wrapper.EnumTypeWrapper(_ACTIVITYCANCELLATIONTYPE) -TRY_CANCEL = 0 -WAIT_CANCELLATION_COMPLETED = 1 -ABANDON = 2 - - -_WORKFLOWCOMMAND = DESCRIPTOR.message_types_by_name["WorkflowCommand"] -_STARTTIMER = DESCRIPTOR.message_types_by_name["StartTimer"] -_CANCELTIMER = DESCRIPTOR.message_types_by_name["CancelTimer"] -_SCHEDULEACTIVITY = DESCRIPTOR.message_types_by_name["ScheduleActivity"] -_SCHEDULEACTIVITY_HEADERSENTRY = _SCHEDULEACTIVITY.nested_types_by_name["HeadersEntry"] -_SCHEDULELOCALACTIVITY = DESCRIPTOR.message_types_by_name["ScheduleLocalActivity"] -_SCHEDULELOCALACTIVITY_HEADERSENTRY = _SCHEDULELOCALACTIVITY.nested_types_by_name[ - "HeadersEntry" -] -_REQUESTCANCELACTIVITY = DESCRIPTOR.message_types_by_name["RequestCancelActivity"] -_REQUESTCANCELLOCALACTIVITY = DESCRIPTOR.message_types_by_name[ - "RequestCancelLocalActivity" -] -_QUERYRESULT = DESCRIPTOR.message_types_by_name["QueryResult"] -_QUERYSUCCESS = DESCRIPTOR.message_types_by_name["QuerySuccess"] -_COMPLETEWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name[ - "CompleteWorkflowExecution" -] -_FAILWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name["FailWorkflowExecution"] -_CONTINUEASNEWWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name[ - "ContinueAsNewWorkflowExecution" -] -_CONTINUEASNEWWORKFLOWEXECUTION_MEMOENTRY = ( - _CONTINUEASNEWWORKFLOWEXECUTION.nested_types_by_name["MemoEntry"] -) -_CONTINUEASNEWWORKFLOWEXECUTION_HEADERSENTRY = ( - _CONTINUEASNEWWORKFLOWEXECUTION.nested_types_by_name["HeadersEntry"] -) -_CONTINUEASNEWWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY = ( - _CONTINUEASNEWWORKFLOWEXECUTION.nested_types_by_name["SearchAttributesEntry"] -) -_CANCELWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name["CancelWorkflowExecution"] -_SETPATCHMARKER = DESCRIPTOR.message_types_by_name["SetPatchMarker"] -_STARTCHILDWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name[ - "StartChildWorkflowExecution" -] -_STARTCHILDWORKFLOWEXECUTION_HEADERSENTRY = ( - _STARTCHILDWORKFLOWEXECUTION.nested_types_by_name["HeadersEntry"] -) -_STARTCHILDWORKFLOWEXECUTION_MEMOENTRY = ( - _STARTCHILDWORKFLOWEXECUTION.nested_types_by_name["MemoEntry"] -) -_STARTCHILDWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY = ( - _STARTCHILDWORKFLOWEXECUTION.nested_types_by_name["SearchAttributesEntry"] -) -_CANCELCHILDWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name[ - "CancelChildWorkflowExecution" -] -_REQUESTCANCELEXTERNALWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name[ - "RequestCancelExternalWorkflowExecution" -] -_SIGNALEXTERNALWORKFLOWEXECUTION = DESCRIPTOR.message_types_by_name[ - "SignalExternalWorkflowExecution" -] -_SIGNALEXTERNALWORKFLOWEXECUTION_HEADERSENTRY = ( - _SIGNALEXTERNALWORKFLOWEXECUTION.nested_types_by_name["HeadersEntry"] -) -_CANCELSIGNALWORKFLOW = DESCRIPTOR.message_types_by_name["CancelSignalWorkflow"] -_UPSERTWORKFLOWSEARCHATTRIBUTES = DESCRIPTOR.message_types_by_name[ - "UpsertWorkflowSearchAttributes" -] -_UPSERTWORKFLOWSEARCHATTRIBUTES_SEARCHATTRIBUTESENTRY = ( - _UPSERTWORKFLOWSEARCHATTRIBUTES.nested_types_by_name["SearchAttributesEntry"] -) -_MODIFYWORKFLOWPROPERTIES = DESCRIPTOR.message_types_by_name["ModifyWorkflowProperties"] -_UPDATERESPONSE = DESCRIPTOR.message_types_by_name["UpdateResponse"] -_SCHEDULENEXUSOPERATION = DESCRIPTOR.message_types_by_name["ScheduleNexusOperation"] -_SCHEDULENEXUSOPERATION_NEXUSHEADERENTRY = _SCHEDULENEXUSOPERATION.nested_types_by_name[ - "NexusHeaderEntry" -] -_REQUESTCANCELNEXUSOPERATION = DESCRIPTOR.message_types_by_name[ - "RequestCancelNexusOperation" -] -WorkflowCommand = _reflection.GeneratedProtocolMessageType( - "WorkflowCommand", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWCOMMAND, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.WorkflowCommand) - }, -) -_sym_db.RegisterMessage(WorkflowCommand) - -StartTimer = _reflection.GeneratedProtocolMessageType( - "StartTimer", - (_message.Message,), - { - "DESCRIPTOR": _STARTTIMER, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.StartTimer) - }, -) -_sym_db.RegisterMessage(StartTimer) - -CancelTimer = _reflection.GeneratedProtocolMessageType( - "CancelTimer", - (_message.Message,), - { - "DESCRIPTOR": _CANCELTIMER, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.CancelTimer) - }, -) -_sym_db.RegisterMessage(CancelTimer) - -ScheduleActivity = _reflection.GeneratedProtocolMessageType( - "ScheduleActivity", - (_message.Message,), - { - "HeadersEntry": _reflection.GeneratedProtocolMessageType( - "HeadersEntry", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULEACTIVITY_HEADERSENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ScheduleActivity.HeadersEntry) - }, - ), - "DESCRIPTOR": _SCHEDULEACTIVITY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ScheduleActivity) - }, -) -_sym_db.RegisterMessage(ScheduleActivity) -_sym_db.RegisterMessage(ScheduleActivity.HeadersEntry) - -ScheduleLocalActivity = _reflection.GeneratedProtocolMessageType( - "ScheduleLocalActivity", - (_message.Message,), - { - "HeadersEntry": _reflection.GeneratedProtocolMessageType( - "HeadersEntry", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULELOCALACTIVITY_HEADERSENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ScheduleLocalActivity.HeadersEntry) - }, - ), - "DESCRIPTOR": _SCHEDULELOCALACTIVITY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ScheduleLocalActivity) - }, -) -_sym_db.RegisterMessage(ScheduleLocalActivity) -_sym_db.RegisterMessage(ScheduleLocalActivity.HeadersEntry) - -RequestCancelActivity = _reflection.GeneratedProtocolMessageType( - "RequestCancelActivity", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELACTIVITY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.RequestCancelActivity) - }, -) -_sym_db.RegisterMessage(RequestCancelActivity) - -RequestCancelLocalActivity = _reflection.GeneratedProtocolMessageType( - "RequestCancelLocalActivity", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELLOCALACTIVITY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.RequestCancelLocalActivity) - }, -) -_sym_db.RegisterMessage(RequestCancelLocalActivity) - -QueryResult = _reflection.GeneratedProtocolMessageType( - "QueryResult", - (_message.Message,), - { - "DESCRIPTOR": _QUERYRESULT, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.QueryResult) - }, -) -_sym_db.RegisterMessage(QueryResult) - -QuerySuccess = _reflection.GeneratedProtocolMessageType( - "QuerySuccess", - (_message.Message,), - { - "DESCRIPTOR": _QUERYSUCCESS, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.QuerySuccess) - }, -) -_sym_db.RegisterMessage(QuerySuccess) - -CompleteWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "CompleteWorkflowExecution", - (_message.Message,), - { - "DESCRIPTOR": _COMPLETEWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.CompleteWorkflowExecution) - }, -) -_sym_db.RegisterMessage(CompleteWorkflowExecution) - -FailWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "FailWorkflowExecution", - (_message.Message,), - { - "DESCRIPTOR": _FAILWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.FailWorkflowExecution) - }, -) -_sym_db.RegisterMessage(FailWorkflowExecution) - -ContinueAsNewWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "ContinueAsNewWorkflowExecution", - (_message.Message,), - { - "MemoEntry": _reflection.GeneratedProtocolMessageType( - "MemoEntry", - (_message.Message,), - { - "DESCRIPTOR": _CONTINUEASNEWWORKFLOWEXECUTION_MEMOENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ContinueAsNewWorkflowExecution.MemoEntry) - }, - ), - "HeadersEntry": _reflection.GeneratedProtocolMessageType( - "HeadersEntry", - (_message.Message,), - { - "DESCRIPTOR": _CONTINUEASNEWWORKFLOWEXECUTION_HEADERSENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ContinueAsNewWorkflowExecution.HeadersEntry) - }, - ), - "SearchAttributesEntry": _reflection.GeneratedProtocolMessageType( - "SearchAttributesEntry", - (_message.Message,), - { - "DESCRIPTOR": _CONTINUEASNEWWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ContinueAsNewWorkflowExecution.SearchAttributesEntry) - }, - ), - "DESCRIPTOR": _CONTINUEASNEWWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ContinueAsNewWorkflowExecution) - }, -) -_sym_db.RegisterMessage(ContinueAsNewWorkflowExecution) -_sym_db.RegisterMessage(ContinueAsNewWorkflowExecution.MemoEntry) -_sym_db.RegisterMessage(ContinueAsNewWorkflowExecution.HeadersEntry) -_sym_db.RegisterMessage(ContinueAsNewWorkflowExecution.SearchAttributesEntry) - -CancelWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "CancelWorkflowExecution", - (_message.Message,), - { - "DESCRIPTOR": _CANCELWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.CancelWorkflowExecution) - }, -) -_sym_db.RegisterMessage(CancelWorkflowExecution) - -SetPatchMarker = _reflection.GeneratedProtocolMessageType( - "SetPatchMarker", - (_message.Message,), - { - "DESCRIPTOR": _SETPATCHMARKER, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.SetPatchMarker) - }, -) -_sym_db.RegisterMessage(SetPatchMarker) - -StartChildWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "StartChildWorkflowExecution", - (_message.Message,), - { - "HeadersEntry": _reflection.GeneratedProtocolMessageType( - "HeadersEntry", - (_message.Message,), - { - "DESCRIPTOR": _STARTCHILDWORKFLOWEXECUTION_HEADERSENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.StartChildWorkflowExecution.HeadersEntry) - }, - ), - "MemoEntry": _reflection.GeneratedProtocolMessageType( - "MemoEntry", - (_message.Message,), - { - "DESCRIPTOR": _STARTCHILDWORKFLOWEXECUTION_MEMOENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.StartChildWorkflowExecution.MemoEntry) - }, - ), - "SearchAttributesEntry": _reflection.GeneratedProtocolMessageType( - "SearchAttributesEntry", - (_message.Message,), - { - "DESCRIPTOR": _STARTCHILDWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.StartChildWorkflowExecution.SearchAttributesEntry) - }, - ), - "DESCRIPTOR": _STARTCHILDWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.StartChildWorkflowExecution) - }, -) -_sym_db.RegisterMessage(StartChildWorkflowExecution) -_sym_db.RegisterMessage(StartChildWorkflowExecution.HeadersEntry) -_sym_db.RegisterMessage(StartChildWorkflowExecution.MemoEntry) -_sym_db.RegisterMessage(StartChildWorkflowExecution.SearchAttributesEntry) - -CancelChildWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "CancelChildWorkflowExecution", - (_message.Message,), - { - "DESCRIPTOR": _CANCELCHILDWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.CancelChildWorkflowExecution) - }, -) -_sym_db.RegisterMessage(CancelChildWorkflowExecution) - -RequestCancelExternalWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "RequestCancelExternalWorkflowExecution", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELEXTERNALWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.RequestCancelExternalWorkflowExecution) - }, -) -_sym_db.RegisterMessage(RequestCancelExternalWorkflowExecution) - -SignalExternalWorkflowExecution = _reflection.GeneratedProtocolMessageType( - "SignalExternalWorkflowExecution", - (_message.Message,), - { - "HeadersEntry": _reflection.GeneratedProtocolMessageType( - "HeadersEntry", - (_message.Message,), - { - "DESCRIPTOR": _SIGNALEXTERNALWORKFLOWEXECUTION_HEADERSENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.SignalExternalWorkflowExecution.HeadersEntry) - }, - ), - "DESCRIPTOR": _SIGNALEXTERNALWORKFLOWEXECUTION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.SignalExternalWorkflowExecution) - }, -) -_sym_db.RegisterMessage(SignalExternalWorkflowExecution) -_sym_db.RegisterMessage(SignalExternalWorkflowExecution.HeadersEntry) - -CancelSignalWorkflow = _reflection.GeneratedProtocolMessageType( - "CancelSignalWorkflow", - (_message.Message,), - { - "DESCRIPTOR": _CANCELSIGNALWORKFLOW, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.CancelSignalWorkflow) - }, -) -_sym_db.RegisterMessage(CancelSignalWorkflow) - -UpsertWorkflowSearchAttributes = _reflection.GeneratedProtocolMessageType( - "UpsertWorkflowSearchAttributes", - (_message.Message,), - { - "SearchAttributesEntry": _reflection.GeneratedProtocolMessageType( - "SearchAttributesEntry", - (_message.Message,), - { - "DESCRIPTOR": _UPSERTWORKFLOWSEARCHATTRIBUTES_SEARCHATTRIBUTESENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.UpsertWorkflowSearchAttributes.SearchAttributesEntry) - }, - ), - "DESCRIPTOR": _UPSERTWORKFLOWSEARCHATTRIBUTES, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.UpsertWorkflowSearchAttributes) - }, -) -_sym_db.RegisterMessage(UpsertWorkflowSearchAttributes) -_sym_db.RegisterMessage(UpsertWorkflowSearchAttributes.SearchAttributesEntry) - -ModifyWorkflowProperties = _reflection.GeneratedProtocolMessageType( - "ModifyWorkflowProperties", - (_message.Message,), - { - "DESCRIPTOR": _MODIFYWORKFLOWPROPERTIES, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ModifyWorkflowProperties) - }, -) -_sym_db.RegisterMessage(ModifyWorkflowProperties) - -UpdateResponse = _reflection.GeneratedProtocolMessageType( - "UpdateResponse", - (_message.Message,), - { - "DESCRIPTOR": _UPDATERESPONSE, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.UpdateResponse) - }, -) -_sym_db.RegisterMessage(UpdateResponse) - -ScheduleNexusOperation = _reflection.GeneratedProtocolMessageType( - "ScheduleNexusOperation", - (_message.Message,), - { - "NexusHeaderEntry": _reflection.GeneratedProtocolMessageType( - "NexusHeaderEntry", - (_message.Message,), - { - "DESCRIPTOR": _SCHEDULENEXUSOPERATION_NEXUSHEADERENTRY, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ScheduleNexusOperation.NexusHeaderEntry) - }, - ), - "DESCRIPTOR": _SCHEDULENEXUSOPERATION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.ScheduleNexusOperation) - }, -) -_sym_db.RegisterMessage(ScheduleNexusOperation) -_sym_db.RegisterMessage(ScheduleNexusOperation.NexusHeaderEntry) - -RequestCancelNexusOperation = _reflection.GeneratedProtocolMessageType( - "RequestCancelNexusOperation", - (_message.Message,), - { - "DESCRIPTOR": _REQUESTCANCELNEXUSOPERATION, - "__module__": "temporal.sdk.core.workflow_commands.workflow_commands_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_commands.RequestCancelNexusOperation) - }, + b'\n;temporal/sdk/core/workflow_commands/workflow_commands.proto\x12\x19\x63oresdk.workflow_commands\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a$temporal/api/common/v1/message.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a%temporal/api/failure/v1/message.proto\x1a\'temporal/api/sdk/v1/user_metadata.proto\x1a,temporal/api/sdk/v1/event_group_marker.proto\x1a&temporal/api/workflow/v1/message.proto\x1a\x35temporal/sdk/core/child_workflow/child_workflow.proto\x1a#temporal/sdk/core/nexus/nexus.proto\x1a%temporal/sdk/core/common/common.proto"\xa9\x10\n\x0fWorkflowCommand\x12\x38\n\ruser_metadata\x18\x64 \x01(\x0b\x32!.temporal.api.sdk.v1.UserMetadata\x12\x42\n\x13\x65vent_group_markers\x18\x65 \x03(\x0b\x32%.temporal.api.sdk.v1.EventGroupMarker\x12<\n\x0bstart_timer\x18\x01 \x01(\x0b\x32%.coresdk.workflow_commands.StartTimerH\x00\x12H\n\x11schedule_activity\x18\x02 \x01(\x0b\x32+.coresdk.workflow_commands.ScheduleActivityH\x00\x12\x42\n\x10respond_to_query\x18\x03 \x01(\x0b\x32&.coresdk.workflow_commands.QueryResultH\x00\x12S\n\x17request_cancel_activity\x18\x04 \x01(\x0b\x32\x30.coresdk.workflow_commands.RequestCancelActivityH\x00\x12>\n\x0c\x63\x61ncel_timer\x18\x05 \x01(\x0b\x32&.coresdk.workflow_commands.CancelTimerH\x00\x12[\n\x1b\x63omplete_workflow_execution\x18\x06 \x01(\x0b\x32\x34.coresdk.workflow_commands.CompleteWorkflowExecutionH\x00\x12S\n\x17\x66\x61il_workflow_execution\x18\x07 \x01(\x0b\x32\x30.coresdk.workflow_commands.FailWorkflowExecutionH\x00\x12g\n"continue_as_new_workflow_execution\x18\x08 \x01(\x0b\x32\x39.coresdk.workflow_commands.ContinueAsNewWorkflowExecutionH\x00\x12W\n\x19\x63\x61ncel_workflow_execution\x18\t \x01(\x0b\x32\x32.coresdk.workflow_commands.CancelWorkflowExecutionH\x00\x12\x45\n\x10set_patch_marker\x18\n \x01(\x0b\x32).coresdk.workflow_commands.SetPatchMarkerH\x00\x12`\n\x1estart_child_workflow_execution\x18\x0b \x01(\x0b\x32\x36.coresdk.workflow_commands.StartChildWorkflowExecutionH\x00\x12\x62\n\x1f\x63\x61ncel_child_workflow_execution\x18\x0c \x01(\x0b\x32\x37.coresdk.workflow_commands.CancelChildWorkflowExecutionH\x00\x12w\n*request_cancel_external_workflow_execution\x18\r \x01(\x0b\x32\x41.coresdk.workflow_commands.RequestCancelExternalWorkflowExecutionH\x00\x12h\n"signal_external_workflow_execution\x18\x0e \x01(\x0b\x32:.coresdk.workflow_commands.SignalExternalWorkflowExecutionH\x00\x12Q\n\x16\x63\x61ncel_signal_workflow\x18\x0f \x01(\x0b\x32/.coresdk.workflow_commands.CancelSignalWorkflowH\x00\x12S\n\x17schedule_local_activity\x18\x10 \x01(\x0b\x32\x30.coresdk.workflow_commands.ScheduleLocalActivityH\x00\x12^\n\x1drequest_cancel_local_activity\x18\x11 \x01(\x0b\x32\x35.coresdk.workflow_commands.RequestCancelLocalActivityH\x00\x12\x66\n!upsert_workflow_search_attributes\x18\x12 \x01(\x0b\x32\x39.coresdk.workflow_commands.UpsertWorkflowSearchAttributesH\x00\x12Y\n\x1amodify_workflow_properties\x18\x13 \x01(\x0b\x32\x33.coresdk.workflow_commands.ModifyWorkflowPropertiesH\x00\x12\x44\n\x0fupdate_response\x18\x14 \x01(\x0b\x32).coresdk.workflow_commands.UpdateResponseH\x00\x12U\n\x18schedule_nexus_operation\x18\x15 \x01(\x0b\x32\x31.coresdk.workflow_commands.ScheduleNexusOperationH\x00\x12`\n\x1erequest_cancel_nexus_operation\x18\x16 \x01(\x0b\x32\x36.coresdk.workflow_commands.RequestCancelNexusOperationH\x00\x42\t\n\x07variant"S\n\nStartTimer\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x38\n\x15start_to_fire_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration"\x1a\n\x0b\x43\x61ncelTimer\x12\x0b\n\x03seq\x18\x01 \x01(\r"\xb8\x06\n\x10ScheduleActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x15\n\ractivity_type\x18\x03 \x01(\t\x12\x12\n\ntask_queue\x18\x05 \x01(\t\x12I\n\x07headers\x18\x06 \x03(\x0b\x32\x38.coresdk.workflow_commands.ScheduleActivity.HeadersEntry\x12\x32\n\targuments\x18\x07 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11heartbeat_timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x0c \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12N\n\x11\x63\x61ncellation_type\x18\r \x01(\x0e\x32\x33.coresdk.workflow_commands.ActivityCancellationType\x12\x1e\n\x16\x64o_not_eagerly_execute\x18\x0e \x01(\x08\x12;\n\x11versioning_intent\x18\x0f \x01(\x0e\x32 .coresdk.common.VersioningIntent\x12\x32\n\x08priority\x18\x10 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"\x93\x06\n\x15ScheduleLocalActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x13\n\x0b\x61\x63tivity_id\x18\x02 \x01(\t\x12\x15\n\ractivity_type\x18\x03 \x01(\t\x12\x0f\n\x07\x61ttempt\x18\x04 \x01(\r\x12:\n\x16original_schedule_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\x07headers\x18\x06 \x03(\x0b\x32=.coresdk.workflow_commands.ScheduleLocalActivity.HeadersEntry\x12\x32\n\targuments\x18\x07 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12<\n\x19schedule_to_start_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x0cretry_policy\x18\x0b \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x38\n\x15local_retry_threshold\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x12N\n\x11\x63\x61ncellation_type\x18\r \x01(\x0e\x32\x33.coresdk.workflow_commands.ActivityCancellationType\x12#\n\x1binclude_arguments_in_marker\x18\x0e \x01(\x08\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"$\n\x15RequestCancelActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r")\n\x1aRequestCancelLocalActivity\x12\x0b\n\x03seq\x18\x01 \x01(\r"\x9c\x01\n\x0bQueryResult\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12<\n\tsucceeded\x18\x02 \x01(\x0b\x32\'.coresdk.workflow_commands.QuerySuccessH\x00\x12\x32\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x42\t\n\x07variant"A\n\x0cQuerySuccess\x12\x31\n\x08response\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload"L\n\x19\x43ompleteWorkflowExecution\x12/\n\x06result\x18\x01 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload"J\n\x15\x46\x61ilWorkflowExecution\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure"\x92\x07\n\x1e\x43ontinueAsNewWorkflowExecution\x12\x15\n\rworkflow_type\x18\x01 \x01(\t\x12\x12\n\ntask_queue\x18\x02 \x01(\t\x12\x32\n\targuments\x18\x03 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12\x37\n\x14workflow_run_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12Q\n\x04memo\x18\x06 \x03(\x0b\x32\x43.coresdk.workflow_commands.ContinueAsNewWorkflowExecution.MemoEntry\x12W\n\x07headers\x18\x07 \x03(\x0b\x32\x46.coresdk.workflow_commands.ContinueAsNewWorkflowExecution.HeadersEntry\x12\x43\n\x11search_attributes\x18\x08 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12\x39\n\x0cretry_policy\x18\t \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12;\n\x11versioning_intent\x18\n \x01(\x0e\x32 .coresdk.common.VersioningIntent\x12[\n\x1binitial_versioning_behavior\x18\x0b \x01(\x0e\x32\x36.temporal.api.enums.v1.ContinueAsNewVersioningBehavior\x12\x39\n\x16\x62\x61\x63koff_start_interval\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x1aL\n\tMemoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"L\n\x17\x43\x61ncelWorkflowExecution\x12\x31\n\x07\x64\x65tails\x18\x01 \x01(\x0b\x32 .temporal.api.common.v1.Payloads"6\n\x0eSetPatchMarker\x12\x10\n\x08patch_id\x18\x01 \x01(\t\x12\x12\n\ndeprecated\x18\x02 \x01(\x08"\xe1\t\n\x1bStartChildWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x11\n\tnamespace\x18\x02 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x03 \x01(\t\x12\x15\n\rworkflow_type\x18\x04 \x01(\t\x12\x12\n\ntask_queue\x18\x05 \x01(\t\x12.\n\x05input\x18\x06 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12=\n\x1aworkflow_execution_timeout\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x37\n\x14workflow_run_timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x38\n\x15workflow_task_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x46\n\x13parent_close_policy\x18\n \x01(\x0e\x32).coresdk.child_workflow.ParentClosePolicy\x12N\n\x18workflow_id_reuse_policy\x18\x0c \x01(\x0e\x32,.temporal.api.enums.v1.WorkflowIdReusePolicy\x12\x39\n\x0cretry_policy\x18\r \x01(\x0b\x32#.temporal.api.common.v1.RetryPolicy\x12\x15\n\rcron_schedule\x18\x0e \x01(\t\x12T\n\x07headers\x18\x0f \x03(\x0b\x32\x43.coresdk.workflow_commands.StartChildWorkflowExecution.HeadersEntry\x12N\n\x04memo\x18\x10 \x03(\x0b\x32@.coresdk.workflow_commands.StartChildWorkflowExecution.MemoEntry\x12\x43\n\x11search_attributes\x18\x11 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes\x12P\n\x11\x63\x61ncellation_type\x18\x12 \x01(\x0e\x32\x35.coresdk.child_workflow.ChildWorkflowCancellationType\x12;\n\x11versioning_intent\x18\x13 \x01(\x0e\x32 .coresdk.common.VersioningIntent\x12\x32\n\x08priority\x18\x14 \x01(\x0b\x32 .temporal.api.common.v1.Priority\x12I\n\x13versioning_override\x18\x15 \x01(\x0b\x32,.temporal.api.workflow.v1.VersioningOverride\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x1aL\n\tMemoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01"J\n\x1c\x43\x61ncelChildWorkflowExecution\x12\x1a\n\x12\x63hild_workflow_seq\x18\x01 \x01(\r\x12\x0e\n\x06reason\x18\x02 \x01(\t"\x8e\x01\n&RequestCancelExternalWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12G\n\x12workflow_execution\x18\x02 \x01(\x0b\x32+.coresdk.common.NamespacedWorkflowExecution\x12\x0e\n\x06reason\x18\x03 \x01(\t"\x8f\x03\n\x1fSignalExternalWorkflowExecution\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12I\n\x12workflow_execution\x18\x02 \x01(\x0b\x32+.coresdk.common.NamespacedWorkflowExecutionH\x00\x12\x1b\n\x11\x63hild_workflow_id\x18\x03 \x01(\tH\x00\x12\x13\n\x0bsignal_name\x18\x04 \x01(\t\x12-\n\x04\x61rgs\x18\x05 \x03(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12X\n\x07headers\x18\x06 \x03(\x0b\x32G.coresdk.workflow_commands.SignalExternalWorkflowExecution.HeadersEntry\x1aO\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x05value\x18\x02 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload:\x02\x38\x01\x42\x08\n\x06target"#\n\x14\x43\x61ncelSignalWorkflow\x12\x0b\n\x03seq\x18\x01 \x01(\r"e\n\x1eUpsertWorkflowSearchAttributes\x12\x43\n\x11search_attributes\x18\x01 \x01(\x0b\x32(.temporal.api.common.v1.SearchAttributes"O\n\x18ModifyWorkflowProperties\x12\x33\n\rupserted_memo\x18\x01 \x01(\x0b\x32\x1c.temporal.api.common.v1.Memo"\xd2\x01\n\x0eUpdateResponse\x12\x1c\n\x14protocol_instance_id\x18\x01 \x01(\t\x12*\n\x08\x61\x63\x63\x65pted\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12\x34\n\x08rejected\x18\x03 \x01(\x0b\x32 .temporal.api.failure.v1.FailureH\x00\x12\x34\n\tcompleted\x18\x04 \x01(\x0b\x32\x1f.temporal.api.common.v1.PayloadH\x00\x42\n\n\x08response"\x9a\x04\n\x16ScheduleNexusOperation\x12\x0b\n\x03seq\x18\x01 \x01(\r\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\t\x12\x11\n\toperation\x18\x04 \x01(\t\x12.\n\x05input\x18\x05 \x01(\x0b\x32\x1f.temporal.api.common.v1.Payload\x12<\n\x19schedule_to_close_timeout\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12X\n\x0cnexus_header\x18\x07 \x03(\x0b\x32\x42.coresdk.workflow_commands.ScheduleNexusOperation.NexusHeaderEntry\x12H\n\x11\x63\x61ncellation_type\x18\x08 \x01(\x0e\x32-.coresdk.nexus.NexusOperationCancellationType\x12<\n\x19schedule_to_start_timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x39\n\x16start_to_close_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x32\n\x10NexusHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"*\n\x1bRequestCancelNexusOperation\x12\x0b\n\x03seq\x18\x01 \x01(\r*X\n\x18\x41\x63tivityCancellationType\x12\x0e\n\nTRY_CANCEL\x10\x00\x12\x1f\n\x1bWAIT_CANCELLATION_COMPLETED\x10\x01\x12\x0b\n\x07\x41\x42\x41NDON\x10\x02\x42\x36\xea\x02\x33Temporalio::Internal::Bridge::Api::WorkflowCommandsb\x06proto3' ) -_sym_db.RegisterMessage(RequestCancelNexusOperation) +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( @@ -512,90 +64,78 @@ _CONTINUEASNEWWORKFLOWEXECUTION_MEMOENTRY._serialized_options = b"8\001" _CONTINUEASNEWWORKFLOWEXECUTION_HEADERSENTRY._options = None _CONTINUEASNEWWORKFLOWEXECUTION_HEADERSENTRY._serialized_options = b"8\001" - _CONTINUEASNEWWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY._options = None - _CONTINUEASNEWWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY._serialized_options = b"8\001" _STARTCHILDWORKFLOWEXECUTION_HEADERSENTRY._options = None _STARTCHILDWORKFLOWEXECUTION_HEADERSENTRY._serialized_options = b"8\001" _STARTCHILDWORKFLOWEXECUTION_MEMOENTRY._options = None _STARTCHILDWORKFLOWEXECUTION_MEMOENTRY._serialized_options = b"8\001" - _STARTCHILDWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY._options = None - _STARTCHILDWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY._serialized_options = b"8\001" _SIGNALEXTERNALWORKFLOWEXECUTION_HEADERSENTRY._options = None _SIGNALEXTERNALWORKFLOWEXECUTION_HEADERSENTRY._serialized_options = b"8\001" - _UPSERTWORKFLOWSEARCHATTRIBUTES_SEARCHATTRIBUTESENTRY._options = None - _UPSERTWORKFLOWSEARCHATTRIBUTES_SEARCHATTRIBUTESENTRY._serialized_options = b"8\001" _SCHEDULENEXUSOPERATION_NEXUSHEADERENTRY._options = None _SCHEDULENEXUSOPERATION_NEXUSHEADERENTRY._serialized_options = b"8\001" - _ACTIVITYCANCELLATIONTYPE._serialized_start = 8580 - _ACTIVITYCANCELLATIONTYPE._serialized_end = 8668 - _WORKFLOWCOMMAND._serialized_start = 472 - _WORKFLOWCOMMAND._serialized_end = 2493 - _STARTTIMER._serialized_start = 2495 - _STARTTIMER._serialized_end = 2578 - _CANCELTIMER._serialized_start = 2580 - _CANCELTIMER._serialized_end = 2606 - _SCHEDULEACTIVITY._serialized_start = 2609 - _SCHEDULEACTIVITY._serialized_end = 3433 - _SCHEDULEACTIVITY_HEADERSENTRY._serialized_start = 3354 - _SCHEDULEACTIVITY_HEADERSENTRY._serialized_end = 3433 - _SCHEDULELOCALACTIVITY._serialized_start = 3436 - _SCHEDULELOCALACTIVITY._serialized_end = 4186 - _SCHEDULELOCALACTIVITY_HEADERSENTRY._serialized_start = 3354 - _SCHEDULELOCALACTIVITY_HEADERSENTRY._serialized_end = 3433 - _REQUESTCANCELACTIVITY._serialized_start = 4188 - _REQUESTCANCELACTIVITY._serialized_end = 4224 - _REQUESTCANCELLOCALACTIVITY._serialized_start = 4226 - _REQUESTCANCELLOCALACTIVITY._serialized_end = 4267 - _QUERYRESULT._serialized_start = 4270 - _QUERYRESULT._serialized_end = 4426 - _QUERYSUCCESS._serialized_start = 4428 - _QUERYSUCCESS._serialized_end = 4493 - _COMPLETEWORKFLOWEXECUTION._serialized_start = 4495 - _COMPLETEWORKFLOWEXECUTION._serialized_end = 4571 - _FAILWORKFLOWEXECUTION._serialized_start = 4573 - _FAILWORKFLOWEXECUTION._serialized_end = 4647 - _CONTINUEASNEWWORKFLOWEXECUTION._serialized_start = 4650 - _CONTINUEASNEWWORKFLOWEXECUTION._serialized_end = 5541 - _CONTINUEASNEWWORKFLOWEXECUTION_MEMOENTRY._serialized_start = 5294 - _CONTINUEASNEWWORKFLOWEXECUTION_MEMOENTRY._serialized_end = 5370 - _CONTINUEASNEWWORKFLOWEXECUTION_HEADERSENTRY._serialized_start = 3354 - _CONTINUEASNEWWORKFLOWEXECUTION_HEADERSENTRY._serialized_end = 3433 - _CONTINUEASNEWWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY._serialized_start = 5453 - _CONTINUEASNEWWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY._serialized_end = 5541 - _CANCELWORKFLOWEXECUTION._serialized_start = 5543 - _CANCELWORKFLOWEXECUTION._serialized_end = 5568 - _SETPATCHMARKER._serialized_start = 5570 - _SETPATCHMARKER._serialized_end = 5624 - _STARTCHILDWORKFLOWEXECUTION._serialized_start = 5627 - _STARTCHILDWORKFLOWEXECUTION._serialized_end = 6927 - _STARTCHILDWORKFLOWEXECUTION_HEADERSENTRY._serialized_start = 3354 - _STARTCHILDWORKFLOWEXECUTION_HEADERSENTRY._serialized_end = 3433 - _STARTCHILDWORKFLOWEXECUTION_MEMOENTRY._serialized_start = 5294 - _STARTCHILDWORKFLOWEXECUTION_MEMOENTRY._serialized_end = 5370 - _STARTCHILDWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY._serialized_start = 5453 - _STARTCHILDWORKFLOWEXECUTION_SEARCHATTRIBUTESENTRY._serialized_end = 5541 - _CANCELCHILDWORKFLOWEXECUTION._serialized_start = 6929 - _CANCELCHILDWORKFLOWEXECUTION._serialized_end = 7003 - _REQUESTCANCELEXTERNALWORKFLOWEXECUTION._serialized_start = 7006 - _REQUESTCANCELEXTERNALWORKFLOWEXECUTION._serialized_end = 7148 - _SIGNALEXTERNALWORKFLOWEXECUTION._serialized_start = 7151 - _SIGNALEXTERNALWORKFLOWEXECUTION._serialized_end = 7550 - _SIGNALEXTERNALWORKFLOWEXECUTION_HEADERSENTRY._serialized_start = 3354 - _SIGNALEXTERNALWORKFLOWEXECUTION_HEADERSENTRY._serialized_end = 3433 - _CANCELSIGNALWORKFLOW._serialized_start = 7552 - _CANCELSIGNALWORKFLOW._serialized_end = 7587 - _UPSERTWORKFLOWSEARCHATTRIBUTES._serialized_start = 7590 - _UPSERTWORKFLOWSEARCHATTRIBUTES._serialized_end = 7820 - _UPSERTWORKFLOWSEARCHATTRIBUTES_SEARCHATTRIBUTESENTRY._serialized_start = 5453 - _UPSERTWORKFLOWSEARCHATTRIBUTES_SEARCHATTRIBUTESENTRY._serialized_end = 5541 - _MODIFYWORKFLOWPROPERTIES._serialized_start = 7822 - _MODIFYWORKFLOWPROPERTIES._serialized_end = 7901 - _UPDATERESPONSE._serialized_start = 7904 - _UPDATERESPONSE._serialized_end = 8114 - _SCHEDULENEXUSOPERATION._serialized_start = 8117 - _SCHEDULENEXUSOPERATION._serialized_end = 8534 - _SCHEDULENEXUSOPERATION_NEXUSHEADERENTRY._serialized_start = 8484 - _SCHEDULENEXUSOPERATION_NEXUSHEADERENTRY._serialized_end = 8534 - _REQUESTCANCELNEXUSOPERATION._serialized_start = 8536 - _REQUESTCANCELNEXUSOPERATION._serialized_end = 8578 + _ACTIVITYCANCELLATIONTYPE._serialized_start = 8785 + _ACTIVITYCANCELLATIONTYPE._serialized_end = 8873 + _WORKFLOWCOMMAND._serialized_start = 558 + _WORKFLOWCOMMAND._serialized_end = 2647 + _STARTTIMER._serialized_start = 2649 + _STARTTIMER._serialized_end = 2732 + _CANCELTIMER._serialized_start = 2734 + _CANCELTIMER._serialized_end = 2760 + _SCHEDULEACTIVITY._serialized_start = 2763 + _SCHEDULEACTIVITY._serialized_end = 3587 + _SCHEDULEACTIVITY_HEADERSENTRY._serialized_start = 3508 + _SCHEDULEACTIVITY_HEADERSENTRY._serialized_end = 3587 + _SCHEDULELOCALACTIVITY._serialized_start = 3590 + _SCHEDULELOCALACTIVITY._serialized_end = 4377 + _SCHEDULELOCALACTIVITY_HEADERSENTRY._serialized_start = 3508 + _SCHEDULELOCALACTIVITY_HEADERSENTRY._serialized_end = 3587 + _REQUESTCANCELACTIVITY._serialized_start = 4379 + _REQUESTCANCELACTIVITY._serialized_end = 4415 + _REQUESTCANCELLOCALACTIVITY._serialized_start = 4417 + _REQUESTCANCELLOCALACTIVITY._serialized_end = 4458 + _QUERYRESULT._serialized_start = 4461 + _QUERYRESULT._serialized_end = 4617 + _QUERYSUCCESS._serialized_start = 4619 + _QUERYSUCCESS._serialized_end = 4684 + _COMPLETEWORKFLOWEXECUTION._serialized_start = 4686 + _COMPLETEWORKFLOWEXECUTION._serialized_end = 4762 + _FAILWORKFLOWEXECUTION._serialized_start = 4764 + _FAILWORKFLOWEXECUTION._serialized_end = 4838 + _CONTINUEASNEWWORKFLOWEXECUTION._serialized_start = 4841 + _CONTINUEASNEWWORKFLOWEXECUTION._serialized_end = 5755 + _CONTINUEASNEWWORKFLOWEXECUTION_MEMOENTRY._serialized_start = 5598 + _CONTINUEASNEWWORKFLOWEXECUTION_MEMOENTRY._serialized_end = 5674 + _CONTINUEASNEWWORKFLOWEXECUTION_HEADERSENTRY._serialized_start = 3508 + _CONTINUEASNEWWORKFLOWEXECUTION_HEADERSENTRY._serialized_end = 3587 + _CANCELWORKFLOWEXECUTION._serialized_start = 5757 + _CANCELWORKFLOWEXECUTION._serialized_end = 5833 + _SETPATCHMARKER._serialized_start = 5835 + _SETPATCHMARKER._serialized_end = 5889 + _STARTCHILDWORKFLOWEXECUTION._serialized_start = 5892 + _STARTCHILDWORKFLOWEXECUTION._serialized_end = 7141 + _STARTCHILDWORKFLOWEXECUTION_HEADERSENTRY._serialized_start = 3508 + _STARTCHILDWORKFLOWEXECUTION_HEADERSENTRY._serialized_end = 3587 + _STARTCHILDWORKFLOWEXECUTION_MEMOENTRY._serialized_start = 5598 + _STARTCHILDWORKFLOWEXECUTION_MEMOENTRY._serialized_end = 5674 + _CANCELCHILDWORKFLOWEXECUTION._serialized_start = 7143 + _CANCELCHILDWORKFLOWEXECUTION._serialized_end = 7217 + _REQUESTCANCELEXTERNALWORKFLOWEXECUTION._serialized_start = 7220 + _REQUESTCANCELEXTERNALWORKFLOWEXECUTION._serialized_end = 7362 + _SIGNALEXTERNALWORKFLOWEXECUTION._serialized_start = 7365 + _SIGNALEXTERNALWORKFLOWEXECUTION._serialized_end = 7764 + _SIGNALEXTERNALWORKFLOWEXECUTION_HEADERSENTRY._serialized_start = 3508 + _SIGNALEXTERNALWORKFLOWEXECUTION_HEADERSENTRY._serialized_end = 3587 + _CANCELSIGNALWORKFLOW._serialized_start = 7766 + _CANCELSIGNALWORKFLOW._serialized_end = 7801 + _UPSERTWORKFLOWSEARCHATTRIBUTES._serialized_start = 7803 + _UPSERTWORKFLOWSEARCHATTRIBUTES._serialized_end = 7904 + _MODIFYWORKFLOWPROPERTIES._serialized_start = 7906 + _MODIFYWORKFLOWPROPERTIES._serialized_end = 7985 + _UPDATERESPONSE._serialized_start = 7988 + _UPDATERESPONSE._serialized_end = 8198 + _SCHEDULENEXUSOPERATION._serialized_start = 8201 + _SCHEDULENEXUSOPERATION._serialized_end = 8739 + _SCHEDULENEXUSOPERATION_NEXUSHEADERENTRY._serialized_start = 8689 + _SCHEDULENEXUSOPERATION_NEXUSHEADERENTRY._serialized_end = 8739 + _REQUESTCANCELNEXUSOPERATION._serialized_start = 8741 + _REQUESTCANCELNEXUSOPERATION._serialized_end = 8783 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.pyi b/temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.pyi index 2143d89a5c..81c47c0b03 100644 --- a/temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.pyi +++ b/temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.pyi @@ -23,7 +23,9 @@ import google.protobuf.timestamp_pb2 import temporalio.api.common.v1.message_pb2 import temporalio.api.enums.v1.workflow_pb2 import temporalio.api.failure.v1.message_pb2 +import temporalio.api.sdk.v1.event_group_marker_pb2 import temporalio.api.sdk.v1.user_metadata_pb2 +import temporalio.api.workflow.v1.message_pb2 import temporalio.bridge.proto.child_workflow.child_workflow_pb2 import temporalio.bridge.proto.common.common_pb2 import temporalio.bridge.proto.nexus.nexus_pb2 @@ -44,7 +46,7 @@ class _ActivityCancellationTypeEnumTypeWrapper( _ActivityCancellationType.ValueType ], builtins.type, -): # noqa: F821 +): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor TRY_CANCEL: _ActivityCancellationType.ValueType # 0 """Initiate a cancellation request and immediately report cancellation to the workflow.""" @@ -75,10 +77,12 @@ workflow """ global___ActivityCancellationType = ActivityCancellationType +@typing.final class WorkflowCommand(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor USER_METADATA_FIELD_NUMBER: builtins.int + EVENT_GROUP_MARKERS_FIELD_NUMBER: builtins.int START_TIMER_FIELD_NUMBER: builtins.int SCHEDULE_ACTIVITY_FIELD_NUMBER: builtins.int RESPOND_TO_QUERY_FIELD_NUMBER: builtins.int @@ -107,6 +111,18 @@ class WorkflowCommand(google.protobuf.message.Message): Lang layers are expected to expose the setting of the internals of this metadata on a per-command basis where applicable. """ + + @property + def event_group_markers( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + temporalio.api.sdk.v1.event_group_marker_pb2.EventGroupMarker + ]: + """Event group markers attached to the command. These are forwarded onto + the corresponding server-side Command, and consequently surfaced on the + resulting HistoryEvent. See `temporal/api/sdk/v1/event_group_marker.proto`. + """ + @property def start_timer(self) -> global___StartTimer: ... @property @@ -170,6 +186,10 @@ class WorkflowCommand(google.protobuf.message.Message): *, user_metadata: temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata | None = ..., + event_group_markers: collections.abc.Iterable[ + temporalio.api.sdk.v1.event_group_marker_pb2.EventGroupMarker + ] + | None = ..., start_timer: global___StartTimer | None = ..., schedule_activity: global___ScheduleActivity | None = ..., respond_to_query: global___QueryResult | None = ..., @@ -202,7 +222,7 @@ class WorkflowCommand(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel_child_workflow_execution", b"cancel_child_workflow_execution", "cancel_signal_workflow", @@ -255,7 +275,7 @@ class WorkflowCommand(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancel_child_workflow_execution", b"cancel_child_workflow_execution", "cancel_signal_workflow", @@ -268,6 +288,8 @@ class WorkflowCommand(google.protobuf.message.Message): b"complete_workflow_execution", "continue_as_new_workflow_execution", b"continue_as_new_workflow_execution", + "event_group_markers", + b"event_group_markers", "fail_workflow_execution", b"fail_workflow_execution", "modify_workflow_properties", @@ -307,9 +329,9 @@ class WorkflowCommand(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] + self, oneof_group: typing.Literal["variant", b"variant"] ) -> ( - typing_extensions.Literal[ + typing.Literal[ "start_timer", "schedule_activity", "respond_to_query", @@ -338,6 +360,7 @@ class WorkflowCommand(google.protobuf.message.Message): global___WorkflowCommand = WorkflowCommand +@typing.final class StartTimer(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -355,19 +378,18 @@ class StartTimer(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "start_to_fire_timeout", b"start_to_fire_timeout" - ], + field_name: typing.Literal["start_to_fire_timeout", b"start_to_fire_timeout"], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "seq", b"seq", "start_to_fire_timeout", b"start_to_fire_timeout" ], ) -> None: ... global___StartTimer = StartTimer +@typing.final class CancelTimer(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -379,15 +401,15 @@ class CancelTimer(google.protobuf.message.Message): *, seq: builtins.int = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["seq", b"seq"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["seq", b"seq"]) -> None: ... global___CancelTimer = CancelTimer +@typing.final class ScheduleActivity(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeadersEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -403,11 +425,10 @@ class ScheduleActivity(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SEQ_FIELD_NUMBER: builtins.int @@ -431,6 +452,17 @@ class ScheduleActivity(google.protobuf.message.Message): activity_type: builtins.str task_queue: builtins.str """The name of the task queue to place this activity request in""" + cancellation_type: global___ActivityCancellationType.ValueType + """Defines how the workflow will wait (or not) for cancellation of the activity to be confirmed""" + do_not_eagerly_execute: builtins.bool + """If set, the worker will not tell the service that it can immediately start executing this + activity. When unset/default, workers will always attempt to do so if activity execution + slots are available. + """ + versioning_intent: ( + temporalio.bridge.proto.common.common_pb2.VersioningIntent.ValueType + ) + """Whether this activity should run on a worker with a compatible build id or not.""" @property def headers( self, @@ -444,46 +476,42 @@ class ScheduleActivity(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Payload ]: """Arguments/input to the activity. Called "input" upstream.""" + @property def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted. Either this or start_to_close_timeout_seconds must be specified. When not specified defaults to the workflow execution timeout. """ + @property def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: """Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable as all a retry would achieve is to put it back into the same queue. Defaults to schedule_to_close_timeout or workflow execution timeout if not specified. """ + @property def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Maximum time an activity is allowed to execute after a pick up by a worker. This timeout is always retryable. Either this or schedule_to_close_timeout must be specified. """ + @property def heartbeat_timeout(self) -> google.protobuf.duration_pb2.Duration: """Maximum time allowed between successful worker heartbeats.""" + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """Activities are provided by a default retry policy controlled through the service dynamic configuration. Retries are happening up to schedule_to_close_timeout. To disable retries set retry_policy.maximum_attempts to 1. """ - cancellation_type: global___ActivityCancellationType.ValueType - """Defines how the workflow will wait (or not) for cancellation of the activity to be confirmed""" - do_not_eagerly_execute: builtins.bool - """If set, the worker will not tell the service that it can immediately start executing this - activity. When unset/default, workers will always attempt to do so if activity execution - slots are available. - """ - versioning_intent: ( - temporalio.bridge.proto.common.common_pb2.VersioningIntent.ValueType - ) - """Whether this activity should run on a worker with a compatible build id or not.""" + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """The Priority to use for this activity""" + def __init__( self, *, @@ -511,7 +539,7 @@ class ScheduleActivity(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "heartbeat_timeout", b"heartbeat_timeout", "priority", @@ -528,7 +556,7 @@ class ScheduleActivity(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "activity_type", @@ -564,9 +592,11 @@ class ScheduleActivity(google.protobuf.message.Message): global___ScheduleActivity = ScheduleActivity +@typing.final class ScheduleLocalActivity(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeadersEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -582,11 +612,10 @@ class ScheduleLocalActivity(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SEQ_FIELD_NUMBER: builtins.int @@ -602,6 +631,7 @@ class ScheduleLocalActivity(google.protobuf.message.Message): RETRY_POLICY_FIELD_NUMBER: builtins.int LOCAL_RETRY_THRESHOLD_FIELD_NUMBER: builtins.int CANCELLATION_TYPE_FIELD_NUMBER: builtins.int + INCLUDE_ARGUMENTS_IN_MARKER_FIELD_NUMBER: builtins.int seq: builtins.int """Lang's incremental sequence number, used as the operation identifier""" activity_id: builtins.str @@ -611,11 +641,22 @@ class ScheduleLocalActivity(google.protobuf.message.Message): a timer before retrying. It should pass the attempt number from a `DoBackoff` activity resolution. """ + cancellation_type: global___ActivityCancellationType.ValueType + """Defines how the workflow will wait (or not) for cancellation of the activity to be + confirmed. Lang should default this to `WAIT_CANCELLATION_COMPLETED`, even though proto + will default to `TRY_CANCEL` automatically. + """ + include_arguments_in_marker: builtins.bool + """If set, the local activity arguments will be included in the resulting marker under the + `input` key. This is disabled by default to avoid increasing history size unless the lang + SDK explicitly chooses to expose it. + """ @property def original_schedule_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """If this local activity is a retry (as per the attempt field) this needs to be the original scheduling time (as provided in `DoBackoff`) """ + @property def headers( self, @@ -629,12 +670,14 @@ class ScheduleLocalActivity(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Payload ]: """Arguments/input to the activity.""" + @property def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Indicates how long the caller is willing to wait for local activity completion. Limits how long retries will be attempted. When not specified defaults to the workflow execution timeout (which may be unset). """ + @property def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: """Limits time the local activity can idle internally before being executed. That can happen if @@ -643,6 +686,7 @@ class ScheduleLocalActivity(google.protobuf.message.Message): to `schedule_to_close_timeout` if not specified and that is set. Must be <= `schedule_to_close_timeout` when set, otherwise, it will be clamped down. """ + @property def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Maximum time the local activity is allowed to execute after the task is dispatched. This @@ -650,22 +694,20 @@ class ScheduleLocalActivity(google.protobuf.message.Message): specified. If set, this must be <= `schedule_to_close_timeout`, otherwise, it will be clamped down. """ + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """Specify a retry policy for the local activity. By default local activities will be retried indefinitely. """ + @property def local_retry_threshold(self) -> google.protobuf.duration_pb2.Duration: """If the activity is retrying and backoff would exceed this value, lang will be told to schedule a timer and retry the activity after. Otherwise, backoff will happen internally in core. Defaults to 1 minute. """ - cancellation_type: global___ActivityCancellationType.ValueType - """Defines how the workflow will wait (or not) for cancellation of the activity to be - confirmed. Lang should default this to `WAIT_CANCELLATION_COMPLETED`, even though proto - will default to `TRY_CANCEL` automatically. - """ + def __init__( self, *, @@ -688,10 +730,11 @@ class ScheduleLocalActivity(google.protobuf.message.Message): retry_policy: temporalio.api.common.v1.message_pb2.RetryPolicy | None = ..., local_retry_threshold: google.protobuf.duration_pb2.Duration | None = ..., cancellation_type: global___ActivityCancellationType.ValueType = ..., + include_arguments_in_marker: builtins.bool = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "local_retry_threshold", b"local_retry_threshold", "original_schedule_time", @@ -708,7 +751,7 @@ class ScheduleLocalActivity(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "activity_id", b"activity_id", "activity_type", @@ -721,6 +764,8 @@ class ScheduleLocalActivity(google.protobuf.message.Message): b"cancellation_type", "headers", b"headers", + "include_arguments_in_marker", + b"include_arguments_in_marker", "local_retry_threshold", b"local_retry_threshold", "original_schedule_time", @@ -740,6 +785,7 @@ class ScheduleLocalActivity(google.protobuf.message.Message): global___ScheduleLocalActivity = ScheduleLocalActivity +@typing.final class RequestCancelActivity(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -751,12 +797,11 @@ class RequestCancelActivity(google.protobuf.message.Message): *, seq: builtins.int = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["seq", b"seq"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["seq", b"seq"]) -> None: ... global___RequestCancelActivity = RequestCancelActivity +@typing.final class RequestCancelLocalActivity(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -768,12 +813,11 @@ class RequestCancelLocalActivity(google.protobuf.message.Message): *, seq: builtins.int = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["seq", b"seq"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["seq", b"seq"]) -> None: ... global___RequestCancelLocalActivity = RequestCancelLocalActivity +@typing.final class QueryResult(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -795,13 +839,13 @@ class QueryResult(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failed", b"failed", "succeeded", b"succeeded", "variant", b"variant" ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failed", b"failed", "query_id", @@ -813,11 +857,12 @@ class QueryResult(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["variant", b"variant"] - ) -> typing_extensions.Literal["succeeded", "failed"] | None: ... + self, oneof_group: typing.Literal["variant", b"variant"] + ) -> typing.Literal["succeeded", "failed"] | None: ... global___QueryResult = QueryResult +@typing.final class QuerySuccess(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -830,14 +875,15 @@ class QuerySuccess(google.protobuf.message.Message): response: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["response", b"response"] + self, field_name: typing.Literal["response", b"response"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["response", b"response"] + self, field_name: typing.Literal["response", b"response"] ) -> None: ... global___QuerySuccess = QuerySuccess +@typing.final class CompleteWorkflowExecution(google.protobuf.message.Message): """Issued when the workflow completes successfully""" @@ -852,14 +898,13 @@ class CompleteWorkflowExecution(google.protobuf.message.Message): result: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["result", b"result"] + self, field_name: typing.Literal["result", b"result"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["result", b"result"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["result", b"result"]) -> None: ... global___CompleteWorkflowExecution = CompleteWorkflowExecution +@typing.final class FailWorkflowExecution(google.protobuf.message.Message): """Issued when the workflow errors out""" @@ -874,19 +919,19 @@ class FailWorkflowExecution(google.protobuf.message.Message): failure: temporalio.api.failure.v1.message_pb2.Failure | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... - def ClearField( - self, field_name: typing_extensions.Literal["failure", b"failure"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["failure", b"failure"]) -> None: ... global___FailWorkflowExecution = FailWorkflowExecution +@typing.final class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): """Continue the workflow as a new execution""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class MemoEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -902,13 +947,13 @@ class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class HeadersEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -924,33 +969,10 @@ class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] - ) -> builtins.bool: ... - def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], - ) -> None: ... - - class SearchAttributesEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property - def value(self) -> temporalio.api.common.v1.message_pb2.Payload: ... - def __init__( - self, - *, - key: builtins.str = ..., - value: temporalio.api.common.v1.message_pb2.Payload | None = ..., - ) -> None: ... - def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... WORKFLOW_TYPE_FIELD_NUMBER: builtins.int @@ -963,10 +985,23 @@ class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int RETRY_POLICY_FIELD_NUMBER: builtins.int VERSIONING_INTENT_FIELD_NUMBER: builtins.int + INITIAL_VERSIONING_BEHAVIOR_FIELD_NUMBER: builtins.int + BACKOFF_START_INTERVAL_FIELD_NUMBER: builtins.int workflow_type: builtins.str """The identifier the lang-specific sdk uses to execute workflow code""" task_queue: builtins.str """Task queue for the new workflow execution""" + versioning_intent: ( + temporalio.bridge.proto.common.common_pb2.VersioningIntent.ValueType + ) + """Whether the continued workflow should run on a worker with a compatible build id or not.""" + initial_versioning_behavior: ( + temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType + ) + """Experimental. Optionally decide the versioning behavior that the first task of the new run should use. + For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version + of the previous run. + """ @property def arguments( self, @@ -976,12 +1011,15 @@ class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): """Inputs to the workflow code. Should be specified. Will not re-use old arguments, as that typically wouldn't make any sense. """ + @property def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout for a single run of the new workflow. Will not re-use current workflow's value.""" + @property def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow task. Will not re-use current workflow's value.""" + @property def memo( self, @@ -989,6 +1027,7 @@ class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ]: """If set, the new workflow will have this memo. If unset, re-uses the current workflow's memo""" + @property def headers( self, @@ -998,24 +1037,25 @@ class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): """If set, the new workflow will have these headers. Will *not* re-use current workflow's headers otherwise. """ + @property def search_attributes( self, - ) -> google.protobuf.internal.containers.MessageMap[ - builtins.str, temporalio.api.common.v1.message_pb2.Payload - ]: + ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: """If set, the new workflow will have these search attributes. If unset, re-uses the current workflow's search attributes. """ + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: """If set, the new workflow will have this retry policy. If unset, re-uses the current workflow's retry policy. """ - versioning_intent: ( - temporalio.bridge.proto.common.common_pb2.VersioningIntent.ValueType - ) - """Whether the continued workflow should run on a worker with a compatible build id or not.""" + + @property + def backoff_start_interval(self) -> google.protobuf.duration_pb2.Duration: + """Delay before the first workflow task of the continued run is scheduled.""" + def __init__( self, *, @@ -1035,18 +1075,22 @@ class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ] | None = ..., - search_attributes: collections.abc.Mapping[ - builtins.str, temporalio.api.common.v1.message_pb2.Payload - ] + search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes | None = ..., retry_policy: temporalio.api.common.v1.message_pb2.RetryPolicy | None = ..., versioning_intent: temporalio.bridge.proto.common.common_pb2.VersioningIntent.ValueType = ..., + initial_versioning_behavior: temporalio.api.enums.v1.workflow_pb2.ContinueAsNewVersioningBehavior.ValueType = ..., + backoff_start_interval: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ + "backoff_start_interval", + b"backoff_start_interval", "retry_policy", b"retry_policy", + "search_attributes", + b"search_attributes", "workflow_run_timeout", b"workflow_run_timeout", "workflow_task_timeout", @@ -1055,11 +1099,15 @@ class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "arguments", b"arguments", + "backoff_start_interval", + b"backoff_start_interval", "headers", b"headers", + "initial_versioning_behavior", + b"initial_versioning_behavior", "memo", b"memo", "retry_policy", @@ -1081,6 +1129,7 @@ class ContinueAsNewWorkflowExecution(google.protobuf.message.Message): global___ContinueAsNewWorkflowExecution = ContinueAsNewWorkflowExecution +@typing.final class CancelWorkflowExecution(google.protobuf.message.Message): """Indicate a workflow has completed as cancelled. Generally sent as a response to an activation containing a cancellation job. @@ -1088,12 +1137,22 @@ class CancelWorkflowExecution(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + DETAILS_FIELD_NUMBER: builtins.int + @property + def details(self) -> temporalio.api.common.v1.message_pb2.Payloads: ... def __init__( self, + *, + details: temporalio.api.common.v1.message_pb2.Payloads | None = ..., ) -> None: ... + def HasField( + self, field_name: typing.Literal["details", b"details"] + ) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["details", b"details"]) -> None: ... global___CancelWorkflowExecution = CancelWorkflowExecution +@typing.final class SetPatchMarker(google.protobuf.message.Message): """A request to set/check if a certain patch is present or not""" @@ -1118,18 +1177,20 @@ class SetPatchMarker(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "deprecated", b"deprecated", "patch_id", b"patch_id" ], ) -> None: ... global___SetPatchMarker = SetPatchMarker +@typing.final class StartChildWorkflowExecution(google.protobuf.message.Message): """Start a child workflow execution""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeadersEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1145,13 +1206,13 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... + @typing.final class MemoEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1167,33 +1228,10 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], - ) -> None: ... - - class SearchAttributesEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property - def value(self) -> temporalio.api.common.v1.message_pb2.Payload: ... - def __init__( - self, - *, - key: builtins.str = ..., - value: temporalio.api.common.v1.message_pb2.Payload | None = ..., - ) -> None: ... - def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] - ) -> builtins.bool: ... - def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SEQ_FIELD_NUMBER: builtins.int @@ -1215,12 +1253,28 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): CANCELLATION_TYPE_FIELD_NUMBER: builtins.int VERSIONING_INTENT_FIELD_NUMBER: builtins.int PRIORITY_FIELD_NUMBER: builtins.int + VERSIONING_OVERRIDE_FIELD_NUMBER: builtins.int seq: builtins.int """Lang's incremental sequence number, used as the operation identifier""" namespace: builtins.str workflow_id: builtins.str workflow_type: builtins.str task_queue: builtins.str + parent_close_policy: temporalio.bridge.proto.child_workflow.child_workflow_pb2.ParentClosePolicy.ValueType + """Default: PARENT_CLOSE_POLICY_TERMINATE.""" + workflow_id_reuse_policy: ( + temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType + ) + """string control = 11; (unused from StartChildWorkflowExecutionCommandAttributes) + Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. + """ + cron_schedule: builtins.str + cancellation_type: temporalio.bridge.proto.child_workflow.child_workflow_pb2.ChildWorkflowCancellationType.ValueType + """Defines behaviour of the underlying workflow when child workflow cancellation has been requested.""" + versioning_intent: ( + temporalio.bridge.proto.common.common_pb2.VersioningIntent.ValueType + ) + """Whether this child should run on a worker with a compatible build id or not.""" @property def input( self, @@ -1230,23 +1284,17 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): @property def workflow_execution_timeout(self) -> google.protobuf.duration_pb2.Duration: """Total workflow execution timeout including retries and continue as new.""" + @property def workflow_run_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow run.""" + @property def workflow_task_timeout(self) -> google.protobuf.duration_pb2.Duration: """Timeout of a single workflow task.""" - parent_close_policy: temporalio.bridge.proto.child_workflow.child_workflow_pb2.ParentClosePolicy.ValueType - """Default: PARENT_CLOSE_POLICY_TERMINATE.""" - workflow_id_reuse_policy: ( - temporalio.api.enums.v1.workflow_pb2.WorkflowIdReusePolicy.ValueType - ) - """string control = 11; (unused from StartChildWorkflowExecutionCommandAttributes) - Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. - """ + @property def retry_policy(self) -> temporalio.api.common.v1.message_pb2.RetryPolicy: ... - cron_schedule: builtins.str @property def headers( self, @@ -1254,6 +1302,7 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ]: """Header fields""" + @property def memo( self, @@ -1261,22 +1310,25 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ]: """Memo fields""" + @property def search_attributes( self, - ) -> google.protobuf.internal.containers.MessageMap[ - builtins.str, temporalio.api.common.v1.message_pb2.Payload - ]: + ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: """Search attributes""" - cancellation_type: temporalio.bridge.proto.child_workflow.child_workflow_pb2.ChildWorkflowCancellationType.ValueType - """Defines behaviour of the underlying workflow when child workflow cancellation has been requested.""" - versioning_intent: ( - temporalio.bridge.proto.common.common_pb2.VersioningIntent.ValueType - ) - """Whether this child should run on a worker with a compatible build id or not.""" + @property def priority(self) -> temporalio.api.common.v1.message_pb2.Priority: """The Priority to use for this activity""" + + @property + def versioning_override( + self, + ) -> temporalio.api.workflow.v1.message_pb2.VersioningOverride: + """Allows routing the child independently of the parent's worker deployment version. + Requires Temporal Server 1.32+. + """ + def __init__( self, *, @@ -1302,21 +1354,25 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ] | None = ..., - search_attributes: collections.abc.Mapping[ - builtins.str, temporalio.api.common.v1.message_pb2.Payload - ] + search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes | None = ..., cancellation_type: temporalio.bridge.proto.child_workflow.child_workflow_pb2.ChildWorkflowCancellationType.ValueType = ..., versioning_intent: temporalio.bridge.proto.common.common_pb2.VersioningIntent.ValueType = ..., priority: temporalio.api.common.v1.message_pb2.Priority | None = ..., + versioning_override: temporalio.api.workflow.v1.message_pb2.VersioningOverride + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "priority", b"priority", "retry_policy", b"retry_policy", + "search_attributes", + b"search_attributes", + "versioning_override", + b"versioning_override", "workflow_execution_timeout", b"workflow_execution_timeout", "workflow_run_timeout", @@ -1327,7 +1383,7 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancellation_type", b"cancellation_type", "cron_schedule", @@ -1354,6 +1410,8 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): b"task_queue", "versioning_intent", b"versioning_intent", + "versioning_override", + b"versioning_override", "workflow_execution_timeout", b"workflow_execution_timeout", "workflow_id", @@ -1371,6 +1429,7 @@ class StartChildWorkflowExecution(google.protobuf.message.Message): global___StartChildWorkflowExecution = StartChildWorkflowExecution +@typing.final class CancelChildWorkflowExecution(google.protobuf.message.Message): """Cancel a child workflow""" @@ -1390,13 +1449,14 @@ class CancelChildWorkflowExecution(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "child_workflow_seq", b"child_workflow_seq", "reason", b"reason" ], ) -> None: ... global___CancelChildWorkflowExecution = CancelChildWorkflowExecution +@typing.final class RequestCancelExternalWorkflowExecution(google.protobuf.message.Message): """Request cancellation of an external workflow execution. For cancellation of a child workflow, prefer `CancelChildWorkflowExecution` instead, as it guards against cancel-before-start issues. @@ -1409,13 +1469,14 @@ class RequestCancelExternalWorkflowExecution(google.protobuf.message.Message): REASON_FIELD_NUMBER: builtins.int seq: builtins.int """Lang's incremental sequence number, used as the operation identifier""" + reason: builtins.str + """A reason for the cancellation""" @property def workflow_execution( self, ) -> temporalio.bridge.proto.common.common_pb2.NamespacedWorkflowExecution: """The workflow instance being targeted""" - reason: builtins.str - """A reason for the cancellation""" + def __init__( self, *, @@ -1425,14 +1486,11 @@ class RequestCancelExternalWorkflowExecution(google.protobuf.message.Message): reason: builtins.str = ..., ) -> None: ... def HasField( - self, - field_name: typing_extensions.Literal[ - "workflow_execution", b"workflow_execution" - ], + self, field_name: typing.Literal["workflow_execution", b"workflow_execution"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "reason", b"reason", "seq", @@ -1444,11 +1502,13 @@ class RequestCancelExternalWorkflowExecution(google.protobuf.message.Message): global___RequestCancelExternalWorkflowExecution = RequestCancelExternalWorkflowExecution +@typing.final class SignalExternalWorkflowExecution(google.protobuf.message.Message): """Send a signal to an external or child workflow""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class HeadersEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1464,11 +1524,10 @@ class SignalExternalWorkflowExecution(google.protobuf.message.Message): value: temporalio.api.common.v1.message_pb2.Payload | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] + self, field_name: typing.Literal["value", b"value"] ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SEQ_FIELD_NUMBER: builtins.int @@ -1479,15 +1538,16 @@ class SignalExternalWorkflowExecution(google.protobuf.message.Message): HEADERS_FIELD_NUMBER: builtins.int seq: builtins.int """Lang's incremental sequence number, used as the operation identifier""" + child_workflow_id: builtins.str + """The desired target must be a child of the issuing workflow, and this is its workflow id""" + signal_name: builtins.str + """Name of the signal handler""" @property def workflow_execution( self, ) -> temporalio.bridge.proto.common.common_pb2.NamespacedWorkflowExecution: """A specific workflow instance""" - child_workflow_id: builtins.str - """The desired target must be a child of the issuing workflow, and this is its workflow id""" - signal_name: builtins.str - """Name of the signal handler""" + @property def args( self, @@ -1495,6 +1555,7 @@ class SignalExternalWorkflowExecution(google.protobuf.message.Message): temporalio.api.common.v1.message_pb2.Payload ]: """Arguments for the handler""" + @property def headers( self, @@ -1502,6 +1563,7 @@ class SignalExternalWorkflowExecution(google.protobuf.message.Message): builtins.str, temporalio.api.common.v1.message_pb2.Payload ]: """Headers to attach to the signal""" + def __init__( self, *, @@ -1519,7 +1581,7 @@ class SignalExternalWorkflowExecution(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "child_workflow_id", b"child_workflow_id", "target", @@ -1530,7 +1592,7 @@ class SignalExternalWorkflowExecution(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "args", b"args", "child_workflow_id", @@ -1548,13 +1610,12 @@ class SignalExternalWorkflowExecution(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["target", b"target"] - ) -> ( - typing_extensions.Literal["workflow_execution", "child_workflow_id"] | None - ): ... + self, oneof_group: typing.Literal["target", b"target"] + ) -> typing.Literal["workflow_execution", "child_workflow_id"] | None: ... global___SignalExternalWorkflowExecution = SignalExternalWorkflowExecution +@typing.final class CancelSignalWorkflow(google.protobuf.message.Message): """Can be used to cancel not-already-sent `SignalExternalWorkflowExecution` commands""" @@ -1568,64 +1629,39 @@ class CancelSignalWorkflow(google.protobuf.message.Message): *, seq: builtins.int = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["seq", b"seq"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["seq", b"seq"]) -> None: ... global___CancelSignalWorkflow = CancelSignalWorkflow +@typing.final class UpsertWorkflowSearchAttributes(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - class SearchAttributesEntry(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - KEY_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - key: builtins.str - @property - def value(self) -> temporalio.api.common.v1.message_pb2.Payload: ... - def __init__( - self, - *, - key: builtins.str = ..., - value: temporalio.api.common.v1.message_pb2.Payload | None = ..., - ) -> None: ... - def HasField( - self, field_name: typing_extensions.Literal["value", b"value"] - ) -> builtins.bool: ... - def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], - ) -> None: ... - SEARCH_ATTRIBUTES_FIELD_NUMBER: builtins.int @property def search_attributes( self, - ) -> google.protobuf.internal.containers.MessageMap[ - builtins.str, temporalio.api.common.v1.message_pb2.Payload - ]: - """SearchAttributes fields - equivalent to indexed_fields on api. Key = search index, Value = - value? + ) -> temporalio.api.common.v1.message_pb2.SearchAttributes: + """SearchAttributes to upsert. The indexed_fields map will be merged with existing search + attributes, with these values taking precedence. """ + def __init__( self, *, - search_attributes: collections.abc.Mapping[ - builtins.str, temporalio.api.common.v1.message_pb2.Payload - ] + search_attributes: temporalio.api.common.v1.message_pb2.SearchAttributes | None = ..., ) -> None: ... + def HasField( + self, field_name: typing.Literal["search_attributes", b"search_attributes"] + ) -> builtins.bool: ... def ClearField( - self, - field_name: typing_extensions.Literal[ - "search_attributes", b"search_attributes" - ], + self, field_name: typing.Literal["search_attributes", b"search_attributes"] ) -> None: ... global___UpsertWorkflowSearchAttributes = UpsertWorkflowSearchAttributes +@typing.final class ModifyWorkflowProperties(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1636,20 +1672,22 @@ class ModifyWorkflowProperties(google.protobuf.message.Message): the existing memo. If the user wants to delete values, a default/empty Payload should be used as the value for the key being deleted. """ + def __init__( self, *, upserted_memo: temporalio.api.common.v1.message_pb2.Memo | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["upserted_memo", b"upserted_memo"] + self, field_name: typing.Literal["upserted_memo", b"upserted_memo"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["upserted_memo", b"upserted_memo"] + self, field_name: typing.Literal["upserted_memo", b"upserted_memo"] ) -> None: ... global___ModifyWorkflowProperties = ModifyWorkflowProperties +@typing.final class UpdateResponse(google.protobuf.message.Message): """A reply to a `DoUpdate` job - lang must run the update's validator if told to, and then immediately run the handler, if the update was accepted. @@ -1676,14 +1714,17 @@ class UpdateResponse(google.protobuf.message.Message): thus should be considered already-accepted, allowing lang to always send the same sequence on replay). """ + @property def rejected(self) -> temporalio.api.failure.v1.message_pb2.Failure: """Must be sent if the update's validator does not pass, or after acceptance if the update handler fails. """ + @property def completed(self) -> temporalio.api.common.v1.message_pb2.Payload: """Must be sent once the update handler completes successfully.""" + def __init__( self, *, @@ -1694,7 +1735,7 @@ class UpdateResponse(google.protobuf.message.Message): ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "accepted", b"accepted", "completed", @@ -1707,7 +1748,7 @@ class UpdateResponse(google.protobuf.message.Message): ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "accepted", b"accepted", "completed", @@ -1721,16 +1762,18 @@ class UpdateResponse(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["response", b"response"] - ) -> typing_extensions.Literal["accepted", "rejected", "completed"] | None: ... + self, oneof_group: typing.Literal["response", b"response"] + ) -> typing.Literal["accepted", "rejected", "completed"] | None: ... global___UpdateResponse = UpdateResponse +@typing.final class ScheduleNexusOperation(google.protobuf.message.Message): """A request to begin a Nexus operation""" DESCRIPTOR: google.protobuf.descriptor.Descriptor + @typing.final class NexusHeaderEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1745,8 +1788,7 @@ class ScheduleNexusOperation(google.protobuf.message.Message): value: builtins.str = ..., ) -> None: ... def ClearField( - self, - field_name: typing_extensions.Literal["key", b"key", "value", b"value"], + self, field_name: typing.Literal["key", b"key", "value", b"value"] ) -> None: ... SEQ_FIELD_NUMBER: builtins.int @@ -1757,6 +1799,8 @@ class ScheduleNexusOperation(google.protobuf.message.Message): SCHEDULE_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int NEXUS_HEADER_FIELD_NUMBER: builtins.int CANCELLATION_TYPE_FIELD_NUMBER: builtins.int + SCHEDULE_TO_START_TIMEOUT_FIELD_NUMBER: builtins.int + START_TO_CLOSE_TIMEOUT_FIELD_NUMBER: builtins.int seq: builtins.int """Lang's incremental sequence number, used as the operation identifier""" endpoint: builtins.str @@ -1765,6 +1809,10 @@ class ScheduleNexusOperation(google.protobuf.message.Message): """Service name.""" operation: builtins.str """Operation name.""" + cancellation_type: ( + temporalio.bridge.proto.nexus.nexus_pb2.NexusOperationCancellationType.ValueType + ) + """Defines behaviour of the underlying nexus operation when operation cancellation has been requested.""" @property def input(self) -> temporalio.api.common.v1.message_pb2.Payload: """Input for the operation. The server converts this into Nexus request content and the @@ -1772,12 +1820,14 @@ class ScheduleNexusOperation(google.protobuf.message.Message): handler side, if it is also backed by Temporal, the content is transformed back to the original Payload sent in this command. """ + @property def schedule_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: """Schedule-to-close timeout for this operation. Indicates how long the caller is willing to wait for operation completion. Calls are retried internally by the server. """ + @property def nexus_header( self, @@ -1789,10 +1839,26 @@ class ScheduleNexusOperation(google.protobuf.message.Message): activities and child workflows, these are transmitted to Nexus operations that may be external and are not traditional payloads. """ - cancellation_type: ( - temporalio.bridge.proto.nexus.nexus_pb2.NexusOperationCancellationType.ValueType - ) - """Defines behaviour of the underlying nexus operation when operation cancellation has been requested.""" + + @property + def schedule_to_start_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Schedule-to-start timeout for this operation. + Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) + by the handler. If the operation is not started within this timeout, it will fail with + TIMEOUT_TYPE_SCHEDULE_TO_START. + If not set or zero, no schedule-to-start timeout is enforced. + """ + + @property + def start_to_close_timeout(self) -> google.protobuf.duration_pb2.Duration: + """Start-to-close timeout for this operation. + Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been + started. If the operation does not complete within this timeout after starting, it will fail with + TIMEOUT_TYPE_START_TO_CLOSE. + Only applies to asynchronous operations. Synchronous operations ignore this timeout. + If not set or zero, no start-to-close timeout is enforced. + """ + def __init__( self, *, @@ -1804,16 +1870,25 @@ class ScheduleNexusOperation(google.protobuf.message.Message): schedule_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., nexus_header: collections.abc.Mapping[builtins.str, builtins.str] | None = ..., cancellation_type: temporalio.bridge.proto.nexus.nexus_pb2.NexusOperationCancellationType.ValueType = ..., + schedule_to_start_timeout: google.protobuf.duration_pb2.Duration | None = ..., + start_to_close_timeout: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "input", b"input", "schedule_to_close_timeout", b"schedule_to_close_timeout" + field_name: typing.Literal[ + "input", + b"input", + "schedule_to_close_timeout", + b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", + "start_to_close_timeout", + b"start_to_close_timeout", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "cancellation_type", b"cancellation_type", "endpoint", @@ -1826,15 +1901,20 @@ class ScheduleNexusOperation(google.protobuf.message.Message): b"operation", "schedule_to_close_timeout", b"schedule_to_close_timeout", + "schedule_to_start_timeout", + b"schedule_to_start_timeout", "seq", b"seq", "service", b"service", + "start_to_close_timeout", + b"start_to_close_timeout", ], ) -> None: ... global___ScheduleNexusOperation = ScheduleNexusOperation +@typing.final class RequestCancelNexusOperation(google.protobuf.message.Message): """Request cancellation of a nexus operation started via `ScheduleNexusOperation`""" @@ -1848,8 +1928,6 @@ class RequestCancelNexusOperation(google.protobuf.message.Message): *, seq: builtins.int = ..., ) -> None: ... - def ClearField( - self, field_name: typing_extensions.Literal["seq", b"seq"] - ) -> None: ... + def ClearField(self, field_name: typing.Literal["seq", b"seq"]) -> None: ... global___RequestCancelNexusOperation = RequestCancelNexusOperation diff --git a/temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.py b/temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.py index ce26b220d7..d50863361d 100644 --- a/temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.py +++ b/temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -31,57 +30,20 @@ ) DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n?temporal/sdk/core/workflow_completion/workflow_completion.proto\x12\x1b\x63oresdk.workflow_completion\x1a%temporal/api/failure/v1/message.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a%temporal/sdk/core/common/common.proto\x1a;temporal/sdk/core/workflow_commands/workflow_commands.proto"\xac\x01\n\x1cWorkflowActivationCompletion\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12:\n\nsuccessful\x18\x02 \x01(\x0b\x32$.coresdk.workflow_completion.SuccessH\x00\x12\x36\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32$.coresdk.workflow_completion.FailureH\x00\x42\x08\n\x06status"\xac\x01\n\x07Success\x12<\n\x08\x63ommands\x18\x01 \x03(\x0b\x32*.coresdk.workflow_commands.WorkflowCommand\x12\x1b\n\x13used_internal_flags\x18\x06 \x03(\r\x12\x46\n\x13versioning_behavior\x18\x07 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehavior"\x81\x01\n\x07\x46\x61ilure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x43\n\x0b\x66orce_cause\x18\x02 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCauseB8\xea\x02\x35Temporalio::Internal::Bridge::Api::WorkflowCompletionb\x06proto3' + b'\n?temporal/sdk/core/workflow_completion/workflow_completion.proto\x12\x1b\x63oresdk.workflow_completion\x1a%temporal/api/failure/v1/message.proto\x1a(temporal/api/enums/v1/failed_cause.proto\x1a$temporal/api/enums/v1/workflow.proto\x1a%temporal/sdk/core/common/common.proto\x1a;temporal/sdk/core/workflow_commands/workflow_commands.proto"\xbe\x02\n\x1cWorkflowActivationCompletion\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12:\n\nsuccessful\x18\x02 \x01(\x0b\x32$.coresdk.workflow_completion.SuccessH\x00\x12\x36\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32$.coresdk.workflow_completion.FailureH\x00\x12H\n\x18payload_download_metrics\x18\x04 \x01(\x0b\x32&.coresdk.common.ExternalStorageMetrics\x12\x46\n\x16payload_upload_metrics\x18\x05 \x01(\x0b\x32&.coresdk.common.ExternalStorageMetricsB\x08\n\x06status"\xac\x01\n\x07Success\x12<\n\x08\x63ommands\x18\x01 \x03(\x0b\x32*.coresdk.workflow_commands.WorkflowCommand\x12\x1b\n\x13used_internal_flags\x18\x06 \x03(\r\x12\x46\n\x13versioning_behavior\x18\x07 \x01(\x0e\x32).temporal.api.enums.v1.VersioningBehavior"\x81\x01\n\x07\x46\x61ilure\x12\x31\n\x07\x66\x61ilure\x18\x01 \x01(\x0b\x32 .temporal.api.failure.v1.Failure\x12\x43\n\x0b\x66orce_cause\x18\x02 \x01(\x0e\x32..temporal.api.enums.v1.WorkflowTaskFailedCauseB8\xea\x02\x35Temporalio::Internal::Bridge::Api::WorkflowCompletionb\x06proto3' ) - -_WORKFLOWACTIVATIONCOMPLETION = DESCRIPTOR.message_types_by_name[ - "WorkflowActivationCompletion" -] -_SUCCESS = DESCRIPTOR.message_types_by_name["Success"] -_FAILURE = DESCRIPTOR.message_types_by_name["Failure"] -WorkflowActivationCompletion = _reflection.GeneratedProtocolMessageType( - "WorkflowActivationCompletion", - (_message.Message,), - { - "DESCRIPTOR": _WORKFLOWACTIVATIONCOMPLETION, - "__module__": "temporal.sdk.core.workflow_completion.workflow_completion_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_completion.WorkflowActivationCompletion) - }, -) -_sym_db.RegisterMessage(WorkflowActivationCompletion) - -Success = _reflection.GeneratedProtocolMessageType( - "Success", - (_message.Message,), - { - "DESCRIPTOR": _SUCCESS, - "__module__": "temporal.sdk.core.workflow_completion.workflow_completion_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_completion.Success) - }, -) -_sym_db.RegisterMessage(Success) - -Failure = _reflection.GeneratedProtocolMessageType( - "Failure", - (_message.Message,), - { - "DESCRIPTOR": _FAILURE, - "__module__": "temporal.sdk.core.workflow_completion.workflow_completion_pb2", - # @@protoc_insertion_point(class_scope:coresdk.workflow_completion.Failure) - }, -) -_sym_db.RegisterMessage(Failure) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = ( b"\352\0025Temporalio::Internal::Bridge::Api::WorkflowCompletion" ) _WORKFLOWACTIVATIONCOMPLETION._serialized_start = 316 - _WORKFLOWACTIVATIONCOMPLETION._serialized_end = 488 - _SUCCESS._serialized_start = 491 - _SUCCESS._serialized_end = 663 - _FAILURE._serialized_start = 666 - _FAILURE._serialized_end = 795 + _WORKFLOWACTIVATIONCOMPLETION._serialized_end = 634 + _SUCCESS._serialized_start = 637 + _SUCCESS._serialized_end = 809 + _FAILURE._serialized_start = 812 + _FAILURE._serialized_end = 941 # @@protoc_insertion_point(module_scope) diff --git a/temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.pyi b/temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.pyi index 5b438f3606..46411d2fe7 100644 --- a/temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.pyi +++ b/temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.pyi @@ -5,7 +5,7 @@ isort:skip_file import builtins import collections.abc -import sys +import typing import google.protobuf.descriptor import google.protobuf.internal.containers @@ -14,15 +14,12 @@ import google.protobuf.message import temporalio.api.enums.v1.failed_cause_pb2 import temporalio.api.enums.v1.workflow_pb2 import temporalio.api.failure.v1.message_pb2 +import temporalio.bridge.proto.common.common_pb2 import temporalio.bridge.proto.workflow_commands.workflow_commands_pb2 -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class WorkflowActivationCompletion(google.protobuf.message.Message): """Result of a single workflow activation, reported from lang to core""" @@ -31,30 +28,65 @@ class WorkflowActivationCompletion(google.protobuf.message.Message): RUN_ID_FIELD_NUMBER: builtins.int SUCCESSFUL_FIELD_NUMBER: builtins.int FAILED_FIELD_NUMBER: builtins.int + PAYLOAD_DOWNLOAD_METRICS_FIELD_NUMBER: builtins.int + PAYLOAD_UPLOAD_METRICS_FIELD_NUMBER: builtins.int run_id: builtins.str """The run id from the workflow activation you are completing""" @property def successful(self) -> global___Success: ... @property def failed(self) -> global___Failure: ... + @property + def payload_download_metrics( + self, + ) -> temporalio.bridge.proto.common.common_pb2.ExternalStorageMetrics: + """Metrics for external payload storage downloads (retrievals) performed while processing + this activation. Only set when external storage retrieved payloads. + """ + + @property + def payload_upload_metrics( + self, + ) -> temporalio.bridge.proto.common.common_pb2.ExternalStorageMetrics: + """Metrics for external payload storage uploads (stores) performed while processing this + activation. Only set when external storage stored payloads. + """ + def __init__( self, *, run_id: builtins.str = ..., successful: global___Success | None = ..., failed: global___Failure | None = ..., + payload_download_metrics: temporalio.bridge.proto.common.common_pb2.ExternalStorageMetrics + | None = ..., + payload_upload_metrics: temporalio.bridge.proto.common.common_pb2.ExternalStorageMetrics + | None = ..., ) -> None: ... def HasField( self, - field_name: typing_extensions.Literal[ - "failed", b"failed", "status", b"status", "successful", b"successful" + field_name: typing.Literal[ + "failed", + b"failed", + "payload_download_metrics", + b"payload_download_metrics", + "payload_upload_metrics", + b"payload_upload_metrics", + "status", + b"status", + "successful", + b"successful", ], ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failed", b"failed", + "payload_download_metrics", + b"payload_download_metrics", + "payload_upload_metrics", + b"payload_upload_metrics", "run_id", b"run_id", "status", @@ -64,11 +96,12 @@ class WorkflowActivationCompletion(google.protobuf.message.Message): ], ) -> None: ... def WhichOneof( - self, oneof_group: typing_extensions.Literal["status", b"status"] - ) -> typing_extensions.Literal["successful", "failed"] | None: ... + self, oneof_group: typing.Literal["status", b"status"] + ) -> typing.Literal["successful", "failed"] | None: ... global___WorkflowActivationCompletion = WorkflowActivationCompletion +@typing.final class Success(google.protobuf.message.Message): """Successful workflow activation with a list of commands generated by the workflow execution""" @@ -77,6 +110,10 @@ class Success(google.protobuf.message.Message): COMMANDS_FIELD_NUMBER: builtins.int USED_INTERNAL_FLAGS_FIELD_NUMBER: builtins.int VERSIONING_BEHAVIOR_FIELD_NUMBER: builtins.int + versioning_behavior: ( + temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType + ) + """The versioning behavior this workflow is currently using""" @property def commands( self, @@ -84,15 +121,13 @@ class Success(google.protobuf.message.Message): temporalio.bridge.proto.workflow_commands.workflow_commands_pb2.WorkflowCommand ]: """A list of commands to send back to the temporal server""" + @property def used_internal_flags( self, ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: """Any internal flags which the lang SDK used in the processing of this activation""" - versioning_behavior: ( - temporalio.api.enums.v1.workflow_pb2.VersioningBehavior.ValueType - ) - """The versioning behavior this workflow is currently using""" + def __init__( self, *, @@ -105,7 +140,7 @@ class Success(google.protobuf.message.Message): ) -> None: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "commands", b"commands", "used_internal_flags", @@ -117,6 +152,7 @@ class Success(google.protobuf.message.Message): global___Success = Success +@typing.final class Failure(google.protobuf.message.Message): """Failure to activate or execute a workflow""" @@ -124,12 +160,12 @@ class Failure(google.protobuf.message.Message): FAILURE_FIELD_NUMBER: builtins.int FORCE_CAUSE_FIELD_NUMBER: builtins.int - @property - def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ... force_cause: ( temporalio.api.enums.v1.failed_cause_pb2.WorkflowTaskFailedCause.ValueType ) """Forces overriding the WFT failure cause""" + @property + def failure(self) -> temporalio.api.failure.v1.message_pb2.Failure: ... def __init__( self, *, @@ -137,11 +173,11 @@ class Failure(google.protobuf.message.Message): force_cause: temporalio.api.enums.v1.failed_cause_pb2.WorkflowTaskFailedCause.ValueType = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["failure", b"failure"] + self, field_name: typing.Literal["failure", b"failure"] ) -> builtins.bool: ... def ClearField( self, - field_name: typing_extensions.Literal[ + field_name: typing.Literal[ "failure", b"failure", "force_cause", b"force_cause" ], ) -> None: ... diff --git a/temporalio/bridge/runtime.py b/temporalio/bridge/runtime.py index 6d718fe030..fb5b65b4e7 100644 --- a/temporalio/bridge/runtime.py +++ b/temporalio/bridge/runtime.py @@ -7,7 +7,7 @@ from collections.abc import Callable, Mapping, Sequence from dataclasses import dataclass -from typing import Any, Dict, Optional, Type +from typing import Any from typing_extensions import Protocol @@ -47,6 +47,7 @@ class LoggingConfig: filter: str forward_to: Callable[[Sequence[BufferedLogEntry]], None] | None + format: str | None @dataclass(frozen=True) @@ -71,6 +72,7 @@ class OpenTelemetryConfig: metric_temporality_delta: bool durations_as_seconds: bool http: bool + histogram_bucket_overrides: Mapping[str, Sequence[float]] | None = None @dataclass(frozen=True) @@ -98,6 +100,7 @@ class RuntimeOptions: telemetry: TelemetryConfig worker_heartbeat_interval_millis: int | None = 60_000 # 60s + disable_environment_info: bool = False # WARNING: This must match Rust runtime::BufferedLogEntry diff --git a/temporalio/bridge/sdk-core b/temporalio/bridge/sdk-core index b5a473d425..c675c32469 160000 --- a/temporalio/bridge/sdk-core +++ b/temporalio/bridge/sdk-core @@ -1 +1 @@ -Subproject commit b5a473d425e7d63a49f3bbcb08767b9ff46207d0 +Subproject commit c675c32469af707e1c979a7b808c70b4a0608b82 diff --git a/temporalio/bridge/services_generated.py b/temporalio/bridge/services_generated.py index 34261a18aa..c9960fcb5f 100644 --- a/temporalio/bridge/services_generated.py +++ b/temporalio/bridge/services_generated.py @@ -27,6 +27,78 @@ def __init__(self, client: ServiceClient): self._client = client self._service = "workflow" + async def count_activity_executions( + self, + req: temporalio.api.workflowservice.v1.CountActivityExecutionsRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.CountActivityExecutionsResponse: + """Invokes the WorkflowService.count_activity_executions rpc method.""" + return await self._client._rpc_call( + rpc="count_activity_executions", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.CountActivityExecutionsResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def count_nexus_operation_executions( + self, + req: temporalio.api.workflowservice.v1.CountNexusOperationExecutionsRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.CountNexusOperationExecutionsResponse: + """Invokes the WorkflowService.count_nexus_operation_executions rpc method.""" + return await self._client._rpc_call( + rpc="count_nexus_operation_executions", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.CountNexusOperationExecutionsResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def count_schedules( + self, + req: temporalio.api.workflowservice.v1.CountSchedulesRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.CountSchedulesResponse: + """Invokes the WorkflowService.count_schedules rpc method.""" + return await self._client._rpc_call( + rpc="count_schedules", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.CountSchedulesResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def count_workers( + self, + req: temporalio.api.workflowservice.v1.CountWorkersRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.CountWorkersResponse: + """Invokes the WorkflowService.count_workers rpc method.""" + return await self._client._rpc_call( + rpc="count_workers", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.CountWorkersResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def count_workflow_executions( self, req: temporalio.api.workflowservice.v1.CountWorkflowExecutionsRequest, @@ -63,6 +135,42 @@ async def create_schedule( timeout=timeout, ) + async def create_worker_deployment( + self, + req: temporalio.api.workflowservice.v1.CreateWorkerDeploymentRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.CreateWorkerDeploymentResponse: + """Invokes the WorkflowService.create_worker_deployment rpc method.""" + return await self._client._rpc_call( + rpc="create_worker_deployment", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.CreateWorkerDeploymentResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def create_worker_deployment_version( + self, + req: temporalio.api.workflowservice.v1.CreateWorkerDeploymentVersionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.CreateWorkerDeploymentVersionResponse: + """Invokes the WorkflowService.create_worker_deployment_version rpc method.""" + return await self._client._rpc_call( + rpc="create_worker_deployment_version", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.CreateWorkerDeploymentVersionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def create_workflow_rule( self, req: temporalio.api.workflowservice.v1.CreateWorkflowRuleRequest, @@ -81,6 +189,42 @@ async def create_workflow_rule( timeout=timeout, ) + async def delete_activity_execution( + self, + req: temporalio.api.workflowservice.v1.DeleteActivityExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.DeleteActivityExecutionResponse: + """Invokes the WorkflowService.delete_activity_execution rpc method.""" + return await self._client._rpc_call( + rpc="delete_activity_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.DeleteActivityExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def delete_nexus_operation_execution( + self, + req: temporalio.api.workflowservice.v1.DeleteNexusOperationExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.DeleteNexusOperationExecutionResponse: + """Invokes the WorkflowService.delete_nexus_operation_execution rpc method.""" + return await self._client._rpc_call( + rpc="delete_nexus_operation_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.DeleteNexusOperationExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def delete_schedule( self, req: temporalio.api.workflowservice.v1.DeleteScheduleRequest, @@ -189,6 +333,24 @@ async def deprecate_namespace( timeout=timeout, ) + async def describe_activity_execution( + self, + req: temporalio.api.workflowservice.v1.DescribeActivityExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.DescribeActivityExecutionResponse: + """Invokes the WorkflowService.describe_activity_execution rpc method.""" + return await self._client._rpc_call( + rpc="describe_activity_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.DescribeActivityExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def describe_batch_operation( self, req: temporalio.api.workflowservice.v1.DescribeBatchOperationRequest, @@ -243,6 +405,24 @@ async def describe_namespace( timeout=timeout, ) + async def describe_nexus_operation_execution( + self, + req: temporalio.api.workflowservice.v1.DescribeNexusOperationExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.DescribeNexusOperationExecutionResponse: + """Invokes the WorkflowService.describe_nexus_operation_execution rpc method.""" + return await self._client._rpc_call( + rpc="describe_nexus_operation_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.DescribeNexusOperationExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def describe_schedule( self, req: temporalio.api.workflowservice.v1.DescribeScheduleRequest, @@ -585,6 +765,24 @@ async def get_workflow_execution_history_reverse( timeout=timeout, ) + async def list_activity_executions( + self, + req: temporalio.api.workflowservice.v1.ListActivityExecutionsRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.ListActivityExecutionsResponse: + """Invokes the WorkflowService.list_activity_executions rpc method.""" + return await self._client._rpc_call( + rpc="list_activity_executions", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.ListActivityExecutionsResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def list_archived_workflow_executions( self, req: temporalio.api.workflowservice.v1.ListArchivedWorkflowExecutionsRequest, @@ -675,6 +873,24 @@ async def list_namespaces( timeout=timeout, ) + async def list_nexus_operation_executions( + self, + req: temporalio.api.workflowservice.v1.ListNexusOperationExecutionsRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.ListNexusOperationExecutionsResponse: + """Invokes the WorkflowService.list_nexus_operation_executions rpc method.""" + return await self._client._rpc_call( + rpc="list_nexus_operation_executions", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.ListNexusOperationExecutionsResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def list_open_workflow_executions( self, req: temporalio.api.workflowservice.v1.ListOpenWorkflowExecutionsRequest, @@ -855,6 +1071,60 @@ async def pause_activity( timeout=timeout, ) + async def pause_activity_execution( + self, + req: temporalio.api.workflowservice.v1.PauseActivityExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.PauseActivityExecutionResponse: + """Invokes the WorkflowService.pause_activity_execution rpc method.""" + return await self._client._rpc_call( + rpc="pause_activity_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.PauseActivityExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def pause_workflow_execution( + self, + req: temporalio.api.workflowservice.v1.PauseWorkflowExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.PauseWorkflowExecutionResponse: + """Invokes the WorkflowService.pause_workflow_execution rpc method.""" + return await self._client._rpc_call( + rpc="pause_workflow_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.PauseWorkflowExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def poll_activity_execution( + self, + req: temporalio.api.workflowservice.v1.PollActivityExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.PollActivityExecutionResponse: + """Invokes the WorkflowService.poll_activity_execution rpc method.""" + return await self._client._rpc_call( + rpc="poll_activity_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.PollActivityExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def poll_activity_task_queue( self, req: temporalio.api.workflowservice.v1.PollActivityTaskQueueRequest, @@ -873,6 +1143,24 @@ async def poll_activity_task_queue( timeout=timeout, ) + async def poll_nexus_operation_execution( + self, + req: temporalio.api.workflowservice.v1.PollNexusOperationExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.PollNexusOperationExecutionResponse: + """Invokes the WorkflowService.poll_nexus_operation_execution rpc method.""" + return await self._client._rpc_call( + rpc="poll_nexus_operation_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.PollNexusOperationExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def poll_nexus_task_queue( self, req: temporalio.api.workflowservice.v1.PollNexusTaskQueueRequest, @@ -891,6 +1179,24 @@ async def poll_nexus_task_queue( timeout=timeout, ) + async def poll_workflow_execution_time_skipping( + self, + req: temporalio.api.workflowservice.v1.PollWorkflowExecutionTimeSkippingRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.PollWorkflowExecutionTimeSkippingResponse: + """Invokes the WorkflowService.poll_workflow_execution_time_skipping rpc method.""" + return await self._client._rpc_call( + rpc="poll_workflow_execution_time_skipping", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.PollWorkflowExecutionTimeSkippingResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def poll_workflow_execution_update( self, req: temporalio.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest, @@ -1017,6 +1323,42 @@ async def register_namespace( timeout=timeout, ) + async def request_cancel_activity_execution( + self, + req: temporalio.api.workflowservice.v1.RequestCancelActivityExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.RequestCancelActivityExecutionResponse: + """Invokes the WorkflowService.request_cancel_activity_execution rpc method.""" + return await self._client._rpc_call( + rpc="request_cancel_activity_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.RequestCancelActivityExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def request_cancel_nexus_operation_execution( + self, + req: temporalio.api.workflowservice.v1.RequestCancelNexusOperationExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.RequestCancelNexusOperationExecutionResponse: + """Invokes the WorkflowService.request_cancel_nexus_operation_execution rpc method.""" + return await self._client._rpc_call( + rpc="request_cancel_nexus_operation_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.RequestCancelNexusOperationExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def request_cancel_workflow_execution( self, req: temporalio.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest, @@ -1053,6 +1395,24 @@ async def reset_activity( timeout=timeout, ) + async def reset_activity_execution( + self, + req: temporalio.api.workflowservice.v1.ResetActivityExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.ResetActivityExecutionResponse: + """Invokes the WorkflowService.reset_activity_execution rpc method.""" + return await self._client._rpc_call( + rpc="reset_activity_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.ResetActivityExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def reset_sticky_task_queue( self, req: temporalio.api.workflowservice.v1.ResetStickyTaskQueueRequest, @@ -1431,6 +1791,24 @@ async def signal_workflow_execution( timeout=timeout, ) + async def start_activity_execution( + self, + req: temporalio.api.workflowservice.v1.StartActivityExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.StartActivityExecutionResponse: + """Invokes the WorkflowService.start_activity_execution rpc method.""" + return await self._client._rpc_call( + rpc="start_activity_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.StartActivityExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def start_batch_operation( self, req: temporalio.api.workflowservice.v1.StartBatchOperationRequest, @@ -1449,14 +1827,32 @@ async def start_batch_operation( timeout=timeout, ) - async def start_workflow_execution( + async def start_nexus_operation_execution( self, - req: temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest, + req: temporalio.api.workflowservice.v1.StartNexusOperationExecutionRequest, retry: bool = False, metadata: Mapping[str, str | bytes] = {}, timeout: timedelta | None = None, - ) -> temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse: - """Invokes the WorkflowService.start_workflow_execution rpc method.""" + ) -> temporalio.api.workflowservice.v1.StartNexusOperationExecutionResponse: + """Invokes the WorkflowService.start_nexus_operation_execution rpc method.""" + return await self._client._rpc_call( + rpc="start_nexus_operation_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.StartNexusOperationExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def start_workflow_execution( + self, + req: temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse: + """Invokes the WorkflowService.start_workflow_execution rpc method.""" return await self._client._rpc_call( rpc="start_workflow_execution", req=req, @@ -1485,6 +1881,42 @@ async def stop_batch_operation( timeout=timeout, ) + async def terminate_activity_execution( + self, + req: temporalio.api.workflowservice.v1.TerminateActivityExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.TerminateActivityExecutionResponse: + """Invokes the WorkflowService.terminate_activity_execution rpc method.""" + return await self._client._rpc_call( + rpc="terminate_activity_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.TerminateActivityExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def terminate_nexus_operation_execution( + self, + req: temporalio.api.workflowservice.v1.TerminateNexusOperationExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.TerminateNexusOperationExecutionResponse: + """Invokes the WorkflowService.terminate_nexus_operation_execution rpc method.""" + return await self._client._rpc_call( + rpc="terminate_nexus_operation_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.TerminateNexusOperationExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def terminate_workflow_execution( self, req: temporalio.api.workflowservice.v1.TerminateWorkflowExecutionRequest, @@ -1539,6 +1971,60 @@ async def unpause_activity( timeout=timeout, ) + async def unpause_activity_execution( + self, + req: temporalio.api.workflowservice.v1.UnpauseActivityExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.UnpauseActivityExecutionResponse: + """Invokes the WorkflowService.unpause_activity_execution rpc method.""" + return await self._client._rpc_call( + rpc="unpause_activity_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.UnpauseActivityExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def unpause_workflow_execution( + self, + req: temporalio.api.workflowservice.v1.UnpauseWorkflowExecutionRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.UnpauseWorkflowExecutionResponse: + """Invokes the WorkflowService.unpause_workflow_execution rpc method.""" + return await self._client._rpc_call( + rpc="unpause_workflow_execution", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.UnpauseWorkflowExecutionResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def update_activity_execution_options( + self, + req: temporalio.api.workflowservice.v1.UpdateActivityExecutionOptionsRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.UpdateActivityExecutionOptionsResponse: + """Invokes the WorkflowService.update_activity_execution_options rpc method.""" + return await self._client._rpc_call( + rpc="update_activity_execution_options", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.UpdateActivityExecutionOptionsResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def update_activity_options( self, req: temporalio.api.workflowservice.v1.UpdateActivityOptionsRequest, @@ -1647,6 +2133,24 @@ async def update_worker_config( timeout=timeout, ) + async def update_worker_deployment_version_compute_config( + self, + req: temporalio.api.workflowservice.v1.UpdateWorkerDeploymentVersionComputeConfigRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.UpdateWorkerDeploymentVersionComputeConfigResponse: + """Invokes the WorkflowService.update_worker_deployment_version_compute_config rpc method.""" + return await self._client._rpc_call( + rpc="update_worker_deployment_version_compute_config", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.UpdateWorkerDeploymentVersionComputeConfigResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def update_worker_deployment_version_metadata( self, req: temporalio.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest, @@ -1721,6 +2225,24 @@ async def update_workflow_execution_options( timeout=timeout, ) + async def validate_worker_deployment_version_compute_config( + self, + req: temporalio.api.workflowservice.v1.ValidateWorkerDeploymentVersionComputeConfigRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.ValidateWorkerDeploymentVersionComputeConfigResponse: + """Invokes the WorkflowService.validate_worker_deployment_version_compute_config rpc method.""" + return await self._client._rpc_call( + rpc="validate_worker_deployment_version_compute_config", + req=req, + service=self._service, + resp_type=temporalio.api.workflowservice.v1.ValidateWorkerDeploymentVersionComputeConfigResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + class OperatorService: """RPC calls for the OperatorService.""" @@ -1991,6 +2513,24 @@ async def add_user_group_member( timeout=timeout, ) + async def create_account_audit_log_sink( + self, + req: temporalio.api.cloud.cloudservice.v1.CreateAccountAuditLogSinkRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.CreateAccountAuditLogSinkResponse: + """Invokes the CloudService.create_account_audit_log_sink rpc method.""" + return await self._client._rpc_call( + rpc="create_account_audit_log_sink", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.CreateAccountAuditLogSinkResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def create_api_key( self, req: temporalio.api.cloud.cloudservice.v1.CreateApiKeyRequest, @@ -2009,6 +2549,24 @@ async def create_api_key( timeout=timeout, ) + async def create_billing_report( + self, + req: temporalio.api.cloud.cloudservice.v1.CreateBillingReportRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.CreateBillingReportResponse: + """Invokes the CloudService.create_billing_report rpc method.""" + return await self._client._rpc_call( + rpc="create_billing_report", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.CreateBillingReportResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def create_connectivity_rule( self, req: temporalio.api.cloud.cloudservice.v1.CreateConnectivityRuleRequest, @@ -2027,6 +2585,24 @@ async def create_connectivity_rule( timeout=timeout, ) + async def create_custom_role( + self, + req: temporalio.api.cloud.cloudservice.v1.CreateCustomRoleRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.CreateCustomRoleResponse: + """Invokes the CloudService.create_custom_role rpc method.""" + return await self._client._rpc_call( + rpc="create_custom_role", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.CreateCustomRoleResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def create_namespace( self, req: temporalio.api.cloud.cloudservice.v1.CreateNamespaceRequest, @@ -2135,6 +2711,24 @@ async def create_user_group( timeout=timeout, ) + async def delete_account_audit_log_sink( + self, + req: temporalio.api.cloud.cloudservice.v1.DeleteAccountAuditLogSinkRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.DeleteAccountAuditLogSinkResponse: + """Invokes the CloudService.delete_account_audit_log_sink rpc method.""" + return await self._client._rpc_call( + rpc="delete_account_audit_log_sink", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.DeleteAccountAuditLogSinkResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def delete_api_key( self, req: temporalio.api.cloud.cloudservice.v1.DeleteApiKeyRequest, @@ -2171,6 +2765,24 @@ async def delete_connectivity_rule( timeout=timeout, ) + async def delete_custom_role( + self, + req: temporalio.api.cloud.cloudservice.v1.DeleteCustomRoleRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.DeleteCustomRoleResponse: + """Invokes the CloudService.delete_custom_role rpc method.""" + return await self._client._rpc_call( + rpc="delete_custom_role", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.DeleteCustomRoleResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def delete_namespace( self, req: temporalio.api.cloud.cloudservice.v1.DeleteNamespaceRequest, @@ -2333,6 +2945,42 @@ async def get_account( timeout=timeout, ) + async def get_account_audit_log_sink( + self, + req: temporalio.api.cloud.cloudservice.v1.GetAccountAuditLogSinkRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetAccountAuditLogSinkResponse: + """Invokes the CloudService.get_account_audit_log_sink rpc method.""" + return await self._client._rpc_call( + rpc="get_account_audit_log_sink", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetAccountAuditLogSinkResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def get_account_audit_log_sinks( + self, + req: temporalio.api.cloud.cloudservice.v1.GetAccountAuditLogSinksRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetAccountAuditLogSinksResponse: + """Invokes the CloudService.get_account_audit_log_sinks rpc method.""" + return await self._client._rpc_call( + rpc="get_account_audit_log_sinks", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetAccountAuditLogSinksResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def get_api_key( self, req: temporalio.api.cloud.cloudservice.v1.GetApiKeyRequest, @@ -2387,6 +3035,42 @@ async def get_async_operation( timeout=timeout, ) + async def get_audit_logs( + self, + req: temporalio.api.cloud.cloudservice.v1.GetAuditLogsRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetAuditLogsResponse: + """Invokes the CloudService.get_audit_logs rpc method.""" + return await self._client._rpc_call( + rpc="get_audit_logs", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetAuditLogsResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def get_billing_report( + self, + req: temporalio.api.cloud.cloudservice.v1.GetBillingReportRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetBillingReportResponse: + """Invokes the CloudService.get_billing_report rpc method.""" + return await self._client._rpc_call( + rpc="get_billing_report", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetBillingReportResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def get_connectivity_rule( self, req: temporalio.api.cloud.cloudservice.v1.GetConnectivityRuleRequest, @@ -2423,6 +3107,60 @@ async def get_connectivity_rules( timeout=timeout, ) + async def get_current_identity( + self, + req: temporalio.api.cloud.cloudservice.v1.GetCurrentIdentityRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetCurrentIdentityResponse: + """Invokes the CloudService.get_current_identity rpc method.""" + return await self._client._rpc_call( + rpc="get_current_identity", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetCurrentIdentityResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def get_custom_role( + self, + req: temporalio.api.cloud.cloudservice.v1.GetCustomRoleRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetCustomRoleResponse: + """Invokes the CloudService.get_custom_role rpc method.""" + return await self._client._rpc_call( + rpc="get_custom_role", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetCustomRoleResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + + async def get_custom_roles( + self, + req: temporalio.api.cloud.cloudservice.v1.GetCustomRolesRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetCustomRolesResponse: + """Invokes the CloudService.get_custom_roles rpc method.""" + return await self._client._rpc_call( + rpc="get_custom_roles", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetCustomRolesResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def get_namespace( self, req: temporalio.api.cloud.cloudservice.v1.GetNamespaceRequest, @@ -2441,6 +3179,24 @@ async def get_namespace( timeout=timeout, ) + async def get_namespace_capacity_info( + self, + req: temporalio.api.cloud.cloudservice.v1.GetNamespaceCapacityInfoRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetNamespaceCapacityInfoResponse: + """Invokes the CloudService.get_namespace_capacity_info rpc method.""" + return await self._client._rpc_call( + rpc="get_namespace_capacity_info", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetNamespaceCapacityInfoResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def get_namespace_export_sink( self, req: temporalio.api.cloud.cloudservice.v1.GetNamespaceExportSinkRequest, @@ -2585,6 +3341,24 @@ async def get_service_account( timeout=timeout, ) + async def get_service_account_namespace_assignments( + self, + req: temporalio.api.cloud.cloudservice.v1.GetServiceAccountNamespaceAssignmentsRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetServiceAccountNamespaceAssignmentsResponse: + """Invokes the CloudService.get_service_account_namespace_assignments rpc method.""" + return await self._client._rpc_call( + rpc="get_service_account_namespace_assignments", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetServiceAccountNamespaceAssignmentsResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def get_service_accounts( self, req: temporalio.api.cloud.cloudservice.v1.GetServiceAccountsRequest, @@ -2675,6 +3449,24 @@ async def get_user_group_members( timeout=timeout, ) + async def get_user_group_namespace_assignments( + self, + req: temporalio.api.cloud.cloudservice.v1.GetUserGroupNamespaceAssignmentsRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetUserGroupNamespaceAssignmentsResponse: + """Invokes the CloudService.get_user_group_namespace_assignments rpc method.""" + return await self._client._rpc_call( + rpc="get_user_group_namespace_assignments", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetUserGroupNamespaceAssignmentsResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def get_user_groups( self, req: temporalio.api.cloud.cloudservice.v1.GetUserGroupsRequest, @@ -2693,6 +3485,24 @@ async def get_user_groups( timeout=timeout, ) + async def get_user_namespace_assignments( + self, + req: temporalio.api.cloud.cloudservice.v1.GetUserNamespaceAssignmentsRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.GetUserNamespaceAssignmentsResponse: + """Invokes the CloudService.get_user_namespace_assignments rpc method.""" + return await self._client._rpc_call( + rpc="get_user_namespace_assignments", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.GetUserNamespaceAssignmentsResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def get_users( self, req: temporalio.api.cloud.cloudservice.v1.GetUsersRequest, @@ -2819,6 +3629,24 @@ async def update_account( timeout=timeout, ) + async def update_account_audit_log_sink( + self, + req: temporalio.api.cloud.cloudservice.v1.UpdateAccountAuditLogSinkRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.UpdateAccountAuditLogSinkResponse: + """Invokes the CloudService.update_account_audit_log_sink rpc method.""" + return await self._client._rpc_call( + rpc="update_account_audit_log_sink", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.UpdateAccountAuditLogSinkResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def update_api_key( self, req: temporalio.api.cloud.cloudservice.v1.UpdateApiKeyRequest, @@ -2837,6 +3665,24 @@ async def update_api_key( timeout=timeout, ) + async def update_custom_role( + self, + req: temporalio.api.cloud.cloudservice.v1.UpdateCustomRoleRequest, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.cloud.cloudservice.v1.UpdateCustomRoleResponse: + """Invokes the CloudService.update_custom_role rpc method.""" + return await self._client._rpc_call( + rpc="update_custom_role", + req=req, + service=self._service, + resp_type=temporalio.api.cloud.cloudservice.v1.UpdateCustomRoleResponse, + retry=retry, + metadata=metadata, + timeout=timeout, + ) + async def update_namespace( self, req: temporalio.api.cloud.cloudservice.v1.UpdateNamespaceRequest, diff --git a/temporalio/bridge/src/client.rs b/temporalio/bridge/src/client.rs index 7bf0340b92..211392ed11 100644 --- a/temporalio/bridge/src/client.rs +++ b/temporalio/bridge/src/client.rs @@ -2,26 +2,34 @@ use pyo3::exceptions::{PyException, PyRuntimeError, PyValueError}; use pyo3::prelude::*; use std::collections::HashMap; use std::str::FromStr; +use std::sync::Arc; use std::time::Duration; use temporalio_client::tonic::{ self, metadata::{AsciiMetadataKey, AsciiMetadataValue, BinaryMetadataKey, BinaryMetadataValue}, }; use temporalio_client::{ - ClientKeepAliveOptions as CoreClientKeepAliveConfig, ClientOptions, ConfiguredClient, - HttpConnectProxyOptions, RetryClient, RetryOptions, TemporalServiceClient, + ClientKeepAliveOptions as CoreClientKeepAliveConfig, Connection, ConnectionOptions, + DnsLoadBalancingOptions, GrpcCompression, HttpConnectProxyOptions, RetryOptions, }; +use tokio_rustls::rustls::client::danger::{ + HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier, +}; +use tokio_rustls::rustls::client::WebPkiServerVerifier; +use tokio_rustls::rustls::crypto::CryptoProvider; +use tokio_rustls::rustls::pki_types::pem::PemObject; +use tokio_rustls::rustls::pki_types::{CertificateDer, ServerName, UnixTime}; +use tokio_rustls::rustls::{self, DigitallySignedStruct, RootCertStore, SignatureScheme}; +use tracing::warn; use url::Url; use crate::runtime; pyo3::create_exception!(temporal_sdk_bridge, RPCError, PyException); -type Client = RetryClient>; - #[pyclass] pub struct ClientRef { - pub(crate) retry_client: Client, + pub(crate) connection: Connection, pub(crate) runtime: runtime::Runtime, } @@ -36,7 +44,12 @@ pub struct ClientConfig { tls_config: Option, retry_config: Option, keep_alive_config: Option, + connect_timeout_millis: Option, http_connect_proxy_config: Option, + dns_load_balancing_config: Option, + grpc_compression: String, + payloads_warn_size: u64, + memo_warn_size: u64, } #[derive(FromPyObject)] @@ -45,6 +58,7 @@ struct ClientTlsConfig { domain: Option, client_cert: Option>, client_private_key: Option>, + verification_server_name: Option, } #[derive(FromPyObject)] @@ -69,6 +83,11 @@ struct ClientHttpConnectProxyConfig { pub basic_auth: Option<(String, String)>, } +#[derive(FromPyObject)] +struct ClientDnsLoadBalancingConfig { + pub resolution_interval_millis: u64, +} + #[derive(FromPyObject)] pub(crate) struct RpcCall { pub(crate) rpc: String, @@ -91,13 +110,18 @@ pub fn connect_client<'a>( runtime_ref: &runtime::RuntimeRef, config: ClientConfig, ) -> PyResult> { - let opts: ClientOptions = config.try_into()?; runtime_ref.runtime.assert_same_process("create client")?; + let metrics_meter = runtime_ref + .runtime + .core + .read()? + .telemetry() + .get_temporal_metric_meter(); + let opts = config.into_connection_options(metrics_meter)?; let runtime = runtime_ref.runtime.clone(); runtime_ref.runtime.future_into_py(py, async move { Ok(ClientRef { - retry_client: opts - .connect_no_namespace(runtime.core.telemetry().get_temporal_metric_meter()) + connection: Connection::connect(opts) .await .map_err(|err| PyRuntimeError::new_err(format!("Failed client connect: {err}")))?, runtime, @@ -107,11 +131,16 @@ pub fn connect_client<'a>( #[macro_export] macro_rules! rpc_call { - ($retry_client:ident, $call:ident, $trait:tt, $call_name:ident) => { + ($connection:ident, $call:ident, $trait:tt, $service_method:ident, $call_name:ident) => { if $call.retry { - rpc_resp($trait::$call_name(&mut $retry_client, rpc_req($call)?).await) + rpc_resp($trait::$call_name(&mut $connection, rpc_req($call)?).await) } else { - rpc_resp($trait::$call_name(&mut $retry_client.into_inner(), rpc_req($call)?).await) + rpc_resp( + $connection + .$service_method() + .$call_name(rpc_req($call)?) + .await, + ) } }; } @@ -121,12 +150,10 @@ impl ClientRef { fn update_metadata(&self, headers: HashMap) -> PyResult<()> { let (ascii_headers, binary_headers) = partition_headers(headers); - self.retry_client - .get_client() + self.connection .set_headers(ascii_headers) .map_err(|err| PyValueError::new_err(err.to_string()))?; - self.retry_client - .get_client() + self.connection .set_binary_headers(binary_headers) .map_err(|err| PyValueError::new_err(err.to_string()))?; @@ -134,7 +161,7 @@ impl ClientRef { } fn update_api_key(&self, api_key: Option) { - self.retry_client.get_client().set_api_key(api_key); + self.connection.set_api_key(api_key); } } @@ -184,7 +211,7 @@ where match res { Ok(resp) => Ok(resp.get_ref().encode_to_vec()), Err(err) => { - Python::with_gil(move |py| { + Python::attach(move |py| { // Create tuple of "status", "message", and optional "details" let code = err.code() as u32; let message = err.message().to_owned(); @@ -224,34 +251,64 @@ fn partition_headers( (ascii_headers, binary_headers) } -impl TryFrom for ClientOptions { - type Error = PyErr; +impl ClientConfig { + fn into_connection_options( + self, + metrics_meter: Option, + ) -> PyResult { + let (ascii_headers, binary_headers) = partition_headers(self.metadata); + let has_proxy = self.http_connect_proxy_config.is_some(); + // Core rejects DNS load balancing alongside an HTTP CONNECT proxy, so + // suppress DNS LB whenever a proxy is configured to keep the + // pre-existing behavior even if a caller leaves the default. + let dns_load_balancing = if has_proxy { + warn!("Disabling DNS load balancing because http_connect_proxy_config is set"); + None + } else { + self.dns_load_balancing_config.map(Into::into) + }; + let conn_opts = ConnectionOptions::new( + Url::parse(&self.target_url) + .map_err(|err| PyValueError::new_err(format!("invalid target URL: {err}")))?, + ) + .client_name(self.client_name) + .client_version(self.client_version) + .identity(self.identity) + .retry_options( + self.retry_config + .map_or(RetryOptions::default(), |c| c.into()), + ) + .keep_alive(self.keep_alive_config.map(Into::into)) + .maybe_connect_timeout(self.connect_timeout_millis.map(Duration::from_millis)) + .maybe_http_connect_proxy(self.http_connect_proxy_config.map(Into::into)) + .dns_load_balancing(dns_load_balancing) + .grpc_compression(grpc_compression_from_str(&self.grpc_compression)?) + .payload_limits( + temporalio_client::PayloadLimitsOptions::builder() + .payloads_warn_size(self.payloads_warn_size) + .memo_warn_size(self.memo_warn_size) + .build(), + ) + .headers(ascii_headers) + .binary_headers(binary_headers) + .maybe_api_key(self.api_key) + .maybe_tls_options(if let Some(tls_config) = self.tls_config { + Some(tls_config.try_into()?) + } else { + None + }) + .maybe_metrics_meter(metrics_meter); + Ok(conn_opts.build()) + } +} - fn try_from(opts: ClientConfig) -> PyResult { - let (ascii_headers, binary_headers) = partition_headers(opts.metadata); - let gateway_opts = ClientOptions::builder() - .target_url( - Url::parse(&opts.target_url) - .map_err(|err| PyValueError::new_err(format!("invalid target URL: {err}")))?, - ) - .client_name(opts.client_name) - .client_version(opts.client_version) - .identity(opts.identity) - .retry_options( - opts.retry_config - .map_or(RetryOptions::default(), |c| c.into()), - ) - .keep_alive(opts.keep_alive_config.map(Into::into)) - .maybe_http_connect_proxy(opts.http_connect_proxy_config.map(Into::into)) - .headers(ascii_headers) - .binary_headers(binary_headers) - .maybe_api_key(opts.api_key) - .maybe_tls_options(if let Some(tls_config) = opts.tls_config { - Some(tls_config.try_into()?) - } else { - None - }); - Ok(gateway_opts.build()) +fn grpc_compression_from_str(value: &str) -> PyResult { + match value { + "none" => Ok(GrpcCompression::None), + "gzip" => Ok(GrpcCompression::Gzip), + _ => Err(PyValueError::new_err(format!( + "invalid grpc_compression: {value}" + ))), } } @@ -259,54 +316,169 @@ impl TryFrom for temporalio_client::TlsOptions { type Error = PyErr; fn try_from(conf: ClientTlsConfig) -> PyResult { - Ok(temporalio_client::TlsOptions { - server_root_ca_cert: conf.server_root_ca_cert, - domain: conf.domain, - client_tls_options: match (conf.client_cert, conf.client_private_key) { - (None, None) => None, - (Some(client_cert), Some(client_private_key)) => { - Some(temporalio_client::ClientTlsOptions { - client_cert, - client_private_key, - }) - } - _ => { - return Err(PyValueError::new_err( - "Must have both client cert and private key or neither", - )) - } - }, - }) + let mut server_root_ca_cert = conf.server_root_ca_cert; + let server_cert_verifier = match conf.verification_server_name { + None => None, + Some(name) => { + // The CA bundle is consumed by the verifier's own root store; a + // custom verifier cannot be combined with roots on the connection. + let ca_cert = server_root_ca_cert.take().ok_or_else(|| { + PyValueError::new_err( + "Must have server root CA cert when verification server name is set", + ) + })?; + Some(fixed_server_name_verifier(&name, &ca_cert)?) + } + }; + let client_tls_options = match (conf.client_cert, conf.client_private_key) { + (None, None) => None, + (Some(client_cert), Some(client_private_key)) => Some( + temporalio_client::ClientTlsOptions::builder() + .client_cert(client_cert) + .client_private_key(client_private_key) + .build(), + ), + _ => { + return Err(PyValueError::new_err( + "Must have both client cert and private key or neither", + )) + } + }; + Ok(temporalio_client::TlsOptions::builder() + .maybe_server_root_ca_cert(server_root_ca_cert) + .maybe_domain(conf.domain) + .maybe_client_tls_options(client_tls_options) + .maybe_server_cert_verifier(server_cert_verifier) + .build()) + } +} + +/// Builds a standard WebPKI verifier over the given root CA bundle that +/// checks the certificate against `verification_server_name` rather than the +/// connection's server name, leaving SNI/`:authority` to follow the +/// connected host (or `domain` when set). +fn fixed_server_name_verifier( + verification_server_name: &str, + ca_cert_pem: &[u8], +) -> PyResult> { + let certs = CertificateDer::pem_slice_iter(ca_cert_pem) + .collect::, _>>() + .map_err(|err| { + PyValueError::new_err(format!("Invalid server root CA cert PEM: {err:?}")) + })?; + // Root loading and provider selection mirror tonic's default (no custom + // verifier) client path: unparsable certificates in the bundle are + // skipped, and the provider is the process default if one is installed, + // else the build's compiled-in provider. Under a `fips` build lib.rs + // installs aws-lc-rs (FIPS) as the process default, so `get_default()` + // returns it and this fallback is not taken; the fallback is still made + // `cfg`-conditional because the `ring` module is absent in a FIPS build + // (`tokio-rustls/ring` off) and would otherwise fail to compile. + let mut roots = RootCertStore::empty(); + roots.add_parsable_certificates(certs); + let provider = CryptoProvider::get_default().cloned().unwrap_or_else(|| { + #[cfg(feature = "fips")] + { + Arc::new(rustls::crypto::aws_lc_rs::default_provider()) + } + #[cfg(not(feature = "fips"))] + { + Arc::new(rustls::crypto::ring::default_provider()) + } + }); + let inner = WebPkiServerVerifier::builder_with_provider(roots.into(), provider) + .build() + .map_err(|err| { + PyValueError::new_err(format!("Failed building certificate verifier: {err}")) + })?; + let server_name = ServerName::try_from(verification_server_name.to_owned()) + .map_err(|err| PyValueError::new_err(format!("Invalid verification server name: {err}")))?; + Ok(Arc::new(FixedServerNameVerifier { inner, server_name })) +} + +/// Delegates to the standard WebPKI verifier, but verifies the certificate +/// against a fixed server name instead of the connection's server name. +#[derive(Debug)] +struct FixedServerNameVerifier { + inner: Arc, + server_name: ServerName<'static>, +} + +impl ServerCertVerifier for FixedServerNameVerifier { + fn verify_server_cert( + &self, + end_entity: &CertificateDer<'_>, + intermediates: &[CertificateDer<'_>], + _server_name: &ServerName<'_>, + ocsp_response: &[u8], + now: UnixTime, + ) -> Result { + self.inner.verify_server_cert( + end_entity, + intermediates, + &self.server_name, + ocsp_response, + now, + ) + } + + fn verify_tls12_signature( + &self, + message: &[u8], + cert: &CertificateDer<'_>, + dss: &DigitallySignedStruct, + ) -> Result { + self.inner.verify_tls12_signature(message, cert, dss) + } + + fn verify_tls13_signature( + &self, + message: &[u8], + cert: &CertificateDer<'_>, + dss: &DigitallySignedStruct, + ) -> Result { + self.inner.verify_tls13_signature(message, cert, dss) + } + + fn supported_verify_schemes(&self) -> Vec { + self.inner.supported_verify_schemes() } } impl From for RetryOptions { fn from(conf: ClientRetryConfig) -> Self { - RetryOptions { - initial_interval: Duration::from_millis(conf.initial_interval_millis), - randomization_factor: conf.randomization_factor, - multiplier: conf.multiplier, - max_interval: Duration::from_millis(conf.max_interval_millis), - max_elapsed_time: conf.max_elapsed_time_millis.map(Duration::from_millis), - max_retries: conf.max_retries, - } + RetryOptions::builder() + .initial_interval(Duration::from_millis(conf.initial_interval_millis)) + .randomization_factor(conf.randomization_factor) + .multiplier(conf.multiplier) + .max_interval(Duration::from_millis(conf.max_interval_millis)) + .max_elapsed_time(conf.max_elapsed_time_millis.map(Duration::from_millis)) + .max_retries(conf.max_retries) + .build() } } impl From for CoreClientKeepAliveConfig { fn from(conf: ClientKeepAliveConfig) -> Self { - CoreClientKeepAliveConfig { - interval: Duration::from_millis(conf.interval_millis), - timeout: Duration::from_millis(conf.timeout_millis), - } + CoreClientKeepAliveConfig::builder() + .interval(Duration::from_millis(conf.interval_millis)) + .timeout(Duration::from_millis(conf.timeout_millis)) + .build() } } impl From for HttpConnectProxyOptions { fn from(conf: ClientHttpConnectProxyConfig) -> Self { - HttpConnectProxyOptions { - target_addr: conf.target_host, - basic_auth: conf.basic_auth, - } + HttpConnectProxyOptions::new(conf.target_host) + .maybe_basic_auth(conf.basic_auth) + .build() + } +} + +impl From for DnsLoadBalancingOptions { + fn from(conf: ClientDnsLoadBalancingConfig) -> Self { + let mut opts = DnsLoadBalancingOptions::default(); + opts.resolution_interval = Duration::from_millis(conf.resolution_interval_millis); + opts } } diff --git a/temporalio/bridge/src/client_rpc_generated.rs b/temporalio/bridge/src/client_rpc_generated.rs index a8674c802b..ea00d4fd51 100644 --- a/temporalio/bridge/src/client_rpc_generated.rs +++ b/temporalio/bridge/src/client_rpc_generated.rs @@ -16,552 +16,1117 @@ impl ClientRef { call: RpcCall, ) -> PyResult> { self.runtime.assert_same_process("use client")?; - use temporalio_client::WorkflowService; - let mut retry_client = self.retry_client.clone(); + use temporalio_client::grpc::WorkflowService; + let mut connection = self.connection.clone(); self.runtime.future_into_py(py, async move { let bytes = match call.rpc.as_str() { + "count_activity_executions" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + count_activity_executions + ) + } + "count_nexus_operation_executions" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + count_nexus_operation_executions + ) + } + "count_schedules" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + count_schedules + ) + } + "count_workers" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + count_workers + ) + } "count_workflow_executions" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, count_workflow_executions ) } "create_schedule" => { - rpc_call!(retry_client, call, WorkflowService, create_schedule) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + create_schedule + ) + } + "create_worker_deployment" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + create_worker_deployment + ) + } + "create_worker_deployment_version" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + create_worker_deployment_version + ) } "create_workflow_rule" => { - rpc_call!(retry_client, call, WorkflowService, create_workflow_rule) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + create_workflow_rule + ) + } + "delete_activity_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + delete_activity_execution + ) + } + "delete_nexus_operation_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + delete_nexus_operation_execution + ) } "delete_schedule" => { - rpc_call!(retry_client, call, WorkflowService, delete_schedule) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + delete_schedule + ) } "delete_worker_deployment" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, delete_worker_deployment ) } "delete_worker_deployment_version" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, delete_worker_deployment_version ) } "delete_workflow_execution" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, delete_workflow_execution ) } "delete_workflow_rule" => { - rpc_call!(retry_client, call, WorkflowService, delete_workflow_rule) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + delete_workflow_rule + ) } "deprecate_namespace" => { - rpc_call!(retry_client, call, WorkflowService, deprecate_namespace) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + deprecate_namespace + ) + } + "describe_activity_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + describe_activity_execution + ) } "describe_batch_operation" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, describe_batch_operation ) } "describe_deployment" => { - rpc_call!(retry_client, call, WorkflowService, describe_deployment) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + describe_deployment + ) } "describe_namespace" => { - rpc_call!(retry_client, call, WorkflowService, describe_namespace) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + describe_namespace + ) + } + "describe_nexus_operation_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + describe_nexus_operation_execution + ) } "describe_schedule" => { - rpc_call!(retry_client, call, WorkflowService, describe_schedule) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + describe_schedule + ) } "describe_task_queue" => { - rpc_call!(retry_client, call, WorkflowService, describe_task_queue) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + describe_task_queue + ) } "describe_worker" => { - rpc_call!(retry_client, call, WorkflowService, describe_worker) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + describe_worker + ) } "describe_worker_deployment" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, describe_worker_deployment ) } "describe_worker_deployment_version" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, describe_worker_deployment_version ) } "describe_workflow_execution" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, describe_workflow_execution ) } "describe_workflow_rule" => { - rpc_call!(retry_client, call, WorkflowService, describe_workflow_rule) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + describe_workflow_rule + ) } "execute_multi_operation" => { - rpc_call!(retry_client, call, WorkflowService, execute_multi_operation) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + execute_multi_operation + ) } "fetch_worker_config" => { - rpc_call!(retry_client, call, WorkflowService, fetch_worker_config) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + fetch_worker_config + ) } "get_cluster_info" => { - rpc_call!(retry_client, call, WorkflowService, get_cluster_info) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + get_cluster_info + ) } "get_current_deployment" => { - rpc_call!(retry_client, call, WorkflowService, get_current_deployment) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + get_current_deployment + ) } "get_deployment_reachability" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, get_deployment_reachability ) } "get_search_attributes" => { - rpc_call!(retry_client, call, WorkflowService, get_search_attributes) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + get_search_attributes + ) } "get_system_info" => { - rpc_call!(retry_client, call, WorkflowService, get_system_info) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + get_system_info + ) } "get_worker_build_id_compatibility" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, get_worker_build_id_compatibility ) } "get_worker_task_reachability" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, get_worker_task_reachability ) } "get_worker_versioning_rules" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, get_worker_versioning_rules ) } "get_workflow_execution_history" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, get_workflow_execution_history ) } "get_workflow_execution_history_reverse" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, get_workflow_execution_history_reverse ) } + "list_activity_executions" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + list_activity_executions + ) + } "list_archived_workflow_executions" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, list_archived_workflow_executions ) } "list_batch_operations" => { - rpc_call!(retry_client, call, WorkflowService, list_batch_operations) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + list_batch_operations + ) } "list_closed_workflow_executions" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, list_closed_workflow_executions ) } "list_deployments" => { - rpc_call!(retry_client, call, WorkflowService, list_deployments) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + list_deployments + ) } "list_namespaces" => { - rpc_call!(retry_client, call, WorkflowService, list_namespaces) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + list_namespaces + ) + } + "list_nexus_operation_executions" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + list_nexus_operation_executions + ) } "list_open_workflow_executions" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, list_open_workflow_executions ) } "list_schedule_matching_times" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, list_schedule_matching_times ) } "list_schedules" => { - rpc_call!(retry_client, call, WorkflowService, list_schedules) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + list_schedules + ) } "list_task_queue_partitions" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, list_task_queue_partitions ) } "list_worker_deployments" => { - rpc_call!(retry_client, call, WorkflowService, list_worker_deployments) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + list_worker_deployments + ) } "list_workers" => { - rpc_call!(retry_client, call, WorkflowService, list_workers) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + list_workers + ) } "list_workflow_executions" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, list_workflow_executions ) } "list_workflow_rules" => { - rpc_call!(retry_client, call, WorkflowService, list_workflow_rules) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + list_workflow_rules + ) } "patch_schedule" => { - rpc_call!(retry_client, call, WorkflowService, patch_schedule) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + patch_schedule + ) } "pause_activity" => { - rpc_call!(retry_client, call, WorkflowService, pause_activity) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + pause_activity + ) + } + "pause_activity_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + pause_activity_execution + ) + } + "pause_workflow_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + pause_workflow_execution + ) + } + "poll_activity_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + poll_activity_execution + ) } "poll_activity_task_queue" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, poll_activity_task_queue ) } + "poll_nexus_operation_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + poll_nexus_operation_execution + ) + } "poll_nexus_task_queue" => { - rpc_call!(retry_client, call, WorkflowService, poll_nexus_task_queue) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + poll_nexus_task_queue + ) + } + "poll_workflow_execution_time_skipping" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + poll_workflow_execution_time_skipping + ) } "poll_workflow_execution_update" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, poll_workflow_execution_update ) } "poll_workflow_task_queue" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, poll_workflow_task_queue ) } "query_workflow" => { - rpc_call!(retry_client, call, WorkflowService, query_workflow) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + query_workflow + ) } "record_activity_task_heartbeat" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, record_activity_task_heartbeat ) } "record_activity_task_heartbeat_by_id" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, record_activity_task_heartbeat_by_id ) } "record_worker_heartbeat" => { - rpc_call!(retry_client, call, WorkflowService, record_worker_heartbeat) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + record_worker_heartbeat + ) } "register_namespace" => { - rpc_call!(retry_client, call, WorkflowService, register_namespace) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + register_namespace + ) + } + "request_cancel_activity_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + request_cancel_activity_execution + ) + } + "request_cancel_nexus_operation_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + request_cancel_nexus_operation_execution + ) } "request_cancel_workflow_execution" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, request_cancel_workflow_execution ) } "reset_activity" => { - rpc_call!(retry_client, call, WorkflowService, reset_activity) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + reset_activity + ) + } + "reset_activity_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + reset_activity_execution + ) } "reset_sticky_task_queue" => { - rpc_call!(retry_client, call, WorkflowService, reset_sticky_task_queue) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + reset_sticky_task_queue + ) } "reset_workflow_execution" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, reset_workflow_execution ) } "respond_activity_task_canceled" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_activity_task_canceled ) } "respond_activity_task_canceled_by_id" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_activity_task_canceled_by_id ) } "respond_activity_task_completed" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_activity_task_completed ) } "respond_activity_task_completed_by_id" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_activity_task_completed_by_id ) } "respond_activity_task_failed" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_activity_task_failed ) } "respond_activity_task_failed_by_id" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_activity_task_failed_by_id ) } "respond_nexus_task_completed" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_nexus_task_completed ) } "respond_nexus_task_failed" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_nexus_task_failed ) } "respond_query_task_completed" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_query_task_completed ) } "respond_workflow_task_completed" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_workflow_task_completed ) } "respond_workflow_task_failed" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, respond_workflow_task_failed ) } "scan_workflow_executions" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, scan_workflow_executions ) } "set_current_deployment" => { - rpc_call!(retry_client, call, WorkflowService, set_current_deployment) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + set_current_deployment + ) } "set_worker_deployment_current_version" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, set_worker_deployment_current_version ) } "set_worker_deployment_manager" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, set_worker_deployment_manager ) } "set_worker_deployment_ramping_version" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, set_worker_deployment_ramping_version ) } "shutdown_worker" => { - rpc_call!(retry_client, call, WorkflowService, shutdown_worker) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + shutdown_worker + ) } "signal_with_start_workflow_execution" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, signal_with_start_workflow_execution ) } "signal_workflow_execution" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, signal_workflow_execution ) } + "start_activity_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + start_activity_execution + ) + } "start_batch_operation" => { - rpc_call!(retry_client, call, WorkflowService, start_batch_operation) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + start_batch_operation + ) + } + "start_nexus_operation_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + start_nexus_operation_execution + ) } "start_workflow_execution" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, start_workflow_execution ) } "stop_batch_operation" => { - rpc_call!(retry_client, call, WorkflowService, stop_batch_operation) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + stop_batch_operation + ) } - "terminate_workflow_execution" => { + "terminate_activity_execution" => { rpc_call!( - retry_client, + connection, call, WorkflowService, - terminate_workflow_execution + workflow_service, + terminate_activity_execution + ) + } + "terminate_nexus_operation_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + terminate_nexus_operation_execution + ) + } + "terminate_workflow_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + terminate_workflow_execution ) } "trigger_workflow_rule" => { - rpc_call!(retry_client, call, WorkflowService, trigger_workflow_rule) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + trigger_workflow_rule + ) } "unpause_activity" => { - rpc_call!(retry_client, call, WorkflowService, unpause_activity) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + unpause_activity + ) + } + "unpause_activity_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + unpause_activity_execution + ) + } + "unpause_workflow_execution" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + unpause_workflow_execution + ) + } + "update_activity_execution_options" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + update_activity_execution_options + ) } "update_activity_options" => { - rpc_call!(retry_client, call, WorkflowService, update_activity_options) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + update_activity_options + ) } "update_namespace" => { - rpc_call!(retry_client, call, WorkflowService, update_namespace) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + update_namespace + ) } "update_schedule" => { - rpc_call!(retry_client, call, WorkflowService, update_schedule) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + update_schedule + ) } "update_task_queue_config" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, update_task_queue_config ) } "update_worker_build_id_compatibility" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, update_worker_build_id_compatibility ) } "update_worker_config" => { - rpc_call!(retry_client, call, WorkflowService, update_worker_config) + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + update_worker_config + ) + } + "update_worker_deployment_version_compute_config" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + update_worker_deployment_version_compute_config + ) } "update_worker_deployment_version_metadata" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, update_worker_deployment_version_metadata ) } "update_worker_versioning_rules" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, update_worker_versioning_rules ) } "update_workflow_execution" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, update_workflow_execution ) } "update_workflow_execution_options" => { rpc_call!( - retry_client, + connection, call, WorkflowService, + workflow_service, update_workflow_execution_options ) } + "validate_worker_deployment_version_compute_config" => { + rpc_call!( + connection, + call, + WorkflowService, + workflow_service, + validate_worker_deployment_version_compute_config + ) + } _ => { return Err(PyValueError::new_err(format!( "Unknown RPC call {}", @@ -579,55 +1144,117 @@ impl ClientRef { call: RpcCall, ) -> PyResult> { self.runtime.assert_same_process("use client")?; - use temporalio_client::OperatorService; - let mut retry_client = self.retry_client.clone(); + use temporalio_client::grpc::OperatorService; + let mut connection = self.connection.clone(); self.runtime.future_into_py(py, async move { let bytes = match call.rpc.as_str() { "add_or_update_remote_cluster" => { rpc_call!( - retry_client, + connection, call, OperatorService, + operator_service, add_or_update_remote_cluster ) } "add_search_attributes" => { - rpc_call!(retry_client, call, OperatorService, add_search_attributes) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + add_search_attributes + ) } "create_nexus_endpoint" => { - rpc_call!(retry_client, call, OperatorService, create_nexus_endpoint) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + create_nexus_endpoint + ) } "delete_namespace" => { - rpc_call!(retry_client, call, OperatorService, delete_namespace) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + delete_namespace + ) } "delete_nexus_endpoint" => { - rpc_call!(retry_client, call, OperatorService, delete_nexus_endpoint) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + delete_nexus_endpoint + ) } "get_nexus_endpoint" => { - rpc_call!(retry_client, call, OperatorService, get_nexus_endpoint) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + get_nexus_endpoint + ) } "list_clusters" => { - rpc_call!(retry_client, call, OperatorService, list_clusters) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + list_clusters + ) } "list_nexus_endpoints" => { - rpc_call!(retry_client, call, OperatorService, list_nexus_endpoints) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + list_nexus_endpoints + ) } "list_search_attributes" => { - rpc_call!(retry_client, call, OperatorService, list_search_attributes) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + list_search_attributes + ) } "remove_remote_cluster" => { - rpc_call!(retry_client, call, OperatorService, remove_remote_cluster) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + remove_remote_cluster + ) } "remove_search_attributes" => { rpc_call!( - retry_client, + connection, call, OperatorService, + operator_service, remove_search_attributes ) } "update_nexus_endpoint" => { - rpc_call!(retry_client, call, OperatorService, update_nexus_endpoint) + rpc_call!( + connection, + call, + OperatorService, + operator_service, + update_nexus_endpoint + ) } _ => { return Err(PyValueError::new_err(format!( @@ -642,221 +1269,619 @@ impl ClientRef { fn call_cloud_service<'p>(&self, py: Python<'p>, call: RpcCall) -> PyResult> { self.runtime.assert_same_process("use client")?; - use temporalio_client::CloudService; - let mut retry_client = self.retry_client.clone(); + use temporalio_client::grpc::CloudService; + let mut connection = self.connection.clone(); self.runtime.future_into_py(py, async move { let bytes = match call.rpc.as_str() { "add_namespace_region" => { - rpc_call!(retry_client, call, CloudService, add_namespace_region) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + add_namespace_region + ) } "add_user_group_member" => { - rpc_call!(retry_client, call, CloudService, add_user_group_member) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + add_user_group_member + ) + } + "create_account_audit_log_sink" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + create_account_audit_log_sink + ) } "create_api_key" => { - rpc_call!(retry_client, call, CloudService, create_api_key) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + create_api_key + ) + } + "create_billing_report" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + create_billing_report + ) } "create_connectivity_rule" => { - rpc_call!(retry_client, call, CloudService, create_connectivity_rule) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + create_connectivity_rule + ) + } + "create_custom_role" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + create_custom_role + ) } "create_namespace" => { - rpc_call!(retry_client, call, CloudService, create_namespace) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + create_namespace + ) } "create_namespace_export_sink" => { rpc_call!( - retry_client, + connection, call, CloudService, + cloud_service, create_namespace_export_sink ) } "create_nexus_endpoint" => { - rpc_call!(retry_client, call, CloudService, create_nexus_endpoint) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + create_nexus_endpoint + ) } "create_service_account" => { - rpc_call!(retry_client, call, CloudService, create_service_account) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + create_service_account + ) } "create_user" => { - rpc_call!(retry_client, call, CloudService, create_user) + rpc_call!(connection, call, CloudService, cloud_service, create_user) } "create_user_group" => { - rpc_call!(retry_client, call, CloudService, create_user_group) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + create_user_group + ) + } + "delete_account_audit_log_sink" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + delete_account_audit_log_sink + ) } "delete_api_key" => { - rpc_call!(retry_client, call, CloudService, delete_api_key) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + delete_api_key + ) } "delete_connectivity_rule" => { - rpc_call!(retry_client, call, CloudService, delete_connectivity_rule) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + delete_connectivity_rule + ) + } + "delete_custom_role" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + delete_custom_role + ) } "delete_namespace" => { - rpc_call!(retry_client, call, CloudService, delete_namespace) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + delete_namespace + ) } "delete_namespace_export_sink" => { rpc_call!( - retry_client, + connection, call, CloudService, + cloud_service, delete_namespace_export_sink ) } "delete_namespace_region" => { - rpc_call!(retry_client, call, CloudService, delete_namespace_region) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + delete_namespace_region + ) } "delete_nexus_endpoint" => { - rpc_call!(retry_client, call, CloudService, delete_nexus_endpoint) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + delete_nexus_endpoint + ) } "delete_service_account" => { - rpc_call!(retry_client, call, CloudService, delete_service_account) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + delete_service_account + ) } "delete_user" => { - rpc_call!(retry_client, call, CloudService, delete_user) + rpc_call!(connection, call, CloudService, cloud_service, delete_user) } "delete_user_group" => { - rpc_call!(retry_client, call, CloudService, delete_user_group) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + delete_user_group + ) } "failover_namespace_region" => { - rpc_call!(retry_client, call, CloudService, failover_namespace_region) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + failover_namespace_region + ) } "get_account" => { - rpc_call!(retry_client, call, CloudService, get_account) + rpc_call!(connection, call, CloudService, cloud_service, get_account) + } + "get_account_audit_log_sink" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_account_audit_log_sink + ) + } + "get_account_audit_log_sinks" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_account_audit_log_sinks + ) } "get_api_key" => { - rpc_call!(retry_client, call, CloudService, get_api_key) + rpc_call!(connection, call, CloudService, cloud_service, get_api_key) } "get_api_keys" => { - rpc_call!(retry_client, call, CloudService, get_api_keys) + rpc_call!(connection, call, CloudService, cloud_service, get_api_keys) } "get_async_operation" => { - rpc_call!(retry_client, call, CloudService, get_async_operation) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_async_operation + ) + } + "get_audit_logs" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_audit_logs + ) + } + "get_billing_report" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_billing_report + ) } "get_connectivity_rule" => { - rpc_call!(retry_client, call, CloudService, get_connectivity_rule) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_connectivity_rule + ) } "get_connectivity_rules" => { - rpc_call!(retry_client, call, CloudService, get_connectivity_rules) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_connectivity_rules + ) + } + "get_current_identity" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_current_identity + ) + } + "get_custom_role" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_custom_role + ) + } + "get_custom_roles" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_custom_roles + ) } "get_namespace" => { - rpc_call!(retry_client, call, CloudService, get_namespace) + rpc_call!(connection, call, CloudService, cloud_service, get_namespace) + } + "get_namespace_capacity_info" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_namespace_capacity_info + ) } "get_namespace_export_sink" => { - rpc_call!(retry_client, call, CloudService, get_namespace_export_sink) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_namespace_export_sink + ) } "get_namespace_export_sinks" => { - rpc_call!(retry_client, call, CloudService, get_namespace_export_sinks) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_namespace_export_sinks + ) } "get_namespaces" => { - rpc_call!(retry_client, call, CloudService, get_namespaces) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_namespaces + ) } "get_nexus_endpoint" => { - rpc_call!(retry_client, call, CloudService, get_nexus_endpoint) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_nexus_endpoint + ) } "get_nexus_endpoints" => { - rpc_call!(retry_client, call, CloudService, get_nexus_endpoints) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_nexus_endpoints + ) } "get_region" => { - rpc_call!(retry_client, call, CloudService, get_region) + rpc_call!(connection, call, CloudService, cloud_service, get_region) } "get_regions" => { - rpc_call!(retry_client, call, CloudService, get_regions) + rpc_call!(connection, call, CloudService, cloud_service, get_regions) } "get_service_account" => { - rpc_call!(retry_client, call, CloudService, get_service_account) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_service_account + ) + } + "get_service_account_namespace_assignments" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_service_account_namespace_assignments + ) } "get_service_accounts" => { - rpc_call!(retry_client, call, CloudService, get_service_accounts) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_service_accounts + ) } "get_usage" => { - rpc_call!(retry_client, call, CloudService, get_usage) + rpc_call!(connection, call, CloudService, cloud_service, get_usage) } "get_user" => { - rpc_call!(retry_client, call, CloudService, get_user) + rpc_call!(connection, call, CloudService, cloud_service, get_user) } "get_user_group" => { - rpc_call!(retry_client, call, CloudService, get_user_group) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_user_group + ) } "get_user_group_members" => { - rpc_call!(retry_client, call, CloudService, get_user_group_members) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_user_group_members + ) + } + "get_user_group_namespace_assignments" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_user_group_namespace_assignments + ) } "get_user_groups" => { - rpc_call!(retry_client, call, CloudService, get_user_groups) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_user_groups + ) + } + "get_user_namespace_assignments" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + get_user_namespace_assignments + ) } "get_users" => { - rpc_call!(retry_client, call, CloudService, get_users) + rpc_call!(connection, call, CloudService, cloud_service, get_users) } "remove_user_group_member" => { - rpc_call!(retry_client, call, CloudService, remove_user_group_member) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + remove_user_group_member + ) } "rename_custom_search_attribute" => { rpc_call!( - retry_client, + connection, call, CloudService, + cloud_service, rename_custom_search_attribute ) } "set_service_account_namespace_access" => { rpc_call!( - retry_client, + connection, call, CloudService, + cloud_service, set_service_account_namespace_access ) } "set_user_group_namespace_access" => { rpc_call!( - retry_client, + connection, call, CloudService, + cloud_service, set_user_group_namespace_access ) } "set_user_namespace_access" => { - rpc_call!(retry_client, call, CloudService, set_user_namespace_access) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + set_user_namespace_access + ) } "update_account" => { - rpc_call!(retry_client, call, CloudService, update_account) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + update_account + ) + } + "update_account_audit_log_sink" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + update_account_audit_log_sink + ) } "update_api_key" => { - rpc_call!(retry_client, call, CloudService, update_api_key) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + update_api_key + ) + } + "update_custom_role" => { + rpc_call!( + connection, + call, + CloudService, + cloud_service, + update_custom_role + ) } "update_namespace" => { - rpc_call!(retry_client, call, CloudService, update_namespace) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + update_namespace + ) } "update_namespace_export_sink" => { rpc_call!( - retry_client, + connection, call, CloudService, + cloud_service, update_namespace_export_sink ) } "update_namespace_tags" => { - rpc_call!(retry_client, call, CloudService, update_namespace_tags) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + update_namespace_tags + ) } "update_nexus_endpoint" => { - rpc_call!(retry_client, call, CloudService, update_nexus_endpoint) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + update_nexus_endpoint + ) } "update_service_account" => { - rpc_call!(retry_client, call, CloudService, update_service_account) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + update_service_account + ) } "update_user" => { - rpc_call!(retry_client, call, CloudService, update_user) + rpc_call!(connection, call, CloudService, cloud_service, update_user) } "update_user_group" => { - rpc_call!(retry_client, call, CloudService, update_user_group) + rpc_call!( + connection, + call, + CloudService, + cloud_service, + update_user_group + ) } "validate_account_audit_log_sink" => { rpc_call!( - retry_client, + connection, call, CloudService, + cloud_service, validate_account_audit_log_sink ) } "validate_namespace_export_sink" => { rpc_call!( - retry_client, + connection, call, CloudService, + cloud_service, validate_namespace_export_sink ) } @@ -873,30 +1898,49 @@ impl ClientRef { fn call_test_service<'p>(&self, py: Python<'p>, call: RpcCall) -> PyResult> { self.runtime.assert_same_process("use client")?; - use temporalio_client::TestService; - let mut retry_client = self.retry_client.clone(); + use temporalio_client::grpc::TestService; + let mut connection = self.connection.clone(); self.runtime.future_into_py(py, async move { let bytes = match call.rpc.as_str() { "get_current_time" => { - rpc_call!(retry_client, call, TestService, get_current_time) + rpc_call!( + connection, + call, + TestService, + test_service, + get_current_time + ) } "lock_time_skipping" => { - rpc_call!(retry_client, call, TestService, lock_time_skipping) + rpc_call!( + connection, + call, + TestService, + test_service, + lock_time_skipping + ) } "sleep" => { - rpc_call!(retry_client, call, TestService, sleep) + rpc_call!(connection, call, TestService, test_service, sleep) } "sleep_until" => { - rpc_call!(retry_client, call, TestService, sleep_until) + rpc_call!(connection, call, TestService, test_service, sleep_until) } "unlock_time_skipping" => { - rpc_call!(retry_client, call, TestService, unlock_time_skipping) + rpc_call!( + connection, + call, + TestService, + test_service, + unlock_time_skipping + ) } "unlock_time_skipping_with_sleep" => { rpc_call!( - retry_client, + connection, call, TestService, + test_service, unlock_time_skipping_with_sleep ) } @@ -913,12 +1957,12 @@ impl ClientRef { fn call_health_service<'p>(&self, py: Python<'p>, call: RpcCall) -> PyResult> { self.runtime.assert_same_process("use client")?; - use temporalio_client::HealthService; - let mut retry_client = self.retry_client.clone(); + use temporalio_client::grpc::HealthService; + let mut connection = self.connection.clone(); self.runtime.future_into_py(py, async move { let bytes = match call.rpc.as_str() { "check" => { - rpc_call!(retry_client, call, HealthService, check) + rpc_call!(connection, call, HealthService, health_service, check) } _ => { return Err(PyValueError::new_err(format!( diff --git a/temporalio/bridge/src/envconfig.rs b/temporalio/bridge/src/envconfig.rs index fb0da290c3..a21bb935a2 100644 --- a/temporalio/bridge/src/envconfig.rs +++ b/temporalio/bridge/src/envconfig.rs @@ -1,12 +1,12 @@ use pyo3::prelude::*; use pyo3::{ exceptions::PyRuntimeError, - types::{PyBytes, PyDict}, + types::{PyBytes, PyDict, PyList}, }; use std::collections::HashMap; use temporalio_common::envconfig::{ load_client_config as core_load_client_config, - load_client_config_profile as core_load_client_config_profile, + load_client_config_profile as core_load_client_config_profile, toml, ClientConfig as CoreClientConfig, ClientConfigCodec, ClientConfigProfile as CoreClientConfigProfile, ClientConfigTLS as CoreClientConfigTLS, DataSource, LoadClientConfigOptions, LoadClientConfigProfileOptions, @@ -14,16 +14,21 @@ use temporalio_common::envconfig::{ pyo3::create_exception!(temporal_sdk_bridge, ConfigError, PyRuntimeError); -fn data_source_to_dict(py: Python, ds: &DataSource) -> PyResult { +fn data_source_to_dict(py: Python, ds: &DataSource) -> PyResult> { let dict = PyDict::new(py); match ds { DataSource::Path(p) => dict.set_item("path", p)?, DataSource::Data(d) => dict.set_item("data", PyBytes::new(py, d))?, + _ => { + return Err(PyRuntimeError::new_err( + "unsupported configuration data source", + )) + } }; Ok(dict.into()) } -fn tls_to_dict(py: Python, tls: &CoreClientConfigTLS) -> PyResult { +fn tls_to_dict(py: Python, tls: &CoreClientConfigTLS) -> PyResult> { let dict = PyDict::new(py); dict.set_item("disabled", tls.disabled)?; if let Some(v) = &tls.client_cert { @@ -42,7 +47,7 @@ fn tls_to_dict(py: Python, tls: &CoreClientConfigTLS) -> PyResult { Ok(dict.into()) } -fn codec_to_dict(py: Python, codec: &ClientConfigCodec) -> PyResult { +fn codec_to_dict(py: Python, codec: &ClientConfigCodec) -> PyResult> { let dict = PyDict::new(py); if let Some(v) = &codec.endpoint { dict.set_item("endpoint", v)?; @@ -53,7 +58,7 @@ fn codec_to_dict(py: Python, codec: &ClientConfigCodec) -> PyResult { Ok(dict.into()) } -fn profile_to_dict(py: Python, profile: &CoreClientConfigProfile) -> PyResult { +fn profile_to_dict(py: Python, profile: &CoreClientConfigProfile) -> PyResult> { let dict = PyDict::new(py); if let Some(v) = &profile.address { dict.set_item("address", v)?; @@ -73,10 +78,82 @@ fn profile_to_dict(py: Python, profile: &CoreClientConfigProfile) -> PyResult PyResult> { + let dict = PyDict::new(py); + for (k, v) in table { + dict.set_item(k, toml_value_to_py(py, v)?)?; + } Ok(dict.into()) } -fn core_config_to_dict(py: Python, core_config: &CoreClientConfig) -> PyResult { +// Values are converted the same way as by Python's tomllib. +fn toml_value_to_py(py: Python, value: &toml::Value) -> PyResult> { + Ok(match value { + toml::Value::String(s) => s.into_pyobject(py)?.into_any().unbind(), + toml::Value::Integer(i) => i.into_pyobject(py)?.into_any().unbind(), + toml::Value::Float(f) => f.into_pyobject(py)?.into_any().unbind(), + toml::Value::Boolean(b) => b.into_pyobject(py)?.to_owned().into_any().unbind(), + toml::Value::Datetime(dt) => toml_datetime_to_py(py, dt)?, + toml::Value::Array(a) => { + let list = PyList::empty(py); + for v in a { + list.append(toml_value_to_py(py, v)?)?; + } + list.into_any().unbind() + } + toml::Value::Table(t) => toml_table_to_py(py, t)?, + }) +} + +// Offset datetimes become aware datetimes, local datetimes become naive datetimes, local dates +// become dates, and local times become times. Fractional seconds are truncated to microseconds. +// Built via the datetime module since the datetime C API isn't part of the limited API. +fn toml_datetime_to_py(py: Python, dt: &toml::value::Datetime) -> PyResult> { + let datetime = py.import("datetime")?; + let time = dt.time.map(|t| { + ( + t.hour, + t.minute, + t.second.unwrap_or(0), + t.nanosecond.unwrap_or(0) / 1000, + ) + }); + let obj = match (dt.date, time) { + (Some(d), Some((hour, minute, second, micros))) => { + let tz = match dt.offset { + None => py.None().into_bound(py), + Some(toml::value::Offset::Z) => datetime.getattr("timezone")?.getattr("utc")?, + Some(toml::value::Offset::Custom { minutes }) => { + let delta = datetime + .getattr("timedelta")? + .call1((0, i32::from(minutes) * 60))?; + datetime.getattr("timezone")?.call1((delta,))? + } + }; + datetime + .getattr("datetime")? + .call1((d.year, d.month, d.day, hour, minute, second, micros, tz))? + } + (Some(d), None) => datetime.getattr("date")?.call1((d.year, d.month, d.day))?, + (None, Some((hour, minute, second, micros))) => datetime + .getattr("time")? + .call1((hour, minute, second, micros))?, + (None, None) => return Err(PyRuntimeError::new_err("empty TOML datetime")), + }; + Ok(obj.unbind()) +} + +fn core_config_to_dict(py: Python, core_config: &CoreClientConfig) -> PyResult> { let profiles_dict = PyDict::new(py); for (name, profile) in &core_config.profiles { let connect_dict = profile_to_dict(py, profile)?; @@ -90,11 +167,11 @@ fn load_client_config_inner( config_source: Option, config_file_strict: bool, env_vars: Option>, -) -> PyResult { - let options = LoadClientConfigOptions { - config_source, - config_file_strict, - }; +) -> PyResult> { + let options = LoadClientConfigOptions::builder() + .maybe_config_source(config_source) + .config_file_strict(config_file_strict) + .build(); let core_config = core_load_client_config(options, env_vars.as_ref()) .map_err(|e| ConfigError::new_err(format!("{e}")))?; @@ -109,14 +186,14 @@ fn load_client_connect_config_inner( disable_env: bool, config_file_strict: bool, env_vars: Option>, -) -> PyResult { - let options = LoadClientConfigProfileOptions { - config_source, - config_file_profile: profile, - config_file_strict, - disable_file, - disable_env, - }; +) -> PyResult> { + let options = LoadClientConfigProfileOptions::builder() + .maybe_config_source(config_source) + .maybe_config_file_profile(profile) + .config_file_strict(config_file_strict) + .disable_file(disable_file) + .disable_env(disable_env) + .build(); let profile = core_load_client_config_profile(options, env_vars.as_ref()) .map_err(|e| ConfigError::new_err(format!("{e}")))?; @@ -132,7 +209,7 @@ pub fn load_client_config( data: Option>, config_file_strict: bool, env_vars: Option>, -) -> PyResult { +) -> PyResult> { let config_source = match (path, data) { (Some(p), None) => Some(DataSource::Path(p)), (None, Some(d)) => Some(DataSource::Data(d)), @@ -158,7 +235,7 @@ pub fn load_client_connect_config( disable_env: bool, config_file_strict: bool, env_vars: Option>, -) -> PyResult { +) -> PyResult> { let config_source = match (path, data) { (Some(p), None) => Some(DataSource::Path(p)), (None, Some(d)) => Some(DataSource::Data(d)), diff --git a/temporalio/bridge/src/lib.rs b/temporalio/bridge/src/lib.rs index ee157fb186..cf96c7817a 100644 --- a/temporalio/bridge/src/lib.rs +++ b/temporalio/bridge/src/lib.rs @@ -11,6 +11,19 @@ mod worker; #[pymodule] fn temporal_sdk_bridge(py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { + // Lets ops assert at runtime that the FIPS wheel is actually loaded, e.g. + // `temporalio.bridge.temporal_sdk_bridge.FIPS is True`. Mirrors sdk-ruby PR #466. + m.add("FIPS", cfg!(feature = "fips"))?; + + // Under a FIPS build, install aws-lc-rs (FIPS mode) as the process-wide + // rustls provider before any client is constructed. This makes + // CryptoProvider::get_default() resolve to aws-lc-rs everywhere (including + // the custom verifier in client.rs), so no `ring` provider is ever used. + #[cfg(feature = "fips")] + { + let _ = tokio_rustls::rustls::crypto::aws_lc_rs::default_provider().install_default(); + } + // Client stuff m.add("RPCError", py.get_type::())?; m.add_class::()?; @@ -34,6 +47,10 @@ fn temporal_sdk_bridge(py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_function(wrap_pyfunction!(init_runtime, m)?)?; m.add_function(wrap_pyfunction!(raise_in_thread, m)?)?; + py.import("atexit")?.call_method1( + "register", + (wrap_pyfunction!(runtime::shutdown_runtimes, m)?,), + )?; // Testing stuff m.add_class::()?; @@ -77,7 +94,7 @@ fn connect_client<'a>( } #[pyfunction] -fn new_metric_meter(runtime_ref: &runtime::RuntimeRef) -> Option { +fn new_metric_meter(runtime_ref: &runtime::RuntimeRef) -> PyResult> { metric::new_metric_meter(runtime_ref) } diff --git a/temporalio/bridge/src/metric.rs b/temporalio/bridge/src/metric.rs index ca5707f0cd..7a4622a86a 100644 --- a/temporalio/bridge/src/metric.rs +++ b/temporalio/bridge/src/metric.rs @@ -5,7 +5,9 @@ use std::{collections::HashMap, sync::Arc}; use pyo3::prelude::*; use pyo3::{exceptions::PyTypeError, types::PyDict}; use temporalio_common::telemetry::metrics::{ - self, BufferInstrumentRef, CustomMetricAttributes, MetricEvent, NewAttributes, + self, + core::{BufferInstrumentRef, CustomMetricAttributes, MetricEvent}, + NewAttributes, }; use crate::runtime; @@ -17,7 +19,7 @@ pub struct MetricMeterRef { default_attributes: MetricAttributesRef, } -#[pyclass] +#[pyclass(from_py_object)] #[derive(Clone)] pub struct MetricAttributesRef { attrs: metrics::MetricAttributes, @@ -53,21 +55,22 @@ pub struct MetricGaugeFloatRef { gauge: metrics::GaugeF64, } -pub fn new_metric_meter(runtime_ref: &runtime::RuntimeRef) -> Option { - runtime_ref +pub fn new_metric_meter(runtime_ref: &runtime::RuntimeRef) -> PyResult> { + Ok(runtime_ref .runtime .core + .read()? .telemetry() .get_metric_meter() .map(|meter| { let default_attributes = MetricAttributesRef { - attrs: meter.inner.new_attributes(meter.default_attribs.clone()), + attrs: meter.get_default_attributes().clone(), }; MetricMeterRef { meter, default_attributes, } - }) + })) } #[pymethods] @@ -81,7 +84,6 @@ impl MetricMeterRef { MetricCounterRef { counter: self .meter - .inner .counter(build_metric_parameters(name, description, unit)), } } @@ -95,7 +97,6 @@ impl MetricMeterRef { MetricHistogramRef { histogram: self .meter - .inner .histogram(build_metric_parameters(name, description, unit)), } } @@ -107,11 +108,9 @@ impl MetricMeterRef { unit: Option, ) -> MetricHistogramFloatRef { MetricHistogramFloatRef { - histogram: self.meter.inner.histogram_f64(build_metric_parameters( - name, - description, - unit, - )), + histogram: self + .meter + .histogram_f64(build_metric_parameters(name, description, unit)), } } @@ -122,7 +121,7 @@ impl MetricMeterRef { unit: Option, ) -> MetricHistogramDurationRef { MetricHistogramDurationRef { - histogram: self.meter.inner.histogram_duration(build_metric_parameters( + histogram: self.meter.histogram_duration(build_metric_parameters( name, description, unit, @@ -139,7 +138,6 @@ impl MetricMeterRef { MetricGaugeRef { gauge: self .meter - .inner .gauge(build_metric_parameters(name, description, unit)), } } @@ -153,7 +151,6 @@ impl MetricMeterRef { MetricGaugeFloatRef { gauge: self .meter - .inner .gauge_f64(build_metric_parameters(name, description, unit)), } } @@ -220,9 +217,9 @@ impl MetricAttributesRef { &self, py: Python, meter: &MetricMeterRef, - new_attrs: HashMap, + new_attrs: HashMap>, ) -> PyResult { - let attrs = meter.meter.inner.extend_attributes( + let attrs = meter.meter.extend_attributes( self.attrs.clone(), NewAttributes { attributes: new_attrs @@ -238,7 +235,7 @@ impl MetricAttributesRef { fn metric_key_value_from_py( py: Python, k: String, - obj: PyObject, + obj: Py, ) -> PyResult { let val = if let Ok(v) = obj.extract::(py) { metrics::MetricValue::String(v) @@ -272,6 +269,7 @@ pub enum BufferedMetricUpdateValue { U64(u64), U128(u128), F64(f64), + I64(i64), } // WARNING: This must match temporalio.runtime.BufferedMetric protocol @@ -332,7 +330,7 @@ fn convert_metric_event( description: Some(params.description) .filter(|s| !s.is_empty()) .map(|s| s.to_string()), - unit: if matches!(kind, metrics::MetricKind::HistogramDuration) + unit: if matches!(kind, metrics::core::MetricKind::HistogramDuration) && params.unit == "duration" { if durations_as_seconds { @@ -346,11 +344,13 @@ fn convert_metric_event( Some(params.unit.to_string()) }, kind: match kind { - metrics::MetricKind::Counter => 0, - metrics::MetricKind::Gauge | metrics::MetricKind::GaugeF64 => 1, - metrics::MetricKind::Histogram - | metrics::MetricKind::HistogramF64 - | metrics::MetricKind::HistogramDuration => 2, + metrics::core::MetricKind::Counter => 0, + metrics::core::MetricKind::Gauge + | metrics::core::MetricKind::GaugeF64 => 1, + metrics::core::MetricKind::Histogram + | metrics::core::MetricKind::HistogramF64 + | metrics::core::MetricKind::HistogramDuration => 2, + metrics::core::MetricKind::UpDownCounter => 3, }, }, ) @@ -405,16 +405,17 @@ fn convert_metric_event( } => Some(BufferedMetricUpdate { metric: instrument.get().clone().0.clone_ref(py), value: match update { - metrics::MetricUpdateVal::Duration(v) if durations_as_seconds => { + metrics::core::MetricUpdateVal::Duration(v) if durations_as_seconds => { BufferedMetricUpdateValue::F64(v.as_secs_f64()) } - metrics::MetricUpdateVal::Duration(v) => { + metrics::core::MetricUpdateVal::Duration(v) => { BufferedMetricUpdateValue::U128(v.as_millis()) } - metrics::MetricUpdateVal::Delta(v) => BufferedMetricUpdateValue::U64(v), - metrics::MetricUpdateVal::DeltaF64(v) => BufferedMetricUpdateValue::F64(v), - metrics::MetricUpdateVal::Value(v) => BufferedMetricUpdateValue::U64(v), - metrics::MetricUpdateVal::ValueF64(v) => BufferedMetricUpdateValue::F64(v), + metrics::core::MetricUpdateVal::Delta(v) => BufferedMetricUpdateValue::U64(v), + metrics::core::MetricUpdateVal::DeltaF64(v) => BufferedMetricUpdateValue::F64(v), + metrics::core::MetricUpdateVal::Value(v) => BufferedMetricUpdateValue::U64(v), + metrics::core::MetricUpdateVal::ValueF64(v) => BufferedMetricUpdateValue::F64(v), + metrics::core::MetricUpdateVal::SignedDelta(v) => BufferedMetricUpdateValue::I64(v), }, attributes: attributes .get() diff --git a/temporalio/bridge/src/runtime.rs b/temporalio/bridge/src/runtime.rs index 693ab86e93..d71a073cfe 100644 --- a/temporalio/bridge/src/runtime.rs +++ b/temporalio/bridge/src/runtime.rs @@ -1,4 +1,5 @@ use futures::channel::mpsc::Receiver; +use parking_lot::{MappedRwLockReadGuard, Mutex, RwLock, RwLockReadGuard}; use pyo3::exceptions::{PyAssertionError, PyRuntimeError, PyValueError}; use pyo3::prelude::*; use pythonize::pythonize; @@ -7,17 +8,16 @@ use std::future::Future; use std::net::SocketAddr; use std::pin::Pin; use std::str::FromStr; -use std::sync::Arc; +use std::sync::{Arc, Weak}; use std::time::{Duration, UNIX_EPOCH}; -use temporalio_common::telemetry::metrics::{CoreMeter, MetricCallBufferer}; +use temporalio_common::telemetry::metrics::core::MetricCallBufferer; +use temporalio_common::telemetry::metrics::CoreMeter; use temporalio_common::telemetry::{ - CoreLog, Logger, MetricTemporality, OtelCollectorOptions, OtlpProtocol, + build_otlp_metric_exporter, start_prometheus_metric_exporter, CoreLog, CoreLogStreamConsumer, + Logger, LoggerFormat, MetricTemporality, OtelCollectorOptions, OtlpProtocol, PrometheusExporterOptions, TelemetryOptions, }; -use temporalio_sdk_core::telemetry::{ - build_otlp_metric_exporter, start_prometheus_metric_exporter, CoreLogStreamConsumer, - MetricsCallBuffer, -}; +use temporalio_sdk_core::telemetry::MetricsCallBuffer; use temporalio_sdk_core::{CoreRuntime, TokioRuntimeBuilder}; use tokio::task::JoinHandle; use tokio_stream::StreamExt; @@ -33,12 +33,113 @@ pub struct RuntimeRef { #[derive(Clone)] pub(crate) struct Runtime { - pub(crate) pid: u32, - pub(crate) core: Arc, + pub(crate) core: Arc, metrics_call_buffer: Option>>, log_forwarder_handle: Option>>, } +// Python can finish an awaited RPC before the blocking Rust task which delivered +// its result has returned. Join native threads before interpreter finalization, +// while those tasks can still attach to Python and release their thread states. +static RUNTIMES: RuntimeRegistry = RuntimeRegistry::new(); + +struct RuntimeRegistry { + state: Mutex, +} + +struct RuntimeRegistryState { + shutting_down: bool, + runtimes: Vec>, +} + +impl RuntimeRegistry { + const fn new() -> Self { + Self { + state: Mutex::new(RuntimeRegistryState { + shutting_down: false, + runtimes: Vec::new(), + }), + } + } + + fn check_running(&self) -> PyResult<()> { + self.state.lock().check_running() + } + + fn register(&self, runtime: &Arc) -> PyResult<()> { + let mut state = self.state.lock(); + state.check_running()?; + state.runtimes.retain(|runtime| runtime.strong_count() > 0); + state.runtimes.push(Arc::downgrade(runtime)); + Ok(()) + } + + fn begin_shutdown(&self) -> Vec> { + let mut state = self.state.lock(); + state.shutting_down = true; + std::mem::take(&mut state.runtimes) + } +} + +impl RuntimeRegistryState { + fn check_running(&self) -> PyResult<()> { + if self.shutting_down { + return Err(PyRuntimeError::new_err( + "Temporal runtimes are shutting down", + )); + } + Ok(()) + } +} + +pub(crate) struct CoreRuntimeHandle { + pid: u32, + core: RwLock>, +} + +impl CoreRuntimeHandle { + pub(crate) fn read(&self) -> PyResult> { + RwLockReadGuard::try_map(self.core.read(), Option::as_ref) + .map_err(|_| PyRuntimeError::new_err("Temporal runtime has shut down")) + } + + fn shutdown(&self) { + // Do not hold the lock while joining threads: their remaining callbacks + // may try to use this runtime and must be able to observe its shutdown. + let core = self.core.write().take(); + drop(core); + } +} + +impl Drop for CoreRuntimeHandle { + fn drop(&mut self) { + let mut core = self.core.get_mut().take(); + if core.is_some() && self.pid == std::process::id() { + let _ = Python::try_attach(|py| py.detach(|| drop(core.take()))); + } + // A forked child or an interpreter which bypassed atexit cannot + // safely join threads that might still need the interpreter. + std::mem::forget(core); + } +} + +#[pyfunction] +pub(crate) fn shutdown_runtimes(py: Python) { + let runtimes = RUNTIMES + .begin_shutdown() + .into_iter() + .filter_map(|runtime| runtime.upgrade()) + .filter(|runtime| runtime.pid == std::process::id()) + .collect::>(); + // Tokio joins blocking tasks even after their Python futures completed or + // were cancelled. They must be able to acquire the GIL until the join ends. + py.detach(|| { + for runtime in runtimes { + runtime.shutdown(); + } + }); +} + #[derive(FromPyObject)] pub struct TelemetryConfig { logging: Option, @@ -48,7 +149,8 @@ pub struct TelemetryConfig { #[derive(FromPyObject)] pub struct LoggingConfig { filter: String, - forward_to: Option, + forward_to: Option>, + format: Option, } #[pyclass] @@ -76,6 +178,7 @@ pub struct OpenTelemetryConfig { metric_temporality_delta: bool, durations_as_seconds: bool, http: bool, + histogram_bucket_overrides: Option>>, } #[derive(FromPyObject)] @@ -91,22 +194,25 @@ pub struct PrometheusConfig { pub struct RuntimeOptions { telemetry: TelemetryConfig, worker_heartbeat_interval_millis: Option, + disable_environment_info: bool, } const FORWARD_LOG_BUFFER_SIZE: usize = 2048; const FORWARD_LOG_MAX_FREQ_MS: u64 = 10; pub fn init_runtime(options: RuntimeOptions) -> PyResult { + RUNTIMES.check_running()?; let RuntimeOptions { telemetry: TelemetryConfig { logging, metrics }, worker_heartbeat_interval_millis, + disable_environment_info, } = options; // Have to build/start telemetry config pieces let telemetry_build = TelemetryOptions::builder(); // Build logging config, capturing forwarding info to start later - let mut log_forwarding: Option<(Receiver, PyObject)> = None; + let mut log_forwarding: Option<(Receiver, Py)> = None; let maybe_logging = if let Some(logging_conf) = logging { Some(if let Some(forward_to) = logging_conf.forward_to { // Note, actual log forwarding is started later @@ -119,6 +225,15 @@ pub fn init_runtime(options: RuntimeOptions) -> PyResult { } else { Logger::Console { filter: logging_conf.filter.to_string(), + format: logging_conf + .format + .map(|format| match format.as_str() { + "compact" => Ok(LoggerFormat::Compact), + "pretty" => Ok(LoggerFormat::Pretty), + "json" => Ok(LoggerFormat::Json), + _ => Err(PyValueError::new_err("Unrecognized logging format")), + }) + .transpose()?, } }) } else { @@ -134,6 +249,7 @@ pub fn init_runtime(options: RuntimeOptions) -> PyResult { .build(), ) .heartbeat_interval(worker_heartbeat_interval_millis.map(Duration::from_millis)) + .disable_environment_info(disable_environment_info) .build() .map_err(|err| PyValueError::new_err(format!("Invalid runtime options: {err}")))?; @@ -178,15 +294,19 @@ pub fn init_runtime(options: RuntimeOptions) -> PyResult { .collect::>(); // We silently swallow errors here because logging them could // cause a bad loop and we don't want to assume console presence - let _ = Python::with_gil(|py| callback.call1(py, (entries,))); + let _ = Python::attach(|py| callback.call1(py, (entries,))); } })) }); + let core = Arc::new(CoreRuntimeHandle { + pid: std::process::id(), + core: RwLock::new(Some(core)), + }); + RUNTIMES.register(&core)?; Ok(RuntimeRef { runtime: Runtime { - pid: std::process::id(), - core: Arc::new(core), + core, metrics_call_buffer, log_forwarder_handle, }, @@ -205,18 +325,19 @@ impl Runtime { pub fn future_into_py<'a, F, T>(&self, py: Python<'a>, fut: F) -> PyResult> where F: Future> + Send + 'static, - T: for<'py> IntoPyObject<'py>, + T: for<'py> IntoPyObject<'py> + Send + 'static, { - let _guard = self.core.tokio_handle().enter(); + let handle = self.core.read()?.tokio_handle(); + let _guard = handle.enter(); pyo3_async_runtimes::generic::future_into_py::(py, fut) } pub(crate) fn assert_same_process(&self, action: &'static str) -> PyResult<()> { let current_pid = std::process::id(); - if self.pid != current_pid { + let runtime_pid = self.core.pid; + if runtime_pid != current_pid { Err(PyAssertionError::new_err(format!( - "Cannot {} across forks (original runtime PID is {}, current is {})", - action, self.pid, current_pid, + "Cannot {action} across forks (original runtime PID is {runtime_pid}, current is {current_pid})", ))) } else { Ok(()) @@ -226,8 +347,9 @@ impl Runtime { impl Drop for Runtime { fn drop(&mut self) { - // Stop the log forwarder - if let Some(handle) = self.log_forwarder_handle.as_ref() { + // Clients and workers each hold a clone of the runtime, so only stop the + // log forwarder when the last clone is dropped + if let Some(handle) = self.log_forwarder_handle.take().and_then(Arc::into_inner) { handle.abort(); } } @@ -251,28 +373,32 @@ impl RuntimeRef { ) } - fn write_test_info_log(&self, message: &str, extra_data: &str) { + fn write_test_info_log(&self, message: &str, extra_data: &str) -> PyResult<()> { let _g = tracing::subscriber::set_default( self.runtime .core + .read()? .telemetry() .trace_subscriber() .unwrap() .clone(), ); tracing::info!(message, extra_data = extra_data); + Ok(()) } - fn write_test_debug_log(&self, message: &str, extra_data: &str) { + fn write_test_debug_log(&self, message: &str, extra_data: &str) -> PyResult<()> { let _g = tracing::subscriber::set_default( self.runtime .core + .read()? .telemetry() .trace_subscriber() .unwrap() .clone(), ); tracing::debug!(message, extra_data = extra_data); + Ok(()) } } @@ -311,7 +437,7 @@ impl BufferedLogEntry { } #[getter] - fn fields(&self, py: Python<'_>) -> PyResult> { + fn fields(&self, py: Python<'_>) -> PyResult>> { self.core_log .fields .iter() @@ -358,6 +484,11 @@ impl TryFrom for Arc { } else { None }) + .maybe_histogram_bucket_overrides(otel_conf.histogram_bucket_overrides.map( + |overrides| temporalio_common::telemetry::HistogramBucketOverrides { + overrides, + }, + )) .build(); Ok(Arc::new(build_otlp_metric_exporter(otel_options).map_err( |err| PyValueError::new_err(format!("Failed building OTel exporter: {err}")), @@ -414,6 +545,13 @@ impl pyo3_async_runtimes::generic::Runtime for TokioRuntime { { tokio::runtime::Handle::current().spawn(fut) } + + fn spawn_blocking(f: F) -> Self::JoinHandle + where + F: FnOnce() + Send + 'static, + { + tokio::runtime::Handle::current().spawn_blocking(f) + } } impl pyo3_async_runtimes::generic::ContextExt for TokioRuntime { @@ -432,10 +570,7 @@ impl pyo3_async_runtimes::generic::ContextExt for TokioRuntime { fn get_task_locals() -> Option { TASK_LOCALS - .try_with(|c| { - c.get() - .map(|locals| Python::with_gil(|py| locals.clone_ref(py))) - }) + .try_with(|c| c.get().cloned()) .unwrap_or_default() } } diff --git a/temporalio/bridge/src/testing.rs b/temporalio/bridge/src/testing.rs index e6f50afddb..b0c72b7094 100644 --- a/temporalio/bridge/src/testing.rs +++ b/temporalio/bridge/src/testing.rs @@ -25,9 +25,11 @@ pub struct DevServerConfig { port: Option, database_filename: Option, ui: bool, + ui_port: Option, log_format: String, log_level: String, extra_args: Vec, + startup_timeout_ms: Option, } #[derive(FromPyObject)] @@ -40,6 +42,7 @@ pub struct TestServerConfig { download_ttl_ms: Option, port: Option, extra_args: Vec, + startup_timeout_ms: Option, } pub fn start_dev_server<'a>( @@ -133,8 +136,10 @@ impl From for ephemeral_server::TemporalDevServerConfig { .maybe_port(conf.port) .maybe_db_filename(conf.database_filename) .ui(conf.ui) + .maybe_ui_port(conf.ui_port) .log((conf.log_format, conf.log_level)) .extra_args(conf.extra_args) + .maybe_startup_timeout(conf.startup_timeout_ms.map(Duration::from_millis)) .build() } } @@ -160,6 +165,7 @@ impl From for ephemeral_server::TestServerConfig { }) .maybe_port(conf.port) .extra_args(conf.extra_args) + .maybe_startup_timeout(conf.startup_timeout_ms.map(Duration::from_millis)) .build() } } diff --git a/temporalio/bridge/src/worker.rs b/temporalio/bridge/src/worker.rs index 9d95d678fe..46b6c00de9 100644 --- a/temporalio/bridge/src/worker.rs +++ b/temporalio/bridge/src/worker.rs @@ -9,20 +9,18 @@ use std::collections::HashSet; use std::marker::PhantomData; use std::sync::{Arc, OnceLock}; use std::time::Duration; -use temporalio_common::errors::PollError; -use temporalio_common::errors::WorkflowErrorType; use temporalio_common::protos::coresdk::workflow_completion::WorkflowActivationCompletion; use temporalio_common::protos::coresdk::{ nexus::NexusTaskCompletion, ActivityHeartbeat, ActivityTaskCompletion, }; use temporalio_common::protos::temporal::api::history::v1::History; -use temporalio_common::protos::temporal::api::worker::v1::PluginInfo; -use temporalio_common::worker::{ - SlotInfo, SlotInfoTrait, SlotKind, SlotKindType, SlotMarkUsedContext, SlotReleaseContext, - SlotReservationContext, SlotSupplier as SlotSupplierTrait, SlotSupplierPermit, -}; -use temporalio_common::Worker; +use temporalio_common::protos::temporal::api::worker::v1::{PluginInfo, StorageDriverInfo}; use temporalio_sdk_core::replay::{HistoryForReplay, ReplayWorkerInput}; +use temporalio_sdk_core::{ + PollError, SlotInfo, SlotInfoTrait, SlotKind, SlotKindType, SlotMarkUsedContext, + SlotReleaseContext, SlotReservationContext, SlotSupplier as SlotSupplierTrait, + SlotSupplierPermit, WorkflowErrorType, +}; use tokio::sync::mpsc::{channel, Sender}; use tokio_stream::wrappers::ReceiverStream; use tracing::error; @@ -50,20 +48,23 @@ pub struct WorkerConfig { identity_override: Option, max_cached_workflows: usize, tuner: TunerHolder, - workflow_task_poller_behavior: PollerBehavior, + workflow_task_poller_behavior: Option, nonsticky_to_sticky_poll_ratio: f32, - activity_task_poller_behavior: PollerBehavior, + activity_task_poller_behavior: Option, task_types: WorkerTaskTypes, sticky_queue_schedule_to_start_timeout_millis: u64, max_heartbeat_throttle_interval_millis: u64, default_heartbeat_throttle_interval_millis: u64, max_activities_per_second: Option, max_task_queue_activities_per_second: Option, + max_eager_activity_reservations_per_workflow_task: usize, graceful_shutdown_period_millis: u64, nondeterminism_as_workflow_fail: bool, nondeterminism_as_workflow_fail_for_types: HashSet, - nexus_task_poller_behavior: PollerBehavior, - plugins: Vec, + nexus_task_poller_behavior: Option, + plugins: Vec<(String, String)>, + storage_drivers: HashSet, + disable_payload_error_limit: bool, } #[derive(FromPyObject)] @@ -78,31 +79,29 @@ pub struct PollerBehaviorAutoscaling { pub initial: usize, } -/// Recreates [temporalio_common::worker::PollerBehavior] +/// Recreates [temporalio_sdk_core::PollerBehavior] #[derive(FromPyObject)] pub enum PollerBehavior { SimpleMaximum(PollerBehaviorSimpleMaximum), Autoscaling(PollerBehaviorAutoscaling), } -impl From for temporalio_common::worker::PollerBehavior { +impl From for temporalio_sdk_core::PollerBehavior { fn from(value: PollerBehavior) -> Self { match value { PollerBehavior::SimpleMaximum(simple) => { - temporalio_common::worker::PollerBehavior::SimpleMaximum(simple.simple_maximum) - } - PollerBehavior::Autoscaling(auto) => { - temporalio_common::worker::PollerBehavior::Autoscaling { - minimum: auto.minimum, - maximum: auto.maximum, - initial: auto.initial, - } + temporalio_sdk_core::PollerBehavior::SimpleMaximum(simple.simple_maximum) } + PollerBehavior::Autoscaling(auto) => temporalio_sdk_core::PollerBehavior::Autoscaling { + minimum: auto.minimum, + maximum: auto.maximum, + initial: auto.initial, + }, } } } -/// Recreates [temporalio_common::worker::WorkerVersioningStrategy] +/// Recreates [temporalio_sdk_core::WorkerVersioningStrategy] #[derive(FromPyObject)] pub enum WorkerVersioningStrategy { None(WorkerVersioningNone), @@ -234,9 +233,9 @@ impl SlotReserveCtx { #[pyclass] pub struct SlotMarkUsedCtx { #[pyo3(get)] - slot_info: PyObject, + slot_info: Py, #[pyo3(get)] - permit: PyObject, + permit: Py, } // NOTE: this is dumb because we already have the generated proto code, we just can't use @@ -271,9 +270,9 @@ pub struct NexusSlotInfo { #[pyclass] pub struct SlotReleaseCtx { #[pyo3(get)] - slot_info: Option, + slot_info: Option>, #[pyo3(get)] - permit: PyObject, + permit: Py, } fn slot_info_to_py_obj<'py>(py: Python<'py>, info: SlotInfo) -> PyResult> { @@ -303,14 +302,14 @@ fn slot_info_to_py_obj<'py>(py: Python<'py>, info: SlotInfo) -> PyResult, + inner: Arc>, } struct CustomSlotSupplierOfType { - inner: Arc, + inner: Arc>, event_loop_task_locals: Arc>, _phantom: PhantomData, } @@ -318,7 +317,7 @@ struct CustomSlotSupplierOfType { #[pymethods] impl CustomSlotSupplier { #[new] - fn new(inner: PyObject) -> Self { + fn new(inner: Py) -> Self { CustomSlotSupplier { inner: Arc::new(inner), } @@ -332,23 +331,23 @@ impl CustomSlotSupplier { #[pyclass] struct CreatedTaskForSlotCallback { - stored_task: Arc>, + stored_task: Arc>>, } #[pymethods] impl CreatedTaskForSlotCallback { - fn __call__(&self, task: PyObject) -> PyResult<()> { + fn __call__(&self, task: Py) -> PyResult<()> { self.stored_task.set(task).expect("must only be set once"); Ok(()) } } struct TaskCanceller { - stored_task: Arc>, + stored_task: Arc>>, } impl TaskCanceller { - fn new(stored_task: Arc>) -> Self { + fn new(stored_task: Arc>>) -> Self { TaskCanceller { stored_task } } } @@ -356,7 +355,7 @@ impl TaskCanceller { impl Drop for TaskCanceller { fn drop(&mut self) { if let Some(task) = self.stored_task.get() { - Python::with_gil(|py| { + Python::attach(|py| { task.call_method0(py, "cancel") .expect("Failed to cancel task"); }); @@ -372,7 +371,7 @@ impl SlotSupplierTrait for CustomSlotSupplierOfType< loop { let stored_task = Arc::new(OnceLock::new()); let _task_canceller = TaskCanceller::new(stored_task.clone()); - let pypermit = match Python::with_gil(|py| { + let pypermit = match Python::attach(|py| { let py_obj = self.inner.bind(py); let called = py_obj.call_method1( "reserve_slot", @@ -407,7 +406,7 @@ impl SlotSupplierTrait for CustomSlotSupplierOfType< } fn try_reserve_slot(&self, ctx: &dyn SlotReservationContext) -> Option { - Python::with_gil(|py| { + Python::attach(|py| { let py_obj = self.inner.bind(py); let pa = py_obj.call_method1( "try_reserve_slot", @@ -428,10 +427,10 @@ impl SlotSupplierTrait for CustomSlotSupplierOfType< } fn mark_slot_used(&self, ctx: &dyn SlotMarkUsedContext) { - if let Err(e) = Python::with_gil(|py| { + if let Err(e) = Python::attach(|py| { let permit = ctx .permit() - .user_data::() + .user_data::>() .map(|o| o.clone_ref(py)) .unwrap_or_else(|| py.None()); let py_obj = self.inner.bind(py); @@ -449,10 +448,10 @@ impl SlotSupplierTrait for CustomSlotSupplierOfType< } fn release_slot(&self, ctx: &dyn SlotReleaseContext) { - if let Err(e) = Python::with_gil(|py| { + if let Err(e) = Python::attach(|py| { let permit = ctx .permit() - .user_data::() + .user_data::>() .map(|o| o.clone_ref(py)) .unwrap_or_else(|| py.None()); let py_obj = self.inner.bind(py); @@ -481,10 +480,14 @@ pub struct ResourceBasedTunerConfig { macro_rules! enter_sync { ($runtime:expr) => { - if let Some(subscriber) = $runtime.core.telemetry().trace_subscriber() { - temporalio_sdk_core::telemetry::set_trace_subscriber_for_current_thread(subscriber); + let (subscriber, handle) = { + let core = $runtime.core.read()?; + (core.telemetry().trace_subscriber(), core.tokio_handle()) + }; + if let Some(subscriber) = subscriber { + temporalio_common::telemetry::set_trace_subscriber_for_current_thread(subscriber); } - let _guard = $runtime.core.tokio_handle().enter(); + let _guard = handle.enter(); }; } @@ -498,9 +501,9 @@ pub fn new_worker( let event_loop_task_locals = Arc::new(OnceLock::new()); let config = convert_worker_config(config, event_loop_task_locals.clone())?; let worker = temporalio_sdk_core::init_worker( - &runtime_ref.runtime.core, + &*runtime_ref.runtime.core.read()?, config, - client.retry_client.clone().into_inner(), + client.connection.clone(), ) .context("Failed creating worker")?; Ok(WorkerRef { @@ -543,7 +546,7 @@ pub fn new_replay_worker<'a>( #[pymethods] impl WorkerRef { - fn validate<'p>(&self, py: Python<'p>) -> PyResult> { + fn validate<'p>(&self, py: Python<'p>) -> PyResult> { self.runtime.assert_same_process("use worker")?; let worker = self.worker.as_ref().unwrap().clone(); // Set custom slot supplier task locals so they can run futures. @@ -555,11 +558,15 @@ impl WorkerRef { .expect("must only be set once"); self.runtime.future_into_py(py, async move { - worker - .validate() - .await - .context("Worker validation failed") - .map_err(Into::into) + let bytes = match worker.validate().await { + Ok(info) => info.encode_to_vec(), + Err(err) => { + return Err(PyRuntimeError::new_err(format!( + "Worker validation failed: {err}" + ))) + } + }; + Ok(bytes) }) } @@ -657,10 +664,14 @@ impl WorkerRef { enter_sync!(self.runtime); let heartbeat = ActivityHeartbeat::decode(proto.as_bytes()) .map_err(|err| PyValueError::new_err(format!("Invalid proto: {err}")))?; - self.worker - .as_ref() - .unwrap() - .record_activity_heartbeat(heartbeat); + let worker = self.worker.as_ref().unwrap().clone(); + // Detach from the GIL during the core call. Core may block on internal + // locks whose holders can call back into Python (e.g. a custom slot + // supplier's mark_slot_used runs while core's outstanding-activity + // lock is held); holding the GIL here would deadlock the worker. + proto + .py() + .detach(move || worker.record_activity_heartbeat(heartbeat)); Ok(()) } @@ -678,11 +689,12 @@ impl WorkerRef { self.worker .as_ref() .expect("missing worker") - .replace_client(client.retry_client.clone().into_inner()) + .replace_client(client.connection.clone()) .map_err(|err| PyValueError::new_err(format!("Failed replacing client: {err}"))) } fn initiate_shutdown(&self) -> PyResult<()> { + enter_sync!(self.runtime); let worker = self.worker.as_ref().unwrap().clone(); worker.initiate_shutdown(); Ok(()) @@ -716,10 +728,10 @@ fn convert_worker_config( .versioning_strategy(converted_versioning_strategy) .maybe_client_identity_override(conf.identity_override) .max_cached_workflows(conf.max_cached_workflows) - .workflow_task_poller_behavior(conf.workflow_task_poller_behavior.into()) + .maybe_workflow_task_poller_behavior(conf.workflow_task_poller_behavior.map(Into::into)) .tuner(Arc::new(converted_tuner)) .nonsticky_to_sticky_poll_ratio(conf.nonsticky_to_sticky_poll_ratio) - .activity_task_poller_behavior(conf.activity_task_poller_behavior.into()) + .maybe_activity_task_poller_behavior(conf.activity_task_poller_behavior.map(Into::into)) .task_types(conf.task_types.into()) .sticky_queue_schedule_to_start_timeout(Duration::from_millis( conf.sticky_queue_schedule_to_start_timeout_millis, @@ -732,6 +744,9 @@ fn convert_worker_config( )) .maybe_max_worker_activities_per_second(conf.max_activities_per_second) .maybe_max_task_queue_activities_per_second(conf.max_task_queue_activities_per_second) + .max_eager_activity_reservations_per_workflow_task( + conf.max_eager_activity_reservations_per_workflow_task, + ) // Even though grace period is optional, if it is not set then the // auto-cancel-activity behavior of shutdown will not occur, so we // always set it even if 0. @@ -752,16 +767,20 @@ fn convert_worker_config( }) .collect(), ) - .nexus_task_poller_behavior(conf.nexus_task_poller_behavior.into()) + .maybe_nexus_task_poller_behavior(conf.nexus_task_poller_behavior.map(Into::into)) .plugins( conf.plugins .into_iter() - .map(|name| PluginInfo { - name, - version: String::new(), - }) + .map(|(name, version)| PluginInfo { name, version }) .collect(), ) + .storage_drivers( + conf.storage_drivers + .into_iter() + .map(|r#type| StorageDriverInfo { r#type }) + .collect::>(), + ) + .disable_payload_error_limit(conf.disable_payload_error_limit) .build() .map_err(|err| PyValueError::new_err(format!("Invalid worker config: {err}"))) } @@ -815,11 +834,13 @@ fn convert_tuner_holder( } Ok(temporalio_sdk_core::TunerHolderOptions::builder() - .maybe_resource_based_options(first.map(|first| { - temporalio_sdk_core::ResourceBasedSlotsOptions::builder() - .target_mem_usage(first.target_memory_usage) - .target_cpu_usage(first.target_cpu_usage) - .build() + .maybe_resource_based_config(first.map(|first| { + temporalio_sdk_core::ResourceBasedTunerConfig::Options( + temporalio_sdk_core::ResourceBasedSlotsOptions::builder() + .target_mem_usage(first.target_memory_usage) + .target_cpu_usage(first.target_cpu_usage) + .build(), + ) })) .workflow_slot_options(convert_slot_supplier( holder.workflow_slot_supplier, @@ -872,32 +893,36 @@ fn convert_slot_supplier( fn convert_versioning_strategy( strategy: WorkerVersioningStrategy, -) -> temporalio_common::worker::WorkerVersioningStrategy { +) -> temporalio_sdk_core::WorkerVersioningStrategy { match strategy { - WorkerVersioningStrategy::None(vn) => { - temporalio_common::worker::WorkerVersioningStrategy::None { - build_id: vn.build_id_no_versioning, - } - } + WorkerVersioningStrategy::None(vn) => temporalio_sdk_core::WorkerVersioningStrategy::None { + build_id: vn.build_id_no_versioning, + }, WorkerVersioningStrategy::DeploymentBased(options) => { - temporalio_common::worker::WorkerVersioningStrategy::WorkerDeploymentBased( - temporalio_common::worker::WorkerDeploymentOptions { - version: temporalio_common::worker::WorkerDeploymentVersion { - deployment_name: options.version.deployment_name, - build_id: options.version.build_id, - }, - use_worker_versioning: options.use_worker_versioning, - default_versioning_behavior: Some( - options - .default_versioning_behavior - .try_into() - .unwrap_or_default(), - ), - }, + temporalio_sdk_core::WorkerVersioningStrategy::WorkerDeploymentBased( + temporalio_common::worker::WorkerDeploymentOptions::new( + temporalio_common::worker::WorkerDeploymentVersion::builder() + .deployment_name(options.version.deployment_name) + .build_id(options.version.build_id) + .build(), + ) + .use_worker_versioning(options.use_worker_versioning) + .maybe_default_versioning_behavior(if options.use_worker_versioning { + Some( + temporalio_common::protos::temporal::api::enums::v1::VersioningBehavior::try_from( + options.default_versioning_behavior, + ) + .unwrap_or_default() + .into(), + ) + } else { + None + }) + .build(), ) } WorkerVersioningStrategy::LegacyBuildIdBased(lb) => { - temporalio_common::worker::WorkerVersioningStrategy::LegacyBuildIdBased { + temporalio_sdk_core::WorkerVersioningStrategy::LegacyBuildIdBased { build_id: lb.build_id_with_versioning, } } diff --git a/temporalio/bridge/testing.py b/temporalio/bridge/testing.py index 8db2edc2a1..1998dd6b3f 100644 --- a/temporalio/bridge/testing.py +++ b/temporalio/bridge/testing.py @@ -7,7 +7,6 @@ from collections.abc import Sequence from dataclasses import dataclass -from typing import Optional import temporalio.bridge.runtime import temporalio.bridge.temporal_sdk_bridge @@ -28,9 +27,11 @@ class DevServerConfig: port: int | None database_filename: str | None ui: bool + ui_port: int | None log_format: str log_level: str extra_args: Sequence[str] + startup_timeout_ms: int | None @dataclass @@ -45,6 +46,7 @@ class TestServerConfig: download_ttl_ms: int | None port: int | None extra_args: Sequence[str] + startup_timeout_ms: int | None class EphemeralServer: diff --git a/temporalio/bridge/worker.py b/temporalio/bridge/worker.py index ea68208658..fa5f337ca7 100644 --- a/temporalio/bridge/worker.py +++ b/temporalio/bridge/worker.py @@ -5,19 +5,12 @@ from __future__ import annotations -from collections.abc import Awaitable, Callable, MutableSequence, Sequence +from collections.abc import Awaitable, Callable, Sequence from dataclasses import dataclass from typing import ( - List, - Optional, - Set, - Tuple, TypeAlias, - Union, ) -import temporalio.api.common.v1 -import temporalio.api.history.v1 import temporalio.bridge.client import temporalio.bridge.proto import temporalio.bridge.proto.activity_task @@ -27,13 +20,15 @@ import temporalio.bridge.runtime import temporalio.bridge.temporal_sdk_bridge import temporalio.converter -import temporalio.exceptions +import temporalio.converter._extstore from temporalio.api.common.v1.message_pb2 import Payload -from temporalio.bridge._visitor import VisitorFunctions +from temporalio.bridge._visitor_functions import PayloadSequence, VisitorFunctions from temporalio.bridge.temporal_sdk_bridge import ( CustomSlotSupplier as BridgeCustomSlotSupplier, ) -from temporalio.bridge.temporal_sdk_bridge import PollShutdownError # type: ignore +from temporalio.bridge.temporal_sdk_bridge import ( + PollShutdownError, # type: ignore # noqa: F401 +) from temporalio.worker._command_aware_visitor import CommandAwarePayloadVisitor @@ -47,9 +42,9 @@ class WorkerConfig: identity_override: str | None max_cached_workflows: int tuner: TunerHolder - workflow_task_poller_behavior: PollerBehavior + workflow_task_poller_behavior: PollerBehavior | None nonsticky_to_sticky_poll_ratio: float - activity_task_poller_behavior: PollerBehavior + activity_task_poller_behavior: PollerBehavior | None no_remote_activities: bool task_types: WorkerTaskTypes sticky_queue_schedule_to_start_timeout_millis: int @@ -57,11 +52,14 @@ class WorkerConfig: default_heartbeat_throttle_interval_millis: int max_activities_per_second: float | None max_task_queue_activities_per_second: float | None + max_eager_activity_reservations_per_workflow_task: int graceful_shutdown_period_millis: int nondeterminism_as_workflow_fail: bool nondeterminism_as_workflow_fail_for_types: set[str] - nexus_task_poller_behavior: PollerBehavior - plugins: Sequence[str] + nexus_task_poller_behavior: PollerBehavior | None + plugins: Sequence[tuple[str, str]] + storage_drivers: set[str] + disable_payload_error_limit: bool @dataclass @@ -80,10 +78,7 @@ class PollerBehaviorAutoscaling: initial: int -PollerBehavior: TypeAlias = Union[ - PollerBehaviorSimpleMaximum, - PollerBehaviorAutoscaling, -] +PollerBehavior: TypeAlias = PollerBehaviorSimpleMaximum | PollerBehaviorAutoscaling @dataclass @@ -118,11 +113,11 @@ class WorkerVersioningStrategyLegacyBuildIdBased: build_id_with_versioning: str -WorkerVersioningStrategy: TypeAlias = Union[ - WorkerVersioningStrategyNone, - WorkerDeploymentOptions, - WorkerVersioningStrategyLegacyBuildIdBased, -] +WorkerVersioningStrategy: TypeAlias = ( + WorkerVersioningStrategyNone + | WorkerDeploymentOptions + | WorkerVersioningStrategyLegacyBuildIdBased +) @dataclass @@ -150,11 +145,9 @@ class FixedSizeSlotSupplier: num_slots: int -SlotSupplier: TypeAlias = Union[ - FixedSizeSlotSupplier, - ResourceBasedSlotSupplier, - BridgeCustomSlotSupplier, -] +SlotSupplier: TypeAlias = ( + FixedSizeSlotSupplier | ResourceBasedSlotSupplier | BridgeCustomSlotSupplier +) @dataclass @@ -207,9 +200,13 @@ def __init__(self, ref: temporalio.bridge.temporal_sdk_bridge.WorkerRef) -> None """Create SDK core worker from a bridge worker.""" self._ref = ref - async def validate(self) -> None: + async def validate( + self, + ) -> temporalio.bridge.proto.NamespaceInfo: """Validate the bridge worker.""" - await self._ref.validate() # type: ignore[reportOptionalMemberAccess] + return temporalio.bridge.proto.NamespaceInfo.FromString( + await self._ref.validate() # type: ignore[reportOptionalMemberAccess] + ) async def poll_workflow_activation( self, @@ -286,7 +283,10 @@ async def finalize_shutdown(self) -> None: class _Visitor(VisitorFunctions): - def __init__(self, f: Callable[[Sequence[Payload]], Awaitable[list[Payload]]]): + def __init__( + self, + f: Callable[[Sequence[Payload]], Awaitable[list[Payload]]], + ): self._f = f async def visit_payload(self, payload: Payload) -> None: @@ -294,7 +294,7 @@ async def visit_payload(self, payload: Payload) -> None: if new_payload is not payload: payload.CopyFrom(new_payload) - async def visit_payloads(self, payloads: MutableSequence[Payload]) -> None: + async def visit_payloads(self, payloads: PayloadSequence) -> None: if len(payloads) == 0: return new_payloads = await self._f(payloads) @@ -306,21 +306,79 @@ async def visit_payloads(self, payloads: MutableSequence[Payload]) -> None: async def decode_activation( activation: temporalio.bridge.proto.workflow_activation.WorkflowActivation, - codec: temporalio.converter.PayloadCodec, + data_converter: temporalio.converter.DataConverter, decode_headers: bool, -) -> None: - """Decode all payloads in the activation.""" + storage_concurrency_limit: int, +) -> temporalio.converter._extstore.StorageOperationMetrics: + """Decode all payloads in the activation. + + Returns: + Metrics from any external storage retrieval operations that occurred. + """ await CommandAwarePayloadVisitor( - skip_search_attributes=True, skip_headers=not decode_headers - ).visit(_Visitor(codec.decode), activation) + skip_search_attributes=True, + skip_headers=not decode_headers, + ).visit(_Visitor(data_converter._decode_reference_payload_sequence), activation) + + metrics = temporalio.converter._extstore.StorageOperationMetrics() + with metrics.track(): + await CommandAwarePayloadVisitor( + skip_search_attributes=True, + skip_headers=not decode_headers, + concurrency_limit=storage_concurrency_limit, + ).visit( + _Visitor(data_converter._external_retrieve_payload_sequence), activation + ) + + if data_converter.payload_codec: + await CommandAwarePayloadVisitor( + skip_search_attributes=True, + skip_headers=not decode_headers, + ).visit(_Visitor(data_converter._decode_payload_sequence), activation) + + return metrics async def encode_completion( completion: temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion, - codec: temporalio.converter.PayloadCodec, + data_converter: temporalio.converter.DataConverter, encode_headers: bool, -) -> None: - """Encode all payloads in the completion.""" + storage_concurrency_limit: int, +) -> temporalio.converter._extstore.StorageOperationMetrics: + """Encode all payloads in the completion. + + Returns: + Metrics from any external storage store operations that occurred. + """ + metrics = temporalio.converter._extstore.StorageOperationMetrics() + if not data_converter._has_codec_or_external_storage: + return metrics + + await CommandAwarePayloadVisitor( + skip_search_attributes=True, + skip_headers=not encode_headers, + ).visit( + _Visitor(data_converter._encode_payload_sequence), + completion, + ) + + if data_converter.external_storage: + with metrics.track(): + await CommandAwarePayloadVisitor( + skip_search_attributes=True, + skip_headers=not encode_headers, + concurrency_limit=storage_concurrency_limit, + ).visit( + _Visitor(data_converter._external_store_payload_sequence), + completion, + ) + await CommandAwarePayloadVisitor( - skip_search_attributes=True, skip_headers=not encode_headers - ).visit(_Visitor(codec.encode), completion) + skip_search_attributes=True, + skip_headers=not encode_headers, + ).visit( + _Visitor(data_converter._encode_reference_payload_sequence), + completion, + ) + + return metrics diff --git a/temporalio/client.py b/temporalio/client.py deleted file mode 100644 index 07ccdc6b2b..0000000000 --- a/temporalio/client.py +++ /dev/null @@ -1,7536 +0,0 @@ -"""Client for accessing Temporal.""" - -from __future__ import annotations - -import abc -import asyncio -import copy -import dataclasses -import functools -import inspect -import json -import re -import uuid -import warnings -from abc import ABC, abstractmethod -from asyncio import Future -from collections.abc import ( - AsyncIterator, - Awaitable, - Callable, - Iterable, - Mapping, - Sequence, -) -from dataclasses import dataclass -from datetime import datetime, timedelta, timezone -from enum import Enum, IntEnum -from typing import ( - Any, - Concatenate, - Dict, - FrozenSet, - Generic, - Optional, - Text, - Tuple, - Type, - Union, - cast, - overload, -) - -import google.protobuf.duration_pb2 -import google.protobuf.json_format -import google.protobuf.timestamp_pb2 -from google.protobuf.internal.containers import MessageMap -from typing_extensions import Required, Self, TypedDict - -import temporalio.api.common.v1 -import temporalio.api.enums.v1 -import temporalio.api.errordetails.v1 -import temporalio.api.failure.v1 -import temporalio.api.history.v1 -import temporalio.api.schedule.v1 -import temporalio.api.sdk.v1 -import temporalio.api.taskqueue.v1 -import temporalio.api.update.v1 -import temporalio.api.workflow.v1 -import temporalio.api.workflowservice.v1 -import temporalio.common -import temporalio.converter -import temporalio.exceptions -import temporalio.nexus -import temporalio.nexus._operation_context -import temporalio.runtime -import temporalio.service -import temporalio.workflow -from temporalio.activity import ActivityCancellationDetails -from temporalio.converter import ( - DataConverter, - SerializationContext, - WithSerializationContext, - WorkflowSerializationContext, -) -from temporalio.service import ( - ConnectConfig, - HttpConnectProxyConfig, - KeepAliveConfig, - RetryConfig, - RPCError, - RPCStatusCode, - ServiceClient, - TLSConfig, -) - -from .common import HeaderCodecBehavior -from .types import ( - AnyType, - LocalReturnType, - MethodAsyncNoParam, - MethodAsyncSingleParam, - MethodSyncOrAsyncNoParam, - MethodSyncOrAsyncSingleParam, - MultiParamSpec, - ParamType, - ReturnType, - SelfType, -) - - -class Client: - """Client for accessing Temporal. - - Most users will use :py:meth:`connect` to create a client. The - :py:attr:`service` property provides access to a raw gRPC client. To create - another client, like for a different namespace, :py:func:`Client` may be - directly instantiated with a :py:attr:`service` of another. - - Clients are not thread-safe and should only be used in the event loop they - are first connected in. If a client needs to be used from another thread - than where it was created, make sure the event loop where it was created is - captured, and then call :py:func:`asyncio.run_coroutine_threadsafe` with the - client call and that event loop. - - Clients do not work across forks since runtimes do not work across forks. - """ - - @classmethod - async def connect( - cls, - target_host: str, - *, - namespace: str = "default", - api_key: str | None = None, - data_converter: temporalio.converter.DataConverter = temporalio.converter.DataConverter.default, - plugins: Sequence[Plugin] = [], - interceptors: Sequence[Interceptor] = [], - default_workflow_query_reject_condition: None - | (temporalio.common.QueryRejectCondition) = None, - tls: bool | TLSConfig | None = None, - retry_config: RetryConfig | None = None, - keep_alive_config: KeepAliveConfig | None = KeepAliveConfig.default, - rpc_metadata: Mapping[str, str | bytes] = {}, - identity: str | None = None, - lazy: bool = False, - runtime: temporalio.runtime.Runtime | None = None, - http_connect_proxy_config: HttpConnectProxyConfig | None = None, - header_codec_behavior: HeaderCodecBehavior = HeaderCodecBehavior.NO_CODEC, - ) -> Self: - """Connect to a Temporal server. - - Args: - target_host: ``host:port`` for the Temporal server. For local - development, this is often "localhost:7233". - namespace: Namespace to use for client calls. - api_key: API key for Temporal. This becomes the "Authorization" - HTTP header with "Bearer " prepended. This is only set if RPC - metadata doesn't already have an "authorization" key. - data_converter: Data converter to use for all data conversions - to/from payloads. - plugins: Set of plugins that are chained together to allow - intercepting and modifying client creation and service connection. - The earlier plugins wrap the later ones. - - Any plugins that also implement - :py:class:`temporalio.worker.Plugin` will be used as worker - plugins too so they should not be given when creating a - worker. - interceptors: Set of interceptors that are chained together to allow - intercepting of client calls. The earlier interceptors wrap the - later ones. - - Any interceptors that also implement - :py:class:`temporalio.worker.Interceptor` will be used as worker - interceptors too so they should not be given when creating a - worker. - default_workflow_query_reject_condition: The default rejection - condition for workflow queries if not set during query. See - :py:meth:`WorkflowHandle.query` for details on the rejection - condition. - tls: If ``None``, the default, TLS will be enabled automatically - when ``api_key`` is provided, otherwise TLS is disabled. If - ``False``, do not use TLS. If ``True``, use system default TLS - configuration. If TLS configuration present, that TLS - configuration will be used. - retry_config: Retry configuration for direct service calls (when - opted in) or all high-level calls made by this client (which all - opt-in to retries by default). If unset, a default retry - configuration is used. - keep_alive_config: Keep-alive configuration for the client - connection. Default is to check every 30s and kill the - connection if a response doesn't come back in 15s. Can be set to - ``None`` to disable. - rpc_metadata: Headers to use for all calls to the server. Keys here - can be overriden by per-call RPC metadata keys. - identity: Identity for this client. If unset, a default is created - based on the version of the SDK. - lazy: If true, the client will not connect until the first call is - attempted or a worker is created with it. Lazy clients cannot be - used for workers. - runtime: The runtime for this client, or the default if unset. - http_connect_proxy_config: Configuration for HTTP CONNECT proxy. - header_codec_behavior: Encoding behavior for headers sent by the client. - """ - connect_config = temporalio.service.ConnectConfig( - target_host=target_host, - api_key=api_key, - tls=tls, - retry_config=retry_config, - keep_alive_config=keep_alive_config, - rpc_metadata=rpc_metadata, - identity=identity or "", - lazy=lazy, - runtime=runtime, - http_connect_proxy_config=http_connect_proxy_config, - ) - - def make_lambda(plugin, next): - return lambda config: plugin.connect_service_client(config, next) - - next_function = ServiceClient.connect - for plugin in reversed(plugins): - next_function = make_lambda(plugin, next_function) - - service_client = await next_function(connect_config) - - return cls( - service_client, - namespace=namespace, - data_converter=data_converter, - interceptors=interceptors, - default_workflow_query_reject_condition=default_workflow_query_reject_condition, - header_codec_behavior=header_codec_behavior, - plugins=plugins, - ) - - def __init__( - self, - service_client: temporalio.service.ServiceClient, - *, - namespace: str = "default", - data_converter: temporalio.converter.DataConverter = temporalio.converter.DataConverter.default, - plugins: Sequence[Plugin] = [], - interceptors: Sequence[Interceptor] = [], - default_workflow_query_reject_condition: None - | (temporalio.common.QueryRejectCondition) = None, - header_codec_behavior: HeaderCodecBehavior = HeaderCodecBehavior.NO_CODEC, - ): - """Create a Temporal client from a service client. - - See :py:meth:`connect` for details on the parameters. - """ - # Store the config for tracking - config = ClientConfig( - service_client=service_client, - namespace=namespace, - data_converter=data_converter, - plugins=plugins, - interceptors=interceptors, - default_workflow_query_reject_condition=default_workflow_query_reject_condition, - header_codec_behavior=header_codec_behavior, - ) - self._initial_config = config.copy() - - for plugin in plugins: - config = plugin.configure_client(config) - - self._init_from_config(config) - - def _init_from_config(self, config: ClientConfig): - self._config = config - - # Iterate over interceptors in reverse building the impl - self._impl: OutboundInterceptor = _ClientImpl(self) - for interceptor in reversed(list(self._config["interceptors"])): - self._impl = interceptor.intercept_client(self._impl) - - def config(self, *, active_config: bool = False) -> ClientConfig: - """Config, as a dictionary, used to create this client. - - Args: - active_config: If true, return the modified configuration in use rather than the initial one - provided to the client. - - This makes a shallow copy of the config each call. - """ - config = self._config.copy() if active_config else self._initial_config.copy() - config["interceptors"] = list(config["interceptors"]) - return config - - @property - def service_client(self) -> temporalio.service.ServiceClient: - """Raw gRPC service client.""" - return self._config["service_client"] - - @property - def workflow_service(self) -> temporalio.service.WorkflowService: - """Raw gRPC workflow service client.""" - return self._config["service_client"].workflow_service - - @property - def operator_service(self) -> temporalio.service.OperatorService: - """Raw gRPC operator service client.""" - return self._config["service_client"].operator_service - - @property - def test_service(self) -> temporalio.service.TestService: - """Raw gRPC test service client.""" - return self._config["service_client"].test_service - - @property - def namespace(self) -> str: - """Namespace used in calls by this client.""" - return self._config["namespace"] - - @property - def identity(self) -> str: - """Identity used in calls by this client.""" - return self._config["service_client"].config.identity - - @property - def data_converter(self) -> temporalio.converter.DataConverter: - """Data converter used by this client.""" - return self._config["data_converter"] - - @property - def rpc_metadata(self) -> Mapping[str, str | bytes]: - """Headers for every call made by this client. - - Do not use mutate this mapping. Rather, set this property with an - entirely new mapping to change the headers. - """ - return self.service_client.config.rpc_metadata - - @rpc_metadata.setter - def rpc_metadata(self, value: Mapping[str, str | bytes]) -> None: - """Update the headers for this client. - - Do not mutate this mapping after set. Rather, set an entirely new - mapping if changes are needed. - - Raises: - TypeError: the key/value pair is not a valid gRPC ASCII or binary metadata. - All binary metadata must be supplied as bytes, and the key must end in '-bin'. - - .. warning:: - Attempting to set an invalid binary RPC metadata value may leave the client - in an inconsistent state (as well as raise a :py:class:`TypeError`). - """ - # Update config and perform update - # This may raise if the metadata is invalid: - self.service_client.update_rpc_metadata(value) - self.service_client.config.rpc_metadata = value - - @property - def api_key(self) -> str | None: - """API key for every call made by this client.""" - return self.service_client.config.api_key - - @api_key.setter - def api_key(self, value: str | None) -> None: - """Update the API key for this client. - - This is only set if RPCmetadata doesn't already have an "authorization" - key. - """ - # Update config and perform update - self.service_client.config.api_key = value - self.service_client.update_api_key(value) - - # Overload for no-param workflow - @overload - async def start_workflow( - self, - workflow: MethodAsyncNoParam[SelfType, ReturnType], - *, - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> WorkflowHandle[SelfType, ReturnType]: ... - - # Overload for single-param workflow - @overload - async def start_workflow( - self, - workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> WorkflowHandle[SelfType, ReturnType]: ... - - # Overload for multi-param workflow - @overload - async def start_workflow( - self, - workflow: Callable[ - Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] - ], - *, - args: Sequence[Any], - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> WorkflowHandle[SelfType, ReturnType]: ... - - # Overload for string-name workflow - @overload - async def start_workflow( - self, - workflow: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str, - task_queue: str, - result_type: type | None = None, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> WorkflowHandle[Any, Any]: ... - - async def start_workflow( - self, - workflow: str | Callable[..., Awaitable[Any]], - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str, - task_queue: str, - result_type: type | None = None, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - # The following options should not be considered part of the public API. They - # are deliberately not exposed in overloads, and are not subject to any - # backwards compatibility guarantees. - callbacks: Sequence[Callback] = [], - workflow_event_links: Sequence[ - temporalio.api.common.v1.Link.WorkflowEvent - ] = [], - request_id: str | None = None, - stack_level: int = 2, - ) -> WorkflowHandle[Any, Any]: - """Start a workflow and return its handle. - - Args: - workflow: String name or class method decorated with - ``@workflow.run`` for the workflow to start. - arg: Single argument to the workflow. - args: Multiple arguments to the workflow. Cannot be set if arg is. - id: Unique identifier for the workflow execution. - task_queue: Task queue to run the workflow on. - result_type: For string workflows, this can set the specific result - type hint to deserialize into. - execution_timeout: Total workflow execution timeout including - retries and continue as new. - run_timeout: Timeout of a single workflow run. - task_timeout: Timeout of a single workflow task. - id_conflict_policy: Behavior when a workflow is currently running with the same ID. - Default is UNSPECIFIED, which effectively means fail the start attempt. - Set to USE_EXISTING for idempotent deduplication on workflow ID. - Cannot be set if ``id_reuse_policy`` is set to TERMINATE_IF_RUNNING. - id_reuse_policy: Behavior when a closed workflow with the same ID exists. - Default is ALLOW_DUPLICATE. - retry_policy: Retry policy for the workflow. - cron_schedule: See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ - memo: Memo for the workflow. - search_attributes: Search attributes for the workflow. The - dictionary form of this is deprecated, use - :py:class:`temporalio.common.TypedSearchAttributes`. - static_summary: A single-line fixed summary for this workflow execution that may appear - in the UI/CLI. This can be in single-line Temporal markdown format. - static_details: General fixed details for this workflow execution that may appear in - UI/CLI. This can be in Temporal markdown format and can span multiple lines. This is - a fixed value on the workflow that cannot be updated. For details that can be - updated, use :py:meth:`temporalio.workflow.get_current_details` within the workflow. - start_delay: Amount of time to wait before starting the workflow. - This does not work with ``cron_schedule``. - start_signal: If present, this signal is sent as signal-with-start - instead of traditional workflow start. - start_signal_args: Arguments for start_signal if start_signal - present. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - request_eager_start: Potentially reduce the latency to start this workflow by - encouraging the server to start it on a local worker running with - this same client. - priority: Priority of the workflow execution. - versioning_override: Overrides the versioning behavior for this workflow. - - Returns: - A workflow handle to the started workflow. - - Raises: - temporalio.exceptions.WorkflowAlreadyStartedError: Workflow has - already been started. - RPCError: Workflow could not be started for some other reason. - """ - temporalio.common._warn_on_deprecated_search_attributes( - search_attributes, stack_level=stack_level - ) - name, result_type_from_type_hint = ( - temporalio.workflow._Definition.get_name_and_result_type(workflow) - ) - return await self._impl.start_workflow( - StartWorkflowInput( - workflow=name, - args=temporalio.common._arg_or_args(arg, args), - id=id, - task_queue=task_queue, - execution_timeout=execution_timeout, - run_timeout=run_timeout, - task_timeout=task_timeout, - id_reuse_policy=id_reuse_policy, - id_conflict_policy=id_conflict_policy, - retry_policy=retry_policy, - cron_schedule=cron_schedule, - memo=memo, - search_attributes=search_attributes, - start_delay=start_delay, - versioning_override=versioning_override, - headers={}, - static_summary=static_summary, - static_details=static_details, - start_signal=start_signal, - start_signal_args=start_signal_args, - ret_type=result_type or result_type_from_type_hint, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - request_eager_start=request_eager_start, - priority=priority, - callbacks=callbacks, - workflow_event_links=workflow_event_links, - request_id=request_id, - ) - ) - - # Overload for no-param workflow - @overload - async def execute_workflow( - self, - workflow: MethodAsyncNoParam[SelfType, ReturnType], - *, - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> ReturnType: ... - - # Overload for single-param workflow - @overload - async def execute_workflow( - self, - workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> ReturnType: ... - - # Overload for multi-param workflow - @overload - async def execute_workflow( - self, - workflow: Callable[ - Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] - ], - *, - args: Sequence[Any], - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> ReturnType: ... - - # Overload for string-name workflow - @overload - async def execute_workflow( - self, - workflow: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str, - task_queue: str, - result_type: type | None = None, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> Any: ... - - async def execute_workflow( - self, - workflow: str | Callable[..., Awaitable[Any]], - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str, - task_queue: str, - result_type: type | None = None, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - start_signal: str | None = None, - start_signal_args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - request_eager_start: bool = False, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> Any: - """Start a workflow and wait for completion. - - This is a shortcut for :py:meth:`start_workflow` + - :py:meth:`WorkflowHandle.result`. - """ - return await ( - # We have to tell MyPy to ignore errors here because we want to call - # the non-@overload form of this and MyPy does not support that - await self.start_workflow( # type: ignore - workflow, # type: ignore[arg-type] - arg, - args=args, - task_queue=task_queue, - result_type=result_type, - id=id, - execution_timeout=execution_timeout, - run_timeout=run_timeout, - task_timeout=task_timeout, - id_reuse_policy=id_reuse_policy, - id_conflict_policy=id_conflict_policy, - retry_policy=retry_policy, - cron_schedule=cron_schedule, - memo=memo, - search_attributes=search_attributes, - static_summary=static_summary, - static_details=static_details, - start_delay=start_delay, - start_signal=start_signal, - start_signal_args=start_signal_args, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - request_eager_start=request_eager_start, - priority=priority, - versioning_override=versioning_override, - stack_level=3, - ) - ).result() - - def get_workflow_handle( - self, - workflow_id: str, - *, - run_id: str | None = None, - first_execution_run_id: str | None = None, - result_type: type | None = None, - ) -> WorkflowHandle[Any, Any]: - """Get a workflow handle to an existing workflow by its ID. - - Args: - workflow_id: Workflow ID to get a handle to. - run_id: Run ID that will be used for all calls. - first_execution_run_id: First execution run ID used for cancellation - and termination. - result_type: The result type to deserialize into if known. - - Returns: - The workflow handle. - """ - return WorkflowHandle( - self, - workflow_id, - run_id=run_id, - result_run_id=run_id, - first_execution_run_id=first_execution_run_id, - result_type=result_type, - ) - - def get_workflow_handle_for( - self, - workflow: ( - MethodAsyncNoParam[SelfType, ReturnType] - | MethodAsyncSingleParam[SelfType, Any, ReturnType] - ), - workflow_id: str, - *, - run_id: str | None = None, - first_execution_run_id: str | None = None, - ) -> WorkflowHandle[SelfType, ReturnType]: - """Get a typed workflow handle to an existing workflow by its ID. - - This is the same as :py:meth:`get_workflow_handle` but typed. - - Args: - workflow: The workflow run method to use for typing the handle. - workflow_id: Workflow ID to get a handle to. - run_id: Run ID that will be used for all calls. - first_execution_run_id: First execution run ID used for cancellation - and termination. - - Returns: - The workflow handle. - """ - defn = temporalio.workflow._Definition.must_from_run_fn(workflow) - return self.get_workflow_handle( - workflow_id, - run_id=run_id, - first_execution_run_id=first_execution_run_id, - result_type=defn.ret_type, - ) - - # Overload for no-param update - @overload - async def execute_update_with_start_workflow( - self, - update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType], - *, - start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: ... - - # Overload for single-param update - @overload - async def execute_update_with_start_workflow( - self, - update: temporalio.workflow.UpdateMethodMultiParam[ - [SelfType, ParamType], LocalReturnType - ], - arg: ParamType, - *, - start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: ... - - # Overload for multi-param update - @overload - async def execute_update_with_start_workflow( - self, - update: temporalio.workflow.UpdateMethodMultiParam[ - MultiParamSpec, LocalReturnType - ], - *, - args: MultiParamSpec.args, # type: ignore - start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: ... - - # Overload for string-name update - @overload - async def execute_update_with_start_workflow( - self, - update: str, - arg: Any = temporalio.common._arg_unset, - *, - start_workflow_operation: WithStartWorkflowOperation[Any, Any], - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> Any: ... - - async def execute_update_with_start_workflow( - self, - update: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - start_workflow_operation: WithStartWorkflowOperation[Any, Any], - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> Any: - """Send an update-with-start request and wait for the update to complete. - - A WorkflowIDConflictPolicy must be set in the start_workflow_operation. If the - specified workflow execution is not running, a new workflow execution is started - and the update is sent in the first workflow task. Alternatively if the specified - workflow execution is running then, if the WorkflowIDConflictPolicy is - USE_EXISTING, the update is issued against the specified workflow, and if the - WorkflowIDConflictPolicy is FAIL, an error is returned. This call will block until - the update has completed, and return the update result. Note that this means that - the call will not return successfully until the update has been delivered to a - worker. - - Args: - update: Update function or name on the workflow. arg: Single argument to the - update. - args: Multiple arguments to the update. Cannot be set if arg is. - start_workflow_operation: a WithStartWorkflowOperation definining the - WorkflowIDConflictPolicy and how to start the workflow in the event that a - workflow is started. - id: ID of the update. If not set, the default is a new UUID. - result_type: For string updates, this can set the specific result - type hint to deserialize into. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Raises: - WorkflowUpdateFailedError: If the update failed. - WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out - or was cancelled. This doesn't mean the update itself was timed out or - cancelled. - - RPCError: There was some issue starting the workflow or sending the update to - the workflow. - """ - handle = await self._start_update_with_start( - update, - arg, - args=args, - start_workflow_operation=start_workflow_operation, - wait_for_stage=WorkflowUpdateStage.COMPLETED, - id=id, - result_type=result_type, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - return await handle.result() - - # Overload for no-param start update - @overload - async def start_update_with_start_workflow( - self, - update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType], - *, - start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], - wait_for_stage: WorkflowUpdateStage, - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[LocalReturnType]: ... - - # Overload for single-param start update - @overload - async def start_update_with_start_workflow( - self, - update: temporalio.workflow.UpdateMethodMultiParam[ - [SelfType, ParamType], LocalReturnType - ], - arg: ParamType, - *, - start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], - wait_for_stage: WorkflowUpdateStage, - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[LocalReturnType]: ... - - # Overload for multi-param start update - @overload - async def start_update_with_start_workflow( - self, - update: temporalio.workflow.UpdateMethodMultiParam[ - MultiParamSpec, LocalReturnType - ], - *, - args: MultiParamSpec.args, # type: ignore - start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], - wait_for_stage: WorkflowUpdateStage, - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[LocalReturnType]: ... - - # Overload for string-name start update - @overload - async def start_update_with_start_workflow( - self, - update: str, - arg: Any = temporalio.common._arg_unset, - *, - start_workflow_operation: WithStartWorkflowOperation[Any, Any], - wait_for_stage: WorkflowUpdateStage, - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[Any]: ... - - async def start_update_with_start_workflow( - self, - update: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - start_workflow_operation: WithStartWorkflowOperation[Any, Any], - wait_for_stage: WorkflowUpdateStage, - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[Any]: - """Send an update-with-start request and wait for it to be accepted. - - A WorkflowIDConflictPolicy must be set in the start_workflow_operation. If the - specified workflow execution is not running, a new workflow execution is started - and the update is sent in the first workflow task. Alternatively if the specified - workflow execution is running then, if the WorkflowIDConflictPolicy is - USE_EXISTING, the update is issued against the specified workflow, and if the - WorkflowIDConflictPolicy is FAIL, an error is returned. This call will block until - the update has been accepted, and return a WorkflowUpdateHandle. Note that this - means that the call will not return successfully until the update has been - delivered to a worker. - - .. warning:: - This API is experimental - - Args: - update: Update function or name on the workflow. arg: Single argument to the - update. - args: Multiple arguments to the update. Cannot be set if arg is. - start_workflow_operation: a WithStartWorkflowOperation definining the - WorkflowIDConflictPolicy and how to start the workflow in the event that a - workflow is started. - wait_for_stage: Required stage to wait until returning: either ACCEPTED or - COMPLETED. ADMITTED is not currently supported. See - https://docs.temporal.io/workflows#update for more details. - id: ID of the update. If not set, the default is a new UUID. - result_type: For string updates, this can set the specific result - type hint to deserialize into. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Raises: - WorkflowUpdateFailedError: If the update failed. - WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out - or was cancelled. This doesn't mean the update itself was timed out or - cancelled. - - RPCError: There was some issue starting the workflow or sending the update to - the workflow. - """ - return await self._start_update_with_start( - update, - arg, - wait_for_stage=wait_for_stage, - args=args, - id=id, - result_type=result_type, - start_workflow_operation=start_workflow_operation, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - - async def _start_update_with_start( - self, - update: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - wait_for_stage: WorkflowUpdateStage, - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[Any]: - if wait_for_stage == WorkflowUpdateStage.ADMITTED: - raise ValueError("ADMITTED wait stage not supported") - - if start_workflow_operation._used: - raise RuntimeError("WithStartWorkflowOperation cannot be reused") - start_workflow_operation._used = True - - update_name, result_type_from_type_hint = ( - temporalio.workflow._UpdateDefinition.get_name_and_result_type(update) - ) - - update_input = UpdateWithStartUpdateWorkflowInput( - update_id=id, - update=update_name, - args=temporalio.common._arg_or_args(arg, args), - headers={}, - ret_type=result_type or result_type_from_type_hint, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - wait_for_stage=wait_for_stage, - ) - - def on_start( - start_response: temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse, - ): - start_workflow_operation._workflow_handle.set_result( - WorkflowHandle( - self, - start_workflow_operation._start_workflow_input.id, - first_execution_run_id=start_response.run_id, - result_run_id=start_response.run_id, - result_type=start_workflow_operation._start_workflow_input.ret_type, - ) - ) - - def on_start_error( - error: BaseException, - ): - start_workflow_operation._workflow_handle.set_exception(error) - - input = StartWorkflowUpdateWithStartInput( - start_workflow_input=start_workflow_operation._start_workflow_input, - update_workflow_input=update_input, - _on_start=on_start, - _on_start_error=on_start_error, - ) - - return await self._impl.start_update_with_start_workflow(input) - - def list_workflows( - self, - query: str | None = None, - *, - limit: int | None = None, - page_size: int = 1000, - next_page_token: bytes | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowExecutionAsyncIterator: - """List workflows. - - This does not make a request until the first iteration is attempted. - Therefore any errors will not occur until then. - - Args: - query: A Temporal visibility list filter. See Temporal documentation - concerning visibility list filters including behavior when left - unset. - limit: Maximum number of workflows to return. If unset, all - workflows are returned. Only applies if using the - returned :py:class:`WorkflowExecutionAsyncIterator`. - as an async iterator. - page_size: Maximum number of results for each page. - next_page_token: A previously obtained next page token if doing - pagination. Usually not needed as the iterator automatically - starts from the beginning. - rpc_metadata: Headers used on each RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for each RPC call. - - Returns: - An async iterator that can be used with ``async for``. - """ - return self._impl.list_workflows( - ListWorkflowsInput( - query=query, - page_size=page_size, - next_page_token=next_page_token, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - limit=limit, - ) - ) - - async def count_workflows( - self, - query: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowExecutionCount: - """Count workflows. - - Args: - query: A Temporal visibility filter. See Temporal documentation - concerning visibility list filters. - rpc_metadata: Headers used on each RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for each RPC call. - - Returns: - Count of workflows. - """ - return await self._impl.count_workflows( - CountWorkflowsInput( - query=query, rpc_metadata=rpc_metadata, rpc_timeout=rpc_timeout - ) - ) - - @overload - def get_async_activity_handle( - self, *, workflow_id: str, run_id: str | None, activity_id: str - ) -> AsyncActivityHandle: - pass - - @overload - def get_async_activity_handle(self, *, task_token: bytes) -> AsyncActivityHandle: - pass - - def get_async_activity_handle( - self, - *, - workflow_id: str | None = None, - run_id: str | None = None, - activity_id: str | None = None, - task_token: bytes | None = None, - ) -> AsyncActivityHandle: - """Get an async activity handle. - - Either the workflow_id, run_id, and activity_id can be provided, or a - singular task_token can be provided. - - Args: - workflow_id: Workflow ID for the activity. Cannot be set if - task_token is set. - run_id: Run ID for the activity. Cannot be set if task_token is set. - activity_id: ID for the activity. Cannot be set if task_token is - set. - task_token: Task token for the activity. Cannot be set if any of the - id parameters are set. - - Returns: - A handle that can be used for completion or heartbeat. - """ - if task_token is not None: - if workflow_id is not None or run_id is not None or activity_id is not None: - raise ValueError("Task token cannot be present with other IDs") - return AsyncActivityHandle(self, task_token) - elif workflow_id is not None: - if activity_id is None: - raise ValueError( - "Workflow ID, run ID, and activity ID must all be given together" - ) - return AsyncActivityHandle( - self, - AsyncActivityIDReference( - workflow_id=workflow_id, run_id=run_id, activity_id=activity_id - ), - ) - raise ValueError("Task token or workflow/run/activity ID must be present") - - async def create_schedule( - self, - id: str, - schedule: Schedule, - *, - trigger_immediately: bool = False, - backfill: Sequence[ScheduleBackfill] = [], - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> ScheduleHandle: - """Create a schedule and return its handle. - - Args: - id: Unique identifier of the schedule. - schedule: Schedule to create. - trigger_immediately: If true, trigger one action immediately when - creating the schedule. - backfill: Set of time periods to take actions on as if that time - passed right now. - memo: Memo for the schedule. Memo for a scheduled workflow is part - of the schedule action. - search_attributes: Search attributes for the schedule. Search - attributes for a scheduled workflow are part of the scheduled - action. The dictionary form of this is DEPRECATED, use - :py:class:`temporalio.common.TypedSearchAttributes`. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Returns: - A handle to the created schedule. - - Raises: - ScheduleAlreadyRunningError: If a schedule with this ID is already - running. - """ - temporalio.common._warn_on_deprecated_search_attributes(search_attributes) - return await self._impl.create_schedule( - CreateScheduleInput( - id=id, - schedule=schedule, - trigger_immediately=trigger_immediately, - backfill=backfill, - memo=memo, - search_attributes=search_attributes, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - def get_schedule_handle(self, id: str) -> ScheduleHandle: - """Get a schedule handle for the given ID.""" - return ScheduleHandle(self, id) - - async def list_schedules( - self, - query: str | None = None, - *, - page_size: int = 1000, - next_page_token: bytes | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> ScheduleAsyncIterator: - """List schedules. - - This does not make a request until the first iteration is attempted. - Therefore any errors will not occur until then. - - Note, this list is eventually consistent. Therefore if a schedule is - added or deleted, it may not be available in the list immediately. - - Args: - page_size: Maximum number of results for each page. - query: A Temporal visibility list filter. See Temporal documentation - concerning visibility list filters including behavior when left - unset. - next_page_token: A previously obtained next page token if doing - pagination. Usually not needed as the iterator automatically - starts from the beginning. - rpc_metadata: Headers used on each RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for each RPC call. - - Returns: - An async iterator that can be used with ``async for``. - """ - return self._impl.list_schedules( - ListSchedulesInput( - page_size=page_size, - next_page_token=next_page_token, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - query=query, - ) - ) - - async def update_worker_build_id_compatibility( - self, - task_queue: str, - operation: BuildIdOp, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Used to add new Build IDs or otherwise update the relative compatibility of Build Ids as - defined on a specific task queue for the Worker Versioning feature. - - For more on this feature, see https://docs.temporal.io/workers#worker-versioning - - .. warning:: - This API is experimental - - Args: - task_queue: The task queue to target. - operation: The operation to perform. - rpc_metadata: Headers used on each RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for each RPC call. - """ - return await self._impl.update_worker_build_id_compatibility( - UpdateWorkerBuildIdCompatibilityInput( - task_queue, - operation, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - async def get_worker_build_id_compatibility( - self, - task_queue: str, - max_sets: int | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkerBuildIdVersionSets: - """Get the Build ID compatibility sets for a specific task queue. - - For more on this feature, see https://docs.temporal.io/workers#worker-versioning - - .. warning:: - This API is experimental - - Args: - task_queue: The task queue to target. - max_sets: The maximum number of sets to return. If not specified, all sets will be - returned. - rpc_metadata: Headers used on each RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for each RPC call. - """ - return await self._impl.get_worker_build_id_compatibility( - GetWorkerBuildIdCompatibilityInput( - task_queue, - max_sets, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - async def get_worker_task_reachability( - self, - build_ids: Sequence[str], - task_queues: Sequence[str] = [], - reachability_type: TaskReachabilityType | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkerTaskReachability: - """Determine if some Build IDs for certain Task Queues could have tasks dispatched to them. - - For more on this feature, see https://docs.temporal.io/workers#worker-versioning - - .. warning:: - This API is experimental - - Args: - build_ids: The Build IDs to query the reachability of. At least one must be specified. - task_queues: Task Queues to restrict the query to. If not specified, all Task Queues - will be searched. When requesting a large number of task queues or all task queues - associated with the given Build IDs in a namespace, all Task Queues will be listed - in the response but some of them may not contain reachability information due to a - server enforced limit. When reaching the limit, task queues that reachability - information could not be retrieved for will be marked with a ``NotFetched`` entry in - {@link BuildIdReachability.taskQueueReachability}. The caller may issue another call - to get the reachability for those task queues. - reachability_type: The kind of reachability this request is concerned with. - rpc_metadata: Headers used on each RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for each RPC call. - """ - return await self._impl.get_worker_task_reachability( - GetWorkerTaskReachabilityInput( - build_ids, - task_queues, - reachability_type, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - -class ClientConfig(TypedDict, total=False): - """TypedDict of config originally passed to :py:meth:`Client`.""" - - service_client: Required[temporalio.service.ServiceClient] - namespace: Required[str] - data_converter: Required[temporalio.converter.DataConverter] - plugins: Required[Sequence[Plugin]] - interceptors: Required[Sequence[Interceptor]] - default_workflow_query_reject_condition: Required[ - temporalio.common.QueryRejectCondition | None - ] - header_codec_behavior: Required[HeaderCodecBehavior] - - -class WorkflowHistoryEventFilterType(IntEnum): - """Type of history events to get for a workflow. - - See :py:class:`temporalio.api.enums.v1.HistoryEventFilterType`. - """ - - ALL_EVENT = int( - temporalio.api.enums.v1.HistoryEventFilterType.HISTORY_EVENT_FILTER_TYPE_ALL_EVENT - ) - CLOSE_EVENT = int( - temporalio.api.enums.v1.HistoryEventFilterType.HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT - ) - - -class WorkflowHandle(Generic[SelfType, ReturnType]): - """Handle for interacting with a workflow. - - This is usually created via :py:meth:`Client.get_workflow_handle` or - returned from :py:meth:`Client.start_workflow`. - """ - - def __init__( - self, - client: Client, - id: str, - *, - run_id: str | None = None, - result_run_id: str | None = None, - first_execution_run_id: str | None = None, - result_type: type | None = None, - start_workflow_response: None - | ( - temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse - | temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse - ) = None, - ) -> None: - """Create workflow handle.""" - self._client = client - self._id = id - self._run_id = run_id - self._result_run_id = result_run_id - self._first_execution_run_id = first_execution_run_id - self._result_type = result_type - self._start_workflow_response = start_workflow_response - self.__temporal_eagerly_started = False - - @functools.cached_property - def _data_converter(self) -> temporalio.converter.DataConverter: - return self._client.data_converter.with_context( - temporalio.converter.WorkflowSerializationContext( - namespace=self._client.namespace, workflow_id=self._id - ) - ) - - @property - def id(self) -> str: - """ID for the workflow.""" - return self._id - - @property - def run_id(self) -> str | None: - """If present, run ID used to ensure that requested operations apply - to this exact run. - - This is only created via :py:meth:`Client.get_workflow_handle`. - :py:meth:`Client.start_workflow` will not set this value. - - This cannot be mutated. If a different run ID is needed, - :py:meth:`Client.get_workflow_handle` must be used instead. - """ - return self._run_id - - @property - def result_run_id(self) -> str | None: - """Run ID used for :py:meth:`result` calls if present to ensure result - is for a workflow starting from this run. - - When this handle is created via :py:meth:`Client.get_workflow_handle`, - this is the same as run_id. When this handle is created via - :py:meth:`Client.start_workflow`, this value will be the resulting run - ID. - - This cannot be mutated. If a different run ID is needed, - :py:meth:`Client.get_workflow_handle` must be used instead. - """ - return self._result_run_id - - @property - def first_execution_run_id(self) -> str | None: - """Run ID used to ensure requested operations apply to a workflow ID - started with this run ID. - - This can be set when using :py:meth:`Client.get_workflow_handle`. When - :py:meth:`Client.start_workflow` is called without a start signal, this - is set to the resulting run. - - This cannot be mutated. If a different first execution run ID is needed, - :py:meth:`Client.get_workflow_handle` must be used instead. - """ - return self._first_execution_run_id - - async def result( - self, - *, - follow_runs: bool = True, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> ReturnType: - """Wait for result of the workflow. - - This will use :py:attr:`result_run_id` if present to base the result on. - To use another run ID, a new handle must be created via - :py:meth:`Client.get_workflow_handle`. - - Args: - follow_runs: If true (default), workflow runs will be continually - fetched, until the most recent one is found. If false, return - the result from the first run targeted by the request if that run - ends in a result, otherwise raise an exception. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for each RPC call. Note, - this is the timeout for each history RPC call not this overall - function. - - Returns: - Result of the workflow after being converted by the data converter. - - Raises: - WorkflowFailureError: Workflow failed, was cancelled, was - terminated, or timed out. Use the - :py:attr:`WorkflowFailureError.cause` to see the underlying - reason. - Exception: Other possible failures during result fetching. - """ - # We have to maintain our own run ID because it can change if we follow - # executions - hist_run_id = self._result_run_id - while True: - async for event in self._fetch_history_events_for_run( - hist_run_id, - wait_new_event=True, - event_filter_type=WorkflowHistoryEventFilterType.CLOSE_EVENT, - skip_archival=True, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ): - if event.HasField("workflow_execution_completed_event_attributes"): - complete_attr = event.workflow_execution_completed_event_attributes - # Follow execution - if follow_runs and complete_attr.new_execution_run_id: - hist_run_id = complete_attr.new_execution_run_id - break - # Ignoring anything after the first response like TypeScript - type_hints = [self._result_type] if self._result_type else None - results = await self._data_converter.decode_wrapper( - complete_attr.result, - type_hints, - ) - if not results: - return cast(ReturnType, None) - elif len(results) > 1: - warnings.warn(f"Expected single result, got {len(results)}") - return cast(ReturnType, results[0]) - elif event.HasField("workflow_execution_failed_event_attributes"): - fail_attr = event.workflow_execution_failed_event_attributes - # Follow execution - if follow_runs and fail_attr.new_execution_run_id: - hist_run_id = fail_attr.new_execution_run_id - break - raise WorkflowFailureError( - cause=await self._data_converter.decode_failure( - fail_attr.failure - ), - ) - elif event.HasField("workflow_execution_canceled_event_attributes"): - cancel_attr = event.workflow_execution_canceled_event_attributes - raise WorkflowFailureError( - cause=temporalio.exceptions.CancelledError( - "Workflow cancelled", - *( - await self._data_converter.decode_wrapper( - cancel_attr.details - ) - ), - ) - ) - elif event.HasField("workflow_execution_terminated_event_attributes"): - term_attr = event.workflow_execution_terminated_event_attributes - raise WorkflowFailureError( - cause=temporalio.exceptions.TerminatedError( - term_attr.reason or "Workflow terminated", - *( - await self._data_converter.decode_wrapper( - term_attr.details - ) - ), - ), - ) - elif event.HasField("workflow_execution_timed_out_event_attributes"): - time_attr = event.workflow_execution_timed_out_event_attributes - # Follow execution - if follow_runs and time_attr.new_execution_run_id: - hist_run_id = time_attr.new_execution_run_id - break - raise WorkflowFailureError( - cause=temporalio.exceptions.TimeoutError( - "Workflow timed out", - type=temporalio.exceptions.TimeoutType.START_TO_CLOSE, - last_heartbeat_details=[], - ), - ) - elif event.HasField( - "workflow_execution_continued_as_new_event_attributes" - ): - cont_attr = ( - event.workflow_execution_continued_as_new_event_attributes - ) - if not cont_attr.new_execution_run_id: - raise RuntimeError( - "Unexpectedly missing new run ID from continue as new" - ) - # Follow execution - if follow_runs: - hist_run_id = cont_attr.new_execution_run_id - break - raise WorkflowContinuedAsNewError(cont_attr.new_execution_run_id) - # This is reached on break which means that there's a different run - # ID if we're following. If there's not, it's an error because no - # event was given (should never happen). - if hist_run_id is None: - raise RuntimeError("No completion event found") - - async def cancel( - self, - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Cancel the workflow. - - This will issue a cancellation for :py:attr:`run_id` if present. This - call will make sure to use the run chain starting from - :py:attr:`first_execution_run_id` if present. To create handles with - these values, use :py:meth:`Client.get_workflow_handle`. - - .. warning:: - Handles created as a result of :py:meth:`Client.start_workflow` with - a start signal will cancel the latest workflow with the same - workflow ID even if it is unrelated to the started workflow. - - Args: - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Raises: - RPCError: Workflow could not be cancelled. - """ - await self._client._impl.cancel_workflow( - CancelWorkflowInput( - id=self._id, - run_id=self._run_id, - first_execution_run_id=self._first_execution_run_id, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - async def describe( - self, - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowExecutionDescription: - """Get workflow details. - - This will get details for :py:attr:`run_id` if present. To use a - different run ID, create a new handle with via - :py:meth:`Client.get_workflow_handle`. - - .. warning:: - Handles created as a result of :py:meth:`Client.start_workflow` will - describe the latest workflow with the same workflow ID even if it is - unrelated to the started workflow. - - Args: - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Returns: - Workflow details. - - Raises: - RPCError: Workflow details could not be fetched. - """ - return await self._client._impl.describe_workflow( - DescribeWorkflowInput( - id=self._id, - run_id=self._run_id, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - async def fetch_history( - self, - *, - event_filter_type: WorkflowHistoryEventFilterType = WorkflowHistoryEventFilterType.ALL_EVENT, - skip_archival: bool = False, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowHistory: - """Get workflow history. - - This is a shortcut for :py:meth:`fetch_history_events` that just fetches - all events. - """ - return WorkflowHistory( - workflow_id=self.id, - events=[ - v - async for v in self.fetch_history_events( - event_filter_type=event_filter_type, - skip_archival=skip_archival, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ], - ) - - def fetch_history_events( - self, - *, - page_size: int | None = None, - next_page_token: bytes | None = None, - wait_new_event: bool = False, - event_filter_type: WorkflowHistoryEventFilterType = WorkflowHistoryEventFilterType.ALL_EVENT, - skip_archival: bool = False, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowHistoryEventAsyncIterator: - """Get workflow history events as an async iterator. - - This does not make a request until the first iteration is attempted. - Therefore any errors will not occur until then. - - Args: - page_size: Maximum amount to fetch per request if any maximum. - next_page_token: A specific page token to fetch. - wait_new_event: Whether the event fetching request will wait for new - events or just return right away. - event_filter_type: Which events to obtain. - skip_archival: Whether to skip archival. - rpc_metadata: Headers used on each RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for each RPC call. - - Returns: - An async iterator that doesn't begin fetching until iterated on. - """ - return self._fetch_history_events_for_run( - self._run_id, - page_size=page_size, - next_page_token=next_page_token, - wait_new_event=wait_new_event, - event_filter_type=event_filter_type, - skip_archival=skip_archival, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - - def _fetch_history_events_for_run( - self, - run_id: str | None, - *, - page_size: int | None = None, - next_page_token: bytes | None = None, - wait_new_event: bool = False, - event_filter_type: WorkflowHistoryEventFilterType = WorkflowHistoryEventFilterType.ALL_EVENT, - skip_archival: bool = False, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowHistoryEventAsyncIterator: - return self._client._impl.fetch_workflow_history_events( - FetchWorkflowHistoryEventsInput( - id=self._id, - run_id=run_id, - page_size=page_size, - next_page_token=next_page_token, - wait_new_event=wait_new_event, - event_filter_type=event_filter_type, - skip_archival=skip_archival, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - # Overload for no-param query - @overload - async def query( - self, - query: MethodSyncOrAsyncNoParam[SelfType, LocalReturnType], - *, - reject_condition: temporalio.common.QueryRejectCondition | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: ... - - # Overload for single-param query - @overload - async def query( - self, - query: MethodSyncOrAsyncSingleParam[SelfType, ParamType, LocalReturnType], - arg: ParamType, - *, - reject_condition: temporalio.common.QueryRejectCondition | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: ... - - # Overload for multi-param query - @overload - async def query( - self, - query: Callable[ - Concatenate[SelfType, MultiParamSpec], - Awaitable[LocalReturnType] | LocalReturnType, - ], - *, - args: Sequence[Any], - reject_condition: temporalio.common.QueryRejectCondition | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: ... - - # Overload for string-name query - @overload - async def query( - self, - query: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - result_type: type | None = None, - reject_condition: temporalio.common.QueryRejectCondition | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> Any: ... - - async def query( - self, - query: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - result_type: type | None = None, - reject_condition: temporalio.common.QueryRejectCondition | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> Any: - """Query the workflow. - - This will query for :py:attr:`run_id` if present. To use a different - run ID, create a new handle with - :py:meth:`Client.get_workflow_handle`. - - .. warning:: - Handles created as a result of :py:meth:`Client.start_workflow` will - query the latest workflow with the same workflow ID even if it is - unrelated to the started workflow. - - Args: - query: Query function or name on the workflow. - arg: Single argument to the query. - args: Multiple arguments to the query. Cannot be set if arg is. - result_type: For string queries, this can set the specific result - type hint to deserialize into. - reject_condition: Condition for rejecting the query. If unset/None, - defaults to the client's default (which is defaulted to None). - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Returns: - Result of the query. - - Raises: - WorkflowQueryRejectedError: A query reject condition was satisfied. - RPCError: Workflow details could not be fetched. - """ - query_name: str - ret_type = result_type - if callable(query): - defn = temporalio.workflow._QueryDefinition.from_fn(query) - if not defn: - raise RuntimeError( - f"Query definition not found on {query.__qualname__}, " - "is it decorated with @workflow.query?" - ) - elif not defn.name: - raise RuntimeError("Cannot invoke dynamic query definition") - # TODO(cretz): Check count/type of args at runtime? - query_name = defn.name - ret_type = defn.ret_type - else: - query_name = str(query) - - return await self._client._impl.query_workflow( - QueryWorkflowInput( - id=self._id, - run_id=self._run_id, - query=query_name, - args=temporalio.common._arg_or_args(arg, args), - reject_condition=reject_condition - or self._client._config["default_workflow_query_reject_condition"], - headers={}, - ret_type=ret_type, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - # Overload for no-param signal - @overload - async def signal( - self, - signal: MethodSyncOrAsyncNoParam[SelfType, None], - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: ... - - # Overload for single-param signal - @overload - async def signal( - self, - signal: MethodSyncOrAsyncSingleParam[SelfType, ParamType, None], - arg: ParamType, - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: ... - - # Overload for multi-param signal - @overload - async def signal( - self, - signal: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[None] | None], - *, - args: Sequence[Any], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: ... - - # Overload for string-name signal - @overload - async def signal( - self, - signal: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: ... - - async def signal( - self, - signal: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Send a signal to the workflow. - - This will signal for :py:attr:`run_id` if present. To use a different - run ID, create a new handle with via - :py:meth:`Client.get_workflow_handle`. - - .. warning:: - Handles created as a result of :py:meth:`Client.start_workflow` will - signal the latest workflow with the same workflow ID even if it is - unrelated to the started workflow. - - Args: - signal: Signal function or name on the workflow. - arg: Single argument to the signal. - args: Multiple arguments to the signal. Cannot be set if arg is. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Raises: - RPCError: Workflow could not be signalled. - """ - await self._client._impl.signal_workflow( - SignalWorkflowInput( - id=self._id, - run_id=self._run_id, - signal=temporalio.workflow._SignalDefinition.must_name_from_fn_or_str( - signal - ), - args=temporalio.common._arg_or_args(arg, args), - headers={}, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - async def terminate( - self, - *args: Any, - reason: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Terminate the workflow. - - This will issue a termination for :py:attr:`run_id` if present. This - call will make sure to use the run chain starting from - :py:attr:`first_execution_run_id` if present. To create handles with - these values, use :py:meth:`Client.get_workflow_handle`. - - .. warning:: - Handles created as a result of :py:meth:`Client.start_workflow` with - a start signal will terminate the latest workflow with the same - workflow ID even if it is unrelated to the started workflow. - - Args: - args: Details to store on the termination. - reason: Reason for the termination. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Raises: - RPCError: Workflow could not be terminated. - """ - await self._client._impl.terminate_workflow( - TerminateWorkflowInput( - id=self._id, - run_id=self._run_id, - args=args, - reason=reason, - first_execution_run_id=self._first_execution_run_id, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - ) - - # Overload for no-param update - @overload - async def execute_update( - self, - update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType], - *, - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: ... - - # Overload for single-param update - @overload - async def execute_update( - self, - update: temporalio.workflow.UpdateMethodMultiParam[ - [SelfType, ParamType], LocalReturnType - ], - arg: ParamType, - *, - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: ... - - # Overload for multi-param update - @overload - async def execute_update( - self, - update: temporalio.workflow.UpdateMethodMultiParam[ - MultiParamSpec, LocalReturnType - ], - *, - args: MultiParamSpec.args, # type: ignore - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: ... - - # Overload for string-name update - @overload - async def execute_update( - self, - update: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> Any: ... - - async def execute_update( - self, - update: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> Any: - """Send an update request to the workflow and wait for it to complete. - - This will target the workflow with :py:attr:`run_id` if present. To use a - different run ID, create a new handle with via :py:meth:`Client.get_workflow_handle`. - - Args: - update: Update function or name on the workflow. - arg: Single argument to the update. - args: Multiple arguments to the update. Cannot be set if arg is. - id: ID of the update. If not set, the default is a new UUID. - result_type: For string updates, this can set the specific result - type hint to deserialize into. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Raises: - WorkflowUpdateFailedError: If the update failed. - WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out - or was cancelled. This doesn't mean the update itself was timed - out or cancelled. - RPCError: There was some issue sending the update to the workflow. - """ - handle = await self._start_update( - update, - arg, - args=args, - wait_for_stage=WorkflowUpdateStage.COMPLETED, - id=id, - result_type=result_type, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - return await handle.result() - - # Overload for no-param start update - @overload - async def start_update( - self, - update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType], - *, - wait_for_stage: WorkflowUpdateStage, - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[LocalReturnType]: ... - - # Overload for single-param start update - @overload - async def start_update( - self, - update: temporalio.workflow.UpdateMethodMultiParam[ - [SelfType, ParamType], LocalReturnType - ], - arg: ParamType, - *, - wait_for_stage: WorkflowUpdateStage, - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[LocalReturnType]: ... - - # Overload for multi-param start update - @overload - async def start_update( - self, - update: temporalio.workflow.UpdateMethodMultiParam[ - MultiParamSpec, LocalReturnType - ], - *, - args: MultiParamSpec.args, # type: ignore - wait_for_stage: WorkflowUpdateStage, - id: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[LocalReturnType]: ... - - # Overload for string-name start update - @overload - async def start_update( - self, - update: str, - arg: Any = temporalio.common._arg_unset, - *, - wait_for_stage: WorkflowUpdateStage, - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[Any]: ... - - async def start_update( - self, - update: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - wait_for_stage: WorkflowUpdateStage, - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[Any]: - """Send an update request to the workflow and return a handle to it. - - This will target the workflow with :py:attr:`run_id` if present. To use a - different run ID, create a new handle with via :py:meth:`Client.get_workflow_handle`. - - Args: - update: Update function or name on the workflow. arg: Single argument to the - update. - wait_for_stage: Required stage to wait until returning: either ACCEPTED or - COMPLETED. ADMITTED is not currently supported. See - https://docs.temporal.io/workflows#update for more details. - args: Multiple arguments to the update. Cannot be set if arg is. - id: ID of the update. If not set, the default is a new UUID. - result_type: For string updates, this can set the specific result - type hint to deserialize into. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - - Raises: - WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out - or was cancelled. This doesn't mean the update itself was timed out or - cancelled. - RPCError: There was some issue sending the update to the workflow. - """ - return await self._start_update( - update, - arg, - wait_for_stage=wait_for_stage, - args=args, - id=id, - result_type=result_type, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - - async def _start_update( - self, - update: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - wait_for_stage: WorkflowUpdateStage, - args: Sequence[Any] = [], - id: str | None = None, - result_type: type | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> WorkflowUpdateHandle[Any]: - if wait_for_stage == WorkflowUpdateStage.ADMITTED: - raise ValueError("ADMITTED wait stage not supported") - - update_name, result_type_from_type_hint = ( - temporalio.workflow._UpdateDefinition.get_name_and_result_type(update) - ) - - return await self._client._impl.start_workflow_update( - StartWorkflowUpdateInput( - id=self._id, - run_id=self._run_id, - first_execution_run_id=self.first_execution_run_id, - update_id=id, - update=update_name, - args=temporalio.common._arg_or_args(arg, args), - headers={}, - ret_type=result_type or result_type_from_type_hint, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - wait_for_stage=wait_for_stage, - ) - ) - - def get_update_handle( - self, - id: str, - *, - workflow_run_id: str | None = None, - result_type: type | None = None, - ) -> WorkflowUpdateHandle[Any]: - """Get a handle for an update. The handle can be used to wait on the - update result. - - Users may prefer the more typesafe :py:meth:`get_update_handle_for` - which accepts an update definition. - - Args: - id: Update ID to get a handle to. - workflow_run_id: Run ID to tie the handle to. If this is not set, - the :py:attr:`run_id` will be used. - result_type: The result type to deserialize into if known. - - Returns: - The update handle. - """ - return WorkflowUpdateHandle( - self._client, - id, - self._id, - workflow_run_id=workflow_run_id or self._run_id, - result_type=result_type, - ) - - def get_update_handle_for( - self, - update: temporalio.workflow.UpdateMethodMultiParam[Any, LocalReturnType], - id: str, - *, - workflow_run_id: str | None = None, - ) -> WorkflowUpdateHandle[LocalReturnType]: - """Get a typed handle for an update. The handle can be used to wait on - the update result. - - This is the same as :py:meth:`get_update_handle` but typed. - - Args: - update: The update method to use for typing the handle. - id: Update ID to get a handle to. - workflow_run_id: Run ID to tie the handle to. If this is not set, - the :py:attr:`run_id` will be used. - - Returns: - The update handle. - """ - return self.get_update_handle( - id, workflow_run_id=workflow_run_id, result_type=update._defn.ret_type - ) - - -class WithStartWorkflowOperation(Generic[SelfType, ReturnType]): - """Defines a start-workflow operation used by update-with-start requests. - - Update-With-Start allows you to send an update to a workflow, while starting the - workflow if necessary. - """ - - # Overload for no-param workflow, with_start - @overload - def __init__( - self, - workflow: MethodAsyncNoParam[SelfType, ReturnType], - *, - id: str, - task_queue: str, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> None: ... - - # Overload for single-param workflow, with_start - @overload - def __init__( - self, - workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - id: str, - task_queue: str, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> None: ... - - # Overload for multi-param workflow, with_start - @overload - def __init__( - self, - workflow: Callable[ - Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] - ], - *, - args: Sequence[Any], - id: str, - task_queue: str, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> None: ... - - # Overload for string-name workflow, with_start - @overload - def __init__( - self, - workflow: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str, - task_queue: str, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, - result_type: type | None = None, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - ) -> None: ... - - def __init__( - self, - workflow: str | Callable[..., Awaitable[Any]], - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str, - task_queue: str, - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, - result_type: type | None = None, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes - ) = None, - static_summary: str | None = None, - static_details: str | None = None, - start_delay: timedelta | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - versioning_override: temporalio.common.VersioningOverride | None = None, - stack_level: int = 2, - ) -> None: - """Create a WithStartWorkflowOperation. - - See :py:meth:`temporalio.client.Client.start_workflow` for documentation of the - arguments. - """ - temporalio.common._warn_on_deprecated_search_attributes( - search_attributes, stack_level=stack_level - ) - name, result_type_from_run_fn = ( - temporalio.workflow._Definition.get_name_and_result_type(workflow) - ) - if id_conflict_policy == temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED: - raise ValueError("WorkflowIDConflictPolicy is required") - - self._start_workflow_input = UpdateWithStartStartWorkflowInput( - workflow=name, - args=temporalio.common._arg_or_args(arg, args), - id=id, - task_queue=task_queue, - execution_timeout=execution_timeout, - run_timeout=run_timeout, - task_timeout=task_timeout, - id_reuse_policy=id_reuse_policy, - id_conflict_policy=id_conflict_policy, - retry_policy=retry_policy, - cron_schedule=cron_schedule, - memo=memo, - search_attributes=search_attributes, - static_summary=static_summary, - static_details=static_details, - start_delay=start_delay, - headers={}, - ret_type=result_type or result_type_from_run_fn, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - priority=priority, - versioning_override=versioning_override, - ) - self._workflow_handle: Future[WorkflowHandle[SelfType, ReturnType]] = Future() - self._used = False - - async def workflow_handle(self) -> WorkflowHandle[SelfType, ReturnType]: - """Wait until workflow is running and return a WorkflowHandle.""" - return await self._workflow_handle - - -@dataclass(frozen=True) -class AsyncActivityIDReference: - """Reference to an async activity by its qualified ID.""" - - workflow_id: str - run_id: str | None - activity_id: str - - -class AsyncActivityHandle(WithSerializationContext): - """Handle representing an external activity for completion and heartbeat.""" - - def __init__( - self, - client: Client, - id_or_token: AsyncActivityIDReference | bytes, - data_converter_override: DataConverter | None = None, - ) -> None: - """Create an async activity handle.""" - self._client = client - self._id_or_token = id_or_token - self._data_converter_override = data_converter_override - - async def heartbeat( - self, - *details: Any, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Record a heartbeat for the activity. - - Args: - details: Details of the heartbeat. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - await self._client._impl.heartbeat_async_activity( - HeartbeatAsyncActivityInput( - id_or_token=self._id_or_token, - details=details, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - data_converter_override=self._data_converter_override, - ), - ) - - async def complete( - self, - result: Any | None = temporalio.common._arg_unset, - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Complete the activity. - - Args: - result: Result of the activity if any. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - await self._client._impl.complete_async_activity( - CompleteAsyncActivityInput( - id_or_token=self._id_or_token, - result=result, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - data_converter_override=self._data_converter_override, - ), - ) - - async def fail( - self, - error: Exception, - *, - last_heartbeat_details: Sequence[Any] = [], - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Fail the activity. - - Args: - error: Error for the activity. - last_heartbeat_details: Last heartbeat details for the activity. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - await self._client._impl.fail_async_activity( - FailAsyncActivityInput( - id_or_token=self._id_or_token, - error=error, - last_heartbeat_details=last_heartbeat_details, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - data_converter_override=self._data_converter_override, - ), - ) - - async def report_cancellation( - self, - *details: Any, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Report the activity as cancelled. - - Args: - details: Cancellation details. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - await self._client._impl.report_cancellation_async_activity( - ReportCancellationAsyncActivityInput( - id_or_token=self._id_or_token, - details=details, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - data_converter_override=self._data_converter_override, - ), - ) - - def with_context(self, context: SerializationContext) -> Self: - """Create a new AsyncActivityHandle with a different serialization context. - - Payloads received by the activity will be decoded and deserialized using a data converter - with :py:class:`ActivitySerializationContext` set as context. If you are using a custom data - converter that makes use of this context then you can use this method to supply matching - context data to the data converter used to serialize and encode the outbound payloads. - """ - data_converter = self._client.data_converter.with_context(context) - if data_converter is self._client.data_converter: - return self - cls = type(self) - if cls.__init__ is not AsyncActivityHandle.__init__: - raise TypeError( - "If you have subclassed AsyncActivityHandle and overridden the __init__ method " - "then you must override with_context to return an instance of your class." - ) - return cls( - self._client, - self._id_or_token, - data_converter, - ) - - -@dataclass -class WorkflowExecution: - """Info for a single workflow execution run.""" - - close_time: datetime | None - """When the workflow was closed if closed.""" - - execution_time: datetime | None - """When this workflow run started or should start.""" - - history_length: int - """Number of events in the history.""" - - id: str - """ID for the workflow.""" - - namespace: str - """Namespace for the workflow.""" - - parent_id: str | None - """ID for the parent workflow if this was started as a child.""" - - parent_run_id: str | None - """Run ID for the parent workflow if this was started as a child.""" - - root_id: str | None - """ID for the root workflow.""" - - root_run_id: str | None - """Run ID for the root workflow.""" - - raw_info: temporalio.api.workflow.v1.WorkflowExecutionInfo - """Underlying protobuf info.""" - - run_id: str - """Run ID for this workflow run.""" - - search_attributes: temporalio.common.SearchAttributes - """Current set of search attributes if any. - - .. deprecated:: - Use :py:attr:`typed_search_attributes` instead. - """ - - start_time: datetime - """When the workflow was created.""" - - status: WorkflowExecutionStatus | None - """Status for the workflow.""" - - task_queue: str - """Task queue for the workflow.""" - - typed_search_attributes: temporalio.common.TypedSearchAttributes - """Current set of search attributes if any.""" - - workflow_type: str - """Type name for the workflow.""" - - _context_free_data_converter: temporalio.converter.DataConverter - - @property - def data_converter(self) -> temporalio.converter.DataConverter: - """Data converter for the workflow.""" - return self._context_free_data_converter.with_context( - WorkflowSerializationContext( - namespace=self.namespace, - workflow_id=self.id, - ) - ) - - @classmethod - def _from_raw_info( - cls, - info: temporalio.api.workflow.v1.WorkflowExecutionInfo, - namespace: str, - converter: temporalio.converter.DataConverter, - **additional_fields: Any, - ) -> Self: - return cls( - close_time=( - info.close_time.ToDatetime().replace(tzinfo=timezone.utc) - if info.HasField("close_time") - else None - ), - execution_time=( - info.execution_time.ToDatetime().replace(tzinfo=timezone.utc) - if info.HasField("execution_time") - else None - ), - history_length=info.history_length, - id=info.execution.workflow_id, - namespace=namespace, - parent_id=( - info.parent_execution.workflow_id - if info.HasField("parent_execution") - else None - ), - parent_run_id=( - info.parent_execution.run_id - if info.HasField("parent_execution") - else None - ), - root_id=( - info.root_execution.workflow_id - if info.HasField("root_execution") - else None - ), - root_run_id=( - info.root_execution.run_id if info.HasField("root_execution") else None - ), - raw_info=info, - run_id=info.execution.run_id, - search_attributes=temporalio.converter.decode_search_attributes( - info.search_attributes - ), - start_time=info.start_time.ToDatetime().replace(tzinfo=timezone.utc), - status=WorkflowExecutionStatus(info.status) if info.status else None, - task_queue=info.task_queue, - typed_search_attributes=temporalio.converter.decode_typed_search_attributes( - info.search_attributes - ), - workflow_type=info.type.name, - _context_free_data_converter=converter, - **additional_fields, - ) - - async def memo(self) -> Mapping[str, Any]: - """Workflow's memo values, converted without type hints. - - Since type hints are not used, the default converted values will come - back. For example, if the memo was originally created with a dataclass, - the value will be a dict. To convert using proper type hints, use - :py:meth:`memo_value`. - - Returns: - Mapping of all memo keys and they values without type hints. - """ - return { - k: (await self.data_converter.decode([v]))[0] - for k, v in self.raw_info.memo.fields.items() - } - - @overload - async def memo_value( - self, key: str, default: Any = temporalio.common._arg_unset - ) -> Any: ... - - @overload - async def memo_value( - self, key: str, *, type_hint: type[ParamType] - ) -> ParamType: ... - - @overload - async def memo_value( - self, key: str, default: AnyType, *, type_hint: type[ParamType] - ) -> AnyType | ParamType: ... - - async def memo_value( - self, - key: str, - default: Any = temporalio.common._arg_unset, - *, - type_hint: type | None = None, - ) -> Any: - """Memo value for the given key, optional default, and optional type - hint. - - Args: - key: Key to get memo value for. - default: Default to use if key is not present. If unset, a - :py:class:`KeyError` is raised when the key does not exist. - type_hint: Type hint to use when converting. - - Returns: - Memo value, converted with the type hint if present. - - Raises: - KeyError: Key not present and default not set. - """ - payload = self.raw_info.memo.fields.get(key) - if not payload: - if default is temporalio.common._arg_unset: - raise KeyError(f"Memo does not have a value for key {key}") - return default - return ( - await self.data_converter.decode( - [payload], [type_hint] if type_hint else None - ) - )[0] - - -@dataclass -class WorkflowExecutionDescription(WorkflowExecution): - """Description for a single workflow execution run.""" - - raw_description: temporalio.api.workflowservice.v1.DescribeWorkflowExecutionResponse - """Underlying protobuf description.""" - - _static_summary: str | None = None - _static_details: str | None = None - _metadata_decoded: bool = False - - async def static_summary(self) -> str | None: - """Gets the single-line fixed summary for this workflow execution that may appear in - UI/CLI. This can be in single-line Temporal markdown format. - """ - if not self._metadata_decoded: - await self._decode_metadata() - return self._static_summary - - async def static_details(self) -> str | None: - """Gets the general fixed details for this workflow execution that may appear in UI/CLI. - This can be in Temporal markdown format and can span multiple lines. - """ - if not self._metadata_decoded: - await self._decode_metadata() - return self._static_details - - async def _decode_metadata(self) -> None: - """Internal method to decode metadata lazily.""" - self._static_summary, self._static_details = await _decode_user_metadata( - self.data_converter, self.raw_description.execution_config.user_metadata - ) - self._metadata_decoded = True - - @staticmethod - async def _from_raw_description( - description: temporalio.api.workflowservice.v1.DescribeWorkflowExecutionResponse, - namespace: str, - converter: temporalio.converter.DataConverter, - ) -> WorkflowExecutionDescription: - return WorkflowExecutionDescription._from_raw_info( - description.workflow_execution_info, - namespace=namespace, - converter=converter, - raw_description=description, - ) - - -class WorkflowExecutionStatus(IntEnum): - """Status of a workflow execution. - - See :py:class:`temporalio.api.enums.v1.WorkflowExecutionStatus`. - """ - - RUNNING = int( - temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_RUNNING - ) - COMPLETED = int( - temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_COMPLETED - ) - FAILED = int( - temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_FAILED - ) - CANCELED = int( - temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_CANCELED - ) - TERMINATED = int( - temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_TERMINATED - ) - CONTINUED_AS_NEW = int( - temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW - ) - TIMED_OUT = int( - temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_TIMED_OUT - ) - - -@dataclass -class WorkflowExecutionCount: - """Representation of a count from a count workflows call.""" - - count: int - """Approximate number of workflows matching the original query. - - If the query had a group-by clause, this is simply the sum of all the counts - in py:attr:`groups`. - """ - - groups: Sequence[WorkflowExecutionCountAggregationGroup] - """Groups if the query had a group-by clause, or empty if not.""" - - @staticmethod - def _from_raw( - raw: temporalio.api.workflowservice.v1.CountWorkflowExecutionsResponse, - ) -> WorkflowExecutionCount: - return WorkflowExecutionCount( - count=raw.count, - groups=[ - WorkflowExecutionCountAggregationGroup._from_raw(g) for g in raw.groups - ], - ) - - -@dataclass -class WorkflowExecutionCountAggregationGroup: - """Aggregation group if the workflow count query had a group-by clause.""" - - count: int - """Approximate number of workflows matching the original query for this - group. - """ - - group_values: Sequence[temporalio.common.SearchAttributeValue] - """Search attribute values for this group.""" - - @staticmethod - def _from_raw( - raw: temporalio.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup, - ) -> WorkflowExecutionCountAggregationGroup: - return WorkflowExecutionCountAggregationGroup( - count=raw.count, - group_values=[ - temporalio.converter._decode_search_attribute_value(v) - for v in raw.group_values - ], - ) - - -class WorkflowExecutionAsyncIterator: - """Asynchronous iterator for :py:class:`WorkflowExecution` values. - - Most users should use ``async for`` on this iterator and not call any of the - methods within. To consume the workflows as histories, call - :py:meth:`map_histories`. - """ - - def __init__( - self, - client: Client, - input: ListWorkflowsInput, - ) -> None: - """Create an asynchronous iterator for the given input. - - Users should not create this directly, but rather use - :py:meth:`Client.list_workflows`. - """ - self._client = client - self._input = input - self._next_page_token = input.next_page_token - self._current_page: Sequence[WorkflowExecution] | None = None - self._current_page_index = 0 - self._limit = input.limit - self._yielded = 0 - - @property - def current_page_index(self) -> int: - """Index of the entry in the current page that will be returned from - the next :py:meth:`__anext__` call. - """ - return self._current_page_index - - @property - def current_page(self) -> Sequence[WorkflowExecution] | None: - """Current page, if it has been fetched yet.""" - return self._current_page - - @property - def next_page_token(self) -> bytes | None: - """Token for the next page request if any.""" - return self._next_page_token - - async def fetch_next_page(self, *, page_size: int | None = None) -> None: - """Fetch the next page if any. - - Args: - page_size: Override the page size this iterator was originally - created with. - """ - page_size = page_size or self._input.page_size - if self._limit is not None and self._limit - self._yielded < page_size: - page_size = self._limit - self._yielded - - resp = await self._client.workflow_service.list_workflow_executions( - temporalio.api.workflowservice.v1.ListWorkflowExecutionsRequest( - namespace=self._client.namespace, - page_size=page_size, - next_page_token=self._next_page_token or b"", - query=self._input.query or "", - ), - retry=True, - metadata=self._input.rpc_metadata, - timeout=self._input.rpc_timeout, - ) - - self._current_page = [ - WorkflowExecution._from_raw_info( - v, self._client.namespace, self._client.data_converter - ) - for v in resp.executions - ] - self._current_page_index = 0 - self._next_page_token = resp.next_page_token or None - - def __aiter__(self) -> WorkflowExecutionAsyncIterator: - """Return self as the iterator.""" - return self - - async def __anext__(self) -> WorkflowExecution: - """Get the next execution on this iterator, fetching next page if - necessary. - """ - if self._limit is not None and self._yielded >= self._limit: - raise StopAsyncIteration - while True: - # No page? fetch and continue - if self._current_page is None: - await self.fetch_next_page() - continue - # No more left in page? - if self._current_page_index >= len(self._current_page): - # If there is a next page token, try to get another page and try - # again - if self._next_page_token is not None: - await self.fetch_next_page() - continue - # No more pages means we're done - raise StopAsyncIteration - # Get current, increment page index, and return - ret = self._current_page[self._current_page_index] - self._current_page_index += 1 - self._yielded += 1 - return ret - - async def map_histories( - self, - *, - event_filter_type: WorkflowHistoryEventFilterType = WorkflowHistoryEventFilterType.ALL_EVENT, - skip_archival: bool = False, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> AsyncIterator[WorkflowHistory]: - """Create an async iterator consuming all workflows and calling - :py:meth:`WorkflowHandle.fetch_history` on each one. - - This is just a shortcut for ``fetch_history``, see that method for - parameter details. - """ - async for v in self: - yield await self._client.get_workflow_handle( - v.id, run_id=v.run_id - ).fetch_history( - event_filter_type=event_filter_type, - skip_archival=skip_archival, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ) - - -@dataclass(frozen=True) -class WorkflowHistory: - """A workflow's ID and immutable history.""" - - workflow_id: str - """ID of the workflow.""" - - events: Sequence[temporalio.api.history.v1.HistoryEvent] - """History events for the workflow.""" - - @property - def run_id(self) -> str: - """Run ID extracted from the first event.""" - if not self.events: - raise RuntimeError("No events") - if not self.events[0].HasField("workflow_execution_started_event_attributes"): - raise RuntimeError("First event is not workflow start") - return self.events[ - 0 - ].workflow_execution_started_event_attributes.original_execution_run_id - - @staticmethod - def from_json(workflow_id: str, history: str | dict[str, Any]) -> WorkflowHistory: - """Construct a WorkflowHistory from an ID and a json dump of history. - - This is built to work both with Temporal UI/CLI JSON as well as - :py:meth:`to_json` even though they are slightly different. - - Args: - workflow_id: The workflow's ID - history: A string or parsed-to-dict representation of workflow - history - - Returns: - Workflow history - """ - parsed = _history_from_json(history) - return WorkflowHistory(workflow_id, parsed.events) - - def to_json(self) -> str: - """Convert this history to JSON. - - Note, this does not include the workflow ID. - """ - return google.protobuf.json_format.MessageToJson( - temporalio.api.history.v1.History(events=self.events) - ) - - def to_json_dict(self) -> dict[str, Any]: - """Convert this history to JSON-compatible dict. - - Note, this does not include the workflow ID. - """ - return google.protobuf.json_format.MessageToDict( - temporalio.api.history.v1.History(events=self.events) - ) - - -@dataclass -class WorkflowHistoryEventAsyncIterator: - """Asynchronous iterator for history events of a workflow. - - Most users should use ``async for`` on this iterator and not call any of the - methods within. - """ - - def __init__( - self, - client: Client, - input: FetchWorkflowHistoryEventsInput, - ) -> None: - """Create an asynchronous iterator for the given input. - - Users should not create this directly, but rather use - :py:meth:`WorkflowHandle.fetch_history_events`. - """ - self._client = client - self._input = input - self._next_page_token = input.next_page_token - self._current_page: ( - None | (Sequence[temporalio.api.history.v1.HistoryEvent]) - ) = None - self._current_page_index = 0 - - @property - def current_page_index(self) -> int: - """Index of the entry in the current page that will be returned from - the next :py:meth:`__anext__` call. - """ - return self._current_page_index - - @property - def current_page( - self, - ) -> Sequence[temporalio.api.history.v1.HistoryEvent] | None: - """Current page, if it has been fetched yet.""" - return self._current_page - - @property - def next_page_token(self) -> bytes | None: - """Token for the next page request if any.""" - return self._next_page_token - - async def fetch_next_page(self, *, page_size: int | None = None) -> None: - """Fetch the next page if any. - - Args: - page_size: Override the page size this iterator was originally - created with. - """ - resp = await self._client.workflow_service.get_workflow_execution_history( - temporalio.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest( - namespace=self._client.namespace, - execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=self._input.id, - run_id=self._input.run_id or "", - ), - maximum_page_size=page_size or self._input.page_size or 0, - next_page_token=self._next_page_token or b"", - wait_new_event=self._input.wait_new_event, - history_event_filter_type=temporalio.api.enums.v1.HistoryEventFilterType.ValueType( - self._input.event_filter_type - ), - skip_archival=self._input.skip_archival, - ), - retry=True, - metadata=self._input.rpc_metadata, - timeout=self._input.rpc_timeout, - ) - # We don't support raw history - assert len(resp.raw_history) == 0 - self._current_page = list(resp.history.events) - self._current_page_index = 0 - self._next_page_token = resp.next_page_token or None - - def __aiter__(self) -> WorkflowHistoryEventAsyncIterator: - """Return self as the iterator.""" - return self - - async def __anext__(self) -> temporalio.api.history.v1.HistoryEvent: - """Get the next execution on this iterator, fetching next page if - necessary. - """ - while True: - # No page? fetch and continue - if self._current_page is None: - await self.fetch_next_page() - continue - # No more left in page? - if self._current_page_index >= len(self._current_page): - # If there is a next page token, try to get another page and try - # again - if self._next_page_token is not None: - await self.fetch_next_page() - continue - # No more pages means we're done - raise StopAsyncIteration - # Increment page index and return - ret = self._current_page[self._current_page_index] - self._current_page_index += 1 - return ret - - -class ScheduleHandle: - """Handle for interacting with a schedule. - - This is usually created via :py:meth:`Client.get_schedule_handle` or - returned from :py:meth:`Client.create_schedule`. - - Attributes: - id: ID of the schedule. - """ - - def __init__(self, client: Client, id: str) -> None: - """Create schedule handle.""" - self._client = client - self.id = id - - async def backfill( - self, - *backfill: ScheduleBackfill, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Backfill the schedule by going through the specified time periods as - if they passed right now. - - Args: - backfill: Backfill periods. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - if not backfill: - raise ValueError("At least one backfill required") - await self._client._impl.backfill_schedule( - BackfillScheduleInput( - id=self.id, - backfills=backfill, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ), - ) - - async def delete( - self, - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Delete this schedule. - - Args: - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - await self._client._impl.delete_schedule( - DeleteScheduleInput( - id=self.id, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ), - ) - - async def describe( - self, - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> ScheduleDescription: - """Fetch this schedule's description. - - Args: - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - return await self._client._impl.describe_schedule( - DescribeScheduleInput( - id=self.id, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ), - ) - - async def pause( - self, - *, - note: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Pause the schedule and set a note. - - Args: - note: Note to set on the schedule. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - await self._client._impl.pause_schedule( - PauseScheduleInput( - id=self.id, - note=note, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ), - ) - - async def trigger( - self, - *, - overlap: ScheduleOverlapPolicy | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Trigger an action on this schedule to happen immediately. - - Args: - overlap: If set, overrides the schedule's overlap policy. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - await self._client._impl.trigger_schedule( - TriggerScheduleInput( - id=self.id, - overlap=overlap, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ), - ) - - async def unpause( - self, - *, - note: str | None = None, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Unpause the schedule and set a note. - - Args: - note: Note to set on the schedule. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for the RPC call. - """ - await self._client._impl.unpause_schedule( - UnpauseScheduleInput( - id=self.id, - note=note, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ), - ) - - @overload - async def update( - self, - updater: Callable[[ScheduleUpdateInput], ScheduleUpdate | None], - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: ... - - @overload - async def update( - self, - updater: Callable[[ScheduleUpdateInput], Awaitable[ScheduleUpdate | None]], - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: ... - - async def update( - self, - updater: Callable[ - [ScheduleUpdateInput], - ScheduleUpdate | None | Awaitable[ScheduleUpdate | None], - ], - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - """Update a schedule using a callback to build the update from the - description. - - The callback may be invoked multiple times in a conflict-resolution - loop. - - Args: - updater: Callback that returns the update. It accepts a - :py:class:`ScheduleUpdateInput` and returns a - :py:class:`ScheduleUpdate`. If None is returned or an error - occurs, the update is not attempted. This may be called multiple - times. - rpc_metadata: Headers used on the RPC call. Keys here override - client-level RPC metadata keys. This is for every call made - within. - rpc_timeout: Optional RPC deadline to set for the RPC call. This is - for each call made within, not overall. - """ - await self._client._impl.update_schedule( - UpdateScheduleInput( - id=self.id, - updater=updater, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - ), - ) - - -@dataclass -class ScheduleSpec: - """Specification of the times scheduled actions may occur. - - The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and - :py:attr:`cron_expressions` excluding anything in :py:attr:`skip`. - """ - - calendars: Sequence[ScheduleCalendarSpec] = dataclasses.field(default_factory=list) - """Calendar-based specification of times.""" - - intervals: Sequence[ScheduleIntervalSpec] = dataclasses.field(default_factory=list) - """Interval-based specification of times.""" - - cron_expressions: Sequence[str] = dataclasses.field(default_factory=list) - """Cron-based specification of times. - - This is provided for easy migration from legacy string-based cron - scheduling. New uses should use :py:attr:`calendars` instead. These - expressions will be translated to calendar-based specifications on the - server. - """ - - skip: Sequence[ScheduleCalendarSpec] = dataclasses.field(default_factory=list) - """Set of matching calendar times that will be skipped.""" - - start_at: datetime | None = None - """Time before which any matching times will be skipped.""" - - end_at: datetime | None = None - """Time after which any matching times will be skipped.""" - - jitter: timedelta | None = None - """Jitter to apply each action. - - An action's scheduled time will be incremented by a random value between 0 - and this value if present (but not past the next schedule). - """ - - time_zone_name: str | None = None - """IANA time zone name, for example ``US/Central``.""" - - @staticmethod - def _from_proto(spec: temporalio.api.schedule.v1.ScheduleSpec) -> ScheduleSpec: - return ScheduleSpec( - calendars=[ - ScheduleCalendarSpec._from_proto(c) for c in spec.structured_calendar - ], - intervals=[ScheduleIntervalSpec._from_proto(i) for i in spec.interval], - cron_expressions=spec.cron_string, - skip=[ - ScheduleCalendarSpec._from_proto(c) - for c in spec.exclude_structured_calendar - ], - start_at=spec.start_time.ToDatetime().replace(tzinfo=timezone.utc) - if spec.HasField("start_time") - else None, - end_at=spec.end_time.ToDatetime().replace(tzinfo=timezone.utc) - if spec.HasField("end_time") - else None, - jitter=spec.jitter.ToTimedelta() if spec.HasField("jitter") else None, - time_zone_name=spec.timezone_name or None, - ) - - def _to_proto(self) -> temporalio.api.schedule.v1.ScheduleSpec: - start_time: google.protobuf.timestamp_pb2.Timestamp | None = None - if self.start_at: - start_time = google.protobuf.timestamp_pb2.Timestamp() - start_time.FromDatetime(self.start_at) - end_time: google.protobuf.timestamp_pb2.Timestamp | None = None - if self.end_at: - end_time = google.protobuf.timestamp_pb2.Timestamp() - end_time.FromDatetime(self.end_at) - jitter: google.protobuf.duration_pb2.Duration | None = None - if self.jitter: - jitter = google.protobuf.duration_pb2.Duration() - jitter.FromTimedelta(self.jitter) - return temporalio.api.schedule.v1.ScheduleSpec( - structured_calendar=[cal._to_proto() for cal in self.calendars], - cron_string=self.cron_expressions, - interval=[i._to_proto() for i in self.intervals], - exclude_structured_calendar=[cal._to_proto() for cal in self.skip], - start_time=start_time, - end_time=end_time, - jitter=jitter, - timezone_name=self.time_zone_name or "", - ) - - -@dataclass(frozen=True) -class ScheduleRange: - """Inclusive range for a schedule match value.""" - - start: int - """Inclusive start of the range.""" - - end: int = 0 - """Inclusive end of the range. - - If unset or less than start, defaults to start. - """ - - step: int = 0 - """ - Step to take between each value. - - Unset or 0 defaults as 1. - """ - - def __post_init__(self): - """Set field defaults.""" - # Class is frozen, so we must setattr bypassing dataclass setattr - if self.end < self.start: - object.__setattr__(self, "end", self.start) - if self.step == 0: - object.__setattr__(self, "step", 1) - - @staticmethod - def _from_protos( - ranges: Sequence[temporalio.api.schedule.v1.Range], - ) -> Sequence[ScheduleRange]: - return tuple(ScheduleRange._from_proto(r) for r in ranges) - - @staticmethod - def _from_proto(range: temporalio.api.schedule.v1.Range) -> ScheduleRange: - return ScheduleRange(start=range.start, end=range.end, step=range.step) - - @staticmethod - def _to_protos( - ranges: Sequence[ScheduleRange], - ) -> Sequence[temporalio.api.schedule.v1.Range]: - return tuple(r._to_proto() for r in ranges) - - def _to_proto(self) -> temporalio.api.schedule.v1.Range: - return temporalio.api.schedule.v1.Range( - start=self.start, end=self.end, step=self.step - ) - - -@dataclass -class ScheduleCalendarSpec: - """Specification relative to calendar time when to run an action. - - A timestamp matches if at least one range of each field matches except for - year. If year is missing, that means all years match. For all fields besides - year, at least one range must be present to match anything. - """ - - second: Sequence[ScheduleRange] = (ScheduleRange(0),) - """Second range to match, 0-59. Default matches 0.""" - - minute: Sequence[ScheduleRange] = (ScheduleRange(0),) - """Minute range to match, 0-59. Default matches 0.""" - - hour: Sequence[ScheduleRange] = (ScheduleRange(0),) - """Hour range to match, 0-23. Default matches 0.""" - - day_of_month: Sequence[ScheduleRange] = (ScheduleRange(1, 31),) - """Day of month range to match, 1-31. Default matches all days.""" - - month: Sequence[ScheduleRange] = (ScheduleRange(1, 12),) - """Month range to match, 1-12. Default matches all months.""" - - year: Sequence[ScheduleRange] = () - """Optional year range to match. Default of empty matches all years.""" - - day_of_week: Sequence[ScheduleRange] = (ScheduleRange(0, 6),) - """Day of week range to match, 0-6, 0 is Sunday. Default matches all - days.""" - - comment: str | None = None - """Description of this schedule.""" - - @staticmethod - def _from_proto( - spec: temporalio.api.schedule.v1.StructuredCalendarSpec, - ) -> ScheduleCalendarSpec: - return ScheduleCalendarSpec( - second=ScheduleRange._from_protos(spec.second), - minute=ScheduleRange._from_protos(spec.minute), - hour=ScheduleRange._from_protos(spec.hour), - day_of_month=ScheduleRange._from_protos(spec.day_of_month), - month=ScheduleRange._from_protos(spec.month), - year=ScheduleRange._from_protos(spec.year), - day_of_week=ScheduleRange._from_protos(spec.day_of_week), - comment=spec.comment or None, - ) - - def _to_proto(self) -> temporalio.api.schedule.v1.StructuredCalendarSpec: - return temporalio.api.schedule.v1.StructuredCalendarSpec( - second=ScheduleRange._to_protos(self.second), - minute=ScheduleRange._to_protos(self.minute), - hour=ScheduleRange._to_protos(self.hour), - day_of_month=ScheduleRange._to_protos(self.day_of_month), - month=ScheduleRange._to_protos(self.month), - year=ScheduleRange._to_protos(self.year), - day_of_week=ScheduleRange._to_protos(self.day_of_week), - comment=self.comment or "", - ) - - -@dataclass -class ScheduleIntervalSpec: - """Specification for scheduling on an interval. - - Matches times expressed as epoch + (n * every) + offset. - """ - - every: timedelta - """Period to repeat the interval.""" - - offset: timedelta | None = None - """Fixed offset added to each interval period.""" - - @staticmethod - def _from_proto( - spec: temporalio.api.schedule.v1.IntervalSpec, - ) -> ScheduleIntervalSpec: - return ScheduleIntervalSpec( - every=spec.interval.ToTimedelta(), - offset=spec.phase.ToTimedelta() if spec.HasField("phase") else None, - ) - - def _to_proto(self) -> temporalio.api.schedule.v1.IntervalSpec: - interval = google.protobuf.duration_pb2.Duration() - interval.FromTimedelta(self.every) - phase: google.protobuf.duration_pb2.Duration | None = None - if self.offset: - phase = google.protobuf.duration_pb2.Duration() - phase.FromTimedelta(self.offset) - return temporalio.api.schedule.v1.IntervalSpec(interval=interval, phase=phase) - - -class ScheduleAction(ABC): - """Base class for an action a schedule can take. - - See :py:class:`ScheduleActionStartWorkflow` for the most commonly used - implementation. - """ - - @staticmethod - def _from_proto( - action: temporalio.api.schedule.v1.ScheduleAction, - ) -> ScheduleAction: - if action.HasField("start_workflow"): - return ScheduleActionStartWorkflow._from_proto(action.start_workflow) - else: - raise ValueError(f"Unsupported action: {action.WhichOneof('action')}") - - @abstractmethod - async def _to_proto( - self, client: Client - ) -> temporalio.api.schedule.v1.ScheduleAction: ... - - -@dataclass -class ScheduleActionStartWorkflow(ScheduleAction): - """Schedule action to start a workflow.""" - - workflow: str - args: Sequence[Any] | Sequence[temporalio.api.common.v1.Payload] - id: str - task_queue: str - execution_timeout: timedelta | None - run_timeout: timedelta | None - task_timeout: timedelta | None - retry_policy: temporalio.common.RetryPolicy | None - memo: None | (Mapping[str, Any] | Mapping[str, temporalio.api.common.v1.Payload]) - typed_search_attributes: temporalio.common.TypedSearchAttributes - untyped_search_attributes: temporalio.common.SearchAttributes - """This is deprecated and is only present in case existing untyped - attributes already exist for update. This should never be used when - creating.""" - static_summary: str | temporalio.api.common.v1.Payload | None - static_details: str | temporalio.api.common.v1.Payload | None - priority: temporalio.common.Priority - - headers: Mapping[str, temporalio.api.common.v1.Payload] | None - """ - Headers may still be encoded by the payload codec if present. - """ - _from_raw: bool = dataclasses.field(compare=False, init=False) - - @staticmethod - def _from_proto( # pyright: ignore - info: temporalio.api.workflow.v1.NewWorkflowExecutionInfo, # type: ignore[override] - ) -> ScheduleActionStartWorkflow: - return ScheduleActionStartWorkflow("", raw_info=info) - - # Overload for no-param workflow - @overload - def __init__( - self, - workflow: MethodAsyncNoParam[SelfType, ReturnType], - *, - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - ) -> None: ... - - # Overload for single-param workflow - @overload - def __init__( - self, - workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - ) -> None: ... - - # Overload for multi-param workflow - @overload - def __init__( - self, - workflow: Callable[ - Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] - ], - *, - args: Sequence[Any], - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - ) -> None: ... - - # Overload for string-name workflow - @overload - def __init__( - self, - workflow: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str, - task_queue: str, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - ) -> None: ... - - # Overload for raw info - @overload - def __init__( - self, - workflow: str, - *, - raw_info: temporalio.api.workflow.v1.NewWorkflowExecutionInfo, - ) -> None: ... - - def __init__( - self, - workflow: str | Callable[..., Awaitable[Any]], - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str | None = None, - task_queue: str | None = None, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, - untyped_search_attributes: temporalio.common.SearchAttributes = {}, - static_summary: str | None = None, - static_details: str | None = None, - headers: Mapping[str, temporalio.api.common.v1.Payload] | None = None, - raw_info: temporalio.api.workflow.v1.NewWorkflowExecutionInfo | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - ) -> None: - """Create a start-workflow action. - - See :py:meth:`Client.start_workflow` for details on these parameter - values. - """ - super().__init__() - if raw_info: - self._from_raw = True - # Ignore other fields - self.workflow = raw_info.workflow_type.name - self.args = raw_info.input.payloads if raw_info.input else [] - self.id = raw_info.workflow_id - self.task_queue = raw_info.task_queue.name - self.execution_timeout = ( - raw_info.workflow_execution_timeout.ToTimedelta() - if raw_info.HasField("workflow_execution_timeout") - else None - ) - self.run_timeout = ( - raw_info.workflow_run_timeout.ToTimedelta() - if raw_info.HasField("workflow_run_timeout") - else None - ) - self.task_timeout = ( - raw_info.workflow_task_timeout.ToTimedelta() - if raw_info.HasField("workflow_task_timeout") - else None - ) - self.retry_policy = ( - temporalio.common.RetryPolicy.from_proto(raw_info.retry_policy) - if raw_info.HasField("retry_policy") - else None - ) - self.memo = raw_info.memo.fields if raw_info.memo.fields else None - self.typed_search_attributes = ( - temporalio.converter.decode_typed_search_attributes( - raw_info.search_attributes - ) - ) - self.headers = raw_info.header.fields if raw_info.header.fields else None - # Also set the untyped attributes as the set of attributes from - # decode with the typed ones removed - self.untyped_search_attributes = ( - temporalio.converter.decode_search_attributes( - raw_info.search_attributes - ) - ) - for pair in self.typed_search_attributes: - if pair.key.name in self.untyped_search_attributes: - # We know this is mutable here - del self.untyped_search_attributes[pair.key.name] # type: ignore - self.static_summary = ( - raw_info.user_metadata.summary - if raw_info.HasField("user_metadata") and raw_info.user_metadata.summary - else None - ) - self.static_details = ( - raw_info.user_metadata.details - if raw_info.HasField("user_metadata") and raw_info.user_metadata.details - else None - ) - self.priority = ( - temporalio.common.Priority._from_proto(raw_info.priority) - if raw_info.HasField("priority") and raw_info.priority - else temporalio.common.Priority.default - ) - else: - self._from_raw = False - if not id: - raise ValueError("ID required") - if not task_queue: - raise ValueError("Task queue required") - # Use definition if callable - if callable(workflow): - defn = temporalio.workflow._Definition.must_from_run_fn(workflow) - if not defn.name: - raise ValueError("Cannot schedule dynamic workflow explicitly") - workflow = defn.name - elif not isinstance(workflow, str): - raise TypeError("Workflow must be a string or callable") - self.workflow = workflow - self.args = temporalio.common._arg_or_args(arg, args) - self.id = id - self.task_queue = task_queue - self.execution_timeout = execution_timeout - self.run_timeout = run_timeout - self.task_timeout = task_timeout - self.retry_policy = retry_policy - self.memo = memo - self.typed_search_attributes = typed_search_attributes - self.untyped_search_attributes = untyped_search_attributes - self.headers = headers # encode here - self.static_summary = static_summary - self.static_details = static_details - self.priority = priority - - async def _to_proto( - self, client: Client - ) -> temporalio.api.schedule.v1.ScheduleAction: - execution_timeout: google.protobuf.duration_pb2.Duration | None = None - if self.execution_timeout: - execution_timeout = google.protobuf.duration_pb2.Duration() - execution_timeout.FromTimedelta(self.execution_timeout) - run_timeout: google.protobuf.duration_pb2.Duration | None = None - if self.run_timeout: - run_timeout = google.protobuf.duration_pb2.Duration() - run_timeout.FromTimedelta(self.run_timeout) - task_timeout: google.protobuf.duration_pb2.Duration | None = None - if self.task_timeout: - task_timeout = google.protobuf.duration_pb2.Duration() - task_timeout.FromTimedelta(self.task_timeout) - retry_policy: temporalio.api.common.v1.RetryPolicy | None = None - if self.retry_policy: - retry_policy = temporalio.api.common.v1.RetryPolicy() - self.retry_policy.apply_to_proto(retry_policy) - priority: temporalio.api.common.v1.Priority | None = None - if self.priority: - priority = self.priority._to_proto() - data_converter = client.data_converter.with_context( - WorkflowSerializationContext( - namespace=client.namespace, - workflow_id=self.id, - ) - ) - action = temporalio.api.schedule.v1.ScheduleAction( - start_workflow=temporalio.api.workflow.v1.NewWorkflowExecutionInfo( - workflow_id=self.id, - workflow_type=temporalio.api.common.v1.WorkflowType(name=self.workflow), - task_queue=temporalio.api.taskqueue.v1.TaskQueue(name=self.task_queue), - input=( - temporalio.api.common.v1.Payloads( - payloads=[ - a - if isinstance(a, temporalio.api.common.v1.Payload) - else (await data_converter.encode([a]))[0] - for a in self.args - ] - ) - if self.args - else None - ), - workflow_execution_timeout=execution_timeout, - workflow_run_timeout=run_timeout, - workflow_task_timeout=task_timeout, - retry_policy=retry_policy, - memo=( - temporalio.api.common.v1.Memo( - fields={ - k: v - if isinstance(v, temporalio.api.common.v1.Payload) - else (await data_converter.encode([v]))[0] - for k, v in self.memo.items() - }, - ) - if self.memo - else None - ), - user_metadata=await _encode_user_metadata( - data_converter, self.static_summary, self.static_details - ), - priority=priority, - ), - ) - # Add any untyped attributes that are not also in the typed set - untyped_not_in_typed = { - k: v - for k, v in self.untyped_search_attributes.items() - if k not in self.typed_search_attributes - } - if untyped_not_in_typed: - temporalio.converter.encode_search_attributes( - untyped_not_in_typed, action.start_workflow.search_attributes - ) - # TODO (dan): confirm whether this be `is not None` - if self.typed_search_attributes: - temporalio.converter.encode_search_attributes( - self.typed_search_attributes, action.start_workflow.search_attributes - ) - if self.headers: - await _apply_headers( - self.headers, - action.start_workflow.header.fields, - client.config(active_config=True)["header_codec_behavior"] - == HeaderCodecBehavior.CODEC - and not self._from_raw, - client.data_converter.payload_codec, - ) - return action - - -class ScheduleOverlapPolicy(IntEnum): - """Controls what happens when a workflow would be started by a schedule but - one is already running. - """ - - SKIP = int( - temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_SKIP - ) - """Don't start anything. - - When the workflow completes, the next scheduled event after that time will - be considered. - """ - - BUFFER_ONE = int( - temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_BUFFER_ONE - ) - """Start the workflow again soon as the current one completes, but only - buffer one start in this way. - - If another start is supposed to happen when the workflow is running, and one - is already buffered, then only the first one will be started after the - running workflow finishes. - """ - - BUFFER_ALL = int( - temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_BUFFER_ALL - ) - """Buffer up any number of starts to all happen sequentially, immediately - after the running workflow completes.""" - - CANCEL_OTHER = int( - temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER - ) - """If there is another workflow running, cancel it, and start the new one - after the old one completes cancellation.""" - - TERMINATE_OTHER = int( - temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER - ) - """If there is another workflow running, terminate it and start the new one - immediately.""" - - ALLOW_ALL = int( - temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_ALLOW_ALL - ) - """Start any number of concurrent workflows. - - Note that with this policy, last completion result and last failure will not - be available since workflows are not sequential.""" - - -@dataclass -class ScheduleBackfill: - """Time period and policy for actions taken as if the time passed right - now. - """ - - start_at: datetime - """Start of the range to evaluate the schedule in. - - This is exclusive - """ - end_at: datetime - overlap: ScheduleOverlapPolicy | None = None - - def _to_proto(self) -> temporalio.api.schedule.v1.BackfillRequest: - start_time = google.protobuf.timestamp_pb2.Timestamp() - start_time.FromDatetime(self.start_at) - end_time = google.protobuf.timestamp_pb2.Timestamp() - end_time.FromDatetime(self.end_at) - overlap_policy = temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_UNSPECIFIED - if self.overlap: - overlap_policy = temporalio.api.enums.v1.ScheduleOverlapPolicy.ValueType( - self.overlap - ) - return temporalio.api.schedule.v1.BackfillRequest( - start_time=start_time, - end_time=end_time, - overlap_policy=overlap_policy, - ) - - -@dataclass -class SchedulePolicy: - """Policies of a schedule.""" - - overlap: ScheduleOverlapPolicy = dataclasses.field( - default_factory=lambda: ScheduleOverlapPolicy.SKIP - ) - """Controls what happens when an action is started while another is still - running.""" - - catchup_window: timedelta = timedelta(days=365) - """After a Temporal server is unavailable, amount of time in the past to - execute missed actions.""" - - pause_on_failure: bool = False - """Whether to pause the schedule if an action fails or times out. - - Note: For workflows, this only applies after all retries have been - exhausted. - """ - - @staticmethod - def _from_proto(pol: temporalio.api.schedule.v1.SchedulePolicies) -> SchedulePolicy: - return SchedulePolicy( - overlap=ScheduleOverlapPolicy(int(pol.overlap_policy)), - catchup_window=pol.catchup_window.ToTimedelta(), - pause_on_failure=pol.pause_on_failure, - ) - - def _to_proto(self) -> temporalio.api.schedule.v1.SchedulePolicies: - catchup_window = google.protobuf.duration_pb2.Duration() - catchup_window.FromTimedelta(self.catchup_window) - return temporalio.api.schedule.v1.SchedulePolicies( - overlap_policy=temporalio.api.enums.v1.ScheduleOverlapPolicy.ValueType( - self.overlap - ), - catchup_window=catchup_window, - pause_on_failure=self.pause_on_failure, - ) - - -@dataclass -class ScheduleState: - """State of a schedule.""" - - note: str | None = None - """Human readable message for the schedule. - - The system may overwrite this value on certain conditions like - pause-on-failure. - """ - - paused: bool = False - """Whether the schedule is paused.""" - - # Cannot be set to True on create - limited_actions: bool = False - """ - If true, remaining actions will be decremented for each action taken. - - On schedule create, this must be set to true if :py:attr:`remaining_actions` - is non-zero and left false if :py:attr:`remaining_actions` is zero. - """ - - remaining_actions: int = 0 - """Actions remaining on this schedule. - - Once this number hits 0, no further actions are scheduled automatically. - """ - - @staticmethod - def _from_proto(state: temporalio.api.schedule.v1.ScheduleState) -> ScheduleState: - return ScheduleState( - note=state.notes or None, - paused=state.paused, - limited_actions=state.limited_actions, - remaining_actions=state.remaining_actions, - ) - - def _to_proto(self) -> temporalio.api.schedule.v1.ScheduleState: - return temporalio.api.schedule.v1.ScheduleState( - notes=self.note or "", - paused=self.paused, - limited_actions=self.limited_actions, - remaining_actions=self.remaining_actions, - ) - - -@dataclass -class Schedule: - """A schedule for periodically running an action.""" - - action: ScheduleAction - """Action taken when scheduled.""" - - spec: ScheduleSpec - """When the action is taken.""" - - policy: SchedulePolicy = dataclasses.field(default_factory=SchedulePolicy) - """Schedule policies.""" - - state: ScheduleState = dataclasses.field(default_factory=ScheduleState) - """State of the schedule.""" - - @staticmethod - def _from_proto(sched: temporalio.api.schedule.v1.Schedule) -> Schedule: - return Schedule( - action=ScheduleAction._from_proto(sched.action), - spec=ScheduleSpec._from_proto(sched.spec), - policy=SchedulePolicy._from_proto(sched.policies), - state=ScheduleState._from_proto(sched.state), - ) - - async def _to_proto(self, client: Client) -> temporalio.api.schedule.v1.Schedule: - catchup_window = google.protobuf.duration_pb2.Duration() - catchup_window.FromTimedelta(self.policy.catchup_window) - return temporalio.api.schedule.v1.Schedule( - spec=self.spec._to_proto(), - action=await self.action._to_proto(client), - policies=self.policy._to_proto(), - state=self.state._to_proto(), - ) - - -@dataclass -class ScheduleDescription: - """Description of a schedule.""" - - id: str - """ID of the schedule.""" - - schedule: Schedule - """Schedule details that can be mutated.""" - - info: ScheduleInfo - """Information about the schedule.""" - - typed_search_attributes: temporalio.common.TypedSearchAttributes - """Search attributes on the schedule.""" - - search_attributes: temporalio.common.SearchAttributes - """Search attributes on the schedule. - - .. deprecated:: - Use :py:attr:`typed_search_attributes` instead. - """ - - data_converter: temporalio.converter.DataConverter - """Data converter used for memo decoding.""" - - raw_description: temporalio.api.workflowservice.v1.DescribeScheduleResponse - """Raw description of the schedule.""" - - @staticmethod - def _from_proto( - id: str, - desc: temporalio.api.workflowservice.v1.DescribeScheduleResponse, - converter: temporalio.converter.DataConverter, - ) -> ScheduleDescription: - return ScheduleDescription( - id=id, - schedule=Schedule._from_proto(desc.schedule), - info=ScheduleInfo._from_proto(desc.info), - typed_search_attributes=temporalio.converter.decode_typed_search_attributes( - desc.search_attributes - ), - search_attributes=temporalio.converter.decode_search_attributes( - desc.search_attributes - ), - data_converter=converter, - raw_description=desc, - ) - - async def memo(self) -> Mapping[str, Any]: - """Schedule's memo values, converted without type hints. - - Since type hints are not used, the default converted values will come - back. For example, if the memo was originally created with a dataclass, - the value will be a dict. To convert using proper type hints, use - :py:meth:`memo_value`. - - Returns: - Mapping of all memo keys and they values without type hints. - """ - return { - k: (await self.data_converter.decode([v]))[0] - for k, v in self.raw_description.memo.fields.items() - } - - @overload - async def memo_value( - self, key: str, default: Any = temporalio.common._arg_unset - ) -> Any: ... - - @overload - async def memo_value( - self, key: str, *, type_hint: type[ParamType] - ) -> ParamType: ... - - @overload - async def memo_value( - self, key: str, default: AnyType, *, type_hint: type[ParamType] - ) -> AnyType | ParamType: ... - - async def memo_value( - self, - key: str, - default: Any = temporalio.common._arg_unset, - *, - type_hint: type | None = None, - ) -> Any: - """Memo value for the given key, optional default, and optional type - hint. - - Args: - key: Key to get memo value for. - default: Default to use if key is not present. If unset, a - :py:class:`KeyError` is raised when the key does not exist. - type_hint: Type hint to use when converting. - - Returns: - Memo value, converted with the type hint if present. - - Raises: - KeyError: Key not present and default not set. - """ - payload = self.raw_description.memo.fields.get(key) - if not payload: - if default is temporalio.common._arg_unset: - raise KeyError(f"Memo does not have a value for key {key}") - return default - return ( - await self.data_converter.decode( - [payload], [type_hint] if type_hint else None - ) - )[0] - - -@dataclass -class ScheduleInfo: - """Information about a schedule.""" - - num_actions: int - """Number of actions taken by this schedule.""" - - num_actions_missed_catchup_window: int - """Number of times an action was skipped due to missing the catchup - window.""" - - num_actions_skipped_overlap: int - """Number of actions skipped due to overlap.""" - - running_actions: Sequence[ScheduleActionExecution] - """Currently running actions.""" - - recent_actions: Sequence[ScheduleActionResult] - """10 most recent actions, oldest first.""" - - next_action_times: Sequence[datetime] - """Next 10 scheduled action times.""" - - created_at: datetime - """When the schedule was created.""" - - last_updated_at: datetime | None - """When the schedule was last updated.""" - - @staticmethod - def _from_proto(info: temporalio.api.schedule.v1.ScheduleInfo) -> ScheduleInfo: - return ScheduleInfo( - num_actions=info.action_count, - num_actions_missed_catchup_window=info.missed_catchup_window, - num_actions_skipped_overlap=info.overlap_skipped, - running_actions=[ - ScheduleActionExecutionStartWorkflow._from_proto(r) - for r in info.running_workflows - ], - recent_actions=[ - ScheduleActionResult._from_proto(r) for r in info.recent_actions - ], - next_action_times=[ - f.ToDatetime().replace(tzinfo=timezone.utc) - for f in info.future_action_times - ], - created_at=info.create_time.ToDatetime().replace(tzinfo=timezone.utc), - last_updated_at=info.update_time.ToDatetime().replace(tzinfo=timezone.utc) - if info.HasField("update_time") - else None, - ) - - -class ScheduleActionExecution(ABC): - """Base class for an action execution.""" - - pass - - -@dataclass -class ScheduleActionExecutionStartWorkflow(ScheduleActionExecution): - """Execution of a scheduled workflow start.""" - - workflow_id: str - """Workflow ID.""" - - first_execution_run_id: str - """Workflow run ID.""" - - @staticmethod - def _from_proto( - exec: temporalio.api.common.v1.WorkflowExecution, - ) -> ScheduleActionExecutionStartWorkflow: - return ScheduleActionExecutionStartWorkflow( - workflow_id=exec.workflow_id, - first_execution_run_id=exec.run_id, - ) - - -@dataclass -class ScheduleActionResult: - """Information about when an action took place.""" - - scheduled_at: datetime - """Scheduled time of the action including jitter.""" - - started_at: datetime - """When the action actually started.""" - - action: ScheduleActionExecution - """Action that took place.""" - - @staticmethod - def _from_proto( - res: temporalio.api.schedule.v1.ScheduleActionResult, - ) -> ScheduleActionResult: - return ScheduleActionResult( - scheduled_at=res.schedule_time.ToDatetime().replace(tzinfo=timezone.utc), - started_at=res.actual_time.ToDatetime().replace(tzinfo=timezone.utc), - action=ScheduleActionExecutionStartWorkflow._from_proto( - res.start_workflow_result - ), - ) - - -@dataclass -class ScheduleUpdateInput: - """Parameter for an update callback for :py:meth:`ScheduleHandle.update`.""" - - description: ScheduleDescription - """Current description of the schedule.""" - - -@dataclass -class ScheduleUpdate: - """Result of an update callback for :py:meth:`ScheduleHandle.update`.""" - - schedule: Schedule - """Schedule to update.""" - - search_attributes: temporalio.common.TypedSearchAttributes | None = None - """Search attributes to update.""" - - -@dataclass -class ScheduleListDescription: - """Description of a listed schedule.""" - - id: str - """ID of the schedule.""" - - schedule: ScheduleListSchedule | None - """Schedule details that can be mutated. - - This may not be present in older Temporal servers without advanced - visibility. - """ - - info: ScheduleListInfo | None - """Information about the schedule. - - This may not be present in older Temporal servers without advanced - visibility. - """ - - typed_search_attributes: temporalio.common.TypedSearchAttributes - """Search attributes on the schedule.""" - - search_attributes: temporalio.common.SearchAttributes - """Search attributes on the schedule. - - .. deprecated:: - Use :py:attr:`typed_search_attributes` instead. - """ - - data_converter: temporalio.converter.DataConverter - """Data converter used for memo decoding.""" - - raw_entry: temporalio.api.schedule.v1.ScheduleListEntry - """Raw description of the schedule.""" - - @staticmethod - def _from_proto( - entry: temporalio.api.schedule.v1.ScheduleListEntry, - converter: temporalio.converter.DataConverter, - ) -> ScheduleListDescription: - return ScheduleListDescription( - id=entry.schedule_id, - schedule=ScheduleListSchedule._from_proto(entry.info) - if entry.HasField("info") - else None, - info=ScheduleListInfo._from_proto(entry.info) - if entry.HasField("info") - else None, - typed_search_attributes=temporalio.converter.decode_typed_search_attributes( - entry.search_attributes - ), - search_attributes=temporalio.converter.decode_search_attributes( - entry.search_attributes - ), - data_converter=converter, - raw_entry=entry, - ) - - async def memo(self) -> Mapping[str, Any]: - """Schedule's memo values, converted without type hints. - - Since type hints are not used, the default converted values will come - back. For example, if the memo was originally created with a dataclass, - the value will be a dict. To convert using proper type hints, use - :py:meth:`memo_value`. - - Returns: - Mapping of all memo keys and they values without type hints. - """ - return { - k: (await self.data_converter.decode([v]))[0] - for k, v in self.raw_entry.memo.fields.items() - } - - @overload - async def memo_value( - self, key: str, default: Any = temporalio.common._arg_unset - ) -> Any: ... - - @overload - async def memo_value( - self, key: str, *, type_hint: type[ParamType] - ) -> ParamType: ... - - @overload - async def memo_value( - self, key: str, default: AnyType, *, type_hint: type[ParamType] - ) -> AnyType | ParamType: ... - - async def memo_value( - self, - key: str, - default: Any = temporalio.common._arg_unset, - *, - type_hint: type | None = None, - ) -> Any: - """Memo value for the given key, optional default, and optional type - hint. - - Args: - key: Key to get memo value for. - default: Default to use if key is not present. If unset, a - :py:class:`KeyError` is raised when the key does not exist. - type_hint: Type hint to use when converting. - - Returns: - Memo value, converted with the type hint if present. - - Raises: - KeyError: Key not present and default not set. - """ - payload = self.raw_entry.memo.fields.get(key) - if not payload: - if default is temporalio.common._arg_unset: - raise KeyError(f"Memo does not have a value for key {key}") - return default - return ( - await self.data_converter.decode( - [payload], [type_hint] if type_hint else None - ) - )[0] - - -@dataclass -class ScheduleListSchedule: - """Details for a listed schedule.""" - - action: ScheduleListAction - """Action taken when scheduled.""" - - spec: ScheduleSpec - """When the action is taken.""" - - state: ScheduleListState - """State of the schedule.""" - - @staticmethod - def _from_proto( - info: temporalio.api.schedule.v1.ScheduleListInfo, - ) -> ScheduleListSchedule: - # Only start workflow supported for now - if not info.HasField("workflow_type"): - raise ValueError("Unknown action on schedule") - return ScheduleListSchedule( - action=ScheduleListActionStartWorkflow(workflow=info.workflow_type.name), - spec=ScheduleSpec._from_proto(info.spec), - state=ScheduleListState._from_proto(info), - ) - - -class ScheduleListAction(ABC): - """Base class for an action a listed schedule can take.""" - - pass - - -@dataclass -class ScheduleListActionStartWorkflow(ScheduleListAction): - """Action to start a workflow on a listed schedule.""" - - workflow: str - """Workflow type name.""" - - -@dataclass -class ScheduleListInfo: - """Information about a listed schedule.""" - - recent_actions: Sequence[ScheduleActionResult] - """Most recent actions, oldest first. - - This may be a smaller amount than present on - :py:attr:`ScheduleDescription.info`. - """ - - next_action_times: Sequence[datetime] - """Next scheduled action times. - - This may be a smaller amount than present on - :py:attr:`ScheduleDescription.info`. - """ - - @staticmethod - def _from_proto( - info: temporalio.api.schedule.v1.ScheduleListInfo, - ) -> ScheduleListInfo: - return ScheduleListInfo( - recent_actions=[ - ScheduleActionResult._from_proto(r) for r in info.recent_actions - ], - next_action_times=[ - f.ToDatetime().replace(tzinfo=timezone.utc) - for f in info.future_action_times - ], - ) - - -@dataclass -class ScheduleListState: - """State of a listed schedule.""" - - note: str | None - """Human readable message for the schedule. - - The system may overwrite this value on certain conditions like - pause-on-failure. - """ - - paused: bool - """Whether the schedule is paused.""" - - @staticmethod - def _from_proto( - info: temporalio.api.schedule.v1.ScheduleListInfo, - ) -> ScheduleListState: - return ScheduleListState( - note=info.notes or None, - paused=info.paused, - ) - - -class ScheduleAsyncIterator: - """Asynchronous iterator for :py:class:`ScheduleListDescription` values. - - Most users should use ``async for`` on this iterator and not call any of the - methods within. - """ - - def __init__( - self, - client: Client, - input: ListSchedulesInput, - ) -> None: - """Create an asynchronous iterator for the given input. - - Users should not create this directly, but rather use - :py:meth:`Client.list_schedules`. - """ - self._client = client - self._input = input - self._next_page_token = input.next_page_token - self._current_page: Sequence[ScheduleListDescription] | None = None - self._current_page_index = 0 - - @property - def current_page_index(self) -> int: - """Index of the entry in the current page that will be returned from - the next :py:meth:`__anext__` call. - """ - return self._current_page_index - - @property - def current_page(self) -> Sequence[ScheduleListDescription] | None: - """Current page, if it has been fetched yet.""" - return self._current_page - - @property - def next_page_token(self) -> bytes | None: - """Token for the next page request if any.""" - return self._next_page_token - - async def fetch_next_page(self, *, page_size: int | None = None) -> None: - """Fetch the next page if any. - - Args: - page_size: Override the page size this iterator was originally - created with. - """ - resp = await self._client.workflow_service.list_schedules( - temporalio.api.workflowservice.v1.ListSchedulesRequest( - namespace=self._client.namespace, - maximum_page_size=page_size or self._input.page_size, - next_page_token=self._next_page_token or b"", - query=self._input.query or "", - ), - retry=True, - metadata=self._input.rpc_metadata, - timeout=self._input.rpc_timeout, - ) - self._current_page = [ - ScheduleListDescription._from_proto(v, self._client.data_converter) - for v in resp.schedules - ] - self._current_page_index = 0 - self._next_page_token = resp.next_page_token or None - - def __aiter__(self) -> ScheduleAsyncIterator: - """Return self as the iterator.""" - return self - - async def __anext__(self) -> ScheduleListDescription: - """Get the next execution on this iterator, fetching next page if - necessary. - """ - while True: - # No page? fetch and continue - if self._current_page is None: - await self.fetch_next_page() - continue - # No more left in page? - if self._current_page_index >= len(self._current_page): - # If there is a next page token, try to get another page and try - # again - if self._next_page_token is not None: - await self.fetch_next_page() - continue - # No more pages means we're done - raise StopAsyncIteration - # Get current, increment page index, and return - ret = self._current_page[self._current_page_index] - self._current_page_index += 1 - return ret - - -class WorkflowUpdateHandle(Generic[LocalReturnType]): - """Handle for a workflow update execution request.""" - - def __init__( - self, - client: Client, - id: str, - workflow_id: str, - *, - workflow_run_id: str | None = None, - result_type: type | None = None, - known_outcome: temporalio.api.update.v1.Outcome | None = None, - ): - """Create a workflow update handle. - - Users should not create this directly, but rather use - :py:meth:`WorkflowHandle.start_update` or :py:meth:`WorkflowHandle.get_update_handle`. - """ - self._client = client - self._id = id - self._workflow_id = workflow_id - self._workflow_run_id = workflow_run_id - self._result_type = result_type - self._known_outcome = known_outcome - - @functools.cached_property - def _data_converter(self) -> temporalio.converter.DataConverter: - return self._client.data_converter.with_context( - WorkflowSerializationContext( - namespace=self._client.namespace, - workflow_id=self.workflow_id, - ) - ) - - @property - def id(self) -> str: - """ID of this Update request.""" - return self._id - - @property - def workflow_id(self) -> str: - """The ID of the Workflow targeted by this Update.""" - return self._workflow_id - - @property - def workflow_run_id(self) -> str | None: - """If specified, the specific run of the Workflow targeted by this Update.""" - return self._workflow_run_id - - async def result( - self, - *, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> LocalReturnType: - """Wait for and return the result of the update. The result may already be known in which case no network call - is made. Otherwise the result will be polled for until it is returned. - - Args: - rpc_metadata: Headers used on the RPC call. Keys here override client-level RPC metadata keys. - rpc_timeout: Optional RPC deadline to set for each RPC call. Note: this is the timeout for each - RPC call while polling, not a timeout for the function as a whole. If an individual RPC times out, - it will be retried until the result is available. - - Raises: - WorkflowUpdateFailedError: If the update failed. - WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out - or was cancelled. This doesn't mean the update itself was timed - out or cancelled. - RPCError: Update result could not be fetched for some other reason. - """ - # Poll until outcome reached - await self._poll_until_outcome( - rpc_metadata=rpc_metadata, rpc_timeout=rpc_timeout - ) - - # Convert outcome to failure or value - assert self._known_outcome - if self._known_outcome.HasField("failure"): - raise WorkflowUpdateFailedError( - await self._data_converter.decode_failure(self._known_outcome.failure), - ) - if not self._known_outcome.success.payloads: - return None # type: ignore - type_hints = [self._result_type] if self._result_type else None - results = await self._data_converter.decode( - self._known_outcome.success.payloads, type_hints - ) - if not results: - return None # type: ignore - elif len(results) > 1: - warnings.warn(f"Expected single update result, got {len(results)}") - return results[0] - - async def _poll_until_outcome( - self, - rpc_metadata: Mapping[str, str | bytes] = {}, - rpc_timeout: timedelta | None = None, - ) -> None: - if self._known_outcome: - return - req = temporalio.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest( - namespace=self._client.namespace, - update_ref=temporalio.api.update.v1.UpdateRef( - workflow_execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=self.workflow_id, - run_id=self.workflow_run_id or "", - ), - update_id=self.id, - ), - identity=self._client.identity, - wait_policy=temporalio.api.update.v1.WaitPolicy( - lifecycle_stage=temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED - ), - ) - - # Continue polling as long as we have no outcome - while True: - try: - res = ( - await self._client.workflow_service.poll_workflow_execution_update( - req, - retry=True, - metadata=rpc_metadata, - timeout=rpc_timeout, - ) - ) - if res.HasField("outcome"): - self._known_outcome = res.outcome - return - except RPCError as err: - if ( - err.status == RPCStatusCode.DEADLINE_EXCEEDED - or err.status == RPCStatusCode.CANCELLED - ): - raise WorkflowUpdateRPCTimeoutOrCancelledError() from err - else: - raise - except asyncio.CancelledError as err: - raise WorkflowUpdateRPCTimeoutOrCancelledError() from err - - -class WorkflowUpdateStage(IntEnum): - """Stage to wait for workflow update to reach before returning from - ``start_update``. - """ - - ADMITTED = int( - temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED - ) - ACCEPTED = int( - temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED - ) - COMPLETED = int( - temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED - ) - - -class WorkflowFailureError(temporalio.exceptions.TemporalError): - """Error that occurs when a workflow is unsuccessful.""" - - def __init__(self, *, cause: BaseException) -> None: - """Create workflow failure error.""" - super().__init__("Workflow execution failed") - self.__cause__ = cause - - @property - def cause(self) -> BaseException: - """Cause of the workflow failure.""" - assert self.__cause__ - return self.__cause__ - - -class WorkflowContinuedAsNewError(temporalio.exceptions.TemporalError): - """Error that occurs when a workflow was continued as new.""" - - def __init__(self, new_execution_run_id: str) -> None: - """Create workflow continue as new error.""" - super().__init__("Workflow continued as new") - self._new_execution_run_id = new_execution_run_id - - @property - def new_execution_run_id(self) -> str: - """New execution run ID the workflow continued to""" - return self._new_execution_run_id - - -class WorkflowQueryRejectedError(temporalio.exceptions.TemporalError): - """Error that occurs when a query was rejected.""" - - def __init__(self, status: WorkflowExecutionStatus | None) -> None: - """Create workflow query rejected error.""" - super().__init__(f"Query rejected, status: {status}") - self._status = status - - @property - def status(self) -> WorkflowExecutionStatus | None: - """Get workflow execution status causing rejection.""" - return self._status - - -class WorkflowQueryFailedError(temporalio.exceptions.TemporalError): - """Error that occurs when a query fails.""" - - def __init__(self, message: str) -> None: - """Create workflow query failed error.""" - super().__init__(message) - self._message = message - - @property - def message(self) -> str: - """Get query failed message.""" - return self._message - - -class WorkflowUpdateFailedError(temporalio.exceptions.TemporalError): - """Error that occurs when an update fails.""" - - def __init__(self, cause: BaseException) -> None: - """Create workflow update failed error.""" - super().__init__("Workflow update failed") - self.__cause__ = cause - - @property - def cause(self) -> BaseException: - """Cause of the update failure.""" - assert self.__cause__ - return self.__cause__ - - -class RPCTimeoutOrCancelledError(temporalio.exceptions.TemporalError): - """Error that occurs on some client calls that timeout or get cancelled.""" - - pass - - -class WorkflowUpdateRPCTimeoutOrCancelledError(RPCTimeoutOrCancelledError): - """Error that occurs when update RPC call times out or is cancelled. - - Note, this is not related to any general concept of timing out or cancelling - a running update, this is only related to the client call itself. - """ - - def __init__(self) -> None: - """Create workflow update timeout or cancelled error.""" - super().__init__("Timeout or cancellation waiting for update") - - -class AsyncActivityCancelledError(temporalio.exceptions.TemporalError): - """Error that occurs when async activity attempted heartbeat but was cancelled.""" - - def __init__(self, details: ActivityCancellationDetails | None = None) -> None: - """Create async activity cancelled error.""" - super().__init__("Activity cancelled") - self.details = details - - -class ScheduleAlreadyRunningError(temporalio.exceptions.TemporalError): - """Error when a schedule is already running.""" - - def __init__(self) -> None: - """Create schedule already running error.""" - super().__init__("Schedule already running") - - -@dataclass -class StartWorkflowInput: - """Input for :py:meth:`OutboundInterceptor.start_workflow`.""" - - workflow: str - args: Sequence[Any] - id: str - task_queue: str - execution_timeout: timedelta | None - run_timeout: timedelta | None - task_timeout: timedelta | None - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy - retry_policy: temporalio.common.RetryPolicy | None - cron_schedule: str - memo: Mapping[str, Any] | None - search_attributes: None | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) - start_delay: timedelta | None - headers: Mapping[str, temporalio.api.common.v1.Payload] - start_signal: str | None - start_signal_args: Sequence[Any] - static_summary: str | None - static_details: str | None - # Type may be absent - ret_type: type | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - request_eager_start: bool - priority: temporalio.common.Priority - # The following options are experimental and unstable. - callbacks: Sequence[Callback] - workflow_event_links: Sequence[temporalio.api.common.v1.Link.WorkflowEvent] - request_id: str | None - versioning_override: temporalio.common.VersioningOverride | None = None - - -@dataclass -class CancelWorkflowInput: - """Input for :py:meth:`OutboundInterceptor.cancel_workflow`.""" - - id: str - run_id: str | None - first_execution_run_id: str | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class DescribeWorkflowInput: - """Input for :py:meth:`OutboundInterceptor.describe_workflow`.""" - - id: str - run_id: str | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class FetchWorkflowHistoryEventsInput: - """Input for :py:meth:`OutboundInterceptor.fetch_workflow_history_events`.""" - - id: str - run_id: str | None - page_size: int | None - next_page_token: bytes | None - wait_new_event: bool - event_filter_type: WorkflowHistoryEventFilterType - skip_archival: bool - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class ListWorkflowsInput: - """Input for :py:meth:`OutboundInterceptor.list_workflows`.""" - - query: str | None - page_size: int - next_page_token: bytes | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - limit: int | None - - -@dataclass -class CountWorkflowsInput: - """Input for :py:meth:`OutboundInterceptor.count_workflows`.""" - - query: str | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class QueryWorkflowInput: - """Input for :py:meth:`OutboundInterceptor.query_workflow`.""" - - id: str - run_id: str | None - query: str - args: Sequence[Any] - reject_condition: temporalio.common.QueryRejectCondition | None - headers: Mapping[str, temporalio.api.common.v1.Payload] - # Type may be absent - ret_type: type | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class SignalWorkflowInput: - """Input for :py:meth:`OutboundInterceptor.signal_workflow`.""" - - id: str - run_id: str | None - signal: str - args: Sequence[Any] - headers: Mapping[str, temporalio.api.common.v1.Payload] - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class TerminateWorkflowInput: - """Input for :py:meth:`OutboundInterceptor.terminate_workflow`.""" - - id: str - run_id: str | None - first_execution_run_id: str | None - args: Sequence[Any] - reason: str | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class StartWorkflowUpdateInput: - """Input for :py:meth:`OutboundInterceptor.start_workflow_update`.""" - - id: str - run_id: str | None - first_execution_run_id: str | None - update_id: str | None - update: str - args: Sequence[Any] - wait_for_stage: WorkflowUpdateStage - headers: Mapping[str, temporalio.api.common.v1.Payload] - ret_type: type | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class UpdateWithStartUpdateWorkflowInput: - """Update input for :py:meth:`OutboundInterceptor.start_update_with_start_workflow`.""" - - update_id: str | None - update: str - args: Sequence[Any] - wait_for_stage: WorkflowUpdateStage - headers: Mapping[str, temporalio.api.common.v1.Payload] - ret_type: type | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class UpdateWithStartStartWorkflowInput: - """StartWorkflow input for :py:meth:`OutboundInterceptor.start_update_with_start_workflow`.""" - - # Similar to StartWorkflowInput but without e.g. run_id, start_signal, - # start_signal_args, request_eager_start. - - workflow: str - args: Sequence[Any] - id: str - task_queue: str - execution_timeout: timedelta | None - run_timeout: timedelta | None - task_timeout: timedelta | None - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy - id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy - retry_policy: temporalio.common.RetryPolicy | None - cron_schedule: str - memo: Mapping[str, Any] | None - search_attributes: None | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) - start_delay: timedelta | None - headers: Mapping[str, temporalio.api.common.v1.Payload] - static_summary: str | None - static_details: str | None - # Type may be absent - ret_type: type | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - priority: temporalio.common.Priority - versioning_override: temporalio.common.VersioningOverride | None = None - - -@dataclass -class StartWorkflowUpdateWithStartInput: - """Input for :py:meth:`OutboundInterceptor.start_update_with_start_workflow`.""" - - start_workflow_input: UpdateWithStartStartWorkflowInput - update_workflow_input: UpdateWithStartUpdateWorkflowInput - _on_start: Callable[ - [temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse], None - ] - _on_start_error: Callable[[BaseException], None] - - -@dataclass -class HeartbeatAsyncActivityInput: - """Input for :py:meth:`OutboundInterceptor.heartbeat_async_activity`.""" - - id_or_token: AsyncActivityIDReference | bytes - details: Sequence[Any] - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - data_converter_override: DataConverter | None = None - - -@dataclass -class CompleteAsyncActivityInput: - """Input for :py:meth:`OutboundInterceptor.complete_async_activity`.""" - - id_or_token: AsyncActivityIDReference | bytes - result: Any | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - data_converter_override: DataConverter | None = None - - -@dataclass -class FailAsyncActivityInput: - """Input for :py:meth:`OutboundInterceptor.fail_async_activity`.""" - - id_or_token: AsyncActivityIDReference | bytes - error: Exception - last_heartbeat_details: Sequence[Any] - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - data_converter_override: DataConverter | None = None - - -@dataclass -class ReportCancellationAsyncActivityInput: - """Input for :py:meth:`OutboundInterceptor.report_cancellation_async_activity`.""" - - id_or_token: AsyncActivityIDReference | bytes - details: Sequence[Any] - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - data_converter_override: DataConverter | None = None - - -@dataclass -class CreateScheduleInput: - """Input for :py:meth:`OutboundInterceptor.create_schedule`.""" - - id: str - schedule: Schedule - trigger_immediately: bool - backfill: Sequence[ScheduleBackfill] - memo: Mapping[str, Any] | None - search_attributes: None | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class ListSchedulesInput: - """Input for :py:meth:`OutboundInterceptor.list_schedules`.""" - - page_size: int - next_page_token: bytes | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - query: str | None = None - - -@dataclass -class BackfillScheduleInput: - """Input for :py:meth:`OutboundInterceptor.backfill_schedule`.""" - - id: str - backfills: Sequence[ScheduleBackfill] - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class DeleteScheduleInput: - """Input for :py:meth:`OutboundInterceptor.delete_schedule`.""" - - id: str - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class DescribeScheduleInput: - """Input for :py:meth:`OutboundInterceptor.describe_schedule`.""" - - id: str - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class PauseScheduleInput: - """Input for :py:meth:`OutboundInterceptor.pause_schedule`.""" - - id: str - note: str | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class TriggerScheduleInput: - """Input for :py:meth:`OutboundInterceptor.trigger_schedule`.""" - - id: str - overlap: ScheduleOverlapPolicy | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class UnpauseScheduleInput: - """Input for :py:meth:`OutboundInterceptor.unpause_schedule`.""" - - id: str - note: str | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class UpdateScheduleInput: - """Input for :py:meth:`OutboundInterceptor.update_schedule`.""" - - id: str - updater: Callable[ - [ScheduleUpdateInput], - ScheduleUpdate | None | Awaitable[ScheduleUpdate | None], - ] - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class UpdateWorkerBuildIdCompatibilityInput: - """Input for :py:meth:`OutboundInterceptor.update_worker_build_id_compatibility`.""" - - task_queue: str - operation: BuildIdOp - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class GetWorkerBuildIdCompatibilityInput: - """Input for :py:meth:`OutboundInterceptor.get_worker_build_id_compatibility`.""" - - task_queue: str - max_sets: int | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class GetWorkerTaskReachabilityInput: - """Input for :py:meth:`OutboundInterceptor.get_worker_task_reachability`.""" - - build_ids: Sequence[str] - task_queues: Sequence[str] - reachability: TaskReachabilityType | None - rpc_metadata: Mapping[str, str | bytes] - rpc_timeout: timedelta | None - - -@dataclass -class Interceptor: - """Interceptor for clients. - - This should be extended by any client interceptors. - """ - - def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor: - """Method called for intercepting a client. - - Args: - next: The underlying outbound interceptor this interceptor should - delegate to. - - Returns: - The new interceptor that will be called for each client call. - """ - return next - - -class OutboundInterceptor: - """OutboundInterceptor for intercepting client calls. - - This should be extended by any client outbound interceptors. - """ - - def __init__(self, next: OutboundInterceptor) -> None: - """Create the outbound interceptor. - - Args: - next: The next interceptor in the chain. The default implementation - of all calls is to delegate to the next interceptor. - """ - self.next = next - - ### Workflow calls - - async def start_workflow( - self, input: StartWorkflowInput - ) -> WorkflowHandle[Any, Any]: - """Called for every :py:meth:`Client.start_workflow` call.""" - return await self.next.start_workflow(input) - - async def cancel_workflow(self, input: CancelWorkflowInput) -> None: - """Called for every :py:meth:`WorkflowHandle.cancel` call.""" - await self.next.cancel_workflow(input) - - async def describe_workflow( - self, input: DescribeWorkflowInput - ) -> WorkflowExecutionDescription: - """Called for every :py:meth:`WorkflowHandle.describe` call.""" - return await self.next.describe_workflow(input) - - def fetch_workflow_history_events( - self, input: FetchWorkflowHistoryEventsInput - ) -> WorkflowHistoryEventAsyncIterator: - """Called for every :py:meth:`WorkflowHandle.fetch_history_events` call.""" - return self.next.fetch_workflow_history_events(input) - - def list_workflows( - self, input: ListWorkflowsInput - ) -> WorkflowExecutionAsyncIterator: - """Called for every :py:meth:`Client.list_workflows` call.""" - return self.next.list_workflows(input) - - async def count_workflows( - self, input: CountWorkflowsInput - ) -> WorkflowExecutionCount: - """Called for every :py:meth:`Client.count_workflows` call.""" - return await self.next.count_workflows(input) - - async def query_workflow(self, input: QueryWorkflowInput) -> Any: - """Called for every :py:meth:`WorkflowHandle.query` call.""" - return await self.next.query_workflow(input) - - async def signal_workflow(self, input: SignalWorkflowInput) -> None: - """Called for every :py:meth:`WorkflowHandle.signal` call.""" - await self.next.signal_workflow(input) - - async def terminate_workflow(self, input: TerminateWorkflowInput) -> None: - """Called for every :py:meth:`WorkflowHandle.terminate` call.""" - await self.next.terminate_workflow(input) - - async def start_workflow_update( - self, input: StartWorkflowUpdateInput - ) -> WorkflowUpdateHandle[Any]: - """Called for every :py:meth:`WorkflowHandle.start_update` and :py:meth:`WorkflowHandle.execute_update` call.""" - return await self.next.start_workflow_update(input) - - async def start_update_with_start_workflow( - self, input: StartWorkflowUpdateWithStartInput - ) -> WorkflowUpdateHandle[Any]: - """Called for every :py:meth:`Client.start_update_with_start_workflow` and :py:meth:`Client.execute_update_with_start_workflow` call.""" - return await self.next.start_update_with_start_workflow(input) - - ### Async activity calls - - async def heartbeat_async_activity( - self, input: HeartbeatAsyncActivityInput - ) -> None: - """Called for every :py:meth:`AsyncActivityHandle.heartbeat` call.""" - await self.next.heartbeat_async_activity(input) - - async def complete_async_activity(self, input: CompleteAsyncActivityInput) -> None: - """Called for every :py:meth:`AsyncActivityHandle.complete` call.""" - await self.next.complete_async_activity(input) - - async def fail_async_activity(self, input: FailAsyncActivityInput) -> None: - """Called for every :py:meth:`AsyncActivityHandle.fail` call.""" - await self.next.fail_async_activity(input) - - async def report_cancellation_async_activity( - self, input: ReportCancellationAsyncActivityInput - ) -> None: - """Called for every :py:meth:`AsyncActivityHandle.report_cancellation` call.""" - await self.next.report_cancellation_async_activity(input) - - ### Schedule calls - - async def create_schedule(self, input: CreateScheduleInput) -> ScheduleHandle: - """Called for every :py:meth:`Client.create_schedule` call.""" - return await self.next.create_schedule(input) - - def list_schedules(self, input: ListSchedulesInput) -> ScheduleAsyncIterator: - """Called for every :py:meth:`Client.list_schedules` call.""" - return self.next.list_schedules(input) - - async def backfill_schedule(self, input: BackfillScheduleInput) -> None: - """Called for every :py:meth:`ScheduleHandle.backfill` call.""" - await self.next.backfill_schedule(input) - - async def delete_schedule(self, input: DeleteScheduleInput) -> None: - """Called for every :py:meth:`ScheduleHandle.delete` call.""" - await self.next.delete_schedule(input) - - async def describe_schedule( - self, input: DescribeScheduleInput - ) -> ScheduleDescription: - """Called for every :py:meth:`ScheduleHandle.describe` call.""" - return await self.next.describe_schedule(input) - - async def pause_schedule(self, input: PauseScheduleInput) -> None: - """Called for every :py:meth:`ScheduleHandle.pause` call.""" - await self.next.pause_schedule(input) - - async def trigger_schedule(self, input: TriggerScheduleInput) -> None: - """Called for every :py:meth:`ScheduleHandle.trigger` call.""" - await self.next.trigger_schedule(input) - - async def unpause_schedule(self, input: UnpauseScheduleInput) -> None: - """Called for every :py:meth:`ScheduleHandle.unpause` call.""" - await self.next.unpause_schedule(input) - - async def update_schedule(self, input: UpdateScheduleInput) -> None: - """Called for every :py:meth:`ScheduleHandle.update` call.""" - await self.next.update_schedule(input) - - async def update_worker_build_id_compatibility( - self, input: UpdateWorkerBuildIdCompatibilityInput - ) -> None: - """Called for every :py:meth:`Client.update_worker_build_id_compatibility` call.""" - await self.next.update_worker_build_id_compatibility(input) - - async def get_worker_build_id_compatibility( - self, input: GetWorkerBuildIdCompatibilityInput - ) -> WorkerBuildIdVersionSets: - """Called for every :py:meth:`Client.get_worker_build_id_compatibility` call.""" - return await self.next.get_worker_build_id_compatibility(input) - - async def get_worker_task_reachability( - self, input: GetWorkerTaskReachabilityInput - ) -> WorkerTaskReachability: - """Called for every :py:meth:`Client.get_worker_task_reachability` call.""" - return await self.next.get_worker_task_reachability(input) - - -class _ClientImpl(OutboundInterceptor): - def __init__(self, client: Client) -> None: # type: ignore - # We are intentionally not calling the base class's __init__ here - self._client = client - - ### Workflow calls - - async def start_workflow( - self, input: StartWorkflowInput - ) -> WorkflowHandle[Any, Any]: - req: ( - temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest - | temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest - ) - if input.start_signal is not None: - req = await self._build_signal_with_start_workflow_execution_request(input) - else: - req = await self._build_start_workflow_execution_request(input) - - resp: ( - temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse - | temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse - ) - first_execution_run_id = None - eagerly_started = False - try: - if isinstance( - req, - temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest, - ): - resp = await self._client.workflow_service.signal_with_start_workflow_execution( - req, - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - else: - resp = await self._client.workflow_service.start_workflow_execution( - req, - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - first_execution_run_id = resp.run_id - eagerly_started = resp.HasField("eager_workflow_task") - except RPCError as err: - # If the status is ALREADY_EXISTS and the details can be extracted - # as already started, use a different exception - if err.status == RPCStatusCode.ALREADY_EXISTS and err.grpc_status.details: - details = temporalio.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure() - if err.grpc_status.details[0].Unpack(details): - raise temporalio.exceptions.WorkflowAlreadyStartedError( - input.id, input.workflow, run_id=details.run_id - ) - raise - handle: WorkflowHandle[Any, Any] = WorkflowHandle( - self._client, - req.workflow_id, - result_run_id=resp.run_id, - first_execution_run_id=first_execution_run_id, - result_type=input.ret_type, - start_workflow_response=resp, - ) - setattr(handle, "__temporal_eagerly_started", eagerly_started) - return handle - - async def _build_start_workflow_execution_request( - self, input: StartWorkflowInput - ) -> temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest: - req = temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest() - await self._populate_start_workflow_execution_request(req, input) - # _populate_start_workflow_execution_request is used for both StartWorkflowInput - # and UpdateWithStartStartWorkflowInput. UpdateWithStartStartWorkflowInput does - # not have the following two fields so they are handled here. - req.request_eager_execution = input.request_eager_start - if input.request_id: - req.request_id = input.request_id - - links = [ - temporalio.api.common.v1.Link(workflow_event=link) - for link in input.workflow_event_links - ] - req.completion_callbacks.extend( - temporalio.api.common.v1.Callback( - nexus=temporalio.api.common.v1.Callback.Nexus( - url=callback.url, - header=callback.headers, - ), - links=links, - ) - for callback in input.callbacks - ) - # Links are duplicated on request for compatibility with older server versions. - req.links.extend(links) - - if temporalio.nexus._operation_context._in_nexus_backing_workflow_start_context(): - req.on_conflict_options.attach_request_id = True - req.on_conflict_options.attach_completion_callbacks = True - req.on_conflict_options.attach_links = True - - return req - - async def _build_signal_with_start_workflow_execution_request( - self, input: StartWorkflowInput - ) -> temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest: - assert input.start_signal - data_converter = self._client.data_converter.with_context( - WorkflowSerializationContext( - namespace=self._client.namespace, - workflow_id=input.id, - ) - ) - req = temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest( - signal_name=input.start_signal - ) - if input.start_signal_args: - req.signal_input.payloads.extend( - await data_converter.encode(input.start_signal_args) - ) - await self._populate_start_workflow_execution_request(req, input) - return req - - async def _build_update_with_start_start_workflow_execution_request( - self, input: UpdateWithStartStartWorkflowInput - ) -> temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest: - req = temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest() - await self._populate_start_workflow_execution_request(req, input) - return req - - async def _populate_start_workflow_execution_request( - self, - req: ( - temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest - | temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest - ), - input: StartWorkflowInput | UpdateWithStartStartWorkflowInput, - ) -> None: - data_converter = self._client.data_converter.with_context( - WorkflowSerializationContext( - namespace=self._client.namespace, - workflow_id=input.id, - ) - ) - req.namespace = self._client.namespace - req.workflow_id = input.id - req.workflow_type.name = input.workflow - req.task_queue.name = input.task_queue - if input.args: - req.input.payloads.extend(await data_converter.encode(input.args)) - if input.execution_timeout is not None: - req.workflow_execution_timeout.FromTimedelta(input.execution_timeout) - if input.run_timeout is not None: - req.workflow_run_timeout.FromTimedelta(input.run_timeout) - if input.task_timeout is not None: - req.workflow_task_timeout.FromTimedelta(input.task_timeout) - req.identity = self._client.identity - req.request_id = str(uuid.uuid4()) - req.workflow_id_reuse_policy = cast( - "temporalio.api.enums.v1.WorkflowIdReusePolicy.ValueType", - int(input.id_reuse_policy), - ) - req.workflow_id_conflict_policy = cast( - "temporalio.api.enums.v1.WorkflowIdConflictPolicy.ValueType", - int(input.id_conflict_policy), - ) - - if input.retry_policy is not None: - input.retry_policy.apply_to_proto(req.retry_policy) - req.cron_schedule = input.cron_schedule - if input.memo is not None: - for k, v in input.memo.items(): - req.memo.fields[k].CopyFrom((await data_converter.encode([v]))[0]) - if input.search_attributes is not None: - temporalio.converter.encode_search_attributes( - input.search_attributes, req.search_attributes - ) - metadata = await _encode_user_metadata( - data_converter, input.static_summary, input.static_details - ) - if metadata is not None: - req.user_metadata.CopyFrom(metadata) - if input.start_delay is not None: - req.workflow_start_delay.FromTimedelta(input.start_delay) - if input.headers is not None: - await self._apply_headers(input.headers, req.header.fields) - if input.priority is not None: - req.priority.CopyFrom(input.priority._to_proto()) - if input.versioning_override is not None: - req.versioning_override.CopyFrom(input.versioning_override._to_proto()) - - async def cancel_workflow(self, input: CancelWorkflowInput) -> None: - await self._client.workflow_service.request_cancel_workflow_execution( - temporalio.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest( - namespace=self._client.namespace, - workflow_execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=input.id, - run_id=input.run_id or "", - ), - identity=self._client.identity, - request_id=str(uuid.uuid4()), - first_execution_run_id=input.first_execution_run_id or "", - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - async def describe_workflow( - self, input: DescribeWorkflowInput - ) -> WorkflowExecutionDescription: - return await WorkflowExecutionDescription._from_raw_description( - await self._client.workflow_service.describe_workflow_execution( - temporalio.api.workflowservice.v1.DescribeWorkflowExecutionRequest( - namespace=self._client.namespace, - execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=input.id, - run_id=input.run_id or "", - ), - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ), - namespace=self._client.namespace, - converter=self._client.data_converter.with_context( - WorkflowSerializationContext( - namespace=self._client.namespace, - workflow_id=input.id, - ) - ), - ) - - def fetch_workflow_history_events( - self, input: FetchWorkflowHistoryEventsInput - ) -> WorkflowHistoryEventAsyncIterator: - return WorkflowHistoryEventAsyncIterator(self._client, input) - - def list_workflows( - self, input: ListWorkflowsInput - ) -> WorkflowExecutionAsyncIterator: - return WorkflowExecutionAsyncIterator(self._client, input) - - async def count_workflows( - self, input: CountWorkflowsInput - ) -> WorkflowExecutionCount: - return WorkflowExecutionCount._from_raw( - await self._client.workflow_service.count_workflow_executions( - temporalio.api.workflowservice.v1.CountWorkflowExecutionsRequest( - namespace=self._client.namespace, - query=input.query or "", - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - ) - - async def query_workflow(self, input: QueryWorkflowInput) -> Any: - data_converter = self._client.data_converter.with_context( - WorkflowSerializationContext( - namespace=self._client.namespace, - workflow_id=input.id, - ) - ) - req = temporalio.api.workflowservice.v1.QueryWorkflowRequest( - namespace=self._client.namespace, - execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=input.id, - run_id=input.run_id or "", - ), - ) - if input.reject_condition: - req.query_reject_condition = cast( - "temporalio.api.enums.v1.QueryRejectCondition.ValueType", - int(input.reject_condition), - ) - req.query.query_type = input.query - if input.args: - req.query.query_args.payloads.extend( - await data_converter.encode(input.args) - ) - if input.headers is not None: - await self._apply_headers(input.headers, req.query.header.fields) - try: - resp = await self._client.workflow_service.query_workflow( - req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout - ) - except RPCError as err: - # If the status is INVALID_ARGUMENT, we can assume it's a query - # failed error - if err.status == RPCStatusCode.INVALID_ARGUMENT: - raise WorkflowQueryFailedError(err.message) - else: - raise - if resp.HasField("query_rejected"): - raise WorkflowQueryRejectedError( - WorkflowExecutionStatus(resp.query_rejected.status) - if resp.query_rejected.status - else None - ) - if not resp.query_result.payloads: - return None - type_hints = [input.ret_type] if input.ret_type else None - results = await data_converter.decode(resp.query_result.payloads, type_hints) - if not results: - return None - elif len(results) > 1: - warnings.warn(f"Expected single query result, got {len(results)}") - return results[0] - - async def signal_workflow(self, input: SignalWorkflowInput) -> None: - data_converter = self._client.data_converter.with_context( - WorkflowSerializationContext( - namespace=self._client.namespace, - workflow_id=input.id, - ) - ) - req = temporalio.api.workflowservice.v1.SignalWorkflowExecutionRequest( - namespace=self._client.namespace, - workflow_execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=input.id, - run_id=input.run_id or "", - ), - signal_name=input.signal, - identity=self._client.identity, - request_id=str(uuid.uuid4()), - ) - if input.args: - req.input.payloads.extend(await data_converter.encode(input.args)) - if input.headers is not None: - await self._apply_headers(input.headers, req.header.fields) - await self._client.workflow_service.signal_workflow_execution( - req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout - ) - - async def terminate_workflow(self, input: TerminateWorkflowInput) -> None: - data_converter = self._client.data_converter.with_context( - WorkflowSerializationContext( - namespace=self._client.namespace, - workflow_id=input.id, - ) - ) - req = temporalio.api.workflowservice.v1.TerminateWorkflowExecutionRequest( - namespace=self._client.namespace, - workflow_execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=input.id, - run_id=input.run_id or "", - ), - reason=input.reason or "", - identity=self._client.identity, - first_execution_run_id=input.first_execution_run_id or "", - ) - if input.args: - req.details.payloads.extend(await data_converter.encode(input.args)) - await self._client.workflow_service.terminate_workflow_execution( - req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout - ) - - async def start_workflow_update( - self, input: StartWorkflowUpdateInput - ) -> WorkflowUpdateHandle[Any]: - workflow_id = input.id - req = await self._build_update_workflow_execution_request(input, workflow_id) - - # Repeatedly try to invoke UpdateWorkflowExecution until the update is durable. - resp: temporalio.api.workflowservice.v1.UpdateWorkflowExecutionResponse - while True: - try: - resp = await self._client.workflow_service.update_workflow_execution( - req, - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - except RPCError as err: - if ( - err.status == RPCStatusCode.DEADLINE_EXCEEDED - or err.status == RPCStatusCode.CANCELLED - ): - raise WorkflowUpdateRPCTimeoutOrCancelledError() from err - else: - raise - except asyncio.CancelledError as err: - raise WorkflowUpdateRPCTimeoutOrCancelledError() from err - if ( - resp.stage - >= temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED - ): - break - - # Build the handle. If the user's wait stage is COMPLETED, make sure we - # poll for result. - handle: WorkflowUpdateHandle[Any] = WorkflowUpdateHandle( - client=self._client, - id=req.request.meta.update_id, - workflow_id=workflow_id, - workflow_run_id=resp.update_ref.workflow_execution.run_id, - result_type=input.ret_type, - ) - if resp.HasField("outcome"): - handle._known_outcome = resp.outcome - if input.wait_for_stage == WorkflowUpdateStage.COMPLETED: - await handle._poll_until_outcome() - return handle - - async def _build_update_workflow_execution_request( - self, - input: StartWorkflowUpdateInput | UpdateWithStartUpdateWorkflowInput, - workflow_id: str, - ) -> temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest: - data_converter = self._client.data_converter.with_context( - WorkflowSerializationContext( - namespace=self._client.namespace, - workflow_id=workflow_id, - ) - ) - run_id, first_execution_run_id = ( - ( - input.run_id, - input.first_execution_run_id, - ) - if isinstance(input, StartWorkflowUpdateInput) - else (None, None) - ) - req = temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest( - namespace=self._client.namespace, - workflow_execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=workflow_id, - run_id=run_id or "", - ), - first_execution_run_id=first_execution_run_id or "", - request=temporalio.api.update.v1.Request( - meta=temporalio.api.update.v1.Meta( - update_id=input.update_id or str(uuid.uuid4()), - identity=self._client.identity, - ), - input=temporalio.api.update.v1.Input( - name=input.update, - ), - ), - wait_policy=temporalio.api.update.v1.WaitPolicy( - lifecycle_stage=temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.ValueType( - input.wait_for_stage - ) - ), - ) - if input.args: - req.request.input.args.payloads.extend( - await data_converter.encode(input.args) - ) - if input.headers is not None: - await self._apply_headers(input.headers, req.request.input.header.fields) - return req - - async def start_update_with_start_workflow( - self, input: StartWorkflowUpdateWithStartInput - ) -> WorkflowUpdateHandle[Any]: - seen_start = False - - def on_start( - start_response: temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse, - ): - nonlocal seen_start - if not seen_start: - input._on_start(start_response) - seen_start = True - - err: BaseException | None = None - - try: - return await self._start_workflow_update_with_start( - input.start_workflow_input, input.update_workflow_input, on_start - ) - except asyncio.CancelledError as _err: - err = _err - raise WorkflowUpdateRPCTimeoutOrCancelledError() from err - except RPCError as _err: - err = _err - if err.status in [ - RPCStatusCode.DEADLINE_EXCEEDED, - RPCStatusCode.CANCELLED, - ]: - raise WorkflowUpdateRPCTimeoutOrCancelledError() from err - else: - multiop_failure = ( - temporalio.api.errordetails.v1.MultiOperationExecutionFailure() - ) - if err.grpc_status.details and err.grpc_status.details[0].Unpack( - multiop_failure - ): - status = next( - ( - st - for st in multiop_failure.statuses - if ( - st.code != RPCStatusCode.OK - and not ( - st.details - and st.details[0].Is( - temporalio.api.failure.v1.MultiOperationExecutionAborted.DESCRIPTOR - ) - ) - ) - ), - None, - ) - if status and status.code in list(RPCStatusCode): - if ( - status.code == RPCStatusCode.ALREADY_EXISTS - and status.details - ): - details = temporalio.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure() - if status.details[0].Unpack(details): - err = temporalio.exceptions.WorkflowAlreadyStartedError( - input.start_workflow_input.id, - input.start_workflow_input.workflow, - run_id=details.run_id, - ) - else: - err = RPCError( - status.message, - RPCStatusCode(status.code), - err.raw_grpc_status, - ) - raise err - finally: - if err and not seen_start: - input._on_start_error(err) - - async def _start_workflow_update_with_start( - self, - start_input: UpdateWithStartStartWorkflowInput, - update_input: UpdateWithStartUpdateWorkflowInput, - on_start: Callable[ - [temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse], None - ], - ) -> WorkflowUpdateHandle[Any]: - start_req = ( - await self._build_update_with_start_start_workflow_execution_request( - start_input - ) - ) - update_req = await self._build_update_workflow_execution_request( - update_input, workflow_id=start_input.id - ) - multiop_req = temporalio.api.workflowservice.v1.ExecuteMultiOperationRequest( - namespace=self._client.namespace, - operations=[ - temporalio.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation( - start_workflow=start_req - ), - temporalio.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation( - update_workflow=update_req - ), - ], - ) - - # Repeatedly try to invoke ExecuteMultiOperation until the update is durable - while True: - multiop_response = ( - await self._client.workflow_service.execute_multi_operation(multiop_req) - ) - start_response = multiop_response.responses[0].start_workflow - update_response = multiop_response.responses[1].update_workflow - on_start(start_response) - known_outcome = ( - update_response.outcome if update_response.HasField("outcome") else None - ) - if ( - update_response.stage - >= temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED - ): - break - - handle: WorkflowUpdateHandle[Any] = WorkflowUpdateHandle( - client=self._client, - id=update_req.request.meta.update_id, - workflow_id=start_input.id, - workflow_run_id=start_response.run_id, - known_outcome=known_outcome, - result_type=update_input.ret_type, - ) - if update_input.wait_for_stage == WorkflowUpdateStage.COMPLETED: - await handle._poll_until_outcome() - - return handle - - ### Async activity calls - - async def heartbeat_async_activity( - self, input: HeartbeatAsyncActivityInput - ) -> None: - data_converter = input.data_converter_override or self._client.data_converter - details = ( - None - if not input.details - else await data_converter.encode_wrapper(input.details) - ) - if isinstance(input.id_or_token, AsyncActivityIDReference): - resp_by_id = await self._client.workflow_service.record_activity_task_heartbeat_by_id( - temporalio.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest( - workflow_id=input.id_or_token.workflow_id, - run_id=input.id_or_token.run_id or "", - activity_id=input.id_or_token.activity_id, - namespace=self._client.namespace, - identity=self._client.identity, - details=details, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - if ( - resp_by_id.cancel_requested - or resp_by_id.activity_paused - or resp_by_id.activity_reset - ): - raise AsyncActivityCancelledError( - details=ActivityCancellationDetails( - cancel_requested=resp_by_id.cancel_requested, - paused=resp_by_id.activity_paused, - reset=resp_by_id.activity_reset, - ) - ) - - else: - resp = await self._client.workflow_service.record_activity_task_heartbeat( - temporalio.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest( - task_token=input.id_or_token, - namespace=self._client.namespace, - identity=self._client.identity, - details=details, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - if resp.cancel_requested or resp.activity_paused: - raise AsyncActivityCancelledError( - details=ActivityCancellationDetails( - cancel_requested=resp.cancel_requested, - paused=resp.activity_paused, - reset=resp.activity_reset, - ) - ) - - async def complete_async_activity(self, input: CompleteAsyncActivityInput) -> None: - data_converter = input.data_converter_override or self._client.data_converter - result = ( - None - if input.result is temporalio.common._arg_unset - else await data_converter.encode_wrapper([input.result]) - ) - if isinstance(input.id_or_token, AsyncActivityIDReference): - await self._client.workflow_service.respond_activity_task_completed_by_id( - temporalio.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest( - workflow_id=input.id_or_token.workflow_id, - run_id=input.id_or_token.run_id or "", - activity_id=input.id_or_token.activity_id, - namespace=self._client.namespace, - identity=self._client.identity, - result=result, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - else: - await self._client.workflow_service.respond_activity_task_completed( - temporalio.api.workflowservice.v1.RespondActivityTaskCompletedRequest( - task_token=input.id_or_token, - namespace=self._client.namespace, - identity=self._client.identity, - result=result, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - async def fail_async_activity(self, input: FailAsyncActivityInput) -> None: - data_converter = input.data_converter_override or self._client.data_converter - - failure = temporalio.api.failure.v1.Failure() - await data_converter.encode_failure(input.error, failure) - last_heartbeat_details = ( - await data_converter.encode_wrapper(input.last_heartbeat_details) - if input.last_heartbeat_details - else None - ) - if isinstance(input.id_or_token, AsyncActivityIDReference): - await self._client.workflow_service.respond_activity_task_failed_by_id( - temporalio.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest( - workflow_id=input.id_or_token.workflow_id, - run_id=input.id_or_token.run_id or "", - activity_id=input.id_or_token.activity_id, - namespace=self._client.namespace, - identity=self._client.identity, - failure=failure, - last_heartbeat_details=last_heartbeat_details, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - else: - await self._client.workflow_service.respond_activity_task_failed( - temporalio.api.workflowservice.v1.RespondActivityTaskFailedRequest( - task_token=input.id_or_token, - namespace=self._client.namespace, - identity=self._client.identity, - failure=failure, - last_heartbeat_details=last_heartbeat_details, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - async def report_cancellation_async_activity( - self, input: ReportCancellationAsyncActivityInput - ) -> None: - data_converter = input.data_converter_override or self._client.data_converter - details = ( - None - if not input.details - else await data_converter.encode_wrapper(input.details) - ) - if isinstance(input.id_or_token, AsyncActivityIDReference): - await self._client.workflow_service.respond_activity_task_canceled_by_id( - temporalio.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest( - workflow_id=input.id_or_token.workflow_id, - run_id=input.id_or_token.run_id or "", - activity_id=input.id_or_token.activity_id, - namespace=self._client.namespace, - identity=self._client.identity, - details=details, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - else: - await self._client.workflow_service.respond_activity_task_canceled( - temporalio.api.workflowservice.v1.RespondActivityTaskCanceledRequest( - task_token=input.id_or_token, - namespace=self._client.namespace, - identity=self._client.identity, - details=details, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - ### Schedule calls - - async def create_schedule(self, input: CreateScheduleInput) -> ScheduleHandle: - # Limited actions must be false if remaining actions is 0 and must be - # true if remaining actions is non-zero - if ( - input.schedule.state.limited_actions - and not input.schedule.state.remaining_actions - ): - raise ValueError( - "Must set limited actions to false if there are no remaining actions set" - ) - if ( - not input.schedule.state.limited_actions - and input.schedule.state.remaining_actions - ): - raise ValueError( - "Must set limited actions to true if there are remaining actions set" - ) - - initial_patch: temporalio.api.schedule.v1.SchedulePatch | None = None - if input.trigger_immediately or input.backfill: - initial_patch = temporalio.api.schedule.v1.SchedulePatch( - trigger_immediately=temporalio.api.schedule.v1.TriggerImmediatelyRequest( - overlap_policy=temporalio.api.enums.v1.ScheduleOverlapPolicy.ValueType( - input.schedule.policy.overlap - ), - ) - if input.trigger_immediately - else None, - backfill_request=[b._to_proto() for b in input.backfill] - if input.backfill - else None, - ) - try: - request = temporalio.api.workflowservice.v1.CreateScheduleRequest( - namespace=self._client.namespace, - schedule_id=input.id, - schedule=await input.schedule._to_proto(self._client), - initial_patch=initial_patch, - identity=self._client.identity, - request_id=str(uuid.uuid4()), - memo=None - if not input.memo - else temporalio.api.common.v1.Memo( - fields={ - k: (await self._client.data_converter.encode([v]))[0] - for k, v in input.memo.items() - }, - ), - ) - if input.search_attributes: - temporalio.converter.encode_search_attributes( - input.search_attributes, request.search_attributes - ) - await self._client.workflow_service.create_schedule( - request, - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - except RPCError as err: - already_started = ( - err.status == RPCStatusCode.ALREADY_EXISTS - and err.grpc_status.details - and err.grpc_status.details[0].Is( - temporalio.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure.DESCRIPTOR - ) - ) - if already_started: - raise ScheduleAlreadyRunningError() - raise - return ScheduleHandle(self._client, input.id) - - def list_schedules(self, input: ListSchedulesInput) -> ScheduleAsyncIterator: - return ScheduleAsyncIterator(self._client, input) - - async def backfill_schedule(self, input: BackfillScheduleInput) -> None: - await self._client.workflow_service.patch_schedule( - temporalio.api.workflowservice.v1.PatchScheduleRequest( - namespace=self._client.namespace, - schedule_id=input.id, - patch=temporalio.api.schedule.v1.SchedulePatch( - backfill_request=[b._to_proto() for b in input.backfills], - ), - identity=self._client.identity, - request_id=str(uuid.uuid4()), - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - async def delete_schedule(self, input: DeleteScheduleInput) -> None: - await self._client.workflow_service.delete_schedule( - temporalio.api.workflowservice.v1.DeleteScheduleRequest( - namespace=self._client.namespace, - schedule_id=input.id, - identity=self._client.identity, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - async def describe_schedule( - self, input: DescribeScheduleInput - ) -> ScheduleDescription: - return ScheduleDescription._from_proto( - input.id, - await self._client.workflow_service.describe_schedule( - temporalio.api.workflowservice.v1.DescribeScheduleRequest( - namespace=self._client.namespace, - schedule_id=input.id, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ), - self._client.data_converter, - ) - - async def pause_schedule(self, input: PauseScheduleInput) -> None: - await self._client.workflow_service.patch_schedule( - temporalio.api.workflowservice.v1.PatchScheduleRequest( - namespace=self._client.namespace, - schedule_id=input.id, - patch=temporalio.api.schedule.v1.SchedulePatch( - pause=input.note or "Paused via Python SDK", - ), - identity=self._client.identity, - request_id=str(uuid.uuid4()), - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - async def trigger_schedule(self, input: TriggerScheduleInput) -> None: - overlap_policy = temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_UNSPECIFIED - if input.overlap: - overlap_policy = temporalio.api.enums.v1.ScheduleOverlapPolicy.ValueType( - input.overlap - ) - await self._client.workflow_service.patch_schedule( - temporalio.api.workflowservice.v1.PatchScheduleRequest( - namespace=self._client.namespace, - schedule_id=input.id, - patch=temporalio.api.schedule.v1.SchedulePatch( - trigger_immediately=temporalio.api.schedule.v1.TriggerImmediatelyRequest( - overlap_policy=overlap_policy, - ), - ), - identity=self._client.identity, - request_id=str(uuid.uuid4()), - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - async def unpause_schedule(self, input: UnpauseScheduleInput) -> None: - await self._client.workflow_service.patch_schedule( - temporalio.api.workflowservice.v1.PatchScheduleRequest( - namespace=self._client.namespace, - schedule_id=input.id, - patch=temporalio.api.schedule.v1.SchedulePatch( - unpause=input.note or "Unpaused via Python SDK", - ), - identity=self._client.identity, - request_id=str(uuid.uuid4()), - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - async def update_schedule(self, input: UpdateScheduleInput) -> None: - # TODO(cretz): This is supposed to be a retry-conflict loop, but we do - # not yet have a way to know update failure is due to conflict token - # mismatch - update = input.updater( - ScheduleUpdateInput( - description=ScheduleDescription._from_proto( - input.id, - await self._client.workflow_service.describe_schedule( - temporalio.api.workflowservice.v1.DescribeScheduleRequest( - namespace=self._client.namespace, - schedule_id=input.id, - ), - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ), - self._client.data_converter, - ) - ) - ) - if inspect.iscoroutine(update): - update = await update - if not update: - return - assert isinstance(update, ScheduleUpdate) - request = temporalio.api.workflowservice.v1.UpdateScheduleRequest( - namespace=self._client.namespace, - schedule_id=input.id, - schedule=await update.schedule._to_proto(self._client), - identity=self._client.identity, - request_id=str(uuid.uuid4()), - ) - if update.search_attributes is not None: - request.search_attributes.indexed_fields.clear() # Ensure that we at least create an empty map - temporalio.converter.encode_search_attributes( - update.search_attributes, request.search_attributes - ) - await self._client.workflow_service.update_schedule( - request, - retry=True, - metadata=input.rpc_metadata, - timeout=input.rpc_timeout, - ) - - async def update_worker_build_id_compatibility( - self, input: UpdateWorkerBuildIdCompatibilityInput - ) -> None: - req = input.operation._as_partial_proto() - req.namespace = self._client.namespace - req.task_queue = input.task_queue - await self._client.workflow_service.update_worker_build_id_compatibility( - req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout - ) - - async def get_worker_build_id_compatibility( - self, input: GetWorkerBuildIdCompatibilityInput - ) -> WorkerBuildIdVersionSets: - req = temporalio.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest( - namespace=self._client.namespace, - task_queue=input.task_queue, - max_sets=input.max_sets or 0, - ) - resp = await self._client.workflow_service.get_worker_build_id_compatibility( - req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout - ) - return WorkerBuildIdVersionSets._from_proto(resp) - - async def get_worker_task_reachability( - self, input: GetWorkerTaskReachabilityInput - ) -> WorkerTaskReachability: - req = temporalio.api.workflowservice.v1.GetWorkerTaskReachabilityRequest( - namespace=self._client.namespace, - build_ids=input.build_ids, - task_queues=input.task_queues, - reachability=input.reachability._to_proto() - if input.reachability - else temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_UNSPECIFIED, - ) - resp = await self._client.workflow_service.get_worker_task_reachability( - req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout - ) - return WorkerTaskReachability._from_proto(resp) - - async def _apply_headers( - self, - source: Mapping[str, temporalio.api.common.v1.Payload] | None, - dest: MessageMap[str, temporalio.api.common.v1.Payload], - ) -> None: - await _apply_headers( - source, - dest, - self._client.config(active_config=True)["header_codec_behavior"] - == HeaderCodecBehavior.CODEC, - self._client.data_converter.payload_codec, - ) - - -async def _apply_headers( - source: Mapping[str, temporalio.api.common.v1.Payload] | None, - dest: MessageMap[str, temporalio.api.common.v1.Payload], - encode_headers: bool, - codec: temporalio.converter.PayloadCodec | None, -) -> None: - if source is None: - return - if encode_headers and codec is not None: - for payload in source.values(): - new_payload = (await codec.encode([payload]))[0] - payload.CopyFrom(new_payload) - temporalio.common._apply_headers(source, dest) - - -def _history_from_json( - history: str | dict[str, Any], -) -> temporalio.api.history.v1.History: - if isinstance(history, str): - history = json.loads(history) - else: - # Copy the dict so we can mutate it - history = copy.deepcopy(history) - if not isinstance(history, dict): - raise ValueError("JSON history not a dictionary") - events = history.get("events") - if not isinstance(events, Iterable): - raise ValueError("History does not have iterable 'events'") - for event in events: - if not isinstance(event, dict): - raise ValueError("Event not a dictionary") - _fix_history_enum( - "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE", - event, - "requestCancelExternalWorkflowExecutionFailedEventAttributes", - "cause", - ) - _fix_history_enum("CONTINUE_AS_NEW_INITIATOR", event, "*", "initiator") - _fix_history_enum("EVENT_TYPE", event, "eventType") - _fix_history_enum( - "PARENT_CLOSE_POLICY", - event, - "startChildWorkflowExecutionInitiatedEventAttributes", - "parentClosePolicy", - ) - _fix_history_enum("RETRY_STATE", event, "*", "retryState") - _fix_history_enum( - "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE", - event, - "signalExternalWorkflowExecutionFailedEventAttributes", - "cause", - ) - _fix_history_enum( - "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE", - event, - "startChildWorkflowExecutionFailedEventAttributes", - "cause", - ) - _fix_history_enum("TASK_QUEUE_KIND", event, "*", "taskQueue", "kind") - _fix_history_enum( - "TIMEOUT_TYPE", - event, - "workflowTaskTimedOutEventAttributes", - "timeoutType", - ) - _fix_history_enum( - "WORKFLOW_ID_REUSE_POLICY", - event, - "startChildWorkflowExecutionInitiatedEventAttributes", - "workflowIdReusePolicy", - ) - _fix_history_enum( - "WORKFLOW_TASK_FAILED_CAUSE", - event, - "workflowTaskFailedEventAttributes", - "cause", - ) - _fix_history_failure(event, "*", "failure") - _fix_history_failure(event, "activityTaskStartedEventAttributes", "lastFailure") - _fix_history_failure( - event, "workflowExecutionStartedEventAttributes", "continuedFailure" - ) - return google.protobuf.json_format.ParseDict( - history, temporalio.api.history.v1.History(), ignore_unknown_fields=True - ) - - -_pascal_case_match = re.compile("([A-Z]+)") - - -def _fix_history_failure(parent: dict[str, Any], *attrs: str) -> None: - _fix_history_enum( - "TIMEOUT_TYPE", parent, *attrs, "timeoutFailureInfo", "timeoutType" - ) - _fix_history_enum("RETRY_STATE", parent, *attrs, "*", "retryState") - # Recurse into causes. First collect all failure parents. - parents = [parent] - for attr in attrs: - new_parents = [] - for parent in parents: - if attr == "*": - for v in parent.values(): - if isinstance(v, dict): - new_parents.append(v) - else: - child = parent.get(attr) - if isinstance(child, dict): - new_parents.append(child) - if not new_parents: - return - parents = new_parents - # Fix each - for parent in parents: - _fix_history_failure(parent, "cause") - - -def _fix_history_enum(prefix: str, parent: dict[str, Any], *attrs: str) -> None: - # If the attr is "*", we need to handle all dict children - if attrs[0] == "*": - for child in parent.values(): - if isinstance(child, dict): - _fix_history_enum(prefix, child, *attrs[1:]) - else: - child = parent.get(attrs[0]) - if isinstance(child, str) and len(attrs) == 1: - # We only fix it if it doesn't already have the prefix - if not parent[attrs[0]].startswith(prefix): - parent[attrs[0]] = ( - prefix + _pascal_case_match.sub(r"_\1", child).upper() - ) - elif isinstance(child, dict) and len(attrs) > 1: - _fix_history_enum(prefix, child, *attrs[1:]) - elif isinstance(child, list) and len(attrs) > 1: - for child_item in child: - if isinstance(child_item, dict): - _fix_history_enum(prefix, child_item, *attrs[1:]) - - -@dataclass(frozen=True) -class WorkerBuildIdVersionSets: - """Represents the sets of compatible Build ID versions associated with some Task Queue, as - fetched by :py:meth:`Client.get_worker_build_id_compatibility`. - """ - - version_sets: Sequence[BuildIdVersionSet] - """All version sets that were fetched for this task queue.""" - - def default_set(self) -> BuildIdVersionSet: - """Returns the default version set for this task queue.""" - return self.version_sets[-1] - - def default_build_id(self) -> str: - """Returns the default Build ID for this task queue.""" - return self.default_set().default() - - @staticmethod - def _from_proto( - resp: temporalio.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse, - ) -> WorkerBuildIdVersionSets: - return WorkerBuildIdVersionSets( - version_sets=[ - BuildIdVersionSet(mvs.build_ids) for mvs in resp.major_version_sets - ] - ) - - -@dataclass(frozen=True) -class BuildIdVersionSet: - """A set of Build IDs which are compatible with each other.""" - - build_ids: Sequence[str] - """All Build IDs contained in the set.""" - - def default(self) -> str: - """Returns the default Build ID for this set.""" - return self.build_ids[-1] - - -class BuildIdOp(ABC): - """Base class for Build ID operations as used by - :py:meth:`Client.update_worker_build_id_compatibility`. - """ - - @abstractmethod - def _as_partial_proto( - self, - ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: - """Returns a partial request with the operation populated. Caller must populate - non-operation fields. This is done b/c there's no good way to assign a non-primitive message - as the operation after initializing the request. - """ - ... - - -@dataclass(frozen=True) -class BuildIdOpAddNewDefault(BuildIdOp): - """Adds a new Build Id into a new set, which will be used as the default set for - the queue. This means all new workflows will start on this Build Id. - """ - - build_id: str - - def _as_partial_proto( - self, - ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: - return ( - temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( - add_new_build_id_in_new_default_set=self.build_id - ) - ) - - -@dataclass(frozen=True) -class BuildIdOpAddNewCompatible(BuildIdOp): - """Adds a new Build Id into an existing compatible set. The newly added ID becomes - the default for that compatible set, and thus new workflow tasks for workflows which have been - executing on workers in that set will now start on this new Build Id. - """ - - build_id: str - """The Build Id to add to the compatible set.""" - - existing_compatible_build_id: str - """A Build Id which must already be defined on the task queue, and is used to find the - compatible set to add the new id to. - """ - - promote_set: bool = False - """If set to true, the targeted set will also be promoted to become the overall default set for - the queue.""" - - def _as_partial_proto( - self, - ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: - return temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( - add_new_compatible_build_id=temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion( - new_build_id=self.build_id, - existing_compatible_build_id=self.existing_compatible_build_id, - make_set_default=self.promote_set, - ) - ) - - -@dataclass(frozen=True) -class BuildIdOpPromoteSetByBuildId(BuildIdOp): - """Promotes a set of compatible Build Ids to become the current default set for the task queue. - Any Build Id in the set may be used to target it. - """ - - build_id: str - """A Build Id which must already be defined on the task queue, and is used to find the - compatible set to promote.""" - - def _as_partial_proto( - self, - ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: - return ( - temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( - promote_set_by_build_id=self.build_id - ) - ) - - -@dataclass(frozen=True) -class BuildIdOpPromoteBuildIdWithinSet(BuildIdOp): - """Promotes a Build Id within an existing set to become the default ID for that set.""" - - build_id: str - - def _as_partial_proto( - self, - ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: - return ( - temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( - promote_build_id_within_set=self.build_id - ) - ) - - -@dataclass(frozen=True) -class BuildIdOpMergeSets(BuildIdOp): - """Merges two sets into one set, thus declaring all the Build Ids in both as compatible with one - another. The default of the primary set is maintained as the merged set's overall default. - """ - - primary_build_id: str - """A Build Id which and is used to find the primary set to be merged.""" - - secondary_build_id: str - """A Build Id which and is used to find the secondary set to be merged.""" - - def _as_partial_proto( - self, - ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: - return temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( - merge_sets=temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets( - primary_set_build_id=self.primary_build_id, - secondary_set_build_id=self.secondary_build_id, - ) - ) - - -@dataclass(frozen=True) -class WorkerTaskReachability: - """Contains information about the reachability of some Build IDs""" - - build_id_reachability: Mapping[str, BuildIdReachability] - """Maps Build IDs to information about their reachability""" - - @staticmethod - def _from_proto( - resp: temporalio.api.workflowservice.v1.GetWorkerTaskReachabilityResponse, - ) -> WorkerTaskReachability: - mapping = dict() - for bid_reach in resp.build_id_reachability: - tq_mapping = dict() - unretrieved = set() - for tq_reach in bid_reach.task_queue_reachability: - if tq_reach.reachability == [ - temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_UNSPECIFIED - ]: - unretrieved.add(tq_reach.task_queue) - continue - tq_mapping[tq_reach.task_queue] = [ - TaskReachabilityType._from_proto(r) for r in tq_reach.reachability - ] - - mapping[bid_reach.build_id] = BuildIdReachability( - task_queue_reachability=tq_mapping, - unretrieved_task_queues=frozenset(unretrieved), - ) - - return WorkerTaskReachability(build_id_reachability=mapping) - - -@dataclass(frozen=True) -class BuildIdReachability: - """Contains information about the reachability of a specific Build ID""" - - task_queue_reachability: Mapping[str, Sequence[TaskReachabilityType]] - """Maps Task Queue names to the reachability status of the Build ID on that queue. If the value - is an empty list, the Build ID is not reachable on that queue. - """ - - unretrieved_task_queues: frozenset[str] - """If any Task Queues could not be retrieved because the server limits the number that can be - queried at once, they will be listed here. - """ - - -class TaskReachabilityType(Enum): - """Enumerates how a task might reach certain kinds of workflows""" - - NEW_WORKFLOWS = 1 - EXISTING_WORKFLOWS = 2 - OPEN_WORKFLOWS = 3 - CLOSED_WORKFLOWS = 4 - - @staticmethod - def _from_proto( - reachability: temporalio.api.enums.v1.TaskReachability.ValueType, - ) -> TaskReachabilityType: - if ( - reachability - == temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_NEW_WORKFLOWS - ): - return TaskReachabilityType.NEW_WORKFLOWS - elif ( - reachability - == temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_EXISTING_WORKFLOWS - ): - return TaskReachabilityType.EXISTING_WORKFLOWS - elif ( - reachability - == temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_OPEN_WORKFLOWS - ): - return TaskReachabilityType.OPEN_WORKFLOWS - elif ( - reachability - == temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_CLOSED_WORKFLOWS - ): - return TaskReachabilityType.CLOSED_WORKFLOWS - else: - raise ValueError(f"Cannot convert reachability type: {reachability}") - - def _to_proto(self) -> temporalio.api.enums.v1.TaskReachability.ValueType: - if self == TaskReachabilityType.NEW_WORKFLOWS: - return ( - temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_NEW_WORKFLOWS - ) - elif self == TaskReachabilityType.EXISTING_WORKFLOWS: - return temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_EXISTING_WORKFLOWS - elif self == TaskReachabilityType.OPEN_WORKFLOWS: - return temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_OPEN_WORKFLOWS - elif self == TaskReachabilityType.CLOSED_WORKFLOWS: - return temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_CLOSED_WORKFLOWS - else: - return ( - temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_UNSPECIFIED - ) - - -class CloudOperationsClient: - """Client for accessing Temporal Cloud Operations API. - - .. warning:: - This client and the API are experimental - - Most users will use :py:meth:`connect` to create a client. The - :py:attr:`cloud_service` property provides access to a raw gRPC cloud - service client. - - Clients are not thread-safe and should only be used in the event loop they - are first connected in. If a client needs to be used from another thread - than where it was created, make sure the event loop where it was created is - captured, and then call :py:func:`asyncio.run_coroutine_threadsafe` with the - client call and that event loop. - - Clients do not work across forks since runtimes do not work across forks. - """ - - @staticmethod - async def connect( - *, - api_key: str | None = None, - version: str | None = None, - target_host: str = "saas-api.tmprl.cloud:443", - tls: bool | TLSConfig = True, - retry_config: RetryConfig | None = None, - keep_alive_config: KeepAliveConfig | None = KeepAliveConfig.default, - rpc_metadata: Mapping[str, str | bytes] = {}, - identity: str | None = None, - lazy: bool = False, - runtime: temporalio.runtime.Runtime | None = None, - http_connect_proxy_config: HttpConnectProxyConfig | None = None, - ) -> CloudOperationsClient: - """Connect to a Temporal Cloud Operations API. - - .. warning:: - This client and the API are experimental - - Args: - api_key: API key for Temporal. This becomes the "Authorization" - HTTP header with "Bearer " prepended. This is only set if RPC - metadata doesn't already have an "authorization" key. This is - essentially required for access to the cloud API. - version: Version header for safer mutations. May or may not be - required depending on cloud settings. - target_host: ``host:port`` for the Temporal server. The default is - to the common cloud endpoint. - tls: If true, the default, use system default TLS configuration. If - false, the default, do not use TLS. If TLS configuration - present, that TLS configuration will be used. The default is - usually required to access the API. - retry_config: Retry configuration for direct service calls (when - opted in) or all high-level calls made by this client (which all - opt-in to retries by default). If unset, a default retry - configuration is used. - keep_alive_config: Keep-alive configuration for the client - connection. Default is to check every 30s and kill the - connection if a response doesn't come back in 15s. Can be set to - ``None`` to disable. - rpc_metadata: Headers to use for all calls to the server. Keys here - can be overriden by per-call RPC metadata keys. - identity: Identity for this client. If unset, a default is created - based on the version of the SDK. - lazy: If true, the client will not connect until the first call is - attempted or a worker is created with it. Lazy clients cannot be - used for workers. - runtime: The runtime for this client, or the default if unset. - http_connect_proxy_config: Configuration for HTTP CONNECT proxy. - """ - # Add version if given - if version: - rpc_metadata = dict(rpc_metadata) - rpc_metadata["temporal-cloud-api-version"] = version - connect_config = temporalio.service.ConnectConfig( - target_host=target_host, - api_key=api_key, - tls=tls, - retry_config=retry_config, - keep_alive_config=keep_alive_config, - rpc_metadata=rpc_metadata, - identity=identity or "", - lazy=lazy, - runtime=runtime, - http_connect_proxy_config=http_connect_proxy_config, - ) - return CloudOperationsClient( - await temporalio.service.ServiceClient.connect(connect_config) - ) - - def __init__( - self, - service_client: temporalio.service.ServiceClient, - ): - """Create a Temporal Cloud Operations client from a service client. - - .. warning:: - This client and the API are experimental - - Args: - service_client: Existing service client to use. - """ - self._service_client = service_client - - @property - def service_client(self) -> temporalio.service.ServiceClient: - """Raw gRPC service client.""" - return self._service_client - - @property - def cloud_service(self) -> temporalio.service.CloudService: - """Raw gRPC cloud service client.""" - return self._service_client.cloud_service - - @property - def identity(self) -> str: - """Identity used in calls by this client.""" - return self._service_client.config.identity - - @property - def rpc_metadata(self) -> Mapping[str, str | bytes]: - """Headers for every call made by this client. - - Do not use mutate this mapping. Rather, set this property with an - entirely new mapping to change the headers. This may include the - ``temporal-cloud-api-version`` header if set. - """ - return self.service_client.config.rpc_metadata - - @rpc_metadata.setter - def rpc_metadata(self, value: Mapping[str, str | bytes]) -> None: - """Update the headers for this client. - - Do not mutate this mapping after set. Rather, set an entirely new - mapping if changes are needed. Currently this must be set with the - ``temporal-cloud-api-version`` header if it is needed. - """ - # Update config and perform update - self.service_client.config.rpc_metadata = value - self.service_client.update_rpc_metadata(value) - - @property - def api_key(self) -> str | None: - """API key for every call made by this client.""" - return self.service_client.config.api_key - - @api_key.setter - def api_key(self, value: str | None) -> None: - """Update the API key for this client. - - This is only set if RPCmetadata doesn't already have an "authorization" - key. - """ - # Update config and perform update - self.service_client.config.api_key = value - self.service_client.update_api_key(value) - - -# Intended to become a union of callback types -Callback = temporalio.nexus.NexusCallback - - -async def _encode_user_metadata( - converter: temporalio.converter.DataConverter, - summary: str | temporalio.api.common.v1.Payload | None, - details: str | temporalio.api.common.v1.Payload | None, -) -> temporalio.api.sdk.v1.UserMetadata | None: - if summary is None and details is None: - return None - enc_summary = None - enc_details = None - if summary is not None: - if isinstance(summary, str): - enc_summary = (await converter.encode([summary]))[0] - else: - enc_summary = summary - if details is not None: - if isinstance(details, str): - enc_details = (await converter.encode([details]))[0] - else: - enc_details = details - return temporalio.api.sdk.v1.UserMetadata(summary=enc_summary, details=enc_details) - - -async def _decode_user_metadata( - converter: temporalio.converter.DataConverter, - metadata: temporalio.api.sdk.v1.UserMetadata | None, -) -> tuple[str | None, str | None]: - """Returns (summary, details)""" - if metadata is None: - return None, None - return ( - None - if not metadata.HasField("summary") - else (await converter.decode([metadata.summary]))[0], - None - if not metadata.HasField("details") - else (await converter.decode([metadata.details]))[0], - ) - - -class Plugin(abc.ABC): - """Base class for client plugins that can intercept and modify client behavior. - - Plugins allow customization of client creation and service connection processes - through a chain of responsibility pattern. Each plugin can modify the client - configuration or intercept service client connections. - - If the plugin is also a temporalio.worker.Plugin, it will additionally be propagated as a worker plugin. - You should likley not also provide it to the worker as that will result in the plugin being applied twice. - """ - - def name(self) -> str: - """Get the name of this plugin. Can be overridden if desired to provide a more appropriate name. - - Returns: - The fully qualified name of the plugin class (module.classname). - """ - return type(self).__module__ + "." + type(self).__qualname__ - - @abstractmethod - def configure_client(self, config: ClientConfig) -> ClientConfig: - """Hook called when creating a client to allow modification of configuration. - - This method is called during client creation and allows plugins to modify - the client configuration before the client is fully initialized. Plugins - can add interceptors, modify connection parameters, or change other settings. - - Args: - config: The client configuration dictionary to potentially modify. - - Returns: - The modified client configuration. - """ - - @abstractmethod - async def connect_service_client( - self, - config: ConnectConfig, - next: Callable[[ConnectConfig], Awaitable[ServiceClient]], - ) -> ServiceClient: - """Hook called when connecting to the Temporal service. - - This method is called during service client connection and allows plugins - to intercept or modify the connection process. Plugins can modify connection - parameters, add authentication, or provide custom connection logic. - - Args: - config: The service connection configuration. - - Returns: - The connected service client. - """ diff --git a/temporalio/client/__init__.py b/temporalio/client/__init__.py new file mode 100644 index 0000000000..2eef41a39d --- /dev/null +++ b/temporalio/client/__init__.py @@ -0,0 +1,400 @@ +"""Client for accessing Temporal.""" + +from __future__ import annotations + +from temporalio.activity import ActivityCancellationDetails +from temporalio.converter import ( + ActivitySerializationContext, + DataConverter, + SerializationContext, + StorageDriverActivityInfo, + StorageDriverSelectContext, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, + WithSerializationContext, + WorkflowSerializationContext, +) +from temporalio.service import ( + ConnectConfig, + DnsLoadBalancingConfig, + GrpcCompression, + HttpConnectProxyConfig, + KeepAliveConfig, + PayloadLimitsConfig, + RetryConfig, + RPCError, + RPCStatusCode, + ServiceClient, + TLSConfig, +) + +from ..common import HeaderCodecBehavior +from ..types import ( + AnyType, + CallableAsyncNoParam, + CallableAsyncSingleParam, + CallableSyncNoParam, + CallableSyncSingleParam, + LocalReturnType, + MethodAsyncNoParam, + MethodAsyncSingleParam, + MethodSyncOrAsyncNoParam, + MethodSyncOrAsyncSingleParam, + MultiParamSpec, + ParamType, + ReturnType, + SelfType, +) +from ._activity import ( + ActivityExecution, + ActivityExecutionAsyncIterator, + ActivityExecutionCount, + ActivityExecutionCountAggregationGroup, + ActivityExecutionDescription, + ActivityExecutionOptions, + ActivityExecutionStatus, + ActivityHandle, + ActivityOptionsKey, + ActivityOptionsKeys, + ActivityOptionsUpdate, + AsyncActivityHandle, + AsyncActivityIDReference, + PendingActivityState, +) +from ._callback import ( + Callback, +) +from ._client import ( + Client, + ClientConfig, + ClientConnectConfig, +) +from ._cloud import ( + CloudOperationsClient, +) +from ._exceptions import ( + ActivityFailureError, + AsyncActivityCancelledError, + RPCTimeoutOrCancelledError, + ScheduleAlreadyRunningError, + WorkflowContinuedAsNewError, + WorkflowFailureError, + WorkflowQueryFailedError, + WorkflowQueryRejectedError, + WorkflowUpdateFailedError, + WorkflowUpdateRPCTimeoutOrCancelledError, +) +from ._helpers import ( + _apply_headers, + _decode_user_metadata, + _encode_user_metadata, + _fix_history_enum, + _fix_history_failure, + _history_from_json, + _pascal_case_match, +) +from ._impl import _ClientImpl +from ._interceptor import ( + BackfillScheduleInput, + CancelActivityInput, + CancelNexusOperationInput, + CancelWorkflowInput, + CompleteAsyncActivityInput, + CountActivitiesInput, + CountNexusOperationsInput, + CountWorkflowsInput, + CreateScheduleInput, + DeleteScheduleInput, + DescribeActivityInput, + DescribeNexusOperationInput, + DescribeScheduleInput, + DescribeWorkflowInput, + FailAsyncActivityInput, + FetchWorkflowHistoryEventsInput, + GetNexusOperationResultInput, + GetWorkerBuildIdCompatibilityInput, + GetWorkerTaskReachabilityInput, + HeartbeatAsyncActivityInput, + Interceptor, + ListActivitiesInput, + ListNexusOperationsInput, + ListSchedulesInput, + ListWorkflowsInput, + OutboundInterceptor, + PauseActivityInput, + PauseScheduleInput, + QueryWorkflowInput, + ReportCancellationAsyncActivityInput, + SignalWorkflowInput, + StartActivityInput, + StartNexusOperationInput, + StartWorkflowInput, + StartWorkflowUpdateInput, + StartWorkflowUpdateWithStartInput, + TerminateActivityInput, + TerminateNexusOperationInput, + TerminateWorkflowInput, + TriggerScheduleInput, + UnpauseActivityInput, + UnpauseScheduleInput, + UpdateActivityOptionsInput, + UpdateScheduleInput, + UpdateWithStartStartWorkflowInput, + UpdateWithStartUpdateWorkflowInput, + UpdateWorkerBuildIdCompatibilityInput, +) +from ._nexus import ( + NexusClient, + NexusOperationExecution, + NexusOperationExecutionAsyncIterator, + NexusOperationExecutionCancellationInfo, + NexusOperationExecutionCount, + NexusOperationExecutionCountAggregationGroup, + NexusOperationExecutionDescription, + NexusOperationFailureError, + NexusOperationHandle, +) +from ._plugin import ( + Plugin, +) +from ._schedule import ( + Schedule, + ScheduleAction, + ScheduleActionExecution, + ScheduleActionExecutionStartWorkflow, + ScheduleActionResult, + ScheduleActionStartWorkflow, + ScheduleAsyncIterator, + ScheduleBackfill, + ScheduleCalendarSpec, + ScheduleDescription, + ScheduleHandle, + ScheduleInfo, + ScheduleIntervalSpec, + ScheduleListAction, + ScheduleListActionStartWorkflow, + ScheduleListDescription, + ScheduleListInfo, + ScheduleListSchedule, + ScheduleListState, + ScheduleOverlapPolicy, + SchedulePolicy, + ScheduleRange, + ScheduleSpec, + ScheduleState, + ScheduleUpdate, + ScheduleUpdateInput, +) +from ._worker_versioning import ( + BuildIdOp, + BuildIdOpAddNewCompatible, + BuildIdOpAddNewDefault, + BuildIdOpMergeSets, + BuildIdOpPromoteBuildIdWithinSet, + BuildIdOpPromoteSetByBuildId, + BuildIdReachability, + BuildIdVersionSet, + TaskReachabilityType, + WorkerBuildIdVersionSets, + WorkerTaskReachability, +) +from ._workflow import ( + WithStartWorkflowOperation, + WorkflowExecution, + WorkflowExecutionAsyncIterator, + WorkflowExecutionCount, + WorkflowExecutionCountAggregationGroup, + WorkflowExecutionDescription, + WorkflowExecutionStatus, + WorkflowHandle, + WorkflowHistory, + WorkflowHistoryEventAsyncIterator, + WorkflowHistoryEventFilterType, + WorkflowUpdateHandle, + WorkflowUpdateStage, +) + +__all__ = [ + "Client", + "ClientConnectConfig", + "ClientConfig", + "WorkflowHistoryEventFilterType", + "WorkflowHandle", + "WithStartWorkflowOperation", + "WorkflowExecution", + "WorkflowExecutionDescription", + "WorkflowExecutionStatus", + "WorkflowExecutionCount", + "WorkflowExecutionCountAggregationGroup", + "WorkflowExecutionAsyncIterator", + "WorkflowHistory", + "WorkflowHistoryEventAsyncIterator", + "WorkflowUpdateHandle", + "WorkflowUpdateStage", + "ActivityExecutionAsyncIterator", + "ActivityExecution", + "ActivityExecutionDescription", + "ActivityExecutionOptions", + "ActivityOptionsKey", + "ActivityOptionsKeys", + "ActivityOptionsUpdate", + "ActivityExecutionStatus", + "PendingActivityState", + "ActivityExecutionCount", + "ActivityExecutionCountAggregationGroup", + "AsyncActivityIDReference", + "AsyncActivityHandle", + "ActivityHandle", + "NexusClient", + "NexusOperationExecution", + "NexusOperationExecutionAsyncIterator", + "NexusOperationExecutionCancellationInfo", + "NexusOperationExecutionCount", + "NexusOperationExecutionCountAggregationGroup", + "NexusOperationExecutionDescription", + "NexusOperationHandle", + "ScheduleHandle", + "ScheduleSpec", + "ScheduleRange", + "ScheduleCalendarSpec", + "ScheduleIntervalSpec", + "ScheduleAction", + "ScheduleActionStartWorkflow", + "ScheduleOverlapPolicy", + "ScheduleBackfill", + "SchedulePolicy", + "ScheduleState", + "Schedule", + "ScheduleDescription", + "ScheduleInfo", + "ScheduleActionExecution", + "ScheduleActionExecutionStartWorkflow", + "ScheduleActionResult", + "ScheduleUpdateInput", + "ScheduleUpdate", + "ScheduleListDescription", + "ScheduleListSchedule", + "ScheduleListAction", + "ScheduleListActionStartWorkflow", + "ScheduleListInfo", + "ScheduleListState", + "ScheduleAsyncIterator", + "WorkflowFailureError", + "WorkflowContinuedAsNewError", + "WorkflowQueryRejectedError", + "WorkflowQueryFailedError", + "WorkflowUpdateFailedError", + "RPCTimeoutOrCancelledError", + "WorkflowUpdateRPCTimeoutOrCancelledError", + "ActivityFailureError", + "AsyncActivityCancelledError", + "NexusOperationFailureError", + "ScheduleAlreadyRunningError", + "StartWorkflowInput", + "CancelWorkflowInput", + "DescribeWorkflowInput", + "FetchWorkflowHistoryEventsInput", + "ListWorkflowsInput", + "CountWorkflowsInput", + "QueryWorkflowInput", + "SignalWorkflowInput", + "TerminateWorkflowInput", + "StartActivityInput", + "CancelActivityInput", + "TerminateActivityInput", + "DescribeActivityInput", + "PauseActivityInput", + "UpdateActivityOptionsInput", + "UnpauseActivityInput", + "ListActivitiesInput", + "CountActivitiesInput", + "StartNexusOperationInput", + "DescribeNexusOperationInput", + "GetNexusOperationResultInput", + "CancelNexusOperationInput", + "TerminateNexusOperationInput", + "ListNexusOperationsInput", + "CountNexusOperationsInput", + "StartWorkflowUpdateInput", + "UpdateWithStartUpdateWorkflowInput", + "UpdateWithStartStartWorkflowInput", + "StartWorkflowUpdateWithStartInput", + "HeartbeatAsyncActivityInput", + "CompleteAsyncActivityInput", + "FailAsyncActivityInput", + "ReportCancellationAsyncActivityInput", + "CreateScheduleInput", + "ListSchedulesInput", + "BackfillScheduleInput", + "DeleteScheduleInput", + "DescribeScheduleInput", + "PauseScheduleInput", + "TriggerScheduleInput", + "UnpauseScheduleInput", + "UpdateScheduleInput", + "UpdateWorkerBuildIdCompatibilityInput", + "GetWorkerBuildIdCompatibilityInput", + "GetWorkerTaskReachabilityInput", + "Interceptor", + "OutboundInterceptor", + "WorkerBuildIdVersionSets", + "BuildIdVersionSet", + "BuildIdOp", + "BuildIdOpAddNewDefault", + "BuildIdOpAddNewCompatible", + "BuildIdOpPromoteSetByBuildId", + "BuildIdOpPromoteBuildIdWithinSet", + "BuildIdOpMergeSets", + "WorkerTaskReachability", + "BuildIdReachability", + "TaskReachabilityType", + "CloudOperationsClient", + "Plugin", + "Callback", + "_ClientImpl", + "_apply_headers", + "_decode_user_metadata", + "_encode_user_metadata", + "_fix_history_enum", + "_fix_history_failure", + "_history_from_json", + "_pascal_case_match", + # Re-export Temporal-owned names that old temporalio/client.py imported at + # module scope so explicit imports from temporalio.client keep working. + "ActivityCancellationDetails", + "ActivitySerializationContext", + "DataConverter", + "SerializationContext", + "StorageDriverActivityInfo", + "StorageDriverSelectContext", + "StorageDriverStoreContext", + "StorageDriverWorkflowInfo", + "WithSerializationContext", + "WorkflowSerializationContext", + "ConnectConfig", + "DnsLoadBalancingConfig", + "GrpcCompression", + "HttpConnectProxyConfig", + "KeepAliveConfig", + "PayloadLimitsConfig", + "RetryConfig", + "RPCError", + "RPCStatusCode", + "ServiceClient", + "TLSConfig", + "HeaderCodecBehavior", + "AnyType", + "CallableAsyncNoParam", + "CallableAsyncSingleParam", + "CallableSyncNoParam", + "CallableSyncSingleParam", + "LocalReturnType", + "MethodAsyncNoParam", + "MethodAsyncSingleParam", + "MethodSyncOrAsyncNoParam", + "MethodSyncOrAsyncSingleParam", + "MultiParamSpec", + "ParamType", + "ReturnType", + "SelfType", +] diff --git a/temporalio/client/_activity.py b/temporalio/client/_activity.py new file mode 100644 index 0000000000..92f0d75de4 --- /dev/null +++ b/temporalio/client/_activity.py @@ -0,0 +1,1367 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +import asyncio +import functools +import warnings +from collections.abc import ( + Mapping, + Sequence, +) +from dataclasses import dataclass, field +from datetime import datetime, timedelta, timezone +from enum import IntEnum +from typing import ( + TYPE_CHECKING, + Any, + Generic, + TypeVar, +) + +from typing_extensions import Self + +import temporalio.api.activity.v1 +import temporalio.api.common.v1 +import temporalio.api.enums.v1 +import temporalio.api.workflowservice.v1 +import temporalio.common +import temporalio.converter +import temporalio.converter._search_attributes +import temporalio.converter._serialization_context +from temporalio.converter import ( + ActivitySerializationContext, + DataConverter, + SerializationContext, + WithSerializationContext, +) +from temporalio.service import ( + RPCError, + RPCStatusCode, +) + +from ..types import ( + ReturnType, +) +from ._exceptions import ActivityFailureError +from ._interceptor import ( + CancelActivityInput, + CompleteAsyncActivityInput, + DescribeActivityInput, + FailAsyncActivityInput, + HeartbeatAsyncActivityInput, + PauseActivityInput, + ReportCancellationAsyncActivityInput, + TerminateActivityInput, + UnpauseActivityInput, + UpdateActivityOptionsInput, +) + +if TYPE_CHECKING: + from ._client import Client + from ._interceptor import ListActivitiesInput + + +class ActivityExecutionAsyncIterator: + """Asynchronous iterator for activity execution values. + + You should typically use ``async for`` on this iterator and not call any of its methods. + """ + + def __init__( + self, + client: Client, + input: ListActivitiesInput, + ) -> None: + """Create an asynchronous iterator for the given input. + + Users should not create this directly, but rather use + :py:meth:`Client.list_activities`. + """ + self._client = client + self._input = input + self._next_page_token = input.next_page_token + self._current_page: Sequence[ActivityExecution] | None = None + self._current_page_index = 0 + self._limit = input.limit + self._yielded = 0 + + @property + def current_page_index(self) -> int: + """Index of the entry in the current page that will be returned from + the next :py:meth:`__anext__` call. + """ + return self._current_page_index + + @property + def current_page(self) -> Sequence[ActivityExecution] | None: + """Current page, if it has been fetched yet.""" + return self._current_page + + @property + def next_page_token(self) -> bytes | None: + """Token for the next page request if any.""" + return self._next_page_token + + async def fetch_next_page(self, *, page_size: int | None = None) -> None: + """Fetch the next page of results. + + Args: + page_size: Override the page size this iterator was originally + created with. + """ + page_size = page_size or self._input.page_size + if self._limit is not None and self._limit - self._yielded < page_size: + page_size = self._limit - self._yielded + + resp = await self._client.workflow_service.list_activity_executions( + temporalio.api.workflowservice.v1.ListActivityExecutionsRequest( + namespace=self._client.namespace, + page_size=page_size, + next_page_token=self._next_page_token or b"", + query=self._input.query or "", + ), + retry=True, + metadata=self._input.rpc_metadata, + timeout=self._input.rpc_timeout, + ) + + self._current_page = [ + ActivityExecution._from_raw_info(v, self._client.namespace) + for v in resp.executions + ] + self._current_page_index = 0 + self._next_page_token = resp.next_page_token or None + + def __aiter__(self) -> ActivityExecutionAsyncIterator: + """Return self as the iterator.""" + return self + + async def __anext__(self) -> ActivityExecution: + """Get the next execution on this iterator, fetching next page if + necessary. + """ + if self._limit is not None and self._yielded >= self._limit: + raise StopAsyncIteration + while True: + # No page? fetch and continue + if self._current_page is None: + await self.fetch_next_page() + continue + # No more left in page? + if self._current_page_index >= len(self._current_page): + # If there is a next page token, try to get another page and try + # again + if self._next_page_token is not None: + await self.fetch_next_page() + continue + # No more pages means we're done + raise StopAsyncIteration + # Get current, increment page index, and return + ret = self._current_page[self._current_page_index] + self._current_page_index += 1 + self._yielded += 1 + return ret + + +@dataclass(frozen=True, eq=False, kw_only=True) +class ActivityExecution: + """Info for an activity execution not started by a workflow, from list response.""" + + activity_id: str + """Activity ID.""" + + activity_run_id: str | None + """Run ID of the activity.""" + + activity_type: str + """Type name of the activity.""" + + close_time: datetime | None + """Time the activity reached a terminal status, if closed.""" + + execution_duration: timedelta | None + """Duration from schedule to close time, only populated if closed.""" + + execution_time: datetime | None + """The time at which the first activity task is made available for dispatch, computed as schedule time + start delay.""" + + namespace: str + """Namespace of the activity (copied from calling client).""" + + schedule_time: datetime + """Time the activity was originally scheduled.""" + + status: ActivityExecutionStatus + """Current status of the activity.""" + + task_queue: str + """Task queue the activity was scheduled on.""" + + typed_search_attributes: temporalio.common.TypedSearchAttributes + """Current set of search attributes if any.""" + + raw_info: ( + temporalio.api.activity.v1.ActivityExecutionListInfo + | temporalio.api.activity.v1.ActivityExecutionInfo + ) = field(repr=False) + """Underlying protobuf info.""" + + @classmethod + def _from_raw_info( + cls, + info: ( + temporalio.api.activity.v1.ActivityExecutionListInfo + | temporalio.api.activity.v1.ActivityExecutionInfo + ), + namespace: str, + **kwargs: Any, + ) -> Self: + """Create from raw proto activity list info.""" + return cls( + raw_info=info, + activity_id=info.activity_id, + activity_run_id=info.run_id or None, + activity_type=info.activity_type.name, + close_time=( + info.close_time.ToDatetime().replace(tzinfo=timezone.utc) + if info.HasField("close_time") + else None + ), + execution_duration=( + info.execution_duration.ToTimedelta() + if info.HasField("execution_duration") + else None + ), + execution_time=( + info.execution_time.ToDatetime().replace(tzinfo=timezone.utc) + if info.HasField("execution_time") + else None + ), + namespace=namespace, + schedule_time=( + info.schedule_time.ToDatetime().replace(tzinfo=timezone.utc) + if info.HasField("schedule_time") + else datetime.min + ), + status=( + ActivityExecutionStatus(info.status) + if info.status + else ActivityExecutionStatus.UNSPECIFIED + ), + task_queue=info.task_queue, + typed_search_attributes=temporalio.converter.decode_typed_search_attributes( + info.search_attributes + ), + **kwargs, + ) + + +@dataclass(frozen=True, eq=False, kw_only=True) +class ActivityExecutionDescription(ActivityExecution): + """Detailed information about an activity execution not started by a workflow.""" + + attempt: int + """Current attempt number.""" + + canceled_reason: str | None + """Reason for cancellation, if cancel was requested.""" + + close_time: datetime | None + """Time when the activity transitioned to a closed state.""" + + current_retry_interval: timedelta | None + """Time until the next retry, if applicable.""" + + expiration_time: datetime | None + """The time at which the activity's schedule-to-close timeout expires.""" + + heartbeat_timeout: timedelta | None + """Configured heartbeat timeout of the activity.""" + + last_attempt_complete_time: datetime | None + """Time when the last attempt completed.""" + + last_deployment_version: temporalio.common.WorkerDeploymentVersion | None + """The Worker Deployment Version this activity was dispatched to most recently.""" + + last_heartbeat_time: datetime | None + """Time of the last heartbeat.""" + + last_started_time: datetime | None + """Time the last attempt was started.""" + + last_worker_identity: str | None + """Identity of the last worker that processed the activity.""" + + next_attempt_schedule_time: datetime | None + """Time when the next attempt will be scheduled.""" + + priority: temporalio.common.Priority + """Priority metadata.""" + + retry_policy: temporalio.common.RetryPolicy | None + """Retry policy for the activity.""" + + run_state: PendingActivityState | None + """More detailed breakdown if status is RUNNING.""" + + schedule_to_close_timeout: timedelta | None + """Configured schedule-to-close timeout of the activity.""" + + schedule_to_start_timeout: timedelta | None + """Configured schedule-to-start timeout of the activity.""" + + start_to_close_timeout: timedelta | None + """Configured start-to-close timeout of the activity.""" + + start_delay: timedelta | None + """Time to wait before making the first activity task available for dispatch.""" + + total_heartbeat_count: int + """Total number of heartbeats recorded across all attempts of this activity, including retries. + + Zero if the activity has not sent any heartbeats or if the server didn't report heartbeat count. + """ + + raw_info: temporalio.api.activity.v1.ActivityExecutionInfo = field(repr=False) + """Underlying protobuf info.""" + + raw_callbacks: Sequence[temporalio.api.activity.v1.CallbackInfo] = field(repr=False) + """Underlying protobuf callbacks""" + + raw_input: temporalio.api.common.v1.Payloads | None = field(repr=False) + """Raw input of the activity. Use `input` to decode.""" + + raw_outcome: temporalio.api.activity.v1.ActivityExecutionOutcome | None = field( + repr=False + ) + """Raw outcome of the activity. Use :py:meth:`result` or :py:meth:`outcome_failure` to decode.""" + + data_converter: DataConverter = field(repr=False) + """Data converter used to convert raw payloads. By default it's the same as the client's data converter.""" + + @classmethod + def _from_resp( + cls, + resp: temporalio.api.workflowservice.v1.DescribeActivityExecutionResponse, + namespace: str, + data_converter: temporalio.converter.DataConverter, + **kwargs: Any, + ) -> Self: + """Create from raw proto activity execution info.""" + return cls._from_raw_info( + info=resp.info, + namespace=namespace, + attempt=resp.info.attempt, + canceled_reason=resp.info.canceled_reason or None, + current_retry_interval=( + resp.info.current_retry_interval.ToTimedelta() + if resp.info.HasField("current_retry_interval") + else None + ), + expiration_time=( + resp.info.expiration_time.ToDatetime(tzinfo=timezone.utc) + if resp.info.HasField("expiration_time") + else None + ), + heartbeat_timeout=( + resp.info.heartbeat_timeout.ToTimedelta() + if resp.info.HasField("heartbeat_timeout") + else None + ), + last_attempt_complete_time=( + resp.info.last_attempt_complete_time.ToDatetime(tzinfo=timezone.utc) + if resp.info.HasField("last_attempt_complete_time") + else None + ), + last_deployment_version=( + temporalio.common.WorkerDeploymentVersion( + deployment_name=resp.info.last_deployment_version.deployment_name, + build_id=resp.info.last_deployment_version.build_id, + ) + if resp.info.HasField("last_deployment_version") + else None + ), + last_heartbeat_time=( + resp.info.last_heartbeat_time.ToDatetime(tzinfo=timezone.utc) + if resp.info.HasField("last_heartbeat_time") + else None + ), + last_started_time=( + resp.info.last_started_time.ToDatetime(tzinfo=timezone.utc) + if resp.info.HasField("last_started_time") + else None + ), + last_worker_identity=resp.info.last_worker_identity or None, + next_attempt_schedule_time=( + resp.info.next_attempt_schedule_time.ToDatetime(tzinfo=timezone.utc) + if resp.info.HasField("next_attempt_schedule_time") + else None + ), + priority=temporalio.common.Priority._from_proto(resp.info.priority), + retry_policy=( + temporalio.common.RetryPolicy.from_proto(resp.info.retry_policy) + if resp.info.HasField("retry_policy") + else None + ), + run_state=( + PendingActivityState(resp.info.run_state) + if resp.info.run_state + else None + ), + schedule_to_close_timeout=( + resp.info.schedule_to_close_timeout.ToTimedelta() + if resp.info.HasField("schedule_to_close_timeout") + else None + ), + schedule_to_start_timeout=( + resp.info.schedule_to_start_timeout.ToTimedelta() + if resp.info.HasField("schedule_to_start_timeout") + else None + ), + start_to_close_timeout=( + resp.info.start_to_close_timeout.ToTimedelta() + if resp.info.HasField("start_to_close_timeout") + else None + ), + start_delay=( + resp.info.start_delay.ToTimedelta() + if resp.info.HasField("start_delay") + else None + ), + total_heartbeat_count=resp.info.total_heartbeat_count, + raw_callbacks=resp.callbacks, + raw_input=resp.input if resp.HasField("input") else None, + raw_outcome=resp.outcome if resp.HasField("outcome") else None, + data_converter=data_converter, + **kwargs, + ) + + @functools.cached_property + def _caller_facing_data_converter(self) -> DataConverter: + # An activity started by a Nexus operation handler encodes its result, failures and + # heartbeat details with the handler's Nexus context, which the server returns with the + # activity info. Its input keeps the activity context. + context = temporalio.converter._serialization_context._propagated_nexus_serialization_context( + self.raw_info + ) + if context is None: + return self.data_converter + return self.data_converter.with_context(context) + + def has_heartbeat_details(self) -> bool: + """True if heartbeat details are available. Use `heartbeat_details` to retrieve them. + + Always false if `include_heartbeat_details` was false in the `ActivityHandle.describe` call. + """ + return self.raw_info.HasField("heartbeat_details") + + async def heartbeat_details( + self, type_hints: list[type] | None = None + ) -> list[Any] | None: + """Returns details from the last heartbeat, or `None` if not available. + + Always `None` if ``include_heartbeat_details`` was false in the `ActivityHandle.describe` call. + Type hints can be provided to aid data conversion. + """ + return ( + await self._caller_facing_data_converter.decode_wrapper( + self.raw_info.heartbeat_details, type_hints + ) + if self.has_heartbeat_details() + else None + ) + + def has_last_failure(self) -> bool: + """True if last failure is available. Use `last_failure` to retrieve it. + + Always false if ``include_last_failure`` was false in the `ActivityHandle.describe` call. + """ + return self.raw_info.HasField("last_failure") + + async def last_failure(self) -> BaseException | None: + """Returns failure from the last failed attempt, or `None` if not available. + + Always `None` if ``include_last_failure`` was false in the `ActivityHandle.describe` call. + """ + return ( + await self._caller_facing_data_converter.decode_failure( + self.raw_info.last_failure + ) + if self.has_last_failure() + else None + ) + + def has_input(self) -> bool: + """True if activity input is available. Use `input ` to retrieve it. + + Always false if ``include_input`` was false in the `ActivityHandle.describe` call. + """ + return self.raw_input is not None + + async def input(self, type_hints: list[type] | None = None) -> list[Any] | None: + """Returns activity input, or `None` if not available. + + Always `None` if ``include_input`` was false in the `ActivityHandle.describe` call. + Type hints can be provided to aid data conversion. + """ + return ( + await self.data_converter.decode_wrapper(self.raw_input, type_hints) + if self.has_input() + else None + ) + + def has_result(self) -> bool: + """True if activity result is available. Use `result` to retrieve it. + + Activity result is only available if the activity has completed and was successful. + Always false if `include_outcome` was false in the `ActivityHandle.describe` call. + """ + return self.raw_outcome is not None and self.raw_outcome.HasField("result") + + async def result(self, type_hint: type | None = None) -> Any | None: + """Returns activity result, or `None` if not available. + + Activity result is only available if the activity has completed successfully. + Always false if ``include_outcome`` was false in the `ActivityHandle.describe` call. + Type hints can be provided to aid data conversion. + """ + if self.raw_outcome is None or not self.raw_outcome.HasField("result"): + return None + type_hints = [type_hint] if type_hint is not None else None + results = await self._caller_facing_data_converter.decode_wrapper( + self.raw_outcome.result, type_hints + ) + if not results: + return None + if len(results) > 1: + warnings.warn(f"Expected single activity result, got {len(results)}") + return results[0] + + def has_outcome_failure(self) -> bool: + """True if activity outcome failure is available. Use `outcome_failure` to retrieve it. + + Activity outcome failure is only available if the activity has closed with a failure. + Use `last_failure` to retrieve failure of the most recent failed attempt of an activity that's still running or + that completed successfully. + Always false if ``include_outcome`` was false in the `ActivityHandle.describe` call. + """ + return self.raw_outcome is not None and self.raw_outcome.HasField("failure") + + async def outcome_failure(self) -> BaseException | None: + """Returns activity outcome failure, or `None` if not available. + + Activity outcome failure is only available if the activity has closed with a failure. + Use `last_failure` to retrieve failure of the most recent failed attempt of an activity that's still running or + that completed successfully. + Always false if ``include_outcome`` was false in the `ActivityHandle.describe` call. + """ + return ( + await self._caller_facing_data_converter.decode_failure( + self.raw_outcome.failure + ) + if self.raw_outcome is not None and self.raw_outcome.HasField("failure") + else None + ) + + +class ActivityExecutionStatus(IntEnum): + """Status of an activity execution. + + See :py:class:`temporalio.api.enums.v1.ActivityExecutionStatus`. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.ActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_UNSPECIFIED + ) + RUNNING = int( + temporalio.api.enums.v1.ActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_RUNNING + ) + COMPLETED = int( + temporalio.api.enums.v1.ActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_COMPLETED + ) + FAILED = int( + temporalio.api.enums.v1.ActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_FAILED + ) + CANCELED = int( + temporalio.api.enums.v1.ActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_CANCELED + ) + TERMINATED = int( + temporalio.api.enums.v1.ActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_TERMINATED + ) + TIMED_OUT = int( + temporalio.api.enums.v1.ActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_TIMED_OUT + ) + PAUSED = int( + temporalio.api.enums.v1.ActivityExecutionStatus.ACTIVITY_EXECUTION_STATUS_PAUSED + ) + + +class PendingActivityState(IntEnum): + """Detailed state of an activity execution that is in ACTIVITY_EXECUTION_STATUS_RUNNING. + + See :py:class:`temporalio.api.enums.v1.PendingActivityState`. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.PendingActivityState.PENDING_ACTIVITY_STATE_UNSPECIFIED + ) + SCHEDULED = int( + temporalio.api.enums.v1.PendingActivityState.PENDING_ACTIVITY_STATE_SCHEDULED + ) + STARTED = int( + temporalio.api.enums.v1.PendingActivityState.PENDING_ACTIVITY_STATE_STARTED + ) + CANCEL_REQUESTED = int( + temporalio.api.enums.v1.PendingActivityState.PENDING_ACTIVITY_STATE_CANCEL_REQUESTED + ) + PAUSED = int( + temporalio.api.enums.v1.PendingActivityState.PENDING_ACTIVITY_STATE_PAUSED + ) + PAUSE_REQUESTED = int( + temporalio.api.enums.v1.PendingActivityState.PENDING_ACTIVITY_STATE_PAUSE_REQUESTED + ) + + +ActivityOptionValueType = TypeVar("ActivityOptionValueType") + + +@dataclass(frozen=True) +class ActivityOptionsKey(Generic[ActivityOptionValueType]): + """Typed key for one updatable activity option. + + Use the keys on :py:class:`ActivityOptionsKeys` rather than constructing + these directly. + + .. warning:: + This API is experimental. + """ + + name: str + """Field-mask path this key updates.""" + + def value_set( + self, value: ActivityOptionValueType + ) -> ActivityOptionsUpdate[ActivityOptionValueType]: + """Create an update that sets this option to the given value.""" + return ActivityOptionsUpdate(self, value) + + def value_unset(self) -> ActivityOptionsUpdate[ActivityOptionValueType]: + """Create an update that clears this option server-side.""" + return ActivityOptionsUpdate(self, None) + + +@dataclass(frozen=True) +class ActivityOptionsUpdate(Generic[ActivityOptionValueType]): + """A single change to an activity's options. + + An option not represented by any update in the call is left untouched; an + update carrying None clears the option. + + .. warning:: + This API is experimental. + """ + + key: ActivityOptionsKey[ActivityOptionValueType] + """Option being changed.""" + + value: ActivityOptionValueType | None + """Value being set, or None to clear the option.""" + + +class ActivityOptionsKeys: + """The activity options that :py:meth:`ActivityHandle.update_options` can change. + + .. warning:: + This API is experimental. + """ + + task_queue: ActivityOptionsKey[str] = ActivityOptionsKey("task_queue.name") + schedule_to_close_timeout: ActivityOptionsKey[timedelta] = ActivityOptionsKey( + "schedule_to_close_timeout" + ) + schedule_to_start_timeout: ActivityOptionsKey[timedelta] = ActivityOptionsKey( + "schedule_to_start_timeout" + ) + start_to_close_timeout: ActivityOptionsKey[timedelta] = ActivityOptionsKey( + "start_to_close_timeout" + ) + heartbeat_timeout: ActivityOptionsKey[timedelta] = ActivityOptionsKey( + "heartbeat_timeout" + ) + start_delay: ActivityOptionsKey[timedelta] = ActivityOptionsKey("start_delay") + retry_policy: ActivityOptionsKey[temporalio.common.RetryPolicy] = ( + ActivityOptionsKey("retry_policy") + ) + priority: ActivityOptionsKey[temporalio.common.Priority] = ActivityOptionsKey( + "priority" + ) + + +@dataclass(frozen=True) +class ActivityExecutionOptions: + """An activity's options as resolved by the server. + + Returned by :py:meth:`ActivityHandle.update_options` and + :py:meth:`ActivityHandle.restore_original_options`. + + .. warning:: + This API is experimental. + """ + + task_queue: str | None + """Task queue the activity is scheduled on.""" + + schedule_to_close_timeout: timedelta | None + """Total time the caller is willing to wait, including retries.""" + + schedule_to_start_timeout: timedelta | None + """Maximum time the activity may wait to be picked up by a worker.""" + + start_to_close_timeout: timedelta | None + """Maximum time for a single attempt.""" + + heartbeat_timeout: timedelta | None + """Maximum allowed time between heartbeats.""" + + start_delay: timedelta | None + """Delay before the first attempt is made available for dispatch.""" + + retry_policy: temporalio.common.RetryPolicy | None + """Retry policy in effect for the activity.""" + + priority: temporalio.common.Priority | None + """Priority of the activity.""" + + @staticmethod + def _from_proto( + options: temporalio.api.activity.v1.ActivityOptions, + ) -> ActivityExecutionOptions: + return ActivityExecutionOptions( + task_queue=options.task_queue.name + if options.HasField("task_queue") + else None, + schedule_to_close_timeout=( + options.schedule_to_close_timeout.ToTimedelta() + if options.HasField("schedule_to_close_timeout") + else None + ), + schedule_to_start_timeout=( + options.schedule_to_start_timeout.ToTimedelta() + if options.HasField("schedule_to_start_timeout") + else None + ), + start_to_close_timeout=( + options.start_to_close_timeout.ToTimedelta() + if options.HasField("start_to_close_timeout") + else None + ), + heartbeat_timeout=( + options.heartbeat_timeout.ToTimedelta() + if options.HasField("heartbeat_timeout") + else None + ), + start_delay=( + options.start_delay.ToTimedelta() + if options.HasField("start_delay") + else None + ), + retry_policy=( + temporalio.common.RetryPolicy.from_proto(options.retry_policy) + if options.HasField("retry_policy") + else None + ), + priority=( + temporalio.common.Priority._from_proto(options.priority) + if options.HasField("priority") + else None + ), + ) + + +@dataclass(frozen=True) +class ActivityExecutionCount: + """Representation of a count from a count activities call.""" + + count: int + """Total count matching the filter, if any.""" + + groups: Sequence[ActivityExecutionCountAggregationGroup] + """Aggregation groups if requested.""" + + @staticmethod + def _from_raw( + resp: temporalio.api.workflowservice.v1.CountActivityExecutionsResponse, + ) -> ActivityExecutionCount: + """Create from raw proto response.""" + return ActivityExecutionCount( + count=resp.count, + groups=[ + ActivityExecutionCountAggregationGroup._from_raw(g) for g in resp.groups + ], + ) + + +@dataclass(frozen=True) +class ActivityExecutionCountAggregationGroup: + """A single aggregation group from a count activities call.""" + + count: int + """Count for this group.""" + + group_values: Sequence[temporalio.common.SearchAttributeValue] + """Values that define this group.""" + + @staticmethod + def _from_raw( + raw: temporalio.api.workflowservice.v1.CountActivityExecutionsResponse.AggregationGroup, + ) -> ActivityExecutionCountAggregationGroup: + return ActivityExecutionCountAggregationGroup( + count=raw.count, + group_values=[ + temporalio.converter._search_attributes._decode_search_attribute_value( + v + ) + for v in raw.group_values + ], + ) + + +@dataclass(frozen=True) +class AsyncActivityIDReference: + """Reference to an async activity by its qualified ID.""" + + workflow_id: str | None + run_id: str | None + activity_id: str + + +class AsyncActivityHandle(WithSerializationContext): + """Handle representing an external activity for completion and heartbeat.""" + + def __init__( + self, + client: Client, + id_or_token: AsyncActivityIDReference | bytes, + data_converter_override: DataConverter | None = None, + ) -> None: + """Create an async activity handle.""" + self._client = client + self._id_or_token = id_or_token + self._data_converter_override = data_converter_override + + async def heartbeat( + self, + *details: Any, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Record a heartbeat for the activity. + + Args: + details: Details of the heartbeat. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.heartbeat_async_activity( + HeartbeatAsyncActivityInput( + id_or_token=self._id_or_token, + details=details, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + data_converter_override=self._data_converter_override, + ), + ) + + async def complete( + self, + result: Any | None = temporalio.common._arg_unset, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Complete the activity. + + Args: + result: Result of the activity if any. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.complete_async_activity( + CompleteAsyncActivityInput( + id_or_token=self._id_or_token, + result=result, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + data_converter_override=self._data_converter_override, + ), + ) + + async def fail( + self, + error: Exception, + *, + last_heartbeat_details: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Fail the activity. + + Args: + error: Error for the activity. + last_heartbeat_details: Last heartbeat details for the activity. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.fail_async_activity( + FailAsyncActivityInput( + id_or_token=self._id_or_token, + error=error, + last_heartbeat_details=last_heartbeat_details, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + data_converter_override=self._data_converter_override, + ), + ) + + async def report_cancellation( + self, + *details: Any, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Report the activity as cancelled. + + Args: + details: Cancellation details. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.report_cancellation_async_activity( + ReportCancellationAsyncActivityInput( + id_or_token=self._id_or_token, + details=details, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + data_converter_override=self._data_converter_override, + ), + ) + + def with_context(self, context: SerializationContext) -> Self: + """Create a new AsyncActivityHandle with a different serialization context. + + Payloads received by the activity will be decoded and deserialized using a data converter + with :py:class:`ActivitySerializationContext` set as context. If you are using a custom data + converter that makes use of this context then you can use this method to supply matching + context data to the data converter used to serialize and encode the outbound payloads. + + A standalone activity started by a Nexus operation handler encodes its result, failure and + heartbeat details with the handler's + :py:class:`temporalio.converter.NexusSerializationContext`. To complete or heartbeat such an + activity, pass :py:attr:`temporalio.activity.Info.nexus_serialization_context`. + """ + data_converter = self._client.data_converter.with_context(context) + if data_converter is self._client.data_converter: + return self + cls = type(self) + if cls.__init__ is not AsyncActivityHandle.__init__: + raise TypeError( + "If you have subclassed AsyncActivityHandle and overridden the __init__ method " + "then you must override with_context to return an instance of your class." + ) + return cls( + self._client, + self._id_or_token, + data_converter, + ) + + +class ActivityHandle(Generic[ReturnType]): + """Handle representing an activity execution not started by a workflow.""" + + def __init__( + self, + client: Client, + id: str, + *, + run_id: str | None = None, + result_type: type | None = None, + ) -> None: + """Create activity handle.""" + self._client = client + self._id = id + self._run_id = run_id + self._result_type = result_type + self._known_outcome: ( + temporalio.api.activity.v1.ActivityExecutionOutcome | None + ) = None + self._known_outcome_nexus_context: ( + temporalio.converter.NexusSerializationContext | None + ) = None + + @functools.cached_property + def _data_converter(self) -> temporalio.converter.DataConverter: + return self._client.data_converter.with_context( + ActivitySerializationContext( + namespace=self._client.namespace, + activity_id=self._id, + activity_type=None, + activity_task_queue=None, + is_local=False, + workflow_id=None, + workflow_type=None, + ) + ) + + @property + def id(self) -> str: + """ID of the activity.""" + return self._id + + @property + def run_id(self) -> str | None: + """Run ID of the activity.""" + return self._run_id + + async def result( + self, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: + """Wait for result of the activity. + + The result may already be known if this method has been called before, + in which case no network call is made. Otherwise the result will be + polled for until it is available. + + Args: + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. Note: + this is the timeout for each RPC call while polling, not a + timeout for the function as a whole. If an individual RPC + times out, it will be retried until the result is available. + + Returns: + The result of the activity. + + Raises: + ActivityFailureError: If the activity completed with a failure. + RPCError: Activity result could not be fetched for some reason. + """ + await self._poll_until_outcome( + rpc_metadata=rpc_metadata, rpc_timeout=rpc_timeout + ) + + # Convert outcome to failure or value. An activity started by a Nexus operation handler + # encodes them with the handler's Nexus context, which the server returns with the outcome. + assert self._known_outcome + data_converter = ( + self._client.data_converter.with_context(self._known_outcome_nexus_context) + if self._known_outcome_nexus_context + else self._data_converter + ) + if self._known_outcome.HasField("failure"): + raise ActivityFailureError( + cause=await data_converter.decode_failure(self._known_outcome.failure), + ) + if not self._known_outcome.result.payloads: + return None # type: ignore + type_hints = [self._result_type] if self._result_type else None + results = await data_converter.decode( + self._known_outcome.result.payloads, type_hints + ) + if not results: + return None # type: ignore + elif len(results) > 1: + warnings.warn(f"Expected single activity result, got {len(results)}") + return results[0] + + async def _poll_until_outcome( + self, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Poll for activity result until it's available.""" + if self._known_outcome: + return + + req = temporalio.api.workflowservice.v1.PollActivityExecutionRequest( + namespace=self._client.namespace, + activity_id=self._id, + run_id=self._run_id or "", + ) + + # Continue polling as long as we have no outcome + while True: + try: + res = await self._client.workflow_service.poll_activity_execution( + req, + retry=True, + metadata=rpc_metadata, + timeout=rpc_timeout, + ) + if res.HasField("outcome"): + self._known_outcome = res.outcome + self._known_outcome_nexus_context = temporalio.converter._serialization_context._propagated_nexus_serialization_context( + res + ) + return + except RPCError as err: + if err.status == RPCStatusCode.DEADLINE_EXCEEDED: + # Deadline exceeded is expected with long polling; retry + continue + elif err.status == RPCStatusCode.CANCELLED: + raise asyncio.CancelledError() from err + else: + raise + except asyncio.CancelledError: + raise + + async def cancel( + self, + *, + reason: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Request cancellation of the activity. + + Requesting cancellation of an activity does not automatically transition the activity to + canceled status. If the activity is heartbeating, a :py:class:`exceptions.CancelledError` + exception will be raised when receiving the heartbeat response; if the activity allows this + exception to bubble out, the activity will transition to canceled status. If the activity it + is not heartbeating, this method will have no effect on activity status. + + Args: + reason: Reason for the cancellation. Recorded and available via describe. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.cancel_activity( + CancelActivityInput( + activity_id=self._id, + activity_run_id=self._run_id, + reason=reason, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def terminate( + self, + *, + reason: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Terminate the activity execution immediately. + + Termination does not reach the worker and the activity code cannot react to it. + A terminated activity may have a running attempt and will be requested to be + canceled by the server when it heartbeats. + + Args: + reason: Reason for the termination. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.terminate_activity( + TerminateActivityInput( + activity_id=self._id, + activity_run_id=self._run_id, + reason=reason, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def pause( + self, + *, + reason: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Pause the activity. + + A paused activity is not scheduled or retried until it is unpaused via + :py:meth:`unpause`. + + .. warning:: + This API is experimental. + + Args: + reason: Reason for pausing. Recorded and available via describe. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.pause_activity( + PauseActivityInput( + activity_id=self._id, + activity_run_id=self._run_id, + reason=reason, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def unpause( + self, + *, + reason: str | None = None, + jitter: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Unpause the activity, allowing it to be scheduled or retried again. + + .. warning:: + This API is experimental. + + Args: + reason: Reason for unpausing. Recorded on the server. + jitter: If set, the activity starts at a random time within this + duration rather than immediately. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.unpause_activity( + UnpauseActivityInput( + activity_id=self._id, + activity_run_id=self._run_id, + reason=reason, + jitter=jitter, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def update_options( + self, + updates: Sequence[ActivityOptionsUpdate[Any]], + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityExecutionOptions: + """Update the activity's options. + + Only the options named by ``updates`` are changed; anything not named is + left as-is. An update created with + :py:meth:`ActivityOptionsKey.value_unset` clears that option. + + Each option may be named at most once; naming the same option twice + raises :py:class:`ValueError`. + + .. warning:: + This API is experimental. + + Args: + updates: Options to change, built from :py:class:`ActivityOptionsKeys`. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + The activity options as resolved by the server after the update. + + Raises: + ValueError: If ``updates`` is empty or names the same option twice. + """ + if not updates: + raise ValueError( + "update_options requires at least one update; use " + "restore_original_options() to revert options" + ) + seen: set[str] = set() + for update in updates: + name = update.key.name + if name in seen: + raise ValueError( + f"update_options received more than one update for {name}" + ) + seen.add(name) + return await self._client._impl.update_activity_options( + UpdateActivityOptionsInput( + activity_id=self._id, + activity_run_id=self._run_id, + updates=updates, + restore_original=False, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def restore_original_options( + self, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityExecutionOptions: + """Restore the activity's options to the ones it was created with. + + This is a separate call rather than an option on + :py:meth:`update_options` because the server rejects a request that + combines the restore flag with any other option. + + .. warning:: + This API is experimental. + + Args: + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + The activity options as resolved by the server after the restore. + """ + return await self._client._impl.update_activity_options( + UpdateActivityOptionsInput( + activity_id=self._id, + activity_run_id=self._run_id, + updates=[], + restore_original=True, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def describe( + self, + *, + include_input: bool = False, + include_outcome: bool = False, + include_heartbeat_details: bool = False, + include_last_failure: bool = False, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityExecutionDescription: + """Describe the activity execution. + + Args: + include_input: Include activity input in the response if available. + include_outcome: Include activity outcome in the response if available. + include_heartbeat_details: Include heartbeat details in the response if available. + include_last_failure: Include last failure in the response if available. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + Activity execution description. + """ + return await self._client._impl.describe_activity( + DescribeActivityInput( + activity_id=self._id, + activity_run_id=self._run_id, + include_input=include_input, + include_outcome=include_outcome, + include_heartbeat_details=include_heartbeat_details, + include_last_failure=include_last_failure, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) diff --git a/temporalio/client/_callback.py b/temporalio/client/_callback.py new file mode 100644 index 0000000000..45aa89030b --- /dev/null +++ b/temporalio/client/_callback.py @@ -0,0 +1,5 @@ +from __future__ import annotations + +import temporalio.nexus + +Callback = temporalio.nexus.NexusCallback diff --git a/temporalio/client/_client.py b/temporalio/client/_client.py new file mode 100644 index 0000000000..efef5cb528 --- /dev/null +++ b/temporalio/client/_client.py @@ -0,0 +1,3045 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +from collections.abc import ( + Awaitable, + Callable, + Mapping, + Sequence, +) +from datetime import timedelta +from typing import ( + TYPE_CHECKING, + Any, + Concatenate, + cast, + overload, +) + +import nexusrpc +from nexusrpc import OutputT +from typing_extensions import Required, Self, TypedDict + +import temporalio.activity +import temporalio.api.workflowservice.v1 +import temporalio.common +import temporalio.converter +import temporalio.runtime +import temporalio.service +import temporalio.workflow +from temporalio.service import ( + ConnectConfig, + DnsLoadBalancingConfig, + GrpcCompression, + HttpConnectProxyConfig, + KeepAliveConfig, + PayloadLimitsConfig, + RetryConfig, + ServiceClient, + TLSConfig, +) + +from ..common import HeaderCodecBehavior +from ..types import ( + CallableAsyncNoParam, + CallableAsyncSingleParam, + CallableSyncNoParam, + CallableSyncSingleParam, + LocalReturnType, + MethodAsyncNoParam, + MethodAsyncSingleParam, + MultiParamSpec, + NexusServiceType, + ParamType, + ReturnType, + SelfType, +) +from ._activity import ( + ActivityExecutionAsyncIterator, + ActivityExecutionCount, + ActivityHandle, + AsyncActivityHandle, + AsyncActivityIDReference, +) +from ._impl import _ClientImpl +from ._interceptor import ( + CountActivitiesInput, + CountNexusOperationsInput, + CountWorkflowsInput, + CreateScheduleInput, + GetWorkerBuildIdCompatibilityInput, + GetWorkerTaskReachabilityInput, + ListActivitiesInput, + ListNexusOperationsInput, + ListSchedulesInput, + ListWorkflowsInput, + OutboundInterceptor, + StartActivityInput, + StartWorkflowInput, + StartWorkflowUpdateWithStartInput, + UpdateWithStartUpdateWorkflowInput, + UpdateWorkerBuildIdCompatibilityInput, +) +from ._nexus import ( + NexusClient, + NexusOperationExecutionAsyncIterator, + NexusOperationExecutionCount, + NexusOperationHandle, + _NexusClient, +) +from ._schedule import ( + Schedule, + ScheduleAsyncIterator, + ScheduleBackfill, + ScheduleHandle, +) +from ._worker_versioning import ( + BuildIdOp, + TaskReachabilityType, + WorkerBuildIdVersionSets, + WorkerTaskReachability, +) +from ._workflow import ( + WithStartWorkflowOperation, + WorkflowExecutionAsyncIterator, + WorkflowExecutionCount, + WorkflowHandle, + WorkflowUpdateHandle, + WorkflowUpdateStage, +) + +if TYPE_CHECKING: + from ._interceptor import Interceptor + from ._plugin import Plugin + + +class Client: + """Client for accessing Temporal. + + Most users will use :py:meth:`connect` to create a client. The + :py:attr:`service` property provides access to a raw gRPC client. To create + another client, like for a different namespace, :py:func:`Client` may be + directly instantiated with a :py:attr:`service` of another. + + Clients are not thread-safe and should only be used in the event loop they + are first connected in. If a client needs to be used from another thread + than where it was created, make sure the event loop where it was created is + captured, and then call :py:func:`asyncio.run_coroutine_threadsafe` with the + client call and that event loop. + + Clients do not work across forks since runtimes do not work across forks. + """ + + @classmethod + async def connect( + cls, + target_host: str, + *, + namespace: str = "default", + api_key: str | None = None, + data_converter: temporalio.converter.DataConverter = temporalio.converter.DataConverter.default, + plugins: Sequence[Plugin] = [], + interceptors: Sequence[Interceptor] = [], + default_workflow_query_reject_condition: None + | (temporalio.common.QueryRejectCondition) = None, + tls: bool | TLSConfig | None = None, + retry_config: RetryConfig | None = None, + keep_alive_config: KeepAliveConfig | None = KeepAliveConfig.default, + connect_timeout: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + identity: str | None = None, + lazy: bool = False, + runtime: temporalio.runtime.Runtime | None = None, + http_connect_proxy_config: HttpConnectProxyConfig | None = None, + dns_load_balancing_config: DnsLoadBalancingConfig | None = None, + grpc_compression: GrpcCompression = GrpcCompression.GZIP, + payload_limits: PayloadLimitsConfig = PayloadLimitsConfig(), + header_codec_behavior: HeaderCodecBehavior = HeaderCodecBehavior.NO_CODEC, + ) -> Self: + """Connect to a Temporal server. + + Args: + target_host: ``host:port`` for the Temporal server. For local + development, this is often "localhost:7233". + namespace: Namespace to use for client calls. + api_key: API key for Temporal. This becomes the "Authorization" + HTTP header with "Bearer " prepended. This is only set if RPC + metadata doesn't already have an "authorization" key. + data_converter: Data converter to use for all data conversions + to/from payloads. + plugins: Set of plugins that are chained together to allow + intercepting and modifying client creation and service connection. + The earlier plugins wrap the later ones. + + Any plugins that also implement + :py:class:`temporalio.worker.Plugin` will be used as worker + plugins too so they should not be given when creating a + worker. + interceptors: Set of interceptors that are chained together to allow + intercepting of client calls. The earlier interceptors wrap the + later ones. + + Any interceptors that also implement + :py:class:`temporalio.worker.Interceptor` will be used as worker + interceptors too so they should not be given when creating a + worker. + default_workflow_query_reject_condition: The default rejection + condition for workflow queries if not set during query. See + :py:meth:`WorkflowHandle.query` for details on the rejection + condition. + tls: If ``None``, the default, TLS will be enabled automatically + when ``api_key`` is provided, otherwise TLS is disabled. If + ``False``, do not use TLS. If ``True``, use system default TLS + configuration. If TLS configuration present, that TLS + configuration will be used. + retry_config: Retry configuration for direct service calls (when + opted in) or all high-level calls made by this client (which all + opt-in to retries by default). If unset, a default retry + configuration is used. + keep_alive_config: Keep-alive configuration for the client + connection. Default is to check every 30s and kill the + connection if a response doesn't come back in 15s. Can be set to + ``None`` to disable. + connect_timeout: Maximum duration of a TCP connection attempt. + If unset, no explicit connection timeout is applied. This is + separate from RPC timeouts and does not bound the total duration + of a call with retries. + rpc_metadata: Headers to use for all calls to the server. Keys here + can be overriden by per-call RPC metadata keys. + identity: Identity for this client. If unset, a default is created + based on the version of the SDK. + lazy: If true, the client will not connect until the first call is + attempted or a worker is created with it. Lazy clients cannot be + used for workers. + runtime: The runtime for this client, or the default if unset. + http_connect_proxy_config: Configuration for HTTP CONNECT proxy. + dns_load_balancing_config: DNS load balancing configuration for the + client connection. Default is to re-resolve DNS every 30s. Can + be set to ``None`` to disable. Silently disabled when + ``http_connect_proxy_config`` is set, since the two are mutually + exclusive. + grpc_compression: Transport-level gRPC compression for the client + connection. Default is gzip. Set to + :py:attr:`GrpcCompression.NONE` to disable compression. + payload_limits: Warning thresholds for outbound payload/memo sizes. Over-threshold + fields are logged but still sent. Set a threshold to 0 to disable it. + header_codec_behavior: Encoding behavior for headers sent by the client. + """ + connect_config = temporalio.service.ConnectConfig( + target_host=target_host, + api_key=api_key, + tls=tls, + retry_config=retry_config, + keep_alive_config=keep_alive_config, + connect_timeout=connect_timeout, + rpc_metadata=rpc_metadata, + identity=identity or "", + lazy=lazy, + runtime=runtime, + http_connect_proxy_config=http_connect_proxy_config, + dns_load_balancing_config=dns_load_balancing_config, + grpc_compression=grpc_compression, + payload_limits=payload_limits, + ) + + def make_lambda( + plugin: Plugin, next: Callable[[ConnectConfig], Awaitable[ServiceClient]] + ): + return lambda config: plugin.connect_service_client(config, next) + + next_function = ServiceClient.connect + for plugin in reversed(plugins): + next_function = make_lambda(plugin, next_function) + + service_client = await next_function(connect_config) + + return cls( + service_client, + namespace=namespace, + data_converter=data_converter, + interceptors=interceptors, + default_workflow_query_reject_condition=default_workflow_query_reject_condition, + header_codec_behavior=header_codec_behavior, + plugins=plugins, + ) + + def __init__( + self, + service_client: temporalio.service.ServiceClient, + *, + namespace: str = "default", + data_converter: temporalio.converter.DataConverter = temporalio.converter.DataConverter.default, + plugins: Sequence[Plugin] = [], + interceptors: Sequence[Interceptor] = [], + default_workflow_query_reject_condition: None + | (temporalio.common.QueryRejectCondition) = None, + header_codec_behavior: HeaderCodecBehavior = HeaderCodecBehavior.NO_CODEC, + ): + """Create a Temporal client from a service client. + + See :py:meth:`connect` for details on the parameters. + """ + # Store the config for tracking + config = ClientConfig( + service_client=service_client, + namespace=namespace, + data_converter=data_converter, + plugins=plugins, + interceptors=interceptors, + default_workflow_query_reject_condition=default_workflow_query_reject_condition, + header_codec_behavior=header_codec_behavior, + ) + self._initial_config = config.copy() + + for plugin in plugins: + config = plugin.configure_client(config) + + self._init_from_config(config) + + def _init_from_config(self, config: ClientConfig): + self._config = config + + # Iterate over interceptors in reverse building the impl + self._impl: OutboundInterceptor = _ClientImpl(self) + for interceptor in reversed(list(self._config["interceptors"])): + self._impl = interceptor.intercept_client(self._impl) + + def config(self, *, active_config: bool = False) -> ClientConfig: + """Config, as a dictionary, used to create this client. + + Args: + active_config: If true, return the modified configuration in use rather than the initial one + provided to the client. + + This makes a shallow copy of the config each call. + """ + config = self._config.copy() if active_config else self._initial_config.copy() + config["interceptors"] = list(config["interceptors"]) + return config + + @property + def service_client(self) -> temporalio.service.ServiceClient: + """Raw gRPC service client.""" + return self._config["service_client"] + + @property + def workflow_service(self) -> temporalio.service.WorkflowService: + """Raw gRPC workflow service client.""" + return self._config["service_client"].workflow_service + + @property + def operator_service(self) -> temporalio.service.OperatorService: + """Raw gRPC operator service client.""" + return self._config["service_client"].operator_service + + @property + def test_service(self) -> temporalio.service.TestService: + """Raw gRPC test service client.""" + return self._config["service_client"].test_service + + @property + def namespace(self) -> str: + """Namespace used in calls by this client.""" + return self._config["namespace"] + + @property + def identity(self) -> str: + """Identity used in calls by this client.""" + return self._config["service_client"].config.identity + + @property + def data_converter(self) -> temporalio.converter.DataConverter: + """Data converter used by this client.""" + return self._config["data_converter"] + + @property + def rpc_metadata(self) -> Mapping[str, str | bytes]: + """Headers for every call made by this client. + + Do not use mutate this mapping. Rather, set this property with an + entirely new mapping to change the headers. + """ + return self.service_client.config.rpc_metadata + + @rpc_metadata.setter + def rpc_metadata(self, value: Mapping[str, str | bytes]) -> None: + """Update the headers for this client. + + Do not mutate this mapping after set. Rather, set an entirely new + mapping if changes are needed. + + Raises: + TypeError: the key/value pair is not a valid gRPC ASCII or binary metadata. + All binary metadata must be supplied as bytes, and the key must end in '-bin'. + + .. warning:: + Attempting to set an invalid binary RPC metadata value may leave the client + in an inconsistent state (as well as raise a :py:class:`TypeError`). + """ + # Update config and perform update + # This may raise if the metadata is invalid: + self.service_client.update_rpc_metadata(value) + self.service_client.config.rpc_metadata = value + + @property + def api_key(self) -> str | None: + """API key for every call made by this client.""" + return self.service_client.config.api_key + + @api_key.setter + def api_key(self, value: str | None) -> None: + """Update the API key for this client. + + This is only set if RPCmetadata doesn't already have an "authorization" + key. + """ + # Update config and perform update + self.service_client.config.api_key = value + self.service_client.update_api_key(value) + + # Overload for no-param workflow + @overload + async def start_workflow( + self, + workflow: MethodAsyncNoParam[SelfType, ReturnType], + *, + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> WorkflowHandle[SelfType, ReturnType]: ... + + # Overload for single-param workflow + @overload + async def start_workflow( + self, + workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> WorkflowHandle[SelfType, ReturnType]: ... + + # Overload for multi-param workflow + @overload + async def start_workflow( + self, + workflow: Callable[ + Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] + ], + *, + args: Sequence[Any], + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> WorkflowHandle[SelfType, ReturnType]: ... + + # Overload for string-name workflow + @overload + async def start_workflow( + self, + workflow: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> WorkflowHandle[Any, Any]: ... + + async def start_workflow( + self, + workflow: str | Callable[..., Awaitable[Any]], + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + stack_level: int = 2, + ) -> WorkflowHandle[Any, Any]: + """Start a workflow and return its handle. + + Args: + workflow: String name or class method decorated with + ``@workflow.run`` for the workflow to start. + arg: Single argument to the workflow. + args: Multiple arguments to the workflow. Cannot be set if arg is. + id: Unique identifier for the workflow execution. + task_queue: Task queue to run the workflow on. + result_type: For string workflows, this can set the specific result + type hint to deserialize into. + execution_timeout: Total workflow execution timeout including + retries and continue as new. + run_timeout: Timeout of a single workflow run. + task_timeout: Timeout of a single workflow task. + id_conflict_policy: Behavior when a workflow is currently running with the same ID. + Default is UNSPECIFIED, which effectively means fail the start attempt. + Set to USE_EXISTING for idempotent deduplication on workflow ID. + With Temporal Server 1.32.0 or later, the returned handle is + scoped to the existing workflow's run chain. + Cannot be set if ``id_reuse_policy`` is set to TERMINATE_IF_RUNNING. + id_reuse_policy: Behavior when a closed workflow with the same ID exists. + Default is ALLOW_DUPLICATE. + retry_policy: Retry policy for the workflow. + cron_schedule: See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + memo: Memo for the workflow. + search_attributes: Search attributes for the workflow. The + dictionary form of this is deprecated, use + :py:class:`temporalio.common.TypedSearchAttributes`. + static_summary: A single-line fixed summary for this workflow execution that may appear + in the UI/CLI. This can be in single-line Temporal markdown format. + static_details: General fixed details for this workflow execution that may appear in + UI/CLI. This can be in Temporal markdown format and can span multiple lines. This is + a fixed value on the workflow that cannot be updated. For details that can be + updated, use :py:meth:`temporalio.workflow.get_current_details` within the workflow. + start_delay: Amount of time to wait before starting the workflow. + This does not work with ``cron_schedule``. + start_signal: If present, this signal is sent as signal-with-start + instead of traditional workflow start. + start_signal_args: Arguments for start_signal if start_signal + present. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + request_eager_start: Potentially reduce the latency to start this workflow by + encouraging the server to start it on a local worker running with + this same client. + priority: Priority of the workflow execution. + versioning_override: Overrides the versioning behavior for this workflow. + + Returns: + A workflow handle to the started workflow. + + Raises: + temporalio.exceptions.WorkflowAlreadyStartedError: Workflow has + already been started. + RPCError: Workflow could not be started for some other reason. + """ + temporalio.common._warn_on_deprecated_search_attributes( + search_attributes, stack_level=stack_level + ) + name, result_type_from_type_hint = ( + temporalio.workflow._Definition.get_name_and_result_type(workflow) + ) + return await self._impl.start_workflow( + StartWorkflowInput( + workflow=name, + args=temporalio.common._arg_or_args(arg, args), + id=id, + task_queue=task_queue, + execution_timeout=execution_timeout, + run_timeout=run_timeout, + task_timeout=task_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + cron_schedule=cron_schedule, + memo=memo, + search_attributes=search_attributes, + start_delay=start_delay, + versioning_override=versioning_override, + headers={}, + static_summary=static_summary, + static_details=static_details, + start_signal=start_signal, + start_signal_args=start_signal_args, + ret_type=result_type or result_type_from_type_hint, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + request_eager_start=request_eager_start, + priority=priority, + ) + ) + + # Overload for no-param workflow + @overload + async def execute_workflow( + self, + workflow: MethodAsyncNoParam[SelfType, ReturnType], + *, + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> ReturnType: ... + + # Overload for single-param workflow + @overload + async def execute_workflow( + self, + workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> ReturnType: ... + + # Overload for multi-param workflow + @overload + async def execute_workflow( + self, + workflow: Callable[ + Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] + ], + *, + args: Sequence[Any], + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> ReturnType: ... + + # Overload for string-name workflow + @overload + async def execute_workflow( + self, + workflow: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> Any: ... + + async def execute_workflow( + self, + workflow: str | Callable[..., Awaitable[Any]], + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> Any: + """Start a workflow and wait for completion. + + This is a shortcut for :py:meth:`start_workflow` + + :py:meth:`WorkflowHandle.result`. + """ + return await ( + # We have to tell MyPy to ignore errors here because we want to call + # the non-@overload form of this and MyPy does not support that + await self.start_workflow( # type: ignore + workflow, # type: ignore[arg-type] + arg, + args=args, + task_queue=task_queue, + result_type=result_type, + id=id, + execution_timeout=execution_timeout, + run_timeout=run_timeout, + task_timeout=task_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + cron_schedule=cron_schedule, + memo=memo, + search_attributes=search_attributes, + static_summary=static_summary, + static_details=static_details, + start_delay=start_delay, + start_signal=start_signal, + start_signal_args=start_signal_args, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + request_eager_start=request_eager_start, + priority=priority, + versioning_override=versioning_override, + stack_level=3, + ) + ).result() + + def get_workflow_handle( + self, + workflow_id: str, + *, + run_id: str | None = None, + first_execution_run_id: str | None = None, + result_type: type | None = None, + ) -> WorkflowHandle[Any, Any]: + """Get a workflow handle to an existing workflow by its ID. + + Args: + workflow_id: Workflow ID to get a handle to. + run_id: Run ID that will be used for all calls. + first_execution_run_id: First execution run ID used for cancellation + and termination. + result_type: The result type to deserialize into if known. + + Returns: + The workflow handle. + """ + return WorkflowHandle( + self, + workflow_id, + run_id=run_id, + result_run_id=run_id, + first_execution_run_id=first_execution_run_id, + result_type=result_type, + ) + + def get_workflow_handle_for( + self, + workflow: ( + MethodAsyncNoParam[SelfType, ReturnType] + | MethodAsyncSingleParam[SelfType, Any, ReturnType] + ), + workflow_id: str, + *, + run_id: str | None = None, + first_execution_run_id: str | None = None, + ) -> WorkflowHandle[SelfType, ReturnType]: + """Get a typed workflow handle to an existing workflow by its ID. + + This is the same as :py:meth:`get_workflow_handle` but typed. + + Args: + workflow: The workflow run method to use for typing the handle. + workflow_id: Workflow ID to get a handle to. + run_id: Run ID that will be used for all calls. + first_execution_run_id: First execution run ID used for cancellation + and termination. + + Returns: + The workflow handle. + """ + defn = temporalio.workflow._Definition.must_from_run_fn(workflow) + return self.get_workflow_handle( + workflow_id, + run_id=run_id, + first_execution_run_id=first_execution_run_id, + result_type=defn.ret_type, + ) + + # Overload for no-param update + @overload + async def execute_update_with_start_workflow( + self, + update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType], + *, + start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: ... + + # Overload for single-param update + @overload + async def execute_update_with_start_workflow( + self, + update: temporalio.workflow.UpdateMethodMultiParam[ + [SelfType, ParamType], LocalReturnType + ], + arg: ParamType, + *, + start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: ... + + # Overload for multi-param update + @overload + async def execute_update_with_start_workflow( + self, + update: temporalio.workflow.UpdateMethodMultiParam[ + MultiParamSpec, LocalReturnType + ], + *, + args: MultiParamSpec.args, # type: ignore + start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: ... + + # Overload for string-name update + @overload + async def execute_update_with_start_workflow( + self, + update: str, + arg: Any = temporalio.common._arg_unset, + *, + start_workflow_operation: WithStartWorkflowOperation[Any, Any], + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: ... + + async def execute_update_with_start_workflow( + self, + update: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + start_workflow_operation: WithStartWorkflowOperation[Any, Any], + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: + """Send an update-with-start request and wait for the update to complete. + + A WorkflowIDConflictPolicy must be set in the start_workflow_operation. If the + specified workflow execution is not running, a new workflow execution is started + and the update is sent in the first workflow task. Alternatively if the specified + workflow execution is running then, if the WorkflowIDConflictPolicy is + USE_EXISTING, the update is issued against the specified workflow, and if the + WorkflowIDConflictPolicy is FAIL, an error is returned. This call will block until + the update has completed, and return the update result. Note that this means that + the call will not return successfully until the update has been delivered to a + worker. + + Args: + update: Update function or name on the workflow. arg: Single argument to the + update. + args: Multiple arguments to the update. Cannot be set if arg is. + start_workflow_operation: a WithStartWorkflowOperation definining the + WorkflowIDConflictPolicy and how to start the workflow in the event that a + workflow is started. + id: ID of the update. If not set, the default is a new UUID. + result_type: For string updates, this can set the specific result + type hint to deserialize into. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Raises: + WorkflowUpdateFailedError: If the update failed. + WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out + or was cancelled. This doesn't mean the update itself was timed out or + cancelled. + + RPCError: There was some issue starting the workflow or sending the update to + the workflow. + """ + handle = await self._start_update_with_start( + update, + arg, + args=args, + start_workflow_operation=start_workflow_operation, + wait_for_stage=WorkflowUpdateStage.COMPLETED, + id=id, + result_type=result_type, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + return await handle.result() + + # Overload for no-param start update + @overload + async def start_update_with_start_workflow( + self, + update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType], + *, + start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], + wait_for_stage: WorkflowUpdateStage, + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[LocalReturnType]: ... + + # Overload for single-param start update + @overload + async def start_update_with_start_workflow( + self, + update: temporalio.workflow.UpdateMethodMultiParam[ + [SelfType, ParamType], LocalReturnType + ], + arg: ParamType, + *, + start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], + wait_for_stage: WorkflowUpdateStage, + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[LocalReturnType]: ... + + # Overload for multi-param start update + @overload + async def start_update_with_start_workflow( + self, + update: temporalio.workflow.UpdateMethodMultiParam[ + MultiParamSpec, LocalReturnType + ], + *, + args: MultiParamSpec.args, # type: ignore + start_workflow_operation: WithStartWorkflowOperation[SelfType, Any], + wait_for_stage: WorkflowUpdateStage, + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[LocalReturnType]: ... + + # Overload for string-name start update + @overload + async def start_update_with_start_workflow( + self, + update: str, + arg: Any = temporalio.common._arg_unset, + *, + start_workflow_operation: WithStartWorkflowOperation[Any, Any], + wait_for_stage: WorkflowUpdateStage, + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[Any]: ... + + async def start_update_with_start_workflow( + self, + update: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + start_workflow_operation: WithStartWorkflowOperation[Any, Any], + wait_for_stage: WorkflowUpdateStage, + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[Any]: + """Send an update-with-start request and wait for it to be accepted. + + A WorkflowIDConflictPolicy must be set in the start_workflow_operation. If the + specified workflow execution is not running, a new workflow execution is started + and the update is sent in the first workflow task. Alternatively if the specified + workflow execution is running then, if the WorkflowIDConflictPolicy is + USE_EXISTING, the update is issued against the specified workflow, and if the + WorkflowIDConflictPolicy is FAIL, an error is returned. This call will block until + the update has been accepted, and return a WorkflowUpdateHandle. Note that this + means that the call will not return successfully until the update has been + delivered to a worker. + + Args: + update: Update function or name on the workflow. arg: Single argument to the + update. + args: Multiple arguments to the update. Cannot be set if arg is. + start_workflow_operation: a WithStartWorkflowOperation definining the + WorkflowIDConflictPolicy and how to start the workflow in the event that a + workflow is started. + wait_for_stage: Required stage to wait until returning: either ACCEPTED or + COMPLETED. ADMITTED is not currently supported. See + https://docs.temporal.io/workflows#update for more details. + id: ID of the update. If not set, the default is a new UUID. + result_type: For string updates, this can set the specific result + type hint to deserialize into. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Raises: + WorkflowUpdateFailedError: If the update failed. + WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out + or was cancelled. This doesn't mean the update itself was timed out or + cancelled. + + RPCError: There was some issue starting the workflow or sending the update to + the workflow. + """ + return await self._start_update_with_start( + update, + arg, + wait_for_stage=wait_for_stage, + args=args, + id=id, + result_type=result_type, + start_workflow_operation=start_workflow_operation, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + async def _start_update_with_start( + self, + update: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + wait_for_stage: WorkflowUpdateStage, + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + start_workflow_operation: WithStartWorkflowOperation[SelfType, ReturnType], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[Any]: + if wait_for_stage == WorkflowUpdateStage.ADMITTED: + raise ValueError("ADMITTED wait stage not supported") + + if start_workflow_operation._used: + raise RuntimeError("WithStartWorkflowOperation cannot be reused") + start_workflow_operation._used = True + + update_name, result_type_from_type_hint = ( + temporalio.workflow._UpdateDefinition.get_name_and_result_type(update) + ) + + update_input = UpdateWithStartUpdateWorkflowInput( + update_id=id, + update=update_name, + args=temporalio.common._arg_or_args(arg, args), + headers={}, + ret_type=result_type or result_type_from_type_hint, + wait_for_stage=wait_for_stage, + ) + + def on_start( + start_response: temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse, + ): + start_workflow_operation._workflow_handle.set_result( + WorkflowHandle( + self, + start_workflow_operation._start_workflow_input.id, + first_execution_run_id=( + start_response.first_execution_run_id or start_response.run_id + ), + result_run_id=start_response.run_id, + result_type=start_workflow_operation._start_workflow_input.ret_type, + ) + ) + + def on_start_error( + error: BaseException, + ): + start_workflow_operation._workflow_handle.set_exception(error) + + input = StartWorkflowUpdateWithStartInput( + start_workflow_input=start_workflow_operation._start_workflow_input, + update_workflow_input=update_input, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + _on_start=on_start, + _on_start_error=on_start_error, + ) + + return await self._impl.start_update_with_start_workflow(input) + + def list_workflows( + self, + query: str | None = None, + *, + limit: int | None = None, + page_size: int = 1000, + next_page_token: bytes | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowExecutionAsyncIterator: + """List workflows. + + This does not make a request until the first iteration is attempted. + Therefore any errors will not occur until then. + + Args: + query: A Temporal visibility list filter. See Temporal documentation + concerning visibility list filters including behavior when left + unset. + limit: Maximum number of workflows to return. If unset, all + workflows are returned. Only applies if using the + returned :py:class:`WorkflowExecutionAsyncIterator`. + as an async iterator. + page_size: Maximum number of results for each page. + next_page_token: A previously obtained next page token if doing + pagination. Usually not needed as the iterator automatically + starts from the beginning. + rpc_metadata: Headers used on each RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. + + Returns: + An async iterator that can be used with ``async for``. + """ + return self._impl.list_workflows( + ListWorkflowsInput( + query=query, + page_size=page_size, + next_page_token=next_page_token, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + limit=limit, + ) + ) + + async def count_workflows( + self, + query: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowExecutionCount: + """Count workflows. + + Args: + query: A Temporal visibility filter. See Temporal documentation + concerning visibility list filters. + rpc_metadata: Headers used on each RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. + + Returns: + Count of workflows. + """ + return await self._impl.count_workflows( + CountWorkflowsInput( + query=query, rpc_metadata=rpc_metadata, rpc_timeout=rpc_timeout + ) + ) + + # async no-param + @overload + async def start_activity( + self, + activity: CallableAsyncNoParam[ReturnType], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # sync no-param + @overload + async def start_activity( + self, + activity: CallableSyncNoParam[ReturnType], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # async single-param + @overload + async def start_activity( + self, + activity: CallableAsyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # sync single-param + @overload + async def start_activity( + self, + activity: CallableSyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # async multi-param + @overload + async def start_activity( + self, + activity: Callable[..., Awaitable[ReturnType]], + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # sync multi-param + @overload + async def start_activity( + self, + activity: Callable[..., ReturnType], + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # string name + @overload + async def start_activity( + self, + activity: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[Any]: ... + + async def start_activity( + self, + activity: ( + str | Callable[..., Awaitable[ReturnType]] | Callable[..., ReturnType] + ), + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + # Either schedule_to_close_timeout or start_to_close_timeout must be present + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: + """Start an activity and return its handle. + + Args: + activity: String name or callable activity function to execute. + arg: Single argument to the activity. + args: Multiple arguments to the activity. Cannot be set if arg is. + id: Unique identifier for the activity. Required. + task_queue: Task queue to send the activity to. + result_type: For string name activities, optional type to deserialize result into. + schedule_to_close_timeout: Total time allowed for the activity from schedule to completion. + schedule_to_start_timeout: Time allowed for the activity to sit in the task queue. + start_to_close_timeout: Time allowed for a single execution attempt. + heartbeat_timeout: Time between heartbeats before the activity is considered failed. + id_reuse_policy: How to handle reusing activity IDs from closed activities. + Default is ALLOW_DUPLICATE. + id_conflict_policy: How to handle activity ID conflicts with running activities. + Default is FAIL. + retry_policy: Retry policy for the activity. + search_attributes: Search attributes for the activity. + summary: A single-line fixed summary for this activity that may appear + in the UI/CLI. This can be in single-line Temporal markdown format. + priority: Priority of the activity execution. + start_delay: Time to wait before dispatching the activity. + This delay is not applied to retry attempts. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + A handle to the started activity. + """ + name, result_type_from_type_annotation = ( + temporalio.activity._Definition.get_name_and_result_type(activity) + ) + return await self._impl.start_activity( + StartActivityInput( + activity_type=name, + args=temporalio.common._arg_or_args(arg, args), + id=id, + task_queue=task_queue, + result_type=result_type or result_type_from_type_annotation, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + search_attributes=search_attributes, + summary=summary, + start_delay=start_delay, + headers={}, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + priority=priority, + ) + ) + + # async no-param + @overload + async def execute_activity( + self, + activity: CallableAsyncNoParam[ReturnType], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # sync no-param + @overload + async def execute_activity( + self, + activity: CallableSyncNoParam[ReturnType], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # async single-param + @overload + async def execute_activity( + self, + activity: CallableAsyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # sync single-param + @overload + async def execute_activity( + self, + activity: CallableSyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # async multi-param + @overload + async def execute_activity( + self, + activity: Callable[..., Awaitable[ReturnType]], + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # sync multi-param + @overload + async def execute_activity( + self, + activity: Callable[..., ReturnType], + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # string name + @overload + async def execute_activity( + self, + activity: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: ... + + async def execute_activity( + self, + activity: ( + str | Callable[..., Awaitable[ReturnType]] | Callable[..., ReturnType] + ), + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + # Either schedule_to_close_timeout or start_to_close_timeout must be present + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: + """Start an activity, wait for it to complete, and return its result. + + This is a convenience method that combines :py:meth:`start_activity` and + :py:meth:`ActivityHandle.result`. + + Returns: + The result of the activity. + + Raises: + ActivityFailureError: If the activity completed with a failure. + """ + handle: ActivityHandle[ReturnType] = await self.start_activity( + cast(Any, activity), + arg, + args=args, + id=id, + task_queue=task_queue, + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + search_attributes=search_attributes, + summary=summary, + priority=priority, + start_delay=start_delay, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + return await handle.result() + + # async no-param + @overload + async def start_activity_class( + self, + activity: type[CallableAsyncNoParam[ReturnType]], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # sync no-param + @overload + async def start_activity_class( + self, + activity: type[CallableSyncNoParam[ReturnType]], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # async single-param + @overload + async def start_activity_class( + self, + activity: type[CallableAsyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # sync single-param + @overload + async def start_activity_class( + self, + activity: type[CallableSyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # async multi-param + @overload + async def start_activity_class( + self, + activity: type[Callable[..., Awaitable[ReturnType]]], # type: ignore[reportInvalidTypeForm] + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # sync multi-param + @overload + async def start_activity_class( + self, + activity: type[Callable[..., ReturnType]], # type: ignore[reportInvalidTypeForm] + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + async def start_activity_class( + self, + activity: type[Callable], # type: ignore[reportInvalidTypeForm] + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[Any]: + """Start an activity from a callable class. + + See :py:meth:`start_activity` for parameter and return details. + """ + return await self.start_activity( + cast(Any, activity), + arg, + args=args, + id=id, + task_queue=task_queue, + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + search_attributes=search_attributes, + summary=summary, + priority=priority, + start_delay=start_delay, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + # async no-param + @overload + async def execute_activity_class( + self, + activity: type[CallableAsyncNoParam[ReturnType]], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # sync no-param + @overload + async def execute_activity_class( + self, + activity: type[CallableSyncNoParam[ReturnType]], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # async single-param + @overload + async def execute_activity_class( + self, + activity: type[CallableAsyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # sync single-param + @overload + async def execute_activity_class( + self, + activity: type[CallableSyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # async multi-param + @overload + async def execute_activity_class( + self, + activity: type[Callable[..., Awaitable[ReturnType]]], # type: ignore[reportInvalidTypeForm] + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # sync multi-param + @overload + async def execute_activity_class( + self, + activity: type[Callable[..., ReturnType]], # type: ignore[reportInvalidTypeForm] + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + async def execute_activity_class( + self, + activity: type[Callable], # type: ignore[reportInvalidTypeForm] + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: + """Start an activity from a callable class and wait for completion. + + This is a shortcut for ``await`` :py:meth:`start_activity_class`. + """ + return await self.execute_activity( + cast(Any, activity), + arg, + args=args, + id=id, + task_queue=task_queue, + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + search_attributes=search_attributes, + summary=summary, + priority=priority, + start_delay=start_delay, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + # async no-param + @overload + async def start_activity_method( + self, + activity: MethodAsyncNoParam[SelfType, ReturnType], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # async single-param + @overload + async def start_activity_method( + self, + activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # async multi-param + @overload + async def start_activity_method( + self, + activity: Callable[ + Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] + ], + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + # sync multi-param + @overload + async def start_activity_method( + self, + activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[ReturnType]: ... + + async def start_activity_method( + self, + activity: Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityHandle[Any]: + """Start an activity from a method. + + See :py:meth:`start_activity` for parameter and return details. + """ + return await self.start_activity( + cast(Any, activity), + arg, + args=args, + id=id, + task_queue=task_queue, + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + search_attributes=search_attributes, + summary=summary, + priority=priority, + start_delay=start_delay, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + # async no-param + @overload + async def execute_activity_method( + self, + activity: MethodAsyncNoParam[SelfType, ReturnType], + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # async single-param + @overload + async def execute_activity_method( + self, + activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # async multi-param + @overload + async def execute_activity_method( + self, + activity: Callable[ + Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] + ], + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + # sync multi-param + @overload + async def execute_activity_method( + self, + activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], + *, + args: Sequence[Any], + id: str, + task_queue: str, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: ... + + async def execute_activity_method( + self, + activity: Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + start_delay: timedelta | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: + """Start an activity from a method and wait for completion. + + This is a shortcut for ``await`` :py:meth:`start_activity_method`. + """ + return await self.execute_activity( + cast(Any, activity), + arg, + args=args, + id=id, + task_queue=task_queue, + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + search_attributes=search_attributes, + summary=summary, + priority=priority, + start_delay=start_delay, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + def list_activities( + self, + query: str, + *, + limit: int | None = None, + page_size: int = 1000, + next_page_token: bytes | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityExecutionAsyncIterator: + """List activities not started by a workflow. + + This does not make a request until the first iteration is attempted. + Therefore any errors will not occur until then. + + Args: + query: A Temporal visibility list filter for activities. Required. + limit: Maximum number of activities to return. If unset, all + activities are returned. Only applies if using the + returned :py:class:`ActivityExecutionAsyncIterator` + as an async iterator. + page_size: Maximum number of results for each page. + next_page_token: A previously obtained next page token if doing + pagination. Usually not needed as the iterator automatically + starts from the beginning. + rpc_metadata: Headers used on each RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. + + Returns: + An async iterator that can be used with ``async for``. + """ + return self._impl.list_activities( + ListActivitiesInput( + query=query, + page_size=page_size, + next_page_token=next_page_token, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + limit=limit, + ) + ) + + async def count_activities( + self, + query: str | None = None, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ActivityExecutionCount: + """Count activities not started by a workflow. + + Args: + query: A Temporal visibility filter for activities. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + Count of activities. + """ + return await self._impl.count_activities( + CountActivitiesInput( + query=query, rpc_metadata=rpc_metadata, rpc_timeout=rpc_timeout + ) + ) + + @overload + def get_activity_handle( + self, + activity_id: str, + *, + run_id: str | None = None, + ) -> ActivityHandle[Any]: ... + + @overload + def get_activity_handle( + self, + activity_id: str, + *, + run_id: str | None = None, + result_type: type[ReturnType], + ) -> ActivityHandle[ReturnType]: ... + + def get_activity_handle( + self, + activity_id: str, + *, + run_id: str | None = None, + result_type: type | None = None, + ) -> ActivityHandle[Any]: + """Get a handle to an existing activity, as the caller of that activity. + + The activity must not have been started by a workflow. + + To get a handle to an activity execution that you control for manual completion and + heartbeating, see :py:meth:`Client.get_async_activity_handle`. + + Args: + activity_id: The activity ID. + run_id: The activity run ID. If not provided, targets the latest run. + result_type: The result type to deserialize into. + + Returns: + A handle to the activity. + """ + return ActivityHandle( + self, + activity_id, + run_id=run_id, + result_type=result_type, + ) + + @overload + def get_async_activity_handle( + self, *, activity_id: str, run_id: str | None = None + ) -> AsyncActivityHandle: + pass + + @overload + def get_async_activity_handle( + self, *, workflow_id: str, run_id: str | None, activity_id: str + ) -> AsyncActivityHandle: + pass + + @overload + def get_async_activity_handle(self, *, task_token: bytes) -> AsyncActivityHandle: + pass + + def get_async_activity_handle( + self, + *, + workflow_id: str | None = None, + run_id: str | None = None, + activity_id: str | None = None, + task_token: bytes | None = None, + ) -> AsyncActivityHandle: + """Get a handle to an activity execution that you control, for manual + completion and heartbeating. + + To get a handle to an activity execution as the caller of that activity, + see :py:meth:`Client.get_activity_handle`. + + This function may be used to get a handle to an activity started by a + client, or an activity started by a workflow. + + To get a handle to an activity started by a workflow, use one of the + following two calls: + - Supply ``workflow_id``, ``run_id``, and ``activity_id`` + - Supply the activity ``task_token`` alone + + To get a handle to an activity not started by a workflow, supply + ``activity_id`` and ``run_id`` + + Args: + workflow_id: Workflow ID for the activity, or None if not a workflow + activity. Cannot be set if task_token is set. + run_id: Run ID for the activity or workflow. Cannot be set if + task_token is set. + activity_id: ID for the activity. Cannot be set if task_token is + set. + task_token: Task token for the activity. Cannot be set with other + fields. + + Returns: + A handle that can be used for completion or heartbeating. + """ + if task_token is not None: + if workflow_id is not None or run_id is not None or activity_id is not None: + raise ValueError("Task token cannot be present with other IDs") + return AsyncActivityHandle(self, task_token) + elif workflow_id is not None: + if activity_id is None: + raise ValueError( + "Workflow ID, run ID, and activity ID must all be given together" + ) + return AsyncActivityHandle( + self, + AsyncActivityIDReference( + workflow_id=workflow_id, run_id=run_id, activity_id=activity_id + ), + ) + elif activity_id is not None: + return AsyncActivityHandle( + self, + AsyncActivityIDReference( + activity_id=activity_id, + run_id=run_id, + workflow_id=None, + ), + ) + raise ValueError( + "Require task token, or workflow_id & run_id & activity_id, or activity_id & run_id" + ) + + async def create_schedule( + self, + id: str, + schedule: Schedule, + *, + trigger_immediately: bool = False, + backfill: Sequence[ScheduleBackfill] = [], + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ScheduleHandle: + """Create a schedule and return its handle. + + Args: + id: Unique identifier of the schedule. + schedule: Schedule to create. + trigger_immediately: If true, trigger one action immediately when + creating the schedule. + backfill: Set of time periods to take actions on as if that time + passed right now. + memo: Memo for the schedule. Memo for a scheduled workflow is part + of the schedule action. + search_attributes: Search attributes for the schedule. Search + attributes for a scheduled workflow are part of the scheduled + action. The dictionary form of this is DEPRECATED, use + :py:class:`temporalio.common.TypedSearchAttributes`. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + A handle to the created schedule. + + Raises: + ScheduleAlreadyRunningError: If a schedule with this ID is already + running. + """ + temporalio.common._warn_on_deprecated_search_attributes(search_attributes) + return await self._impl.create_schedule( + CreateScheduleInput( + id=id, + schedule=schedule, + trigger_immediately=trigger_immediately, + backfill=backfill, + memo=memo, + search_attributes=search_attributes, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + def get_schedule_handle(self, id: str) -> ScheduleHandle: + """Get a schedule handle for the given ID.""" + return ScheduleHandle(self, id) + + async def list_schedules( + self, + query: str | None = None, + *, + page_size: int = 1000, + next_page_token: bytes | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ScheduleAsyncIterator: + """List schedules. + + This does not make a request until the first iteration is attempted. + Therefore any errors will not occur until then. + + Note, this list is eventually consistent. Therefore if a schedule is + added or deleted, it may not be available in the list immediately. + + Args: + page_size: Maximum number of results for each page. + query: A Temporal visibility list filter. See Temporal documentation + concerning visibility list filters including behavior when left + unset. + next_page_token: A previously obtained next page token if doing + pagination. Usually not needed as the iterator automatically + starts from the beginning. + rpc_metadata: Headers used on each RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. + + Returns: + An async iterator that can be used with ``async for``. + """ + return self._impl.list_schedules( + ListSchedulesInput( + page_size=page_size, + next_page_token=next_page_token, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + query=query, + ) + ) + + async def update_worker_build_id_compatibility( + self, + task_queue: str, + operation: BuildIdOp, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Used to add new Build IDs or otherwise update the relative compatibility of Build Ids as + defined on a specific task queue for the Worker Versioning feature. + + For more on this feature, see https://docs.temporal.io/workers#worker-versioning + + .. deprecated:: + Legacy API, see the docs above for new usage + + Args: + task_queue: The task queue to target. + operation: The operation to perform. + rpc_metadata: Headers used on each RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. + """ + return await self._impl.update_worker_build_id_compatibility( + UpdateWorkerBuildIdCompatibilityInput( + task_queue, + operation, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def get_worker_build_id_compatibility( + self, + task_queue: str, + max_sets: int | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkerBuildIdVersionSets: + """Get the Build ID compatibility sets for a specific task queue. + + For more on this feature, see https://docs.temporal.io/workers#worker-versioning + + .. deprecated:: + Legacy API, see the docs above for new usage + + Args: + task_queue: The task queue to target. + max_sets: The maximum number of sets to return. If not specified, all sets will be + returned. + rpc_metadata: Headers used on each RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. + """ + return await self._impl.get_worker_build_id_compatibility( + GetWorkerBuildIdCompatibilityInput( + task_queue, + max_sets, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def get_worker_task_reachability( + self, + build_ids: Sequence[str], + task_queues: Sequence[str] = [], + reachability_type: TaskReachabilityType | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkerTaskReachability: + """Determine if some Build IDs for certain Task Queues could have tasks dispatched to them. + + For more on this feature, see https://docs.temporal.io/workers#worker-versioning + + .. deprecated:: + Legacy API, see the docs above for new usage + + Args: + build_ids: The Build IDs to query the reachability of. At least one must be specified. + task_queues: Task Queues to restrict the query to. If not specified, all Task Queues + will be searched. When requesting a large number of task queues or all task queues + associated with the given Build IDs in a namespace, all Task Queues will be listed + in the response but some of them may not contain reachability information due to a + server enforced limit. When reaching the limit, task queues that reachability + information could not be retrieved for will be marked with a ``NotFetched`` entry in + {@link BuildIdReachability.taskQueueReachability}. The caller may issue another call + to get the reachability for those task queues. + reachability_type: The kind of reachability this request is concerned with. + rpc_metadata: Headers used on each RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. + """ + return await self._impl.get_worker_task_reachability( + GetWorkerTaskReachabilityInput( + build_ids, + task_queues, + reachability_type, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + def create_nexus_client( + self, + service: type[NexusServiceType] | str, + endpoint: str, + ) -> NexusClient[NexusServiceType]: + """Create a client for starting standalone Nexus operations. + + .. warning:: + This API is experimental and unstable. + + Args: + service: The Nexus service type or service name string. + endpoint: Endpoint name, resolved to a URL via the cluster's + endpoint registry. + + Returns: + A Nexus client for the given service and endpoint. + """ + return _NexusClient(client=self, service=service, endpoint=endpoint) + + def list_nexus_operations( + self, + query: str, + *, + limit: int | None = None, + page_size: int = 1000, + next_page_token: bytes | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationExecutionAsyncIterator: + """List standalone Nexus operations. + + .. warning:: + This API is experimental and unstable. + + This does not make a request until the first iteration is attempted. + Therefore any errors will not occur until then. + + Args: + query: A Temporal visibility list filter for nexus operations. Required. + limit: Maximum number of operations to return. If unset, all + operations are returned. Only applies if using the + returned :py:class:`NexusOperationExecutionAsyncIterator` + as an async iterator. + page_size: Maximum number of results for each page. + next_page_token: A previously obtained next page token if doing + pagination. Usually not needed as the iterator automatically + starts from the beginning. + rpc_metadata: Headers used on each RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. + + Returns: + An async iterator that can be used with ``async for``. + """ + return self._impl.list_nexus_operations( + ListNexusOperationsInput( + query=query, + page_size=page_size, + next_page_token=next_page_token, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + limit=limit, + ) + ) + + async def count_nexus_operations( + self, + query: str | None = None, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationExecutionCount: + """Count standalone Nexus operations. + + .. warning:: + This API is experimental and unstable. + + Args: + query: A Temporal visibility filter for nexus operations. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + Count of nexus operations. + """ + return await self._impl.count_nexus_operations( + CountNexusOperationsInput( + query=query, rpc_metadata=rpc_metadata, rpc_timeout=rpc_timeout + ) + ) + + @overload + def get_nexus_operation_handle( + self, + operation_id: str, + *, + run_id: str | None = None, + ) -> NexusOperationHandle[Any]: ... + + @overload + def get_nexus_operation_handle( + self, + operation_id: str, + *, + run_id: str | None = None, + result_type: type[ReturnType], + ) -> NexusOperationHandle[ReturnType]: ... + + @overload + def get_nexus_operation_handle( + self, + operation_id: str, + *, + operation: nexusrpc.Operation[Any, OutputT], + run_id: str | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + def get_nexus_operation_handle( + self, + operation_id: str, + *, + operation: nexusrpc.Operation[Any, Any] | None = None, + run_id: str | None = None, + result_type: type | None = None, + ) -> NexusOperationHandle[Any]: + """Get a handle to an existing standalone Nexus operation. + + .. warning:: + This API is experimental and unstable. + + Args: + operation_id: The operation ID. + operation: A ``nexusrpc.Operation`` from which the result type + is extracted. If both ``operation`` and ``result_type`` are + provided, the ``result_type`` takes precedence. + run_id: The operation run ID. If not provided, targets the latest run. + result_type: The result type to deserialize into. + + Returns: + A handle to the operation. + """ + result_type = result_type or (operation.output_type if operation else None) + return NexusOperationHandle( + self, + operation_id, + run_id=run_id, + result_type=result_type, + ) + + +class ClientConnectConfig(TypedDict, total=False): + """TypedDict of keyword arguments for :py:meth:`Client.connect`.""" + + target_host: str + namespace: str + api_key: str | None + data_converter: temporalio.converter.DataConverter + plugins: Sequence[Plugin] + interceptors: Sequence[Interceptor] + default_workflow_query_reject_condition: ( + temporalio.common.QueryRejectCondition | None + ) + tls: bool | TLSConfig | None + retry_config: RetryConfig | None + keep_alive_config: KeepAliveConfig | None + connect_timeout: timedelta | None + rpc_metadata: Mapping[str, str | bytes] + identity: str | None + lazy: bool + runtime: temporalio.runtime.Runtime | None + http_connect_proxy_config: HttpConnectProxyConfig | None + dns_load_balancing_config: DnsLoadBalancingConfig | None + grpc_compression: GrpcCompression + payload_limits: PayloadLimitsConfig + header_codec_behavior: HeaderCodecBehavior + + +class ClientConfig(TypedDict, total=False): + """TypedDict of config originally passed to :py:meth:`Client`.""" + + service_client: Required[temporalio.service.ServiceClient] + namespace: Required[str] + data_converter: Required[temporalio.converter.DataConverter] + plugins: Required[Sequence[Plugin]] + interceptors: Required[Sequence[Interceptor]] + default_workflow_query_reject_condition: Required[ + temporalio.common.QueryRejectCondition | None + ] + header_codec_behavior: Required[HeaderCodecBehavior] diff --git a/temporalio/client/_cloud.py b/temporalio/client/_cloud.py new file mode 100644 index 0000000000..5394f8ca94 --- /dev/null +++ b/temporalio/client/_cloud.py @@ -0,0 +1,187 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +from collections.abc import ( + Mapping, +) + +import temporalio.runtime +import temporalio.service +from temporalio.service import ( + DnsLoadBalancingConfig, + GrpcCompression, + HttpConnectProxyConfig, + KeepAliveConfig, + RetryConfig, + TLSConfig, +) + + +class CloudOperationsClient: + """Client for accessing Temporal Cloud Operations API. + + .. warning:: + This client and the API are experimental + + Most users will use :py:meth:`connect` to create a client. The + :py:attr:`cloud_service` property provides access to a raw gRPC cloud + service client. + + Clients are not thread-safe and should only be used in the event loop they + are first connected in. If a client needs to be used from another thread + than where it was created, make sure the event loop where it was created is + captured, and then call :py:func:`asyncio.run_coroutine_threadsafe` with the + client call and that event loop. + + Clients do not work across forks since runtimes do not work across forks. + """ + + @staticmethod + async def connect( + *, + api_key: str | None = None, + version: str | None = None, + target_host: str = "saas-api.tmprl.cloud:443", + tls: bool | TLSConfig = True, + retry_config: RetryConfig | None = None, + keep_alive_config: KeepAliveConfig | None = KeepAliveConfig.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + identity: str | None = None, + lazy: bool = False, + runtime: temporalio.runtime.Runtime | None = None, + http_connect_proxy_config: HttpConnectProxyConfig | None = None, + dns_load_balancing_config: DnsLoadBalancingConfig | None = None, + grpc_compression: GrpcCompression = GrpcCompression.GZIP, + ) -> CloudOperationsClient: + """Connect to a Temporal Cloud Operations API. + + .. warning:: + This client and the API are experimental + + Args: + api_key: API key for Temporal. This becomes the "Authorization" + HTTP header with "Bearer " prepended. This is only set if RPC + metadata doesn't already have an "authorization" key. This is + essentially required for access to the cloud API. + version: Version header for safer mutations. May or may not be + required depending on cloud settings. + target_host: ``host:port`` for the Temporal server. The default is + to the common cloud endpoint. + tls: If true, the default, use system default TLS configuration. If + false, the default, do not use TLS. If TLS configuration + present, that TLS configuration will be used. The default is + usually required to access the API. + retry_config: Retry configuration for direct service calls (when + opted in) or all high-level calls made by this client (which all + opt-in to retries by default). If unset, a default retry + configuration is used. + keep_alive_config: Keep-alive configuration for the client + connection. Default is to check every 30s and kill the + connection if a response doesn't come back in 15s. Can be set to + ``None`` to disable. + rpc_metadata: Headers to use for all calls to the server. Keys here + can be overriden by per-call RPC metadata keys. + identity: Identity for this client. If unset, a default is created + based on the version of the SDK. + lazy: If true, the client will not connect until the first call is + attempted or a worker is created with it. Lazy clients cannot be + used for workers. + runtime: The runtime for this client, or the default if unset. + http_connect_proxy_config: Configuration for HTTP CONNECT proxy. + dns_load_balancing_config: DNS load balancing configuration for the + client connection. Default is disabled. Silently disabled when + ``http_connect_proxy_config`` is set, since the two are mutually + exclusive. + grpc_compression: Transport-level gRPC compression for the client + connection. Default is gzip. Set to + :py:attr:`GrpcCompression.NONE` to disable compression. + """ + # Add version if given + if version: + rpc_metadata = dict(rpc_metadata) + rpc_metadata["temporal-cloud-api-version"] = version + connect_config = temporalio.service.ConnectConfig( + target_host=target_host, + api_key=api_key, + tls=tls, + retry_config=retry_config, + keep_alive_config=keep_alive_config, + rpc_metadata=rpc_metadata, + identity=identity or "", + lazy=lazy, + runtime=runtime, + http_connect_proxy_config=http_connect_proxy_config, + dns_load_balancing_config=dns_load_balancing_config, + grpc_compression=grpc_compression, + ) + return CloudOperationsClient( + await temporalio.service.ServiceClient.connect(connect_config) + ) + + def __init__( + self, + service_client: temporalio.service.ServiceClient, + ): + """Create a Temporal Cloud Operations client from a service client. + + .. warning:: + This client and the API are experimental + + Args: + service_client: Existing service client to use. + """ + self._service_client = service_client + + @property + def service_client(self) -> temporalio.service.ServiceClient: + """Raw gRPC service client.""" + return self._service_client + + @property + def cloud_service(self) -> temporalio.service.CloudService: + """Raw gRPC cloud service client.""" + return self._service_client.cloud_service + + @property + def identity(self) -> str: + """Identity used in calls by this client.""" + return self._service_client.config.identity + + @property + def rpc_metadata(self) -> Mapping[str, str | bytes]: + """Headers for every call made by this client. + + Do not use mutate this mapping. Rather, set this property with an + entirely new mapping to change the headers. This may include the + ``temporal-cloud-api-version`` header if set. + """ + return self.service_client.config.rpc_metadata + + @rpc_metadata.setter + def rpc_metadata(self, value: Mapping[str, str | bytes]) -> None: + """Update the headers for this client. + + Do not mutate this mapping after set. Rather, set an entirely new + mapping if changes are needed. Currently this must be set with the + ``temporal-cloud-api-version`` header if it is needed. + """ + # Update config and perform update + self.service_client.config.rpc_metadata = value + self.service_client.update_rpc_metadata(value) + + @property + def api_key(self) -> str | None: + """API key for every call made by this client.""" + return self.service_client.config.api_key + + @api_key.setter + def api_key(self, value: str | None) -> None: + """Update the API key for this client. + + This is only set if RPCmetadata doesn't already have an "authorization" + key. + """ + # Update config and perform update + self.service_client.config.api_key = value + self.service_client.update_api_key(value) diff --git a/temporalio/client/_exceptions.py b/temporalio/client/_exceptions.py new file mode 100644 index 0000000000..2d91372f12 --- /dev/null +++ b/temporalio/client/_exceptions.py @@ -0,0 +1,135 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +from typing import ( + TYPE_CHECKING, +) + +import temporalio.exceptions +from temporalio.activity import ActivityCancellationDetails + +if TYPE_CHECKING: + from ._workflow import WorkflowExecutionStatus + + +class WorkflowFailureError(temporalio.exceptions.TemporalError): + """Error that occurs when a workflow is unsuccessful.""" + + def __init__(self, *, cause: BaseException) -> None: + """Create workflow failure error.""" + super().__init__("Workflow execution failed") + self.__cause__ = cause + + @property + def cause(self) -> BaseException: + """Cause of the workflow failure.""" + assert self.__cause__ + return self.__cause__ + + +class WorkflowContinuedAsNewError(temporalio.exceptions.TemporalError): + """Error that occurs when a workflow was continued as new.""" + + def __init__(self, new_execution_run_id: str) -> None: + """Create workflow continue as new error.""" + super().__init__("Workflow continued as new") + self._new_execution_run_id = new_execution_run_id + + @property + def new_execution_run_id(self) -> str: + """New execution run ID the workflow continued to""" + return self._new_execution_run_id + + +class WorkflowQueryRejectedError(temporalio.exceptions.TemporalError): + """Error that occurs when a query was rejected.""" + + def __init__(self, status: WorkflowExecutionStatus | None) -> None: + """Create workflow query rejected error.""" + super().__init__(f"Query rejected, status: {status}") + self._status = status + + @property + def status(self) -> WorkflowExecutionStatus | None: + """Get workflow execution status causing rejection.""" + return self._status + + +class WorkflowQueryFailedError(temporalio.exceptions.TemporalError): + """Error that occurs when a query fails.""" + + def __init__(self, message: str) -> None: + """Create workflow query failed error.""" + super().__init__(message) + self._message = message + + @property + def message(self) -> str: + """Get query failed message.""" + return self._message + + +class WorkflowUpdateFailedError(temporalio.exceptions.TemporalError): + """Error that occurs when an update fails.""" + + def __init__(self, cause: BaseException) -> None: + """Create workflow update failed error.""" + super().__init__("Workflow update failed") + self.__cause__ = cause + + @property + def cause(self) -> BaseException: + """Cause of the update failure.""" + assert self.__cause__ + return self.__cause__ + + +class RPCTimeoutOrCancelledError(temporalio.exceptions.TemporalError): + """Error that occurs on some client calls that timeout or get cancelled.""" + + pass + + +class WorkflowUpdateRPCTimeoutOrCancelledError(RPCTimeoutOrCancelledError): + """Error that occurs when update RPC call times out or is cancelled. + + Note, this is not related to any general concept of timing out or cancelling + a running update, this is only related to the client call itself. + """ + + def __init__(self) -> None: + """Create workflow update timeout or cancelled error.""" + super().__init__("Timeout or cancellation waiting for update") + + +class ActivityFailureError(temporalio.exceptions.TemporalError): + """Error that occurs when an activity is unsuccessful.""" + + def __init__(self, *, cause: BaseException) -> None: + """Create activity failure error.""" + super().__init__("Activity execution failed") + self.__cause__ = cause + + @property + def cause(self) -> BaseException: + """Cause of the activity failure.""" + assert self.__cause__ + return self.__cause__ + + +class AsyncActivityCancelledError(temporalio.exceptions.TemporalError): + """Error that occurs when async activity attempted heartbeat but was cancelled.""" + + def __init__(self, details: ActivityCancellationDetails | None = None) -> None: + """Create async activity cancelled error.""" + super().__init__("Activity cancelled") + self.details = details + + +class ScheduleAlreadyRunningError(temporalio.exceptions.TemporalError): + """Error when a schedule is already running.""" + + def __init__(self) -> None: + """Create schedule already running error.""" + super().__init__("Schedule already running") diff --git a/temporalio/client/_helpers.py b/temporalio/client/_helpers.py new file mode 100644 index 0000000000..48019cfc98 --- /dev/null +++ b/temporalio/client/_helpers.py @@ -0,0 +1,205 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +import copy +import json +import re +from collections.abc import ( + Iterable, + Mapping, +) +from typing import ( + Any, +) + +import google.protobuf.json_format +from google.protobuf.internal.containers import MessageMap + +import temporalio.api.common.v1 +import temporalio.api.history.v1 +import temporalio.api.sdk.v1 +import temporalio.common +import temporalio.converter +from temporalio.converter import ( + DataConverter, +) + + +async def _apply_headers( # pyright: ignore[reportUnusedFunction] + source: Mapping[str, temporalio.api.common.v1.Payload] | None, + dest: MessageMap[str, temporalio.api.common.v1.Payload], + encode_headers: bool, + data_converter: DataConverter, +) -> None: + if source is None: + return + if encode_headers: + for key, payload in source.items(): + dest[key].CopyFrom( + await data_converter._transform_outbound_payload(payload) + ) + else: + temporalio.common._apply_headers(source, dest) + + +def _history_from_json( # pyright: ignore[reportUnusedFunction] + history: str | dict[str, Any], +) -> temporalio.api.history.v1.History: + if isinstance(history, str): + history = json.loads(history) + else: + # Copy the dict so we can mutate it + history = copy.deepcopy(history) + if not isinstance(history, dict): + raise ValueError("JSON history not a dictionary") + events = history.get("events") + if not isinstance(events, Iterable): + raise ValueError("History does not have iterable 'events'") + for event in events: + if not isinstance(event, dict): + raise ValueError("Event not a dictionary") + _fix_history_enum( + "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE", + event, + "requestCancelExternalWorkflowExecutionFailedEventAttributes", + "cause", + ) + _fix_history_enum("CONTINUE_AS_NEW_INITIATOR", event, "*", "initiator") + _fix_history_enum("EVENT_TYPE", event, "eventType") + _fix_history_enum( + "PARENT_CLOSE_POLICY", + event, + "startChildWorkflowExecutionInitiatedEventAttributes", + "parentClosePolicy", + ) + _fix_history_enum("RETRY_STATE", event, "*", "retryState") + _fix_history_enum( + "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE", + event, + "signalExternalWorkflowExecutionFailedEventAttributes", + "cause", + ) + _fix_history_enum( + "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE", + event, + "startChildWorkflowExecutionFailedEventAttributes", + "cause", + ) + _fix_history_enum("TASK_QUEUE_KIND", event, "*", "taskQueue", "kind") + _fix_history_enum( + "TIMEOUT_TYPE", + event, + "workflowTaskTimedOutEventAttributes", + "timeoutType", + ) + _fix_history_enum( + "WORKFLOW_ID_REUSE_POLICY", + event, + "startChildWorkflowExecutionInitiatedEventAttributes", + "workflowIdReusePolicy", + ) + _fix_history_enum( + "WORKFLOW_TASK_FAILED_CAUSE", + event, + "workflowTaskFailedEventAttributes", + "cause", + ) + _fix_history_failure(event, "*", "failure") + _fix_history_failure(event, "activityTaskStartedEventAttributes", "lastFailure") + _fix_history_failure( + event, "workflowExecutionStartedEventAttributes", "continuedFailure" + ) + return google.protobuf.json_format.ParseDict( + history, temporalio.api.history.v1.History(), ignore_unknown_fields=True + ) + + +def _fix_history_failure(parent: dict[str, Any], *attrs: str) -> None: + _fix_history_enum( + "TIMEOUT_TYPE", parent, *attrs, "timeoutFailureInfo", "timeoutType" + ) + _fix_history_enum("RETRY_STATE", parent, *attrs, "*", "retryState") + # Recurse into causes. First collect all failure parents. + parents = [parent] + for attr in attrs: + new_parents = [] + for parent in parents: + if attr == "*": + for v in parent.values(): + if isinstance(v, dict): + new_parents.append(v) + else: + child = parent.get(attr) + if isinstance(child, dict): + new_parents.append(child) + if not new_parents: + return + parents = new_parents + # Fix each + for parent in parents: + _fix_history_failure(parent, "cause") + + +_pascal_case_match = re.compile("([A-Z]+)") + + +def _fix_history_enum(prefix: str, parent: dict[str, Any], *attrs: str) -> None: + # If the attr is "*", we need to handle all dict children + if attrs[0] == "*": + for child in parent.values(): + if isinstance(child, dict): + _fix_history_enum(prefix, child, *attrs[1:]) + else: + child = parent.get(attrs[0]) + if isinstance(child, str) and len(attrs) == 1: + # We only fix it if it doesn't already have the prefix + if not parent[attrs[0]].startswith(prefix): + parent[attrs[0]] = ( + prefix + _pascal_case_match.sub(r"_\1", child).upper() + ) + elif isinstance(child, dict) and len(attrs) > 1: + _fix_history_enum(prefix, child, *attrs[1:]) + elif isinstance(child, list) and len(attrs) > 1: + for child_item in child: + if isinstance(child_item, dict): + _fix_history_enum(prefix, child_item, *attrs[1:]) + + +async def _encode_user_metadata( # pyright: ignore[reportUnusedFunction] + converter: temporalio.converter.DataConverter, + summary: str | temporalio.api.common.v1.Payload | None, + details: str | temporalio.api.common.v1.Payload | None, +) -> temporalio.api.sdk.v1.UserMetadata | None: + if summary is None and details is None: + return None + enc_summary = None + enc_details = None + if summary is not None: + if isinstance(summary, str): + enc_summary = (await converter.encode([summary]))[0] + else: + enc_summary = summary + if details is not None: + if isinstance(details, str): + enc_details = (await converter.encode([details]))[0] + else: + enc_details = details + return temporalio.api.sdk.v1.UserMetadata(summary=enc_summary, details=enc_details) + + +async def _decode_user_metadata( # pyright: ignore[reportUnusedFunction] + converter: temporalio.converter.DataConverter, + metadata: temporalio.api.sdk.v1.UserMetadata | None, +) -> tuple[str | None, str | None]: + """Returns (summary, details)""" + if metadata is None: + return None, None + return ( + None + if not metadata.HasField("summary") + else (await converter.decode([metadata.summary]))[0], + None + if not metadata.HasField("details") + else (await converter.decode([metadata.details]))[0], + ) diff --git a/temporalio/client/_impl.py b/temporalio/client/_impl.py new file mode 100644 index 0000000000..e6424c15eb --- /dev/null +++ b/temporalio/client/_impl.py @@ -0,0 +1,1824 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +import asyncio +import inspect +import uuid +import warnings +from collections.abc import ( + Callable, + Mapping, +) +from datetime import timedelta +from functools import cached_property +from typing import ( + TYPE_CHECKING, + Any, + cast, +) + +from google.protobuf.internal.containers import MessageMap + +import temporalio.api.common.v1 +import temporalio.api.enums.v1 +import temporalio.api.errordetails.v1 +import temporalio.api.failure.v1 +import temporalio.api.schedule.v1 +import temporalio.api.taskqueue.v1 +import temporalio.api.update.v1 +import temporalio.api.workflowservice.v1 +import temporalio.common +import temporalio.converter +import temporalio.converter._serialization_context +import temporalio.exceptions +import temporalio.nexus +import temporalio.nexus._operation_context +from temporalio.activity import ActivityCancellationDetails +from temporalio.converter import ( + ActivitySerializationContext, + StorageDriverActivityInfo, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, + WorkflowSerializationContext, +) +from temporalio.service import ( + RPCError, + RPCStatusCode, +) + +from ..common import HeaderCodecBehavior +from ._activity import ( + ActivityExecutionAsyncIterator, + ActivityExecutionCount, + ActivityExecutionDescription, + ActivityExecutionOptions, + ActivityHandle, + AsyncActivityIDReference, +) +from ._exceptions import ( + AsyncActivityCancelledError, + ScheduleAlreadyRunningError, + WorkflowQueryFailedError, + WorkflowQueryRejectedError, + WorkflowUpdateRPCTimeoutOrCancelledError, +) +from ._helpers import _apply_headers, _encode_user_metadata +from ._interceptor import ( + BackfillScheduleInput, + CancelActivityInput, + CancelNexusOperationInput, + CancelWorkflowInput, + CompleteAsyncActivityInput, + CountActivitiesInput, + CountNexusOperationsInput, + CountWorkflowsInput, + CreateScheduleInput, + DeleteScheduleInput, + DescribeActivityInput, + DescribeNexusOperationInput, + DescribeScheduleInput, + DescribeWorkflowInput, + FailAsyncActivityInput, + FetchWorkflowHistoryEventsInput, + GetNexusOperationResultInput, + GetWorkerBuildIdCompatibilityInput, + GetWorkerTaskReachabilityInput, + HeartbeatAsyncActivityInput, + ListActivitiesInput, + ListNexusOperationsInput, + ListSchedulesInput, + ListWorkflowsInput, + OutboundInterceptor, + PauseActivityInput, + PauseScheduleInput, + QueryWorkflowInput, + ReportCancellationAsyncActivityInput, + SignalWorkflowInput, + StartActivityInput, + StartNexusOperationInput, + StartWorkflowInput, + StartWorkflowUpdateInput, + StartWorkflowUpdateWithStartInput, + TerminateActivityInput, + TerminateNexusOperationInput, + TerminateWorkflowInput, + TriggerScheduleInput, + UnpauseActivityInput, + UnpauseScheduleInput, + UpdateActivityOptionsInput, + UpdateScheduleInput, + UpdateWithStartStartWorkflowInput, + UpdateWithStartUpdateWorkflowInput, + UpdateWorkerBuildIdCompatibilityInput, +) +from ._nexus import ( + NexusOperationExecutionAsyncIterator, + NexusOperationExecutionCount, + NexusOperationExecutionDescription, + NexusOperationFailureError, + NexusOperationHandle, +) +from ._schedule import ( + ScheduleAsyncIterator, + ScheduleDescription, + ScheduleHandle, + ScheduleUpdate, + ScheduleUpdateInput, +) +from ._worker_versioning import WorkerBuildIdVersionSets, WorkerTaskReachability +from ._workflow import ( + WorkflowExecutionAsyncIterator, + WorkflowExecutionCount, + WorkflowExecutionDescription, + WorkflowExecutionStatus, + WorkflowHandle, + WorkflowHistoryEventAsyncIterator, + WorkflowUpdateHandle, + WorkflowUpdateStage, +) + +if TYPE_CHECKING: + from ._client import Client + + +class _ClientImpl(OutboundInterceptor): # pyright: ignore[reportUnusedClass] + def __init__(self, client: Client) -> None: # type: ignore + # We are intentionally not calling the base class's __init__ here + self._client = client + + @cached_property + def _targetless_data_converter(self) -> temporalio.converter.DataConverter: + return self._client.data_converter._with_store_context( + StorageDriverStoreContext(namespace=self._client.namespace) + ) + + ### Workflow calls + + async def start_workflow( + self, input: StartWorkflowInput + ) -> WorkflowHandle[Any, Any]: + req: ( + temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest + | temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest + ) + if input.start_signal is not None: + req = await self._build_signal_with_start_workflow_execution_request(input) + else: + req = await self._build_start_workflow_execution_request(input) + + resp: ( + temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse + | temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse + ) + first_execution_run_id = None + eagerly_started = False + try: + if isinstance( + req, + temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest, + ): + with temporalio.nexus._operation_context._signal_request_nexus_context( + req + ): + resp = await self._client.workflow_service.signal_with_start_workflow_execution( + req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + first_execution_run_id = resp.first_execution_run_id or ( + resp.run_id if resp.started else None + ) + else: + resp = await self._client.workflow_service.start_workflow_execution( + req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + first_execution_run_id = resp.first_execution_run_id or resp.run_id + eagerly_started = resp.HasField("eager_workflow_task") + except RPCError as err: + # If the status is ALREADY_EXISTS and the details can be extracted + # as already started, use a different exception + if err.status == RPCStatusCode.ALREADY_EXISTS and err.grpc_status.details: + details = temporalio.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure() + if err.grpc_status.details[0].Unpack(details): + raise temporalio.exceptions.WorkflowAlreadyStartedError( + input.id, + input.workflow, + run_id=details.run_id, + first_run_id=details.first_execution_run_id or None, + ) + raise + handle: WorkflowHandle[Any, Any] = WorkflowHandle( + self._client, + req.workflow_id, + result_run_id=resp.run_id, + first_execution_run_id=first_execution_run_id, + result_type=input.ret_type, + start_workflow_response=resp, + ) + setattr(handle, "__temporal_eagerly_started", eagerly_started) + temporalio.nexus._operation_context._apply_start_workflow_response_to_nexus_context( + handle + ) + return handle + + async def _build_start_workflow_execution_request( + self, input: StartWorkflowInput + ) -> temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest: + req = temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest() + await self._populate_start_workflow_execution_request(req, input) + # _populate_start_workflow_execution_request is used for both StartWorkflowInput + # and UpdateWithStartStartWorkflowInput. UpdateWithStartStartWorkflowInput does + # not have the following two fields so they are handled here. + req.request_eager_execution = input.request_eager_start + + temporalio.nexus._operation_context._apply_nexus_context_to_start_workflow_request( + req + ) + + return req + + async def _build_signal_with_start_workflow_execution_request( + self, input: StartWorkflowInput + ) -> temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest: + assert input.start_signal + data_converter = self._client.data_converter._with_contexts( + WorkflowSerializationContext( + namespace=self._client.namespace, + workflow_id=input.id, + ), + StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverWorkflowInfo( + id=input.id, type=input.workflow, namespace=self._client.namespace + ), + ), + ) + req = temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest( + signal_name=input.start_signal + ) + if input.start_signal_args: + req.signal_input.payloads.extend( + await data_converter.encode(input.start_signal_args) + ) + await self._populate_start_workflow_execution_request(req, input) + return req + + async def _build_update_with_start_start_workflow_execution_request( + self, input: UpdateWithStartStartWorkflowInput + ) -> temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest: + req = temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest() + await self._populate_start_workflow_execution_request(req, input) + temporalio.nexus._operation_context._apply_nexus_serialization_context_to_start_workflow_request( + req + ) + return req + + async def _populate_start_workflow_execution_request( + self, + req: ( + temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest + | temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest + ), + input: StartWorkflowInput | UpdateWithStartStartWorkflowInput, + ) -> None: + data_converter = self._client.data_converter._with_contexts( + WorkflowSerializationContext( + namespace=self._client.namespace, + workflow_id=input.id, + ), + StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverWorkflowInfo( + id=input.id, type=input.workflow, namespace=self._client.namespace + ), + ), + ) + req.namespace = self._client.namespace + req.workflow_id = input.id + req.workflow_type.name = input.workflow + req.task_queue.name = input.task_queue + if input.args: + req.input.payloads.extend(await data_converter.encode(input.args)) + if input.execution_timeout is not None: + req.workflow_execution_timeout.FromTimedelta(input.execution_timeout) + if input.run_timeout is not None: + req.workflow_run_timeout.FromTimedelta(input.run_timeout) + if input.task_timeout is not None: + req.workflow_task_timeout.FromTimedelta(input.task_timeout) + req.identity = self._client.identity + req.request_id = str(uuid.uuid4()) + req.workflow_id_reuse_policy = cast( + "temporalio.api.enums.v1.WorkflowIdReusePolicy.ValueType", + int(input.id_reuse_policy), + ) + req.workflow_id_conflict_policy = cast( + "temporalio.api.enums.v1.WorkflowIdConflictPolicy.ValueType", + int(input.id_conflict_policy), + ) + + if input.retry_policy is not None: + input.retry_policy.apply_to_proto(req.retry_policy) + req.cron_schedule = input.cron_schedule + if input.memo is not None: + await data_converter._encode_memo_existing(input.memo, req.memo) + if input.search_attributes is not None: + temporalio.converter.encode_search_attributes( + input.search_attributes, req.search_attributes + ) + metadata = await _encode_user_metadata( + data_converter, input.static_summary, input.static_details + ) + if metadata is not None: + req.user_metadata.CopyFrom(metadata) + if input.start_delay is not None: + req.workflow_start_delay.FromTimedelta(input.start_delay) + if input.headers is not None: # type:ignore[reportUnnecessaryComparison] + await self._apply_headers(input.headers, req.header.fields) + if input.priority is not None: # type:ignore[reportUnnecessaryComparison] + req.priority.CopyFrom(input.priority._to_proto()) + if input.versioning_override is not None: + req.versioning_override.CopyFrom(input.versioning_override._to_proto()) + if input.time_skipping_config is not None: + req.time_skipping_config.CopyFrom(input.time_skipping_config) + + async def cancel_workflow(self, input: CancelWorkflowInput) -> None: + await self._client.workflow_service.request_cancel_workflow_execution( + temporalio.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest( + namespace=self._client.namespace, + workflow_execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=input.id, + run_id=input.run_id or "", + ), + identity=self._client.identity, + request_id=str(uuid.uuid4()), + first_execution_run_id=input.first_execution_run_id or "", + reason=input.reason, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def describe_workflow( + self, input: DescribeWorkflowInput + ) -> WorkflowExecutionDescription: + return await WorkflowExecutionDescription._from_raw_description( + await self._client.workflow_service.describe_workflow_execution( + temporalio.api.workflowservice.v1.DescribeWorkflowExecutionRequest( + namespace=self._client.namespace, + execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=input.id, + run_id=input.run_id or "", + ), + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ), + namespace=self._client.namespace, + converter=self._client.data_converter.with_context( + WorkflowSerializationContext( + namespace=self._client.namespace, + workflow_id=input.id, + ) + ), + ) + + def fetch_workflow_history_events( + self, input: FetchWorkflowHistoryEventsInput + ) -> WorkflowHistoryEventAsyncIterator: + return WorkflowHistoryEventAsyncIterator(self._client, input) + + def list_workflows( + self, input: ListWorkflowsInput + ) -> WorkflowExecutionAsyncIterator: + return WorkflowExecutionAsyncIterator(self._client, input) + + async def count_workflows( + self, input: CountWorkflowsInput + ) -> WorkflowExecutionCount: + return WorkflowExecutionCount._from_raw( + await self._client.workflow_service.count_workflow_executions( + temporalio.api.workflowservice.v1.CountWorkflowExecutionsRequest( + namespace=self._client.namespace, + query=input.query or "", + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + ) + + async def query_workflow(self, input: QueryWorkflowInput) -> Any: + data_converter = self._client.data_converter._with_contexts( + WorkflowSerializationContext( + namespace=self._client.namespace, + workflow_id=input.id, + ), + StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverWorkflowInfo( + id=input.id, + run_id=input.run_id or None, + namespace=self._client.namespace, + ), + ), + ) + req = temporalio.api.workflowservice.v1.QueryWorkflowRequest( + namespace=self._client.namespace, + execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=input.id, + run_id=input.run_id or "", + ), + ) + if input.reject_condition: + req.query_reject_condition = cast( + "temporalio.api.enums.v1.QueryRejectCondition.ValueType", + int(input.reject_condition), + ) + req.query.query_type = input.query + if input.args: + req.query.query_args.payloads.extend( + await data_converter.encode(input.args) + ) + if input.headers is not None: # type:ignore[reportUnnecessaryComparison] + await self._apply_headers(input.headers, req.query.header.fields) + try: + resp = await self._client.workflow_service.query_workflow( + req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + except RPCError as err: + # If the status is INVALID_ARGUMENT, we can assume it's a query + # failed error + if err.status == RPCStatusCode.INVALID_ARGUMENT: + raise WorkflowQueryFailedError(err.message) + else: + raise + temporalio.nexus._operation_context._apply_query_workflow_response_to_nexus_context( + resp + ) + if resp.HasField("query_rejected"): + raise WorkflowQueryRejectedError( + WorkflowExecutionStatus(resp.query_rejected.status) + if resp.query_rejected.status + else None + ) + if not resp.query_result.payloads: + return None + type_hints = [input.ret_type] if input.ret_type else None + results = await data_converter.decode(resp.query_result.payloads, type_hints) + if not results: + return None + elif len(results) > 1: + warnings.warn(f"Expected single query result, got {len(results)}") + return results[0] + + async def signal_workflow(self, input: SignalWorkflowInput) -> None: + data_converter = self._client.data_converter._with_contexts( + WorkflowSerializationContext( + namespace=self._client.namespace, + workflow_id=input.id, + ), + StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverWorkflowInfo( + id=input.id, + run_id=input.run_id or None, + namespace=self._client.namespace, + ), + ), + ) + req = temporalio.api.workflowservice.v1.SignalWorkflowExecutionRequest( + namespace=self._client.namespace, + workflow_execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=input.id, + run_id=input.run_id or "", + ), + signal_name=input.signal, + identity=self._client.identity, + request_id=str(uuid.uuid4()), + ) + if input.args: + req.input.payloads.extend(await data_converter.encode(input.args)) + if input.headers is not None: # type:ignore[reportUnnecessaryComparison] + await self._apply_headers(input.headers, req.header.fields) + with temporalio.nexus._operation_context._signal_request_nexus_context(req): + resp = await self._client.workflow_service.signal_workflow_execution( + req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout + ) + temporalio.nexus._operation_context._apply_signal_workflow_response_to_nexus_context( + resp + ) + + async def terminate_workflow(self, input: TerminateWorkflowInput) -> None: + data_converter = self._client.data_converter._with_contexts( + WorkflowSerializationContext( + namespace=self._client.namespace, + workflow_id=input.id, + ), + StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverWorkflowInfo( + id=input.id, + run_id=input.run_id or None, + namespace=self._client.namespace, + ), + ), + ) + req = temporalio.api.workflowservice.v1.TerminateWorkflowExecutionRequest( + namespace=self._client.namespace, + workflow_execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=input.id, + run_id=input.run_id or "", + ), + reason=input.reason or "", + identity=self._client.identity, + first_execution_run_id=input.first_execution_run_id or "", + ) + if input.args: + req.details.payloads.extend(await data_converter.encode(input.args)) + await self._client.workflow_service.terminate_workflow_execution( + req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout + ) + + async def start_activity(self, input: StartActivityInput) -> ActivityHandle[Any]: + """Start an activity and return a handle to it.""" + if not (input.start_to_close_timeout or input.schedule_to_close_timeout): + raise ValueError( + "Activity must have start_to_close_timeout or schedule_to_close_timeout" + ) + if input.start_delay is not None and input.start_delay < timedelta(0): + raise ValueError("start_delay must be non-negative") + req = await self._build_start_activity_execution_request(input) + + resp: temporalio.api.workflowservice.v1.StartActivityExecutionResponse + try: + resp = await self._client.workflow_service.start_activity_execution( + req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + except RPCError as err: + # If the status is ALREADY_EXISTS and the details can be extracted + # as already started, use a different exception + if err.status == RPCStatusCode.ALREADY_EXISTS and err.grpc_status.details: + details = temporalio.api.errordetails.v1.ActivityExecutionAlreadyStartedFailure() + if err.grpc_status.details[0].Unpack(details): + raise temporalio.exceptions.ActivityAlreadyStartedError( + input.id, input.activity_type, run_id=details.run_id + ) + raise + + # Apply StartActivity response elements to the current Nexus context. + # No-ops if called outside a Nexus context. + temporalio.nexus._operation_context._apply_start_activity_response_to_nexus_context( + input.id, resp + ) + + return ActivityHandle( + self._client, + input.id, + run_id=resp.run_id, + result_type=input.result_type, + ) + + async def _build_start_activity_execution_request( + self, input: StartActivityInput + ) -> temporalio.api.workflowservice.v1.StartActivityExecutionRequest: + """Build StartActivityExecutionRequest from input.""" + data_converter = self._client.data_converter._with_contexts( + ActivitySerializationContext( + namespace=self._client.namespace, + activity_id=input.id, + activity_type=input.activity_type, + activity_task_queue=input.task_queue, + is_local=False, + workflow_id=None, + workflow_type=None, + ), + StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverActivityInfo( + id=input.id, + type=input.activity_type, + namespace=self._client.namespace, + ), + ), + ) + + req = temporalio.api.workflowservice.v1.StartActivityExecutionRequest( + namespace=self._client.namespace, + identity=self._client.identity, + request_id=str(uuid.uuid4()), + activity_id=input.id, + activity_type=temporalio.api.common.v1.ActivityType( + name=input.activity_type + ), + task_queue=temporalio.api.taskqueue.v1.TaskQueue(name=input.task_queue), + id_reuse_policy=cast( + "temporalio.api.enums.v1.ActivityIdReusePolicy.ValueType", + int(input.id_reuse_policy), + ), + id_conflict_policy=cast( + "temporalio.api.enums.v1.ActivityIdConflictPolicy.ValueType", + int(input.id_conflict_policy), + ), + ) + + if input.schedule_to_close_timeout is not None: + req.schedule_to_close_timeout.FromTimedelta(input.schedule_to_close_timeout) + if input.start_to_close_timeout is not None: + req.start_to_close_timeout.FromTimedelta(input.start_to_close_timeout) + if input.schedule_to_start_timeout is not None: + req.schedule_to_start_timeout.FromTimedelta(input.schedule_to_start_timeout) + if input.heartbeat_timeout is not None: + req.heartbeat_timeout.FromTimedelta(input.heartbeat_timeout) + if input.start_delay is not None: + req.start_delay.FromTimedelta(input.start_delay) + if input.retry_policy is not None: + input.retry_policy.apply_to_proto(req.retry_policy) + + # Set input payloads + if input.args: + req.input.payloads.extend(await data_converter.encode(input.args)) + + # Set search attributes + if input.search_attributes is not None: + temporalio.converter.encode_search_attributes( + input.search_attributes, req.search_attributes + ) + + # Set user metadata + metadata = await _encode_user_metadata(data_converter, input.summary, None) + if metadata is not None: + req.user_metadata.CopyFrom(metadata) + + # Set headers + if input.headers: + await self._apply_headers(input.headers, req.header.fields) + + # Set priority + req.priority.CopyFrom(input.priority._to_proto()) + + # Nexus starts use the inbound request ID so retries across the Nexus + # boundary resolve to the same activity execution. + temporalio.nexus._operation_context._apply_nexus_context_to_start_activity_request( + req + ) + + return req + + async def cancel_activity(self, input: CancelActivityInput) -> None: + """Cancel an activity.""" + await self._client.workflow_service.request_cancel_activity_execution( + temporalio.api.workflowservice.v1.RequestCancelActivityExecutionRequest( + namespace=self._client.namespace, + activity_id=input.activity_id, + run_id=input.activity_run_id or "", + identity=self._client.identity, + request_id=str(uuid.uuid4()), + reason=input.reason or "", + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def terminate_activity(self, input: TerminateActivityInput) -> None: + """Terminate an activity.""" + await self._client.workflow_service.terminate_activity_execution( + temporalio.api.workflowservice.v1.TerminateActivityExecutionRequest( + namespace=self._client.namespace, + activity_id=input.activity_id, + run_id=input.activity_run_id or "", + reason=input.reason or "", + identity=self._client.identity, + request_id=str(uuid.uuid4()), + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def pause_activity(self, input: PauseActivityInput) -> None: + """Pause an activity.""" + await self._client.workflow_service.pause_activity_execution( + temporalio.api.workflowservice.v1.PauseActivityExecutionRequest( + namespace=self._client.namespace, + activity_id=input.activity_id, + run_id=input.activity_run_id or "", + identity=self._client.identity, + request_id=str(uuid.uuid4()), + reason=input.reason or "", + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def unpause_activity(self, input: UnpauseActivityInput) -> None: + """Unpause an activity.""" + req = temporalio.api.workflowservice.v1.UnpauseActivityExecutionRequest( + namespace=self._client.namespace, + activity_id=input.activity_id, + run_id=input.activity_run_id or "", + identity=self._client.identity, + request_id=str(uuid.uuid4()), + reason=input.reason or "", + ) + if input.jitter is not None: + req.jitter.FromTimedelta(input.jitter) + await self._client.workflow_service.unpause_activity_execution( + req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def update_activity_options( + self, input: UpdateActivityOptionsInput + ) -> ActivityExecutionOptions: + """Update or restore an activity's options.""" + # restore_original is exclusive to all other updates. + if input.restore_original and input.updates: + raise ValueError( + "restore_original cannot be combined with individual option updates" + ) + req = temporalio.api.workflowservice.v1.UpdateActivityExecutionOptionsRequest( + namespace=self._client.namespace, + activity_id=input.activity_id, + run_id=input.activity_run_id or "", + identity=self._client.identity, + request_id=str(uuid.uuid4()), + ) + if input.restore_original: + req.restore_original = True + else: + # The handle rejects a repeated option, but an interceptor could still add one. + seen: set[str] = set() + for update in input.updates: + name = update.key.name + if name in seen: + raise ValueError( + f"update_activity_options received more than one update for {name}" + ) + seen.add(name) + req.update_mask.paths.append(name) + if update.value is None: + continue + if name == "task_queue.name": + req.activity_options.task_queue.name = update.value + elif name == "retry_policy": + update.value.apply_to_proto(req.activity_options.retry_policy) + elif name == "priority": + req.activity_options.priority.CopyFrom(update.value._to_proto()) + elif name in ( + "schedule_to_close_timeout", + "schedule_to_start_timeout", + "start_to_close_timeout", + "heartbeat_timeout", + "start_delay", + ): + getattr(req.activity_options, name).FromTimedelta(update.value) + else: + # Reached only if a key is added without a conversion for it here. + raise ValueError(f"No conversion for activity option {name!r}") + + resp = await self._client.workflow_service.update_activity_execution_options( + req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + return ActivityExecutionOptions._from_proto(resp.activity_options) + + async def describe_activity( + self, input: DescribeActivityInput + ) -> ActivityExecutionDescription: + """Describe an activity.""" + resp = await self._client.workflow_service.describe_activity_execution( + temporalio.api.workflowservice.v1.DescribeActivityExecutionRequest( + namespace=self._client.namespace, + activity_id=input.activity_id, + run_id=input.activity_run_id or "", + include_input=input.include_input, + include_outcome=input.include_outcome, + include_heartbeat_details=input.include_heartbeat_details, + include_last_failure=input.include_last_failure, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + return ActivityExecutionDescription._from_resp( + resp=resp, + namespace=self._client.namespace, + data_converter=self._client.data_converter.with_context( + ActivitySerializationContext( + namespace=self._client.namespace, + activity_id=resp.info.activity_id, + activity_task_queue=resp.info.task_queue, + activity_type=resp.info.activity_type.name, + workflow_id=None, + workflow_type=None, + is_local=False, + ) + ), + ) + + def list_activities( + self, input: ListActivitiesInput + ) -> ActivityExecutionAsyncIterator: + return ActivityExecutionAsyncIterator(self._client, input) + + async def count_activities( + self, input: CountActivitiesInput + ) -> ActivityExecutionCount: + return ActivityExecutionCount._from_raw( + await self._client.workflow_service.count_activity_executions( + temporalio.api.workflowservice.v1.CountActivityExecutionsRequest( + namespace=self._client.namespace, + query=input.query or "", + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + ) + + async def start_workflow_update( + self, input: StartWorkflowUpdateInput + ) -> WorkflowUpdateHandle[Any]: + workflow_id = input.id + req = await self._build_update_workflow_execution_request(input, workflow_id) + + # Repeatedly try to invoke UpdateWorkflowExecution until the update is durable. + resp: temporalio.api.workflowservice.v1.UpdateWorkflowExecutionResponse + while True: + try: + resp = await self._client.workflow_service.update_workflow_execution( + req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + except RPCError as err: + if ( + err.status == RPCStatusCode.DEADLINE_EXCEEDED + or err.status == RPCStatusCode.CANCELLED + ): + raise WorkflowUpdateRPCTimeoutOrCancelledError() from err + else: + raise + except asyncio.CancelledError as err: + raise WorkflowUpdateRPCTimeoutOrCancelledError() from err + if ( + resp.stage + >= temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED + ): + break + + temporalio.nexus._operation_context._apply_start_workflow_update_response_to_nexus_context( + resp + ) + + # Build the handle. If the user's wait stage is COMPLETED, make sure we + # poll for result. + handle: WorkflowUpdateHandle[Any] = WorkflowUpdateHandle( + client=self._client, + id=req.request.meta.update_id, + workflow_id=workflow_id, + workflow_run_id=resp.update_ref.workflow_execution.run_id, + result_type=input.ret_type, + ) + if resp.HasField("outcome"): + handle._set_known_outcome(resp) + if input.wait_for_stage == WorkflowUpdateStage.COMPLETED: + await handle._poll_until_outcome() + return handle + + async def _build_update_workflow_execution_request( + self, + input: StartWorkflowUpdateInput | UpdateWithStartUpdateWorkflowInput, + workflow_id: str, + ) -> temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest: + data_converter = self._client.data_converter._with_contexts( + WorkflowSerializationContext( + namespace=self._client.namespace, + workflow_id=workflow_id, + ), + StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverWorkflowInfo( + id=workflow_id, + run_id=(input.run_id or None) + if isinstance(input, StartWorkflowUpdateInput) + else None, + namespace=self._client.namespace, + ), + ), + ) + run_id, first_execution_run_id = ( + ( + input.run_id, + input.first_execution_run_id, + ) + if isinstance(input, StartWorkflowUpdateInput) + else (None, None) + ) + req = temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest( + namespace=self._client.namespace, + workflow_execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=workflow_id, + run_id=run_id or "", + ), + first_execution_run_id=first_execution_run_id or "", + request=temporalio.api.update.v1.Request( + meta=temporalio.api.update.v1.Meta( + update_id=input.update_id or str(uuid.uuid4()), + identity=self._client.identity, + ), + input=temporalio.api.update.v1.Input( + name=input.update, + ), + ), + wait_policy=temporalio.api.update.v1.WaitPolicy( + lifecycle_stage=temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.ValueType( + input.wait_for_stage + ) + ), + ) + if isinstance(input, StartWorkflowUpdateInput): + temporalio.nexus._operation_context._apply_nexus_context_to_start_workflow_update_request( + req + ) + else: + temporalio.nexus._operation_context._apply_nexus_serialization_context_to_workflow_update_request( + req + ) + if input.args: + req.request.input.args.payloads.extend( + await data_converter.encode(input.args) + ) + if input.headers is not None: # type:ignore[reportUnnecessaryComparison] + await self._apply_headers(input.headers, req.request.input.header.fields) + return req + + async def start_update_with_start_workflow( + self, input: StartWorkflowUpdateWithStartInput + ) -> WorkflowUpdateHandle[Any]: + seen_start = False + + def on_start( + start_response: temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse, + ): + nonlocal seen_start + if not seen_start: + input._on_start(start_response) + seen_start = True + + err: BaseException | None = None + + try: + return await self._start_workflow_update_with_start( + input.start_workflow_input, + input.update_workflow_input, + input.rpc_metadata, + input.rpc_timeout, + on_start, + ) + except asyncio.CancelledError as _err: + err = _err + raise WorkflowUpdateRPCTimeoutOrCancelledError() from err + except RPCError as _err: + err = _err + if err.status in [ + RPCStatusCode.DEADLINE_EXCEEDED, + RPCStatusCode.CANCELLED, + ]: + raise WorkflowUpdateRPCTimeoutOrCancelledError() from err + else: + multiop_failure = ( + temporalio.api.errordetails.v1.MultiOperationExecutionFailure() + ) + if err.grpc_status.details and err.grpc_status.details[0].Unpack( + multiop_failure + ): + status = next( + ( + st + for st in multiop_failure.statuses + if ( + st.code != RPCStatusCode.OK + and not ( + st.details + and st.details[0].Is( + temporalio.api.failure.v1.MultiOperationExecutionAborted.DESCRIPTOR + ) + ) + ) + ), + None, + ) + if status and status.code in list(RPCStatusCode): + if ( + status.code == RPCStatusCode.ALREADY_EXISTS + and status.details + ): + details = temporalio.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure() + if status.details[0].Unpack(details): + err = temporalio.exceptions.WorkflowAlreadyStartedError( + input.start_workflow_input.id, + input.start_workflow_input.workflow, + run_id=details.run_id, + first_run_id=( + details.first_execution_run_id or None + ), + ) + else: + err = RPCError( + status.message, + RPCStatusCode(status.code), + err.raw_grpc_status, + ) + raise err + finally: + if err and not seen_start: + input._on_start_error(err) + + async def _start_workflow_update_with_start( + self, + start_input: UpdateWithStartStartWorkflowInput, + update_input: UpdateWithStartUpdateWorkflowInput, + rpc_metadata: Mapping[str, str | bytes], + rpc_timeout: timedelta | None, + on_start: Callable[ + [temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse], None + ], + ) -> WorkflowUpdateHandle[Any]: + start_req = ( + await self._build_update_with_start_start_workflow_execution_request( + start_input + ) + ) + update_req = await self._build_update_workflow_execution_request( + update_input, workflow_id=start_input.id + ) + multiop_req = temporalio.api.workflowservice.v1.ExecuteMultiOperationRequest( + namespace=self._client.namespace, + operations=[ + temporalio.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation( + start_workflow=start_req + ), + temporalio.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation( + update_workflow=update_req + ), + ], + ) + + # Repeatedly try to invoke ExecuteMultiOperation until the update is durable + while True: + multiop_response = ( + await self._client.workflow_service.execute_multi_operation( + multiop_req, + retry=True, + metadata=rpc_metadata, + timeout=rpc_timeout, + ) + ) + start_response = multiop_response.responses[0].start_workflow + update_response = multiop_response.responses[1].update_workflow + on_start(start_response) + if ( + update_response.stage + >= temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED + ): + break + + handle: WorkflowUpdateHandle[Any] = WorkflowUpdateHandle( + client=self._client, + id=update_req.request.meta.update_id, + workflow_id=start_input.id, + workflow_run_id=start_response.run_id, + result_type=update_input.ret_type, + ) + if update_response.HasField("outcome"): + handle._set_known_outcome(update_response) + if update_input.wait_for_stage == WorkflowUpdateStage.COMPLETED: + await handle._poll_until_outcome() + + return handle + + ### Async activity calls + + def _get_async_activity_store_context( + self, id_or_token: AsyncActivityIDReference | bytes + ) -> StorageDriverStoreContext: + if isinstance(id_or_token, AsyncActivityIDReference): + if id_or_token.workflow_id: + return StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverWorkflowInfo( + id=id_or_token.workflow_id or None, + run_id=id_or_token.run_id or None, + namespace=self._client.namespace, + ), + ) + return StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverActivityInfo( + id=id_or_token.activity_id, + run_id=id_or_token.run_id or None, + namespace=self._client.namespace, + ), + ) + else: + return StorageDriverStoreContext(namespace=self._client.namespace) + + async def heartbeat_async_activity( + self, input: HeartbeatAsyncActivityInput + ) -> None: + data_converter = ( + input.data_converter_override or self._client.data_converter + )._with_store_context(self._get_async_activity_store_context(input.id_or_token)) + details = ( + None + if not input.details + else await data_converter.encode_wrapper(input.details) + ) + if isinstance(input.id_or_token, AsyncActivityIDReference): + resp_by_id = await self._client.workflow_service.record_activity_task_heartbeat_by_id( + temporalio.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdRequest( + workflow_id=input.id_or_token.workflow_id or "", + run_id=input.id_or_token.run_id or "", + activity_id=input.id_or_token.activity_id, + namespace=self._client.namespace, + identity=self._client.identity, + details=details, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + if ( + resp_by_id.cancel_requested + or resp_by_id.activity_paused + or resp_by_id.activity_reset + ): + raise AsyncActivityCancelledError( + details=ActivityCancellationDetails( + cancel_requested=resp_by_id.cancel_requested, + paused=resp_by_id.activity_paused, + reset=resp_by_id.activity_reset, + ) + ) + + else: + resp = await self._client.workflow_service.record_activity_task_heartbeat( + temporalio.api.workflowservice.v1.RecordActivityTaskHeartbeatRequest( + task_token=input.id_or_token, + namespace=self._client.namespace, + identity=self._client.identity, + details=details, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + if resp.cancel_requested or resp.activity_paused or resp.activity_reset: + raise AsyncActivityCancelledError( + details=ActivityCancellationDetails( + cancel_requested=resp.cancel_requested, + paused=resp.activity_paused, + reset=resp.activity_reset, + ) + ) + + async def complete_async_activity(self, input: CompleteAsyncActivityInput) -> None: + data_converter = ( + input.data_converter_override or self._client.data_converter + )._with_store_context(self._get_async_activity_store_context(input.id_or_token)) + result = ( + None + if input.result is temporalio.common._arg_unset + else await data_converter.encode_wrapper([input.result]) + ) + if isinstance(input.id_or_token, AsyncActivityIDReference): + await self._client.workflow_service.respond_activity_task_completed_by_id( + temporalio.api.workflowservice.v1.RespondActivityTaskCompletedByIdRequest( + workflow_id=input.id_or_token.workflow_id or "", + run_id=input.id_or_token.run_id or "", + activity_id=input.id_or_token.activity_id, + namespace=self._client.namespace, + identity=self._client.identity, + result=result, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + else: + await self._client.workflow_service.respond_activity_task_completed( + temporalio.api.workflowservice.v1.RespondActivityTaskCompletedRequest( + task_token=input.id_or_token, + namespace=self._client.namespace, + identity=self._client.identity, + result=result, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def fail_async_activity(self, input: FailAsyncActivityInput) -> None: + data_converter = ( + input.data_converter_override or self._client.data_converter + )._with_store_context(self._get_async_activity_store_context(input.id_or_token)) + + failure = temporalio.api.failure.v1.Failure() + await data_converter.encode_failure(input.error, failure) + last_heartbeat_details = ( + await data_converter.encode_wrapper(input.last_heartbeat_details) + if input.last_heartbeat_details + else None + ) + if isinstance(input.id_or_token, AsyncActivityIDReference): + await self._client.workflow_service.respond_activity_task_failed_by_id( + temporalio.api.workflowservice.v1.RespondActivityTaskFailedByIdRequest( + workflow_id=input.id_or_token.workflow_id or "", + run_id=input.id_or_token.run_id or "", + activity_id=input.id_or_token.activity_id, + namespace=self._client.namespace, + identity=self._client.identity, + failure=failure, + last_heartbeat_details=last_heartbeat_details, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + else: + await self._client.workflow_service.respond_activity_task_failed( + temporalio.api.workflowservice.v1.RespondActivityTaskFailedRequest( + task_token=input.id_or_token, + namespace=self._client.namespace, + identity=self._client.identity, + failure=failure, + last_heartbeat_details=last_heartbeat_details, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def report_cancellation_async_activity( + self, input: ReportCancellationAsyncActivityInput + ) -> None: + data_converter = ( + input.data_converter_override or self._client.data_converter + )._with_store_context(self._get_async_activity_store_context(input.id_or_token)) + details = ( + None + if not input.details + else await data_converter.encode_wrapper(input.details) + ) + if isinstance(input.id_or_token, AsyncActivityIDReference): + await self._client.workflow_service.respond_activity_task_canceled_by_id( + temporalio.api.workflowservice.v1.RespondActivityTaskCanceledByIdRequest( + workflow_id=input.id_or_token.workflow_id or "", + run_id=input.id_or_token.run_id or "", + activity_id=input.id_or_token.activity_id, + namespace=self._client.namespace, + identity=self._client.identity, + details=details, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + else: + await self._client.workflow_service.respond_activity_task_canceled( + temporalio.api.workflowservice.v1.RespondActivityTaskCanceledRequest( + task_token=input.id_or_token, + namespace=self._client.namespace, + identity=self._client.identity, + details=details, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + ### Schedule calls + + async def create_schedule(self, input: CreateScheduleInput) -> ScheduleHandle: + # Limited actions must be false if remaining actions is 0 and must be + # true if remaining actions is non-zero + if ( + input.schedule.state.limited_actions + and not input.schedule.state.remaining_actions + ): + raise ValueError( + "Must set limited actions to false if there are no remaining actions set" + ) + if ( + not input.schedule.state.limited_actions + and input.schedule.state.remaining_actions + ): + raise ValueError( + "Must set limited actions to true if there are remaining actions set" + ) + + initial_patch: temporalio.api.schedule.v1.SchedulePatch | None = None + if input.trigger_immediately or input.backfill: + initial_patch = temporalio.api.schedule.v1.SchedulePatch( + trigger_immediately=temporalio.api.schedule.v1.TriggerImmediatelyRequest( + overlap_policy=temporalio.api.enums.v1.ScheduleOverlapPolicy.ValueType( + input.schedule.policy.overlap + ), + ) + if input.trigger_immediately + else None, + backfill_request=[b._to_proto() for b in input.backfill] + if input.backfill + else None, + ) + try: + request = temporalio.api.workflowservice.v1.CreateScheduleRequest( + namespace=self._client.namespace, + schedule_id=input.id, + schedule=await input.schedule._to_proto(self._client), + initial_patch=initial_patch, + identity=self._client.identity, + request_id=str(uuid.uuid4()), + memo=await self._targetless_data_converter._encode_memo(input.memo) + if input.memo + else None, + ) + if input.search_attributes: + temporalio.converter.encode_search_attributes( + input.search_attributes, request.search_attributes + ) + await self._client.workflow_service.create_schedule( + request, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + except RPCError as err: + already_started = ( + err.status == RPCStatusCode.ALREADY_EXISTS + and err.grpc_status.details + and err.grpc_status.details[0].Is( + temporalio.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure.DESCRIPTOR + ) + ) + if already_started: + raise ScheduleAlreadyRunningError() + raise + return ScheduleHandle(self._client, input.id) + + def list_schedules(self, input: ListSchedulesInput) -> ScheduleAsyncIterator: + return ScheduleAsyncIterator(self._client, input) + + async def backfill_schedule(self, input: BackfillScheduleInput) -> None: + await self._client.workflow_service.patch_schedule( + temporalio.api.workflowservice.v1.PatchScheduleRequest( + namespace=self._client.namespace, + schedule_id=input.id, + patch=temporalio.api.schedule.v1.SchedulePatch( + backfill_request=[b._to_proto() for b in input.backfills], + ), + identity=self._client.identity, + request_id=str(uuid.uuid4()), + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def delete_schedule(self, input: DeleteScheduleInput) -> None: + await self._client.workflow_service.delete_schedule( + temporalio.api.workflowservice.v1.DeleteScheduleRequest( + namespace=self._client.namespace, + schedule_id=input.id, + identity=self._client.identity, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def describe_schedule( + self, input: DescribeScheduleInput + ) -> ScheduleDescription: + return ScheduleDescription._from_proto( + input.id, + await self._client.workflow_service.describe_schedule( + temporalio.api.workflowservice.v1.DescribeScheduleRequest( + namespace=self._client.namespace, + schedule_id=input.id, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ), + self._client.data_converter, + ) + + async def pause_schedule(self, input: PauseScheduleInput) -> None: + await self._client.workflow_service.patch_schedule( + temporalio.api.workflowservice.v1.PatchScheduleRequest( + namespace=self._client.namespace, + schedule_id=input.id, + patch=temporalio.api.schedule.v1.SchedulePatch( + pause=input.note or "Paused via Python SDK", + ), + identity=self._client.identity, + request_id=str(uuid.uuid4()), + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def trigger_schedule(self, input: TriggerScheduleInput) -> None: + overlap_policy = temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_UNSPECIFIED + if input.overlap: + overlap_policy = temporalio.api.enums.v1.ScheduleOverlapPolicy.ValueType( + input.overlap + ) + await self._client.workflow_service.patch_schedule( + temporalio.api.workflowservice.v1.PatchScheduleRequest( + namespace=self._client.namespace, + schedule_id=input.id, + patch=temporalio.api.schedule.v1.SchedulePatch( + trigger_immediately=temporalio.api.schedule.v1.TriggerImmediatelyRequest( + overlap_policy=overlap_policy, + ), + ), + identity=self._client.identity, + request_id=str(uuid.uuid4()), + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def unpause_schedule(self, input: UnpauseScheduleInput) -> None: + await self._client.workflow_service.patch_schedule( + temporalio.api.workflowservice.v1.PatchScheduleRequest( + namespace=self._client.namespace, + schedule_id=input.id, + patch=temporalio.api.schedule.v1.SchedulePatch( + unpause=input.note or "Unpaused via Python SDK", + ), + identity=self._client.identity, + request_id=str(uuid.uuid4()), + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def update_schedule(self, input: UpdateScheduleInput) -> None: + # TODO(cretz): This is supposed to be a retry-conflict loop, but we do + # not yet have a way to know update failure is due to conflict token + # mismatch + update = input.updater( + ScheduleUpdateInput( + description=ScheduleDescription._from_proto( + input.id, + await self._client.workflow_service.describe_schedule( + temporalio.api.workflowservice.v1.DescribeScheduleRequest( + namespace=self._client.namespace, + schedule_id=input.id, + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ), + self._client.data_converter, + ) + ) + ) + if inspect.iscoroutine(update): + update = await update + if not update: + return + assert isinstance(update, ScheduleUpdate) + request = temporalio.api.workflowservice.v1.UpdateScheduleRequest( + namespace=self._client.namespace, + schedule_id=input.id, + schedule=await update.schedule._to_proto(self._client), + identity=self._client.identity, + request_id=str(uuid.uuid4()), + ) + if update.search_attributes is not None: + request.search_attributes.indexed_fields.clear() # Ensure that we at least create an empty map + temporalio.converter.encode_search_attributes( + update.search_attributes, request.search_attributes + ) + await self._client.workflow_service.update_schedule( + request, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def update_worker_build_id_compatibility( + self, input: UpdateWorkerBuildIdCompatibilityInput + ) -> None: + req = input.operation._as_partial_proto() + req.namespace = self._client.namespace + req.task_queue = input.task_queue + await self._client.workflow_service.update_worker_build_id_compatibility( + req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout + ) + + async def get_worker_build_id_compatibility( + self, input: GetWorkerBuildIdCompatibilityInput + ) -> WorkerBuildIdVersionSets: + req = temporalio.api.workflowservice.v1.GetWorkerBuildIdCompatibilityRequest( + namespace=self._client.namespace, + task_queue=input.task_queue, + max_sets=input.max_sets or 0, + ) + resp = await self._client.workflow_service.get_worker_build_id_compatibility( + req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout + ) + return WorkerBuildIdVersionSets._from_proto(resp) + + async def get_worker_task_reachability( + self, input: GetWorkerTaskReachabilityInput + ) -> WorkerTaskReachability: + req = temporalio.api.workflowservice.v1.GetWorkerTaskReachabilityRequest( + namespace=self._client.namespace, + build_ids=input.build_ids, + task_queues=input.task_queues, + reachability=input.reachability._to_proto() + if input.reachability + else temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_UNSPECIFIED, + ) + resp = await self._client.workflow_service.get_worker_task_reachability( + req, retry=True, metadata=input.rpc_metadata, timeout=input.rpc_timeout + ) + return WorkerTaskReachability._from_proto(resp) + + ### Nexus operation calls + + async def start_nexus_operation( + self, input: StartNexusOperationInput + ) -> NexusOperationHandle[Any]: + """Start a nexus operation and return a handle to it.""" + nexus_context = temporalio.converter.NexusSerializationContext( + endpoint=input.endpoint, + service=input.service, + operation=input.operation, + ) + data_converter = self._client.data_converter._with_contexts( + nexus_context, StorageDriverStoreContext(namespace=self._client.namespace) + ) + req = temporalio.api.workflowservice.v1.StartNexusOperationExecutionRequest( + namespace=self._client.namespace, + identity=self._client.identity, + request_id=str(uuid.uuid4()), + operation_id=input.id, + endpoint=input.endpoint, + service=input.service, + operation=input.operation, + id_reuse_policy=cast( + "temporalio.api.enums.v1.NexusOperationIdReusePolicy.ValueType", + int(input.id_reuse_policy), + ), + id_conflict_policy=cast( + "temporalio.api.enums.v1.NexusOperationIdConflictPolicy.ValueType", + int(input.id_conflict_policy), + ), + # Callback source contexts use the started operation's serialization + # context, like the rest of the request. + completion_callbacks=[ + await cb._to_proto(data_converter) for cb in input.completion_callbacks + ], + ) + + if input.schedule_to_close_timeout is not None: + req.schedule_to_close_timeout.FromTimedelta(input.schedule_to_close_timeout) + if input.schedule_to_start_timeout is not None: + req.schedule_to_start_timeout.FromTimedelta(input.schedule_to_start_timeout) + if input.start_to_close_timeout is not None: + req.start_to_close_timeout.FromTimedelta(input.start_to_close_timeout) + + # Set input payload + encoded = await data_converter.encode([input.arg]) + if encoded: + req.input.CopyFrom(encoded[0]) + + # Set search attributes + if input.search_attributes is not None: + temporalio.converter.encode_search_attributes( + input.search_attributes, req.search_attributes + ) + + # Set user metadata + metadata = await _encode_user_metadata(data_converter, input.summary, None) + if metadata is not None: + req.user_metadata.CopyFrom(metadata) + + # Set nexus headers + if input.headers: + for k, v in input.headers.items(): + req.nexus_header[k] = v + + resp: temporalio.api.workflowservice.v1.StartNexusOperationExecutionResponse + try: + resp = await self._client.workflow_service.start_nexus_operation_execution( + req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + except RPCError as err: + if err.status == RPCStatusCode.ALREADY_EXISTS and err.grpc_status.details: + details = temporalio.api.errordetails.v1.NexusOperationExecutionAlreadyStartedFailure() + if err.grpc_status.details[0].Unpack(details): + raise temporalio.exceptions.NexusOperationAlreadyStartedError( + input.id, run_id=details.run_id + ) + raise + return NexusOperationHandle( + self._client, + input.id, + run_id=resp.run_id or None, + result_type=input.result_type, + endpoint=input.endpoint, + service=input.service, + operation=input.operation, + ) + + async def describe_nexus_operation( + self, input: DescribeNexusOperationInput + ) -> NexusOperationExecutionDescription: + """Describe a nexus operation.""" + req = temporalio.api.workflowservice.v1.DescribeNexusOperationExecutionRequest( + namespace=self._client.namespace, + operation_id=input.operation_id, + run_id=input.run_id or "", + ) + resp = await self._client.workflow_service.describe_nexus_operation_execution( + req=req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + data_converter = self._client.data_converter.with_context( + temporalio.converter.NexusSerializationContext( + endpoint=resp.info.endpoint, + service=resp.info.service, + operation=resp.info.operation, + ) + ) + return await NexusOperationExecutionDescription._from_execution_info( + info=resp.info, + data_converter=data_converter, + ) + + async def get_nexus_operation_result( + self, input: GetNexusOperationResultInput + ) -> Any: + """Poll for nexus operation result until it's available.""" + data_converter = self._client.data_converter + # Fallback for older servers that don't return the context when polling. Handles obtained + # by operation ID alone have no start request context. + if input.endpoint and input.service and input.operation: + data_converter = data_converter.with_context( + temporalio.converter.NexusSerializationContext( + endpoint=input.endpoint, + service=input.service, + operation=input.operation, + ) + ) + req = temporalio.api.workflowservice.v1.PollNexusOperationExecutionRequest( + namespace=self._client.namespace, + operation_id=input.operation_id, + run_id=input.run_id or "", + wait_stage=temporalio.api.enums.v1.NexusOperationWaitStage.NEXUS_OPERATION_WAIT_STAGE_CLOSED, + ) + + # Continue polling as long as we have no outcome + while True: + try: + res = ( + await self._client.workflow_service.poll_nexus_operation_execution( + req, + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + ) + # The context the server returns also identifies an operation whose handle was + # obtained by operation ID + server_context = temporalio.converter._serialization_context._propagated_nexus_serialization_context( + res + ) + if server_context: + data_converter = self._client.data_converter.with_context( + server_context + ) + match res.WhichOneof("outcome"): + case "result": + type_hints = [input.result_type] if input.result_type else None + [result] = await data_converter.decode([res.result], type_hints) + return result + case "failure": + raise NexusOperationFailureError( + cause=await data_converter.decode_failure(res.failure) + ) + case None: + continue + except RPCError as err: + match err.status: + case RPCStatusCode.DEADLINE_EXCEEDED: + # Deadline exceeded is expected with long polling; retry + continue + case RPCStatusCode.CANCELLED: + raise asyncio.CancelledError() from err + case _: + raise + + async def cancel_nexus_operation(self, input: CancelNexusOperationInput) -> None: + """Cancel a nexus operation.""" + await self._client.workflow_service.request_cancel_nexus_operation_execution( + temporalio.api.workflowservice.v1.RequestCancelNexusOperationExecutionRequest( + namespace=self._client.namespace, + operation_id=input.operation_id, + run_id=input.run_id or "", + identity=self._client.identity, + request_id=str(uuid.uuid4()), + reason=input.reason or "", + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + async def terminate_nexus_operation( + self, input: TerminateNexusOperationInput + ) -> None: + """Terminate a nexus operation.""" + await self._client.workflow_service.terminate_nexus_operation_execution( + temporalio.api.workflowservice.v1.TerminateNexusOperationExecutionRequest( + namespace=self._client.namespace, + operation_id=input.operation_id, + run_id=input.run_id or "", + reason=input.reason or "", + identity=self._client.identity, + request_id=str(uuid.uuid4()), + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + + def list_nexus_operations( + self, input: ListNexusOperationsInput + ) -> NexusOperationExecutionAsyncIterator: + return NexusOperationExecutionAsyncIterator(self._client, input) + + async def count_nexus_operations( + self, input: CountNexusOperationsInput + ) -> NexusOperationExecutionCount: + return NexusOperationExecutionCount._from_raw( + await self._client.workflow_service.count_nexus_operation_executions( + temporalio.api.workflowservice.v1.CountNexusOperationExecutionsRequest( + namespace=self._client.namespace, + query=input.query or "", + ), + retry=True, + metadata=input.rpc_metadata, + timeout=input.rpc_timeout, + ) + ) + + async def _apply_headers( + self, + source: Mapping[str, temporalio.api.common.v1.Payload] | None, + dest: MessageMap[str, temporalio.api.common.v1.Payload], + ) -> None: + await _apply_headers( + source, + dest, + self._client.config(active_config=True)["header_codec_behavior"] + == HeaderCodecBehavior.CODEC, + self._targetless_data_converter, + ) diff --git a/temporalio/client/_interceptor.py b/temporalio/client/_interceptor.py new file mode 100644 index 0000000000..75463b4971 --- /dev/null +++ b/temporalio/client/_interceptor.py @@ -0,0 +1,1007 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +from collections.abc import ( + Awaitable, + Callable, + Mapping, + Sequence, +) +from dataclasses import dataclass +from datetime import timedelta +from typing import ( + TYPE_CHECKING, + Any, +) + +import temporalio.api.common.v1 +import temporalio.api.workflowservice.v1 +import temporalio.common +import temporalio.nexus +from temporalio.converter import DataConverter + +if TYPE_CHECKING: + from ._activity import ( + ActivityExecutionAsyncIterator, + ActivityExecutionCount, + ActivityExecutionDescription, + ActivityExecutionOptions, + ActivityHandle, + ActivityOptionsUpdate, + AsyncActivityIDReference, + ) + from ._nexus import ( + NexusOperationExecutionAsyncIterator, + NexusOperationExecutionCount, + NexusOperationExecutionDescription, + NexusOperationHandle, + ) + from ._schedule import ( + Schedule, + ScheduleAsyncIterator, + ScheduleBackfill, + ScheduleDescription, + ScheduleHandle, + ScheduleOverlapPolicy, + ScheduleUpdate, + ScheduleUpdateInput, + ) + from ._worker_versioning import ( + BuildIdOp, + TaskReachabilityType, + WorkerBuildIdVersionSets, + WorkerTaskReachability, + ) + from ._workflow import ( + WorkflowExecutionAsyncIterator, + WorkflowExecutionCount, + WorkflowExecutionDescription, + WorkflowHandle, + WorkflowHistoryEventAsyncIterator, + WorkflowHistoryEventFilterType, + WorkflowUpdateHandle, + WorkflowUpdateStage, + ) + + +@dataclass +class StartWorkflowInput: + """Input for :py:meth:`OutboundInterceptor.start_workflow`.""" + + workflow: str + args: Sequence[Any] + id: str + task_queue: str + execution_timeout: timedelta | None + run_timeout: timedelta | None + task_timeout: timedelta | None + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy + retry_policy: temporalio.common.RetryPolicy | None + cron_schedule: str + memo: Mapping[str, Any] | None + search_attributes: None | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) + start_delay: timedelta | None + headers: Mapping[str, temporalio.api.common.v1.Payload] + start_signal: str | None + start_signal_args: Sequence[Any] + static_summary: str | None + static_details: str | None + # Type may be absent + ret_type: type | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + request_eager_start: bool + priority: temporalio.common.Priority + versioning_override: temporalio.common.VersioningOverride | None = None + time_skipping_config: temporalio.api.common.v1.TimeSkippingConfig | None = None + + +@dataclass +class CancelWorkflowInput: + """Input for :py:meth:`OutboundInterceptor.cancel_workflow`.""" + + id: str + run_id: str | None + first_execution_run_id: str | None + reason: str + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class DescribeWorkflowInput: + """Input for :py:meth:`OutboundInterceptor.describe_workflow`.""" + + id: str + run_id: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class FetchWorkflowHistoryEventsInput: + """Input for :py:meth:`OutboundInterceptor.fetch_workflow_history_events`.""" + + id: str + run_id: str | None + page_size: int | None + next_page_token: bytes | None + wait_new_event: bool + event_filter_type: WorkflowHistoryEventFilterType + skip_archival: bool + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class ListWorkflowsInput: + """Input for :py:meth:`OutboundInterceptor.list_workflows`.""" + + query: str | None + page_size: int + next_page_token: bytes | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + limit: int | None + + +@dataclass +class CountWorkflowsInput: + """Input for :py:meth:`OutboundInterceptor.count_workflows`.""" + + query: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class QueryWorkflowInput: + """Input for :py:meth:`OutboundInterceptor.query_workflow`.""" + + id: str + run_id: str | None + query: str + args: Sequence[Any] + reject_condition: temporalio.common.QueryRejectCondition | None + headers: Mapping[str, temporalio.api.common.v1.Payload] + # Type may be absent + ret_type: type | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class SignalWorkflowInput: + """Input for :py:meth:`OutboundInterceptor.signal_workflow`.""" + + id: str + run_id: str | None + signal: str + args: Sequence[Any] + headers: Mapping[str, temporalio.api.common.v1.Payload] + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class TerminateWorkflowInput: + """Input for :py:meth:`OutboundInterceptor.terminate_workflow`.""" + + id: str + run_id: str | None + first_execution_run_id: str | None + args: Sequence[Any] + reason: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class StartActivityInput: + """Input for :py:meth:`OutboundInterceptor.start_activity`.""" + + activity_type: str + args: Sequence[Any] + id: str + task_queue: str + result_type: type | None + schedule_to_close_timeout: timedelta | None + start_to_close_timeout: timedelta | None + schedule_to_start_timeout: timedelta | None + heartbeat_timeout: timedelta | None + id_reuse_policy: temporalio.common.ActivityIDReusePolicy + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy + retry_policy: temporalio.common.RetryPolicy | None + priority: temporalio.common.Priority + search_attributes: temporalio.common.TypedSearchAttributes | None + summary: str | None + start_delay: timedelta | None + headers: Mapping[str, temporalio.api.common.v1.Payload] + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class CancelActivityInput: + """Input for :py:meth:`OutboundInterceptor.cancel_activity`.""" + + activity_id: str + activity_run_id: str | None + reason: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class TerminateActivityInput: + """Input for :py:meth:`OutboundInterceptor.terminate_activity`.""" + + activity_id: str + activity_run_id: str | None + reason: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class PauseActivityInput: + """Input for :py:meth:`OutboundInterceptor.pause_activity`. + + .. warning:: + This API is experimental. + """ + + activity_id: str + activity_run_id: str | None + reason: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class UnpauseActivityInput: + """Input for :py:meth:`OutboundInterceptor.unpause_activity`. + + .. warning:: + This API is experimental. + """ + + activity_id: str + activity_run_id: str | None + reason: str | None + jitter: timedelta | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class UpdateActivityOptionsInput: + """Input for :py:meth:`OutboundInterceptor.update_activity_options`. + + .. warning:: + This API is experimental. + """ + + activity_id: str + activity_run_id: str | None + updates: Sequence[ActivityOptionsUpdate[Any]] + restore_original: bool + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class DescribeActivityInput: + """Input for :py:meth:`OutboundInterceptor.describe_activity`.""" + + activity_id: str + activity_run_id: str | None + include_input: bool + include_outcome: bool + include_heartbeat_details: bool + include_last_failure: bool + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class ListActivitiesInput: + """Input for :py:meth:`OutboundInterceptor.list_activities`.""" + + query: str | None + page_size: int + next_page_token: bytes | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + limit: int | None + + +@dataclass +class CountActivitiesInput: + """Input for :py:meth:`OutboundInterceptor.count_activities`.""" + + query: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class StartWorkflowUpdateInput: + """Input for :py:meth:`OutboundInterceptor.start_workflow_update`.""" + + id: str + run_id: str | None + first_execution_run_id: str | None + update_id: str | None + update: str + args: Sequence[Any] + wait_for_stage: WorkflowUpdateStage + headers: Mapping[str, temporalio.api.common.v1.Payload] + ret_type: type | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class UpdateWithStartUpdateWorkflowInput: + """Update input for :py:meth:`OutboundInterceptor.start_update_with_start_workflow`.""" + + update_id: str | None + update: str + args: Sequence[Any] + wait_for_stage: WorkflowUpdateStage + headers: Mapping[str, temporalio.api.common.v1.Payload] + ret_type: type | None + + +@dataclass +class UpdateWithStartStartWorkflowInput: + """StartWorkflow input for :py:meth:`OutboundInterceptor.start_update_with_start_workflow`.""" + + # Similar to StartWorkflowInput but without e.g. run_id, start_signal, + # start_signal_args, request_eager_start. + + workflow: str + args: Sequence[Any] + id: str + task_queue: str + execution_timeout: timedelta | None + run_timeout: timedelta | None + task_timeout: timedelta | None + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy + retry_policy: temporalio.common.RetryPolicy | None + cron_schedule: str + memo: Mapping[str, Any] | None + search_attributes: None | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) + start_delay: timedelta | None + headers: Mapping[str, temporalio.api.common.v1.Payload] + static_summary: str | None + static_details: str | None + # Type may be absent + ret_type: type | None + priority: temporalio.common.Priority + versioning_override: temporalio.common.VersioningOverride | None = None + time_skipping_config: temporalio.api.common.v1.TimeSkippingConfig | None = None + + +@dataclass +class StartWorkflowUpdateWithStartInput: + """Input for :py:meth:`OutboundInterceptor.start_update_with_start_workflow`. + + The ``rpc_metadata`` and ``rpc_timeout`` fields are authoritative for the + ``execute_multi_operation`` gRPC call. Interceptors that wish to set RPC + metadata should modify :py:attr:`rpc_metadata` on this object. + """ + + start_workflow_input: UpdateWithStartStartWorkflowInput + update_workflow_input: UpdateWithStartUpdateWorkflowInput + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + _on_start: Callable[ + [temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse], None + ] + _on_start_error: Callable[[BaseException], None] + + +@dataclass +class HeartbeatAsyncActivityInput: + """Input for :py:meth:`OutboundInterceptor.heartbeat_async_activity`.""" + + id_or_token: AsyncActivityIDReference | bytes + details: Sequence[Any] + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + data_converter_override: DataConverter | None = None + + +@dataclass +class CompleteAsyncActivityInput: + """Input for :py:meth:`OutboundInterceptor.complete_async_activity`.""" + + id_or_token: AsyncActivityIDReference | bytes + result: Any | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + data_converter_override: DataConverter | None = None + + +@dataclass +class FailAsyncActivityInput: + """Input for :py:meth:`OutboundInterceptor.fail_async_activity`.""" + + id_or_token: AsyncActivityIDReference | bytes + error: Exception + last_heartbeat_details: Sequence[Any] + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + data_converter_override: DataConverter | None = None + + +@dataclass +class ReportCancellationAsyncActivityInput: + """Input for :py:meth:`OutboundInterceptor.report_cancellation_async_activity`.""" + + id_or_token: AsyncActivityIDReference | bytes + details: Sequence[Any] + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + data_converter_override: DataConverter | None = None + + +@dataclass +class CreateScheduleInput: + """Input for :py:meth:`OutboundInterceptor.create_schedule`.""" + + id: str + schedule: Schedule + trigger_immediately: bool + backfill: Sequence[ScheduleBackfill] + memo: Mapping[str, Any] | None + search_attributes: None | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class ListSchedulesInput: + """Input for :py:meth:`OutboundInterceptor.list_schedules`.""" + + page_size: int + next_page_token: bytes | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + query: str | None = None + + +@dataclass +class BackfillScheduleInput: + """Input for :py:meth:`OutboundInterceptor.backfill_schedule`.""" + + id: str + backfills: Sequence[ScheduleBackfill] + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class DeleteScheduleInput: + """Input for :py:meth:`OutboundInterceptor.delete_schedule`.""" + + id: str + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class DescribeScheduleInput: + """Input for :py:meth:`OutboundInterceptor.describe_schedule`.""" + + id: str + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class PauseScheduleInput: + """Input for :py:meth:`OutboundInterceptor.pause_schedule`.""" + + id: str + note: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class TriggerScheduleInput: + """Input for :py:meth:`OutboundInterceptor.trigger_schedule`.""" + + id: str + overlap: ScheduleOverlapPolicy | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class UnpauseScheduleInput: + """Input for :py:meth:`OutboundInterceptor.unpause_schedule`.""" + + id: str + note: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class UpdateScheduleInput: + """Input for :py:meth:`OutboundInterceptor.update_schedule`.""" + + id: str + updater: Callable[ + [ScheduleUpdateInput], + ScheduleUpdate | None | Awaitable[ScheduleUpdate | None], + ] + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class UpdateWorkerBuildIdCompatibilityInput: + """Input for :py:meth:`OutboundInterceptor.update_worker_build_id_compatibility`.""" + + task_queue: str + operation: BuildIdOp + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class GetWorkerBuildIdCompatibilityInput: + """Input for :py:meth:`OutboundInterceptor.get_worker_build_id_compatibility`.""" + + task_queue: str + max_sets: int | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class GetWorkerTaskReachabilityInput: + """Input for :py:meth:`OutboundInterceptor.get_worker_task_reachability`.""" + + build_ids: Sequence[str] + task_queues: Sequence[str] + reachability: TaskReachabilityType | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class StartNexusOperationInput: + """Input for :py:meth:`OutboundInterceptor.start_nexus_operation`. + + .. warning:: + This API is experimental and unstable. + """ + + operation: str + arg: Any + id: str + endpoint: str + service: str + result_type: type | None + schedule_to_close_timeout: timedelta | None + schedule_to_start_timeout: timedelta | None + start_to_close_timeout: timedelta | None + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy + search_attributes: temporalio.common.TypedSearchAttributes | None + summary: str | None + headers: Mapping[str, str] + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + completion_callbacks: Sequence[temporalio.nexus.CompletionCallback[Any]] = () + + +@dataclass +class DescribeNexusOperationInput: + """Input for :py:meth:`OutboundInterceptor.describe_nexus_operation`. + + .. warning:: + This API is experimental and unstable. + """ + + operation_id: str + run_id: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class GetNexusOperationResultInput: + """Input for :py:meth:`OutboundInterceptor.get_nexus_operation_result`. + + .. warning:: + This API is experimental and unstable. + """ + + operation_id: str + run_id: str | None + endpoint: str + service: str + operation: str + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + result_type: type[Any] | None + + +@dataclass +class CancelNexusOperationInput: + """Input for :py:meth:`OutboundInterceptor.cancel_nexus_operation`. + + .. warning:: + This API is experimental and unstable. + """ + + operation_id: str + run_id: str | None + reason: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class TerminateNexusOperationInput: + """Input for :py:meth:`OutboundInterceptor.terminate_nexus_operation`. + + .. warning:: + This API is experimental and unstable. + """ + + operation_id: str + run_id: str | None + reason: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class ListNexusOperationsInput: + """Input for :py:meth:`OutboundInterceptor.list_nexus_operations`. + + .. warning:: + This API is experimental and unstable. + """ + + query: str | None + page_size: int + next_page_token: bytes | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + limit: int | None + + +@dataclass +class CountNexusOperationsInput: + """Input for :py:meth:`OutboundInterceptor.count_nexus_operations`. + + .. warning:: + This API is experimental and unstable. + """ + + query: str | None + rpc_metadata: Mapping[str, str | bytes] + rpc_timeout: timedelta | None + + +@dataclass +class Interceptor: + """Interceptor for clients. + + This should be extended by any client interceptors. + """ + + def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor: + """Method called for intercepting a client. + + Args: + next: The underlying outbound interceptor this interceptor should + delegate to. + + Returns: + The new interceptor that will be called for each client call. + """ + return next + + +class OutboundInterceptor: + """OutboundInterceptor for intercepting client calls. + + This should be extended by any client outbound interceptors. + """ + + def __init__(self, next: OutboundInterceptor) -> None: + """Create the outbound interceptor. + + Args: + next: The next interceptor in the chain. The default implementation + of all calls is to delegate to the next interceptor. + """ + self.next = next + + ### Workflow calls + + async def start_workflow( + self, input: StartWorkflowInput + ) -> WorkflowHandle[Any, Any]: + """Called for every :py:meth:`Client.start_workflow` call.""" + return await self.next.start_workflow(input) + + async def cancel_workflow(self, input: CancelWorkflowInput) -> None: + """Called for every :py:meth:`WorkflowHandle.cancel` call.""" + await self.next.cancel_workflow(input) + + async def describe_workflow( + self, input: DescribeWorkflowInput + ) -> WorkflowExecutionDescription: + """Called for every :py:meth:`WorkflowHandle.describe` call.""" + return await self.next.describe_workflow(input) + + def fetch_workflow_history_events( + self, input: FetchWorkflowHistoryEventsInput + ) -> WorkflowHistoryEventAsyncIterator: + """Called for every :py:meth:`WorkflowHandle.fetch_history_events` call.""" + return self.next.fetch_workflow_history_events(input) + + def list_workflows( + self, input: ListWorkflowsInput + ) -> WorkflowExecutionAsyncIterator: + """Called for every :py:meth:`Client.list_workflows` call.""" + return self.next.list_workflows(input) + + async def count_workflows( + self, input: CountWorkflowsInput + ) -> WorkflowExecutionCount: + """Called for every :py:meth:`Client.count_workflows` call.""" + return await self.next.count_workflows(input) + + async def query_workflow(self, input: QueryWorkflowInput) -> Any: + """Called for every :py:meth:`WorkflowHandle.query` call.""" + return await self.next.query_workflow(input) + + async def signal_workflow(self, input: SignalWorkflowInput) -> None: + """Called for every :py:meth:`WorkflowHandle.signal` call.""" + await self.next.signal_workflow(input) + + async def terminate_workflow(self, input: TerminateWorkflowInput) -> None: + """Called for every :py:meth:`WorkflowHandle.terminate` call.""" + await self.next.terminate_workflow(input) + + ### Activity calls + + async def start_activity(self, input: StartActivityInput) -> ActivityHandle[Any]: + """Called for every :py:meth:`Client.start_activity` call.""" + return await self.next.start_activity(input) + + async def cancel_activity(self, input: CancelActivityInput) -> None: + """Called for every :py:meth:`ActivityHandle.cancel` call.""" + await self.next.cancel_activity(input) + + async def terminate_activity(self, input: TerminateActivityInput) -> None: + """Called for every :py:meth:`ActivityHandle.terminate` call.""" + await self.next.terminate_activity(input) + + async def pause_activity(self, input: PauseActivityInput) -> None: + """Called for every :py:meth:`ActivityHandle.pause` call. + + .. warning:: + This API is experimental. + """ + await self.next.pause_activity(input) + + async def unpause_activity(self, input: UnpauseActivityInput) -> None: + """Called for every :py:meth:`ActivityHandle.unpause` call. + + .. warning:: + This API is experimental. + """ + await self.next.unpause_activity(input) + + async def update_activity_options( + self, input: UpdateActivityOptionsInput + ) -> ActivityExecutionOptions: + """Called for every :py:meth:`ActivityHandle.update_options` and + :py:meth:`ActivityHandle.restore_original_options` call. + + .. warning:: + This API is experimental. + """ + return await self.next.update_activity_options(input) + + async def describe_activity( + self, input: DescribeActivityInput + ) -> ActivityExecutionDescription: + """Called for every :py:meth:`ActivityHandle.describe` call.""" + return await self.next.describe_activity(input) + + def list_activities( + self, input: ListActivitiesInput + ) -> ActivityExecutionAsyncIterator: + """Called for every :py:meth:`Client.list_activities` call.""" + return self.next.list_activities(input) + + async def count_activities( + self, input: CountActivitiesInput + ) -> ActivityExecutionCount: + """Called for every :py:meth:`Client.count_activities` call.""" + return await self.next.count_activities(input) + + async def start_workflow_update( + self, input: StartWorkflowUpdateInput + ) -> WorkflowUpdateHandle[Any]: + """Called for every :py:meth:`WorkflowHandle.start_update` and :py:meth:`WorkflowHandle.execute_update` call.""" + return await self.next.start_workflow_update(input) + + async def start_update_with_start_workflow( + self, input: StartWorkflowUpdateWithStartInput + ) -> WorkflowUpdateHandle[Any]: + """Called for every :py:meth:`Client.start_update_with_start_workflow` and :py:meth:`Client.execute_update_with_start_workflow` call.""" + return await self.next.start_update_with_start_workflow(input) + + ### Async activity calls + + async def heartbeat_async_activity( + self, input: HeartbeatAsyncActivityInput + ) -> None: + """Called for every :py:meth:`AsyncActivityHandle.heartbeat` call.""" + await self.next.heartbeat_async_activity(input) + + async def complete_async_activity(self, input: CompleteAsyncActivityInput) -> None: + """Called for every :py:meth:`AsyncActivityHandle.complete` call.""" + await self.next.complete_async_activity(input) + + async def fail_async_activity(self, input: FailAsyncActivityInput) -> None: + """Called for every :py:meth:`AsyncActivityHandle.fail` call.""" + await self.next.fail_async_activity(input) + + async def report_cancellation_async_activity( + self, input: ReportCancellationAsyncActivityInput + ) -> None: + """Called for every :py:meth:`AsyncActivityHandle.report_cancellation` call.""" + await self.next.report_cancellation_async_activity(input) + + ### Schedule calls + + async def create_schedule(self, input: CreateScheduleInput) -> ScheduleHandle: + """Called for every :py:meth:`Client.create_schedule` call.""" + return await self.next.create_schedule(input) + + def list_schedules(self, input: ListSchedulesInput) -> ScheduleAsyncIterator: + """Called for every :py:meth:`Client.list_schedules` call.""" + return self.next.list_schedules(input) + + async def backfill_schedule(self, input: BackfillScheduleInput) -> None: + """Called for every :py:meth:`ScheduleHandle.backfill` call.""" + await self.next.backfill_schedule(input) + + async def delete_schedule(self, input: DeleteScheduleInput) -> None: + """Called for every :py:meth:`ScheduleHandle.delete` call.""" + await self.next.delete_schedule(input) + + async def describe_schedule( + self, input: DescribeScheduleInput + ) -> ScheduleDescription: + """Called for every :py:meth:`ScheduleHandle.describe` call.""" + return await self.next.describe_schedule(input) + + async def pause_schedule(self, input: PauseScheduleInput) -> None: + """Called for every :py:meth:`ScheduleHandle.pause` call.""" + await self.next.pause_schedule(input) + + async def trigger_schedule(self, input: TriggerScheduleInput) -> None: + """Called for every :py:meth:`ScheduleHandle.trigger` call.""" + await self.next.trigger_schedule(input) + + async def unpause_schedule(self, input: UnpauseScheduleInput) -> None: + """Called for every :py:meth:`ScheduleHandle.unpause` call.""" + await self.next.unpause_schedule(input) + + async def update_schedule(self, input: UpdateScheduleInput) -> None: + """Called for every :py:meth:`ScheduleHandle.update` call.""" + await self.next.update_schedule(input) + + async def update_worker_build_id_compatibility( + self, input: UpdateWorkerBuildIdCompatibilityInput + ) -> None: + """Called for every :py:meth:`Client.update_worker_build_id_compatibility` call.""" + await self.next.update_worker_build_id_compatibility(input) + + async def get_worker_build_id_compatibility( + self, input: GetWorkerBuildIdCompatibilityInput + ) -> WorkerBuildIdVersionSets: + """Called for every :py:meth:`Client.get_worker_build_id_compatibility` call.""" + return await self.next.get_worker_build_id_compatibility(input) + + async def get_worker_task_reachability( + self, input: GetWorkerTaskReachabilityInput + ) -> WorkerTaskReachability: + """Called for every :py:meth:`Client.get_worker_task_reachability` call.""" + return await self.next.get_worker_task_reachability(input) + + ### Nexus operation calls + + async def start_nexus_operation( + self, input: StartNexusOperationInput + ) -> NexusOperationHandle[Any]: + """Called for every :py:meth:`NexusClient.start_operation` call. + + .. warning:: + This API is experimental and unstable. + """ + return await self.next.start_nexus_operation(input) + + async def describe_nexus_operation( + self, input: DescribeNexusOperationInput + ) -> NexusOperationExecutionDescription: + """Called for every :py:meth:`NexusOperationHandle.describe` call. + + .. warning:: + This API is experimental and unstable. + """ + return await self.next.describe_nexus_operation(input) + + async def get_nexus_operation_result( + self, input: GetNexusOperationResultInput + ) -> Any: + """Called for every :py:meth:`NexusOperationHandle.result` call. + + .. warning:: + This API is experimental and unstable. + """ + return await self.next.get_nexus_operation_result(input) + + async def cancel_nexus_operation(self, input: CancelNexusOperationInput) -> None: + """Called for every :py:meth:`NexusOperationHandle.cancel` call. + + .. warning:: + This API is experimental and unstable. + """ + await self.next.cancel_nexus_operation(input) + + async def terminate_nexus_operation( + self, input: TerminateNexusOperationInput + ) -> None: + """Called for every :py:meth:`NexusOperationHandle.terminate` call. + + .. warning:: + This API is experimental and unstable. + """ + await self.next.terminate_nexus_operation(input) + + def list_nexus_operations( + self, input: ListNexusOperationsInput + ) -> NexusOperationExecutionAsyncIterator: + """Called for every :py:meth:`Client.list_nexus_operations` call. + + .. warning:: + This API is experimental and unstable. + """ + return self.next.list_nexus_operations(input) + + async def count_nexus_operations( + self, input: CountNexusOperationsInput + ) -> NexusOperationExecutionCount: + """Called for every :py:meth:`Client.count_nexus_operations` call. + + .. warning:: + This API is experimental and unstable. + """ + return await self.next.count_nexus_operations(input) diff --git a/temporalio/client/_nexus.py b/temporalio/client/_nexus.py new file mode 100644 index 0000000000..fa22c11c24 --- /dev/null +++ b/temporalio/client/_nexus.py @@ -0,0 +1,1456 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections.abc import Awaitable, Callable, Mapping, Sequence +from dataclasses import dataclass, field +from datetime import datetime, timedelta, timezone +from typing import TYPE_CHECKING, Any, Generic, cast, overload + +import nexusrpc +from nexusrpc import InputT, OutputT +from typing_extensions import Self + +import temporalio.api.nexus.v1 +import temporalio.api.workflowservice.v1 +import temporalio.common +import temporalio.converter +import temporalio.converter._search_attributes +import temporalio.exceptions +import temporalio.nexus._util +from temporalio.types import NexusServiceType, ReturnType + +from ._helpers import _decode_user_metadata +from ._interceptor import ( + CancelNexusOperationInput, + DescribeNexusOperationInput, + GetNexusOperationResultInput, + ListNexusOperationsInput, + StartNexusOperationInput, + TerminateNexusOperationInput, +) + +if TYPE_CHECKING: + from ._client import Client + + +@dataclass +class NexusOperationExecutionCancellationInfo: + """Cancellation information for a Nexus Operation. + + .. warning:: + This API is experimental and unstable. + """ + + raw: temporalio.api.nexus.v1.NexusOperationExecutionCancellationInfo + """Underlying protobuf cancellation info.""" + + requested_time: datetime | None + """The time when cancellation was requested.""" + + state: temporalio.common.NexusOperationCancellationState + """The current state of the cancellation request.""" + + attempt: int + """The number of attempts made to deliver the cancel operation request.""" + + last_attempt_complete_time: datetime | None + """The time when the last attempt completed.""" + + next_attempt_schedule_time: datetime | None + """The time when the next attempt is scheduled.""" + + last_attempt_failure: BaseException | None + """The last attempt's failure, if any.""" + + blocked_reason: str + """Blocked reason provides additional information if the cancellation state is BLOCKED.""" + + reason: str + """The reason specified in the cancellation request.""" + + @classmethod + async def _from_cancellation_info( + cls, + info: temporalio.api.nexus.v1.NexusOperationExecutionCancellationInfo, + data_converter: temporalio.converter.DataConverter, + ) -> Self: + """Create from raw proto nexus operation cancellation info.""" + return cls( + raw=info, + requested_time=( + info.requested_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("requested_time") + else None + ), + state=( + temporalio.common.NexusOperationCancellationState(info.state) + if info.state + else temporalio.common.NexusOperationCancellationState.UNSPECIFIED + ), + attempt=info.attempt, + last_attempt_complete_time=( + info.last_attempt_complete_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("last_attempt_complete_time") + else None + ), + next_attempt_schedule_time=( + info.next_attempt_schedule_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("next_attempt_schedule_time") + else None + ), + last_attempt_failure=( + cast( + BaseException | None, + await data_converter.decode_failure(info.last_attempt_failure), + ) + if info.HasField("last_attempt_failure") + else None + ), + blocked_reason=info.blocked_reason, + reason=info.reason, + ) + + +@dataclass +class NexusOperationExecution: + """Info for a standalone Nexus operation execution, from list response. + + .. warning:: + This API is experimental and unstable. + """ + + operation_id: str + """Unique identifier of this operation.""" + + run_id: str + """Run ID of the standalone Nexus operation.""" + + endpoint: str + """Endpoint name.""" + + service: str + """Service name.""" + + operation: str + """Operation name.""" + + schedule_time: datetime | None + """Time the operation was originally scheduled.""" + + close_time: datetime | None + """Time the operation reached a terminal status, if closed.""" + + status: temporalio.common.NexusOperationExecutionStatus + """Current status of the operation.""" + + search_attributes: temporalio.common.TypedSearchAttributes + """Current set of search attributes if any.""" + + state_transition_count: int + """Number of state transitions.""" + + execution_duration: timedelta | None + """Duration from scheduled to close time, only populated if closed.""" + + raw_info: ( + temporalio.api.nexus.v1.NexusOperationExecutionListInfo + | temporalio.api.nexus.v1.NexusOperationExecutionInfo + ) + """Underlying protobuf info.""" + + @classmethod + def _from_raw_info( + cls, info: temporalio.api.nexus.v1.NexusOperationExecutionListInfo + ) -> Self: + """Create from raw proto nexus operation list info.""" + return cls( + operation_id=info.operation_id, + run_id=info.run_id, + endpoint=info.endpoint, + service=info.service, + operation=info.operation, + schedule_time=( + info.schedule_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("schedule_time") + else None + ), + close_time=( + info.close_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("close_time") + else None + ), + status=( + temporalio.common.NexusOperationExecutionStatus(info.status) + if info.status + else temporalio.common.NexusOperationExecutionStatus.UNSPECIFIED + ), + search_attributes=temporalio.converter.decode_typed_search_attributes( + info.search_attributes + ), + state_transition_count=info.state_transition_count, + execution_duration=( + info.execution_duration.ToTimedelta() + if info.HasField("execution_duration") + else None + ), + raw_info=info, + ) + + +@dataclass +class NexusOperationExecutionDescription(NexusOperationExecution): + """Detailed information about a standalone Nexus operation execution. + + .. warning:: + This API is experimental and unstable. + """ + + raw_description: temporalio.api.nexus.v1.NexusOperationExecutionInfo + """Underlying protobuf description info.""" + + state: temporalio.common.PendingNexusOperationExecutionState + """More detailed breakdown if status is :py:attr:`NexusOperationExecutionStatus.RUNNING`.""" + + schedule_to_close_timeout: timedelta | None + """Schedule-to-close timeout for this operation.""" + + schedule_to_start_timeout: timedelta | None + """Schedule-to-start timeout for this operation.""" + + start_to_close_timeout: timedelta | None + """Start-to-close timeout for this operation.""" + + attempt: int + """Current attempt number.""" + + expiration_time: datetime | None + """Scheduled time plus schedule_to_close_timeout.""" + + last_attempt_complete_time: datetime | None + """Time when the last attempt completed.""" + + next_attempt_schedule_time: datetime | None + """Time when the next attempt will be scheduled.""" + + last_attempt_failure: BaseException | None + """Failure from the last failed attempt, if any.""" + + blocked_reason: str | None + """Reason the operation is blocked, if any.""" + + request_id: str + """Server-generated request ID used as an idempotency token.""" + + operation_token: str | None + """Operation token is only set for asynchronous operations after a successful start_operation call.""" + + identity: str + """Identity of the client that started this operation.""" + + cancellation_info: NexusOperationExecutionCancellationInfo | None + """Cancellation info if cancellation was requested.""" + + _data_converter: temporalio.converter.DataConverter = field( + kw_only=True, compare=False, repr=False + ) + _static_summary: str | None = field( + kw_only=True, default=None, compare=False, repr=False + ) + _static_details: str | None = field( + kw_only=True, default=None, compare=False, repr=False + ) + _metadata_decoded: bool = field( + kw_only=True, default=False, compare=False, repr=False + ) + + async def static_summary(self) -> str | None: + """Gets the single-line fixed summary for this Nexus operation execution that may appear in + UI/CLI. This can be in single-line Temporal markdown format. + """ + if not self._metadata_decoded: + await self._decode_metadata() + return self._static_summary + + async def static_details(self) -> str | None: + """Gets the general fixed details for this Nexus operation execution that may appear in UI/CLI. + This can be in Temporal markdown format and can span multiple lines. + """ + if not self._metadata_decoded: + await self._decode_metadata() + return self._static_details + + async def _decode_metadata(self) -> None: + """Internal method to decode metadata lazily.""" + self._static_summary, self._static_details = await _decode_user_metadata( + self._data_converter, self.raw_description.user_metadata + ) + self._metadata_decoded = True + + @classmethod + async def _from_execution_info( + cls, + info: temporalio.api.nexus.v1.NexusOperationExecutionInfo, + data_converter: temporalio.converter.DataConverter, + ) -> Self: + """Create from raw proto nexus operation execution info.""" + return cls( + _data_converter=data_converter, + operation_id=info.operation_id, + run_id=info.run_id, + endpoint=info.endpoint, + service=info.service, + operation=info.operation, + schedule_time=( + info.schedule_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("schedule_time") + else None + ), + close_time=( + info.close_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("close_time") + else None + ), + status=( + temporalio.common.NexusOperationExecutionStatus(info.status) + if info.status + else temporalio.common.NexusOperationExecutionStatus.UNSPECIFIED + ), + search_attributes=temporalio.converter.decode_typed_search_attributes( + info.search_attributes + ), + state_transition_count=info.state_transition_count, + execution_duration=( + info.execution_duration.ToTimedelta() + if info.HasField("execution_duration") + else None + ), + raw_info=info, + raw_description=info, + state=( + temporalio.common.PendingNexusOperationExecutionState(info.state) + if info.state + else temporalio.common.PendingNexusOperationExecutionState.UNSPECIFIED + ), + schedule_to_close_timeout=( + info.schedule_to_close_timeout.ToTimedelta() + if info.HasField("schedule_to_close_timeout") + else None + ), + schedule_to_start_timeout=( + info.schedule_to_start_timeout.ToTimedelta() + if info.HasField("schedule_to_start_timeout") + else None + ), + start_to_close_timeout=( + info.start_to_close_timeout.ToTimedelta() + if info.HasField("start_to_close_timeout") + else None + ), + attempt=info.attempt, + expiration_time=( + info.expiration_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("expiration_time") + else None + ), + last_attempt_complete_time=( + info.last_attempt_complete_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("last_attempt_complete_time") + else None + ), + last_attempt_failure=( + cast( + BaseException | None, + await data_converter.decode_failure(info.last_attempt_failure), + ) + if info.HasField("last_attempt_failure") + else None + ), + next_attempt_schedule_time=( + info.next_attempt_schedule_time.ToDatetime(tzinfo=timezone.utc) + if info.HasField("next_attempt_schedule_time") + else None + ), + blocked_reason=info.blocked_reason if info.blocked_reason else None, + request_id=info.request_id, + operation_token=info.operation_token if info.operation_token else None, + identity=info.identity, + cancellation_info=( + await NexusOperationExecutionCancellationInfo._from_cancellation_info( + info.cancellation_info, data_converter + ) + if info.HasField("cancellation_info") + else None + ), + ) + + +@dataclass(frozen=True) +class NexusOperationExecutionCountAggregationGroup: + """A single aggregation group from a count nexus operations call. + + .. warning:: + This API is experimental and unstable. + """ + + count: int + """Count for this group.""" + + group_values: Sequence[temporalio.common.SearchAttributeValue] + """Values that define this group.""" + + @staticmethod + def _from_raw( + raw: temporalio.api.workflowservice.v1.CountNexusOperationExecutionsResponse.AggregationGroup, + ) -> NexusOperationExecutionCountAggregationGroup: + return NexusOperationExecutionCountAggregationGroup( + count=raw.count, + group_values=[ + temporalio.converter._search_attributes._decode_search_attribute_value( + v + ) + for v in raw.group_values + ], + ) + + +@dataclass +class NexusOperationExecutionCount: + """Representation of a count from a count nexus operations call. + + .. warning:: + This API is experimental and unstable. + """ + + count: int + """Approximate number of operations matching the original query. + + If the query had a group-by clause, this is simply the sum of all the counts + in :py:attr:`groups`. + """ + + groups: Sequence[NexusOperationExecutionCountAggregationGroup] + """Groups if the query had a group-by clause, or empty if not.""" + + @staticmethod + def _from_raw( + resp: temporalio.api.workflowservice.v1.CountNexusOperationExecutionsResponse, + ) -> NexusOperationExecutionCount: + """Create from raw proto response.""" + return NexusOperationExecutionCount( + count=resp.count, + groups=[ + NexusOperationExecutionCountAggregationGroup._from_raw(g) + for g in resp.groups + ], + ) + + +class NexusOperationFailureError(temporalio.exceptions.TemporalError): + """Error that occurs when a Nexus operation is unsuccessful. + + .. warning:: + This API is experimental and unstable. + """ + + def __init__(self, *, cause: BaseException) -> None: + """Create Nexus operation failure error.""" + super().__init__("Nexus operation execution failed") + self.__cause__ = cause + + @property + def cause(self) -> BaseException: + """Cause of the Nexus operation failure.""" + assert self.__cause__ + return self.__cause__ + + +class NexusClient(ABC, Generic[NexusServiceType]): + """Client for starting standalone Nexus operations. + + .. warning:: + This API is experimental and unstable. + + Use :py:meth:`Client.create_nexus_client` to create a client. + """ + + # Overload for nexusrpc.Operation + @overload + @abstractmethod + async def start_operation( + self, + operation: nexusrpc.Operation[InputT, OutputT], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for string operation name with result_type. Callbacks must accept + # the result type. + @overload + @abstractmethod + async def start_operation( + self, + operation: str, + arg: Any, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + result_type: type[OutputT], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for string operation name without result_type. Callbacks of any + # output type are accepted. + @overload + @abstractmethod + async def start_operation( + self, + operation: str, + arg: Any, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + result_type: None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[Any]: ... + + # Overload for workflow_run_operation methods + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [NexusServiceType, temporalio.nexus.WorkflowRunOperationContext, InputT], + Awaitable[temporalio.nexus.WorkflowHandle[OutputT]], + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for sync_operation methods (async def) + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [NexusServiceType, nexusrpc.handler.StartOperationContext, InputT], + Awaitable[OutputT], + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for sync_operation methods (def) + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [NexusServiceType, nexusrpc.handler.StartOperationContext, InputT], + OutputT, + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for operation_handler + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [NexusServiceType], nexusrpc.handler.OperationHandler[InputT, OutputT] + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for temporal_operation methods + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [ + NexusServiceType, + temporalio.nexus.TemporalStartOperationContext, + temporalio.nexus.TemporalNexusClient, + InputT, + ], + Awaitable[temporalio.nexus.TemporalOperationResult[OutputT]], + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + @abstractmethod + async def start_operation( + self, + operation: nexusrpc.Operation[Any, Any] | str | Callable[..., Any], + arg: Any, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[temporalio.nexus.CompletionCallback[Any]] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[Any]: + """Start a Nexus operation and return a handle. + + .. warning:: + This API is experimental and unstable. + + Args: + operation: The operation to start. Can be a ``nexusrpc.Operation``, + a callable operation method, or a string name. + arg: Input argument for the operation. + id: Unique identifier for this operation. + id_reuse_policy: Policy for reusing operation IDs. + id_conflict_policy: Policy for handling ID conflicts. + result_type: For string operation names, this can set the specific + result type hint to deserialize into. + schedule_to_close_timeout: End-to-end timeout for the Nexus + operation. If unset, defaults to the maximum allowed by the + Temporal server. + schedule_to_start_timeout: Maximum time to wait for the operation + to be started (or completed, if synchronous) by the handler. If + unset, no schedule-to-start timeout is enforced. + start_to_close_timeout: Maximum time to wait for an asynchronous + operation to complete after it has been started. Only applies to + asynchronous operations and is ignored for synchronous + operations. If unset, no start-to-close timeout is enforced. + search_attributes: Search attributes for the operation. + summary: Summary for the operation. + headers: Headers to attach to the Nexus request. + completion_callbacks: Callbacks that report the outcome of the + operation. Create them with + :py:func:`temporalio.nexus.create_completion_callback`. Each + callback must accept the output type of the operation. For a + string operation name, type checkers check callbacks against + ``result_type`` if it is set. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + A handle to the started operation. + """ + ... + + # Overload for nexusrpc.Operation + @overload + @abstractmethod + async def execute_operation( + self, + operation: nexusrpc.Operation[InputT, OutputT], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> OutputT: ... + + # Overload for string operation name with result_type. Callbacks must accept + # the result type. + @overload + @abstractmethod + async def execute_operation( + self, + operation: str, + arg: Any, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + result_type: type[OutputT], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> OutputT: ... + + # Overload for string operation name without result_type. Callbacks of any + # output type are accepted. + @overload + @abstractmethod + async def execute_operation( + self, + operation: str, + arg: Any, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + result_type: None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: ... + + # Overload for workflow_run_operation methods + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [NexusServiceType, temporalio.nexus.WorkflowRunOperationContext, InputT], + Awaitable[temporalio.nexus.WorkflowHandle[OutputT]], + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> OutputT: ... + + # Overload for sync_operation methods (async def) + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [NexusServiceType, nexusrpc.handler.StartOperationContext, InputT], + Awaitable[OutputT], + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> OutputT: ... + + # Overload for sync_operation methods (async def) + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [NexusServiceType, nexusrpc.handler.StartOperationContext, InputT], + OutputT, + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> OutputT: ... + + # Overload for operation_handler + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [NexusServiceType], + nexusrpc.handler.OperationHandler[InputT, OutputT], + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> OutputT: ... + + # Overload for temporal_operation methods + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [ + NexusServiceType, + temporalio.nexus.TemporalStartOperationContext, + temporalio.nexus.TemporalNexusClient, + InputT, + ], + Awaitable[temporalio.nexus.TemporalOperationResult[OutputT]], + ], + arg: InputT, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[ + temporalio.nexus.CompletionCallback[OutputT] + ] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> OutputT: ... + + @abstractmethod + async def execute_operation( + self, + operation: nexusrpc.Operation[Any, Any] | str | Callable[..., Any], + arg: Any, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[temporalio.nexus.CompletionCallback[Any]] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: + """Start a Nexus operation and wait for its result. + + .. warning:: + This API is experimental and unstable. + + This is a shortcut for ``await (await nexus_client.start_operation(...)).result()``. + + Args: + operation: The operation to execute. Can be a ``nexusrpc.Operation``, + a callable operation method, or a string name. + arg: Input argument for the operation. + id: Unique identifier for this operation. + id_reuse_policy: Policy for reusing operation IDs. + id_conflict_policy: Policy for handling ID conflicts. + result_type: For string operation names, this can set the specific + result type hint to deserialize into. + schedule_to_close_timeout: End-to-end timeout for the Nexus + operation. If unset, defaults to the maximum allowed by the + Temporal server. + schedule_to_start_timeout: Maximum time to wait for the operation + to be started (or completed, if synchronous) by the handler. If + unset, no schedule-to-start timeout is enforced. + start_to_close_timeout: Maximum time to wait for an asynchronous + operation to complete after it has been started. Only applies to + asynchronous operations and is ignored for synchronous + operations. If unset, no start-to-close timeout is enforced. + search_attributes: Search attributes for the operation. + summary: Summary for the operation. + headers: Headers to attach to the Nexus request. + completion_callbacks: Callbacks that report the outcome of the + operation. Create them with + :py:func:`temporalio.nexus.create_completion_callback`. Each + callback must accept the output type of the operation. For a + string operation name, type checkers check callbacks against + ``result_type`` if it is set. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + The result of the operation. + """ + ... + + +class _NexusClient(NexusClient[NexusServiceType]): # pyright: ignore[reportUnusedClass] + """Concrete implementation of NexusClient.""" + + def __init__( + self, + client: Client, + service: type[NexusServiceType] | str, + endpoint: str, + ) -> None: + self._client = client + if isinstance(service, str): + self._service_name = service + elif service_defn := nexusrpc.get_service_definition(service): + self._service_name = service_defn.name + else: + self._service_name = service.__name__ + self._endpoint = endpoint + + def _resolve_operation( + self, + operation: nexusrpc.Operation[Any, Any] | str | Callable[..., Any], + ) -> tuple[str, type | None]: + """Resolve an operation to its name and output type.""" + if isinstance(operation, str): + return operation, None + elif isinstance(operation, nexusrpc.Operation): + return operation.name, operation.output_type + elif callable(operation): + _, op = temporalio.nexus._util.get_operation_factory(operation) + if isinstance(op, nexusrpc.Operation): + return op.name, op.output_type + else: + raise ValueError( + f"Operation callable is not a Nexus operation: {operation}" + ) + else: + raise ValueError( # pyright: ignore[reportUnreachable] + f"Operation is not resolvable as a Nexus operation: {operation}" + ) + + async def start_operation( + self, + operation: nexusrpc.Operation[Any, Any] | str | Callable[..., Any], + arg: Any, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[temporalio.nexus.CompletionCallback[Any]] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationHandle[Any]: + """Start a Nexus operation and return a handle. + + .. warning:: + This API is experimental and unstable. + """ + op_name, output_type = self._resolve_operation(operation) + final_result_type: type | None = ( + result_type if isinstance(operation, str) else output_type + ) + + return await self._client._impl.start_nexus_operation( + StartNexusOperationInput( + operation=op_name, + arg=arg, + id=id, + endpoint=self._endpoint, + service=self._service_name, + result_type=final_result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + search_attributes=search_attributes, + summary=summary, + headers=dict(headers) if headers else {}, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + completion_callbacks=completion_callbacks, + ) + ) + + async def execute_operation( + self, + operation: nexusrpc.Operation[Any, Any] | str | Callable[..., Any], + arg: Any, + *, + id: str, + id_reuse_policy: temporalio.common.NexusOperationIDReusePolicy = temporalio.common.NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.NexusOperationIDConflictPolicy = temporalio.common.NexusOperationIDConflictPolicy.FAIL, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + headers: Mapping[str, str] | None = None, + completion_callbacks: Sequence[temporalio.nexus.CompletionCallback[Any]] = (), + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: + """Start a Nexus operation and wait for its result. + + .. warning:: + This API is experimental and unstable. + """ + handle = await self.start_operation( + operation, + arg, + id=id, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + search_attributes=search_attributes, + summary=summary, + headers=headers, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + completion_callbacks=completion_callbacks, + ) + return await handle.result() + + +class NexusOperationHandle(Generic[ReturnType]): + """Handle representing a standalone Nexus operation execution. + + .. warning:: + This API is experimental and unstable. + """ + + def __init__( + self, + client: Client, + operation_id: str, + *, + run_id: str | None = None, + result_type: type | None = None, + endpoint: str = "", + service: str = "", + operation: str = "", + ) -> None: + """Create nexus operation handle.""" + self._client = client + self._operation_id = operation_id + self._run_id = run_id + self._result_type = result_type + self._endpoint = endpoint + self._service = service + self._operation = operation + # the default value is `_arg_unset` because ReturnType could be None + self._known_outcome: ReturnType | NexusOperationFailureError | object = ( + temporalio.common._arg_unset + ) + + @property + def operation_id(self) -> str: + """ID of the operation.""" + return self._operation_id + + @property + def run_id(self) -> str | None: + """Run ID of the operation.""" + return self._run_id + + @property + def endpoint(self) -> str: + """Endpoint name.""" + return self._endpoint + + @property + def service(self) -> str: + """Service name.""" + return self._service + + async def result( + self, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: + """Wait for result of the Nexus operation. + + .. warning:: + This API is experimental and unstable. + + The result may already be known if this method has been called before, + in which case no network call is made. Otherwise the result will be + polled for until it is available. + + Args: + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. Note: + this is the timeout for each RPC call while polling, not a + timeout for the function as a whole. If an individual RPC + times out, it will be retried until the result is available. + + Returns: + The result of the operation. + + Raises: + NexusOperationFailureError: If the operation completed with a failure. + RPCError: Operation result could not be fetched for some reason. + """ + if self._known_outcome is temporalio.common._arg_unset: + try: + self._known_outcome = ( + await self._client._impl.get_nexus_operation_result( + GetNexusOperationResultInput( + operation_id=self._operation_id, + run_id=self._run_id, + endpoint=self._endpoint, + service=self._service, + operation=self._operation, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + result_type=self._result_type, + ) + ) + ) + return cast(ReturnType, self._known_outcome) + except NexusOperationFailureError as failure: + self._known_outcome = failure + raise + elif isinstance(self._known_outcome, NexusOperationFailureError): + raise self._known_outcome + else: + return cast(ReturnType, self._known_outcome) + + async def describe( + self, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> NexusOperationExecutionDescription: + """Describe the Nexus operation execution. + + .. warning:: + This API is experimental and unstable. + + Args: + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + Nexus operation execution description. + """ + return await self._client._impl.describe_nexus_operation( + DescribeNexusOperationInput( + operation_id=self._operation_id, + run_id=self._run_id, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def cancel( + self, + *, + reason: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Request cancellation of the Nexus operation. + + .. warning:: + This API is experimental and unstable. + + Args: + reason: Reason for the cancellation. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.cancel_nexus_operation( + CancelNexusOperationInput( + operation_id=self._operation_id, + run_id=self._run_id, + reason=reason, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def terminate( + self, + *, + reason: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Terminate the Nexus operation execution immediately. + + .. warning:: + This API is experimental and unstable. + + Args: + reason: Reason for the termination. + rpc_metadata: Headers used on the RPC call. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.terminate_nexus_operation( + TerminateNexusOperationInput( + operation_id=self._operation_id, + run_id=self._run_id, + reason=reason, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + +class NexusOperationExecutionAsyncIterator: + """Asynchronous iterator for Nexus operation execution values. + + You should typically use ``async for`` on this iterator and not call any of its methods. + + .. warning:: + This API is experimental and unstable. + """ + + def __init__( + self, + client: Client, + input: ListNexusOperationsInput, + ) -> None: + """Create an asynchronous iterator for the given input. + + Users should not create this directly, but rather use + :py:meth:`Client.list_nexus_operations`. + """ + self._client = client + self._input = input + self._next_page_token = input.next_page_token + self._current_page: Sequence[NexusOperationExecution] | None = None + self._current_page_index = 0 + self._limit = input.limit + self._yielded = 0 + + @property + def current_page_index(self) -> int: + """Index of the entry in the current page that will be returned from + the next :py:meth:`__anext__` call. + """ + return self._current_page_index + + @property + def current_page(self) -> Sequence[NexusOperationExecution] | None: + """Current page, if it has been fetched yet.""" + return self._current_page + + @property + def next_page_token(self) -> bytes | None: + """Token for the next page request if any.""" + return self._next_page_token + + async def fetch_next_page(self, *, page_size: int | None = None) -> None: + """Fetch the next page of results. + + Args: + page_size: Override the page size this iterator was originally + created with. + """ + page_size = page_size or self._input.page_size + if self._limit is not None and self._limit - self._yielded < page_size: + page_size = self._limit - self._yielded + + resp = await self._client.workflow_service.list_nexus_operation_executions( + temporalio.api.workflowservice.v1.ListNexusOperationExecutionsRequest( + namespace=self._client.namespace, + page_size=page_size, + next_page_token=self._next_page_token or b"", + query=self._input.query or "", + ), + retry=True, + metadata=self._input.rpc_metadata, + timeout=self._input.rpc_timeout, + ) + + self._current_page = [ + NexusOperationExecution._from_raw_info(v) for v in resp.operations + ] + self._current_page_index = 0 + self._next_page_token = resp.next_page_token or None + + def __aiter__(self) -> NexusOperationExecutionAsyncIterator: + """Return self as the iterator.""" + return self + + async def __anext__(self) -> NexusOperationExecution: + """Get the next execution on this iterator, fetching next page if + necessary. + """ + if self._limit is not None and self._yielded >= self._limit: + raise StopAsyncIteration + while True: + # No page? fetch and continue + if self._current_page is None: + await self.fetch_next_page() + continue + # No more left in page? + if self._current_page_index >= len(self._current_page): + # If there is a next page token, try to get another page and try + # again + if self._next_page_token is not None: + await self.fetch_next_page() + continue + # No more pages means we're done + raise StopAsyncIteration + # Get current, increment page index, and return + ret = self._current_page[self._current_page_index] + self._current_page_index += 1 + self._yielded += 1 + return ret diff --git a/temporalio/client/_plugin.py b/temporalio/client/_plugin.py new file mode 100644 index 0000000000..fb1bf6e134 --- /dev/null +++ b/temporalio/client/_plugin.py @@ -0,0 +1,86 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +import abc +from abc import abstractmethod +from collections.abc import ( + Awaitable, + Callable, +) +from typing import ( + TYPE_CHECKING, +) + +from temporalio.service import ( + ConnectConfig, + ServiceClient, +) + +if TYPE_CHECKING: + from ._client import ClientConfig + + +class Plugin(abc.ABC): + """Base class for client plugins that can intercept and modify client behavior. + + Plugins allow customization of client creation and service connection processes + through a chain of responsibility pattern. Each plugin can modify the client + configuration or intercept service client connections. + + If the plugin is also a temporalio.worker.Plugin, it will additionally be propagated as a worker plugin. + You should likley not also provide it to the worker as that will result in the plugin being applied twice. + """ + + def name(self) -> str: + """Get the name of this plugin. Can be overridden if desired to provide a more appropriate name. + + Returns: + The fully qualified name of the plugin class (module.classname). + """ + return type(self).__module__ + "." + type(self).__qualname__ + + def version(self) -> str: + """Get the version of this plugin. Can be overridden to provide a version. + + Clients don't report plugin versions yet. A plugin that is also a + temporalio.worker.Plugin reports its version in worker heartbeats. + + Returns: + The version of the plugin. Empty by default. + """ + return "" + + @abstractmethod + def configure_client(self, config: ClientConfig) -> ClientConfig: + """Hook called when creating a client to allow modification of configuration. + + This method is called during client creation and allows plugins to modify + the client configuration before the client is fully initialized. Plugins + can add interceptors, modify connection parameters, or change other settings. + + Args: + config: The client configuration dictionary to potentially modify. + + Returns: + The modified client configuration. + """ + + @abstractmethod + async def connect_service_client( + self, + config: ConnectConfig, + next: Callable[[ConnectConfig], Awaitable[ServiceClient]], + ) -> ServiceClient: + """Hook called when connecting to the Temporal service. + + This method is called during service client connection and allows plugins + to intercept or modify the connection process. Plugins can modify connection + parameters, add authentication, or provide custom connection logic. + + Args: + config: The service connection configuration. + + Returns: + The connected service client. + """ diff --git a/temporalio/client/_schedule.py b/temporalio/client/_schedule.py new file mode 100644 index 0000000000..7f4b438c09 --- /dev/null +++ b/temporalio/client/_schedule.py @@ -0,0 +1,1609 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +import dataclasses +from abc import ABC, abstractmethod +from collections.abc import ( + Awaitable, + Callable, + Mapping, + Sequence, +) +from dataclasses import dataclass +from datetime import datetime, timedelta, timezone +from enum import IntEnum +from typing import ( + TYPE_CHECKING, + Any, + Concatenate, + overload, +) + +import google.protobuf.duration_pb2 +import google.protobuf.timestamp_pb2 + +import temporalio.api.common.v1 +import temporalio.api.enums.v1 +import temporalio.api.schedule.v1 +import temporalio.api.taskqueue.v1 +import temporalio.api.workflow.v1 +import temporalio.api.workflowservice.v1 +import temporalio.common +import temporalio.converter +import temporalio.workflow +from temporalio.converter import ( + StorageDriverStoreContext, + StorageDriverWorkflowInfo, + WorkflowSerializationContext, +) + +from ..common import HeaderCodecBehavior +from ..types import ( + AnyType, + MethodAsyncNoParam, + MethodAsyncSingleParam, + MultiParamSpec, + ParamType, + ReturnType, + SelfType, +) +from ._helpers import _apply_headers, _encode_user_metadata +from ._interceptor import ( + BackfillScheduleInput, + DeleteScheduleInput, + DescribeScheduleInput, + PauseScheduleInput, + TriggerScheduleInput, + UnpauseScheduleInput, + UpdateScheduleInput, +) + +if TYPE_CHECKING: + from ._client import Client + from ._interceptor import ListSchedulesInput + + +class ScheduleHandle: + """Handle for interacting with a schedule. + + This is usually created via :py:meth:`Client.get_schedule_handle` or + returned from :py:meth:`Client.create_schedule`. + + Attributes: + id: ID of the schedule. + """ + + def __init__(self, client: Client, id: str) -> None: + """Create schedule handle.""" + self._client = client + self.id = id + + async def backfill( + self, + *backfill: ScheduleBackfill, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Backfill the schedule by going through the specified time periods as + if they passed right now. + + Args: + backfill: Backfill periods. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + if not backfill: + raise ValueError("At least one backfill required") + await self._client._impl.backfill_schedule( + BackfillScheduleInput( + id=self.id, + backfills=backfill, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ), + ) + + async def delete( + self, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Delete this schedule. + + Args: + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.delete_schedule( + DeleteScheduleInput( + id=self.id, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ), + ) + + async def describe( + self, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ScheduleDescription: + """Fetch this schedule's description. + + Args: + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + return await self._client._impl.describe_schedule( + DescribeScheduleInput( + id=self.id, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ), + ) + + async def pause( + self, + *, + note: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Pause the schedule and set a note. + + Args: + note: Note to set on the schedule. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.pause_schedule( + PauseScheduleInput( + id=self.id, + note=note, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ), + ) + + async def trigger( + self, + *, + overlap: ScheduleOverlapPolicy | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Trigger an action on this schedule to happen immediately. + + Args: + overlap: If set, overrides the schedule's overlap policy. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.trigger_schedule( + TriggerScheduleInput( + id=self.id, + overlap=overlap, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ), + ) + + async def unpause( + self, + *, + note: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Unpause the schedule and set a note. + + Args: + note: Note to set on the schedule. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + """ + await self._client._impl.unpause_schedule( + UnpauseScheduleInput( + id=self.id, + note=note, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ), + ) + + @overload + async def update( + self, + updater: Callable[[ScheduleUpdateInput], ScheduleUpdate | None], + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: ... + + @overload + async def update( + self, + updater: Callable[[ScheduleUpdateInput], Awaitable[ScheduleUpdate | None]], + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: ... + + async def update( + self, + updater: Callable[ + [ScheduleUpdateInput], + ScheduleUpdate | None | Awaitable[ScheduleUpdate | None], + ], + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Update a schedule using a callback to build the update from the + description. + + The callback may be invoked multiple times in a conflict-resolution + loop. + + Args: + updater: Callback that returns the update. It accepts a + :py:class:`ScheduleUpdateInput` and returns a + :py:class:`ScheduleUpdate`. If None is returned or an error + occurs, the update is not attempted. This may be called multiple + times. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. This is for every call made + within. + rpc_timeout: Optional RPC deadline to set for the RPC call. This is + for each call made within, not overall. + """ + await self._client._impl.update_schedule( + UpdateScheduleInput( + id=self.id, + updater=updater, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ), + ) + + +@dataclass +class ScheduleSpec: + """Specification of the times scheduled actions may occur. + + The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and + :py:attr:`cron_expressions` excluding anything in :py:attr:`skip`. + """ + + calendars: Sequence[ScheduleCalendarSpec] = dataclasses.field(default_factory=list) + """Calendar-based specification of times.""" + + intervals: Sequence[ScheduleIntervalSpec] = dataclasses.field(default_factory=list) + """Interval-based specification of times.""" + + cron_expressions: Sequence[str] = dataclasses.field(default_factory=list) + """Cron-based specification of times. + + This is provided for easy migration from legacy string-based cron + scheduling. New uses should use :py:attr:`calendars` instead. These + expressions will be translated to calendar-based specifications on the + server. + """ + + skip: Sequence[ScheduleCalendarSpec] = dataclasses.field(default_factory=list) + """Set of matching calendar times that will be skipped.""" + + start_at: datetime | None = None + """Time before which any matching times will be skipped.""" + + end_at: datetime | None = None + """Time after which any matching times will be skipped.""" + + jitter: timedelta | None = None + """Jitter to apply each action. + + An action's scheduled time will be incremented by a random value between 0 + and this value if present (but not past the next schedule). + """ + + time_zone_name: str | None = None + """IANA time zone name, for example ``US/Central``.""" + + @staticmethod + def _from_proto(spec: temporalio.api.schedule.v1.ScheduleSpec) -> ScheduleSpec: + return ScheduleSpec( + calendars=[ + ScheduleCalendarSpec._from_proto(c) for c in spec.structured_calendar + ], + intervals=[ScheduleIntervalSpec._from_proto(i) for i in spec.interval], + cron_expressions=spec.cron_string, + skip=[ + ScheduleCalendarSpec._from_proto(c) + for c in spec.exclude_structured_calendar + ], + start_at=spec.start_time.ToDatetime().replace(tzinfo=timezone.utc) + if spec.HasField("start_time") + else None, + end_at=spec.end_time.ToDatetime().replace(tzinfo=timezone.utc) + if spec.HasField("end_time") + else None, + jitter=spec.jitter.ToTimedelta() if spec.HasField("jitter") else None, + time_zone_name=spec.timezone_name or None, + ) + + def _to_proto(self) -> temporalio.api.schedule.v1.ScheduleSpec: + start_time: google.protobuf.timestamp_pb2.Timestamp | None = None + if self.start_at: + start_time = google.protobuf.timestamp_pb2.Timestamp() + start_time.FromDatetime(self.start_at) + end_time: google.protobuf.timestamp_pb2.Timestamp | None = None + if self.end_at: + end_time = google.protobuf.timestamp_pb2.Timestamp() + end_time.FromDatetime(self.end_at) + jitter: google.protobuf.duration_pb2.Duration | None = None + if self.jitter: + jitter = google.protobuf.duration_pb2.Duration() + jitter.FromTimedelta(self.jitter) + return temporalio.api.schedule.v1.ScheduleSpec( + structured_calendar=[cal._to_proto() for cal in self.calendars], + cron_string=self.cron_expressions, + interval=[i._to_proto() for i in self.intervals], + exclude_structured_calendar=[cal._to_proto() for cal in self.skip], + start_time=start_time, + end_time=end_time, + jitter=jitter, + timezone_name=self.time_zone_name or "", + ) + + +@dataclass(frozen=True) +class ScheduleRange: + """Inclusive range for a schedule match value.""" + + start: int + """Inclusive start of the range.""" + + end: int = 0 + """Inclusive end of the range. + + If unset or less than start, defaults to start. + """ + + step: int = 0 + """ + Step to take between each value. + + Unset or 0 defaults as 1. + """ + + def __post_init__(self): + """Set field defaults.""" + # Class is frozen, so we must setattr bypassing dataclass setattr + if self.end < self.start: + object.__setattr__(self, "end", self.start) + if self.step == 0: + object.__setattr__(self, "step", 1) + + @staticmethod + def _from_protos( + ranges: Sequence[temporalio.api.schedule.v1.Range], + ) -> Sequence[ScheduleRange]: + return tuple(ScheduleRange._from_proto(r) for r in ranges) + + @staticmethod + def _from_proto(range: temporalio.api.schedule.v1.Range) -> ScheduleRange: + return ScheduleRange(start=range.start, end=range.end, step=range.step) + + @staticmethod + def _to_protos( + ranges: Sequence[ScheduleRange], + ) -> Sequence[temporalio.api.schedule.v1.Range]: + return tuple(r._to_proto() for r in ranges) + + def _to_proto(self) -> temporalio.api.schedule.v1.Range: + return temporalio.api.schedule.v1.Range( + start=self.start, end=self.end, step=self.step + ) + + +@dataclass +class ScheduleCalendarSpec: + """Specification relative to calendar time when to run an action. + + A timestamp matches if at least one range of each field matches except for + year. If year is missing, that means all years match. For all fields besides + year, at least one range must be present to match anything. + """ + + second: Sequence[ScheduleRange] = (ScheduleRange(0),) + """Second range to match, 0-59. Default matches 0.""" + + minute: Sequence[ScheduleRange] = (ScheduleRange(0),) + """Minute range to match, 0-59. Default matches 0.""" + + hour: Sequence[ScheduleRange] = (ScheduleRange(0),) + """Hour range to match, 0-23. Default matches 0.""" + + day_of_month: Sequence[ScheduleRange] = (ScheduleRange(1, 31),) + """Day of month range to match, 1-31. Default matches all days.""" + + month: Sequence[ScheduleRange] = (ScheduleRange(1, 12),) + """Month range to match, 1-12. Default matches all months.""" + + year: Sequence[ScheduleRange] = () + """Optional year range to match. Default of empty matches all years.""" + + day_of_week: Sequence[ScheduleRange] = (ScheduleRange(0, 6),) + """Day of week range to match, 0-6, 0 is Sunday. Default matches all + days.""" + + comment: str | None = None + """Description of this schedule.""" + + @staticmethod + def _from_proto( + spec: temporalio.api.schedule.v1.StructuredCalendarSpec, + ) -> ScheduleCalendarSpec: + return ScheduleCalendarSpec( + second=ScheduleRange._from_protos(spec.second), + minute=ScheduleRange._from_protos(spec.minute), + hour=ScheduleRange._from_protos(spec.hour), + day_of_month=ScheduleRange._from_protos(spec.day_of_month), + month=ScheduleRange._from_protos(spec.month), + year=ScheduleRange._from_protos(spec.year), + day_of_week=ScheduleRange._from_protos(spec.day_of_week), + comment=spec.comment or None, + ) + + def _to_proto(self) -> temporalio.api.schedule.v1.StructuredCalendarSpec: + return temporalio.api.schedule.v1.StructuredCalendarSpec( + second=ScheduleRange._to_protos(self.second), + minute=ScheduleRange._to_protos(self.minute), + hour=ScheduleRange._to_protos(self.hour), + day_of_month=ScheduleRange._to_protos(self.day_of_month), + month=ScheduleRange._to_protos(self.month), + year=ScheduleRange._to_protos(self.year), + day_of_week=ScheduleRange._to_protos(self.day_of_week), + comment=self.comment or "", + ) + + +@dataclass +class ScheduleIntervalSpec: + """Specification for scheduling on an interval. + + Matches times expressed as epoch + (n * every) + offset. + """ + + every: timedelta + """Period to repeat the interval.""" + + offset: timedelta | None = None + """Fixed offset added to each interval period.""" + + @staticmethod + def _from_proto( + spec: temporalio.api.schedule.v1.IntervalSpec, + ) -> ScheduleIntervalSpec: + return ScheduleIntervalSpec( + every=spec.interval.ToTimedelta(), + offset=spec.phase.ToTimedelta() if spec.HasField("phase") else None, + ) + + def _to_proto(self) -> temporalio.api.schedule.v1.IntervalSpec: + interval = google.protobuf.duration_pb2.Duration() + interval.FromTimedelta(self.every) + phase: google.protobuf.duration_pb2.Duration | None = None + if self.offset: + phase = google.protobuf.duration_pb2.Duration() + phase.FromTimedelta(self.offset) + return temporalio.api.schedule.v1.IntervalSpec(interval=interval, phase=phase) + + +class ScheduleAction(ABC): + """Base class for an action a schedule can take. + + See :py:class:`ScheduleActionStartWorkflow` for the most commonly used + implementation. + """ + + @staticmethod + def _from_proto( + action: temporalio.api.schedule.v1.ScheduleAction, + ) -> ScheduleAction: + if action.HasField("start_workflow"): + return ScheduleActionStartWorkflow._from_proto(action.start_workflow) + else: + raise ValueError(f"Unsupported action: {action.WhichOneof('action')}") + + @abstractmethod + async def _to_proto( + self, client: Client + ) -> temporalio.api.schedule.v1.ScheduleAction: ... + + +@dataclass +class ScheduleActionStartWorkflow(ScheduleAction): + """Schedule action to start a workflow.""" + + workflow: str + args: Sequence[Any] | Sequence[temporalio.api.common.v1.Payload] + id: str + task_queue: str + execution_timeout: timedelta | None + run_timeout: timedelta | None + task_timeout: timedelta | None + retry_policy: temporalio.common.RetryPolicy | None + memo: None | (Mapping[str, Any] | Mapping[str, temporalio.api.common.v1.Payload]) + typed_search_attributes: temporalio.common.TypedSearchAttributes + untyped_search_attributes: temporalio.common.SearchAttributes + """This is deprecated and is only present in case existing untyped + attributes already exist for update. This should never be used when + creating.""" + static_summary: str | temporalio.api.common.v1.Payload | None + static_details: str | temporalio.api.common.v1.Payload | None + priority: temporalio.common.Priority + + headers: Mapping[str, temporalio.api.common.v1.Payload] | None + """ + Headers may still be encoded by the payload codec if present. + """ + _from_raw: bool = dataclasses.field(compare=False, init=False) + + @staticmethod + def _from_proto( # pyright: ignore + info: temporalio.api.workflow.v1.NewWorkflowExecutionInfo, # type: ignore[override] + ) -> ScheduleActionStartWorkflow: + return ScheduleActionStartWorkflow("", raw_info=info) + + # Overload for no-param workflow + @overload + def __init__( + self, + workflow: MethodAsyncNoParam[SelfType, ReturnType], + *, + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, + static_summary: str | None = None, + static_details: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + ) -> None: ... + + # Overload for single-param workflow + @overload + def __init__( + self, + workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, + static_summary: str | None = None, + static_details: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + ) -> None: ... + + # Overload for multi-param workflow + @overload + def __init__( + self, + workflow: Callable[ + Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] + ], + *, + args: Sequence[Any], + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, + static_summary: str | None = None, + static_details: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + ) -> None: ... + + # Overload for string-name workflow + @overload + def __init__( + self, + workflow: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, + static_summary: str | None = None, + static_details: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + ) -> None: ... + + # Overload for raw info + @overload + def __init__( + self, + workflow: str, + *, + raw_info: temporalio.api.workflow.v1.NewWorkflowExecutionInfo, + ) -> None: ... + + def __init__( + self, + workflow: str | Callable[..., Awaitable[Any]], + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str | None = None, + task_queue: str | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + typed_search_attributes: temporalio.common.TypedSearchAttributes = temporalio.common.TypedSearchAttributes.empty, + untyped_search_attributes: temporalio.common.SearchAttributes = {}, + static_summary: str | None = None, + static_details: str | None = None, + headers: Mapping[str, temporalio.api.common.v1.Payload] | None = None, + raw_info: temporalio.api.workflow.v1.NewWorkflowExecutionInfo | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + ) -> None: + """Create a start-workflow action. + + See :py:meth:`Client.start_workflow` for details on these parameter + values. + """ + super().__init__() + if raw_info: + self._from_raw = True + # Ignore other fields + self.workflow = raw_info.workflow_type.name + self.args = raw_info.input.payloads if raw_info.input else [] + self.id = raw_info.workflow_id + self.task_queue = raw_info.task_queue.name + self.execution_timeout = ( + raw_info.workflow_execution_timeout.ToTimedelta() + if raw_info.HasField("workflow_execution_timeout") + else None + ) + self.run_timeout = ( + raw_info.workflow_run_timeout.ToTimedelta() + if raw_info.HasField("workflow_run_timeout") + else None + ) + self.task_timeout = ( + raw_info.workflow_task_timeout.ToTimedelta() + if raw_info.HasField("workflow_task_timeout") + else None + ) + self.retry_policy = ( + temporalio.common.RetryPolicy.from_proto(raw_info.retry_policy) + if raw_info.HasField("retry_policy") + else None + ) + self.memo = raw_info.memo.fields if raw_info.memo.fields else None + self.typed_search_attributes = ( + temporalio.converter.decode_typed_search_attributes( + raw_info.search_attributes + ) + ) + self.headers = raw_info.header.fields if raw_info.header.fields else None + # Also set the untyped attributes as the set of attributes from + # decode with the typed ones removed + self.untyped_search_attributes = ( + temporalio.converter.decode_search_attributes( + raw_info.search_attributes + ) + ) + for pair in self.typed_search_attributes: + if pair.key.name in self.untyped_search_attributes: + # We know this is mutable here + del self.untyped_search_attributes[pair.key.name] # type: ignore + self.static_summary = ( + raw_info.user_metadata.summary + if raw_info.HasField("user_metadata") and raw_info.user_metadata.summary + else None + ) + self.static_details = ( + raw_info.user_metadata.details + if raw_info.HasField("user_metadata") and raw_info.user_metadata.details + else None + ) + self.priority = ( + temporalio.common.Priority._from_proto(raw_info.priority) + if raw_info.HasField("priority") and raw_info.priority + else temporalio.common.Priority.default + ) + else: + self._from_raw = False + if not id: + raise ValueError("ID required") + if not task_queue: + raise ValueError("Task queue required") + # Use definition if callable + if callable(workflow): + defn = temporalio.workflow._Definition.must_from_run_fn(workflow) + if not defn.name: + raise ValueError("Cannot schedule dynamic workflow explicitly") + workflow = defn.name + elif not isinstance(workflow, str): + raise TypeError("Workflow must be a string or callable") # type:ignore[reportUnreachable] + self.workflow = workflow + self.args = temporalio.common._arg_or_args(arg, args) + self.id = id + self.task_queue = task_queue + self.execution_timeout = execution_timeout + self.run_timeout = run_timeout + self.task_timeout = task_timeout + self.retry_policy = retry_policy + self.memo = memo + self.typed_search_attributes = typed_search_attributes + self.untyped_search_attributes = untyped_search_attributes + self.headers = headers # encode here + self.static_summary = static_summary + self.static_details = static_details + self.priority = priority + + async def _to_proto( + self, client: Client + ) -> temporalio.api.schedule.v1.ScheduleAction: + execution_timeout: google.protobuf.duration_pb2.Duration | None = None + if self.execution_timeout: + execution_timeout = google.protobuf.duration_pb2.Duration() + execution_timeout.FromTimedelta(self.execution_timeout) + run_timeout: google.protobuf.duration_pb2.Duration | None = None + if self.run_timeout: + run_timeout = google.protobuf.duration_pb2.Duration() + run_timeout.FromTimedelta(self.run_timeout) + task_timeout: google.protobuf.duration_pb2.Duration | None = None + if self.task_timeout: + task_timeout = google.protobuf.duration_pb2.Duration() + task_timeout.FromTimedelta(self.task_timeout) + retry_policy: temporalio.api.common.v1.RetryPolicy | None = None + if self.retry_policy: + retry_policy = temporalio.api.common.v1.RetryPolicy() + self.retry_policy.apply_to_proto(retry_policy) + priority: temporalio.api.common.v1.Priority | None = None + if self.priority: + priority = self.priority._to_proto() + data_converter = client.data_converter._with_contexts( + WorkflowSerializationContext( + namespace=client.namespace, + workflow_id=self.id, + ), + StorageDriverStoreContext( + namespace=client.namespace, + target=StorageDriverWorkflowInfo( + id=self.id, type=self.workflow, namespace=client.namespace + ), + ), + ) + action = temporalio.api.schedule.v1.ScheduleAction( + start_workflow=temporalio.api.workflow.v1.NewWorkflowExecutionInfo( + workflow_id=self.id, + workflow_type=temporalio.api.common.v1.WorkflowType(name=self.workflow), + task_queue=temporalio.api.taskqueue.v1.TaskQueue(name=self.task_queue), + input=( + temporalio.api.common.v1.Payloads( + payloads=[ + a + if isinstance(a, temporalio.api.common.v1.Payload) + else (await data_converter.encode([a]))[0] + for a in self.args + ] + ) + if self.args + else None + ), + workflow_execution_timeout=execution_timeout, + workflow_run_timeout=run_timeout, + workflow_task_timeout=task_timeout, + retry_policy=retry_policy, + memo=await data_converter._encode_memo(self.memo) + if self.memo + else None, + user_metadata=await _encode_user_metadata( + data_converter, self.static_summary, self.static_details + ), + priority=priority, + ), + ) + # Add any untyped attributes that are not also in the typed set + untyped_not_in_typed = { + k: v + for k, v in self.untyped_search_attributes.items() + if k not in self.typed_search_attributes + } + if untyped_not_in_typed: + temporalio.converter.encode_search_attributes( + untyped_not_in_typed, action.start_workflow.search_attributes + ) + # TODO (dan): confirm whether this be `is not None` + if self.typed_search_attributes: + temporalio.converter.encode_search_attributes( + self.typed_search_attributes, + action.start_workflow.search_attributes, + ) + if self.headers: + await _apply_headers( + self.headers, + action.start_workflow.header.fields, + client.config(active_config=True)["header_codec_behavior"] + == HeaderCodecBehavior.CODEC + and not self._from_raw, + client.data_converter._with_store_context( + StorageDriverStoreContext(namespace=client.namespace) + ), + ) + return action + + +class ScheduleOverlapPolicy(IntEnum): + """Controls what happens when a workflow would be started by a schedule but + one is already running. + """ + + SKIP = int( + temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_SKIP + ) + """Don't start anything. + + When the workflow completes, the next scheduled event after that time will + be considered. + """ + + BUFFER_ONE = int( + temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_BUFFER_ONE + ) + """Start the workflow again soon as the current one completes, but only + buffer one start in this way. + + If another start is supposed to happen when the workflow is running, and one + is already buffered, then only the first one will be started after the + running workflow finishes. + """ + + BUFFER_ALL = int( + temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_BUFFER_ALL + ) + """Buffer up any number of starts to all happen sequentially, immediately + after the running workflow completes.""" + + CANCEL_OTHER = int( + temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER + ) + """If there is another workflow running, cancel it, and start the new one + after the old one completes cancellation.""" + + TERMINATE_OTHER = int( + temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER + ) + """If there is another workflow running, terminate it and start the new one + immediately.""" + + ALLOW_ALL = int( + temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_ALLOW_ALL + ) + """Start any number of concurrent workflows. + + Note that with this policy, last completion result and last failure will not + be available since workflows are not sequential.""" + + +@dataclass +class ScheduleBackfill: + """Time period and policy for actions taken as if the time passed right + now. + """ + + start_at: datetime + """Start of the range to evaluate the schedule in. + + This is exclusive + """ + end_at: datetime + overlap: ScheduleOverlapPolicy | None = None + + def _to_proto(self) -> temporalio.api.schedule.v1.BackfillRequest: + start_time = google.protobuf.timestamp_pb2.Timestamp() + start_time.FromDatetime(self.start_at) + end_time = google.protobuf.timestamp_pb2.Timestamp() + end_time.FromDatetime(self.end_at) + overlap_policy = temporalio.api.enums.v1.ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_UNSPECIFIED + if self.overlap: + overlap_policy = temporalio.api.enums.v1.ScheduleOverlapPolicy.ValueType( + self.overlap + ) + return temporalio.api.schedule.v1.BackfillRequest( + start_time=start_time, + end_time=end_time, + overlap_policy=overlap_policy, + ) + + +@dataclass +class SchedulePolicy: + """Policies of a schedule.""" + + overlap: ScheduleOverlapPolicy = dataclasses.field( + default_factory=lambda: ScheduleOverlapPolicy.SKIP + ) + """Controls what happens when an action is started while another is still + running.""" + + catchup_window: timedelta | None = None + """After a Temporal server is unavailable, amount of time in the past to + execute missed actions. If None, the server configured default is used (currently one year).""" + + pause_on_failure: bool = False + """Whether to pause the schedule if an action fails or times out. + + Note: For workflows, this only applies after all retries have been + exhausted. + """ + + @staticmethod + def _from_proto(pol: temporalio.api.schedule.v1.SchedulePolicies) -> SchedulePolicy: + return SchedulePolicy( + overlap=ScheduleOverlapPolicy(int(pol.overlap_policy)), + catchup_window=( + pol.catchup_window.ToTimedelta() + if pol.HasField("catchup_window") + else None + ), + pause_on_failure=pol.pause_on_failure, + ) + + def _to_proto(self) -> temporalio.api.schedule.v1.SchedulePolicies: + policy = temporalio.api.schedule.v1.SchedulePolicies( + overlap_policy=temporalio.api.enums.v1.ScheduleOverlapPolicy.ValueType( + self.overlap + ), + pause_on_failure=self.pause_on_failure, + ) + if self.catchup_window is not None: + policy.catchup_window.FromTimedelta(self.catchup_window) + return policy + + +@dataclass +class ScheduleState: + """State of a schedule.""" + + note: str | None = None + """Human readable message for the schedule. + + The system may overwrite this value on certain conditions like + pause-on-failure. + """ + + paused: bool = False + """Whether the schedule is paused.""" + + # Cannot be set to True on create + limited_actions: bool = False + """ + If true, remaining actions will be decremented for each action taken. + + On schedule create, this must be set to true if :py:attr:`remaining_actions` + is non-zero and left false if :py:attr:`remaining_actions` is zero. + """ + + remaining_actions: int = 0 + """Actions remaining on this schedule. + + Once this number hits 0, no further actions are scheduled automatically. + """ + + @staticmethod + def _from_proto(state: temporalio.api.schedule.v1.ScheduleState) -> ScheduleState: + return ScheduleState( + note=state.notes or None, + paused=state.paused, + limited_actions=state.limited_actions, + remaining_actions=state.remaining_actions, + ) + + def _to_proto(self) -> temporalio.api.schedule.v1.ScheduleState: + return temporalio.api.schedule.v1.ScheduleState( + notes=self.note or "", + paused=self.paused, + limited_actions=self.limited_actions, + remaining_actions=self.remaining_actions, + ) + + +@dataclass +class Schedule: + """A schedule for periodically running an action.""" + + action: ScheduleAction + """Action taken when scheduled.""" + + spec: ScheduleSpec + """When the action is taken.""" + + policy: SchedulePolicy = dataclasses.field(default_factory=SchedulePolicy) + """Schedule policies.""" + + state: ScheduleState = dataclasses.field(default_factory=ScheduleState) + """State of the schedule.""" + + @staticmethod + def _from_proto(sched: temporalio.api.schedule.v1.Schedule) -> Schedule: + return Schedule( + action=ScheduleAction._from_proto(sched.action), + spec=ScheduleSpec._from_proto(sched.spec), + policy=SchedulePolicy._from_proto(sched.policies), + state=ScheduleState._from_proto(sched.state), + ) + + async def _to_proto(self, client: Client) -> temporalio.api.schedule.v1.Schedule: + return temporalio.api.schedule.v1.Schedule( + spec=self.spec._to_proto(), + action=await self.action._to_proto(client), + policies=self.policy._to_proto(), + state=self.state._to_proto(), + ) + + +@dataclass +class ScheduleDescription: + """Description of a schedule.""" + + id: str + """ID of the schedule.""" + + schedule: Schedule + """Schedule details that can be mutated.""" + + info: ScheduleInfo + """Information about the schedule.""" + + typed_search_attributes: temporalio.common.TypedSearchAttributes + """Search attributes on the schedule.""" + + search_attributes: temporalio.common.SearchAttributes + """Search attributes on the schedule. + + .. deprecated:: + Use :py:attr:`typed_search_attributes` instead. + """ + + data_converter: temporalio.converter.DataConverter + """Data converter used for memo decoding.""" + + raw_description: temporalio.api.workflowservice.v1.DescribeScheduleResponse + """Raw description of the schedule.""" + + @staticmethod + def _from_proto( + id: str, + desc: temporalio.api.workflowservice.v1.DescribeScheduleResponse, + converter: temporalio.converter.DataConverter, + ) -> ScheduleDescription: + return ScheduleDescription( + id=id, + schedule=Schedule._from_proto(desc.schedule), + info=ScheduleInfo._from_proto(desc.info), + typed_search_attributes=temporalio.converter.decode_typed_search_attributes( + desc.search_attributes + ), + search_attributes=temporalio.converter.decode_search_attributes( + desc.search_attributes + ), + data_converter=converter, + raw_description=desc, + ) + + async def memo(self) -> Mapping[str, Any]: + """Schedule's memo values, converted without type hints. + + Since type hints are not used, the default converted values will come + back. For example, if the memo was originally created with a dataclass, + the value will be a dict. To convert using proper type hints, use + :py:meth:`memo_value`. + + Returns: + Mapping of all memo keys and they values without type hints. + """ + return await self.data_converter._decode_memo(self.raw_description.memo) + + @overload + async def memo_value( + self, key: str, default: Any = temporalio.common._arg_unset + ) -> Any: ... + + @overload + async def memo_value( + self, key: str, *, type_hint: type[ParamType] + ) -> ParamType: ... + + @overload + async def memo_value( + self, key: str, default: AnyType, *, type_hint: type[ParamType] + ) -> AnyType | ParamType: ... + + async def memo_value( + self, + key: str, + default: Any = temporalio.common._arg_unset, + *, + type_hint: type | None = None, + ) -> Any: + """Memo value for the given key, optional default, and optional type + hint. + + Args: + key: Key to get memo value for. + default: Default to use if key is not present. If unset, a + :py:class:`KeyError` is raised when the key does not exist. + type_hint: type hint to use when converting. + + Returns: + Memo value, converted with the type hint if present. + + Raises: + KeyError: Key not present and default not set. + """ + return await self.data_converter._decode_memo_field( + self.raw_description.memo, key, default, type_hint + ) + + +@dataclass +class ScheduleInfo: + """Information about a schedule.""" + + num_actions: int + """Number of actions taken by this schedule.""" + + num_actions_missed_catchup_window: int + """Number of times an action was skipped due to missing the catchup + window.""" + + num_actions_skipped_overlap: int + """Number of actions skipped due to overlap.""" + + running_actions: Sequence[ScheduleActionExecution] + """Currently running actions.""" + + recent_actions: Sequence[ScheduleActionResult] + """10 most recent actions, oldest first.""" + + next_action_times: Sequence[datetime] + """Next 10 scheduled action times.""" + + created_at: datetime + """When the schedule was created.""" + + last_updated_at: datetime | None + """When the schedule was last updated.""" + + @staticmethod + def _from_proto(info: temporalio.api.schedule.v1.ScheduleInfo) -> ScheduleInfo: + return ScheduleInfo( + num_actions=info.action_count, + num_actions_missed_catchup_window=info.missed_catchup_window, + num_actions_skipped_overlap=info.overlap_skipped, + running_actions=[ + ScheduleActionExecutionStartWorkflow._from_proto(r) + for r in info.running_workflows + ], + recent_actions=[ + ScheduleActionResult._from_proto(r) for r in info.recent_actions + ], + next_action_times=[ + f.ToDatetime().replace(tzinfo=timezone.utc) + for f in info.future_action_times + ], + created_at=info.create_time.ToDatetime().replace(tzinfo=timezone.utc), + last_updated_at=info.update_time.ToDatetime().replace(tzinfo=timezone.utc) + if info.HasField("update_time") + else None, + ) + + +class ScheduleActionExecution(ABC): + """Base class for an action execution.""" + + pass + + +@dataclass +class ScheduleActionExecutionStartWorkflow(ScheduleActionExecution): + """Execution of a scheduled workflow start.""" + + workflow_id: str + """Workflow ID.""" + + first_execution_run_id: str + """Workflow run ID.""" + + @staticmethod + def _from_proto( + exec: temporalio.api.common.v1.WorkflowExecution, + ) -> ScheduleActionExecutionStartWorkflow: + return ScheduleActionExecutionStartWorkflow( + workflow_id=exec.workflow_id, + first_execution_run_id=exec.run_id, + ) + + +@dataclass +class ScheduleActionResult: + """Information about when an action took place.""" + + scheduled_at: datetime + """Scheduled time of the action including jitter.""" + + started_at: datetime + """When the action actually started.""" + + action: ScheduleActionExecution + """Action that took place.""" + + @staticmethod + def _from_proto( + res: temporalio.api.schedule.v1.ScheduleActionResult, + ) -> ScheduleActionResult: + return ScheduleActionResult( + scheduled_at=res.schedule_time.ToDatetime().replace(tzinfo=timezone.utc), + started_at=res.actual_time.ToDatetime().replace(tzinfo=timezone.utc), + action=ScheduleActionExecutionStartWorkflow._from_proto( + res.start_workflow_result + ), + ) + + +@dataclass +class ScheduleUpdateInput: + """Parameter for an update callback for :py:meth:`ScheduleHandle.update`.""" + + description: ScheduleDescription + """Current description of the schedule.""" + + +@dataclass +class ScheduleUpdate: + """Result of an update callback for :py:meth:`ScheduleHandle.update`.""" + + schedule: Schedule + """Schedule to update.""" + + search_attributes: temporalio.common.TypedSearchAttributes | None = None + """Search attributes to update.""" + + +@dataclass +class ScheduleListDescription: + """Description of a listed schedule.""" + + id: str + """ID of the schedule.""" + + schedule: ScheduleListSchedule | None + """Schedule details that can be mutated. + + This may not be present in older Temporal servers without advanced + visibility. + """ + + info: ScheduleListInfo | None + """Information about the schedule. + + This may not be present in older Temporal servers without advanced + visibility. + """ + + typed_search_attributes: temporalio.common.TypedSearchAttributes + """Search attributes on the schedule.""" + + search_attributes: temporalio.common.SearchAttributes + """Search attributes on the schedule. + + .. deprecated:: + Use :py:attr:`typed_search_attributes` instead. + """ + + data_converter: temporalio.converter.DataConverter + """Data converter used for memo decoding.""" + + raw_entry: temporalio.api.schedule.v1.ScheduleListEntry + """Raw description of the schedule.""" + + @staticmethod + def _from_proto( + entry: temporalio.api.schedule.v1.ScheduleListEntry, + converter: temporalio.converter.DataConverter, + ) -> ScheduleListDescription: + return ScheduleListDescription( + id=entry.schedule_id, + schedule=ScheduleListSchedule._from_proto(entry.info) + if entry.HasField("info") + else None, + info=ScheduleListInfo._from_proto(entry.info) + if entry.HasField("info") + else None, + typed_search_attributes=temporalio.converter.decode_typed_search_attributes( + entry.search_attributes + ), + search_attributes=temporalio.converter.decode_search_attributes( + entry.search_attributes + ), + data_converter=converter, + raw_entry=entry, + ) + + async def memo(self) -> Mapping[str, Any]: + """Schedule's memo values, converted without type hints. + + Since type hints are not used, the default converted values will come + back. For example, if the memo was originally created with a dataclass, + the value will be a dict. To convert using proper type hints, use + :py:meth:`memo_value`. + + Returns: + Mapping of all memo keys and they values without type hints. + """ + return await self.data_converter._decode_memo(self.raw_entry.memo) + + @overload + async def memo_value( + self, key: str, default: Any = temporalio.common._arg_unset + ) -> Any: ... + + @overload + async def memo_value( + self, key: str, *, type_hint: type[ParamType] + ) -> ParamType: ... + + @overload + async def memo_value( + self, key: str, default: AnyType, *, type_hint: type[ParamType] + ) -> AnyType | ParamType: ... + + async def memo_value( + self, + key: str, + default: Any = temporalio.common._arg_unset, + *, + type_hint: type | None = None, + ) -> Any: + """Memo value for the given key, optional default, and optional type + hint. + + Args: + key: Key to get memo value for. + default: Default to use if key is not present. If unset, a + :py:class:`KeyError` is raised when the key does not exist. + type_hint: type hint to use when converting. + + Returns: + Memo value, converted with the type hint if present. + + Raises: + KeyError: Key not present and default not set. + """ + return await self.data_converter._decode_memo_field( + self.raw_entry.memo, key, default, type_hint + ) + + +@dataclass +class ScheduleListSchedule: + """Details for a listed schedule.""" + + action: ScheduleListAction + """Action taken when scheduled.""" + + spec: ScheduleSpec + """When the action is taken.""" + + state: ScheduleListState + """State of the schedule.""" + + @staticmethod + def _from_proto( + info: temporalio.api.schedule.v1.ScheduleListInfo, + ) -> ScheduleListSchedule: + # Only start workflow supported for now + if not info.HasField("workflow_type"): + raise ValueError("Unknown action on schedule") + return ScheduleListSchedule( + action=ScheduleListActionStartWorkflow(workflow=info.workflow_type.name), + spec=ScheduleSpec._from_proto(info.spec), + state=ScheduleListState._from_proto(info), + ) + + +class ScheduleListAction(ABC): + """Base class for an action a listed schedule can take.""" + + pass + + +@dataclass +class ScheduleListActionStartWorkflow(ScheduleListAction): + """Action to start a workflow on a listed schedule.""" + + workflow: str + """Workflow type name.""" + + +@dataclass +class ScheduleListInfo: + """Information about a listed schedule.""" + + recent_actions: Sequence[ScheduleActionResult] + """Most recent actions, oldest first. + + This may be a smaller amount than present on + :py:attr:`ScheduleDescription.info`. + """ + + next_action_times: Sequence[datetime] + """Next scheduled action times. + + This may be a smaller amount than present on + :py:attr:`ScheduleDescription.info`. + """ + + @staticmethod + def _from_proto( + info: temporalio.api.schedule.v1.ScheduleListInfo, + ) -> ScheduleListInfo: + return ScheduleListInfo( + recent_actions=[ + ScheduleActionResult._from_proto(r) for r in info.recent_actions + ], + next_action_times=[ + f.ToDatetime().replace(tzinfo=timezone.utc) + for f in info.future_action_times + ], + ) + + +@dataclass +class ScheduleListState: + """State of a listed schedule.""" + + note: str | None + """Human readable message for the schedule. + + The system may overwrite this value on certain conditions like + pause-on-failure. + """ + + paused: bool + """Whether the schedule is paused.""" + + @staticmethod + def _from_proto( + info: temporalio.api.schedule.v1.ScheduleListInfo, + ) -> ScheduleListState: + return ScheduleListState( + note=info.notes or None, + paused=info.paused, + ) + + +class ScheduleAsyncIterator: + """Asynchronous iterator for :py:class:`ScheduleListDescription` values. + + Most users should use ``async for`` on this iterator and not call any of the + methods within. + """ + + def __init__( + self, + client: Client, + input: ListSchedulesInput, + ) -> None: + """Create an asynchronous iterator for the given input. + + Users should not create this directly, but rather use + :py:meth:`Client.list_schedules`. + """ + self._client = client + self._input = input + self._next_page_token = input.next_page_token + self._current_page: Sequence[ScheduleListDescription] | None = None + self._current_page_index = 0 + + @property + def current_page_index(self) -> int: + """Index of the entry in the current page that will be returned from + the next :py:meth:`__anext__` call. + """ + return self._current_page_index + + @property + def current_page(self) -> Sequence[ScheduleListDescription] | None: + """Current page, if it has been fetched yet.""" + return self._current_page + + @property + def next_page_token(self) -> bytes | None: + """Token for the next page request if any.""" + return self._next_page_token + + async def fetch_next_page(self, *, page_size: int | None = None) -> None: + """Fetch the next page if any. + + Args: + page_size: Override the page size this iterator was originally + created with. + """ + resp = await self._client.workflow_service.list_schedules( + temporalio.api.workflowservice.v1.ListSchedulesRequest( + namespace=self._client.namespace, + maximum_page_size=page_size or self._input.page_size, + next_page_token=self._next_page_token or b"", + query=self._input.query or "", + ), + retry=True, + metadata=self._input.rpc_metadata, + timeout=self._input.rpc_timeout, + ) + self._current_page = [ + ScheduleListDescription._from_proto(v, self._client.data_converter) + for v in resp.schedules + ] + self._current_page_index = 0 + self._next_page_token = resp.next_page_token or None + + def __aiter__(self) -> ScheduleAsyncIterator: + """Return self as the iterator.""" + return self + + async def __anext__(self) -> ScheduleListDescription: + """Get the next execution on this iterator, fetching next page if + necessary. + """ + while True: + # No page? fetch and continue + if self._current_page is None: + await self.fetch_next_page() + continue + # No more left in page? + if self._current_page_index >= len(self._current_page): + # If there is a next page token, try to get another page and try + # again + if self._next_page_token is not None: + await self.fetch_next_page() + continue + # No more pages means we're done + raise StopAsyncIteration + # Get current, increment page index, and return + ret = self._current_page[self._current_page_index] + self._current_page_index += 1 + return ret diff --git a/temporalio/client/_worker_versioning.py b/temporalio/client/_worker_versioning.py new file mode 100644 index 0000000000..d6ef8f2576 --- /dev/null +++ b/temporalio/client/_worker_versioning.py @@ -0,0 +1,278 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections.abc import ( + Mapping, + Sequence, +) +from dataclasses import dataclass +from enum import Enum + +import temporalio.api.enums.v1 +import temporalio.api.workflowservice.v1 + + +@dataclass(frozen=True) +class WorkerBuildIdVersionSets: + """Represents the sets of compatible Build ID versions associated with some Task Queue, as + fetched by :py:meth:`Client.get_worker_build_id_compatibility`. + """ + + version_sets: Sequence[BuildIdVersionSet] + """All version sets that were fetched for this task queue.""" + + def default_set(self) -> BuildIdVersionSet: + """Returns the default version set for this task queue.""" + return self.version_sets[-1] + + def default_build_id(self) -> str: + """Returns the default Build ID for this task queue.""" + return self.default_set().default() + + @staticmethod + def _from_proto( + resp: temporalio.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse, + ) -> WorkerBuildIdVersionSets: + return WorkerBuildIdVersionSets( + version_sets=[ + BuildIdVersionSet(mvs.build_ids) for mvs in resp.major_version_sets + ] + ) + + +@dataclass(frozen=True) +class BuildIdVersionSet: + """A set of Build IDs which are compatible with each other.""" + + build_ids: Sequence[str] + """All Build IDs contained in the set.""" + + def default(self) -> str: + """Returns the default Build ID for this set.""" + return self.build_ids[-1] + + +class BuildIdOp(ABC): + """Base class for Build ID operations as used by + :py:meth:`Client.update_worker_build_id_compatibility`. + """ + + @abstractmethod + def _as_partial_proto( + self, + ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: + """Returns a partial request with the operation populated. Caller must populate + non-operation fields. This is done b/c there's no good way to assign a non-primitive message + as the operation after initializing the request. + """ + ... + + +@dataclass(frozen=True) +class BuildIdOpAddNewDefault(BuildIdOp): + """Adds a new Build Id into a new set, which will be used as the default set for + the queue. This means all new workflows will start on this Build Id. + """ + + build_id: str + + def _as_partial_proto( + self, + ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: + return ( + temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( + add_new_build_id_in_new_default_set=self.build_id + ) + ) + + +@dataclass(frozen=True) +class BuildIdOpAddNewCompatible(BuildIdOp): + """Adds a new Build Id into an existing compatible set. The newly added ID becomes + the default for that compatible set, and thus new workflow tasks for workflows which have been + executing on workers in that set will now start on this new Build Id. + """ + + build_id: str + """The Build Id to add to the compatible set.""" + + existing_compatible_build_id: str + """A Build Id which must already be defined on the task queue, and is used to find the + compatible set to add the new id to. + """ + + promote_set: bool = False + """If set to true, the targeted set will also be promoted to become the overall default set for + the queue.""" + + def _as_partial_proto( + self, + ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: + return temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( + add_new_compatible_build_id=temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.AddNewCompatibleVersion( + new_build_id=self.build_id, + existing_compatible_build_id=self.existing_compatible_build_id, + make_set_default=self.promote_set, + ) + ) + + +@dataclass(frozen=True) +class BuildIdOpPromoteSetByBuildId(BuildIdOp): + """Promotes a set of compatible Build Ids to become the current default set for the task queue. + Any Build Id in the set may be used to target it. + """ + + build_id: str + """A Build Id which must already be defined on the task queue, and is used to find the + compatible set to promote.""" + + def _as_partial_proto( + self, + ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: + return ( + temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( + promote_set_by_build_id=self.build_id + ) + ) + + +@dataclass(frozen=True) +class BuildIdOpPromoteBuildIdWithinSet(BuildIdOp): + """Promotes a Build Id within an existing set to become the default ID for that set.""" + + build_id: str + + def _as_partial_proto( + self, + ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: + return ( + temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( + promote_build_id_within_set=self.build_id + ) + ) + + +@dataclass(frozen=True) +class BuildIdOpMergeSets(BuildIdOp): + """Merges two sets into one set, thus declaring all the Build Ids in both as compatible with one + another. The default of the primary set is maintained as the merged set's overall default. + """ + + primary_build_id: str + """A Build Id which and is used to find the primary set to be merged.""" + + secondary_build_id: str + """A Build Id which and is used to find the secondary set to be merged.""" + + def _as_partial_proto( + self, + ) -> temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest: + return temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest( + merge_sets=temporalio.api.workflowservice.v1.UpdateWorkerBuildIdCompatibilityRequest.MergeSets( + primary_set_build_id=self.primary_build_id, + secondary_set_build_id=self.secondary_build_id, + ) + ) + + +@dataclass(frozen=True) +class WorkerTaskReachability: + """Contains information about the reachability of some Build IDs""" + + build_id_reachability: Mapping[str, BuildIdReachability] + """Maps Build IDs to information about their reachability""" + + @staticmethod + def _from_proto( + resp: temporalio.api.workflowservice.v1.GetWorkerTaskReachabilityResponse, + ) -> WorkerTaskReachability: + mapping = dict() + for bid_reach in resp.build_id_reachability: + tq_mapping = dict() + unretrieved = set() + for tq_reach in bid_reach.task_queue_reachability: + if tq_reach.reachability == [ + temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_UNSPECIFIED + ]: + unretrieved.add(tq_reach.task_queue) + continue + tq_mapping[tq_reach.task_queue] = [ + TaskReachabilityType._from_proto(r) for r in tq_reach.reachability + ] + + mapping[bid_reach.build_id] = BuildIdReachability( + task_queue_reachability=tq_mapping, + unretrieved_task_queues=frozenset(unretrieved), + ) + + return WorkerTaskReachability(build_id_reachability=mapping) + + +@dataclass(frozen=True) +class BuildIdReachability: + """Contains information about the reachability of a specific Build ID""" + + task_queue_reachability: Mapping[str, Sequence[TaskReachabilityType]] + """Maps Task Queue names to the reachability status of the Build ID on that queue. If the value + is an empty list, the Build ID is not reachable on that queue. + """ + + unretrieved_task_queues: frozenset[str] + """If any Task Queues could not be retrieved because the server limits the number that can be + queried at once, they will be listed here. + """ + + +class TaskReachabilityType(Enum): + """Enumerates how a task might reach certain kinds of workflows""" + + NEW_WORKFLOWS = 1 + EXISTING_WORKFLOWS = 2 + OPEN_WORKFLOWS = 3 + CLOSED_WORKFLOWS = 4 + + @staticmethod + def _from_proto( + reachability: temporalio.api.enums.v1.TaskReachability.ValueType, + ) -> TaskReachabilityType: + if ( + reachability + == temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_NEW_WORKFLOWS + ): + return TaskReachabilityType.NEW_WORKFLOWS + elif ( + reachability + == temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_EXISTING_WORKFLOWS + ): + return TaskReachabilityType.EXISTING_WORKFLOWS + elif ( + reachability + == temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_OPEN_WORKFLOWS + ): + return TaskReachabilityType.OPEN_WORKFLOWS + elif ( + reachability + == temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_CLOSED_WORKFLOWS + ): + return TaskReachabilityType.CLOSED_WORKFLOWS + else: + raise ValueError(f"Cannot convert reachability type: {reachability}") + + def _to_proto(self) -> temporalio.api.enums.v1.TaskReachability.ValueType: + if self == TaskReachabilityType.NEW_WORKFLOWS: + return ( + temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_NEW_WORKFLOWS + ) + elif self == TaskReachabilityType.EXISTING_WORKFLOWS: + return temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_EXISTING_WORKFLOWS + elif self == TaskReachabilityType.OPEN_WORKFLOWS: + return temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_OPEN_WORKFLOWS + elif self == TaskReachabilityType.CLOSED_WORKFLOWS: + return temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_CLOSED_WORKFLOWS + else: + return ( + temporalio.api.enums.v1.TaskReachability.TASK_REACHABILITY_UNSPECIFIED + ) diff --git a/temporalio/client/_workflow.py b/temporalio/client/_workflow.py new file mode 100644 index 0000000000..8a2c423a50 --- /dev/null +++ b/temporalio/client/_workflow.py @@ -0,0 +1,2032 @@ +"""Client support for accessing Temporal.""" + +from __future__ import annotations + +import asyncio +import functools +import warnings +from asyncio import Future +from collections.abc import ( + AsyncIterator, + Awaitable, + Callable, + Mapping, + Sequence, +) +from dataclasses import dataclass +from datetime import datetime, timedelta, timezone +from enum import IntEnum +from typing import ( + TYPE_CHECKING, + Any, + Concatenate, + Generic, + cast, + overload, +) + +import google.protobuf.json_format +from typing_extensions import Self + +import temporalio.api.common.v1 +import temporalio.api.enums.v1 +import temporalio.api.history.v1 +import temporalio.api.update.v1 +import temporalio.api.workflow.v1 +import temporalio.api.workflowservice.v1 +import temporalio.common +import temporalio.converter +import temporalio.converter._search_attributes +import temporalio.converter._serialization_context +import temporalio.exceptions +import temporalio.workflow +from temporalio.converter import ( + WorkflowSerializationContext, +) +from temporalio.service import ( + RPCError, + RPCStatusCode, +) + +from ..types import ( + AnyType, + LocalReturnType, + MethodAsyncNoParam, + MethodAsyncSingleParam, + MethodSyncOrAsyncNoParam, + MethodSyncOrAsyncSingleParam, + MultiParamSpec, + ParamType, + ReturnType, + SelfType, +) +from ._exceptions import ( + WorkflowContinuedAsNewError, + WorkflowFailureError, + WorkflowUpdateFailedError, + WorkflowUpdateRPCTimeoutOrCancelledError, +) +from ._helpers import _decode_user_metadata, _history_from_json +from ._interceptor import ( + CancelWorkflowInput, + DescribeWorkflowInput, + FetchWorkflowHistoryEventsInput, + QueryWorkflowInput, + SignalWorkflowInput, + StartWorkflowUpdateInput, + TerminateWorkflowInput, + UpdateWithStartStartWorkflowInput, +) + +if TYPE_CHECKING: + from ._client import Client + from ._interceptor import ListWorkflowsInput + + +class WorkflowHistoryEventFilterType(IntEnum): + """Type of history events to get for a workflow. + + See :py:class:`temporalio.api.enums.v1.HistoryEventFilterType`. + """ + + ALL_EVENT = int( + temporalio.api.enums.v1.HistoryEventFilterType.HISTORY_EVENT_FILTER_TYPE_ALL_EVENT + ) + CLOSE_EVENT = int( + temporalio.api.enums.v1.HistoryEventFilterType.HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT + ) + + +class WorkflowHandle(Generic[SelfType, ReturnType]): + """Handle for interacting with a workflow. + + This is usually created via :py:meth:`Client.get_workflow_handle` or + returned from :py:meth:`Client.start_workflow`. + """ + + def __init__( + self, + client: Client, + id: str, + *, + run_id: str | None = None, + result_run_id: str | None = None, + first_execution_run_id: str | None = None, + result_type: type | None = None, + start_workflow_response: None + | ( + temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse + | temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse + ) = None, + ) -> None: + """Create workflow handle.""" + self._client = client + self._id = id + self._run_id = run_id + self._result_run_id = result_run_id + self._first_execution_run_id = first_execution_run_id + self._result_type = result_type + self._start_workflow_response = start_workflow_response + self.__temporal_eagerly_started = False + + @functools.cached_property + def _data_converter(self) -> temporalio.converter.DataConverter: + return self._client.data_converter.with_context( + temporalio.converter.WorkflowSerializationContext( + namespace=self._client.namespace, workflow_id=self._id + ) + ) + + def _close_event_data_converter( + self, events: WorkflowHistoryEventAsyncIterator + ) -> temporalio.converter.DataConverter: + # A workflow started by a Nexus operation handler encodes its result and closing failure + # with the handler's Nexus context, which the server returns with the history. An + # interceptor may return its own iterator, which then falls back to the workflow context. + context = getattr(events, "_propagated_nexus_serialization_context", None) + if context is None: + return self._data_converter + return self._client.data_converter.with_context(context) + + @property + def id(self) -> str: + """ID of the workflow.""" + return self._id + + @property + def run_id(self) -> str | None: + """If present, run ID used to ensure that requested operations apply + to this exact run. + + This is only created via :py:meth:`Client.get_workflow_handle`. + :py:meth:`Client.start_workflow` will not set this value. + + This cannot be mutated. If a different run ID is needed, + :py:meth:`Client.get_workflow_handle` must be used instead. + """ + return self._run_id + + @property + def result_run_id(self) -> str | None: + """Run ID used for :py:meth:`result` calls if present to ensure result + is for a workflow starting from this run. + + When this handle is created via :py:meth:`Client.get_workflow_handle`, + this is the same as run_id. When this handle is created via + :py:meth:`Client.start_workflow`, this value will be the resulting run + ID. + + This cannot be mutated. If a different run ID is needed, + :py:meth:`Client.get_workflow_handle` must be used instead. + """ + return self._result_run_id + + @property + def first_execution_run_id(self) -> str | None: + """Run ID used to ensure requested operations apply to a workflow ID + started with this run ID. + + This can be set when using :py:meth:`Client.get_workflow_handle`. + :py:meth:`Client.start_workflow` sets this from the server response. + With Temporal Server 1.32.0 or later, this is also correct when the + start attaches to a running workflow with a conflict policy of + ``USE_EXISTING``. Earlier servers may leave this unset for + signal-with-start or set it to the current run when a traditional + start attaches to a running workflow. + + This cannot be mutated. If a different first execution run ID is needed, + :py:meth:`Client.get_workflow_handle` must be used instead. + """ + return self._first_execution_run_id + + async def result( + self, + *, + follow_runs: bool = True, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> ReturnType: + """Wait for result of the workflow. + + This will use :py:attr:`result_run_id` if present to base the result on. + To use another run ID, a new handle must be created via + :py:meth:`Client.get_workflow_handle`. + + Args: + follow_runs: If true (default), workflow runs will be continually + fetched, until the most recent one is found. If false, return + the result from the first run targeted by the request if that run + ends in a result, otherwise raise an exception. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. Note, + this is the timeout for each history RPC call not this overall + function. + + Returns: + Result of the workflow after being converted by the data converter. + + Raises: + WorkflowFailureError: Workflow failed, was cancelled, was + terminated, or timed out. Use the + :py:attr:`WorkflowFailureError.cause` to see the underlying + reason. + Exception: Other possible failures during result fetching. + """ + # We have to maintain our own run ID because it can change if we follow + # executions + hist_run_id = self._result_run_id + while True: + events = self._fetch_history_events_for_run( + hist_run_id, + wait_new_event=True, + event_filter_type=WorkflowHistoryEventFilterType.CLOSE_EVENT, + skip_archival=True, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + async for event in events: + data_converter = self._close_event_data_converter(events) + if event.HasField("workflow_execution_completed_event_attributes"): + complete_attr = event.workflow_execution_completed_event_attributes + # Follow execution + if follow_runs and complete_attr.new_execution_run_id: + hist_run_id = complete_attr.new_execution_run_id + break + # Ignoring anything after the first response like TypeScript + type_hints = [self._result_type] if self._result_type else None + results = await data_converter.decode_wrapper( + complete_attr.result, + type_hints, + ) + if not results: + return cast(ReturnType, None) + elif len(results) > 1: + warnings.warn(f"Expected single result, got {len(results)}") + return cast(ReturnType, results[0]) + elif event.HasField("workflow_execution_failed_event_attributes"): + fail_attr = event.workflow_execution_failed_event_attributes + # Follow execution + if follow_runs and fail_attr.new_execution_run_id: + hist_run_id = fail_attr.new_execution_run_id + break + raise WorkflowFailureError( + cause=await data_converter.decode_failure(fail_attr.failure), + ) + elif event.HasField("workflow_execution_canceled_event_attributes"): + cancel_attr = event.workflow_execution_canceled_event_attributes + raise WorkflowFailureError( + cause=temporalio.exceptions.CancelledError( + "Workflow cancelled", + *(await data_converter.decode_wrapper(cancel_attr.details)), + ) + ) + elif event.HasField("workflow_execution_terminated_event_attributes"): + term_attr = event.workflow_execution_terminated_event_attributes + raise WorkflowFailureError( + cause=temporalio.exceptions.TerminatedError( + term_attr.reason or "Workflow terminated", + *(await data_converter.decode_wrapper(term_attr.details)), + ), + ) + elif event.HasField("workflow_execution_timed_out_event_attributes"): + time_attr = event.workflow_execution_timed_out_event_attributes + # Follow execution + if follow_runs and time_attr.new_execution_run_id: + hist_run_id = time_attr.new_execution_run_id + break + raise WorkflowFailureError( + cause=temporalio.exceptions.TimeoutError( + "Workflow timed out", + type=temporalio.exceptions.TimeoutType.START_TO_CLOSE, + last_heartbeat_details=[], + ), + ) + elif event.HasField( + "workflow_execution_continued_as_new_event_attributes" + ): + cont_attr = ( + event.workflow_execution_continued_as_new_event_attributes + ) + if not cont_attr.new_execution_run_id: + raise RuntimeError( + "Unexpectedly missing new run ID from continue as new" + ) + # Follow execution + if follow_runs: + hist_run_id = cont_attr.new_execution_run_id + break + raise WorkflowContinuedAsNewError(cont_attr.new_execution_run_id) + # This is reached on break which means that there's a different run + # ID if we're following. If there's not, it's an error because no + # event was given (should never happen). + if hist_run_id is None: + raise RuntimeError("No completion event found") + + async def cancel( + self, + *, + reason: str = "", + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Cancel the workflow. + + This will issue a cancellation for :py:attr:`run_id` if present. This + call will make sure to use the run chain starting from + :py:attr:`first_execution_run_id` if present. To create handles with + these values, use :py:meth:`Client.get_workflow_handle`. + + .. warning:: + With Temporal Server earlier than 1.32.0, handles created by + :py:meth:`Client.start_workflow` with a start signal may cancel the + latest workflow with the same workflow ID even if it is unrelated + to the started workflow. + + Args: + reason: Reason recorded with the cancellation request. Available + inside the workflow via :py:func:`temporalio.workflow.cancellation_reason`. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Raises: + RPCError: Workflow could not be cancelled. + """ + await self._client._impl.cancel_workflow( + CancelWorkflowInput( + id=self._id, + run_id=self._run_id, + first_execution_run_id=self._first_execution_run_id, + reason=reason, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def describe( + self, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowExecutionDescription: + """Get workflow details. + + This will get details for :py:attr:`run_id` if present. To use a + different run ID, create a new handle with via + :py:meth:`Client.get_workflow_handle`. + + .. warning:: + Handles created as a result of :py:meth:`Client.start_workflow` will + describe the latest workflow with the same workflow ID even if it is + unrelated to the started workflow. + + Args: + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + Workflow details. + + Raises: + RPCError: Workflow details could not be fetched. + """ + return await self._client._impl.describe_workflow( + DescribeWorkflowInput( + id=self._id, + run_id=self._run_id, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def fetch_history( + self, + *, + event_filter_type: WorkflowHistoryEventFilterType = WorkflowHistoryEventFilterType.ALL_EVENT, + skip_archival: bool = False, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowHistory: + """Get workflow history. + + This is a shortcut for :py:meth:`fetch_history_events` that just fetches + all events. + """ + return WorkflowHistory( + workflow_id=self.id, + events=[ + v + async for v in self.fetch_history_events( + event_filter_type=event_filter_type, + skip_archival=skip_archival, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ], + ) + + def fetch_history_events( + self, + *, + page_size: int | None = None, + next_page_token: bytes | None = None, + wait_new_event: bool = False, + event_filter_type: WorkflowHistoryEventFilterType = WorkflowHistoryEventFilterType.ALL_EVENT, + skip_archival: bool = False, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowHistoryEventAsyncIterator: + """Get workflow history events as an async iterator. + + This does not make a request until the first iteration is attempted. + Therefore any errors will not occur until then. + + Args: + page_size: Maximum amount to fetch per request if any maximum. + next_page_token: A specific page token to fetch. + wait_new_event: Whether the event fetching request will wait for new + events or just return right away. + event_filter_type: Which events to obtain. + skip_archival: Whether to skip archival. + rpc_metadata: Headers used on each RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. + + Returns: + An async iterator that doesn't begin fetching until iterated on. + """ + return self._fetch_history_events_for_run( + self._run_id, + page_size=page_size, + next_page_token=next_page_token, + wait_new_event=wait_new_event, + event_filter_type=event_filter_type, + skip_archival=skip_archival, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + def _fetch_history_events_for_run( + self, + run_id: str | None, + *, + page_size: int | None = None, + next_page_token: bytes | None = None, + wait_new_event: bool = False, + event_filter_type: WorkflowHistoryEventFilterType = WorkflowHistoryEventFilterType.ALL_EVENT, + skip_archival: bool = False, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowHistoryEventAsyncIterator: + return self._client._impl.fetch_workflow_history_events( + FetchWorkflowHistoryEventsInput( + id=self._id, + run_id=run_id, + page_size=page_size, + next_page_token=next_page_token, + wait_new_event=wait_new_event, + event_filter_type=event_filter_type, + skip_archival=skip_archival, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + # Overload for no-param query + @overload + async def query( + self, + query: MethodSyncOrAsyncNoParam[SelfType, LocalReturnType], + *, + reject_condition: temporalio.common.QueryRejectCondition | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: ... + + # Overload for single-param query + @overload + async def query( + self, + query: MethodSyncOrAsyncSingleParam[SelfType, ParamType, LocalReturnType], + arg: ParamType, + *, + reject_condition: temporalio.common.QueryRejectCondition | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: ... + + # Overload for multi-param query + @overload + async def query( + self, + query: Callable[ + Concatenate[SelfType, MultiParamSpec], + Awaitable[LocalReturnType] | LocalReturnType, + ], + *, + args: Sequence[Any], + reject_condition: temporalio.common.QueryRejectCondition | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: ... + + # Overload for string-name query + @overload + async def query( + self, + query: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + result_type: type | None = None, + reject_condition: temporalio.common.QueryRejectCondition | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: ... + + async def query( + self, + query: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + result_type: type | None = None, + reject_condition: temporalio.common.QueryRejectCondition | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: + """Query the workflow. + + This will query for :py:attr:`run_id` if present. To use a different + run ID, create a new handle with + :py:meth:`Client.get_workflow_handle`. + + .. warning:: + Handles created as a result of :py:meth:`Client.start_workflow` will + query the latest workflow with the same workflow ID even if it is + unrelated to the started workflow. + + Args: + query: Query function or name on the workflow. + arg: Single argument to the query. + args: Multiple arguments to the query. Cannot be set if arg is. + result_type: For string queries, this can set the specific result + type hint to deserialize into. + reject_condition: Condition for rejecting the query. If unset/None, + defaults to the client's default (which is defaulted to None). + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Returns: + Result of the query. + + Raises: + WorkflowQueryRejectedError: A query reject condition was satisfied. + RPCError: Workflow details could not be fetched. + """ + query_name: str + ret_type = result_type + if callable(query): + defn = temporalio.workflow._QueryDefinition.from_fn(query) + if not defn: + raise RuntimeError( + f"Query definition not found on {query.__qualname__}, " + "is it decorated with @workflow.query?" + ) + elif not defn.name: + raise RuntimeError("Cannot invoke dynamic query definition") + # TODO(cretz): Check count/type of args at runtime? + query_name = defn.name + ret_type = defn.ret_type + else: + query_name = str(query) + + return await self._client._impl.query_workflow( + QueryWorkflowInput( + id=self._id, + run_id=self._run_id, + query=query_name, + args=temporalio.common._arg_or_args(arg, args), + reject_condition=reject_condition + or self._client._config["default_workflow_query_reject_condition"], + headers={}, + ret_type=ret_type, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + # Overload for no-param signal + @overload + async def signal( + self, + signal: MethodSyncOrAsyncNoParam[SelfType, None], + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: ... + + # Overload for single-param signal + @overload + async def signal( + self, + signal: MethodSyncOrAsyncSingleParam[SelfType, ParamType, None], + arg: ParamType, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: ... + + # Overload for multi-param signal + @overload + async def signal( + self, + signal: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[None] | None], + *, + args: Sequence[Any], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: ... + + # Overload for string-name signal + @overload + async def signal( + self, + signal: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: ... + + async def signal( + self, + signal: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Send a signal to the workflow. + + This will signal for :py:attr:`run_id` if present. To use a different + run ID, create a new handle with via + :py:meth:`Client.get_workflow_handle`. + + .. warning:: + Handles created as a result of :py:meth:`Client.start_workflow` will + signal the latest workflow with the same workflow ID even if it is + unrelated to the started workflow. + + Args: + signal: Signal function or name on the workflow. + arg: Single argument to the signal. + args: Multiple arguments to the signal. Cannot be set if arg is. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Raises: + RPCError: Workflow could not be signalled. + """ + await self._client._impl.signal_workflow( + SignalWorkflowInput( + id=self._id, + run_id=self._run_id, + signal=temporalio.workflow._SignalDefinition.must_name_from_fn_or_str( + signal + ), + args=temporalio.common._arg_or_args(arg, args), + headers={}, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + async def terminate( + self, + *args: Any, + reason: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + """Terminate the workflow. + + This will issue a termination for :py:attr:`run_id` if present. This + call will make sure to use the run chain starting from + :py:attr:`first_execution_run_id` if present. To create handles with + these values, use :py:meth:`Client.get_workflow_handle`. + + .. warning:: + With Temporal Server earlier than 1.32.0, handles created by + :py:meth:`Client.start_workflow` with a start signal may terminate + the latest workflow with the same workflow ID even if it is + unrelated to the started workflow. + + Args: + args: Details to store on the termination. + reason: Reason for the termination. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Raises: + RPCError: Workflow could not be terminated. + """ + await self._client._impl.terminate_workflow( + TerminateWorkflowInput( + id=self._id, + run_id=self._run_id, + args=args, + reason=reason, + first_execution_run_id=self._first_execution_run_id, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + ) + + # Overload for no-param update + @overload + async def execute_update( + self, + update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType], + *, + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: ... + + # Overload for single-param update + @overload + async def execute_update( + self, + update: temporalio.workflow.UpdateMethodMultiParam[ + [SelfType, ParamType], LocalReturnType + ], + arg: ParamType, + *, + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: ... + + # Overload for multi-param update + @overload + async def execute_update( + self, + update: temporalio.workflow.UpdateMethodMultiParam[ + MultiParamSpec, LocalReturnType + ], + *, + args: MultiParamSpec.args, # type: ignore + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: ... + + # Overload for string-name update + @overload + async def execute_update( + self, + update: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: ... + + async def execute_update( + self, + update: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> Any: + """Send an update request to the workflow and wait for it to complete. + + This will target the workflow with :py:attr:`run_id` if present. To use a + different run ID, create a new handle with via :py:meth:`Client.get_workflow_handle`. + + Args: + update: Update function or name on the workflow. + arg: Single argument to the update. + args: Multiple arguments to the update. Cannot be set if arg is. + id: ID of the update. If not set, the default is a new UUID. + result_type: For string updates, this can set the specific result + type hint to deserialize into. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Raises: + WorkflowUpdateFailedError: If the update failed. + WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out + or was cancelled. This doesn't mean the update itself was timed + out or cancelled. + RPCError: There was some issue sending the update to the workflow. + """ + handle = await self._start_update( + update, + arg, + args=args, + wait_for_stage=WorkflowUpdateStage.COMPLETED, + id=id, + result_type=result_type, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + return await handle.result() + + # Overload for no-param start update + @overload + async def start_update( + self, + update: temporalio.workflow.UpdateMethodMultiParam[[SelfType], LocalReturnType], + *, + wait_for_stage: WorkflowUpdateStage, + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[LocalReturnType]: ... + + # Overload for single-param start update + @overload + async def start_update( + self, + update: temporalio.workflow.UpdateMethodMultiParam[ + [SelfType, ParamType], LocalReturnType + ], + arg: ParamType, + *, + wait_for_stage: WorkflowUpdateStage, + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[LocalReturnType]: ... + + # Overload for multi-param start update + @overload + async def start_update( + self, + update: temporalio.workflow.UpdateMethodMultiParam[ + MultiParamSpec, LocalReturnType + ], + *, + args: MultiParamSpec.args, # type: ignore + wait_for_stage: WorkflowUpdateStage, + id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[LocalReturnType]: ... + + # Overload for string-name start update + @overload + async def start_update( + self, + update: str, + arg: Any = temporalio.common._arg_unset, + *, + wait_for_stage: WorkflowUpdateStage, + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[Any]: ... + + async def start_update( + self, + update: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + wait_for_stage: WorkflowUpdateStage, + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[Any]: + """Send an update request to the workflow and return a handle to it. + + This will target the workflow with :py:attr:`run_id` if present. To use a + different run ID, create a new handle with via :py:meth:`Client.get_workflow_handle`. + + Args: + update: Update function or name on the workflow. arg: Single argument to the + update. + wait_for_stage: Required stage to wait until returning: either ACCEPTED or + COMPLETED. ADMITTED is not currently supported. See + https://docs.temporal.io/workflows#update for more details. + args: Multiple arguments to the update. Cannot be set if arg is. + id: ID of the update. If not set, the default is a new UUID. + result_type: For string updates, this can set the specific result + type hint to deserialize into. + rpc_metadata: Headers used on the RPC call. Keys here override + client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for the RPC call. + + Raises: + WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out + or was cancelled. This doesn't mean the update itself was timed out or + cancelled. + RPCError: There was some issue sending the update to the workflow. + """ + return await self._start_update( + update, + arg, + wait_for_stage=wait_for_stage, + args=args, + id=id, + result_type=result_type, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + async def _start_update( + self, + update: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + wait_for_stage: WorkflowUpdateStage, + args: Sequence[Any] = [], + id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> WorkflowUpdateHandle[Any]: + if wait_for_stage == WorkflowUpdateStage.ADMITTED: + raise ValueError("ADMITTED wait stage not supported") + + update_name, result_type_from_type_hint = ( + temporalio.workflow._UpdateDefinition.get_name_and_result_type(update) + ) + + return await self._client._impl.start_workflow_update( + StartWorkflowUpdateInput( + id=self._id, + run_id=self._run_id, + first_execution_run_id=self._first_execution_run_id, + update_id=id, + update=update_name, + args=temporalio.common._arg_or_args(arg, args), + headers={}, + ret_type=result_type or result_type_from_type_hint, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + wait_for_stage=wait_for_stage, + ) + ) + + def get_update_handle( + self, + id: str, + *, + workflow_run_id: str | None = None, + result_type: type | None = None, + ) -> WorkflowUpdateHandle[Any]: + """Get a handle for an update. The handle can be used to wait on the + update result. + + Users may prefer the more typesafe :py:meth:`get_update_handle_for` + which accepts an update definition. + + Args: + id: Update ID to get a handle to. + workflow_run_id: Run ID to tie the handle to. If this is not set, + the :py:attr:`run_id` will be used. + result_type: The result type to deserialize into if known. + + Returns: + The update handle. + """ + return WorkflowUpdateHandle( + self._client, + id, + self._id, + workflow_run_id=workflow_run_id or self._run_id, + result_type=result_type, + ) + + def get_update_handle_for( + self, + update: temporalio.workflow.UpdateMethodMultiParam[Any, LocalReturnType], + id: str, + *, + workflow_run_id: str | None = None, + ) -> WorkflowUpdateHandle[LocalReturnType]: + """Get a typed handle for an update. The handle can be used to wait on + the update result. + + This is the same as :py:meth:`get_update_handle` but typed. + + Args: + update: The update method to use for typing the handle. + id: Update ID to get a handle to. + workflow_run_id: Run ID to tie the handle to. If this is not set, + the :py:attr:`run_id` will be used. + + Returns: + The update handle. + """ + return self.get_update_handle( + id, workflow_run_id=workflow_run_id, result_type=update._defn.ret_type + ) + + +class WithStartWorkflowOperation(Generic[SelfType, ReturnType]): + """Defines a start-workflow operation used by update-with-start requests. + + Update-With-Start allows you to send an update to a workflow, while starting the + workflow if necessary. + """ + + # Overload for no-param workflow, with_start + @overload + def __init__( + self, + workflow: MethodAsyncNoParam[SelfType, ReturnType], + *, + id: str, + task_queue: str, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> None: ... + + # Overload for single-param workflow, with_start + @overload + def __init__( + self, + workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> None: ... + + # Overload for multi-param workflow, with_start + @overload + def __init__( + self, + workflow: Callable[ + Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] + ], + *, + args: Sequence[Any], + id: str, + task_queue: str, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> None: ... + + # Overload for string-name workflow, with_start + @overload + def __init__( + self, + workflow: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, + result_type: type | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> None: ... + + def __init__( + self, + workflow: str | Callable[..., Awaitable[Any]], + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy, + result_type: type | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + stack_level: int = 2, + ) -> None: + """Create a WithStartWorkflowOperation. + + See :py:meth:`temporalio.client.Client.start_workflow` for documentation of the + arguments. + """ + temporalio.common._warn_on_deprecated_search_attributes( + search_attributes, stack_level=stack_level + ) + name, result_type_from_run_fn = ( + temporalio.workflow._Definition.get_name_and_result_type(workflow) + ) + if id_conflict_policy == temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED: + raise ValueError("WorkflowIDConflictPolicy is required") + + self._start_workflow_input = UpdateWithStartStartWorkflowInput( + workflow=name, + args=temporalio.common._arg_or_args(arg, args), + id=id, + task_queue=task_queue, + execution_timeout=execution_timeout, + run_timeout=run_timeout, + task_timeout=task_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + cron_schedule=cron_schedule, + memo=memo, + search_attributes=search_attributes, + static_summary=static_summary, + static_details=static_details, + start_delay=start_delay, + headers={}, + ret_type=result_type or result_type_from_run_fn, + priority=priority, + versioning_override=versioning_override, + ) + self._workflow_handle: Future[WorkflowHandle[SelfType, ReturnType]] = Future() + self._used = False + + async def workflow_handle(self) -> WorkflowHandle[SelfType, ReturnType]: + """Wait until workflow is running and return a WorkflowHandle.""" + return await self._workflow_handle + + +@dataclass +class WorkflowExecution: + """Info for a single workflow execution run.""" + + close_time: datetime | None + """When the workflow was closed if closed.""" + + execution_time: datetime | None + """When this workflow run started or should start.""" + + history_length: int + """Number of events in the history.""" + + id: str + """ID for the workflow.""" + + namespace: str + """Namespace for the workflow.""" + + parent_id: str | None + """ID for the parent workflow if this was started as a child.""" + + parent_run_id: str | None + """Run ID for the parent workflow if this was started as a child.""" + + root_id: str | None + """ID for the root workflow.""" + + root_run_id: str | None + """Run ID for the root workflow.""" + + raw_info: temporalio.api.workflow.v1.WorkflowExecutionInfo + """Underlying protobuf info.""" + + run_id: str + """Run ID for this workflow run.""" + + search_attributes: temporalio.common.SearchAttributes + """Current set of search attributes if any. + + .. deprecated:: + Use :py:attr:`typed_search_attributes` instead. + """ + + start_time: datetime + """When the workflow was created.""" + + status: WorkflowExecutionStatus | None + """Status for the workflow.""" + + task_queue: str + """Task queue for the workflow.""" + + typed_search_attributes: temporalio.common.TypedSearchAttributes + """Current set of search attributes if any.""" + + workflow_type: str + """Type name for the workflow.""" + + _context_free_data_converter: temporalio.converter.DataConverter + + @property + def data_converter(self) -> temporalio.converter.DataConverter: + """Data converter for the workflow.""" + return self._context_free_data_converter.with_context( + WorkflowSerializationContext( + namespace=self.namespace, + workflow_id=self.id, + ) + ) + + @classmethod + def _from_raw_info( + cls, + info: temporalio.api.workflow.v1.WorkflowExecutionInfo, + namespace: str, + converter: temporalio.converter.DataConverter, + **additional_fields: Any, + ) -> Self: + return cls( + close_time=( + info.close_time.ToDatetime().replace(tzinfo=timezone.utc) + if info.HasField("close_time") + else None + ), + execution_time=( + info.execution_time.ToDatetime().replace(tzinfo=timezone.utc) + if info.HasField("execution_time") + else None + ), + history_length=info.history_length, + id=info.execution.workflow_id, + namespace=namespace, + parent_id=( + info.parent_execution.workflow_id + if info.HasField("parent_execution") + else None + ), + parent_run_id=( + info.parent_execution.run_id + if info.HasField("parent_execution") + else None + ), + root_id=( + info.root_execution.workflow_id + if info.HasField("root_execution") + else None + ), + root_run_id=( + info.root_execution.run_id if info.HasField("root_execution") else None + ), + raw_info=info, + run_id=info.execution.run_id, + search_attributes=temporalio.converter.decode_search_attributes( + info.search_attributes + ), + start_time=info.start_time.ToDatetime().replace(tzinfo=timezone.utc), + status=WorkflowExecutionStatus(info.status) if info.status else None, + task_queue=info.task_queue, + typed_search_attributes=temporalio.converter.decode_typed_search_attributes( + info.search_attributes + ), + workflow_type=info.type.name, + _context_free_data_converter=converter, + **additional_fields, + ) + + async def memo(self) -> Mapping[str, Any]: + """Workflow's memo values, converted without type hints. + + Since type hints are not used, the default converted values will come + back. For example, if the memo was originally created with a dataclass, + the value will be a dict. To convert using proper type hints, use + :py:meth:`memo_value`. + + Returns: + Mapping of all memo keys and they values without type hints. + """ + return await self.data_converter._decode_memo(self.raw_info.memo) + + @overload + async def memo_value( + self, key: str, default: Any = temporalio.common._arg_unset + ) -> Any: ... + + @overload + async def memo_value( + self, key: str, *, type_hint: type[ParamType] + ) -> ParamType: ... + + @overload + async def memo_value( + self, key: str, default: AnyType, *, type_hint: type[ParamType] + ) -> AnyType | ParamType: ... + + async def memo_value( + self, + key: str, + default: Any = temporalio.common._arg_unset, + *, + type_hint: type | None = None, + ) -> Any: + """Memo value for the given key, optional default, and optional type + hint. + + Args: + key: Key to get memo value for. + default: Default to use if key is not present. If unset, a + :py:class:`KeyError` is raised when the key does not exist. + type_hint: type hint to use when converting. + + Returns: + Memo value, converted with the type hint if present. + + Raises: + KeyError: Key not present and default not set. + """ + return await self.data_converter._decode_memo_field( + self.raw_info.memo, key, default, type_hint + ) + + +@dataclass +class WorkflowExecutionDescription(WorkflowExecution): + """Description for a single workflow execution run.""" + + raw_description: temporalio.api.workflowservice.v1.DescribeWorkflowExecutionResponse + """Underlying protobuf description.""" + + _static_summary: str | None = None + _static_details: str | None = None + _metadata_decoded: bool = False + + async def static_summary(self) -> str | None: + """Gets the single-line fixed summary for this workflow execution that may appear in + UI/CLI. This can be in single-line Temporal markdown format. + """ + if not self._metadata_decoded: + await self._decode_metadata() + return self._static_summary + + async def static_details(self) -> str | None: + """Gets the general fixed details for this workflow execution that may appear in UI/CLI. + This can be in Temporal markdown format and can span multiple lines. + """ + if not self._metadata_decoded: + await self._decode_metadata() + return self._static_details + + async def _decode_metadata(self) -> None: + """Internal method to decode metadata lazily.""" + self._static_summary, self._static_details = await _decode_user_metadata( + self.data_converter, self.raw_description.execution_config.user_metadata + ) + self._metadata_decoded = True + + @staticmethod + async def _from_raw_description( + description: temporalio.api.workflowservice.v1.DescribeWorkflowExecutionResponse, + namespace: str, + converter: temporalio.converter.DataConverter, + ) -> WorkflowExecutionDescription: + return WorkflowExecutionDescription._from_raw_info( + description.workflow_execution_info, + namespace=namespace, + converter=converter, + raw_description=description, + ) + + +class WorkflowExecutionStatus(IntEnum): + """Status of a workflow execution. + + See :py:class:`temporalio.api.enums.v1.WorkflowExecutionStatus`. + """ + + RUNNING = int( + temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_RUNNING + ) + COMPLETED = int( + temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_COMPLETED + ) + FAILED = int( + temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_FAILED + ) + CANCELED = int( + temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_CANCELED + ) + TERMINATED = int( + temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_TERMINATED + ) + CONTINUED_AS_NEW = int( + temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW + ) + TIMED_OUT = int( + temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_TIMED_OUT + ) + + +@dataclass +class WorkflowExecutionCount: + """Representation of a count from a count workflows call.""" + + count: int + """Approximate number of workflows matching the original query. + + If the query had a group-by clause, this is simply the sum of all the counts + in py:attr:`groups`. + """ + + groups: Sequence[WorkflowExecutionCountAggregationGroup] + """Groups if the query had a group-by clause, or empty if not.""" + + @staticmethod + def _from_raw( + raw: temporalio.api.workflowservice.v1.CountWorkflowExecutionsResponse, + ) -> WorkflowExecutionCount: + return WorkflowExecutionCount( + count=raw.count, + groups=[ + WorkflowExecutionCountAggregationGroup._from_raw(g) for g in raw.groups + ], + ) + + +@dataclass +class WorkflowExecutionCountAggregationGroup: + """Aggregation group if the workflow count query had a group-by clause.""" + + count: int + """Approximate number of workflows matching the original query for this + group. + """ + + group_values: Sequence[temporalio.common.SearchAttributeValue] + """Search attribute values for this group.""" + + @staticmethod + def _from_raw( + raw: temporalio.api.workflowservice.v1.CountWorkflowExecutionsResponse.AggregationGroup, + ) -> WorkflowExecutionCountAggregationGroup: + return WorkflowExecutionCountAggregationGroup( + count=raw.count, + group_values=[ + temporalio.converter._search_attributes._decode_search_attribute_value( + v + ) + for v in raw.group_values + ], + ) + + +class WorkflowExecutionAsyncIterator: + """Asynchronous iterator for :py:class:`WorkflowExecution` values. + + Most users should use ``async for`` on this iterator and not call any of the + methods within. To consume the workflows as histories, call + :py:meth:`map_histories`. + """ + + def __init__( + self, + client: Client, + input: ListWorkflowsInput, + ) -> None: + """Create an asynchronous iterator for the given input. + + Users should not create this directly, but rather use + :py:meth:`Client.list_workflows`. + """ + self._client = client + self._input = input + self._next_page_token = input.next_page_token + self._current_page: Sequence[WorkflowExecution] | None = None + self._current_page_index = 0 + self._limit = input.limit + self._yielded = 0 + + @property + def current_page_index(self) -> int: + """Index of the entry in the current page that will be returned from + the next :py:meth:`__anext__` call. + """ + return self._current_page_index + + @property + def current_page(self) -> Sequence[WorkflowExecution] | None: + """Current page, if it has been fetched yet.""" + return self._current_page + + @property + def next_page_token(self) -> bytes | None: + """Token for the next page request if any.""" + return self._next_page_token + + async def fetch_next_page(self, *, page_size: int | None = None) -> None: + """Fetch the next page if any. + + Args: + page_size: Override the page size this iterator was originally + created with. + """ + page_size = page_size or self._input.page_size + if self._limit is not None and self._limit - self._yielded < page_size: + page_size = self._limit - self._yielded + + resp = await self._client.workflow_service.list_workflow_executions( + temporalio.api.workflowservice.v1.ListWorkflowExecutionsRequest( + namespace=self._client.namespace, + page_size=page_size, + next_page_token=self._next_page_token or b"", + query=self._input.query or "", + ), + retry=True, + metadata=self._input.rpc_metadata, + timeout=self._input.rpc_timeout, + ) + + self._current_page = [ + WorkflowExecution._from_raw_info( + v, self._client.namespace, self._client.data_converter + ) + for v in resp.executions + ] + self._current_page_index = 0 + self._next_page_token = resp.next_page_token or None + + def __aiter__(self) -> WorkflowExecutionAsyncIterator: + """Return self as the iterator.""" + return self + + async def __anext__(self) -> WorkflowExecution: + """Get the next execution on this iterator, fetching next page if + necessary. + """ + if self._limit is not None and self._yielded >= self._limit: + raise StopAsyncIteration + while True: + # No page? fetch and continue + if self._current_page is None: + await self.fetch_next_page() + continue + # No more left in page? + if self._current_page_index >= len(self._current_page): + # If there is a next page token, try to get another page and try + # again + if self._next_page_token is not None: + await self.fetch_next_page() + continue + # No more pages means we're done + raise StopAsyncIteration + # Get current, increment page index, and return + ret = self._current_page[self._current_page_index] + self._current_page_index += 1 + self._yielded += 1 + return ret + + async def map_histories( + self, + *, + event_filter_type: WorkflowHistoryEventFilterType = WorkflowHistoryEventFilterType.ALL_EVENT, + skip_archival: bool = False, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> AsyncIterator[WorkflowHistory]: + """Create an async iterator consuming all workflows and calling + :py:meth:`WorkflowHandle.fetch_history` on each one. + + This is just a shortcut for ``fetch_history``, see that method for + parameter details. + """ + async for v in self: + yield await self._client.get_workflow_handle( + v.id, run_id=v.run_id + ).fetch_history( + event_filter_type=event_filter_type, + skip_archival=skip_archival, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + +@dataclass(frozen=True) +class WorkflowHistory: + """A workflow's ID and immutable history.""" + + workflow_id: str + """ID of the workflow.""" + + events: Sequence[temporalio.api.history.v1.HistoryEvent] + """History events for the workflow.""" + + @property + def run_id(self) -> str: + """Run ID extracted from the first event.""" + if not self.events: + raise RuntimeError("No events") + if not self.events[0].HasField("workflow_execution_started_event_attributes"): + raise RuntimeError("First event is not workflow start") + return self.events[ + 0 + ].workflow_execution_started_event_attributes.original_execution_run_id + + @staticmethod + def from_json(workflow_id: str, history: str | dict[str, Any]) -> WorkflowHistory: + """Construct a WorkflowHistory from an ID and a json dump of history. + + This is built to work both with Temporal UI/CLI JSON as well as + :py:meth:`to_json` even though they are slightly different. + + Args: + workflow_id: The workflow's ID + history: A string or parsed-to-dict representation of workflow + history + + Returns: + Workflow history + """ + parsed = _history_from_json(history) + return WorkflowHistory(workflow_id, parsed.events) + + def to_json(self) -> str: + """Convert this history to JSON. + + Note, this does not include the workflow ID. + """ + return google.protobuf.json_format.MessageToJson( + temporalio.api.history.v1.History(events=self.events) + ) + + def to_json_dict(self) -> dict[str, Any]: + """Convert this history to JSON-compatible dict. + + Note, this does not include the workflow ID. + """ + return google.protobuf.json_format.MessageToDict( + temporalio.api.history.v1.History(events=self.events) + ) + + +@dataclass +class WorkflowHistoryEventAsyncIterator: + """Asynchronous iterator for history events of a workflow. + + Most users should use ``async for`` on this iterator and not call any of the + methods within. + """ + + def __init__( + self, + client: Client, + input: FetchWorkflowHistoryEventsInput, + ) -> None: + """Create an asynchronous iterator for the given input. + + Users should not create this directly, but rather use + :py:meth:`WorkflowHandle.fetch_history_events`. + """ + self._client = client + self._input = input + self._next_page_token = input.next_page_token + self._current_page: ( + None | (Sequence[temporalio.api.history.v1.HistoryEvent]) + ) = None + self._current_page_index = 0 + self._propagated_nexus_serialization_context: ( + temporalio.converter.NexusSerializationContext | None + ) = None + + @property + def current_page_index(self) -> int: + """Index of the entry in the current page that will be returned from + the next :py:meth:`__anext__` call. + """ + return self._current_page_index + + @property + def current_page( + self, + ) -> Sequence[temporalio.api.history.v1.HistoryEvent] | None: + """Current page, if it has been fetched yet.""" + return self._current_page + + @property + def next_page_token(self) -> bytes | None: + """Token for the next page request if any.""" + return self._next_page_token + + async def fetch_next_page(self, *, page_size: int | None = None) -> None: # type:ignore[reportUnusedParameter] # https://github.com/temporalio/sdk-python/issues/1239 + """Fetch the next page if any. + + Args: + page_size: Override the page size this iterator was originally + created with. + """ + resp = await self._client.workflow_service.get_workflow_execution_history( + temporalio.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest( + namespace=self._client.namespace, + execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=self._input.id, + run_id=self._input.run_id or "", + ), + maximum_page_size=page_size or self._input.page_size or 0, + next_page_token=self._next_page_token or b"", + wait_new_event=self._input.wait_new_event, + history_event_filter_type=temporalio.api.enums.v1.HistoryEventFilterType.ValueType( + self._input.event_filter_type + ), + skip_archival=self._input.skip_archival, + ), + retry=True, + metadata=self._input.rpc_metadata, + timeout=self._input.rpc_timeout, + ) + # We don't support raw history + assert len(resp.raw_history) == 0 + self._current_page = list(resp.history.events) + self._current_page_index = 0 + self._next_page_token = resp.next_page_token or None + # Pages after the first may omit the context, such as the page holding the close event + # after a long poll times out + context = temporalio.converter._serialization_context._propagated_nexus_serialization_context( + resp + ) + if context is not None: + self._propagated_nexus_serialization_context = context + + def __aiter__(self) -> WorkflowHistoryEventAsyncIterator: + """Return self as the iterator.""" + return self + + async def __anext__(self) -> temporalio.api.history.v1.HistoryEvent: + """Get the next execution on this iterator, fetching next page if + necessary. + """ + while True: + # No page? fetch and continue + if self._current_page is None: + await self.fetch_next_page() + continue + # No more left in page? + if self._current_page_index >= len(self._current_page): + # If there is a next page token, try to get another page and try + # again + if self._next_page_token is not None: + await self.fetch_next_page() + continue + # No more pages means we're done + raise StopAsyncIteration + # Increment page index and return + ret = self._current_page[self._current_page_index] + self._current_page_index += 1 + return ret + + +class WorkflowUpdateHandle(Generic[LocalReturnType]): + """Handle for a workflow update execution request.""" + + def __init__( + self, + client: Client, + id: str, + workflow_id: str, + *, + workflow_run_id: str | None = None, + result_type: type | None = None, + known_outcome: temporalio.api.update.v1.Outcome | None = None, + ): + """Create a workflow update handle. + + Users should not create this directly, but rather use + :py:meth:`WorkflowHandle.start_update` or :py:meth:`WorkflowHandle.get_update_handle`. + """ + self._client = client + self._id = id + self._workflow_id = workflow_id + self._workflow_run_id = workflow_run_id + self._result_type = result_type + self._known_outcome = known_outcome + self._known_outcome_nexus_context: ( + temporalio.converter.NexusSerializationContext | None + ) = None + + @functools.cached_property + def _data_converter(self) -> temporalio.converter.DataConverter: + return self._client.data_converter.with_context( + WorkflowSerializationContext( + namespace=self._client.namespace, + workflow_id=self.workflow_id, + ) + ) + + def _set_known_outcome( + self, + resp: temporalio.api.workflowservice.v1.UpdateWorkflowExecutionResponse + | temporalio.api.workflowservice.v1.PollWorkflowExecutionUpdateResponse, + ) -> None: + self._known_outcome = resp.outcome + # An update sent by a Nexus operation handler encodes its outcome with the handler's + # Nexus context, which the server returns with the outcome + self._known_outcome_nexus_context = temporalio.converter._serialization_context._propagated_nexus_serialization_context( + resp + ) + + @property + def id(self) -> str: + """ID of this Update request.""" + return self._id + + @property + def workflow_id(self) -> str: + """The ID of the Workflow targeted by this Update.""" + return self._workflow_id + + @property + def workflow_run_id(self) -> str | None: + """If specified, the specific run of the Workflow targeted by this Update.""" + return self._workflow_run_id + + async def result( + self, + *, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> LocalReturnType: + """Wait for and return the result of the update. The result may already be known in which case no network call + is made. Otherwise the result will be polled for until it is returned. + + Args: + rpc_metadata: Headers used on the RPC call. Keys here override client-level RPC metadata keys. + rpc_timeout: Optional RPC deadline to set for each RPC call. Note: this is the timeout for each + RPC call while polling, not a timeout for the function as a whole. If an individual RPC times out, + it will be retried until the result is available. + + Raises: + WorkflowUpdateFailedError: If the update failed. + WorkflowUpdateRPCTimeoutOrCancelledError: This update call timed out + or was cancelled. This doesn't mean the update itself was timed + out or cancelled. + RPCError: Update result could not be fetched for some other reason. + """ + # Poll until outcome reached + await self._poll_until_outcome( + rpc_metadata=rpc_metadata, rpc_timeout=rpc_timeout + ) + + # Convert outcome to failure or value + assert self._known_outcome + data_converter = ( + self._client.data_converter.with_context(self._known_outcome_nexus_context) + if self._known_outcome_nexus_context + else self._data_converter + ) + if self._known_outcome.HasField("failure"): + raise WorkflowUpdateFailedError( + await data_converter.decode_failure(self._known_outcome.failure), + ) + if not self._known_outcome.success.payloads: + return None # type: ignore + type_hints = [self._result_type] if self._result_type else None + results = await data_converter.decode( + self._known_outcome.success.payloads, type_hints + ) + if not results: + return None # type: ignore + elif len(results) > 1: + warnings.warn(f"Expected single update result, got {len(results)}") + return results[0] + + async def _poll_until_outcome( + self, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> None: + if self._known_outcome: + return + req = temporalio.api.workflowservice.v1.PollWorkflowExecutionUpdateRequest( + namespace=self._client.namespace, + update_ref=temporalio.api.update.v1.UpdateRef( + workflow_execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=self.workflow_id, + run_id=self.workflow_run_id or "", + ), + update_id=self.id, + ), + identity=self._client.identity, + wait_policy=temporalio.api.update.v1.WaitPolicy( + lifecycle_stage=temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED + ), + ) + + # Continue polling as long as we have no outcome + while True: + try: + res = ( + await self._client.workflow_service.poll_workflow_execution_update( + req, + retry=True, + metadata=rpc_metadata, + timeout=rpc_timeout, + ) + ) + if res.HasField("outcome"): + self._set_known_outcome(res) + return + except RPCError as err: + if ( + err.status == RPCStatusCode.DEADLINE_EXCEEDED + or err.status == RPCStatusCode.CANCELLED + ): + raise WorkflowUpdateRPCTimeoutOrCancelledError() from err + else: + raise + except asyncio.CancelledError as err: + raise WorkflowUpdateRPCTimeoutOrCancelledError() from err + + +class WorkflowUpdateStage(IntEnum): + """Stage to wait for workflow update to reach before returning from + ``start_update``. + """ + + ADMITTED = int( + temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED + ) + ACCEPTED = int( + temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED + ) + COMPLETED = int( + temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED + ) diff --git a/temporalio/common.py b/temporalio/common.py index a4bb5f60ae..8bcc66a4ae 100644 --- a/temporalio/common.py +++ b/temporalio/common.py @@ -2,7 +2,9 @@ from __future__ import annotations +import asyncio import inspect +import threading import types import warnings from abc import ABC, abstractmethod @@ -14,14 +16,8 @@ Any, ClassVar, Generic, - List, - Optional, - Text, - Tuple, - Type, TypeAlias, TypeVar, - Union, get_origin, get_type_hints, overload, @@ -73,7 +69,7 @@ def from_proto(proto: temporalio.api.common.v1.RetryPolicy) -> RetryPolicy: if proto.HasField("maximum_interval") else None, maximum_attempts=proto.maximum_attempts, - non_retryable_error_types=proto.non_retryable_error_types + non_retryable_error_types=list(proto.non_retryable_error_types) if proto.non_retryable_error_types else None, ) @@ -152,6 +148,187 @@ class WorkflowIDConflictPolicy(IntEnum): ) +class ActivityIDReusePolicy(IntEnum): + """How already-closed activity IDs are handled on start. + + See :py:class:`temporalio.api.enums.v1.ActivityIdReusePolicy`. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.ActivityIdReusePolicy.ACTIVITY_ID_REUSE_POLICY_UNSPECIFIED + ) + ALLOW_DUPLICATE = int( + temporalio.api.enums.v1.ActivityIdReusePolicy.ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE + ) + ALLOW_DUPLICATE_FAILED_ONLY = int( + temporalio.api.enums.v1.ActivityIdReusePolicy.ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY + ) + REJECT_DUPLICATE = int( + temporalio.api.enums.v1.ActivityIdReusePolicy.ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE + ) + + +class ActivityIDConflictPolicy(IntEnum): + """How already-running activity IDs are handled on start. + + See :py:class:`temporalio.api.enums.v1.ActivityIdConflictPolicy`. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.ActivityIdConflictPolicy.ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED + ) + FAIL = int( + temporalio.api.enums.v1.ActivityIdConflictPolicy.ACTIVITY_ID_CONFLICT_POLICY_FAIL + ) + USE_EXISTING = int( + temporalio.api.enums.v1.ActivityIdConflictPolicy.ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING + ) + + +class NexusOperationIDReusePolicy(IntEnum): + """How already-closed Nexus operation IDs are handled on start. + + .. warning:: + This API is experimental and unstable. + + See :py:class:`temporalio.api.enums.v1.NexusOperationIdReusePolicy`. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.NexusOperationIdReusePolicy.NEXUS_OPERATION_ID_REUSE_POLICY_UNSPECIFIED + ) + ALLOW_DUPLICATE = int( + temporalio.api.enums.v1.NexusOperationIdReusePolicy.NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE + ) + ALLOW_DUPLICATE_FAILED_ONLY = int( + temporalio.api.enums.v1.NexusOperationIdReusePolicy.NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY + ) + REJECT_DUPLICATE = int( + temporalio.api.enums.v1.NexusOperationIdReusePolicy.NEXUS_OPERATION_ID_REUSE_POLICY_REJECT_DUPLICATE + ) + + +class NexusOperationIDConflictPolicy(IntEnum): + """How already-running Nexus operation IDs are handled on start. + + .. warning:: + This API is experimental and unstable. + + See :py:class:`temporalio.api.enums.v1.NexusOperationIdConflictPolicy`. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.NexusOperationIdConflictPolicy.NEXUS_OPERATION_ID_CONFLICT_POLICY_UNSPECIFIED + ) + FAIL = int( + temporalio.api.enums.v1.NexusOperationIdConflictPolicy.NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL + ) + USE_EXISTING = int( + temporalio.api.enums.v1.NexusOperationIdConflictPolicy.NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING + ) + + +class NexusOperationExecutionStatus(IntEnum): + """Status of a standalone Nexus operation execution. + + .. warning:: + This API is experimental and unstable. + + See :py:class:`temporalio.api.enums.v1.NexusOperationExecutionStatus`. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.NexusOperationExecutionStatus.NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED + ) + RUNNING = int( + temporalio.api.enums.v1.NexusOperationExecutionStatus.NEXUS_OPERATION_EXECUTION_STATUS_RUNNING + ) + COMPLETED = int( + temporalio.api.enums.v1.NexusOperationExecutionStatus.NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED + ) + FAILED = int( + temporalio.api.enums.v1.NexusOperationExecutionStatus.NEXUS_OPERATION_EXECUTION_STATUS_FAILED + ) + CANCELED = int( + temporalio.api.enums.v1.NexusOperationExecutionStatus.NEXUS_OPERATION_EXECUTION_STATUS_CANCELED + ) + TERMINATED = int( + temporalio.api.enums.v1.NexusOperationExecutionStatus.NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED + ) + TIMED_OUT = int( + temporalio.api.enums.v1.NexusOperationExecutionStatus.NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT + ) + + +class PendingNexusOperationExecutionState(IntEnum): + """More detailed breakdown of :py:attr:`NexusOperationExecutionStatus.RUNNING`. + + .. warning:: + This API is experimental and unstable. + + See :py:class:`temporalio.api.enums.v1.PendingNexusOperationState`. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.PendingNexusOperationState.PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED + ) + SCHEDULED = int( + temporalio.api.enums.v1.PendingNexusOperationState.PENDING_NEXUS_OPERATION_STATE_SCHEDULED + ) + BACKING_OFF = int( + temporalio.api.enums.v1.PendingNexusOperationState.PENDING_NEXUS_OPERATION_STATE_BACKING_OFF + ) + STARTED = int( + temporalio.api.enums.v1.PendingNexusOperationState.PENDING_NEXUS_OPERATION_STATE_STARTED + ) + BLOCKED = int( + temporalio.api.enums.v1.PendingNexusOperationState.PENDING_NEXUS_OPERATION_STATE_BLOCKED + ) + + +class NexusOperationCancellationState(IntEnum): + """State of a Nexus operation cancellation. + + .. warning:: + This API is experimental and unstable. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.NexusOperationCancellationState.NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED + ) + """Default value, unspecified state.""" + + SCHEDULED = int( + temporalio.api.enums.v1.NexusOperationCancellationState.NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED + ) + """Cancellation request is in the queue waiting to be executed or is currently executing.""" + + BACKING_OFF = int( + temporalio.api.enums.v1.NexusOperationCancellationState.NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF + ) + """Cancellation request has failed with a retryable error and is backing off before the next attempt.""" + + SUCCEEDED = int( + temporalio.api.enums.v1.NexusOperationCancellationState.NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED + ) + """Cancellation request succeeded.""" + + FAILED = int( + temporalio.api.enums.v1.NexusOperationCancellationState.NEXUS_OPERATION_CANCELLATION_STATE_FAILED + ) + """Cancellation request failed with a non-retryable error.""" + + TIMED_OUT = int( + temporalio.api.enums.v1.NexusOperationCancellationState.NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT + ) + """The associated operation timed out - exceeded the user supplied schedule-to-close timeout.""" + + BLOCKED = int( + temporalio.api.enums.v1.NexusOperationCancellationState.NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED + ) + """Cancellation request is blocked, eg: by circuit breaker.""" + + class QueryRejectCondition(IntEnum): """Whether a query should be rejected in certain conditions. @@ -198,13 +375,13 @@ def __setstate__(self, state: object) -> None: # We choose to make this a list instead of an sequence so we can catch if people # are not sending lists each time but maybe accidentally sending a string (which # is a sequence) -SearchAttributeValues: TypeAlias = Union[ - list[str], list[int], list[float], list[bool], list[datetime] -] +SearchAttributeValues: TypeAlias = ( + list[str] | list[int] | list[float] | list[bool] | list[datetime] +) SearchAttributes: TypeAlias = Mapping[str, SearchAttributeValues] -SearchAttributeValue: TypeAlias = Union[str, int, float, bool, datetime, Sequence[str]] +SearchAttributeValue: TypeAlias = str | int | float | bool | datetime | Sequence[str] SearchAttributeValueType = TypeVar( "SearchAttributeValueType", str, int, float, bool, datetime, Sequence[str] @@ -339,19 +516,22 @@ def for_keyword_list(name: str) -> SearchAttributeKey[Sequence[str]]: @staticmethod def _from_metadata_type(name: str, metadata_type: str) -> SearchAttributeKey | None: - if metadata_type == "Text": + # The type metadata is usually in PascalCase (e.g. "KeywordList") + # but in rare cases may be in SCREAMING_SNAKE_CASE (e.g. + # "INDEXED_VALUE_TYPE_KEYWORD_LIST"). + if metadata_type in ("Text", "INDEXED_VALUE_TYPE_TEXT"): return SearchAttributeKey.for_text(name) - elif metadata_type == "Keyword": + elif metadata_type in ("Keyword", "INDEXED_VALUE_TYPE_KEYWORD"): return SearchAttributeKey.for_keyword(name) - elif metadata_type == "Int": + elif metadata_type in ("Int", "INDEXED_VALUE_TYPE_INT"): return SearchAttributeKey.for_int(name) - elif metadata_type == "Double": + elif metadata_type in ("Double", "INDEXED_VALUE_TYPE_DOUBLE"): return SearchAttributeKey.for_float(name) - elif metadata_type == "Bool": + elif metadata_type in ("Bool", "INDEXED_VALUE_TYPE_BOOL"): return SearchAttributeKey.for_bool(name) - elif metadata_type == "Datetime": + elif metadata_type in ("Datetime", "INDEXED_VALUE_TYPE_DATETIME"): return SearchAttributeKey.for_datetime(name) - elif metadata_type == "KeywordList": + elif metadata_type in ("KeywordList", "INDEXED_VALUE_TYPE_KEYWORD_LIST"): return SearchAttributeKey.for_keyword_list(name) return None @@ -492,7 +672,7 @@ def __contains__(self, key: object) -> bool: This uses key equality so the key must be the same name and type. """ - return any(k == key for k, v in self) + return any(k == key for k, _v in self) @overload def get( @@ -544,7 +724,7 @@ def updated(self, *search_attributes: SearchAttributePair) -> TypedSearchAttribu TypedSearchAttributes.empty = TypedSearchAttributes(search_attributes=[]) -def _warn_on_deprecated_search_attributes( +def _warn_on_deprecated_search_attributes( # type:ignore[reportUnusedFunction] attributes: SearchAttributes | Any | None, stack_level: int = 2, ) -> None: @@ -556,7 +736,7 @@ def _warn_on_deprecated_search_attributes( ) -MetricAttributes: TypeAlias = Mapping[str, Union[str, int, float, bool]] +MetricAttributes: TypeAlias = Mapping[str, str | int | float | bool] class MetricMeter(ABC): @@ -1046,10 +1226,7 @@ def __post_init__(self): class VersioningBehavior(IntEnum): - """Specifies when a workflow might move from a worker of one Build Id to another. - - WARNING: Experimental API. - """ + """Specifies when a workflow might move from a worker of one Build Id to another.""" UNSPECIFIED = ( temporalio.api.enums.v1.VersioningBehavior.VERSIONING_BEHAVIOR_UNSPECIFIED @@ -1067,10 +1244,7 @@ class VersioningBehavior(IntEnum): @dataclass(frozen=True) class WorkerDeploymentVersion: - """Represents the version of a specific worker deployment. - - WARNING: Experimental API. - """ + """Represents the version of a specific worker deployment.""" deployment_name: str build_id: str @@ -1100,11 +1274,7 @@ def _to_proto(self) -> temporalio.api.deployment.v1.WorkerDeploymentVersion: class VersioningOverride(ABC): - """Represents the override of a worker's versioning behavior for a workflow execution. - - .. warning:: - Experimental API. - """ + """Represents the override of a worker's versioning behavior for a workflow execution.""" @abstractmethod def _to_proto(self) -> temporalio.api.workflow.v1.VersioningOverride: @@ -1114,11 +1284,7 @@ def _to_proto(self) -> temporalio.api.workflow.v1.VersioningOverride: @dataclass(frozen=True) class PinnedVersioningOverride(VersioningOverride): - """Workflow will be pinned to a specific deployment version. - - .. warning:: - Experimental API. - """ + """Workflow will be pinned to a specific deployment version.""" version: WorkerDeploymentVersion @@ -1137,11 +1303,7 @@ def _to_proto(self) -> temporalio.api.workflow.v1.VersioningOverride: @dataclass(frozen=True) class AutoUpgradeVersioningOverride(VersioningOverride): - """The workflow will auto-upgrade to the current deployment version on the next workflow task. - - .. warning:: - Experimental API. - """ + """The workflow will auto-upgrade to the current deployment version on the next workflow task.""" def _to_proto(self) -> temporalio.api.workflow.v1.VersioningOverride: """Convert to proto representation.""" @@ -1152,12 +1314,35 @@ def _to_proto(self) -> temporalio.api.workflow.v1.VersioningOverride: ) +@dataclass(frozen=True) +class OneTimeVersioningOverride(VersioningOverride): + """Route workflow tasks to a specific deployment version until a task completes + on that version, then clear the override. + + The worker's reported versioning behavior governs subsequent tasks. This does + not pin the workflow to the target version. + + .. warning:: + This API is experimental and requires Temporal Server 1.32 or newer. + """ + + target_version: WorkerDeploymentVersion + + def _to_proto(self) -> temporalio.api.workflow.v1.VersioningOverride: + """Convert to proto representation.""" + return temporalio.api.workflow.v1.VersioningOverride( + one_time=temporalio.api.workflow.v1.VersioningOverride.OneTimeOverride( + target_deployment_version=self.target_version._to_proto(), + ), + ) + + # Should be set as the "arg" argument for _arg_or_args checks where the argument # is unset. This is different than None which is a legitimate argument. _arg_unset = object() -def _arg_or_args(arg: Any, args: Sequence[Any]) -> Sequence[Any]: +def _arg_or_args(arg: Any, args: Sequence[Any]) -> Sequence[Any]: # type:ignore[reportUnusedFunction] if arg is not _arg_unset: if args: raise ValueError("Cannot have arg and args") @@ -1165,7 +1350,7 @@ def _arg_or_args(arg: Any, args: Sequence[Any]) -> Sequence[Any]: return args -def _apply_headers( +def _apply_headers( # type:ignore[reportUnusedFunction] source: Mapping[str, temporalio.api.common.v1.Payload] | None, dest: google.protobuf.internal.containers.MessageMap[ str, temporalio.api.common.v1.Payload @@ -1192,7 +1377,7 @@ def _apply_headers( ) -def _type_hints_from_func( +def _type_hints_from_func( # type:ignore[reportUnusedFunction] func: Callable, ) -> tuple[list[type] | None, type | None]: """Extracts the type hints from the function. @@ -1204,7 +1389,8 @@ def _type_hints_from_func( Tuple containing parameter types and return type. The parameter types will be None if there are any non-positional parameters or if any of the parameters to not have an annotation that represents a class. If the - first parameter is "self" with no attribute, it is not included. + first parameter is "self" and is unannotated or annotated as Self, it is + not included. """ # If this is a class instance with user-defined __call__, then use that as # the func. This mimics inspect logic inside Python. @@ -1238,7 +1424,7 @@ def _type_hints_from_func( and value.name == "self" and ( value.annotation is inspect.Parameter.empty - or str(value.annotation) == "typing.Self" + or hints.get(value.name) is Self ) ): continue @@ -1267,3 +1453,33 @@ class HeaderCodecBehavior(IntEnum): """Encode and decode all headers automatically""" WORKFLOW_ONLY_CODEC = 3 """Only automatically encode and decode headers in workflow activation encoding and decoding.""" + + +@dataclass +class _CompositeEvent: # pyright: ignore[reportUnusedClass] + # This should always be present, but is sometimes lazily set internally + thread_event: threading.Event | None + # Async event only for async activities + async_event: asyncio.Event | None + + def set(self) -> None: + if not self.thread_event: + raise RuntimeError("Missing event") + self.thread_event.set() + if self.async_event: + self.async_event.set() + + def is_set(self) -> bool: + if not self.thread_event: + raise RuntimeError("Missing event") + return self.thread_event.is_set() + + async def wait(self) -> None: + if not self.async_event: + raise RuntimeError("not in async activity") + await self.async_event.wait() + + def wait_sync(self, timeout: float | None = None) -> None: + if not self.thread_event: + raise RuntimeError("Missing event") + self.thread_event.wait(timeout) diff --git a/temporalio/contrib/aws/__init__.py b/temporalio/contrib/aws/__init__.py new file mode 100644 index 0000000000..a8b8c648f5 --- /dev/null +++ b/temporalio/contrib/aws/__init__.py @@ -0,0 +1 @@ +"""AWS integrations for Temporal SDK.""" diff --git a/temporalio/contrib/aws/lambda_worker/README.md b/temporalio/contrib/aws/lambda_worker/README.md new file mode 100644 index 0000000000..c12e7037d7 --- /dev/null +++ b/temporalio/contrib/aws/lambda_worker/README.md @@ -0,0 +1,122 @@ +# lambda_worker + +A wrapper for running [Temporal](https://temporal.io) workers inside AWS Lambda. A single +`run_worker` call handles the full per-invocation lifecycle: connecting to the Temporal server, +creating a worker with Lambda-tuned defaults, polling for tasks, and gracefully shutting down before +the invocation deadline. + +## Quick start + +```python +# handler.py +from temporalio.common import WorkerDeploymentVersion +from temporalio.contrib.aws.lambda_worker import LambdaWorkerConfig, run_worker + +from my_workflows import MyWorkflow +from my_activities import my_activity + + +def configure(config: LambdaWorkerConfig) -> None: + config.worker_config["task_queue"] = "my-task-queue" + config.worker_config["workflows"] = [MyWorkflow] + config.worker_config["activities"] = [my_activity] + + +lambda_handler = run_worker( + WorkerDeploymentVersion( + deployment_name="my-service", + build_id="v1.0", + ), + configure, +) +``` + +## Configuration + +Client connection settings (address, namespace, TLS, API key) are loaded +automatically from a TOML config file and/or environment variables via +`temporalio.envconfig`. The config file is resolved in order: + +1. `TEMPORAL_CONFIG_FILE` env var, if set. +2. `temporal.toml` in `$LAMBDA_TASK_ROOT` (typically `/var/task`). +3. `temporal.toml` in the current working directory. + +The file is optional -- if absent, only environment variables are used. + +The configure callback receives a `LambdaWorkerConfig` dataclass with fields +pre-populated with Lambda-appropriate defaults. Override any field directly in +the callback. The `task_queue` key in `worker_config` is pre-populated from the +`TEMPORAL_TASK_QUEUE` environment variable if set. + +### Sync, async, and async-generator configure + +The configure callback runs **once per invocation, inside that invocation's +event loop**, before the client connects. It may be: + +- a plain function `def configure(config) -> None`; +- an `async def configure(config) -> None` coroutine — awaited for setup (pair + with `shutdown_hooks` for teardown); +- an `async def configure(config): ...; yield; ...` async generator — statements + before the single `yield` run before the client connects, the worker runs + while the generator is suspended at the `yield`, and statements after the + `yield` run as teardown once the worker has stopped. + +The callback runs per invocation (rather than once at process start) because +event-loop-bound resources cannot be created before an event loop exists and +cannot be shared across invocations — each invocation runs under a fresh +`asyncio.run` loop. + +## Lambda-tuned worker defaults + +The package applies conservative concurrency limits suited to Lambda's resource +constraints: + +| Setting | Default | +| --- | --- | +| `max_concurrent_activities` | 2 | +| `max_concurrent_workflow_tasks` | 10 | +| `max_concurrent_local_activities` | 2 | +| `max_concurrent_nexus_tasks` | 5 | +| `workflow_task_poller_behavior` | `SimpleMaximum(2)` | +| `activity_task_poller_behavior` | `SimpleMaximum(1)` | +| `nexus_task_poller_behavior` | `SimpleMaximum(1)` | +| `graceful_shutdown_timeout` | 5 seconds | +| `max_cached_workflows` | 100 | +| `disable_eager_activity_execution` | Always `True` | + +Worker Deployment Versioning is always enabled. + +## Observability + +Metrics and tracing are opt-in. The `otel` module provides convenience helpers +for AWS Distro for OpenTelemetry (ADOT): + +```python +from temporalio.common import WorkerDeploymentVersion +from temporalio.contrib.aws.lambda_worker import LambdaWorkerConfig, run_worker +from temporalio.contrib.aws.lambda_worker.otel import apply_defaults, OtelOptions + + +def configure(config: LambdaWorkerConfig) -> None: + config.worker_config["task_queue"] = "my-task-queue" + config.worker_config["workflows"] = [MyWorkflow] + config.worker_config["activities"] = [my_activity] + apply_defaults(config, OtelOptions()) + + +lambda_handler = run_worker( + WorkerDeploymentVersion( + deployment_name="my-service", + build_id="v1.0", + ), + configure, +) +``` + +You can also use `apply_metrics` or `apply_tracing` individually. + +If you use OTEL, you can use +[ADOT](https://aws-otel.github.io/docs/getting-started/lambda/lambda-python) +(the AWS Distro For OpenTelemetry) to automatically integrate with AWS +observability functionality. Namely, you will want to add the Lambda layer in +the aforementioned link. We'll handle setting up the SDK for you. diff --git a/temporalio/contrib/aws/lambda_worker/__init__.py b/temporalio/contrib/aws/lambda_worker/__init__.py new file mode 100644 index 0000000000..11f748c9b9 --- /dev/null +++ b/temporalio/contrib/aws/lambda_worker/__init__.py @@ -0,0 +1,49 @@ +"""A wrapper for running Temporal workers inside AWS Lambda. + +A single :py:func:`run_worker` call handles the full per-invocation lifecycle: connecting to the +Temporal server, creating a worker with Lambda-tuned defaults, polling for tasks, and gracefully +shutting down before the invocation deadline. + +Quick start:: + + from temporalio.common import WorkerDeploymentVersion + from temporalio.contrib.aws.lambda_worker import LambdaWorkerConfig, run_worker + + def configure(config: LambdaWorkerConfig) -> None: + config.worker_config["task_queue"] = "my-task-queue" + config.worker_config["workflows"] = [MyWorkflow] + config.worker_config["activities"] = [my_activity] + + lambda_handler = run_worker( + WorkerDeploymentVersion( + deployment_name="my-service", + build_id="v1.0", + ), + configure, + ) + +Configuration +------------- +Client connection settings (address, namespace, TLS, API key) are loaded automatically from a TOML +config file and/or environment variables via :py:mod:`temporalio.envconfig`. The config file is +resolved in order: + +1. ``TEMPORAL_CONFIG_FILE`` env var, if set. +2. ``temporal.toml`` in ``$LAMBDA_TASK_ROOT`` (typically ``/var/task``). +3. ``temporal.toml`` in the current working directory. + +The file is optional -- if absent, only environment variables are used. + +The configure callback receives a :py:class:`LambdaWorkerConfig` dataclass with fields pre-populated +with Lambda-appropriate defaults. Override any field directly in the callback. The ``task_queue`` +key in ``worker_config`` is pre-populated from the ``TEMPORAL_TASK_QUEUE`` environment variable if +set. +""" + +from temporalio.contrib.aws.lambda_worker._configure import LambdaWorkerConfig +from temporalio.contrib.aws.lambda_worker._run_worker import run_worker + +__all__ = [ + "LambdaWorkerConfig", + "run_worker", +] diff --git a/temporalio/contrib/aws/lambda_worker/_configure.py b/temporalio/contrib/aws/lambda_worker/_configure.py new file mode 100644 index 0000000000..2c50b4fa21 --- /dev/null +++ b/temporalio/contrib/aws/lambda_worker/_configure.py @@ -0,0 +1,73 @@ +"""Configuration for the Lambda worker.""" + +from __future__ import annotations + +import asyncio +import logging +from collections.abc import Awaitable, Callable +from dataclasses import dataclass, field +from datetime import timedelta + +from temporalio.client import ClientConnectConfig +from temporalio.worker import WorkerConfig + +logger = logging.getLogger(__name__) + + +@dataclass +class LambdaWorkerConfig: + """Passed to the configure callback of :py:func:`run_worker`. + + Fields are pre-populated with Lambda-appropriate defaults before the configure callback is + invoked; the callback may read and override any of them. + + Use ``worker_config`` to set task queue, register workflows/activities, and tune worker options. + The ``task_queue`` key is pre-populated from the ``TEMPORAL_TASK_QUEUE`` environment variable if + set. + + Attributes: + client_connect_config: Keyword arguments that will be passed to + :py:meth:`temporalio.client.Client.connect`. Pre-populated from the + config file / environment variables via envconfig, with Lambda + defaults applied. + worker_config: Keyword arguments that will be passed to the + :py:class:`temporalio.worker.Worker` constructor (the ``client`` + key is managed internally). Pre-populated with Lambda-appropriate + defaults (low concurrency, eager activities disabled) and + ``task_queue`` from ``TEMPORAL_TASK_QUEUE`` if set. + shutdown_deadline_buffer: How long before the Lambda invocation + deadline the worker begins its shutdown sequence (worker drain + + shutdown hooks). Pre-populated to + ``graceful_shutdown_timeout + 2s``. If you change + ``graceful_shutdown_timeout`` in ``worker_config``, adjust this + accordingly. + shutdown_hooks: Functions called at invocation exit, including failure + or cancellation, after configuration setup succeeds. Run in list + order, after the worker stops (if started) and before configure + teardown. Each may be sync or async. Use this to flush telemetry + providers or release other per-process resources. + """ + + client_connect_config: ClientConnectConfig = field( + default_factory=ClientConnectConfig + ) + worker_config: WorkerConfig = field(default_factory=WorkerConfig) + shutdown_deadline_buffer: timedelta = field( + default_factory=lambda: timedelta(seconds=7) + ) + shutdown_hooks: list[Callable[[], Awaitable[None] | None]] = field( + default_factory=list + ) + + +async def _run_shutdown_hooks( # type:ignore[reportUnusedFunction] + config: LambdaWorkerConfig, +) -> None: + """Run all registered shutdown hooks in order, logging errors.""" + for fn in config.shutdown_hooks: + try: + result = fn() + if asyncio.iscoroutine(result): + await result + except Exception as e: + logger.error(f"shutdown hook error: {e}") diff --git a/temporalio/contrib/aws/lambda_worker/_defaults.py b/temporalio/contrib/aws/lambda_worker/_defaults.py new file mode 100644 index 0000000000..1b93e3407d --- /dev/null +++ b/temporalio/contrib/aws/lambda_worker/_defaults.py @@ -0,0 +1,84 @@ +"""Lambda-tuned defaults for Temporal worker and client configuration.""" + +from __future__ import annotations + +import os +from collections.abc import Callable +from datetime import timedelta +from pathlib import Path + +from temporalio.worker import PollerBehaviorSimpleMaximum, WorkerConfig + +# ---- Lambda-tuned worker defaults ---- +# Conservative concurrency limits suited to Lambda's resource constraints. + +DEFAULT_MAX_CONCURRENT_ACTIVITIES: int = 2 +DEFAULT_MAX_CONCURRENT_WORKFLOW_TASKS: int = 10 +DEFAULT_MAX_CONCURRENT_LOCAL_ACTIVITIES: int = 2 +DEFAULT_MAX_CONCURRENT_NEXUS_TASKS: int = 5 +DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT: timedelta = timedelta(seconds=5) +DEFAULT_SHUTDOWN_HOOK_BUFFER: timedelta = timedelta(seconds=2) +DEFAULT_MAX_CACHED_WORKFLOWS: int = 30 + +DEFAULT_WORKFLOW_TASK_POLLER_BEHAVIOR = PollerBehaviorSimpleMaximum(maximum=2) +DEFAULT_ACTIVITY_TASK_POLLER_BEHAVIOR = PollerBehaviorSimpleMaximum(maximum=1) +DEFAULT_NEXUS_TASK_POLLER_BEHAVIOR = PollerBehaviorSimpleMaximum(maximum=1) + +# ---- Environment variable names ---- +ENV_TASK_QUEUE = "TEMPORAL_TASK_QUEUE" +ENV_LAMBDA_TASK_ROOT = "LAMBDA_TASK_ROOT" +ENV_CONFIG_FILE = "TEMPORAL_CONFIG_FILE" +DEFAULT_CONFIG_FILE = "temporal.toml" + + +def apply_lambda_worker_defaults(config: WorkerConfig) -> None: + """Apply Lambda-appropriate defaults to worker config. + + Only sets values that have not already been set (i.e. are absent from *config*). + ``disable_eager_activity_execution`` is always set to ``True``. + """ + config.setdefault("max_concurrent_activities", DEFAULT_MAX_CONCURRENT_ACTIVITIES) + config.setdefault( + "max_concurrent_workflow_tasks", DEFAULT_MAX_CONCURRENT_WORKFLOW_TASKS + ) + config.setdefault( + "max_concurrent_local_activities", DEFAULT_MAX_CONCURRENT_LOCAL_ACTIVITIES + ) + config.setdefault("max_concurrent_nexus_tasks", DEFAULT_MAX_CONCURRENT_NEXUS_TASKS) + config.setdefault("graceful_shutdown_timeout", DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT) + config.setdefault("max_cached_workflows", DEFAULT_MAX_CACHED_WORKFLOWS) + config.setdefault( + "workflow_task_poller_behavior", DEFAULT_WORKFLOW_TASK_POLLER_BEHAVIOR + ) + config.setdefault( + "activity_task_poller_behavior", DEFAULT_ACTIVITY_TASK_POLLER_BEHAVIOR + ) + config.setdefault("nexus_task_poller_behavior", DEFAULT_NEXUS_TASK_POLLER_BEHAVIOR) + # Always disable eager activities in Lambda. + config["disable_eager_activity_execution"] = True + + +def build_lambda_identity(request_id: str, function_arn: str) -> str: + """Build a worker identity string from the Lambda invocation context. + + Format: ``@``. + """ + return f"{request_id or 'unknown'}@{function_arn or 'unknown'}" + + +def lambda_default_config_file_path( + getenv: Callable[[str], str] = os.environ.get, # type: ignore[assignment] +) -> Path: + """Return the config file path for a Lambda environment. + + Resolution order: + + 1. ``TEMPORAL_CONFIG_FILE`` env var, if set. + 2. ``temporal.toml`` in ``$LAMBDA_TASK_ROOT`` (typically ``/var/task``). + 3. ``temporal.toml`` in the current working directory. + """ + config_file = getenv(ENV_CONFIG_FILE) + if config_file: + return Path(config_file) + root = getenv(ENV_LAMBDA_TASK_ROOT) or "." + return Path(root) / DEFAULT_CONFIG_FILE diff --git a/temporalio/contrib/aws/lambda_worker/_run_worker.py b/temporalio/contrib/aws/lambda_worker/_run_worker.py new file mode 100644 index 0000000000..a6ed358f29 --- /dev/null +++ b/temporalio/contrib/aws/lambda_worker/_run_worker.py @@ -0,0 +1,373 @@ +from __future__ import annotations + +import asyncio +import inspect +import logging +import os +import sys +from collections.abc import AsyncGenerator, Awaitable, Callable +from contextlib import AbstractAsyncContextManager, asynccontextmanager +from dataclasses import dataclass, field +from datetime import timedelta +from typing import Any, TypeAlias + +import temporalio.client +import temporalio.worker +from temporalio.client import ClientConnectConfig +from temporalio.common import WorkerDeploymentVersion +from temporalio.contrib.aws.lambda_worker._configure import ( + LambdaWorkerConfig, + _run_shutdown_hooks, +) +from temporalio.contrib.aws.lambda_worker._defaults import ( + DEFAULT_SHUTDOWN_HOOK_BUFFER, + apply_lambda_worker_defaults, + build_lambda_identity, + lambda_default_config_file_path, +) +from temporalio.envconfig import ClientConfigProfile +from temporalio.worker import WorkerConfig, WorkerDeploymentConfig + +logger = logging.getLogger(__name__) + +# A plain, ``async def`` coroutine, ``async def`` generator, or async-context-manager +# callback. See run_worker. +ConfigureCallback: TypeAlias = Callable[ + [LambdaWorkerConfig], + None + | Awaitable[None] + | AsyncGenerator[None, None] + | AbstractAsyncContextManager[None], +] + + +@dataclass +class _WorkerDeps: + """External dependencies injected for testability.""" + + connect: Callable[..., Awaitable[temporalio.client.Client]] = field( + default_factory=lambda: temporalio.client.Client.connect + ) + create_worker: Callable[..., temporalio.worker.Worker] = field( + default_factory=lambda: temporalio.worker.Worker + ) + load_config: Callable[[], ClientConfigProfile] | None = None + getenv: Callable[[str], str | None] = field(default_factory=lambda: os.environ.get) + extract_lambda_ctx: Callable[[Any], tuple[str, str] | None] | None = None + + +def _default_load_config(getenv: Callable[[str], str | None]) -> ClientConfigProfile: + config_path = lambda_default_config_file_path(getenv) # type: ignore[arg-type] + return ClientConfigProfile.load(config_source=config_path) + + +def _default_extract_lambda_ctx( + lambda_context: Any, +) -> tuple[str, str] | None: + """Extract (request_id, function_arn) from a Lambda context object.""" + if lambda_context is None: + return None + request_id = getattr(lambda_context, "aws_request_id", None) + function_arn = getattr(lambda_context, "invoked_function_arn", None) + if request_id is not None and function_arn is not None: + return (request_id, function_arn) + return None + + +def _validate_task_queue(config: LambdaWorkerConfig) -> None: + """Raise if no task queue has been configured.""" + if not config.worker_config.get("task_queue"): + raise ValueError( + "task queue not configured: set " + 'worker_config["task_queue"] or the ' + "TEMPORAL_TASK_QUEUE environment variable" + ) + + +def run_worker( + version: WorkerDeploymentVersion, + configure: ConfigureCallback, +) -> Callable[[Any, Any], None]: + """Create a Temporal worker Lambda handler. + + Calls the *configure* callback to collect workflow/activity registrations and option + overrides, then returns a Lambda handler function. On each invocation the handler + connects to the Temporal server, starts a worker with Lambda-tuned defaults, polls for + tasks until the invocation deadline approaches, and then gracefully shuts down. + + The *configure* callback is invoked **once per invocation** and may be synchronous or + asynchronous: + + * **Synchronous** ``def configure(config) -> None`` — runs per invocation. Use for + static worker definition (task queue, registrations, option tuning) and resources + that are not bound to an event loop. + * **Async** ``async def configure(config) -> None`` — awaited per invocation. Use when + setup must ``await`` (for example, opening an async client). Pair with + ``shutdown_hooks`` for teardown. + * **Async generator** ``async def configure(config): ...; yield; ...`` (or an + equivalent ``@contextlib.asynccontextmanager``-decorated function) — entered per + invocation. Statements before the single ``yield`` run before the client connects; + the worker runs while the generator is suspended at the ``yield``; statements after + the ``yield`` run as teardown once the worker has stopped. Any ``shutdown_hooks`` + registered before the ``yield`` run after the worker stops but *before* the + post-``yield`` teardown, so this resource outlives the hooks (e.g. a telemetry + flush hook can still emit before the resource is closed). This is the recommended + shape for event-loop-bound resources that must live for the duration of the + invocation, such as an ``aioboto3`` S3 client backing the external-storage data + converter (see the async example below). + + The callback runs per invocation (not once at cold start) because event-loop-bound + resources cannot be created at cold start (there is no running loop) and cannot be + shared across invocations (each invocation runs under a fresh ``asyncio.run`` loop). + + The *version* parameter identifies this worker's deployment version. ``run_worker`` + always enables Worker Deployment Versioning (``use_worker_versioning=True``). To + provide a default versioning behavior for workflows that do not specify one at + registration time, set ``deployment_config`` in ``worker_config`` in the configure + callback. + + The returned handler has the signature ``handler(event, context)`` and should be set as + your Lambda function's handler entry point. + + Args: + version: The worker deployment version. Required. + configure: A callback that receives a :py:class:`LambdaWorkerConfig` + (pre-populated with Lambda defaults) and configures workflows, + activities, and options on it. May be sync, async, or an async + generator (see above). + + Returns: + A Lambda handler function. + + Example: + Synchronous configure (static worker definition):: + + from temporalio.common import WorkerDeploymentVersion + from temporalio.contrib.aws.lambda_worker import ( + LambdaWorkerConfig, + run_worker, + ) + + def configure(config: LambdaWorkerConfig) -> None: + config.worker_config["task_queue"] = "my-task-queue" + config.worker_config["workflows"] = [MyWorkflow] + config.worker_config["activities"] = [my_activity] + + lambda_handler = run_worker( + WorkerDeploymentVersion( + deployment_name="my-service", + build_id="v1.0"), + configure, + ) + + Async generator configure, bracketing an ``aioboto3`` S3 client. The session + lives at module scope (it is not event-loop-bound and caches credentials across + warm invocations); only the loop-bound client is opened per invocation:: + + import aioboto3 + import dataclasses + from temporalio.contrib.aws.s3driver import S3StorageDriver + from temporalio.contrib.aws.s3driver.aioboto3 import new_aioboto3_client + from temporalio.converter import DataConverter, ExternalStorage + + session = aioboto3.Session() + + async def configure(config: LambdaWorkerConfig): + config.worker_config["task_queue"] = "my-task-queue" + config.worker_config["workflows"] = [MyWorkflow] + async with session.client("s3") as s3_client: + driver = S3StorageDriver( + client=new_aioboto3_client(s3_client), bucket="my-payloads", + ) + config.client_connect_config["data_converter"] = dataclasses.replace( + DataConverter.default, + external_storage=ExternalStorage(drivers=[driver]), + ) + yield + + lambda_handler = run_worker( + WorkerDeploymentVersion( + deployment_name="my-service", + build_id="v1.0"), + configure, + ) + """ + deps = _WorkerDeps() + try: + return _run_worker_internal(version, configure, deps) + except Exception as e: + logger.error(f"fatal error running lambda worker: {e}") + sys.exit(1) + + +def _run_worker_internal( + version: WorkerDeploymentVersion, + configure: ConfigureCallback, + deps: _WorkerDeps, +) -> Callable[[Any, Any], None]: + """Core logic with injected dependencies for testability.""" + if not version.deployment_name or not version.build_id: + raise ValueError( + "version is required (deployment_name and build_id must be set)" + ) + + # Load client config from envconfig / TOML. + load_config = deps.load_config or (lambda: _default_load_config(deps.getenv)) + profile = load_config() + base_connect_config: ClientConnectConfig = {**profile.to_client_connect_config()} + + # Build base worker config with Lambda defaults. + base_worker_config: WorkerConfig = {} + apply_lambda_worker_defaults(base_worker_config) + + # Always enable deployment versioning. + base_worker_config["deployment_config"] = WorkerDeploymentConfig( + version=version, + use_worker_versioning=True, + ) + + # Calculate default shutdown buffer. + graceful_timeout = base_worker_config.get( + "graceful_shutdown_timeout", timedelta(seconds=5) + ) + shutdown_buffer = graceful_timeout + DEFAULT_SHUTDOWN_HOOK_BUFFER + + env_tq = deps.getenv("TEMPORAL_TASK_QUEUE") + + def _new_config() -> LambdaWorkerConfig: + """Fresh config per invocation; dicts/hooks are copied so nothing leaks across + invocations. + """ + config = LambdaWorkerConfig( + client_connect_config={**base_connect_config}, + worker_config={**base_worker_config}, + shutdown_deadline_buffer=shutdown_buffer, + ) + if env_tq: + config.worker_config["task_queue"] = env_tq + return config + + extract_lambda_ctx = deps.extract_lambda_ctx or _default_extract_lambda_ctx + + def _handler(_event: Any, lambda_context: Any) -> None: + asyncio.run( + _invocation_handler( + lambda_context=lambda_context, + configure=configure, + new_config=_new_config, + deps=deps, + extract_lambda_ctx=extract_lambda_ctx, + ) + ) + + return _handler + + +@asynccontextmanager +async def _invocation_config_scope( + configure: ConfigureCallback, + new_config: Callable[[], LambdaWorkerConfig], +) -> AsyncGenerator[LambdaWorkerConfig, None]: + """Run *configure* (see run_worker for the forms) against a fresh per-invocation config + and yield it. For the generator / context-manager forms, post-``yield`` teardown runs + when the caller's block exits, including on error. Task queue is validated after + setup. The config's shutdown hooks run even if validation fails, before that teardown. + """ + config = new_config() + if inspect.isasyncgenfunction(configure): + # Wrap the bare async generator so it drives like a context manager: setup on + # enter, teardown on exit. + cm: Any = asynccontextmanager(configure)(config) + else: + result = configure(config) + if inspect.isawaitable(result): + await result + # A @asynccontextmanager-decorated callback returns the context manager directly. + cm = result if result is not None and hasattr(result, "__aenter__") else None + + # Run hooks on failure as well as success, before configure teardown can + # close resources used by the hooks. + if cm is not None: + async with cm: + try: + _validate_task_queue(config) + yield config + finally: + await _run_shutdown_hooks(config) + else: + try: + _validate_task_queue(config) + yield config + finally: + await _run_shutdown_hooks(config) + + +async def _invocation_handler( + *, + lambda_context: Any, + configure: ConfigureCallback, + new_config: Callable[[], LambdaWorkerConfig], + deps: _WorkerDeps, + extract_lambda_ctx: Callable[[Any], tuple[str, str] | None], +) -> None: + """Handle a single Lambda invocation.""" + async with _invocation_config_scope(configure, new_config) as config: + shutdown_buffer = config.shutdown_deadline_buffer + + # Check deadline feasibility. + remaining_ms_fn = getattr(lambda_context, "get_remaining_time_in_millis", None) + deadline_available = remaining_ms_fn is not None + if deadline_available: + assert remaining_ms_fn is not None + remaining = timedelta(milliseconds=remaining_ms_fn()) + work_time = remaining - shutdown_buffer + if work_time <= timedelta(seconds=1): + raise RuntimeError( + f"Lambda timeout is too short: {remaining.total_seconds():.1f}s " + f"remaining but {shutdown_buffer.total_seconds():.1f}s is " + f"reserved for shutdown, leaving no time for work. " + f"Increase the function timeout or decrease the shutdown " + f"deadline buffer" + ) + elif work_time < timedelta(seconds=5): + logger.warning( + "Lambda timeout leaves less than 5s for work after " + "shutdown buffer; consider increasing the function " + "timeout or decreasing the shutdown deadline buffer " + "(work_time=%s, shutdown_buffer=%s)", + work_time, + shutdown_buffer, + ) + + # Build per-invocation connect kwargs with identity from Lambda context. + invocation_connect_kwargs: ClientConnectConfig = { + **config.client_connect_config + } + if "identity" not in invocation_connect_kwargs: + ctx_info = extract_lambda_ctx(lambda_context) + if ctx_info is not None: + request_id, function_arn = ctx_info + invocation_connect_kwargs["identity"] = build_lambda_identity( + request_id, function_arn + ) + + # Connect to Temporal. + client = await deps.connect(**invocation_connect_kwargs) + + # Create the worker. + worker = deps.create_worker(client, **config.worker_config) + + # Run the worker until the deadline approaches or context is done. + if deadline_available: + assert remaining_ms_fn is not None + work_time_secs = ( + timedelta(milliseconds=remaining_ms_fn()) - shutdown_buffer + ).total_seconds() + if work_time_secs > 0: + try: + await asyncio.wait_for(worker.run(), timeout=work_time_secs) + except asyncio.TimeoutError: + pass + else: + # No deadline - run until cancelled. + await worker.run() diff --git a/temporalio/contrib/aws/lambda_worker/otel.py b/temporalio/contrib/aws/lambda_worker/otel.py new file mode 100644 index 0000000000..d6834aa612 --- /dev/null +++ b/temporalio/contrib/aws/lambda_worker/otel.py @@ -0,0 +1,246 @@ +"""OpenTelemetry helpers for Temporal workers running inside AWS Lambda. + +Use :py:func:`apply_defaults` inside a :py:func:`run_worker` configure callback for a +batteries-included setup that creates an OTel collector exporter and tracing plugin, suitable +for use with the AWS Distro for OpenTelemetry (ADOT) Lambda layer. + +Use :py:func:`apply_tracing` or :py:func:`build_metrics_telemetry_config` individually if you only +need one. +""" + +from __future__ import annotations + +import logging +from dataclasses import dataclass, field +from datetime import timedelta + +from opentelemetry.sdk.resources import Resource +from opentelemetry.semconv.attributes.service_attributes import SERVICE_NAME +from opentelemetry.trace import get_tracer_provider, set_tracer_provider + +from temporalio.contrib.aws.lambda_worker._configure import LambdaWorkerConfig +from temporalio.contrib.opentelemetry import ( + OpenTelemetryPlugin, + ReplaySafeTracerProvider, + _serverless, + create_tracer_provider, +) +from temporalio.runtime import Runtime, TelemetryConfig + +logger = logging.getLogger(__name__) + +_installed_tracer_provider: ReplaySafeTracerProvider | None = None + + +@dataclass +class OtelOptions: + """Options for :py:func:`apply_defaults`. + + Attributes: + metric_periodicity: How often the Core SDK exports metrics to the + collector. Defaults to 10 seconds. Set this shorter than your + Lambda timeout to ensure at least one export per invocation. + service_name: OTel service name resource attribute. If empty, + falls back to ``OTEL_SERVICE_NAME``, then + ``AWS_LAMBDA_FUNCTION_NAME``, then + ``"temporal-lambda-worker"``. + collector_endpoint: OTLP collector endpoint (e.g. + ``"http://localhost:4317"``). If empty, falls back to + ``OTEL_EXPORTER_OTLP_ENDPOINT``, then + ``"http://localhost:4317"``. + """ + + metric_periodicity: timedelta = field(default_factory=lambda: timedelta(seconds=10)) + service_name: str = "" + collector_endpoint: str = "" + + +def _resolve_service_name(options: OtelOptions) -> str: + return _serverless.resolve_service_name( + options.service_name, + ["AWS_LAMBDA_FUNCTION_NAME"], + "temporal-lambda-worker", + ) + + +def _resolve_endpoint(options: OtelOptions) -> str: + return _serverless.resolve_endpoint(options.collector_endpoint) + + +def _ensure_tracer_provider(endpoint: str, service_name: str) -> None: + """Install the global replay-safe ``TracerProvider`` once per process. + + ``configure`` runs on every Lambda invocation, but OpenTelemetry only allows the global + provider to be set once and a warm container keeps the process alive. Later calls + reuse the installed provider instead of building (and leaking) a new span processor. + """ + global _installed_tracer_provider + if ( + _installed_tracer_provider is not None + and get_tracer_provider() is _installed_tracer_provider + ): + return + + resource = Resource.create({SERVICE_NAME: service_name}) + + # Try to use X-Ray ID generator if available. + try: + from opentelemetry.sdk.extension.aws.trace import ( # type: ignore[reportMissingTypeStubs] + AwsXRayIdGenerator, + ) + + tracer_provider = create_tracer_provider( + resource=resource, id_generator=AwsXRayIdGenerator() + ) + except ImportError: + logger.warning( + "opentelemetry-sdk-extension-aws is not installed; " + "X-Ray trace ID generation is disabled. " + "Install the 'lambda-worker-otel' extra for full ADOT support." + ) + tracer_provider = create_tracer_provider(resource=resource) + + # Use OTLP gRPC exporter if available, otherwise skip trace export. + try: + tracer_provider.add_span_processor( + _serverless.build_otlp_span_processor(endpoint, insecure=True) + ) + except ImportError: + logger.warning( + "opentelemetry-exporter-otlp-proto-grpc is not installed; " + "traces will not be exported to the OTLP collector. " + "Install the 'lambda-worker-otel' extra for full ADOT support." + ) + + # Set as global so the OpenTelemetryPlugin picks it up. + set_tracer_provider(tracer_provider) + if get_tracer_provider() is tracer_provider: + _installed_tracer_provider = tracer_provider + else: + # Another provider is already global; ours is unused, so don't leak its exporter. + tracer_provider.shutdown() + + +def apply_defaults( + config: LambdaWorkerConfig, + options: OtelOptions | None = None, +) -> None: + """Configure OTel metrics and tracing with AWS Lambda defaults. + + Sets up Core SDK metrics export via a :py:class:`temporalio.runtime.Runtime` with an + :py:class:`temporalio.runtime.OpenTelemetryConfig` pointing at the OTLP collector, and adds the + :py:class:`temporalio.contrib.opentelemetry.OpenTelemetryPlugin` for distributed tracing with + workflow sandbox passthrough. + + Creates a replay-safe ``TracerProvider`` (with X-Ray ID generator and OTLP gRPC exporter if + available) and sets it as the global OpenTelemetry tracer provider. The + :py:class:`temporalio.contrib.opentelemetry.OpenTelemetryPlugin` uses the global provider, so + it must be set before the worker starts. The provider is created once per process: when this + is called again on a warm Lambda invocation, the installed provider is reused. + + The collector endpoint defaults to ``http://localhost:4317``, which is the endpoint expected by + the ADOT collector Lambda layer. + + Registers a per-invocation ``ForceFlush`` shutdown hook for the global ``TracerProvider`` so + pending traces are exported before each Lambda invocation completes. + + Metrics are exported on the ``metric_periodicity`` interval by the runtime's internal thread. + There is no explicit flush API for these metrics; set ``metric_periodicity`` short enough to + ensure at least one export per invocation. + + Args: + config: The :py:class:`LambdaWorkerConfig` to configure. + options: Optional overrides for service name, endpoint, etc. + """ + if options is None: + options = OtelOptions() + + endpoint = _resolve_endpoint(options) + service_name = _resolve_service_name(options) + + telemetry_config = build_metrics_telemetry_config( + endpoint=endpoint, + service_name=service_name, + metric_periodicity=options.metric_periodicity, + ) + runtime = Runtime(telemetry=telemetry_config) + config.client_connect_config["runtime"] = runtime + + _ensure_tracer_provider(endpoint, service_name) + + apply_tracing(config) + + +def build_metrics_telemetry_config( + *, + endpoint: str = "", + service_name: str = "", + metric_periodicity: timedelta | None = None, +) -> TelemetryConfig: + """Build a :py:class:`temporalio.runtime.TelemetryConfig` for OTel metrics. + + Returns a ``TelemetryConfig`` with :py:class:`temporalio.runtime.OpenTelemetryConfig` metrics + pointed at the given OTLP collector endpoint. Use this when you need to compose metrics config + with other telemetry settings (e.g. custom logging) into your own + :py:class:`temporalio.runtime.Runtime`. + + Core SDK metrics are exported on the ``metric_periodicity`` interval by the runtime's internal + thread. There is no explicit flush API; set ``metric_periodicity`` short enough to ensure at + least one export per Lambda invocation. + + Example:: + + telemetry = build_metrics_telemetry_config( + endpoint="http://localhost:4317", + service_name="my-service", + ) + # Customize further: + telemetry_config = dataclasses.replace( + telemetry, logging=my_logging_config + ) + runtime = Runtime(telemetry=telemetry_config) + config.client_connect_config["runtime"] = runtime + + Args: + endpoint: OTLP collector endpoint. Defaults to + ``http://localhost:4317``. + service_name: OTel service name. Used as a global tag. + metric_periodicity: How often metrics are exported. + + Returns: + A ``TelemetryConfig`` ready to pass to + :py:class:`temporalio.runtime.Runtime`. + """ + return _serverless.build_metrics_telemetry_config( + endpoint=endpoint, + service_name=service_name, + metric_periodicity=metric_periodicity, + ) + + +def apply_tracing(config: LambdaWorkerConfig) -> None: + """Configure only OTel tracing (no metrics) on the Lambda worker config. + + Adds an :py:class:`temporalio.contrib.opentelemetry.OpenTelemetryPlugin` to + ``config.worker_config["plugins"]``. The plugin uses the global + ``TracerProvider`` set via ``opentelemetry.trace.set_tracer_provider``. + Ensure your provider is set globally before the worker starts. + + Also registers a ``ForceFlush`` shutdown hook that flushes the global + ``TracerProvider`` (if it supports ``force_flush``). + + Args: + config: The :py:class:`LambdaWorkerConfig` to configure. + """ + plugin = OpenTelemetryPlugin() + plugins = list(config.worker_config.get("plugins", [])) + plugins.append(plugin) + config.worker_config["plugins"] = plugins + + async def _flush() -> None: + provider = get_tracer_provider() + flush = getattr(provider, "force_flush", None) + if flush is not None: + flush() + + config.shutdown_hooks.append(_flush) diff --git a/temporalio/contrib/aws/s3driver/README.md b/temporalio/contrib/aws/s3driver/README.md new file mode 100644 index 0000000000..d4939a37e3 --- /dev/null +++ b/temporalio/contrib/aws/s3driver/README.md @@ -0,0 +1,131 @@ +# AWS Integration for Temporal Python SDK + +> ⚠️ **This package is currently at an experimental release stage.** ⚠️ + +This package provides AWS integrations for the Temporal Python SDK, including an Amazon S3 driver for [external storage](../../../README.md#external-storage). + +## S3 Driver + +`S3StorageDriver` stores and retrieves Temporal payloads in Amazon S3. It accepts any `S3StorageDriverClient` implementation and a `bucket` — either a static name or a callable for dynamic per-payload selection. + +### Using the built-in aioboto3 client + +The SDK ships with an [`aioboto3`](https://github.com/terrycain/aioboto3)-based client. Install the extra to pull in its dependencies: + + python -m pip install "temporalio[aioboto3]" + +```python +import aioboto3 +import dataclasses +from temporalio.client import Client +from temporalio.contrib.aws.s3driver import S3StorageDriver +from temporalio.contrib.aws.s3driver.aioboto3 import new_aioboto3_client +from temporalio.converter import DataConverter, ExternalStorage + +session = aioboto3.Session() +# To see how to set credentials and region via environment, config objects, or configuration files, +# see: +# https://docs.aws.amazon.com/boto3/latest/guide/configuration.html +async with session.client("s3") as s3_client: + driver = S3StorageDriver( + client=new_aioboto3_client(s3_client), + bucket="my-temporal-payloads", + ) + + client = await Client.connect( + "localhost:7233", + data_converter=dataclasses.replace( + DataConverter.default, + external_storage=ExternalStorage(drivers=[driver]), + ), + ) +``` + +### Custom S3 client implementations + +To use a different S3 library, subclass `S3StorageDriverClient` and implement `put_object`, `get_object`, and `object_exists`. The ABC has no external dependencies, so no AWS packages are required to import it. + +```python +from temporalio.contrib.aws.s3driver import S3StorageDriverClient + +class MyS3Client(S3StorageDriverClient): + async def put_object(self, *, bucket: str, key: str, data: bytes) -> None: ... + async def object_exists(self, *, bucket: str, key: str) -> bool: ... + async def get_object(self, *, bucket: str, key: str) -> bytes: ... + +driver = S3StorageDriver(client=MyS3Client(), bucket="my-temporal-payloads") +``` + +### Key structure + +Payloads are stored under content-addressable keys derived from a SHA-256 hash of the serialized payload bytes, segmented by namespace and workflow/activity identifiers when serialization context is available. + +Workflow key: + + v0/ns/{namespace}/wt/{workflow-type}/wi/{workflow-id}/ri/{run-id}/d/{hash-algorithm}/{hex-digest} + +Activity key: + + v0/ns/{namespace}/at/{activity-type}/ai/{activity-id}/ri/{run-id}/d/{hash-algorithm}/{hex-digest} + +Key without a target, scoped to the namespace of the client or worker performing the operation +(`null` when it is unknown): + + v0/ns/{namespace}/d/{hash-algorithm}/{hex-digest} + +- Missing values (including a missing run ID) are encoded as the literal `null`. +- An empty namespace on a workflow or activity target is written as `/ns/null`. +- `hex-digest` is the lower-case SHA-256 hex digest (64 characters). +- Dynamic path segments are percent-encoded: any byte outside S3's [safe character set](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html) (`0-9`, `a-z`, `A-Z`, and `! - _ . * ' ( )`) is escaped as `%XX` over its UTF-8 bytes. +- Keys exceeding S3's 1,024-byte limit after encoding fall back to `v0/ns/{namespace}/d/sha256/{hex-digest}`, retaining the namespace for access policies. Existing saved references remain readable, including references with no namespace segment. + +### Notes + +* Any driver used to store payloads must also be configured on the component that retrieves them. If the client stores workflow inputs using this driver, the worker must include it in its `ExternalStorage.drivers` list to retrieve them. +* The target S3 bucket must already exist; the driver will not create it. +* Identical serialized bytes within the same namespace and workflow (or activity) share the same S3 object — the key is content-addressable within that scope. The same bytes used across different workflows or namespaces produce distinct S3 objects because the key includes the namespace and workflow/activity identifiers. +* Only payloads at or above `ExternalStorage.payload_size_threshold` (default: 256 KiB) are offloaded; smaller payloads are stored inline. Set `ExternalStorage.payload_size_threshold` to `0` to offload every payload regardless of size. +* `S3StorageDriver.max_payload_size` (default: 50 MiB) sets a hard upper limit on the serialized size of any single payload. A `ValueError` is raised at store time if a payload exceeds this limit. Increase it if your workflows produce payloads larger than 50 MiB. +* Override `S3StorageDriver.driver_name` only when registering multiple `S3StorageDriver` instances with distinct configurations under the same `ExternalStorage.drivers` list. + +### Dynamic Bucket Selection + +To select the S3 bucket per payload, pass a callable as `bucket`: + +```python +from temporalio.contrib.aws.s3driver import S3StorageDriver +from temporalio.contrib.aws.s3driver.aioboto3 import new_aioboto3_client + +driver = S3StorageDriver( + client=new_aioboto3_client(s3_client), + bucket=lambda context, payload: ( + "large-payloads" if payload.ByteSize() > 10 * 1024 * 1024 else "small-payloads" + ), +) +``` + +### Required IAM permissions + +Components that store payloads with the built-in aioboto3 adapter require `s3:PutObject`, `s3:GetObject`, and `s3:ListBucket`: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": ["s3:PutObject", "s3:GetObject"], + "Resource": "arn:aws:s3:::my-temporal-payloads/*" + }, + { + "Effect": "Allow", + "Action": "s3:ListBucket", + "Resource": "arn:aws:s3:::my-temporal-payloads" + } + ] +} +``` + +Uploads check whether an object already exists using `HeadObject`, which requires read permission even for components that only store payloads. Without `s3:ListBucket`, S3 returns 403 instead of 404 for a missing object, so the driver cannot distinguish it from an access denial and stops the upload. See the [AWS HeadObject permissions documentation](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html). + +Components that only retrieve payloads require `s3:GetObject`; they do not need `s3:PutObject` or `s3:ListBucket`. diff --git a/temporalio/contrib/aws/s3driver/__init__.py b/temporalio/contrib/aws/s3driver/__init__.py new file mode 100644 index 0000000000..cdc349e241 --- /dev/null +++ b/temporalio/contrib/aws/s3driver/__init__.py @@ -0,0 +1,13 @@ +"""Amazon S3 storage driver for Temporal external storage. + +.. warning:: + This API is experimental. +""" + +from temporalio.contrib.aws.s3driver._client import S3StorageDriverClient +from temporalio.contrib.aws.s3driver._driver import S3StorageDriver + +__all__ = [ + "S3StorageDriverClient", + "S3StorageDriver", +] diff --git a/temporalio/contrib/aws/s3driver/_client.py b/temporalio/contrib/aws/s3driver/_client.py new file mode 100644 index 0000000000..f49eead87a --- /dev/null +++ b/temporalio/contrib/aws/s3driver/_client.py @@ -0,0 +1,41 @@ +"""S3 storage driver client abstraction for the S3 storage driver. + +.. warning:: + This API is experimental. +""" + +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections.abc import Mapping + + +class S3StorageDriverClient(ABC): + """Abstract base class for S3 object operations. + + Implementations must support ``put_object`` and ``get_object``. Multipart + upload handling (if needed) is an internal concern of each implementation. + + .. warning:: + This API is experimental. + """ + + @abstractmethod + async def put_object(self, *, bucket: str, key: str, data: bytes) -> None: + """Upload *data* to the given S3 *bucket* and *key*.""" + + @abstractmethod + async def object_exists(self, *, bucket: str, key: str) -> bool: + """Return ``True`` if an object exists at the given *bucket* and *key*.""" + + @abstractmethod + async def get_object(self, *, bucket: str, key: str) -> bytes: + """Download and return the bytes stored at the given S3 *bucket* and *key*.""" + + def describe(self) -> Mapping[str, str]: + """Return client-specific diagnostic metadata (e.g. region, credentials + source) that the driver appends to error messages. Implementations may + override this to surface configuration that is useful for debugging + common misconfigurations. Returns an empty mapping by default. + """ + return {} diff --git a/temporalio/contrib/aws/s3driver/_driver.py b/temporalio/contrib/aws/s3driver/_driver.py new file mode 100644 index 0000000000..d7a7ca9a6e --- /dev/null +++ b/temporalio/contrib/aws/s3driver/_driver.py @@ -0,0 +1,257 @@ +"""Amazon S3 storage driver for Temporal external storage. + +.. warning:: + This API is experimental. +""" + +from __future__ import annotations + +import asyncio +import hashlib +import string +from collections.abc import Callable, Coroutine, Sequence +from typing import Any, TypeVar + +from temporalio.api.common.v1 import Payload +from temporalio.contrib.aws.s3driver._client import S3StorageDriverClient +from temporalio.converter import ( + StorageDriver, + StorageDriverActivityInfo, + StorageDriverClaim, + StorageDriverRetrieveContext, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, +) + +_T = TypeVar("_T") + +# S3's safe character set for object key names. See +# https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html +_S3_SAFE_CHARS = frozenset(string.ascii_letters + string.digits + "!-_.*'()") + + +def _percent_encode(val: str | None) -> str | None: + """Percent-encode a path segment per the S3 key spec. + + Encodes every byte outside :data:`_S3_SAFE_CHARS` as ``%XX`` with + upper-case hex digits, operating on the UTF-8 bytes so non-ASCII + characters are escaped byte by byte. Returns ``None`` for empty or + missing values so callers can substitute ``"null"``. + """ + if not val: + return None + return "".join( + chr(byte) if chr(byte) in _S3_SAFE_CHARS else f"%{byte:02X}" + for byte in val.encode("utf-8") + ) + + +def _format_client_context(client: S3StorageDriverClient) -> str: + """Format the client's ``describe()`` output as ", k=v, k=v" for error + messages. Returns an empty string when the client reports no metadata or + describe itself raises (diagnostic output must never mask the real error). + """ + try: + info = client.describe() + except Exception: + return "" + if not info: + return "" + return "".join(f", {k}={v}" for k, v in info.items()) + + +async def _gather_with_cancellation( + coros: Sequence[Coroutine[Any, Any, _T]], +) -> list[_T]: + """Run coroutines concurrently, cancelling all remaining tasks if one fails.""" + if not coros: + return [] + tasks = [asyncio.ensure_future(c) for c in coros] + try: + return list(await asyncio.gather(*tasks)) + except BaseException: + for t in tasks: + t.cancel() + await asyncio.gather(*tasks, return_exceptions=True) + raise + + +class S3StorageDriver(StorageDriver): + """Driver for storing and retrieving Temporal payloads in Amazon S3. + + Requires an :class:`S3StorageDriverClient` and a ``bucket``. Payloads are keyed by + a SHA-256 hash of their serialized bytes, segmented by namespace and + workflow/activity identifiers derived from the serialization context. + + .. warning:: + This API is experimental. + """ + + def __init__( + self, + client: S3StorageDriverClient, + bucket: str | Callable[[StorageDriverStoreContext, Payload], str], + driver_name: str = "aws.s3driver", + max_payload_size: int = 50 * 1024 * 1024, + ): + """Constructs the S3 driver. + + Args: + client: An :class:`S3StorageDriverClient` implementation. Use + :func:`temporalio.contrib.aws.s3driver.aioboto3.new_aioboto3_client` to + wrap an aioboto3 S3 client. + bucket: S3 bucket name, access point ARN, or a callable that + accepts ``(StorageDriverStoreContext, Payload)`` and returns + a bucket name. A callable allows dynamic per-payload bucket + selection. + driver_name: Name of this driver instance. Defaults to + ``"aws.s3driver"``. Override when registering + multiple S3StorageDriver instances with distinct configurations + under the same ``temporalio.extstore.Options.drivers`` list. + max_payload_size: Maximum serialized payload size in bytes that the + driver will accept. Defaults to 52428800 (50 MiB). Raise this + value if your workload requires larger payloads; lower it to + enforce stricter limits. + """ + if max_payload_size <= 0: + raise ValueError("max_payload_size must be greater than zero") + self._client = client + self._bucket = bucket + self._driver_name = driver_name or "aws.s3driver" + self._max_payload_size = max_payload_size + + def name(self) -> str: + """Return the driver instance name.""" + return self._driver_name + + def type(self) -> str: + """Return the driver type identifier.""" + return "aws.s3driver" + + def _get_bucket(self, context: StorageDriverStoreContext, payload: Payload) -> str: + """Resolve bucket using the configured strategy.""" + if callable(self._bucket): + return self._bucket(context, payload) + return self._bucket + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + """Stores payloads in S3 and returns a ``temporalio.extstore.DriverClaim`` for each one. + + Payloads are keyed by their SHA-256 hash, so identical serialized bytes + share the same S3 object. Deduplication is best-effort because the same + Python value may serialize differently across payload converter versions + (e.g. proto binary). The returned list is the same length as + ``payloads``. + + Object keys exceeding 1,024 bytes fall back to a namespace-scoped hash + key. Without a target, keys are scoped to the context's namespace. An + empty or missing namespace uses ``"null"``. + """ + # Build context segments from the target identity. + context_segments = "" + target = context.target + namespace = target.namespace if target is not None else context.namespace + namespace_segment = f"/ns/{_percent_encode(namespace) or 'null'}" + if isinstance(target, StorageDriverWorkflowInfo): + wf_type = _percent_encode(target.type) or "null" + wf_id = _percent_encode(target.id) or "null" + wf_run_id = _percent_encode(target.run_id) or "null" + context_segments = f"/wt/{wf_type}/wi/{wf_id}/ri/{wf_run_id}" + elif isinstance(target, StorageDriverActivityInfo): + act_type = _percent_encode(target.type) or "null" + act_id = _percent_encode(target.id) or "null" + act_run_id = _percent_encode(target.run_id) or "null" + context_segments = f"/at/{act_type}/ai/{act_id}/ri/{act_run_id}" + + async def _upload(payload: Payload) -> StorageDriverClaim: + bucket = self._get_bucket(context, payload) + + payload_bytes = payload.SerializeToString() + if len(payload_bytes) > self._max_payload_size: + raise ValueError( + f"Payload size {len(payload_bytes)} bytes exceeds the configured " + f"max_payload_size of {self._max_payload_size} bytes" + ) + + hash_digest = hashlib.sha256(payload_bytes).hexdigest().lower() + + digest_segments = f"/d/sha256/{hash_digest}" + + key = f"v0{namespace_segment}{context_segments}{digest_segments}" + if len(key.encode("utf-8")) > 1024: + # Retain namespace scope for authorization policies on object prefixes. + key = f"v0{namespace_segment}{digest_segments}" + + try: + if not await self._client.object_exists(bucket=bucket, key=key): + await self._client.put_object( + bucket=bucket, key=key, data=payload_bytes + ) + except Exception as e: + raise RuntimeError( + f"S3StorageDriver store failed [bucket={bucket}, key={key}" + f"{_format_client_context(self._client)}]" + ) from e + + return StorageDriverClaim( + claim_data={ + "bucket": bucket, + "key": key, + "hash_algorithm": "sha256", + "hash_value": hash_digest, + }, + ) + + return await _gather_with_cancellation([_upload(p) for p in payloads]) + + async def retrieve( + self, + context: StorageDriverRetrieveContext, # noqa: ARG002 + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + """Retrieves payloads from S3 for the given ``temporalio.extstore.DriverClaim`` list.""" + + async def _download(claim: StorageDriverClaim) -> Payload: + bucket = claim.claim_data["bucket"] + key = claim.claim_data["key"] + + try: + payload_bytes = await self._client.get_object(bucket=bucket, key=key) + except Exception as e: + raise RuntimeError( + f"S3StorageDriver retrieve failed [bucket={bucket}, key={key}" + f"{_format_client_context(self._client)}]" + ) from e + + hash_algorithm = claim.claim_data.get("hash_algorithm") + expected_hash = claim.claim_data.get("hash_value") + if not hash_algorithm or not expected_hash: + raise ValueError( + f"S3StorageDriver claim is missing required content hash information " + f"[bucket={bucket}, key={key}]: " + f"claim_data must contain 'hash_algorithm' and 'hash_value'" + ) + if hash_algorithm != "sha256": + raise ValueError( + f"S3StorageDriver unsupported hash algorithm " + f"[bucket={bucket}, key={key}]: " + f"expected sha256, got {hash_algorithm}" + ) + actual_hash = hashlib.sha256(payload_bytes).hexdigest().lower() + if actual_hash != expected_hash: + raise ValueError( + f"S3StorageDriver integrity check failed " + f"[bucket={bucket}, key={key}]: " + f"expected {hash_algorithm}:{expected_hash}, " + f"got {hash_algorithm}:{actual_hash}" + ) + + payload = Payload() + payload.ParseFromString(payload_bytes) + return payload + + return await _gather_with_cancellation([_download(c) for c in claims]) diff --git a/temporalio/contrib/aws/s3driver/aioboto3.py b/temporalio/contrib/aws/s3driver/aioboto3.py new file mode 100644 index 0000000000..538aa38e18 --- /dev/null +++ b/temporalio/contrib/aws/s3driver/aioboto3.py @@ -0,0 +1,83 @@ +"""Aioboto3 adapter for the S3 storage driver client. + +.. warning:: + This API is experimental. +""" + +from __future__ import annotations + +import io +from collections.abc import Mapping + +from botocore.exceptions import ClientError +from types_aiobotocore_s3.client import S3Client + +from temporalio.contrib.aws.s3driver._client import S3StorageDriverClient + + +class _Aioboto3StorageDriverClient(S3StorageDriverClient): + """Adapter that wraps an aioboto3 S3 client as an :class:`S3StorageDriverClient`. + + Internally delegates to ``upload_fileobj`` for uploads (which handles + multipart automatically for objects above the multipart threshold) and + ``get_object`` for downloads. + + .. warning:: + This API is experimental. + """ + + def __init__(self, client: S3Client) -> None: + """Wrap an aioboto3 S3 client. + + Args: + client: An aioboto3 S3 client, typically obtained from + ``aioboto3.Session().client("s3")``. + """ + self._client = client + + def describe(self) -> Mapping[str, str]: + """Region of the wrapped aioboto3 client, surfaced in driver error + messages to short-circuit the most common silent 403 misconfiguration. + """ + region = self._client.meta.region_name + return {"client_region": region} if region else {} + + async def object_exists(self, *, bucket: str, key: str) -> bool: + """Check existence via aioboto3's ``head_object``. + + Requires ``s3:GetObject`` and ``s3:ListBucket`` permissions so missing + objects return 404 rather than an ambiguous 403. + """ + try: + await self._client.head_object(Bucket=bucket, Key=key) + return True + except ClientError as e: + # head_object returns 404 as a ClientError when the key doesn't exist. + if e.response.get("Error", {}).get("Code") == "404": + return False + raise + + async def put_object(self, *, bucket: str, key: str, data: bytes) -> None: + """Upload *data* via aioboto3's ``upload_fileobj``.""" + # upload_fileobj is an aioboto3-specific method not in the + # types_aiobotocore_s3 stubs; it handles multipart automatically. + await self._client.upload_fileobj(io.BytesIO(data), bucket, key) # type: ignore[arg-type] + + async def get_object(self, *, bucket: str, key: str) -> bytes: + """Download bytes via aioboto3's ``get_object``.""" + response = await self._client.get_object(Bucket=bucket, Key=key) + # StreamingBody.read() is untyped in aiobotocore, returns bytes at runtime. + return await response["Body"].read() # type: ignore[no-any-return] + + +def new_aioboto3_client(client: S3Client) -> S3StorageDriverClient: + """Create an :class:`S3StorageDriverClient` from an aioboto3 S3 client. + + Args: + client: An aioboto3 S3 client, typically obtained from + ``aioboto3.Session().client("s3")``. + + .. warning:: + This API is experimental. + """ + return _Aioboto3StorageDriverClient(client) diff --git a/temporalio/contrib/deepagents/README.md b/temporalio/contrib/deepagents/README.md new file mode 100644 index 0000000000..b95edb7fb2 --- /dev/null +++ b/temporalio/contrib/deepagents/README.md @@ -0,0 +1,39 @@ +# Deep Agents integration + +The Deep Agents integration has moved to the independently versioned +[`temporalio-deepagents`](https://pypi.org/project/temporalio-deepagents/) +package. Its canonical Python API is `temporalio.deepagents`. + +The complete integration guide now lives in the +[`temporalio-deepagents` README](https://github.com/temporalio/ai-integrations/tree/main/python/deepagents#readme). + +## Migrating to the standalone package + +Remove the `deepagents` extra from the existing Temporal dependency: + +```toml +# Before +dependencies = [ + "temporalio[deepagents,opentelemetry,pydantic]", +] + +# After +dependencies = [ + "temporalio[opentelemetry,pydantic]", +] +``` + +Remove the brackets if no extras remain. Then install the standalone package directly: + +```bash +uv add temporalio-deepagents +``` + +Change application imports to the standalone package: + +```python +from temporalio.deepagents import DeepAgentsPlugin +``` + +The new import path selects the standalone implementation instead of the +SDK-bundled `temporalio.contrib.deepagents` implementation. diff --git a/temporalio/contrib/deepagents/__init__.py b/temporalio/contrib/deepagents/__init__.py new file mode 100644 index 0000000000..e2d768bee4 --- /dev/null +++ b/temporalio/contrib/deepagents/__init__.py @@ -0,0 +1,12 @@ +"""Compatibility imports for the standalone Deep Agents integration. + +Install ``temporalio-deepagents`` and import ``temporalio.deepagents`` +directly in new code. + +Legacy ``testing`` and ``workflow`` modules forward the standalone public API. +""" + +from temporalio.deepagents import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.deepagents import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, +) diff --git a/temporalio/contrib/deepagents/testing.py b/temporalio/contrib/deepagents/testing.py new file mode 100644 index 0000000000..ea8ce56607 --- /dev/null +++ b/temporalio/contrib/deepagents/testing.py @@ -0,0 +1,6 @@ +"""Compatibility imports for temporalio.deepagents.testing.""" + +from temporalio.deepagents.testing import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.deepagents.testing import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, +) diff --git a/temporalio/contrib/deepagents/workflow.py b/temporalio/contrib/deepagents/workflow.py new file mode 100644 index 0000000000..4f75a90e64 --- /dev/null +++ b/temporalio/contrib/deepagents/workflow.py @@ -0,0 +1,3 @@ +"""Compatibility imports for temporalio.deepagents.workflow.""" + +from temporalio.deepagents.workflow import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] diff --git a/temporalio/contrib/gcp/__init__.py b/temporalio/contrib/gcp/__init__.py new file mode 100644 index 0000000000..ca6e0d7dfe --- /dev/null +++ b/temporalio/contrib/gcp/__init__.py @@ -0,0 +1 @@ +"""Google Cloud Platform integrations for Temporal.""" diff --git a/temporalio/contrib/gcp/cloud_run/__init__.py b/temporalio/contrib/gcp/cloud_run/__init__.py new file mode 100644 index 0000000000..83eeb6d4c3 --- /dev/null +++ b/temporalio/contrib/gcp/cloud_run/__init__.py @@ -0,0 +1 @@ +"""Google Cloud Run integrations for Temporal.""" diff --git a/temporalio/contrib/gcp/cloud_run/id/README.md b/temporalio/contrib/gcp/cloud_run/id/README.md new file mode 100644 index 0000000000..cb56b0045b --- /dev/null +++ b/temporalio/contrib/gcp/cloud_run/id/README.md @@ -0,0 +1,84 @@ +# id + +> ⚠️ **This package is currently at an experimental release stage.** ⚠️ + +A plugin for running [Temporal](https://temporal.io) workers on Google Cloud Run. `CloudRunIdPlugin` +reads Cloud Run instance metadata and sets the client identity. Both Cloud Run **worker pools** and +**services** are supported. + +Register the plugin once when connecting the client and it sets the client **identity** to a value +derived from the Cloud Run instance (unless you already passed an `identity`). + +## Quick start + +```python +import asyncio + +from temporalio.client import Client +from temporalio.contrib.gcp.cloud_run.id import CloudRunIdPlugin +from temporalio.worker import Worker + +from my_workflows import MyWorkflow +from my_activities import my_activity + + +async def main() -> None: + # Install the plugin on the client; it propagates to workers automatically. + client = await Client.connect( + "localhost:7233", + plugins=[CloudRunIdPlugin()], + ) + + worker = Worker( + client, + task_queue="my-task-queue", + workflows=[MyWorkflow], + activities=[my_activity], + ) + await worker.run() + + +if __name__ == "__main__": + asyncio.run(main()) +``` + +## How it works + +Cloud Run exposes workload metadata through environment variables and a metadata server: + +- **Worker pools** get `CLOUD_RUN_WORKER_POOL` and `CLOUD_RUN_REVISION` (and no `K_*` variables). +- **Services** get `K_SERVICE`, `K_REVISION`, and `K_CONFIGURATION` (and no `CLOUD_RUN_*` variables). + +The unique instance id is not available as an environment variable on either; it is only exposed by +the +[Cloud Run metadata server](https://cloud.google.com/run/docs/container-contract#metadata-server) +at `http://metadata.google.internal/computeMetadata/v1/instance/id`, which requires the +`Metadata-Flavor: Google` request header. + +When the client connects, `CloudRunIdPlugin` resolves the worker pool name from +`CLOUD_RUN_WORKER_POOL` (falling back to the service name `K_SERVICE`) and the revision from +`CLOUD_RUN_REVISION` (falling back to +`K_REVISION`), then performs a single synchronous HTTP GET to the metadata server for the instance +id. From that metadata the plugin sets: + +- **Client identity** -- `@`, uniquely identifying this worker instance in + Temporal tooling. It falls back to `@`, then to just ``, when the + revision or name is unavailable. An `identity` you pass to `Client.connect` always wins. + +The metadata server is only reachable from within Cloud Run, so connecting elsewhere raises an +error. The plugin uses only the Python standard library and adds no new dependencies. + +## Advanced / non-plugin use + +For advanced scenarios or unit tests you can bypass the metadata server by passing a pre-built +metadata object, or steer the fetch with `getenv` / `metadata_url` / `timeout`: + +```python +from temporalio.contrib.gcp.cloud_run.id import CloudRunIdPlugin, get_google_cloud_run_metadata + +metadata = get_google_cloud_run_metadata() +plugin = CloudRunIdPlugin(metadata=metadata) + +# metadata.identity exposes the same value the plugin applies, for use +# without the plugin if needed. +``` diff --git a/temporalio/contrib/gcp/cloud_run/id/__init__.py b/temporalio/contrib/gcp/cloud_run/id/__init__.py new file mode 100644 index 0000000000..40f3497979 --- /dev/null +++ b/temporalio/contrib/gcp/cloud_run/id/__init__.py @@ -0,0 +1,44 @@ +"""Run Temporal workers on Google Cloud Run. + +:py:class:`CloudRunIdPlugin` reads Cloud Run instance metadata (from a worker pool or a service) and +sets the client identity from the Cloud Run instance. + +Quick start:: + + import asyncio + + from temporalio.client import Client + from temporalio.contrib.gcp.cloud_run.id import CloudRunIdPlugin + from temporalio.worker import Worker + + async def main() -> None: + # Install the plugin on the client; it propagates to workers automatically. + client = await Client.connect( + "localhost:7233", + plugins=[CloudRunIdPlugin()], + ) + + worker = Worker( + client, + task_queue="my-task-queue", + workflows=[MyWorkflow], + activities=[my_activity], + ) + await worker.run() + + asyncio.run(main()) +""" + +from temporalio.contrib.gcp.cloud_run.id._cloud_run_id_plugin import CloudRunIdPlugin +from temporalio.contrib.gcp.cloud_run.id._metadata import ( + CLOUD_RUN_METADATA_URL, + GoogleCloudRunMetadata, + get_google_cloud_run_metadata, +) + +__all__ = [ + "CLOUD_RUN_METADATA_URL", + "GoogleCloudRunMetadata", + "CloudRunIdPlugin", + "get_google_cloud_run_metadata", +] diff --git a/temporalio/contrib/gcp/cloud_run/id/_cloud_run_id_plugin.py b/temporalio/contrib/gcp/cloud_run/id/_cloud_run_id_plugin.py new file mode 100644 index 0000000000..ba11f43fe0 --- /dev/null +++ b/temporalio/contrib/gcp/cloud_run/id/_cloud_run_id_plugin.py @@ -0,0 +1,102 @@ +"""Plugin setting a Temporal client's identity from Google Cloud Run instance metadata.""" + +from __future__ import annotations + +import os +import socket +from collections.abc import Awaitable, Callable + +import temporalio.plugin +from temporalio.contrib.gcp.cloud_run.id._metadata import ( + CLOUD_RUN_METADATA_URL, + GoogleCloudRunMetadata, + get_google_cloud_run_metadata, +) +from temporalio.service import ConnectConfig, ServiceClient + + +class CloudRunIdPlugin(temporalio.plugin.SimplePlugin): + """Set a Temporal client's identity from Google Cloud Run instance metadata. + + Install this plugin once when connecting the client; the identity it sets + automatically propagates to workers created from that client. It sets the + client **identity** to a value derived from the Cloud Run instance, but only + when the caller did not already provide one. Both Cloud Run worker pools and + services are supported. + + The Cloud Run instance metadata is fetched once, lazily, when the client + connects. If it cannot be read (usually because the process is not running on + Cloud Run), connecting raises an error. + + Unit tests and advanced callers can bypass the metadata server by passing a + pre-built ``metadata`` object, or steer the fetch with ``getenv`` / + ``metadata_url`` / ``timeout``. + + .. warning:: + Google Cloud Run support is experimental and may change in future versions. + """ + + def __init__( + self, + *, + metadata: GoogleCloudRunMetadata | None = None, + timeout: float = 2.0, + metadata_url: str = CLOUD_RUN_METADATA_URL, + getenv: Callable[[str], str | None] = os.environ.get, + ) -> None: + """Create a Cloud Run plugin. + + Args: + metadata: Pre-fetched Cloud Run instance metadata. When supplied, the + plugin uses it directly and never contacts the metadata server. + Primarily for testing and advanced use. + timeout: Timeout, in seconds, for the request to the metadata server. + Ignored when ``metadata`` is supplied. + metadata_url: URL of the Cloud Run metadata server endpoint that + returns the instance id. Ignored when ``metadata`` is supplied. + getenv: Callable used to look up environment variables. Defaults to + ``os.environ.get`` and exists primarily for testing. Ignored when + ``metadata`` is supplied. + """ + super().__init__("CloudRunIdPlugin") + self._metadata = metadata + self._timeout = timeout + self._metadata_url = metadata_url + self._getenv = getenv + + async def connect_service_client( + self, + config: ConnectConfig, + next: Callable[[ConnectConfig], Awaitable[ServiceClient]], + ) -> ServiceClient: + """Fetch Cloud Run metadata and set the client identity before connecting. + + The identity is only set when the caller did not provide one, so an + explicit ``identity`` passed to :py:meth:`temporalio.client.Client.connect` + always wins. + """ + metadata = self._resolve_metadata() + if not config.identity or config.identity == _default_identity(): + config.identity = metadata.identity + return await super().connect_service_client(config, next) + + def _resolve_metadata(self) -> GoogleCloudRunMetadata: + """Return the cached Cloud Run metadata, fetching it once on first use.""" + if self._metadata is None: + self._metadata = get_google_cloud_run_metadata( + timeout=self._timeout, + metadata_url=self._metadata_url, + getenv=self._getenv, # type: ignore[arg-type] + ) + return self._metadata + + +def _default_identity() -> str: + """Recreate the identity ``ConnectConfig`` auto-generates when none is given. + + :py:class:`temporalio.service.ConnectConfig` fills an unset identity with + ``@`` in ``__post_init__``, so by the time this plugin runs the + identity is never literally empty. Matching that value lets the plugin tell an + auto-generated identity (safe to replace) from one the caller chose (kept). + """ + return f"{os.getpid()}@{socket.gethostname()}" diff --git a/temporalio/contrib/gcp/cloud_run/id/_metadata.py b/temporalio/contrib/gcp/cloud_run/id/_metadata.py new file mode 100644 index 0000000000..df545bae64 --- /dev/null +++ b/temporalio/contrib/gcp/cloud_run/id/_metadata.py @@ -0,0 +1,104 @@ +"""Read Google Cloud Run instance metadata for Temporal worker configuration. + +Helpers for deriving a worker identity from Cloud Run instance metadata. Both Cloud Run worker pools +and services are supported. +""" + +from __future__ import annotations + +import os +import urllib.request +from collections.abc import Callable +from dataclasses import dataclass + +CLOUD_RUN_METADATA_URL = ( + "http://metadata.google.internal/computeMetadata/v1/instance/id" +) +"""Default Cloud Run metadata server endpoint returning the unique instance id.""" + + +@dataclass(frozen=True) +class GoogleCloudRunMetadata: + """Identifying metadata for the current Google Cloud Run instance. + + Both Cloud Run worker pools and services are supported. Worker pools expose + ``CLOUD_RUN_WORKER_POOL`` and ``CLOUD_RUN_REVISION``; services expose ``K_SERVICE`` and + ``K_REVISION``. + + Attributes: + instance_id: Unique id of this Cloud Run container instance, read from the Cloud Run + metadata server. + name: The Cloud Run worker pool name (``CLOUD_RUN_WORKER_POOL``) or, for a service, the + service name (``K_SERVICE``). May be empty when the process is not running on Cloud Run. + revision: Cloud Run revision name (``CLOUD_RUN_REVISION`` for worker pools or ``K_REVISION`` + for services). May be empty when the process is not running on Cloud Run. + """ + + instance_id: str + name: str + revision: str + + @property + def identity(self) -> str: + """Worker identity string uniquely identifying this Cloud Run instance. + + The format is ``@``. When the revision is empty the worker pool or + service name is used instead (``@``); when both are empty the instance id + is returned on its own. + """ + if self.revision: + return f"{self.instance_id}@{self.revision}" + if self.name: + return f"{self.instance_id}@{self.name}" + return self.instance_id + + +def get_google_cloud_run_metadata( + *, + timeout: float = 2.0, + metadata_url: str = CLOUD_RUN_METADATA_URL, + getenv: Callable[[str], str] = os.environ.get, # type: ignore[assignment] +) -> GoogleCloudRunMetadata: + """Read metadata identifying the current Google Cloud Run instance. + + Resolves the worker pool name from ``CLOUD_RUN_WORKER_POOL`` (Cloud Run worker pools), falling + back to the service name (``K_SERVICE``, Cloud Run services), and the revision from + ``CLOUD_RUN_REVISION`` falling back to ``K_REVISION``. The unique instance id is fetched from + the Cloud Run metadata server with a single synchronous HTTP GET. Intended to be called once at + worker startup. + + Args: + timeout: Timeout, in seconds, for the request to the metadata server. + metadata_url: URL of the Cloud Run metadata server endpoint that returns the instance id. + getenv: Callable used to look up environment variables. Defaults to ``os.environ.get`` and + exists primarily for testing. + + Returns: + A :py:class:`GoogleCloudRunMetadata` describing the current instance. + + Raises: + RuntimeError: If the metadata server cannot be reached, which usually means the process is + not running on a Cloud Run worker pool or service. + """ + name = getenv("CLOUD_RUN_WORKER_POOL") or getenv("K_SERVICE") or "" + revision = getenv("CLOUD_RUN_REVISION") or getenv("K_REVISION") or "" + + request = urllib.request.Request( + metadata_url, + headers={"Metadata-Flavor": "Google"}, + method="GET", + ) + try: + with urllib.request.urlopen(request, timeout=timeout) as response: + instance_id = response.read().decode("utf-8").strip() + except OSError as err: + raise RuntimeError( + f"Failed to reach the Cloud Run metadata server at {metadata_url!r}; " + "this process may not be running on a Cloud Run worker pool or service." + ) from err + + return GoogleCloudRunMetadata( + instance_id=instance_id, + name=name, + revision=revision, + ) diff --git a/temporalio/contrib/gcp/cloud_run/opentelemetry/README.md b/temporalio/contrib/gcp/cloud_run/opentelemetry/README.md new file mode 100644 index 0000000000..64431bece8 --- /dev/null +++ b/temporalio/contrib/gcp/cloud_run/opentelemetry/README.md @@ -0,0 +1,150 @@ +# Temporal Google Cloud Run integration + +`temporalio.contrib.gcp.cloud_run.opentelemetry` provides an OpenTelemetry plugin with +defaults for Temporal Python SDK workers running on Google Cloud Run. Cloud Run +worker pools are the recommended deployment because Temporal workers are +continuous, pull-based background workloads. + +> **Collector required by default:** The plugin exports metrics and traces to an +> OTLP collector at `http://localhost:4317`. It does not export directly to +> Google Cloud. Deploy the Google-Built OpenTelemetry Collector as a sidecar, +> configure another collector endpoint, or provide an application-owned runtime +> and tracer provider. Without a collector at the configured endpoint, +> telemetry is not delivered to Google Cloud. + +This integration is for container-based Cloud Run workloads. It does not +implement a Cloud Run functions invocation lifecycle. + +A Cloud Run service can also host a Temporal worker, but it must use +instance-based billing so CPU is available outside request handling, keep at +least one instance active through minimum instances or manual scaling, and run +an ingress container that listens on `PORT`. These are deployment requirements; +the plugin cannot configure them from inside the worker process. + +## Installation + +Install the SDK with the Cloud Run OpenTelemetry dependencies: + +```bash +python -m pip install 'temporalio[cloud-run-worker-otel]' +``` + +## Usage + +Create one plugin and install it when connecting the Temporal client. Client +plugins automatically propagate to workers created from that client. + +```python +import asyncio +from datetime import timedelta + +from temporalio.client import Client +from temporalio.contrib.gcp.cloud_run.opentelemetry import OpenTelemetryPlugin +from temporalio.worker import Worker + +otel_plugin = OpenTelemetryPlugin() +client = await Client.connect( + "localhost:7233", + plugins=[otel_plugin], +) +worker = Worker( + client, + task_queue="my-task-queue", + workflows=[MyWorkflow], + activities=[my_activity], +) + +try: + await worker.run() +finally: + # Run this only after every worker using the plugin has stopped. + await asyncio.to_thread(otel_plugin.shutdown, timedelta(seconds=2)) +``` + +The plugin configures Temporal Core metrics through a +`temporalio.runtime.Runtime` and delegates tracing to +`temporalio.contrib.opentelemetry.OpenTelemetryPlugin`. Do not install both the +Cloud Run and generic OpenTelemetry plugins on the same client. + +## Shutdown lifecycle + +`Worker.shutdown()` waits for worker shutdown to complete. Stop every worker +using the plugin, then call `OpenTelemetryPlugin.shutdown()` with the time +remaining before Cloud Run sends `SIGKILL`. The call force-flushes Python traces +and shuts down a tracer provider created by the plugin. An application-owned +provider is force-flushed but remains the application's responsibility. + +The Python SDK Core runtime exports metrics periodically and currently has no +explicit metrics-flush API. The default metric periodicity is 60 seconds, +matching the upstream OpenTelemetry SDK default. This avoids sending multiple +cumulative snapshots of the same Temporal series too frequently. Tune it with +`metric_periodicity` when the metrics backend semantics support a different +interval. + +Do not use a collector batch processor on the Google Managed Service for +Prometheus metrics pipeline. A runtime shutdown can force a metrics export +immediately after a periodic export, regardless of the periodicity. If the +collector combines both cumulative snapshots into one write, Google Managed +Service for Prometheus can reject it with `Duplicate TimeSeries`. Send each +OTLP metrics export directly through the memory limiter, GCP resource detection, +and any required resource/metric transforms to the Google Managed Prometheus +exporter. Keep a separate batch processor on the traces pipeline; trace batching +does not have the cumulative time-series collision. + +`flush_on_worker_stop=True` enables a best-effort trace flush after an +individual worker stops. It is disabled by default because one plugin can be +used by multiple workers and the remaining workers can emit telemetry after the +first worker stops. + +The OTLP endpoint is resolved in this order: + +1. `OpenTelemetryPlugin(endpoint=...)`. +2. `OTEL_EXPORTER_OTLP_ENDPOINT`. +3. `http://localhost:4317`. + +The OpenTelemetry service name is resolved in this order: + +1. `OpenTelemetryPlugin(service_name=...)`. +2. `OTEL_SERVICE_NAME`. +3. `CLOUD_RUN_WORKER_POOL` for a Cloud Run worker pool. +4. `K_SERVICE` for a Cloud Run service. +5. `temporal-worker`. + +The plugin owns the runtime and replay-safe tracer provider it creates. To use +an application-owned runtime or provider, pass `runtime=` or `tracer_provider=`. +An application-owned provider must be created with +`temporalio.contrib.opentelemetry.create_tracer_provider`. Use +`build_metrics_telemetry_config()` to compose GCP metrics defaults with custom +runtime logging or other telemetry settings. Do not also pass a different +`runtime` to `Client.connect()`. + +OpenTelemetry has one global tracer provider per process. Create the Cloud Run +plugin before installing another provider, or pass the already-installed +replay-safe provider through `tracer_provider=`. The plugin raises instead of +silently using a different global provider. + +The collector should use its GCP resource detector to add the Google Cloud +attributes it recognizes. Do not rely on the detector to infer Cloud Run +worker-pool-specific location or revision attributes; configure those explicitly +with a collector resource processor if they are required. This module does not +call the Google Cloud metadata server and adds no Google Cloud client libraries +or exporters to the worker process. + +## Collector sidecar + +Google publishes the Google-Built OpenTelemetry Collector as a container image. +Configure it as a second Cloud Run container, listen for OTLP gRPC on +`localhost:4317`, and use its GCP exporters for metrics and traces. Configure +separate pipelines: metrics without a batch processor, and traces with a +dedicated batch processor. For the image, collector configuration, IAM roles, +health check, and Secret Manager mount, see [Deploy Google-Built OpenTelemetry +Collector on Cloud Run](https://cloud.google.com/stackdriver/docs/instrumentation/opentelemetry-collector-cloud-run). +That guide demonstrates a Cloud Run service; adapt its collector container and +configuration when deploying a worker pool. + +Cloud Run worker pools support sidecar containers over localhost and are +intended for continuous background work. Start the collector before the +Temporal worker and use the collector health extension as its startup probe. + +To use an external collector instead, set `OTEL_EXPORTER_OTLP_ENDPOINT` or pass +`endpoint=` to the plugin. diff --git a/temporalio/contrib/gcp/cloud_run/opentelemetry/__init__.py b/temporalio/contrib/gcp/cloud_run/opentelemetry/__init__.py new file mode 100644 index 0000000000..d4384649d7 --- /dev/null +++ b/temporalio/contrib/gcp/cloud_run/opentelemetry/__init__.py @@ -0,0 +1,36 @@ +"""OpenTelemetry integration for Temporal workers running on Google Cloud Run. + +This package is designed for container-based Cloud Run workers, especially +worker pools, and exports telemetry to an OpenTelemetry collector sidecar by +default. + +.. warning:: + This package is experimental and may change in future versions. + Use with caution in production environments. +""" + +from temporalio.contrib.gcp.cloud_run.opentelemetry._opentelemetry import ( + CLOUD_RUN_SERVICE_ENV_VAR, + CLOUD_RUN_WORKER_POOL_ENV_VAR, + DEFAULT_FLUSH_TIMEOUT, + DEFAULT_METRIC_PERIODICITY, + DEFAULT_OTLP_ENDPOINT, + DEFAULT_SERVICE_NAME, + OTEL_EXPORTER_OTLP_ENDPOINT_ENV_VAR, + OTEL_SERVICE_NAME_ENV_VAR, + OpenTelemetryPlugin, + build_metrics_telemetry_config, +) + +__all__ = [ + "CLOUD_RUN_SERVICE_ENV_VAR", + "CLOUD_RUN_WORKER_POOL_ENV_VAR", + "DEFAULT_FLUSH_TIMEOUT", + "DEFAULT_METRIC_PERIODICITY", + "DEFAULT_OTLP_ENDPOINT", + "DEFAULT_SERVICE_NAME", + "OTEL_EXPORTER_OTLP_ENDPOINT_ENV_VAR", + "OTEL_SERVICE_NAME_ENV_VAR", + "OpenTelemetryPlugin", + "build_metrics_telemetry_config", +] diff --git a/temporalio/contrib/gcp/cloud_run/opentelemetry/_opentelemetry.py b/temporalio/contrib/gcp/cloud_run/opentelemetry/_opentelemetry.py new file mode 100644 index 0000000000..e8fff526fe --- /dev/null +++ b/temporalio/contrib/gcp/cloud_run/opentelemetry/_opentelemetry.py @@ -0,0 +1,351 @@ +"""OpenTelemetry plugin with Google Cloud Run defaults.""" + +from __future__ import annotations + +import asyncio +import logging +import threading +from collections.abc import Awaitable, Callable +from datetime import timedelta + +from opentelemetry.sdk.resources import Resource +from opentelemetry.trace import ( + ProxyTracerProvider, + TracerProvider, + get_tracer_provider, + set_tracer_provider, +) + +from temporalio.contrib.opentelemetry import ( + OpenTelemetryPlugin as TemporalOpenTelemetryPlugin, +) +from temporalio.contrib.opentelemetry import _serverless, create_tracer_provider +from temporalio.contrib.opentelemetry._tracer_provider import ( + ReplaySafeTracerProvider, +) +from temporalio.runtime import Runtime, TelemetryConfig +from temporalio.service import ConnectConfig, ServiceClient +from temporalio.worker import Worker + +logger = logging.getLogger(__name__) + +OTEL_EXPORTER_OTLP_ENDPOINT_ENV_VAR = _serverless.OTEL_EXPORTER_OTLP_ENDPOINT_ENV_VAR +"""Standard OpenTelemetry environment variable for the common OTLP endpoint.""" + +OTEL_SERVICE_NAME_ENV_VAR = _serverless.OTEL_SERVICE_NAME_ENV_VAR +"""Standard OpenTelemetry environment variable for ``service.name``.""" + +CLOUD_RUN_WORKER_POOL_ENV_VAR = "CLOUD_RUN_WORKER_POOL" +"""Cloud Run environment variable containing the worker-pool name.""" + +CLOUD_RUN_SERVICE_ENV_VAR = "K_SERVICE" +"""Cloud Run environment variable containing the service name.""" + +DEFAULT_OTLP_ENDPOINT = _serverless.DEFAULT_OTLP_ENDPOINT +"""Default local OTLP gRPC collector endpoint.""" + +DEFAULT_SERVICE_NAME = "temporal-worker" +"""Service name used outside a recognized Cloud Run environment.""" + +DEFAULT_METRIC_PERIODICITY = timedelta(seconds=60) +"""Default interval between Temporal Core metric exports.""" + +DEFAULT_FLUSH_TIMEOUT = timedelta(seconds=10) +"""Default timeout for tracing force-flush operations.""" + + +class OpenTelemetryPlugin(TemporalOpenTelemetryPlugin): + """OpenTelemetry plugin for Temporal workers running on Google Cloud Run. + + The default configuration sends Temporal Core metrics and Python traces over + OTLP gRPC to a collector on ``localhost:4317``. The collector is responsible + for Google Cloud resource detection, authentication, and export. + + The plugin creates and installs a replay-safe global tracer provider unless + ``tracer_provider`` is supplied. It also creates a Temporal runtime for Core + metrics unless ``runtime`` is supplied. Call :py:meth:`shutdown` after every + worker using the plugin has stopped. + + .. warning:: + This class is experimental and may change in future versions. + Use with caution in production environments. + """ + + def __init__( + self, + *, + endpoint: str | None = None, + service_name: str | None = None, + metric_periodicity: timedelta | None = None, + flush_timeout: timedelta = DEFAULT_FLUSH_TIMEOUT, + flush_on_worker_stop: bool = False, + tracer_provider: TracerProvider | None = None, + runtime: Runtime | None = None, + add_temporal_spans: bool = False, + ) -> None: + """Initialize the Google Cloud OpenTelemetry plugin. + + Args: + endpoint: OTLP gRPC endpoint. Falls back to + ``OTEL_EXPORTER_OTLP_ENDPOINT``, then ``http://localhost:4317``. + service_name: OpenTelemetry service name. Falls back to + ``OTEL_SERVICE_NAME``, ``CLOUD_RUN_WORKER_POOL``, ``K_SERVICE``, + then ``temporal-worker``. + metric_periodicity: How often Temporal Core metrics are exported. + Defaults to 60 seconds. Cannot be used with ``runtime``. + flush_timeout: Default tracing force-flush timeout. + flush_on_worker_stop: Whether to force-flush traces after each + worker stops. Disabled by default because one plugin can be used + by multiple workers. + tracer_provider: Application-owned replay-safe tracer provider. It + must have been created with + :py:func:`temporalio.contrib.opentelemetry.create_tracer_provider`. + When supplied, the plugin does not create an exporter or shut + down the provider. + runtime: Application-owned Temporal runtime. When supplied, the + plugin does not create or modify Core metrics configuration. Use + :py:func:`build_metrics_telemetry_config` to build a composable + telemetry configuration for a custom runtime. + add_temporal_spans: Whether the underlying Temporal OpenTelemetry + plugin should add Temporal-specific operation spans. + """ + _validate_positive_duration("flush_timeout", flush_timeout) + if metric_periodicity is not None: + _validate_positive_duration("metric_periodicity", metric_periodicity) + if runtime is not None and metric_periodicity is not None: + raise ValueError("metric_periodicity cannot be set with runtime") + + resolved_endpoint = _resolve_endpoint(endpoint) + resolved_service_name = _resolve_service_name(service_name) + resolved_metric_periodicity = ( + metric_periodicity + if metric_periodicity is not None + else DEFAULT_METRIC_PERIODICITY + ) + + owns_tracer_provider = tracer_provider is None + if tracer_provider is None: + resolved_tracer_provider = _create_tracer_provider( + resolved_endpoint, resolved_service_name + ) + elif isinstance(tracer_provider, ReplaySafeTracerProvider): + resolved_tracer_provider = tracer_provider + else: + raise TypeError( + "tracer_provider must be created with " + "temporalio.contrib.opentelemetry.create_tracer_provider" + ) + + try: + if runtime is None: + runtime = Runtime( + telemetry=_serverless.build_metrics_telemetry_config( + endpoint=resolved_endpoint, + service_name=resolved_service_name, + metric_periodicity=resolved_metric_periodicity, + ) + ) + _install_global_tracer_provider(resolved_tracer_provider) + except BaseException: + if owns_tracer_provider: + resolved_tracer_provider.shutdown() + raise + + self._endpoint = resolved_endpoint + self._service_name = resolved_service_name + self._flush_timeout = flush_timeout + self._flush_on_worker_stop = flush_on_worker_stop + self._tracer_provider = resolved_tracer_provider + self._owns_tracer_provider = owns_tracer_provider + self._runtime = runtime + self._shutdown_lock = threading.Lock() + self._shutdown = False + self._shutdown_succeeded = True + + super().__init__(add_temporal_spans=add_temporal_spans) + + @property + def endpoint(self) -> str: + """Resolved OTLP collector endpoint.""" + return self._endpoint + + @property + def service_name(self) -> str: + """Resolved OpenTelemetry service name.""" + return self._service_name + + @property + def tracer_provider(self) -> ReplaySafeTracerProvider: + """Replay-safe tracer provider used by the plugin.""" + return self._tracer_provider + + @property + def runtime(self) -> Runtime: + """Temporal runtime used for Core metrics.""" + return self._runtime + + async def connect_service_client( + self, + config: ConnectConfig, + next: Callable[[ConnectConfig], Awaitable[ServiceClient]], + ) -> ServiceClient: + """Install the metrics runtime before connecting the service client.""" + if config.runtime is not None and config.runtime is not self._runtime: + raise ValueError( + "OpenTelemetryPlugin runtime conflicts with the runtime passed " + "to Client.connect; pass that runtime to the plugin instead" + ) + config.runtime = self._runtime + return await super().connect_service_client(config, next) + + async def run_worker( + self, worker: Worker, next: Callable[[Worker], Awaitable[None]] + ) -> None: + """Run a worker and optionally force-flush traces after it stops.""" + try: + await super().run_worker(worker, next) + finally: + if self._flush_on_worker_stop: + try: + succeeded = await asyncio.to_thread( + self.force_flush, self._flush_timeout + ) + if not succeeded: + logger.warning( + "OpenTelemetry trace flush timed out after worker stop" + ) + except Exception: + logger.exception( + "OpenTelemetry trace flush failed after worker stop" + ) + + def force_flush(self, timeout: timedelta | None = None) -> bool: + """Export buffered Python traces without shutting down the provider. + + Temporal Core metrics are exported periodically and the Python runtime + currently has no explicit metrics-flush API. + + Args: + timeout: Maximum time to wait. Defaults to ``flush_timeout`` from + the constructor. + + Returns: + ``True`` when the tracer provider reports a successful flush. + """ + resolved_timeout = timeout if timeout is not None else self._flush_timeout + _validate_positive_duration("timeout", resolved_timeout) + return self._tracer_provider.force_flush( + _duration_to_milliseconds(resolved_timeout) + ) + + def shutdown(self, timeout: timedelta | None = None) -> bool: + """Flush traces and shut down a provider created by the plugin. + + Application-owned tracer providers are force-flushed but are not shut + down. This method is idempotent. Stop every worker using the plugin + before calling it. + + Args: + timeout: Maximum time allowed for the tracing force-flush. Provider + shutdown happens after that flush. + + Returns: + ``True`` when the tracing force-flush succeeded. + """ + with self._shutdown_lock: + if self._shutdown: + return self._shutdown_succeeded + + succeeded = self.force_flush(timeout) + if self._owns_tracer_provider: + self._tracer_provider.shutdown() + self._shutdown = True + self._shutdown_succeeded = succeeded + return succeeded + + +def build_metrics_telemetry_config( + *, + endpoint: str | None = None, + service_name: str | None = None, + metric_periodicity: timedelta | None = None, +) -> TelemetryConfig: + """Build Temporal Core telemetry with Google Cloud Run defaults. + + This helper is useful when the application needs to customize runtime + logging or other telemetry settings before constructing a + :py:class:`temporalio.runtime.Runtime`. + + Args: + endpoint: OTLP gRPC endpoint, with the same resolution order as + :py:class:`OpenTelemetryPlugin`. + service_name: Service name, with the same resolution order as + :py:class:`OpenTelemetryPlugin`. + metric_periodicity: Metric export interval. Defaults to 60 seconds. + + Returns: + Telemetry configuration ready for a Temporal runtime. + """ + resolved_periodicity = ( + metric_periodicity + if metric_periodicity is not None + else DEFAULT_METRIC_PERIODICITY + ) + _validate_positive_duration("metric_periodicity", resolved_periodicity) + return _serverless.build_metrics_telemetry_config( + endpoint=_resolve_endpoint(endpoint), + service_name=_resolve_service_name(service_name), + metric_periodicity=resolved_periodicity, + ) + + +def _create_tracer_provider( + endpoint: str, service_name: str +) -> ReplaySafeTracerProvider: + provider = create_tracer_provider( + resource=Resource.create({"service.name": service_name}) + ) + try: + provider.add_span_processor(_serverless.build_otlp_span_processor(endpoint)) + except ImportError as err: + raise RuntimeError( + "The OTLP gRPC exporter is required. Install the " + "'temporalio[cloud-run-worker-otel]' extra." + ) from err + return provider + + +def _install_global_tracer_provider(provider: ReplaySafeTracerProvider) -> None: + current = get_tracer_provider() + if current is provider: + return + if not isinstance(current, ProxyTracerProvider): + raise RuntimeError( + "The global OpenTelemetry tracer provider is already configured. " + "Pass that provider as tracer_provider if it was created with " + "temporalio.contrib.opentelemetry.create_tracer_provider." + ) + set_tracer_provider(provider) + if get_tracer_provider() is not provider: + raise RuntimeError("Failed to install the OpenTelemetry tracer provider") + + +def _resolve_endpoint(explicit: str | None) -> str: + return _serverless.resolve_endpoint(explicit) + + +def _resolve_service_name(explicit: str | None) -> str: + return _serverless.resolve_service_name( + explicit, + [CLOUD_RUN_WORKER_POOL_ENV_VAR, CLOUD_RUN_SERVICE_ENV_VAR], + DEFAULT_SERVICE_NAME, + ) + + +def _validate_positive_duration(name: str, value: timedelta) -> None: + if value <= timedelta(0): + raise ValueError(f"{name} must be positive") + + +def _duration_to_milliseconds(value: timedelta) -> int: + return max(1, round(value.total_seconds() * 1000)) diff --git a/temporalio/contrib/gcp/gcsdriver/README.md b/temporalio/contrib/gcp/gcsdriver/README.md new file mode 100644 index 0000000000..3b1aa42f3c --- /dev/null +++ b/temporalio/contrib/gcp/gcsdriver/README.md @@ -0,0 +1,92 @@ +# Google Cloud Storage Driver + +> ⚠️ **This package is experimental.** ⚠️ + +`GCSStorageDriver` stores and retrieves Temporal payloads in Google Cloud Storage. + +Install the async GCS client: + +```bash +python -m pip install "temporalio[gcloud-aio-storage]" +``` + +```python +import dataclasses + +from gcloud.aio.storage import Storage + +from temporalio.client import Client +from temporalio.contrib.gcp.gcsdriver import GCSStorageDriver +from temporalio.contrib.gcp.gcsdriver.gcloud_aio import new_gcloud_aio_client +from temporalio.converter import DataConverter, ExternalStorage + +async with Storage() as storage: + driver = GCSStorageDriver( + client=new_gcloud_aio_client(storage), + bucket="my-temporal-payloads", + ) + client = await Client.connect( + "localhost:7233", + data_converter=dataclasses.replace( + DataConverter.default, + external_storage=ExternalStorage(drivers=[driver]), + ), + ) + # Run clients and workers inside this context so their storage client stays open. +``` + +Configure credentials, timeouts, and retries through the `Storage` client. See the +[gcloud-aio documentation](https://talkiq.github.io/gcloud-aio/) for details. +The adapter does not add retries, and interrupted uploads must restart. + +## Configuration + +- Configure this driver on every Temporal client and worker that stores or retrieves + its payloads, using the same `driver_name` (default: `gcp.gcsdriver`). +- `bucket` accepts a name or a function taking `(context, payload)` and returning + a bucket name. Downloads use the bucket recorded at upload time. +- The bucket must already exist. Use a flat namespace bucket and credentials with + `storage.objects.get` and `storage.objects.create` permissions. +- `ExternalStorage.payload_size_threshold` defaults to 256 KiB. The driver accepts + serialized payloads up to `max_payload_size` (default: 50 MiB). +- Retain objects for as long as workflow histories may need them, including replay. + The driver leaves deletion and lifecycle policies to the application. + +To use another async GCS client, implement `GCSStorageDriverClient` with +`object_exists`, `put_object`, and `get_object`. `put_object` must leave an existing +object unchanged. + +## Object names and integrity + +Objects store the full Temporal payload, including metadata. Names include the +namespace, available workflow or activity identifiers, and a SHA-256 hash: + +```text +v0/ns/{namespace}/wt/{workflow-type}/wi/{workflow-id}/ri/{run-id}/d/sha256/{hex-digest} +v0/ns/{namespace}/at/{activity-type}/ai/{activity-id}/ri/{run-id}/d/sha256/{hex-digest} +v0/ns/{namespace}/d/sha256/{hex-digest} +``` + +The last form is used when no target is available, with the namespace of the +client or worker performing the operation. Empty or missing fields use +`null`, including an empty namespace on a workflow or activity target. Names +preserve Unicode and escape characters that interfere with +[GCS tools](https://cloud.google.com/storage/docs/objects#naming), including `/` +and `%` within individual fields. + +Names over 1,024 UTF-8 bytes fall back to +`v0/ns/{namespace}/d/sha256/{hex-digest}`, retaining the namespace for access policies. +Identical payload bytes in the same context reuse an object. Uploads never +overwrite existing objects, and downloads verify the hash before decoding. + +## Testing + +Run the tests: + +```bash +poe test -s tests/contrib/gcp/gcsdriver +``` + +Pytest downloads and caches [fake-gcs-server](https://github.com/fsouza/fake-gcs-server) +in `.pytest_cache`, starts it locally, and cleans up after the tests. To use a +preinstalled binary, put `fake-gcs-server` on `PATH`. diff --git a/temporalio/contrib/gcp/gcsdriver/__init__.py b/temporalio/contrib/gcp/gcsdriver/__init__.py new file mode 100644 index 0000000000..8032618e8a --- /dev/null +++ b/temporalio/contrib/gcp/gcsdriver/__init__.py @@ -0,0 +1,13 @@ +"""Google Cloud Storage driver for Temporal external storage. + +.. warning:: + This API is experimental. +""" + +from temporalio.contrib.gcp.gcsdriver._client import GCSStorageDriverClient +from temporalio.contrib.gcp.gcsdriver._driver import GCSStorageDriver + +__all__ = [ + "GCSStorageDriverClient", + "GCSStorageDriver", +] diff --git a/temporalio/contrib/gcp/gcsdriver/_client.py b/temporalio/contrib/gcp/gcsdriver/_client.py new file mode 100644 index 0000000000..5ebf75b00a --- /dev/null +++ b/temporalio/contrib/gcp/gcsdriver/_client.py @@ -0,0 +1,42 @@ +"""GCS storage driver client abstraction for the GCS storage driver. + +.. warning:: + This API is experimental. +""" + +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections.abc import Mapping + + +class GCSStorageDriverClient(ABC): + """Abstract base class for GCS object operations. + + Implementations must support ``object_exists``, ``put_object``, and + ``get_object``. Resumable uploads (if needed) are an internal concern of + each implementation. Uploads must leave existing objects unchanged. + + .. warning:: + This API is experimental. + """ + + @abstractmethod + async def put_object(self, *, bucket: str, object_name: str, data: bytes) -> None: + """Upload *data* if absent at the given GCS *bucket* and *object_name*.""" + + @abstractmethod + async def object_exists(self, *, bucket: str, object_name: str) -> bool: + """Return ``True`` if an object exists at the given *bucket* and *object_name*.""" + + @abstractmethod + async def get_object(self, *, bucket: str, object_name: str) -> bytes: + """Download and return the bytes stored at the given GCS *bucket* and *object_name*.""" + + def describe(self) -> Mapping[str, str]: + """Return client-specific diagnostic metadata (e.g. region, credentials + source) that the driver appends to error messages. Implementations may + override this to surface configuration that is useful for debugging + common misconfigurations. Returns an empty mapping by default. + """ + return {} diff --git a/temporalio/contrib/gcp/gcsdriver/_driver.py b/temporalio/contrib/gcp/gcsdriver/_driver.py new file mode 100644 index 0000000000..523b1c3e20 --- /dev/null +++ b/temporalio/contrib/gcp/gcsdriver/_driver.py @@ -0,0 +1,261 @@ +"""Google Cloud Storage driver for Temporal external storage. + +.. warning:: + This API is experimental. +""" + +from __future__ import annotations + +import asyncio +import hashlib +from collections.abc import Callable, Coroutine, Sequence +from typing import Any, TypeVar + +from temporalio.api.common.v1 import Payload +from temporalio.contrib.gcp.gcsdriver._client import GCSStorageDriverClient +from temporalio.converter import ( + StorageDriver, + StorageDriverActivityInfo, + StorageDriverClaim, + StorageDriverRetrieveContext, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, +) + +_T = TypeVar("_T") + +_GCS_UNSAFE_CHARS = frozenset('#[]*?:"<>|/%') + + +def _percent_encode(val: str | None) -> str | None: + """Percent-encode a segment of a GCS object name. + + Escape characters that interfere with GCS tooling, path separators, and + percent signs, preserving readable Unicode. Returns ``None`` for empty or + missing values so callers can substitute ``"null"``. + """ + if not val: + return None + encoded: list[str] = [] + for char in val: + if char in _GCS_UNSAFE_CHARS or ord(char) <= 0x1F or 0x7F <= ord(char) <= 0x9F: + encoded.extend(f"%{byte:02X}" for byte in char.encode("utf-8")) + else: + encoded.append(char) + segment = "".join(encoded) + if segment in (".", ".."): + return segment.replace(".", "%2E") + return segment + + +def _format_client_context(client: GCSStorageDriverClient) -> str: + """Format the client's ``describe()`` output as ", k=v, k=v" for error + messages. Returns an empty string when the client reports no metadata or + describe itself raises (diagnostic output must never mask the real error). + """ + try: + info = client.describe() + except Exception: + return "" + if not info: + return "" + return "".join(f", {k}={v}" for k, v in info.items()) + + +async def _gather_with_cancellation( + coros: Sequence[Coroutine[Any, Any, _T]], +) -> list[_T]: + """Run coroutines concurrently, cancelling all remaining tasks if one fails.""" + if not coros: + return [] + tasks = [asyncio.ensure_future(c) for c in coros] + try: + return list(await asyncio.gather(*tasks)) + except BaseException: + for t in tasks: + t.cancel() + await asyncio.gather(*tasks, return_exceptions=True) + raise + + +class GCSStorageDriver(StorageDriver): + """Driver for storing and retrieving Temporal payloads in Google Cloud Storage. + + Requires an :class:`GCSStorageDriverClient` and a ``bucket``. Payloads are keyed by + a SHA-256 hash of their serialized bytes, segmented by namespace and + workflow/activity identifiers derived from the serialization context. + + .. warning:: + This API is experimental. + """ + + def __init__( + self, + client: GCSStorageDriverClient, + bucket: str | Callable[[StorageDriverStoreContext, Payload], str], + driver_name: str = "gcp.gcsdriver", + max_payload_size: int = 50 * 1024 * 1024, + ): + """Constructs the GCS driver. + + Args: + client: An :class:`GCSStorageDriverClient` implementation. Use + :func:`temporalio.contrib.gcp.gcsdriver.gcloud_aio.new_gcloud_aio_client` to + wrap a gcloud-aio-storage client. + bucket: GCS bucket name or a callable that + accepts ``(StorageDriverStoreContext, Payload)`` and returns + a bucket name. A callable allows dynamic per-payload bucket + selection. + driver_name: Name of this driver instance. Defaults to + ``"gcp.gcsdriver"``. Override when registering + multiple GCSStorageDriver instances with distinct configurations + under the same ``temporalio.converter.ExternalStorage.drivers`` list. + max_payload_size: Maximum serialized payload size in bytes that the + driver will accept. Defaults to 52428800 (50 MiB). Raise this + value if your workload requires larger payloads; lower it to + enforce stricter limits. + """ + if max_payload_size <= 0: + raise ValueError("max_payload_size must be greater than zero") + self._client = client + self._bucket = bucket + self._driver_name = driver_name or "gcp.gcsdriver" + self._max_payload_size = max_payload_size + + def name(self) -> str: + """Return the driver instance name.""" + return self._driver_name + + def type(self) -> str: + """Return the driver type identifier.""" + return "gcp.gcsdriver" + + def _get_bucket(self, context: StorageDriverStoreContext, payload: Payload) -> str: + """Resolve bucket using the configured strategy.""" + if callable(self._bucket): + return self._bucket(context, payload) + return self._bucket + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + """Stores payloads in GCS and returns a ``StorageDriverClaim`` for each one. + + Payloads are keyed by their SHA-256 hash, so identical serialized bytes + share the same GCS object. Deduplication is best-effort because the same + Python value may serialize differently across payload converter versions + (e.g. proto binary). The returned list is the same length as + ``payloads``. + + Without a target, object names are scoped to the context's namespace. An + empty or missing namespace uses ``"null"``. + """ + context_segments = "" + target = context.target + namespace = target.namespace if target is not None else context.namespace + namespace_segment = f"/ns/{_percent_encode(namespace) or 'null'}" + if isinstance(target, StorageDriverWorkflowInfo): + wf_type = _percent_encode(target.type) or "null" + wf_id = _percent_encode(target.id) or "null" + wf_run_id = _percent_encode(target.run_id) or "null" + context_segments = f"/wt/{wf_type}/wi/{wf_id}/ri/{wf_run_id}" + elif isinstance(target, StorageDriverActivityInfo): + act_type = _percent_encode(target.type) or "null" + act_id = _percent_encode(target.id) or "null" + act_run_id = _percent_encode(target.run_id) or "null" + context_segments = f"/at/{act_type}/ai/{act_id}/ri/{act_run_id}" + + async def _upload(payload: Payload) -> StorageDriverClaim: + bucket = self._get_bucket(context, payload) + + payload_bytes = payload.SerializeToString() + if len(payload_bytes) > self._max_payload_size: + raise ValueError( + f"Payload size {len(payload_bytes)} bytes exceeds the configured " + f"max_payload_size of {self._max_payload_size} bytes" + ) + + hash_digest = hashlib.sha256(payload_bytes).hexdigest() + + digest_segments = f"/d/sha256/{hash_digest}" + + object_name = f"v0{namespace_segment}{context_segments}{digest_segments}" + if len(object_name.encode("utf-8")) > 1024: + # Retain namespace scope for authorization policies on object prefixes. + object_name = f"v0{namespace_segment}{digest_segments}" + + try: + if not await self._client.object_exists( + bucket=bucket, object_name=object_name + ): + await self._client.put_object( + bucket=bucket, object_name=object_name, data=payload_bytes + ) + except Exception as e: + raise RuntimeError( + f"GCSStorageDriver store failed [bucket={bucket}, object_name={object_name}" + f"{_format_client_context(self._client)}]" + ) from e + + return StorageDriverClaim( + claim_data={ + "bucket": bucket, + "object_name": object_name, + "hash_algorithm": "sha256", + "hash_value": hash_digest, + }, + ) + + return await _gather_with_cancellation([_upload(p) for p in payloads]) + + async def retrieve( + self, + context: StorageDriverRetrieveContext, # noqa: ARG002 + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + """Retrieves payloads from GCS for the given ``StorageDriverClaim`` list.""" + + async def _download(claim: StorageDriverClaim) -> Payload: + bucket = claim.claim_data["bucket"] + object_name = claim.claim_data["object_name"] + + try: + payload_bytes = await self._client.get_object( + bucket=bucket, object_name=object_name + ) + except Exception as e: + raise RuntimeError( + f"GCSStorageDriver retrieve failed [bucket={bucket}, object_name={object_name}" + f"{_format_client_context(self._client)}]" + ) from e + + hash_algorithm = claim.claim_data.get("hash_algorithm") + expected_hash = claim.claim_data.get("hash_value") + if not hash_algorithm or not expected_hash: + raise ValueError( + f"GCSStorageDriver claim is missing required content hash information " + f"[bucket={bucket}, object_name={object_name}]: " + f"claim_data must contain 'hash_algorithm' and 'hash_value'" + ) + if hash_algorithm != "sha256": + raise ValueError( + f"GCSStorageDriver unsupported hash algorithm " + f"[bucket={bucket}, object_name={object_name}]: " + f"expected sha256, got {hash_algorithm}" + ) + actual_hash = hashlib.sha256(payload_bytes).hexdigest() + if actual_hash != expected_hash: + raise ValueError( + f"GCSStorageDriver integrity check failed " + f"[bucket={bucket}, object_name={object_name}]: " + f"expected {hash_algorithm}:{expected_hash}, " + f"got {hash_algorithm}:{actual_hash}" + ) + + payload = Payload() + payload.ParseFromString(payload_bytes) + return payload + + return await _gather_with_cancellation([_download(c) for c in claims]) diff --git a/temporalio/contrib/gcp/gcsdriver/gcloud_aio.py b/temporalio/contrib/gcp/gcsdriver/gcloud_aio.py new file mode 100644 index 0000000000..0d9ae1cae1 --- /dev/null +++ b/temporalio/contrib/gcp/gcsdriver/gcloud_aio.py @@ -0,0 +1,64 @@ +"""Gcloud-aio-storage adapter for the GCS storage driver client. + +.. warning:: + This API is experimental. +""" + +from __future__ import annotations + +from aiohttp import ClientResponseError +from gcloud.aio.storage import Storage + +from temporalio.contrib.gcp.gcsdriver._client import GCSStorageDriverClient + + +class _GcloudAioStorageDriverClient(GCSStorageDriverClient): + """Adapter for an application-owned gcloud-aio-storage client.""" + + def __init__(self, client: Storage) -> None: + """Wrap the async storage client.""" + self._client = client + + async def object_exists(self, *, bucket: str, object_name: str) -> bool: + """Check existence via object metadata.""" + try: + await self._client.download_metadata(bucket, object_name) + return True + except ClientResponseError as err: + if err.status == 404: + return False + raise + + async def put_object(self, *, bucket: str, object_name: str, data: bytes) -> None: + """Upload bytes using conditional object creation.""" + try: + await self._client.upload( + bucket, + object_name, + data, + content_type="application/octet-stream", + parameters={"ifGenerationMatch": "0"}, + force_resumable_upload=False, + ) + except ClientResponseError as err: + # Another writer may create the content-addressed object after our check. + if err.status == 412: + return + raise + + async def get_object(self, *, bucket: str, object_name: str) -> bytes: + """Download the object's bytes.""" + return await self._client.download(bucket, object_name) + + +def new_gcloud_aio_client(client: Storage) -> GCSStorageDriverClient: + """Create a GCS storage driver client from a gcloud-aio-storage client. + + Args: + client: An application-owned ``gcloud.aio.storage.Storage`` client. Keep + it open until all Temporal clients and workers using it have stopped. + + .. warning:: + This API is experimental. + """ + return _GcloudAioStorageDriverClient(client) diff --git a/temporalio/contrib/google_adk_agents/README.md b/temporalio/contrib/google_adk_agents/README.md new file mode 100644 index 0000000000..10ee383a30 --- /dev/null +++ b/temporalio/contrib/google_adk_agents/README.md @@ -0,0 +1,39 @@ +# Google ADK integration + +The Google ADK integration has moved to the independently versioned +[`temporalio-google-adk`](https://pypi.org/project/temporalio-google-adk/) +package. Its canonical Python API is `temporalio.google_adk`. + +The complete integration guide now lives in the +[`temporalio-google-adk` README](https://github.com/temporalio/ai-integrations/tree/main/python/google_adk#readme). + +## Migrating to the standalone package + +Remove the `google-adk` extra from the existing Temporal dependency: + +```toml +# Before +dependencies = [ + "temporalio[google-adk,opentelemetry,pydantic]", +] + +# After +dependencies = [ + "temporalio[opentelemetry,pydantic]", +] +``` + +Remove the brackets if no extras remain. Then install the standalone package directly: + +```bash +uv add temporalio-google-adk +``` + +Change application imports to the standalone package: + +```python +from temporalio.google_adk import GoogleAdkPlugin +``` + +The new import path selects the standalone implementation instead of the +SDK-bundled `temporalio.contrib.google_adk_agents` implementation. diff --git a/temporalio/contrib/google_adk_agents/__init__.py b/temporalio/contrib/google_adk_agents/__init__.py new file mode 100644 index 0000000000..c0244190e6 --- /dev/null +++ b/temporalio/contrib/google_adk_agents/__init__.py @@ -0,0 +1,12 @@ +"""Compatibility imports for the standalone Google ADK integration. + +Install ``temporalio-google-adk`` and import ``temporalio.google_adk`` +directly in new code. + +Legacy ``workflow`` module forwards the standalone public API. +""" + +from temporalio.google_adk import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.google_adk import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, +) diff --git a/temporalio/contrib/google_adk_agents/workflow.py b/temporalio/contrib/google_adk_agents/workflow.py new file mode 100644 index 0000000000..226fdb7bed --- /dev/null +++ b/temporalio/contrib/google_adk_agents/workflow.py @@ -0,0 +1,3 @@ +"""Compatibility imports for temporalio.google_adk.workflow.""" + +from temporalio.google_adk.workflow import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] diff --git a/temporalio/contrib/google_genai/README.md b/temporalio/contrib/google_genai/README.md new file mode 100644 index 0000000000..514866ecda --- /dev/null +++ b/temporalio/contrib/google_genai/README.md @@ -0,0 +1,39 @@ +# Google GenAI integration + +The Google GenAI integration has moved to the independently versioned +[`temporalio-google-genai`](https://pypi.org/project/temporalio-google-genai/) +package. Its canonical Python API is `temporalio.google_genai`. + +The complete integration guide now lives in the +[`temporalio-google-genai` README](https://github.com/temporalio/ai-integrations/tree/main/python/google_genai#readme). + +## Migrating to the standalone package + +Remove the `google-genai` extra from the existing Temporal dependency: + +```toml +# Before +dependencies = [ + "temporalio[google-genai,opentelemetry,pydantic]", +] + +# After +dependencies = [ + "temporalio[opentelemetry,pydantic]", +] +``` + +Remove the brackets if no extras remain. Then install the standalone package directly: + +```bash +uv add temporalio-google-genai +``` + +Change application imports to the standalone package: + +```python +from temporalio.google_genai import GoogleGenAIPlugin +``` + +The new import path selects the standalone implementation instead of the +SDK-bundled `temporalio.contrib.google_genai` implementation. diff --git a/temporalio/contrib/google_genai/__init__.py b/temporalio/contrib/google_genai/__init__.py new file mode 100644 index 0000000000..94ef0d2c93 --- /dev/null +++ b/temporalio/contrib/google_genai/__init__.py @@ -0,0 +1,12 @@ +"""Compatibility imports for the standalone Google GenAI integration. + +Install ``temporalio-google-genai`` and import ``temporalio.google_genai`` +directly in new code. + +Legacy ``testing`` and ``workflow`` modules forward the standalone public API. +""" + +from temporalio.google_genai import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.google_genai import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, +) diff --git a/temporalio/contrib/google_genai/testing.py b/temporalio/contrib/google_genai/testing.py new file mode 100644 index 0000000000..1b56e72800 --- /dev/null +++ b/temporalio/contrib/google_genai/testing.py @@ -0,0 +1,6 @@ +"""Compatibility imports for temporalio.google_genai.testing.""" + +from temporalio.google_genai.testing import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.google_genai.testing import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, +) diff --git a/temporalio/contrib/google_genai/workflow.py b/temporalio/contrib/google_genai/workflow.py new file mode 100644 index 0000000000..6f6934214c --- /dev/null +++ b/temporalio/contrib/google_genai/workflow.py @@ -0,0 +1,3 @@ +"""Compatibility imports for temporalio.google_genai.workflow.""" + +from temporalio.google_genai.workflow import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] diff --git a/temporalio/contrib/langgraph/README.md b/temporalio/contrib/langgraph/README.md new file mode 100644 index 0000000000..ac7256d236 --- /dev/null +++ b/temporalio/contrib/langgraph/README.md @@ -0,0 +1,39 @@ +# LangGraph integration + +The LangGraph integration has moved to the independently versioned +[`temporalio-langgraph`](https://pypi.org/project/temporalio-langgraph/) +package. Its canonical Python API is `temporalio.langgraph`. + +The complete integration guide now lives in the +[`temporalio-langgraph` README](https://github.com/temporalio/ai-integrations/tree/main/python/langgraph#readme). + +## Migrating to the standalone package + +Remove the `langgraph` extra from the existing Temporal dependency: + +```toml +# Before +dependencies = [ + "temporalio[langgraph,opentelemetry,pydantic]", +] + +# After +dependencies = [ + "temporalio[opentelemetry,pydantic]", +] +``` + +Remove the brackets if no extras remain. Then install the standalone package directly: + +```bash +uv add temporalio-langgraph +``` + +Change application imports to the standalone package: + +```python +from temporalio.langgraph import LangGraphPlugin +``` + +The new import path selects the standalone implementation instead of the +SDK-bundled `temporalio.contrib.langgraph` implementation. diff --git a/temporalio/contrib/langgraph/__init__.py b/temporalio/contrib/langgraph/__init__.py new file mode 100644 index 0000000000..310b009ef9 --- /dev/null +++ b/temporalio/contrib/langgraph/__init__.py @@ -0,0 +1,10 @@ +"""Compatibility imports for the standalone LangGraph integration. + +Install ``temporalio-langgraph`` and import ``temporalio.langgraph`` +directly in new code. +""" + +from temporalio.langgraph import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.langgraph import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, +) diff --git a/temporalio/contrib/langsmith/README.md b/temporalio/contrib/langsmith/README.md new file mode 100644 index 0000000000..53245cb7fa --- /dev/null +++ b/temporalio/contrib/langsmith/README.md @@ -0,0 +1,39 @@ +# LangSmith integration + +The LangSmith integration has moved to the independently versioned +[`temporalio-langsmith`](https://pypi.org/project/temporalio-langsmith/) +package. Its canonical Python API is `temporalio.langsmith`. + +The complete integration guide now lives in the +[`temporalio-langsmith` README](https://github.com/temporalio/ai-integrations/tree/main/python/langsmith#readme). + +## Migrating to the standalone package + +Remove the `langsmith` extra from the existing Temporal dependency: + +```toml +# Before +dependencies = [ + "temporalio[langsmith,opentelemetry,pydantic]", +] + +# After +dependencies = [ + "temporalio[opentelemetry,pydantic]", +] +``` + +Remove the brackets if no extras remain. Then install the standalone package directly: + +```bash +uv add temporalio-langsmith +``` + +Change application imports to the standalone package: + +```python +from temporalio.langsmith import LangSmithPlugin +``` + +The new import path selects the standalone implementation instead of the +SDK-bundled `temporalio.contrib.langsmith` implementation. diff --git a/temporalio/contrib/langsmith/__init__.py b/temporalio/contrib/langsmith/__init__.py new file mode 100644 index 0000000000..96da40fd3b --- /dev/null +++ b/temporalio/contrib/langsmith/__init__.py @@ -0,0 +1,10 @@ +"""Compatibility imports for the standalone LangSmith integration. + +Install ``temporalio-langsmith`` and import ``temporalio.langsmith`` +directly in new code. +""" + +from temporalio.langsmith import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.langsmith import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, +) diff --git a/temporalio/contrib/openai_agents/README.md b/temporalio/contrib/openai_agents/README.md index ea9482c330..8cd45c5e5b 100644 --- a/temporalio/contrib/openai_agents/README.md +++ b/temporalio/contrib/openai_agents/README.md @@ -1,556 +1,39 @@ -# OpenAI Agents SDK Integration for Temporal +# OpenAI Agents SDK integration -⚠️ **Public Preview** - The interface to this module is subject to change prior to General Availability. -We welcome questions and feedback in the [#python-sdk](https://temporalio.slack.com/archives/CTT84RS0P) Slack channel at [temporalio.slack.com](https://temporalio.slack.com/). +The OpenAI Agents integration has moved to the independently versioned +[`temporalio-openai-agents`](https://pypi.org/project/temporalio-openai-agents/) +package. Its canonical Python API is `temporalio.openai_agents`. -## Introduction +The complete integration guide now lives in the +[`temporalio-openai-agents` README](https://github.com/temporalio/ai-integrations/tree/main/python/openai_agents#readme). -This integration combines [OpenAI Agents SDK](https://github.com/openai/openai-agents-python) with [Temporal's durable execution](https://docs.temporal.io/evaluate/understanding-temporal#durable-execution). -It allows you to build durable agents that never lose their progress and handle long-running, asynchronous, and human-in-the-loop workflows with production-grade reliability. +## Migrating to the standalone package -Temporal and OpenAI Agents SDK are complementary technologies, both of which contribute to simplifying what it takes to build highly capable, high-quality AI systems. -Temporal provides a crash-proof system foundation, taking care of the distributed systems challenges inherent to production agentic systems. -OpenAI Agents SDK offers a lightweight yet powerful framework for defining those agents. +Remove the `openai-agents` extra from the existing Temporal dependency: -This document is organized as follows: +```toml +# Before +dependencies = [ + "temporalio[openai-agents,otel,pydantic]", +] -- **[Hello World Durable Agent](#hello-world-durable-agent).** Your first durable agent example. -- **[Background Concepts](#core-concepts).** Background on durable execution and AI agents. -- **[Full Example](#full-example)** Running the Hello World Durable Agent example. -- **[Tool Calling](#tool-calling).** Calling agent Tools in Temporal. -- **[Feature Support](#feature-support).** Compatibility matrix. - -The [samples repository](https://github.com/temporalio/samples-python/tree/main/openai_agents) contains examples including basic usage, common agent patterns, and more complete samples. - -## Hello World Durable Agent - -The code below shows how to wrap an agent for durable execution. - -### File 1: Durable Agent (`hello_world.py`) - -```python -from temporalio import workflow -from agents import Agent, Runner - -@workflow.defn -class HelloWorldAgent: - @workflow.run - async def run(self, prompt: str) -> str: - agent = Agent( - name="Assistant", - instructions="You only respond in haikus.", - ) - - result = await Runner.run(agent, input=prompt) - return result.final_output +# After +dependencies = [ + "temporalio[otel,pydantic]", +] ``` -In this example, Temporal provides the durable execution wrapper: the `HelloWorldAgent.run` method. -The content of that method, is regular OpenAI Agents SDK code. - -If you are familiar with Temporal and with Open AI Agents SDK, this code will look very familiar. -The `@workflow.defn` annotation on the `HelloWorldAgent` indicates that this class will contain durable execution logic. The `@workflow.run` annotation defines the entry point. -We use the `Agent` class from OpenAI Agents SDK to define a simple agent, instructing it to always respond with haikus. -We then run that agent, using the `Runner` class from OpenAI Agents SDK, passing through `prompt` as an argument. - -We will [complete this example below](#full-example). -Before digging further into the code, we will review some background that will make it easier to understand. - -## Background Concepts - -We encourage you to review this section thoroughly to gain a solid understanding of AI agents and durable execution with Temporal. -This knowledge will make it easier to design and build durable agents. -If you are already well versed in these topics, feel free to skim this section or skip ahead. - -### AI Agents - -In the OpenAI Agents SDK, an agent is an AI model configured with instructions, tools, MCP servers, guardrails, handoffs, context, and more. - -We describe each of these briefly: - -- _AI model_. An LLM such as OpenAI's GPT, Google's Gemini, or one of many others. -- _Instructions_. Also known as a system prompt, the instructions contain the initial input to the model, which configures it for the job it will do. -- _Tools_. Typically, Python functions that the model may choose to invoke. Tools are functions with text-descriptions that explain their functionality to the model. -- _MCP servers_. Best known for providing tools, MCP offers a pluggable standard for interoperability, including file-like resources, prompt templates, and human approvals. MCP servers may be accessed over the network or run in a local process. -- _Guardrails_. Checks on the input or the output of an agent to ensure compliance or safety. Guardrails may be implemented as regular code or as AI agents. -- _Handoffs_. A handoff occurs when an agent delegates a task to another agent. During a handoff the conversation history remains the same, and passes to a new agent with its own model, instructions, tools. -- _Context_. This is an overloaded term. Here, context refers to a framework object that is shared across tools and other code, but is not passed to the model. - -Now, let's see how these components work together. -In a common pattern, the model first receives user input and then reasons about which tool to invoke. -The tool's response is passed back to the model, which may call additional tools, repeating this loop until the task is complete. - -The diagram below illustrates this flow. +Remove the brackets if no extras remain. Then install the standalone package directly: -```text - +-------------------+ - | User Input | - +-------------------+ - | - v - +---------------------+ - | Reasoning (Model) | <--+ - +---------------------+ | - | | - (decides which action) | - v | - +---------------------+ | - | Action | | - | (e.g., use a Tool) | | - +---------------------+ | - | | - v | - +---------------------+ | - | Observation | | - | (Tool Output) | | - +---------------------+ | - | | - +----------------+ - (loop: uses new info to reason - again, until task is complete) +```bash +uv add temporalio-openai-agents ``` -Even in a simple example like this, there are many places where things can go wrong. -Tools call APIs that sometimes fail, while models can encounter rate limits, requiring retries. -The longer the agent runs, the more costly it is to start the job over. -We next describe durable execution, which handles such failures seamlessly. - -### Durable Execution - -In Temporal's durable execution implementation, a program that crashes or encounters an exception while interacting with a model or API will retry until it can successfully complete. - -Temporal relies primarily on a replay mechanism to recover from failures. -As the program makes progress, Temporal saves key inputs and decisions, allowing a re-started program to pick up right where it left off. - -The key to making this work is to separate the applications repeatable (deterministic) and non-repeatable (non-deterministic) parts: - -1. Deterministic pieces, termed _workflows_, execute the same way when re-run with the same inputs. -2. Non-deterministic pieces, termed _activities_, can run arbitrary code, performing I/O and any other operations. - -Workflow code can run for extended periods and, if interrupted, resume exactly where it left off. -Activity code faces no restrictions on I/O or external interactions, but if it fails part-way through it restarts from the beginning. - -In the AI-agent example above, model invocations and tool calls run inside activities, while the logic that coordinates them lives in the workflow. -This pattern generalizes to more sophisticated agents. -We refer to that coordinating logic as _agent orchestration_. - -As a general rule, agent orchestration code executes within the Temporal workflow, whereas model calls and any I/O-bound tool invocations execute as Temporal activities. - -The diagram below shows the overall architecture of an agentic application in Temporal. -The Temporal Server is responsible to tracking program execution and making sure associated state is preserved reliably (i.e., stored to a database, possibly replicated across cloud regions). -Temporal Server manages data in encrypted form, so all data processing occurs on the Worker, which runs the workflow and activities. - -```text - +---------------------+ - | Temporal Server | (Stores workflow state, - +---------------------+ schedules activities, - ^ persists progress) - | - Save state, | Schedule Tasks, - progress, | load state on resume - timeouts | - | -+------------------------------------------------------+ -| Worker | -| +----------------------------------------------+ | -| | Workflow Code | | -| | (Agent Orchestration Loop) | | -| +----------------------------------------------+ | -| | | | | -| v v v | -| +-----------+ +-----------+ +-------------+ | -| | Activity | | Activity | | Activity | | -| | (Tool 1) | | (Tool 2) | | (Model API) | | -| +-----------+ +-----------+ +-------------+ | -| | | | | -+------------------------------------------------------+ - | | | - v v v - [External APIs, services, databases, etc.] -``` - -See the [Temporal documentation](https://docs.temporal.io/evaluate/understanding-temporal#temporal-application-the-building-blocks) for more information. - -## Complete Example - -To make the [Hello World durable agent](#hello-world-durable-agent) shown earlier available in Temporal, we need to create a worker program. -To see it run, we also need a client to launch it. -We show these files below. - -### File 2: Launch Worker (`run_worker.py`) +Change application imports to the standalone package: ```python -# File: run_worker.py - -import asyncio -from datetime import timedelta - -from temporalio.client import Client -from temporalio.contrib.openai_agents import OpenAIAgentsPlugin, ModelActivityParameters -from temporalio.worker import Worker - -from hello_world_workflow import HelloWorldAgent - - -async def worker_main(): - # Use the plugin to configure Temporal for use with OpenAI Agents SDK - client = await Client.connect( - "localhost:7233", - plugins=[ - OpenAIAgentsPlugin( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30) - ) - ), - ], - ) - - worker = Worker( - client, - task_queue="my-task-queue", - workflows=[HelloWorldAgent], - ) - await worker.run() - - -if __name__ == "__main__": - asyncio.run(worker_main()) -``` - -We use the `OpenAIAgentsPlugin` to configure Temporal for use with OpenAI Agents SDK. -The plugin automatically handles several important setup tasks: - -- Ensures proper serialization of Pydantic types -- Propagates context for [OpenAI Agents tracing](https://openai.github.io/openai-agents-python/tracing/). -- Registers an activity for invoking model calls with the Temporal worker. -- Configures OpenAI Agents SDK to run model calls as Temporal activities. - -### File 3: Client Execution (`run_hello_world_workflow.py`) - -```python -# File: run_hello_world_workflow.py - -import asyncio - -from temporalio.client import Client -from temporalio.common import WorkflowIDReusePolicy -from temporalio.contrib.openai_agents import OpenAIAgentsPlugin - -from hello_world_workflow import HelloWorldAgent - -async def main(): - # Create client connected to server at the given address - client = await Client.connect( - "localhost:7233", - plugins=[OpenAIAgentsPlugin()], - ) - - # Execute a workflow - result = await client.execute_workflow( - HelloWorldAgent.run, - "Tell me about recursion in programming.", - id="my-workflow-id", - task_queue="my-task-queue", - id_reuse_policy=WorkflowIDReusePolicy.ALLOW_DUPLICATE, - id_conflict_policy=WorkflowIDConflictPolicy.TERMINATE_EXISTING, - ) - print(f"Result: {result}") - -if __name__ == "__main__": - asyncio.run(main()) +from temporalio.openai_agents import OpenAIAgentsPlugin ``` -This file is a standard Temporal launch script. -We also configure the client with the `OpenAIAgentsPlugin` to ensure serialization is compatible with the worker. - -To run this example, see the detailed instructions in the [Temporal Python Samples Repository](https://github.com/temporalio/samples-python/tree/main/openai_agents). - -## Tool Calling - -### Temporal Activities as OpenAI Agents Tools - -One of the powerful features of this integration is the ability to convert Temporal activities into agent tools using `activity_as_tool`. -This allows your agent to leverage Temporal's durable execution for tool calls. - -In the example below, we apply the `@activity.defn` decorator to the `get_weather` function to create a Temporal activity. -We then pass this through the `activity_as_tool` helper function to create an OpenAI Agents tool that is passed to the `Agent`. - -```python -from dataclasses import dataclass -from datetime import timedelta -from temporalio import activity, workflow -from temporalio.contrib import openai_agents -from agents import Agent, Runner - -@dataclass -class Weather: - city: str - temperature_range: str - conditions: str - -@activity.defn -async def get_weather(city: str) -> Weather: - """Get the weather for a given city.""" - return Weather(city=city, temperature_range="14-20C", conditions="Sunny with wind.") - -@workflow.defn -class WeatherAgent: - @workflow.run - async def run(self, question: str) -> str: - agent = Agent( - name="Weather Assistant", - instructions="You are a helpful weather agent.", - tools=[ - openai_agents.workflow.activity_as_tool( - get_weather, - start_to_close_timeout=timedelta(seconds=10) - ) - ], - ) - result = await Runner.run(starting_agent=agent, input=question) - return result.final_output -``` - -### Calling OpenAI Agents Tools inside Temporal Workflows - -For simple computations that don't involve external calls you can call the tool directly from the workflow by using the standard OpenAI Agents SDK `@functiontool` annotation. - -```python -from temporalio import workflow -from agents import Agent, Runner -from agents import function_tool - -@function_tool -def calculate_circle_area(radius: float) -> float: - """Calculate the area of a circle given its radius.""" - import math - return math.pi * radius ** 2 - -@workflow.defn -class MathAssistantAgent: - @workflow.run - async def run(self, message: str) -> str: - agent = Agent( - name="Math Assistant", - instructions="You are a helpful math assistant. Use the available tools to help with calculations.", - tools=[calculate_circle_area], - ) - result = await Runner.run(agent, input=message) - return result.final_output -``` - -Note that any tools that run in the workflow must respect the workflow execution restrictions, meaning no I/O or non-deterministic operations. -Of course, code running in the workflow can invoke a Temporal activity at any time. - -Tools that run in the workflow can also update OpenAI Agents context, which is read-only for tools run as Temporal activities. - -## MCP Support - -This integration provides support for Model Context Protocol (MCP) servers through two wrapper approaches designed to handle different implications of failures. - -While Temporal provides durable execution for your workflows, this durability does not extend to MCP servers, which operate independently of the workflow and must provide their own durability. The integration handles this by offering stateless and stateful wrappers that you can choose based on your MCP server's design. - -### Stateless vs Stateful MCP Servers - -You need to understand your MCP server's behavior to choose the correct wrapper: - -**Stateless MCP servers** treat each operation independently. For example, a weather server with a `get_weather(location)` tool is stateless because each call is self-contained and includes all necessary information. These servers can be safely restarted or reconnected to without changing their behavior. - -**Stateful MCP servers** maintain session state between calls. For example, a weather server that requires calling `set_location(location)` followed by `get_weather()` is stateful because it remembers the configured location and uses it for subsequent calls. If the session or the server is restarted, state crucial for operation is lost. Temporal identifies such failures and raises an `ApplicationError` to signal the need for application-level failure handling. - -### Usage Example (Stateless MCP) - -The code below gives an example of using a stateless MCP server. - -#### Worker Configuration - -```python -import asyncio -from datetime import timedelta -from agents.mcp import MCPServerStdio -from temporalio.client import Client -from temporalio.contrib.openai_agents import ( - ModelActivityParameters, - OpenAIAgentsPlugin, - StatelessMCPServerProvider, -) -from temporalio.worker import Worker - - -async def main(): - # Create the MCP server provider - filesystem_server = StatelessMCPServerProvider( - lambda: MCPServerStdio( - name="FileSystemServer", - params={ - "command": "npx", - "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/files"], - }, - ) - ) - - # Register the MCP server with the OpenAI Agents plugin - client = await Client.connect( - "localhost:7233", - plugins=[ - OpenAIAgentsPlugin( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=60) - ), - mcp_server_providers=[filesystem_server], - ), - ], - ) - - worker = Worker( - client, - task_queue="my-task-queue", - workflows=[FileSystemWorkflow], - ) - await worker.run() - - -if __name__ == "__main__": - asyncio.run(main()) -``` - -#### Workflow Implementation - -```python -from temporalio import workflow -from temporalio.contrib import openai_agents -from agents import Agent, Runner - -@workflow.defn -class FileSystemWorkflow: - @workflow.run - async def run(self, query: str) -> str: - # Reference the MCP server by name (matches name in worker configuration) - server = openai_agents.workflow.stateless_mcp_server("FileSystemServer") - - agent = Agent( - name="File Assistant", - instructions="Use the filesystem tools to read files and answer questions.", - mcp_servers=[server], - ) - - result = await Runner.run(agent, input=query) - return result.final_output -``` - -The `StatelessMCPServerProvider` takes a factory function that creates new MCP server instances. The server name used in `stateless_mcp_server()` must match the name configured in the MCP server instance. In this example, the name is `FileSystemServer`. - -### Stateful MCP Servers - -For implementation details and examples, see the [samples repository](https://github.com/temporalio/samples-python/tree/main/openai_agents/mcp). - -When using stateful servers, the dedicated worker maintaining the connection may fail due to network issues or server problems. When this happens, Temporal raises an `ApplicationError` and cannot automatically recover because it cannot restore the lost server state. -To recover from such failures, you need to implement your own application-level retry logic. - -### Hosted MCP Tool - -For network-accessible MCP servers, you can also use `HostedMCPTool` from the OpenAI Agents SDK, which uses an MCP client hosted by OpenAI. - -## Feature Support - -This integration is presently subject to certain limitations. -Streaming and voice agents are not supported. -Certain tools are not suitable for a distributed computing environment, so these have been disabled as well. - -### Model Providers - -| Model Provider | Supported | -| :------------- | :-------: | -| OpenAI | Yes | -| LiteLLM | Yes | - -### Model Response format - -This integration does not presently support streaming. - -| Model Response | Supported | -| :------------- | :-------: | -| Get Response | Yes | -| Streaming | No | - -### Tools - -#### Tool Type - -`LocalShellTool` and `ComputerTool` are not suited to a distributed computing setting. - -| Tool Type | Supported | -| :------------------ | :-------: | -| FunctionTool | Yes | -| LocalShellTool | No | -| WebSearchTool | Yes | -| FileSearchTool | Yes | -| HostedMCPTool | Yes | -| ImageGenerationTool | Yes | -| CodeInterpreterTool | Yes | -| ComputerTool | No | - -#### Tool Context - -As described in [Tool Calling](#tool-calling), context propagation is read-only when Temporal activities are used as tools. - -| Context Propagation | Supported | -| :------------------------------------- | :-------: | -| Activity Tool receives copy of context | Yes | -| Activity Tool can update context | No | -| Function Tool received context | Yes | -| Function Tool can update context | Yes | - -### MCP - -The MCP protocol is stateful, but many MCP servers are stateless. -We let you choose between two MCP wrappers, one designed for stateless MCP servers and one for stateful MCP servers. -These wrappers work with all transport varieties. - -Note that when using network-accessible MCP servers, you also can also use the tool `HostedMCPTool`, which is part of the OpenAI Responses API and uses an MCP client hosted by OpenAI. - -| MCP Class | Supported | -| :---------------------- | :-------: | -| MCPServerStdio | Yes | -| MCPServerSse | Yes | -| MCPServerStreamableHttp | Yes | - -### Guardrails - -| Guardrail Type | Supported | -| :------------- | :-------: | -| Code | Yes | -| Agent | Yes | - -### Sessions - -SQLite storage is not suited to a distributed environment. - -| Feature | Supported | -| :------------ | :-------: | -| SQLiteSession | No | - -### Tracing - -| Tracing Provider | Supported | -| :--------------- | :-------: | -| OpenAI platform | Yes | - -### Voice - -| Mode | Supported | -| :----------------------- | :-------: | -| Voice agents (pipelines) | No | -| Realtime agents | No | - -### Utilities - -The REPL utility is not suitable for a distributed setting. - -| Utility | Supported | -| :------ | :-------: | -| REPL | No | - -## Additional Examples - -You can find additional examples in the [Temporal Python Samples Repository](https://github.com/temporalio/samples-python/tree/main/openai_agents). +The new import path selects the standalone implementation instead of the +SDK-bundled `temporalio.contrib.openai_agents` implementation. diff --git a/temporalio/contrib/openai_agents/__init__.py b/temporalio/contrib/openai_agents/__init__.py index d49733e8b4..6f6cfdb664 100644 --- a/temporalio/contrib/openai_agents/__init__.py +++ b/temporalio/contrib/openai_agents/__init__.py @@ -1,36 +1,12 @@ -"""Support for using the OpenAI Agents SDK as part of Temporal workflows. +"""Compatibility imports for the standalone OpenAI Agents integration. -This module provides compatibility between the -`OpenAI Agents SDK `_ and Temporal workflows. +Install ``temporalio-openai-agents`` and import ``temporalio.openai_agents`` +directly in new code. -.. warning:: - This module is experimental and may change in future versions. - Use with caution in production environments. +Legacy ``testing`` and ``workflow`` modules forward the standalone public API. """ -from temporalio.contrib.openai_agents._mcp import ( - StatefulMCPServerProvider, - StatelessMCPServerProvider, +from temporalio.openai_agents import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.openai_agents import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, ) -from temporalio.contrib.openai_agents._model_parameters import ModelActivityParameters -from temporalio.contrib.openai_agents._temporal_openai_agents import ( - OpenAIAgentsPlugin, - OpenAIPayloadConverter, -) -from temporalio.contrib.openai_agents._trace_interceptor import ( - OpenAIAgentsTracingInterceptor, -) -from temporalio.contrib.openai_agents.workflow import AgentsWorkflowError - -from . import testing, workflow - -__all__ = [ - "AgentsWorkflowError", - "ModelActivityParameters", - "OpenAIAgentsPlugin", - "OpenAIPayloadConverter", - "StatelessMCPServerProvider", - "StatefulMCPServerProvider", - "testing", - "workflow", -] diff --git a/temporalio/contrib/openai_agents/_heartbeat_decorator.py b/temporalio/contrib/openai_agents/_heartbeat_decorator.py deleted file mode 100644 index 2fae11d7d4..0000000000 --- a/temporalio/contrib/openai_agents/_heartbeat_decorator.py +++ /dev/null @@ -1,40 +0,0 @@ -import asyncio -from collections.abc import Awaitable, Callable -from functools import wraps -from typing import Any, TypeVar, cast - -from temporalio import activity - -F = TypeVar("F", bound=Callable[..., Awaitable[Any]]) - - -def _auto_heartbeater(fn: F) -> F: - # Propagate type hints from the original callable. - @wraps(fn) - async def wrapper(*args: Any, **kwargs: Any) -> Any: - heartbeat_timeout = activity.info().heartbeat_timeout - heartbeat_task = None - if heartbeat_timeout: - # Heartbeat twice as often as the timeout - heartbeat_task = asyncio.create_task( - heartbeat_every(heartbeat_timeout.total_seconds() / 2) - ) - try: - return await fn(*args, **kwargs) - finally: - if heartbeat_task: - heartbeat_task.cancel() - # Wait for heartbeat cancellation to complete - try: - await heartbeat_task - except asyncio.CancelledError: - pass - - return cast(F, wrapper) - - -async def heartbeat_every(delay: float, *details: Any) -> None: - """Heartbeat every so often while not cancelled""" - while True: - await asyncio.sleep(delay) - activity.heartbeat(*details) diff --git a/temporalio/contrib/openai_agents/_invoke_model_activity.py b/temporalio/contrib/openai_agents/_invoke_model_activity.py deleted file mode 100644 index f03458c326..0000000000 --- a/temporalio/contrib/openai_agents/_invoke_model_activity.py +++ /dev/null @@ -1,265 +0,0 @@ -"""A temporal activity that invokes a LLM model. - -Implements mapping of OpenAI datastructures to Pydantic friendly types. -""" - -import enum -import json -from dataclasses import dataclass -from datetime import timedelta -from typing import Any, Optional, Union - -from agents import ( - AgentOutputSchemaBase, - CodeInterpreterTool, - FileSearchTool, - FunctionTool, - Handoff, - HostedMCPTool, - ImageGenerationTool, - ModelProvider, - ModelResponse, - ModelSettings, - ModelTracing, - OpenAIProvider, - RunContextWrapper, - Tool, - TResponseInputItem, - UserError, - WebSearchTool, -) -from openai import ( - APIStatusError, - AsyncOpenAI, -) -from openai.types.responses.tool_param import Mcp -from pydantic_core import to_json -from typing_extensions import Required, TypedDict - -from temporalio import activity, workflow -from temporalio.contrib.openai_agents._heartbeat_decorator import _auto_heartbeater -from temporalio.exceptions import ApplicationError - - -@dataclass -class HandoffInput: - """Data conversion friendly representation of a Handoff. Contains only the fields which are needed by the model - execution to determine what to handoff to, not the actual handoff invocation, which remains in the workflow context. - """ - - tool_name: str - tool_description: str - input_json_schema: dict[str, Any] - agent_name: str - strict_json_schema: bool = True - - -@dataclass -class FunctionToolInput: - """Data conversion friendly representation of a FunctionTool. Contains only the fields which are needed by the model - execution to determine what tool to call, not the actual tool invocation, which remains in the workflow context. - """ - - name: str - description: str - params_json_schema: dict[str, Any] - strict_json_schema: bool = True - - -@dataclass -class HostedMCPToolInput: - """Data conversion friendly representation of a HostedMCPTool. Contains only the fields which are needed by the model - execution to determine what tool to call, not the actual tool invocation, which remains in the workflow context. - """ - - tool_config: Mcp - - -ToolInput = Union[ - FunctionToolInput, - FileSearchTool, - WebSearchTool, - ImageGenerationTool, - CodeInterpreterTool, - HostedMCPToolInput, -] - - -@dataclass -class AgentOutputSchemaInput(AgentOutputSchemaBase): - """Data conversion friendly representation of AgentOutputSchema.""" - - output_type_name: str | None - is_wrapped: bool - output_schema: dict[str, Any] | None - strict_json_schema: bool - - def is_plain_text(self) -> bool: - """Whether the output type is plain text (versus a JSON object).""" - return self.output_type_name is None or self.output_type_name == "str" - - def is_strict_json_schema(self) -> bool: - """Whether the JSON schema is in strict mode.""" - return self.strict_json_schema - - def json_schema(self) -> dict[str, Any]: - """The JSON schema of the output type.""" - if self.is_plain_text(): - raise UserError("Output type is plain text, so no JSON schema is available") - if self.output_schema is None: - raise UserError("Output schema is not defined") - return self.output_schema - - def validate_json(self, json_str: str) -> Any: - """Validate the JSON string against the schema.""" - raise NotImplementedError() - - def name(self) -> str: - """Get the name of the output type.""" - if self.output_type_name is None: - raise ValueError("output_type_name is None") - return self.output_type_name - - -class ModelTracingInput(enum.IntEnum): - """Conversion friendly representation of ModelTracing. - - Needed as ModelTracing is enum.Enum instead of IntEnum - """ - - DISABLED = 0 - ENABLED = 1 - ENABLED_WITHOUT_DATA = 2 - - -class ActivityModelInput(TypedDict, total=False): - """Input for the invoke_model_activity activity.""" - - model_name: str | None - system_instructions: str | None - input: Required[str | list[TResponseInputItem]] - model_settings: Required[ModelSettings] - tools: list[ToolInput] - output_schema: AgentOutputSchemaInput | None - handoffs: list[HandoffInput] - tracing: Required[ModelTracingInput] - previous_response_id: str | None - conversation_id: str | None - prompt: Any | None - - -class ModelActivity: - """Class wrapper for model invocation activities to allow model customization. By default, we use an OpenAIProvider with retries disabled. - Disabling retries in your model of choice is recommended to allow activity retries to define the retry model. - """ - - def __init__(self, model_provider: ModelProvider | None = None): - """Initialize the activity with a model provider.""" - self._model_provider = model_provider or OpenAIProvider( - openai_client=AsyncOpenAI(max_retries=0) - ) - - @activity.defn - @_auto_heartbeater - async def invoke_model_activity(self, input: ActivityModelInput) -> ModelResponse: - """Activity that invokes a model with the given input.""" - model = self._model_provider.get_model(input.get("model_name")) - - async def empty_on_invoke_tool(ctx: RunContextWrapper[Any], input: str) -> str: - return "" - - async def empty_on_invoke_handoff( - ctx: RunContextWrapper[Any], input: str - ) -> Any: - return None - - def make_tool(tool: ToolInput) -> Tool: - if isinstance( - tool, - ( - FileSearchTool, - WebSearchTool, - ImageGenerationTool, - CodeInterpreterTool, - ), - ): - return tool - elif isinstance(tool, HostedMCPToolInput): - return HostedMCPTool( - tool_config=tool.tool_config, - ) - elif isinstance(tool, FunctionToolInput): - return FunctionTool( - name=tool.name, - description=tool.description, - params_json_schema=tool.params_json_schema, - on_invoke_tool=empty_on_invoke_tool, - strict_json_schema=tool.strict_json_schema, - ) - else: - raise UserError(f"Unknown tool type: {tool.name}") - - tools = [make_tool(x) for x in input.get("tools", [])] - handoffs: list[Handoff[Any, Any]] = [ - Handoff( - tool_name=x.tool_name, - tool_description=x.tool_description, - input_json_schema=x.input_json_schema, - agent_name=x.agent_name, - strict_json_schema=x.strict_json_schema, - on_invoke_handoff=empty_on_invoke_handoff, - ) - for x in input.get("handoffs", []) - ] - - try: - return await model.get_response( - system_instructions=input.get("system_instructions"), - input=input["input"], - model_settings=input["model_settings"], - tools=tools, - output_schema=input.get("output_schema"), - handoffs=handoffs, - tracing=ModelTracing(input["tracing"]), - previous_response_id=input.get("previous_response_id"), - conversation_id=input.get("conversation_id"), - prompt=input.get("prompt"), - ) - except APIStatusError as e: - # Listen to server hints - retry_after = None - retry_after_ms_header = e.response.headers.get("retry-after-ms") - if retry_after_ms_header is not None: - retry_after = timedelta(milliseconds=float(retry_after_ms_header)) - - if retry_after is None: - retry_after_header = e.response.headers.get("retry-after") - if retry_after_header is not None: - retry_after = timedelta(seconds=float(retry_after_header)) - - should_retry_header = e.response.headers.get("x-should-retry") - if should_retry_header == "true": - raise e - if should_retry_header == "false": - raise ApplicationError( - "Non retryable OpenAI error", - non_retryable=True, - next_retry_delay=retry_after, - ) from e - - # Specifically retryable status codes - if ( - e.response.status_code in [408, 409, 429] - or e.response.status_code >= 500 - ): - raise ApplicationError( - f"Retryable OpenAI status code: {e.response.status_code}", - non_retryable=False, - next_retry_delay=retry_after, - ) from e - - raise ApplicationError( - f"Non retryable OpenAI status code: {e.response.status_code}", - non_retryable=True, - next_retry_delay=retry_after, - ) from e diff --git a/temporalio/contrib/openai_agents/_mcp.py b/temporalio/contrib/openai_agents/_mcp.py deleted file mode 100644 index 76d558b829..0000000000 --- a/temporalio/contrib/openai_agents/_mcp.py +++ /dev/null @@ -1,526 +0,0 @@ -import abc -import asyncio -import dataclasses -import functools -import inspect -import logging -from collections.abc import Callable, Sequence -from contextlib import AbstractAsyncContextManager -from datetime import timedelta -from typing import Any, Optional, Union, cast - -from agents import AgentBase, RunContextWrapper -from agents.mcp import MCPServer -from mcp import GetPromptResult, ListPromptsResult # type:ignore -from mcp import Tool as MCPTool # type:ignore -from mcp.types import CallToolResult # type:ignore - -from temporalio import activity, workflow -from temporalio.api.enums.v1.workflow_pb2 import ( - TIMEOUT_TYPE_HEARTBEAT, - TIMEOUT_TYPE_SCHEDULE_TO_START, -) -from temporalio.exceptions import ( - ActivityError, - ApplicationError, - CancelledError, - is_cancelled_exception, -) -from temporalio.worker import PollerBehaviorSimpleMaximum, Worker -from temporalio.workflow import ActivityConfig, ActivityHandle - -logger = logging.getLogger(__name__) - - -@dataclasses.dataclass -class _StatelessListToolsArguments: - factory_argument: Any | None - - -@dataclasses.dataclass -class _StatelessCallToolsArguments: - tool_name: str - arguments: dict[str, Any] | None - factory_argument: Any | None - - -@dataclasses.dataclass -class _StatelessListPromptsArguments: - factory_argument: Any | None - - -@dataclasses.dataclass -class _StatelessGetPromptArguments: - name: str - arguments: dict[str, Any] | None - factory_argument: Any | None - - -class _StatelessMCPServerReference(MCPServer): - def __init__( - self, - server: str, - config: ActivityConfig | None, - cache_tools_list: bool, - factory_argument: Any | None = None, - ): - self._name = server + "-stateless" - self._config = config or ActivityConfig( - start_to_close_timeout=timedelta(minutes=1) - ) - self._cache_tools_list = cache_tools_list - self._tools = None - self._factory_argument = factory_argument - super().__init__() - - @property - def name(self) -> str: - return self._name - - async def connect(self) -> None: - pass - - async def cleanup(self) -> None: - pass - - async def list_tools( - self, - run_context: RunContextWrapper[Any] | None = None, - agent: AgentBase | None = None, - ) -> list[MCPTool]: - if self._tools: - return self._tools - tools = await workflow.execute_activity( - self.name + "-list-tools", - _StatelessListToolsArguments(self._factory_argument), - result_type=list[MCPTool], - **self._config, - ) - if self._cache_tools_list: - self._tools = tools - return tools - - async def call_tool( - self, tool_name: str, arguments: dict[str, Any] | None - ) -> CallToolResult: - return await workflow.execute_activity( - self.name + "-call-tool-v2", - _StatelessCallToolsArguments(tool_name, arguments, self._factory_argument), - result_type=CallToolResult, - **self._config, - ) - - async def list_prompts(self) -> ListPromptsResult: - return await workflow.execute_activity( - self.name + "-list-prompts", - _StatelessListPromptsArguments(self._factory_argument), - result_type=ListPromptsResult, - **self._config, - ) - - async def get_prompt( - self, name: str, arguments: dict[str, Any] | None = None - ) -> GetPromptResult: - return await workflow.execute_activity( - self.name + "-get-prompt-v2", - _StatelessGetPromptArguments(name, arguments, self._factory_argument), - result_type=GetPromptResult, - **self._config, - ) - - -class StatelessMCPServerProvider: - """A stateless MCP server implementation for Temporal workflows. - - This class wraps a function to create MCP servers to make them stateless by executing each MCP operation - as a separate Temporal activity. Each operation (list_tools, call_tool, etc.) will - connect to the underlying server, execute the operation, and then clean up the connection. - - This approach will not maintain state across calls. If the desired MCPServer needs persistent state in order to - function, this cannot be used. - """ - - def __init__( - self, - name: str, - server_factory: (Callable[[], MCPServer] | Callable[[Any | None], MCPServer]), - ): - """Initialize the stateless temporal MCP server. - - Args: - name: The name of the MCP server. - server_factory: A function which will produce MCPServer instances. It should return a new server each time - so that state is not shared between workflow runs. - """ - self._server_factory = server_factory - - # Cache whether the server factory needs to be provided with arguments - sig = inspect.signature(self._server_factory) - self._server_accepts_arguments = len(sig.parameters) != 0 - - self._name = name + "-stateless" - super().__init__() - - def _create_server(self, factory_argument: Any | None) -> MCPServer: - if self._server_accepts_arguments: - return cast(Callable[[Optional[Any]], MCPServer], self._server_factory)( - factory_argument - ) - else: - return cast(Callable[[], MCPServer], self._server_factory)() - - @property - def name(self) -> str: - """Get the server name.""" - return self._name - - def _get_activities(self) -> Sequence[Callable]: - @activity.defn(name=self.name + "-list-tools") - async def list_tools( - args: _StatelessListToolsArguments | None = None, - ) -> list[MCPTool]: - server = self._create_server(args.factory_argument if args else None) - try: - await server.connect() - return await server.list_tools() - finally: - await server.cleanup() - - @activity.defn(name=self.name + "-call-tool-v2") - async def call_tool(args: _StatelessCallToolsArguments) -> CallToolResult: - server = self._create_server(args.factory_argument) - try: - await server.connect() - return await server.call_tool(args.tool_name, args.arguments) - finally: - await server.cleanup() - - @activity.defn(name=self.name + "-list-prompts") - async def list_prompts( - args: _StatelessListPromptsArguments | None = None, - ) -> ListPromptsResult: - server = self._create_server(args.factory_argument if args else None) - try: - await server.connect() - return await server.list_prompts() - finally: - await server.cleanup() - - @activity.defn(name=self.name + "-get-prompt-v2") - async def get_prompt(args: _StatelessGetPromptArguments) -> GetPromptResult: - server = self._create_server(args.factory_argument) - try: - await server.connect() - return await server.get_prompt(args.name, args.arguments) - finally: - await server.cleanup() - - @activity.defn(name=self.name + "-call-tool") - async def call_tool_deprecated( - tool_name: str, - arguments: dict[str, Any] | None, - ) -> CallToolResult: - return await call_tool( - _StatelessCallToolsArguments(tool_name, arguments, None) - ) - - @activity.defn(name=self.name + "-get-prompt") - async def get_prompt_deprecated( - name: str, - arguments: dict[str, Any] | None, - ) -> GetPromptResult: - return await get_prompt(_StatelessGetPromptArguments(name, arguments, None)) - - return ( - list_tools, - call_tool, - list_prompts, - get_prompt, - call_tool_deprecated, - get_prompt_deprecated, - ) - - -def _handle_worker_failure(func): - @functools.wraps(func) - async def wrapper(*args, **kwargs): - try: - return await func(*args, **kwargs) - except ActivityError as e: - failure = e.failure - if failure: - cause = failure.cause - if cause: - if ( - cause.timeout_failure_info.timeout_type - == TIMEOUT_TYPE_SCHEDULE_TO_START - ): - raise ApplicationError( - "MCP Stateful Server Worker failed to schedule activity.", - type="DedicatedWorkerFailure", - ) from e - if ( - cause.timeout_failure_info.timeout_type - == TIMEOUT_TYPE_HEARTBEAT - ): - raise ApplicationError( - "MCP Stateful Server Worker failed to heartbeat.", - type="DedicatedWorkerFailure", - ) from e - raise e - - return wrapper - - -@dataclasses.dataclass -class _StatefulCallToolsArguments: - tool_name: str - arguments: dict[str, Any] | None - - -@dataclasses.dataclass -class _StatefulGetPromptArguments: - name: str - arguments: dict[str, Any] | None - - -@dataclasses.dataclass -class _StatefulServerSessionArguments: - factory_argument: Any | None - - -class _StatefulMCPServerReference(MCPServer, AbstractAsyncContextManager): - def __init__( - self, - server: str, - config: ActivityConfig | None, - server_session_config: ActivityConfig | None, - factory_argument: Any | None, - ): - self._name = server + "-stateful" - self._config = config or ActivityConfig( - start_to_close_timeout=timedelta(minutes=1), - schedule_to_start_timeout=timedelta(seconds=30), - ) - self._server_session_config = server_session_config or ActivityConfig( - start_to_close_timeout=timedelta(hours=1), - ) - self._connect_handle: ActivityHandle | None = None - self._factory_argument = factory_argument - super().__init__() - - @property - def name(self) -> str: - return self._name - - async def connect(self) -> None: - self._config["task_queue"] = self.name + "@" + workflow.info().run_id - self._connect_handle = workflow.start_activity( - self.name + "-server-session", - _StatefulServerSessionArguments(self._factory_argument), - **self._server_session_config, - ) - - async def cleanup(self) -> None: - if self._connect_handle: - self._connect_handle.cancel() - try: - await self._connect_handle - except Exception as e: - if is_cancelled_exception(e): - pass - else: - raise - - async def __aenter__(self): - await self.connect() - return self - - async def __aexit__(self, exc_type, exc_value, traceback): - await self.cleanup() - - @_handle_worker_failure - async def list_tools( - self, - run_context: RunContextWrapper[Any] | None = None, - agent: AgentBase | None = None, - ) -> list[MCPTool]: - if not self._connect_handle: - raise ApplicationError( - "Stateful MCP Server not connected. Call connect first." - ) - return await workflow.execute_activity( - self.name + "-list-tools", - args=[], - result_type=list[MCPTool], - **self._config, - ) - - @_handle_worker_failure - async def call_tool( - self, tool_name: str, arguments: dict[str, Any] | None - ) -> CallToolResult: - if not self._connect_handle: - raise ApplicationError( - "Stateful MCP Server not connected. Call connect first." - ) - return await workflow.execute_activity( - self.name + "-call-tool-v2", - _StatefulCallToolsArguments(tool_name, arguments), - result_type=CallToolResult, - **self._config, - ) - - @_handle_worker_failure - async def list_prompts(self) -> ListPromptsResult: - if not self._connect_handle: - raise ApplicationError( - "Stateful MCP Server not connected. Call connect first." - ) - return await workflow.execute_activity( - self.name + "-list-prompts", - args=[], - result_type=ListPromptsResult, - **self._config, - ) - - @_handle_worker_failure - async def get_prompt( - self, name: str, arguments: dict[str, Any] | None = None - ) -> GetPromptResult: - if not self._connect_handle: - raise ApplicationError( - "Stateful MCP Server not connected. Call connect first." - ) - return await workflow.execute_activity( - self.name + "-get-prompt-v2", - _StatefulGetPromptArguments(name, arguments), - result_type=GetPromptResult, - **self._config, - ) - - -class StatefulMCPServerProvider: - """A stateful MCP server implementation for Temporal workflows. - - This class wraps an function to create MCP servers to maintain a persistent connection throughout - the workflow execution. It creates a dedicated worker that stays connected to - the MCP server and processes operations on a dedicated task queue. - - This approach will allow the MCPServer to maintain state across calls if needed, but the caller - will have to handle cases where the dedicated worker fails, as Temporal is unable to seamlessly - recreate any lost state in that case. It is discouraged to use this approach unless necessary. - - Handling dedicated worker failure will entail catching ApplicationError with type "DedicatedWorkerFailure". - Depending on the usage pattern, the caller will then have to either restart from the point at which the Stateful - server was needed or handle continuing from that loss of state in some other way. - """ - - def __init__( - self, - name: str, - server_factory: Callable[[Any | None], MCPServer], - ): - """Initialize the stateful temporal MCP server. - - Args: - name: The name of the MCP server. - server_factory: A function which will produce MCPServer instances. It should return a new server each time - so that state is not shared between workflow runs - """ - self._server_factory = server_factory - self._name = name + "-stateful" - self._connect_handle: ActivityHandle | None = None - self._servers: dict[str, MCPServer] = {} - super().__init__() - - @property - def name(self) -> str: - """Get the server name.""" - return self._name - - def _get_activities(self) -> Sequence[Callable]: - def _server_id(): - return self.name + "@" + activity.info().workflow_run_id - - @activity.defn(name=self.name + "-list-tools") - async def list_tools() -> list[MCPTool]: - return await self._servers[_server_id()].list_tools() - - @activity.defn(name=self.name + "-call-tool") - async def call_tool_deprecated( - tool_name: str, arguments: dict[str, Any] | None - ) -> CallToolResult: - return await self._servers[_server_id()].call_tool(tool_name, arguments) - - @activity.defn(name=self.name + "-call-tool-v2") - async def call_tool(args: _StatefulCallToolsArguments) -> CallToolResult: - return await self._servers[_server_id()].call_tool( - args.tool_name, args.arguments - ) - - @activity.defn(name=self.name + "-list-prompts") - async def list_prompts() -> ListPromptsResult: - return await self._servers[_server_id()].list_prompts() - - @activity.defn(name=self.name + "-get-prompt") - async def get_prompt_deprecated( - name: str, arguments: dict[str, Any] | None - ) -> GetPromptResult: - return await self._servers[_server_id()].get_prompt(name, arguments) - - @activity.defn(name=self.name + "-get-prompt-v2") - async def get_prompt(args: _StatefulGetPromptArguments) -> GetPromptResult: - return await self._servers[_server_id()].get_prompt( - args.name, args.arguments - ) - - async def heartbeat_every(delay: float, *details: Any) -> None: - """Heartbeat every so often while not cancelled""" - while True: - await asyncio.sleep(delay) - activity.heartbeat(*details) - - @activity.defn(name=self.name + "-server-session") - async def connect( - args: _StatefulServerSessionArguments | None = None, - ) -> None: - heartbeat_task = asyncio.create_task(heartbeat_every(30)) - - server_id = self.name + "@" + activity.info().workflow_run_id - if server_id in self._servers: - raise ApplicationError( - "Cannot connect to an already running server. Use a distinct name if running multiple servers in one workflow." - ) - server = self._server_factory(args.factory_argument if args else None) - try: - self._servers[server_id] = server - try: - await server.connect() - - worker = Worker( - activity.client(), - task_queue=server_id, - activities=[ - list_tools, - call_tool, - list_prompts, - get_prompt, - call_tool_deprecated, - get_prompt_deprecated, - ], - activity_task_poller_behavior=PollerBehaviorSimpleMaximum(1), - ) - - await worker.run() - finally: - await server.cleanup() - heartbeat_task.cancel() - try: - await heartbeat_task - except asyncio.CancelledError: - pass - finally: - del self._servers[server_id] - - return (connect,) diff --git a/temporalio/contrib/openai_agents/_model_parameters.py b/temporalio/contrib/openai_agents/_model_parameters.py deleted file mode 100644 index 3cab91c278..0000000000 --- a/temporalio/contrib/openai_agents/_model_parameters.py +++ /dev/null @@ -1,71 +0,0 @@ -"""Parameters for configuring Temporal activity execution for model calls.""" - -from abc import ABC, abstractmethod -from collections.abc import Callable -from dataclasses import dataclass -from datetime import timedelta -from typing import Any, Optional, Union - -from agents import Agent, TResponseInputItem - -from temporalio.common import Priority, RetryPolicy -from temporalio.workflow import ActivityCancellationType, VersioningIntent - - -class ModelSummaryProvider(ABC): - """Abstract base class for providing model summaries. Essentially just a callable, - but the arguments are sufficiently complex to benefit from names. - """ - - @abstractmethod - def provide( - self, - agent: Agent[Any] | None, - instructions: str | None, - input: str | list[TResponseInputItem], - ) -> str: - """Given the provided information, produce a summary for the model invocation activity.""" - pass - - -@dataclass -class ModelActivityParameters: - """Parameters for configuring Temporal activity execution for model calls. - - This class encapsulates all the parameters that can be used to configure - how Temporal activities are executed when making model calls through the - OpenAI Agents integration. - """ - - task_queue: str | None = None - """Specific task queue to use for model activities.""" - - schedule_to_close_timeout: timedelta | None = None - """Maximum time from scheduling to completion.""" - - schedule_to_start_timeout: timedelta | None = None - """Maximum time from scheduling to starting.""" - - start_to_close_timeout: timedelta | None = timedelta(seconds=60) - """Maximum time for the activity to complete.""" - - heartbeat_timeout: timedelta | None = None - """Maximum time between heartbeats.""" - - retry_policy: RetryPolicy | None = None - """Policy for retrying failed activities.""" - - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL - """How the activity handles cancellation.""" - - versioning_intent: VersioningIntent | None = None - """Versioning intent for the activity.""" - - summary_override: None | (str | ModelSummaryProvider) = None - """Summary for the activity execution.""" - - priority: Priority = Priority.default - """Priority for the activity execution.""" - - use_local_activity: bool = False - """Whether to use a local activity. If changed during a workflow execution, that would break determinism.""" diff --git a/temporalio/contrib/openai_agents/_openai_runner.py b/temporalio/contrib/openai_agents/_openai_runner.py deleted file mode 100644 index 7e7853fbd1..0000000000 --- a/temporalio/contrib/openai_agents/_openai_runner.py +++ /dev/null @@ -1,210 +0,0 @@ -import dataclasses -import typing -from typing import Any, Optional, Union - -from agents import ( - Agent, - AgentsException, - Handoff, - RunConfig, - RunContextWrapper, - RunResult, - RunResultStreaming, - SQLiteSession, - TContext, - Tool, - TResponseInputItem, -) -from agents.run import DEFAULT_AGENT_RUNNER, DEFAULT_MAX_TURNS, AgentRunner - -from temporalio import workflow -from temporalio.contrib.openai_agents._model_parameters import ModelActivityParameters -from temporalio.contrib.openai_agents._temporal_model_stub import _TemporalModelStub -from temporalio.contrib.openai_agents.workflow import AgentsWorkflowError - - -# Recursively replace models in all agents -def _convert_agent( - model_params: ModelActivityParameters, - agent: Agent[Any], - seen: dict[int, Agent] | None, -) -> Agent[Any]: - if seen is None: - seen = dict() - - # Short circuit if this model was already seen to prevent looping from circular handoffs - if id(agent) in seen: - return seen[id(agent)] - - # This agent has already been processed in some other run - if isinstance(agent.model, _TemporalModelStub): - return agent - - # Save the new version of the agent so that we can replace loops - new_agent = dataclasses.replace(agent) - seen[id(agent)] = new_agent - - name = _model_name(agent) - - new_handoffs: list[Agent | Handoff] = [] - for handoff in agent.handoffs: - if isinstance(handoff, Agent): - new_handoffs.append(_convert_agent(model_params, handoff, seen)) - elif isinstance(handoff, Handoff): - original_invoke = handoff.on_invoke_handoff - - async def on_invoke(context: RunContextWrapper[Any], args: str) -> Agent: - handoff_agent = await original_invoke(context, args) - return _convert_agent(model_params, handoff_agent, seen) - - new_handoffs.append( - dataclasses.replace(handoff, on_invoke_handoff=on_invoke) - ) - else: - raise TypeError(f"Unknown handoff type: {type(handoff)}") - - new_agent.model = _TemporalModelStub( - model_name=name, - model_params=model_params, - agent=agent, - ) - new_agent.handoffs = new_handoffs - return new_agent - - -class TemporalOpenAIRunner(AgentRunner): - """Temporal Runner for OpenAI agents. - - Forwards model calls to a Temporal activity. - - """ - - def __init__(self, model_params: ModelActivityParameters) -> None: - """Initialize the Temporal OpenAI Runner.""" - self._runner = DEFAULT_AGENT_RUNNER or AgentRunner() - self.model_params = model_params - - async def run( - self, - starting_agent: Agent[TContext], - input: str | list[TResponseInputItem], - **kwargs: Any, - ) -> RunResult: - """Run the agent in a Temporal workflow.""" - if not workflow.in_workflow(): - return await self._runner.run( - starting_agent, - input, - **kwargs, - ) - - for t in starting_agent.tools: - if callable(t): - raise ValueError( - "Provided tool is not a tool type. If using an activity, make sure to wrap it with openai_agents.workflow.activity_as_tool." - ) - - if starting_agent.mcp_servers: - from temporalio.contrib.openai_agents._mcp import ( - _StatefulMCPServerReference, - _StatelessMCPServerReference, - ) - - for s in starting_agent.mcp_servers: - if not isinstance( - s, - ( - _StatelessMCPServerReference, - _StatefulMCPServerReference, - ), - ): - raise ValueError( - f"Unknown mcp_server type {type(s)} may not work durably." - ) - - context = kwargs.get("context") - max_turns = kwargs.get("max_turns", DEFAULT_MAX_TURNS) - hooks = kwargs.get("hooks") - run_config = kwargs.get("run_config") - previous_response_id = kwargs.get("previous_response_id") - session = kwargs.get("session") - - if isinstance(session, SQLiteSession): - raise ValueError("Temporal workflows don't support SQLite sessions.") - - if run_config is None: - run_config = RunConfig() - - if run_config.model: - if not isinstance(run_config.model, str): - raise ValueError( - "Temporal workflows require a model name to be a string in the run config." - ) - run_config = dataclasses.replace( - run_config, - model=_TemporalModelStub( - run_config.model, model_params=self.model_params, agent=None - ), - ) - - try: - return await self._runner.run( - starting_agent=_convert_agent(self.model_params, starting_agent, None), - input=input, - context=context, - max_turns=max_turns, - hooks=hooks, - run_config=run_config, - previous_response_id=previous_response_id, - session=session, - ) - except AgentsException as e: - # In order for workflow failures to properly fail the workflow, we need to rewrap them in - # a Temporal error - if e.__cause__ and workflow.is_failure_exception(e.__cause__): - reraise = AgentsWorkflowError( - f"Workflow failure exception in Agents Framework: {e}" - ) - reraise.__traceback__ = e.__traceback__ - raise reraise from e.__cause__ - else: - raise e - - def run_sync( - self, - starting_agent: Agent[TContext], - input: str | list[TResponseInputItem], - **kwargs: Any, - ) -> RunResult: - """Run the agent synchronously (not supported in Temporal workflows).""" - if not workflow.in_workflow(): - return self._runner.run_sync( - starting_agent, - input, - **kwargs, - ) - raise RuntimeError("Temporal workflows do not support synchronous model calls.") - - def run_streamed( - self, - starting_agent: Agent[TContext], - input: str | list[TResponseInputItem], - **kwargs: Any, - ) -> RunResultStreaming: - """Run the agent with streaming responses (not supported in Temporal workflows).""" - if not workflow.in_workflow(): - return self._runner.run_streamed( - starting_agent, - input, - **kwargs, - ) - raise RuntimeError("Temporal workflows do not support streaming.") - - -def _model_name(agent: Agent[Any]) -> str | None: - name = agent.model - if name is not None and not isinstance(name, str): - raise ValueError( - "Temporal workflows require a model name to be a string in the agent." - ) - return name diff --git a/temporalio/contrib/openai_agents/_temporal_model_stub.py b/temporalio/contrib/openai_agents/_temporal_model_stub.py deleted file mode 100644 index f84488541a..0000000000 --- a/temporalio/contrib/openai_agents/_temporal_model_stub.py +++ /dev/null @@ -1,230 +0,0 @@ -from __future__ import annotations - -import logging -from typing import Optional - -from temporalio import workflow -from temporalio.contrib.openai_agents._model_parameters import ModelActivityParameters - -logger = logging.getLogger(__name__) - -from collections.abc import AsyncIterator -from typing import Any, Union, cast - -from agents import ( - Agent, - AgentOutputSchema, - AgentOutputSchemaBase, - CodeInterpreterTool, - FileSearchTool, - FunctionTool, - Handoff, - HostedMCPTool, - ImageGenerationTool, - Model, - ModelResponse, - ModelSettings, - ModelTracing, - Tool, - TResponseInputItem, - WebSearchTool, -) -from agents.items import TResponseStreamEvent -from openai.types.responses.response_prompt_param import ResponsePromptParam - -from temporalio.contrib.openai_agents._invoke_model_activity import ( - ActivityModelInput, - AgentOutputSchemaInput, - FunctionToolInput, - HandoffInput, - HostedMCPToolInput, - ModelActivity, - ModelTracingInput, - ToolInput, -) - - -class _TemporalModelStub(Model): - """A stub that allows invoking models as Temporal activities.""" - - def __init__( - self, - model_name: str | None, - *, - model_params: ModelActivityParameters, - agent: Agent[Any] | None, - ) -> None: - self.model_name = model_name - self.model_params = model_params - self.agent = agent - - async def get_response( - self, - system_instructions: str | None, - input: str | list[TResponseInputItem], - model_settings: ModelSettings, - tools: list[Tool], - output_schema: AgentOutputSchemaBase | None, - handoffs: list[Handoff], - tracing: ModelTracing, - *, - previous_response_id: str | None, - conversation_id: str | None, - prompt: ResponsePromptParam | None, - ) -> ModelResponse: - def make_tool_info(tool: Tool) -> ToolInput: - if isinstance( - tool, - ( - FileSearchTool, - WebSearchTool, - ImageGenerationTool, - CodeInterpreterTool, - ), - ): - return tool - elif isinstance(tool, HostedMCPTool): - return HostedMCPToolInput(tool_config=tool.tool_config) - elif isinstance(tool, FunctionTool): - return FunctionToolInput( - name=tool.name, - description=tool.description, - params_json_schema=tool.params_json_schema, - strict_json_schema=tool.strict_json_schema, - ) - else: - raise ValueError(f"Unsupported tool type: {tool.name}") - - tool_infos = [make_tool_info(x) for x in tools] - handoff_infos = [ - HandoffInput( - tool_name=x.tool_name, - tool_description=x.tool_description, - input_json_schema=x.input_json_schema, - agent_name=x.agent_name, - strict_json_schema=x.strict_json_schema, - ) - for x in handoffs - ] - if output_schema is not None and not isinstance( - output_schema, AgentOutputSchema - ): - raise TypeError( - f"Only AgentOutputSchema is supported by Temporal Model, got {type(output_schema).__name__}" - ) - agent_output_schema = output_schema - output_schema_input = ( - None - if agent_output_schema is None - else AgentOutputSchemaInput( - output_type_name=agent_output_schema.name(), - is_wrapped=agent_output_schema._is_wrapped, - output_schema=agent_output_schema.json_schema() - if not agent_output_schema.is_plain_text() - else None, - strict_json_schema=agent_output_schema.is_strict_json_schema(), - ) - ) - - activity_input = ActivityModelInput( - model_name=self.model_name, - system_instructions=system_instructions, - input=input, - model_settings=model_settings, - tools=tool_infos, - output_schema=output_schema_input, - handoffs=handoff_infos, - tracing=ModelTracingInput(tracing.value), - previous_response_id=previous_response_id, - conversation_id=conversation_id, - prompt=prompt, - ) - - if self.model_params.summary_override: - summary = ( - self.model_params.summary_override - if isinstance(self.model_params.summary_override, str) - else ( - self.model_params.summary_override.provide( - self.agent, system_instructions, input - ) - ) - ) - elif self.agent: - summary = self.agent.name - else: - summary = None - - if self.model_params.use_local_activity: - return await workflow.execute_local_activity_method( - ModelActivity.invoke_model_activity, - activity_input, - summary=summary, - schedule_to_close_timeout=self.model_params.schedule_to_close_timeout, - schedule_to_start_timeout=self.model_params.schedule_to_start_timeout, - start_to_close_timeout=self.model_params.start_to_close_timeout, - retry_policy=self.model_params.retry_policy, - cancellation_type=self.model_params.cancellation_type, - ) - else: - return await workflow.execute_activity_method( - ModelActivity.invoke_model_activity, - activity_input, - summary=summary, - task_queue=self.model_params.task_queue, - schedule_to_close_timeout=self.model_params.schedule_to_close_timeout, - schedule_to_start_timeout=self.model_params.schedule_to_start_timeout, - start_to_close_timeout=self.model_params.start_to_close_timeout, - heartbeat_timeout=self.model_params.heartbeat_timeout, - retry_policy=self.model_params.retry_policy, - cancellation_type=self.model_params.cancellation_type, - versioning_intent=self.model_params.versioning_intent, - priority=self.model_params.priority, - ) - - def stream_response( - self, - system_instructions: str | None, - input: str | list[TResponseInputItem], - model_settings: ModelSettings, - tools: list[Tool], - output_schema: AgentOutputSchemaBase | None, - handoffs: list[Handoff], - tracing: ModelTracing, - *, - previous_response_id: str | None, - conversation_id: str | None, - prompt: ResponsePromptParam | None, - ) -> AsyncIterator[TResponseStreamEvent]: - raise NotImplementedError("Temporal model doesn't support streams yet") - - -def _extract_summary(input: str | list[TResponseInputItem]) -> str: - ### Activity summary shown in the UI - try: - max_size = 100 - if isinstance(input, str): - return input[:max_size] - elif isinstance(input, list): - # Find all message inputs, which are reasonably summarizable - messages: list[TResponseInputItem] = [ - item for item in input if item.get("type", "message") == "message" - ] - if not messages: - return "" - - content: Any = messages[-1].get("content", "") - - # In the case of multiple contents, take the last one - if isinstance(content, list): - if not content: - return "" - content = content[-1] - - # Take the text field from the content if present - if isinstance(content, dict) and content.get("text") is not None: - content = content.get("text") - return str(content)[:max_size] - except Exception as e: - logger.error(f"Error getting summary: {e}") - return "" diff --git a/temporalio/contrib/openai_agents/_temporal_openai_agents.py b/temporalio/contrib/openai_agents/_temporal_openai_agents.py deleted file mode 100644 index 41ae419f77..0000000000 --- a/temporalio/contrib/openai_agents/_temporal_openai_agents.py +++ /dev/null @@ -1,261 +0,0 @@ -"""Initialize Temporal OpenAI Agents overrides.""" - -import dataclasses -import typing -from collections.abc import AsyncIterator, Callable, Sequence -from contextlib import asynccontextmanager, contextmanager -from datetime import timedelta -from typing import Optional, Union - -from agents import ModelProvider, set_trace_provider -from agents.run import get_default_agent_runner, set_default_agent_runner -from agents.tracing import get_trace_provider -from agents.tracing.provider import DefaultTraceProvider - -from temporalio.contrib.openai_agents._invoke_model_activity import ModelActivity -from temporalio.contrib.openai_agents._model_parameters import ModelActivityParameters -from temporalio.contrib.openai_agents._openai_runner import ( - TemporalOpenAIRunner, -) -from temporalio.contrib.openai_agents._temporal_trace_provider import ( - TemporalTraceProvider, -) -from temporalio.contrib.openai_agents._trace_interceptor import ( - OpenAIAgentsTracingInterceptor, -) -from temporalio.contrib.openai_agents.workflow import AgentsWorkflowError -from temporalio.contrib.pydantic import ( - PydanticPayloadConverter, - ToJsonOptions, -) -from temporalio.converter import ( - DataConverter, - DefaultPayloadConverter, -) -from temporalio.plugin import SimplePlugin -from temporalio.worker import WorkflowRunner -from temporalio.worker.workflow_sandbox import SandboxedWorkflowRunner - -if typing.TYPE_CHECKING: - from temporalio.contrib.openai_agents import ( - StatefulMCPServerProvider, - StatelessMCPServerProvider, - ) - - -@contextmanager -def set_open_ai_agent_temporal_overrides( - model_params: ModelActivityParameters, - auto_close_tracing_in_workflows: bool = False, -): - """Configure Temporal-specific overrides for OpenAI agents. - - .. warning:: - This API is experimental and may change in future versions. - Use with caution in production environments. Future versions may wrap the worker directly - instead of requiring this context manager. - - This context manager sets up the necessary Temporal-specific runners and trace providers - for running OpenAI agents within Temporal workflows. It should be called in the main - entry point of your application before initializing the Temporal client and worker. - - The context manager handles: - 1. Setting up a Temporal-specific runner for OpenAI agents - 2. Configuring a Temporal-aware trace provider - 3. Restoring previous settings when the context exits - - Args: - model_params: Configuration parameters for Temporal activity execution of model calls. - auto_close_tracing_in_workflows: If set to true, close tracing spans immediately. - - Returns: - A context manager that yields the configured TemporalTraceProvider. - """ - previous_runner = get_default_agent_runner() - previous_trace_provider = get_trace_provider() - provider = TemporalTraceProvider( - auto_close_in_workflows=auto_close_tracing_in_workflows - ) - - try: - set_default_agent_runner(TemporalOpenAIRunner(model_params)) - set_trace_provider(provider) - yield provider - finally: - set_default_agent_runner(previous_runner) - set_trace_provider(previous_trace_provider or DefaultTraceProvider()) - - -class OpenAIPayloadConverter(PydanticPayloadConverter): - """PayloadConverter for OpenAI agents.""" - - def __init__(self) -> None: - """Initialize a payload converter.""" - super().__init__(ToJsonOptions(exclude_unset=True)) - - -def _data_converter(converter: DataConverter | None) -> DataConverter: - if converter is None: - return DataConverter(payload_converter_class=OpenAIPayloadConverter) - elif converter.payload_converter_class is DefaultPayloadConverter: - return dataclasses.replace( - converter, payload_converter_class=OpenAIPayloadConverter - ) - elif not isinstance(converter.payload_converter, OpenAIPayloadConverter): - raise ValueError( - "The payload converter must be of type OpenAIPayloadConverter." - ) - return converter - - -class OpenAIAgentsPlugin(SimplePlugin): - """Temporal plugin for integrating OpenAI agents with Temporal workflows. - - .. warning:: - This class is experimental and may change in future versions. - Use with caution in production environments. - - This plugin provides seamless integration between the OpenAI Agents SDK and - Temporal workflows. It automatically configures the necessary interceptors, - activities, and data converters to enable OpenAI agents to run within - Temporal workflows with proper tracing and model execution. - - The plugin: - 1. Configures the Pydantic data converter for type-safe serialization - 2. Sets up tracing interceptors for OpenAI agent interactions - 3. Registers model execution activities - 4. Automatically registers MCP server activities and manages their lifecycles - 5. Manages the OpenAI agent runtime overrides during worker execution - - Args: - model_params: Configuration parameters for Temporal activity execution - of model calls. If None, default parameters will be used. - model_provider: Optional model provider for custom model implementations. - Useful for testing or custom model integrations. - mcp_server_providers: Sequence of MCP servers to automatically register with the worker. - The plugin will wrap each server in a TemporalMCPServer if needed and - manage their connection lifecycles tied to the worker lifetime. This is - the recommended way to use MCP servers with Temporal workflows. - - Example: - >>> from temporalio.client import Client - >>> from temporalio.worker import Worker - >>> from temporalio.contrib.openai_agents import OpenAIAgentsPlugin, ModelActivityParameters, StatelessMCPServerProvider - >>> from agents.mcp import MCPServerStdio - >>> from datetime import timedelta - >>> - >>> # Configure model parameters - >>> model_params = ModelActivityParameters( - ... start_to_close_timeout=timedelta(seconds=30), - ... retry_policy=RetryPolicy(maximum_attempts=3) - ... ) - >>> - >>> # Create MCP servers - >>> filesystem_server = StatelessMCPServerProvider(MCPServerStdio( - ... name="Filesystem Server", - ... params={"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]} - ... )) - >>> - >>> # Create plugin with MCP servers - >>> plugin = OpenAIAgentsPlugin( - ... model_params=model_params, - ... mcp_server_providers=[filesystem_server] - ... ) - >>> - >>> # Use with client and worker - >>> client = await Client.connect( - ... "localhost:7233", - ... plugins=[plugin] - ... ) - >>> worker = Worker( - ... client, - ... task_queue="my-task-queue", - ... workflows=[MyWorkflow], - ... ) - """ - - def __init__( - self, - model_params: ModelActivityParameters | None = None, - model_provider: ModelProvider | None = None, - mcp_server_providers: Sequence[ - Union["StatelessMCPServerProvider", "StatefulMCPServerProvider"] - ] = (), - register_activities: bool = True, - ) -> None: - """Initialize the OpenAI agents plugin. - - Args: - model_params: Configuration parameters for Temporal activity execution - of model calls. If None, default parameters will be used. - model_provider: Optional model provider for custom model implementations. - Useful for testing or custom model integrations. - mcp_server_providers: Sequence of MCP servers to automatically register with the worker. - Each server will be wrapped in a TemporalMCPServer if not already wrapped, - and their activities will be automatically registered with the worker. - The plugin manages the connection lifecycle of these servers. - register_activities: Whether to register activities during the worker execution. - This can be disabled on some workers to allow a separation of workflows and activities - but should not be disabled on all workers, or agents will not be able to progress. - """ - if model_params is None: - model_params = ModelActivityParameters() - - # For the default provider, we provide a default start_to_close_timeout of 60 seconds. - # Other providers will need to define their own. - if ( - model_params.start_to_close_timeout is None - and model_params.schedule_to_close_timeout is None - ): - if model_provider is None: - model_params.start_to_close_timeout = timedelta(seconds=60) - else: - raise ValueError( - "When configuring a custom provider, the model activity must have start_to_close_timeout or schedule_to_close_timeout" - ) - - # Delay activity construction until they are actually needed - def add_activities( - activities: Sequence[Callable] | None, - ) -> Sequence[Callable]: - if not register_activities: - return activities or [] - - new_activities = [ModelActivity(model_provider).invoke_model_activity] - - server_names = [server.name for server in mcp_server_providers] - if len(server_names) != len(set(server_names)): - raise ValueError( - f"More than one mcp server registered with the same name. Please provide unique names." - ) - - for mcp_server in mcp_server_providers: - new_activities.extend(mcp_server._get_activities()) - return list(activities or []) + new_activities - - def workflow_runner(runner: WorkflowRunner | None) -> WorkflowRunner: - if not runner: - raise ValueError("No WorkflowRunner provided to the OpenAI plugin.") - - # If in sandbox, add additional passthrough - if isinstance(runner, SandboxedWorkflowRunner): - return dataclasses.replace( - runner, - restrictions=runner.restrictions.with_passthrough_modules("mcp"), - ) - return runner - - @asynccontextmanager - async def run_context() -> AsyncIterator[None]: - with set_open_ai_agent_temporal_overrides(model_params): - yield - - super().__init__( - name="OpenAIAgentsPlugin", - data_converter=_data_converter, - worker_interceptors=[OpenAIAgentsTracingInterceptor()], - activities=add_activities, - workflow_runner=workflow_runner, - workflow_failure_exception_types=[AgentsWorkflowError], - run_context=lambda: run_context(), - ) diff --git a/temporalio/contrib/openai_agents/_temporal_trace_provider.py b/temporalio/contrib/openai_agents/_temporal_trace_provider.py deleted file mode 100644 index 37fe33ecae..0000000000 --- a/temporalio/contrib/openai_agents/_temporal_trace_provider.py +++ /dev/null @@ -1,203 +0,0 @@ -"""Provides support for integration with OpenAI Agents SDK tracing across workflows""" - -import uuid -from types import TracebackType -from typing import Any, Optional, cast - -from agents import SpanData, Trace, TracingProcessor -from agents.tracing import ( - get_trace_provider, -) -from agents.tracing.provider import ( - DefaultTraceProvider, - SynchronousMultiTracingProcessor, -) -from agents.tracing.spans import Span - -from temporalio import workflow -from temporalio.contrib.openai_agents._trace_interceptor import RunIdRandom -from temporalio.workflow import ReadOnlyContextError - - -class ActivitySpanData(SpanData): - """Captures fields from ActivityTaskScheduledEventAttributes for tracing.""" - - def __init__( - self, - activity_id: str, - activity_type: str, - task_queue: str, - schedule_to_close_timeout: float | None = None, - schedule_to_start_timeout: float | None = None, - start_to_close_timeout: float | None = None, - heartbeat_timeout: float | None = None, - ): - """Initialize an ActivitySpanData instance.""" - self.activity_id = activity_id - self.activity_type = activity_type - self.task_queue = task_queue - self.schedule_to_close_timeout = schedule_to_close_timeout - self.schedule_to_start_timeout = schedule_to_start_timeout - self.start_to_close_timeout = start_to_close_timeout - self.heartbeat_timeout = heartbeat_timeout - - @property - def type(self) -> str: - """Return the type of this span data.""" - return "temporal-activity" - - def export(self) -> dict[str, Any]: - """Export the span data as a dictionary.""" - return { - "type": self.type, - "activity_id": self.activity_id, - "activity_type": self.activity_type, - "task_queue": self.task_queue, - "schedule_to_close_timeout": self.schedule_to_close_timeout, - "schedule_to_start_timeout": self.schedule_to_start_timeout, - "start_to_close_timeout": self.start_to_close_timeout, - "heartbeat_timeout": self.heartbeat_timeout, - } - - -def activity_span( - activity_id: str, - activity_type: str, - task_queue: str, - start_to_close_timeout: float, -) -> Span[ActivitySpanData]: - """Create a trace span for a Temporal activity.""" - return get_trace_provider().create_span( - span_data=ActivitySpanData( - activity_id=activity_id, - activity_type=activity_type, - task_queue=task_queue, - start_to_close_timeout=start_to_close_timeout, - ), - ) - - -class _TemporalTracingProcessor(SynchronousMultiTracingProcessor): - def __init__( - self, impl: SynchronousMultiTracingProcessor, auto_close_in_workflows: bool - ): - super().__init__() - self._impl = impl - self._auto_close_in_workflows = auto_close_in_workflows - - def add_tracing_processor(self, tracing_processor: TracingProcessor): - self._impl.add_tracing_processor(tracing_processor) - - def set_processors(self, processors: list[TracingProcessor]): - self._impl.set_processors(processors) - - def on_trace_start(self, trace: Trace) -> None: - if workflow.in_workflow() and workflow.unsafe.is_replaying(): - # In replay mode, don't report - return - - self._impl.on_trace_start(trace) - if self._auto_close_in_workflows and workflow.in_workflow(): - self._impl.on_trace_end(trace) - - def on_trace_end(self, trace: Trace) -> None: - if workflow.in_workflow() and workflow.unsafe.is_replaying(): - # In replay mode, don't report - return - if self._auto_close_in_workflows and workflow.in_workflow(): - return - - self._impl.on_trace_end(trace) - - def on_span_start(self, span: Span[Any]) -> None: - if workflow.in_workflow() and workflow.unsafe.is_replaying(): - # In replay mode, don't report - return - - self._impl.on_span_start(span) - if self._auto_close_in_workflows and workflow.in_workflow(): - self._impl.on_span_end(span) - - def on_span_end(self, span: Span[Any]) -> None: - if workflow.in_workflow() and workflow.unsafe.is_replaying(): - # In replay mode, don't report - return - if self._auto_close_in_workflows and workflow.in_workflow(): - return - - self._impl.on_span_end(span) - - def shutdown(self) -> None: - self._impl.shutdown() - - def force_flush(self) -> None: - self._impl.force_flush() - - -def _workflow_uuid() -> str: - random = cast( - RunIdRandom, getattr(workflow.instance(), "__temporal_openai_tracing_random") - ) - return random.uuid4() - - -class TemporalTraceProvider(DefaultTraceProvider): - """A trace provider that integrates with Temporal workflows.""" - - def __init__(self, auto_close_in_workflows: bool = False): - """Initialize the TemporalTraceProvider.""" - super().__init__() - self._original_provider = cast(DefaultTraceProvider, get_trace_provider()) - self._multi_processor = _TemporalTracingProcessor( - self._original_provider._multi_processor, - auto_close_in_workflows, - ) - - def time_iso(self) -> str: - """Return the current deterministic time in ISO 8601 format.""" - if workflow.in_workflow(): - return workflow.now().isoformat() - return super().time_iso() - - def gen_trace_id(self) -> str: - """Generate a new trace ID.""" - if workflow.in_workflow(): - try: - """Generate a new trace ID.""" - return f"trace_{_workflow_uuid()}" - except ReadOnlyContextError: - return f"trace_{uuid.uuid4().hex}" - return super().gen_trace_id() - - def gen_span_id(self) -> str: - """Generate a span ID.""" - if workflow.in_workflow(): - try: - """Generate a deterministic span ID.""" - return f"span_{_workflow_uuid()}" - except ReadOnlyContextError: - return f"span_{uuid.uuid4().hex[:24]}" - return super().gen_span_id() - - def gen_group_id(self) -> str: - """Generate a group ID.""" - if workflow.in_workflow(): - try: - """Generate a deterministic group ID.""" - return f"group_{_workflow_uuid()}" - except ReadOnlyContextError: - return f"group_{uuid.uuid4().hex[:24]}" - return super().gen_group_id() - - def __enter__(self): - """Enter the context of the Temporal trace provider.""" - return self - - def __exit__( - self, - exc_type: type[BaseException], - exc_val: BaseException, - exc_tb: TracebackType, - ): - """Exit the context of the Temporal trace provider.""" - self._multi_processor.shutdown() diff --git a/temporalio/contrib/openai_agents/_trace_interceptor.py b/temporalio/contrib/openai_agents/_trace_interceptor.py deleted file mode 100644 index ffa22cc16b..0000000000 --- a/temporalio/contrib/openai_agents/_trace_interceptor.py +++ /dev/null @@ -1,448 +0,0 @@ -"""Adds OpenAI Agents traces and spans to Temporal workflows and activities.""" - -from __future__ import annotations - -import random -import uuid -from collections.abc import Mapping -from contextlib import contextmanager -from typing import Any, Optional, Protocol, Type - -from agents import CustomSpanData, custom_span, get_current_span, trace -from agents.tracing import ( - get_trace_provider, -) -from agents.tracing.scope import Scope -from agents.tracing.spans import NoOpSpan, Span - -import temporalio.activity -import temporalio.api.common.v1 -import temporalio.client -import temporalio.converter -import temporalio.worker -import temporalio.workflow -from temporalio import activity, workflow - -HEADER_KEY = "__openai_span" - - -class _InputWithHeaders(Protocol): - headers: Mapping[str, temporalio.api.common.v1.Payload] - - -def set_header_from_context( - input: _InputWithHeaders, payload_converter: temporalio.converter.PayloadConverter -) -> None: - """Inserts the OpenAI Agents trace/span data in the input header.""" - current = get_current_span() - if current is None or isinstance(current, NoOpSpan): - return - - trace = get_trace_provider().get_current_trace() - input.headers = { - **input.headers, - HEADER_KEY: payload_converter.to_payload( - { - "traceName": trace.name if trace else "Unknown Workflow", - "spanId": current.span_id, - "traceId": current.trace_id, - } - ), - } - - -@contextmanager -def context_from_header( - span_name: str, - input: _InputWithHeaders, - payload_converter: temporalio.converter.PayloadConverter, -): - """Extracts and initializes trace information the input header.""" - payload = input.headers.get(HEADER_KEY) - span_info = payload_converter.from_payload(payload) if payload else None - if span_info is None: - yield - else: - workflow_type = ( - activity.info().workflow_type - if activity.in_activity() - else workflow.info().workflow_type - ) - data = ( - { - "activityId": activity.info().activity_id, - "activity": activity.info().activity_type, - } - if activity.in_activity() - else None - ) - current_trace = get_trace_provider().get_current_trace() - if current_trace is None: - metadata = { - "temporal:workflowId": activity.info().workflow_id - if activity.in_activity() - else workflow.info().workflow_id, - "temporal:runId": activity.info().workflow_run_id - if activity.in_activity() - else workflow.info().run_id, - "temporal:workflowType": workflow_type, - } - current_trace = trace( - span_info["traceName"], - trace_id=span_info["traceId"], - metadata=metadata, - ) - Scope.set_current_trace(current_trace) - current_span = get_trace_provider().get_current_span() - if current_span is None: - current_span = get_trace_provider().create_span( - span_data=CustomSpanData(name="", data={}), span_id=span_info["spanId"] - ) - Scope.set_current_span(current_span) - - with custom_span(name=span_name, parent=current_span, data=data): - yield - - -class OpenAIAgentsTracingInterceptor( - temporalio.client.Interceptor, temporalio.worker.Interceptor -): - """Interceptor that propagates OpenAI agent tracing context through Temporal workflows and activities. - - .. warning:: - This API is experimental and may change in future versions. - Use with caution in production environments. - - This interceptor enables tracing of OpenAI agent operations across Temporal workflows - and activities. It propagates trace context through workflow and activity boundaries, - allowing for end-to-end tracing of agent operations. - - The interceptor handles: - 1. Propagating trace context from client to workflow - 2. Propagating trace context from workflow to activities - 3. Maintaining trace context across workflow and activity boundaries - - Example usage: - interceptor = OpenAIAgentsTracingInterceptor() - client = await Client.connect("localhost:7233", interceptors=[interceptor]) - worker = Worker(client, task_queue="my-task-queue", interceptors=[interceptor]) - """ - - def __init__( - self, - payload_converter: temporalio.converter.PayloadConverter = temporalio.converter.default().payload_converter, - ) -> None: - """Initialize the interceptor with a payload converter. - - Args: - payload_converter: The payload converter to use for serializing/deserializing - trace context. Defaults to the default Temporal payload converter. - """ - self._payload_converter = payload_converter - - def intercept_client( - self, next: temporalio.client.OutboundInterceptor - ) -> temporalio.client.OutboundInterceptor: - """Intercepts client calls to propagate trace context. - - Args: - next: The next interceptor in the chain. - - Returns: - An interceptor that propagates trace context for client operations. - """ - return _ContextPropagationClientOutboundInterceptor( - next, self._payload_converter - ) - - def intercept_activity( - self, next: temporalio.worker.ActivityInboundInterceptor - ) -> temporalio.worker.ActivityInboundInterceptor: - """Intercepts activity calls to propagate trace context. - - Args: - next: The next interceptor in the chain. - - Returns: - An interceptor that propagates trace context for activity operations. - """ - return _ContextPropagationActivityInboundInterceptor(next) - - def workflow_interceptor_class( - self, input: temporalio.worker.WorkflowInterceptorClassInput - ) -> type[_ContextPropagationWorkflowInboundInterceptor]: - """Returns the workflow interceptor class to propagate trace context. - - Args: - input: The input for creating the workflow interceptor. - - Returns: - The class of the workflow interceptor that propagates trace context. - """ - return _ContextPropagationWorkflowInboundInterceptor - - -class _ContextPropagationClientOutboundInterceptor( - temporalio.client.OutboundInterceptor -): - def __init__( - self, - next: temporalio.client.OutboundInterceptor, - payload_converter: temporalio.converter.PayloadConverter, - ) -> None: - super().__init__(next) - self._payload_converter = payload_converter - - async def start_workflow( - self, input: temporalio.client.StartWorkflowInput - ) -> temporalio.client.WorkflowHandle[Any, Any]: - metadata = { - "temporal:workflowType": input.workflow, - **({"temporal:workflowId": input.id} if input.id else {}), - } - data = {"workflowId": input.id} if input.id else None - span_name = "temporal:startWorkflow" - if get_trace_provider().get_current_trace() is None: - with trace( - span_name + ":" + input.workflow, metadata=metadata, group_id=input.id - ): - with custom_span(name=span_name + ":" + input.workflow, data=data): - set_header_from_context(input, self._payload_converter) - return await super().start_workflow(input) - else: - with custom_span(name=span_name, data=data): - set_header_from_context(input, self._payload_converter) - return await super().start_workflow(input) - - async def query_workflow(self, input: temporalio.client.QueryWorkflowInput) -> Any: - metadata = { - "temporal:queryWorkflow": input.query, - **({"temporal:workflowId": input.id} if input.id else {}), - } - data = {"workflowId": input.id, "query": input.query} - span_name = "temporal:queryWorkflow" - if get_trace_provider().get_current_trace() is None: - with trace(span_name, metadata=metadata, group_id=input.id): - with custom_span(name=span_name, data=data): - set_header_from_context(input, self._payload_converter) - return await super().query_workflow(input) - else: - with custom_span(name=span_name, data=data): - set_header_from_context(input, self._payload_converter) - return await super().query_workflow(input) - - async def signal_workflow( - self, input: temporalio.client.SignalWorkflowInput - ) -> None: - metadata = { - "temporal:signalWorkflow": input.signal, - **({"temporal:workflowId": input.id} if input.id else {}), - } - data = {"workflowId": input.id, "signal": input.signal} - span_name = "temporal:signalWorkflow" - if get_trace_provider().get_current_trace() is None: - with trace(span_name, metadata=metadata, group_id=input.id): - with custom_span(name=span_name, data=data): - set_header_from_context(input, self._payload_converter) - await super().signal_workflow(input) - else: - with custom_span(name=span_name, data=data): - set_header_from_context(input, self._payload_converter) - await super().signal_workflow(input) - - async def start_workflow_update( - self, input: temporalio.client.StartWorkflowUpdateInput - ) -> temporalio.client.WorkflowUpdateHandle[Any]: - metadata = { - "temporal:updateWorkflow": input.update, - **({"temporal:workflowId": input.id} if input.id else {}), - } - data = { - **({"workflowId": input.id} if input.id else {}), - "update": input.update, - } - span_name = "temporal:updateWorkflow" - if get_trace_provider().get_current_trace() is None: - with trace(span_name, metadata=metadata, group_id=input.id): - with custom_span(name=span_name, data=data): - set_header_from_context(input, self._payload_converter) - return await self.next.start_workflow_update(input) - else: - with custom_span(name=span_name, data=data): - set_header_from_context(input, self._payload_converter) - return await self.next.start_workflow_update(input) - - -class _ContextPropagationActivityInboundInterceptor( - temporalio.worker.ActivityInboundInterceptor -): - async def execute_activity( - self, input: temporalio.worker.ExecuteActivityInput - ) -> Any: - with context_from_header( - "temporal:executeActivity", input, temporalio.activity.payload_converter() - ): - return await self.next.execute_activity(input) - - -class RunIdRandom: - """Random uuid generator seeded by the run id of the workflow. - Doesn't currently support replay over reset correctly. - """ - - def __init__(self): - """Create a new random UUID generator.""" - self._random = random.Random("OpenAIPlugin" + workflow.info().run_id) - - def uuid4(self) -> str: - """Generate a random UUID.""" - return uuid.UUID( - bytes=random.getrandbits(16 * 8).to_bytes(16, "big"), version=4 - ).hex[:24] - - -def _ensure_tracing_random() -> None: - """We use a custom uuid generator for spans to ensure that changes to user code workflow.random usage - do not affect tracing and vice versa. - """ - instance = workflow.instance() - if not hasattr(instance, "__temporal_openai_tracing_random"): - setattr( - workflow.instance(), - "__temporal_openai_tracing_random", - RunIdRandom(), - ) - - -class _ContextPropagationWorkflowInboundInterceptor( - temporalio.worker.WorkflowInboundInterceptor -): - def init(self, outbound: temporalio.worker.WorkflowOutboundInterceptor) -> None: - self.next.init(_ContextPropagationWorkflowOutboundInterceptor(outbound)) - - async def execute_workflow( - self, input: temporalio.worker.ExecuteWorkflowInput - ) -> Any: - _ensure_tracing_random() - with context_from_header( - "temporal:executeWorkflow", input, temporalio.workflow.payload_converter() - ): - return await self.next.execute_workflow(input) - - async def handle_signal(self, input: temporalio.worker.HandleSignalInput) -> None: - _ensure_tracing_random() - with context_from_header( - "temporal:handleSignal", input, temporalio.workflow.payload_converter() - ): - return await self.next.handle_signal(input) - - async def handle_query(self, input: temporalio.worker.HandleQueryInput) -> Any: - _ensure_tracing_random() - with context_from_header( - "temporal:handleQuery", input, temporalio.workflow.payload_converter() - ): - return await self.next.handle_query(input) - - def handle_update_validator( - self, input: temporalio.worker.HandleUpdateInput - ) -> None: - with context_from_header( - "temporal:handleUpdateValidator", - input, - temporalio.workflow.payload_converter(), - ): - self.next.handle_update_validator(input) - - async def handle_update_handler( - self, input: temporalio.worker.HandleUpdateInput - ) -> Any: - _ensure_tracing_random() - with context_from_header( - "temporal:handleUpdateHandler", - input, - temporalio.workflow.payload_converter(), - ): - return await self.next.handle_update_handler(input) - - -class _ContextPropagationWorkflowOutboundInterceptor( - temporalio.worker.WorkflowOutboundInterceptor -): - async def signal_child_workflow( - self, input: temporalio.worker.SignalChildWorkflowInput - ) -> None: - trace = get_trace_provider().get_current_trace() - if trace: - with custom_span( - name="temporal:signalChildWorkflow", - data={"workflowId": input.child_workflow_id}, - ): - set_header_from_context(input, temporalio.workflow.payload_converter()) - await self.next.signal_child_workflow(input) - else: - set_header_from_context(input, temporalio.workflow.payload_converter()) - await self.next.signal_child_workflow(input) - - async def signal_external_workflow( - self, input: temporalio.worker.SignalExternalWorkflowInput - ) -> None: - trace = get_trace_provider().get_current_trace() - if trace: - with custom_span( - name="temporal:signalExternalWorkflow", - data={"workflowId": input.workflow_id}, - ): - set_header_from_context(input, temporalio.workflow.payload_converter()) - await self.next.signal_external_workflow(input) - else: - set_header_from_context(input, temporalio.workflow.payload_converter()) - await self.next.signal_external_workflow(input) - - def start_activity( - self, input: temporalio.worker.StartActivityInput - ) -> temporalio.workflow.ActivityHandle: - trace = get_trace_provider().get_current_trace() - span: Span | None = None - if trace: - span = custom_span( - name="temporal:startActivity", data={"activity": input.activity} - ) - span.start(mark_as_current=True) - - set_header_from_context(input, temporalio.workflow.payload_converter()) - handle = self.next.start_activity(input) - if span: - handle.add_done_callback(lambda _: span.finish()) # type: ignore - return handle - - async def start_child_workflow( - self, input: temporalio.worker.StartChildWorkflowInput - ) -> temporalio.workflow.ChildWorkflowHandle: - trace = get_trace_provider().get_current_trace() - span: Span | None = None - if trace: - span = custom_span( - name="temporal:startChildWorkflow", data={"workflow": input.workflow} - ) - span.start(mark_as_current=True) - set_header_from_context(input, temporalio.workflow.payload_converter()) - handle = await self.next.start_child_workflow(input) - if span: - handle.add_done_callback(lambda _: span.finish()) # type: ignore - return handle - - def start_local_activity( - self, input: temporalio.worker.StartLocalActivityInput - ) -> temporalio.workflow.ActivityHandle: - trace = get_trace_provider().get_current_trace() - span: Span | None = None - if trace: - span = custom_span( - name="temporal:startLocalActivity", data={"activity": input.activity} - ) - span.start(mark_as_current=True) - set_header_from_context(input, temporalio.workflow.payload_converter()) - handle = self.next.start_local_activity(input) - if span: - handle.add_done_callback(lambda _: span.finish()) # type: ignore - return handle diff --git a/temporalio/contrib/openai_agents/testing.py b/temporalio/contrib/openai_agents/testing.py index 4acab196ae..f1ed15bb50 100644 --- a/temporalio/contrib/openai_agents/testing.py +++ b/temporalio/contrib/openai_agents/testing.py @@ -1,309 +1,6 @@ -"""Testing utilities for OpenAI agents.""" +"""Compatibility imports for temporalio.openai_agents.testing.""" -from collections.abc import AsyncIterator, Callable, Sequence -from typing import Optional, Union - -from agents import ( - AgentOutputSchemaBase, - Handoff, - Model, - ModelProvider, - ModelResponse, - ModelSettings, - ModelTracing, - Tool, - TResponseInputItem, - Usage, -) -from agents.items import TResponseOutputItem, TResponseStreamEvent -from openai.types.responses import ( - ResponseFunctionToolCall, - ResponseOutputMessage, - ResponseOutputText, -) - -from temporalio.client import Client -from temporalio.contrib.openai_agents._mcp import ( - StatefulMCPServerProvider, - StatelessMCPServerProvider, +from temporalio.openai_agents.testing import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.openai_agents.testing import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, ) -from temporalio.contrib.openai_agents._model_parameters import ModelActivityParameters -from temporalio.contrib.openai_agents._temporal_openai_agents import OpenAIAgentsPlugin - -__all__ = [ - "AgentEnvironment", - "ResponseBuilders", - "TestModel", - "TestModelProvider", -] - - -class ResponseBuilders: - """Builders for creating model responses for testing. - - .. warning:: - This API is experimental and may change in the future. - """ - - @staticmethod - def model_response(output: TResponseOutputItem) -> ModelResponse: - """Create a ModelResponse with the given output. - - .. warning:: - This API is experimental and may change in the future. - """ - return ModelResponse( - output=[output], - usage=Usage(), - response_id=None, - ) - - @staticmethod - def response_output_message(text: str) -> ResponseOutputMessage: - """Create a ResponseOutputMessage with text content. - - .. warning:: - This API is experimental and may change in the future. - """ - return ResponseOutputMessage( - id="", - content=[ - ResponseOutputText( - text=text, - annotations=[], - type="output_text", - ) - ], - role="assistant", - status="completed", - type="message", - ) - - @staticmethod - def tool_call(arguments: str, name: str) -> ModelResponse: - """Create a ModelResponse with a function tool call. - - .. warning:: - This API is experimental and may change in the future. - """ - return ResponseBuilders.model_response( - ResponseFunctionToolCall( - arguments=arguments, - call_id="call", - name=name, - type="function_call", - id="id", - status="completed", - ) - ) - - @staticmethod - def output_message(text: str) -> ModelResponse: - """Create a ModelResponse with an output message. - - .. warning:: - This API is experimental and may change in the future. - """ - return ResponseBuilders.model_response( - ResponseBuilders.response_output_message(text) - ) - - -class TestModelProvider(ModelProvider): - """Test model provider which simply returns the given module. - - .. warning:: - This API is experimental and may change in the future. - """ - - __test__ = False - - def __init__(self, model: Model): - """Initialize a test model provider with a model. - - .. warning:: - This API is experimental and may change in the future. - """ - self._model = model - - def get_model(self, model_name: str | None) -> Model: - """Get a model from the model provider. - - .. warning:: - This API is experimental and may change in the future. - """ - return self._model - - -class TestModel(Model): - """Test model for use mocking model responses. - - .. warning:: - This API is experimental and may change in the future. - """ - - __test__ = False - - def __init__(self, fn: Callable[[], ModelResponse]) -> None: - """Initialize a test model with a callable. - - .. warning:: - This API is experimental and may change in the future. - """ - self.fn = fn - - async def get_response( - self, - system_instructions: str | None, - input: str | list[TResponseInputItem], - model_settings: ModelSettings, - tools: list[Tool], - output_schema: AgentOutputSchemaBase | None, - handoffs: list[Handoff], - tracing: ModelTracing, - **kwargs, - ) -> ModelResponse: - """Get a response from the mocked model, by calling the callable passed to the constructor.""" - return self.fn() - - def stream_response( - self, - system_instructions: str | None, - input: str | list[TResponseInputItem], - model_settings: ModelSettings, - tools: list[Tool], - output_schema: AgentOutputSchemaBase | None, - handoffs: list[Handoff], - tracing: ModelTracing, - **kwargs, - ) -> AsyncIterator[TResponseStreamEvent]: - """Get a streamed response from the model. Unimplemented.""" - raise NotImplementedError() - - @staticmethod - def returning_responses(responses: list[ModelResponse]) -> "TestModel": - """Create a mock model which sequentially returns responses from a list. - - .. warning:: - This API is experimental and may change in the future. - """ - i = iter(responses) - return TestModel(lambda: next(i)) - - -class AgentEnvironment: - """Testing environment for OpenAI agents with Temporal integration. - - This async context manager provides a convenient way to set up testing environments - for OpenAI agents with mocked model calls and Temporal integration. - - .. warning:: - This API is experimental and may change in the future. - - Example: - >>> from temporalio.contrib.openai_agents.testing import AgentEnvironment, TestModelProvider, ResponseBuilders - >>> from temporalio.client import Client - >>> - >>> # Create a mock model that returns predefined responses - >>> mock_model = TestModel.returning_responses([ - ... ResponseBuilders.output_message("Hello, world!"), - ... ResponseBuilders.output_message("How can I help you?") - ... ]) - >>> - >>> async with AgentEnvironment(model=mock_model) as env: - ... client = env.applied_on_client(client) - ... # Use client for testing workflows with mocked model calls - """ - - __test__ = False - - def __init__( - self, - model_params: ModelActivityParameters | None = None, - model_provider: ModelProvider | None = None, - model: Model | None = None, - mcp_server_providers: Sequence[ - StatelessMCPServerProvider | StatefulMCPServerProvider - ] = (), - register_activities: bool = True, - ) -> None: - """Initialize the AgentEnvironment. - - Args: - model_params: Configuration parameters for Temporal activity execution - of model calls. If None, default parameters will be used. - model_provider: Optional model provider for custom model implementations. - Only one of model_provider or model should be provided. - If both are provided, model_provider will be used. - model: Optional model for custom model implementations. - Use TestModel for mocking model responses. - Equivalent to model_provider=TestModelProvider(model). - Only one of model_provider or model should be provided. - If both are provided, model_provider will be used. - mcp_server_providers: Sequence of MCP servers to automatically register with the worker. - register_activities: Whether to register activities during worker execution. - - .. warning:: - This API is experimental and may change in the future. - """ - self._model_params = model_params - self._model_provider = None - if model_provider is not None: - self._model_provider = model_provider - elif model is not None: - self._model_provider = TestModelProvider(model) - self._mcp_server_providers = mcp_server_providers - self._register_activities = register_activities - self._plugin: OpenAIAgentsPlugin | None = None - - async def __aenter__(self) -> "AgentEnvironment": - """Enter the async context manager.""" - # Create the plugin with the provided configuration - self._plugin = OpenAIAgentsPlugin( - model_params=self._model_params, - model_provider=self._model_provider, - mcp_server_providers=self._mcp_server_providers, - register_activities=self._register_activities, - ) - - return self - - async def __aexit__(self, *args) -> None: - """Exit the async context manager.""" - # No cleanup needed currently - pass - - def applied_on_client(self, client: Client) -> Client: - """Apply the agent environment's plugin to a client and return a new client instance. - - Args: - client: The base Temporal client to apply the plugin to. - - Returns: - A new Client instance with the OpenAI agents plugin applied. - - .. warning:: - This API is experimental and may change in the future. - """ - if self._plugin is None: - raise RuntimeError( - "AgentEnvironment must be entered before applying to client" - ) - - new_config = client.config() - existing_plugins = new_config.get("plugins", []) - new_config["plugins"] = list(existing_plugins) + [self._plugin] - return Client(**new_config) - - @property - def openai_agents_plugin(self) -> OpenAIAgentsPlugin: - """Get the underlying OpenAI agents plugin. - - .. warning:: - This API is experimental and may change in the future. - """ - if self._plugin is None: - raise RuntimeError( - "AgentEnvironment must be entered before accessing plugin" - ) - return self._plugin diff --git a/temporalio/contrib/openai_agents/workflow.py b/temporalio/contrib/openai_agents/workflow.py index 19d6621ad3..ad199224ee 100644 --- a/temporalio/contrib/openai_agents/workflow.py +++ b/temporalio/contrib/openai_agents/workflow.py @@ -1,359 +1,3 @@ -"""Workflow-specific primitives for working with the OpenAI Agents SDK in a workflow context""" +"""Compatibility imports for temporalio.openai_agents.workflow.""" -import functools -import inspect -import json -import typing -from collections.abc import Callable -from contextlib import AbstractAsyncContextManager -from datetime import timedelta -from typing import Any, Optional, Type - -import nexusrpc -from agents import ( - RunContextWrapper, - Tool, -) -from agents.function_schema import function_schema -from agents.tool import ( - FunctionTool, -) - -from temporalio import activity -from temporalio import workflow as temporal_workflow -from temporalio.common import Priority, RetryPolicy -from temporalio.exceptions import ApplicationError, TemporalError -from temporalio.workflow import ( - ActivityCancellationType, - ActivityConfig, - VersioningIntent, -) - -if typing.TYPE_CHECKING: - from agents.mcp import MCPServer - - -def activity_as_tool( - fn: Callable, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: Priority = Priority.default, - strict_json_schema: bool = True, -) -> Tool: - """Convert a single Temporal activity function to an OpenAI agent tool. - - .. warning:: - This API is experimental and may change in future versions. - Use with caution in production environments. - - This function takes a Temporal activity function and converts it into an - OpenAI agent tool that can be used by the agent to execute the activity - during workflow execution. The tool will automatically handle the conversion - of inputs and outputs between the agent and the activity. Note that if you take a context, - mutation will not be persisted, as the activity may not be running in the same location. - - For undocumented arguments, refer to :py:mod:`workflow` and :py:meth:`start_activity` - - Args: - fn: A Temporal activity function to convert to a tool. - strict_json_schema: Whether the tool should follow a strict schema. - See https://openai.github.io/openai-agents-python/ref/tool/#agents.tool.FunctionTool.strict_json_schema - - - Returns: - An OpenAI agent tool that wraps the provided activity. - - Raises: - ApplicationError: If the function is not properly decorated as a Temporal activity. - - Example: - >>> @activity.defn - >>> def process_data(input: str) -> str: - ... return f"Processed: {input}" - >>> - >>> # Create tool with custom activity options - >>> tool = activity_as_tool( - ... process_data, - ... start_to_close_timeout=timedelta(seconds=30), - ... retry_policy=RetryPolicy(maximum_attempts=3), - ... heartbeat_timeout=timedelta(seconds=10) - ... ) - >>> # Use tool with an OpenAI agent - """ - ret = activity._Definition.from_callable(fn) - if not ret: - raise ApplicationError( - "Bare function without tool and activity decorators is not supported", - "invalid_tool", - ) - if ret.name is None: - raise ApplicationError( - "Input activity must have a name to be made into a tool", - "invalid_tool", - ) - # If the provided callable has a first argument of `self`, partially apply it with the same metadata - # The actual instance will be picked up by the activity execution, the partially applied function will never actually be executed - params = list(inspect.signature(fn).parameters.keys()) - if len(params) > 0 and params[0] == "self": - partial = functools.partial(fn, None) - setattr(partial, "__name__", fn.__name__) - partial.__annotations__ = getattr(fn, "__annotations__") - setattr( - partial, - "__temporal_activity_definition", - getattr(fn, "__temporal_activity_definition"), - ) - partial.__doc__ = fn.__doc__ - fn = partial - schema = function_schema(fn) - - async def run_activity(ctx: RunContextWrapper[Any], input: str) -> Any: - try: - json_data = json.loads(input) - except Exception as e: - raise ApplicationError( - f"Invalid JSON input for tool {schema.name}: {input}" - ) from e - - # Activities don't support keyword only arguments, so we can ignore the kwargs_dict return - args, _ = schema.to_call_args(schema.params_pydantic_model(**json_data)) - - # Add the context to the arguments if it takes that - if schema.takes_context: - args = [ctx] + args - result = await temporal_workflow.execute_activity( - ret.name, # type: ignore - args=args, - task_queue=task_queue, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - heartbeat_timeout=heartbeat_timeout, - retry_policy=retry_policy, - cancellation_type=cancellation_type, - activity_id=activity_id, - versioning_intent=versioning_intent, - summary=summary or schema.description, - priority=priority, - ) - try: - return str(result) - except Exception as e: - raise ToolSerializationError( - "You must return a string representation of the tool output, or something we can call str() on" - ) from e - - return FunctionTool( - name=schema.name, - description=schema.description or "", - params_json_schema=schema.params_json_schema, - on_invoke_tool=run_activity, - strict_json_schema=strict_json_schema, - ) - - -def nexus_operation_as_tool( - operation: nexusrpc.Operation[Any, Any], - *, - service: type[Any], - endpoint: str, - schedule_to_close_timeout: timedelta | None = None, - strict_json_schema: bool = True, -) -> Tool: - """Convert a Nexus operation into an OpenAI agent tool. - - .. warning:: - This API is experimental and may change in future versions. - Use with caution in production environments. - - This function takes a Nexus operation and converts it into an - OpenAI agent tool that can be used by the agent to execute the operation - during workflow execution. The tool will automatically handle the conversion - of inputs and outputs between the agent and the operation. - - Args: - operation: A Nexus operation to convert into a tool. - service: The Nexus service class that contains the operation. - endpoint: The Nexus endpoint to use for the operation. - strict_json_schema: Whether the tool should follow a strict schema - - Returns: - An OpenAI agent tool that wraps the provided operation. - - Example: - >>> @nexusrpc.service - ... class WeatherService: - ... get_weather_object_nexus_operation: nexusrpc.Operation[WeatherInput, Weather] - >>> - >>> # Create tool with custom activity options - >>> tool = nexus_operation_as_tool( - ... WeatherService.get_weather_object_nexus_operation, - ... service=WeatherService, - ... endpoint="weather-service", - ... ) - >>> # Use tool with an OpenAI agent - """ - - def operation_callable(input): - raise NotImplementedError("This function definition is used as a type only") - - operation_callable.__annotations__ = { - "input": operation.input_type, - "return": operation.output_type, - } - operation_callable.__name__ = operation.name - - schema = function_schema(operation_callable) - - async def run_operation(ctx: RunContextWrapper[Any], input: str) -> Any: - try: - json_data = json.loads(input) - except Exception as e: - raise ApplicationError( - f"Invalid JSON input for tool {schema.name}: {input}" - ) from e - - nexus_client = temporal_workflow.create_nexus_client( - service=service, endpoint=endpoint - ) - args, _ = schema.to_call_args(schema.params_pydantic_model(**json_data)) - assert len(args) == 1, "Nexus operations must have exactly one argument" - [arg] = args - result = await nexus_client.execute_operation( - operation, - arg, - schedule_to_close_timeout=schedule_to_close_timeout, - ) - try: - return str(result) - except Exception as e: - raise ToolSerializationError( - "You must return a string representation of the tool output, or something we can call str() on" - ) from e - - return FunctionTool( - name=schema.name, - description=schema.description or "", - params_json_schema=schema.params_json_schema, - on_invoke_tool=run_operation, - strict_json_schema=strict_json_schema, - ) - - -def stateless_mcp_server( - name: str, - config: ActivityConfig | None = None, - cache_tools_list: bool = False, - factory_argument: Any | None = None, -) -> "MCPServer": - """A stateless MCP server implementation for Temporal workflows. - - .. warning:: - This API is experimental and may change in future versions. - Use with caution in production environments. - - This uses a TemporalMCPServer of the same name registered with the OpenAIAgents plugin to implement - durable MCP operations statelessly. - - This approach is suitable for simple use cases where connection overhead is acceptable - and you don't need to maintain state between operations. It should be preferred to stateful when possible due to its - superior durability guarantees. - - Args: - name: A string name for the server. Should match that provided in the plugin. - config: Optional activity configuration for MCP operation activities. - Defaults to 1-minute start-to-close timeout. - cache_tools_list: If true, the list of tools will be cached for the duration of the server - factory_argument: Optional argument to be provided to the factory when producing an MCPServer - """ - from temporalio.contrib.openai_agents._mcp import ( - _StatelessMCPServerReference, - ) - - return _StatelessMCPServerReference( - name, config, cache_tools_list, factory_argument - ) - - -def stateful_mcp_server( - name: str, - config: ActivityConfig | None = None, - server_session_config: ActivityConfig | None = None, - factory_argument: Any | None = None, -) -> AbstractAsyncContextManager["MCPServer"]: - """A stateful MCP server implementation for Temporal workflows. - - .. warning:: - This API is experimental and may change in future versions. - Use with caution in production environments. - - This wraps an MCP server to maintain a persistent connection throughout - the workflow execution. It creates a dedicated worker that stays connected to - the MCP server and processes operations on a dedicated task queue. - - This approach is more efficient for workflows that make multiple MCP calls, - as it avoids connection overhead, but requires more resources to maintain - the persistent connection and worker. - - The caller will have to handle cases where the dedicated worker fails, as Temporal is - unable to seamlessly recreate any lost state in that case. - - Args: - name: A string name for the server. Should match that provided in the plugin. - config: Optional activity configuration for MCP operation activities. - Defaults to 1-minute start-to-close and 30-second schedule-to-start timeouts. - server_session_config: Optional activity configuration for the connection activity. - Defaults to 1-hour start-to-close timeout. - factory_argument: Optional argument to be provided to the factory when producing an MCPServer - """ - from temporalio.contrib.openai_agents._mcp import ( - _StatefulMCPServerReference, - ) - - return _StatefulMCPServerReference( - name, config, server_session_config, factory_argument - ) - - -class ToolSerializationError(TemporalError): - """Error that occurs when a tool output could not be serialized. - - .. warning:: - This exception is experimental and may change in future versions. - Use with caution in production environments. - - This exception is raised when a tool (created from an activity or Nexus operation) - returns a value that cannot be properly serialized for use by the OpenAI agent. - All tool outputs must be convertible to strings for the agent to process them. - - The error typically occurs when: - - A tool returns a complex object that doesn't have a meaningful string representation - - The returned object cannot be converted using str() - - Custom serialization is needed but not implemented - - Example: - >>> @activity.defn - >>> def problematic_tool() -> ComplexObject: - ... return ComplexObject() # This might cause ToolSerializationError - - To fix this error, ensure your tool returns string-convertible values or - modify the tool to return a string representation of the result. - """ - - -class AgentsWorkflowError(TemporalError): - """Error that occurs when the agents SDK raises an error which should terminate the calling workflow or update. - - .. warning:: - This exception is experimental and may change in future versions. - Use with caution in production environments. - """ +from temporalio.openai_agents.workflow import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] diff --git a/temporalio/contrib/opentelemetry/README.md b/temporalio/contrib/opentelemetry/README.md new file mode 100644 index 0000000000..b2ca0ed0f7 --- /dev/null +++ b/temporalio/contrib/opentelemetry/README.md @@ -0,0 +1,342 @@ +# OpenTelemetry Integration for Temporal Python SDK + +This package provides OpenTelemetry tracing and metrics integration for Temporal workflows, activities, and other operations. It includes automatic span creation and propagation for distributed tracing, and a `MetricsExporter` for exporting Temporal SDK/Core metrics through the standard OpenTelemetry metrics API, across your Temporal applications. + +## Metrics + +`MetricsExporter` drains a `temporalio.runtime.MetricBuffer` into an OpenTelemetry `MeterProvider`, so Temporal's own SDK/Core metrics (and any custom metrics recorded via `activity.metric_meter()`/`workflow.metric_meter()`) can be exported through the standard OpenTelemetry metrics pipeline (views, resources, any OTel-compatible backend) instead of only through `PrometheusConfig`/`OpenTelemetryConfig`. + +```python +from opentelemetry.sdk.metrics import MeterProvider +from opentelemetry.sdk.metrics.export import ConsoleMetricExporter, PeriodicExportingMetricReader +from temporalio.contrib.opentelemetry import MetricsExporter +from temporalio.runtime import MetricBuffer, Runtime, TelemetryConfig + +buffer = MetricBuffer(10_000) +runtime = Runtime(telemetry=TelemetryConfig(metrics=buffer)) +meter_provider = MeterProvider( + metric_readers=[PeriodicExportingMetricReader(ConsoleMetricExporter())] +) + +async with MetricsExporter(buffer, meter_provider): + client = await Client.connect("localhost:7233", runtime=runtime) + ... +``` + +**Note:** the `Runtime` must be constructed with the buffer attached *before* `MetricsExporter` is started, and the exporter must keep running (it polls on a fixed interval) for as long as metrics should be exported. + +## Overview + +There are **two different approaches** for integrating OpenTelemetry with the Temporal Python SDK: + +1. **🆕 New Approach (Recommended)**: `OpenTelemetryPlugin` - Provides accurate duration spans and direct OpenTelemetry usage within workflows +2. **📊 Legacy Approach**: `TracingInterceptor` - Provides immediate span visibility but with zero-duration workflow spans + +## Quick Start + +### New Approach (OpenTelemetryPlugin) + +```python +import opentelemetry.trace +from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor +from temporalio.contrib.opentelemetry import OpenTelemetryPlugin, create_tracer_provider + +# Create a replay-safe tracer provider +provider = create_tracer_provider() +provider.add_span_processor(SimpleSpanProcessor(ConsoleSpanExporter())) +opentelemetry.trace.set_tracer_provider(provider) + +# Register plugin on CLIENT (automatically applies to workers using this client) +client = await Client.connect( + "localhost:7233", + plugins=[OpenTelemetryPlugin()] +) + +# Workers created with this client automatically get the plugin +worker = Worker( + client, + task_queue="my-task-queue", + workflows=[MyWorkflow], + activities=[my_activity] + # NO NEED to specify plugins here - they come from the client +) +``` + +### Legacy Approach (TracingInterceptor) + +```python +from temporalio.contrib.opentelemetry import TracingInterceptor + +# Register interceptor on CLIENT (automatically applies to workers using this client) +client = await Client.connect( + "localhost:7233", + interceptors=[TracingInterceptor()] +) + +# Workers created with this client automatically get the interceptor +worker = Worker( + client, + task_queue="my-task-queue", + workflows=[MyWorkflow], + activities=[my_activity] + # NO NEED to specify interceptors here - they come from the client +) +``` + +## Detailed Comparison + +### New Approach: OpenTelemetryPlugin + +#### ✅ Advantages: +- **Accurate Duration Spans**: Workflow spans have real durations reflecting actual execution time +- **Direct OpenTelemetry Usage**: Use `opentelemetry.trace.get_tracer()` directly within workflows +- **Better Span Hierarchy**: More accurate parent-child relationships within workflows +- **Workflow Context Access**: Access spans within workflows using `opentelemetry.trace.get_tracer()` + +#### ⚠️ Considerations: +- **Experimental Status**: Subject to breaking changes in future versions +- **Delayed Span Visibility**: Workflow spans only appear after workflow completion +- **Different Trace Structure**: Migration from legacy approach may break dependencies on specific trace structures + +#### Usage Example: +```python +@workflow.defn +class MyWorkflow: + @workflow.run + async def run(self): + # Direct OpenTelemetry usage works correctly + tracer = get_tracer(__name__) + with tracer.start_as_current_span("workflow-operation"): + # This span will have accurate duration + await workflow.execute_activity( + my_activity, + start_to_close_timeout=timedelta(seconds=30) + ) +``` + +### Legacy Approach: TracingInterceptor + +**File**: `temporalio/contrib/opentelemetry/_interceptor.py` + +#### ✅ Advantages: +- **Immediate Span Visibility**: Spans appear as soon as they're created +- **Stable API**: Well-established interface, not subject to experimental changes +- **Workflow Progress Tracking**: Can see workflow spans even before workflow completes + +#### ⚠️ Limitations: +- **Zero-Duration Workflow Spans**: All workflow spans are immediately ended with 0ms duration +- **No Direct OpenTelemetry Usage**: Cannot use standard OpenTelemetry APIs within workflows +- **Limited Workflow Span Creation**: Must use `temporalio.contrib.opentelemetry.workflow.completed_span()` + +#### Usage Example: +```python +@workflow.defn +class MyWorkflow: + @workflow.run + async def run(self): + # Must use Temporal-specific span creation + temporalio.contrib.opentelemetry.workflow.completed_span( + "workflow-operation", + attributes={"custom": "attribute"} + ) + # Standard OpenTelemetry APIs don't work properly here +``` + +## When to Use Each Approach + +### Choose OpenTelemetryPlugin When: +- You need accurate span durations for performance analysis +- You want to use standard OpenTelemetry APIs within workflows +- You're building new applications +- You can tolerate experimental API changes + +### Choose TracingInterceptor When: +- You need immediate visibility into workflow progress +- You have existing dependencies on the current trace structure +- You require a stable, non-experimental API +- You primarily need basic tracing without complex workflow span hierarchies + +## Configuration Options + +### OpenTelemetryPlugin Options + +```python +plugin = OpenTelemetryPlugin( + add_temporal_spans=False # Whether to add additional Temporal-specific spans +) +``` + +### TracingInterceptor Options + +```python +interceptor = TracingInterceptor( + tracer=None, # Custom tracer (defaults to global tracer) + always_create_workflow_spans=False # Create spans even without parent context +) +``` + +## Migration Guide + +### From TracingInterceptor to OpenTelemetryPlugin + +1. **Replace interceptor with plugin on client**: + ```python + # Old + client = await Client.connect( + "localhost:7233", + interceptors=[TracingInterceptor()] + ) + + # New + provider = create_tracer_provider() + opentelemetry.trace.set_tracer_provider(provider) + client = await Client.connect( + "localhost:7233", + plugins=[OpenTelemetryPlugin()] + ) + ``` + +2. **Update workflow span creation**: + ```python + # Old + temporalio.contrib.opentelemetry.workflow.completed_span("my-span") + + # New - use standard OpenTelemetry + tracer = get_tracer(__name__) + with tracer.start_as_current_span("my-span"): + # Your workflow logic + pass + ``` + +3. **Test trace structure changes**: Verify that any monitoring or analysis tools still work with the new trace structure. + +## Advanced Usage + +### Creating Custom Spans in Workflows (New Approach) + +```python +from opentelemetry.trace import get_tracer + +@workflow.defn +class MyWorkflow: + @workflow.run + async def run(self): + tracer = get_tracer(__name__) + + # Create spans with accurate durations + with tracer.start_as_current_span("business-logic") as span: + span.set_attribute("workflow.step", "processing") + + # Nested spans work correctly + with tracer.start_as_current_span("data-validation"): + await self.validate_input() + + await workflow.execute_activity( + process_data, + start_to_close_timeout=timedelta(seconds=60) + ) +``` + +### Custom Span Attributes + +Both approaches support adding custom attributes to spans: + +```python +# Legacy approach +temporalio.contrib.opentelemetry.workflow.completed_span( + "my-operation", + attributes={ + "business.unit": "payments", + "request.id": "req-123" + } +) + +# New approach +with tracer.start_as_current_span("my-operation") as span: + span.set_attributes({ + "business.unit": "payments", + "request.id": "req-123" + }) +``` + +## Replay-Safe Metrics + +For Temporal SDK metrics inside workflows, use `temporalio.workflow.metric_meter()`, +which is already replay-safe. However, third-party libraries (e.g. Google ADK) may +record OpenTelemetry metrics through the process-global meter provider from code +that runs inside workflows. Workflow code re-executes on every replay (cache +eviction, worker restart, redeploy), so a plain global meter provider re-records +those metrics on each replay, inflating counts. + +`ReplaySafeMeterProvider` wraps your meter provider so synchronous instrument +recordings made from workflow code are dropped while the workflow is replaying +history events, mirroring what `create_tracer_provider()` does for spans: + +```python +import opentelemetry.metrics +from opentelemetry.sdk.metrics import MeterProvider +from temporalio.contrib.opentelemetry import ReplaySafeMeterProvider + +# set_meter_provider only takes effect once per process, so this wrapper must +# be the first and only global meter provider set, installed before any +# library records metrics. +opentelemetry.metrics.set_meter_provider( + ReplaySafeMeterProvider(MeterProvider(metric_readers=[my_reader])) +) +``` + +Recordings are first-execution-only, matching `workflow.metric_meter()`: a +retried workflow task re-executes live and can record again. Queries and +update validators are live, once-per-request operations even when they run +while the workflow is replaying, so their recordings are kept. Observable +(asynchronous) instruments and recordings made outside workflows pass through +untouched. + +## Replay-Safe Log Events + +Libraries may also emit OpenTelemetry log records through the process-global +logger provider from workflow code (e.g. Google ADK's `gen_ai.*` events), +which duplicate on every replay the same way. `ReplaySafeLoggerProvider` +wraps your logger provider so records emitted from workflow code are dropped +while the workflow is replaying history events: + +```python +import opentelemetry._logs +from opentelemetry.sdk._logs import LoggerProvider +from opentelemetry.sdk._logs.export import BatchLogRecordProcessor +from temporalio.contrib.opentelemetry import ReplaySafeLoggerProvider + +# set_logger_provider only takes effect once per process, so this wrapper +# must be the first and only global logger provider set, installed before +# any library emits log records. +logger_provider = LoggerProvider() +logger_provider.add_log_record_processor(BatchLogRecordProcessor(my_log_exporter)) +opentelemetry._logs.set_logger_provider(ReplaySafeLoggerProvider(logger_provider)) +``` + +Emissions are first-execution-only: a retried workflow task re-executes live +and can emit again. Queries and update validators are live, once-per-request +operations even when they run while the workflow is replaying, so their +emissions are kept. Emissions outside workflows pass through untouched. + +## Best Practices + +1. **Register on Client**: Always register plugins/interceptors on the client, not the worker, to ensure proper context propagation + +2. **Use create_tracer_provider()**: Always use the provided function to create replay-safe tracer providers when using the new approach + +3. **Set Global Tracer Provider**: Ensure the tracer provider is set globally before creating clients + +4. **Avoid Duplication**: Never register the same plugin/interceptor on both client and worker + +## Troubleshooting + +### Common Issues + +1. **"ReplaySafeTracerProvider required" error**: Make sure you're using `create_tracer_provider()` when using OpenTelemetryPlugin + +2. **Missing spans**: Verify that the tracer provider is set before creating clients, and that plugins/interceptors are registered on the client + +3. **Duplicate spans**: Check that you haven't registered the same plugin/interceptor on both client and worker + +4. **Zero-duration spans**: This is expected behavior with TracingInterceptor for workflow spans diff --git a/temporalio/contrib/opentelemetry/__init__.py b/temporalio/contrib/opentelemetry/__init__.py new file mode 100644 index 0000000000..9a68be3a68 --- /dev/null +++ b/temporalio/contrib/opentelemetry/__init__.py @@ -0,0 +1,39 @@ +"""OpenTelemetry v2 integration for Temporal SDK. + +This package provides OpenTelemetry tracing and metrics integration for +Temporal workflows, activities, and other operations. It includes automatic +span creation and propagation for distributed tracing, a +:py:class:`MetricsExporter` for exporting Temporal SDK/Core metrics through +the standard OpenTelemetry metrics API, and replay-safe wrappers for the +global OpenTelemetry tracer, meter, and logger providers. +""" + +from temporalio.contrib.opentelemetry._interceptor import ( + TracingInterceptor, + TracingWorkflowInboundInterceptor, +) +from temporalio.contrib.opentelemetry._logger_provider import ( + ReplaySafeLoggerProvider, +) +from temporalio.contrib.opentelemetry._meter_provider import ( + ReplaySafeMeterProvider, +) +from temporalio.contrib.opentelemetry._metrics_exporter import MetricsExporter +from temporalio.contrib.opentelemetry._otel_interceptor import OpenTelemetryInterceptor +from temporalio.contrib.opentelemetry._plugin import OpenTelemetryPlugin +from temporalio.contrib.opentelemetry._tracer_provider import ( + ReplaySafeTracerProvider, + create_tracer_provider, +) + +__all__ = [ + "TracingInterceptor", + "TracingWorkflowInboundInterceptor", + "OpenTelemetryInterceptor", + "OpenTelemetryPlugin", + "MetricsExporter", + "ReplaySafeLoggerProvider", + "ReplaySafeMeterProvider", + "ReplaySafeTracerProvider", + "create_tracer_provider", +] diff --git a/temporalio/contrib/opentelemetry/_context.py b/temporalio/contrib/opentelemetry/_context.py new file mode 100644 index 0000000000..a57f8d48d7 --- /dev/null +++ b/temporalio/contrib/opentelemetry/_context.py @@ -0,0 +1,51 @@ +"""Attach OpenTelemetry contexts so that the matching detach is always safe.""" + +from __future__ import annotations + +from collections.abc import Iterator +from contextlib import contextmanager +from contextvars import Token + +import opentelemetry.context +from opentelemetry.context import Context + + +@contextmanager +def attached_context(context: Context | None) -> Iterator[None]: + """Attach ``context`` for the block and detach it afterwards where possible. + + ``None`` attaches nothing. The block's ``finally`` can run in a different + ``contextvars.Context`` than the one that attached: a context manager + abandoned by an evicted workflow is finalized wherever garbage collection + happens to run. The token is not valid there, and + ``opentelemetry.context.detach`` would log "Failed to detach context" even + though there is nothing to detach. Checking that the attached context is + still current does not catch every such case, because OpenTelemetry's + threading instrumentation (enabled by strands, among others) propagates + the same ``Context`` object into new threads. The thread is no test + either: workflow activations move between pool threads while the asyncio + task keeps its ``contextvars.Context``, and those detaches must happen. + Only ``contextvars`` knows which ``Context`` a token belongs to, so + :func:`_detach` performs the reset ``detach`` performs and ignores the + ``ValueError`` raised for a token from another ``Context``. + """ + if context is None: + yield + return + token = opentelemetry.context.attach(context) + try: + yield + finally: + _detach(context, token) + + +def _detach(context: Context, token: Token[Context]) -> bool: + """Detach ``context`` if it is current and ``token`` is valid here.""" + if context is not opentelemetry.context.get_current(): + return False + try: + token.var.reset(token) + except ValueError: + # The token was created in a different contextvars.Context. + return False + return True diff --git a/temporalio/contrib/opentelemetry/_id_generator.py b/temporalio/contrib/opentelemetry/_id_generator.py new file mode 100644 index 0000000000..9aaa00ef12 --- /dev/null +++ b/temporalio/contrib/opentelemetry/_id_generator.py @@ -0,0 +1,72 @@ +import random + +from opentelemetry.sdk.trace.id_generator import IdGenerator +from opentelemetry.trace import ( + INVALID_SPAN_ID, + INVALID_TRACE_ID, +) + +import temporalio.workflow + + +def _get_workflow_random() -> random.Random | None: + if ( + temporalio.workflow.in_workflow() + and not temporalio.workflow.unsafe.is_read_only() + ): + if ( + getattr(temporalio.workflow.instance(), "__temporal_otel_id_random", None) + is None + ): + setattr( + temporalio.workflow.instance(), + "__temporal_otel_id_random", + temporalio.workflow.new_random(), + ) + return getattr(temporalio.workflow.instance(), "__temporal_otel_id_random") + + return None + + +class TemporalIdGenerator(IdGenerator): + """OpenTelemetry ID generator that uses Temporal's deterministic random generator. + + .. warning:: + This class is experimental and may change in future versions. + Use with caution in production environments. + + This generator uses Temporal's workflow-safe random number generator when + inside a workflow execution, ensuring deterministic span and trace IDs + across workflow replays. Falls back to standard random generation outside + of workflows. + """ + + def __init__(self, id_generator: IdGenerator): + """Initialize a TemporalIdGenerator.""" + self._id_generator = id_generator + + def generate_span_id(self) -> int: + """Generate a span ID using Temporal's deterministic random when in workflow. + + Returns: + A 64-bit span ID. + """ + if workflow_random := _get_workflow_random(): + span_id = workflow_random.getrandbits(64) + while span_id == INVALID_SPAN_ID: + span_id = workflow_random.getrandbits(64) + return span_id + return self._id_generator.generate_span_id() + + def generate_trace_id(self) -> int: + """Generate a trace ID using Temporal's deterministic random when in workflow. + + Returns: + A 128-bit trace ID. + """ + if workflow_random := _get_workflow_random(): + trace_id = workflow_random.getrandbits(128) + while trace_id == INVALID_TRACE_ID: + trace_id = workflow_random.getrandbits(128) + return trace_id + return self._id_generator.generate_trace_id() diff --git a/temporalio/contrib/opentelemetry.py b/temporalio/contrib/opentelemetry/_interceptor.py similarity index 90% rename from temporalio/contrib/opentelemetry.py rename to temporalio/contrib/opentelemetry/_interceptor.py index ef1e52bb2c..f503d5ac55 100644 --- a/temporalio/contrib/opentelemetry.py +++ b/temporalio/contrib/opentelemetry/_interceptor.py @@ -33,8 +33,10 @@ import temporalio.client import temporalio.converter import temporalio.exceptions +import temporalio.nexus.system.workflow_service.models import temporalio.worker import temporalio.workflow +from temporalio.contrib.opentelemetry._context import attached_context from temporalio.exceptions import ApplicationError, ApplicationErrorCategory # OpenTelemetry dynamically, lazily chooses its context implementation at @@ -182,8 +184,7 @@ def _start_as_current_span( kind: opentelemetry.trace.SpanKind, context: Context | None = None, ) -> Iterator[None]: - token = opentelemetry.context.attach(context) if context else None - try: + with attached_context(context): with self.tracer.start_as_current_span( name, attributes=attributes, @@ -218,9 +219,6 @@ def _start_as_current_span( ) ) raise - finally: - if token and context is opentelemetry.context.get_current(): - opentelemetry.context.detach(token) def _completed_workflow_span( self, params: _CompletedWorkflowSpanParams @@ -341,6 +339,20 @@ async def start_update_with_start_workflow( return await super().start_update_with_start_workflow(input) + async def start_activity( + self, input: temporalio.client.StartActivityInput + ) -> temporalio.client.ActivityHandle[Any]: + with self.root._start_as_current_span( + f"StartActivity:{input.activity_type}", + attributes={ + "temporalActivityID": input.id, + "temporalActivityType": input.activity_type, + }, + input_with_headers=input, + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + return await super().start_activity(input) + class _TracingActivityInboundInterceptor(temporalio.worker.ActivityInboundInterceptor): def __init__( @@ -355,14 +367,15 @@ async def execute_activity( self, input: temporalio.worker.ExecuteActivityInput ) -> Any: info = temporalio.activity.info() + attributes: dict[str, str] = {"temporalActivityID": info.activity_id} + if info.workflow_id: + attributes["temporalWorkflowID"] = info.workflow_id + if info.workflow_run_id: + attributes["temporalRunID"] = info.workflow_run_id with self.root._start_as_current_span( f"RunActivity:{info.activity_type}", context=self.root._context_from_headers(input.headers), - attributes={ - "temporalWorkflowID": info.workflow_id, - "temporalRunID": info.workflow_run_id, - "temporalActivityID": info.activity_id, - }, + attributes=attributes, kind=opentelemetry.trace.SpanKind.SERVER, ): return await super().execute_activity(input) @@ -418,6 +431,10 @@ class _InputWithStringHeaders(Protocol): headers: Mapping[str, str] | None +class _InputWithModelHeaders(Protocol): + headers: Mapping[str, Any] | None + + class _InputWithOperationContext(Generic[_ContextT], Protocol): ctx: _ContextT @@ -536,8 +553,7 @@ async def handle_query(self, input: temporalio.worker.HandleQueryInput) -> Any: # We need to put this interceptor on the context too context = self._set_on_context(context) # Run under context with new span - token = opentelemetry.context.attach(context) - try: + with attached_context(context): # This won't be created if there was no context header self._completed_span( f"HandleQuery:{input.query}", @@ -547,13 +563,6 @@ async def handle_query(self, input: temporalio.worker.HandleQueryInput) -> Any: kind=opentelemetry.trace.SpanKind.SERVER, ) return await super().handle_query(input) - finally: - # In some exceptional cases this finally is executed with a - # different contextvars.Context than the one the token was created - # on. As such we do a best effort detach to avoid using a mismatched - # token. - if context is opentelemetry.context.get_current(): - opentelemetry.context.detach(token) def handle_update_validator( self, input: temporalio.worker.HandleUpdateInput @@ -624,31 +633,23 @@ def _top_level_workflow_context( success = False exception: Exception | None = None # Run under this context - token = opentelemetry.context.attach(context) - - try: - yield None - success = True - except temporalio.exceptions.FailureError as err: - # We only record the failure errors since those are the only ones - # that lead to workflow completions - exception = err - raise - finally: - # Create a completed span before detaching context - if exception or (success and success_is_complete): - self._completed_span( - f"CompleteWorkflow:{temporalio.workflow.info().workflow_type}", - exception=exception, - kind=opentelemetry.trace.SpanKind.INTERNAL, - ) - - # In some exceptional cases this finally is executed with a - # different contextvars.Context than the one the token was created - # on. As such we do a best effort detach to avoid using a mismatched - # token. - if context is opentelemetry.context.get_current(): - opentelemetry.context.detach(token) + with attached_context(context): + try: + yield None + success = True + except temporalio.exceptions.FailureError as err: + # We only record the failure errors since those are the only ones + # that lead to workflow completions + exception = err + raise + finally: + # Create a completed span before detaching context + if exception or (success and success_is_complete): + self._completed_span( + f"CompleteWorkflow:{temporalio.workflow.info().workflow_type}", + exception=exception, + kind=opentelemetry.trace.SpanKind.INTERNAL, + ) def _context_to_headers( self, headers: Mapping[str, temporalio.api.common.v1.Payload] @@ -669,6 +670,18 @@ def _context_carrier_to_headers( } return headers + def _context_carrier_to_model_headers( + self, + carrier: _CarrierDict, + headers: Mapping[str, Any] | None, + ) -> Mapping[str, Any]: + if carrier: + return { + **(headers or {}), + self.header_key: carrier, + } + return headers or {} + def _completed_span( self, span_name: str, @@ -676,6 +689,7 @@ def _completed_span( link_context_carrier: _CarrierDict | None = None, add_to_outbound: _InputWithHeaders | None = None, add_to_outbound_str: _InputWithStringHeaders | None = None, + add_to_outbound_model: _InputWithModelHeaders | None = None, new_span_even_on_replay: bool = False, additional_attributes: opentelemetry.util.types.Attributes = None, exception: Exception | None = None, @@ -727,6 +741,11 @@ def _completed_span( updated_context_carrier, add_to_outbound_str.headers ) + if add_to_outbound_model: + add_to_outbound_model.headers = self._context_carrier_to_model_headers( + updated_context_carrier, add_to_outbound_model.headers + ) + def _set_on_context( self, context: opentelemetry.context.Context ) -> opentelemetry.context.Context: @@ -815,6 +834,19 @@ async def start_nexus_operation( return await super().start_nexus_operation(input) + async def start_signal_with_start_workflow( + self, + request: temporalio.nexus.system.workflow_service.models.SignalWithStartWorkflowRequest, + ) -> temporalio.workflow.NexusOperationHandle[ + temporalio.nexus.system.workflow_service.models.SignalWithStartWorkflowResponse + ]: + self.root._completed_span( + "SignalWithStartWorkflow", + kind=opentelemetry.trace.SpanKind.CLIENT, + add_to_outbound_model=request, + ) + return await super().start_signal_with_start_workflow(request) + def _carrier_to_nexus_headers( carrier: _CarrierDict, initial: Mapping[str, str] | None = None @@ -826,43 +858,3 @@ def _carrier_to_nexus_headers( else: out[k] = v return out - - -class workflow: - """Contains static methods that are safe to call from within a workflow. - - .. warning:: - Using any other ``opentelemetry`` API could cause non-determinism. - """ - - def __init__(self) -> None: # noqa: D107 - raise NotImplementedError - - @staticmethod - def completed_span( - name: str, - *, - attributes: opentelemetry.util.types.Attributes = None, - exception: Exception | None = None, - ) -> None: - """Create and end an OpenTelemetry span. - - Note, this will only create and record when the workflow is not - replaying and if there is a current span (meaning the client started a - span and this interceptor is configured on the worker and the span is on - the context). - - There is currently no way to create a long-running span or to create a - span that actually spans other code. - - Args: - name: Name of the span. - attributes: Attributes to set on the span if any. Workflow ID and - run ID are automatically added. - exception: Optional exception to record on the span. - """ - interceptor = TracingWorkflowInboundInterceptor._from_context() - if interceptor: - interceptor._completed_span( - name, additional_attributes=attributes, exception=exception - ) diff --git a/temporalio/contrib/opentelemetry/_logger_provider.py b/temporalio/contrib/opentelemetry/_logger_provider.py new file mode 100644 index 0000000000..1410043123 --- /dev/null +++ b/temporalio/contrib/opentelemetry/_logger_provider.py @@ -0,0 +1,138 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any + +# The OpenTelemetry Logs API specification is stable, but opentelemetry-python +# exposes the logs bridge API only under the private opentelemetry._logs +# module path (there is no public opentelemetry.logs as of 1.44; upstream +# stabilization is tracked in opentelemetry-python#3361, open since 2023 with +# the module surface unchanged since 1.26 apart from additive parameters). +# _logs is therefore the import path OpenTelemetry itself documents, until +# the Python SIG promotes it to a public namespace. +from opentelemetry._logs import Logger, LoggerProvider + +from temporalio import workflow + + +def _skip_emitting() -> bool: + # in_workflow() must be evaluated first: is_replaying_history_events() + # requires an active workflow context. The history-events predicate is + # deliberate (not is_replaying()): queries and update validators are live, + # at-most-once-per-request operations even when they execute while the + # workflow is replaying, so their emissions must not be dropped. + return workflow.in_workflow() and workflow.unsafe.is_replaying_history_events() + + +class _ReplaySafeLogger(Logger): + def __init__( + self, + logger: Logger, + name: str, + version: str | None = None, + schema_url: str | None = None, + ) -> None: + super().__init__(name, version=version, schema_url=schema_url) + self._logger = logger + + def __getattr__(self, name: str) -> object: + return getattr(self._logger, name) + + def emit(self, *args: Any, **kwargs: Any) -> None: + # emit's signature differs across the supported opentelemetry-api + # range (a single positional LogRecord through 1.37, keyword fields + # from 1.38), so forward arguments verbatim rather than pinning one + # shape; the wrapped logger comes from the same installed API. + if _skip_emitting(): + # Skip emitting log records during workflow replay to avoid duplicate telemetry + return + self._logger.emit(*args, **kwargs) + + def enabled(self, *args: Any, **kwargs: Any) -> bool: + # Abstract on Logger from opentelemetry-api 1.45, so without this + # override the wrapper cannot be instantiated there. Callers use it to + # skip building records, so it must agree with emit() during replay. + if _skip_emitting(): + return False + enabled = getattr(self._logger, "enabled", None) + if enabled is None: + # Loggers from opentelemetry-api before 1.45 have no enabled(), and + # their callers always emit, so leave the decision to emit(). + return True + return enabled(*args, **kwargs) + + +class ReplaySafeLoggerProvider(LoggerProvider): + """A logger provider that is safe for use during workflow replay. + + .. warning:: + This class is experimental and may change in future versions. + Use with caution in production environments. It wraps the + OpenTelemetry Python logs bridge API, which upstream still ships + under the private ``opentelemetry._logs`` namespace (stabilization + is tracked in opentelemetry-python#3361); if that surface moves when + upstream stabilizes it, this class will follow it in a minor release. + + This logger provider wraps an OpenTelemetry LoggerProvider and drops log + records emitted (``Logger.emit()``) from workflow code while the workflow + is replaying history events. Without this, libraries that emit + OpenTelemetry log records from workflow code (e.g. ``google-adk``'s + ``gen_ai.*`` events) re-emit every record on each replay, duplicating + telemetry. + + Emissions are therefore first-execution-only: a workflow task retry + re-executes live and can emit again. Queries and update validators are + live, at-most-once-per-request operations even when they execute while the + workflow is replaying, so their emissions are kept. Emissions outside + workflows are unaffected. + + Install this as the process-global logger provider before any library + (e.g. ``google-adk``) obtains loggers:: + + opentelemetry._logs.set_logger_provider( + ReplaySafeLoggerProvider(my_logger_provider) + ) + + OpenTelemetry proxy loggers late-bind, so calling ``set_logger_provider`` + after such libraries are imported still routes their loggers through this + wrapper. However, ``set_logger_provider`` only takes effect once per + process, so this wrapper must be the one and only global logger provider + ever set. + """ + + def __init__(self, logger_provider: LoggerProvider) -> None: + """Initialize the replay-safe logger provider. + + Args: + logger_provider: The underlying OpenTelemetry LoggerProvider to wrap. + """ + self._logger_provider = logger_provider + + def __getattr__(self, name: str) -> Any: + """Delegate all other attributes (e.g. ``shutdown``, ``force_flush``) + to the underlying logger provider. + """ + return getattr(self._logger_provider, name) + + def get_logger( + self, + name: str, + version: str | None = None, + schema_url: str | None = None, + attributes: Mapping[str, Any] | None = None, + ) -> Logger: + """Get a replay-safe logger from the underlying provider. + + Args: + name: The name of the instrumenting module. + version: The version string of the instrumenting library. + schema_url: The schema URL for the logger. + attributes: Instrumentation scope attributes for the logger. + Values are typed permissively to support different OpenTelemetry + attribute types across supported versions. + + Returns: + A replay-safe logger instance. + """ + inner = self._logger_provider.get_logger(name, version, schema_url, attributes) + return _ReplaySafeLogger(inner, name, version=version, schema_url=schema_url) diff --git a/temporalio/contrib/opentelemetry/_meter_provider.py b/temporalio/contrib/opentelemetry/_meter_provider.py new file mode 100644 index 0000000000..6d49ccc337 --- /dev/null +++ b/temporalio/contrib/opentelemetry/_meter_provider.py @@ -0,0 +1,277 @@ +from collections.abc import Sequence +from typing import Any + +from opentelemetry.context import Context + +# _Gauge is OpenTelemetry's canonical exported name for the spec-experimental +# synchronous gauge, re-exported by opentelemetry.metrics since 1.23. +from opentelemetry.metrics import ( + CallbackT, + Counter, + Histogram, + Meter, + MeterProvider, + ObservableCounter, + ObservableGauge, + ObservableUpDownCounter, + UpDownCounter, + _Gauge, +) +from opentelemetry.util.types import Attributes + +from temporalio import workflow + + +def _forward_context_kwarg(context: Context | None) -> dict[str, Any]: + # Forward the context only when set: the parameter was added to the + # synchronous instrument methods in opentelemetry 1.28 and older + # instruments raise TypeError when it is passed. + return {} if context is None else {"context": context} + + +def _skip_recording() -> bool: + # in_workflow() must be evaluated first: is_replaying_history_events() + # requires an active workflow context. The history-events predicate is + # deliberate (not is_replaying()): queries and update validators are live, + # at-most-once-per-request operations even when they execute while the + # workflow is replaying, so their recordings must not be dropped. + return workflow.in_workflow() and workflow.unsafe.is_replaying_history_events() + + +class _ReplaySafeCounter(Counter): + def __init__(self, counter: Counter) -> None: + self._counter = counter + + def __getattr__(self, name: str) -> object: + return getattr(self._counter, name) + + def add( + self, + amount: int | float, + attributes: Attributes | None = None, + context: Context | None = None, + ) -> None: + if _skip_recording(): + # Skip recording metrics during workflow replay to avoid duplicate telemetry + return + self._counter.add(amount, attributes, **_forward_context_kwarg(context)) + + +class _ReplaySafeUpDownCounter(UpDownCounter): + def __init__(self, counter: UpDownCounter) -> None: + self._counter = counter + + def __getattr__(self, name: str) -> object: + return getattr(self._counter, name) + + def add( + self, + amount: int | float, + attributes: Attributes | None = None, + context: Context | None = None, + ) -> None: + if _skip_recording(): + # Skip recording metrics during workflow replay to avoid duplicate telemetry + return + self._counter.add(amount, attributes, **_forward_context_kwarg(context)) + + +class _ReplaySafeHistogram(Histogram): + def __init__(self, histogram: Histogram) -> None: + self._histogram = histogram + + def __getattr__(self, name: str) -> object: + return getattr(self._histogram, name) + + def record( + self, + amount: int | float, + attributes: Attributes | None = None, + context: Context | None = None, + ) -> None: + if _skip_recording(): + # Skip recording metrics during workflow replay to avoid duplicate telemetry + return + self._histogram.record(amount, attributes, **_forward_context_kwarg(context)) + + +class _ReplaySafeGauge(_Gauge): + def __init__(self, gauge: _Gauge) -> None: + self._gauge = gauge + + def __getattr__(self, name: str) -> object: + return getattr(self._gauge, name) + + def set( + self, + amount: int | float, + attributes: Attributes | None = None, + context: Context | None = None, + ) -> None: + if _skip_recording(): + # Skip recording metrics during workflow replay to avoid duplicate telemetry + return + self._gauge.set(amount, attributes, **_forward_context_kwarg(context)) + + +class _ReplaySafeMeter(Meter): + # Overrides every Meter method as of opentelemetry-api 1.44. OTel adds new + # instrument kinds as non-abstract no-op defaults on the Meter ABC (e.g. + # create_gauge in 1.23), which __getattr__ cannot intercept, so new Meter + # methods must be audited and overridden here on opentelemetry upgrades. + # tests/contrib/opentelemetry/test_wrapper_abc_drift.py fails when the + # installed opentelemetry-api grows surface not covered here. + def __init__(self, meter: Meter) -> None: + super().__init__(meter.name, version=meter.version, schema_url=meter.schema_url) + self._meter = meter + + def create_counter( + self, + name: str, + unit: str = "", + description: str = "", + ) -> Counter: + return _ReplaySafeCounter(self._meter.create_counter(name, unit, description)) + + def create_up_down_counter( + self, + name: str, + unit: str = "", + description: str = "", + ) -> UpDownCounter: + return _ReplaySafeUpDownCounter( + self._meter.create_up_down_counter(name, unit, description) + ) + + def create_histogram( + self, + name: str, + unit: str = "", + description: str = "", + *, + explicit_bucket_boundaries_advisory: Sequence[float] | None = None, + ) -> Histogram: + # Forward the advisory only when set: the parameter was added in + # opentelemetry 1.30 and unconditionally forwarding it raises TypeError + # on older APIs still within the supported version range. + kwargs: dict[str, Any] = {} + if explicit_bucket_boundaries_advisory is not None: + kwargs["explicit_bucket_boundaries_advisory"] = ( + explicit_bucket_boundaries_advisory + ) + return _ReplaySafeHistogram( + self._meter.create_histogram(name, unit, description, **kwargs) + ) + + def create_gauge( + self, + name: str, + unit: str = "", + description: str = "", + ) -> _Gauge: + return _ReplaySafeGauge(self._meter.create_gauge(name, unit, description)) + + # Observable instruments pass through unwrapped: their callbacks run on the + # metric reader's collect thread, never inside workflow code. + + def create_observable_counter( + self, + name: str, + callbacks: Sequence[CallbackT] | None = None, + unit: str = "", + description: str = "", + ) -> ObservableCounter: + return self._meter.create_observable_counter(name, callbacks, unit, description) + + def create_observable_gauge( + self, + name: str, + callbacks: Sequence[CallbackT] | None = None, + unit: str = "", + description: str = "", + ) -> ObservableGauge: + return self._meter.create_observable_gauge(name, callbacks, unit, description) + + def create_observable_up_down_counter( + self, + name: str, + callbacks: Sequence[CallbackT] | None = None, + unit: str = "", + description: str = "", + ) -> ObservableUpDownCounter: + return self._meter.create_observable_up_down_counter( + name, callbacks, unit, description + ) + + +class ReplaySafeMeterProvider(MeterProvider): + """A meter provider that is safe for use during workflow replay. + + .. warning:: + This class is experimental and may change in future versions. + Use with caution in production environments. + + This meter provider wraps an OpenTelemetry MeterProvider and drops + synchronous instrument recordings (counter ``add()``, up-down counter + ``add()``, histogram ``record()``, and gauge ``set()``) made from workflow + code while the workflow is replaying history events. Without this, + libraries that record metrics from workflow code (e.g. ``google-adk``) + re-record every measurement on each replay, inflating counts. + + Recordings are therefore first-execution-only, matching + :py:meth:`temporalio.workflow.metric_meter`: a workflow task retry + re-executes live and can record again. Queries and update validators are + live, at-most-once-per-request operations even when they execute while the + workflow is replaying, so their recordings are kept. Observable + (asynchronous) instruments pass through untouched since their callbacks + run on the metric reader's collect thread, never inside workflow code. + Recordings outside workflows are unaffected. + + Install this as the process-global meter provider before any library + (e.g. ``google-adk``) creates instruments:: + + opentelemetry.metrics.set_meter_provider( + ReplaySafeMeterProvider(my_meter_provider) + ) + + OpenTelemetry proxy meters late-bind, so calling ``set_meter_provider`` + after such libraries are imported still routes their instruments through + this wrapper. However, ``set_meter_provider`` only takes effect once per + process, so this wrapper must be the one and only global meter provider + ever set. + """ + + def __init__(self, meter_provider: MeterProvider) -> None: + """Initialize the replay-safe meter provider. + + Args: + meter_provider: The underlying OpenTelemetry MeterProvider to wrap. + """ + self._meter_provider = meter_provider + + def __getattr__(self, name: str) -> Any: + """Delegate all other attributes (e.g. ``shutdown``, ``force_flush``) + to the underlying meter provider. + """ + return getattr(self._meter_provider, name) + + def get_meter( + self, + name: str, + version: str | None = None, + schema_url: str | None = None, + attributes: Attributes | None = None, + ) -> Meter: + """Get a replay-safe meter from the underlying provider. + + Args: + name: The name of the instrumenting module. + version: The version string of the instrumenting library. + schema_url: The schema URL for the meter. + attributes: Additional attributes for the meter. + + Returns: + A replay-safe meter instance. + """ + inner = self._meter_provider.get_meter(name, version, schema_url, attributes) + return _ReplaySafeMeter(inner) diff --git a/temporalio/contrib/opentelemetry/_metrics_exporter.py b/temporalio/contrib/opentelemetry/_metrics_exporter.py new file mode 100644 index 0000000000..8a6e5bd690 --- /dev/null +++ b/temporalio/contrib/opentelemetry/_metrics_exporter.py @@ -0,0 +1,275 @@ +"""OpenTelemetry metrics exporter built on :py:class:`temporalio.runtime.MetricBuffer`.""" + +import asyncio +import contextlib +import logging +import threading +from collections.abc import Callable, Iterable, Mapping +from dataclasses import dataclass, field +from datetime import timedelta + +import opentelemetry.metrics +import opentelemetry.util.types + +import temporalio.runtime + +logger = logging.getLogger(__name__) + + +@dataclass +class _GaugeState: + lock: threading.Lock = field(default_factory=threading.Lock) + # Keyed by attribute values so repeated updates for the same attribute set + # overwrite rather than accumulate -- gauges are "latest value wins", + # unlike counters. + last_values: dict[ + frozenset[tuple[str, opentelemetry.util.types.AttributeValue]], + tuple[Mapping[str, opentelemetry.util.types.AttributeValue], int | float], + ] = field(default_factory=dict) + + +@dataclass +class _Instrument: + kind: temporalio.runtime.BufferedMetricKind + counter: opentelemetry.metrics.Counter | None = None + histogram: opentelemetry.metrics.Histogram | None = None + gauge_state: "_GaugeState | None" = None + + +def _make_gauge_callback( + state: _GaugeState, +) -> Callable[ + [opentelemetry.metrics.CallbackOptions], + Iterable[opentelemetry.metrics.Observation], +]: + # OTel invokes observable-gauge callbacks from its own export thread, which + # runs concurrently with the drain loop mutating last_values -- hence the + # lock on both sides. + def callback( + _options: opentelemetry.metrics.CallbackOptions, + ) -> Iterable[opentelemetry.metrics.Observation]: + with state.lock: + return [ + opentelemetry.metrics.Observation(value, attributes=dict(attrs)) + for attrs, value in state.last_values.values() + ] + + return callback + + +class MetricsExporter: + """Exports metrics recorded via a :py:class:`temporalio.runtime.MetricBuffer` + to an OpenTelemetry :py:class:`opentelemetry.metrics.MeterProvider`. + + .. warning:: + This class is experimental and may change in future versions. + Use with caution in production environments. + + This must be started (via :py:meth:`run` or ``async with``) after the + :py:class:`temporalio.runtime.Runtime` referencing ``buffer`` has been + constructed, and it must be kept running for as long as metrics should be + exported. It drains the buffer on a fixed interval; per + :py:class:`temporalio.runtime.MetricBuffer`, updates are dropped (with an + error logged by Core) if the buffer is not drained regularly. + + Example:: + + from datetime import timedelta + + from opentelemetry.sdk.metrics import MeterProvider + from opentelemetry.sdk.metrics.export import ( + ConsoleMetricExporter, + PeriodicExportingMetricReader, + ) + + from temporalio.client import Client + from temporalio.contrib.opentelemetry import MetricsExporter + from temporalio.runtime import MetricBuffer, Runtime, TelemetryConfig + + buffer = MetricBuffer(10_000) + runtime = Runtime(telemetry=TelemetryConfig(metrics=buffer)) + meter_provider = MeterProvider( + metric_readers=[ + PeriodicExportingMetricReader( + ConsoleMetricExporter(), export_interval_millis=5000 + ) + ] + ) + + async with MetricsExporter(buffer, meter_provider): + client = await Client.connect("localhost:7233", runtime=runtime) + ... + """ + + def __init__( + self, + buffer: temporalio.runtime.MetricBuffer, + meter_provider: opentelemetry.metrics.MeterProvider | None = None, + *, + meter_name: str = "temporalio", + meter_version: str | None = None, + poll_interval: timedelta = timedelta(seconds=1), + on_error: Callable[[Exception], None] | None = None, + ) -> None: + """Create an exporter that drains ``buffer`` into ``meter_provider``. + + Args: + buffer: The buffer to drain. Must already be (or about to be) set + as the ``metrics`` of a + :py:class:`temporalio.runtime.TelemetryConfig` on a + constructed :py:class:`temporalio.runtime.Runtime`. + meter_provider: The provider to create instruments on. Defaults to + :py:func:`opentelemetry.metrics.get_meter_provider` (the + global provider) if not given. + meter_name: Name passed to ``get_meter`` on the provider. + meter_version: Version passed to ``get_meter`` on the provider. + poll_interval: How often to drain the buffer. Must be reasonably + frequent -- see the warning on + :py:class:`temporalio.runtime.MetricBuffer`. + on_error: Optional callback invoked (in addition to logging) when + draining the buffer or applying an individual update fails. + If this callback itself raises, that is logged and ignored. + """ + self._buffer = buffer + self._meter = ( + meter_provider or opentelemetry.metrics.get_meter_provider() + ).get_meter(meter_name, meter_version) + self._poll_interval = poll_interval + self._on_error = on_error + self._instruments: dict[ + tuple[str, temporalio.runtime.BufferedMetricKind], _Instrument + ] = {} + self._started = False + self._shutdown_event = asyncio.Event() + self._run_complete_event = asyncio.Event() + self._run_task: asyncio.Task | None = None + + async def run(self) -> None: + """Drain and export on ``poll_interval`` until :py:meth:`shutdown` is called. + + Raises: + RuntimeError: If ``buffer`` was never attached to a constructed + :py:class:`temporalio.runtime.Runtime`, or if this is called + while already running. + """ + if self._started: + raise RuntimeError("MetricsExporter is already running") + self._started = True + self._run_complete_event.clear() + try: + while not self._shutdown_event.is_set(): + self._drain_once() + with contextlib.suppress(asyncio.TimeoutError): + await asyncio.wait_for( + self._shutdown_event.wait(), + timeout=self._poll_interval.total_seconds(), + ) + # Final drain so nothing recorded right before shutdown is lost. + self._drain_once() + finally: + self._started = False + # Clear here (rather than at the top of this method) so a + # shutdown() requested before this run() got a chance to start + # is still observed on the loop's first check above -- clearing + # up front would silently erase that pending request and poll + # forever, since shutdown() only sets the event once. + self._shutdown_event.clear() + self._run_complete_event.set() + + async def shutdown(self) -> None: + """Stop :py:meth:`run` (including a final drain) and wait for it to finish.""" + self._shutdown_event.set() + await self._run_complete_event.wait() + + async def __aenter__(self) -> "MetricsExporter": + """Start :py:meth:`run` as a background task.""" + self._run_task = asyncio.ensure_future(self.run()) + return self + + async def __aexit__(self, *exc_info: object) -> None: + """Call :py:meth:`shutdown` and await the background task.""" + await self.shutdown() + if self._run_task: + await self._run_task + + def _drain_once(self) -> None: + try: + updates = self._buffer.retrieve_updates() + except RuntimeError: + # Buffer was never attached to a constructed Runtime -- this is a + # setup error, not a transient failure, so it should propagate + # rather than spin silently and drop metrics forever. + raise + except Exception as err: + self._handle_error(err) + return + + for update in updates: + try: + self._apply_update(update) + except Exception as err: + self._handle_error(err) + + def _handle_error(self, err: Exception) -> None: + logger.exception("Error exporting buffered Temporal metrics") + if self._on_error: + try: + self._on_error(err) + except Exception: + logger.exception("on_error handler failed") + + def _apply_update(self, update: temporalio.runtime.BufferedMetricUpdate) -> None: + instrument = self._get_or_create_instrument(update.metric) + attributes: dict[str, opentelemetry.util.types.AttributeValue] = dict( + update.attributes + ) + + if instrument.kind == temporalio.runtime.BUFFERED_METRIC_KIND_COUNTER: + assert instrument.counter is not None + instrument.counter.add(update.value, attributes=attributes) + elif instrument.kind == temporalio.runtime.BUFFERED_METRIC_KIND_HISTOGRAM: + assert instrument.histogram is not None + instrument.histogram.record(update.value, attributes=attributes) + elif instrument.kind == temporalio.runtime.BUFFERED_METRIC_KIND_GAUGE: + assert instrument.gauge_state is not None + with instrument.gauge_state.lock: + instrument.gauge_state.last_values[frozenset(attributes.items())] = ( + attributes, + update.value, + ) + else: + raise ValueError(f"Unrecognized buffered metric kind: {instrument.kind}") + + def _get_or_create_instrument( + self, metric: temporalio.runtime.BufferedMetric + ) -> _Instrument: + key = (metric.name, metric.kind) + instrument = self._instruments.get(key) + if instrument is not None: + return instrument + + unit = metric.unit or "" + description = metric.description or "" + instrument = _Instrument(kind=metric.kind) + if metric.kind == temporalio.runtime.BUFFERED_METRIC_KIND_COUNTER: + instrument.counter = self._meter.create_counter( + metric.name, unit=unit, description=description + ) + elif metric.kind == temporalio.runtime.BUFFERED_METRIC_KIND_HISTOGRAM: + instrument.histogram = self._meter.create_histogram( + metric.name, unit=unit, description=description + ) + elif metric.kind == temporalio.runtime.BUFFERED_METRIC_KIND_GAUGE: + gauge_state = _GaugeState() + instrument.gauge_state = gauge_state + self._meter.create_observable_gauge( + metric.name, + callbacks=[_make_gauge_callback(gauge_state)], + unit=unit, + description=description, + ) + else: + raise ValueError(f"Unrecognized buffered metric kind: {metric.kind}") + + self._instruments[key] = instrument + return instrument diff --git a/temporalio/contrib/opentelemetry/_otel_interceptor.py b/temporalio/contrib/opentelemetry/_otel_interceptor.py new file mode 100644 index 0000000000..5207095dc3 --- /dev/null +++ b/temporalio/contrib/opentelemetry/_otel_interceptor.py @@ -0,0 +1,600 @@ +"""OpenTelemetry interceptor that creates/propagates spans.""" + +from __future__ import annotations + +from collections.abc import Iterator, Mapping +from contextlib import contextmanager +from typing import ( + Any, + NoReturn, + TypeAlias, +) + +import nexusrpc.handler +import opentelemetry.baggage.propagation +import opentelemetry.context +import opentelemetry.propagators.composite +import opentelemetry.propagators.textmap +import opentelemetry.trace +import opentelemetry.trace.propagation.tracecontext +import opentelemetry.util.types +from opentelemetry.context import Context +from opentelemetry.trace import ( + Status, + StatusCode, + Tracer, + get_tracer, + get_tracer_provider, +) +from typing_extensions import Protocol + +import temporalio.activity +import temporalio.api.common.v1 +import temporalio.client +import temporalio.converter +import temporalio.nexus.system.workflow_service.models +import temporalio.worker +import temporalio.workflow +from temporalio.contrib.opentelemetry._context import attached_context +from temporalio.contrib.opentelemetry._tracer_provider import ( + ReplaySafeTracerProvider, +) +from temporalio.exceptions import ApplicationError, ApplicationErrorCategory + +# OpenTelemetry dynamically, lazily chooses its context implementation at +# runtime. When first accessed, they use pkg_resources.iter_entry_points + load. +# The load uses built-in open() which we don't allow in sandbox mode at runtime, +# only import time. Therefore if the first use of a OTel context is inside the +# sandbox, which it may be for a workflow worker, this will fail. So instead we +# eagerly reference it here to force loading at import time instead of lazily. +opentelemetry.context.get_current() + +default_text_map_propagator = opentelemetry.propagators.composite.CompositePropagator( + [ + opentelemetry.trace.propagation.tracecontext.TraceContextTextMapPropagator(), + opentelemetry.baggage.propagation.W3CBaggagePropagator(), + ] +) +"""Default text map propagator used by :py:class:`TracingInterceptor`.""" + +_CarrierDict: TypeAlias = dict[str, opentelemetry.propagators.textmap.CarrierValT] + + +def _context_to_headers( + headers: Mapping[str, temporalio.api.common.v1.Payload], +) -> Mapping[str, temporalio.api.common.v1.Payload]: + carrier: _CarrierDict = {} + default_text_map_propagator.inject(carrier) + if carrier: + headers = { + **headers, + "_tracer-data": temporalio.converter.PayloadConverter.default.to_payloads( + [carrier] + )[0], + } + return headers + + +def _context_to_nexus_headers(headers: Mapping[str, str]) -> Mapping[str, str]: + carrier: _CarrierDict = {} + default_text_map_propagator.inject(carrier) + if carrier: + out = {**headers} if headers else {} + for k, v in carrier.items(): + if isinstance(v, list): + out[k] = ",".join(v) + else: + out[k] = v + return out + else: + return headers + + +def _headers_to_context( + headers: Mapping[str, temporalio.api.common.v1.Payload], +) -> Context: + context_header = headers.get("_tracer-data") + if context_header: + context_carrier: _CarrierDict = ( + temporalio.converter.PayloadConverter.default.from_payloads( + [context_header] + )[0] + ) + + context = default_text_map_propagator.extract(context_carrier) + else: + context = opentelemetry.context.Context() + return context + + +def _nexus_headers_to_context(headers: Mapping[str, str]) -> Context: + context = default_text_map_propagator.extract(headers) + return context + + +@contextmanager +def _maybe_span( + tracer: Tracer, + name: str, + *, + add_temporal_spans: bool, + attributes: opentelemetry.util.types.Attributes, + kind: opentelemetry.trace.SpanKind, + context: Context | None = None, +) -> Iterator[None]: + if not add_temporal_spans: + yield + return + + with attached_context(context): + with tracer.start_as_current_span( + name, + attributes=attributes, + kind=kind, + context=context, + set_status_on_exception=False, + ) as span: + try: + yield + except Exception as exc: + if ( + not isinstance(exc, ApplicationError) + or exc.category != ApplicationErrorCategory.BENIGN + ): + span.set_status( + Status( + status_code=StatusCode.ERROR, + description=f"{type(exc).__name__}: {exc}", + ) + ) + raise + + +class OpenTelemetryInterceptor( + temporalio.client.Interceptor, temporalio.worker.Interceptor +): + """Interceptor that supports client and worker OpenTelemetry span creation + and propagation. + + .. warning:: + This class is experimental and may change in future versions. + Use with caution in production environments. + + This should be created and used for ``interceptors`` on the + :py:meth:`temporalio.client.Client.connect` call to apply to all client + calls and worker calls using that client. To only apply to workers, set as + worker creation option instead of in client. + """ + + def __init__( # type: ignore[reportMissingSuperCall] + self, + add_temporal_spans: bool = False, + ) -> None: + """Initialize a OpenTelemetry tracing interceptor.""" + self._add_temporal_spans = add_temporal_spans + + def intercept_client( + self, next: temporalio.client.OutboundInterceptor + ) -> temporalio.client.OutboundInterceptor: + """Implementation of + :py:meth:`temporalio.client.Interceptor.intercept_client`. + """ + return _TracingClientOutboundInterceptor(next, self._add_temporal_spans) + + def intercept_activity( + self, next: temporalio.worker.ActivityInboundInterceptor + ) -> temporalio.worker.ActivityInboundInterceptor: + """Implementation of + :py:meth:`temporalio.worker.Interceptor.intercept_activity`. + """ + return _TracingActivityInboundInterceptor(next, self._add_temporal_spans) + + def workflow_interceptor_class( + self, input: temporalio.worker.WorkflowInterceptorClassInput + ) -> type[_TracingWorkflowInboundInterceptor]: + """Implementation of + :py:meth:`temporalio.worker.Interceptor.workflow_interceptor_class`. + """ + provider = get_tracer_provider() + if not isinstance(provider, ReplaySafeTracerProvider): + raise ValueError( + "When using OpenTelemetryPlugin, the global trace provider must be a ReplaySafeTracerProvider. Use create_tracer_provider to create one." + ) + + class InterceptorWithState(_TracingWorkflowInboundInterceptor): + _add_temporal_spans = self._add_temporal_spans + + return InterceptorWithState + + def intercept_nexus_operation( + self, next: temporalio.worker.NexusOperationInboundInterceptor + ) -> temporalio.worker.NexusOperationInboundInterceptor: + """Implementation of + :py:meth:`temporalio.worker.Interceptor.intercept_nexus_operation`. + """ + return _TracingNexusOperationInboundInterceptor(next, self._add_temporal_spans) + + +class _TracingClientOutboundInterceptor(temporalio.client.OutboundInterceptor): + def __init__( + self, + next: temporalio.client.OutboundInterceptor, + add_temporal_spans: bool, + ) -> None: + super().__init__(next) + self._add_temporal_spans = add_temporal_spans + + async def start_workflow( + self, input: temporalio.client.StartWorkflowInput + ) -> temporalio.client.WorkflowHandle[Any, Any]: + prefix = ( + "StartWorkflow" if not input.start_signal else "SignalWithStartWorkflow" + ) + with _maybe_span( + get_tracer(__name__), + f"{prefix}:{input.workflow}", + add_temporal_spans=self._add_temporal_spans, + attributes={"temporalWorkflowID": input.id}, + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_headers(input.headers) + return await super().start_workflow(input) + + async def query_workflow(self, input: temporalio.client.QueryWorkflowInput) -> Any: + with _maybe_span( + get_tracer(__name__), + f"QueryWorkflow:{input.query}", + add_temporal_spans=self._add_temporal_spans, + attributes={"temporalWorkflowID": input.id}, + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_headers(input.headers) + return await super().query_workflow(input) + + async def signal_workflow( + self, input: temporalio.client.SignalWorkflowInput + ) -> None: + with _maybe_span( + get_tracer(__name__), + f"SignalWorkflow:{input.signal}", + add_temporal_spans=self._add_temporal_spans, + attributes={"temporalWorkflowID": input.id}, + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_headers(input.headers) + return await super().signal_workflow(input) + + async def start_workflow_update( + self, input: temporalio.client.StartWorkflowUpdateInput + ) -> temporalio.client.WorkflowUpdateHandle[Any]: + with _maybe_span( + get_tracer(__name__), + f"StartWorkflowUpdate:{input.update}", + add_temporal_spans=self._add_temporal_spans, + attributes={"temporalWorkflowID": input.id}, + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_headers(input.headers) + return await super().start_workflow_update(input) + + async def start_update_with_start_workflow( + self, input: temporalio.client.StartWorkflowUpdateWithStartInput + ) -> temporalio.client.WorkflowUpdateHandle[Any]: + attrs = { + "temporalWorkflowID": input.start_workflow_input.id, + } + if input.update_workflow_input.update_id is not None: + attrs["temporalUpdateID"] = input.update_workflow_input.update_id + + with _maybe_span( + get_tracer(__name__), + f"StartUpdateWithStartWorkflow:{input.start_workflow_input.workflow}", + add_temporal_spans=self._add_temporal_spans, + attributes=attrs, + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.start_workflow_input.headers = _context_to_headers( + input.start_workflow_input.headers + ) + input.update_workflow_input.headers = _context_to_headers( + input.update_workflow_input.headers + ) + return await super().start_update_with_start_workflow(input) + + async def start_activity( + self, input: temporalio.client.StartActivityInput + ) -> temporalio.client.ActivityHandle[Any]: + with _maybe_span( + get_tracer(__name__), + f"StartActivity:{input.activity_type}", + add_temporal_spans=self._add_temporal_spans, + attributes={ + "temporalActivityID": input.id, + "temporalActivityType": input.activity_type, + }, + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_headers(input.headers) + return await super().start_activity(input) + + +class _TracingActivityInboundInterceptor(temporalio.worker.ActivityInboundInterceptor): + def __init__( + self, + next: temporalio.worker.ActivityInboundInterceptor, + add_temporal_spans: bool, + ) -> None: + super().__init__(next) + self._add_temporal_spans = add_temporal_spans + + async def execute_activity( + self, input: temporalio.worker.ExecuteActivityInput + ) -> Any: + context = _headers_to_context(input.headers) + with attached_context(context): + info = temporalio.activity.info() + with _maybe_span( + get_tracer(__name__), + f"RunActivity:{info.activity_type}", + add_temporal_spans=self._add_temporal_spans, + attributes={ + "temporalWorkflowID": info.workflow_id or "", + "temporalRunID": info.workflow_run_id or "", + "temporalActivityID": info.activity_id, + }, + kind=opentelemetry.trace.SpanKind.SERVER, + ): + return await super().execute_activity(input) + + +class _TracingNexusOperationInboundInterceptor( + temporalio.worker.NexusOperationInboundInterceptor +): + def __init__( + self, + next: temporalio.worker.NexusOperationInboundInterceptor, + add_temporal_spans: bool, + ) -> None: + super().__init__(next) + self._add_temporal_spans = add_temporal_spans + + @contextmanager + def _top_level_context(self, headers: Mapping[str, str]) -> Iterator[None]: + context = _nexus_headers_to_context(headers) + with attached_context(context): + yield + + async def execute_nexus_operation_start( + self, input: temporalio.worker.ExecuteNexusOperationStartInput + ) -> ( + nexusrpc.handler.StartOperationResultSync[Any] + | nexusrpc.handler.StartOperationResultAsync + ): + with self._top_level_context(input.ctx.headers): + with _maybe_span( + get_tracer(__name__), + f"RunStartNexusOperationHandler:{input.ctx.service}/{input.ctx.operation}", + add_temporal_spans=self._add_temporal_spans, + attributes={}, + kind=opentelemetry.trace.SpanKind.SERVER, + ): + return await self.next.execute_nexus_operation_start(input) + + async def execute_nexus_operation_cancel( + self, input: temporalio.worker.ExecuteNexusOperationCancelInput + ) -> None: + with self._top_level_context(input.ctx.headers): + with _maybe_span( + get_tracer(__name__), + f"RunCancelNexusOperationHandler:{input.ctx.service}/{input.ctx.operation}", + add_temporal_spans=self._add_temporal_spans, + attributes={}, + kind=opentelemetry.trace.SpanKind.SERVER, + ): + return await self.next.execute_nexus_operation_cancel(input) + + +class _InputWithHeaders(Protocol): + headers: Mapping[str, temporalio.api.common.v1.Payload] + + +class _TracingWorkflowInboundInterceptor(temporalio.worker.WorkflowInboundInterceptor): + """Tracing interceptor for workflow calls.""" + + _add_temporal_spans: bool = False + + def __init__(self, next: temporalio.worker.WorkflowInboundInterceptor) -> None: + """Initialize a tracing workflow interceptor.""" + super().__init__(next) + + def init(self, outbound: temporalio.worker.WorkflowOutboundInterceptor) -> None: + """Implementation of + :py:meth:`temporalio.worker.WorkflowInboundInterceptor.init`. + """ + super().init( + _TracingWorkflowOutboundInterceptor(outbound, self._add_temporal_spans) + ) + + @contextmanager + def _workflow_maybe_span(self, name: str) -> Iterator[None]: + info = temporalio.workflow.info() + attributes: dict[str, opentelemetry.util.types.AttributeValue] = { + "temporalWorkflowID": info.workflow_id, + "temporalRunID": info.run_id, + } + with _maybe_span( + get_tracer(__name__), + name, + add_temporal_spans=self._add_temporal_spans, + attributes=attributes, + kind=opentelemetry.trace.SpanKind.SERVER, + ): + yield + + async def execute_workflow( + self, input: temporalio.worker.ExecuteWorkflowInput + ) -> Any: + """Implementation of + :py:meth:`temporalio.worker.WorkflowInboundInterceptor.execute_workflow`. + """ + with self._top_level_workflow_context(input): + with self._workflow_maybe_span( + f"RunWorkflow:{temporalio.workflow.info().workflow_type}" + ): + return await super().execute_workflow(input) + + async def handle_signal(self, input: temporalio.worker.HandleSignalInput) -> None: + """Implementation of + :py:meth:`temporalio.worker.WorkflowInboundInterceptor.handle_signal`. + """ + with self._top_level_workflow_context(input): + with self._workflow_maybe_span( + f"HandleSignal:{input.signal}", + ): + await super().handle_signal(input) + + async def handle_query(self, input: temporalio.worker.HandleQueryInput) -> Any: + """Implementation of + :py:meth:`temporalio.worker.WorkflowInboundInterceptor.handle_query`. + """ + with self._top_level_workflow_context(input): + with self._workflow_maybe_span( + f"HandleQuery:{input.query}", + ): + return await super().handle_query(input) + + def handle_update_validator( + self, input: temporalio.worker.HandleUpdateInput + ) -> None: + """Implementation of + :py:meth:`temporalio.worker.WorkflowInboundInterceptor.handle_update_validator`. + """ + with self._top_level_workflow_context(input): + with self._workflow_maybe_span( + f"ValidateUpdate:{input.update}", + ): + super().handle_update_validator(input) + + async def handle_update_handler( + self, input: temporalio.worker.HandleUpdateInput + ) -> Any: + """Implementation of + :py:meth:`temporalio.worker.WorkflowInboundInterceptor.handle_update_handler`. + """ + with self._top_level_workflow_context(input): + with self._workflow_maybe_span( + f"HandleUpdate:{input.update}", + ): + return await super().handle_update_handler(input) + + @contextmanager + def _top_level_workflow_context(self, input: _InputWithHeaders) -> Iterator[None]: + context = _headers_to_context(input.headers) + with attached_context(context): + yield + + +class _TracingWorkflowOutboundInterceptor( + temporalio.worker.WorkflowOutboundInterceptor +): + def __init__( + self, + next: temporalio.worker.WorkflowOutboundInterceptor, + add_temporal_spans: bool, + ) -> None: + super().__init__(next) + self._add_temporal_spans = add_temporal_spans + + @contextmanager + def _workflow_maybe_span( + self, name: str, kind: opentelemetry.trace.SpanKind + ) -> Iterator[None]: + info = temporalio.workflow.info() + attributes: dict[str, opentelemetry.util.types.AttributeValue] = { + "temporalWorkflowID": info.workflow_id, + "temporalRunID": info.run_id, + } + with _maybe_span( + get_tracer(__name__), + name, + add_temporal_spans=self._add_temporal_spans, + attributes=attributes, + kind=kind, + ): + yield + + def continue_as_new(self, input: temporalio.worker.ContinueAsNewInput) -> NoReturn: + input.headers = _context_to_headers(input.headers) + super().continue_as_new(input) + + async def signal_child_workflow( + self, input: temporalio.worker.SignalChildWorkflowInput + ) -> None: + with self._workflow_maybe_span( + f"SignalChildWorkflow:{input.signal}", + kind=opentelemetry.trace.SpanKind.SERVER, + ): + input.headers = _context_to_headers(input.headers) + await super().signal_child_workflow(input) + + async def signal_external_workflow( + self, input: temporalio.worker.SignalExternalWorkflowInput + ) -> None: + with self._workflow_maybe_span( + f"SignalExternalWorkflow:{input.signal}", + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_headers(input.headers) + await super().signal_external_workflow(input) + + def start_activity( + self, input: temporalio.worker.StartActivityInput + ) -> temporalio.workflow.ActivityHandle: + with self._workflow_maybe_span( + f"StartActivity:{input.activity}", + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_headers(input.headers) + return super().start_activity(input) + + async def start_child_workflow( + self, input: temporalio.worker.StartChildWorkflowInput + ) -> temporalio.workflow.ChildWorkflowHandle: + with self._workflow_maybe_span( + f"StartChildWorkflow:{input.workflow}", + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_headers(input.headers) + return await super().start_child_workflow(input) + + def start_local_activity( + self, input: temporalio.worker.StartLocalActivityInput + ) -> temporalio.workflow.ActivityHandle: + with self._workflow_maybe_span( + f"StartActivity:{input.activity}", + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_headers(input.headers) + return super().start_local_activity(input) + + async def start_nexus_operation( + self, input: temporalio.worker.StartNexusOperationInput[Any, Any] + ) -> temporalio.workflow.NexusOperationHandle[Any]: + with self._workflow_maybe_span( + f"StartNexusOperation:{input.service}/{input.operation_name}", + kind=opentelemetry.trace.SpanKind.CLIENT, + ): + input.headers = _context_to_nexus_headers(input.headers or {}) + return await super().start_nexus_operation(input) + + async def start_signal_with_start_workflow( + self, + request: temporalio.nexus.system.workflow_service.models.SignalWithStartWorkflowRequest, + ) -> temporalio.workflow.NexusOperationHandle[ + temporalio.nexus.system.workflow_service.models.SignalWithStartWorkflowResponse + ]: + with self._workflow_maybe_span( + "SignalWithStartWorkflow", kind=opentelemetry.trace.SpanKind.CLIENT + ): + request.headers = _context_to_headers(request.headers or {}) + return await super().start_signal_with_start_workflow(request) diff --git a/temporalio/contrib/opentelemetry/_plugin.py b/temporalio/contrib/opentelemetry/_plugin.py new file mode 100644 index 0000000000..2537c1776a --- /dev/null +++ b/temporalio/contrib/opentelemetry/_plugin.py @@ -0,0 +1,55 @@ +import dataclasses + +from temporalio.contrib.opentelemetry import OpenTelemetryInterceptor +from temporalio.plugin import SimplePlugin +from temporalio.worker import WorkflowRunner +from temporalio.worker.workflow_sandbox import SandboxedWorkflowRunner + + +class OpenTelemetryPlugin(SimplePlugin): + """OpenTelemetry plugin for Temporal SDK. + + .. warning:: + This class is experimental and may change in future versions. + Use with caution in production environments. + + This plugin integrates OpenTelemetry tracing with the Temporal SDK, providing + automatic span creation for workflows, activities, and other Temporal operations. + It uses the new OpenTelemetryInterceptor implementation. + + Unlike the prior TracingInterceptor, this allows for accurate duration spans and parenting inside a workflow + using opentelemetry.trace.get_tracer() directly. + + Your tracer provider should be created with `create_tracer_provider` for it to be used within a Temporal worker. + """ + + def __init__(self, *, add_temporal_spans: bool = False): + """Initialize the OpenTelemetry plugin. + + Args: + add_temporal_spans: Whether to add additional Temporal-specific spans + for operations like StartWorkflow, RunWorkflow, etc. + """ + interceptors = [OpenTelemetryInterceptor(add_temporal_spans)] + + def workflow_runner(runner: WorkflowRunner | None) -> WorkflowRunner: + if not runner: + raise ValueError( + "No WorkflowRunner provided to the OpenTelemetry plugin." + ) + + # If in sandbox, add additional passthrough + if isinstance(runner, SandboxedWorkflowRunner): + return dataclasses.replace( + runner, + restrictions=runner.restrictions.with_passthrough_modules( + "opentelemetry" + ), + ) + return runner + + super().__init__( + "OpenTelemetryPlugin", + interceptors=interceptors, + workflow_runner=workflow_runner, + ) diff --git a/temporalio/contrib/opentelemetry/_serverless.py b/temporalio/contrib/opentelemetry/_serverless.py new file mode 100644 index 0000000000..37fdd5e865 --- /dev/null +++ b/temporalio/contrib/opentelemetry/_serverless.py @@ -0,0 +1,147 @@ +"""Provider-neutral OpenTelemetry helpers shared by serverless integrations. + +This is a private module. It is intentionally **not** re-exported from +``temporalio.contrib.opentelemetry`` so that importing that package gains no new +imports. The OTLP gRPC span exporter is imported lazily inside +:py:func:`build_otlp_span_processor`, so importing this module does not require +the ``opentelemetry-exporter-otlp-proto-grpc`` dependency. + +The AWS Lambda and GCP Cloud Run integrations layer their provider-specific +policy (ID generators, default service names, environment fallbacks) on top of +these helpers. Empty environment/argument values are skipped with a plain +truthiness check and are not stripped of whitespace, matching the pre-existing +AWS Lambda resolution behavior. +""" + +from __future__ import annotations + +import os +from collections.abc import Mapping, Sequence +from datetime import timedelta + +from opentelemetry.sdk.trace.export import BatchSpanProcessor + +from temporalio.runtime import OpenTelemetryConfig, TelemetryConfig + +OTEL_EXPORTER_OTLP_ENDPOINT_ENV_VAR = "OTEL_EXPORTER_OTLP_ENDPOINT" +"""Standard OpenTelemetry environment variable for the common OTLP endpoint.""" + +OTEL_SERVICE_NAME_ENV_VAR = "OTEL_SERVICE_NAME" +"""Standard OpenTelemetry environment variable for ``service.name``.""" + +DEFAULT_OTLP_ENDPOINT = "http://localhost:4317" +"""Default local OTLP gRPC collector endpoint.""" + + +def resolve_endpoint( + explicit: str | None, + *, + env: Mapping[str, str] = os.environ, + default: str = DEFAULT_OTLP_ENDPOINT, +) -> str: + """Resolve the OTLP collector endpoint. + + Resolution order: ``explicit`` -> ``OTEL_EXPORTER_OTLP_ENDPOINT`` -> + ``default``. Empty values are skipped with a truthiness check, without + stripping whitespace. + + Args: + explicit: Endpoint supplied directly by the caller, if any. + env: Environment mapping. Defaults to the live process environment. + default: Endpoint used when nothing else is provided. + + Returns: + The resolved endpoint. + """ + return explicit or env.get(OTEL_EXPORTER_OTLP_ENDPOINT_ENV_VAR) or default + + +def resolve_service_name( + explicit: str | None, + fallback_env_vars: Sequence[str], + default: str, + *, + env: Mapping[str, str] = os.environ, +) -> str: + """Resolve the OpenTelemetry service name. + + Resolution order: ``explicit`` -> ``OTEL_SERVICE_NAME`` -> each name in + ``fallback_env_vars`` in order -> ``default``. Empty values are skipped with + a truthiness check, without stripping whitespace. + + Args: + explicit: Service name supplied directly by the caller, if any. + fallback_env_vars: Provider-specific environment variable names checked, + in order, after ``OTEL_SERVICE_NAME``. + default: Service name used when nothing else is provided. + env: Environment mapping. Defaults to the live process environment. + + Returns: + The resolved service name. + """ + if explicit: + return explicit + otel_service_name = env.get(OTEL_SERVICE_NAME_ENV_VAR) + if otel_service_name: + return otel_service_name + for name in fallback_env_vars: + value = env.get(name) + if value: + return value + return default + + +def build_metrics_telemetry_config( + *, + endpoint: str, + service_name: str, + metric_periodicity: timedelta | None, +) -> TelemetryConfig: + """Build Core telemetry configuration for OTLP metrics export. + + Args: + endpoint: OTLP collector endpoint. Falls back to + :py:data:`DEFAULT_OTLP_ENDPOINT` when empty. + service_name: Service name added as the ``service_name`` global tag. + When empty, no global tag is added. + metric_periodicity: Metric export interval, passed through unchanged. + + Returns: + A :py:class:`temporalio.runtime.TelemetryConfig` with metrics pointed at + the collector. + """ + return TelemetryConfig( + metrics=OpenTelemetryConfig( + url=endpoint or DEFAULT_OTLP_ENDPOINT, + metric_periodicity=metric_periodicity, + ), + global_tags={"service_name": service_name} if service_name else {}, + ) + + +def build_otlp_span_processor( + endpoint: str, + *, + insecure: bool = True, +) -> BatchSpanProcessor: + """Build a batch span processor backed by the OTLP gRPC exporter. + + The exporter is imported lazily so that importing this module does not + require ``opentelemetry-exporter-otlp-proto-grpc``. + + Args: + endpoint: OTLP collector endpoint. + insecure: Whether to use an insecure (non-TLS) gRPC channel. + + Returns: + A batch span processor that exports to the OTLP collector. + + Raises: + ImportError: If the OTLP gRPC exporter is not installed. The caller + decides whether to warn and continue or re-raise. + """ + from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import ( # type: ignore[reportMissingTypeStubs] + OTLPSpanExporter, + ) + + return BatchSpanProcessor(OTLPSpanExporter(endpoint=endpoint, insecure=insecure)) diff --git a/temporalio/contrib/opentelemetry/_tracer_provider.py b/temporalio/contrib/opentelemetry/_tracer_provider.py new file mode 100644 index 0000000000..0f914b8558 --- /dev/null +++ b/temporalio/contrib/opentelemetry/_tracer_provider.py @@ -0,0 +1,301 @@ +from collections.abc import Iterator, Mapping, Sequence + +import opentelemetry.sdk.trace as trace_sdk +from opentelemetry.context import Context +from opentelemetry.sdk.resources import Resource +from opentelemetry.sdk.trace import ( + ConcurrentMultiSpanProcessor, + SpanLimits, + SynchronousMultiSpanProcessor, + sampling, +) +from opentelemetry.sdk.trace.id_generator import IdGenerator, RandomIdGenerator +from opentelemetry.trace import ( + Link, + Span, + SpanContext, + SpanKind, + Status, + StatusCode, + Tracer, + TracerProvider, + use_span, +) +from opentelemetry.util import types +from opentelemetry.util._decorator import _agnosticcontextmanager + +from temporalio import workflow +from temporalio.contrib.opentelemetry._id_generator import TemporalIdGenerator + + +class _ReplaySafeSpan(Span): + def __init__(self, span: Span): + self._exception: BaseException | None = None + self._span = span + + def __getattr__(self, name: str) -> object: + return getattr(self._span, name) + + def end(self, end_time: int | None = None) -> None: + if workflow.in_workflow() and workflow.unsafe.is_replaying_history_events(): + # Skip ending spans during workflow replay to avoid duplicate telemetry + return + + if ( + workflow.in_workflow() + and self._exception is not None + and not workflow.unsafe.is_read_only() + and not workflow.is_failure_exception(self._exception) + ): + # Skip ending spans with workflow task failures. Otherwise, each failure will create its own span + # This may still occur for spans which were completed during failed workflow tasks. + # Queries and update validators run read-only and their exceptions + # never fail the workflow task, so their spans are always ended. + return + + self._span.end(end_time=end_time) + + def get_span_context(self) -> SpanContext: + return self._span.get_span_context() + + def set_attributes(self, attributes: Mapping[str, types.AttributeValue]) -> None: + self._span.set_attributes(attributes) + + def set_attribute(self, key: str, value: types.AttributeValue) -> None: + self._span.set_attribute(key, value) + + def add_event( + self, + name: str, + attributes: types.Attributes = None, + timestamp: int | None = None, + ) -> None: + self._span.add_event(name, attributes, timestamp) + + def add_link( + self, + context: SpanContext, + attributes: types.Attributes = None, + ) -> None: + # Must be overridden explicitly: the Span ABC ships add_link as a + # non-abstract warn-and-no-op default that __getattr__ cannot + # intercept, which would silently drop links added after creation. + self._span.add_link(context, attributes) + + def update_name(self, name: str) -> None: + self._span.update_name(name) + + def is_recording(self) -> bool: + return self._span.is_recording() + + def set_status( + self, status: Status | StatusCode, description: str | None = None + ) -> None: + self._span.set_status(status, description) + + def record_exception( + self, + exception: BaseException, + attributes: types.Attributes = None, + timestamp: int | None = None, + escaped: bool = False, + ) -> None: + self._exception = exception + self._span.record_exception(exception, attributes, timestamp, escaped) + + +class _ReplaySafeTracer(Tracer): # type: ignore[reportUnusedClass] # Used outside file + def __init__(self, tracer: Tracer): + self._tracer = tracer + + def start_span( + self, + name: str, + context: Context | None = None, + kind: SpanKind = SpanKind.INTERNAL, + attributes: types.Attributes = None, + links: Sequence[Link] | None = None, + start_time: int | None = None, + record_exception: bool = True, + set_status_on_exception: bool = True, + ) -> "Span": + if workflow.in_workflow() and workflow.unsafe.is_replaying_history_events(): + start_time = start_time or workflow.time_ns() + span = self._tracer.start_span( + name, + context, + kind, + attributes, + links, + start_time, + record_exception, + set_status_on_exception, + ) + return _ReplaySafeSpan(span) + + @_agnosticcontextmanager + def start_as_current_span( + self, + name: str, + context: Context | None = None, + kind: SpanKind = SpanKind.INTERNAL, + attributes: types.Attributes = None, + links: Sequence[Link] | None = None, + start_time: int | None = None, + record_exception: bool = True, + set_status_on_exception: bool = True, + end_on_exit: bool = True, + ) -> Iterator["Span"]: + if workflow.in_workflow() and workflow.unsafe.is_replaying_history_events(): + start_time = start_time or workflow.time_ns() + span = self._tracer.start_span( + name, + context, + kind, + attributes, + links, + start_time, + record_exception, + set_status_on_exception, + ) + span = _ReplaySafeSpan(span) + with use_span( + span, + end_on_exit=end_on_exit, + record_exception=record_exception, + set_status_on_exception=set_status_on_exception, + ) as span: + yield span + + +class ReplaySafeTracerProvider(TracerProvider): + """A tracer provider that is safe for use during workflow replay. + + .. warning:: + This class is experimental and may change in future versions. + Use with caution in production environments. + + This tracer provider wraps an OpenTelemetry TracerProvider and ensures + that telemetry operations are safe during workflow replay by using + replay-safe spans and tracers. + """ + + def __init__( + self, + tracer_provider: trace_sdk.TracerProvider, + id_generator: TemporalIdGenerator, + ): + """Initialize the replay-safe tracer provider. + + Prefer :py:func:`create_tracer_provider`, which constructs a provider + that satisfies these requirements. + + Args: + tracer_provider: The underlying OpenTelemetry TracerProvider to wrap. + Must use a ``TemporalIdGenerator`` for replay safety. + id_generator: The ``TemporalIdGenerator`` used by ``tracer_provider``. + + Raises: + ValueError: If the tracer provider doesn't use a ``TemporalIdGenerator``. + """ + if not isinstance(tracer_provider.id_generator, TemporalIdGenerator): + raise ValueError( + "ReplaySafeTracerProvider should only be used with a TemporalIdGenerator for replay safety. The given TracerProvider doesn't use one." + ) + self._id_generator = id_generator + self._tracer_provider = tracer_provider + + def add_span_processor(self, span_processor: trace_sdk.SpanProcessor) -> None: + """Add a span processor to the underlying tracer provider. + + Args: + span_processor: The span processor to add. + """ + self._tracer_provider.add_span_processor(span_processor) + + def shutdown(self) -> None: + """Shutdown the underlying tracer provider.""" + self._tracer_provider.shutdown() + + def force_flush(self, timeout_millis: int = 30000) -> bool: + """Force flush the underlying tracer provider. + + Args: + timeout_millis: Timeout in milliseconds. + + Returns: + True if flush was successful, False otherwise. + """ + return self._tracer_provider.force_flush(timeout_millis) + + def get_tracer( + self, + instrumenting_module_name: str, + instrumenting_library_version: str | None = None, + schema_url: str | None = None, + attributes: types.Attributes | None = None, + ) -> Tracer: + """Get a replay-safe tracer from the underlying provider. + + Args: + instrumenting_module_name: The name of the instrumenting module. + instrumenting_library_version: The version of the instrumenting library. + schema_url: The schema URL for the tracer. + attributes: Additional attributes for the tracer. + + Returns: + A replay-safe tracer instance. + """ + tracer = self._tracer_provider.get_tracer( + instrumenting_module_name, + instrumenting_library_version, + schema_url, + attributes, + ) + return _ReplaySafeTracer(tracer) + + def id_generator(self) -> TemporalIdGenerator: + """Gets the temporal id generator associated with this provider.""" + return self._id_generator + + +def create_tracer_provider( + sampler: sampling.Sampler | None = None, + resource: Resource | None = None, + shutdown_on_exit: bool = True, + active_span_processor: SynchronousMultiSpanProcessor + | ConcurrentMultiSpanProcessor + | None = None, + id_generator: IdGenerator | None = None, + span_limits: SpanLimits | None = None, +) -> ReplaySafeTracerProvider: + """Initialize a replay-safe tracer provider. + + .. warning:: + This function is experimental and may change in future versions. + Use with caution in production environments. + + Creates a new TracerProvider with a TemporalIdGenerator for replay safety + and wraps it in a ReplaySafeTracerProvider. + + Args: + sampler: The sampler to use for sampling spans. + resource: The resource to associate with the tracer provider. + shutdown_on_exit: Whether to shutdown the provider on exit. + active_span_processor: The active span processor to use. + id_generator: The ID generator to wrap with TemporalIdGenerator. + span_limits: The span limits to apply. + + Returns: + A replay-safe tracer provider instance. + """ + generator = TemporalIdGenerator(id_generator or RandomIdGenerator()) + provider = trace_sdk.TracerProvider( + sampler=sampler, + resource=resource, + shutdown_on_exit=shutdown_on_exit, + active_span_processor=active_span_processor, + span_limits=span_limits, + id_generator=generator, + ) + return ReplaySafeTracerProvider(provider, generator) diff --git a/temporalio/contrib/opentelemetry/workflow.py b/temporalio/contrib/opentelemetry/workflow.py new file mode 100644 index 0000000000..e872979a48 --- /dev/null +++ b/temporalio/contrib/opentelemetry/workflow.py @@ -0,0 +1,53 @@ +"""OpenTelemetry workflow utilities for Temporal SDK. + +This module provides workflow-safe OpenTelemetry span creation and context +management utilities for use within Temporal workflows. All functions in +this module are designed to work correctly during workflow replay. +""" + +from __future__ import annotations + +import warnings + +import opentelemetry.util.types +from opentelemetry.trace import ( + get_tracer, +) + +from temporalio.contrib.opentelemetry import TracingWorkflowInboundInterceptor + + +def completed_span( + name: str, + *, + attributes: opentelemetry.util.types.Attributes = None, + exception: Exception | None = None, +) -> None: + """Create and end an OpenTelemetry span. + + Note, this will only create and record when the workflow is not + replaying and if there is a current span (meaning the client started a + span and this interceptor is configured on the worker and the span is on + the context). + + To create a long-running span or to create a span that actually spans other code use OpenTelemetryPlugin and opentelemetry.trace.get_tracer(). + + Args: + name: Name of the span. + attributes: Attributes to set on the span if any. Workflow ID and + run ID are automatically added. + exception: Optional exception to record on the span. + """ + if interceptor := TracingWorkflowInboundInterceptor._from_context(): + interceptor._completed_span( + name, additional_attributes=attributes, exception=exception + ) + else: + warnings.warn( + "When using OpenTelemetryPlugin, you should prefer using opentelemetry directly.", + DeprecationWarning, + ) + span = get_tracer(__name__).start_span(name, attributes=attributes) + if exception: + span.record_exception(exception) + span.end() diff --git a/temporalio/contrib/pydantic.py b/temporalio/contrib/pydantic.py index 5de19f180f..5cf8936d7e 100644 --- a/temporalio/contrib/pydantic.py +++ b/temporalio/contrib/pydantic.py @@ -13,8 +13,9 @@ Pydantic v1 is not supported. """ +import functools from dataclasses import dataclass -from typing import Any, Optional, Type +from typing import Any from pydantic import TypeAdapter from pydantic_core import SchemaSerializer, to_json @@ -50,13 +51,50 @@ class PydanticJSONPlainPayloadConverter(EncodingPayloadConverter): types from the datetime module, sets, UUID, etc, and custom types composed of any of these. + Pickling preserves the cache size limit but excludes cached type adapters. + See https://docs.pydantic.dev/latest/api/standard_library_types/ """ - def __init__(self, to_json_options: ToJsonOptions | None = None): - """Create a new payload converter.""" - self._schema_serializer = SchemaSerializer(any_schema()) + def __init__( + self, + to_json_options: ToJsonOptions | None = None, + *, + max_cached_type_adapters: int | None = 1024, + ) -> None: + """Create a new payload converter. + + Args: + to_json_options: Options for serializing values to JSON. + max_cached_type_adapters: Maximum number of type adapters to + cache, with least-recently-used eviction. Defaults to 1024. + If ``None``, the cache is unbounded. If zero, caching is + disabled. + """ + if max_cached_type_adapters is not None and max_cached_type_adapters < 0: + raise ValueError("max_cached_type_adapters cannot be negative") + # Match the defaults of pydantic_core.to_json so that the options only + # change what they control + self._schema_serializer = SchemaSerializer( + any_schema(), config={"ser_json_inf_nan": "constants"} + ) self._to_json_options = to_json_options + self._type_adapter: functools._lru_cache_wrapper[TypeAdapter[Any]] = ( + functools.lru_cache(maxsize=max_cached_type_adapters)(TypeAdapter) + ) + + def __getstate__(self) -> dict[str, Any]: + """Pickle without the type adapter cache, whose wrapper is not picklable.""" + state = self.__dict__.copy() + state["_type_adapter"] = self._type_adapter.cache_info().maxsize + return state + + def __setstate__(self, state: dict[str, Any]) -> None: + """Restore state with an empty type adapter cache.""" + vars(self).update(state) + self._type_adapter = functools.lru_cache(maxsize=state["_type_adapter"])( + TypeAdapter + ) @property def encoding(self) -> str: @@ -73,7 +111,7 @@ def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: """ data = ( self._schema_serializer.to_json( - value, exclude_unset=self._to_json_options.exclude_unset + value, by_alias=True, exclude_unset=self._to_json_options.exclude_unset ) if self._to_json_options else to_json(value) @@ -91,12 +129,26 @@ def from_payload( Uses ``pydantic.TypeAdapter.validate_json`` to construct an instance of the type specified by ``type_hint`` from the JSON payload. + Type adapters are cached per hashable type hint; see + ``max_cached_type_adapters`` on the constructor. See https://docs.pydantic.dev/latest/api/type_adapter/#pydantic.type_adapter.TypeAdapter.validate_json. """ _type_hint = type_hint if type_hint is not None else Any - return TypeAdapter(_type_hint).validate_json(payload.data) + type_adapter: TypeAdapter[Any] + try: + type_adapter = self._type_adapter(_type_hint) + except TypeError: + # Distinguish an unhashable hint (bypass the cache) from a + # TypeError raised while constructing the adapter (re-raise). + try: + hash(_type_hint) + except TypeError: + type_adapter = TypeAdapter(_type_hint) + else: + raise + return type_adapter.validate_json(payload.data) class PydanticPayloadConverter(CompositePayloadConverter): @@ -106,9 +158,36 @@ class PydanticPayloadConverter(CompositePayloadConverter): :py:class:`PydanticJSONPlainPayloadConverter`. """ - def __init__(self, to_json_options: ToJsonOptions | None = None) -> None: - """Initialize object""" - json_payload_converter = PydanticJSONPlainPayloadConverter(to_json_options) + def __init__( + self, + to_json_options: ToJsonOptions | None = None, + *, + max_cached_type_adapters: int | None = 1024, + ) -> None: + """Initialize object. + + Args: + to_json_options: Options for serializing values to JSON. + max_cached_type_adapters: Maximum number of type adapters to + cache, with least-recently-used eviction. Defaults to 1024. + If ``None``, the cache is unbounded. If zero, caching is + disabled. + + To configure this through a :py:class:`DataConverter`, use a + nullary subclass as the payload converter class:: + + class MyPayloadConverter(PydanticPayloadConverter): + def __init__(self) -> None: + super().__init__(max_cached_type_adapters=128) + + my_data_converter = DataConverter( + payload_converter_class=MyPayloadConverter + ) + """ + json_payload_converter = PydanticJSONPlainPayloadConverter( + to_json_options, + max_cached_type_adapters=max_cached_type_adapters, + ) super().__init__( *( c diff --git a/temporalio/contrib/strands/README.md b/temporalio/contrib/strands/README.md new file mode 100644 index 0000000000..c0c909513a --- /dev/null +++ b/temporalio/contrib/strands/README.md @@ -0,0 +1,39 @@ +# Strands Agents integration + +The Strands Agents integration has moved to the independently versioned +[`temporalio-strands-agents`](https://pypi.org/project/temporalio-strands-agents/) +package. Its canonical Python API is `temporalio.strands_agents`. + +The complete integration guide now lives in the +[`temporalio-strands-agents` README](https://github.com/temporalio/ai-integrations/tree/main/python/strands_agents#readme). + +## Migrating to the standalone package + +Remove the `strands-agents` extra from the existing Temporal dependency: + +```toml +# Before +dependencies = [ + "temporalio[strands-agents,opentelemetry,pydantic]", +] + +# After +dependencies = [ + "temporalio[opentelemetry,pydantic]", +] +``` + +Remove the brackets if no extras remain. Then install the standalone package directly: + +```bash +uv add temporalio-strands-agents +``` + +Change application imports to the standalone package: + +```python +from temporalio.strands_agents import StrandsPlugin +``` + +The new import path selects the standalone implementation instead of the +SDK-bundled `temporalio.contrib.strands` implementation. diff --git a/temporalio/contrib/strands/__init__.py b/temporalio/contrib/strands/__init__.py new file mode 100644 index 0000000000..5784a25001 --- /dev/null +++ b/temporalio/contrib/strands/__init__.py @@ -0,0 +1,12 @@ +"""Compatibility imports for the standalone Strands Agents integration. + +Install ``temporalio-strands-agents`` and import ``temporalio.strands_agents`` +directly in new code. + +Legacy ``workflow`` module forwards the standalone public API. +""" + +from temporalio.strands_agents import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] +from temporalio.strands_agents import ( # pyright: ignore[reportMissingImports] + __all__ as __all__, +) diff --git a/temporalio/contrib/strands/workflow.py b/temporalio/contrib/strands/workflow.py new file mode 100644 index 0000000000..43f66a855b --- /dev/null +++ b/temporalio/contrib/strands/workflow.py @@ -0,0 +1,3 @@ +"""Compatibility imports for temporalio.strands_agents.workflow.""" + +from temporalio.strands_agents.workflow import * # noqa: F403 # pyright: ignore[reportMissingImports, reportWildcardImportFromLibrary] diff --git a/temporalio/contrib/workflow_streams/README.md b/temporalio/contrib/workflow_streams/README.md new file mode 100644 index 0000000000..e8ca461e22 --- /dev/null +++ b/temporalio/contrib/workflow_streams/README.md @@ -0,0 +1,47 @@ +# Temporal Workflow Streams + +> ⚠️ **This package is currently at an experimental release stage.** ⚠️ + +**Workflow Streams** is a Temporal Python SDK contrib library that gives a +Workflow a durable, offset-addressed event channel for keeping outside +observers updated on the progress of the Workflow and its Activities. +Typical uses include driving a UI for a long-running AI agent, surfacing +status during in-flight payment or order processing, and reporting progress +from data pipelines. It is not designed for ultra-low-latency applications +such as real-time voice; per-roundtrip latency is around 100ms, and cost +scales with durable batches rather than tokens. + +Under the hood the stream is built directly on Temporal's existing +message-passing primitives: Signals carry publishes, Updates serve +long-poll subscriptions, and Queries expose retained items and the current +global offset. +The library packages the boilerplate that turns those primitives into +a usable stream: batching to amortize per-event overhead, deduplication +for exactly-once delivery, topic filtering, and continue-as-new helpers +that hand stream state across Workflow runs. + +## Documentation + +📖 **The full guide lives in the Temporal documentation site:** +**[Workflow Streams — Python SDK](https://docs.temporal.io/develop/python/workflows/workflow-streams)** + +It covers installation, enabling streaming on a Workflow, publishing from +Workflows and Activities, subscribing, continue-as-new, delivery semantics, +codec and payload encoding, architecture, and caveats — with runnable code +snippets throughout. + +For runnable end-to-end examples, see the +[Workflow Streams samples](https://github.com/temporalio/samples-python/tree/main/workflow-streams). + +Subscriptions to completed, failed, canceled, terminated, or timed-out runs +drain their remaining retained items through the +`__temporal_workflow_stream_poll` Query, then finish. Each Query targets the +confirmed terminal run, including when the Workflow ID is reused. Queries +return immediately, paginate within the same response size limit as Updates, +and start at the retained base when the requested offset has been truncated. + +Upgrade workers before enabling upgraded clients. Existing clients work with +upgraded workers; upgraded clients surface missing-query errors from older +workers. Closed-stream reads require retained history and an available +compatible worker. Query rejection policies and server/query errors remain +visible; truncated items and expired history cannot be recovered. diff --git a/temporalio/contrib/workflow_streams/__init__.py b/temporalio/contrib/workflow_streams/__init__.py new file mode 100644 index 0000000000..41f670f0c0 --- /dev/null +++ b/temporalio/contrib/workflow_streams/__init__.py @@ -0,0 +1,43 @@ +"""Workflow Streams for Temporal workflows. + +.. warning:: + This package is experimental and may change in future versions. + +The Workflow Streams contrib library gives a workflow a durable, +offset-addressed event channel built from Signals and polling Updates +with an SSE bridge. Cost scales with durable batches, not tokens. +Latency is around 100ms per roundtrip; not for ultra-low-latency voice. + +See :py:class:`WorkflowStream` for the workflow-side stream object and +:py:class:`WorkflowStreamClient` for the external client interface. +""" + +from temporalio.contrib.workflow_streams._client import WorkflowStreamClient +from temporalio.contrib.workflow_streams._stream import WorkflowStream +from temporalio.contrib.workflow_streams._topic_handle import ( + TopicHandle, + WorkflowTopicHandle, +) +from temporalio.contrib.workflow_streams._types import ( + PollInput, + PollResult, + PublishEntry, + PublisherState, + PublishInput, + WorkflowStreamItem, + WorkflowStreamState, +) + +__all__ = [ + "PollInput", + "PollResult", + "PublishEntry", + "PublishInput", + "PublisherState", + "TopicHandle", + "WorkflowStream", + "WorkflowStreamClient", + "WorkflowStreamItem", + "WorkflowStreamState", + "WorkflowTopicHandle", +] diff --git a/temporalio/contrib/workflow_streams/_client.py b/temporalio/contrib/workflow_streams/_client.py new file mode 100644 index 0000000000..791151e6bc --- /dev/null +++ b/temporalio/contrib/workflow_streams/_client.py @@ -0,0 +1,680 @@ +"""External-side client for Workflow Streams. + +Used by activities, starters, and any code with a workflow handle to +publish messages and subscribe to topics on a workflow that hosts a +:class:`WorkflowStream`. + +Each published value is turned into a :class:`Payload` via the client's +sync payload converter. The **codec chain** (e.g. encryption, compression) +is **not** run per item — it runs once at the envelope +level when Temporal's SDK encodes the ``__temporal_workflow_stream_publish`` +signal args and the ``__temporal_workflow_stream_poll`` update/query result. +Running the codec per item as well would double-encrypt / double-compress, +because the envelope path covers the items again. The per-item +``Payload`` still carries the encoding metadata (``encoding: json/plain``, +``messageType``, etc.) required by ``subscribe(result_type=T)`` on the +consumer side. +""" + +from __future__ import annotations + +import asyncio +import time +import uuid +from collections.abc import AsyncIterator +from datetime import timedelta +from typing import Any, TypeVar, overload + +from typing_extensions import Self + +from temporalio import activity +from temporalio.api.common.v1 import Payload +from temporalio.client import ( + Client, + WorkflowExecutionDescription, + WorkflowExecutionStatus, + WorkflowHandle, + WorkflowUpdateFailedError, + WorkflowUpdateRPCTimeoutOrCancelledError, + WorkflowUpdateStage, +) +from temporalio.converter import DataConverter, PayloadConverter +from temporalio.service import RPCError, RPCStatusCode + +from ._topic_handle import TopicHandle +from ._types import ( + STREAM_DRAINING_ERROR_TYPE, + TRUNCATED_OFFSET_ERROR_TYPE, + PollInput, + PollResult, + PublishEntry, + PublishInput, + WorkflowStreamItem, + _decode_payload, + _encode_payload, +) + +T = TypeVar("T") + +# Keep these aligned with SDK Core's client retry policy: +# https://github.com/temporalio/sdk-rust/blob/c8551672bb5c7bf1fb211ef1caf10b2c11483bfc/crates/client/src/retry.rs#L16-L25 +_RETRYABLE_RPC_STATUS_CODES: frozenset[RPCStatusCode] = frozenset( + { + RPCStatusCode.ABORTED, + RPCStatusCode.CANCELLED, + RPCStatusCode.DATA_LOSS, + RPCStatusCode.INTERNAL, + RPCStatusCode.OUT_OF_RANGE, + RPCStatusCode.RESOURCE_EXHAUSTED, + RPCStatusCode.UNAVAILABLE, + RPCStatusCode.UNKNOWN, + } +) + +# Core forwards oversized-message errors without retrying: +# https://github.com/temporalio/sdk-rust/blob/c8551672bb5c7bf1fb211ef1caf10b2c11483bfc/crates/client/src/retry.rs#L292-L307 +_MESSAGE_TOO_LARGE_ERROR_PREFIXES: tuple[str, ...] = ( + "grpc: received message larger than max", + "grpc: message after decompression larger than max", + "grpc: received message after decompression larger than max", +) + + +def _is_retryable_rpc_error(error: RPCError) -> bool: + return error.status in _RETRYABLE_RPC_STATUS_CODES and not ( + error.status == RPCStatusCode.RESOURCE_EXHAUSTED + and error.message.startswith(_MESSAGE_TOO_LARGE_ERROR_PREFIXES) + ) + + +class WorkflowStreamClient: + """Client for publishing to and subscribing from a workflow stream. + + .. warning:: + This class is experimental and may change in future versions. + + Create via :py:meth:`create` (explicit client + workflow id), + :py:meth:`from_within_activity` (infer both from the current activity + context), or by passing a handle directly to the constructor. + + For publishing, bind a typed topic handle and use the client as + an async context manager to get automatic batching:: + + client = WorkflowStreamClient.create(temporal_client, workflow_id) + events = client.topic("events", type=MyEvent) + async with client: + events.publish(my_event) + events.publish(another_event, force_flush=True) + ... # more publishing + # Buffer is flushed automatically on context manager exit. + + For subscribing:: + + client = WorkflowStreamClient.create(temporal_client, workflow_id) + async for item in client.subscribe(["events"], result_type=MyEvent): + process(item.data) + """ + + def __init__( + self, + handle: WorkflowHandle[Any, Any], + *, + client: Client | None = None, + batch_interval: timedelta = timedelta(seconds=2), + max_batch_size: int | None = None, + max_retry_duration: timedelta = timedelta(seconds=600), + ) -> None: + """Create a stream client from a workflow handle. + + Prefer :py:meth:`create` — it enables continue-as-new following + in ``subscribe()`` and supplies the :class:`Client` needed to + reach the data converter chain. + + Args: + handle: Workflow handle to the workflow hosting the stream. + client: Temporal client whose payload converter will be used + to turn published values into ``Payload`` objects and to + decode subscriptions when ``result_type`` is set. The + codec chain is **not** applied per item (doing so would + double-encrypt — see module docstring). If ``None``, the + default payload converter is used. + batch_interval: Interval between automatic flushes. + max_batch_size: Auto-flush when buffer reaches this size. + max_retry_duration: Maximum time to retry a failed flush + before raising TimeoutError. Must be less than the + workflow's ``publisher_ttl`` (default 15 minutes) to + preserve exactly-once delivery. Default: 10 minutes. + """ + self._handle: WorkflowHandle[Any, Any] = handle + self._client: Client | None = client + self._workflow_id = handle.id + self._batch_interval = batch_interval + self._max_batch_size = max_batch_size + self._max_retry_duration = max_retry_duration + self._buffer: list[tuple[str, Any]] = [] + self._flush_event = asyncio.Event() + self._flush_task: asyncio.Task[None] | None = None + self._flush_lock = asyncio.Lock() + self._publisher_id: str = uuid.uuid4().hex[:16] + self._sequence: int = 0 + self._pending: list[PublishEntry] | None = None + self._pending_seq: int = 0 + self._pending_since: float | None = None + self._topic_types: dict[str, type[Any]] = {} + + @classmethod + def create( + cls, + client: Client, + workflow_id: str, + *, + batch_interval: timedelta = timedelta(seconds=2), + max_batch_size: int | None = None, + max_retry_duration: timedelta = timedelta(seconds=600), + ) -> WorkflowStreamClient: + """Create a stream client from a Temporal client and workflow ID. + + Use this when the caller has an explicit ``Client`` and + ``workflow_id`` in hand (starters, BFFs, other workflows' + activities). For code running inside an activity that targets + its own parent workflow, see :py:meth:`from_within_activity`. + + A client created through this method follows continue-as-new + chains in ``subscribe()`` and uses the client's payload + converter for per-item ``Payload`` construction. + + Args: + client: Temporal client. + workflow_id: ID of the workflow hosting the stream. + batch_interval: Interval between automatic flushes. + max_batch_size: Auto-flush when buffer reaches this size. + max_retry_duration: Maximum time to retry a failed flush + before raising TimeoutError. Default: 10 minutes. + """ + handle = client.get_workflow_handle(workflow_id) + return cls( + handle, + client=client, + batch_interval=batch_interval, + max_batch_size=max_batch_size, + max_retry_duration=max_retry_duration, + ) + + @classmethod + def from_within_activity( + cls, + *, + batch_interval: timedelta = timedelta(seconds=2), + max_batch_size: int | None = None, + max_retry_duration: timedelta = timedelta(seconds=600), + ) -> WorkflowStreamClient: + """Create a stream client targeting the current activity's parent workflow. + + Must be called from within an activity that was scheduled by a + workflow. The Temporal client and parent workflow id are taken + from the activity context. + + Standalone activities — those started directly via + :py:meth:`temporalio.client.Client.start_activity` rather than + from a workflow — have no parent workflow, so this method + raises. Use :py:meth:`create` from a standalone activity, + passing ``activity.client()`` and the target workflow id + explicitly (typically threaded through the activity's input). + + Args: + batch_interval: Interval between automatic flushes. + max_batch_size: Auto-flush when buffer reaches this size. + max_retry_duration: Maximum time to retry a failed flush + before raising TimeoutError. Default: 10 minutes. + """ + info = activity.info() + workflow_id = info.workflow_id + if workflow_id is None: + raise RuntimeError( + "from_within_activity requires an activity scheduled by a workflow; " + "this activity has no parent workflow. From a standalone " + "activity, use WorkflowStreamClient.create(activity.client(), " + "workflow_id) with the target workflow id passed in explicitly." + ) + return cls.create( + activity.client(), + workflow_id, + batch_interval=batch_interval, + max_batch_size=max_batch_size, + max_retry_duration=max_retry_duration, + ) + + async def __aenter__(self) -> Self: + """Start the background flusher task.""" + self._flush_task = asyncio.create_task(self._run_flusher()) + return self + + async def __aexit__(self, *_exc: object) -> None: + """Stop the flusher and flush any remaining buffered entries.""" + if self._flush_task: + self._flush_task.cancel() + try: + await self._flush_task + except asyncio.CancelledError: + pass + self._flush_task = None + # Drain both pending and buffer. A single _flush() processes + # either pending OR buffer, not both — so if the flusher was + # cancelled mid-signal (pending set) while the producer added + # more items (buffer non-empty), a single final flush would + # orphan the buffer. + while self._pending is not None or self._buffer: + await self._flush() + + def _publish_to_topic( + self, topic: str, value: Any, *, force_flush: bool = False + ) -> None: + """Internal publish path used by :class:`TopicHandle`. + + Not part of the public API — call + :meth:`TopicHandle.publish` instead. + """ + self._buffer.append((topic, value)) + if force_flush or ( + self._max_batch_size is not None + and len(self._buffer) >= self._max_batch_size + ): + self._flush_event.set() + + @overload + def topic(self, name: str) -> TopicHandle[Any]: ... + @overload + def topic(self, name: str, *, type: type[T]) -> TopicHandle[T]: ... + + def topic( + self, name: str, *, type: type[T] | None = None + ) -> TopicHandle[T] | TopicHandle[Any]: + """Return a typed handle for publishing to and subscribing from ``name``. + + The handle records the topic name and value type so call sites + do not have to repeat them. Each :class:`WorkflowStreamClient` + instance binds a topic name to exactly one type: a second call + with an unequal type raises ``RuntimeError``. Repeating the + same call with the same type is idempotent and returns an + equivalent handle. + + Type uniformity is checked only on this client instance — it + does not coordinate across processes. The check uses Python + equality on the type object; subtype and union-superset + relationships are not recognized. + + Omitting ``type`` (or passing ``type=typing.Any``) is the + documented escape hatch for heterogeneous topics or + dynamic-topic forwarders: the handle accepts any value, and + subscribers receive the converter's default decoded value. + Pre-built ``Payload`` values can be passed to + :meth:`TopicHandle.publish` regardless of the bound type + (zero-copy fast path) — there is no need to bind the topic to + ``Payload`` itself, and doing so would break the subscribe + path (use ``result_type=RawValue`` on + :meth:`WorkflowStreamClient.subscribe` if you need raw + payloads on a subscriber). + + Args: + name: Topic name. + type: Value type bound to this handle. Used as the + ``result_type`` when subscribing through the handle. + Defaults to ``typing.Any`` (heterogeneous topic). + + Returns: + :class:`TopicHandle` bound to ``name`` and the resolved + type. + + Raises: + RuntimeError: If ``name`` is already bound on this client + to a different type. + """ + bound: Any = Any if type is None else type + if bound is Payload: + raise RuntimeError( + "Cannot bind a topic to type=Payload: the payload converter " + "has no Payload decode path, so TopicHandle.subscribe would " + "fail. Pre-built Payload values can be passed to " + "TopicHandle.publish on any-typed handle (zero-copy fast " + "path); omit type (or pass type=typing.Any) for " + "heterogeneous topics, and subscribe via " + "WorkflowStreamClient.subscribe with result_type=RawValue " + "when raw payloads are needed." + ) + existing = self._topic_types.get(name) + if existing is not None and existing != bound: + raise RuntimeError( + f"Topic {name!r} is already bound to type {existing!r} on this " + f"client; refusing to rebind to {bound!r}. Use a single type " + f"per topic, or omit type (=typing.Any) for heterogeneous topics." + ) + self._topic_types[name] = bound + return TopicHandle(self, name, bound) + + async def flush(self) -> None: + """Flush buffered (and pending) items and wait for server confirmation. + + Returns once the items buffered at call time have been signaled to + the workflow and acknowledged by the server. Returns immediately + if there is nothing to send. + + This is in addition to the declarative ``force_flush=True`` on + :py:meth:`TopicHandle.publish` and to the automatic flush on + context-manager exit. Use this when you need a synchronization + point — proof that prior publications have reached the + server — at a moment that does not naturally correspond to a + specific event. + + Safe to call concurrently with topic-handle publishes and with + the background flusher: the flush lock serializes signal sends. + Items added concurrently after entry may piggyback on this + flush or be deferred to a subsequent one. + + Raises: + TimeoutError: If a pending batch from a prior failure cannot + be sent within ``max_retry_duration``. The pending batch + is dropped; subsequent publications use a fresh sequence. + """ + while self._pending is not None or self._buffer: + await self._flush() + + def _payload_converter(self) -> PayloadConverter: + """Return the sync payload converter for per-item encode/decode. + + Uses the configured client's payload converter when available; + otherwise falls back to the default. The codec chain + (e.g. encryption, compression) is intentionally not + invoked here — it runs once at the envelope level when the + signal/update goes over the wire. See module docstring. + """ + if self._client is not None: + return self._client.data_converter.payload_converter + return DataConverter.default.payload_converter + + def _encode_buffer(self, entries: list[tuple[str, Any]]) -> list[PublishEntry]: + """Convert buffered (topic, value) pairs to wire entries. + + Non-Payload values go through the sync payload converter so the + resulting ``Payload`` carries encoding metadata for + ``result_type=`` decode on the consumer side. Pre-built + Payloads bypass conversion. + """ + converter = self._payload_converter() + out: list[PublishEntry] = [] + for topic, value in entries: + if isinstance(value, Payload): + payload = value + else: + payload = converter.to_payloads([value])[0] + out.append(PublishEntry(topic=topic, data=_encode_payload(payload))) + return out + + async def _flush(self) -> None: + """Send buffered or pending messages to the workflow via signal. + + On failure, the pending batch and sequence are kept for retry. + Only advances the confirmed sequence on success. + """ + async with self._flush_lock: + if self._pending is not None: + # Retry path: check max_retry_duration + if ( + self._pending_since is not None + and time.monotonic() - self._pending_since + > self._max_retry_duration.total_seconds() + ): + # Advance confirmed sequence so the next batch gets + # a fresh sequence number. Without this, the next + # batch reuses pending_seq, which the workflow may + # have already accepted — causing silent dedup + # (data loss). See DropPendingFixed / + # SequenceFreshness in the design doc. + self._sequence = self._pending_seq + self._pending = None + self._pending_seq = 0 + self._pending_since = None + raise TimeoutError( + f"Flush retry exceeded max_retry_duration " + f"({self._max_retry_duration}). Pending batch dropped. " + f"If the signal was delivered, items are in the log. " + f"If not, they are lost." + ) + batch = self._pending + seq = self._pending_seq + elif self._buffer: + # New batch path. Encode before clearing the buffer so + # a payload-converter exception leaves the items in + # place for inspection or retry rather than silently + # dropping them. + batch = self._encode_buffer(self._buffer) + self._buffer = [] + seq = self._sequence + 1 + self._pending = batch + self._pending_seq = seq + self._pending_since = time.monotonic() + else: + return + + try: + # If the SDK ever exposes request_id on signal() and the + # server dedups it across CAN, pinning + # request_id=f"{publisher_id}:{seq}" here lets the + # workflow-side dedup go away. See DESIGN §"Replace + # workflow-side dedup with server-side request_id". + await self._handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=batch, + publisher_id=self._publisher_id, + sequence=seq, + ), + ) + # Success: advance confirmed sequence, clear pending + self._sequence = seq + self._pending = None + self._pending_seq = 0 + self._pending_since = None + except Exception: + # Pending stays set for retry on the next _flush() call + raise + + async def _run_flusher(self) -> None: + """Background task: wait for timer OR force_flush wakeup, then flush.""" + while True: + try: + await asyncio.wait_for( + self._flush_event.wait(), + timeout=self._batch_interval.total_seconds(), + ) + except asyncio.TimeoutError: + pass + self._flush_event.clear() + try: + await self._flush() + except RPCError as err: + if not _is_retryable_rpc_error(err): + raise + + @overload + def subscribe( + self, + topics: str | list[str] | None = ..., + from_offset: int = ..., + *, + result_type: type[T], + poll_cooldown: timedelta = ..., + ) -> AsyncIterator[WorkflowStreamItem[T]]: ... + @overload + def subscribe( + self, + topics: str | list[str] | None = ..., + from_offset: int = ..., + *, + result_type: None = None, + poll_cooldown: timedelta = ..., + ) -> AsyncIterator[WorkflowStreamItem[Any]]: ... + + async def subscribe( + self, + topics: str | list[str] | None = None, + from_offset: int = 0, + *, + result_type: type | None = None, + poll_cooldown: timedelta = timedelta(milliseconds=100), + ) -> AsyncIterator[WorkflowStreamItem[Any]]: + """Async iterator that polls for new items. + + Automatically follows continue-as-new chains when the client + was created via :py:meth:`create`. After the workflow completes, + fails, is canceled, terminated, or times out, queries deliver its + remaining retained items before the iterator finishes. These reads + require retained history and an available worker with the poll query + handler. Query failures, including configured query rejection, propagate. + If describing the execution fails with an RPC error, the original poll + error propagates. + + Args: + topics: Topic filter. A single topic name, a list of topic + names, or None. None or empty list means all topics. + from_offset: Global offset to start reading from. + result_type: Optional target type. Each yielded + :class:`WorkflowStreamItem` has its ``data`` decoded via + the client's sync payload converter. When omitted, the + converter's default ``Any`` decoding is used (for the + stock JSON converter that means a Python primitive, + ``dict``, or ``list``). Pass + ``result_type=temporalio.common.RawValue`` for an + opaque ``RawValue`` wrapping the original + ``Payload`` — useful for heterogeneous topics where + the caller dispatches on ``Payload.metadata`` or wants + to forward the bytes without decoding. + poll_cooldown: Minimum interval between polls when caught + up (backlogs always drain at full speed). Defaults to + 100ms. Avoid ``timedelta(0)``: an idle subscriber + busy-loops, and each poll grows workflow history toward + its limit. Use 0 only in tests. + + Yields: + :class:`WorkflowStreamItem` for each matching item. + """ + if result_type is Payload: + raise RuntimeError( + "Cannot subscribe with result_type=Payload: the payload " + "converter has no Payload decode path. Omit result_type " + "for default decoding, or pass result_type=RawValue to " + "receive a RawValue wrapping the raw Payload." + ) + topic_filter: list[str] + if topics is None: + topic_filter = [] + elif isinstance(topics, str): + topic_filter = [topics] + else: + topic_filter = topics + offset = from_offset + poll_handle = self._handle + terminal_handle: WorkflowHandle[Any, Any] | None = None + while True: + if terminal_handle is not None: + result = await terminal_handle.query( + "__temporal_workflow_stream_poll", + PollInput(topics=topic_filter, from_offset=offset), + result_type=PollResult, + ) + else: + # Each attempt tracks its own accepted run, including when the + # same stream client is shared by concurrent subscriptions. + polled_run_id: str | None = None + try: + handle = await poll_handle.start_update( + "__temporal_workflow_stream_poll", + PollInput(topics=topic_filter, from_offset=offset), + wait_for_stage=WorkflowUpdateStage.ACCEPTED, + result_type=PollResult, + ) + polled_run_id = handle.workflow_run_id + result = await handle.result() + except asyncio.CancelledError: + raise + except ( + WorkflowUpdateFailedError, + WorkflowUpdateRPCTimeoutOrCancelledError, + RPCError, + ) as err: + if isinstance(err, WorkflowUpdateFailedError): + cause_type = getattr(err.cause, "type", None) + if cause_type == TRUNCATED_OFFSET_ERROR_TYPE: + offset = 0 + continue + if cause_type == STREAM_DRAINING_ERROR_TYPE: + cooldown_secs = poll_cooldown.total_seconds() + if cooldown_secs > 0: + await asyncio.sleep(cooldown_secs) + continue + if isinstance(err.__cause__, asyncio.CancelledError): + raise err.__cause__ + try: + desc = await self._describe_polled_run( + poll_handle, polled_run_id + ) + except RPCError: + raise err + if ( + desc.status == WorkflowExecutionStatus.CONTINUED_AS_NEW + and self._client is not None + ): + poll_handle = self._client.get_workflow_handle( + self._workflow_id + ) + continue + if desc.run_id and desc.status in ( + WorkflowExecutionStatus.COMPLETED, + WorkflowExecutionStatus.FAILED, + WorkflowExecutionStatus.CANCELED, + WorkflowExecutionStatus.TERMINATED, + WorkflowExecutionStatus.TIMED_OUT, + ): + # Use the handle's client so direct-handle subscriptions + # can pin terminal reads without an explicit client. + terminal_handle = poll_handle._client.get_workflow_handle( + self._workflow_id, run_id=desc.run_id + ) + continue + raise + converter = self._payload_converter() + for wire_item in result.items: + payload = _decode_payload(wire_item.data) + data: Any = ( + converter.from_payload(payload) + if result_type is None + else converter.from_payload(payload, result_type) + ) + yield WorkflowStreamItem( + topic=wire_item.topic, + data=data, + offset=wire_item.offset, + ) + offset = result.next_offset + if terminal_handle is not None: + if not result.more_ready: + return + elif not result.more_ready: + cooldown_secs = poll_cooldown.total_seconds() + if cooldown_secs > 0: + await asyncio.sleep(cooldown_secs) + + async def _describe_polled_run( + self, handle: WorkflowHandle[Any, Any], polled_run_id: str | None + ) -> WorkflowExecutionDescription: + """Describe the accepted run, or the targeted execution before acceptance.""" + if polled_run_id is not None: + return await handle._client.get_workflow_handle( + self._workflow_id, run_id=polled_run_id + ).describe() + return await handle.describe() + + async def get_offset(self) -> int: + """Query the current global offset (base_offset + log length).""" + return await self._handle.query( + "__temporal_workflow_stream_offset", result_type=int + ) diff --git a/temporalio/contrib/workflow_streams/_stream.py b/temporalio/contrib/workflow_streams/_stream.py new file mode 100644 index 0000000000..b018f86a48 --- /dev/null +++ b/temporalio/contrib/workflow_streams/_stream.py @@ -0,0 +1,475 @@ +"""Workflow-side stream object for Workflow Streams. + +Instantiate :class:`WorkflowStream` once from your workflow's ``@workflow.init`` +method. The constructor registers the stream signal, update, and query +handlers on the current workflow via +:func:`temporalio.workflow.set_signal_handler`, +:func:`temporalio.workflow.set_update_handler`, and +:func:`temporalio.workflow.set_query_handler`. + +For workflows that support continue-as-new, include a +``WorkflowStreamState | None`` field on the workflow input and pass it as +``prior_state`` — it is ``None`` on fresh starts and carries accumulated +state on continue-as-new. + +Workflow-side and client-side topic handles +(:meth:`WorkflowTopicHandle.publish` and +:meth:`TopicHandle.publish`) both use the synchronous payload +converter for per-item ``Payload`` construction. The codec chain +(e.g. encryption, compression) is **not** run per item on either +side — it runs once at the envelope level when Temporal's SDK +encodes the signal/update that carries the batch. Running it per +item as well would double-encrypt, because every signal arg +already goes through the client's ``DataConverter.encode`` at +dispatch time. +""" + +from __future__ import annotations + +import sys +from collections.abc import Sequence +from datetime import timedelta +from typing import Any, Callable, NoReturn, TypeVar, overload + +from temporalio import workflow +from temporalio.api.common.v1 import Payload +from temporalio.exceptions import ApplicationError + +from ._topic_handle import WorkflowTopicHandle +from ._types import ( + STREAM_DRAINING_ERROR_TYPE, + TRUNCATED_OFFSET_ERROR_TYPE, + PollInput, + PollResult, + PublisherState, + PublishInput, + WorkflowStreamItem, + WorkflowStreamState, + _decode_payload, + _encode_payload, + _WorkflowStreamWireItem, +) + +_PUBLISH_SIGNAL = "__temporal_workflow_stream_publish" +# Updates and queries share a name because they implement the same poll protocol. +_POLL = "__temporal_workflow_stream_poll" +_OFFSET_QUERY = "__temporal_workflow_stream_offset" + +_MAX_POLL_RESPONSE_BYTES = 1_000_000 + +T = TypeVar("T") + + +def _payload_wire_size(payload: Payload, topic: str) -> int: + """Approximate poll-response contribution of a single item. + + Wire form is ``_WorkflowStreamWireItem(topic, base64(proto(Payload)), offset)``. + Base64 inflates by ~4/3; we use the serialized length as a + conservative approximation. + """ + return (payload.ByteSize() * 4 + 2) // 3 + len(topic) + + +class WorkflowStream: + """Workflow-side stream object — append-only log with publish/poll handlers. + + .. warning:: + This class is experimental and may change in future versions. + + Construct once from ``@workflow.init``; the constructor registers + the stream signal, update, and query handlers on the current + workflow. Raises :class:`RuntimeError` if a ``WorkflowStream`` has + already been registered on the workflow. + + Registered handlers: + + - ``__temporal_workflow_stream_publish`` signal — external publish with dedup + - ``__temporal_workflow_stream_poll`` update — long-poll subscription + - ``__temporal_workflow_stream_poll`` query — immediate retained-item read + - ``__temporal_workflow_stream_offset`` query — current log length + + Note: + Because the publish handler is registered dynamically from + ``__init__``, on the activation where the stream is + constructed the publish signal can be buffered until after + class-level signal/update handlers are scheduled. Define + such handlers as ``async`` and ``await asyncio.sleep(0)`` + before reading stream state, so the publish signal is + processed first. + """ + + def __init__(self, prior_state: WorkflowStreamState | None = None) -> None: + """Initialize stream state and register workflow handlers. + + Must be called directly from the workflow's ``@workflow.init`` + method. Calls made from ``@workflow.run``, helper methods, or + signal/update/query handlers raise :class:`RuntimeError`. + + The check inspects the immediate caller's frame and requires the + function name to be ``__init__``. + + Args: + prior_state: State carried from a previous run via + :meth:`get_state` through continue-as-new, or ``None`` + on first start. + + Raises: + RuntimeError: If not called directly from a method named + ``__init__``, or if the stream signal handler is + already registered on this workflow (i.e., + ``WorkflowStream`` was instantiated twice). + + Note: + When carrying state across continue-as-new, type the + carrying field as ``WorkflowStreamState | None``, not + ``Any``. The default data converter deserializes ``Any`` + fields as plain dicts, which silently strips the + ``WorkflowStreamState`` type and breaks the new run. + """ + caller = sys._getframe(1) + caller_name = caller.f_code.co_name + if caller_name != "__init__": + raise RuntimeError( + "WorkflowStream must be constructed directly from the workflow's " + f"@workflow.init method, not from {caller_name!r}." + ) + if workflow.get_signal_handler(_PUBLISH_SIGNAL) is not None: + raise RuntimeError( + "WorkflowStream is already registered on this workflow. " + "Construct WorkflowStream(...) at most once from @workflow.init." + ) + + if prior_state is not None: + self._log: list[WorkflowStreamItem[Payload]] = [ + WorkflowStreamItem(topic=item.topic, data=_decode_payload(item.data)) + for item in prior_state.log + ] + self._base_offset: int = prior_state.base_offset + self._publishers: dict[str, PublisherState] = { + pid: PublisherState(sequence=ps.sequence, last_seen=ps.last_seen) + for pid, ps in prior_state.publishers.items() + } + else: + self._log = [] + self._base_offset = 0 + self._publishers = {} + self._detaching: bool = False + self._topic_types: dict[str, type[Any]] = {} + + workflow.set_signal_handler(_PUBLISH_SIGNAL, self._on_publish) + workflow.set_update_handler(_POLL, self._on_poll, validator=self._validate_poll) + workflow.set_query_handler(_POLL, self._collect_batch) + workflow.set_query_handler(_OFFSET_QUERY, self._on_offset) + + def _publish_to_topic(self, topic: str, value: Any) -> None: + """Internal publish path used by :class:`WorkflowTopicHandle`. + + Not part of the public API — call + :meth:`WorkflowTopicHandle.publish` instead. + """ + if isinstance(value, Payload): + payload = value + else: + payload = workflow.payload_converter().to_payloads([value])[0] + self._log.append(WorkflowStreamItem(topic=topic, data=payload)) + + @overload + def topic(self, name: str) -> WorkflowTopicHandle[Any]: ... + @overload + def topic(self, name: str, *, type: type[T]) -> WorkflowTopicHandle[T]: ... + + def topic( + self, name: str, *, type: type[T] | None = None + ) -> WorkflowTopicHandle[T] | WorkflowTopicHandle[Any]: + """Return a typed handle for publishing to ``name`` from this workflow. + + The handle records the topic name and value type so call sites + do not have to repeat them. Each :class:`WorkflowStream` + instance binds a topic name to exactly one type: a second call + with an unequal type raises ``RuntimeError``. Repeating the + same call with the same type is idempotent and returns an + equivalent handle. + + Type uniformity is checked only on this stream instance — it + does not coordinate across publishers (other workflows, + activities, external clients). The check uses Python equality + on the type object; subtype and union-superset relationships + are not recognized. + + Omitting ``type`` (or passing ``type=typing.Any``) is the + documented escape hatch for heterogeneous topics. Pre-built + ``Payload`` values can be passed to + :meth:`WorkflowTopicHandle.publish` regardless of the bound + type (zero-copy fast path) — there is no need to bind the + topic to ``Payload`` itself. + + Args: + name: Topic name. + type: Value type bound to this handle. Defaults to + ``typing.Any`` (heterogeneous topic). + + Returns: + :class:`WorkflowTopicHandle` bound to ``name`` and the + resolved type. + + Raises: + RuntimeError: If ``name`` is already bound on this stream + to a different type. + """ + bound: Any = Any if type is None else type + if bound is Payload: + raise RuntimeError( + "Cannot bind a topic to type=Payload. Pre-built Payload " + "values can be passed to WorkflowTopicHandle.publish on " + "any-typed handle (zero-copy fast path); omit type (or " + "pass type=typing.Any) for heterogeneous topics." + ) + existing = self._topic_types.get(name) + if existing is not None and existing != bound: + raise RuntimeError( + f"Topic {name!r} is already bound to type {existing!r} on this " + f"workflow stream; refusing to rebind to {bound!r}. Use a " + f"single type per topic, or omit type (=typing.Any) for " + f"heterogeneous topics." + ) + self._topic_types[name] = bound + return WorkflowTopicHandle(self, name, bound) + + def get_state( + self, *, publisher_ttl: timedelta = timedelta(seconds=900) + ) -> WorkflowStreamState: + """Return a serializable snapshot of stream state for continue-as-new. + + Drops dedup state for publishers idle longer than + ``publisher_ttl``. The TTL must exceed the + ``max_retry_duration`` of any client that may still be + retrying a failed flush. + + Args: + publisher_ttl: Duration after which an idle publisher's + dedup state is dropped. Default 15 minutes. + """ + now = workflow.now() + + active_publishers = { + pid: ps + for pid, ps in self._publishers.items() + if now - ps.last_seen < publisher_ttl + } + + return WorkflowStreamState( + log=[ + _WorkflowStreamWireItem( + topic=item.topic, data=_encode_payload(item.data) + ) + for item in self._log + ], + base_offset=self._base_offset, + publishers=active_publishers, + ) + + def detach_pollers(self) -> None: + """Release waiting pollers and reject new poll updates. + + After this call the stream's ``__temporal_workflow_stream_poll`` + update handler releases its in-flight subscribers on this run: + each waiting poll returns its current item batch (often empty) + so the consumer can either follow continue-as-new or stop, and + new polls are rejected at the validator. Publishes still land + in the in-memory log and ``get_state`` / ``continue_as_new`` + remain valid — the stream is being held open just long enough + to snapshot state and hand off to the next run. + + Call this before + ``await workflow.wait_condition(workflow.all_handlers_finished)`` + and ``workflow.continue_as_new()``. + """ + self._detaching = True + + async def continue_as_new( + self, + build_args: Callable[[WorkflowStreamState], Sequence[Any]], + *, + publisher_ttl: timedelta = timedelta(seconds=900), + ) -> NoReturn: + """Detach pollers, wait for handlers, continue-as-new with built args. + + Replaces this three-line recipe for the common case where the + only continue-as-new parameter that varies is ``args``: + + .. code-block:: python + + self.stream.detach_pollers() + await workflow.wait_condition(workflow.all_handlers_finished) + workflow.continue_as_new(args=...) + + ``build_args`` is invoked *after* pollers have been detached, + with the post-detach :class:`WorkflowStreamState` as its single + argument. The caller threads that state into whatever input + dataclass the workflow expects: + + .. code-block:: python + + await self.stream.continue_as_new(lambda state: [WorkflowInput( + items_processed=self.items_processed, + stream_state=state, + )]) + + Workflows that need to override other CAN parameters + (``task_queue``, ``retry_policy``, ``run_timeout``, etc.) should + keep using the explicit ``detach_pollers`` / ``wait_condition`` / + ``workflow.continue_as_new(...)`` recipe. + + Args: + build_args: Callable that receives the post-detach stream + state and returns the positional ``args`` for the new + run. + publisher_ttl: Forwarded to :meth:`get_state`. + + Does not return; ``workflow.continue_as_new`` raises an internal + exception that the SDK uses to close the run. + """ + self.detach_pollers() + await workflow.wait_condition(workflow.all_handlers_finished) + workflow.continue_as_new( + args=build_args(self.get_state(publisher_ttl=publisher_ttl)), + ) + + def truncate(self, up_to_offset: int) -> None: + """Discard log entries before ``up_to_offset``. + + After truncation, poll updates requesting a nonzero offset before + the new base receive an ApplicationError. Poll queries read from + the retained base instead. All global offsets remain monotonic. + + Raises ApplicationError (not ValueError) when ``up_to_offset`` + is past the end of the log so that callers invoking this from + an update handler surface it as an update failure rather than + a workflow-task poison pill. + + Args: + up_to_offset: The global offset to truncate up to + (exclusive). Entries at offsets + ``[base_offset, up_to_offset)`` are discarded. + """ + log_index = up_to_offset - self._base_offset + if log_index <= 0: + return + if log_index > len(self._log): + raise ApplicationError( + f"Cannot truncate to offset {up_to_offset}: " + f"valid range is [{self._base_offset}, {self._base_offset + len(self._log)})", + type="TruncateOutOfRange", + ) + self._log = self._log[log_index:] + self._base_offset = up_to_offset + + def _on_publish(self, payload: PublishInput) -> None: + """Receive publications from external clients (activities, starters). + + Deduplicates using (publisher_id, sequence). If publisher_id is + set and the sequence is <= the last seen sequence for that + publisher, the entire batch is dropped as a duplicate. Batches + are atomic: the dedup decision applies to the whole batch, not + individual items. + + This block is a polyfill for missing server-side ``request_id`` + dedup across continue-as-new. If the SDK ever exposes + ``request_id`` on signals and the server dedups it across CAN, + this branch and the ``_publishers`` state become redundant. See + DESIGN §"Replace workflow-side dedup with server-side + request_id" for the migration plan. + """ + if payload.publisher_id: + existing = self._publishers.get(payload.publisher_id) + if existing is not None and payload.sequence <= existing.sequence: + return + self._publishers[payload.publisher_id] = PublisherState( + sequence=payload.sequence, + last_seen=workflow.now(), + ) + for entry in payload.items: + self._log.append( + WorkflowStreamItem(topic=entry.topic, data=_decode_payload(entry.data)) + ) + + async def _on_poll(self, payload: PollInput) -> PollResult: + """Long-poll: block until new items available or detaching, then return.""" + # Re-evaluate the predicate against current ``_base_offset`` on + # every iteration: a ``truncate()`` between this poll's arrival + # and the wait firing changes ``log_offset`` underneath us, so + # capturing it as a local would freeze the wait against stale + # state and the poll would only return when the long-poll RPC + # times out. + await workflow.wait_condition( + lambda: ( + payload.from_offset < self._base_offset + or len(self._log) > payload.from_offset - self._base_offset + or self._detaching + ), + ) + if payload.from_offset != 0 and payload.from_offset < self._base_offset: + # ApplicationError fails this update without failing the workflow task. + raise ApplicationError( + f"Requested offset {payload.from_offset} has been truncated. " + f"Current base offset is {self._base_offset}.", + type=TRUNCATED_OFFSET_ERROR_TYPE, + ) + return self._collect_batch(payload) + + def _collect_batch(self, payload: PollInput) -> PollResult: + """Read retained items immediately without changing stream state.""" + log_offset = max(0, payload.from_offset - self._base_offset) + all_new = self._log[log_offset:] + if payload.topics: + topic_set = set(payload.topics) + candidates = [ + (self._base_offset + log_offset + i, item) + for i, item in enumerate(all_new) + if item.topic in topic_set + ] + else: + candidates = [ + (self._base_offset + log_offset + i, item) + for i, item in enumerate(all_new) + ] + # Cap response size to ~1MB wire bytes. + wire_items: list[_WorkflowStreamWireItem] = [] + size = 0 + more_ready = False + next_offset = self._base_offset + len(self._log) + for off, item in candidates: + item_size = _payload_wire_size(item.data, item.topic) + if size + item_size > _MAX_POLL_RESPONSE_BYTES and wire_items: + # Resume from this item on the next poll. + next_offset = off + more_ready = True + break + size += item_size + wire_items.append( + _WorkflowStreamWireItem( + topic=item.topic, data=_encode_payload(item.data), offset=off + ) + ) + return PollResult( + items=wire_items, + next_offset=next_offset, + more_ready=more_ready, + ) + + def _validate_poll(self, _payload: PollInput) -> None: + """Reject new polls when pollers are detached for continue-as-new. + + Uses the well-known ``StreamDraining`` type so a subscriber recognizes + the rollover-in-progress and retries until its poll lands on the + successor run, rather than surfacing the rejection as an error. + """ + if self._detaching: + raise ApplicationError( + "Workflow pollers are detached for continue-as-new", + type=STREAM_DRAINING_ERROR_TYPE, + ) + + def _on_offset(self) -> int: + """Return the current global offset (base_offset + log length).""" + return self._base_offset + len(self._log) diff --git a/temporalio/contrib/workflow_streams/_topic_handle.py b/temporalio/contrib/workflow_streams/_topic_handle.py new file mode 100644 index 0000000000..3b94e226f1 --- /dev/null +++ b/temporalio/contrib/workflow_streams/_topic_handle.py @@ -0,0 +1,164 @@ +"""Typed topic handles for Workflow Streams. + +A topic handle is a thin typed view over an underlying publisher. It +carries the topic name and the value type ``T`` so call sites do not +have to repeat them on every publish, and so cross-language SDKs can +mirror the binding cleanly. + +Type-uniformity is enforced per publisher instance: each +:class:`WorkflowStreamClient` (or :class:`WorkflowStream`) maps a topic +name to exactly one bound ``T``. Re-binding the same name to an +unequal type raises ``RuntimeError``. The check uses Python equality +on the type object — primitives, dataclasses, generic aliases, and +unions all compare structurally — and intentionally does not attempt +to recognize subtype or union-superset relationships. +""" + +from __future__ import annotations + +from collections.abc import AsyncIterator +from datetime import timedelta +from typing import TYPE_CHECKING, Generic, TypeVar + +from temporalio.api.common.v1 import Payload + +from ._types import WorkflowStreamItem + +if TYPE_CHECKING: + from ._client import WorkflowStreamClient + from ._stream import WorkflowStream + +T = TypeVar("T") + + +class TopicHandle(Generic[T]): + """Client-side handle for publishing to and subscribing from a single topic. + + .. warning:: + This class is experimental and may change in future versions. + + Constructed via :meth:`WorkflowStreamClient.topic`. Publishes share + the underlying client's batching, dedup, and codec path; this + object holds only the topic name and bound type. + """ + + def __init__( + self, + client: WorkflowStreamClient, + name: str, + type: type[T], + ) -> None: + """Bind the handle to a client, topic name, and type. + + Prefer :meth:`WorkflowStreamClient.topic` over calling this + directly; the factory is what records the per-client type + binding and rejects conflicts. + """ + self._client = client + self._name = name + self._type = type + + @property + def name(self) -> str: + """The topic name this handle is bound to.""" + return self._name + + @property + def type(self) -> type[T]: + """The value type this handle is bound to.""" + return self._type + + def publish(self, value: T | Payload, *, force_flush: bool = False) -> None: + """Buffer ``value`` for publishing on this topic. + + Equivalent to the underlying client's publish path; the value + flows through the same buffer, batch interval, and dedup + sequence. + + Args: + value: Value to publish. Goes through the client's sync + payload converter at flush time. A pre-built + :class:`temporalio.api.common.v1.Payload` bypasses + conversion (zero-copy fast path), regardless of the + handle's bound type. + force_flush: If True, wake the flusher to send immediately + (fire-and-forget — does not block the caller). + """ + self._client._publish_to_topic(self._name, value, force_flush=force_flush) + + async def subscribe( + self, + from_offset: int = 0, + *, + poll_cooldown: timedelta = timedelta(milliseconds=100), + ) -> AsyncIterator[WorkflowStreamItem[T]]: + """Async iterator over items on this topic, decoded as ``T``. + + For raw ``Payload`` access, or any other decode type that + differs from the handle's bound ``T``, use + :meth:`WorkflowStreamClient.subscribe` directly with an + explicit ``result_type`` (typically + :class:`temporalio.common.RawValue`). The handle's bound + type intentionally cannot be ``Payload`` — the converter has + no Payload decode path. + + Args: + from_offset: Global offset to start reading from. + poll_cooldown: Minimum interval between polls when there + are no new items. + """ + async for item in self._client.subscribe( + [self._name], + from_offset=from_offset, + result_type=self._type, + poll_cooldown=poll_cooldown, + ): + yield item + + +class WorkflowTopicHandle(Generic[T]): + """Workflow-side handle for publishing to a single topic. + + .. warning:: + This class is experimental and may change in future versions. + + Constructed via :meth:`WorkflowStream.topic`. Has no + ``subscribe`` — workflows do not consume their own stream. + """ + + def __init__( + self, + stream: WorkflowStream, + name: str, + type: type[T], + ) -> None: + """Bind the handle to a stream, topic name, and type. + + Prefer :meth:`WorkflowStream.topic` over calling this directly; + the factory is what records the per-stream type binding and + rejects conflicts. + """ + self._stream = stream + self._name = name + self._type = type + + @property + def name(self) -> str: + """The topic name this handle is bound to.""" + return self._name + + @property + def type(self) -> type[T]: + """The value type this handle is bound to.""" + return self._type + + def publish(self, value: T | Payload) -> None: + """Append ``value`` to the workflow stream on this topic. + + Args: + value: Value to publish. Goes through the workflow's sync + payload converter. A pre-built + :class:`temporalio.api.common.v1.Payload` bypasses + conversion, regardless of the handle's bound type. + """ + self._stream._publish_to_topic(self._name, value) diff --git a/temporalio/contrib/workflow_streams/_types.py b/temporalio/contrib/workflow_streams/_types.py new file mode 100644 index 0000000000..9bfcbe467b --- /dev/null +++ b/temporalio/contrib/workflow_streams/_types.py @@ -0,0 +1,181 @@ +"""Shared data types for the Workflow Streams contrib module. + +The user-facing ``data`` fields on :class:`WorkflowStreamItem` are +:class:`temporalio.api.common.v1.Payload`. Per-item values are converted to +``Payload`` by the payload converter at publish time, and the resulting +bytes/metadata are preserved per item so subscribers can decode with +``subscribe(result_type=T)``. The codec chain (e.g. encryption, compression) +applies once at the outer signal/update/query envelope level — not separately to each +embedded item — so codec behavior is symmetric between workflow-side and +client-side publishing. + +The wire representation (``PublishEntry``, ``_WorkflowStreamWireItem``) uses +base64-encoded ``Payload.SerializeToString()`` bytes because the default JSON +payload converter cannot serialize a ``Payload`` embedded inside a dataclass +(it only special-cases top-level Payloads on signal/update args). +""" + +from __future__ import annotations + +import base64 +from dataclasses import dataclass, field +from datetime import datetime +from typing import Generic, TypeVar + +from temporalio.api.common.v1 import Payload + +T = TypeVar("T") + +# Well-known ``ApplicationError.type`` values the stream workflow uses to reject +# polls, and which ``WorkflowStreamClient.subscribe`` recognizes to drive retry +# behavior. Defined here so the raise sites (``_stream.py``) and the handling +# sites (``_client.py``) cannot diverge. +STREAM_DRAINING_ERROR_TYPE = "StreamDraining" +TRUNCATED_OFFSET_ERROR_TYPE = "TruncatedOffset" + + +# basedpyright flags _-prefixed module-level functions as unused even when +# sibling modules import them (_stream.py, _client.py). Vanilla pyright does +# not. Suppressions below are required for `poe lint`. +def _encode_payload(payload: Payload) -> str: # pyright: ignore[reportUnusedFunction] + """Wire format: base64(Payload.SerializeToString()).""" + return base64.b64encode(payload.SerializeToString()).decode("ascii") + + +def _decode_payload(wire: str) -> Payload: # pyright: ignore[reportUnusedFunction] + """Inverse of :func:`_encode_payload`.""" + payload = Payload() + payload.ParseFromString(base64.b64decode(wire)) + return payload + + +@dataclass +class WorkflowStreamItem(Generic[T]): + """A single item in the workflow stream's log. + + .. warning:: + This class is experimental and may change in future versions. + + The ``data`` field carries the decoded value produced by + :meth:`WorkflowStreamClient.subscribe`. The generic parameter ``T`` + matches the ``result_type`` passed to ``subscribe``: an instance of + ``T`` when ``result_type=T``, the converter's default ``Any`` + decoding when ``result_type`` is omitted, or a + :class:`temporalio.common.RawValue` wrapping the original + ``Payload`` when ``result_type=RawValue``. + + The ``offset`` field is populated at poll time from the item's + position in the global log. + """ + + topic: str + data: T + offset: int = 0 + + +@dataclass +class PublishEntry: + """A single entry to publish via signal (wire type). + + .. warning:: + This class is experimental and may change in future versions. + + ``data`` is base64-encoded ``Payload.SerializeToString()`` output — + see module docstring for why a nested ``Payload`` cannot be used + directly. + """ + + topic: str + data: str + + +@dataclass +class PublishInput: + """Signal payload: batch of entries to publish. + + .. warning:: + This class is experimental and may change in future versions. + + Includes publisher_id and sequence to ensure exactly-once delivery. + """ + + items: list[PublishEntry] = field(default_factory=list) + publisher_id: str = "" + sequence: int = 0 + + +@dataclass +class PollInput: + """Update/query payload: request to poll for new items. + + Updates wait for items and reject truncated nonzero offsets. Queries + return immediately and clamp offsets to the retained base. + + .. warning:: + This class is experimental and may change in future versions. + """ + + topics: list[str] = field(default_factory=list) + from_offset: int = 0 + + +@dataclass +class _WorkflowStreamWireItem: + """Wire representation of a WorkflowStreamItem (base64 of serialized Payload).""" + + topic: str + data: str + offset: int = 0 + + +@dataclass +class PollResult: + """Update/query response: items matching the poll request. + + .. warning:: + This class is experimental and may change in future versions. + + ``items`` use the wire representation. When ``more_ready`` is True, + the response was truncated to stay within size limits and the + subscriber should poll again immediately rather than applying a + cooldown delay. + """ + + items: list[_WorkflowStreamWireItem] = field(default_factory=list) + next_offset: int = 0 + more_ready: bool = False + + +@dataclass +class PublisherState: + """Per-publisher dedup state. + + .. warning:: + This class is experimental and may change in future versions. + + Tracks the last accepted ``sequence`` and the ``workflow.now()`` at + which it was accepted, used together for at-least-once dedup and + TTL-based pruning at continue-as-new time. + """ + + sequence: int + last_seen: datetime + + +@dataclass +class WorkflowStreamState: + """Serializable snapshot of stream state for continue-as-new. + + .. warning:: + This class is experimental and may change in future versions. + + The containing workflow input must type the field as + ``WorkflowStreamState | None``, not ``Any``, so the default data converter + can reconstruct the dataclass from JSON. + + Log items use the wire representation for serialization stability. + """ + + log: list[_WorkflowStreamWireItem] = field(default_factory=list) + base_offset: int = 0 + publishers: dict[str, PublisherState] = field(default_factory=dict) diff --git a/temporalio/converter.py b/temporalio/converter.py deleted file mode 100644 index 8af1e1dc66..0000000000 --- a/temporalio/converter.py +++ /dev/null @@ -1,1891 +0,0 @@ -"""Base converter and implementations for data conversion.""" - -from __future__ import annotations - -import collections -import collections.abc -import dataclasses -import functools -import inspect -import json -import sys -import traceback -import uuid -import warnings -from abc import ABC, abstractmethod -from collections.abc import Awaitable, Callable, Mapping, Sequence -from dataclasses import dataclass -from datetime import datetime -from enum import IntEnum -from itertools import zip_longest -from logging import getLogger -from typing import ( - Any, - ClassVar, - Dict, - List, - Literal, - NewType, - Optional, - Tuple, - Type, - TypeVar, - Union, - get_type_hints, - overload, -) - -import google.protobuf.duration_pb2 -import google.protobuf.json_format -import google.protobuf.message -import google.protobuf.symbol_database -import nexusrpc -import typing_extensions -from typing_extensions import Self - -import temporalio.api.common.v1 -import temporalio.api.enums.v1 -import temporalio.api.failure.v1 -import temporalio.api.sdk.v1 -import temporalio.common -import temporalio.exceptions -import temporalio.types - -if sys.version_info < (3, 11): - # Python's datetime.fromisoformat doesn't support certain formats pre-3.11 - from dateutil import parser # type: ignore -# StrEnum is available in 3.11+ -if sys.version_info >= (3, 11): - from enum import StrEnum - -from types import UnionType - -logger = getLogger(__name__) - - -class SerializationContext(ABC): - """Base serialization context. - - Provides contextual information during serialization and deserialization operations. - - Examples: - In client code, when starting a workflow, or sending a signal/update/query to a workflow, - or receiving the result of an update/query, or handling an exception from a workflow, the - context type is :py:class:`WorkflowSerializationContext` and the workflow ID set of the - target workflow will be set in the context. - - In workflow code, when operating on a payload being sent/received to/from a child workflow, - or handling an exception from a child workflow, the context type is - :py:class:`WorkflowSerializationContext` and the workflow ID is that of the child workflow, - not of the currently executing (i.e. parent) workflow. - - In workflow code, when operating on a payload to be sent/received to/from an activity, the - context type is :py:class:`ActivitySerializationContext` and the workflow ID is that of the - currently-executing workflow. ActivitySerializationContext is also set on data converter - operations in the activity context. - """ - - pass - - -@dataclass(frozen=True) -class BaseWorkflowSerializationContext(SerializationContext): - """Base serialization context shared by workflow and activity serialization contexts.""" - - namespace: str - workflow_id: str - - -@dataclass(frozen=True) -class WorkflowSerializationContext(BaseWorkflowSerializationContext): - """Serialization context for workflows. - - See :py:class:`SerializationContext` for more details. - - Attributes: - namespace: The namespace the workflow is running in. - workflow_id: The ID of the workflow. Note that this is the ID of the workflow of which the - payload being operated on is an input or output. Note also that when creating/describing - schedules, this may be the workflow ID prefix as configured, not the final workflow ID - when the workflow is created by the schedule. - """ - - pass - - -@dataclass(frozen=True) -class ActivitySerializationContext(BaseWorkflowSerializationContext): - """Serialization context for activities. - - See :py:class:`SerializationContext` for more details. - - Attributes: - namespace: Workflow/activity namespace. - workflow_id: Workflow ID. Note, when creating/describing schedules, - this may be the workflow ID prefix as configured, not the final workflow ID when the - workflow is created by the schedule. - workflow_type: Workflow Type. - activity_type: Activity Type. - activity_task_queue: Activity task queue. - is_local: Whether the activity is a local activity. - """ - - workflow_type: str - activity_type: str - activity_task_queue: str - is_local: bool - - -class WithSerializationContext(ABC): - """Interface for classes that can use serialization context. - - The following classes may implement this interface: - - :py:class:`PayloadConverter` - - :py:class:`PayloadCodec` - - :py:class:`FailureConverter` - - :py:class:`EncodingPayloadConverter` - - During data converter operations (encoding/decoding, serialization/deserialization, and failure - conversion), instances of classes implementing this interface will be replaced by the result of - calling with_context(context). This allows overridden methods (encode/decode, - to_payload/from_payload, etc) to use the context. - """ - - def with_context(self, context: SerializationContext) -> Self: - """Return a copy of this object configured to use the given context. - - Args: - context: The serialization context to use. - - Returns: - A new instance configured with the context. - """ - raise NotImplementedError() - - -class PayloadConverter(ABC): - """Base payload converter to/from multiple payloads/values.""" - - default: ClassVar[PayloadConverter] - """Default payload converter.""" - - @abstractmethod - def to_payloads( - self, values: Sequence[Any] - ) -> list[temporalio.api.common.v1.Payload]: - """Encode values into payloads. - - Implementers are expected to just return the payload for - :py:class:`temporalio.common.RawValue`. - - Args: - values: Values to be converted. - - Returns: - Converted payloads. Note, this does not have to be the same number - as values given, but must be at least one and cannot be more than - was given. - - Raises: - Exception: Any issue during conversion. - """ - raise NotImplementedError - - @abstractmethod - def from_payloads( - self, - payloads: Sequence[temporalio.api.common.v1.Payload], - type_hints: list[type] | None = None, - ) -> list[Any]: - """Decode payloads into values. - - Implementers are expected to treat a type hint of - :py:class:`temporalio.common.RawValue` as just the raw value. - - Args: - payloads: Payloads to convert to Python values. - type_hints: Types that are expected if any. This may not have any - types if there are no annotations on the target. If this is - present, it must have the exact same length as payloads even if - the values are just "object". - - Returns: - Collection of Python values. Note, this does not have to be the same - number as values given, but at least one must be present. - - Raises: - Exception: Any issue during conversion. - """ - raise NotImplementedError - - def to_payloads_wrapper( - self, values: Sequence[Any] - ) -> temporalio.api.common.v1.Payloads: - """:py:meth:`to_payloads` for the - :py:class:`temporalio.api.common.v1.Payloads` wrapper. - """ - return temporalio.api.common.v1.Payloads(payloads=self.to_payloads(values)) - - def from_payloads_wrapper( - self, payloads: temporalio.api.common.v1.Payloads | None - ) -> list[Any]: - """:py:meth:`from_payloads` for the - :py:class:`temporalio.api.common.v1.Payloads` wrapper. - """ - if not payloads or not payloads.payloads: - return [] - return self.from_payloads(payloads.payloads) - - def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload: - """Convert a single value to a payload. - - This is a shortcut for :py:meth:`to_payloads` with a single-item list - and result. - - Args: - value: Value to convert to a single payload. - - Returns: - Single converted payload. - """ - return self.to_payloads([value])[0] - - @overload - def from_payload(self, payload: temporalio.api.common.v1.Payload) -> Any: ... - - @overload - def from_payload( - self, - payload: temporalio.api.common.v1.Payload, - type_hint: type[temporalio.types.AnyType], - ) -> temporalio.types.AnyType: ... - - def from_payload( - self, - payload: temporalio.api.common.v1.Payload, - type_hint: type | None = None, - ) -> Any: - """Convert a single payload to a value. - - This is a shortcut for :py:meth:`from_payloads` with a single-item list - and result. - - Args: - payload: Payload to convert to value. - type_hint: Optional type hint to say which type to convert to. - - Returns: - Single converted value. - """ - return self.from_payloads([payload], [type_hint] if type_hint else None)[0] - - -class EncodingPayloadConverter(ABC): - """Base converter to/from single payload/value with a known encoding for use in CompositePayloadConverter.""" - - @property - @abstractmethod - def encoding(self) -> str: - """Encoding for the payload this converter works with.""" - raise NotImplementedError - - @abstractmethod - def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: - """Encode a single value to a payload or None. - - Args: - value: Value to be converted. - - Returns: - Payload of the value or None if unable to convert. - - Raises: - TypeError: Value is not the expected type. - ValueError: Value is of the expected type but otherwise incorrect. - RuntimeError: General error during encoding. - """ - raise NotImplementedError - - @abstractmethod - def from_payload( - self, - payload: temporalio.api.common.v1.Payload, - type_hint: type | None = None, - ) -> Any: - """Decode a single payload to a Python value or raise exception. - - Args: - payload: Payload to convert to Python value. - type_hint: Type that is expected if any. This may not have a type if - there are no annotations on the target. - - Return: - The decoded value from the payload. Since the encoding is checked by - the caller, this should raise an exception if the payload cannot be - converted. - - Raises: - RuntimeError: General error during decoding. - """ - raise NotImplementedError - - -class CompositePayloadConverter(PayloadConverter, WithSerializationContext): - """Composite payload converter that delegates to a list of encoding payload converters. - - Encoding/decoding are attempted on each payload converter successively until - it succeeds. - - Attributes: - converters: List of payload converters to delegate to, in order. - """ - - converters: Mapping[bytes, EncodingPayloadConverter] - - def __init__(self, *converters: EncodingPayloadConverter) -> None: - """Initializes the data converter. - - Args: - converters: Payload converters to delegate to, in order. - """ - self._set_converters(*converters) - - def _set_converters(self, *converters: EncodingPayloadConverter) -> None: - self.converters = {c.encoding.encode(): c for c in converters} - - def to_payloads( - self, values: Sequence[Any] - ) -> list[temporalio.api.common.v1.Payload]: - """Encode values trying each converter. - - See base class. Always returns the same number of payloads as values. - - Raises: - RuntimeError: No known converter - """ - payloads = [] - for index, value in enumerate(values): - # We intentionally attempt these serially just in case a stateful - # converter may rely on the previous values - payload = None - # RawValue should just pass through - if isinstance(value, temporalio.common.RawValue): - payload = value.payload - else: - for converter in self.converters.values(): - payload = converter.to_payload(value) - if payload is not None: - break - if payload is None: - raise RuntimeError( - f"Value at index {index} of type {type(value)} has no known converter" - ) - payloads.append(payload) - return payloads - - def from_payloads( - self, - payloads: Sequence[temporalio.api.common.v1.Payload], - type_hints: list[type] | None = None, - ) -> list[Any]: - """Decode values trying each converter. - - See base class. Always returns the same number of values as payloads. - - Raises: - KeyError: Unknown payload encoding - RuntimeError: Error during decode - """ - values = [] - type_hints = type_hints or [] - for index, (payload, type_hint) in enumerate(zip_longest(payloads, type_hints)): - # Raw value should just wrap - if type_hint == temporalio.common.RawValue: - values.append(temporalio.common.RawValue(payload)) - continue - encoding = payload.metadata.get("encoding", b"") - converter = self.converters.get(encoding) - if converter is None: - raise KeyError(f"Unknown payload encoding {encoding.decode()}") - try: - values.append(converter.from_payload(payload, type_hint)) - except RuntimeError as err: - raise RuntimeError( - f"Payload at index {index} with encoding {encoding.decode()} could not be converted" - ) from err - return values - - def with_context(self, context: SerializationContext) -> Self: - """Return a new instance with context set on the component converters. - - If none of the component converters returned new instances, return self. - """ - converters = self.get_converters_with_context(context) - if converters is None: - return self - new_instance = type(self)() # Must have a nullary constructor - new_instance._set_converters(*converters) - return new_instance - - def get_converters_with_context( - self, context: SerializationContext - ) -> list[EncodingPayloadConverter] | None: - """Return converter instances with context set. - - If no converter uses context, return None. - """ - if not self._any_converter_takes_context: - return None - converters: list[EncodingPayloadConverter] = [] - any_with_context = False - for c in self.converters.values(): - if isinstance(c, WithSerializationContext): - converters.append(c.with_context(context)) - any_with_context |= converters[-1] is not c - else: - converters.append(c) - - return converters if any_with_context else None - - @functools.cached_property - def _any_converter_takes_context(self) -> bool: - return any( - isinstance(c, WithSerializationContext) for c in self.converters.values() - ) - - -class DefaultPayloadConverter(CompositePayloadConverter): - """Default payload converter compatible with other Temporal SDKs. - - This handles None, bytes, all protobuf message types, and any type that - :py:func:`json.dump` accepts. A singleton instance of this is available at - :py:attr:`PayloadConverter.default`. - """ - - default_encoding_payload_converters: tuple[EncodingPayloadConverter, ...] - """Default set of encoding payload converters the default payload converter - uses. - """ - - def __init__(self) -> None: - """Create a default payload converter.""" - super().__init__(*DefaultPayloadConverter.default_encoding_payload_converters) - - -class BinaryNullPayloadConverter(EncodingPayloadConverter): - """Converter for 'binary/null' payloads supporting None values.""" - - @property - def encoding(self) -> str: - """See base class.""" - return "binary/null" - - def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: - """See base class.""" - if value is None: - return temporalio.api.common.v1.Payload( - metadata={"encoding": self.encoding.encode()} - ) - return None - - def from_payload( - self, - payload: temporalio.api.common.v1.Payload, - type_hint: type | None = None, - ) -> Any: - """See base class.""" - if len(payload.data) > 0: - raise RuntimeError("Expected empty data set for binary/null") - return None - - -class BinaryPlainPayloadConverter(EncodingPayloadConverter): - """Converter for 'binary/plain' payloads supporting bytes values.""" - - @property - def encoding(self) -> str: - """See base class.""" - return "binary/plain" - - def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: - """See base class.""" - if isinstance(value, bytes): - return temporalio.api.common.v1.Payload( - metadata={"encoding": self.encoding.encode()}, data=value - ) - return None - - def from_payload( - self, - payload: temporalio.api.common.v1.Payload, - type_hint: type | None = None, - ) -> Any: - """See base class.""" - return payload.data - - -_sym_db = google.protobuf.symbol_database.Default() - - -class JSONProtoPayloadConverter(EncodingPayloadConverter): - """Converter for 'json/protobuf' payloads supporting protobuf Message values.""" - - def __init__(self, ignore_unknown_fields: bool = False): - """Initialize a JSON proto converter. - - Args: - ignore_unknown_fields: Determines whether converter should error if - unknown fields are detected - """ - super().__init__() - self._ignore_unknown_fields = ignore_unknown_fields - - @property - def encoding(self) -> str: - """See base class.""" - return "json/protobuf" - - def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: - """See base class.""" - if ( - isinstance(value, google.protobuf.message.Message) - and value.DESCRIPTOR is not None - ): - # We have to convert to dict then to JSON because MessageToJson does - # not have a compact option removing spaces and newlines - json_str = json.dumps( - google.protobuf.json_format.MessageToDict(value), - separators=(",", ":"), - sort_keys=True, - ) - return temporalio.api.common.v1.Payload( - metadata={ - "encoding": self.encoding.encode(), - "messageType": value.DESCRIPTOR.full_name.encode(), - }, - data=json_str.encode(), - ) - return None - - def from_payload( - self, - payload: temporalio.api.common.v1.Payload, - type_hint: type | None = None, - ) -> Any: - """See base class.""" - message_type = payload.metadata.get("messageType", b"").decode() - try: - value = _sym_db.GetSymbol(message_type)() - return google.protobuf.json_format.Parse( - payload.data, - value, - ignore_unknown_fields=self._ignore_unknown_fields, - ) - except KeyError as err: - raise RuntimeError(f"Unknown Protobuf type {message_type}") from err - except google.protobuf.json_format.ParseError as err: - raise RuntimeError("Failed parsing") from err - - -class BinaryProtoPayloadConverter(EncodingPayloadConverter): - """Converter for 'binary/protobuf' payloads supporting protobuf Message values.""" - - @property - def encoding(self) -> str: - """See base class.""" - return "binary/protobuf" - - def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: - """See base class.""" - if ( - isinstance(value, google.protobuf.message.Message) - and value.DESCRIPTOR is not None - ): - return temporalio.api.common.v1.Payload( - metadata={ - "encoding": self.encoding.encode(), - "messageType": value.DESCRIPTOR.full_name.encode(), - }, - data=value.SerializeToString(), - ) - return None - - def from_payload( - self, - payload: temporalio.api.common.v1.Payload, - type_hint: type | None = None, - ) -> Any: - """See base class.""" - message_type = payload.metadata.get("messageType", b"").decode() - try: - value = _sym_db.GetSymbol(message_type)() - value.ParseFromString(payload.data) - return value - except KeyError as err: - raise RuntimeError(f"Unknown Protobuf type {message_type}") from err - except google.protobuf.message.DecodeError as err: - raise RuntimeError("Failed parsing") from err - - -class AdvancedJSONEncoder(json.JSONEncoder): - """Advanced JSON encoder. - - This encoder supports dataclasses and all iterables as lists. - - It also uses Pydantic v1's "dict" methods if available on the object, - but this is deprecated. Pydantic users should upgrade to v2 and use - temporalio.contrib.pydantic.pydantic_data_converter. - """ - - def default(self, o: Any) -> Any: - """Override JSON encoding default. - - See :py:meth:`json.JSONEncoder.default`. - """ - # Datetime support - if isinstance(o, datetime): - return o.isoformat() - # Dataclass support - if dataclasses.is_dataclass(o) and not isinstance(o, type): - return dataclasses.asdict(o) - # Support for Pydantic v1's dict method - dict_fn = getattr(o, "dict", None) - if callable(dict_fn): - return dict_fn() - # Support for non-list iterables like set - if not isinstance(o, list) and isinstance(o, collections.abc.Iterable): - return list(o) - # Support for UUID - if isinstance(o, uuid.UUID): - return str(o) - return super().default(o) - - -class JSONPlainPayloadConverter(EncodingPayloadConverter): - """Converter for 'json/plain' payloads supporting common Python values. - - For encoding, this supports all values that :py:func:`json.dump` supports - and by default adds extra encoding support for dataclasses, classes with - ``dict()`` methods, and all iterables. - - For decoding, this uses type hints to attempt to rebuild the type from the - type hint. - """ - - _encoder: type[json.JSONEncoder] | None - _decoder: type[json.JSONDecoder] | None - _encoding: str - - def __init__( - self, - *, - encoder: type[json.JSONEncoder] | None = AdvancedJSONEncoder, - decoder: type[json.JSONDecoder] | None = None, - encoding: str = "json/plain", - custom_type_converters: Sequence[JSONTypeConverter] = [], - ) -> None: - """Initialize a JSON data converter. - - Args: - encoder: Custom encoder class object to use. - decoder: Custom decoder class object to use. - encoding: Encoding name to use. - custom_type_converters: Set of custom type converters that are used - when converting from a payload to type-hinted values. - """ - super().__init__() - self._encoder = encoder - self._decoder = decoder - self._encoding = encoding - self._custom_type_converters = custom_type_converters - - @property - def encoding(self) -> str: - """See base class.""" - return self._encoding - - def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: - """See base class.""" - # Check for Pydantic v1 - if hasattr(value, "parse_obj"): - warnings.warn( - "If you're using Pydantic v2, use temporalio.contrib.pydantic.pydantic_data_converter. " - "If you're using Pydantic v1 and cannot upgrade, refer to https://github.com/temporalio/samples-python/tree/main/pydantic_converter_v1 for better v1 support." - ) - # We let JSON conversion errors be thrown to caller - return temporalio.api.common.v1.Payload( - metadata={"encoding": self._encoding.encode()}, - data=json.dumps( - value, cls=self._encoder, separators=(",", ":"), sort_keys=True - ).encode(), - ) - - def from_payload( - self, - payload: temporalio.api.common.v1.Payload, - type_hint: type | None = None, - ) -> Any: - """See base class.""" - try: - obj = json.loads(payload.data, cls=self._decoder) - if type_hint: - obj = value_to_type(type_hint, obj, self._custom_type_converters) - return obj - except json.JSONDecodeError as err: - raise RuntimeError("Failed parsing") from err - - -_JSONTypeConverterUnhandled = NewType("_JSONTypeConverterUnhandled", object) - - -class JSONTypeConverter(ABC): - """Converter for converting an object from Python :py:func:`json.loads` - result (e.g. scalar, list, or dict) to a known type. - """ - - Unhandled = _JSONTypeConverterUnhandled(object()) - """Sentinel value that must be used as the result of - :py:meth:`to_typed_value` to say the given type is not handled by this - converter.""" - - @abstractmethod - def to_typed_value( - self, hint: type, value: Any - ) -> Any | None | _JSONTypeConverterUnhandled: - """Convert the given value to a type based on the given hint. - - Args: - hint: Type hint to use to help in converting the value. - value: Value as returned by :py:func:`json.loads`. Usually a scalar, - list, or dict. - - Returns: - The converted value or :py:attr:`Unhandled` if this converter does - not handle this situation. - """ - raise NotImplementedError - - -class PayloadCodec(ABC): - """Codec for encoding/decoding to/from bytes. - - Commonly used for compression or encryption. - """ - - @abstractmethod - async def encode( - self, payloads: Sequence[temporalio.api.common.v1.Payload] - ) -> list[temporalio.api.common.v1.Payload]: - """Encode the given payloads. - - Args: - payloads: Payloads to encode. This value should not be mutated. - - Returns: - Encoded payloads. Note, this does not have to be the same number as - payloads given, but must be at least one and cannot be more than was - given. - """ - raise NotImplementedError - - @abstractmethod - async def decode( - self, payloads: Sequence[temporalio.api.common.v1.Payload] - ) -> list[temporalio.api.common.v1.Payload]: - """Decode the given payloads. - - Args: - payloads: Payloads to decode. This value should not be mutated. - - Returns: - Decoded payloads. Note, this does not have to be the same number as - payloads given, but must be at least one and cannot be more than was - given. - """ - raise NotImplementedError - - async def encode_wrapper(self, payloads: temporalio.api.common.v1.Payloads) -> None: - """:py:meth:`encode` for the - :py:class:`temporalio.api.common.v1.Payloads` wrapper. - - This replaces the payloads within the wrapper. - """ - new_payloads = await self.encode(payloads.payloads) - del payloads.payloads[:] - # TODO(cretz): Copy too expensive? - payloads.payloads.extend(new_payloads) - - async def decode_wrapper(self, payloads: temporalio.api.common.v1.Payloads) -> None: - """:py:meth:`decode` for the - :py:class:`temporalio.api.common.v1.Payloads` wrapper. - - This replaces the payloads within. - """ - new_payloads = await self.decode(payloads.payloads) - del payloads.payloads[:] - # TODO(cretz): Copy too expensive? - payloads.payloads.extend(new_payloads) - - async def encode_failure(self, failure: temporalio.api.failure.v1.Failure) -> None: - """Encode payloads of a failure. Intended as a helper method, not for overriding. - It is not guaranteed that all failures will be encoded with this method rather - than encoding the underlying payloads. - """ - await self._apply_to_failure_payloads(failure, self.encode_wrapper) - - async def decode_failure(self, failure: temporalio.api.failure.v1.Failure) -> None: - """Decode payloads of a failure. Intended as a helper method, not for overriding. - It is not guaranteed that all failures will be decoded with this method rather - than decoding the underlying payloads. - """ - await self._apply_to_failure_payloads(failure, self.decode_wrapper) - - async def _apply_to_failure_payloads( - self, - failure: temporalio.api.failure.v1.Failure, - cb: Callable[[temporalio.api.common.v1.Payloads], Awaitable[None]], - ) -> None: - if failure.HasField("encoded_attributes"): - # Wrap in payloads and merge back - payloads = temporalio.api.common.v1.Payloads( - payloads=[failure.encoded_attributes] - ) - await cb(payloads) - failure.encoded_attributes.CopyFrom(payloads.payloads[0]) - if failure.HasField( - "application_failure_info" - ) and failure.application_failure_info.HasField("details"): - await cb(failure.application_failure_info.details) - elif failure.HasField( - "timeout_failure_info" - ) and failure.timeout_failure_info.HasField("last_heartbeat_details"): - await cb(failure.timeout_failure_info.last_heartbeat_details) - elif failure.HasField( - "canceled_failure_info" - ) and failure.canceled_failure_info.HasField("details"): - await cb(failure.canceled_failure_info.details) - elif failure.HasField( - "reset_workflow_failure_info" - ) and failure.reset_workflow_failure_info.HasField("last_heartbeat_details"): - await cb(failure.reset_workflow_failure_info.last_heartbeat_details) - if failure.HasField("cause"): - await self._apply_to_failure_payloads(failure.cause, cb) - - -class FailureConverter(ABC): - """Base failure converter to/from errors. - - Note, for workflow exceptions, :py:attr:`to_failure` is only invoked if the - exception is an instance of :py:class:`temporalio.exceptions.FailureError`. - Users should extend :py:class:`temporalio.exceptions.ApplicationError` if - they want a custom workflow exception to work with this class. - """ - - default: ClassVar[FailureConverter] - """Default failure converter.""" - - @abstractmethod - def to_failure( - self, - exception: BaseException, - payload_converter: PayloadConverter, - failure: temporalio.api.failure.v1.Failure, - ) -> None: - """Convert the given exception to a Temporal failure. - - Users should make sure not to alter the ``exception`` input. - - Args: - exception: The exception to convert. - payload_converter: The payload converter to use if needed. - failure: The failure to update with error information. - """ - raise NotImplementedError - - @abstractmethod - def from_failure( - self, - failure: temporalio.api.failure.v1.Failure, - payload_converter: PayloadConverter, - ) -> BaseException: - """Convert the given Temporal failure to an exception. - - Users should make sure not to alter the ``failure`` input. - - Args: - failure: The failure to convert. - payload_converter: The payload converter to use if needed. - - Returns: - Converted error. - """ - raise NotImplementedError - - -class DefaultFailureConverter(FailureConverter): - """Default failure converter. - - A singleton instance of this is available at - :py:attr:`FailureConverter.default`. - """ - - def __init__(self, *, encode_common_attributes: bool = False) -> None: - """Create the default failure converter. - - Args: - encode_common_attributes: If ``True``, the message and stack trace - of the failure will be moved into the encoded attribute section - of the failure which can be encoded with a codec. - """ - super().__init__() - self._encode_common_attributes = encode_common_attributes - - def to_failure( - self, - exception: BaseException, - payload_converter: PayloadConverter, - failure: temporalio.api.failure.v1.Failure, - ) -> None: - """See base class.""" - # If already a failure error, use that - if isinstance(exception, temporalio.exceptions.FailureError): - self._error_to_failure(exception, payload_converter, failure) - elif isinstance(exception, nexusrpc.HandlerError): - self._nexus_handler_error_to_failure(exception, payload_converter, failure) - else: - # Convert to failure error - failure_error = temporalio.exceptions.ApplicationError( - str(exception), type=exception.__class__.__name__ - ) - failure_error.__traceback__ = exception.__traceback__ - failure_error.__cause__ = exception.__cause__ - self._error_to_failure(failure_error, payload_converter, failure) - # Encode common attributes if requested - if self._encode_common_attributes: - # Move message and stack trace to encoded attribute payload - failure.encoded_attributes.CopyFrom( - payload_converter.to_payloads( - [{"message": failure.message, "stack_trace": failure.stack_trace}] - )[0] - ) - failure.message = "Encoded failure" - failure.stack_trace = "" - - def _error_to_failure( - self, - error: temporalio.exceptions.FailureError, - payload_converter: PayloadConverter, - failure: temporalio.api.failure.v1.Failure, - ) -> None: - # If there is an underlying proto already, just use that - if error.failure: - failure.CopyFrom(error.failure) - return - - # Set message, stack, and cause. Obtaining cause follows rules from - # https://docs.python.org/3/library/exceptions.html#exception-context - failure.message = error.message - if error.__traceback__: - failure.stack_trace = "\n".join(traceback.format_tb(error.__traceback__)) - if error.__cause__: - self.to_failure(error.__cause__, payload_converter, failure.cause) - elif not error.__suppress_context__ and error.__context__: - self.to_failure(error.__context__, payload_converter, failure.cause) - - # Set specific subclass values - if isinstance(error, temporalio.exceptions.ApplicationError): - failure.application_failure_info.SetInParent() - if error.type: - failure.application_failure_info.type = error.type - failure.application_failure_info.non_retryable = error.non_retryable - if error.details: - failure.application_failure_info.details.CopyFrom( - payload_converter.to_payloads_wrapper(error.details) - ) - if error.next_retry_delay: - failure.application_failure_info.next_retry_delay.FromTimedelta( - error.next_retry_delay - ) - if error.category: - failure.application_failure_info.category = ( - temporalio.api.enums.v1.ApplicationErrorCategory.ValueType( - error.category - ) - ) - elif isinstance(error, temporalio.exceptions.TimeoutError): - failure.timeout_failure_info.SetInParent() - failure.timeout_failure_info.timeout_type = ( - temporalio.api.enums.v1.TimeoutType.ValueType(error.type or 0) - ) - if error.last_heartbeat_details: - failure.timeout_failure_info.last_heartbeat_details.CopyFrom( - payload_converter.to_payloads_wrapper(error.last_heartbeat_details) - ) - elif isinstance(error, temporalio.exceptions.CancelledError): - failure.canceled_failure_info.SetInParent() - if error.details: - failure.canceled_failure_info.details.CopyFrom( - payload_converter.to_payloads_wrapper(error.details) - ) - elif isinstance(error, temporalio.exceptions.TerminatedError): - failure.terminated_failure_info.SetInParent() - elif isinstance(error, temporalio.exceptions.ServerError): - failure.server_failure_info.SetInParent() - failure.server_failure_info.non_retryable = error.non_retryable - elif isinstance(error, temporalio.exceptions.ActivityError): - failure.activity_failure_info.SetInParent() - failure.activity_failure_info.scheduled_event_id = error.scheduled_event_id - failure.activity_failure_info.started_event_id = error.started_event_id - failure.activity_failure_info.identity = error.identity - failure.activity_failure_info.activity_type.name = error.activity_type - failure.activity_failure_info.activity_id = error.activity_id - failure.activity_failure_info.retry_state = ( - temporalio.api.enums.v1.RetryState.ValueType(error.retry_state or 0) - ) - elif isinstance(error, temporalio.exceptions.ChildWorkflowError): - failure.child_workflow_execution_failure_info.SetInParent() - failure.child_workflow_execution_failure_info.namespace = error.namespace - failure.child_workflow_execution_failure_info.workflow_execution.workflow_id = error.workflow_id - failure.child_workflow_execution_failure_info.workflow_execution.run_id = ( - error.run_id - ) - failure.child_workflow_execution_failure_info.workflow_type.name = ( - error.workflow_type - ) - failure.child_workflow_execution_failure_info.initiated_event_id = ( - error.initiated_event_id - ) - failure.child_workflow_execution_failure_info.started_event_id = ( - error.started_event_id - ) - failure.child_workflow_execution_failure_info.retry_state = ( - temporalio.api.enums.v1.RetryState.ValueType(error.retry_state or 0) - ) - # TODO(nexus-preview): missing test coverage - elif isinstance(error, temporalio.exceptions.NexusOperationError): - failure.nexus_operation_execution_failure_info.SetInParent() - failure.nexus_operation_execution_failure_info.scheduled_event_id = ( - error.scheduled_event_id - ) - failure.nexus_operation_execution_failure_info.endpoint = error.endpoint - failure.nexus_operation_execution_failure_info.service = error.service - failure.nexus_operation_execution_failure_info.operation = error.operation - failure.nexus_operation_execution_failure_info.operation_token = ( - error.operation_token - ) - - def _nexus_handler_error_to_failure( - self, - error: nexusrpc.HandlerError, - payload_converter: PayloadConverter, - failure: temporalio.api.failure.v1.Failure, - ) -> None: - failure.message = str(error) - if error.__traceback__: - failure.stack_trace = "\n".join(traceback.format_tb(error.__traceback__)) - if error.__cause__: - self.to_failure(error.__cause__, payload_converter, failure.cause) - failure.nexus_handler_failure_info.SetInParent() - failure.nexus_handler_failure_info.type = error.type.name - failure.nexus_handler_failure_info.retry_behavior = temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.ValueType( - temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE - if error.retryable_override is True - else temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE - if error.retryable_override is False - else temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED - ) - - def from_failure( - self, - failure: temporalio.api.failure.v1.Failure, - payload_converter: PayloadConverter, - ) -> BaseException: - """See base class.""" - # If encoded attributes are present and have the fields we expect, - # extract them - if failure.HasField("encoded_attributes"): - # Clone the failure to not mutate the incoming failure - new_failure = temporalio.api.failure.v1.Failure() - new_failure.CopyFrom(failure) - failure = new_failure - try: - encoded_attributes: dict[str, Any] = payload_converter.from_payloads( - [failure.encoded_attributes] - )[0] - if isinstance(encoded_attributes, dict): - message = encoded_attributes.get("message") - if isinstance(message, str): - failure.message = message - stack_trace = encoded_attributes.get("stack_trace") - if isinstance(stack_trace, str): - failure.stack_trace = stack_trace - except: - pass - - err: temporalio.exceptions.FailureError | nexusrpc.HandlerError - if failure.HasField("application_failure_info"): - app_info = failure.application_failure_info - err = temporalio.exceptions.ApplicationError( - failure.message or "Application error", - *payload_converter.from_payloads_wrapper(app_info.details), - type=app_info.type or None, - non_retryable=app_info.non_retryable, - next_retry_delay=app_info.next_retry_delay.ToTimedelta(), - category=temporalio.exceptions.ApplicationErrorCategory( - int(app_info.category) - ), - ) - elif failure.HasField("timeout_failure_info"): - timeout_info = failure.timeout_failure_info - err = temporalio.exceptions.TimeoutError( - failure.message or "Timeout", - type=temporalio.exceptions.TimeoutType(int(timeout_info.timeout_type)) - if timeout_info.timeout_type - else None, - last_heartbeat_details=payload_converter.from_payloads_wrapper( - timeout_info.last_heartbeat_details - ), - ) - elif failure.HasField("canceled_failure_info"): - cancel_info = failure.canceled_failure_info - err = temporalio.exceptions.CancelledError( - failure.message or "Cancelled", - *payload_converter.from_payloads_wrapper(cancel_info.details), - ) - elif failure.HasField("terminated_failure_info"): - err = temporalio.exceptions.TerminatedError(failure.message or "Terminated") - elif failure.HasField("server_failure_info"): - server_info = failure.server_failure_info - err = temporalio.exceptions.ServerError( - failure.message or "Server error", - non_retryable=server_info.non_retryable, - ) - elif failure.HasField("activity_failure_info"): - act_info = failure.activity_failure_info - err = temporalio.exceptions.ActivityError( - failure.message or "Activity error", - scheduled_event_id=act_info.scheduled_event_id, - started_event_id=act_info.started_event_id, - identity=act_info.identity, - activity_type=act_info.activity_type.name, - activity_id=act_info.activity_id, - retry_state=temporalio.exceptions.RetryState(int(act_info.retry_state)) - if act_info.retry_state - else None, - ) - elif failure.HasField("child_workflow_execution_failure_info"): - child_info = failure.child_workflow_execution_failure_info - err = temporalio.exceptions.ChildWorkflowError( - failure.message or "Child workflow error", - namespace=child_info.namespace, - workflow_id=child_info.workflow_execution.workflow_id, - run_id=child_info.workflow_execution.run_id, - workflow_type=child_info.workflow_type.name, - initiated_event_id=child_info.initiated_event_id, - started_event_id=child_info.started_event_id, - retry_state=temporalio.exceptions.RetryState( - int(child_info.retry_state) - ) - if child_info.retry_state - else None, - ) - elif failure.HasField("nexus_handler_failure_info"): - nexus_handler_failure_info = failure.nexus_handler_failure_info - try: - _type = nexusrpc.HandlerErrorType[nexus_handler_failure_info.type] - except KeyError: - logger.warning( - f"Unknown Nexus HandlerErrorType: {nexus_handler_failure_info.type}" - ) - _type = nexusrpc.HandlerErrorType.INTERNAL - retryable_override = ( - True - if ( - nexus_handler_failure_info.retry_behavior - == temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE - ) - else False - if ( - nexus_handler_failure_info.retry_behavior - == temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE - ) - else None - ) - err = nexusrpc.HandlerError( - failure.message or "Nexus handler error", - type=_type, - retryable_override=retryable_override, - ) - elif failure.HasField("nexus_operation_execution_failure_info"): - nexus_op_failure_info = failure.nexus_operation_execution_failure_info - err = temporalio.exceptions.NexusOperationError( - failure.message or "Nexus operation error", - scheduled_event_id=nexus_op_failure_info.scheduled_event_id, - endpoint=nexus_op_failure_info.endpoint, - service=nexus_op_failure_info.service, - operation=nexus_op_failure_info.operation, - operation_token=nexus_op_failure_info.operation_token, - ) - else: - err = temporalio.exceptions.FailureError(failure.message or "Failure error") - if isinstance(err, temporalio.exceptions.FailureError): - err._failure = failure - if failure.HasField("cause"): - err.__cause__ = self.from_failure(failure.cause, payload_converter) - return err - - -class DefaultFailureConverterWithEncodedAttributes(DefaultFailureConverter): - """Implementation of :py:class:`DefaultFailureConverter` which moves message - and stack trace to encoded attributes subject to a codec. - """ - - def __init__(self) -> None: - """Create a default failure converter with encoded attributes.""" - super().__init__(encode_common_attributes=True) - - -@dataclass(frozen=True) -class DataConverter(WithSerializationContext): - """Data converter for converting and encoding payloads to/from Python values. - - This combines :py:class:`PayloadConverter` which converts values with - :py:class:`PayloadCodec` which encodes bytes. - """ - - payload_converter_class: type[PayloadConverter] = DefaultPayloadConverter - """Class to instantiate for payload conversion.""" - - payload_codec: PayloadCodec | None = None - """Optional codec for encoding payload bytes.""" - - failure_converter_class: type[FailureConverter] = DefaultFailureConverter - """Class to instantiate for failure conversion.""" - - payload_converter: PayloadConverter = dataclasses.field(init=False) - """Payload converter created from the :py:attr:`payload_converter_class`.""" - - failure_converter: FailureConverter = dataclasses.field(init=False) - """Failure converter created from the :py:attr:`failure_converter_class`.""" - - default: ClassVar[DataConverter] - """Singleton default data converter.""" - - def __post_init__(self) -> None: # noqa: D105 - object.__setattr__(self, "payload_converter", self.payload_converter_class()) - object.__setattr__(self, "failure_converter", self.failure_converter_class()) - - async def encode( - self, values: Sequence[Any] - ) -> list[temporalio.api.common.v1.Payload]: - """Encode values into payloads. - - First converts values to payloads then encodes payloads using codec. - - Args: - values: Values to be converted and encoded. - - Returns: - Converted and encoded payloads. Note, this does not have to be the - same number as values given, but must be at least one and cannot be - more than was given. - """ - payloads = self.payload_converter.to_payloads(values) - if self.payload_codec: - payloads = await self.payload_codec.encode(payloads) - return payloads - - async def decode( - self, - payloads: Sequence[temporalio.api.common.v1.Payload], - type_hints: list[type] | None = None, - ) -> list[Any]: - """Decode payloads into values. - - First decodes payloads using codec then converts payloads to values. - - Args: - payloads: Payloads to be decoded and converted. - - Returns: - Decoded and converted values. - """ - if self.payload_codec: - payloads = await self.payload_codec.decode(payloads) - return self.payload_converter.from_payloads(payloads, type_hints) - - async def encode_wrapper( - self, values: Sequence[Any] - ) -> temporalio.api.common.v1.Payloads: - """:py:meth:`encode` for the - :py:class:`temporalio.api.common.v1.Payloads` wrapper. - """ - return temporalio.api.common.v1.Payloads(payloads=(await self.encode(values))) - - async def decode_wrapper( - self, - payloads: temporalio.api.common.v1.Payloads | None, - type_hints: list[type] | None = None, - ) -> list[Any]: - """:py:meth:`decode` for the - :py:class:`temporalio.api.common.v1.Payloads` wrapper. - """ - if not payloads or not payloads.payloads: - return [] - return await self.decode(payloads.payloads, type_hints) - - async def encode_failure( - self, exception: BaseException, failure: temporalio.api.failure.v1.Failure - ) -> None: - """Convert and encode failure.""" - self.failure_converter.to_failure(exception, self.payload_converter, failure) - if self.payload_codec: - await self.payload_codec.encode_failure(failure) - - async def decode_failure( - self, failure: temporalio.api.failure.v1.Failure - ) -> BaseException: - """Decode and convert failure.""" - if self.payload_codec: - await self.payload_codec.decode_failure(failure) - return self.failure_converter.from_failure(failure, self.payload_converter) - - def with_context(self, context: SerializationContext) -> Self: - """Return an instance with context set on the component converters.""" - payload_converter = self.payload_converter - payload_codec = self.payload_codec - failure_converter = self.failure_converter - if isinstance(payload_converter, WithSerializationContext): - payload_converter = payload_converter.with_context(context) - if isinstance(payload_codec, WithSerializationContext): - payload_codec = payload_codec.with_context(context) - if isinstance(failure_converter, WithSerializationContext): - failure_converter = failure_converter.with_context(context) - if all( - new is orig - for new, orig in [ - (payload_converter, self.payload_converter), - (payload_codec, self.payload_codec), - (failure_converter, self.failure_converter), - ] - ): - return self - cloned = dataclasses.replace(self) - object.__setattr__(cloned, "payload_converter", payload_converter) - object.__setattr__(cloned, "payload_codec", payload_codec) - object.__setattr__(cloned, "failure_converter", failure_converter) - return cloned - - -DefaultPayloadConverter.default_encoding_payload_converters = ( - BinaryNullPayloadConverter(), - BinaryPlainPayloadConverter(), - JSONProtoPayloadConverter(), - BinaryProtoPayloadConverter(), - JSONPlainPayloadConverter(), # JSON Plain needs to remain in last because it throws on unknown types -) - -DataConverter.default = DataConverter() - -PayloadConverter.default = DataConverter.default.payload_converter - -FailureConverter.default = DataConverter.default.failure_converter - - -def default() -> DataConverter: - """Default data converter. - - .. deprecated:: - Use :py:meth:`DataConverter.default` instead. - """ - return DataConverter.default - - -def encode_search_attributes( - attributes: ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ), - api: temporalio.api.common.v1.SearchAttributes, -) -> None: - """Convert search attributes into an API message. - - Args: - attributes: Search attributes to convert. The dictionary form of this is - DEPRECATED. - api: API message to set converted attributes on. - """ - if isinstance(attributes, temporalio.common.TypedSearchAttributes): - for typed_k, typed_v in attributes: - api.indexed_fields[typed_k.name].CopyFrom( - encode_typed_search_attribute_value(typed_k, typed_v) - ) - return - elif not attributes: - return - for k, v in attributes.items(): - api.indexed_fields[k].CopyFrom(encode_search_attribute_values(v)) - - -def encode_typed_search_attribute_value( - key: temporalio.common.SearchAttributeKey[ - temporalio.common.SearchAttributeValueType - ], - value: temporalio.common.SearchAttributeValue | None, -) -> temporalio.api.common.v1.Payload: - """Convert typed search attribute value into a payload. - - Args: - key: Key for the value. - value: Value to convert. - - Returns: - Payload for the value. - """ - # For server search attributes to work properly, we cannot set the metadata - # type when we set null - if value is None: - return default().payload_converter.to_payload(None) - if not isinstance(value, key.origin_value_type): - raise TypeError( - f"Value of type {value} not suitable for indexed value type {key.indexed_value_type}" - ) - # datetime needs to be in isoformat - if isinstance(value, datetime): - value = value.isoformat() - # We'll do an extra sanity check for keyword list and check every value - if isinstance(value, Sequence): - for v in value: - if not isinstance(v, str): - raise TypeError("All values of a keyword list must be strings") - # Convert value - payload = default().payload_converter.to_payload(value) - # Set metadata type - payload.metadata["type"] = key._metadata_type.encode() - return payload - - -def encode_search_attribute_values( - vals: temporalio.common.SearchAttributeValues, -) -> temporalio.api.common.v1.Payload: - """Convert search attribute values into a payload. - - .. deprecated:: - Use typed search attributes instead. - - Args: - vals: List of values to convert. - """ - if not isinstance(vals, list): - raise TypeError("Search attribute values must be lists") - # Confirm all types are the same - val_type: type | None = None - # Convert dates to strings - safe_vals = [] - for v in vals: - if isinstance(v, datetime): - if v.tzinfo is None: - raise ValueError( - "Timezone must be present on all search attribute dates" - ) - v = v.isoformat() - elif not isinstance(v, (str, int, float, bool)): - raise TypeError( - f"Search attribute value of type {type(v).__name__} not one of str, int, float, bool, or datetime" - ) - elif val_type and type(v) is not val_type: - raise TypeError( - "Search attribute values must have the same type for the same key" - ) - elif not val_type: - val_type = type(v) - safe_vals.append(v) - return default().payload_converter.to_payloads([safe_vals])[0] - - -def _encode_maybe_typed_search_attributes( - non_typed_attributes: temporalio.common.SearchAttributes | None, - typed_attributes: temporalio.common.TypedSearchAttributes | None, - api: temporalio.api.common.v1.SearchAttributes, -) -> None: - if non_typed_attributes: - if typed_attributes and typed_attributes.search_attributes: - raise ValueError( - "Cannot provide both deprecated search attributes and typed search attributes" - ) - encode_search_attributes(non_typed_attributes, api) - elif typed_attributes and typed_attributes.search_attributes: - encode_search_attributes(typed_attributes, api) - - -def _get_iso_datetime_parser() -> Callable[[str], datetime]: - """Isolates system version check and returns relevant datetime passer - - Returns: - A callable to parse date strings into datetimes. - """ - if sys.version_info >= (3, 11): - return datetime.fromisoformat # noqa - else: - # Isolate import for py > 3.11, as dependency only installed for < 3.11 - return parser.isoparse - - -def decode_search_attributes( - api: temporalio.api.common.v1.SearchAttributes, -) -> temporalio.common.SearchAttributes: - """Decode API search attributes to values. - - .. deprecated:: - Use typed search attributes instead. - - Args: - api: API message with search attribute values to convert. - - Returns: - Converted search attribute values (new mapping every time). - """ - conv = default().payload_converter - ret = {} - for k, v in api.indexed_fields.items(): - val = conv.from_payloads([v])[0] - # If a value did not come back as a list, make it a single-item list - if not isinstance(val, list): - val = [val] - # Convert each item to datetime if necessary - if v.metadata.get("type") == b"Datetime": - parser = _get_iso_datetime_parser() - val = [parser(v) for v in val] - ret[k] = val - return ret - - -def decode_typed_search_attributes( - api: temporalio.api.common.v1.SearchAttributes, -) -> temporalio.common.TypedSearchAttributes: - """Decode API search attributes to typed search attributes. - - Args: - api: API message with search attribute values to convert. - - Returns: - Typed search attribute collection (new object every time). - """ - conv = default().payload_converter - pairs: list[temporalio.common.SearchAttributePair] = [] - for k, v in api.indexed_fields.items(): - # We want the "type" metadata, but if it is not present or an unknown - # type, we will just ignore - metadata_type = v.metadata.get("type") - if not metadata_type: - continue - key = temporalio.common.SearchAttributeKey._from_metadata_type( - k, metadata_type.decode() - ) - if not key: - continue - val = conv.from_payload(v) - # If the value is a list but the type is not keyword list, pull out - # single item or consider this an invalid value and ignore - if ( - key.indexed_value_type - != temporalio.common.SearchAttributeIndexedValueType.KEYWORD_LIST - and isinstance(val, list) - ): - if len(val) != 1: - continue - val = val[0] - if ( - key.indexed_value_type - == temporalio.common.SearchAttributeIndexedValueType.DATETIME - ): - parser = _get_iso_datetime_parser() - # We will let this throw - val = parser(val) - # If the value isn't the right type, we need to ignore - if isinstance(val, key.origin_value_type): - pairs.append(temporalio.common.SearchAttributePair(key, val)) - return temporalio.common.TypedSearchAttributes(pairs) - - -def _decode_search_attribute_value( - payload: temporalio.api.common.v1.Payload, -) -> temporalio.common.SearchAttributeValue: - val = default().payload_converter.from_payload(payload) - if isinstance(val, str) and payload.metadata.get("type") == b"Datetime": - val = _get_iso_datetime_parser()(val) - return val # type: ignore - - -def value_to_type( - hint: type, - value: Any, - custom_converters: Sequence[JSONTypeConverter] = [], -) -> Any: - """Convert a given value to the given type hint. - - This is used internally to convert a raw JSON loaded value to a specific - type hint. - - Args: - hint: Type hint to convert the value to. - value: Raw value (e.g. primitive, dict, or list) to convert from. - custom_converters: Set of custom converters to try before doing default - conversion. Converters are tried in order and the first value that - is not :py:attr:`JSONTypeConverter.Unhandled` will be returned from - this function instead of doing default behavior. - - Returns: - Converted value. - - Raises: - TypeError: Unable to convert to the given hint. - """ - # Try custom converters - for conv in custom_converters: - ret = conv.to_typed_value(hint, value) - if ret is not JSONTypeConverter.Unhandled: - return ret - - # Any or primitives - if hint is Any: - return value - elif hint is datetime: - if isinstance(value, str): - try: - return _get_iso_datetime_parser()(value) - except ValueError as err: - raise TypeError(f"Failed parsing datetime string: {value}") from err - elif isinstance(value, datetime): - return value - raise TypeError(f"Expected datetime or ISO8601 string, got {type(value)}") - elif hint is int or hint is float: - if not isinstance(value, (int, float)): - raise TypeError(f"Expected value to be int|float, was {type(value)}") - return hint(value) - elif hint is bool: - if not isinstance(value, bool): - raise TypeError(f"Expected value to be bool, was {type(value)}") - return bool(value) - elif hint is str: - if not isinstance(value, str): - raise TypeError(f"Expected value to be str, was {type(value)}") - return str(value) - elif hint is bytes: - if not isinstance(value, (str, bytes, list)): - raise TypeError(f"Expected value to be bytes, was {type(value)}") - # In some other SDKs, this is serialized as a base64 string, but in - # Python this is a numeric array. - return bytes(value) # type: ignore - elif hint is type(None): - if value is not None: - raise TypeError(f"Expected None, got value of type {type(value)}") - return None - - # NewType. Note we cannot simply check isinstance NewType here because it's - # only been a class since 3.10. Instead we'll just check for the presence - # of a supertype. - supertype = getattr(hint, "__supertype__", None) - if supertype: - return value_to_type(supertype, value, custom_converters) - - # Load origin for other checks - origin = getattr(hint, "__origin__", hint) - type_args: tuple = getattr(hint, "__args__", ()) - - # Literal - if origin is Literal or origin is typing_extensions.Literal: - if value not in type_args: - raise TypeError(f"Value {value} not in literal values {type_args}") - return value - - is_union = origin is Union - is_union = is_union or isinstance(origin, UnionType) - - # Union - if is_union: - # Try each one. Note, Optional is just a union w/ none. - for arg in type_args: - try: - return value_to_type(arg, value, custom_converters) - except Exception: - pass - raise TypeError(f"Failed converting to {hint} from {value}") - - # Mapping - if inspect.isclass(origin) and issubclass(origin, collections.abc.Mapping): - if not isinstance(value, collections.abc.Mapping): - raise TypeError(f"Expected {hint}, value was {type(value)}") - ret_dict = {} - # If there are required or optional keys that means we are a TypedDict - # and therefore can extract per-key types - per_key_types: dict[str, type] | None = None - if getattr(origin, "__required_keys__", None) or getattr( - origin, "__optional_keys__", None - ): - per_key_types = get_type_hints(origin) - key_type = ( - type_args[0] - if len(type_args) > 0 - and type_args[0] is not Any - and not isinstance(type_args[0], TypeVar) - else None - ) - value_type = ( - type_args[1] - if len(type_args) > 1 - and type_args[1] is not Any - and not isinstance(type_args[1], TypeVar) - else None - ) - # Convert each key/value - for key, value in value.items(): - this_value_type = value_type - if per_key_types: - # TODO(cretz): Strict mode would fail an unknown key - this_value_type = per_key_types.get(key) - - if key_type: - # This function is used only by JSONPlainPayloadConverter. When - # serializing to JSON, Python supports key types str, int, float, bool, - # and None, serializing all to string representations. We now attempt to - # use the provided type annotation to recover the original value with its - # original type. - try: - if isinstance(key, str): - if key_type is int or key_type is float: - key = key_type(key) - elif key_type is bool: - key = {"true": True, "false": False}[key] - elif key_type is type(None): - key = {"null": None}[key] - - if not isinstance(key_type, type) or not isinstance(key, key_type): - key = value_to_type(key_type, key, custom_converters) - except Exception as err: - raise TypeError( - f"Failed converting key {repr(key)} to type {key_type} in mapping {hint}" - ) from err - - if this_value_type: - try: - value = value_to_type(this_value_type, value, custom_converters) - except Exception as err: - raise TypeError( - f"Failed converting value for key {repr(key)} in mapping {hint}" - ) from err - ret_dict[key] = value - # If there are per-key types, it's a typed dict and we want to attempt - # instantiation to get its validation - if per_key_types: - ret_dict = hint(**ret_dict) - return ret_dict - - # Dataclass - if dataclasses.is_dataclass(hint): - if not isinstance(value, dict): - raise TypeError( - f"Cannot convert to dataclass {hint}, value is {type(value)} not dict" - ) - # Obtain dataclass fields and check that all dict fields are there and - # that no required fields are missing. Unknown fields are silently - # ignored. - fields = dataclasses.fields(hint) - field_hints = get_type_hints(hint) - field_values = {} - for field in fields: - field_value = value.get(field.name, dataclasses.MISSING) - # We do not check whether field is required here. Rather, we let the - # attempted instantiation of the dataclass raise if a field is - # missing - if field_value is not dataclasses.MISSING: - try: - field_values[field.name] = value_to_type( - field_hints[field.name], field_value, custom_converters - ) - except Exception as err: - raise TypeError( - f"Failed converting field {field.name} on dataclass {hint}" - ) from err - # Simply instantiate the dataclass. This will fail as expected when - # missing required fields. - # TODO(cretz): Want way to convert snake case to camel case? - return hint(**field_values) - - # Pydantic model instance - # Pydantic users should use Pydantic v2 with - # temporalio.contrib.pydantic.pydantic_data_converter, in which case a - # pydantic model instance will have been handled by the custom_converters at - # the start of this function. We retain the following for backwards - # compatibility with pydantic v1 users, but this is deprecated. - parse_obj_attr = inspect.getattr_static(hint, "parse_obj", None) - if isinstance(parse_obj_attr, classmethod) or isinstance( - parse_obj_attr, staticmethod - ): - if not isinstance(value, dict): - raise TypeError( - f"Cannot convert to {hint}, value is {type(value)} not dict" - ) - return getattr(hint, "parse_obj")(value) - - # IntEnum - if inspect.isclass(hint) and issubclass(hint, IntEnum): - if not isinstance(value, int): - raise TypeError( - f"Cannot convert to enum {hint}, value not an integer, value is {type(value)}" - ) - return hint(value) - - # StrEnum, available in 3.11+ - if sys.version_info >= (3, 11): - if inspect.isclass(hint) and issubclass(hint, StrEnum): - if not isinstance(value, str): - raise TypeError( - f"Cannot convert to enum {hint}, value not a string, value is {type(value)}" - ) - return hint(value) - - # UUID - if inspect.isclass(hint) and issubclass(hint, uuid.UUID): - return hint(value) - - # Iterable. We intentionally put this last as it catches several others. - if inspect.isclass(origin) and issubclass(origin, collections.abc.Iterable): - if not isinstance(value, collections.abc.Iterable): - raise TypeError(f"Expected {hint}, value was {type(value)}") - ret_list = [] - # If there is no type arg, just return value as is - if not type_args or ( - len(type_args) == 1 - and (isinstance(type_args[0], TypeVar) or type_args[0] is Ellipsis) - ): - ret_list = list(value) - else: - # Otherwise convert - for i, item in enumerate(value): - # Non-tuples use first type arg, tuples use arg set or one - # before ellipsis if that's set - if origin is not tuple: - arg_type = type_args[0] - elif len(type_args) > i and type_args[i] is not Ellipsis: - arg_type = type_args[i] - elif type_args[-1] is Ellipsis: - # Ellipsis means use the second to last one - arg_type = type_args[-2] # type: ignore - else: - raise TypeError( - f"Type {hint} only expecting {len(type_args)} values, got at least {i + 1}" - ) - try: - ret_list.append(value_to_type(arg_type, item, custom_converters)) - except Exception as err: - raise TypeError(f"Failed converting {hint} index {i}") from err - # If tuple, set, or deque convert back to that type - if origin is tuple: - return tuple(ret_list) - elif origin is set: - return set(ret_list) - elif origin is collections.deque: - return collections.deque(ret_list) - return ret_list - - raise TypeError(f"Unserializable type during conversion: {hint}") diff --git a/temporalio/converter/__init__.py b/temporalio/converter/__init__.py new file mode 100644 index 0000000000..324b477f25 --- /dev/null +++ b/temporalio/converter/__init__.py @@ -0,0 +1,107 @@ +"""Base converter and implementations for data conversion.""" + +from temporalio.converter._data_converter import ( + DataConverter, + default, +) +from temporalio.converter._extstore import ( + ExternalStorage, + StorageDriver, + StorageDriverActivityInfo, + StorageDriverClaim, + StorageDriverRetrieveContext, + StorageDriverSelectContext, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, + StorageWarning, +) +from temporalio.converter._failure_converter import ( + DefaultFailureConverter, + DefaultFailureConverterWithEncodedAttributes, + FailureConverter, +) +from temporalio.converter._payload_codec import PayloadCodec +from temporalio.converter._payload_converter import ( + AdvancedJSONEncoder, + BinaryNullPayloadConverter, + BinaryPlainPayloadConverter, + BinaryProtoPayloadConverter, + CompositePayloadConverter, + DefaultPayloadConverter, + EncodingPayloadConverter, + JSONPlainPayloadConverter, + JSONProtoPayloadConverter, + JSONTypeConverter, + JSONTypeConverterUnhandled, + PayloadConverter, + TransferTypeConverter, + transfer_type_convertible, + value_to_type, +) +from temporalio.converter._payload_validation_error import ( + create_payload_validation_error, +) +from temporalio.converter._search_attributes import ( + decode_search_attributes, + decode_typed_search_attributes, + encode_search_attribute_values, + encode_search_attributes, + encode_typed_search_attribute_value, +) +from temporalio.converter._serialization_context import ( + ActivitySerializationContext, + NexusSerializationContext, + SerializationContext, + WithSerializationContext, + WorkflowSerializationContext, +) + +__all__ = [ + "ActivitySerializationContext", + "ExternalStorage", + "StorageDriver", + "StorageDriverActivityInfo", + "StorageDriverClaim", + "StorageDriverRetrieveContext", + "StorageDriverSelectContext", + "StorageDriverStoreContext", + "StorageDriverWorkflowInfo", + "StorageWarning", + "AdvancedJSONEncoder", + "BinaryNullPayloadConverter", + "BinaryPlainPayloadConverter", + "BinaryProtoPayloadConverter", + "CompositePayloadConverter", + "TransferTypeConverter", + "DataConverter", + "DefaultFailureConverter", + "DefaultFailureConverterWithEncodedAttributes", + "DefaultPayloadConverter", + "EncodingPayloadConverter", + "FailureConverter", + "JSONPlainPayloadConverter", + "JSONProtoPayloadConverter", + "JSONTypeConverter", + "JSONTypeConverterUnhandled", + "NexusSerializationContext", + "PayloadCodec", + "PayloadConverter", + "SerializationContext", + "WithSerializationContext", + "WorkflowSerializationContext", + "transfer_type_convertible", + "decode_search_attributes", + "decode_typed_search_attributes", + "default", + "create_payload_validation_error", + "encode_search_attribute_values", + "encode_search_attributes", + "encode_typed_search_attribute_value", + "value_to_type", +] + +DataConverter.default = DataConverter() + +PayloadConverter.default = DataConverter.default.payload_converter + +FailureConverter.default = DataConverter.default.failure_converter diff --git a/temporalio/converter/_data_converter.py b/temporalio/converter/_data_converter.py new file mode 100644 index 0000000000..4985c5b7d6 --- /dev/null +++ b/temporalio/converter/_data_converter.py @@ -0,0 +1,440 @@ +"""DataConverter: the top-level data conversion orchestrator.""" + +from __future__ import annotations + +import dataclasses +from collections.abc import Mapping, Sequence +from dataclasses import dataclass +from logging import getLogger +from typing import TYPE_CHECKING, Any, ClassVar + +from typing_extensions import Self + +import temporalio.api.common.v1 +import temporalio.api.failure.v1 +import temporalio.common +import temporalio.converter._extstore +from temporalio.converter._extstore import ( + _REFERENCE_ENCODING, + _REFERENCE_MARKER_KEY, + _REFERENCE_MESSAGE_TYPE, + ExternalStorage, + StorageDriverStoreContext, +) +from temporalio.converter._failure_converter import ( + FailureConverter, +) +from temporalio.converter._payload_codec import ( + PayloadCodec, + _apply_to_failure_payloads, +) +from temporalio.converter._payload_converter import ( + PayloadConverter, + _TemporalTransferTypePayloadConverter, +) +from temporalio.converter._serialization_context import ( + SerializationContext, + WithSerializationContext, +) + + +def _is_reference_payload(p: temporalio.api.common.v1.Payload) -> bool: + """Return True if *p* is an external-storage reference payload.""" + return p.metadata.get("encoding") == _REFERENCE_ENCODING or ( + p.metadata.get("encoding") == b"json/protobuf" + and p.metadata.get("messageType") == _REFERENCE_MESSAGE_TYPE + ) + + +def _has_reference_marker(p: temporalio.api.common.v1.Payload) -> bool: + """Return True if *p* carries the external-storage reference marker.""" + return p.metadata.get(_REFERENCE_MARKER_KEY) == b"true" + + +# Import defaults from public API to avoid pydoctor cross-reference issues +if TYPE_CHECKING: + from temporalio.converter import DefaultFailureConverter, DefaultPayloadConverter +else: + # Import from private modules for runtime to avoid circular imports + from temporalio.converter._failure_converter import DefaultFailureConverter + from temporalio.converter._payload_converter import DefaultPayloadConverter + +logger = getLogger("temporalio.converter") + + +@dataclass(frozen=True) +class DataConverter(WithSerializationContext): + """Data converter for converting and encoding payloads to/from Python values. + + This combines :py:class:`PayloadConverter` which converts values with + :py:class:`PayloadCodec` which encodes bytes. + """ + + payload_converter_class: type[PayloadConverter] = DefaultPayloadConverter + """Class to instantiate for payload conversion.""" + + payload_codec: PayloadCodec | None = None + """Optional codec for encoding payload bytes.""" + + failure_converter_class: type[FailureConverter] = DefaultFailureConverter + """Class to instantiate for failure conversion.""" + + payload_converter: PayloadConverter = dataclasses.field(init=False) + """Payload converter created from :py:attr:`payload_converter_class` and wrapped + with SDK transfer type conversion, including when called directly. + """ + + failure_converter: FailureConverter = dataclasses.field(init=False) + """Failure converter created from the :py:attr:`failure_converter_class`.""" + + external_storage: ExternalStorage | None = None + """Options for external storage. If None, external storage is disabled. + + .. warning:: + This API is experimental. + """ + + default: ClassVar[DataConverter] + """Singleton default data converter.""" + + def __post_init__(self) -> None: # noqa: D105 + object.__setattr__(self, "payload_converter", self._new_payload_converter()) + object.__setattr__(self, "failure_converter", self.failure_converter_class()) + + def _new_payload_converter(self) -> PayloadConverter: + """Create a payload converter instance with SDK transfer type hooks enabled.""" + return _TemporalTransferTypePayloadConverter.wrap( + self.payload_converter_class() + ) + + async def encode( + self, values: Sequence[Any] + ) -> list[temporalio.api.common.v1.Payload]: + """Encode values into payloads. + + First converts values to payloads then encodes payloads using codec. + + Args: + values: Values to be converted and encoded. + + Returns: + Converted and encoded payloads. Note, this does not have to be the + same number as values given, but must be at least one and cannot be + more than was given. + """ + payloads = self.payload_converter.to_payloads(values) + payloads = await self._encode_payload_sequence(payloads) + payloads = await self._external_store_payload_sequence(payloads) + payloads = await self._encode_reference_payload_sequence(payloads) + return payloads + + async def decode( + self, + payloads: Sequence[temporalio.api.common.v1.Payload], + type_hints: list[type] | None = None, + ) -> list[Any]: + """Decode payloads into values. + + First decodes payloads using codec then converts payloads to values. + + Args: + payloads: Payloads to be decoded and converted. + + Returns: + Decoded and converted values. + """ + payloads = await self._decode_reference_payload_sequence(payloads) + payloads = await self._external_retrieve_payload_sequence(payloads) + payloads = await self._decode_payload_sequence(payloads) + return self.payload_converter.from_payloads(payloads, type_hints) + + async def encode_wrapper( + self, values: Sequence[Any] + ) -> temporalio.api.common.v1.Payloads: + """:py:meth:`encode` for the + :py:class:`temporalio.api.common.v1.Payloads` wrapper. + """ + return temporalio.api.common.v1.Payloads(payloads=(await self.encode(values))) + + async def decode_wrapper( + self, + payloads: temporalio.api.common.v1.Payloads | None, + type_hints: list[type] | None = None, + ) -> list[Any]: + """:py:meth:`decode` for the + :py:class:`temporalio.api.common.v1.Payloads` wrapper. + """ + if not payloads or not payloads.payloads: + return [] + return await self.decode(payloads.payloads, type_hints) + + async def encode_failure( + self, exception: BaseException, failure: temporalio.api.failure.v1.Failure + ) -> None: + """Convert and encode failure.""" + self.failure_converter.to_failure(exception, self.payload_converter, failure) + await _apply_to_failure_payloads(failure, self._transform_outbound_payloads) + + async def decode_failure( + self, failure: temporalio.api.failure.v1.Failure + ) -> BaseException: + """Decode and convert failure.""" + await _apply_to_failure_payloads(failure, self._transform_inbound_payloads) + return self.failure_converter.from_failure(failure, self.payload_converter) + + def with_context(self, context: SerializationContext) -> Self: + """Return an instance with context set on the component converters.""" + payload_converter = self.payload_converter + payload_codec = self.payload_codec + failure_converter = self.failure_converter + external_storage = self.external_storage + if isinstance(payload_converter, WithSerializationContext): + payload_converter = payload_converter.with_context(context) + if isinstance(payload_codec, WithSerializationContext): + payload_codec = payload_codec.with_context(context) + if isinstance(failure_converter, WithSerializationContext): + failure_converter = failure_converter.with_context(context) + if isinstance(external_storage, WithSerializationContext): + external_storage = external_storage.with_context(context) + if all( + new is orig + for new, orig in [ + (payload_converter, self.payload_converter), + (payload_codec, self.payload_codec), + (failure_converter, self.failure_converter), + (external_storage, self.external_storage), + ] + ): + return self + cloned = dataclasses.replace(self) + object.__setattr__(cloned, "payload_converter", payload_converter) + object.__setattr__(cloned, "payload_codec", payload_codec) + object.__setattr__(cloned, "failure_converter", failure_converter) + object.__setattr__(cloned, "external_storage", external_storage) + return cloned + + def _with_store_context( + self, store_ctx: StorageDriverStoreContext + ) -> DataConverter: + """Return an instance with ``store_ctx`` bound into :attr:`external_storage`.""" + if self.external_storage is None: + return self + # dataclasses.replace reruns __post_init__, which builds new payload and + # failure converters and drops the context set by with_context. Keep the + # current ones, like with_context does. + cloned = dataclasses.replace(self) + object.__setattr__(cloned, "payload_converter", self.payload_converter) + object.__setattr__(cloned, "failure_converter", self.failure_converter) + object.__setattr__( + cloned, + "external_storage", + self.external_storage._with_store_context(store_ctx), + ) + return cloned + + def _with_contexts( + self, + serialization_ctx: SerializationContext, + store_ctx: StorageDriverStoreContext, + ) -> DataConverter: + """Return an instance with both serialization and store contexts applied.""" + return self.with_context(serialization_ctx)._with_store_context(store_ctx) + + async def _decode_memo( + self, + source: temporalio.api.common.v1.Memo, + ) -> Mapping[str, Any]: + mapping: dict[str, Any] = {} + for k, v in source.fields.items(): + mapping[k] = (await self.decode([v]))[0] + return mapping + + async def _decode_memo_field( + self, + source: temporalio.api.common.v1.Memo, + key: str, + default: Any, + type_hint: type | None, + ) -> dict[str, Any]: + payload = source.fields.get(key) + if not payload: + if default is temporalio.common._arg_unset: + raise KeyError(f"Memo does not have a value for key {key}") + return default + return (await self.decode([payload], [type_hint] if type_hint else None))[0] + + async def _encode_memo( + self, source: Mapping[str, Any] + ) -> temporalio.api.common.v1.Memo: + memo = temporalio.api.common.v1.Memo() + await self._encode_memo_existing(source, memo) + return memo + + async def _encode_memo_existing( + self, source: Mapping[str, Any], memo: temporalio.api.common.v1.Memo + ): + for k, v in source.items(): + payload = v + if not isinstance(v, temporalio.api.common.v1.Payload): + payload = (await self.encode([v]))[0] + memo.fields[k].CopyFrom(payload) + + async def _transform_outbound_payload( + self, payload: temporalio.api.common.v1.Payload + ) -> temporalio.api.common.v1.Payload: + if self.payload_codec: + payload = (await self.payload_codec.encode([payload]))[0] + if self.external_storage: + payload = await self.external_storage._store_payload(payload) + return (await self._encode_reference_payload_sequence([payload]))[0] + + async def _transform_outbound_payloads( + self, payloads: temporalio.api.common.v1.Payloads + ): + if self.payload_codec: + await self.payload_codec.encode_wrapper(payloads) + if self.external_storage: + await self.external_storage._store_payloads(payloads) + encoded_payloads = await self._encode_reference_payload_sequence( + payloads.payloads + ) + for i, payload in enumerate(encoded_payloads): + payloads.payloads[i].CopyFrom(payload) + + async def _transform_inbound_payload( + self, payload: temporalio.api.common.v1.Payload + ) -> temporalio.api.common.v1.Payload: + payload = (await self._decode_reference_payload_sequence([payload]))[0] + if self.external_storage: + payload = await self.external_storage._retrieve_payload(payload) + if self.payload_codec: + payload = (await self.payload_codec.decode([payload]))[0] + return payload + + async def _transform_inbound_payloads( + self, payloads: temporalio.api.common.v1.Payloads + ): + decoded_payloads = await self._decode_reference_payload_sequence( + payloads.payloads + ) + for i, payload in enumerate(decoded_payloads): + payloads.payloads[i].CopyFrom(payload) + if self.external_storage: + await self.external_storage._retrieve_payloads(payloads) + else: + if any(_is_reference_payload(p) for p in payloads.payloads): + raise RuntimeError( + "[TMPRL1105] Detected externally stored payload(s) but external storage is not configured." + ) + if self.payload_codec: + await self.payload_codec.decode_wrapper(payloads) + + async def _encode_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + """Codec encode only.""" + encoded_payloads = list(payloads) + if self.payload_codec: + encoded_payloads = await self.payload_codec.encode(encoded_payloads) + return encoded_payloads + + async def _external_store_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + """External storage store, then validate payload limits.""" + stored_payloads = list(payloads) + if self.external_storage: + stored_payloads = await self.external_storage._store_payload_sequence( + stored_payloads + ) + return stored_payloads + + async def _encode_reference_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + """Codec encode external storage reference payloads only.""" + encoded_payloads = list(payloads) + if ( + not temporalio.converter._extstore._ENCODE_STORAGE_REFERENCES + or not self.payload_codec + ): + return encoded_payloads + for i, payload in enumerate(encoded_payloads): + if not _is_reference_payload(payload): + continue + [encoded_reference] = await self.payload_codec.encode([payload]) + if not encoded_reference.external_payloads: + encoded_reference.external_payloads.extend(payload.external_payloads) + encoded_reference.metadata[_REFERENCE_MARKER_KEY] = b"true" + encoded_payloads[i] = encoded_reference + return encoded_payloads + + async def _decode_reference_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + """Codec decode marked external storage reference payloads only.""" + decoded_payloads = list(payloads) + for i, payload in enumerate(decoded_payloads): + if not _has_reference_marker(payload): + continue + if not self.external_storage: + raise RuntimeError( + "[TMPRL1105] Detected externally stored payload(s) but external storage is not configured." + ) + reference = payload + if self.payload_codec: + encoded_reference = temporalio.api.common.v1.Payload() + encoded_reference.CopyFrom(payload) + del encoded_reference.metadata[_REFERENCE_MARKER_KEY] + del encoded_reference.external_payloads[:] + [reference] = await self.payload_codec.decode([encoded_reference]) + if not _is_reference_payload(reference): + raise RuntimeError( + "[TMPRL1106] Encountered an encoded external storage reference that could not be decoded. " + "Check that the payload codec used to write it is configured." + ) + if not reference.external_payloads: + reference.external_payloads.extend(payload.external_payloads) + decoded_payloads[i] = reference + return decoded_payloads + + async def _external_retrieve_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + """External storage retrieve only.""" + retrieved_payloads = list(payloads) + if self.external_storage: + retrieved_payloads = await self.external_storage._retrieve_payload_sequence( + retrieved_payloads + ) + else: + if any(_is_reference_payload(p) for p in retrieved_payloads): + raise RuntimeError( + "[TMPRL1105] Detected externally stored payload(s) but external storage is not configured." + ) + return retrieved_payloads + + async def _decode_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + """Codec decode only.""" + decoded_payloads = list(payloads) + if self.payload_codec: + decoded_payloads = await self.payload_codec.decode(decoded_payloads) + return decoded_payloads + + # Without a codec or external storage, the payload sequence methods only reject + # external storage references, so workers skip the passes that cannot change a + # payload and the per-command context lookups. + @property + def _has_codec_or_external_storage(self) -> bool: + return self.payload_codec is not None or self.external_storage is not None + + +def default() -> DataConverter: + """Default data converter. + + .. deprecated:: + Use :py:meth:`DataConverter.default` instead. + """ + return DataConverter.default diff --git a/temporalio/converter/_extstore.py b/temporalio/converter/_extstore.py new file mode 100644 index 0000000000..19a5d7a72d --- /dev/null +++ b/temporalio/converter/_extstore.py @@ -0,0 +1,691 @@ +"""External payload storage support for offloading payloads to external storage +systems. +""" + +from __future__ import annotations + +import asyncio +import contextlib +import contextvars +import dataclasses +import time +from abc import ABC, abstractmethod +from collections.abc import Callable, Coroutine, Generator, Mapping, Sequence +from dataclasses import dataclass +from datetime import timedelta +from typing import Any, ClassVar, TypeVar + +from typing_extensions import Self + +from temporalio.api.common.v1 import Payload, Payloads +from temporalio.api.sdk.v1.external_storage_pb2 import ExternalStorageReference +from temporalio.converter._payload_converter import ( + JSONPlainPayloadConverter, + JSONProtoPayloadConverter, +) + +_T = TypeVar("_T") + +_REFERENCE_ENCODING = b"json/external-storage-reference" +_REFERENCE_MESSAGE_TYPE = ExternalStorageReference.DESCRIPTOR.full_name.encode() +# Indicates this payload represents an externally stored payload. If encoded, the +# _REFERENCE_ENCODING could be any value. The presence of the _REFERENCE_MARKER_KEY +# with a value of b"true" is used to reliably identify such payloads. +_REFERENCE_MARKER_KEY = "__temporal_external_storage_reference" +# Writing marked, codec-encoded references is off until a release that can read +# them has been out long enough for workers to upgrade: workers on earlier +# versions cannot read encoded references. Reading is always on. Set to True in a +# later release to start writing them. +_ENCODE_STORAGE_REFERENCES = False + + +@dataclass +class StorageOperationMetrics: + """Accumulates metrics from external storage operations.""" + + payload_count: int = 0 + """Number of payloads stored or retrieved externally.""" + + total_size: int = 0 + """Total size in bytes of externally stored/retrieved payloads.""" + + driver_names: set[str] = dataclasses.field(default_factory=set) + """Names of the drivers that participated in the operations.""" + + _spans: list[tuple[float, float]] = dataclasses.field(default_factory=list) + """Monotonic-clock start and end of each recorded batch.""" + + @property + def total_duration(self) -> timedelta: + """Wall-clock time spent on external storage operations.""" + # Batches may run concurrently, so summing each batch's duration would + # double-count operations that overlapped. + return timedelta(seconds=_union_seconds(self._spans)) + + def record_batch( + self, count: int, size: int, start: float, end: float, driver_names: set[str] + ) -> None: + """Record metrics from a batch of storage operations.""" + self.payload_count += count + self.total_size += size + self._spans.append((start, end)) + self.driver_names.update(driver_names) + + def merge(self, other: StorageOperationMetrics) -> None: + """Add the metrics from another set of storage operations.""" + self.payload_count += other.payload_count + self.total_size += other.total_size + self._spans.extend(other._spans) + self.driver_names.update(other.driver_names) + + @contextlib.contextmanager + def track(self) -> Generator[Self, None, None]: + """Set this instance as the current metrics context and reset on exit.""" + token = _current_storage_metrics.set(self) + try: + yield self + finally: + _current_storage_metrics.reset(token) + + +_current_storage_metrics: contextvars.ContextVar[StorageOperationMetrics | None] = ( + contextvars.ContextVar("_current_storage_metrics", default=None) +) + + +def _union_seconds(spans: list[tuple[float, float]]) -> float: + """Total length of the union of the given monotonic-clock spans, in seconds.""" + ordered = sorted(spans) + if not ordered: + return 0.0 + total = 0.0 + span_start, span_end = ordered[0] + for start, end in ordered[1:]: + if start > span_end: + total += span_end - span_start + span_start, span_end = start, end + elif end > span_end: + span_end = end + return total + (span_end - span_start) + + +async def _gather_cancel_on_error( + coros: Sequence[Coroutine[Any, Any, _T]], +) -> list[_T]: + """Run coroutines concurrently; cancel all remaining tasks if any one fails.""" + tasks = [asyncio.create_task(c) for c in coros] + try: + return await asyncio.gather(*tasks) + except BaseException: + for task in tasks: + task.cancel() + await asyncio.gather(*tasks, return_exceptions=True) + raise + + +@dataclass(frozen=True) +class StorageDriverClaim: + """A driver-defined reference to an externally-stored payload that can be used to + retrieve it. + + .. warning:: + This API is experimental. + """ + + claim_data: Mapping[str, str] + """Driver-defined data for identifying and retrieving an externally stored + payload. + """ + + +@dataclass(frozen=True, kw_only=True) +class StorageDriverWorkflowInfo: + """Workflow identity information for external storage operations. + + .. warning:: + This API is experimental. + """ + + namespace: str + """The namespace of the workflow execution.""" + + id: str | None = None + """The workflow ID.""" + + run_id: str | None = None + """The workflow run ID, if available.""" + + type: str | None = None + """The workflow type name, if available.""" + + +@dataclass(frozen=True, kw_only=True) +class StorageDriverActivityInfo: + """Activity identity information for external storage operations. + + .. warning:: + This API is experimental. + """ + + namespace: str + """The namespace of the activity execution.""" + + id: str | None = None + """The activity ID.""" + + run_id: str | None = None + """The activity run ID (only for standalone activities).""" + + type: str | None = None + """The activity type name, if available.""" + + +@dataclass(frozen=True) +class StorageDriverStoreContext: + """Context passed to :meth:`StorageDriver.store` calls. + + .. warning:: + This API is experimental. + """ + + target: StorageDriverActivityInfo | StorageDriverWorkflowInfo | None = None + """The workflow or activity for which this payload is being stored. + + For payloads being stored on behalf of an explicit target (e.g. a child + workflow being started, an activity being scheduled, an external workflow + being signaled), this is that target's identity. When no explicit target + exists the current execution context (workflow or activity) is used as the + target instead.""" + + namespace: str | None = None + """The namespace of the client or worker performing the operation. + + It is set even when :attr:`target` is ``None``, and is ``None`` only when + external storage is used outside a client or worker. A driver choosing a + storage layout should prefer the target's namespace when a target is + present.""" + + +@dataclass(frozen=True) +class StorageDriverSelectContext: + """Context passed to :attr:`ExternalStorage.driver_selector` calls. + + .. warning:: + This API is experimental. + """ + + target: StorageDriverActivityInfo | StorageDriverWorkflowInfo | None = None + """The workflow or activity for which this payload is being stored. + + For payloads being stored on behalf of an explicit target (e.g. a child + workflow being started, an activity being scheduled, an external workflow + being signaled), this is that target's identity. When no explicit target + exists the current execution context (workflow or activity) is used as the + target instead.""" + + namespace: str | None = None + """The namespace of the client or worker performing the operation. + + It is set even when :attr:`target` is ``None``, and is ``None`` only when + external storage is used outside a client or worker. A driver choosing a + storage layout should prefer the target's namespace when a target is + present.""" + + +@dataclass(frozen=True) +class StorageDriverRetrieveContext: + """Context passed to :meth:`StorageDriver.retrieve` calls. + + .. warning:: + This API is experimental. + """ + + +class StorageDriver(ABC): + """Base driver for storing and retrieve payloads from external storage systems. + + .. warning:: + This API is experimental. + """ + + @abstractmethod + def name(self) -> str: + """Returns the name of this driver instance. A driver may allow + its name to be parameterized at construction time so that multiple + instances of the same driver class can coexist in + :attr:`ExternalStorage.drivers` with distinct names. + """ + raise NotImplementedError + + def type(self) -> str: + """Returns the type of the storage driver. This string should be + the same across all instantiations of the same driver class. This + allows the equivalent driver implementation in different languages + to be named the same. + + Defaults to the class name. Subclasses may override this to return a + stable, language-agnostic identifier. + """ + return type(self).__name__ + + @abstractmethod + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + """Stores payloads in external storage and returns a + :class:`StorageDriverClaim` for each one. The returned list must be the + same length as ``payloads``. + """ + raise NotImplementedError + + @abstractmethod + async def retrieve( + self, + context: StorageDriverRetrieveContext, + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + """Retrieves payloads from external storage for the given + :class:`StorageDriverClaim` list. The returned list must be the same + length as ``claims``. + """ + raise NotImplementedError + + +class StorageWarning(RuntimeWarning): + """Warning for external storage issues. + + .. warning:: + This API is experimental. + """ + + +@dataclass(frozen=True) +class _StorageReference: + """Legacy external storage reference used only on the retrieval path as a + fallback for in-flight workflows that were written before the + ExternalStorageReference proto was introduced. + """ + + driver_name: str + driver_claim: StorageDriverClaim + + +@dataclass(frozen=True) +class ExternalStorage: + """Configuration for external storage behavior. + + .. warning:: + This API is experimental. + """ + + drivers: Sequence[StorageDriver] + """Drivers available for storing and retrieving payloads. At least one + driver must be provided. If more than one driver is registered, + :attr:`driver_selector` must also be set. + + Drivers in this list are looked up by :meth:`StorageDriver.name` during + retrieval, so each driver must have a unique name. + """ + + driver_selector: ( + Callable[[StorageDriverSelectContext, Payload], StorageDriver | None] | None + ) = None + """Controls which driver stores a given payload. A callable that returns the + driver instance to use, or ``None`` to leave the payload stored inline. + The returned driver must be one of the instances registered in + :attr:`drivers`. + + Required when more than one driver is registered. When ``None`` and only + one driver is registered, that driver is used for all store operations. + """ + + payload_size_threshold: int = 256 * 1024 + """Minimum payload size in bytes before external storage is considered. + Defaults to 256 KiB. Must be greater than or equal to zero. + """ + + _driver_map: dict[str, StorageDriver] = dataclasses.field( + init=False, repr=False, compare=False + ) + """Name-keyed index of :attr:`drivers`, built at construction time. Used + for retrieval lookups. + """ + + _store_context: StorageDriverStoreContext = dataclasses.field( + default=StorageDriverStoreContext(target=None), + init=False, + repr=False, + compare=False, + ) + """Store context bound to this instance via :meth:`_with_store_context`.""" + + _select_context: StorageDriverSelectContext = dataclasses.field( + default=StorageDriverSelectContext(target=None), + init=False, + repr=False, + compare=False, + ) + """Selector context derived from :attr:`_store_context`.""" + + _claim_converter: ClassVar[JSONProtoPayloadConverter] = JSONProtoPayloadConverter() + _legacy_claim_converter: ClassVar[JSONPlainPayloadConverter] = ( + JSONPlainPayloadConverter(encoding=_REFERENCE_ENCODING.decode()) + ) + + def __post_init__(self) -> None: + """Validate drivers and build the internal name-keyed driver map. + + Raises :exc:`ValueError` if no drivers are provided, if + :attr:`payload_size_threshold` is less than zero, if more than one + driver is registered without a :attr:`driver_selector`, or if any two + drivers share the same name. + """ + if not self.drivers: + raise ValueError( + "ExternalStorage.drivers must contain at least one driver." + ) + if self.payload_size_threshold < 0: + raise ValueError( + "ExternalStorage.payload_size_threshold must be greater than or equal to zero." + ) + if len(self.drivers) > 1 and self.driver_selector is None: + raise ValueError( + "ExternalStorage.driver_selector must be specified if multiple drivers are registered." + ) + driver_map: dict[str, StorageDriver] = {} + for driver in self.drivers: + name = driver.name() + if name in driver_map: + raise ValueError( + f"ExternalStorage.drivers contains multiple drivers with name '{name}'. " + "Each driver must have a unique name." + ) + driver_map[name] = driver + object.__setattr__(self, "_driver_map", driver_map) + + def _select_driver( + self, context: StorageDriverSelectContext, payload: Payload + ) -> StorageDriver | None: + """Returns the driver to use for this payload, or None to pass through.""" + if payload.ByteSize() < self.payload_size_threshold: + return None + selector = self.driver_selector + if selector is None: + return self.drivers[0] if self.drivers else None + driver = selector(context, payload) + if driver is None: + return None + registered = self._driver_map.get(driver.name()) + if registered is not driver: + raise ValueError( + f"Driver '{driver.name()}' returned by driver_selector is not registered in ExternalStorage.drivers" + ) + return driver + + def _get_driver_by_name(self, name: str) -> StorageDriver: + """Looks up a driver by name, raising :class:`ValueError` if not found.""" + driver = self._driver_map.get(name) + if driver is None: + raise ValueError(f"No driver found with name '{name}'") + return driver + + def _with_store_context(self, ctx: StorageDriverStoreContext) -> ExternalStorage: + """Return a copy of this instance with ``ctx`` bound as the store context.""" + result = dataclasses.replace(self) + object.__setattr__(result, "_store_context", ctx) + object.__setattr__( + result, + "_select_context", + StorageDriverSelectContext(target=ctx.target, namespace=ctx.namespace), + ) + return result + + async def _store_payload(self, payload: Payload) -> Payload: + start_time = time.monotonic() + + driver = self._select_driver(self._select_context, payload) + if driver is None: + return payload + + claims = await driver.store(self._store_context, [payload]) + + self._validate_claim_length(claims, expected=1, driver=driver) + + external_size = payload.ByteSize() + reference = ExternalStorageReference( + driver_name=driver.name(), + claim_data=claims[0].claim_data, + ) + reference_payload = self._claim_converter.to_payload(reference) + if reference_payload is None: + raise ValueError( + f"Failed to serialize storage reference for driver '{driver.name()}'" + ) + reference_payload.external_payloads.add().size_bytes = external_size + if _ENCODE_STORAGE_REFERENCES: + reference_payload.metadata[_REFERENCE_MARKER_KEY] = b"true" + + ExternalStorage._record_metrics(1, external_size, start_time, {driver.name()}) + + return reference_payload + + async def _store_payloads(self, payloads: Payloads): + stored_payloads = await self._store_payload_sequence(payloads.payloads) + for i, payload in enumerate(stored_payloads): + payloads.payloads[i].CopyFrom(payload) + + async def _store_payload_sequence( + self, + payloads: Sequence[Payload], + ) -> list[Payload]: + if len(payloads) == 1: + return [await self._store_payload(payloads[0])] + + start_time = time.monotonic() + + results = list(payloads) + + to_store: list[tuple[int, Payload, StorageDriver]] = [] + for index, payload in enumerate(payloads): + driver = self._select_driver(self._select_context, payload) + if driver is None: + continue + to_store.append((index, payload, driver)) + + if not to_store: + return results + + driver_groups: dict[StorageDriver, list[tuple[int, Payload]]] = {} + for orig_index, payload, driver in to_store: + driver_groups.setdefault(driver, []).append((orig_index, payload)) + + driver_group_list = list(driver_groups.items()) + + all_claims = await _gather_cancel_on_error( + [ + driver.store(self._store_context, [p for _, p in indexed_payloads]) + for driver, indexed_payloads in driver_group_list + ] + ) + + external_count = 0 + external_size = 0 + driver_names: set[str] = set() + for (driver, indexed_payloads), claims in zip(driver_group_list, all_claims): + indices = [idx for idx, _ in indexed_payloads] + sizes = [p.ByteSize() for _, p in indexed_payloads] + + self._validate_claim_length(claims, expected=len(indices), driver=driver) + + for i, claim in enumerate(claims): + reference = ExternalStorageReference( + driver_name=driver.name(), + claim_data=claim.claim_data, + ) + reference_payload = self._claim_converter.to_payload(reference) + if reference_payload is None: + raise ValueError( + f"Failed to serialize storage reference for driver '{driver.name()}'" + ) + reference_payload.external_payloads.add().size_bytes = sizes[i] + if _ENCODE_STORAGE_REFERENCES: + reference_payload.metadata[_REFERENCE_MARKER_KEY] = b"true" + results[indices[i]] = reference_payload + external_size += sizes[i] + + external_count += len(claims) + driver_names.add(driver.name()) + + ExternalStorage._record_metrics( + external_count, external_size, start_time, driver_names + ) + + return results + + def _decode_reference(self, payload: Payload) -> ExternalStorageReference | None: + """Decode an external storage reference from a payload.""" + encoding = payload.metadata.get("encoding", b"") + if encoding == _REFERENCE_ENCODING: + legacy = self._legacy_claim_converter.from_payload( + payload, _StorageReference + ) + if not isinstance(legacy, _StorageReference): + return None + return ExternalStorageReference( + driver_name=legacy.driver_name, + claim_data=legacy.driver_claim.claim_data, + ) + if not ( + encoding == b"json/protobuf" + and payload.metadata.get("messageType") == _REFERENCE_MESSAGE_TYPE + ): + return None + ref = self._claim_converter.from_payload(payload, ExternalStorageReference) + return ref if isinstance(ref, ExternalStorageReference) else None + + async def _retrieve_payload(self, payload: Payload) -> Payload: + ref = self._decode_reference(payload) + if ref is None: + return payload + + start_time = time.monotonic() + driver = self._get_driver_by_name(ref.driver_name) + context = StorageDriverRetrieveContext() + claim = StorageDriverClaim(claim_data=dict(ref.claim_data)) + + stored_payloads = await driver.retrieve(context, [claim]) + + self._validate_payload_length(stored_payloads, expected=1, driver=driver) + + stored_payload = stored_payloads[0] + + ExternalStorage._record_metrics( + 1, stored_payload.ByteSize(), start_time, {driver.name()} + ) + + return stored_payload + + async def _retrieve_payloads(self, payloads: Payloads): + stored_payloads = await self._retrieve_payload_sequence(payloads.payloads) + for i, payload in enumerate(stored_payloads): + payloads.payloads[i].CopyFrom(payload) + + async def _retrieve_payload_sequence( + self, + payloads: Sequence[Payload], + ) -> list[Payload]: + if len(payloads) == 1: + return [await self._retrieve_payload(payloads[0])] + + start_time = time.monotonic() + + results = list(payloads) + + driver_claims: dict[StorageDriver, list[tuple[int, StorageDriverClaim]]] = {} + for index, payload in enumerate(payloads): + ref = self._decode_reference(payload) + if ref is None: + continue + driver = self._get_driver_by_name(ref.driver_name) + claim = StorageDriverClaim(claim_data=dict(ref.claim_data)) + driver_claims.setdefault(driver, []).append((index, claim)) + + if not driver_claims: + return results + + context = StorageDriverRetrieveContext() + stored_by_index: dict[int, Payload] = {} + + driver_claim_list = list(driver_claims.items()) + + all_stored = await _gather_cancel_on_error( + [ + driver.retrieve(context, [claim for _, claim in indexed_claims]) + for driver, indexed_claims in driver_claim_list + ] + ) + + external_count = 0 + external_size = 0 + driver_names: set[str] = set() + for (driver, indexed_claims), stored_payloads in zip( + driver_claim_list, all_stored + ): + indices = [idx for idx, _ in indexed_claims] + + self._validate_payload_length( + stored_payloads, + expected=len(indexed_claims), + driver=driver, + ) + + for idx, stored_payload in zip(indices, stored_payloads): + stored_by_index[idx] = stored_payload + external_size += stored_payload.ByteSize() + + external_count += len(stored_payloads) + driver_names.add(driver.name()) + + retrieve_indices = sorted(stored_by_index.keys()) + stored_list = [stored_by_index[idx] for idx in retrieve_indices] + + for i, retrieved_payload in enumerate(stored_list): + results[retrieve_indices[i]] = retrieved_payload + + ExternalStorage._record_metrics( + external_count, external_size, start_time, driver_names + ) + + return results + + def _validate_claim_length( + self, claims: Sequence[StorageDriverClaim], expected: int, driver: StorageDriver + ) -> None: + if len(claims) != expected: + raise ValueError( + f"Driver '{driver.name()}' returned {len(claims)} claims, expected {expected}", + ) + + def _validate_payload_length( + self, payloads: Sequence[Payload], expected: int, driver: StorageDriver + ) -> None: + if len(payloads) != expected: + raise ValueError( + f"Driver '{driver.name()}' returned {len(payloads)} payloads, expected {expected}", + ) + + @staticmethod + def _record_metrics( + count: int, size: int, start_time: float, driver_names: set[str] + ): + metrics = _current_storage_metrics.get() + if metrics is not None: + metrics.record_batch( + count, + size, + start_time, + time.monotonic(), + driver_names, + ) diff --git a/temporalio/converter/_failure_converter.py b/temporalio/converter/_failure_converter.py new file mode 100644 index 0000000000..f73aa5b7e4 --- /dev/null +++ b/temporalio/converter/_failure_converter.py @@ -0,0 +1,469 @@ +"""Failure converters for converting exceptions to/from Temporal Failure protos.""" + +from __future__ import annotations + +import dataclasses +import json +import traceback +from abc import ABC, abstractmethod +from logging import getLogger +from typing import Any, ClassVar + +import google.protobuf.json_format +import nexusrpc + +import temporalio.api.common.v1 +import temporalio.api.enums.v1 +import temporalio.api.failure.v1 +import temporalio.exceptions +from temporalio.converter._payload_converter import PayloadConverter + +logger = getLogger("temporalio.converter") + +_TEMPORAL_FAILURE_PROTO_TYPE = "temporal.api.failure.v1.Failure" + + +class FailureConverter(ABC): + """Base failure converter to/from errors. + + Note, for workflow exceptions, :py:attr:`to_failure` is only invoked if the + exception is an instance of :py:class:`temporalio.exceptions.FailureError`. + Users should extend :py:class:`temporalio.exceptions.ApplicationError` if + they want a custom workflow exception to work with this class. + """ + + default: ClassVar[FailureConverter] + """Default failure converter.""" + + @abstractmethod + def to_failure( + self, + exception: BaseException, + payload_converter: PayloadConverter, + failure: temporalio.api.failure.v1.Failure, + ) -> None: + """Convert the given exception to a Temporal failure. + + Users should make sure not to alter the ``exception`` input. + + Args: + exception: The exception to convert. + payload_converter: The payload converter to use if needed. + failure: The failure to update with error information. + """ + raise NotImplementedError + + @abstractmethod + def from_failure( + self, + failure: temporalio.api.failure.v1.Failure, + payload_converter: PayloadConverter, + ) -> BaseException: + """Convert the given Temporal failure to an exception. + + Users should make sure not to alter the ``failure`` input. + + Args: + failure: The failure to convert. + payload_converter: The payload converter to use if needed. + + Returns: + Converted error. + """ + raise NotImplementedError + + +class DefaultFailureConverter(FailureConverter): + """Default failure converter. + + A singleton instance of this is available at + :py:attr:`FailureConverter.default`. + """ + + def __init__(self, *, encode_common_attributes: bool = False) -> None: + """Create the default failure converter. + + Args: + encode_common_attributes: If ``True``, the message and stack trace + of the failure will be moved into the encoded attribute section + of the failure which can be encoded with a codec. + """ + super().__init__() + self._encode_common_attributes = encode_common_attributes + + def to_failure( + self, + exception: BaseException, + payload_converter: PayloadConverter, + failure: temporalio.api.failure.v1.Failure, + ) -> None: + """See base class.""" + # If already a failure error, use that + if isinstance(exception, temporalio.exceptions.FailureError): + self._error_to_failure(exception, payload_converter, failure) + elif isinstance(exception, nexusrpc.HandlerError): + self._nexus_handler_error_to_failure(exception, payload_converter, failure) + else: + # Convert to failure error + failure_error = temporalio.exceptions.ApplicationError( + str(exception), + type=exception.__class__.__name__, + ) + failure_error.__traceback__ = exception.__traceback__ + failure_error.__cause__ = exception.__cause__ + self._error_to_failure(failure_error, payload_converter, failure) + # Encode common attributes if requested + if self._encode_common_attributes: + # Move message and stack trace to encoded attribute payload + failure.encoded_attributes.CopyFrom( + payload_converter.to_payloads( + [{"message": failure.message, "stack_trace": failure.stack_trace}] + )[0] + ) + failure.message = "Encoded failure" + failure.stack_trace = "" + + def _error_to_failure( + self, + error: temporalio.exceptions.FailureError, + payload_converter: PayloadConverter, + failure: temporalio.api.failure.v1.Failure, + ) -> None: + # If there is an underlying proto already, just use that + if error.failure: + failure.CopyFrom(error.failure) + return + + # Set message, stack, and cause. Obtaining cause follows rules from + # https://docs.python.org/3/library/exceptions.html#exception-context + failure.message = error.message + if error.__traceback__: + failure.stack_trace = "\n".join(traceback.format_tb(error.__traceback__)) + if error.__cause__: + self.to_failure(error.__cause__, payload_converter, failure.cause) + elif not error.__suppress_context__ and error.__context__: + self.to_failure(error.__context__, payload_converter, failure.cause) + + # Set specific subclass values + if isinstance(error, temporalio.exceptions.ApplicationError): + failure.application_failure_info.SetInParent() + if error.type: + failure.application_failure_info.type = error.type + failure.application_failure_info.non_retryable = error.non_retryable + if error.details: + failure.application_failure_info.details.CopyFrom( + payload_converter.to_payloads_wrapper(error.details) + ) + if error.next_retry_delay: + failure.application_failure_info.next_retry_delay.FromTimedelta( + error.next_retry_delay + ) + if error.category: + failure.application_failure_info.category = ( + temporalio.api.enums.v1.ApplicationErrorCategory.ValueType( + error.category + ) + ) + elif isinstance(error, temporalio.exceptions.TimeoutError): + failure.timeout_failure_info.SetInParent() + failure.timeout_failure_info.timeout_type = ( + temporalio.api.enums.v1.TimeoutType.ValueType(error.type or 0) + ) + if error.last_heartbeat_details: + failure.timeout_failure_info.last_heartbeat_details.CopyFrom( + payload_converter.to_payloads_wrapper(error.last_heartbeat_details) + ) + elif isinstance(error, temporalio.exceptions.CancelledError): + failure.canceled_failure_info.SetInParent() + if error.details: + failure.canceled_failure_info.details.CopyFrom( + payload_converter.to_payloads_wrapper(error.details) + ) + elif isinstance(error, temporalio.exceptions.TerminatedError): + failure.terminated_failure_info.SetInParent() + elif isinstance(error, temporalio.exceptions.ServerError): + failure.server_failure_info.SetInParent() + failure.server_failure_info.non_retryable = error.non_retryable + elif isinstance(error, temporalio.exceptions.ActivityError): + failure.activity_failure_info.SetInParent() + failure.activity_failure_info.scheduled_event_id = error.scheduled_event_id + failure.activity_failure_info.started_event_id = error.started_event_id + failure.activity_failure_info.identity = error.identity + failure.activity_failure_info.activity_type.name = error.activity_type + failure.activity_failure_info.activity_id = error.activity_id + failure.activity_failure_info.retry_state = ( + temporalio.api.enums.v1.RetryState.ValueType(error.retry_state or 0) + ) + elif isinstance(error, temporalio.exceptions.ChildWorkflowError): + failure.child_workflow_execution_failure_info.SetInParent() + failure.child_workflow_execution_failure_info.namespace = error.namespace + failure.child_workflow_execution_failure_info.workflow_execution.workflow_id = error.workflow_id + failure.child_workflow_execution_failure_info.workflow_execution.run_id = ( + error.run_id + ) + failure.child_workflow_execution_failure_info.workflow_type.name = ( + error.workflow_type + ) + failure.child_workflow_execution_failure_info.initiated_event_id = ( + error.initiated_event_id + ) + failure.child_workflow_execution_failure_info.started_event_id = ( + error.started_event_id + ) + failure.child_workflow_execution_failure_info.retry_state = ( + temporalio.api.enums.v1.RetryState.ValueType(error.retry_state or 0) + ) + elif isinstance(error, temporalio.exceptions.NexusOperationError): + failure.nexus_operation_execution_failure_info.SetInParent() + failure.nexus_operation_execution_failure_info.scheduled_event_id = ( + error.scheduled_event_id + ) + failure.nexus_operation_execution_failure_info.endpoint = error.endpoint + failure.nexus_operation_execution_failure_info.service = error.service + failure.nexus_operation_execution_failure_info.operation = error.operation + failure.nexus_operation_execution_failure_info.operation_token = ( + error.operation_token + ) + + def _nexus_handler_error_to_failure( + self, + error: nexusrpc.HandlerError, + payload_converter: PayloadConverter, + failure: temporalio.api.failure.v1.Failure, + ) -> None: + if error.original_failure: + self._nexus_failure_to_temporal_failure( + error.original_failure, error.retryable, failure + ) + else: + failure.message = error.message + if stack_trace := error.stack_trace: + failure.stack_trace = stack_trace + elif tb := error.__traceback__: + failure.stack_trace = "\n".join(traceback.format_tb(tb)) + if error.__cause__: + self.to_failure(error.__cause__, payload_converter, failure.cause) + failure.nexus_handler_failure_info.SetInParent() + failure.nexus_handler_failure_info.type = error.type.name + failure.nexus_handler_failure_info.retry_behavior = temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.ValueType( + temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE + if error.retryable_override is True + else temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE + if error.retryable_override is False + else temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED + ) + + def _temporal_failure_to_nexus_failure( + self, failure: temporalio.api.failure.v1.Failure + ) -> nexusrpc.Failure: + message, failure.message = failure.message, "" + stack_trace, failure.stack_trace = failure.stack_trace, "" + failure_dict = google.protobuf.json_format.MessageToDict(failure) + failure.message = message + failure.stack_trace = stack_trace + return nexusrpc.Failure( + message=message, + stack_trace=stack_trace, + metadata={ + "type": _TEMPORAL_FAILURE_PROTO_TYPE, + }, + details=failure_dict, + ) + + def _nexus_failure_to_temporal_failure( + self, + failure: nexusrpc.Failure, + retryable: bool, + temporal_failure: temporalio.api.failure.v1.Failure, + ) -> None: + if ( + failure.metadata + and failure.metadata.get("type") == _TEMPORAL_FAILURE_PROTO_TYPE + ): + google.protobuf.json_format.ParseDict( + dict(failure.details or {}), temporal_failure + ) + else: + temporal_failure.application_failure_info.SetInParent() + temporal_failure.application_failure_info.type = "NexusFailure" + temporal_failure.application_failure_info.non_retryable = not retryable + temporal_failure.application_failure_info.details.SetInParent() + temporal_failure.application_failure_info.details.payloads.append( + temporalio.api.common.v1.Payload( + metadata={"encoding": b"json/plain"}, + data=json.dumps( + dataclasses.replace(failure, message=""), separators=(",", ":") + ).encode("utf-8"), + ) + ) + + temporal_failure.message = failure.message + temporal_failure.stack_trace = failure.stack_trace or "" + + def from_failure( + self, + failure: temporalio.api.failure.v1.Failure, + payload_converter: PayloadConverter, + ) -> BaseException: + """See base class.""" + # If encoded attributes are present and have the fields we expect, + # extract them + if failure.HasField("encoded_attributes"): + # Clone the failure to not mutate the incoming failure + new_failure = temporalio.api.failure.v1.Failure() + new_failure.CopyFrom(failure) + failure = new_failure + try: + encoded_attributes: dict[str, Any] = payload_converter.from_payloads( + [failure.encoded_attributes] + )[0] + if isinstance(encoded_attributes, dict): + message = encoded_attributes.get("message") + if isinstance(message, str): + failure.message = message + stack_trace = encoded_attributes.get("stack_trace") + if isinstance(stack_trace, str): + failure.stack_trace = stack_trace + except: + pass + + err: temporalio.exceptions.FailureError | nexusrpc.HandlerError + match failure.WhichOneof("failure_info"): + case "application_failure_info": + app_info = failure.application_failure_info + err = temporalio.exceptions.ApplicationError( + failure.message or "Application error", + *payload_converter.from_payloads_wrapper(app_info.details), + type=app_info.type or None, + non_retryable=app_info.non_retryable, + next_retry_delay=app_info.next_retry_delay.ToTimedelta() + if app_info.HasField("next_retry_delay") + else None, + category=temporalio.exceptions.ApplicationErrorCategory( + int(app_info.category) + ), + ) + + case "timeout_failure_info": + timeout_info = failure.timeout_failure_info + err = temporalio.exceptions.TimeoutError( + failure.message or "Timeout", + type=temporalio.exceptions.TimeoutType( + int(timeout_info.timeout_type) + ) + if timeout_info.timeout_type + else None, + last_heartbeat_details=payload_converter.from_payloads_wrapper( + timeout_info.last_heartbeat_details + ), + ) + + case "canceled_failure_info": + cancel_info = failure.canceled_failure_info + err = temporalio.exceptions.CancelledError( + failure.message or "Cancelled", + *payload_converter.from_payloads_wrapper(cancel_info.details), + ) + case "terminated_failure_info": + err = temporalio.exceptions.TerminatedError( + failure.message or "Terminated" + ) + + case "server_failure_info": + server_info = failure.server_failure_info + err = temporalio.exceptions.ServerError( + failure.message or "Server error", + non_retryable=server_info.non_retryable, + ) + + case "activity_failure_info": + act_info = failure.activity_failure_info + err = temporalio.exceptions.ActivityError( + failure.message or "Activity error", + scheduled_event_id=act_info.scheduled_event_id, + started_event_id=act_info.started_event_id, + identity=act_info.identity, + activity_type=act_info.activity_type.name, + activity_id=act_info.activity_id, + retry_state=temporalio.exceptions.RetryState( + int(act_info.retry_state) + ) + if act_info.retry_state + else None, + ) + + case "child_workflow_execution_failure_info": + child_info = failure.child_workflow_execution_failure_info + err = temporalio.exceptions.ChildWorkflowError( + failure.message or "Child workflow error", + namespace=child_info.namespace, + workflow_id=child_info.workflow_execution.workflow_id, + run_id=child_info.workflow_execution.run_id, + workflow_type=child_info.workflow_type.name, + initiated_event_id=child_info.initiated_event_id, + started_event_id=child_info.started_event_id, + retry_state=temporalio.exceptions.RetryState( + int(child_info.retry_state) + ) + if child_info.retry_state + else None, + ) + + case "nexus_handler_failure_info": + nexus_handler_failure_info = failure.nexus_handler_failure_info + try: + _type = nexusrpc.HandlerErrorType[nexus_handler_failure_info.type] + except KeyError: + logger.warning( + f"Unknown Nexus HandlerErrorType: {nexus_handler_failure_info.type}" + ) + _type = nexusrpc.HandlerErrorType.INTERNAL + + retryable_override: bool | None + match nexus_handler_failure_info.retry_behavior: + case temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE: + retryable_override = True + case temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE: + retryable_override = False + case _: + retryable_override = None + + err = nexusrpc.HandlerError( + failure.message or "Nexus handler error", + type=_type, + retryable_override=retryable_override, + stack_trace=failure.stack_trace if failure.stack_trace else None, + original_failure=self._temporal_failure_to_nexus_failure(failure), + ) + + case "nexus_operation_execution_failure_info": + nexus_op_failure_info = failure.nexus_operation_execution_failure_info + err = temporalio.exceptions.NexusOperationError( + failure.message or "Nexus operation error", + scheduled_event_id=nexus_op_failure_info.scheduled_event_id, + endpoint=nexus_op_failure_info.endpoint, + service=nexus_op_failure_info.service, + operation=nexus_op_failure_info.operation, + operation_token=nexus_op_failure_info.operation_token, + ) + + case "reset_workflow_failure_info" | None: + err = temporalio.exceptions.FailureError( + failure.message or "Failure error", + ) + + if isinstance(err, temporalio.exceptions.FailureError): + err._failure = failure + if failure.HasField("cause"): + err.__cause__ = self.from_failure(failure.cause, payload_converter) + return err + + +class DefaultFailureConverterWithEncodedAttributes(DefaultFailureConverter): + """Implementation of :py:class:`DefaultFailureConverter` which moves message + and stack trace to encoded attributes subject to a codec. + """ + + def __init__(self) -> None: + """Create a default failure converter with encoded attributes.""" + super().__init__(encode_common_attributes=True) diff --git a/temporalio/converter/_payload_codec.py b/temporalio/converter/_payload_codec.py new file mode 100644 index 0000000000..93f6895098 --- /dev/null +++ b/temporalio/converter/_payload_codec.py @@ -0,0 +1,115 @@ +"""PayloadCodec and failure payload traversal.""" + +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections.abc import Awaitable, Callable, Sequence + +import temporalio.api.common.v1 +import temporalio.api.failure.v1 + + +class PayloadCodec(ABC): + """Codec for encoding/decoding to/from bytes. + + Commonly used for compression or encryption. + """ + + @abstractmethod + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + """Encode the given payloads. + + Args: + payloads: Payloads to encode. This value should not be mutated. + + Returns: + Encoded payloads. Note, this does not have to be the same number as + payloads given, but must be at least one and cannot be more than was + given. + """ + raise NotImplementedError + + @abstractmethod + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + """Decode the given payloads. + + Args: + payloads: Payloads to decode. This value should not be mutated. + + Returns: + Decoded payloads. Note, this does not have to be the same number as + payloads given, but must be at least one and cannot be more than was + given. + """ + raise NotImplementedError + + async def encode_wrapper(self, payloads: temporalio.api.common.v1.Payloads) -> None: + """:py:meth:`encode` for the + :py:class:`temporalio.api.common.v1.Payloads` wrapper. + + This replaces the payloads within the wrapper. + """ + new_payloads = await self.encode(payloads.payloads) + del payloads.payloads[:] + # TODO(cretz): Copy too expensive? + payloads.payloads.extend(new_payloads) + + async def decode_wrapper(self, payloads: temporalio.api.common.v1.Payloads) -> None: + """:py:meth:`decode` for the + :py:class:`temporalio.api.common.v1.Payloads` wrapper. + + This replaces the payloads within. + """ + new_payloads = await self.decode(payloads.payloads) + del payloads.payloads[:] + # TODO(cretz): Copy too expensive? + payloads.payloads.extend(new_payloads) + + async def encode_failure(self, failure: temporalio.api.failure.v1.Failure) -> None: + """Encode payloads of a failure. Intended as a helper method, not for overriding. + It is not guaranteed that all failures will be encoded with this method rather + than encoding the underlying payloads. + """ + await _apply_to_failure_payloads(failure, self.encode_wrapper) + + async def decode_failure(self, failure: temporalio.api.failure.v1.Failure) -> None: + """Decode payloads of a failure. Intended as a helper method, not for overriding. + It is not guaranteed that all failures will be decoded with this method rather + than decoding the underlying payloads. + """ + await _apply_to_failure_payloads(failure, self.decode_wrapper) + + +async def _apply_to_failure_payloads( + failure: temporalio.api.failure.v1.Failure, + cb: Callable[[temporalio.api.common.v1.Payloads], Awaitable[None]], +) -> None: + if failure.HasField("encoded_attributes"): + # Wrap in payloads and merge back + payloads = temporalio.api.common.v1.Payloads( + payloads=[failure.encoded_attributes] + ) + await cb(payloads) + failure.encoded_attributes.CopyFrom(payloads.payloads[0]) + if failure.HasField( + "application_failure_info" + ) and failure.application_failure_info.HasField("details"): + await cb(failure.application_failure_info.details) + elif failure.HasField( + "timeout_failure_info" + ) and failure.timeout_failure_info.HasField("last_heartbeat_details"): + await cb(failure.timeout_failure_info.last_heartbeat_details) + elif failure.HasField( + "canceled_failure_info" + ) and failure.canceled_failure_info.HasField("details"): + await cb(failure.canceled_failure_info.details) + elif failure.HasField( + "reset_workflow_failure_info" + ) and failure.reset_workflow_failure_info.HasField("last_heartbeat_details"): + await cb(failure.reset_workflow_failure_info.last_heartbeat_details) + if failure.HasField("cause"): + await _apply_to_failure_payloads(failure.cause, cb) diff --git a/temporalio/converter/_payload_converter.py b/temporalio/converter/_payload_converter.py new file mode 100644 index 0000000000..b1df6f5cef --- /dev/null +++ b/temporalio/converter/_payload_converter.py @@ -0,0 +1,1109 @@ +"""Payload converter types and implementations for data conversion.""" + +from __future__ import annotations + +import collections +import collections.abc +import dataclasses +import functools +import inspect +import json +import typing +import uuid +import warnings +from abc import ABC, abstractmethod +from collections.abc import Callable, Mapping, Sequence +from datetime import datetime +from enum import Enum +from itertools import zip_longest +from types import UnionType +from typing import ( + Any, + ClassVar, + Generic, + Literal, + NewType, + TypeVar, + get_type_hints, + overload, +) + +import google.protobuf.json_format +import google.protobuf.message +import google.protobuf.symbol_database +import typing_extensions +from typing_extensions import Self + +import temporalio.api.common.v1 +import temporalio.common +import temporalio.types +from temporalio.converter._serialization_context import ( + SerializationContext, + WithSerializationContext, +) + +_sym_db = google.protobuf.symbol_database.Default() +ValueT = TypeVar("ValueT") +TransferTypeT = TypeVar("TransferTypeT") +_TRANSFER_TYPE_CONVERTER_ATTR = "__temporal_transfer_type_converter" + + +class TransferTypeConverter(Generic[ValueT, TransferTypeT], ABC): + """Converter between a user-facing value and a transfer type value. + + .. warning:: + This API is experimental and subject to change. + """ + + transfer_type: type[TransferTypeT] | None = None + """Optional type hint for the transfer type to use when decoding payloads. + + .. warning:: + This API is experimental and subject to change. + """ + + @abstractmethod + def to_transfer_type(self, value: ValueT) -> TransferTypeT: + """Convert a user-facing value to its transfer type value. + + .. warning:: + This API is experimental and subject to change. + """ + raise NotImplementedError + + @abstractmethod + def from_transfer_type( + self, value: TransferTypeT, type_hint: type[ValueT] + ) -> ValueT: + """Convert a transfer type value to its user-facing value. + + ``type_hint`` is the requested user-facing type, including concrete + generic arguments. + + .. warning:: + This API is experimental and subject to change. + """ + raise NotImplementedError + + +class _TransferTypeConvertibleDecorator(Generic[ValueT, TransferTypeT]): + def __init__( + self, converter_type: type[TransferTypeConverter[ValueT, TransferTypeT]] + ) -> None: + self._converter_type = converter_type + + def __call__(self, cls: type[ValueT]) -> type[ValueT]: + if hasattr(cls, _TRANSFER_TYPE_CONVERTER_ATTR): + raise TypeError("class already has a transfer type converter") + setattr(cls, _TRANSFER_TYPE_CONVERTER_ATTR, self._converter_type()) + return cls + + +def transfer_type_convertible( + converter_type: type[TransferTypeConverter[ValueT, TransferTypeT]], +) -> _TransferTypeConvertibleDecorator[ValueT, TransferTypeT]: + """Decorate a class with a transfer type converter class. + + .. warning:: + This API is experimental and subject to change. + """ + return _TransferTypeConvertibleDecorator(converter_type) + + +def _get_transfer_type_converter( + value_type: object, +) -> TransferTypeConverter[Any, Any] | None: + converter = getattr(value_type, _TRANSFER_TYPE_CONVERTER_ATTR, None) + if isinstance(converter, TransferTypeConverter): + return converter + return None + + +class PayloadConverter(ABC): + """Base payload converter to/from multiple payloads/values.""" + + default: ClassVar[PayloadConverter] + """Default payload converter.""" + + @abstractmethod + def to_payloads( + self, values: Sequence[Any] + ) -> list[temporalio.api.common.v1.Payload]: + """Encode values into payloads. + + Implementers are expected to just return the payload for + :py:class:`temporalio.common.RawValue`. + + Args: + values: Values to be converted. + + Returns: + Converted payloads. Note, this does not have to be the same number + as values given, but must be at least one and cannot be more than + was given. + + Raises: + Exception: Any issue during conversion. + """ + raise NotImplementedError + + @abstractmethod + def from_payloads( + self, + payloads: Sequence[temporalio.api.common.v1.Payload], + type_hints: list[type] | None = None, + ) -> list[Any]: + """Decode payloads into values. + + Implementers are expected to treat a type hint of + :py:class:`temporalio.common.RawValue` as just the raw value. + + Args: + payloads: Payloads to convert to Python values. + type_hints: Types that are expected if any. This may not have any + types if there are no annotations on the target. If this is + present, it must have the exact same length as payloads even if + the values are just "object". + + Returns: + Collection of Python values. Note, this does not have to be the same + number as values given, but at least one must be present. + + Raises: + Exception: Any issue during conversion. + """ + raise NotImplementedError + + def to_payloads_wrapper( + self, values: Sequence[Any] + ) -> temporalio.api.common.v1.Payloads: + """:py:meth:`to_payloads` for the + :py:class:`temporalio.api.common.v1.Payloads` wrapper. + """ + return temporalio.api.common.v1.Payloads(payloads=self.to_payloads(values)) + + def from_payloads_wrapper( + self, payloads: temporalio.api.common.v1.Payloads | None + ) -> list[Any]: + """:py:meth:`from_payloads` for the + :py:class:`temporalio.api.common.v1.Payloads` wrapper. + """ + if not payloads or not payloads.payloads: + return [] + return self.from_payloads(payloads.payloads) + + def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload: + """Convert a single value to a payload. + + This is a shortcut for :py:meth:`to_payloads` with a single-item list + and result. + + Args: + value: Value to convert to a single payload. + + Returns: + Single converted payload. + """ + return self.to_payloads([value])[0] + + @overload + def from_payload(self, payload: temporalio.api.common.v1.Payload) -> Any: ... + + @overload + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type[temporalio.types.AnyType], + ) -> temporalio.types.AnyType: ... + + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type | None = None, + ) -> Any: + """Convert a single payload to a value. + + This is a shortcut for :py:meth:`from_payloads` with a single-item list + and result. + + Args: + payload: Payload to convert to value. + type_hint: Optional type hint to say which type to convert to. + + Returns: + Single converted value. + """ + return self.from_payloads([payload], [type_hint] if type_hint else None)[0] + + +class EncodingPayloadConverter(ABC): + """Base converter to/from single payload/value with a known encoding for use in CompositePayloadConverter.""" + + @property + @abstractmethod + def encoding(self) -> str: + """Encoding for the payload this converter works with.""" + raise NotImplementedError + + @abstractmethod + def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: + """Encode a single value to a payload or None. + + Args: + value: Value to be converted. + + Returns: + Payload of the value or None if unable to convert. + + Raises: + TypeError: Value is not the expected type. + ValueError: Value is of the expected type but otherwise incorrect. + RuntimeError: General error during encoding. + """ + raise NotImplementedError + + @abstractmethod + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type | None = None, + ) -> Any: + """Decode a single payload to a Python value or raise exception. + + Args: + payload: Payload to convert to Python value. + type_hint: Type that is expected if any. This may not have a type if + there are no annotations on the target. + + Return: + The decoded value from the payload. Since the encoding is checked by + the caller, this should raise an exception if the payload cannot be + converted. + + Raises: + RuntimeError: General error during decoding. + """ + raise NotImplementedError + + +class CompositePayloadConverter(PayloadConverter, WithSerializationContext): + """Composite payload converter that delegates to a list of encoding payload converters. + + Encoding/decoding are attempted on each payload converter successively until + it succeeds. + + Attributes: + converters: List of payload converters to delegate to, in order. + """ + + converters: Mapping[bytes, EncodingPayloadConverter] + + def __init__(self, *converters: EncodingPayloadConverter) -> None: + """Initializes the data converter. + + Args: + converters: Payload converters to delegate to, in order. + """ + self._set_converters(*converters) + + def _set_converters(self, *converters: EncodingPayloadConverter) -> None: + self.converters = {c.encoding.encode(): c for c in converters} + + def to_payloads( + self, values: Sequence[Any] + ) -> list[temporalio.api.common.v1.Payload]: + """Encode values trying each converter. + + See base class. Always returns the same number of payloads as values. + + Raises: + RuntimeError: No known converter + """ + payloads = [] + for index, value in enumerate(values): + # We intentionally attempt these serially just in case a stateful + # converter may rely on the previous values + payload = None + # RawValue should just pass through + if isinstance(value, temporalio.common.RawValue): + payload = value.payload + else: + for converter in self.converters.values(): + payload = converter.to_payload(value) + if payload is not None: + break + if payload is None: + raise RuntimeError( + f"Value at index {index} of type {type(value)} has no known converter" + ) + payloads.append(payload) + return payloads + + def from_payloads( + self, + payloads: Sequence[temporalio.api.common.v1.Payload], + type_hints: list[type] | None = None, + ) -> list[Any]: + """Decode values trying each converter. + + See base class. Always returns the same number of values as payloads. + + Raises: + KeyError: Unknown payload encoding + RuntimeError: Error during decode + """ + values = [] + type_hints = type_hints or [] + for index, (payload, type_hint) in enumerate(zip_longest(payloads, type_hints)): + # Raw value should just wrap + if type_hint == temporalio.common.RawValue: + values.append(temporalio.common.RawValue(payload)) + continue + encoding = payload.metadata.get("encoding", b"") + converter = self.converters.get(encoding) + if converter is None: + raise KeyError(f"Unknown payload encoding {encoding.decode()}") + try: + values.append(converter.from_payload(payload, type_hint)) + except RuntimeError as err: + raise RuntimeError( + f"Payload at index {index} with encoding {encoding.decode()} could not be converted" + ) from err + return values + + def with_context(self, context: SerializationContext) -> Self: + """Return a new instance with context set on the component converters. + + If none of the component converters returned new instances, return self. + """ + converters = self.get_converters_with_context(context) + if converters is None: + return self + new_instance = type(self)() # Must have a nullary constructor + new_instance._set_converters(*converters) + return new_instance + + def get_converters_with_context( + self, context: SerializationContext + ) -> list[EncodingPayloadConverter] | None: + """Return converter instances with context set. + + If no converter uses context, return None. + """ + if not self._any_converter_takes_context: + return None + converters: list[EncodingPayloadConverter] = [] + any_with_context = False + for c in self.converters.values(): + if isinstance(c, WithSerializationContext): + converters.append(c.with_context(context)) + any_with_context |= converters[-1] is not c + else: + converters.append(c) + + return converters if any_with_context else None + + @functools.cached_property + def _any_converter_takes_context(self) -> bool: + return any( + isinstance(c, WithSerializationContext) for c in self.converters.values() + ) + + +class DefaultPayloadConverter(CompositePayloadConverter): + """Default payload converter compatible with other Temporal SDKs. + + This handles None, bytes, all protobuf message types, and any type that + :py:func:`json.dump` accepts. A singleton instance of this is available at + :py:attr:`PayloadConverter.default`. + """ + + default_encoding_payload_converters: tuple[EncodingPayloadConverter, ...] + """Default set of encoding payload converters the default payload converter + uses. + """ + + def __init__(self) -> None: + """Create a default payload converter.""" + super().__init__(*DefaultPayloadConverter.default_encoding_payload_converters) + + +class BinaryNullPayloadConverter(EncodingPayloadConverter): + """Converter for 'binary/null' payloads supporting None values.""" + + @property + def encoding(self) -> str: + """See base class.""" + return "binary/null" + + def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: + """See base class.""" + if value is None: + return temporalio.api.common.v1.Payload( + metadata={"encoding": self.encoding.encode()} + ) + return None + + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type | None = None, + ) -> Any: + """See base class.""" + if len(payload.data) > 0: + raise RuntimeError("Expected empty data set for binary/null") + return None + + +class BinaryPlainPayloadConverter(EncodingPayloadConverter): + """Converter for 'binary/plain' payloads supporting bytes values.""" + + @property + def encoding(self) -> str: + """See base class.""" + return "binary/plain" + + def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: + """See base class.""" + if isinstance(value, bytes): + return temporalio.api.common.v1.Payload( + metadata={"encoding": self.encoding.encode()}, data=value + ) + return None + + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type | None = None, + ) -> Any: + """See base class.""" + return payload.data + + +class JSONProtoPayloadConverter(EncodingPayloadConverter): + """Converter for 'json/protobuf' payloads supporting protobuf Message values.""" + + def __init__(self, ignore_unknown_fields: bool = False): + """Initialize a JSON proto converter. + + Args: + ignore_unknown_fields: Determines whether converter should error if + unknown fields are detected + """ + super().__init__() + self._ignore_unknown_fields = ignore_unknown_fields + + @property + def encoding(self) -> str: + """See base class.""" + return "json/protobuf" + + def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: + """See base class.""" + if ( + isinstance(value, google.protobuf.message.Message) + and value.DESCRIPTOR is not None # type:ignore[reportUnnecessaryComparison] + ): + # We have to convert to dict then to JSON because MessageToJson does + # not have a compact option removing spaces and newlines + json_str = json.dumps( + google.protobuf.json_format.MessageToDict(value), + separators=(",", ":"), + sort_keys=True, + ) + return temporalio.api.common.v1.Payload( + metadata={ + "encoding": self.encoding.encode(), + "messageType": value.DESCRIPTOR.full_name.encode(), + }, + data=json_str.encode(), + ) + return None + + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type | None = None, + ) -> Any: + """See base class.""" + message_type = payload.metadata.get("messageType", b"").decode() + try: + value = _sym_db.GetSymbol(message_type)() + return google.protobuf.json_format.Parse( + payload.data, + value, + ignore_unknown_fields=self._ignore_unknown_fields, + ) + except KeyError as err: + raise RuntimeError(f"Unknown Protobuf type {message_type}") from err + except google.protobuf.json_format.ParseError as err: + raise RuntimeError("Failed parsing") from err + + +class BinaryProtoPayloadConverter(EncodingPayloadConverter): + """Converter for 'binary/protobuf' payloads supporting protobuf Message values.""" + + @property + def encoding(self) -> str: + """See base class.""" + return "binary/protobuf" + + def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: + """See base class.""" + if ( + isinstance(value, google.protobuf.message.Message) + and value.DESCRIPTOR is not None # type:ignore[reportUnnecessaryComparison] + ): + return temporalio.api.common.v1.Payload( + metadata={ + "encoding": self.encoding.encode(), + "messageType": value.DESCRIPTOR.full_name.encode(), + }, + data=value.SerializeToString(), + ) + return None + + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type | None = None, + ) -> Any: + """See base class.""" + message_type = payload.metadata.get("messageType", b"").decode() + try: + value = _sym_db.GetSymbol(message_type)() + value.ParseFromString(payload.data) + return value + except KeyError as err: + raise RuntimeError(f"Unknown Protobuf type {message_type}") from err + except google.protobuf.message.DecodeError as err: + raise RuntimeError("Failed parsing") from err + + +class _TemporalTransferTypePayloadConverter(PayloadConverter, WithSerializationContext): + """Payload converter wrapper for registered Temporal transfer type converters. + + Values with a registered transfer type converter are first converted to their + transfer type value, then encoded by the wrapped payload converter. When + decoding to a type with a registered transfer type converter, the wrapped + converter first decodes the payload to the transfer type value and this wrapper + constructs the requested user-facing type from it. + """ + + _inner_payload_converter: PayloadConverter + + def __init__(self, inner_payload_converter: PayloadConverter) -> None: + """Create a Temporal transfer type payload converter.""" + self._inner_payload_converter = inner_payload_converter + + @staticmethod + def wrap(payload_converter: PayloadConverter) -> PayloadConverter: + """Wrap a payload converter unless it is already wrapped.""" + if isinstance(payload_converter, _TemporalTransferTypePayloadConverter): + return payload_converter + return _TemporalTransferTypePayloadConverter(payload_converter) + + def to_payloads( + self, values: Sequence[Any] + ) -> list[temporalio.api.common.v1.Payload]: + """See base class.""" + transfer_type_values: list[Any] = [] + for value in values: + converter = _get_transfer_type_converter(type(value)) + if converter is not None: + value = converter.to_transfer_type(value) + transfer_type_values.append(value) + return self._inner_payload_converter.to_payloads(transfer_type_values) + + def from_payloads( + self, + payloads: Sequence[temporalio.api.common.v1.Payload], + type_hints: list[type] | None = None, + ) -> list[Any]: + """See base class.""" + if type_hints is None: + return self._inner_payload_converter.from_payloads(payloads, None) + converters = [ + _get_transfer_type_converter(type_hint) for type_hint in type_hints + ] + inner_type_hints = [ + converter.transfer_type if converter is not None else type_hint + for converter, type_hint in zip(converters, type_hints) + ] + values = self._inner_payload_converter.from_payloads( + payloads, typing.cast("list[type]", inner_type_hints) + ) + return [ + converter.from_transfer_type(value, type_hint) + if converter is not None + else value + for value, converter, type_hint in zip(values, converters, type_hints) + ] + + def with_context(self, context: SerializationContext) -> Self: + """Return a new instance with context set on the inner converter.""" + if not isinstance(self._inner_payload_converter, WithSerializationContext): + return self + inner_payload_converter = self._inner_payload_converter.with_context(context) + if inner_payload_converter is self._inner_payload_converter: + return self + return type(self)(inner_payload_converter) + + +class AdvancedJSONEncoder(json.JSONEncoder): + """Advanced JSON encoder. + + This encoder supports dataclasses and all iterables as lists. + + It also uses Pydantic v1's "dict" methods if available on the object, + but this is deprecated. Pydantic users should upgrade to v2 and use + temporalio.contrib.pydantic.pydantic_data_converter. + """ + + def default(self, o: Any) -> Any: + """Override JSON encoding default. + + See :py:meth:`json.JSONEncoder.default`. + """ + # Datetime support + if isinstance(o, datetime): + return o.isoformat() + # Dataclass support + if dataclasses.is_dataclass(o) and not isinstance(o, type): + return dataclasses.asdict(o) + # Support for Pydantic v1's dict method + dict_fn = getattr(o, "dict", None) + if callable(dict_fn): + return dict_fn() + # Support for non-list iterables like set + if not isinstance(o, list) and isinstance(o, collections.abc.Iterable): + return list(o) + # Support for UUID + if isinstance(o, uuid.UUID): + return str(o) + return super().default(o) + + +JSONTypeConverterUnhandled = NewType("JSONTypeConverterUnhandled", object) +"""Type of :py:attr:`JSONTypeConverter.Unhandled`.""" + +_JSONTypeConverterUnhandled = JSONTypeConverterUnhandled + + +class JSONTypeConverter(ABC): + """Converter for converting an object from Python :py:func:`json.loads` + result (e.g. scalar, list, or dict) to a known type. + """ + + Unhandled: ClassVar[JSONTypeConverterUnhandled] = JSONTypeConverterUnhandled( + object() + ) + """Sentinel value that must be used as the result of + :py:meth:`to_typed_value` to say the given type is not handled by this + converter.""" + + @abstractmethod + def to_typed_value( + self, hint: type, value: Any + ) -> Any | None | JSONTypeConverterUnhandled: + """Convert the given value to a type based on the given hint. + + Args: + hint: Type hint to use to help in converting the value. + value: Value as returned by :py:func:`json.loads`. Usually a scalar, + list, or dict. + + Returns: + The converted value or :py:attr:`Unhandled` if this converter does + not handle this situation. + """ + raise NotImplementedError + + +class JSONPlainPayloadConverter(EncodingPayloadConverter): + """Converter for 'json/plain' payloads supporting common Python values. + + For encoding, this supports all values that :py:func:`json.dump` supports + and by default adds extra encoding support for dataclasses, classes with + ``dict()`` methods, and all iterables. + + For decoding, this uses type hints to attempt to rebuild the type from the + type hint. + """ + + _encoder: type[json.JSONEncoder] | None + _decoder: type[json.JSONDecoder] | None + _encoding: str + + def __init__( + self, + *, + encoder: type[json.JSONEncoder] | None = AdvancedJSONEncoder, + decoder: type[json.JSONDecoder] | None = None, + encoding: str = "json/plain", + custom_type_converters: Sequence[JSONTypeConverter] = [], + ) -> None: + """Initialize a JSON data converter. + + Args: + encoder: Custom encoder class object to use. + decoder: Custom decoder class object to use. + encoding: Encoding name to use. + custom_type_converters: Set of custom type converters that are used + when converting from a payload to type-hinted values. + """ + super().__init__() + self._encoder = encoder + self._decoder = decoder + self._encoding = encoding + self._custom_type_converters = custom_type_converters + + @property + def encoding(self) -> str: + """See base class.""" + return self._encoding + + def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: + """See base class.""" + # Check for Pydantic v1 + if hasattr(value, "parse_obj"): + warnings.warn( + "If you're using Pydantic v2, use temporalio.contrib.pydantic.pydantic_data_converter. " + "If you're using Pydantic v1 and cannot upgrade, refer to https://github.com/temporalio/samples-python/tree/main/pydantic_converter_v1 for better v1 support." + ) + # We let JSON conversion errors be thrown to caller + return temporalio.api.common.v1.Payload( + metadata={"encoding": self._encoding.encode()}, + data=json.dumps( + value, cls=self._encoder, separators=(",", ":"), sort_keys=True + ).encode(), + ) + + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type | None = None, + ) -> Any: + """See base class.""" + try: + obj = json.loads(payload.data, cls=self._decoder) + if type_hint: + obj = value_to_type(type_hint, obj, self._custom_type_converters) + return obj + except json.JSONDecodeError as err: + raise RuntimeError("Failed parsing") from err + + +def _get_iso_datetime_parser() -> Callable[[str], datetime]: + """Return the ISO datetime parser. + + Returns: + A callable to parse date strings into datetimes. + """ + return datetime.fromisoformat + + +def value_to_type( + hint: type, + value: Any, + custom_converters: Sequence[JSONTypeConverter] = [], +) -> Any: + """Convert a given value to the given type hint. + + This is used internally to convert a raw JSON loaded value to a specific + type hint. + + Args: + hint: Type hint to convert the value to. + value: Raw value (e.g. primitive, dict, or list) to convert from. + custom_converters: Set of custom converters to try before doing default + conversion. Converters are tried in order and the first value that + is not :py:attr:`JSONTypeConverter.Unhandled` will be returned from + this function instead of doing default behavior. + + Returns: + Converted value. + + Raises: + TypeError: Unable to convert to the given hint. + """ + # Try custom converters + for conv in custom_converters: + ret = conv.to_typed_value(hint, value) + if ret is not JSONTypeConverter.Unhandled: + return ret + + # Any or primitives + if hint is Any: + return value + elif hint is datetime: + if isinstance(value, str): + try: + return _get_iso_datetime_parser()(value) + except ValueError as err: + raise TypeError(f"Failed parsing datetime string: {value}") from err + elif isinstance(value, datetime): + return value + raise TypeError(f"Expected datetime or ISO8601 string, got {type(value)}") + elif hint is int or hint is float: + if not isinstance(value, (int, float)): + raise TypeError(f"Expected value to be int|float, was {type(value)}") + return hint(value) + elif hint is bool: + if not isinstance(value, bool): + raise TypeError(f"Expected value to be bool, was {type(value)}") + return bool(value) + elif hint is str: + if not isinstance(value, str): + raise TypeError(f"Expected value to be str, was {type(value)}") + return str(value) + elif hint is bytes: + if not isinstance(value, (str, bytes, list)): + raise TypeError(f"Expected value to be bytes, was {type(value)}") + # In some other SDKs, this is serialized as a base64 string, but in + # Python this is a numeric array. + return bytes(value) # type: ignore + elif hint is type(None): + if value is not None: + raise TypeError(f"Expected None, got value of type {type(value)}") + return None + + # NewType. Note we cannot simply check isinstance NewType here because it's + # only been a class since 3.10. Instead we'll just check for the presence + # of a supertype. + supertype = getattr(hint, "__supertype__", None) + if supertype: + return value_to_type(supertype, value, custom_converters) + + # Load origin for other checks + origin = getattr(hint, "__origin__", hint) + type_args: tuple = getattr(hint, "__args__", ()) + + # Literal + if origin is Literal or origin is typing_extensions.Literal: + if value not in type_args: + raise TypeError(f"Value {value} not in literal values {type_args}") + return value + + is_union = origin is typing.Union # type:ignore[reportDeprecated] + is_union = is_union or isinstance(origin, UnionType) + + # Union + if is_union: + # Try each one. Note, Optional is just a union w/ none. + for arg in type_args: + try: + return value_to_type(arg, value, custom_converters) + except Exception: + pass + raise TypeError(f"Failed converting to {hint} from {value}") + + # Mapping + if inspect.isclass(origin) and issubclass(origin, collections.abc.Mapping): + if not isinstance(value, collections.abc.Mapping): + raise TypeError(f"Expected {hint}, value was {type(value)}") + ret_dict = {} + # If there are required or optional keys that means we are a TypedDict + # and therefore can extract per-key types + per_key_types: dict[str, type] | None = None + if getattr(origin, "__required_keys__", None) or getattr( + origin, "__optional_keys__", None + ): + per_key_types = get_type_hints(origin) + key_type = ( + type_args[0] + if len(type_args) > 0 + and type_args[0] is not Any + and not isinstance(type_args[0], TypeVar) + else None + ) + value_type = ( + type_args[1] + if len(type_args) > 1 + and type_args[1] is not Any + and not isinstance(type_args[1], TypeVar) + else None + ) + # Convert each key/value + for key, value in value.items(): + this_value_type = value_type + if per_key_types: + # TODO(cretz): Strict mode would fail an unknown key + this_value_type = per_key_types.get(key) + + if key_type: + # This function is used only by JSONPlainPayloadConverter. When + # serializing to JSON, Python supports key types str, int, float, bool, + # and None, serializing all to string representations. We now attempt to + # use the provided type annotation to recover the original value with its + # original type. + try: + if isinstance(key, str): + if key_type is int or key_type is float: + key = key_type(key) + elif ( + inspect.isclass(key_type) + and issubclass(key_type, Enum) + and issubclass(key_type, int) + ): + # JSON serializes int enum keys as their number + key = int(key) + elif key_type is bool: + key = {"true": True, "false": False}[key] + elif key_type is type(None): + key = {"null": None}[key] + + if not isinstance(key_type, type) or not isinstance(key, key_type): + key = value_to_type(key_type, key, custom_converters) + except Exception as err: + raise TypeError( + f"Failed converting key {repr(key)} to type {key_type} in mapping {hint}" + ) from err + + if this_value_type: + try: + value = value_to_type(this_value_type, value, custom_converters) + except Exception as err: + raise TypeError( + f"Failed converting value for key {repr(key)} in mapping {hint}" + ) from err + ret_dict[key] = value + # If there are per-key types, it's a typed dict and we want to attempt + # instantiation to get its validation + if per_key_types: + ret_dict = hint(**ret_dict) + return ret_dict + + # Dataclass + if dataclasses.is_dataclass(hint): + if not isinstance(value, dict): + raise TypeError( + f"Cannot convert to dataclass {hint}, value is {type(value)} not dict" + ) + # Obtain dataclass fields and check that all dict fields are there and + # that no required fields are missing. Unknown fields are silently + # ignored. + fields = dataclasses.fields(hint) + field_hints = get_type_hints(hint) + field_values = {} + non_init_field_values = {} + for field in fields: + field_value = value.get(field.name, dataclasses.MISSING) + # We do not check whether field is required here. Rather, we let the + # attempted instantiation of the dataclass raise if a field is + # missing + if field_value is not dataclasses.MISSING: + # Convert init=False fields too, so a mismatched type still + # rejects this dataclass when trying union members + try: + converted = value_to_type( + field_hints[field.name], field_value, custom_converters + ) + except Exception as err: + raise TypeError( + f"Failed converting field {field.name} on dataclass {hint}" + ) from err + if field.init: + field_values[field.name] = converted + else: + non_init_field_values[field.name] = converted + # Simply instantiate the dataclass. This will fail as expected when + # missing required fields. + # TODO(cretz): Want way to convert snake case to camel case? + obj = hint(**field_values) + # init=False fields cannot be passed to __init__ but are serialized, so + # restore them afterwards. object.__setattr__ also works on frozen + # dataclasses. + for name, field_value in non_init_field_values.items(): + object.__setattr__(obj, name, field_value) + return obj + + # Pydantic model instance + # Pydantic users should use Pydantic v2 with + # temporalio.contrib.pydantic.pydantic_data_converter, in which case a + # pydantic model instance will have been handled by the custom_converters at + # the start of this function. We retain the following for backwards + # compatibility with pydantic v1 users, but this is deprecated. + parse_obj_attr = inspect.getattr_static(hint, "parse_obj", None) + if isinstance(parse_obj_attr, classmethod) or isinstance( + parse_obj_attr, staticmethod + ): + if not isinstance(value, dict): + raise TypeError( + f"Cannot convert to {hint}, value is {type(value)} not dict" + ) + return getattr(hint, "parse_obj")(value) + + # IntEnum, or any enum that mixes in int + if inspect.isclass(hint) and issubclass(hint, Enum) and issubclass(hint, int): + if not isinstance(value, int): + raise TypeError( + f"Cannot convert to enum {hint}, value not an integer, value is {type(value)}" + ) + return hint(value) + + # StrEnum, or any enum that mixes in str + if inspect.isclass(hint) and issubclass(hint, Enum) and issubclass(hint, str): + if not isinstance(value, str): + raise TypeError( + f"Cannot convert to enum {hint}, value not a string, value is {type(value)}" + ) + return hint(value) + + # UUID + if inspect.isclass(hint) and issubclass(hint, uuid.UUID): + return hint(value) + + # Iterable. We intentionally put this last as it catches several others. + if inspect.isclass(origin) and issubclass(origin, collections.abc.Iterable): + if not isinstance(value, collections.abc.Iterable): + raise TypeError(f"Expected {hint}, value was {type(value)}") + ret_list = [] + # If there is no type arg, just return value as is + if not type_args or ( + len(type_args) == 1 + and (isinstance(type_args[0], TypeVar) or type_args[0] is Ellipsis) + ): + ret_list = list(value) + else: + # Otherwise convert + for i, item in enumerate(value): + # Non-tuples use first type arg, tuples use arg set or one + # before ellipsis if that's set + if origin is not tuple: + arg_type = type_args[0] + elif len(type_args) > i and type_args[i] is not Ellipsis: + arg_type = type_args[i] + elif type_args[-1] is Ellipsis: + # Ellipsis means use the second to last one + arg_type = type_args[-2] # type: ignore + else: + raise TypeError( + f"Type {hint} only expecting {len(type_args)} values, got at least {i + 1}" + ) + try: + ret_list.append(value_to_type(arg_type, item, custom_converters)) + except Exception as err: + raise TypeError(f"Failed converting {hint} index {i}") from err + # If tuple, set, frozenset, or deque convert back to that type + if origin is tuple: + return tuple(ret_list) + elif origin is set: + return set(ret_list) + elif origin is frozenset: + return frozenset(ret_list) + elif origin is collections.deque: + return collections.deque(ret_list) + return ret_list + + raise TypeError(f"Unserializable type during conversion: {hint}") + + +# Set up after all converter classes are defined to avoid forward-reference issues. +DefaultPayloadConverter.default_encoding_payload_converters = ( + BinaryNullPayloadConverter(), + BinaryPlainPayloadConverter(), + JSONProtoPayloadConverter(), + BinaryProtoPayloadConverter(), + JSONPlainPayloadConverter(), # JSON Plain needs to remain last because it throws on unknown types +) diff --git a/temporalio/converter/_payload_validation_error.py b/temporalio/converter/_payload_validation_error.py new file mode 100644 index 0000000000..b6b597c8f2 --- /dev/null +++ b/temporalio/converter/_payload_validation_error.py @@ -0,0 +1,27 @@ +"""Payload validation error helpers.""" + +from typing import Any + +import temporalio.exceptions + + +def create_payload_validation_error( + details: Any, +) -> temporalio.exceptions.ApplicationError: + """Create an error indicating that a converted payload failed validation. + + Args: + details: Structured details describing the validation failure, or + ``None`` to omit details from the error. + + Returns: + A non-retryable application error with the reserved payload validation + failure type. + """ + error_details: tuple[Any, ...] = () if details is None else (details,) + return temporalio.exceptions.ApplicationError( + "Payload validation failed", + *error_details, + type="PayloadValidationError", + non_retryable=True, + ) diff --git a/temporalio/converter/_search_attributes.py b/temporalio/converter/_search_attributes.py new file mode 100644 index 0000000000..08cb187097 --- /dev/null +++ b/temporalio/converter/_search_attributes.py @@ -0,0 +1,223 @@ +"""Utilities for encoding and decoding Temporal search attributes.""" + +from __future__ import annotations + +from collections.abc import Sequence +from datetime import datetime +from typing import Any + +import temporalio.api.common.v1 +import temporalio.common +from temporalio.converter._data_converter import default +from temporalio.converter._payload_converter import _get_iso_datetime_parser + + +def encode_search_attributes( + attributes: ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ), + api: temporalio.api.common.v1.SearchAttributes, +) -> None: + """Convert search attributes into an API message. + + Args: + attributes: Search attributes to convert. The dictionary form of this is + DEPRECATED. + api: API message to set converted attributes on. + """ + if isinstance(attributes, temporalio.common.TypedSearchAttributes): + for typed_k, typed_v in attributes: + api.indexed_fields[typed_k.name].CopyFrom( + encode_typed_search_attribute_value(typed_k, typed_v) + ) + return + elif not attributes: + return + for k, v in attributes.items(): + api.indexed_fields[k].CopyFrom(encode_search_attribute_values(v)) + + +def encode_typed_search_attribute_value( + key: temporalio.common.SearchAttributeKey[ + temporalio.common.SearchAttributeValueType + ], + value: temporalio.common.SearchAttributeValue | None, +) -> temporalio.api.common.v1.Payload: + """Convert typed search attribute value into a payload. + + Args: + key: Key for the value. + value: Value to convert. + + Returns: + Payload for the value. + """ + # For server search attributes to work properly, we cannot set the metadata + # type when we set null + if value is None: + return default().payload_converter.to_payload(None) + if not isinstance(value, key.origin_value_type): + raise TypeError( + f"Value of type {value} not suitable for indexed value type {key.indexed_value_type}" + ) + # datetime needs to be in isoformat + if isinstance(value, datetime): + if value.tzinfo is None: + raise ValueError("Timezone must be present on all search attribute dates") + value = value.isoformat() + # We'll do an extra sanity check for keyword list and check every value + if isinstance(value, Sequence): + for v in value: + if not isinstance(v, str): + raise TypeError("All values of a keyword list must be strings") + # Convert value + payload = default().payload_converter.to_payload(value) + # Set metadata type + payload.metadata["type"] = key._metadata_type.encode() + return payload + + +def encode_search_attribute_values( + vals: temporalio.common.SearchAttributeValues, +) -> temporalio.api.common.v1.Payload: + """Convert search attribute values into a payload. + + .. deprecated:: + Use typed search attributes instead. + + Args: + vals: List of values to convert. + """ + if not isinstance(vals, list): + raise TypeError("Search attribute values must be lists") # type:ignore[reportUnreachable] + # Confirm all types are the same + val_type: type | None = None + # Convert dates to strings + safe_vals = [] + for v in vals: + if isinstance(v, datetime): + if v.tzinfo is None: + raise ValueError( + "Timezone must be present on all search attribute dates" + ) + v = v.isoformat() + elif not isinstance(v, (str, int, float, bool)): + raise TypeError( + f"Search attribute value of type {type(v).__name__} not one of str, int, float, bool, or datetime" + ) + elif val_type and type(v) is not val_type: + raise TypeError( + "Search attribute values must have the same type for the same key" + ) + elif not val_type: + val_type = type(v) + safe_vals.append(v) + return default().payload_converter.to_payloads([safe_vals])[0] + + +def _encode_maybe_typed_search_attributes( # type:ignore[reportUnusedFunction] + non_typed_attributes: temporalio.common.SearchAttributes | None, + typed_attributes: temporalio.common.TypedSearchAttributes | None, + api: temporalio.api.common.v1.SearchAttributes, +) -> None: + if non_typed_attributes: + if typed_attributes and typed_attributes.search_attributes: + raise ValueError( + "Cannot provide both deprecated search attributes and typed search attributes" + ) + encode_search_attributes(non_typed_attributes, api) + elif typed_attributes and typed_attributes.search_attributes: + encode_search_attributes(typed_attributes, api) + + +def decode_search_attributes( + api: temporalio.api.common.v1.SearchAttributes, +) -> temporalio.common.SearchAttributes: + """Decode API search attributes to values. + + .. deprecated:: + Use typed search attributes instead. + + Args: + api: API message with search attribute values to convert. + + Returns: + Converted search attribute values (new mapping every time). + """ + conv = default().payload_converter + ret = {} + for k, v in api.indexed_fields.items(): + val = conv.from_payloads([v])[0] + # If a value did not come back as a list, make it a single-item list + if not isinstance(val, list): + val = [val] + # Convert each item to datetime if necessary + if v.metadata.get("type") == b"Datetime": + parser = _get_iso_datetime_parser() + val = [parser(v) for v in val] + ret[k] = val + return ret + + +def decode_typed_search_attributes( + api: temporalio.api.common.v1.SearchAttributes, +) -> temporalio.common.TypedSearchAttributes: + """Decode API search attributes to typed search attributes. + + Args: + api: API message with search attribute values to convert. + + Returns: + Typed search attribute collection (new object every time). + """ + conv = default().payload_converter + pairs: list[temporalio.common.SearchAttributePair] = [] + for k, v in api.indexed_fields.items(): + # We want the "type" metadata, but if it is not present or an unknown + # type, we will just ignore + metadata_type = v.metadata.get("type") + if not metadata_type: + continue + key = temporalio.common.SearchAttributeKey._from_metadata_type( + k, metadata_type.decode() + ) + if not key: + continue + val: Any = conv.from_payload(v) + # If the value is a list but the type is not keyword list, pull out + # single item or consider this an invalid value and ignore + if ( + key.indexed_value_type + != temporalio.common.SearchAttributeIndexedValueType.KEYWORD_LIST + and isinstance(val, list) + ): + if len(val) != 1: + continue + val = val[0] + if ( + key.indexed_value_type + == temporalio.common.SearchAttributeIndexedValueType.DATETIME + ): + parser = _get_iso_datetime_parser() + # We will let this throw + val = parser(val) + elif ( + key.indexed_value_type + == temporalio.common.SearchAttributeIndexedValueType.DOUBLE + and type(val) is int + ): + # Visibility returns a whole-number Double as a JSON integer + val = float(val) + # If the value isn't the right type, we need to ignore + if isinstance(val, key.origin_value_type): + pairs.append(temporalio.common.SearchAttributePair(key, val)) + return temporalio.common.TypedSearchAttributes(pairs) + + +def _decode_search_attribute_value( # type:ignore[reportUnusedFunction] + payload: temporalio.api.common.v1.Payload, +) -> temporalio.common.SearchAttributeValue: + val = default().payload_converter.from_payload(payload) + if isinstance(val, str) and payload.metadata.get("type") == b"Datetime": + val = _get_iso_datetime_parser()(val) + return val # type: ignore diff --git a/temporalio/converter/_serialization_context.py b/temporalio/converter/_serialization_context.py new file mode 100644 index 0000000000..7de64be049 --- /dev/null +++ b/temporalio/converter/_serialization_context.py @@ -0,0 +1,179 @@ +"""Serialization context types for data conversion.""" + +from __future__ import annotations + +from abc import ABC +from dataclasses import dataclass + +import google.protobuf.message +from typing_extensions import Self + + +class SerializationContext(ABC): + """Base serialization context. + + Provides contextual information during serialization and deserialization operations. + + Examples: + In client code, when starting a workflow, or sending a signal/update/query to a workflow, + or receiving the result of an update/query, or handling an exception from a workflow, the + context type is :py:class:`WorkflowSerializationContext` and the workflow ID set of the + target workflow will be set in the context. + + In workflow code, when operating on a payload being sent/received to/from a child workflow, + or handling an exception from a child workflow, the context type is + :py:class:`WorkflowSerializationContext` and the workflow ID is that of the child workflow, + not of the currently executing (i.e. parent) workflow. + + In workflow code, when operating on a payload to be sent/received to/from an activity, the + context type is :py:class:`ActivitySerializationContext` and the workflow ID is that of the + currently-executing workflow. ActivitySerializationContext is also set on data converter + operations in the activity context. + + When operating on a Nexus operation payload, the context type is + :py:class:`NexusSerializationContext` and identifies the Nexus endpoint, service, and + resolved operation name. + """ + + pass + + +@dataclass(frozen=True) +class WorkflowSerializationContext(SerializationContext): + """Serialization context for workflows. + + See :py:class:`SerializationContext` for more details. + """ + + namespace: str + """The namespace the workflow is running in.""" + + workflow_id: str + """The ID of the workflow. + + Note that this is the ID of the workflow of which the payload being operated on is an input or + output. Note also that when creating/describing schedules, this may be the workflow ID prefix + as configured, not the final workflow ID when the workflow is created by the schedule. + """ + + +@dataclass(frozen=True) +class ActivitySerializationContext(SerializationContext): + """Serialization context for activities. + + See :py:class:`SerializationContext` for more details. + """ + + namespace: str + """Workflow/activity namespace.""" + + activity_id: str | None + """Activity ID. Optional if this is an activity started from a workflow.""" + + activity_type: str | None + """Activity type. + + .. deprecated:: + This value may not be set in some bidirectional situations, it should + not be relied on. + """ + + activity_task_queue: str | None + """Activity task queue. + + .. deprecated:: + This value may not be set in some bidirectional situations, it should + not be relied on. + """ + + workflow_id: str | None + """Workflow ID. Only set if this is an activity started from a workflow. + + Note, when creating/describing schedules, this may be the workflow ID prefix as + configured, not the final workflow ID when the workflow is created by the schedule.""" + + workflow_type: str | None + """Workflow type if this is an activity started from a workflow.""" + + is_local: bool + """Whether the activity is a local activity started from a workflow.""" + + +@dataclass(frozen=True) +class NexusSerializationContext(SerializationContext): + """Serialization context for Nexus operation payloads. + + Callers receive this context when encoding inputs and decoding results or failures. Handlers + receive it when decoding inputs, encoding synchronous results, and encoding failures produced + while handling a Nexus task. + + Workflows and standalone activities started by a handler, and workflow updates it sends, + receive this context through the server and use it for payloads returned to the caller: + results, failures, and standalone activity heartbeat details. Clients decode these with the + context the server returns. See + :py:attr:`temporalio.activity.Info.nexus_serialization_context` for asynchronous completion. + + A standalone operation handle decodes with the context the server returns, falling back to the + context used to start the operation on older servers. + + A failure encoded by a handler is later decoded by a caller. Because some operation paths may + lack this context, contextual encodings must be self-describing and decoders must continue to + accept payloads encoded without context. + + .. warning:: + This API is experimental and unstable. + """ + + endpoint: str + """Nexus endpoint name.""" + + service: str + """Nexus service name.""" + + operation: str + """Nexus operation name.""" + + +def _propagated_nexus_serialization_context( # pyright: ignore[reportUnusedFunction] + message: google.protobuf.message.Message, +) -> NexusSerializationContext | None: + """Return the Nexus serialization context the server propagated on a message, if any. + + The server sets ``propagated_nexus_serialization_context`` on executions started by a Nexus + operation handler. + """ + if not message.HasField("propagated_nexus_serialization_context"): + return None + context = getattr(message, "propagated_nexus_serialization_context") + return NexusSerializationContext( + endpoint=context.endpoint, + service=context.service, + operation=context.operation, + ) + + +class WithSerializationContext(ABC): + """Interface for classes that can use serialization context. + + The following classes may implement this interface: + - :py:class:`PayloadConverter` + - :py:class:`PayloadCodec` + - :py:class:`FailureConverter` + - :py:class:`EncodingPayloadConverter` + + During data converter operations (encoding/decoding, serialization/deserialization, and failure + conversion), instances of classes implementing this interface will be replaced by the result of + calling with_context(context). This allows overridden methods (encode/decode, + to_payload/from_payload, etc) to use the context. + """ + + def with_context(self, context: SerializationContext) -> Self: # type: ignore[reportUnusedParameter] + """Return a copy of this object configured to use the given context. + + Args: + context: The serialization context to use. + + Returns: + A new instance configured with the context. + """ + raise NotImplementedError() diff --git a/temporalio/envconfig.py b/temporalio/envconfig.py index 34078ddfea..2b1e8d85a0 100644 --- a/temporalio/envconfig.py +++ b/temporalio/envconfig.py @@ -6,19 +6,22 @@ from __future__ import annotations -from collections.abc import Mapping +import os +from abc import ABC, abstractmethod +from collections.abc import Mapping, Sequence from dataclasses import dataclass, field from pathlib import Path -from typing import Any, Dict, Literal, Optional, TypeAlias, Union, cast +from typing import Any, Literal, TypeAlias, cast from typing_extensions import Self, TypedDict +import temporalio.client import temporalio.service from temporalio.bridge.temporal_sdk_bridge import envconfig as _bridge_envconfig -DataSource: TypeAlias = Union[ - Path, str, bytes -] # str represents a file contents, bytes represents raw data +DataSource: TypeAlias = ( + Path | str | bytes +) # str represents a file contents, bytes represents raw data # We define typed dictionaries for what these configs look like as TOML. @@ -40,6 +43,7 @@ class ClientConfigProfileDict(TypedDict, total=False): api_key: str tls: ClientConfigTLSDict grpc_meta: Mapping[str, str] + ext: Mapping[str, Mapping[str, Any]] def _from_dict_to_source(d: Mapping[str, Any] | None) -> DataSource | None: @@ -76,7 +80,7 @@ def _source_to_path_and_data( elif isinstance(source, bytes): data = source elif source is not None: - raise TypeError( + raise TypeError( # type: ignore[reportUnreachable] "config_source must be one of pathlib.Path, str, bytes, or None, " f"but got {type(source).__name__}" ) @@ -93,18 +97,14 @@ def _read_source(source: DataSource | None) -> bytes | None: return source.encode("utf-8") if isinstance(source, bytes): return source - raise TypeError( + raise TypeError( # type: ignore[reportUnreachable] f"Source must be one of pathlib.Path, str, or bytes, but got {type(source).__name__}" ) @dataclass(frozen=True) class ClientConfigTLS: - """TLS configuration as specified as part of client configuration - - .. warning:: - Experimental API. - """ + """TLS configuration as specified as part of client configuration""" disabled: bool | None = None """If True, TLS is explicitly disabled. If False, TLS is explicitly enabled. If None, TLS behavior was not configured.""" @@ -151,8 +151,12 @@ def to_connect_tls_config(self) -> bool | temporalio.service.TLSConfig: @classmethod def from_dict(cls, d: ClientConfigTLSDict | None) -> Self | None: - """Create a ClientConfigTLS from a dictionary.""" - if not d: + """Create a ClientConfigTLS from a dictionary. + + ``None`` means there is no TLS table. An empty dictionary is a TLS table + with nothing set, so it gives a default ``ClientConfigTLS``. + """ + if d is None: return None return cls( disabled=d.get("disabled"), @@ -168,9 +172,6 @@ def from_dict(cls, d: ClientConfigTLSDict | None) -> Self | None: class ClientConnectConfig(TypedDict, total=False): """Arguments for `temporalio.client.Client.connect` that are configurable via environment configuration. - - .. warning:: - Experimental API. """ target_host: str @@ -178,6 +179,7 @@ class ClientConnectConfig(TypedDict, total=False): api_key: str tls: bool | temporalio.service.TLSConfig rpc_metadata: Mapping[str, str] + plugins: Sequence[temporalio.client.Plugin] @dataclass(frozen=True) @@ -187,9 +189,6 @@ class ClientConfigProfile: This class holds the configuration as loaded from a file or environment. See `to_client_connect_config` to transform the profile to `ClientConnectConfig`, which can be used to create a client. - - .. warning:: - Experimental API. """ address: str | None = None @@ -202,6 +201,16 @@ class ClientConfigProfile: """TLS configuration.""" grpc_meta: Mapping[str, str] = field(default_factory=dict) """gRPC metadata.""" + ext: Mapping[str, Mapping[str, Any]] = field(default_factory=dict) + """Raw extension config from ``profile..ext``, keyed by extension + name. Each extension decodes its own table, which should be treated as + read-only. Values are converted as by :py:mod:`tomllib`, so TOML datetimes + are :py:class:`datetime.datetime`, :py:class:`datetime.date`, or + :py:class:`datetime.time` objects. Not modified by environment variables. + + .. warning:: + This API is experimental and unstable. + """ @classmethod def from_dict(cls, d: ClientConfigProfileDict) -> Self: @@ -212,6 +221,7 @@ def from_dict(cls, d: ClientConfigProfileDict) -> Self: api_key=d.get("api_key"), tls=ClientConfigTLS.from_dict(d.get("tls")), grpc_meta=d.get("grpc_meta") or {}, + ext=d.get("ext") or {}, ) def to_dict(self) -> ClientConfigProfileDict: @@ -223,10 +233,12 @@ def to_dict(self) -> ClientConfigProfileDict: d["namespace"] = self.namespace if self.api_key is not None: d["api_key"] = self.api_key - if self.tls and (tls_dict := self.tls.to_dict()): - d["tls"] = tls_dict + if self.tls is not None: + d["tls"] = self.tls.to_dict() if self.grpc_meta: d["grpc_meta"] = self.grpc_meta + if self.ext: + d["ext"] = self.ext return d def to_client_connect_config(self) -> ClientConnectConfig: @@ -248,7 +260,7 @@ def to_client_connect_config(self) -> ClientConnectConfig: config["rpc_metadata"] = self.grpc_meta # Cast to ClientConnectConfig - this is safe because we've only included non-None values - return cast(ClientConnectConfig, config) + return cast(ClientConnectConfig, config) # type: ignore[reportInvalidCast] @staticmethod def load( @@ -300,6 +312,61 @@ def load( return ClientConfigProfile.from_dict(raw_profile) +@dataclass(frozen=True) +class ClientConfigExtensionRequest: + """Input to :py:meth:`ClientConfigExtension.client_plugin`. + + .. warning:: + This API is experimental and unstable. + """ + + profile: ClientConfigProfile + """The loaded profile, with environment variable overrides applied.""" + env: Mapping[str, str] | None + """Env to read extension env vars from, or None if env loading is disabled.""" + + +class ClientConfigExtension(ABC): + """Extension that adds config to client environment configuration. + + An extension owns the TOML table under ``profile..ext.``, + where ```` is :py:meth:`name`, and turns its config into a client + plugin. Extensions are recommended to use a ``TEMPORAL_EXT__`` prefix + for any environment variables they read. Pass extensions to + :py:meth:`ClientConfig.load_client_connect_config`. + + .. warning:: + This API is experimental and unstable. + """ + + @abstractmethod + def name(self) -> str: + """The extension's table key under ``profile..ext``. Must be + unique among loaded extensions. + """ + + @abstractmethod + def client_plugin( + self, req: ClientConfigExtensionRequest + ) -> temporalio.client.Plugin | None: + """Read this extension's config from the profile and env, and return a + plugin that applies it, or None if there's nothing to apply. + """ + + +def _validate_extensions(extensions: Sequence[ClientConfigExtension]) -> None: + names: set[str] = set() + for i, extension in enumerate(extensions): + if extension is None: # type: ignore[reportUnnecessaryComparison] + raise ValueError(f"client config extension at index {i} is None") + name = extension.name() + if not name: + raise ValueError(f"client config extension at index {i} has empty name") + if name in names: + raise ValueError(f'duplicate client config extension name "{name}"') + names.add(name) + + @dataclass class ClientConfig: """Client configuration loaded from TOML and environment variables. @@ -307,9 +374,6 @@ class ClientConfig: This contains a mapping of profile names to client profiles. Use `ClientConfigProfile.to_client_connect_config` to create a `ClientConnectConfig` from a profile. See `ClientConfigProfile.load` to load an individual profile. - - .. warning:: - Experimental API. """ profiles: Mapping[str, ClientConfigProfile] @@ -380,12 +444,14 @@ def load_client_connect_config( disable_env: bool = False, config_file_strict: bool = False, override_env_vars: Mapping[str, str] | None = None, + extensions: Sequence[ClientConfigExtension] = [], ) -> ClientConnectConfig: """Load a single client profile and convert to connect config. This is a convenience function that combines loading a profile and - converting it to a connect config dictionary. This will use the current - process's environment for overrides unless disabled. + converting it to a connect config dictionary, plus any extensions. This + will use the current process's environment for overrides unless + disabled. Args: profile: The profile to load from the config. Defaults to "default". @@ -402,11 +468,22 @@ def load_client_connect_config( environment is used. To use a specific set of environment variables, provide them here. To disable environment variable loading, set ``disable_env`` to true. + extensions: Extensions to apply, in order. Each extension is given + the loaded profile and env, and any plugin it returns is + appended to the ``plugins`` of the returned config. Extension + names must be unique. To also pass other plugins to + :py:meth:`temporalio.client.Client.connect`, combine them with + these rather than passing ``plugins`` separately. + + .. warning:: + This parameter is experimental and unstable. Returns: TypedDict of keyword arguments for :py:meth:`temporalio.client.Client.connect`. """ + _validate_extensions(extensions) + config_source: DataSource | None = None if config_file and not disable_file: config_source = Path(config_file) @@ -419,4 +496,25 @@ def load_client_connect_config( config_file_strict=config_file_strict, override_env_vars=override_env_vars, ) - return prof.to_client_connect_config() + config = prof.to_client_connect_config() + + if extensions: + req = ClientConfigExtensionRequest( + profile=prof, + env=None + if disable_env + else (os.environ if override_env_vars is None else override_env_vars), + ) + plugins: list[temporalio.client.Plugin] = [] + for extension in extensions: + try: + plugin = extension.client_plugin(req) + except Exception as err: + raise RuntimeError( + f'client config extension "{extension.name()}": {err}' + ) from err + if plugin is not None: + plugins.append(plugin) + if plugins: + config["plugins"] = plugins + return config diff --git a/temporalio/exceptions.py b/temporalio/exceptions.py index 61c04166df..03a623c21e 100644 --- a/temporalio/exceptions.py +++ b/temporalio/exceptions.py @@ -4,9 +4,8 @@ from collections.abc import Sequence from datetime import timedelta from enum import IntEnum -from typing import Any, Optional, Tuple +from typing import Any -import temporalio.api.common.v1 import temporalio.api.enums.v1 import temporalio.api.failure.v1 @@ -59,16 +58,72 @@ class WorkflowAlreadyStartedError(FailureError): workflow_type: Workflow type name of the already-started workflow. run_id: Run ID of the already-started workflow if this was raised by the client. + first_run_id: First execution run ID of the already-started workflow if + this was raised by the client and provided by the server. """ def __init__( - self, workflow_id: str, workflow_type: str, *, run_id: str | None = None + self, + workflow_id: str, + workflow_type: str, + *, + run_id: str | None = None, + first_run_id: str | None = None, ) -> None: """Initialize a workflow already started error.""" super().__init__("Workflow execution already started") self.workflow_id = workflow_id self.workflow_type = workflow_type self.run_id = run_id + self.first_run_id = first_run_id + + +class InvalidVersioningOverrideError(FailureError): + """Thrown by a workflow when a child cannot start because its versioning + override is invalid. + """ + + def __init__(self) -> None: + """Initialize an invalid versioning override error.""" + super().__init__("Invalid versioning override") + + +class ActivityAlreadyStartedError(FailureError): + """Thrown by a client when an activity execution has already started. + + Attributes: + activity_id: ID of the already-started activity. + activity_type: Activity type name of the already-started activity. + run_id: Run ID of the already-started activity if this was raised by the + client. + """ + + def __init__( + self, activity_id: str, activity_type: str, *, run_id: str | None = None + ) -> None: + """Initialize an activity already started error.""" + super().__init__("Activity execution already started") + self.activity_id = activity_id + self.activity_type = activity_type + self.run_id = run_id + + +class NexusOperationAlreadyStartedError(FailureError): + """Thrown by a client when a Nexus operation execution has already started. + + .. warning:: + This API is experimental and unstable. + + Attributes: + operation_id: ID of the already-started operation. + run_id: Run ID of the already-started operation if available. + """ + + def __init__(self, operation_id: str, *, run_id: str | None = None) -> None: + """Initialize a Nexus operation already started error.""" + super().__init__("Nexus operation execution already started") + self.operation_id = operation_id + self.run_id = run_id class ApplicationErrorCategory(IntEnum): diff --git a/temporalio/nexus/__init__.py b/temporalio/nexus/__init__.py index 6f53bfba56..bb7fea18a5 100644 --- a/temporalio/nexus/__init__.py +++ b/temporalio/nexus/__init__.py @@ -1,35 +1,67 @@ """Temporal Nexus support -.. warning:: - Nexus APIs are experimental and unstable. - See https://github.com/temporalio/sdk-python/tree/main#nexus """ -from ._decorators import workflow_run_operation +from ._decorators import ( + TemporalOperationStartHandlerFunc, + temporal_operation, + workflow_run_operation, +) +from ._notification import ( + CompletionCallback, + create_completion_callback, +) from ._operation_context import ( Info, LoggerAdapter, NexusCallback, + TemporalCancelOperationContext, + TemporalStartOperationContext, WorkflowRunOperationContext, client, in_operation, info, + is_worker_shutdown, logger, metric_meter, + wait_for_worker_shutdown, + wait_for_worker_shutdown_sync, +) +from ._operation_handlers import ( + CancelActivityOptions, + CancelUpdateWorkflowOptions, + CancelWorkflowRunOptions, + TemporalOperationHandler, ) +from ._temporal_client import TemporalNexusClient, TemporalOperationResult from ._token import WorkflowHandle __all__ = ( "workflow_run_operation", + "CancelActivityOptions", + "CancelWorkflowRunOptions", + "CancelUpdateWorkflowOptions", + "CompletionCallback", "Info", "LoggerAdapter", "NexusCallback", "WorkflowRunOperationContext", + "TemporalCancelOperationContext", + "TemporalStartOperationContext", "client", + "create_completion_callback", "in_operation", "info", + "is_worker_shutdown", "logger", "metric_meter", + "wait_for_worker_shutdown", + "wait_for_worker_shutdown_sync", "WorkflowHandle", + "TemporalNexusClient", + "TemporalOperationStartHandlerFunc", + "TemporalOperationHandler", + "TemporalOperationResult", + "temporal_operation", ) diff --git a/temporalio/nexus/_decorators.py b/temporalio/nexus/_decorators.py index dfdecc89c7..2dd2b35544 100644 --- a/temporalio/nexus/_decorators.py +++ b/temporalio/nexus/_decorators.py @@ -2,9 +2,7 @@ from collections.abc import Awaitable, Callable from typing import ( - Optional, - TypeVar, - Union, + TypeAlias, overload, ) @@ -14,27 +12,40 @@ OperationHandler, StartOperationContext, ) +from typing_extensions import override -from ._operation_context import WorkflowRunOperationContext -from ._operation_handlers import WorkflowRunOperationHandler +from temporalio.nexus._temporal_client import ( + TemporalNexusClient, + TemporalOperationResult, +) +from temporalio.types import NexusServiceType + +from ._operation_context import ( + TemporalStartOperationContext, + WorkflowRunOperationContext, +) +from ._operation_handlers import ( + TemporalOperationHandler, + WorkflowRunOperationHandler, +) from ._token import WorkflowHandle from ._util import ( get_callable_name, + get_temporal_operation_start_method_input_and_output_type_annotations, get_workflow_run_start_method_input_and_output_type_annotations, + is_async_callable, set_operation_factory, ) -ServiceHandlerT = TypeVar("ServiceHandlerT") - @overload def workflow_run_operation( start: Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ], ) -> Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ]: ... @@ -46,12 +57,12 @@ def workflow_run_operation( ) -> Callable[ [ Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ] ], Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ], ]: ... @@ -61,7 +72,7 @@ def workflow_run_operation( start: None | ( Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ] ) = None, @@ -69,18 +80,18 @@ def workflow_run_operation( name: str | None = None, ) -> ( Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ] | Callable[ [ Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ] ], Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ], ] @@ -89,11 +100,11 @@ def workflow_run_operation( def decorator( start: Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ], ) -> Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ]: ( @@ -102,7 +113,7 @@ def decorator( ) = get_workflow_run_start_method_input_and_output_type_annotations(start) def operation_handler_factory( - self: ServiceHandlerT, + self: NexusServiceType, ) -> OperationHandler[InputT, OutputT]: async def _start( ctx: StartOperationContext, input: InputT @@ -117,15 +128,117 @@ async def _start( return WorkflowRunOperationHandler(_start) method_name = get_callable_name(start) - nexusrpc.set_operation( - operation_handler_factory, - nexusrpc.Operation( - name=name or method_name, - method_name=method_name, - input_type=input_type, - output_type=output_type, - ), + op = nexusrpc.Operation( + name=name or method_name, + input_type=input_type, + output_type=output_type, + ) + op.method_name = method_name + nexusrpc.set_operation(operation_handler_factory, op) + + set_operation_factory(start, operation_handler_factory) + return start + + if start is None: + return decorator + + return decorator(start) + + +TemporalOperationStartHandlerFunc: TypeAlias = Callable[ + [ + NexusServiceType, + TemporalStartOperationContext, + TemporalNexusClient, + InputT, + ], + Awaitable[TemporalOperationResult[OutputT]], +] + + +@overload +def temporal_operation( + start: TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT], +) -> TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT]: ... + + +@overload +def temporal_operation( + *, + name: str | None = None, +) -> Callable[ + [TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT]], + TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT], +]: ... + + +def temporal_operation( + start: None + | TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT] = None, + *, + name: str | None = None, +) -> ( + TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT] + | Callable[ + [TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT]], + TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT], + ] +): + """Decorator marking a method as the start method for an operation that interacts with Temporal. + + .. warning:: + This API is experimental and unstable. + """ + + def decorator( + start: TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT], + ) -> TemporalOperationStartHandlerFunc[NexusServiceType, InputT, OutputT]: + if not is_async_callable(start): + raise RuntimeError( + f"{start} is not an `async def` method. " + "@temporal_operation must decorate an `async def` start method." + ) + ( + input_type, + output_type, + ) = get_temporal_operation_start_method_input_and_output_type_annotations(start) + + def operation_handler_factory( + self: NexusServiceType, + ) -> OperationHandler[InputT, OutputT]: + async def _start( + ctx: TemporalStartOperationContext, + client: TemporalNexusClient, + input: InputT, + ) -> TemporalOperationResult[OutputT]: + return await start( + self, + ctx, + client, + input, + ) + + class _TemporalOperationHandler(TemporalOperationHandler): + @override + async def start_operation( + self, + ctx: TemporalStartOperationContext, + client: TemporalNexusClient, + input: InputT, + ) -> TemporalOperationResult[OutputT]: + return await _start(ctx, client, input) + + _TemporalOperationHandler.start_operation.__doc__ = start.__doc__ + return _TemporalOperationHandler() + + method_name = get_callable_name(start) + op = nexusrpc.Operation( + name=name or method_name, + input_type=input_type, + output_type=output_type, ) + op.method_name = method_name + nexusrpc.set_operation(operation_handler_factory, op) set_operation_factory(start, operation_handler_factory) return start diff --git a/temporalio/nexus/_link_conversion.py b/temporalio/nexus/_link_conversion.py index b2a219f96b..672847ea1f 100644 --- a/temporalio/nexus/_link_conversion.py +++ b/temporalio/nexus/_link_conversion.py @@ -3,10 +3,12 @@ import logging import re import urllib.parse +from dataclasses import dataclass +from enum import Enum +from functools import cached_property from typing import ( TYPE_CHECKING, Any, - Optional, ) import nexusrpc @@ -19,13 +21,73 @@ logger = logging.getLogger(__name__) -_LINK_URL_PATH_REGEX = re.compile( - r"^/namespaces/(?P[^/]+)/workflows/(?P[^/]+)/(?P[^/]+)/history$" +_URL_SCHEME = "temporal" + + +class _LinkType(str, Enum): + WORKFLOW_EVENT = temporalio.api.common.v1.Link.WorkflowEvent.DESCRIPTOR.full_name + WORKFLOW = temporalio.api.common.v1.Link.Workflow.DESCRIPTOR.full_name + NEXUS_OPERATION = temporalio.api.common.v1.Link.NexusOperation.DESCRIPTOR.full_name + ACTIVITY = temporalio.api.common.v1.Link.Activity.DESCRIPTOR.full_name + CALLBACK = temporalio.api.common.v1.Link.Callback.DESCRIPTOR.full_name + + +@dataclass(frozen=True) +class _LinkPath: + """The URL path shape for one link type. + + Every link path is /namespaces/{namespace}/{keyword}/{id}/{run_id} with an optional trailing + segment, so a link type is fully described by which keyword names it and what follows the + run ID. + """ + + keyword: str + tail: str | None + # A standalone Nexus operation need not have a run ID, so its path may carry an empty segment + # there. The other link types always address a specific run. + run_id_required: bool = True + + @cached_property + def regex(self) -> re.Pattern[str]: + """The pattern matching a URL path of this shape.""" + run_id = "[^/]+" if self.run_id_required else "[^/]*" + tail = f"/{self.tail}" if self.tail else "" + return re.compile( + rf"^/namespaces/(?P[^/]+)/{self.keyword}" + rf"/(?P[^/]+)/(?P{run_id}){tail}$" + ) + + +_LINK_PATHS: dict[_LinkType, _LinkPath] = { + _LinkType.WORKFLOW_EVENT: _LinkPath("workflows", "history"), + _LinkType.WORKFLOW: _LinkPath("workflows", None), + _LinkType.NEXUS_OPERATION: _LinkPath( + "nexus-operations", "details", run_id_required=False + ), + _LinkType.ACTIVITY: _LinkPath("activities", "details"), +} + +_EXECUTION_TYPE_SEGMENTS: dict[temporalio.api.enums.v1.ExecutionType.ValueType, str] = { + temporalio.api.enums.v1.ExecutionType.EXECUTION_TYPE_WORKFLOW: "workflows", + temporalio.api.enums.v1.ExecutionType.EXECUTION_TYPE_ACTIVITY: "activities", + temporalio.api.enums.v1.ExecutionType.EXECUTION_TYPE_NEXUS_OPERATION: "nexus-operations", +} +_SEGMENT_EXECUTION_TYPES = {v: k for k, v in _EXECUTION_TYPE_SEGMENTS.items()} + +# A callback is addressed by its execution's type as well as its IDs, so its path does not fit +# _LinkPath. +_CALLBACK_PATH_REGEX = re.compile( + r"^/namespaces/(?P[^/]+)/(?P[^/]+)" + r"/(?P[^/]+)/(?P[^/]+)/callbacks/(?P[^/]+)$" ) + + LINK_EVENT_ID_PARAM_NAME = "eventID" LINK_EVENT_TYPE_PARAM_NAME = "eventType" LINK_REQUEST_ID_PARAM_NAME = "requestID" LINK_REFERENCE_TYPE_PARAM_NAME = "referenceType" +LINK_REASON_PARAM_NAME = "reason" +LINK_COMPONENT_PATH_PARAM_NAME = "componentPath" EVENT_REFERENCE_TYPE = "EventReference" REQUEST_ID_REFERENCE_TYPE = "RequestIdReference" @@ -52,6 +114,67 @@ def workflow_execution_started_event_link_from_workflow_handle( ) +def nexus_link_to_temporal_link( + nexus_link: nexusrpc.Link, +) -> temporalio.api.common.v1.Link | None: + """Convert a nexusrpc link into a Temporal API Link. + + Returns None when the Nexus link type is invalid or unknown. + """ + try: + link_type = _LinkType(nexus_link.type) + except ValueError: + logger.warning(f"Invalid Nexus link: unknown link type {nexus_link}") + return None + + match link_type: + case _LinkType.WORKFLOW_EVENT: + return nexus_link_to_workflow_event_link(nexus_link) + + case _LinkType.WORKFLOW: + return nexus_link_to_workflow_link(nexus_link) + + case _LinkType.NEXUS_OPERATION: + return nexus_link_to_nexus_operation_link(nexus_link) + + case _LinkType.ACTIVITY: + return nexus_link_to_activity_link(nexus_link) + + case _LinkType.CALLBACK: + return nexus_link_to_callback_link(nexus_link) + + +def temporal_link_to_nexus_link( + temporal_link: temporalio.api.common.v1.Link, +) -> nexusrpc.Link | None: + """Convert a Temporal API Link into a nexusrpc link. + + Returns None when the Temporal link variant is missing or cannot be represented. + """ + match temporal_link.WhichOneof("variant"): + case "workflow_event": + return workflow_event_to_nexus_link(temporal_link.workflow_event) + + case "workflow": + return workflow_to_nexus_link(temporal_link.workflow) + + case "nexus_operation": + return nexus_operation_to_nexus_link(temporal_link.nexus_operation) + + case "activity": + return activity_link_to_nexus_link(temporal_link.activity) + + case "batch_job": + raise NotImplementedError("batch_job links are not supported") + + case "callback": + return callback_link_to_nexus_link(temporal_link.callback) + + case None: + logger.warning("Invalid Temporal link: missing variant") + return None + + def workflow_event_to_nexus_link( workflow_event: temporalio.api.common.v1.Link.WorkflowEvent, ) -> nexusrpc.Link: @@ -60,12 +183,6 @@ def workflow_event_to_nexus_link( Used when propagating links from a StartWorkflow response to a Nexus start operation response. """ - scheme = "temporal" - namespace = urllib.parse.quote(workflow_event.namespace) - workflow_id = urllib.parse.quote(workflow_event.workflow_id) - run_id = urllib.parse.quote(workflow_event.run_id) - path = f"/namespaces/{namespace}/workflows/{workflow_id}/{run_id}/history" - query_params = None match workflow_event.WhichOneof("reference"): case "event_ref": @@ -74,34 +191,205 @@ def workflow_event_to_nexus_link( query_params = _request_id_reference_to_query_params( workflow_event.request_id_ref ) + case _: + pass - # urllib will omit '//' from the url if netloc is empty so we add the scheme manually - url = f"{scheme}://{urllib.parse.urlunparse(('', '', path, '', query_params, ''))}" + return nexusrpc.Link( + url=_build_link_url( + _LinkType.WORKFLOW_EVENT, + workflow_event.namespace, + workflow_event.workflow_id, + workflow_event.run_id, + query_params=query_params, + ), + type=_LinkType.WORKFLOW_EVENT.value, + ) + + +def workflow_to_nexus_link( + workflow: temporalio.api.common.v1.Link.Workflow, +) -> nexusrpc.Link: + """Convert a Workflow link into a nexusrpc link.""" + query_params = "" + if workflow.reason: + query_params = urllib.parse.urlencode( + { + LINK_REASON_PARAM_NAME: workflow.reason, + }, + ) return nexusrpc.Link( - url=url, - type=workflow_event.DESCRIPTOR.full_name, + url=_build_link_url( + _LinkType.WORKFLOW, + workflow.namespace, + workflow.workflow_id, + workflow.run_id, + query_params=query_params, + ), + type=_LinkType.WORKFLOW.value, ) -def nexus_link_to_workflow_event( - link: nexusrpc.Link, -) -> temporalio.api.common.v1.Link.WorkflowEvent | None: - """Convert a nexus link into a WorkflowEvent link +def nexus_operation_to_nexus_link( + op_link: temporalio.api.common.v1.Link.NexusOperation, +) -> nexusrpc.Link: + """Convert a NexusOperation link into a nexusrpc link - This is used when propagating links from a Nexus start operation request to a - StartWorklow request. + Used when propagating links from a StartNexusOperation response to a Nexus start operation + response. """ + return nexusrpc.Link( + url=_build_link_url( + _LinkType.NEXUS_OPERATION, + op_link.namespace, + op_link.operation_id, + op_link.run_id, + ), + type=_LinkType.NEXUS_OPERATION.value, + ) + + +def activity_link_to_nexus_link( + activity: temporalio.api.common.v1.Link.Activity, +) -> nexusrpc.Link: + """Convert an Activity link into a nexusrpc link.""" + return nexusrpc.Link( + url=_build_link_url( + _LinkType.ACTIVITY, + activity.namespace, + activity.activity_id, + activity.run_id, + ), + type=_LinkType.ACTIVITY.value, + ) + + +def callback_link_to_nexus_link( + callback: temporalio.api.common.v1.Link.Callback, +) -> nexusrpc.Link | None: + """Convert a Callback link into a nexusrpc link. + + Returns None when the callback's execution type is unsupported. + """ + execution_type = _EXECUTION_TYPE_SEGMENTS.get(callback.execution.type) + if execution_type is None: + logger.warning( + f"Invalid Temporal callback link: unsupported execution type {callback.execution.type}" + ) + return None + segments = [ + callback.namespace, + execution_type, + callback.execution.business_id, + callback.execution.run_id, + "callbacks", + callback.request_id, + ] + path = "/namespaces/" + "/".join(urllib.parse.quote(s, safe="") for s in segments) + query_params = urllib.parse.urlencode( + [(LINK_COMPONENT_PATH_PARAM_NAME, p) for p in callback.component_path] + ) + return nexusrpc.Link( + url=_temporal_nexus_url(path, query_params=query_params), + type=_LinkType.CALLBACK.value, + ) + + +def _build_link_url( + link_type: _LinkType, + namespace: str, + id_value: str, + run_id: str, + *, + query_params: str | None = "", +) -> str: + """Build the URL for a link of the given type.""" + path = _LINK_PATHS[link_type] + segments = [ + "namespaces", + urllib.parse.quote(namespace, safe=""), + path.keyword, + urllib.parse.quote(id_value, safe=""), + urllib.parse.quote(run_id, safe=""), + ] + if path.tail: + segments.append(path.tail) + return _temporal_nexus_url("/" + "/".join(segments), query_params=query_params) + + +def _temporal_nexus_url(path: str, *, query_params: str | None = "") -> str: + # urllib will omit '//' from the url if netloc is empty so we add the scheme manually + return f"temporal://{urllib.parse.urlunparse(('', '', path, '', query_params or '', ''))}" + + +@dataclass(frozen=True) +class _ParsedLinkUrl: + namespace: str + id: str + run_id: str + query_params: dict[str, list[str]] + + +def _parse_temporal_url(link: nexusrpc.Link) -> urllib.parse.ParseResult | None: + """Return the parsed link URL, or None if it does not carry the temporal scheme.""" url = urllib.parse.urlparse(link.url) - match = _LINK_URL_PATH_REGEX.match(url.path) + if url.scheme != _URL_SCHEME: + logger.warning( + f"Invalid Nexus link: {link}. Expected scheme {_URL_SCHEME!r}, got {url.scheme!r}" + ) + return None + return url + + +def _parse_link_url(link: nexusrpc.Link, link_type: _LinkType) -> _ParsedLinkUrl | None: + """Return the parts of a link URL, or None if the URL is not a link of this type. + + The path is matched exactly, so the workflow and workflow-event shapes -- which differ only by + the trailing /history -- cannot be mistaken for one another. + """ + url = _parse_temporal_url(link) + if url is None: + return None + regex = _LINK_PATHS[link_type].regex + match = regex.match(url.path) if not match: logger.warning( - f"Invalid Nexus link: {link}. Expected path to match {_LINK_URL_PATH_REGEX.pattern}" + f"Invalid Nexus link: {link}. Expected path to match {regex.pattern}" ) return None - try: - query_params = urllib.parse.parse_qs(url.query) + return _ParsedLinkUrl( + namespace=urllib.parse.unquote(match.group("namespace")), + id=urllib.parse.unquote(match.group("id")), + run_id=urllib.parse.unquote(match.group("run_id")), + query_params=urllib.parse.parse_qs(url.query), + ) + +def _optional_single_query_param( + query_params: dict[str, list[str]], param_name: str +) -> str: + match query_params.get(param_name): + case [param]: + return param + case [] | None: + return "" + case _: + raise ValueError(f"Expected {param_name} to have at most 1 value") + + +def nexus_link_to_workflow_event_link( + link: nexusrpc.Link, +) -> temporalio.api.common.v1.Link | None: + """Convert a nexus link into a Temporal WorkflowEvent link + + This is used when propagating links from a Nexus start operation request to a + StartWorklow request. + """ + parsed = _parse_link_url(link, _LinkType.WORKFLOW_EVENT) + if parsed is None: + return None + query_params = parsed.query_params + try: request_id_ref = None event_ref = None match query_params.get(LINK_REFERENCE_TYPE_PARAM_NAME): @@ -120,31 +408,163 @@ def nexus_link_to_workflow_event( ) return None - groups = match.groupdict() - return temporalio.api.common.v1.Link.WorkflowEvent( - namespace=urllib.parse.unquote(groups["namespace"]), - workflow_id=urllib.parse.unquote(groups["workflow_id"]), - run_id=urllib.parse.unquote(groups["run_id"]), + workflow_event_link = temporalio.api.common.v1.Link.WorkflowEvent( + namespace=parsed.namespace, + workflow_id=parsed.id, + run_id=parsed.run_id, event_ref=event_ref, request_id_ref=request_id_ref, ) + return temporalio.api.common.v1.Link(workflow_event=workflow_event_link) -def _event_reference_to_query_params( - event_ref: temporalio.api.common.v1.Link.WorkflowEvent.EventReference, +def nexus_link_to_workflow_link( + link: nexusrpc.Link, +) -> temporalio.api.common.v1.Link | None: + """Convert a nexus link into a Temporal Workflow link.""" + parsed = _parse_link_url(link, _LinkType.WORKFLOW) + if parsed is None: + return None + try: + reason = _optional_single_query_param( + parsed.query_params, LINK_REASON_PARAM_NAME + ) + except ValueError as err: + logger.warning(f"Invalid Nexus link: {link}. {err}") + return None + + workflow_link = temporalio.api.common.v1.Link.Workflow( + namespace=parsed.namespace, + workflow_id=parsed.id, + run_id=parsed.run_id, + reason=reason, + ) + return temporalio.api.common.v1.Link(workflow=workflow_link) + + +def nexus_link_to_nexus_operation_link( + nexus_link: nexusrpc.Link, +) -> temporalio.api.common.v1.Link | None: + """Convert a nexus link into a Temporal NexusOperation link + + This is used when propagating links from a Nexus start operation request to a + StartNexusOperation request. + """ + parsed = _parse_link_url(nexus_link, _LinkType.NEXUS_OPERATION) + if parsed is None: + return None + return temporalio.api.common.v1.Link( + nexus_operation=temporalio.api.common.v1.Link.NexusOperation( + namespace=parsed.namespace, + operation_id=parsed.id, + run_id=parsed.run_id, + ) + ) + + +def nexus_link_to_activity_link( + nexus_link: nexusrpc.Link, +) -> temporalio.api.common.v1.Link | None: + """Convert a Nexus Activity link into a Temporal Activity link.""" + parsed = _parse_link_url(nexus_link, _LinkType.ACTIVITY) + if parsed is None: + return None + return temporalio.api.common.v1.Link( + activity=temporalio.api.common.v1.Link.Activity( + namespace=parsed.namespace, + activity_id=parsed.id, + run_id=parsed.run_id, + ) + ) + + +def nexus_link_to_callback_link( + nexus_link: nexusrpc.Link, +) -> temporalio.api.common.v1.Link | None: + """Convert a Nexus Callback link into a Temporal Callback link.""" + url = _parse_temporal_url(nexus_link) + if url is None: + return None + match = _CALLBACK_PATH_REGEX.match(url.path) + if not match: + logger.warning( + f"Invalid Nexus link: {nexus_link}. Expected path to match {_CALLBACK_PATH_REGEX.pattern}" + ) + return None + namespace, execution_type, business_id, run_id, request_id = ( + urllib.parse.unquote(g) for g in match.groups() + ) + execution_type_value = _SEGMENT_EXECUTION_TYPES.get(execution_type) + if execution_type_value is None: + logger.warning( + f"Invalid Nexus link: {nexus_link}. Unsupported execution type {execution_type!r}" + ) + return None + # parse_qs drops empty values by default, which would remove an empty component path segment + # and shift the ones after it. + query_params = urllib.parse.parse_qs(url.query, keep_blank_values=True) + return temporalio.api.common.v1.Link( + callback=temporalio.api.common.v1.Link.Callback( + namespace=namespace, + execution=temporalio.api.common.v1.Execution( + type=execution_type_value, + business_id=business_id, + run_id=run_id, + ), + component_path=query_params.get(LINK_COMPONENT_PATH_PARAM_NAME, []), + request_id=request_id, + ) + ) + + +def _event_type_to_param( + event_type: temporalio.api.enums.v1.EventType.ValueType, ) -> str: - event_type_name = temporalio.api.enums.v1.EventType.Name(event_ref.event_type) + """Render an event type as the short PascalCase name used on the wire.""" + event_type_name = temporalio.api.enums.v1.EventType.Name(event_type) if event_type_name.startswith("EVENT_TYPE_"): event_type_name = _event_type_constant_case_to_pascal_case( event_type_name.removeprefix("EVENT_TYPE_") ) - return urllib.parse.urlencode( - { - LINK_EVENT_ID_PARAM_NAME: event_ref.event_id, - LINK_EVENT_TYPE_PARAM_NAME: event_type_name, - LINK_REFERENCE_TYPE_PARAM_NAME: EVENT_REFERENCE_TYPE, - } - ) + return event_type_name + + +def _query_params_to_event_type( + query_params: dict[str, list[str]], +) -> temporalio.api.enums.v1.EventType.ValueType: + """Return the event type named in the query params, or raise ValueError. + + Both the prefixed proto name and the short PascalCase name are accepted, since either may + arrive on the wire. + """ + match query_params.get(LINK_EVENT_TYPE_PARAM_NAME): + case None: + raise ValueError(f"query params do not contain event type: {query_params}") + + case [raw_event_type_name] if raw_event_type_name.startswith("EVENT_TYPE_"): + event_type_name = raw_event_type_name + + case [raw_event_type_name] if re.match("[A-Z][a-z]", raw_event_type_name): + event_type_name = "EVENT_TYPE_" + _event_type_pascal_case_to_constant_case( + raw_event_type_name + ) + + case raw_event_type_name: + raise ValueError(f"Invalid event type name: {raw_event_type_name}") + return temporalio.api.enums.v1.EventType.Value(event_type_name) + + +def _event_reference_to_query_params( + event_ref: temporalio.api.common.v1.Link.WorkflowEvent.EventReference, +) -> str: + params: dict[str, object] = {} + # An unset event ID is 0, which is not a valid event ID, so omit the param rather than + # send a zero. + if event_ref.event_id: + params[LINK_EVENT_ID_PARAM_NAME] = event_ref.event_id + params[LINK_EVENT_TYPE_PARAM_NAME] = _event_type_to_param(event_ref.event_type) + params[LINK_REFERENCE_TYPE_PARAM_NAME] = EVENT_REFERENCE_TYPE + return urllib.parse.urlencode(params) def _request_id_reference_to_query_params( @@ -157,12 +577,7 @@ def _request_id_reference_to_query_params( if request_id_ref.request_id: params[LINK_REQUEST_ID_PARAM_NAME] = request_id_ref.request_id - event_type_name = temporalio.api.enums.v1.EventType.Name(request_id_ref.event_type) - if event_type_name.startswith("EVENT_TYPE_"): - event_type_name = _event_type_constant_case_to_pascal_case( - event_type_name.removeprefix("EVENT_TYPE_") - ) - params[LINK_EVENT_TYPE_PARAM_NAME] = event_type_name + params[LINK_EVENT_TYPE_PARAM_NAME] = _event_type_to_param(request_id_ref.event_type) return urllib.parse.urlencode(params) @@ -177,21 +592,7 @@ def _query_params_to_event_reference( f"Expected Nexus link URL query parameter referenceType to be EventReference but got: {reference_type}" ) - # event type - match query_params.get(LINK_EVENT_TYPE_PARAM_NAME): - case None: - raise ValueError(f"query params do not contain event type: {query_params}") - - case [raw_event_type_name] if raw_event_type_name.startswith("EVENT_TYPE_"): - event_type_name = raw_event_type_name - - case [raw_event_type_name] if re.match("[A-Z][a-z]", raw_event_type_name): - event_type_name = "EVENT_TYPE_" + _event_type_pascal_case_to_constant_case( - raw_event_type_name - ) - - case raw_event_type_name: - raise ValueError(f"Invalid event type name: {raw_event_type_name}") + event_type = _query_params_to_event_type(query_params) # event id event_id = 0 @@ -203,7 +604,7 @@ def _query_params_to_event_reference( raise ValueError(f"Query params contain invalid event id: {raw_event_id}") return temporalio.api.common.v1.Link.WorkflowEvent.EventReference( - event_type=temporalio.api.enums.v1.EventType.Value(event_type_name), + event_type=event_type, event_id=event_id, ) @@ -212,27 +613,12 @@ def _query_params_to_request_id_reference( query_params: dict[str, list[str]], ) -> temporalio.api.common.v1.Link.WorkflowEvent.RequestIdReference: """Return an EventReference from the query params or raise ValueError.""" - # event type - match query_params.get(LINK_EVENT_TYPE_PARAM_NAME): - case None: - raise ValueError(f"query params do not contain event type: {query_params}") - - case [raw_event_type_name] if raw_event_type_name.startswith("EVENT_TYPE_"): - event_type_name = raw_event_type_name - - case [raw_event_type_name] if re.match("[A-Z][a-z]", raw_event_type_name): - event_type_name = "EVENT_TYPE_" + _event_type_pascal_case_to_constant_case( - raw_event_type_name - ) - - case raw_event_type_name: - raise ValueError(f"Invalid event type name: {raw_event_type_name}") - + event_type = _query_params_to_event_type(query_params) [request_id] = query_params.get(LINK_REQUEST_ID_PARAM_NAME, [""]) return temporalio.api.common.v1.Link.WorkflowEvent.RequestIdReference( request_id=request_id, - event_type=temporalio.api.enums.v1.EventType.Value(event_type_name), + event_type=event_type, ) diff --git a/temporalio/nexus/_notification.py b/temporalio/nexus/_notification.py new file mode 100644 index 0000000000..31d954d8d2 --- /dev/null +++ b/temporalio/nexus/_notification.py @@ -0,0 +1,364 @@ +from __future__ import annotations + +import typing +from abc import ABC, abstractmethod +from collections.abc import Awaitable, Callable +from dataclasses import dataclass +from typing import Any, Generic, TypeVar, overload + +import nexusrpc + +import temporalio.api.common.v1 +import temporalio.common +import temporalio.converter + +from . import notifications +from ._operation_context import ( + TemporalStartOperationContext, + WorkflowRunOperationContext, +) +from ._temporal_client import TemporalNexusClient, TemporalOperationResult +from ._token import WorkflowHandle +from ._util import get_operation_factory + +OutputT = TypeVar("OutputT", contravariant=True) +HandlerOutputT = TypeVar("HandlerOutputT") +HandlerSourceContextT = TypeVar("HandlerSourceContextT") + + +class CompletionCallback(ABC, Generic[OutputT]): + """Callback that reports the outcome of a Nexus operation. + + The type parameter is the output type that the callback accepts. Create + callbacks with :py:func:`create_completion_callback`. Do not subclass this class. + + .. warning:: + This API is experimental and unstable. + """ + + @abstractmethod + async def _to_proto( + self, data_converter: temporalio.converter.DataConverter + ) -> temporalio.api.common.v1.Callback: + """Convert to proto representation.""" + ... + + +@dataclass(frozen=True, kw_only=True) +class _OnCompleteCallback(CompletionCallback[OutputT]): + """Callback that calls an on-complete operation.""" + + service: str + """Service name.""" + + operation: str + """Operation name.""" + + task_queue: str + """Task queue of the worker that runs the operation.""" + + source_context: Any + """Value that the operation receives with the outcome. + + The client encodes it with the serialization context of the source operation. + """ + + async def _to_proto( + self, data_converter: temporalio.converter.DataConverter + ) -> temporalio.api.common.v1.Callback: + """Convert to proto representation.""" + [payload] = await data_converter.encode([self.source_context]) + return temporalio.api.common.v1.Callback( + nexus_handler=temporalio.api.common.v1.Callback.NexusHandler( + service=self.service, + operation=self.operation, + task_queue_name=self.task_queue, + source_context=payload, + ) + ) + + +def _describe(obj: Any) -> str: + if isinstance(obj, nexusrpc.Operation): + return f"operation {obj.name!r}" + name = getattr(obj, "__qualname__", None) + return name if isinstance(name, str) else repr(obj) + + +def _check_on_complete_operation( + service: nexusrpc.ServiceDefinition, + operation: nexusrpc.OperationDefinition[Any, Any], +) -> None: + input_type = operation.input_type + if ( + not ( + input_type is notifications.OnCompleteRequest + or typing.get_origin(input_type) is notifications.OnCompleteRequest + ) + or operation.output_type is not notifications.OnCompleteResponse + ): + raise ValueError( + f"Operation {operation.name!r} of service {service.name!r} is not an " + "on-complete operation: expected input OnCompleteRequest and output " + f"OnCompleteResponse, got input {operation.input_type!r} and output " + f"{operation.output_type!r}" + ) + + +# Service and operation names. Without a handler signature the output type is +# unknown, so the callback accepts the output of any operation. +@overload +def create_completion_callback( + *, + service: str, + operation: str, + task_queue: str, + source_context: Any, +) -> CompletionCallback[Any]: ... + + +# Service definition operations. A handler that receives RawValue can accept the +# output of any operation. +@overload +def create_completion_callback( + *, + operation: nexusrpc.Operation[ + notifications.OnCompleteRequest[ + temporalio.common.RawValue, HandlerSourceContextT + ], + notifications.OnCompleteResponse, + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[Any]: ... + + +@overload +def create_completion_callback( + *, + operation: nexusrpc.Operation[ + notifications.OnCompleteRequest[HandlerOutputT, HandlerSourceContextT], + notifications.OnCompleteResponse, + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[HandlerOutputT]: ... + + +# @sync_operation handler methods defined with async def +@overload +def create_completion_callback( + *, + operation: Callable[ + [ + Any, + nexusrpc.handler.StartOperationContext, + notifications.OnCompleteRequest[ + temporalio.common.RawValue, HandlerSourceContextT + ], + ], + Awaitable[notifications.OnCompleteResponse], + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[Any]: ... + + +@overload +def create_completion_callback( + *, + operation: Callable[ + [ + Any, + nexusrpc.handler.StartOperationContext, + notifications.OnCompleteRequest[HandlerOutputT, HandlerSourceContextT], + ], + Awaitable[notifications.OnCompleteResponse], + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[HandlerOutputT]: ... + + +# @sync_operation handler methods defined with def +@overload +def create_completion_callback( + *, + operation: Callable[ + [ + Any, + nexusrpc.handler.StartOperationContext, + notifications.OnCompleteRequest[ + temporalio.common.RawValue, HandlerSourceContextT + ], + ], + notifications.OnCompleteResponse, + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[Any]: ... + + +@overload +def create_completion_callback( + *, + operation: Callable[ + [ + Any, + nexusrpc.handler.StartOperationContext, + notifications.OnCompleteRequest[HandlerOutputT, HandlerSourceContextT], + ], + notifications.OnCompleteResponse, + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[HandlerOutputT]: ... + + +# @workflow_run_operation handler methods +@overload +def create_completion_callback( + *, + operation: Callable[ + [ + Any, + WorkflowRunOperationContext, + notifications.OnCompleteRequest[ + temporalio.common.RawValue, HandlerSourceContextT + ], + ], + Awaitable[WorkflowHandle[notifications.OnCompleteResponse]], + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[Any]: ... + + +@overload +def create_completion_callback( + *, + operation: Callable[ + [ + Any, + WorkflowRunOperationContext, + notifications.OnCompleteRequest[HandlerOutputT, HandlerSourceContextT], + ], + Awaitable[WorkflowHandle[notifications.OnCompleteResponse]], + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[HandlerOutputT]: ... + + +# @temporal_operation handler methods +@overload +def create_completion_callback( + *, + operation: Callable[ + [ + Any, + TemporalStartOperationContext, + TemporalNexusClient, + notifications.OnCompleteRequest[ + temporalio.common.RawValue, HandlerSourceContextT + ], + ], + Awaitable[TemporalOperationResult[notifications.OnCompleteResponse]], + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[Any]: ... + + +@overload +def create_completion_callback( + *, + operation: Callable[ + [ + Any, + TemporalStartOperationContext, + TemporalNexusClient, + notifications.OnCompleteRequest[HandlerOutputT, HandlerSourceContextT], + ], + Awaitable[TemporalOperationResult[notifications.OnCompleteResponse]], + ], + task_queue: str, + source_context: HandlerSourceContextT, +) -> CompletionCallback[HandlerOutputT]: ... + + +def create_completion_callback( + *, + service: str | None = None, + operation: str | nexusrpc.Operation[Any, Any] | Callable[..., Any], + task_queue: str, + source_context: Any, +) -> CompletionCallback[Any]: + """Create a callback that reports the outcome of a standalone Nexus operation. + + When the operation finishes, the server calls an on-complete operation on a worker + for ``task_queue``. The call carries the result or the failure, and + ``source_context``. + + An on-complete operation takes + :py:class:`temporalio.nexus.notifications.OnCompleteRequest` and returns + :py:class:`temporalio.nexus.notifications.OnCompleteResponse`. The server can + deliver a callback more than once. Make the operation idempotent. + + .. warning:: + This API is experimental and unstable. + + Args: + service: Service name. Required if ``operation`` is a name. Otherwise, leave + it unset. + operation: Handler method, service definition operation, or operation name. + An operation name, or an operation that receives + :py:class:`temporalio.common.RawValue`, accepts any output. + task_queue: Task queue of the worker that runs the operation. + source_context: Value that the operation receives with the outcome. + + Returns: + Callback for the ``completion_callbacks`` argument of + :py:meth:`temporalio.client.NexusClient.start_operation`. + + Raises: + ValueError: If ``operation`` is not an on-complete operation of a Nexus + service, if ``service`` and an operation name are not given together, or + if either name is empty. + """ + if service is not None or isinstance(operation, str): + if not isinstance(service, str) or not isinstance(operation, str): + raise ValueError( + "Give a service name with an operation name. A handler method or a " + "service definition operation identifies its own service" + ) + if not service or not operation: + raise ValueError("Service and operation names must not be empty") + return _OnCompleteCallback( + service=service, + operation=operation, + task_queue=task_queue, + source_context=source_context, + ) + + op = ( + operation + if isinstance(operation, nexusrpc.Operation) + else get_operation_factory(operation)[1] + ) + if op is None: + raise ValueError(f"{_describe(operation)} is not a Nexus operation") + if op.service is None: + raise ValueError( + f"{_describe(operation)} is not an operation of a Nexus service. Use an " + "operation of a class decorated with @nexusrpc.service or " + "@nexusrpc.handler.service_handler" + ) + definition = op.service.operation_definitions[op.name] + _check_on_complete_operation(op.service, definition) + return _OnCompleteCallback( + service=op.service.name, + operation=definition.name, + task_queue=task_queue, + source_context=source_context, + ) diff --git a/temporalio/nexus/_operation_context.py b/temporalio/nexus/_operation_context.py index 335e709609..92c74ac308 100644 --- a/temporalio/nexus/_operation_context.py +++ b/temporalio/nexus/_operation_context.py @@ -10,7 +10,7 @@ MutableMapping, Sequence, ) -from contextlib import contextmanager +from contextlib import contextmanager, nullcontext from contextvars import ContextVar from dataclasses import dataclass from datetime import timedelta @@ -23,13 +23,16 @@ overload, ) +import nexusrpc from nexusrpc.handler import ( CancelOperationContext, OperationContext, StartOperationContext, ) +from typing_extensions import Self import temporalio.api.common.v1 +import temporalio.api.nexus.v1 import temporalio.api.workflowservice.v1 import temporalio.common from temporalio.types import ( @@ -42,11 +45,11 @@ ) from ._link_conversion import ( - nexus_link_to_workflow_event, - workflow_event_to_nexus_link, + nexus_link_to_temporal_link, + temporal_link_to_nexus_link, workflow_execution_started_event_link_from_workflow_handle, ) -from ._token import WorkflowHandle +from ._token import OperationToken, OperationTokenType, WorkflowHandle if TYPE_CHECKING: import temporalio.client @@ -63,12 +66,51 @@ ContextVar("temporal-cancel-operation-context") ) -# A Nexus start handler might start zero or more workflows as usual using a Temporal client. In -# addition, it may start one "nexus-backing" workflow, using -# WorkflowRunOperationContext.start_workflow. This context is active while the latter is being done. +# A Nexus start handler might start zero or more async Temporal actions as usual using a Temporal client. In +# addition, it may start one "nexus-backing" async Temporal action, using +# WorkflowRunOperationContext.start_workflow or methods from TemporalNexusClient. This context is active while the latter is being done. # It is thus a narrower context than _temporal_start_operation_context. -_temporal_nexus_backing_workflow_start_context: ContextVar[bool] = ContextVar( - "temporal-nexus-backing-workflow-start-context" +_temporal_nexus_backing_start_context: ContextVar[bool] = ContextVar( + "temporal-nexus-backing-start-context" +) + + +class _SignalSlot: + """Allows one in-flight or successful signal per Temporal operation handler invocation.""" + + def __init__(self) -> None: + self._taken = False + + @staticmethod + @contextmanager + def scope() -> Generator[None]: + token = _temporal_operation_signal_slot.set(_SignalSlot()) + try: + yield + finally: + _temporal_operation_signal_slot.reset(token) + + @contextmanager + def reserve(self) -> Generator[None]: + # Every signal from the handler carries the operation's request ID, so the server + # would deduplicate a second one against the first and report it delivered. + if self._taken: + raise nexusrpc.HandlerError( + "Only one signal can be sent per Temporal operation handler invocation", + type=nexusrpc.HandlerErrorType.BAD_REQUEST, + ) + self._taken = True + try: + yield + except BaseException: + self._taken = False + raise + + +# Set for the duration of a Temporal operation handler's start so its signals reuse the +# Nexus request ID and are not delivered twice when the Nexus task is retried. +_temporal_operation_signal_slot: ContextVar[_SignalSlot | None] = ContextVar( + "temporal-operation-signal-slot", default=None ) @@ -76,12 +118,15 @@ class Info: """Information about the running Nexus operation. - .. warning:: - This API is experimental and unstable. - Retrieved inside a Nexus operation handler via :py:func:`info`. """ + endpoint: str + """The endpoint this Nexus request was addressed to.""" + + namespace: str + """The namespace of the worker handling this Nexus operation.""" + task_queue: str """The task queue of the worker handling this Nexus operation.""" @@ -106,6 +151,44 @@ def metric_meter() -> temporalio.common.MetricMeter: return _temporal_context().metric_meter +def is_worker_shutdown() -> bool: + """Whether shutdown has been invoked on the worker. + + Returns: + True if shutdown has been called on the worker, False otherwise. + + Raises: + RuntimeError: When not in a Nexus operation. + """ + return _temporal_context()._worker_shutdown_event.is_set() + + +async def wait_for_worker_shutdown() -> None: + """Asynchronously wait for shutdown to be called on the worker. + + Raises: + RuntimeError: When not in a Nexus operation. + """ + await _temporal_context()._worker_shutdown_event.wait() + + +def wait_for_worker_shutdown_sync(timeout: timedelta | float | None = None) -> None: + """Synchronously block while waiting for shutdown to be called on the worker. + + This is essentially a wrapper around :py:meth:`threading.Event.wait`. + + Args: + timeout: Max amount of time to wait for shutdown to be called on the + worker. + + Raises: + RuntimeError: When not in a Nexus operation. + """ + _temporal_context()._worker_shutdown_event.wait_sync( + timeout.total_seconds() if isinstance(timeout, timedelta) else timeout + ) + + def _temporal_context() -> ( _TemporalStartOperationContext | _TemporalCancelOperationContext ): @@ -125,17 +208,41 @@ def _try_temporal_context() -> ( return start_ctx or cancel_ctx +def _try_start_operation_context() -> _TemporalStartOperationContext | None: # pyright: ignore[reportUnusedFunction] + """Return the active Nexus start-operation context, if any.""" + return _temporal_start_operation_context.get(None) + + +def _current_propagated_nexus_serialization_context() -> ( # pyright: ignore[reportUnusedFunction] + temporalio.api.nexus.v1.PropagatedSerializationContext | None +): + """The serialization context of the Nexus operation being handled, in the form sent with start + requests, or None outside a Nexus start operation handler. + + A workflow or standalone activity started by the handler returns its result and failure to the + Nexus caller, so the server propagates this context to the worker and to clients reading them. + """ + nexus_ctx = _try_start_operation_context() + if nexus_ctx is None: + return None + return temporalio.api.nexus.v1.PropagatedSerializationContext( + endpoint=nexus_ctx.info().endpoint, + service=nexus_ctx.nexus_context.service, + operation=nexus_ctx.nexus_context.operation, + ) + + @contextmanager -def _nexus_backing_workflow_start_context() -> Generator[None]: - token = _temporal_nexus_backing_workflow_start_context.set(True) +def _nexus_backing_start_context() -> Generator[None]: + token = _temporal_nexus_backing_start_context.set(True) try: yield finally: - _temporal_nexus_backing_workflow_start_context.reset(token) + _temporal_nexus_backing_start_context.reset(token) -def _in_nexus_backing_workflow_start_context() -> bool: - return _temporal_nexus_backing_workflow_start_context.get(False) +def _in_nexus_backing_start_context() -> bool: # type:ignore[reportUnusedClass] + return _temporal_nexus_backing_start_context.get(False) _OperationCtxT = TypeVar("_OperationCtxT", bound=OperationContext) @@ -153,6 +260,7 @@ class _TemporalOperationCtx(Generic[_OperationCtxT]): """Nexus-specific start operation context.""" _runtime_metric_meter: temporalio.common.MetricMeter + _worker_shutdown_event: temporalio.common._CompositeEvent _metric_meter: temporalio.common.MetricMeter | None = None @property @@ -182,67 +290,91 @@ def get(cls) -> _TemporalStartOperationContext: def set(self) -> None: _temporal_start_operation_context.set(self) - def _get_callbacks( - self, - ) -> list[temporalio.client.Callback]: + def _get_callbacks(self, token: str) -> list[temporalio.client.Callback]: ctx = self.nexus_context + callback_headers = {**ctx.callback_headers, "nexus-operation-token": token} return ( [ NexusCallback( url=ctx.callback_url, - headers=ctx.callback_headers, + headers=callback_headers, ) ] if ctx.callback_url else [] ) - def _get_workflow_event_links( - self, - ) -> list[temporalio.api.common.v1.Link.WorkflowEvent]: - event_links = [] + def _get_request_links(self) -> list[temporalio.api.common.v1.Link]: + """Request links to attach to RPCs the operation handler issues. + + These are the inbound Nexus task links. When the operation handler signals, + signal-with-starts, or starts a workflow, these links are added to the request's + ``links`` field so the callee's history event links back to whatever scheduled this + Nexus operation. + """ + links: list[temporalio.api.common.v1.Link] = [] for inbound_link in self.nexus_context.inbound_links: - if link := nexus_link_to_workflow_event(inbound_link): - event_links.append(link) - return event_links + if link := nexus_link_to_temporal_link(inbound_link): + links.append(link) + return links - def _add_outbound_links( + def _add_start_workflow_response_link( self, workflow_handle: temporalio.client.WorkflowHandle[Any, Any] ): - # If links were not sent in StartWorkflowExecutionResponse then construct them. - wf_event_links: list[temporalio.api.common.v1.Link.WorkflowEvent] = [] - try: - if isinstance( - workflow_handle._start_workflow_response, - temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse, - ): - if workflow_handle._start_workflow_response.HasField("link"): - if link := workflow_handle._start_workflow_response.link: - if link.HasField("workflow_event"): - wf_event_links.append(link.workflow_event) - if not wf_event_links: - wf_event_links = [ - workflow_execution_started_event_link_from_workflow_handle( + response = workflow_handle._start_workflow_response + + nexus_link: nexusrpc.Link | None = None + if isinstance( + response, temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse + ): + if response.HasField("link"): + nexus_link = temporal_link_to_nexus_link(response.link) + else: + # If a link was not sent in response then construct it. + link = temporalio.api.common.v1.Link( + workflow_event=workflow_execution_started_event_link_from_workflow_handle( workflow_handle, self.nexus_context.request_id, ) - ] - self.nexus_context.outbound_links.extend( - workflow_event_to_nexus_link(link) for link in wf_event_links - ) + ) + nexus_link = temporal_link_to_nexus_link(link) + + elif isinstance( + response, + temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse, + ): + # Server >= 1.31 with EnableCHASMSignalBacklinks returns signal_link pointing at + # the WorkflowExecutionSignaled event; older servers leave it unset. + if response.HasField("signal_link"): + nexus_link = temporal_link_to_nexus_link(response.signal_link) + + try: + if nexus_link is not None: + self.nexus_context.outbound_links.append(nexus_link) except Exception as e: logger.warning( - f"Failed to create WorkflowExecutionStarted event links for workflow {workflow_handle}: {e}" + f"Failed to create event links for workflow {workflow_handle}: {e}" ) - return workflow_handle + def _add_response_link(self, link: temporalio.api.common.v1.Link | None) -> None: + """Append a response link returned by an RPC the operation handler issued. -class WorkflowRunOperationContext(StartOperationContext): - """Context received by a workflow run operation. + ``link`` is the ``common.v1.Link`` returned by a Temporal RPC (or ``None`` against a + server that did not return one). When present, it is converted to a Nexus link and added + to the operation's outbound links. - .. warning:: - This API is experimental and unstable. - """ + This is only safe to call from the single thread/task that runs the operation handler. + """ + if link is not None: + try: + if response_link := temporal_link_to_nexus_link(link): + self.nexus_context.outbound_links.append(response_link) + except Exception as e: + logger.warning(f"Failed to create Nexus link from Temporal link: {e}") + + +class WorkflowRunOperationContext(StartOperationContext): + """Context received by a workflow run operation.""" def __init__(self, *args: Any, **kwargs: Any) -> None: """Initialize the workflow run operation context.""" @@ -454,59 +586,39 @@ async def start_workflow( Nexus caller is itself a workflow, this means that the workflow in the caller namespace web UI will contain links to the started workflow, and vice versa. """ - # We must pass nexus_completion_callbacks, workflow_event_links, and request_id, - # but these are deliberately not exposed in overloads, hence the type-check - # violation. - - # Here we are starting a "nexus-backing" workflow. That means that the StartWorkflow request - # contains nexus-specific data such as a completion callback (used by the handler server - # namespace to deliver the result to the caller namespace when the workflow reaches a - # terminal state) and inbound links to the caller workflow (attached to history events of - # the workflow started in the handler namespace, and displayed in the UI). - with _nexus_backing_workflow_start_context(): - wf_handle = await self._temporal_context.client.start_workflow( # type: ignore - workflow=workflow, - arg=arg, - args=args, - id=id, - task_queue=task_queue or self._temporal_context.info().task_queue, - result_type=result_type, - execution_timeout=execution_timeout, - run_timeout=run_timeout, - task_timeout=task_timeout, - id_reuse_policy=id_reuse_policy, - id_conflict_policy=id_conflict_policy, - retry_policy=retry_policy, - cron_schedule=cron_schedule, - memo=memo, - search_attributes=search_attributes, - static_summary=static_summary, - static_details=static_details, - start_delay=start_delay, - start_signal=start_signal, - start_signal_args=start_signal_args, - rpc_metadata=rpc_metadata, - rpc_timeout=rpc_timeout, - request_eager_start=request_eager_start, - priority=priority, - versioning_override=versioning_override, - callbacks=self._temporal_context._get_callbacks(), - workflow_event_links=self._temporal_context._get_workflow_event_links(), - request_id=self._temporal_context.nexus_context.request_id, - ) - - self._temporal_context._add_outbound_links(wf_handle) - - return WorkflowHandle[ReturnType]._unsafe_from_client_workflow_handle(wf_handle) + return await _start_nexus_backing_workflow( + temporal_context=self._temporal_context, + workflow=workflow, + arg=arg, + args=args, + id=id, + task_queue=task_queue, + result_type=result_type, + execution_timeout=execution_timeout, + run_timeout=run_timeout, + task_timeout=task_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + cron_schedule=cron_schedule, + memo=memo, + search_attributes=search_attributes, + static_summary=static_summary, + static_details=static_details, + start_delay=start_delay, + start_signal=start_signal, + start_signal_args=start_signal_args, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + request_eager_start=request_eager_start, + priority=priority, + versioning_override=versioning_override, + ) @dataclass(frozen=True) class NexusCallback: - """Nexus callback to attach to events such as workflow completion. - - .. warning:: - This API is experimental and unstable. - """ + """Nexus callback to attach to events such as workflow completion.""" url: str """Callback URL.""" @@ -530,6 +642,34 @@ def set(self) -> None: _temporal_cancel_operation_context.set(self) +class TemporalStartOperationContext(StartOperationContext): + """Context received by a Temporal Nexus operation when it is started. + + .. warning:: + This API is experimental and unstable. + """ + + @classmethod + def _from_start_operation_context(cls, ctx: StartOperationContext) -> Self: + return cls( + **{f.name: getattr(ctx, f.name) for f in dataclasses.fields(ctx)}, + ) + + +class TemporalCancelOperationContext(CancelOperationContext): + """Context received by a Temporal Nexus operation when it is canceled. + + .. warning:: + This API is experimental and unstable. + """ + + @classmethod + def _from_cancel_operation_context(cls, ctx: CancelOperationContext) -> Self: + return cls( + **{f.name: getattr(ctx, f.name) for f in dataclasses.fields(ctx)}, + ) + + class LoggerAdapter(logging.LoggerAdapter): """Logger adapter that adds Nexus operation context information.""" @@ -552,3 +692,347 @@ def process( logger = LoggerAdapter(logging.getLogger("temporalio.nexus"), None) """Logger that emits additional data describing the current Nexus operation.""" + + +async def _start_nexus_backing_workflow( + temporal_context: _TemporalStartOperationContext, + workflow: str | Callable[..., Awaitable[ReturnType]], + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str | None = None, + result_type: type | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> WorkflowHandle[ReturnType]: + # Here we are starting a "nexus-backing" workflow. That means that the StartWorkflow request + # contains nexus-specific data such as a completion callback (used by the handler server + # namespace to deliver the result to the caller namespace when the workflow reaches a + # terminal state) and inbound links to the caller workflow (attached to history events of + # the workflow started in the handler namespace, and displayed in the UI). + with _nexus_backing_start_context(): + wf_handle = await temporal_context.client.start_workflow( + workflow=workflow, # type: ignore + arg=arg, + args=args, + id=id, + task_queue=task_queue or temporal_context.info().task_queue, + result_type=result_type, + execution_timeout=execution_timeout, + run_timeout=run_timeout, + task_timeout=task_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + cron_schedule=cron_schedule, + memo=memo, + search_attributes=search_attributes, + static_summary=static_summary, + static_details=static_details, + start_delay=start_delay, + start_signal=start_signal, + start_signal_args=start_signal_args, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + request_eager_start=request_eager_start, + priority=priority, + versioning_override=versioning_override, + ) + + return WorkflowHandle[ReturnType]._unsafe_from_client_workflow_handle(wf_handle) + + +async def _start_nexus_operation_workflow_update( # pyright: ignore[reportUnusedFunction] + *, + temporal_context: _TemporalStartOperationContext, + workflow_id: str, + update: str | Callable, + arg: Any = temporalio.common._arg_unset, + args: Sequence[Any] = [], + wait_for_stage: temporalio.client.WorkflowUpdateStage, + update_id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + run_id: str | None = None, + first_execution_run_id: str | None = None, +) -> temporalio.client.WorkflowUpdateHandle[Any]: + if wait_for_stage != temporalio.client.WorkflowUpdateStage.ACCEPTED: + raise ValueError("Only ACCEPTED wait stage is supported") + # Default update ID to the Nexus request ID for retry-safety (matches sdk-go). + update_id = update_id or temporal_context.nexus_context.request_id + workflow_handle = temporal_context.client.get_workflow_handle( + workflow_id, run_id=run_id, first_execution_run_id=first_execution_run_id + ) + with _nexus_backing_start_context(): + return await workflow_handle._start_update( + update, + arg, + args=args, + wait_for_stage=wait_for_stage, + id=update_id, + result_type=result_type, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + +def _apply_nexus_context_to_start_workflow_update_request( # pyright: ignore[reportUnusedFunction] + req: temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest, +) -> None: + """Apply the current Nexus operation context to a Workflow Update request. + + This is a no-op unless the update is backing the current Nexus operation. + """ + nexus_ctx = _try_start_operation_context() + if nexus_ctx is None: + return + _apply_nexus_serialization_context_to_workflow_update_request(req) + if _in_nexus_backing_start_context(): + request_links = nexus_ctx._get_request_links() + req.request.request_id = nexus_ctx.nexus_context.request_id + req.request.links.extend(request_links) + callbacks = nexus_ctx._get_callbacks( + OperationToken( + type=OperationTokenType.UPDATE_WORKFLOW, + namespace=nexus_ctx.client.namespace, + workflow_id=req.workflow_execution.workflow_id, + update_id=req.request.meta.update_id, + run_id=req.workflow_execution.run_id or None, + ).encode() + ) + req.request.completion_callbacks.extend( + temporalio.api.common.v1.Callback( + nexus=temporalio.api.common.v1.Callback.Nexus( + url=callback.url, + header=callback.headers, + ), + links=request_links, + ) + for callback in callbacks + ) + + +def _apply_nexus_serialization_context_to_workflow_update_request( # pyright: ignore[reportUnusedFunction] + req: temporalio.api.workflowservice.v1.UpdateWorkflowExecutionRequest, +) -> None: + """Send the current Nexus operation's serialization context with a Workflow Update request. + + This is a no-op outside a Nexus operation context. + """ + context = _current_propagated_nexus_serialization_context() + if context is not None: + req.request.propagated_nexus_serialization_context.CopyFrom(context) + + +def _apply_start_workflow_update_response_to_nexus_context( # pyright: ignore[reportUnusedFunction] + resp: temporalio.api.workflowservice.v1.UpdateWorkflowExecutionResponse, +) -> None: + nexus_ctx = _try_start_operation_context() + if nexus_ctx is not None and resp.HasField("link"): + nexus_ctx._add_response_link(resp.link) + + +def _apply_query_workflow_response_to_nexus_context( # pyright: ignore[reportUnusedFunction] + resp: temporalio.api.workflowservice.v1.QueryWorkflowResponse, +) -> None: + """Apply a workflow query response link to the current Nexus context.""" + nexus_ctx = _try_start_operation_context() + if nexus_ctx is not None and resp.HasField("link"): + nexus_ctx._add_response_link(resp.link) + + +@contextmanager +def _signal_request_nexus_context( # pyright: ignore[reportUnusedFunction] + req: ( + temporalio.api.workflowservice.v1.SignalWorkflowExecutionRequest + | temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest + ), +) -> Generator[None]: + """Apply the current Nexus operation context to a signal or signal-with-start RPC. + + Inside a Temporal operation handler, the request reuses the Nexus request ID and takes + the invocation's only signal, which is released if the RPC fails. + """ + nexus_ctx = _try_start_operation_context() + is_backing_start = ( + isinstance( + req, + temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest, + ) + and _in_nexus_backing_start_context() + ) + + slot = None + if nexus_ctx is not None and not is_backing_start: + req.links.extend(nexus_ctx._get_request_links()) + slot = _temporal_operation_signal_slot.get() + if slot is not None: + req.request_id = nexus_ctx.nexus_context.request_id + + with slot.reserve() if slot is not None else nullcontext(): + yield + + +def _apply_signal_workflow_response_to_nexus_context( # pyright: ignore[reportUnusedFunction] + resp: temporalio.api.workflowservice.v1.SignalWorkflowExecutionResponse, +) -> None: + """Apply a workflow signal response link to the current Nexus context.""" + nexus_ctx = _try_start_operation_context() + if nexus_ctx is not None and resp.HasField("link"): + nexus_ctx._add_response_link(resp.link) + + +def _apply_nexus_context_to_start_workflow_request( # pyright: ignore[reportUnusedFunction] + req: temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest, +) -> None: + """Apply the current Nexus operation context to a workflow start request. + + This is a no-op outside a Nexus operation context. Within one, it sends the + operation's serialization context, attaches inbound links and configures + conflict handling to preserve Nexus metadata. The Nexus request ID and completion callbacks are added only when the + workflow is backing the Nexus operation. on_conflict_options is populated + only when there are links or callbacks to attach. + """ + nexus_ctx = _try_start_operation_context() + if nexus_ctx is not None: + _apply_nexus_serialization_context_to_start_workflow_request(req) + request_links = nexus_ctx._get_request_links() + + # Links are duplicated on request for compatibility with older server versions. + req.links.extend(request_links) + + callbacks: list[NexusCallback] = [] + if _in_nexus_backing_start_context(): + req.request_id = nexus_ctx.nexus_context.request_id + callbacks = nexus_ctx._get_callbacks( + OperationToken( + type=OperationTokenType.WORKFLOW, + namespace=nexus_ctx.client.namespace, + workflow_id=req.workflow_id, + ).encode() + ) + req.completion_callbacks.extend( + temporalio.api.common.v1.Callback( + nexus=temporalio.api.common.v1.Callback.Nexus( + url=callback.url, + header=callback.headers, + ), + links=request_links, + ) + for callback in callbacks + ) + + if request_links or callbacks: + req.on_conflict_options.attach_request_id = True + req.on_conflict_options.attach_completion_callbacks = True + req.on_conflict_options.attach_links = True + + +def _apply_nexus_serialization_context_to_start_workflow_request( # pyright: ignore[reportUnusedFunction] + req: temporalio.api.workflowservice.v1.StartWorkflowExecutionRequest, +) -> None: + """Send the current Nexus operation's serialization context with a workflow start request. + + This is a no-op outside a Nexus operation context. + """ + context = _current_propagated_nexus_serialization_context() + if context is not None: + req.propagated_nexus_serialization_context.CopyFrom(context) + + +def _apply_start_workflow_response_to_nexus_context( # pyright: ignore[reportUnusedFunction] + workflow_handle: temporalio.client.WorkflowHandle[Any, Any], +) -> None: + nexus_ctx = _try_start_operation_context() + if nexus_ctx is not None: + nexus_ctx._add_start_workflow_response_link(workflow_handle) + + +def _apply_nexus_context_to_start_activity_request( # pyright: ignore[reportUnusedFunction] + req: temporalio.api.workflowservice.v1.StartActivityExecutionRequest, +) -> None: + """Apply the current Nexus operation context to an activity start request. + + This is a no-op outside a Nexus operation context. Within one, it attaches + the Nexus request ID and the operation's serialization context and + configures conflict handling to preserve the Nexus metadata. Inbound links + are attached to the completion callback when the activity backs the + operation and has a callback, and to the request otherwise. + on_conflict_options is populated only when there are links or callbacks to + attach. + """ + nexus_ctx = _try_start_operation_context() + if nexus_ctx is not None: + req.request_id = nexus_ctx.nexus_context.request_id + context = _current_propagated_nexus_serialization_context() + if context is not None: + req.propagated_nexus_serialization_context.CopyFrom(context) + request_links = nexus_ctx._get_request_links() + + callbacks: list[NexusCallback] = [] + if _in_nexus_backing_start_context(): + callbacks = nexus_ctx._get_callbacks( + OperationToken( + type=OperationTokenType.ACTIVITY, + namespace=nexus_ctx.client.namespace, + activity_id=req.activity_id, + ).encode() + ) + req.completion_callbacks.extend( + temporalio.api.common.v1.Callback( + nexus=temporalio.api.common.v1.Callback.Nexus( + url=callback.url, + header=callback.headers, + ), + links=request_links, + ) + for callback in callbacks + ) + if not callbacks: + req.links.extend(request_links) + + if request_links or callbacks: + req.on_conflict_options.attach_request_id = True + req.on_conflict_options.attach_completion_callbacks = True + req.on_conflict_options.attach_links = True + + +def _apply_start_activity_response_to_nexus_context( # pyright: ignore[reportUnusedFunction] + activity_id: str, + resp: temporalio.api.workflowservice.v1.StartActivityExecutionResponse, +): + nexus_ctx = _try_start_operation_context() + if nexus_ctx is not None: + if resp.HasField("link"): + response_link = resp.link + else: + response_link = temporalio.api.common.v1.Link( + activity=temporalio.api.common.v1.Link.Activity( + namespace=nexus_ctx.client.namespace, + activity_id=activity_id, + run_id=resp.run_id, + ) + ) + nexus_ctx._add_response_link(response_link) diff --git a/temporalio/nexus/_operation_handlers.py b/temporalio/nexus/_operation_handlers.py index 68035ca41f..b51507f71f 100644 --- a/temporalio/nexus/_operation_handlers.py +++ b/temporalio/nexus/_operation_handlers.py @@ -1,9 +1,9 @@ from __future__ import annotations +from abc import ABC, abstractmethod from collections.abc import Awaitable, Callable -from typing import ( - Any, -) +from dataclasses import dataclass +from typing import Any from nexusrpc import ( HandlerError, @@ -16,12 +16,22 @@ OperationHandler, StartOperationContext, StartOperationResultAsync, + StartOperationResultSync, ) +import temporalio.nexus from temporalio.nexus._operation_context import ( + TemporalCancelOperationContext, + TemporalStartOperationContext, + _SignalSlot, _temporal_cancel_operation_context, ) -from temporalio.nexus._token import WorkflowHandle +from temporalio.nexus._temporal_client import ( + TemporalNexusClient, + TemporalOperationResult, + _TemporalNexusClient, +) +from temporalio.nexus._token import OperationToken, OperationTokenType, WorkflowHandle from ._util import ( is_async_callable, @@ -112,3 +122,180 @@ async def _cancel_workflow( type=HandlerErrorType.NOT_FOUND, ) from err await client_workflow_handle.cancel(**kwargs) + + +@dataclass(frozen=True) +class CancelWorkflowRunOptions: + """Options for cancelling the workflow backing a Nexus operation. + + These options are built by :py:class:`TemporalOperationHandler` and passed to + :py:meth:`TemporalOperationHandler.cancel_workflow_run`. + + .. warning:: + This API is experimental and unstable. + """ + + workflow_id: str + """The ID of the workflow to cancel.""" + + +@dataclass(frozen=True) +class CancelUpdateWorkflowOptions: + """Options for cancelling the workflow update backing a Nexus operation. + + These options are built by :py:class:`TemporalOperationHandler` and passed to + :py:meth:`TemporalOperationHandler.cancel_workflow_update`. + + .. warning:: + This API is experimental and unstable. + """ + + workflow_id: str + """The ID of the workflow where the update is running.""" + update_id: str + """The ID of the update to cancel.""" + run_id: str + """The workflow runID that accepted the update.""" + + +@dataclass(frozen=True) +class CancelActivityOptions: + """Options for cancelling the activity backing a Nexus operation.""" + + activity_id: str + """The activity ID to cancel.""" + run_id: str + """The run ID of the activity to cancel.""" + + +class TemporalOperationHandler(OperationHandler[InputT, OutputT], ABC): + """Operation handler for Nexus operations that interact with Temporal. + Implementations override the start_operation method. + + Signals sent during the start reuse the Nexus request ID, so retried Nexus tasks don't + deliver them twice. Only one signal (including signal-with-start) may be sent per start; + another raises a ``BAD_REQUEST`` :py:class:`nexusrpc.HandlerError` unless the first failed. + + .. warning:: + This API is experimental and unstable. + """ + + @abstractmethod + async def start_operation( + self, + ctx: TemporalStartOperationContext, + client: TemporalNexusClient, + input: InputT, + ) -> TemporalOperationResult[OutputT]: + """Start the Temporal-backed Nexus operation.""" + ... + + async def start( + self, ctx: StartOperationContext, input: InputT + ) -> StartOperationResultSync[OutputT] | StartOperationResultAsync: + """Start the Nexus operation using a Nexus-aware Temporal client. + + .. warning:: + This API is experimental and unstable. + """ + nexus_client = _TemporalNexusClient() + start_ctx = TemporalStartOperationContext._from_start_operation_context(ctx) + with _SignalSlot.scope(): + result = await self.start_operation(start_ctx, nexus_client, input) + return result._to_nexus_result() + + async def cancel(self, ctx: CancelOperationContext, token: str) -> None: + """Cancel a Nexus operation using its operation token. + + .. warning:: + This API is experimental and unstable. + """ + try: + operation_token = OperationToken.decode(token) + except Exception as err: + raise HandlerError( + "Unable to decode operation token to cancel", + type=HandlerErrorType.INTERNAL, + retryable_override=False, + ) from err + + cancel_ctx = TemporalCancelOperationContext._from_cancel_operation_context(ctx) + match operation_token.type: + case OperationTokenType.WORKFLOW: + assert operation_token.workflow_id is not None + options = CancelWorkflowRunOptions( + workflow_id=operation_token.workflow_id + ) + await self.cancel_workflow_run(cancel_ctx, options) + case OperationTokenType.UPDATE_WORKFLOW: + assert operation_token.workflow_id is not None + assert operation_token.update_id is not None + assert operation_token.run_id is not None + cancel_options = CancelUpdateWorkflowOptions( + workflow_id=operation_token.workflow_id, + update_id=operation_token.update_id, + run_id=operation_token.run_id, + ) + await self.cancel_workflow_update(cancel_ctx, cancel_options) + case OperationTokenType.ACTIVITY: + assert operation_token.activity_id is not None + if not operation_token.run_id: + raise HandlerError( + "Expected operation token of type ACTIVITY to have a valid run id.", + type=HandlerErrorType.INTERNAL, + retryable_override=False, + ) + + await self.cancel_activity( + cancel_ctx, + CancelActivityOptions( + activity_id=operation_token.activity_id, + run_id=operation_token.run_id, + ), + ) + + async def cancel_workflow_run( + self, + ctx: TemporalCancelOperationContext, # pyright: ignore[reportUnusedParameter] + options: CancelWorkflowRunOptions, + ) -> None: + """Cancels the workflow backing the Nexus operation. + + .. warning:: + This API is experimental and unstable. + """ + workflow_handle = temporalio.nexus.client().get_workflow_handle( + options.workflow_id + ) + await workflow_handle.cancel() + + async def cancel_workflow_update( + self, + ctx: TemporalCancelOperationContext, # pyright: ignore[reportUnusedParameter] + options: CancelUpdateWorkflowOptions, # pyright: ignore[reportUnusedParameter] + ) -> None: + """Cancels the Workflow Update triggered by the Nexus operation. There is no native way to cancel an accepted Update, so cancellation depends on the Update handler itself. + Override this method and coordinate with the specific Update handler to trigger a cancellation. + + + .. warning:: + This API is experimental and unstable. + """ + raise HandlerError( + """ + There is no native way to cancel an accepted Update, so cancellation depends on the Update handler itself. + Override this method and coordinate with the specific Update handler to trigger a cancellation. + """, + type=HandlerErrorType.NOT_IMPLEMENTED, + ) + + async def cancel_activity( + self, + ctx: TemporalCancelOperationContext, # pyright: ignore[reportUnusedParameter] + options: CancelActivityOptions, + ) -> None: + """Requests cancellation of the standalone activity backing the operation.""" + activity_handle = temporalio.nexus.client().get_activity_handle( + options.activity_id, run_id=options.run_id + ) + await activity_handle.cancel() diff --git a/temporalio/nexus/_temporal_client.py b/temporalio/nexus/_temporal_client.py new file mode 100644 index 0000000000..4fd34d9394 --- /dev/null +++ b/temporalio/nexus/_temporal_client.py @@ -0,0 +1,802 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections.abc import Awaitable, Callable, Iterator, Mapping, Sequence +from contextlib import contextmanager +from dataclasses import dataclass +from datetime import timedelta +from typing import ( + TYPE_CHECKING, + Any, + Concatenate, + Generic, + Literal, + TypeVar, + cast, + overload, +) + +from nexusrpc import HandlerError, HandlerErrorType, OperationError, OperationErrorState +from nexusrpc.handler import StartOperationResultAsync, StartOperationResultSync +from typing_extensions import Self + +import temporalio.common +from temporalio.nexus._operation_context import ( + _nexus_backing_start_context, + _start_nexus_backing_workflow, + _start_nexus_operation_workflow_update, + _TemporalStartOperationContext, +) +from temporalio.nexus._token import OperationToken, OperationTokenType +from temporalio.types import ( + CallableAsyncNoParam, + CallableAsyncSingleParam, + CallableSyncNoParam, + CallableSyncSingleParam, + MethodAsyncNoParam, + MethodAsyncSingleParam, + MultiParamSpec, + ParamType, + ReturnType, + SelfType, +) + +if TYPE_CHECKING: + import temporalio.client + import temporalio.workflow + + +_ResultT = TypeVar("_ResultT") + + +@dataclass(frozen=True) +class TemporalOperationResult(Generic[_ResultT]): + """Unified result: sync value or async token. + + .. warning:: + This API is experimental and unstable. + """ + + value: _ResultT | object = temporalio.common._arg_unset + token: str | None = None + + def __post_init__(self) -> None: + """Validate that the result represents exactly one completion mode.""" + has_value = self.value is not temporalio.common._arg_unset + has_token = self.token is not None + if has_value == has_token: + raise ValueError( + "TemporalOperationResult must have exactly one of value or token set." + ) + if has_token and (not isinstance(self.token, str) or not self.token): + raise ValueError( + "TemporalOperationResult token must be a non-empty string." + ) + + @classmethod + def sync(cls, value: _ResultT) -> Self: + """Create a result that completes the Nexus operation synchronously.""" + return cls(value=value) + + @classmethod + def async_token(cls, token: str) -> Self: + """Create a result that completes the Nexus operation asynchronously.""" + return cls(token=token) + + def _to_nexus_result( + self, + ) -> StartOperationResultSync[_ResultT] | StartOperationResultAsync: + if self.token is not None: + return StartOperationResultAsync(self.token) + elif self.value is not temporalio.common._arg_unset: + return StartOperationResultSync(cast(_ResultT, self.value)) + else: + raise RuntimeError( + "Invalid TemporalOperationResult. Neither token nor value are set." + ) + + +class TemporalNexusClient(ABC): + """Nexus-aware wrapper around a Temporal Client. + + .. warning:: + This API is experimental and unstable. + """ + + @property + @abstractmethod + def client(self) -> temporalio.client.Client: + """The underlying Temporal Client + + .. warning:: + This API is experimental and unstable. + """ + ... + + # Overload for no-param workflow + @overload + async def start_workflow( + self, + workflow: MethodAsyncNoParam[SelfType, ReturnType], + *, + id: str, + task_queue: str | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # Overload for single-param workflow + @overload + async def start_workflow( + self, + workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # Overload for multi-param workflow + @overload + async def start_workflow( + self, + workflow: Callable[ + Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType] + ], + *, + args: Sequence[Any], + id: str, + task_queue: str | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # Overload for string-name workflow + @overload + async def start_workflow( + self, + workflow: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str | None = None, + result_type: type[ReturnType] | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + @abstractmethod + async def start_workflow( + self, + workflow: str | Callable[..., Awaitable[ReturnType]], + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str | None = None, + result_type: type | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> TemporalOperationResult[ReturnType]: + """Start a workflow as the backing asynchronous Nexus operation. + + .. warning:: + This API is experimental and unstable. + """ + ... + + # Overload for no-param update + @overload + async def start_workflow_update( + self, + workflow_id: str, + update: temporalio.workflow.UpdateMethodMultiParam[[Any], ReturnType], + *, + wait_for_stage: Literal[temporalio.client.WorkflowUpdateStage.ACCEPTED], + update_id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + run_id: str | None = None, + first_execution_run_id: str | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # Overload for single-param update + @overload + async def start_workflow_update( + self, + workflow_id: str, + update: temporalio.workflow.UpdateMethodMultiParam[ + [Any, ParamType], ReturnType + ], + arg: ParamType, + *, + wait_for_stage: Literal[temporalio.client.WorkflowUpdateStage.ACCEPTED], + update_id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + run_id: str | None = None, + first_execution_run_id: str | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # Overload for multi-param update + @overload + async def start_workflow_update( + self, + workflow_id: str, + update: temporalio.workflow.UpdateMethodMultiParam[MultiParamSpec, ReturnType], + *, + args: MultiParamSpec.args, # type: ignore + wait_for_stage: Literal[temporalio.client.WorkflowUpdateStage.ACCEPTED], + update_id: str | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + run_id: str | None = None, + first_execution_run_id: str | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # Overload for string-name update + @overload + async def start_workflow_update( + self, + workflow_id: str, + update: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + wait_for_stage: Literal[temporalio.client.WorkflowUpdateStage.ACCEPTED], + update_id: str | None = None, + result_type: type[ReturnType] | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + run_id: str | None = None, + first_execution_run_id: str | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + @abstractmethod + async def start_workflow_update( + self, + workflow_id: str, + update: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + wait_for_stage: Literal[temporalio.client.WorkflowUpdateStage.ACCEPTED], + update_id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + run_id: str | None = None, + first_execution_run_id: str | None = None, + ) -> TemporalOperationResult[Any]: + """Start a Workflow Update-backed Nexus Operation. + + .. warning:: + This API is experimental and unstable. + """ + ... + + # async no-param activity + @overload + async def start_activity( + self, + activity: CallableAsyncNoParam[ReturnType], + *, + id: str, + task_queue: str | None = None, + schedule_to_start_timeout: timedelta | None = None, + schedule_to_close_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + start_delay: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # sync no-param activity + @overload + async def start_activity( + self, + activity: CallableSyncNoParam[ReturnType], + *, + id: str, + task_queue: str | None = None, + schedule_to_start_timeout: timedelta | None = None, + schedule_to_close_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + start_delay: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # async single-param activity + @overload + async def start_activity( + self, + activity: CallableAsyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str | None = None, + schedule_to_start_timeout: timedelta | None = None, + schedule_to_close_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + start_delay: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # sync single-param activity + @overload + async def start_activity( + self, + activity: CallableSyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + id: str, + task_queue: str | None = None, + schedule_to_start_timeout: timedelta | None = None, + schedule_to_close_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + start_delay: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # async multi-param activity + @overload + async def start_activity( + self, + activity: Callable[..., Awaitable[ReturnType]], + *, + args: Sequence[Any], + id: str, + task_queue: str | None = None, + schedule_to_start_timeout: timedelta | None = None, + schedule_to_close_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + start_delay: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # sync multi-param activity + @overload + async def start_activity( + self, + activity: Callable[..., ReturnType], + *, + args: Sequence[Any], + id: str, + task_queue: str | None = None, + schedule_to_start_timeout: timedelta | None = None, + schedule_to_close_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + start_delay: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + # string-name activity + @overload + async def start_activity( + self, + activity: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str | None = None, + result_type: type[ReturnType] | None = None, + schedule_to_start_timeout: timedelta | None = None, + schedule_to_close_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + start_delay: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> TemporalOperationResult[ReturnType]: ... + + @abstractmethod + async def start_activity( + self, + activity: ( + str | Callable[..., Awaitable[ReturnType]] | Callable[..., ReturnType] + ), + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str | None = None, + result_type: type | None = None, + schedule_to_start_timeout: timedelta | None = None, + schedule_to_close_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + start_delay: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> TemporalOperationResult[ReturnType]: + """Start a standalone activity that will deliver the Nexus operation result. + + If ``task_queue`` is not specified, the Nexus worker's task queue is used. + See :py:meth:`temporalio.client.Client.start_activity` for all other arguments. + """ + ... + + +class _TemporalNexusClient(TemporalNexusClient): # pyright: ignore[reportUnusedClass] + """Nexus-aware wrapper around a Temporal Client. + + .. warning:: + This API is experimental and unstable. + """ + + def __init__(self) -> None: + """Initialize the client wrapper from the active Nexus operation context.""" + self._temporal_context = _TemporalStartOperationContext.get() + self._started_async = False + + @property + def client(self) -> temporalio.client.Client: + """Return the Temporal client for the active Nexus operation.""" + return self._temporal_context.client + + @contextmanager + def _reserve_async_start(self) -> Iterator[None]: + if self._started_async: + raise HandlerError( + "Only one async operation can be started per operation handler invocation. Use TemporalNexusClient.client for additional workflow interactions", + type=HandlerErrorType.BAD_REQUEST, + ) + + # Reserve the started flag before sending to prevent concurrent starts + self._started_async = True + try: + yield + except BaseException: + self._started_async = False + raise + + async def start_workflow( + self, + workflow: str | Callable[..., Awaitable[ReturnType]], + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str | None = None, + result_type: type | None = None, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy = temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.TypedSearchAttributes | temporalio.common.SearchAttributes + ) = None, + static_summary: str | None = None, + static_details: str | None = None, + start_delay: timedelta | None = None, + start_signal: str | None = None, + start_signal_args: Sequence[Any] = [], + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + request_eager_start: bool = False, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> TemporalOperationResult[ReturnType]: + """Start a workflow as the backing asynchronous Nexus operation.""" + with self._reserve_async_start(): + wf_handle = await _start_nexus_backing_workflow( + temporal_context=self._temporal_context, + workflow=workflow, + arg=arg, + args=args, + id=id, + task_queue=task_queue, + result_type=result_type, + execution_timeout=execution_timeout, + run_timeout=run_timeout, + task_timeout=task_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + cron_schedule=cron_schedule, + memo=memo, + search_attributes=search_attributes, + static_summary=static_summary, + static_details=static_details, + start_delay=start_delay, + start_signal=start_signal, + start_signal_args=start_signal_args, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + request_eager_start=request_eager_start, + priority=priority, + versioning_override=versioning_override, + ) + + return TemporalOperationResult.async_token(wf_handle.to_token()) + + async def start_workflow_update( + self, + workflow_id: str, + update: str | Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + wait_for_stage: Literal[temporalio.client.WorkflowUpdateStage.ACCEPTED], + update_id: str | None = None, + result_type: type | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + run_id: str | None = None, + first_execution_run_id: str | None = None, + ) -> TemporalOperationResult[Any]: + """Start a Workflow Update-backed Nexus Operation.""" + if not self._temporal_context.nexus_context.callback_url: + raise HandlerError( + "callback URL is required for a workflow update Nexus operation", + type=HandlerErrorType.BAD_REQUEST, + ) + with self._reserve_async_start(): + update_handle = await _start_nexus_operation_workflow_update( + temporal_context=self._temporal_context, + workflow_id=workflow_id, + update=update, + arg=arg, + args=args, + wait_for_stage=wait_for_stage, + update_id=update_id, + result_type=result_type, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + run_id=run_id, + first_execution_run_id=first_execution_run_id, + ) + # If the update has already completed, return the result synchronously + if update_handle._known_outcome is not None: + try: + result = await update_handle.result() + except temporalio.client.WorkflowUpdateFailedError as err: + raise OperationError( + str(err), state=OperationErrorState.FAILED + ) from err + return TemporalOperationResult.sync(result) + token = OperationToken( + type=OperationTokenType.UPDATE_WORKFLOW, + namespace=update_handle._client.namespace, + workflow_id=update_handle.workflow_id, + update_id=update_handle.id, + run_id=update_handle.workflow_run_id, + ).encode() + return TemporalOperationResult.async_token(token) + + async def start_activity( + self, + activity: ( + str | Callable[..., Awaitable[ReturnType]] | Callable[..., ReturnType] + ), + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str, + task_queue: str | None = None, + result_type: type | None = None, + schedule_to_start_timeout: timedelta | None = None, + schedule_to_close_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + start_delay: timedelta | None = None, + id_reuse_policy: temporalio.common.ActivityIDReusePolicy = temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy: temporalio.common.ActivityIDConflictPolicy = temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy: temporalio.common.RetryPolicy | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + summary: str | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + rpc_metadata: Mapping[str, str | bytes] = {}, + rpc_timeout: timedelta | None = None, + ) -> TemporalOperationResult[ReturnType]: + """Start a standalone activity that will deliver the Nexus operation result. + + If ``task_queue`` is not specified, the Nexus worker's task queue is used. + See :py:meth:`temporalio.client.Client.start_activity` for all other arguments. + """ + with self._reserve_async_start(): + # Here we are starting a "nexus-backing" standalone activity. The start request + # carries the Nexus completion callback so the activity result is delivered to + # the Nexus caller when the activity reaches a terminal state. + + with _nexus_backing_start_context(): + activity_handle: temporalio.client.ActivityHandle[ + ReturnType + ] = await self._temporal_context.client.start_activity( + activity=activity, # type: ignore + arg=arg, + args=args, + id=id, + task_queue=task_queue or self._temporal_context.info().task_queue, + result_type=result_type, + schedule_to_start_timeout=schedule_to_start_timeout, + schedule_to_close_timeout=schedule_to_close_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + start_delay=start_delay, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + search_attributes=search_attributes, + summary=summary, + priority=priority, + rpc_metadata=rpc_metadata, + rpc_timeout=rpc_timeout, + ) + + activity_token = OperationToken( + type=OperationTokenType.ACTIVITY, + namespace=self._temporal_context.client.namespace, + activity_id=activity_handle.id, + run_id=activity_handle.run_id, + ) + + return TemporalOperationResult.async_token(activity_token.encode()) diff --git a/temporalio/nexus/_token.py b/temporalio/nexus/_token.py index a19d26d058..a7c732f2a9 100644 --- a/temporalio/nexus/_token.py +++ b/temporalio/nexus/_token.py @@ -3,24 +3,162 @@ import base64 import json from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Generic, Literal, Optional +from enum import IntEnum +from typing import TYPE_CHECKING, Any, Generic from nexusrpc import OutputT +from typing_extensions import Self + + +class OperationTokenType(IntEnum): + """Type discriminator for Nexus operation tokens.""" + + WORKFLOW = 1 + ACTIVITY = 2 + UPDATE_WORKFLOW = 3 -OperationTokenType = Literal[1] -OPERATION_TOKEN_TYPE_WORKFLOW: OperationTokenType = 1 if TYPE_CHECKING: import temporalio.client +@dataclass(frozen=True, kw_only=True) +class OperationToken: + """Serializable token identifying a Nexus operation target.""" + + version: int | None = None + type: OperationTokenType + namespace: str + workflow_id: str | None = None + activity_id: str | None = None + run_id: str | None = None + update_id: str | None = None + + def encode(self) -> str: + """Convert handle to a base64url-encoded token string.""" + token_details: dict[str, Any] = { + "t": self.type, + "ns": self.namespace, + } + if self.workflow_id is not None: + token_details["wid"] = self.workflow_id + if self.activity_id is not None: + token_details["aid"] = self.activity_id + if self.version is not None: + token_details["v"] = self.version + if self.run_id is not None: + token_details["rid"] = self.run_id + if self.update_id is not None: + token_details["uid"] = self.update_id + return _base64url_encode_no_padding( + json.dumps( + token_details, + separators=(",", ":"), + ).encode("utf-8") + ) + + @classmethod + def decode(cls, token: str) -> Self: + """Decodes and validates a token from its base64url-encoded string representation.""" + if not token: + raise TypeError("invalid token: token is empty") + try: + decoded_bytes = _base64url_decode_no_padding(token) + except Exception as err: + raise TypeError("failed to decode token as base64url") from err + try: + token_details = json.loads(decoded_bytes.decode("utf-8")) + except Exception as err: + raise TypeError("failed to unmarshal operation token") from err + + if not isinstance(token_details, dict): + raise TypeError(f"invalid token: expected dict, got {type(token_details)}") + + raw_token_type = token_details.get("t") + if not isinstance(raw_token_type, int): + raise TypeError( + f"invalid token: expected token type to be an int, got {type(raw_token_type)}" + ) + + try: + token_type = OperationTokenType(raw_token_type) + except ValueError as err: + raise TypeError( + f"invalid token: unknown token type, got {raw_token_type}.", + f"Valid values: {', '.join([f'{t.value} ({t.name})' for t in OperationTokenType])}", + ) from err + + version = token_details.get("v") + if version is not None and not isinstance(version, int): + raise TypeError( + f"invalid token: expected version to be an int or null, got {type(version)}" + ) + + workflow_id = token_details.get("wid") + if workflow_id is not None and not isinstance(workflow_id, str): + raise TypeError( + f"invalid token: expected workflow id to be a string, got {type(workflow_id)}" + ) + + if ( + token_type == OperationTokenType.WORKFLOW + or token_type == OperationTokenType.UPDATE_WORKFLOW + ): + if not workflow_id: + raise TypeError( + f"invalid token: expected non-empty workflow id for token type `{token_type.name}`" + ) + + activity_id = token_details.get("aid") + if activity_id is not None and not isinstance(activity_id, str): + raise TypeError( + f"invalid token: expected activity id to be a string, got {type(activity_id)}" + ) + + if token_type == OperationTokenType.ACTIVITY and not activity_id: + raise TypeError( + f"invalid token: expected non-empty activity id for token type `{token_type.name}`" + ) + + update_id = token_details.get("uid") + if not isinstance(update_id, str | None): + raise TypeError( + f"invalid token: expected update_id to be a string or None, got {type(update_id)}" + ) + + if token_type == OperationTokenType.UPDATE_WORKFLOW and not update_id: + raise TypeError( + "invalid token: expected non-empty update id for token type `UPDATE_WORKFLOW`" + ) + + namespace = token_details.get("ns") + if not isinstance(namespace, str): + # Allow empty string for ns, but it must be present and a string + raise TypeError( + f"invalid token: expected namespace to be a string, got {type(namespace)}" + ) + + run_id = token_details.get("rid") + if not isinstance(run_id, str | None): + raise TypeError( + f"invalid token: expected run_id to be a string or None, got {type(run_id)}" + ) + + return cls( + type=OperationTokenType(token_type), + namespace=namespace, + workflow_id=workflow_id, + activity_id=activity_id, + run_id=run_id, + version=version, + update_id=update_id, + ) + + @dataclass(frozen=True) class WorkflowHandle(Generic[OutputT]): """A handle to a workflow that is backing a Nexus operation. - .. warning:: - This API is experimental and unstable. - Do not instantiate this directly. Use :py:func:`temporalio.nexus.WorkflowRunOperationContext.start_workflow` to create a handle. @@ -45,8 +183,6 @@ def _to_client_workflow_handle( ) return client.get_workflow_handle(self.workflow_id, result_type=result_type) - # TODO(nexus-preview): The return type here should be dictated by the input workflow - # handle type. @classmethod def _unsafe_from_client_workflow_handle( cls, workflow_handle: temporalio.client.WorkflowHandle[Any, OutputT] @@ -64,65 +200,33 @@ def _unsafe_from_client_workflow_handle( def to_token(self) -> str: """Convert handle to a base64url-encoded token string.""" - return _base64url_encode_no_padding( - json.dumps( - { - "t": OPERATION_TOKEN_TYPE_WORKFLOW, - "ns": self.namespace, - "wid": self.workflow_id, - }, - separators=(",", ":"), - ).encode("utf-8") - ) + return OperationToken( + type=OperationTokenType.WORKFLOW, + namespace=self.namespace, + workflow_id=self.workflow_id, + ).encode() @classmethod def from_token(cls, token: str) -> WorkflowHandle[OutputT]: """Decodes and validates a token from its base64url-encoded string representation.""" - if not token: - raise TypeError("invalid workflow token: token is empty") - try: - decoded_bytes = _base64url_decode_no_padding(token) - except Exception as err: - raise TypeError("failed to decode token as base64url") from err - try: - workflow_operation_token = json.loads(decoded_bytes.decode("utf-8")) - except Exception as err: - raise TypeError("failed to unmarshal workflow operation token") from err - - if not isinstance(workflow_operation_token, dict): + op_token = OperationToken.decode(token) + if op_token.type != OperationTokenType.WORKFLOW: raise TypeError( - f"invalid workflow token: expected dict, got {type(workflow_operation_token)}" + f"invalid workflow token type: {op_token.type}, expected: {OperationTokenType.WORKFLOW}" ) - token_type = workflow_operation_token.get("t") - if token_type != OPERATION_TOKEN_TYPE_WORKFLOW: - raise TypeError( - f"invalid workflow token type: {token_type}, expected: {OPERATION_TOKEN_TYPE_WORKFLOW}" - ) + if not op_token.workflow_id: + raise TypeError("invalid workflow token: missing workflow id") - version = workflow_operation_token.get("v") - if version is not None and version != 0: + if op_token.version is not None and op_token.version != 0: raise TypeError( "invalid workflow token: 'v' field, if present, must be 0 or null/absent" ) - workflow_id = workflow_operation_token.get("wid") - if not workflow_id or not isinstance(workflow_id, str): - raise TypeError( - "invalid workflow token: missing, empty, or non-string workflow ID (wid)" - ) - - namespace = workflow_operation_token.get("ns") - if namespace is None or not isinstance(namespace, str): - # Allow empty string for ns, but it must be present and a string - raise TypeError( - "invalid workflow token: missing or non-string namespace (ns)" - ) - return cls( - namespace=namespace, - workflow_id=workflow_id, - version=version, + namespace=op_token.namespace, + workflow_id=op_token.workflow_id, + version=op_token.version, ) diff --git a/temporalio/nexus/_util.py b/temporalio/nexus/_util.py index 6817e8f026..f129dda2bd 100644 --- a/temporalio/nexus/_util.py +++ b/temporalio/nexus/_util.py @@ -7,9 +7,6 @@ from collections.abc import Awaitable, Callable from typing import ( Any, - Optional, - Type, - TypeVar, ) import nexusrpc @@ -18,18 +15,24 @@ OutputT, ) -from temporalio.nexus._operation_context import WorkflowRunOperationContext +from temporalio.nexus._operation_context import ( + TemporalStartOperationContext, + WorkflowRunOperationContext, +) +from temporalio.nexus._temporal_client import ( + TemporalNexusClient, + TemporalOperationResult, +) +from temporalio.types import NexusServiceType from ._token import ( WorkflowHandle as WorkflowHandle, ) -ServiceHandlerT = TypeVar("ServiceHandlerT") - def get_workflow_run_start_method_input_and_output_type_annotations( start: Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], + [NexusServiceType, WorkflowRunOperationContext, InputT], Awaitable[WorkflowHandle[OutputT]], ], ) -> tuple[ @@ -41,13 +44,62 @@ def get_workflow_run_start_method_input_and_output_type_annotations( ``start`` must be a type-annotated start method that returns a :py:class:`temporalio.nexus.WorkflowHandle`. """ - input_type, output_type = _get_start_method_input_and_output_type_annotations(start) + return _get_wrapped_start_method_input_and_output_type_annotations( + start, + expected_param_types=(WorkflowRunOperationContext,), + expected_return_origin=WorkflowHandle, + ) + + +def get_temporal_operation_start_method_input_and_output_type_annotations( + start: Callable[ + [ + NexusServiceType, + TemporalStartOperationContext, + TemporalNexusClient, + InputT, + ], + Awaitable[TemporalOperationResult[OutputT]], + ], +) -> tuple[ + type[InputT] | None, + type[OutputT] | None, +]: + """Return operation input and output types. + + ``start`` must be a type-annotated start method that returns a + :py:class:`temporalio.nexus.TemporalOperationResult`. + """ + return _get_wrapped_start_method_input_and_output_type_annotations( + start, + expected_param_types=( + TemporalStartOperationContext, + TemporalNexusClient, + ), + expected_return_origin=TemporalOperationResult, + ) + + +def _get_wrapped_start_method_input_and_output_type_annotations( + start: Callable[..., Any], + *, + expected_param_types: tuple[type[Any], ...], + expected_return_origin: type[Any], +) -> tuple[ + type[Any] | None, + type[Any] | None, +]: + input_type, output_type = _get_start_method_input_and_output_type_annotations( + start, + expected_param_types=expected_param_types, + ) origin_type = typing.get_origin(output_type) if not origin_type: output_type = None - elif not issubclass(origin_type, WorkflowHandle): + elif not issubclass(origin_type, expected_return_origin): warnings.warn( - f"Expected return type of {start.__name__} to be a subclass of WorkflowHandle, " + f"Expected return type of {start.__name__} to be a subclass of " + f"{expected_return_origin.__name__}, " f"but is {output_type}" ) output_type = None @@ -67,13 +119,12 @@ def get_workflow_run_start_method_input_and_output_type_annotations( def _get_start_method_input_and_output_type_annotations( - start: Callable[ - [ServiceHandlerT, WorkflowRunOperationContext, InputT], - Awaitable[WorkflowHandle[OutputT]], - ], + start: Callable[..., Any], + *, + expected_param_types: tuple[type[Any], ...], ) -> tuple[ - type[InputT] | None, - type[OutputT] | None, + type[Any] | None, + type[Any] | None, ]: try: type_annotations = typing.get_type_hints(start) @@ -83,23 +134,28 @@ def _get_start_method_input_and_output_type_annotations( ) return None, None output_type = type_annotations.pop("return", None) + expected_parameter_count = len(expected_param_types) + 1 - if len(type_annotations) != 2: + if len(type_annotations) != expected_parameter_count: suffix = f": {type_annotations}" if type_annotations else "" warnings.warn( - f"Expected decorated start method {start} to have exactly 2 " - f"type-annotated parameters (ctx and input), but it has {len(type_annotations)}" + f"Expected decorated start method {start} to have exactly " + f"{expected_parameter_count} type-annotated parameters, " + f"but it has {len(type_annotations)}" f"{suffix}." ) input_type = None else: - ctx_type, input_type = type_annotations.values() - if not issubclass(ctx_type, WorkflowRunOperationContext): - warnings.warn( - f"Expected first parameter of {start} to be an instance of " - f"WorkflowRunOperationContext, but is {ctx_type}." - ) - input_type = None + *param_types, input_type = type_annotations.values() + for index, (param_type, expected_param_type) in enumerate( + zip(param_types, expected_param_types), start=1 + ): + if not issubclass(expected_param_type, param_type): + warnings.warn( + f"Expected parameter {index} of {start} to be an instance of " + f"{expected_param_type.__name__}, but is {param_type}." + ) + input_type = None return input_type, output_type diff --git a/temporalio/nexus/notifications/__init__.py b/temporalio/nexus/notifications/__init__.py new file mode 100644 index 0000000000..7a8bb24ead --- /dev/null +++ b/temporalio/nexus/notifications/__init__.py @@ -0,0 +1,19 @@ +# Generated by nexgen v0.2.8. DO NOT EDIT! + +from __future__ import annotations + +from .models import ( + OnCompleteRequest, + OnCompleteRequestResult, + OnCompleteRequestResultFailure, + OnCompleteRequestResultSuccess, + OnCompleteResponse, +) + +__all__ = [ + "OnCompleteRequest", + "OnCompleteRequestResult", + "OnCompleteRequestResultSuccess", + "OnCompleteRequestResultFailure", + "OnCompleteResponse", +] diff --git a/temporalio/nexus/notifications/models.py b/temporalio/nexus/notifications/models.py new file mode 100644 index 0000000000..1bcace5123 --- /dev/null +++ b/temporalio/nexus/notifications/models.py @@ -0,0 +1,156 @@ +# Generated by nexgen v0.2.8. DO NOT EDIT! + +from __future__ import annotations + +import dataclasses +import typing + +import typing_extensions + +import temporalio.api.notificationservice.v1.request_response_pb2 +import temporalio.converter +import temporalio.nexus.system._support as _support + +OutputT = typing.TypeVar("OutputT") +SourceContextT = typing.TypeVar("SourceContextT") + + +@dataclasses.dataclass(slots=True) +class OnCompleteRequest(typing.Generic[OutputT, SourceContextT]): + """ + .. warning:: + This API is experimental and subject to change. + """ + + result: OnCompleteRequestResult[OutputT] + source_context: SourceContextT + + +class _OnCompleteRequestTransferTypeConverter( + temporalio.converter.TransferTypeConverter[ + OnCompleteRequest[OutputT, SourceContextT], + temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteRequest, + ] +): + transfer_type: ( + type[ + temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteRequest + ] + | None + ) = temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteRequest + + @typing_extensions.override + def from_transfer_type( + self, + value: temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteRequest, + type_hint: type[OnCompleteRequest[OutputT, SourceContextT]], + ) -> OnCompleteRequest[OutputT, SourceContextT]: + output_type, source_context_type = typing.get_args(type_hint) or ( + typing.Any, + typing.Any, + ) + _oneof_result: ( + OnCompleteRequestResultSuccess[OutputT] | OnCompleteRequestResultFailure + ) + match value.WhichOneof("result"): + case "success": + _oneof_result = OnCompleteRequestResultSuccess( + typing.cast( + OutputT, _support.payload_from_proto(value.success, output_type) + ) + ) + case "failure": + _oneof_result = OnCompleteRequestResultFailure( + _support.failure_from_proto(value.failure) + ) + case None: + raise ValueError("missing required field OnCompleteRequest.result") + if not value.HasField("source_context"): + raise ValueError("missing required field OnCompleteRequest.source_context") + source_context = typing.cast( + SourceContextT, + _support.payload_from_proto(value.source_context, source_context_type), + ) + return OnCompleteRequest( + result=_oneof_result, + source_context=source_context, + ) + + @typing_extensions.override + def to_transfer_type( + self, + value: OnCompleteRequest[OutputT, SourceContextT], + ) -> temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteRequest: + message = temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteRequest() + match value.result: + case OnCompleteRequestResultSuccess(): + message.success.CopyFrom(_support.payload_to_proto(value.result.value)) + case OnCompleteRequestResultFailure(): + message.failure.CopyFrom(_support.failure_to_proto(value.result.value)) + message.source_context.CopyFrom(_support.payload_to_proto(value.source_context)) + return message + + +temporalio.converter.transfer_type_convertible( + _OnCompleteRequestTransferTypeConverter[typing.Any, typing.Any] +)(OnCompleteRequest) # pyright: ignore[reportUnusedCallResult] + + +@dataclasses.dataclass(slots=True) +class OnCompleteResponse: + """ + .. warning:: + This API is experimental and subject to change. + """ + + pass + + +class _OnCompleteResponseTransferTypeConverter( + temporalio.converter.TransferTypeConverter[ + OnCompleteResponse, + temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteResponse, + ] +): + transfer_type: ( + type[ + temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteResponse + ] + | None + ) = temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteResponse + + @typing_extensions.override + def from_transfer_type( + self, + value: temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteResponse, + type_hint: type[OnCompleteResponse], + ) -> OnCompleteResponse: + return OnCompleteResponse() + + @typing_extensions.override + def to_transfer_type( + self, + value: OnCompleteResponse, + ) -> temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteResponse: + message = temporalio.api.notificationservice.v1.request_response_pb2.OnCompleteResponse() + return message + + +temporalio.converter.transfer_type_convertible( + _OnCompleteResponseTransferTypeConverter +)(OnCompleteResponse) # pyright: ignore[reportUnusedCallResult] + + +@dataclasses.dataclass(slots=True) +class OnCompleteRequestResultSuccess(typing.Generic[OutputT]): + value: OutputT + + +@dataclasses.dataclass(slots=True) +class OnCompleteRequestResultFailure: + value: BaseException + + +OnCompleteRequestResult = ( + OnCompleteRequestResultSuccess[OutputT] | OnCompleteRequestResultFailure +) diff --git a/temporalio/nexus/system/__init__.py b/temporalio/nexus/system/__init__.py new file mode 100644 index 0000000000..1f8f7c6d29 --- /dev/null +++ b/temporalio/nexus/system/__init__.py @@ -0,0 +1,196 @@ +"""System Nexus operation helpers. + +.. warning:: + This API is experimental and subject to change. +""" + +from __future__ import annotations + +import contextlib +import contextvars +from collections.abc import Iterator, Sequence +from dataclasses import dataclass +from typing import Any + +import temporalio.api.common.v1 +import temporalio.common +import temporalio.converter +import temporalio.exceptions +from temporalio.bridge._visitor_functions import VisitorFunctions +from temporalio.converter import BinaryProtoPayloadConverter, CompositePayloadConverter +from temporalio.converter._payload_converter import ( + _TemporalTransferTypePayloadConverter, +) + +TEMPORAL_SYSTEM_ENDPOINT = "__temporal_system" + + +@dataclass(frozen=True) +class _SystemNexusUserConverters: + payload_converter: temporalio.converter.PayloadConverter + failure_converter: temporalio.converter.FailureConverter + + +_user_converters: contextvars.ContextVar[_SystemNexusUserConverters | None] = ( + contextvars.ContextVar("temporal-system-nexus-user-converters", default=None) +) +_SYSTEM_PAYLOAD_METADATA_KEY = "__temporal_system_payload" +_SYSTEM_PAYLOAD_METADATA_VALUE = b"true" + + +@contextlib.contextmanager +def _user_converter_context( + converters: _SystemNexusUserConverters, +) -> Iterator[None]: + """Set the user converters for system Nexus model conversion.""" + token = _user_converters.set(converters) + try: + yield + finally: + _user_converters.reset(token) + + +def _current_user_converters() -> _SystemNexusUserConverters: + converters = _user_converters.get() + if converters is None: + raise RuntimeError("System Nexus user converter context is not active") + return converters + + +def _current_user_payload_converter() -> temporalio.converter.PayloadConverter: # pyright: ignore[reportUnusedFunction] + """Return the active user payload converter for system Nexus model conversion.""" + return _current_user_converters().payload_converter + + +def _current_user_failure_converter() -> temporalio.converter.FailureConverter: # pyright: ignore[reportUnusedFunction] + """Return the active user failure converter for system Nexus model conversion.""" + return _current_user_converters().failure_converter + + +class _SystemNexusOuterPayloadConverter(CompositePayloadConverter): + """Payload converter for system Nexus outer proto envelopes.""" + + def __init__(self) -> None: + """Create a payload converter for system Nexus outer envelopes.""" + super().__init__(BinaryProtoPayloadConverter()) + + def to_payloads( + self, values: Sequence[Any] + ) -> list[temporalio.api.common.v1.Payload]: + """See base class.""" + payloads = super().to_payloads(values) + for value, payload in zip(values, payloads): + if isinstance(value, temporalio.common.RawValue): + continue + payload.metadata[_SYSTEM_PAYLOAD_METADATA_KEY] = ( + _SYSTEM_PAYLOAD_METADATA_VALUE + ) + return payloads + + +class _SystemNexusPayloadConverter(temporalio.converter.PayloadConverter): + """Payload converter for system Nexus outer envelopes.""" + + _user_converters: _SystemNexusUserConverters + _outer_payload_converter: temporalio.converter.PayloadConverter + + def __init__( + self, + user_payload_converter: temporalio.converter.PayloadConverter, + user_failure_converter: temporalio.converter.FailureConverter, + ) -> None: + """Create a payload converter for system Nexus outer envelopes.""" + self._user_converters = _SystemNexusUserConverters( + user_payload_converter, user_failure_converter + ) + self._outer_payload_converter = _TemporalTransferTypePayloadConverter.wrap( + _SystemNexusOuterPayloadConverter() + ) + + def to_payloads( + self, values: Sequence[Any] + ) -> list[temporalio.api.common.v1.Payload]: + """See base class.""" + with _user_converter_context(self._user_converters): + return self._outer_payload_converter.to_payloads(values) + + def from_payloads( + self, + payloads: Sequence[temporalio.api.common.v1.Payload], + type_hints: list[type] | None = None, + ) -> list[Any]: + """See base class.""" + with _user_converter_context(self._user_converters): + return self._outer_payload_converter.from_payloads(payloads, type_hints) + + +def is_system_endpoint(endpoint: str) -> bool: + """Return whether a Nexus endpoint is the Temporal system endpoint. + + .. warning:: + This API is experimental and subject to change. + """ + return endpoint == TEMPORAL_SYSTEM_ENDPOINT + + +def _is_system_payload(payload: temporalio.api.common.v1.Payload) -> bool: + return ( + payload.metadata.get(_SYSTEM_PAYLOAD_METADATA_KEY) + == _SYSTEM_PAYLOAD_METADATA_VALUE + ) + + +async def maybe_visit_payload( + payload: temporalio.api.common.v1.Payload, + visitor_functions: VisitorFunctions, + skip_search_attributes: bool, +) -> temporalio.api.common.v1.Payload | None: + """Visit nested payloads if the payload is a Temporal system Nexus envelope.""" + if not _is_system_payload(payload): + return None + + payload_converter = _SystemNexusOuterPayloadConverter() + value = payload_converter.from_payload(payload) + from temporalio.bridge._visitor import PayloadVisitor + + payload_visitor = PayloadVisitor(skip_search_attributes=skip_search_attributes) + checkpoint = visitor_functions.checkpoint() + try: + await payload_visitor.visit(visitor_functions, value) + except ValueError as err: + if not str(err).startswith("Unknown root message type: "): + raise + raise temporalio.exceptions.ApplicationError( + f"Unknown Temporal system payload: {value.DESCRIPTOR.full_name}" + ) from err + if checkpoint is not None: + await visitor_functions.drain_since(checkpoint) + return payload_converter.to_payload(value) + + +def _get_payload_converter( # pyright: ignore[reportUnusedFunction] + user_payload_converter: temporalio.converter.PayloadConverter, + user_failure_converter: temporalio.converter.FailureConverter, +) -> temporalio.converter.PayloadConverter: + """Return the fixed payload converter for system Nexus outer envelopes.""" + return _SystemNexusPayloadConverter(user_payload_converter, user_failure_converter) + + +def _get_serialization_context( # pyright: ignore[reportUnusedFunction] + service: str, + operation: str, + request: Any, +) -> temporalio.converter.SerializationContext | None: + """Return the serialization context for a system Nexus operation.""" + from .workflow_service import __nexus_operation_registry__ + + operation_info = __nexus_operation_registry__.get((service, operation)) + if operation_info is None or operation_info.serialization_context is None: + return None + return operation_info.serialization_context(request) + + +__all__ = [ + "TEMPORAL_SYSTEM_ENDPOINT", + "is_system_endpoint", +] diff --git a/temporalio/nexus/system/_support.py b/temporalio/nexus/system/_support.py new file mode 100644 index 0000000000..15a8e80102 --- /dev/null +++ b/temporalio/nexus/system/_support.py @@ -0,0 +1,300 @@ +import collections.abc +import typing +from datetime import timedelta + +import google.protobuf.duration_pb2 + +import temporalio.api.common.v1.message_pb2 as common_pb2 +import temporalio.api.enums.v1.workflow_pb2 as workflow_enums_pb2 +import temporalio.api.failure.v1.message_pb2 as failure_pb2 +import temporalio.api.taskqueue.v1.message_pb2 as taskqueue_pb2 +import temporalio.api.workflow.v1 +import temporalio.common +import temporalio.converter +import temporalio.nexus.system + + +class SignalWithStartWorkflowModelRequest(typing.Protocol): + namespace: str + id: str + + +def retry_policy_from_proto( + proto: common_pb2.RetryPolicy, +) -> temporalio.common.RetryPolicy: + return temporalio.common.RetryPolicy.from_proto(proto) + + +def retry_policy_to_proto( + retry_policy: temporalio.common.RetryPolicy, +) -> common_pb2.RetryPolicy: + proto = common_pb2.RetryPolicy() + retry_policy.apply_to_proto(proto) + return proto + + +def workflow_function_name( + value: str | collections.abc.Callable[..., collections.abc.Awaitable[object]], +) -> str: + from temporalio.workflow import _Definition # pyright: ignore[reportPrivateUsage] + + name, _result_type = _Definition.get_name_and_result_type(value) + return name + + +def signal_function_to_proto( + value: str | collections.abc.Callable[..., typing.Any], +) -> str: + from temporalio.workflow import ( + _SignalDefinition, # pyright: ignore[reportPrivateUsage] + ) + + return _SignalDefinition.must_name_from_fn_or_str(value) # pyright: ignore[reportUnknownMemberType] + + +def workflow_type_to_proto( + workflow_type: str + | collections.abc.Callable[..., collections.abc.Awaitable[object]], +) -> common_pb2.WorkflowType: + return common_pb2.WorkflowType(name=workflow_function_name(workflow_type)) + + +def workflow_type_from_proto( + proto: common_pb2.WorkflowType, +) -> str: + return proto.name + + +def task_queue_from_proto( + proto: taskqueue_pb2.TaskQueue, +) -> str: + return proto.name + + +def task_queue_to_proto( + task_queue: str, +) -> taskqueue_pb2.TaskQueue: + return taskqueue_pb2.TaskQueue(name=task_queue) + + +def workflow_namespace() -> str: + from temporalio.workflow import info + + return info().namespace + + +def signal_with_start_workflow_serialization_context( + request: SignalWithStartWorkflowModelRequest, +) -> temporalio.converter.WorkflowSerializationContext: + return temporalio.converter.WorkflowSerializationContext( + namespace=request.namespace, + workflow_id=request.id, + ) + + +def payloads_to_proto( + values: collections.abc.Sequence[typing.Any], +) -> common_pb2.Payloads: + return ( + temporalio.nexus.system._current_user_payload_converter().to_payloads_wrapper( + values + ) + ) + + +def payloads_from_proto( + proto: common_pb2.Payloads, +) -> list[object]: + return list( + temporalio.nexus.system._current_user_payload_converter().from_payloads_wrapper( + proto + ) + ) + + +def _clone_payload(payload: common_pb2.Payload) -> common_pb2.Payload: + clone = common_pb2.Payload() + clone.CopyFrom(payload) + return clone + + +def _value_to_payload(value: object | common_pb2.Payload) -> common_pb2.Payload: + if isinstance(value, common_pb2.Payload): + return _clone_payload(value) + payloads = ( + temporalio.nexus.system._current_user_payload_converter().to_payloads_wrapper( + [value] + ) + ) + return _clone_payload(payloads.payloads[0]) + + +def _payload_to_value( + payload: common_pb2.Payload, type_hint: typing.Any = None +) -> object: + return temporalio.nexus.system._current_user_payload_converter().from_payloads( + [_clone_payload(payload)], [type_hint] if type_hint is not None else None + )[0] + + +def payload_from_proto( + proto: common_pb2.Payload, + type_hint: typing.Any = None, +) -> object: + return _payload_to_value(proto, type_hint) + + +def payload_to_proto( + payload: object, +) -> common_pb2.Payload: + return _value_to_payload(payload) + + +def failure_from_proto( + proto: failure_pb2.Failure, +) -> BaseException: + return temporalio.nexus.system._current_user_failure_converter().from_failure( + proto, temporalio.nexus.system._current_user_payload_converter() + ) + + +def failure_to_proto( + failure: BaseException, +) -> failure_pb2.Failure: + proto = failure_pb2.Failure() + temporalio.nexus.system._current_user_failure_converter().to_failure( + failure, temporalio.nexus.system._current_user_payload_converter(), proto + ) + return proto + + +def memo_from_proto( + proto: common_pb2.Memo, +) -> collections.abc.Mapping[str, object]: + return {key: _payload_to_value(value) for key, value in proto.fields.items()} + + +def memo_to_proto( + memo: collections.abc.Mapping[str, object], +) -> common_pb2.Memo: + message = common_pb2.Memo() + for key, value in memo.items(): + message.fields[key].CopyFrom(_value_to_payload(value)) + return message + + +def header_from_proto( + proto: common_pb2.Header, +) -> collections.abc.Mapping[str, object]: + return {key: _payload_to_value(value) for key, value in proto.fields.items()} + + +def header_to_proto( + header: collections.abc.Mapping[str, object], +) -> common_pb2.Header: + message = common_pb2.Header() + for key, value in header.items(): + message.fields[key].CopyFrom(_value_to_payload(value)) + return message + + +def duration_from_proto(proto: google.protobuf.duration_pb2.Duration) -> timedelta: + return proto.ToTimedelta() + + +def duration_to_proto( + duration: timedelta, +) -> google.protobuf.duration_pb2.Duration: + proto = google.protobuf.duration_pb2.Duration() + proto.FromTimedelta(duration) + return proto + + +def workflow_id_reuse_policy_from_proto( + policy: workflow_enums_pb2.WorkflowIdReusePolicy.ValueType, +) -> temporalio.common.WorkflowIDReusePolicy: + return temporalio.common.WorkflowIDReusePolicy(int(policy)) + + +def workflow_id_reuse_policy_to_proto( + policy: temporalio.common.WorkflowIDReusePolicy, +) -> workflow_enums_pb2.WorkflowIdReusePolicy.ValueType: + return typing.cast(workflow_enums_pb2.WorkflowIdReusePolicy.ValueType, int(policy)) + + +def workflow_id_conflict_policy_from_proto( + policy: workflow_enums_pb2.WorkflowIdConflictPolicy.ValueType, +) -> temporalio.common.WorkflowIDConflictPolicy: + return temporalio.common.WorkflowIDConflictPolicy(int(policy)) + + +def workflow_id_conflict_policy_to_proto( + policy: temporalio.common.WorkflowIDConflictPolicy, +) -> workflow_enums_pb2.WorkflowIdConflictPolicy.ValueType: + return typing.cast( + workflow_enums_pb2.WorkflowIdConflictPolicy.ValueType, int(policy) + ) + + +def search_attributes_to_proto( + search_attributes: temporalio.common.TypedSearchAttributes, +) -> common_pb2.SearchAttributes: + proto = common_pb2.SearchAttributes() + temporalio.converter.encode_search_attributes(search_attributes, proto) + return proto + + +def search_attributes_from_proto( + proto: common_pb2.SearchAttributes, +) -> temporalio.common.TypedSearchAttributes: + return temporalio.converter.decode_typed_search_attributes(proto) + + +def priority_from_proto( + proto: common_pb2.Priority, +) -> temporalio.common.Priority: + return temporalio.common.Priority._from_proto(proto) # pyright: ignore[reportPrivateUsage] + + +def priority_to_proto( + priority: temporalio.common.Priority, +) -> common_pb2.Priority: + return priority._to_proto() # pyright: ignore[reportPrivateUsage] + + +def versioning_override_to_proto( + versioning_override: temporalio.common.VersioningOverride, +) -> temporalio.api.workflow.v1.VersioningOverride: + return versioning_override._to_proto() # pyright: ignore[reportPrivateUsage] + + +def versioning_override_from_proto( + proto: temporalio.api.workflow.v1.VersioningOverride, +) -> temporalio.common.VersioningOverride: + if proto.HasField("pinned") and proto.pinned.HasField("version"): + version = proto.pinned.version + return temporalio.common.PinnedVersioningOverride( + temporalio.common.WorkerDeploymentVersion( + deployment_name=version.deployment_name, + build_id=version.build_id, + ) + ) + if proto.HasField("one_time") and proto.one_time.HasField( + "target_deployment_version" + ): + version = proto.one_time.target_deployment_version + return temporalio.common.OneTimeVersioningOverride( + temporalio.common.WorkerDeploymentVersion( + deployment_name=version.deployment_name, + build_id=version.build_id, + ) + ) + if proto.pinned_version: + return temporalio.common.PinnedVersioningOverride( + temporalio.common.WorkerDeploymentVersion.from_canonical_string( + proto.pinned_version + ) + ) + if proto.auto_upgrade: + return temporalio.common.AutoUpgradeVersioningOverride() + raise ValueError("unknown versioning override proto shape") diff --git a/temporalio/nexus/system/workflow_service/__init__.py b/temporalio/nexus/system/workflow_service/__init__.py new file mode 100644 index 0000000000..f6a6f0c682 --- /dev/null +++ b/temporalio/nexus/system/workflow_service/__init__.py @@ -0,0 +1,51 @@ +# Generated by nexgen v0.2.8. DO NOT EDIT! + +from __future__ import annotations + +import collections.abc +import typing + +import nexusrpc + +import temporalio.converter +import temporalio.nexus.system._support as _support + +from . import services as _services +from .operations.signal_with_start_workflow import signal_with_start_workflow + +__all__ = [ + "signal_with_start_workflow", +] + + +_InputT = typing.TypeVar("_InputT") +_OutputT = typing.TypeVar("_OutputT") + + +_SerializationContextFactory = collections.abc.Callable[ + [_InputT], temporalio.converter.SerializationContext +] + + +class _NexusOperationInfo(typing.Generic[_InputT, _OutputT]): + def __init__( + self, + *, + operation: nexusrpc.Operation[_InputT, _OutputT], + serialization_context: _SerializationContextFactory[_InputT] | None = None, + ) -> None: + self.operation: nexusrpc.Operation[_InputT, _OutputT] = operation + self.serialization_context: _SerializationContextFactory[_InputT] | None = ( + serialization_context + ) + + +__nexus_operation_registry__ = { + ( + "temporal.api.workflowservice.v1.WorkflowService", + "SignalWithStartWorkflowExecution", + ): _NexusOperationInfo( + operation=_services.WorkflowService.signal_with_start_workflow, + serialization_context=_support.signal_with_start_workflow_serialization_context, + ), +} diff --git a/temporalio/nexus/system/workflow_service/_system_nexus_interceptor.py b/temporalio/nexus/system/workflow_service/_system_nexus_interceptor.py new file mode 100644 index 0000000000..5c62e00927 --- /dev/null +++ b/temporalio/nexus/system/workflow_service/_system_nexus_interceptor.py @@ -0,0 +1,95 @@ +# Generated by nexgen v0.2.8. DO NOT EDIT! + +from __future__ import annotations + +import abc +import typing + +from . import models + +if typing.TYPE_CHECKING: + import temporalio.workflow + from temporalio.worker._interceptor import StartNexusOperationInput + + +__all__ = [ + "_start_system_nexus_operation", + "_SystemNexusWorkflowOutboundInterceptorBase", + "_SystemNexusWorkflowOutboundInterceptorTerminal", +] + + +_InputT = typing.TypeVar("_InputT") +_OutputT = typing.TypeVar("_OutputT") + + +async def _start_system_nexus_operation( + interceptor: _SystemNexusWorkflowOutboundInterceptorBase, + input: StartNexusOperationInput[_InputT, _OutputT], +) -> temporalio.workflow.NexusOperationHandle[_OutputT]: + if ( + input.service == "temporal.api.workflowservice.v1.WorkflowService" + and input.operation_name == "SignalWithStartWorkflowExecution" + ): + typed_input = typing.cast( + "StartNexusOperationInput[models.SignalWithStartWorkflowRequest, models.SignalWithStartWorkflowResponse]", + input, + ) + # The dispatch check above establishes that this operation's response type is _OutputT. + return typing.cast( + "temporalio.workflow.NexusOperationHandle[_OutputT]", + await interceptor.start_signal_with_start_workflow(typed_input.input), + ) + raise ValueError( + f"unsupported System Nexus operation: {input.service}/{input.operation_name}" + ) + + +class _SystemNexusWorkflowOutboundInterceptorBase(abc.ABC): + @abc.abstractmethod + def _next_system_nexus_interceptor( + self, + ) -> _SystemNexusWorkflowOutboundInterceptorBase: ... + + async def start_signal_with_start_workflow( + self, request: models.SignalWithStartWorkflowRequest + ) -> temporalio.workflow.NexusOperationHandle[ + models.SignalWithStartWorkflowResponse + ]: + """Intercept the SignalWithStartWorkflow operation.""" + return await self._next_system_nexus_interceptor().start_signal_with_start_workflow( + request + ) + + +class _SystemNexusWorkflowOutboundInterceptorTerminal(abc.ABC): + @abc.abstractmethod + async def _intercept_system_nexus_operation( + self, + input: StartNexusOperationInput[_InputT, _OutputT], + ) -> temporalio.workflow.NexusOperationHandle[_OutputT]: ... + + async def start_signal_with_start_workflow( + self, request: models.SignalWithStartWorkflowRequest + ) -> temporalio.workflow.NexusOperationHandle[ + models.SignalWithStartWorkflowResponse + ]: + from temporalio.nexus.system import TEMPORAL_SYSTEM_ENDPOINT + from temporalio.worker._interceptor import StartNexusOperationInput + from temporalio.workflow import NexusOperationCancellationType + + return await self._intercept_system_nexus_operation( + StartNexusOperationInput( + endpoint=TEMPORAL_SYSTEM_ENDPOINT, + service="temporal.api.workflowservice.v1.WorkflowService", + operation="SignalWithStartWorkflowExecution", + input=request, + output_type=models.SignalWithStartWorkflowResponse, + schedule_to_close_timeout=None, + schedule_to_start_timeout=None, + start_to_close_timeout=None, + cancellation_type=NexusOperationCancellationType.WAIT_COMPLETED, + headers=None, + summary=None, + ) + ) diff --git a/temporalio/nexus/system/workflow_service/models.py b/temporalio/nexus/system/workflow_service/models.py new file mode 100644 index 0000000000..dc7b5ce2e7 --- /dev/null +++ b/temporalio/nexus/system/workflow_service/models.py @@ -0,0 +1,327 @@ +# Generated by nexgen v0.2.8. DO NOT EDIT! + +from __future__ import annotations + +import collections.abc +import dataclasses +import datetime +import typing + +import typing_extensions + +import temporalio.api.sdk.v1.user_metadata_pb2 +import temporalio.api.workflowservice.v1.request_response_pb2 +import temporalio.common +import temporalio.converter +import temporalio.nexus.system._support as _support + + +@dataclasses.dataclass(slots=True, kw_only=True) +class SignalWithStartWorkflowRequest: + """ + .. warning:: + This API is experimental and subject to change. + """ + + workflow: str | collections.abc.Callable[..., collections.abc.Awaitable[object]] + args: list[typing.Any] | None = None + id: str + task_queue: str + signal: str | collections.abc.Callable[..., None | collections.abc.Awaitable[None]] + signal_args: list[typing.Any] | None = None + execution_timeout: datetime.timedelta | None = None + run_timeout: datetime.timedelta | None = None + task_timeout: datetime.timedelta | None = None + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ( + temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE + ) + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = None + retry_policy: temporalio.common.RetryPolicy | None = None + cron_schedule: str | None = None + memo: collections.abc.Mapping[str, typing.Any] | None = None + search_attributes: temporalio.common.TypedSearchAttributes | None = None + priority: temporalio.common.Priority | None = None + versioning_override: temporalio.common.VersioningOverride | None = None + start_delay: datetime.timedelta | None = None + user_metadata: UserMetadata | None = None + namespace: str = dataclasses.field(default_factory=_support.workflow_namespace) + headers: collections.abc.Mapping[str, typing.Any] | None = None + + +class _SignalWithStartWorkflowRequestTransferTypeConverter( + temporalio.converter.TransferTypeConverter[ + SignalWithStartWorkflowRequest, + temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionRequest, + ] +): + transfer_type: ( + type[ + temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionRequest + ] + | None + ) = temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionRequest + + @typing_extensions.override + def from_transfer_type( + self, + value: temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionRequest, + type_hint: type[SignalWithStartWorkflowRequest], + ) -> SignalWithStartWorkflowRequest: + if not value.HasField("workflow_type"): + raise ValueError( + "missing required field SignalWithStartWorkflowRequest.workflow" + ) + workflow = _support.workflow_type_from_proto(value.workflow_type) + if not value.workflow_id: + raise ValueError("missing required field SignalWithStartWorkflowRequest.id") + id = value.workflow_id + if not value.HasField("task_queue"): + raise ValueError( + "missing required field SignalWithStartWorkflowRequest.task_queue" + ) + task_queue = _support.task_queue_from_proto(value.task_queue) + if not value.signal_name: + raise ValueError( + "missing required field SignalWithStartWorkflowRequest.signal" + ) + signal = value.signal_name + return SignalWithStartWorkflowRequest( + workflow=workflow, + args=_support.payloads_from_proto(value.input) + if value.HasField("input") + else None, + id=id, + task_queue=task_queue, + signal=signal, + signal_args=_support.payloads_from_proto(value.signal_input) + if value.HasField("signal_input") + else None, + execution_timeout=_support.duration_from_proto( + value.workflow_execution_timeout + ) + if value.HasField("workflow_execution_timeout") + else None, + run_timeout=_support.duration_from_proto(value.workflow_run_timeout) + if value.HasField("workflow_run_timeout") + else None, + task_timeout=_support.duration_from_proto(value.workflow_task_timeout) + if value.HasField("workflow_task_timeout") + else None, + id_reuse_policy=_support.workflow_id_reuse_policy_from_proto( + value.workflow_id_reuse_policy + ), + id_conflict_policy=_support.workflow_id_conflict_policy_from_proto( + value.workflow_id_conflict_policy + ) + if value.workflow_id_conflict_policy != 0 + else None, + retry_policy=_support.retry_policy_from_proto(value.retry_policy) + if value.HasField("retry_policy") + else None, + cron_schedule=value.cron_schedule if bool(value.cron_schedule) else None, + memo=_support.memo_from_proto(value.memo) + if value.HasField("memo") + else None, + search_attributes=_support.search_attributes_from_proto( + value.search_attributes + ) + if value.HasField("search_attributes") + else None, + priority=_support.priority_from_proto(value.priority) + if value.HasField("priority") + else None, + versioning_override=_support.versioning_override_from_proto( + value.versioning_override + ) + if value.HasField("versioning_override") + else None, + start_delay=_support.duration_from_proto(value.workflow_start_delay) + if value.HasField("workflow_start_delay") + else None, + user_metadata=_UserMetadataTransferTypeConverter().from_transfer_type( + value.user_metadata, UserMetadata + ) + if value.HasField("user_metadata") + else None, + namespace=value.namespace, + headers=_support.header_from_proto(value.header) + if value.HasField("header") + else None, + ) + + @typing_extensions.override + def to_transfer_type( + self, + value: SignalWithStartWorkflowRequest, + ) -> temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionRequest: + message = temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionRequest() + message.workflow_type.CopyFrom(_support.workflow_type_to_proto(value.workflow)) + if value.args is not None: + message.input.CopyFrom(_support.payloads_to_proto(value.args)) + message.workflow_id = value.id + message.task_queue.CopyFrom(_support.task_queue_to_proto(value.task_queue)) + message.signal_name = _support.signal_function_to_proto(value.signal) + if value.signal_args is not None: + message.signal_input.CopyFrom(_support.payloads_to_proto(value.signal_args)) + if value.execution_timeout is not None: + message.workflow_execution_timeout.CopyFrom( + _support.duration_to_proto(value.execution_timeout) + ) + if value.run_timeout is not None: + message.workflow_run_timeout.CopyFrom( + _support.duration_to_proto(value.run_timeout) + ) + if value.task_timeout is not None: + message.workflow_task_timeout.CopyFrom( + _support.duration_to_proto(value.task_timeout) + ) + message.workflow_id_reuse_policy = _support.workflow_id_reuse_policy_to_proto( + value.id_reuse_policy + ) + if value.id_conflict_policy is not None: + message.workflow_id_conflict_policy = ( + _support.workflow_id_conflict_policy_to_proto(value.id_conflict_policy) + ) + if value.retry_policy is not None: + message.retry_policy.CopyFrom( + _support.retry_policy_to_proto(value.retry_policy) + ) + if value.cron_schedule is not None: + message.cron_schedule = value.cron_schedule + if value.memo is not None: + message.memo.CopyFrom(_support.memo_to_proto(value.memo)) + if value.search_attributes is not None: + message.search_attributes.CopyFrom( + _support.search_attributes_to_proto(value.search_attributes) + ) + if value.priority is not None: + message.priority.CopyFrom(_support.priority_to_proto(value.priority)) + if value.versioning_override is not None: + message.versioning_override.CopyFrom( + _support.versioning_override_to_proto(value.versioning_override) + ) + if value.start_delay is not None: + message.workflow_start_delay.CopyFrom( + _support.duration_to_proto(value.start_delay) + ) + if value.user_metadata is not None: + message.user_metadata.CopyFrom( + _UserMetadataTransferTypeConverter().to_transfer_type( + value.user_metadata + ) + ) + message.namespace = value.namespace + if value.headers is not None: + message.header.CopyFrom(_support.header_to_proto(value.headers)) + return message + + +temporalio.converter.transfer_type_convertible( + _SignalWithStartWorkflowRequestTransferTypeConverter +)(SignalWithStartWorkflowRequest) # pyright: ignore[reportUnusedCallResult] + + +@dataclasses.dataclass(slots=True) +class UserMetadata: + """ + .. warning:: + This API is experimental and subject to change. + """ + + static_summary: typing.Any | None = None + static_details: typing.Any | None = None + + +class _UserMetadataTransferTypeConverter( + temporalio.converter.TransferTypeConverter[ + UserMetadata, temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata + ] +): + transfer_type: type[temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata] | None = ( + temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata + ) + + @typing_extensions.override + def from_transfer_type( + self, + value: temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata, + type_hint: type[UserMetadata], + ) -> UserMetadata: + return UserMetadata( + static_summary=_support.payload_from_proto(value.summary) + if value.HasField("summary") + else None, + static_details=_support.payload_from_proto(value.details) + if value.HasField("details") + else None, + ) + + @typing_extensions.override + def to_transfer_type( + self, + value: UserMetadata, + ) -> temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata: + message = temporalio.api.sdk.v1.user_metadata_pb2.UserMetadata() + if value.static_summary is not None: + message.summary.CopyFrom(_support.payload_to_proto(value.static_summary)) + if value.static_details is not None: + message.details.CopyFrom(_support.payload_to_proto(value.static_details)) + return message + + +temporalio.converter.transfer_type_convertible(_UserMetadataTransferTypeConverter)( + UserMetadata +) # pyright: ignore[reportUnusedCallResult] + + +@dataclasses.dataclass(slots=True) +class SignalWithStartWorkflowResponse: + """ + .. warning:: + This API is experimental and subject to change. + """ + + run_id: str | None = None + started: bool | None = None + + +class _SignalWithStartWorkflowResponseTransferTypeConverter( + temporalio.converter.TransferTypeConverter[ + SignalWithStartWorkflowResponse, + temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse, + ] +): + transfer_type: ( + type[ + temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse + ] + | None + ) = temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse + + @typing_extensions.override + def from_transfer_type( + self, + value: temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse, + type_hint: type[SignalWithStartWorkflowResponse], + ) -> SignalWithStartWorkflowResponse: + return SignalWithStartWorkflowResponse( + run_id=value.run_id if bool(value.run_id) else None, + started=value.started if bool(value.started) else None, + ) + + @typing_extensions.override + def to_transfer_type( + self, + value: SignalWithStartWorkflowResponse, + ) -> temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse: + message = temporalio.api.workflowservice.v1.request_response_pb2.SignalWithStartWorkflowExecutionResponse() + if value.run_id is not None: + message.run_id = value.run_id + if value.started is not None: + message.started = value.started + return message + + +temporalio.converter.transfer_type_convertible( + _SignalWithStartWorkflowResponseTransferTypeConverter +)(SignalWithStartWorkflowResponse) # pyright: ignore[reportUnusedCallResult] diff --git a/temporalio/nexus/system/workflow_service/operations/__init__.py b/temporalio/nexus/system/workflow_service/operations/__init__.py new file mode 100644 index 0000000000..ff561b55c0 --- /dev/null +++ b/temporalio/nexus/system/workflow_service/operations/__init__.py @@ -0,0 +1,3 @@ +# Generated by nexgen v0.2.8. DO NOT EDIT! + +from __future__ import annotations diff --git a/temporalio/nexus/system/workflow_service/operations/signal_with_start_workflow.py b/temporalio/nexus/system/workflow_service/operations/signal_with_start_workflow.py new file mode 100644 index 0000000000..28b4735436 --- /dev/null +++ b/temporalio/nexus/system/workflow_service/operations/signal_with_start_workflow.py @@ -0,0 +1,655 @@ +# Generated by nexgen v0.2.8. DO NOT EDIT! + +from __future__ import annotations + +import collections.abc +import datetime +import typing + +import typing_extensions + +import temporalio.common + +if typing.TYPE_CHECKING: + from temporalio.workflow import ExternalWorkflowHandle + +from ..models import ( + SignalWithStartWorkflowRequest, + SignalWithStartWorkflowResponse, + UserMetadata, +) + +SelfType = typing.TypeVar("SelfType") +SignalArg = typing.TypeVar("SignalArg") +WorkflowResult = typing.TypeVar("WorkflowResult") +WorkflowArgs = typing_extensions.TypeVarTuple("WorkflowArgs") + + +async def _signal_with_start_workflow( + request: SignalWithStartWorkflowRequest, +) -> ExternalWorkflowHandle[typing.Any]: + from temporalio.workflow import ( + create_nexus_client, + get_external_workflow_handle, + ) + + nexus_client = create_nexus_client( + service="temporal.api.workflowservice.v1.WorkflowService", + endpoint="__temporal_system", + ) + handle = await nexus_client.start_operation( + operation="SignalWithStartWorkflowExecution", + input=request, + output_type=SignalWithStartWorkflowResponse, + ) + result = await handle + return get_external_workflow_handle(request.id, run_id=result.run_id) + + +# Overload case: +# - workflow name with positional workflow arguments +# - signal name with optional list-form signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: str, + *args: object, + id: str, + task_queue: str, + signal: str, + signal_args: list[typing.Any] | None = ..., + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[object]: ... + + +# Overload case: +# - workflow name with positional workflow arguments +# - signal method callable with no signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: str, + *args: object, + id: str, + task_queue: str, + signal: collections.abc.Callable[ + [SelfType], None | collections.abc.Awaitable[None] + ], + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow name with positional workflow arguments +# - signal method callable with a typed single signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: str, + *args: object, + id: str, + task_queue: str, + signal: collections.abc.Callable[ + [SelfType, SignalArg], None | collections.abc.Awaitable[None] + ], + signal_args: SignalArg, + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow name with positional workflow arguments +# - signal callable with list-form signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: str, + *args: object, + id: str, + task_queue: str, + signal: collections.abc.Callable[..., None | collections.abc.Awaitable[None]], + signal_args: list[typing.Any], + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[object]: ... + + +# Overload case: +# - workflow name with optional list-form workflow arguments +# - signal name with optional list-form signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: str, + *, + args: list[typing.Any] | None = ..., + id: str, + task_queue: str, + signal: str, + signal_args: list[typing.Any] | None = ..., + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[object]: ... + + +# Overload case: +# - workflow name with optional list-form workflow arguments +# - signal method callable with no signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: str, + *, + args: list[typing.Any] | None = ..., + id: str, + task_queue: str, + signal: collections.abc.Callable[ + [SelfType], None | collections.abc.Awaitable[None] + ], + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow name with optional list-form workflow arguments +# - signal method callable with a typed single signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: str, + *, + args: list[typing.Any] | None = ..., + id: str, + task_queue: str, + signal: collections.abc.Callable[ + [SelfType, SignalArg], None | collections.abc.Awaitable[None] + ], + signal_args: SignalArg, + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow name with optional list-form workflow arguments +# - signal callable with list-form signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: str, + *, + args: list[typing.Any] | None = ..., + id: str, + task_queue: str, + signal: collections.abc.Callable[..., None | collections.abc.Awaitable[None]], + signal_args: list[typing.Any], + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[object]: ... + + +# Overload case: +# - workflow method callable with typed positional workflow arguments +# - signal name with optional list-form signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: collections.abc.Callable[ + [SelfType, typing_extensions.Unpack[WorkflowArgs]], + collections.abc.Awaitable[WorkflowResult], + ], + *args: typing_extensions.Unpack[WorkflowArgs], + id: str, + task_queue: str, + signal: str, + signal_args: list[typing.Any] | None = ..., + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow method callable with typed positional workflow arguments +# - signal method callable with no signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: collections.abc.Callable[ + [SelfType, typing_extensions.Unpack[WorkflowArgs]], + collections.abc.Awaitable[WorkflowResult], + ], + *args: typing_extensions.Unpack[WorkflowArgs], + id: str, + task_queue: str, + signal: collections.abc.Callable[ + [SelfType], None | collections.abc.Awaitable[None] + ], + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow method callable with typed positional workflow arguments +# - signal method callable with a typed single signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: collections.abc.Callable[ + [SelfType, typing_extensions.Unpack[WorkflowArgs]], + collections.abc.Awaitable[WorkflowResult], + ], + *args: typing_extensions.Unpack[WorkflowArgs], + id: str, + task_queue: str, + signal: collections.abc.Callable[ + [SelfType, SignalArg], None | collections.abc.Awaitable[None] + ], + signal_args: SignalArg, + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow method callable with typed positional workflow arguments +# - signal callable with list-form signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: collections.abc.Callable[ + [SelfType, typing_extensions.Unpack[WorkflowArgs]], + collections.abc.Awaitable[WorkflowResult], + ], + *args: typing_extensions.Unpack[WorkflowArgs], + id: str, + task_queue: str, + signal: collections.abc.Callable[..., None | collections.abc.Awaitable[None]], + signal_args: list[typing.Any], + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow method callable with list-form workflow arguments +# - signal name with optional list-form signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: collections.abc.Callable[ + [SelfType, typing_extensions.Unpack[WorkflowArgs]], + collections.abc.Awaitable[WorkflowResult], + ], + *, + args: list[typing.Any], + id: str, + task_queue: str, + signal: str, + signal_args: list[typing.Any] | None = ..., + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow method callable with list-form workflow arguments +# - signal method callable with no signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: collections.abc.Callable[ + [SelfType, typing_extensions.Unpack[WorkflowArgs]], + collections.abc.Awaitable[WorkflowResult], + ], + *, + args: list[typing.Any], + id: str, + task_queue: str, + signal: collections.abc.Callable[ + [SelfType], None | collections.abc.Awaitable[None] + ], + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow method callable with list-form workflow arguments +# - signal method callable with a typed single signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: collections.abc.Callable[ + [SelfType, typing_extensions.Unpack[WorkflowArgs]], + collections.abc.Awaitable[WorkflowResult], + ], + *, + args: list[typing.Any], + id: str, + task_queue: str, + signal: collections.abc.Callable[ + [SelfType, SignalArg], None | collections.abc.Awaitable[None] + ], + signal_args: SignalArg, + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +# Overload case: +# - workflow method callable with list-form workflow arguments +# - signal callable with list-form signal arguments +@typing.overload +async def signal_with_start_workflow( + workflow: collections.abc.Callable[ + [SelfType, typing_extensions.Unpack[WorkflowArgs]], + collections.abc.Awaitable[WorkflowResult], + ], + *, + args: list[typing.Any], + id: str, + task_queue: str, + signal: collections.abc.Callable[..., None | collections.abc.Awaitable[None]], + signal_args: list[typing.Any], + execution_timeout: datetime.timedelta | None = ..., + run_timeout: datetime.timedelta | None = ..., + task_timeout: datetime.timedelta | None = ..., + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ..., + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = ..., + retry_policy: temporalio.common.RetryPolicy | None = ..., + cron_schedule: str | None = ..., + memo: collections.abc.Mapping[str, typing.Any] | None = ..., + search_attributes: temporalio.common.TypedSearchAttributes | None = ..., + priority: temporalio.common.Priority | None = ..., + versioning_override: temporalio.common.VersioningOverride | None = ..., + start_delay: datetime.timedelta | None = ..., + static_summary: str | None = ..., + static_details: str | None = ..., +) -> ExternalWorkflowHandle[SelfType]: ... + + +async def signal_with_start_workflow( + workflow: str | collections.abc.Callable[..., collections.abc.Awaitable[object]], + *positional_args: object, + args: list[typing.Any] | None = None, + id: str, + task_queue: str, + signal: str | collections.abc.Callable[..., None | collections.abc.Awaitable[None]], + signal_args: object | list[typing.Any] | None = None, + execution_timeout: datetime.timedelta | None = None, + run_timeout: datetime.timedelta | None = None, + task_timeout: datetime.timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = ( + temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE + ), + id_conflict_policy: temporalio.common.WorkflowIDConflictPolicy | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str | None = None, + memo: collections.abc.Mapping[str, typing.Any] | None = None, + search_attributes: temporalio.common.TypedSearchAttributes | None = None, + priority: temporalio.common.Priority | None = None, + versioning_override: temporalio.common.VersioningOverride | None = None, + start_delay: datetime.timedelta | None = None, + static_summary: str | None = None, + static_details: str | None = None, +) -> ExternalWorkflowHandle[typing.Any]: + """Signal a workflow, starting it first if needed. + + .. warning:: + This API is experimental and subject to change. + + Args: + workflow: Workflow type name or callable identifying the workflow to start. + positional_args: Positional arguments for workflow. Cannot be set if args is + set. + args: List-form arguments for workflow. Cannot be set if positional_args are + set. For typed workflow callables, list contents are not statically + typechecked; pass workflow arguments positionally for precise typechecking. + id: Unique identifier for the workflow execution. Must be nonempty. + task_queue: Task queue to run the workflow on. + signal: Signal name or callable to send with the start request. + signal_args: Argument value, or list of argument values, for signal. For typed + single-argument signals, scalar signal_args values are statically + typechecked. List-form signal_args values are not precisely typechecked. To + pass a single signal argument that is itself a list, wrap it in another + list; otherwise the list is interpreted as multiple signal arguments. + execution_timeout: Total workflow execution timeout, including retries and + continue-as-new. Defaults to unlimited. + run_timeout: Timeout of a single workflow run. Defaults to the workflow + execution timeout. + task_timeout: Timeout of a single workflow task. Defaults to 10 seconds. + id_reuse_policy: Behavior when a closed workflow with the same ID exists. + Default is allow-duplicate. + id_conflict_policy: Behavior when a workflow is currently running with the same + ID. Set to use-existing for idempotent deduplication on workflow ID. Cannot + be set if id-reuse-policy is terminate-if-running. Defaults to use-existing. + retry_policy: Retry policy for the workflow. + cron_schedule: Cron schedule for recurring workflow executions. See + https://docs.temporal.io/cron-job. + memo: Memo for the workflow. + search_attributes: Typed search attributes for the workflow. + priority: Priority of the workflow execution. + versioning_override: Override for workflow versioning behavior. + start_delay: Amount of time to wait before starting the workflow. This does not + work with cron-schedule. + static_summary: Single-line fixed summary for the workflow execution that may + appear in UI and CLI. This can be in single-line Temporal Markdown format. + static_details: General fixed details for the workflow execution that may appear + in UI and CLI. This can be in Temporal Markdown format and can span multiple + lines. This value is fixed on the workflow execution and cannot be updated. + + Returns: + A workflow handle to the started workflow. + """ + if positional_args and args is not None: + raise TypeError("cannot specify both positional arguments and args") + normalized_args: list[typing.Any] | None = ( + list(positional_args) if positional_args else args + ) + normalized_signal_args: list[typing.Any] | None + if signal_args is None: + normalized_signal_args = None + elif isinstance(signal_args, list): + normalized_signal_args = typing.cast(list[typing.Any], signal_args) + else: + normalized_signal_args = [signal_args] + user_metadata = ( + None + if static_summary is None and static_details is None + else UserMetadata( + static_summary=static_summary, + static_details=static_details, + ) + ) + request = SignalWithStartWorkflowRequest( + workflow=workflow, + args=normalized_args, + id=id, + task_queue=task_queue, + signal=signal, + signal_args=normalized_signal_args, + execution_timeout=execution_timeout, + run_timeout=run_timeout, + task_timeout=task_timeout, + id_reuse_policy=id_reuse_policy, + id_conflict_policy=id_conflict_policy, + retry_policy=retry_policy, + cron_schedule=cron_schedule, + memo=memo, + search_attributes=search_attributes, + priority=priority, + versioning_override=versioning_override, + start_delay=start_delay, + user_metadata=user_metadata, + ) + return await _signal_with_start_workflow(request) diff --git a/temporalio/nexus/system/workflow_service/services.py b/temporalio/nexus/system/workflow_service/services.py new file mode 100644 index 0000000000..c95fff35ad --- /dev/null +++ b/temporalio/nexus/system/workflow_service/services.py @@ -0,0 +1,24 @@ +# Generated by nexgen v0.2.8. DO NOT EDIT! + +from __future__ import annotations + +from nexusrpc import Operation, service + +from .models import ( + SignalWithStartWorkflowRequest, + SignalWithStartWorkflowResponse, +) + + +@service(name="temporal.api.workflowservice.v1.WorkflowService") +class WorkflowService: + """ + .. warning:: + This API is experimental and subject to change. + """ + + # .. warning:: This API is experimental and subject to change. + signal_with_start_workflow: Operation[ + SignalWithStartWorkflowRequest, + SignalWithStartWorkflowResponse, + ] = Operation(name="SignalWithStartWorkflowExecution") diff --git a/temporalio/plugin.py b/temporalio/plugin.py index 9202bc1f3e..4aafd35ec1 100644 --- a/temporalio/plugin.py +++ b/temporalio/plugin.py @@ -8,10 +8,8 @@ from contextlib import AbstractAsyncContextManager, asynccontextmanager from typing import ( Any, - Optional, - Type, + TypeAlias, TypeVar, - Union, cast, ) @@ -31,7 +29,7 @@ T = TypeVar("T") -PluginParameter = Union[None, T, Callable[[Optional[T]], T]] +PluginParameter: TypeAlias = None | T | Callable[[T | None], T] class SimplePlugin(temporalio.client.Plugin, temporalio.worker.Plugin): @@ -43,17 +41,16 @@ def __init__( self, name: str, *, + version: str = "", data_converter: PluginParameter[temporalio.converter.DataConverter] = None, - client_interceptors: PluginParameter[ - Sequence[temporalio.client.Interceptor] - ] = None, + interceptors: Sequence[ + temporalio.client.Interceptor | temporalio.worker.Interceptor + ] + | None = None, activities: PluginParameter[Sequence[Callable]] = None, nexus_service_handlers: PluginParameter[Sequence[Any]] = None, workflows: PluginParameter[Sequence[type]] = None, workflow_runner: PluginParameter[WorkflowRunner] = None, - worker_interceptors: PluginParameter[ - Sequence[temporalio.worker.Interceptor] - ] = None, workflow_failure_exception_types: PluginParameter[ Sequence[type[BaseException]] ] = None, @@ -66,11 +63,13 @@ def __init__( Args: name: The name of the plugin. + version: The version of the plugin, reported in worker heartbeats. data_converter: Data converter for serialization, or callable to customize existing one. Applied to the Client and Replayer. - client_interceptors: Client interceptors to append, or callable to customize existing ones. - Applied to the Client. Note, if the provided interceptor is also a worker.Interceptor, - it will be added to any worker which uses that client. + interceptors: Interceptors to append. + Client interceptors are applied to the Client, worker interceptors are applied + to the Worker and Replayer. Interceptors that implement both interfaces will + be applied to both, with exactly one instance used per worker to avoid duplication. activities: Activity functions to append, or callable to customize existing ones. Applied to the Worker. nexus_service_handlers: Nexus service handlers to append, or callable to customize existing ones. @@ -79,8 +78,6 @@ def __init__( Applied to the Worker and Replayer. workflow_runner: Workflow runner, or callable to customize existing one. Applied to the Worker and Replayer. - worker_interceptors: Worker interceptors to append, or callable to customize existing ones. - Applied to the Worker and Replayer. workflow_failure_exception_types: Exception types for workflow failures to append, or callable to customize existing ones. Applied to the Worker and Replayer. run_context: A place to run custom code to wrap around the Worker (or Replayer) execution. @@ -90,13 +87,13 @@ def __init__( A configured Plugin instance. """ self._name = name + self._version = version self.data_converter = data_converter - self.client_interceptors = client_interceptors + self.interceptors = interceptors self.activities = activities self.nexus_service_handlers = nexus_service_handlers self.workflows = workflows self.workflow_runner = workflow_runner - self.worker_interceptors = worker_interceptors self.workflow_failure_exception_types = workflow_failure_exception_types self.run_context = run_context @@ -104,6 +101,10 @@ def name(self) -> str: """See base class.""" return self._name + def version(self) -> str: + """See base class.""" + return self._version + def configure_client(self, config: ClientConfig) -> ClientConfig: """See base class.""" data_converter = _resolve_parameter( @@ -112,11 +113,22 @@ def configure_client(self, config: ClientConfig) -> ClientConfig: if data_converter: config["data_converter"] = data_converter - interceptors = _resolve_append_parameter( - config.get("interceptors"), self.client_interceptors + # Resolve the combined interceptors first, then filter to client ones + all_interceptors = _resolve_append_parameter( + cast( + Sequence[temporalio.client.Interceptor | temporalio.worker.Interceptor] + | None, + config.get("interceptors"), + ), + self.interceptors, ) - if interceptors is not None: - config["interceptors"] = interceptors + if all_interceptors is not None: + client_interceptors = [ + interceptor + for interceptor in all_interceptors + if isinstance(interceptor, temporalio.client.Interceptor) + ] + config["interceptors"] = client_interceptors return config @@ -152,11 +164,24 @@ def configure_worker(self, config: WorkerConfig) -> WorkerConfig: if workflow_runner: config["workflow_runner"] = workflow_runner - interceptors = _resolve_append_parameter( - config.get("interceptors"), self.worker_interceptors - ) - if interceptors is not None: - config["interceptors"] = interceptors + if self.interceptors is not None: + client_interceptors_list = ( + config["client"].config(active_config=True).get("interceptors", []) # type:ignore[reportTypedDictNotRequiredAccess] + ) + + # Exclude any already registered interceptors and client only interceptors + worker_interceptors = [ + interceptor + for interceptor in self.interceptors + if isinstance(interceptor, temporalio.worker.Interceptor) + and interceptor not in client_interceptors_list + ] + + provided_interceptors = _resolve_append_parameter( + config.get("interceptors"), worker_interceptors + ) + if provided_interceptors is not None: + config["interceptors"] = provided_interceptors failure_exception_types = _resolve_append_parameter( config.get("workflow_failure_exception_types"), @@ -185,11 +210,21 @@ def configure_replayer(self, config: ReplayerConfig) -> ReplayerConfig: if workflow_runner: config["workflow_runner"] = workflow_runner - interceptors = _resolve_append_parameter( - config.get("interceptors"), self.worker_interceptors + all_interceptors = _resolve_append_parameter( + cast( + Sequence[temporalio.client.Interceptor | temporalio.worker.Interceptor] + | None, + config.get("interceptors"), + ), + self.interceptors, ) - if interceptors is not None: - config["interceptors"] = interceptors + if all_interceptors is not None: + worker_interceptors = [ + interceptor + for interceptor in all_interceptors + if isinstance(interceptor, temporalio.worker.Interceptor) + ] + config["interceptors"] = worker_interceptors failure_exception_types = _resolve_append_parameter( config.get("workflow_failure_exception_types"), @@ -234,7 +269,7 @@ def _resolve_parameter(existing: T | None, parameter: PluginParameter[T]) -> T | if parameter is None: return existing elif callable(parameter): - return cast(Callable[[Optional[T]], Optional[T]], parameter)(existing) + return cast(Callable[[T | None], T | None], parameter)(existing) else: return parameter @@ -245,8 +280,8 @@ def _resolve_append_parameter( if parameter is None: return existing elif callable(parameter): - return cast( - Callable[[Optional[Sequence[T]]], Optional[Sequence[T]]], parameter - )(existing) + return cast(Callable[[Sequence[T] | None], Sequence[T] | None], parameter)( + existing + ) else: return list(existing or []) + list(parameter) diff --git a/temporalio/runtime.py b/temporalio/runtime.py index f0fc7ec309..e808f3dbfa 100644 --- a/temporalio/runtime.py +++ b/temporalio/runtime.py @@ -12,9 +12,7 @@ ClassVar, Generic, NewType, - Optional, TypeVar, - Union, ) from typing_extensions import Protocol, Self @@ -38,7 +36,6 @@ def default(self) -> Runtime: "Cannot create default Runtime after Runtime.prevent_default has been called" ) self._default_runtime = Runtime(telemetry=TelemetryConfig()) - self._default_created = True return self._default_runtime def prevent_default(self): @@ -67,9 +64,13 @@ class Runtime: :py:meth:`set_default`. Every time a new runtime is created, a new internal thread pool is created. - Runtimes do not work across forks. Advanced users should consider using - :py:meth:`prevent_default` and :py:meth:`set_default` to ensure each - fork creates it's own runtime. + .. warning:: + Create a separate runtime in each process after forking. Creating a + runtime before forking can retain inherited native memory and file + descriptors in the child until it exits, even after the inherited + runtime is garbage collected. Use :py:meth:`prevent_default` and + :py:meth:`set_default` to control when each process creates its default + runtime. """ @@ -121,6 +122,7 @@ def __init__( *, telemetry: TelemetryConfig, worker_heartbeat_interval: timedelta | None = timedelta(seconds=60), + disable_environment_info: bool = False, ) -> None: """Create a runtime with the provided configuration. @@ -131,6 +133,8 @@ def __init__( ``runtime_options``. worker_heartbeat_interval: Interval for worker heartbeats. ``None`` disables heartbeating. Interval must be between 1s and 60s. + disable_environment_info: Whether to omit runtime, hosting, and + platform information from worker heartbeats. Raises: ValueError: If both ```runtime_options`` is a negative value. @@ -145,6 +149,7 @@ def __init__( runtime_options = temporalio.bridge.runtime.RuntimeOptions( telemetry=telemetry._to_bridge_config(), worker_heartbeat_interval_millis=heartbeat_millis, + disable_environment_info=disable_environment_info, ) self._core_runtime = temporalio.bridge.runtime.Runtime(options=runtime_options) @@ -183,6 +188,7 @@ def formatted(self) -> str: # We intentionally aren't using __str__ or __format__ so they can keep # their original dataclass impls targets = [ + "temporalio_common", "temporalio_sdk_core", "temporalio_client", "temporalio_sdk", @@ -193,6 +199,14 @@ def formatted(self) -> str: return ",".join(parts) +class LoggingFormat(Enum): + """Format for Core logs written to the console.""" + + COMPACT = "compact" + PRETTY = "pretty" + JSON = "json" + + @dataclass(frozen=True) class LoggingConfig: """Configuration for runtime logging.""" @@ -205,6 +219,11 @@ class LoggingConfig: See the :py:class:`LogForwardingConfig` docs for more info. """ + format: LoggingFormat | None = None + """Format for Core logs written to the console. This is ignored when + :py:attr:`forwarding` is set. If unset, this defaults to compact output. + """ + default: ClassVar[LoggingConfig] """Default logging configuration of Core WARN level and other ERROR level. @@ -216,6 +235,7 @@ def _to_bridge_config(self) -> temporalio.bridge.runtime.LoggingConfig: if isinstance(self.filter, str) else self.filter.formatted(), forward_to=None if not self.forwarding else self.forwarding._on_logs, + format=None if not self.format else self.format.value, ) @@ -319,7 +339,30 @@ class OpenTelemetryMetricTemporality(Enum): @dataclass(frozen=True) class OpenTelemetryConfig: - """Configuration for OpenTelemetry collector.""" + """Configuration for OpenTelemetry collector. + + Attributes: + url: URL of the OpenTelemetry collector endpoint (e.g. + ``"http://localhost:4317"`` for gRPC or + ``"http://localhost:4318/v1/metrics"`` for HTTP). + headers: Optional headers to include with each export request. + Useful for authentication tokens or routing metadata. + metric_periodicity: How often metrics are exported to the collector. + Defaults to 1s (set by sdk-core) when ``None``. + metric_temporality: Whether metrics are exported as cumulative + or delta values. Defaults to ``CUMULATIVE``. + durations_as_seconds: If ``True``, export duration metrics as + floating-point seconds instead of integer milliseconds. + Defaults to ``False``. + http: If ``True``, use HTTP/protobuf transport instead of gRPC. + When enabled, the ``url`` should point to the HTTP endpoint + (e.g. ``"http://localhost:4318/v1/metrics"``). + Defaults to ``False`` (gRPC). + histogram_bucket_overrides: Override the default histogram bucket + boundaries for specific metrics. Keys are metric names and + values are sequences of bucket boundaries (e.g. + ``{"workflow_task_schedule_to_start_latency": [0.01, 0.05, 0.1, 0.5, 1.0, 5.0]}``). + """ url: str headers: Mapping[str, str] | None = None @@ -329,6 +372,7 @@ class OpenTelemetryConfig: ) durations_as_seconds: bool = False http: bool = False + histogram_bucket_overrides: Mapping[str, Sequence[float]] | None = None def _to_bridge_config(self) -> temporalio.bridge.runtime.OpenTelemetryConfig: return temporalio.bridge.runtime.OpenTelemetryConfig( @@ -344,12 +388,34 @@ def _to_bridge_config(self) -> temporalio.bridge.runtime.OpenTelemetryConfig: ), durations_as_seconds=self.durations_as_seconds, http=self.http, + histogram_bucket_overrides=self.histogram_bucket_overrides, ) @dataclass(frozen=True) class PrometheusConfig: - """Configuration for Prometheus metrics endpoint.""" + """Configuration for Prometheus metrics endpoint. + + Starts an HTTP server on the given address that exposes a ``/metrics`` + endpoint for Prometheus scraping. + + Attributes: + bind_address: Address to bind the metrics HTTP server to (e.g. + ``"0.0.0.0:9000"`` or ``"127.0.0.1:9090"``). Prometheus + will scrape ``http:///metrics``. + counters_total_suffix: If ``True``, append ``_total`` suffix to + counter metric names, following the OpenMetrics convention. + Defaults to ``False``. + unit_suffix: If ``True``, append unit suffixes (e.g. ``_seconds``, + ``_bytes``) to metric names. Defaults to ``False``. + durations_as_seconds: If ``True``, report duration metrics as + floating-point seconds instead of integer milliseconds. + Defaults to ``False``. + histogram_bucket_overrides: Override the default histogram bucket + boundaries for specific metrics. Keys are metric names and + values are sequences of bucket boundaries (e.g. + ``{"workflow_task_schedule_to_start_latency": [0.01, 0.05, 0.1, 0.5, 1.0, 5.0]}``). + """ bind_address: str counters_total_suffix: bool = False diff --git a/temporalio/service.py b/temporalio/service.py index 4650036286..afcb8fb5b9 100644 --- a/temporalio/service.py +++ b/temporalio/service.py @@ -12,7 +12,7 @@ from dataclasses import dataclass, field from datetime import timedelta from enum import IntEnum -from typing import ClassVar, Optional, Tuple, Type, TypeVar, Union +from typing import ClassVar, TypeVar import google.protobuf.message @@ -22,8 +22,9 @@ import temporalio.bridge.services_generated import temporalio.exceptions import temporalio.runtime +from temporalio.bridge.client import RPCError as BridgeRPCError -__version__ = "1.21.1" +__version__ = "1.36.1" ServiceRequest = TypeVar("ServiceRequest", bound=google.protobuf.message.Message) ServiceResponse = TypeVar("ServiceResponse", bound=google.protobuf.message.Message) @@ -42,7 +43,9 @@ class TLSConfig: """Root CA to validate the server certificate against.""" domain: str | None = None - """TLS domain.""" + """SNI host and HTTP/2 authority override, and the default name the server + certificate is verified against (see + :py:attr:`verification_server_name`).""" client_cert: bytes | None = None """Client certificate for mTLS. @@ -54,12 +57,26 @@ class TLSConfig: This must be combined with :py:attr:`client_cert`.""" + verification_server_name: str | None = None + """Name to verify the server certificate against, instead of the + :py:attr:`domain` / connected host. + + Unlike :py:attr:`domain`, this does not change the TLS SNI or HTTP/2 + authority values, which continue to follow the connected host (or + :py:attr:`domain` if set). Use this when the server's certificate does not + carry the name being dialed, e.g. when the connection traverses an + SNI-inspecting proxy that must be able to resolve the SNI value. + + Requires :py:attr:`server_root_ca_cert`; the system root store is not + consulted when this is set.""" + def _to_bridge_config(self) -> temporalio.bridge.client.ClientTlsConfig: return temporalio.bridge.client.ClientTlsConfig( server_root_ca_cert=self.server_root_ca_cert, domain=self.domain, client_cert=self.client_cert, client_private_key=self.client_private_key, + verification_server_name=self.verification_server_name, ) @@ -131,6 +148,80 @@ def _to_bridge_config( ) +@dataclass(frozen=True) +class DnsLoadBalancingConfig: + """DNS load balancing configuration for client connections. + + When enabled, Core periodically re-resolves the target host's DNS records + and round-robins requests across the resolved addresses. Cannot be used + together with :py:class:`HttpConnectProxyConfig` -- DNS load balancing is + silently disabled when an HTTP CONNECT proxy is configured. + """ + + resolution_interval_millis: int = 30000 + """How often to re-resolve DNS, in milliseconds.""" + default: ClassVar[DnsLoadBalancingConfig] + """Default DNS load balancing config.""" + + def _to_bridge_config( + self, + ) -> temporalio.bridge.client.ClientDnsLoadBalancingConfig: + return temporalio.bridge.client.ClientDnsLoadBalancingConfig( + resolution_interval_millis=self.resolution_interval_millis, + ) + + +DnsLoadBalancingConfig.default = DnsLoadBalancingConfig() + + +class GrpcCompression(ABC): + """Transport-level gRPC compression mode. + + This is a base type for concrete compression modes. Current modes are + available as singleton constants on this class. + """ + + NONE: ClassVar[GrpcCompression] + """Do not compress gRPC requests or advertise support for compressed responses.""" + + GZIP: ClassVar[GrpcCompression] + """Gzip-compress gRPC requests and accept gzip-compressed responses.""" + + @abstractmethod + def _to_bridge_config(self) -> str: + raise NotImplementedError + + +@dataclass(frozen=True) +class _NoGrpcCompression(GrpcCompression): + def _to_bridge_config(self) -> str: + return "none" + + +@dataclass(frozen=True) +class _GzipGrpcCompression(GrpcCompression): + def _to_bridge_config(self) -> str: + return "gzip" + + +GrpcCompression.NONE = _NoGrpcCompression() +GrpcCompression.GZIP = _GzipGrpcCompression() + + +@dataclass(frozen=True) +class PayloadLimitsConfig: + """Warning thresholds for outbound payload/memo sizes.""" + + # Defaults mirror the Temporal server's `limit.blobSize.warn` (512 KiB) and `limit.memoSize.warn` + # (2 KiB) dynamic-config defaults, so the SDK warns at the same sizes the server would. + payloads_warn_size: int = 512 * 1024 + """Warning threshold, in bytes, for the size of an outbound payload-bearing field. Set to 0 to + disable.""" + + memo_warn_size: int = 2 * 1024 + """Warning threshold, in bytes, for outbound memo size. Set to 0 to disable.""" + + @dataclass class ConnectConfig: """Config for connecting to the server.""" @@ -145,6 +236,10 @@ class ConnectConfig: lazy: bool = False runtime: temporalio.runtime.Runtime | None = None http_connect_proxy_config: HttpConnectProxyConfig | None = None + dns_load_balancing_config: DnsLoadBalancingConfig | None = None + grpc_compression: GrpcCompression = GrpcCompression.GZIP + payload_limits: PayloadLimitsConfig = field(default_factory=PayloadLimitsConfig) + connect_timeout: timedelta | None = None def __post_init__(self) -> None: """Set extra defaults on unset properties.""" @@ -193,6 +288,11 @@ def _to_bridge_config(self) -> temporalio.bridge.client.ClientConfig: if self.keep_alive_config else None ), + connect_timeout_millis=( + int(self.connect_timeout.total_seconds() * 1000) + if self.connect_timeout is not None + else None + ), metadata=self.rpc_metadata, identity=self.identity, client_name="temporal-python", @@ -202,6 +302,14 @@ def _to_bridge_config(self) -> temporalio.bridge.client.ClientConfig: if self.http_connect_proxy_config else None ), + dns_load_balancing_config=( + self.dns_load_balancing_config._to_bridge_config() + if self.dns_load_balancing_config + else None + ), + grpc_compression=self.grpc_compression._to_bridge_config(), + payloads_warn_size=self.payload_limits.payloads_warn_size, + memo_warn_size=self.payload_limits.memo_warn_size, ) @@ -316,8 +424,16 @@ def __init__(self, config: ConnectConfig) -> None: self._bridge_config = config._to_bridge_config() self._bridge_client: temporalio.bridge.client.Client | None = None self._bridge_client_connect_lock = asyncio.Lock() + # Runtime we connected with, so the default one if none was set + self._runtime: temporalio.runtime.Runtime | None = None async def _connected_client(self) -> temporalio.bridge.client.Client: + # Fast path avoids touching the lock once connected. This keeps the + # lock off the per-RPC hot path so it never binds to (or is contended + # across) an event loop, letting a connected client be reused from any + # loop. + if self._bridge_client is not None: + return self._bridge_client async with self._bridge_client_connect_lock: if not self._bridge_client: runtime = self.config.runtime or temporalio.runtime.Runtime.default() @@ -325,6 +441,7 @@ async def _connected_client(self) -> temporalio.bridge.client.Client: runtime._core_runtime, self._bridge_config, ) + self._runtime = runtime return self._bridge_client @property @@ -376,7 +493,7 @@ async def _rpc_call( if LOG_PROTOS: logger.debug("Service %s response from %s: %s", service, rpc, resp) return resp - except temporalio.bridge.client.RPCError as err: + except BridgeRPCError as err: # Intentionally swallowing the cause instead of using "from" status, message, details = err.args raise RPCError(message, RPCStatusCode(status), details) diff --git a/temporalio/testing/__init__.py b/temporalio/testing/__init__.py index ac534b9536..0cd652d86b 100644 --- a/temporalio/testing/__init__.py +++ b/temporalio/testing/__init__.py @@ -1,9 +1,12 @@ """Test framework for workflows and activities.""" from ._activity import ActivityEnvironment +from ._timeskipping import TimeSkipper, TimeSkippingConfig from ._workflow import WorkflowEnvironment __all__ = [ "ActivityEnvironment", + "TimeSkipper", "WorkflowEnvironment", + "TimeSkippingConfig", ] diff --git a/temporalio/testing/_activity.py b/temporalio/testing/_activity.py index 99150381cc..6f0a9ab5d5 100644 --- a/temporalio/testing/_activity.py +++ b/temporalio/testing/_activity.py @@ -8,7 +8,7 @@ from collections.abc import Callable from contextlib import contextmanager from datetime import datetime, timedelta, timezone -from typing import Any, Optional, Set, TypeVar +from typing import Any, TypeVar from typing_extensions import ParamSpec @@ -22,29 +22,6 @@ _Params = ParamSpec("_Params") _Return = TypeVar("_Return") -_utc_zero = datetime.fromtimestamp(0).replace(tzinfo=timezone.utc) -_default_info = temporalio.activity.Info( - activity_id="test", - activity_type="unknown", - attempt=1, - current_attempt_scheduled_time=_utc_zero, - heartbeat_details=[], - heartbeat_timeout=None, - is_local=False, - schedule_to_close_timeout=timedelta(seconds=1), - scheduled_time=_utc_zero, - start_to_close_timeout=timedelta(seconds=1), - started_time=_utc_zero, - task_queue="test", - task_token=b"test", - workflow_id="test", - workflow_namespace="default", - workflow_run_id="test-run", - workflow_type="test", - priority=temporalio.common.Priority.default, - retry_policy=None, -) - class ActivityEnvironment: """Activity environment for testing activities. @@ -55,7 +32,8 @@ class ActivityEnvironment: Attributes: info: The info that is returned from :py:func:`temporalio.activity.info` - function. + function. To customize, use :py:meth:`default_info` with + :py:func:`dataclasses.replace` to modify fields. on_heartbeat: Function called on each heartbeat invocation by the activity. payload_converter: Payload converter set on the activity context. This @@ -68,7 +46,7 @@ class ActivityEnvironment: def __init__(self, client: Client | None = None) -> None: """Create an ActivityEnvironment for running activity code.""" - self.info = _default_info + self.info = ActivityEnvironment.default_info() self.on_heartbeat: Callable[..., None] = lambda *args: None self.payload_converter = ( temporalio.converter.DataConverter.default.payload_converter @@ -82,6 +60,38 @@ def __init__(self, client: Client | None = None) -> None: temporalio.activity._ActivityCancellationDetailsHolder() ) + @staticmethod + def default_info() -> temporalio.activity.Info: + """Get the default activity info used for testing. + + Returns a new default Info instance that can be modified using + :py:func:`dataclasses.replace` before assigning to the info attribute. + """ + utc_zero = datetime.fromtimestamp(0).replace(tzinfo=timezone.utc) + return temporalio.activity.Info( + activity_id="test", + activity_type="unknown", + attempt=1, + current_attempt_scheduled_time=utc_zero, + heartbeat_details=[], + heartbeat_timeout=None, + is_local=False, + namespace="default", + schedule_to_close_timeout=timedelta(seconds=1), + scheduled_time=utc_zero, + start_to_close_timeout=timedelta(seconds=1), + started_time=utc_zero, + task_queue="test", + task_token=b"test", + workflow_id="test", + workflow_namespace="default", + workflow_run_id="test-run", + workflow_type="test", + priority=temporalio.common.Priority.default, + retry_policy=None, + activity_run_id=None, + ) + def cancel( self, cancellation_details: temporalio.activity.ActivityCancellationDetails = temporalio.activity.ActivityCancellationDetails( @@ -162,11 +172,11 @@ def __init__( self.context = temporalio.activity._Context( info=lambda: env.info, heartbeat=lambda *args: env.on_heartbeat(*args), - cancelled_event=temporalio.activity._CompositeEvent( + cancelled_event=temporalio.common._CompositeEvent( thread_event=threading.Event(), async_event=asyncio.Event() if self.is_async else None, ), - worker_shutdown_event=temporalio.activity._CompositeEvent( + worker_shutdown_event=temporalio.common._CompositeEvent( thread_event=threading.Event(), async_event=asyncio.Event() if self.is_async else None, ), @@ -182,7 +192,7 @@ def __init__( ) self.task: asyncio.Task | None = None - def run(self, *args, **kwargs) -> Any: + def run(self, *args: Any, **kwargs: Any) -> Any: if self.cancel_thread_raiser: thread_id = threading.current_thread().ident if thread_id is not None: diff --git a/temporalio/testing/_timeskipping.py b/temporalio/testing/_timeskipping.py new file mode 100644 index 0000000000..a5add56da7 --- /dev/null +++ b/temporalio/testing/_timeskipping.py @@ -0,0 +1,372 @@ +"""Per-workflow time-skipping API and testing helper.""" + +from __future__ import annotations + +import uuid +from collections.abc import Iterator +from contextlib import contextmanager +from dataclasses import dataclass +from datetime import datetime, timedelta, timezone +from typing import Any + +import google.protobuf.field_mask_pb2 + +import temporalio.api.common.v1 +import temporalio.api.enums.v1.event_type_pb2 as _event_type +import temporalio.api.workflow.v1 +import temporalio.api.workflowservice.v1 +import temporalio.client +from temporalio.api.enums.v1.time_skipping_pb2 import FastForwardPollingResult + + +@dataclass(frozen=True) +class FastForwardConfig: + """One-shot fast-forward within a :py:class:`TimeSkippingConfig`. + + .. warning:: + This API is experimental and unstable. + """ + + id: str + """Identifies this fast-forward for ``PollWorkflowExecutionTimeSkipping``.""" + + duration: timedelta + """Advance the workflow's virtual time by this amount. Time skipping + auto-disables when the target time is reached.""" + + def _to_proto(self) -> temporalio.api.common.v1.FastForwardConfig: + proto = temporalio.api.common.v1.FastForwardConfig(id=self.id) + proto.duration.FromTimedelta(self.duration) + return proto + + +@dataclass(frozen=True) +class TimeSkippingConfig: + """Per-workflow time skipping configuration. + + .. warning:: + This API is experimental and unstable. + """ + + enabled: bool = True + """Whether time skipping is enabled for the workflow.""" + + fast_forward_config: FastForwardConfig | None = None + """One-shot fast-forward. ``None`` means skip unbounded until completion + (when :py:attr:`enabled` is true) or no skipping at all (when it is false).""" + + disable_propagation: bool = False + """If true, child workflows do not inherit the ``enabled`` flag. Virtual + start time inherits regardless.""" + + max_session_skip_count: int = 0 + """Max skips permitted within one time-skipping session (from when + skipping is enabled until it is disabled). Once reached, the server + auto-disables time skipping. Use ``0`` for server default.""" + + def __post_init__(self) -> None: + """Validates that a fast-forward isn't configured with skipping off.""" + if not self.enabled and self.fast_forward_config is not None: + raise ValueError("fast_forward_config cannot be set when enabled is False") + + def _to_proto(self) -> temporalio.api.common.v1.TimeSkippingConfig: + proto = temporalio.api.common.v1.TimeSkippingConfig( + enabled=self.enabled, + disable_propagation=self.disable_propagation, + max_session_skip_count=self.max_session_skip_count, + ) + if self.fast_forward_config is not None: + proto.fast_forward_config.CopyFrom(self.fast_forward_config._to_proto()) + return proto + + +_TERMINAL_EVENT_TYPES = frozenset( + { + _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED, + _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_FAILED, + _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT, + _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED, + _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED, + _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW, + } +) + + +class TimeSkipper: + """Client wrapper for per-workflow time skipping. + + .. warning:: + This API is experimental and unstable. + + Wraps a client with an interceptor that stamps a ``TimeSkippingConfig`` + on every workflow started through :py:attr:`client`. Use + :py:meth:`fast_forward` to advance a running workflow's virtual clock + (awaited the call to :py:meth:`fast_forward` waits for the fast-forward + to complete and the transition event to fire). + + In tests, the same functionality is available via + :py:class:`WorkflowEnvironment.start_time_skipping_v2`. Use + ``TimeSkipper`` directly outside test environments. + """ + + def __init__( + self, + client: temporalio.client.Client, + *, + config: TimeSkippingConfig = TimeSkippingConfig(), + ) -> None: + """Create a time skipper. + + Args: + client: Client to wrap. A cloned client is created; the original + is untouched. + config: Default config stamped on every workflow started via + :py:attr:`client`. + """ + self._config = config + self._ts_enabled = True + client_config = client.config() + client_config["interceptors"] = [ + *client_config["interceptors"], + _TimeSkippingConfigInterceptor(self), + ] + self._client = temporalio.client.Client(**client_config) + + @property + def client(self) -> temporalio.client.Client: + """Client that stamps time-skipping config on every started workflow.""" + return self._client + + @property + def config(self) -> TimeSkippingConfig: + """Configuration applied to future start_workflow calls.""" + return self._config + + @config.setter + def config(self, value: TimeSkippingConfig) -> None: + self._config = value + + async def fast_forward( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], + duration: timedelta | float | None = None, + /, + ) -> bool: + """Issue a fast-forward on a workflow and wait for it to complete. + + Sends an ``UpdateWorkflowExecutionOptions`` with the new + ``TimeSkippingConfig``. For a bounded ``duration``, long-polls + ``PollWorkflowExecutionTimeSkipping`` for completion, which + follows the workflow across multiple runs. + + Args: + handle: Target workflow execution. + duration: One-shot advance by this amount (``timedelta`` or + seconds as a ``float``). If ``None``, enable unbounded + skipping and wait for the workflow to terminate. + + Returns: + For a bounded ``duration``: True if the fast-forward completes, + False if the workflow chain terminates first. Raises + ``RuntimeError`` if the fast-forward id is overridden by a later + fast-forward. For ``duration=None``: always False (there is no + fast-forward completion to observe; the call waits until the + workflow's terminal event). + """ + if duration is not None and not isinstance(duration, timedelta): + duration = timedelta(seconds=duration) + if duration is None: + return await self._wait_for_unbounded_fast_forward_completion(handle) + fast_forward_id = str(uuid.uuid4()) + await self._update_time_skipping_config( + handle, + TimeSkippingConfig( + enabled=True, + fast_forward_config=FastForwardConfig( + id=fast_forward_id, duration=duration + ), + disable_propagation=self._config.disable_propagation, + max_session_skip_count=self._config.max_session_skip_count, + ), + ) + return await self._poll_fast_forward_completion(handle, fast_forward_id) + + async def _wait_for_unbounded_fast_forward_completion( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], + ) -> bool: + """Enable unbounded time skipping and wait for the workflow to terminate. + + There is no fast-forward id to poll on, so we watch history events + for a terminal event on the current run. Always returns False — + unbounded skipping has no completion event of its own; the wait + ends on the workflow's terminal event. + """ + await self._update_time_skipping_config( + handle, + TimeSkippingConfig( + enabled=True, + disable_propagation=self._config.disable_propagation, + max_session_skip_count=self._config.max_session_skip_count, + ), + ) + async for event in handle.fetch_history_events(wait_new_event=True): + if event.event_type in _TERMINAL_EVENT_TYPES: + return False + return False + + async def _poll_fast_forward_completion( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], + fast_forward_id: str, + ) -> bool: + """Long-poll for a bounded fast-forward to complete. + + Passes ``run_id=""`` so the server resolves to the current run in + the chain (retry / CAN / cron) and follows the FF across the chain + boundary. Retries on server-side long-poll timeout until a + terminal poll result arrives. + """ + req = ( + temporalio.api.workflowservice.v1.PollWorkflowExecutionTimeSkippingRequest( + namespace=self._client.namespace, + workflow_execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=handle.id, + run_id="", + ), + fast_forward_id=fast_forward_id, + ) + ) + while True: + resp = await self._client.workflow_service.poll_workflow_execution_time_skipping( + req, retry=True + ) + if ( + resp.fast_forward_polling_result + == FastForwardPollingResult.FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_COMPLETED + ): + return True + if ( + resp.fast_forward_polling_result + == FastForwardPollingResult.FAST_FORWARD_POLLING_RESULT_FAST_FORWARD_FAILED + ): + # An ID mismatch means this fast-forward was overridden by a laster one, + # so raise in that case; otherwise, return False. + if "fast_forward_id does not match" in resp.failed_reason: + raise RuntimeError( + f"PollWorkflowExecutionTimeSkipping failed for id " + f"{fast_forward_id!r}: {resp.failed_reason}: overridden by a " + "later fast-forward." + ) + return False + + async def get_time_skipping_info( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], + ) -> temporalio.api.common.v1.TimeSkippingInfo | None: + """Fetch a workflow's ``TimeSkippingInfo`` via ``DescribeWorkflowExecution``. + + Returns ``None`` if time skipping has never been enabled on the + workflow. + """ + desc = await handle.describe() + ext = desc.raw_description.workflow_extended_info + if not ext.HasField("time_skipping_info"): + return None + return ext.time_skipping_info + + async def get_current_time( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], + ) -> datetime: + """Get a workflow's current virtual time. + + Reads ``TimeSkippingInfo.current_time`` via + :py:meth:`get_time_skipping_info`. If time skipping has never been + enabled on the workflow, falls back to wall-clock time (the two + coincide when no skipping has ever happened). + """ + tsi = await self.get_time_skipping_info(handle) + if tsi is None: + return datetime.now(timezone.utc) + return tsi.current_time.ToDatetime().replace(tzinfo=timezone.utc) + + async def _update_time_skipping_config( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], + config: TimeSkippingConfig, + ) -> temporalio.api.workflowservice.v1.UpdateWorkflowExecutionOptionsResponse: + """Replace the stored time-skipping config for a running workflow. + + The server accepts the whole ``TimeSkippingConfig`` field only, so + callers must send a complete config. Public callers should use + :py:meth:`fast_forward`. + """ + return await self._client.workflow_service.update_workflow_execution_options( + temporalio.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest( + namespace=self._client.namespace, + workflow_execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=handle.id, + run_id=handle.run_id or "", + ), + workflow_execution_options=temporalio.api.workflow.v1.WorkflowExecutionOptions( + time_skipping_config=config._to_proto(), + ), + update_mask=google.protobuf.field_mask_pb2.FieldMask( + paths=["time_skipping_config"], + ), + identity=self._client.identity, + ), + retry=True, + ) + + @contextmanager + def with_time_skipping_disabled(self) -> Iterator[None]: + """Suspend time-skipping config stamping on newly-started workflows within the block. + + Workflows started via :py:attr:`client` inside the block do not get + their ``time_skipping_config`` set; existing workflows are unaffected. + """ + was_enabled = self._ts_enabled + self._ts_enabled = False + try: + yield None + finally: + self._ts_enabled = was_enabled + + +class _TimeSkippingConfigInterceptor(temporalio.client.Interceptor): + def __init__(self, skipper: TimeSkipper) -> None: + super().__init__() + self._skipper = skipper + + def intercept_client( + self, next: temporalio.client.OutboundInterceptor + ) -> temporalio.client.OutboundInterceptor: + return _TimeSkippingConfigOutbound(next, self._skipper) + + +class _TimeSkippingConfigOutbound(temporalio.client.OutboundInterceptor): + def __init__( + self, + next: temporalio.client.OutboundInterceptor, + skipper: TimeSkipper, + ) -> None: + super().__init__(next) + self._skipper = skipper + + async def start_workflow( + self, input: temporalio.client.StartWorkflowInput + ) -> temporalio.client.WorkflowHandle[Any, Any]: + if self._skipper._ts_enabled: + input.time_skipping_config = self._skipper.config._to_proto() + return await super().start_workflow(input) + + async def start_update_with_start_workflow( + self, input: temporalio.client.StartWorkflowUpdateWithStartInput + ) -> temporalio.client.WorkflowUpdateHandle[Any]: + if self._skipper._ts_enabled: + input.start_workflow_input.time_skipping_config = ( + self._skipper.config._to_proto() + ) + return await super().start_update_with_start_workflow(input) diff --git a/temporalio/testing/_workflow.py b/temporalio/testing/_workflow.py index e651876e97..6c8354162c 100644 --- a/temporalio/testing/_workflow.py +++ b/temporalio/testing/_workflow.py @@ -9,16 +9,14 @@ from datetime import datetime, timedelta, timezone from typing import ( Any, - List, - Optional, - Type, - Union, cast, ) import google.protobuf.empty_pb2 -from typing_extensions import Self +import temporalio.api.common.v1 +import temporalio.api.nexus.v1 +import temporalio.api.operatorservice.v1 import temporalio.api.testservice.v1 import temporalio.bridge.testing import temporalio.client @@ -27,8 +25,11 @@ import temporalio.exceptions import temporalio.runtime import temporalio.service -import temporalio.types import temporalio.worker +from temporalio.testing._timeskipping import ( + TimeSkipper, + TimeSkippingConfig, +) logger = logging.getLogger(__name__) @@ -36,15 +37,18 @@ class WorkflowEnvironment: """Workflow environment for testing workflows. - Most developers will want to use the static :py:meth:`start_time_skipping` - to start a test server process that automatically skips time as needed. - Alternatively, :py:meth:`start_local` may be used for a full, local Temporal - server with more features. To use an existing server, use - :py:meth:`from_client`. + Most developers will want to use one of these static methods: + + - :py:meth:`start_local`: start a local, full-featured Temporal server + - :py:meth:`start_time_skipping_v2`: start a local, full-featured Temporal + server with time-skipping enabled + - :py:meth:`start_time_skipping`: start the older, featured-limited Java + test server + - :py:meth:`from_client`: use an existing server - This environment is an async context manager, so it can be used with - ``async with`` to make sure it shuts down properly. Otherwise, - :py:meth:`shutdown` can be manually called. + This environment is an async context manager, so it can be used with ``async + with`` to make sure it shuts down properly. Otherwise, :py:meth:`shutdown` + can be manually called. To use the environment, simply use the :py:attr:`client` on it. @@ -53,11 +57,12 @@ class WorkflowEnvironment: """ @classmethod - def from_client(cls, client: temporalio.client.Client) -> Self: + def from_client(cls, client: temporalio.client.Client) -> WorkflowEnvironment: """Create a workflow environment from the given client. - :py:attr:`supports_time_skipping` will always return ``False`` for this - environment. :py:meth:`sleep` will sleep the actual amount of time and + :py:attr:`supports_time_skipping_v1` and :py:attr:`supports_time_skipping_v2` + will both return ``False`` for this environment. + :py:meth:`sleep` will sleep the actual amount of time and :py:meth:`get_current_time` will return the current time. Args: @@ -66,7 +71,6 @@ def from_client(cls, client: temporalio.client.Client) -> Self: Returns: The workflow environment that runs against the given client. """ - # Add the assertion interceptor return cls(_client_with_interceptors(client, _AssertionErrorInterceptor())) @classmethod @@ -79,10 +83,10 @@ async def start_local( plugins: Sequence[temporalio.client.Plugin] = [], default_workflow_query_reject_condition: None | (temporalio.common.QueryRejectCondition) = None, - retry_config: temporalio.client.RetryConfig | None = None, + retry_config: temporalio.service.RetryConfig | None = None, rpc_metadata: Mapping[str, str | bytes] = {}, identity: str | None = None, - tls: bool | temporalio.client.TLSConfig = False, + tls: bool | temporalio.service.TLSConfig = False, ip: str = "127.0.0.1", port: int | None = None, download_dest_dir: str | None = None, @@ -96,14 +100,17 @@ async def start_local( dev_server_download_version: str = "default", dev_server_extra_args: Sequence[str] = [], dev_server_download_ttl: timedelta | None = None, + dev_server_startup_timeout: timedelta | None = None, + ui_port: int | None = None, ) -> WorkflowEnvironment: """Start a full Temporal server locally, downloading if necessary. This environment is good for testing full server capabilities, but does - not support time skipping like :py:meth:`start_time_skipping` does. - :py:attr:`supports_time_skipping` will always return ``False`` for this - environment. :py:meth:`sleep` will sleep the actual amount of time and - :py:meth:`get_current_time` will return the current time. + not support time skipping like :py:meth:`start_time_skipping` or + :py:meth:`start_time_skipping_v2` do. :py:attr:`supports_time_skipping_v1` + and :py:attr:`supports_time_skipping_v2` will both return ``False`` for + this environment. :py:meth:`sleep` will sleep the actual amount of time + and :py:meth:`get_current_time` will return the current time. Internally, this uses the Temporal CLI dev server from https://github.com/temporalio/cli. This is a self-contained binary for @@ -154,81 +161,40 @@ async def start_local( dev_server_extra_args: Extra arguments for the CLI binary. dev_server_download_ttl: TTL for the downloaded CLI binary. If unset, it will be cached indefinitely. + dev_server_startup_timeout: Maximum time to wait for the dev server to + become ready after spawning. Defaults to 5 seconds and does not + include download time. + ui_port: UI port to use if UI is enabled. Returns: The started CLI dev server workflow environment. """ - # Use the logger's configured level if none given - if not dev_server_log_level: - if logger.isEnabledFor(logging.DEBUG): - dev_server_log_level = "debug" - elif logger.isEnabledFor(logging.INFO): - dev_server_log_level = "info" - elif logger.isEnabledFor(logging.WARNING): - dev_server_log_level = "warn" - elif logger.isEnabledFor(logging.ERROR): - dev_server_log_level = "error" - else: - dev_server_log_level = "fatal" - # Add search attributes - if search_attributes: - new_args = [] - for attr in search_attributes: - new_args.append("--search-attribute") - new_args.append(f"{attr.name}={attr._metadata_type}") - new_args += dev_server_extra_args - dev_server_extra_args = new_args - # Start CLI dev server - runtime = runtime or temporalio.runtime.Runtime.default() - download_ttl_ms = None - if dev_server_download_ttl is not None: - download_ttl_ms = int(dev_server_download_ttl.total_seconds() * 1000) - server = await temporalio.bridge.testing.EphemeralServer.start_dev_server( - runtime._core_runtime, - temporalio.bridge.testing.DevServerConfig( - existing_path=dev_server_existing_path, - sdk_name="sdk-python", - sdk_version=temporalio.service.__version__, - download_version=dev_server_download_version, - download_dest_dir=download_dest_dir, - namespace=namespace, - ip=ip, - port=port, - database_filename=dev_server_database_filename, - ui=ui, - log_format=dev_server_log_format, - log_level=dev_server_log_level, - extra_args=dev_server_extra_args, - download_ttl_ms=download_ttl_ms, - ), + return await _NonTsWorkflowEnvironment._create( + namespace=namespace, + data_converter=data_converter, + interceptors=interceptors, + plugins=plugins, + default_workflow_query_reject_condition=default_workflow_query_reject_condition, + retry_config=retry_config, + rpc_metadata=rpc_metadata, + identity=identity, + tls=tls, + ip=ip, + port=port, + download_dest_dir=download_dest_dir, + ui=ui, + runtime=runtime, + search_attributes=search_attributes, + dev_server_existing_path=dev_server_existing_path, + dev_server_database_filename=dev_server_database_filename, + dev_server_log_format=dev_server_log_format, + dev_server_log_level=dev_server_log_level, + dev_server_download_version=dev_server_download_version, + dev_server_extra_args=dev_server_extra_args, + dev_server_download_ttl=dev_server_download_ttl, + dev_server_startup_timeout=dev_server_startup_timeout, + ui_port=ui_port, ) - # If we can't connect to the server, we should shut it down - try: - return _EphemeralServerWorkflowEnvironment( - await temporalio.client.Client.connect( - server.target, - namespace=namespace, - data_converter=data_converter, - interceptors=interceptors, - plugins=plugins, - default_workflow_query_reject_condition=default_workflow_query_reject_condition, - tls=tls, - retry_config=retry_config, - rpc_metadata=rpc_metadata, - identity=identity, - runtime=runtime, - ), - server, - ) - except: - try: - await server.shutdown() - except: - logger.warn( - "Failed stopping local server on client connection failure", - exc_info=True, - ) - raise @classmethod async def start_time_skipping( @@ -239,7 +205,7 @@ async def start_time_skipping( plugins: Sequence[temporalio.client.Plugin] = [], default_workflow_query_reject_condition: None | (temporalio.common.QueryRejectCondition) = None, - retry_config: temporalio.client.RetryConfig | None = None, + retry_config: temporalio.service.RetryConfig | None = None, rpc_metadata: Mapping[str, str | bytes] = {}, identity: str | None = None, port: int | None = None, @@ -249,8 +215,13 @@ async def start_time_skipping( test_server_download_version: str = "default", test_server_extra_args: Sequence[str] = [], test_server_download_ttl: timedelta | None = None, + test_server_startup_timeout: timedelta | None = None, ) -> WorkflowEnvironment: - """Start a time skipping workflow environment. + """Start a V1 time skipping workflow environment. + + This environment uses a legacy Java Temporal server which does not have + feature parity with the full temporal server, and which is no longer + getting new features. By default, this environment will automatically skip to the next events in time when a workflow's @@ -302,59 +273,60 @@ async def start_time_skipping( test_server_extra_args: Extra arguments for the test server binary. test_server_download_ttl: TTL for the downloaded test server binary. If unset, it will be cached indefinitely. + test_server_startup_timeout: Maximum time to wait for the test server to + become ready after spawning. Defaults to 5 seconds and does not + include download time. Returns: The started workflow environment with time skipping. """ - # Start test server - runtime = runtime or temporalio.runtime.Runtime.default() - download_ttl_ms = None - if test_server_download_ttl: - download_ttl_ms = int(test_server_download_ttl.total_seconds() * 1000) - server = await temporalio.bridge.testing.EphemeralServer.start_test_server( - runtime._core_runtime, - temporalio.bridge.testing.TestServerConfig( - existing_path=test_server_existing_path, - sdk_name="sdk-python", - sdk_version=temporalio.service.__version__, - download_version=test_server_download_version, - download_dest_dir=download_dest_dir, - download_ttl_ms=download_ttl_ms, - port=port, - extra_args=test_server_extra_args, - ), + return await _V1WorkflowEnvironment._create( + data_converter=data_converter, + interceptors=interceptors, + plugins=plugins, + default_workflow_query_reject_condition=default_workflow_query_reject_condition, + retry_config=retry_config, + rpc_metadata=rpc_metadata, + identity=identity, + port=port, + download_dest_dir=download_dest_dir, + runtime=runtime, + test_server_existing_path=test_server_existing_path, + test_server_download_version=test_server_download_version, + test_server_extra_args=test_server_extra_args, + test_server_download_ttl=test_server_download_ttl, + test_server_startup_timeout=test_server_startup_timeout, ) - # If we can't connect to the server, we should shut it down - try: - return _EphemeralServerWorkflowEnvironment( - await temporalio.client.Client.connect( - server.target, - data_converter=data_converter, - interceptors=interceptors, - plugins=plugins, - default_workflow_query_reject_condition=default_workflow_query_reject_condition, - retry_config=retry_config, - rpc_metadata=rpc_metadata, - identity=identity, - runtime=runtime, - ), - server, - ) - except: - try: - await server.shutdown() - except: - logger.warn( - "Failed stopping test server on client connection failure", - exc_info=True, - ) - raise + + @classmethod + async def start_time_skipping_v2( + cls, + *, + ts_config: TimeSkippingConfig = TimeSkippingConfig(), + **kwargs: Any, + ) -> WorkflowEnvironment: + """Start a local Temporal server with per-workflow time skipping enabled. + + .. warning:: + This API is experimental and unstable. + + This environment is good for testing full server capabilities, and + supports time skipping. + + Equivalent to :py:meth:`start_local` plus a :py:class:`TimeSkipper` wrap + on the client, which stamps ``time_skipping_config`` on every workflow + started via :py:attr:`client` and exposes :py:meth:`fast_forward` for + driving time skipping on running workflows. Each workflow has its own + virtual clock, unlike time-skipping V1. + + See :py:meth:`start_local` for other keyword arguments. + """ + return await _V2WorkflowEnvironment._create(ts_config=ts_config, **kwargs) def __init__(self, client: temporalio.client.Client) -> None: """Create a workflow environment from a client. - Most users would use a factory methods instead. - + Most users would use a factory method instead. """ self._client = client @@ -362,7 +334,7 @@ async def __aenter__(self) -> WorkflowEnvironment: """Noop for ``async with`` support.""" return self - async def __aexit__(self, *args) -> None: + async def __aexit__(self, *args: Any) -> None: """For ``async with`` support to just call :py:meth:`shutdown`.""" await self.shutdown() @@ -371,6 +343,27 @@ def client(self) -> temporalio.client.Client: """Client to this environment.""" return self._client + async def connect_client(self, **kwargs: Any) -> temporalio.client.Client: + """Create another client connected to this environment. + + Namespace and connection credentials from this environment's client are + used by default. + Keyword arguments are forwarded to :py:meth:`temporalio.client.Client.connect` + and override those defaults. + """ + config = self.client.service_client.config + connect_kwargs: dict[str, Any] = { + "namespace": self.client.namespace, + "api_key": config.api_key, + "tls": config.tls, + "rpc_metadata": config.rpc_metadata, + "runtime": config.runtime or temporalio.runtime.Runtime.default(), + } + connect_kwargs.update(kwargs) + return await temporalio.client.Client.connect( + config.target_host, **connect_kwargs + ) + async def shutdown(self) -> None: """Shut down this environment.""" pass @@ -388,82 +381,415 @@ async def sleep(self, duration: timedelta | float) -> None: duration.total_seconds() if isinstance(duration, timedelta) else duration ) - async def get_current_time(self) -> datetime: + async def get_current_time( + self, + handle: temporalio.client.WorkflowHandle[Any, Any] | None = None, # pyright: ignore[reportUnusedParameter] + ) -> datetime: """Get the current time known to this environment. - For non-time-skipping environments this is simply the system time. For - time-skipping environments this is whatever time has been skipped to. + System time on non-time-skipping envs; the V1 test server's virtual + clock on V1 envs. On V2 envs a ``handle`` is required — each + workflow has its own virtual clock, read via + ``TimeSkippingInfo.current_time``. + + Args: + handle: On V2 envs, the workflow whose virtual clock to read. + Ignored on non-V2 envs. """ return datetime.now(timezone.utc) @property - def supports_time_skipping(self) -> bool: - """Whether this environment supports time skipping.""" + def supports_time_skipping_v1(self) -> bool: + """True if this environment uses the V1 Java time-skipping server (which has limited server features).""" + return False + + @property + def supports_time_skipping_v2(self) -> bool: + """True if this environment uses the V2 time-skipping server. + + .. warning:: + This API is experimental and unstable. + """ return False + @property + def supports_time_skipping(self) -> bool: + """Whether this environment supports either V1 or V2 time skipping.""" + return self.supports_time_skipping_v1 or self.supports_time_skipping_v2 + + async def create_nexus_endpoint( + self, endpoint_name: str, task_queue: str + ) -> temporalio.api.nexus.v1.Endpoint: + """Create a Nexus endpoint with the given name and task queue. + + Args: + endpoint_name: The name of the Nexus endpoint to create. + task_queue: The task queue to associate with the endpoint. + + Returns: + The created Nexus endpoint. + """ + response = await self._client.operator_service.create_nexus_endpoint( + temporalio.api.operatorservice.v1.CreateNexusEndpointRequest( + spec=temporalio.api.nexus.v1.EndpointSpec( + name=endpoint_name, + target=temporalio.api.nexus.v1.EndpointTarget( + worker=temporalio.api.nexus.v1.EndpointTarget.Worker( + namespace=self._client.namespace, + task_queue=task_queue, + ) + ), + ) + ) + ) + return response.endpoint + + async def delete_nexus_endpoint( + self, endpoint: temporalio.api.nexus.v1.Endpoint + ) -> None: + """Delete a Nexus endpoint. + + Args: + endpoint: The Nexus endpoint to delete. + """ + await self._client.operator_service.delete_nexus_endpoint( + temporalio.api.operatorservice.v1.DeleteNexusEndpointRequest( + id=endpoint.id, + version=endpoint.version, + ) + ) + @contextmanager def auto_time_skipping_disabled(self) -> Iterator[None]: - """Disable any automatic time skipping if this is a time-skipping - environment. + """Disable V1's SDK-driven auto-unlock-on-result-await for the block. + + Only meaningful on time-skipping V1 envs. No-op on non-time-skipping + envs. Unsupported on V2 envs — use :py:meth:`with_time_skipping_disabled` + to suspend time-skipping config stamping on newly-started workflows + instead. + """ + yield None + + async def fast_forward( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], # pyright: ignore[reportUnusedParameter] + duration: timedelta | float | None = None, # pyright: ignore[reportUnusedParameter] + /, + ) -> bool: + """Fast-forward this workflow's virtual clock by ``duration``, and wait for it to complete. + + .. warning:: + This API is experimental and unstable. + + Only supported on time-skipping V2 environments (created via + :py:meth:`start_time_skipping_v2`). + + Args: + handle: Target workflow execution. + duration: One-shot advance by this amount (``timedelta`` or + seconds as a ``float``). If ``None``, skip time until workflow + completion. + + Returns: + True if the fast-forward transition is observed; False if the + workflow terminates first. + + Raises: + RuntimeError: If called on a V1 or non-time-skipping environment. + """ + raise RuntimeError( + "fast_forward requires a time-skipping environment; use " + "WorkflowEnvironment.start_time_skipping_v2()." + ) + + @contextmanager + def with_time_skipping_disabled(self) -> Iterator[None]: + """Suspend V2 time-skipping config stamping on newly-started workflows within the block. - This is a context manager for use via ``with``. Usually in time-skipping - environments, waiting on a workflow result causes time to automatically - skip until the next event. This can disable that. However, this only - applies to results awaited inside this context. This will not disable - automatic time skipping on previous results. + .. warning:: + This API is experimental and unstable. - This has no effect on non-time-skipping environments. + Workflows started via :py:attr:`client` during the block do not receive + a ``time_skipping_config`` on their start request. Existing workflows + are unaffected. No-op on non-V2 environments. """ - # It's always disabled for this base class yield None + async def get_time_skipping_info( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], # pyright: ignore[reportUnusedParameter] + ) -> temporalio.api.common.v1.TimeSkippingInfo | None: + """Fetch a workflow's ``TimeSkippingInfo`` via ``DescribeWorkflowExecution``. + + .. warning:: + This API is experimental and unstable. + + Returns ``None`` if time skipping has never been enabled on the + workflow. + + Only supported on time-skipping V2 environments (created via + :py:meth:`start_time_skipping_v2`). + + Raises: + RuntimeError: If called on a V1 or non-time-skipping environment. + """ + raise RuntimeError( + "get_time_skipping_info requires a V2 time-skipping environment; " + "use WorkflowEnvironment.start_time_skipping_v2()." + ) + + +class _HasAServer(WorkflowEnvironment): + """Shared base for envs that own an ``EphemeralServer`` to shut down.""" -class _EphemeralServerWorkflowEnvironment(WorkflowEnvironment): def __init__( self, client: temporalio.client.Client, server: temporalio.bridge.testing.EphemeralServer, ) -> None: - # Add assertion interceptor to client and if time skipping is supported, - # add time skipping interceptor - self._supports_time_skipping = server.has_test_service - interceptors: list[temporalio.client.Interceptor] = [ - _AssertionErrorInterceptor() - ] - if self._supports_time_skipping: - interceptors.append(_TimeSkippingClientInterceptor(self)) - super().__init__(_client_with_interceptors(client, *interceptors)) + super().__init__(client) self._server = server - self._auto_time_skipping = True async def shutdown(self) -> None: await self._server.shutdown() + @classmethod + async def _bootstrap_dev_server( + cls, + *, + namespace: str = "default", + data_converter: temporalio.converter.DataConverter = temporalio.converter.DataConverter.default, + interceptors: Sequence[temporalio.client.Interceptor] = [], + plugins: Sequence[temporalio.client.Plugin] = [], + default_workflow_query_reject_condition: None + | (temporalio.common.QueryRejectCondition) = None, + retry_config: temporalio.service.RetryConfig | None = None, + rpc_metadata: Mapping[str, str | bytes] = {}, + identity: str | None = None, + tls: bool | temporalio.service.TLSConfig = False, + ip: str = "127.0.0.1", + port: int | None = None, + download_dest_dir: str | None = None, + ui: bool = False, + runtime: temporalio.runtime.Runtime | None = None, + search_attributes: Sequence[temporalio.common.SearchAttributeKey] = (), + dev_server_existing_path: str | None = None, + dev_server_database_filename: str | None = None, + dev_server_log_format: str = "pretty", + dev_server_log_level: str | None = "warn", + dev_server_download_version: str = "default", + dev_server_extra_args: Sequence[str] = [], + dev_server_download_ttl: timedelta | None = None, + dev_server_startup_timeout: timedelta | None = None, + ui_port: int | None = None, + ) -> tuple[ + temporalio.bridge.testing.EphemeralServer, + temporalio.client.Client, + ]: + """Start a CLI dev server and connect a client. Shared by non-ts and V2.""" + if not dev_server_log_level: + if logger.isEnabledFor(logging.DEBUG): + dev_server_log_level = "debug" + elif logger.isEnabledFor(logging.INFO): + dev_server_log_level = "info" + elif logger.isEnabledFor(logging.WARNING): + dev_server_log_level = "warn" + elif logger.isEnabledFor(logging.ERROR): + dev_server_log_level = "error" + else: + dev_server_log_level = "fatal" + if search_attributes: + new_args: list[str] = [] + for attr in search_attributes: + new_args.append("--search-attribute") + new_args.append(f"{attr.name}={attr._metadata_type}") + new_args += dev_server_extra_args + dev_server_extra_args = new_args + + runtime = runtime or temporalio.runtime.Runtime.default() + download_ttl_ms = None + if dev_server_download_ttl is not None: + download_ttl_ms = int(dev_server_download_ttl.total_seconds() * 1000) + server = await temporalio.bridge.testing.EphemeralServer.start_dev_server( + runtime._core_runtime, + temporalio.bridge.testing.DevServerConfig( + existing_path=dev_server_existing_path, + sdk_name="sdk-python", + sdk_version=temporalio.service.__version__, + download_version=dev_server_download_version, + download_dest_dir=download_dest_dir, + namespace=namespace, + ip=ip, + port=port, + database_filename=dev_server_database_filename, + ui=ui, + ui_port=ui_port, + log_format=dev_server_log_format, + log_level=dev_server_log_level, + extra_args=dev_server_extra_args, + download_ttl_ms=download_ttl_ms, + startup_timeout_ms=int( + dev_server_startup_timeout.total_seconds() * 1000 + ) + if dev_server_startup_timeout is not None + else None, + ), + ) + + try: + client = await temporalio.client.Client.connect( + server.target, + namespace=namespace, + data_converter=data_converter, + interceptors=interceptors, + plugins=plugins, + default_workflow_query_reject_condition=default_workflow_query_reject_condition, + tls=tls, + retry_config=retry_config, + rpc_metadata=rpc_metadata, + identity=identity, + runtime=runtime, + ) + except: + try: + await server.shutdown() + except: + logger.warning( + "Failed stopping dev server on client connection failure", + exc_info=True, + ) + raise + return server, client + + +class _NonTsWorkflowEnvironment(_HasAServer): + """Dev-server env with no time skipping.""" + + def __init__( + self, + client: temporalio.client.Client, + server: temporalio.bridge.testing.EphemeralServer, + ) -> None: + super().__init__( + _client_with_interceptors(client, _AssertionErrorInterceptor()), + server, + ) + + @classmethod + async def _create(cls, **kwargs: Any) -> _NonTsWorkflowEnvironment: + server, client = await cls._bootstrap_dev_server(**kwargs) + return cls(client, server) + + +class _V1WorkflowEnvironment(_HasAServer): + """Java test-server env with global-clock time skipping.""" + + def __init__( + self, + client: temporalio.client.Client, + server: temporalio.bridge.testing.EphemeralServer, + ) -> None: + self._auto_time_skipping = True + super().__init__( + _client_with_interceptors( + client, + _AssertionErrorInterceptor(), + _TimeSkippingClientInterceptor(self), + ), + server, + ) + + @classmethod + async def _create( + cls, + *, + data_converter: temporalio.converter.DataConverter, + interceptors: Sequence[temporalio.client.Interceptor], + plugins: Sequence[temporalio.client.Plugin], + default_workflow_query_reject_condition: None + | (temporalio.common.QueryRejectCondition), + retry_config: temporalio.service.RetryConfig | None, + rpc_metadata: Mapping[str, str | bytes], + identity: str | None, + port: int | None, + download_dest_dir: str | None, + runtime: temporalio.runtime.Runtime | None, + test_server_existing_path: str | None, + test_server_download_version: str, + test_server_extra_args: Sequence[str], + test_server_download_ttl: timedelta | None, + test_server_startup_timeout: timedelta | None, + ) -> _V1WorkflowEnvironment: + runtime = runtime or temporalio.runtime.Runtime.default() + download_ttl_ms = None + if test_server_download_ttl: + download_ttl_ms = int(test_server_download_ttl.total_seconds() * 1000) + server = await temporalio.bridge.testing.EphemeralServer.start_test_server( + runtime._core_runtime, + temporalio.bridge.testing.TestServerConfig( + existing_path=test_server_existing_path, + sdk_name="sdk-python", + sdk_version=temporalio.service.__version__, + download_version=test_server_download_version, + download_dest_dir=download_dest_dir, + download_ttl_ms=download_ttl_ms, + port=port, + extra_args=test_server_extra_args, + startup_timeout_ms=int( + test_server_startup_timeout.total_seconds() * 1000 + ) + if test_server_startup_timeout is not None + else None, + ), + ) + try: + client = await temporalio.client.Client.connect( + server.target, + data_converter=data_converter, + interceptors=interceptors, + plugins=plugins, + default_workflow_query_reject_condition=default_workflow_query_reject_condition, + retry_config=retry_config, + rpc_metadata=rpc_metadata, + identity=identity, + runtime=runtime, + ) + except: + try: + await server.shutdown() + except: + logger.warning( + "Failed stopping test server on client connection failure", + exc_info=True, + ) + raise + return cls(client, server) + async def sleep(self, duration: timedelta | float) -> None: - # Use regular sleep if no time skipping - if not self._supports_time_skipping: - return await super().sleep(duration) + """Virtual-clock sleep via the V1 test server's ``test_service``.""" req = temporalio.api.testservice.v1.SleepRequest() req.duration.FromTimedelta( duration if isinstance(duration, timedelta) else timedelta(seconds=duration) ) await self._client.test_service.unlock_time_skipping_with_sleep(req) - async def get_current_time(self) -> datetime: - # Use regular time if no time skipping - if not self._supports_time_skipping: - return await super().get_current_time() + async def get_current_time( + self, + handle: temporalio.client.WorkflowHandle[Any, Any] | None = None, + ) -> datetime: + """V1 test server's virtual clock.""" resp = await self._client.test_service.get_current_time( google.protobuf.empty_pb2.Empty() ) return resp.time.ToDatetime().replace(tzinfo=timezone.utc) @property - def supports_time_skipping(self) -> bool: - return self._supports_time_skipping + def supports_time_skipping_v1(self) -> bool: + return True @contextmanager def auto_time_skipping_disabled(self) -> Iterator[None]: + """Disable V1's SDK-driven auto-unlock-on-result-await for the block.""" already_disabled = not self._auto_time_skipping self._auto_time_skipping = False try: @@ -474,25 +800,20 @@ def auto_time_skipping_disabled(self) -> Iterator[None]: @asynccontextmanager async def time_skipping_unlocked(self) -> AsyncIterator[None]: - # If it's disabled or not supported, no locking/unlocking, just yield - # and return - if not self._supports_time_skipping or not self._auto_time_skipping: + if not self._auto_time_skipping: yield None return - # Unlock to start time skipping, lock again to stop it - await self.client.test_service.unlock_time_skipping( + await self._client.test_service.unlock_time_skipping( temporalio.api.testservice.v1.UnlockTimeSkippingRequest() ) try: yield None - # Lock it back, throwing on error - await self.client.test_service.lock_time_skipping( + await self._client.test_service.lock_time_skipping( temporalio.api.testservice.v1.LockTimeSkippingRequest() ) except: - # Lock it back, swallowing error try: - await self.client.test_service.lock_time_skipping( + await self._client.test_service.lock_time_skipping( temporalio.api.testservice.v1.LockTimeSkippingRequest() ) except: @@ -500,6 +821,84 @@ async def time_skipping_unlocked(self) -> AsyncIterator[None]: raise +class _V2WorkflowEnvironment(_HasAServer): + """Dev-server env with per-workflow time skipping via ``TimeSkipper``.""" + + def __init__( + self, + client: temporalio.client.Client, + server: temporalio.bridge.testing.EphemeralServer, + ts_config: TimeSkippingConfig, + ) -> None: + wrapped = _client_with_interceptors(client, _AssertionErrorInterceptor()) + self._ts_skipper = TimeSkipper(wrapped, config=ts_config) + super().__init__(self._ts_skipper.client, server) + + @classmethod + async def _create( + cls, + *, + ts_config: TimeSkippingConfig, + **kwargs: Any, + ) -> _V2WorkflowEnvironment: + server, client = await cls._bootstrap_dev_server(**kwargs) + return cls(client, server, ts_config) + + async def sleep(self, duration: timedelta | float) -> None: + """Unsupported on V2 — use :py:meth:`fast_forward` instead.""" + raise RuntimeError( + "env.sleep is not supported in time-skipping V2 environments; use " + "env.fast_forward(handle, duration) on a specific workflow." + ) + + async def get_current_time( + self, + handle: temporalio.client.WorkflowHandle[Any, Any] | None = None, + ) -> datetime: + """A workflow's current virtual time. Requires a ``handle`` on V2.""" + if handle is None: + raise RuntimeError( + "env.get_current_time requires a workflow handle in " + "time-skipping V2 environments; each workflow has its " + "own virtual clock." + ) + return await self._ts_skipper.get_current_time(handle) + + @property + def supports_time_skipping_v2(self) -> bool: + return True + + @contextmanager + def auto_time_skipping_disabled(self) -> Iterator[None]: + """Unsupported on V2 — use :py:meth:`with_time_skipping_disabled` instead.""" + raise RuntimeError( + "env.auto_time_skipping_disabled is not supported in " + "time-skipping V2 environments; use " + "env.with_time_skipping_disabled() to suspend time-skipping config " + "stamping on newly-started workflows." + ) + yield None # pyright: ignore[reportUnreachable] # unreachable; makes this a generator for @contextmanager + + async def fast_forward( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], + duration: timedelta | float | None = None, + /, + ) -> bool: + return await self._ts_skipper.fast_forward(handle, duration) + + @contextmanager + def with_time_skipping_disabled(self) -> Iterator[None]: + with self._ts_skipper.with_time_skipping_disabled(): + yield None + + async def get_time_skipping_info( + self, + handle: temporalio.client.WorkflowHandle[Any, Any], + ) -> temporalio.api.common.v1.TimeSkippingInfo | None: + return await self._ts_skipper.get_time_skipping_info(handle) + + class _AssertionErrorInterceptor( temporalio.client.Interceptor, temporalio.worker.Interceptor ): @@ -535,7 +934,7 @@ def assert_error_as_app_error(self) -> Iterator[None]: class _TimeSkippingClientInterceptor(temporalio.client.Interceptor): - def __init__(self, env: _EphemeralServerWorkflowEnvironment) -> None: # type: ignore[reportMissingSuperCall] + def __init__(self, env: _V1WorkflowEnvironment) -> None: # type: ignore[reportMissingSuperCall] self.env = env def intercept_client( @@ -548,7 +947,7 @@ class _TimeSkippingClientOutboundInterceptor(temporalio.client.OutboundIntercept def __init__( self, next: temporalio.client.OutboundInterceptor, - env: _EphemeralServerWorkflowEnvironment, + env: _V1WorkflowEnvironment, ) -> None: super().__init__(next) self.env = env @@ -556,7 +955,6 @@ def __init__( async def start_workflow( self, input: temporalio.client.StartWorkflowInput ) -> temporalio.client.WorkflowHandle[Any, Any]: - # We need to change the class of the handle so we can override result handle = cast(_TimeSkippingWorkflowHandle, await super().start_workflow(input)) handle.__class__ = _TimeSkippingWorkflowHandle handle.env = self.env @@ -564,7 +962,7 @@ async def start_workflow( class _TimeSkippingWorkflowHandle(temporalio.client.WorkflowHandle): - env: _EphemeralServerWorkflowEnvironment # type: ignore[reportUninitializedInstanceAttribute] + env: _V1WorkflowEnvironment # type: ignore[reportUninitializedInstanceAttribute] async def result( self, @@ -584,7 +982,6 @@ async def result( def _client_with_interceptors( client: temporalio.client.Client, *interceptors: temporalio.client.Interceptor ) -> temporalio.client.Client: - # Shallow clone client and add interceptors config = client.config() config_interceptors = list(config["interceptors"]) config_interceptors.extend(interceptors) diff --git a/temporalio/types.py b/temporalio/types.py index c8d7824e3d..f90863d3ea 100644 --- a/temporalio/types.py +++ b/temporalio/types.py @@ -1,7 +1,7 @@ """Advanced types.""" from collections.abc import Awaitable, Callable -from typing import Any, Type, TypeVar, Union +from typing import Any, TypeVar from typing_extensions import ParamSpec, Protocol @@ -11,15 +11,16 @@ ParamType = TypeVar("ParamType") ReturnType = TypeVar("ReturnType", covariant=True) LocalReturnType = TypeVar("LocalReturnType", covariant=True) +NexusServiceType = TypeVar("NexusServiceType") CallableType = TypeVar("CallableType", bound=Callable[..., Any]) CallableAsyncType = TypeVar("CallableAsyncType", bound=Callable[..., Awaitable[Any]]) CallableSyncOrAsyncType = TypeVar( "CallableSyncOrAsyncType", - bound=Callable[..., Union[Any, Awaitable[Any]]], + bound=Callable[..., Any | Awaitable[Any]], ) CallableSyncOrAsyncReturnNoneType = TypeVar( "CallableSyncOrAsyncReturnNoneType", - bound=Callable[..., Union[None, Awaitable[None]]], + bound=Callable[..., None | Awaitable[None]], ) MultiParamSpec = ParamSpec("MultiParamSpec") diff --git a/temporalio/worker/__init__.py b/temporalio/worker/__init__.py index 8388be24d3..4f6efe68c3 100644 --- a/temporalio/worker/__init__.py +++ b/temporalio/worker/__init__.py @@ -1,5 +1,6 @@ """Worker for processing Temporal workflows and/or activities.""" +from ..common import WorkerDeploymentVersion from ._activity import SharedHeartbeatSender, SharedStateManager from ._interceptor import ( ActivityInboundInterceptor, @@ -55,9 +56,9 @@ Worker, WorkerConfig, WorkerDeploymentConfig, - WorkerDeploymentVersion, ) from ._workflow_instance import ( + PatchActivationInput, UnsandboxedWorkflowRunner, WorkflowInstance, WorkflowInstanceDetails, @@ -77,6 +78,7 @@ "PollerBehavior", "PollerBehaviorSimpleMaximum", "PollerBehaviorAutoscaling", + "PatchActivationInput", # Interceptor base classes "Interceptor", "ActivityInboundInterceptor", diff --git a/temporalio/worker/_activity.py b/temporalio/worker/_activity.py index f74ee78720..79af99070a 100644 --- a/temporalio/worker/_activity.py +++ b/temporalio/worker/_activity.py @@ -21,8 +21,6 @@ from typing import ( Any, NoReturn, - Optional, - Union, ) import google.protobuf.duration_pb2 @@ -34,7 +32,13 @@ import temporalio.client import temporalio.common import temporalio.converter +import temporalio.converter._serialization_context import temporalio.exceptions +from temporalio.converter import ( + StorageDriverActivityInfo, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, +) from ._interceptor import ( ActivityInboundInterceptor, @@ -72,7 +76,7 @@ def __init__( self._encode_headers = encode_headers self._fail_worker_exception_queue: asyncio.Queue[Exception] = asyncio.Queue() # Lazily created on first activity - self._worker_shutdown_event: temporalio.activity._CompositeEvent | None = None + self._worker_shutdown_event: temporalio.common._CompositeEvent | None = None self._seen_sync_activity = False self._client = client @@ -92,6 +96,17 @@ def __init__( f"Activity named {defn.name} is a class instead of an instance" ) + # A plain function whose first parameter is "self" is almost always + # a method referenced from the class instead of from an instance + if inspect.isfunction(activity): + params = list(inspect.signature(activity).parameters) + if params and params[0] == "self": + warnings.warn( + f"Activity named {defn.name} has a first parameter named self " + "but is not bound to an instance, did you mean to register it " + "from an instance of the class?" + ) + # Some extra requirements for sync functions if not defn.is_async: if not activity_executor: @@ -151,9 +166,8 @@ async def raise_from_exception_queue() -> NoReturn: if task.HasField("start"): # Cancelled event and sync field will be updated inside - # _run_activity when the activity function is obtained. Max - # size of 1000 should be plenty for the heartbeat queue. - activity = _RunningActivity(pending_heartbeats=asyncio.Queue(1000)) + # _run_activity when the activity function is obtained. + activity = _RunningActivity() activity.task = asyncio.create_task( self._handle_start_activity_task( task.task_token, task.start, activity @@ -161,7 +175,6 @@ async def raise_from_exception_queue() -> NoReturn: ) self._running_activities[task.task_token] = activity elif task.HasField("cancel"): - # TODO(nexus-prerelease): does the task get removed from running_activities? self._handle_cancel_activity_task(task.task_token, task.cancel) else: raise RuntimeError(f"Unrecognized activity task: {task}") @@ -192,13 +205,17 @@ async def drain_poll_queue(self) -> None: # Only call this after run()/drain_poll_queue() have returned. This will not # raise an exception. - # TODO(nexus-preview): based on the comment above it looks like the intention may have been to use - # return_exceptions=True. Change this for nexus and activity and change call sites to consume entire - # stream and then raise first exception async def wait_all_completed(self) -> None: running_tasks = [v.task for v in self._running_activities.values() if v.task] if running_tasks: - await asyncio.gather(*running_tasks, return_exceptions=False) + # Never let a task exception escape and stall shutdown + for result in await asyncio.gather(*running_tasks, return_exceptions=True): + if isinstance(result, BaseException) and not isinstance( + result, asyncio.CancelledError + ): + logger.warning( + "Activity task raised during worker shutdown", exc_info=result + ) def _handle_cancel_activity_task( self, @@ -224,14 +241,14 @@ def _heartbeat(self, task_token: bytes, *details: Any) -> None: # converter is async, we have to schedule it. If the activity is done, # we do not schedule any more. Technically this should be impossible to # call if the activity is done because this sync call can only be called - # inside the activity and done is set to False when the activity + # inside the activity and done is set to True when the activity # returns. logger = temporalio.activity.logger activity = self._running_activities.get(task_token) if activity and not activity.done: - # Put on queue and schedule a task. We will let the queue-full error - # be thrown here. - activity.pending_heartbeats.put_nowait(details) + # Only the newest heartbeat gets sent, so it replaces one that hasn't + # been picked up yet + activity.pending_heartbeat = details activity.last_heartbeat_task = asyncio.create_task( self._heartbeat_async(logger, activity, task_token) ) @@ -242,24 +259,53 @@ async def _heartbeat_async( activity: _RunningActivity, task_token: bytes, ) -> None: - # Drain the queue, only taking the last value to actually heartbeat - details: Sequence[Any] | None = None - while not activity.pending_heartbeats.empty(): - details = activity.pending_heartbeats.get_nowait() + # One heartbeat at a time, so a slow encode can't let an older heartbeat + # reach core after a newer one + async with activity.heartbeat_lock: + await self._send_latest_heartbeat(logger, activity, task_token) + + async def _send_latest_heartbeat( + self, + logger: logging.LoggerAdapter, + activity: _RunningActivity, + task_token: bytes, + ) -> None: + # Nothing to send if an earlier task already sent the newest heartbeat + details = activity.pending_heartbeat + activity.pending_heartbeat = None if details is None: return - data_converter = self._data_converter + data_converter = self._data_converter._with_store_context( + StorageDriverStoreContext(namespace=self._client.namespace) + ) if activity.info: - context = temporalio.converter.ActivitySerializationContext( - namespace=activity.info.workflow_namespace, - workflow_id=activity.info.workflow_id, - workflow_type=activity.info.workflow_type, - activity_type=activity.info.activity_type, - activity_task_queue=self._task_queue, - is_local=activity.info.is_local, + # The server puts a standalone activity's last heartbeat details into its timeout + # failure, which goes back to the Nexus caller if a Nexus handler started it + context: temporalio.converter.SerializationContext = ( + activity.info.nexus_serialization_context + or temporalio.converter.ActivitySerializationContext( + namespace=activity.info.namespace, + workflow_id=activity.info.workflow_id, + workflow_type=activity.info.workflow_type, + activity_type=activity.info.activity_type, + activity_id=activity.info.activity_id, + activity_task_queue=self._task_queue, + is_local=activity.info.is_local, + ) + ) + data_converter = data_converter._with_contexts( + context, + StorageDriverStoreContext( + namespace=self._client.namespace, + target=StorageDriverActivityInfo( + id=activity.info.activity_id, + type=activity.info.activity_type, + run_id=activity.info.activity_run_id, + namespace=activity.info.namespace, + ), + ), ) - data_converter = data_converter.with_context(context) # Perform the heartbeat try: @@ -267,7 +313,6 @@ async def _heartbeat_async( task_token=task_token ) if details: - # Convert to core payloads heartbeat.details.extend(await data_converter.encode(details)) logger.debug("Recording heartbeat with details %s", details) self._bridge_worker().record_activity_heartbeat(heartbeat) @@ -304,19 +349,75 @@ async def _handle_start_activity_task( ) # Create serialization context for the activity context = temporalio.converter.ActivitySerializationContext( - namespace=start.workflow_namespace, + namespace=start.workflow_namespace or self._client.namespace, workflow_id=start.workflow_execution.workflow_id, workflow_type=start.workflow_type, activity_type=start.activity_type, + activity_id=start.activity_id, activity_task_queue=self._task_queue, is_local=start.is_local, ) data_converter = self._data_converter.with_context(context) - try: - result = await self._execute_activity( - start, running_activity, task_token, data_converter + + # Build store context for external storage + ns = start.workflow_namespace or self._client.namespace + # Store context is set for the full activity task lifetime (input + # decode, execution, result/failure encode). Each activity task runs + # in its own coroutine so the value won't leak to other tasks. + started_by_workflow = bool(start.workflow_execution.workflow_id) + store_target: StorageDriverWorkflowInfo | StorageDriverActivityInfo + if started_by_workflow: + store_target = StorageDriverWorkflowInfo( + id=start.workflow_execution.workflow_id or None, + type=start.workflow_type or None, + run_id=start.workflow_execution.run_id or None, + namespace=ns, + ) + else: + store_target = StorageDriverActivityInfo( + id=start.activity_id or None, + type=start.activity_type or None, + run_id=start.run_id or None, + namespace=ns, + ) + data_converter = self._data_converter._with_contexts( + context, + StorageDriverStoreContext( + namespace=self._client.namespace, target=store_target + ), + ) + # A standalone activity started by a Nexus operation handler returns its result and + # failure to the Nexus caller, which decodes them with the handler's Nexus context. The + # input keeps the activity context. + nexus_context = temporalio.converter._serialization_context._propagated_nexus_serialization_context( + start + ) + caller_facing_data_converter = ( + self._data_converter._with_contexts( + nexus_context, + StorageDriverStoreContext( + namespace=self._client.namespace, target=store_target + ), ) - [payload] = await data_converter.encode([result]) + if nexus_context + else data_converter + ) + try: + try: + result = await self._execute_activity( + start, + running_activity, + task_token, + data_converter, + caller_facing_data_converter, + nexus_context, + ) + finally: + # The activity code has finished, so a cancel from here on must + # not interrupt reporting its outcome; done stops cancel() from + # cancelling this task + running_activity.done = True + [payload] = await caller_facing_data_converter.encode([result]) completion.result.completed.result.CopyFrom(payload) except BaseException as err: try: @@ -326,7 +427,10 @@ async def _handle_start_activity_task( elif ( isinstance( err, - (asyncio.CancelledError, temporalio.exceptions.CancelledError), + ( + asyncio.CancelledError, + temporalio.exceptions.CancelledError, + ), ) and running_activity.cancelled_due_to_heartbeat_error ): @@ -334,13 +438,16 @@ async def _handle_start_activity_task( temporalio.activity.logger.warning( f"Completing as failure during heartbeat with error of type {type(err)}: {err}", ) - await data_converter.encode_failure( + await caller_facing_data_converter.encode_failure( err, completion.result.failed.failure ) elif ( isinstance( err, - (asyncio.CancelledError, temporalio.exceptions.CancelledError), + ( + asyncio.CancelledError, + temporalio.exceptions.CancelledError, + ), ) and running_activity.cancellation_details.details and running_activity.cancellation_details.details.paused @@ -348,7 +455,7 @@ async def _handle_start_activity_task( temporalio.activity.logger.warning( "Completing as failure due to unhandled cancel error produced by activity pause", ) - await data_converter.encode_failure( + await caller_facing_data_converter.encode_failure( temporalio.exceptions.ApplicationError( type="ActivityPause", message="Unhandled activity cancel error produced by activity pause", @@ -358,7 +465,10 @@ async def _handle_start_activity_task( elif ( isinstance( err, - (asyncio.CancelledError, temporalio.exceptions.CancelledError), + ( + asyncio.CancelledError, + temporalio.exceptions.CancelledError, + ), ) and running_activity.cancellation_details.details and running_activity.cancellation_details.details.reset @@ -366,7 +476,7 @@ async def _handle_start_activity_task( temporalio.activity.logger.warning( "Completing as failure due to unhandled cancel error produced by activity reset", ) - await data_converter.encode_failure( + await caller_facing_data_converter.encode_failure( temporalio.exceptions.ApplicationError( type="ActivityReset", message="Unhandled activity cancel error produced by activity reset", @@ -376,12 +486,15 @@ async def _handle_start_activity_task( elif ( isinstance( err, - (asyncio.CancelledError, temporalio.exceptions.CancelledError), + ( + asyncio.CancelledError, + temporalio.exceptions.CancelledError, + ), ) and running_activity.cancelled_by_request ): temporalio.activity.logger.debug("Completing as cancelled") - await data_converter.encode_failure( + await caller_facing_data_converter.encode_failure( # TODO(cretz): Should use some other message? temporalio.exceptions.CancelledError("Cancelled"), completion.result.cancelled.failure, @@ -407,7 +520,7 @@ async def _handle_start_activity_task( exc_info=True, extra={"__temporal_error_identifier": "ActivityFailure"}, ) - await data_converter.encode_failure( + await caller_facing_data_converter.encode_failure( err, completion.result.failed.failure ) # For broken executors, we have to fail the entire worker @@ -425,9 +538,7 @@ async def _handle_start_activity_task( # Do final completion try: - # We mark the activity as done and let the currently running - # heartbeat task finish - running_activity.done = True + # Let the currently running heartbeat task finish if running_activity.last_heartbeat_task: try: await running_activity.last_heartbeat_task @@ -450,6 +561,8 @@ async def _execute_activity( running_activity: _RunningActivity, task_token: bytes, data_converter: temporalio.converter.DataConverter, + caller_facing_data_converter: temporalio.converter.DataConverter, + nexus_context: temporalio.converter.NexusSerializationContext | None, ) -> Any: """Invoke the user's activity function. @@ -467,7 +580,7 @@ async def _execute_activity( # Create the worker shutdown event if not created if not self._worker_shutdown_event: - self._worker_shutdown_event = temporalio.activity._CompositeEvent( + self._worker_shutdown_event = temporalio.common._CompositeEvent( thread_event=threading.Event(), async_event=asyncio.Event() ) @@ -480,7 +593,7 @@ async def _execute_activity( if isinstance( self._activity_executor, concurrent.futures.ThreadPoolExecutor ): - running_activity.cancelled_event = temporalio.activity._CompositeEvent( + running_activity.cancelled_event = temporalio.common._CompositeEvent( thread_event=threading.Event(), # No async event async_event=None, @@ -492,7 +605,7 @@ async def _execute_activity( manager = self._shared_state_manager # Pre-checked on worker init assert manager - running_activity.cancelled_event = temporalio.activity._CompositeEvent( + running_activity.cancelled_event = temporalio.common._CompositeEvent( thread_event=manager.new_event(), # No async event async_event=None, @@ -506,7 +619,7 @@ async def _execute_activity( self._seen_sync_activity = True else: # We have to set the async form of events - running_activity.cancelled_event = temporalio.activity._CompositeEvent( + running_activity.cancelled_event = temporalio.common._CompositeEvent( thread_event=threading.Event(), async_event=asyncio.Event(), ) @@ -539,7 +652,7 @@ async def _execute_activity( heartbeat_details = ( [] if not start.heartbeat_details - else await data_converter.decode(start.heartbeat_details) + else await caller_facing_data_converter.decode(start.heartbeat_details) ) except Exception as err: raise temporalio.exceptions.ApplicationError( @@ -547,6 +660,7 @@ async def _execute_activity( ) from err # Build info + started_by_workflow = bool(start.workflow_execution.workflow_id) info = temporalio.activity.Info( activity_id=start.activity_id, activity_type=start.activity_type, @@ -559,6 +673,7 @@ async def _execute_activity( if start.HasField("heartbeat_timeout") else None, is_local=start.is_local, + namespace=start.workflow_namespace or self._client.namespace, schedule_to_close_timeout=_proto_to_non_zero_timedelta( start.schedule_to_close_timeout ) @@ -573,20 +688,25 @@ async def _execute_activity( started_time=_proto_to_datetime(start.started_time), task_queue=self._task_queue, task_token=task_token, - workflow_id=start.workflow_execution.workflow_id, - workflow_namespace=start.workflow_namespace, - workflow_run_id=start.workflow_execution.run_id, - workflow_type=start.workflow_type, + workflow_id=start.workflow_execution.workflow_id or None, + workflow_namespace=start.workflow_namespace or None, + workflow_run_id=start.workflow_execution.run_id or None, + workflow_type=start.workflow_type or None, priority=temporalio.common.Priority._from_proto(start.priority), retry_policy=temporalio.common.RetryPolicy.from_proto(start.retry_policy) if start.HasField("retry_policy") else None, + activity_run_id=getattr(start, "run_id", None) + if not started_by_workflow + else None, + nexus_serialization_context=nexus_context, ) - if self._encode_headers and data_converter.payload_codec is not None: + if self._encode_headers: for payload in start.header_fields.values(): - new_payload = (await data_converter.payload_codec.decode([payload]))[0] - payload.CopyFrom(new_payload) + payload.CopyFrom( + await data_converter._transform_inbound_payload(payload) + ) running_activity.info = info input = ExecuteActivityInput( @@ -627,7 +747,7 @@ async def _execute_activity( impl.init(_ActivityOutboundImpl(self, running_activity.info)) return await impl.execute_activity(input) - def assert_activity_valid(self, activity) -> None: + def assert_activity_valid(self, activity: str) -> None: if self._dynamic_activity: return activity_def = self._activities.get(activity) @@ -641,12 +761,13 @@ def assert_activity_valid(self, activity) -> None: @dataclass class _RunningActivity: - pending_heartbeats: asyncio.Queue[Sequence[Any]] # Most of these optional values are set before use info: temporalio.activity.Info | None = None task: asyncio.Task | None = None - cancelled_event: temporalio.activity._CompositeEvent | None = None + cancelled_event: temporalio.common._CompositeEvent | None = None last_heartbeat_task: asyncio.Task | None = None + pending_heartbeat: Sequence[Any] | None = None + heartbeat_lock: asyncio.Lock = field(default_factory=asyncio.Lock) cancel_thread_raiser: _ThreadExceptionRaiser | None = None sync: bool = False done: bool = False @@ -674,8 +795,7 @@ def cancel( ) # If not sync and there's a task, cancel it if not self.sync and self.task: - # TODO(cretz): Check that Python >= 3.9 and set msg? - self.task.cancel() + self.task.cancel("Activity cancelled") class _ThreadExceptionRaiser: @@ -689,6 +809,20 @@ def set_thread_id(self, thread_id: int) -> None: with self._lock: self._thread_id = thread_id + @contextmanager + def active_thread(self) -> Iterator[None]: + thread_id = threading.current_thread().ident + if thread_id is not None: + self.set_thread_id(thread_id) + try: + yield None + finally: + if thread_id is not None: + with self._lock: + if self._thread_id == thread_id: + self._thread_id = None + self._pending_exception = None + def raise_in_thread(self, exc_type: type[Exception]) -> None: with self._lock: self._pending_exception = exc_type @@ -853,10 +987,6 @@ def _execute_sync_activity( fn: Callable[..., Any], *args: Any, ) -> Any: - if cancel_thread_raiser: - thread_id = threading.current_thread().ident - if thread_id is not None: - cancel_thread_raiser.set_thread_id(thread_id) if isinstance(heartbeat, SharedHeartbeatSender): def heartbeat_fn(*details: Any) -> None: @@ -867,10 +997,10 @@ def heartbeat_fn(*details: Any) -> None: temporalio.activity._Context( info=lambda: info, heartbeat=heartbeat_fn, - cancelled_event=temporalio.activity._CompositeEvent( + cancelled_event=temporalio.common._CompositeEvent( thread_event=cancelled_event, async_event=None ), - worker_shutdown_event=temporalio.activity._CompositeEvent( + worker_shutdown_event=temporalio.common._CompositeEvent( thread_event=worker_shutdown_event, async_event=None ), shield_thread_cancel_exception=( @@ -882,7 +1012,11 @@ def heartbeat_fn(*details: Any) -> None: cancellation_details=cancellation_details, ) ) - return fn(*args) + if not cancel_thread_raiser: + return fn(*args) + else: + with cancel_thread_raiser.active_thread(): + return fn(*args) class SharedStateManager(ABC): diff --git a/temporalio/worker/_command_aware_visitor.py b/temporalio/worker/_command_aware_visitor.py index 2301f6ed6f..888c06f298 100644 --- a/temporalio/worker/_command_aware_visitor.py +++ b/temporalio/worker/_command_aware_visitor.py @@ -4,10 +4,10 @@ from collections.abc import Iterator from contextlib import contextmanager from dataclasses import dataclass -from typing import Optional from temporalio.api.enums.v1.command_type_pb2 import CommandType -from temporalio.bridge._visitor import PayloadVisitor, VisitorFunctions +from temporalio.bridge._visitor import PayloadVisitor +from temporalio.bridge._visitor_functions import VisitorFunctions from temporalio.bridge.proto.workflow_activation.workflow_activation_pb2 import ( ResolveActivity, ResolveChildWorkflowExecution, @@ -18,11 +18,15 @@ ResolveSignalExternalWorkflow, ) from temporalio.bridge.proto.workflow_commands.workflow_commands_pb2 import ( + CompleteWorkflowExecution, + FailWorkflowExecution, ScheduleActivity, ScheduleLocalActivity, ScheduleNexusOperation, SignalExternalWorkflowExecution, StartChildWorkflowExecution, + UpdateResponse, + WorkflowCommand, ) @@ -32,6 +36,7 @@ class CommandInfo: command_type: CommandType.ValueType command_seq: int + update_protocol_instance_id: str | None = None current_command_info: contextvars.ContextVar[CommandInfo | None] = ( @@ -46,7 +51,42 @@ class CommandAwarePayloadVisitor(PayloadVisitor): activation jobs that have both a 'seq' field and payloads to visit. """ + def __init__( + self, + *, + skip_search_attributes: bool = False, + skip_headers: bool = False, + concurrency_limit: int = 1, + ) -> None: + """Creates a new command-aware payload visitor. + + Args: + skip_search_attributes: If True, search attributes are not visited. + skip_headers: If True, headers are not visited. + concurrency_limit: Maximum number of payload visits that may run + concurrently during a single call to visit(). Defaults to 1. + """ + super().__init__( + skip_search_attributes=skip_search_attributes, + skip_headers=skip_headers, + concurrency_limit=concurrency_limit, + ) + # Workflow commands with payloads + async def _visit_coresdk_workflow_commands_CompleteWorkflowExecution( + self, fs: VisitorFunctions, o: CompleteWorkflowExecution + ) -> None: + with current_command(CommandType.COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION, 0): + await super()._visit_coresdk_workflow_commands_CompleteWorkflowExecution( + fs, o + ) + + async def _visit_coresdk_workflow_commands_FailWorkflowExecution( + self, fs: VisitorFunctions, o: FailWorkflowExecution + ) -> None: + with current_command(CommandType.COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION, 0): + await super()._visit_coresdk_workflow_commands_FailWorkflowExecution(fs, o) + async def _visit_coresdk_workflow_commands_ScheduleActivity( self, fs: VisitorFunctions, o: ScheduleActivity ) -> None: @@ -85,6 +125,29 @@ async def _visit_coresdk_workflow_commands_ScheduleNexusOperation( with current_command(CommandType.COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION, o.seq): await super()._visit_coresdk_workflow_commands_ScheduleNexusOperation(fs, o) + async def _visit_coresdk_workflow_commands_UpdateResponse( + self, fs: VisitorFunctions, o: UpdateResponse + ) -> None: + # Updates have no sequence number, so they're identified by protocol instance ID + with current_command( + CommandType.COMMAND_TYPE_PROTOCOL_MESSAGE, + 0, + update_protocol_instance_id=o.protocol_instance_id, + ): + await super()._visit_coresdk_workflow_commands_UpdateResponse(fs, o) + + async def _visit_coresdk_workflow_commands_WorkflowCommand( + self, fs: VisitorFunctions, o: WorkflowCommand + ) -> None: + if o.HasField("schedule_nexus_operation"): + with current_command( + CommandType.COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION, + o.schedule_nexus_operation.seq, + ): + await super()._visit_coresdk_workflow_commands_WorkflowCommand(fs, o) + else: + await super()._visit_coresdk_workflow_commands_WorkflowCommand(fs, o) + # Workflow activation jobs with payloads async def _visit_coresdk_workflow_activation_ResolveActivity( self, fs: VisitorFunctions, o: ResolveActivity @@ -151,11 +214,18 @@ async def _visit_coresdk_workflow_activation_ResolveNexusOperation( @contextmanager def current_command( - command_type: CommandType.ValueType, command_seq: int + command_type: CommandType.ValueType, + command_seq: int, + *, + update_protocol_instance_id: str | None = None, ) -> Iterator[None]: """Context manager for setting command info.""" token = current_command_info.set( - CommandInfo(command_type=command_type, command_seq=command_seq) + CommandInfo( + command_type=command_type, + command_seq=command_seq, + update_protocol_instance_id=update_protocol_instance_id, + ) ) try: yield diff --git a/temporalio/worker/_debugger.py b/temporalio/worker/_debugger.py new file mode 100644 index 0000000000..6f64da5c44 --- /dev/null +++ b/temporalio/worker/_debugger.py @@ -0,0 +1,158 @@ +from __future__ import annotations + +import dataclasses +import sys +from types import FrameType, TracebackType + +import temporalio.workflow +from temporalio.worker.workflow_sandbox._runner import SandboxedWorkflowRunner + +from ._workflow_instance import WorkflowRunner + +__all__ = [ + "_install_workflow_breakpoint_hook", + "_relax_sandbox_for_debugger", + "_temporal_workflow_breakpoint_hook", +] + +_ORIGINAL_BREAKPOINTHOOK = sys.breakpointhook + + +def _build_workflow_pdb_class() -> type: + """Build a Pdb subclass that suspends sandbox restrictions during the REPL. + + pdb's cmdloop touches ``readline.get_completer`` and other + sandbox-restricted internals each time it interacts with the user; we + bracket each interaction with ``_sandbox_unrestricted.value = True`` and + restore the previous value afterwards. Outside the REPL the sandbox + stays intact. + + ``pdb`` is imported lazily because it's a debug-only dependency that + pulls in ``cmd``/``bdb``/``linecache``; no reason to pay that cost at + worker import time. + """ + import pdb + + from temporalio.workflow._sandbox import _sandbox_unrestricted + + class _WorkflowPdb(pdb.Pdb): + # The `interaction` signature differs across Python versions: 3.10-3.12 + # typeshed names the second parameter `traceback: TracebackType | None`, + # while 3.13+ renames it `tb_or_exc` and widens the type to include + # `BaseException`. No single signature satisfies both stubs, so we + # suppress the override check. + def interaction( # type: ignore[override] + self, + frame: FrameType | None, + tb_or_exc: TracebackType | BaseException | None, + ) -> None: + prev = getattr(_sandbox_unrestricted, "value", False) + _sandbox_unrestricted.value = True + try: + super().interaction(frame, tb_or_exc) # type: ignore[arg-type] + finally: + _sandbox_unrestricted.value = prev + + # Override `q`/`quit`/`exit`/EOF (Ctrl-D) to behave like `continue`. + # Default pdb raises `BdbQuit`, which propagates as an uncaught + # exception out of workflow.run, fails the workflow task, and + # triggers a server retry storm during teardown. For a debug + # session the user almost always wants "stop debugging and let the + # workflow finish" — that's `continue`. Users who truly want to + # abort can Ctrl-C the outer shell. + def do_quit(self, arg: str) -> bool | None: + self.message( + "[Temporal] 'q'/Ctrl-D continues the workflow. " + "Ctrl-C the outer shell to abort." + ) + return self.do_continue(arg) + + do_q = do_exit = do_quit + do_EOF = do_quit + + return _WorkflowPdb + + +def _temporal_workflow_breakpoint_hook(*args: object, **kwargs: object) -> object: + """``sys.breakpointhook`` that handles ``breakpoint()`` inside workflows. + + Only installed when ``debug_mode`` is enabled on the Worker. From inside + a workflow activation: drops the user into a custom Pdb at the workflow's + own frame, with sandbox restrictions suspended during the REPL. From + anywhere else (test code, helpers, etc.): delegates to whatever hook was + previously installed. + """ + if not temporalio.workflow.in_workflow(): + # Not inside a workflow activation — let pytest's wrapper, ipdb, or + # whatever else is configured handle it. + return _ORIGINAL_BREAKPOINTHOOK(*args, **kwargs) + # Inside a workflow: drop the user into pdb at the caller's frame (the + # workflow's `run` method, where breakpoint() was actually written) rather + # than landing inside this hook. Bypassing the configured breakpoint hook + # also avoids pytest's pdb wrapper, which assumes a test-code context and + # touches sandbox-restricted internals during its terminal-writer setup. + # `sandbox_unrestricted()` lifts member checks for the duration of the + # REPL so pdb's own initialization (readline, etc.) isn't blocked. + # `skip` tells pdb not to stop in our hook frame or the contextlib + # plumbing — without it pdb's first step lands at the `with` teardown + # instead of the user's next workflow line. + caller_frame = sys._getframe(1) + with temporalio.workflow.unsafe.sandbox_unrestricted(): + pdb_cls = _build_workflow_pdb_class() + pdb_cls( + skip=[ + "temporalio.worker._debugger", + "temporalio.workflow._sandbox", + "contextlib", + ] + ).set_trace(caller_frame) + return None + + +def _install_workflow_breakpoint_hook() -> None: + """Set ``sys.breakpointhook`` to the workflow hook if it isn't already.""" + if sys.breakpointhook is not _temporal_workflow_breakpoint_hook: + sys.breakpointhook = _temporal_workflow_breakpoint_hook + + +def _relax_sandbox_for_debugger(workflow_runner: WorkflowRunner) -> WorkflowRunner: + """Allow ``breakpoint()`` past the sandbox so it can reach the worker hook. + + The sandbox flags ``breakpoint`` as non-deterministic by default; without + this relaxation the call raises before our breakpoint hook can run. + Once inside the hook, the hook itself enters ``sandbox_unrestricted()`` + for the duration of the debugger session, so pdb's internals (readline, + os.environ, etc.) aren't blocked either — without permanently dropping + sandbox checks for the rest of workflow execution. + """ + if not isinstance(workflow_runner, SandboxedWorkflowRunner): + return workflow_runner + + restrictions = workflow_runner.restrictions + invalid = restrictions.invalid_module_members + builtins_matcher = invalid.children.get("__builtins__") + if builtins_matcher is None: + return workflow_runner + + # `breakpoint` may sit either in `children` (as a leaf matcher with a + # custom error message) or in `use` (the legacy flat form). Strip from + # whichever shape is present. + has_child = "breakpoint" in builtins_matcher.children + has_use = "breakpoint" in builtins_matcher.use + if not (has_child or has_use): + return workflow_runner + + new_children = { + k: v for k, v in builtins_matcher.children.items() if k != "breakpoint" + } + new_use = set(builtins_matcher.use) - {"breakpoint"} + new_builtins = dataclasses.replace( + builtins_matcher, children=new_children, use=new_use + ) + new_invalid = dataclasses.replace( + invalid, children={**invalid.children, "__builtins__": new_builtins} + ) + new_restrictions = dataclasses.replace( + restrictions, invalid_module_members=new_invalid + ) + return dataclasses.replace(workflow_runner, restrictions=new_restrictions) diff --git a/temporalio/worker/_interceptor.py b/temporalio/worker/_interceptor.py index d3b8386797..6196f5efe1 100644 --- a/temporalio/worker/_interceptor.py +++ b/temporalio/worker/_interceptor.py @@ -4,19 +4,15 @@ import concurrent.futures from collections.abc import Awaitable, Callable, Mapping, MutableMapping, Sequence -from dataclasses import dataclass +from dataclasses import dataclass, field from datetime import timedelta from typing import ( Any, Generic, - List, NoReturn, - Optional, - Type, - Union, ) -import nexusrpc.handler +import nexusrpc from nexusrpc import InputT, OutputT import temporalio.activity @@ -25,7 +21,10 @@ import temporalio.nexus import temporalio.nexus._util import temporalio.workflow -from temporalio.workflow import VersioningIntent +from temporalio.nexus.system.workflow_service._system_nexus_interceptor import ( + _SystemNexusWorkflowOutboundInterceptorBase, +) +from temporalio.workflow import ContinueAsNewVersioningBehavior, VersioningIntent class Interceptor: @@ -49,7 +48,8 @@ def intercept_activity( return next def workflow_interceptor_class( - self, input: WorkflowInterceptorClassInput + self, + input: WorkflowInterceptorClassInput, # type:ignore[reportUnusedParameter] ) -> type[WorkflowInboundInterceptor] | None: """Class that will be instantiated and used to intercept workflows. @@ -168,6 +168,7 @@ class ContinueAsNewInput: task_queue: str | None run_timeout: timedelta | None task_timeout: timedelta | None + backoff_start_interval: timedelta | None retry_policy: temporalio.common.RetryPolicy | None memo: Mapping[str, Any] | None search_attributes: None | ( @@ -175,8 +176,13 @@ class ContinueAsNewInput: ) headers: Mapping[str, temporalio.api.common.v1.Payload] versioning_intent: VersioningIntent | None + initial_versioning_behavior: ContinueAsNewVersioningBehavior | None + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None + """.. warning:: + Event Groups is an experimental API and may change without notice. + """ # The types may be absent - arg_types: list[type] | None + arg_types: list[type] | None = None @dataclass @@ -229,6 +235,10 @@ class SignalChildWorkflowInput: args: Sequence[Any] child_workflow_id: str headers: Mapping[str, temporalio.api.common.v1.Payload] + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None + """.. warning:: + Event Groups is an experimental API and may change without notice. + """ @dataclass @@ -241,6 +251,10 @@ class SignalExternalWorkflowInput: workflow_id: str workflow_run_id: str | None headers: Mapping[str, temporalio.api.common.v1.Payload] + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None + """.. warning:: + Event Groups is an experimental API and may change without notice. + """ @dataclass @@ -261,6 +275,12 @@ class StartActivityInput: disable_eager_execution: bool versioning_intent: VersioningIntent | None summary: str | None + event_groups: Sequence[temporalio.workflow.EventGroup] | None = field( + default=None, kw_only=True + ) + """.. warning:: + Event Groups is an experimental API and may change without notice. + """ priority: temporalio.common.Priority # The types may be absent arg_types: list[type] | None @@ -291,6 +311,18 @@ class StartChildWorkflowInput: versioning_intent: VersioningIntent | None static_summary: str | None static_details: str | None + versioning_override: temporalio.common.VersioningOverride | None = field( + default=None, kw_only=True + ) + """.. warning:: + Child workflow versioning overrides are experimental and may change without notice. + """ + event_groups: Sequence[temporalio.workflow.EventGroup] | None = field( + default=None, kw_only=True + ) + """.. warning:: + Event Groups is an experimental API and may change without notice. + """ priority: temporalio.common.Priority # The types may be absent arg_types: list[type] | None @@ -306,9 +338,15 @@ class StartNexusOperationInput(Generic[InputT, OutputT]): operation: nexusrpc.Operation[InputT, OutputT] | str | Callable[..., Any] input: InputT schedule_to_close_timeout: timedelta | None + schedule_to_start_timeout: timedelta | None + start_to_close_timeout: timedelta | None cancellation_type: temporalio.workflow.NexusOperationCancellationType headers: Mapping[str, str] | None summary: str | None + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None + """.. warning:: + Event Groups is an experimental API and may change without notice. + """ output_type: type[OutputT] | None = None def __post_init__(self) -> None: @@ -362,10 +400,14 @@ class StartLocalActivityInput: cancellation_type: temporalio.workflow.ActivityCancellationType headers: Mapping[str, temporalio.api.common.v1.Payload] summary: str | None + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None + """.. warning:: + Event Groups is an experimental API and may change without notice. + """ # The types may be absent - arg_types: list[type] | None - ret_type: type | None + arg_types: list[type] | None = None + ret_type: type | None = None class WorkflowInboundInterceptor: @@ -413,12 +455,14 @@ async def handle_update_handler(self, input: HandleUpdateInput) -> Any: return await self.next.handle_update_handler(input) -class WorkflowOutboundInterceptor: +class WorkflowOutboundInterceptor(_SystemNexusWorkflowOutboundInterceptorBase): """Outbound interceptor to wrap calls made from within workflows. This should be extended by any workflow outbound interceptors. """ + next: WorkflowOutboundInterceptor + def __init__(self, next: WorkflowOutboundInterceptor) -> None: """Create the outbound interceptor. @@ -428,6 +472,11 @@ def __init__(self, next: WorkflowOutboundInterceptor) -> None: """ self.next = next + def _next_system_nexus_interceptor( + self, + ) -> _SystemNexusWorkflowOutboundInterceptorBase: + return self.next + def continue_as_new(self, input: ContinueAsNewInput) -> NoReturn: """Called for every :py:func:`temporalio.workflow.continue_as_new` call.""" self.next.continue_as_new(input) @@ -480,6 +529,12 @@ async def start_nexus_operation( """Called for every :py:func:`temporalio.workflow.NexusClient.start_operation` call.""" return await self.next.start_nexus_operation(input) + async def start_system_nexus_operation( + self, input: StartNexusOperationInput[InputT, OutputT] + ) -> temporalio.workflow.NexusOperationHandle[OutputT]: + """Intercept a Temporal System Nexus operation started by a workflow.""" + return await self.next.start_system_nexus_operation(input) + @dataclass class ExecuteNexusOperationStartInput: diff --git a/temporalio/worker/_nexus.py b/temporalio/worker/_nexus.py index bc06fbd4a5..e53efba5ab 100644 --- a/temporalio/worker/_nexus.py +++ b/temporalio/worker/_nexus.py @@ -5,27 +5,25 @@ import asyncio import concurrent.futures import contextvars -import json import threading -from collections.abc import Callable, Mapping, Sequence +from collections.abc import Awaitable, Callable, Mapping, Sequence from dataclasses import dataclass +from datetime import datetime, timezone from functools import reduce from typing import ( Any, NoReturn, ParamSpec, + TypeGuard, TypeVar, cast, ) -import google.protobuf.json_format import nexusrpc.handler from nexusrpc import LazyValue from nexusrpc.handler import CancelOperationContext, Handler, StartOperationContext import temporalio.api.common.v1 -import temporalio.api.enums.v1 -import temporalio.api.failure.v1 import temporalio.api.nexus.v1 import temporalio.bridge.proto.nexus import temporalio.bridge.worker @@ -33,8 +31,14 @@ import temporalio.common import temporalio.converter import temporalio.nexus +import temporalio.nexus.system +from temporalio.bridge._visitor import PayloadVisitor +from temporalio.bridge._visitor_functions import PayloadSequence, VisitorFunctions +from temporalio.bridge.worker import PollShutdownError from temporalio.exceptions import ( ApplicationError, + CancelledError, + FailureError, WorkflowAlreadyStartedError, ) from temporalio.nexus import Info, logger @@ -49,6 +53,15 @@ _TEMPORAL_FAILURE_PROTO_TYPE = "temporal.api.failure.v1.Failure" +_PAYLOAD_VALIDATION_ERROR_TYPE = "PayloadValidationError" +""":py:attr:`temporalio.exceptions.ApplicationError.type` a data converter uses to +say that it understood a Nexus operation's input but considers it invalid. + +When non-retryable, such an error is reported as a +:py:attr:`nexusrpc.HandlerErrorType.BAD_REQUEST` handler error rather than as a +handler-side :py:attr:`nexusrpc.HandlerErrorType.INTERNAL` error. +""" + @dataclass class _RunningNexusTask: @@ -60,12 +73,13 @@ def cancel(self, reason: str): self.task.cancel() -class _NexusWorker: +class _NexusWorker: # type:ignore[reportUnusedClass] def __init__( self, *, bridge_worker: Callable[[], temporalio.bridge.worker.Worker], client: temporalio.client.Client, + namespace: str, task_queue: str, service_handlers: Sequence[Any], data_converter: temporalio.converter.DataConverter, @@ -73,10 +87,9 @@ def __init__( metric_meter: temporalio.common.MetricMeter, executor: concurrent.futures.ThreadPoolExecutor | None, ) -> None: - # TODO: make it possible to query task queue of bridge worker instead of passing - # unused task_queue into _NexusWorker, _ActivityWorker, etc? self._bridge_worker = bridge_worker self._client = client + self._namespace = namespace self._task_queue = task_queue self._metric_meter = metric_meter @@ -90,11 +103,10 @@ def __init__( ) self._data_converter = data_converter - # TODO(nexus-preview): interceptors - self._interceptors = interceptors self._running_tasks: dict[bytes, _RunningNexusTask] = {} self._fail_worker_exception_queue: asyncio.Queue[Exception] = asyncio.Queue() + self._worker_shutdown_event: temporalio.common._CompositeEvent | None = None async def run(self) -> None: """Continually poll for Nexus tasks and dispatch to handlers.""" @@ -117,14 +129,23 @@ async def raise_from_exception_queue() -> NoReturn: if nexus_task.HasField("task"): task = nexus_task.task + request_deadline = ( + nexus_task.request_deadline.ToDatetime().replace( + tzinfo=timezone.utc + ) + if nexus_task.HasField("request_deadline") + else None + ) if task.request.HasField("start_operation"): task_cancellation = _NexusTaskCancellation() start_op_task = asyncio.create_task( self._handle_start_operation_task( - task.task_token, - task.request.start_operation, - dict(task.request.header), - task_cancellation, + task_token=task.task_token, + start_request=task.request.start_operation, + headers=dict(task.request.header), + task_cancellation=task_cancellation, + request_deadline=request_deadline, + endpoint=nexus_task.endpoint, ) ) self._running_tasks[task.task_token] = _RunningNexusTask( @@ -134,10 +155,12 @@ async def raise_from_exception_queue() -> NoReturn: task_cancellation = _NexusTaskCancellation() cancel_op_task = asyncio.create_task( self._handle_cancel_operation_task( - task.task_token, - task.request.cancel_operation, - dict(task.request.header), - task_cancellation, + task_token=task.task_token, + request=task.request.cancel_operation, + headers=dict(task.request.header), + task_cancellation=task_cancellation, + request_deadline=request_deadline, + endpoint=nexus_task.endpoint, ) ) self._running_tasks[task.task_token] = _RunningNexusTask( @@ -165,13 +188,17 @@ async def raise_from_exception_queue() -> NoReturn: else: raise NotImplementedError(f"Invalid Nexus task: {nexus_task}") - except temporalio.bridge.worker.PollShutdownError: + except PollShutdownError: exception_task.cancel() return except Exception as err: raise RuntimeError("Nexus worker failed") from err + def notify_shutdown(self) -> None: + if self._worker_shutdown_event: + self._worker_shutdown_event.set() + # Only call this if run() raised an error async def drain_poll_queue(self) -> None: while True: @@ -183,7 +210,7 @@ async def drain_poll_queue(self) -> None: ) completion.error.failure.message = "Worker shutting down" await self._bridge_worker().complete_nexus_task(completion) - except temporalio.bridge.worker.PollShutdownError: + except PollShutdownError: return # Only call this after run()/drain_poll_queue() have returned. This will not @@ -194,6 +221,47 @@ async def wait_all_completed(self) -> None: ] await asyncio.gather(*running_tasks, return_exceptions=True) + # Task completion should never be dropped in case of cancellation. + # The Rust future in core must complete for shutdown to happen without + # hanging. + async def _complete_task( + self, completion: temporalio.bridge.proto.nexus.NexusTaskCompletion + ): + await asyncio.shield(self._bridge_worker().complete_nexus_task(completion)) + + async def _encode_completion( + self, + completion: temporalio.bridge.proto.nexus.NexusTaskCompletion, + data_converter: temporalio.converter.DataConverter, + ) -> None: + """Apply the payload codec, external storage, then the payload codec to + any storage references in the completion's payloads. + """ + await PayloadVisitor(skip_search_attributes=True, skip_headers=True).visit( + _PayloadTransformVisitor(data_converter._encode_payload_sequence), + completion, + ) + await PayloadVisitor(skip_search_attributes=True).visit( + _PayloadTransformVisitor(data_converter._external_store_payload_sequence), + completion, + ) + await PayloadVisitor(skip_search_attributes=True, skip_headers=True).visit( + _PayloadTransformVisitor(data_converter._encode_reference_payload_sequence), + completion, + ) + + def _data_converter_for_nexus_task( + self, endpoint: str, service: str, operation: str + ) -> temporalio.converter.DataConverter: + return self._data_converter._with_contexts( + temporalio.converter.NexusSerializationContext( + endpoint=endpoint, + service=service, + operation=operation, + ), + temporalio.converter.StorageDriverStoreContext(namespace=self._namespace), + ) + # TODO(nexus-preview): stack trace pruning. See sdk-typescript NexusHandler.execute # "Any call up to this function and including this one will be trimmed out of stack traces."" @@ -203,28 +271,52 @@ async def _handle_cancel_operation_task( request: temporalio.api.nexus.v1.CancelOperationRequest, headers: Mapping[str, str], task_cancellation: nexusrpc.handler.OperationTaskCancellation, + request_deadline: datetime | None, + endpoint: str, ) -> None: """Handle a cancel operation task. Attempt to execute the user cancel_operation method. Handle errors and send the task completion. """ + # Create the worker shutdown event if not created + if not self._worker_shutdown_event: + self._worker_shutdown_event = temporalio.common._CompositeEvent( + thread_event=threading.Event(), async_event=asyncio.Event() + ) # TODO(nexus-prerelease): headers ctx = CancelOperationContext( service=request.service, operation=request.operation, headers=headers, task_cancellation=task_cancellation, + request_deadline=request_deadline, + ) + data_converter = self._data_converter_for_nexus_task( + endpoint, request.service, request.operation ) temporalio.nexus._operation_context._TemporalCancelOperationContext( - info=lambda: Info(task_queue=self._task_queue), + info=lambda: Info( + endpoint=endpoint, + namespace=self._namespace, + task_queue=self._task_queue, + ), nexus_context=ctx, client=self._client, _runtime_metric_meter=self._metric_meter, + _worker_shutdown_event=self._worker_shutdown_event, ).set() try: try: await self._handler.cancel_operation(ctx, request.operation_token) + completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( + task_token=task_token, + completed=temporalio.api.nexus.v1.Response( + cancel_operation=temporalio.api.nexus.v1.CancelOperationResponse() + ), + ) + # No-op but keeps the cancel covered if it ever carries a payload. + await self._encode_completion(completion, data_converter) except asyncio.CancelledError: completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( task_token=task_token, @@ -232,21 +324,28 @@ async def _handle_cancel_operation_task( ) except BaseException as err: logger.warning("Failed to execute Nexus cancel operation method") + handler_error = _exception_to_handler_error(err) completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( task_token=task_token, - error=await self._handler_error_to_proto( - _exception_to_handler_error(err) - ), ) - else: - completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( - task_token=task_token, - completed=temporalio.api.nexus.v1.Response( - cancel_operation=temporalio.api.nexus.v1.CancelOperationResponse() - ), - ) - - await self._bridge_worker().complete_nexus_task(completion) + try: + data_converter.failure_converter.to_failure( + handler_error, + data_converter.payload_converter, + completion.failure, + ) + await self._encode_completion(completion, data_converter) + except asyncio.CancelledError: + # Core still needs a completion, or worker shutdown hangs + completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( + task_token=task_token, + ack_cancel=task_cancellation.is_cancelled(), + ) + except Exception as inner_err: + completion = _failure_building_completion( + task_token, err, inner_err + ) + await self._complete_task(completion) except Exception: logger.exception("Failed to send Nexus task completion") finally: @@ -263,17 +362,34 @@ async def _handle_start_operation_task( start_request: temporalio.api.nexus.v1.StartOperationRequest, headers: Mapping[str, str], task_cancellation: nexusrpc.handler.OperationTaskCancellation, + request_deadline: datetime | None, + endpoint: str, ) -> None: """Handle a start operation task. Attempt to execute the user start_operation method and invoke the data converter on the result. Handle errors and send the task completion. """ + data_converter = self._data_converter_for_nexus_task( + endpoint, start_request.service, start_request.operation + ) try: try: start_response = await self._start_operation( - start_request, headers, task_cancellation + start_request, + headers, + task_cancellation, + request_deadline, + endpoint, + data_converter, ) + completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( + task_token=task_token, + completed=temporalio.api.nexus.v1.Response( + start_operation=start_response + ), + ) + await self._encode_completion(completion, data_converter) except asyncio.CancelledError: completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( task_token=task_token, @@ -283,22 +399,30 @@ async def _handle_start_operation_task( logger.warning("Failed to execute Nexus start operation method") completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( task_token=task_token, - error=await self._handler_error_to_proto( - _exception_to_handler_error(err) - ), ) + handler_error = _exception_to_handler_error(err) if isinstance(err, concurrent.futures.BrokenExecutor): self._fail_worker_exception_queue.put_nowait(err) - else: - completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( - task_token=task_token, - completed=temporalio.api.nexus.v1.Response( - start_operation=start_response - ), - ) + try: + data_converter.failure_converter.to_failure( + handler_error, + data_converter.payload_converter, + completion.failure, + ) + await self._encode_completion(completion, data_converter) + except asyncio.CancelledError: + # Core still needs a completion, or worker shutdown hangs + completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( + task_token=task_token, + ack_cancel=task_cancellation.is_cancelled(), + ) + except Exception as inner_err: + completion = _failure_building_completion( + task_token, err, inner_err + ) - await self._bridge_worker().complete_nexus_task(completion) + await self._complete_task(completion) except Exception: logger.exception("Failed to send Nexus task completion") finally: @@ -314,6 +438,9 @@ async def _start_operation( start_request: temporalio.api.nexus.v1.StartOperationRequest, headers: Mapping[str, str], cancellation: nexusrpc.handler.OperationTaskCancellation, + request_deadline: datetime | None, + endpoint: str, + data_converter: temporalio.converter.DataConverter, ) -> temporalio.api.nexus.v1.StartOperationResponse: """Invoke the Nexus handler's start_operation method and construct the StartOperationResponse. @@ -321,6 +448,11 @@ async def _start_operation( All other exceptions are handled by a caller of this function. """ + # Create the worker shutdown event if not created + if not self._worker_shutdown_event: + self._worker_shutdown_event = temporalio.common._CompositeEvent( + thread_event=threading.Event(), async_event=asyncio.Event() + ) ctx = StartOperationContext( service=start_request.service, operation=start_request.operation, @@ -333,16 +465,22 @@ async def _start_operation( ], callback_headers=dict(start_request.callback_header), task_cancellation=cancellation, + request_deadline=request_deadline, ) temporalio.nexus._operation_context._TemporalStartOperationContext( nexus_context=ctx, client=self._client, - info=lambda: Info(task_queue=self._task_queue), + info=lambda: Info( + endpoint=endpoint, + namespace=self._namespace, + task_queue=self._task_queue, + ), _runtime_metric_meter=self._metric_meter, + _worker_shutdown_event=self._worker_shutdown_event, ).set() input = LazyValue( - serializer=_DummyPayloadSerializer( - data_converter=self._data_converter, + serializer=_NexusPayloadSerializer( + data_converter=data_converter, payload=start_request.payload, ), headers={}, @@ -362,7 +500,7 @@ async def _start_operation( ) ) elif isinstance(result, nexusrpc.handler.StartOperationResultSync): - [payload] = await self._data_converter.encode([result.value]) + [payload] = data_converter.payload_converter.to_payloads([result.value]) return temporalio.api.nexus.v1.StartOperationResponse( sync_success=temporalio.api.nexus.v1.StartOperationResponse.Sync( payload=payload, @@ -378,136 +516,179 @@ async def _start_operation( ) ) except nexusrpc.OperationError as err: - return temporalio.api.nexus.v1.StartOperationResponse( - operation_error=await self._operation_error_to_proto(err), - ) - - async def _nexus_error_to_nexus_failure_proto( - self, - error: nexusrpc.HandlerError | nexusrpc.OperationError, - ) -> temporalio.api.nexus.v1.Failure: - """Serialize ``error`` as a Nexus Failure proto. - - The Nexus Failure represents the top-level error. If there is a cause chain - attached to the exception, then serialize it as the ``details``. - - Notice that any stack trace attached to ``error`` itself is not included in the - result. - - See https://github.com/nexus-rpc/api/blob/main/SPEC.md#failure - """ - if cause := error.__cause__: + # Convert OperationError to a Temporal failure try: - failure = temporalio.api.failure.v1.Failure() - await self._data_converter.encode_failure(cause, failure) - # Following other SDKs, we move the message from the first item - # in the details chain to the top level nexus.v1.Failure - # message. In Go and Java this particularly makes sense since - # their constructors are controlled such that the nexus - # exception itself does not have its own message. However, in - # Python, nexusrpc.HandlerError and nexusrpc.OperationError have - # their own error messages and stack traces, independent of any - # cause exception they may have, and this must be propagated to - # the caller. See _exception_to_handler_error for how we address - # this by injecting an additional error into the cause chain - # before the current function is called. - failure_dict = google.protobuf.json_format.MessageToDict(failure) - return temporalio.api.nexus.v1.Failure( - message=failure_dict.pop("message", str(error)), - metadata={"type": _TEMPORAL_FAILURE_PROTO_TYPE}, - details=json.dumps( - failure_dict, - separators=(",", ":"), - ).encode("utf-8"), + match err.state: + case nexusrpc.OperationErrorState.CANCELED: + raise CancelledError(err.message) from err.__cause__ + case nexusrpc.OperationErrorState.FAILED: + raise ApplicationError( + message=err.message, + type="OperationError", + non_retryable=True, + ) from err.__cause__ + except FailureError as new_err: + response = temporalio.api.nexus.v1.StartOperationResponse() + data_converter.failure_converter.to_failure( + new_err, + data_converter.payload_converter, + response.failure, ) - except BaseException: - logger.exception("Failed to serialize cause chain of nexus exception") - return temporalio.api.nexus.v1.Failure( - message=str(error), - metadata={}, - details=b"", - ) + return response - async def _operation_error_to_proto( - self, - err: nexusrpc.OperationError, - ) -> temporalio.api.nexus.v1.UnsuccessfulOperationError: - return temporalio.api.nexus.v1.UnsuccessfulOperationError( - operation_state=err.state.value, - failure=await self._nexus_error_to_nexus_failure_proto(err), - ) - async def _handler_error_to_proto( - self, handler_error: nexusrpc.HandlerError - ) -> temporalio.api.nexus.v1.HandlerError: - """Serialize ``handler_error`` as a Nexus HandlerError proto.""" - retry_behavior = ( - temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE - if handler_error.retryable_override is True - else temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE - if handler_error.retryable_override is False - else temporalio.api.enums.v1.NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED - ) - return temporalio.api.nexus.v1.HandlerError( - error_type=handler_error.type.value, - failure=await self._nexus_error_to_nexus_failure_proto(handler_error), - retry_behavior=retry_behavior, - ) +class _PayloadTransformVisitor(VisitorFunctions): + """Adapts a payload-sequence transform for use with :class:`PayloadVisitor`.""" + + def __init__( + self, + f: Callable[ + [Sequence[temporalio.api.common.v1.Payload]], + Awaitable[list[temporalio.api.common.v1.Payload]], + ], + ) -> None: + self._f = f + + async def visit_payload(self, payload: temporalio.api.common.v1.Payload) -> None: + new_payload = (await self._f([payload]))[0] + if new_payload is not payload: + payload.CopyFrom(new_payload) + + async def visit_payloads(self, payloads: PayloadSequence) -> None: + if len(payloads) == 0: + return + new_payloads = await self._f(payloads) + if new_payloads is payloads: + return + del payloads[:] + payloads.extend(new_payloads) + + +def _is_payload_validation_error(err: BaseException) -> TypeGuard[ApplicationError]: + """Whether err is a non-retryable :py:class:`ApplicationError` whose type is + exactly :py:data:`_PAYLOAD_VALIDATION_ERROR_TYPE`. + """ + return ( + isinstance(err, ApplicationError) + and err.non_retryable + and err.type == _PAYLOAD_VALIDATION_ERROR_TYPE + ) @dataclass -class _DummyPayloadSerializer: +class _NexusPayloadSerializer: data_converter: temporalio.converter.DataConverter payload: temporalio.api.common.v1.Payload - async def serialize(self, value: Any) -> nexusrpc.Content: + async def serialize(self, value: Any) -> nexusrpc.Content: # type:ignore[reportUnusedParameter] raise NotImplementedError( "The serialize method of the Serializer is not used by handlers" ) async def deserialize( self, - content: nexusrpc.Content, + content: nexusrpc.Content, # type:ignore[reportUnusedParameter] as_type: type[Any] | None = None, ) -> Any: + dc = self.data_converter + # The visitor mutates in place, so work on a copy to leave the request + # payload untouched. + payload = temporalio.api.common.v1.Payload() + payload.CopyFrom(self.payload) try: - [input] = await self.data_converter.decode( - [self.payload], + await PayloadVisitor(skip_search_attributes=True, skip_headers=True).visit( + _PayloadTransformVisitor(dc._decode_reference_payload_sequence), + payload, + ) + except Exception as err: + raise nexusrpc.HandlerError( + "Payload codec failed to decode Nexus operation input storage reference", + type=nexusrpc.HandlerErrorType.INTERNAL, + ) from err + + try: + await PayloadVisitor(skip_search_attributes=True).visit( + _PayloadTransformVisitor(dc._external_retrieve_payload_sequence), + payload, + ) + except Exception as err: + raise nexusrpc.HandlerError( + "Failed to retrieve Nexus operation input from external storage", + type=nexusrpc.HandlerErrorType.INTERNAL, + retryable_override=True, + ) from err + + try: + await PayloadVisitor(skip_search_attributes=True, skip_headers=True).visit( + _PayloadTransformVisitor(dc._decode_payload_sequence), payload + ) + except Exception as err: + if _is_payload_validation_error(err): + # The data converter decoded the input and rejected it, so this + # is the caller's fault rather than a handler-side error. + raise nexusrpc.HandlerError( + "Invalid operation input", + type=nexusrpc.HandlerErrorType.BAD_REQUEST, + retryable_override=False, + ) from err + raise nexusrpc.HandlerError( + "Payload codec failed to decode Nexus operation input", + type=nexusrpc.HandlerErrorType.INTERNAL, + ) from err + + try: + payload_converter = dc.payload_converter + if temporalio.nexus.system._is_system_payload(payload): + payload_converter = temporalio.nexus.system._get_payload_converter( + dc.payload_converter, + dc.failure_converter, + ) + [input] = payload_converter.from_payloads( + [payload], type_hints=[as_type] if as_type else None, ) return input except Exception as err: + if _is_payload_validation_error(err): + # The data converter converted the input and rejected it, so + # distinguish it from input that will never decode into the + # expected type. + raise nexusrpc.HandlerError( + "Invalid operation input", + type=nexusrpc.HandlerErrorType.BAD_REQUEST, + retryable_override=False, + ) from err raise nexusrpc.HandlerError( - "Data converter failed to decode Nexus operation input", + "Payload converter failed to decode Nexus operation input", type=nexusrpc.HandlerErrorType.BAD_REQUEST, retryable_override=False, ) from err -# TODO(nexus-prerelease): tests for this function +def _failure_building_completion( + task_token: bytes, err: BaseException, inner_err: Exception +) -> temporalio.bridge.proto.nexus.NexusTaskCompletion: + # Core still needs a completion when the failure can't be converted or + # encoded, or the task's slot is never released and shutdown hangs + logger.exception(f"Failed building Nexus failure, original error: {err}") + completion = temporalio.bridge.proto.nexus.NexusTaskCompletion( + task_token=task_token, + ) + completion.failure.message = f"Failed building exception result: {inner_err}" + completion.failure.nexus_handler_failure_info.type = ( + nexusrpc.HandlerErrorType.INTERNAL.name + ) + return completion + + def _exception_to_handler_error(err: BaseException) -> nexusrpc.HandlerError: # Based on sdk-typescript's convertKnownErrors: # https://github.com/temporalio/sdk-typescript/blob/nexus/packages/worker/src/nexus.ts if isinstance(err, nexusrpc.HandlerError): - # Insert an ApplicationError at the head of the cause chain to hold the - # HandlerError's message and traceback. We do this because - # _nexus_error_to_nexus_failure_proto moves the message at the head of - # the cause chain to be the top-level nexus.Failure message. Therefore, - # if we did not do this, then the HandlerError's own message and - # traceback would be lost. (This hoisting behavior makes sense for Go - # and Java since they control construction of HandlerError such that it - # does not have its own message or stack trace.) - handler_err = err - err = ApplicationError( - message=str(handler_err), - non_retryable=not handler_err.retryable, - ) - err.__traceback__ = handler_err.__traceback__ - err.__cause__ = handler_err.__cause__ + return err elif isinstance(err, ApplicationError): handler_err = nexusrpc.HandlerError( - # TODO(nexus-preview): confirm what we want as message here - err.message, + message="Handler failed with non-retryable application error", type=nexusrpc.HandlerErrorType.INTERNAL, retryable_override=not err.non_retryable, ) @@ -579,7 +760,7 @@ def _exception_to_handler_error(err: BaseException) -> nexusrpc.HandlerError: ) else: handler_err = nexusrpc.HandlerError( - str(err), type=nexusrpc.HandlerErrorType.INTERNAL + "Internal handler error", type=nexusrpc.HandlerErrorType.INTERNAL ) handler_err.__cause__ = err return handler_err diff --git a/temporalio/worker/_plugin.py b/temporalio/worker/_plugin.py index 969b1d3706..d05b567405 100644 --- a/temporalio/worker/_plugin.py +++ b/temporalio/worker/_plugin.py @@ -23,8 +23,6 @@ class Plugin(abc.ABC): Plugins allow customization of worker creation and execution processes through a chain of responsibility pattern. Each plugin can modify the worker configuration or intercept worker execution. - - WARNING: This is an experimental feature and may change in the future. """ def name(self) -> str: @@ -35,6 +33,14 @@ def name(self) -> str: """ return type(self).__module__ + "." + type(self).__qualname__ + def version(self) -> str: + """Get the version of this plugin. Can be overridden to report a version in worker heartbeats. + + Returns: + The version of the plugin. Empty by default. + """ + return "" + @abc.abstractmethod def configure_worker(self, config: WorkerConfig) -> WorkerConfig: """Hook called when creating a worker to allow modification of configuration. diff --git a/temporalio/worker/_replayer.py b/temporalio/worker/_replayer.py index 26c5961d45..62a27b29cf 100644 --- a/temporalio/worker/_replayer.py +++ b/temporalio/worker/_replayer.py @@ -8,7 +8,6 @@ from collections.abc import AsyncIterator, Mapping, Sequence from contextlib import AbstractAsyncContextManager, asynccontextmanager from dataclasses import dataclass -from typing import Dict, Optional, Type from typing_extensions import TypedDict @@ -25,7 +24,12 @@ from ._interceptor import Interceptor from ._worker import load_default_build_id from ._workflow import _WorkflowWorker -from ._workflow_instance import UnsandboxedWorkflowRunner, WorkflowRunner +from ._workflow_instance import ( + _DEFAULT_ENABLED_WORKFLOW_LOGIC_FLAGS, + UnsandboxedWorkflowRunner, + WorkflowRunner, + _WorkflowLogicFlag, +) from .workflow_sandbox import SandboxedWorkflowRunner logger = logging.getLogger(__name__) @@ -84,6 +88,7 @@ def __init__( header_codec_behavior=header_codec_behavior, ) self._initial_config = self._config.copy() + self._default_workflow_logic_flags = set(_DEFAULT_ENABLED_WORKFLOW_LOGIC_FLAGS) # Apply plugin configuration self.plugins = plugins @@ -94,6 +99,14 @@ def __init__( if not self._config.get("workflows"): raise ValueError("At least one workflow must be specified") + def _set_default_workflow_logic_flag( + self, flag: _WorkflowLogicFlag, *, enabled: bool + ) -> None: + if enabled: + self._default_workflow_logic_flags.add(flag) + else: + self._default_workflow_logic_flags.discard(flag) + def config(self, *, active_config: bool = False) -> ReplayerConfig: """Config, as a dictionary, used to create this replayer. @@ -180,7 +193,7 @@ def workflow_replay_iterator( replayed. """ - def make_lambda(plugin, next): + def make_lambda(plugin, next): # type: ignore[reportMissingParameterType] return lambda r, hs: plugin.run_replayer(r, hs, next) next_function = lambda r, hs: r._workflow_replay_iterator(hs) @@ -204,7 +217,7 @@ async def _workflow_replay_iterator( # Create eviction hook def on_eviction_hook( - run_id: str, + _run_id: str, remove_job: temporalio.bridge.proto.workflow_activation.RemoveFromCache, ) -> None: nonlocal last_replay_failure @@ -234,6 +247,10 @@ def on_eviction_hook( runtime = ( self._config.get("runtime") or temporalio.runtime.Runtime.default() ) + data_converter = ( + self._config.get("data_converter") + or temporalio.converter.DataConverter.default + ) workflow_worker = _WorkflowWorker( bridge_worker=lambda: bridge_worker, namespace=self._config.get("namespace", "ReplayNamespace"), @@ -247,12 +264,12 @@ def on_eviction_hook( "unsandboxed_workflow_runner" ) or UnsandboxedWorkflowRunner(), - data_converter=self._config.get("data_converter") - or temporalio.converter.DataConverter.default, + data_converter=data_converter, interceptors=self._config.get("interceptors", []), workflow_failure_exception_types=self._config.get( "workflow_failure_exception_types", [] ), + patch_activation_callback=None, debug_mode=self._config.get("debug_mode", False), metric_meter=runtime.metric_meter, on_eviction_hook=on_eviction_hook, @@ -266,7 +283,18 @@ def on_eviction_hook( "header_codec_behavior", HeaderCodecBehavior.NO_CODEC ) != HeaderCodecBehavior.NO_CODEC, + max_workflow_task_external_storage_concurrency=1, + default_workflow_logic_flags=frozenset( + self._default_workflow_logic_flags + ), + ) + external_storage = data_converter.external_storage + storage_driver_types = ( + {driver.type() for driver in external_storage.drivers} + if external_storage + else set() ) + # Create bridge worker bridge_worker, pusher = temporalio.bridge.worker.Worker.for_replay( runtime._core_runtime, @@ -297,6 +325,7 @@ def on_eviction_hook( ), nonsticky_to_sticky_poll_ratio=1, no_remote_activities=True, + disable_payload_error_limit=True, task_types=temporalio.bridge.worker.WorkerTaskTypes( enable_workflows=True, enable_local_activities=False, @@ -308,6 +337,7 @@ def on_eviction_hook( default_heartbeat_throttle_interval_millis=1000, max_activities_per_second=None, max_task_queue_activities_per_second=None, + max_eager_activity_reservations_per_workflow_task=3, graceful_shutdown_period_millis=0, versioning_strategy=temporalio.bridge.worker.WorkerVersioningStrategyNone( build_id_no_versioning=self._config.get("build_id") @@ -322,7 +352,10 @@ def on_eviction_hook( nexus_task_poller_behavior=temporalio.bridge.worker.PollerBehaviorSimpleMaximum( 1 ), - plugins=[plugin.name() for plugin in self.plugins], + plugins=[ + (plugin.name(), plugin.version()) for plugin in self.plugins + ], + storage_drivers=storage_driver_types, ), ) bridge_worker_scope = bridge_worker diff --git a/temporalio/worker/_tuning.py b/temporalio/worker/_tuning.py index 381be69605..39ab8343a1 100644 --- a/temporalio/worker/_tuning.py +++ b/temporalio/worker/_tuning.py @@ -6,11 +6,10 @@ from collections.abc import Callable from dataclasses import dataclass from datetime import timedelta -from typing import Any, Literal, Optional, Protocol, TypeAlias, Union, runtime_checkable - -from typing_extensions import Self +from typing import Any, Literal, Protocol, TypeAlias, runtime_checkable import temporalio.bridge.worker +from temporalio.bridge.worker import BridgeCustomSlotSupplier from temporalio.common import WorkerDeploymentVersion _DEFAULT_RESOURCE_SLOTS_MAX = 500 @@ -131,9 +130,9 @@ class NexusSlotInfo(Protocol): operation: str -SlotInfo: TypeAlias = Union[ - WorkflowSlotInfo, ActivitySlotInfo, LocalActivitySlotInfo, NexusSlotInfo -] +SlotInfo: TypeAlias = ( + WorkflowSlotInfo | ActivitySlotInfo | LocalActivitySlotInfo | NexusSlotInfo +) # WARNING: This must match Rust worker::SlotMarkUsedCtx @@ -222,9 +221,9 @@ def release_slot(self, ctx: SlotReleaseContext) -> None: ... -SlotSupplier: TypeAlias = Union[ - FixedSizeSlotSupplier, ResourceBasedSlotSupplier, CustomSlotSupplier -] +SlotSupplier: TypeAlias = ( + FixedSizeSlotSupplier | ResourceBasedSlotSupplier | CustomSlotSupplier +) class _BridgeSlotSupplierWrapper: @@ -301,11 +300,9 @@ def _to_bridge_slot_supplier( ), ) elif isinstance(slot_supplier, CustomSlotSupplier): - return temporalio.bridge.worker.BridgeCustomSlotSupplier( - _BridgeSlotSupplierWrapper(slot_supplier) - ) + return BridgeCustomSlotSupplier(_BridgeSlotSupplierWrapper(slot_supplier)) else: - raise TypeError(f"Unknown slot supplier type: {slot_supplier}") + raise TypeError(f"Unknown slot supplier type: {slot_supplier}") # type:ignore[reportUnreachable] class WorkerTuner(ABC): diff --git a/temporalio/worker/_worker.py b/temporalio/worker/_worker.py index bbe02c54e4..e06bb99a4b 100644 --- a/temporalio/worker/_worker.py +++ b/temporalio/worker/_worker.py @@ -13,11 +13,7 @@ from datetime import timedelta from typing import ( Any, - List, - Optional, - Type, TypeAlias, - Union, cast, ) @@ -39,8 +35,16 @@ from ._nexus import _NexusWorker from ._plugin import Plugin from ._tuning import WorkerTuner -from ._workflow import _WorkflowWorker -from ._workflow_instance import UnsandboxedWorkflowRunner, WorkflowRunner +from ._workflow import ( + _DEFAULT_WORKFLOW_TASK_EXTERNAL_STORAGE_CONCURRENCY, + _WorkflowWorker, +) +from ._workflow_instance import ( + PatchActivationInput, + UnsandboxedWorkflowRunner, + WorkflowRunner, + _WorkflowLogicFlag, +) from .workflow_sandbox import SandboxedWorkflowRunner logger = logging.getLogger(__name__) @@ -82,10 +86,7 @@ def _to_bridge(self) -> temporalio.bridge.worker.PollerBehavior: ) -PollerBehavior: TypeAlias = Union[ - PollerBehaviorSimpleMaximum, - PollerBehaviorAutoscaling, -] +PollerBehavior: TypeAlias = PollerBehaviorSimpleMaximum | PollerBehaviorAutoscaling class Worker: @@ -129,7 +130,9 @@ def __init__( default_heartbeat_throttle_interval: timedelta = timedelta(seconds=30), max_activities_per_second: float | None = None, max_task_queue_activities_per_second: float | None = None, + max_eager_activity_reservations_per_workflow_task: int = 3, graceful_shutdown_timeout: timedelta = timedelta(), + plugin_shutdown_timeout: timedelta | None = timedelta(seconds=60), workflow_failure_exception_types: Sequence[type[BaseException]] = [], shared_state_manager: SharedStateManager | None = None, debug_mode: bool = False, @@ -138,15 +141,12 @@ def __init__( use_worker_versioning: bool = False, disable_safe_workflow_eviction: bool = False, deployment_config: WorkerDeploymentConfig | None = None, - workflow_task_poller_behavior: PollerBehavior = PollerBehaviorSimpleMaximum( - maximum=5 - ), - activity_task_poller_behavior: PollerBehavior = PollerBehaviorSimpleMaximum( - maximum=5 - ), - nexus_task_poller_behavior: PollerBehavior = PollerBehaviorSimpleMaximum( - maximum=5 - ), + patch_activation_callback: Callable[[PatchActivationInput], bool] | None = None, + workflow_task_poller_behavior: PollerBehavior | None = None, + activity_task_poller_behavior: PollerBehavior | None = None, + nexus_task_poller_behavior: PollerBehavior | None = None, + disable_payload_error_limit: bool = False, + max_workflow_task_external_storage_concurrency: int = _DEFAULT_WORKFLOW_TASK_EXTERNAL_STORAGE_CONCURRENCY, ) -> None: """Create a worker to process workflows and/or activities. @@ -162,15 +162,13 @@ def __init__( may be async functions or non-async functions. nexus_service_handlers: Instances of Nexus service handler classes decorated with :py:func:`@nexusrpc.handler.service_handler`. - - .. warning:: - This parameter is experimental and unstable. workflows: Workflow classes decorated with :py:func:`@workflow.defn`. activity_executor: Concurrent executor to use for non-async activities. This is required if any activities are non-async. :py:class:`concurrent.futures.ThreadPoolExecutor` is - recommended. If this is a + recommended. ``concurrent.futures.InterpreterPoolExecutor`` + is not supported. If this is a :py:class:`concurrent.futures.ProcessPoolExecutor`, all non-async activities must be picklable. ``max_workers`` on the executor should at least be ``max_concurrent_activities`` or a @@ -187,9 +185,6 @@ def __init__( nexus_task_executor: Executor to use for non-async Nexus operations. This is required if any operation start methods are non-``async def``. - - .. warning:: - This parameter is experimental and unstable. workflow_runner: Runner for workflows. unsandboxed_workflow_runner: Runner for workflows that opt-out of sandboxing. @@ -270,9 +265,20 @@ def __init__( poll request. If multiple workers on the same queue have different values set, they will thrash with the last poller winning. + max_eager_activity_reservations_per_workflow_task: Maximum number of + activity slots that may be reserved for eager execution when + completing a workflow task. The default is 3 and the value must + be positive. To disable eager activity execution, set + ``disable_eager_activity_execution`` to ``True``. graceful_shutdown_timeout: Amount of time after shutdown is called that activities are given to complete before their tasks are cancelled. + plugin_shutdown_timeout: Amount of time that exiting + ``async with Worker(...)`` waits, after shutdown, for the code + that plugins run after the Worker stops in ``run_worker``. That + code is cancelled after this time. ``None`` waits with no limit. + The default is 60 seconds. + WARNING: This setting is experimental. workflow_failure_exception_types: The types of exceptions that, if a workflow-thrown exception extends, will cause the workflow/update to fail instead of suspending the workflow via @@ -314,12 +320,33 @@ def __init__( deployment_config: Deployment config for the worker. Exclusive with ``build_id`` and ``use_worker_versioning``. WARNING: This is an experimental feature and may change in the future. + patch_activation_callback: Callback to decide whether the first non-replay + call to :py:func:`workflow.patched` for a + patch ID should activate that patch. The callback receives a + :py:class:`PatchActivationInput` and must return ``True`` to activate the + patch or ``False`` to leave it inactive. + WARNING: This is an experimental feature and may change in the future. workflow_task_poller_behavior: Specify the behavior of workflow task polling. Defaults to a 5-poller maximum. activity_task_poller_behavior: Specify the behavior of activity task polling. Defaults to a 5-poller maximum. nexus_task_poller_behavior: Specify the behavior of Nexus task polling. Defaults to a 5-poller maximum. + disable_payload_error_limit: If true, payload and memo error limit checks + are disabled in the worker, allowing payloads and memos that are above + the server error limit to be submitted to the Temporal server. If false, + the worker will validate the size before submitting to the Temporal server, + and cause a task failure if the size limit is exceeded. The default is False. + See https://docs.temporal.io/troubleshooting/blob-size-limit-error for more + details. + max_workflow_task_external_storage_concurrency: Maximum number of + external storage payload operations (store/retrieve) that may run + concurrently within a single workflow task activation. + Defaults to 3. Adjust this value based on your workload's needs. + Please report any issues you encounter with this setting or if you + feel the default should be changed. + WARNING: This setting is experimental. + """ config = WorkerConfig( client=client, @@ -351,7 +378,9 @@ def __init__( default_heartbeat_throttle_interval=default_heartbeat_throttle_interval, max_activities_per_second=max_activities_per_second, max_task_queue_activities_per_second=max_task_queue_activities_per_second, + max_eager_activity_reservations_per_workflow_task=max_eager_activity_reservations_per_workflow_task, graceful_shutdown_timeout=graceful_shutdown_timeout, + plugin_shutdown_timeout=plugin_shutdown_timeout, workflow_failure_exception_types=workflow_failure_exception_types, shared_state_manager=shared_state_manager, debug_mode=debug_mode, @@ -360,9 +389,12 @@ def __init__( use_worker_versioning=use_worker_versioning, disable_safe_workflow_eviction=disable_safe_workflow_eviction, deployment_config=deployment_config, + patch_activation_callback=patch_activation_callback, workflow_task_poller_behavior=workflow_task_poller_behavior, activity_task_poller_behavior=activity_task_poller_behavior, nexus_task_poller_behavior=nexus_task_poller_behavior, + disable_payload_error_limit=disable_payload_error_limit, + max_workflow_task_external_storage_concurrency=max_workflow_task_external_storage_concurrency, ) plugins_from_client = cast( @@ -388,6 +420,13 @@ def _init_from_config(self, client: temporalio.client.Client, config: WorkerConf Client is safe to take separately since it can't be modified by worker plugins. """ self._config = config + if sys.version_info >= (3, 14) and isinstance( + config.get("activity_executor"), concurrent.futures.InterpreterPoolExecutor + ): + raise ValueError( # pyright: ignore[reportUnreachable] + "InterpreterPoolExecutor is not supported as an activity_executor. " + "Use ThreadPoolExecutor or ProcessPoolExecutor instead." + ) if not ( config.get("activities") or config.get("nexus_service_handlers") @@ -406,6 +445,29 @@ def _init_from_config(self, client: temporalio.client.Client, config: WorkerConf raise ValueError( "deployment_config cannot be used with build_id or use_worker_versioning" ) + _deployment_config = config.get("deployment_config") + if ( + _deployment_config is not None + and not _deployment_config.use_worker_versioning + and _deployment_config.default_versioning_behavior + != VersioningBehavior.UNSPECIFIED + ): + raise ValueError( + "default_versioning_behavior must be UNSPECIFIED when use_worker_versioning is False" + ) + max_workflow_task_external_storage_concurrency = config.get( + "max_workflow_task_external_storage_concurrency", + _DEFAULT_WORKFLOW_TASK_EXTERNAL_STORAGE_CONCURRENCY, + ) + if max_workflow_task_external_storage_concurrency < 1: + raise ValueError( + "max_workflow_task_external_storage_concurrency must be positive" + ) + if config.get("max_eager_activity_reservations_per_workflow_task", 3) < 1: + raise ValueError( + "max_eager_activity_reservations_per_workflow_task must be positive; " + "use disable_eager_activity_execution=True to disable eager activity execution" + ) # Prepend applicable client interceptors to the given ones client_config = config["client"].config(active_config=True) # type: ignore[reportTypedDictNotRequiredAccess] @@ -415,6 +477,10 @@ def _init_from_config(self, client: temporalio.client.Client, config: WorkerConf ) interceptors = interceptors_from_client + list(config["interceptors"]) # type: ignore[reportTypedDictNotRequiredAccess] + # Extract storage drivers from the client's data converter + _ext_storage = client_config["data_converter"].external_storage + self._storage_drivers = list(_ext_storage.drivers) if _ext_storage else [] + # Extract the bridge service client bridge_client = _extract_bridge_client_for_worker(config["client"]) # type: ignore[reportTypedDictNotRequiredAccess] @@ -424,10 +490,13 @@ def _init_from_config(self, client: temporalio.client.Client, config: WorkerConf self._async_context_inner_task: asyncio.Task | None = None self._async_context_run_task: asyncio.Task | None = None self._async_context_run_exception: BaseException | None = None + self._async_context_exiting = False self._activity_worker: _ActivityWorker | None = None self._runtime = ( - bridge_client.config.runtime or temporalio.runtime.Runtime.default() + bridge_client._runtime + or bridge_client.config.runtime + or temporalio.runtime.Runtime.default() ) activities = config.get("activities") if activities: @@ -453,6 +522,7 @@ def _init_from_config(self, client: temporalio.client.Client, config: WorkerConf self._nexus_worker = _NexusWorker( bridge_worker=lambda: self._bridge_worker, client=config["client"], # type: ignore[reportTypedDictNotRequiredAccess] + namespace=client_config["namespace"], task_queue=config["task_queue"], # type: ignore[reportTypedDictNotRequiredAccess] service_handlers=nexus_service_handlers, data_converter=client_config["data_converter"], @@ -471,7 +541,7 @@ def _init_from_config(self, client: temporalio.client.Client, config: WorkerConf == temporalio.common.VersioningBehavior.UNSPECIFIED ) - def check_activity(activity): + def check_activity(activity: str): if self._activity_worker is None: raise ValueError( f"Activity function {activity} " @@ -495,6 +565,7 @@ def check_activity(activity): workflow_failure_exception_types=config[ "workflow_failure_exception_types" ], # type: ignore[reportTypedDictNotRequiredAccess] + patch_activation_callback=config.get("patch_activation_callback"), debug_mode=config["debug_mode"], # type: ignore[reportTypedDictNotRequiredAccess] disable_eager_activity_execution=config[ "disable_eager_activity_execution" @@ -506,6 +577,7 @@ def check_activity(activity): assert_local_activity_valid=check_activity, encode_headers=client_config["header_codec_behavior"] != HeaderCodecBehavior.NO_CODEC, + max_workflow_task_external_storage_concurrency=max_workflow_task_external_storage_concurrency, ) tuner = config.get("tuner") @@ -563,7 +635,12 @@ def check_activity(activity): maximum=max_activity_polls ) - deduped_plugin_names = list({plugin.name() for plugin in self._plugins}) + deduped_plugins = list( + {(plugin.name(), plugin.version()) for plugin in self._plugins} + ) + deduped_storage_driver_types = { + driver.type() for driver in self._storage_drivers + } # Create bridge worker last. We have empirically observed that if it is # created before an error is raised from the activity worker @@ -608,6 +685,9 @@ def check_activity(activity): max_task_queue_activities_per_second=config[ "max_task_queue_activities_per_second" ], # type: ignore[reportTypedDictNotRequiredAccess] + max_eager_activity_reservations_per_workflow_task=config[ + "max_eager_activity_reservations_per_workflow_task" + ], # type: ignore[reportTypedDictNotRequiredAccess] graceful_shutdown_period_millis=int( 1000 * config["graceful_shutdown_timeout"].total_seconds() # type: ignore[reportTypedDictNotRequiredAccess] ), @@ -622,12 +702,20 @@ def check_activity(activity): else set() ), versioning_strategy=versioning_strategy, - workflow_task_poller_behavior=workflow_task_poller_behavior._to_bridge(), - activity_task_poller_behavior=activity_task_poller_behavior._to_bridge(), - nexus_task_poller_behavior=config[ - "nexus_task_poller_behavior" - ]._to_bridge(), # type: ignore[reportTypedDictNotRequiredAccess,reportOptionalMemberAccess] - plugins=deduped_plugin_names, + workflow_task_poller_behavior=_poller_behavior_to_bridge( + workflow_task_poller_behavior + ), + activity_task_poller_behavior=_poller_behavior_to_bridge( + activity_task_poller_behavior + ), + nexus_task_poller_behavior=_poller_behavior_to_bridge( + config["nexus_task_poller_behavior"] # type: ignore[reportTypedDictNotRequiredAccess] + ), + plugins=deduped_plugins, + storage_drivers=deduped_storage_driver_types, + disable_payload_error_limit=config.get( + "disable_payload_error_limit", False + ), ), ) @@ -666,7 +754,7 @@ def client(self, value: temporalio.client.Client) -> None: must be using the same runtime as the current client. """ bridge_client = _extract_bridge_client_for_worker(value) - if self._runtime is not bridge_client.config.runtime: + if self._runtime is not bridge_client._runtime: raise ValueError( "New client is not on the same runtime as the existing client" ) @@ -674,6 +762,25 @@ def client(self, value: temporalio.client.Client) -> None: self._bridge_worker.replace_client(bridge_client._bridge_client) self._config["client"] = value + # Update the activity worker's client reference if activities are configured + if self._activity_worker: + self._activity_worker._client = value + + # Update the nexus worker's client reference if nexus services are configured + if self._nexus_worker: + self._nexus_worker._client = value + + def _set_default_workflow_logic_flag( + self, flag: _WorkflowLogicFlag, *, enabled: bool + ) -> None: + if self._started: + raise RuntimeError( + "Cannot set default workflow logic flags after the worker has started" + ) + if not self._workflow_worker: + raise RuntimeError("Cannot set workflow logic flags without workflows") + self._workflow_worker._set_default_workflow_logic_flag(flag, enabled=enabled) + @property def is_running(self) -> bool: """Whether the worker is running. @@ -711,7 +818,7 @@ async def run(self) -> None: explicit shutdown instead. """ - def make_lambda(plugin, next): + def make_lambda(plugin: Plugin, next: Callable[[Worker], Awaitable[None]]): return lambda w: plugin.run_worker(w, next) next_function = lambda w: w._run() @@ -721,13 +828,20 @@ def make_lambda(plugin, next): await next_function(self) async def _run(self): - # Eagerly validate which will do a namespace check in Core - await self._bridge_worker.validate() - + # Check before the first await: a bridge worker can only be validated once if self._started: raise RuntimeError("Already started") self._started = True + # Eagerly validate which will do a namespace check in Core. + try: + await self._bridge_worker.validate() + except BaseException: + # Nothing was started, so there is nothing to shut down. Mark + # shutdown complete or shutdown() and async with would wait forever. + self._shutdown_complete_event.set() + raise + # Create a task that raises when a shutdown is requested async def raise_on_shutdown(): try: @@ -793,6 +907,8 @@ async def raise_on_shutdown(): self._activity_worker.notify_shutdown() if self._workflow_worker: self._workflow_worker.notify_shutdown() + if self._nexus_worker: + self._nexus_worker.notify_shutdown() # Wait for all tasks to complete (i.e. for poller loops to stop) await asyncio.wait(tasks.values()) @@ -860,12 +976,14 @@ async def run(): await self.run() except BaseException as err: self._async_context_run_exception = err - self._async_context_inner_task.cancel() # type: ignore[union-attr] + # After __aexit__ starts, a cancel would stop the caller's code after the block. + if not self._async_context_exiting: + self._async_context_inner_task.cancel() # type: ignore[union-attr] self._async_context_run_task = asyncio.create_task(run()) return self - async def __aexit__(self, exc_type: type[BaseException] | None, *args) -> None: + async def __aexit__(self, exc_type: type[BaseException] | None, *args: Any) -> None: """Same as :py:meth:`shutdown` for use by ``async with``. Note, this will raise the worker fatal error if one occurred and the @@ -875,8 +993,21 @@ async def __aexit__(self, exc_type: type[BaseException] | None, *args) -> None: if not self._async_context_run_task: raise RuntimeError("Never started") await self.shutdown() - # Cancel our run task - self._async_context_run_task.cancel() + # Plugins can run cleanup code after shutdown. Wait for that code instead of cancelling it. + self._async_context_exiting = True + run_task = self._async_context_run_task + # A plugin's `configure_worker` may drop this key, so default here. + timeout = self._config.get("plugin_shutdown_timeout", timedelta(seconds=60)) + try: + # wait() doesn't raise for the task's own outcome, only when this call is cancelled. + await asyncio.wait( + [run_task], timeout=timeout.total_seconds() if timeout else None + ) + except asyncio.CancelledError: + run_task.cancel() + raise + if not run_task.done(): + run_task.cancel() # Only re-raise our exception if present and exc_type is cancel if exc_type is asyncio.CancelledError and self._async_context_run_exception: raise self._async_context_run_exception @@ -914,7 +1045,9 @@ class WorkerConfig(TypedDict, total=False): default_heartbeat_throttle_interval: timedelta max_activities_per_second: float | None max_task_queue_activities_per_second: float | None + max_eager_activity_reservations_per_workflow_task: int graceful_shutdown_timeout: timedelta + plugin_shutdown_timeout: timedelta | None workflow_failure_exception_types: Sequence[type[BaseException]] shared_state_manager: SharedStateManager | None debug_mode: bool @@ -923,9 +1056,18 @@ class WorkerConfig(TypedDict, total=False): use_worker_versioning: bool disable_safe_workflow_eviction: bool deployment_config: WorkerDeploymentConfig | None - workflow_task_poller_behavior: PollerBehavior - activity_task_poller_behavior: PollerBehavior - nexus_task_poller_behavior: PollerBehavior + patch_activation_callback: Callable[[PatchActivationInput], bool] | None + workflow_task_poller_behavior: PollerBehavior | None + activity_task_poller_behavior: PollerBehavior | None + nexus_task_poller_behavior: PollerBehavior | None + disable_payload_error_limit: bool + max_workflow_task_external_storage_concurrency: int + + +def _poller_behavior_to_bridge( + behavior: PollerBehavior | None, +) -> temporalio.bridge.worker.PollerBehavior | None: + return None if behavior is None else behavior._to_bridge() def _warn_if_activity_executor_max_workers_is_inconsistent( @@ -964,10 +1106,7 @@ def _warn_if_nexus_task_executor_max_workers_is_inconsistent( @dataclass class WorkerDeploymentConfig: - """Options for configuring the Worker Versioning feature. - - WARNING: This is an experimental feature and may change in the future. - """ + """Options for configuring the Worker Versioning feature.""" version: WorkerDeploymentVersion use_worker_versioning: bool @@ -1077,7 +1216,7 @@ def _extract_bridge_client_for_worker( elif hasattr(client.service_client, "worker_service_client"): bridge_client = client.service_client.worker_service_client if not isinstance(bridge_client, temporalio.service._BridgeServiceClient): - raise TypeError( + raise TypeError( # type: ignore[reportUnreachable] "Client's worker_service_client cannot be used for a worker" ) else: diff --git a/temporalio/worker/_workflow.py b/temporalio/worker/_workflow.py index 09c429c30d..c82c900ec5 100644 --- a/temporalio/worker/_workflow.py +++ b/temporalio/worker/_workflow.py @@ -4,6 +4,7 @@ import asyncio import concurrent.futures +import dataclasses import logging import os import sys @@ -12,39 +13,41 @@ from dataclasses import dataclass from datetime import timezone from types import TracebackType -from typing import ( - Dict, - List, - Optional, - Set, - Type, -) -import temporalio.activity import temporalio.api.common.v1 -import temporalio.bridge._visitor -import temporalio.bridge.client +import temporalio.bridge.proto.common import temporalio.bridge.proto.workflow_activation import temporalio.bridge.proto.workflow_completion import temporalio.bridge.runtime import temporalio.bridge.worker -import temporalio.client import temporalio.common import temporalio.converter +import temporalio.converter._extstore +import temporalio.converter._serialization_context import temporalio.exceptions import temporalio.workflow +from temporalio.bridge.worker import PollShutdownError +from temporalio.converter import StorageDriverStoreContext, StorageDriverWorkflowInfo +from temporalio.worker.workflow_sandbox._runner import SandboxedWorkflowRunner from . import _command_aware_visitor +from ._debugger import ( + _install_workflow_breakpoint_hook, + _relax_sandbox_for_debugger, +) from ._interceptor import ( Interceptor, WorkflowInboundInterceptor, WorkflowInterceptorClassInput, ) from ._workflow_instance import ( + _DEFAULT_ENABLED_WORKFLOW_LOGIC_FLAGS, + PatchActivationInput, WorkflowInstance, WorkflowInstanceDetails, WorkflowRunner, _WorkflowExternFunctions, + _WorkflowLogicFlag, ) logger = logging.getLogger(__name__) @@ -53,7 +56,56 @@ LOG_PROTOS = False -class _WorkflowWorker: +# Value was chosen abitrarily as a small number that allows some concurrency and prevents +# large numbers of concurrent external storage operations causing resource contention. +# This default limit is per workflow task activation and does not limit the total number +# of concurrent external storage operations across all workflow task activations. +# Advise customers to adjust based on their workload needs and to report issues with the +# value if problems are encountered. This setting is experimental. +_DEFAULT_WORKFLOW_TASK_EXTERNAL_STORAGE_CONCURRENCY: int = 3 + + +def _set_external_storage_metrics( + target: temporalio.bridge.proto.common.ExternalStorageMetrics, + metrics: temporalio.converter._extstore.StorageOperationMetrics, +) -> None: + """Populate a proto ``ExternalStorageMetrics`` from measured storage metrics.""" + target.payload_count = metrics.payload_count + target.total_size_bytes = metrics.total_size + target.total_duration.FromTimedelta(metrics.total_duration) + target.driver_names.extend(sorted(metrics.driver_names)) + + +def _take_nexus_previous_run_outcome( + init: temporalio.bridge.proto.workflow_activation.InitializeWorkflow, +) -> temporalio.bridge.proto.workflow_activation.InitializeWorkflow | None: + """Move a Nexus-started workflow's previous run outcome out of ``init``. + + A retried or cron run of a workflow started by a Nexus operation handler receives the previous + run's failure and result, which that run encoded with the Nexus context. The rest of ``init``, + such as the input and memo, keeps the workflow context. + """ + if not init.HasField("propagated_nexus_serialization_context") or not ( + init.HasField("continued_failure") or init.HasField("last_completion_result") + ): + return None + outcome = temporalio.bridge.proto.workflow_activation.InitializeWorkflow() + if init.HasField("continued_failure"): + outcome.continued_failure.CopyFrom(init.continued_failure) + init.ClearField("continued_failure") + if init.HasField("last_completion_result"): + outcome.last_completion_result.CopyFrom(init.last_completion_result) + init.ClearField("last_completion_result") + return outcome + + +async def _wait_until_done(future: asyncio.Future, timeout: float | None) -> bool: + """Wait for completion without cancelling the future or retrieving its result.""" + done, _ = await asyncio.wait((future,), timeout=timeout) + return bool(done) + + +class _WorkflowWorker: # type:ignore[reportUnusedClass] def __init__( self, *, @@ -68,23 +120,32 @@ def __init__( data_converter: temporalio.converter.DataConverter, interceptors: Sequence[Interceptor], workflow_failure_exception_types: Sequence[type[BaseException]], + patch_activation_callback: Callable[[PatchActivationInput], bool] | None, debug_mode: bool, disable_eager_activity_execution: bool, metric_meter: temporalio.common.MetricMeter, - on_eviction_hook: None - | ( - Callable[ - [str, temporalio.bridge.proto.workflow_activation.RemoveFromCache], None - ] - ), + on_eviction_hook: Callable[ + [str, temporalio.bridge.proto.workflow_activation.RemoveFromCache], None + ] + | None, disable_safe_eviction: bool, should_enforce_versioning_behavior: bool, assert_local_activity_valid: Callable[[str], None], encode_headers: bool, + max_workflow_task_external_storage_concurrency: int, + default_workflow_logic_flags: frozenset[_WorkflowLogicFlag] | None = None, ) -> None: + # Debug mode is enabled if specified or if the TEMPORAL_DEBUG env var is truthy + debug_mode = debug_mode or bool(os.environ.get("TEMPORAL_DEBUG")) + self._bridge_worker = bridge_worker self._namespace = namespace self._task_queue = task_queue + self._default_workflow_logic_flags = set( + _DEFAULT_ENABLED_WORKFLOW_LOGIC_FLAGS + if default_workflow_logic_flags is None + else default_workflow_logic_flags + ) self._workflow_task_executor = ( workflow_task_executor or concurrent.futures.ThreadPoolExecutor( @@ -93,7 +154,26 @@ def __init__( ) ) self._workflow_task_executor_user_provided = workflow_task_executor is not None + + # If debug mode is enabled, ensure that the debugpy (https://github.com/microsoft/debugpy) + # import is added as a passthrough + if debug_mode and isinstance(workflow_runner, SandboxedWorkflowRunner): + workflow_runner = dataclasses.replace( + workflow_runner, + restrictions=workflow_runner.restrictions.with_passthrough_modules( + "_pydevd_bundle" + ), + ) + + # In debug mode, also lift the sandbox restriction on breakpoint() + # and install the workflow-aware breakpoint hook so pdb works in + # workflow code. Outside of debug mode neither happens. + self._debug_mode = debug_mode + if self._debug_mode: + workflow_runner = _relax_sandbox_for_debugger(workflow_runner) + _install_workflow_breakpoint_hook() self._workflow_runner = workflow_runner + self._unsandboxed_workflow_runner = unsandboxed_workflow_runner self._data_converter = data_converter # Build the interceptor classes and collect extern functions @@ -114,18 +194,20 @@ def __init__( ) self._workflow_failure_exception_types = workflow_failure_exception_types + self._patch_activation_callback = patch_activation_callback self._running_workflows: dict[str, _RunningWorkflow] = {} self._disable_eager_activity_execution = disable_eager_activity_execution self._on_eviction_hook = on_eviction_hook self._disable_safe_eviction = disable_safe_eviction self._encode_headers = encode_headers + self._max_workflow_task_external_storage_concurrency = ( + max_workflow_task_external_storage_concurrency + ) self._throw_after_activation: Exception | None = None - # If there's a debug mode or a truthy TEMPORAL_DEBUG env var, disable - # deadlock detection, otherwise set to 2 seconds - self._deadlock_timeout_seconds = ( - None if debug_mode or os.environ.get("TEMPORAL_DEBUG") else 2 - ) + # If debug mode is enabled, disable deadlock detection + # otherwise set to 2 seconds + self._deadlock_timeout_seconds = None if self._debug_mode else 2 # Keep track of workflows that could not be evicted self._could_not_evict_count = 0 @@ -186,7 +268,7 @@ async def run(self) -> None: # when done. task = asyncio.create_task(self._handle_activation(act)) setattr(task, "__temporal_task_tag", task_tag) - except temporalio.bridge.worker.PollShutdownError: + except PollShutdownError: pass except Exception as err: raise RuntimeError("Workflow worker failed") from err @@ -224,9 +306,37 @@ async def drain_poll_queue(self) -> None: ) completion.failed.failure.message = "Worker shutting down" await self._bridge_worker().complete_workflow_activation(completion) - except temporalio.bridge.worker.PollShutdownError: + except PollShutdownError: return + async def _activate_inline_for_debug( + self, + loop: asyncio.AbstractEventLoop, + workflow: _RunningWorkflow, + act: temporalio.bridge.proto.workflow_activation.WorkflowActivation, + ) -> temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion: + # Indirect through call_soon + a future so the activation runs outside + # the dispatch task's __step() context. Python 3.14 refuses to enter a + # task while another on the same thread is mid-step; suspending at the + # await below clears that state so workflow.activate can step its own + # task without collision. + future: asyncio.Future = loop.create_future() + + def run_inline() -> None: + # _run_once clears the running-loop registration on exit; restore + # the main loop so later code sees the right one. + main_loop = asyncio._get_running_loop() + try: + completion = workflow.activate(act) + future.set_result(completion) + except BaseException as e: + future.set_exception(e) + finally: + asyncio._set_running_loop(main_loop) + + loop.call_soon(run_inline) + return await future + async def _handle_activation( self, act: temporalio.bridge.proto.workflow_activation.WorkflowActivation ) -> None: @@ -256,6 +366,7 @@ async def _handle_activation( completion.successful.SetInParent() workflow = None data_converter = self._data_converter + download_metrics = temporalio.converter._extstore.StorageOperationMetrics() try: if LOG_PROTOS: logger.debug("Received workflow activation:\n%s", act) @@ -279,60 +390,102 @@ async def _handle_activation( namespace=self._namespace, workflow_id=workflow_id, ) - data_converter = self._data_converter.with_context(workflow_context) - if self._data_converter.payload_codec: - assert data_converter.payload_codec - if not workflow: - payload_codec = data_converter.payload_codec - else: - payload_codec = _CommandAwarePayloadCodec( - workflow.instance, - context_free_payload_codec=self._data_converter.payload_codec, - workflow_context_payload_codec=data_converter.payload_codec, + data_converter = self._data_converter._with_contexts( + workflow_context, + StorageDriverStoreContext( + namespace=self._namespace, + target=StorageDriverWorkflowInfo( + id=workflow_id, + run_id=act.run_id, + type=( + workflow.get_info().workflow_type + if workflow + else (init_job.workflow_type if init_job else None) + ), + namespace=self._namespace, + ), + ), + ) + if workflow: + # Resolving a command's context calls into the workflow instance + # (the sandbox, when sandboxed) for every payload sequence, and only + # a codec or external storage can use it. + if data_converter._has_codec_or_external_storage: + data_converter = _CommandAwareDataConverter.create( + instance=workflow.instance, + context_free_dc=self._data_converter, + workflow_context_dc=data_converter, workflow_context=workflow_context, ) - await temporalio.bridge.worker.decode_activation( - act, - payload_codec, - decode_headers=self._encode_headers, + else: + # Activation failures are converted with this converter, and + # the command-aware one has no context there. + data_converter = self._data_converter + previous_run_outcome = ( + _take_nexus_previous_run_outcome(init_job) + if not workflow and init_job + else None + ) + download_metrics = await temporalio.bridge.worker.decode_activation( + act, + data_converter, + decode_headers=self._encode_headers, + storage_concurrency_limit=self._max_workflow_task_external_storage_concurrency, + ) + if init_job and previous_run_outcome: + await self._decode_nexus_previous_run_outcome( + act.run_id, init_job, previous_run_outcome, download_metrics ) if not workflow: assert init_job workflow = _RunningWorkflow( - self._create_workflow_instance(act, init_job), - workflow_id, + self._create_workflow_instance(act, init_job), workflow_id ) self._running_workflows[act.run_id] = workflow - # Run activation in separate thread so we can check if it's - # deadlocked - activate_task = asyncio.get_running_loop().run_in_executor( - self._workflow_task_executor, - workflow.activate, - act, - ) - - # Run activation task with deadlock timeout - try: - completion = await asyncio.wait_for( - activate_task, self._deadlock_timeout_seconds + if self._debug_mode: + # Inline on the main thread so pdb / breakpoint() can read + # stdin. The loop blocks during the activation — that's the + # intended single-stepping semantic. + completion = await self._activate_inline_for_debug( + asyncio.get_running_loop(), workflow, act ) - except asyncio.TimeoutError: - # Need to create the deadlock exception up here so it - # captures the trace now instead of later after we may have - # interrupted it - deadlock_exc = _DeadlockError.from_deadlocked_workflow( - workflow.instance, self._deadlock_timeout_seconds + else: + # Submit the activation job to the executor to create a future. + activation_job = self._workflow_task_executor.submit( + workflow.activate, act ) - # When we deadlock, we will raise an exception to fail - # the task. But before we do that, we want to try to - # interrupt the thread and put this activation task on - # the workflow so that the successive eviction can wait - # on it before trying to evict. - workflow.attempt_deadlock_interruption() - # Set the task and raise - workflow.deadlocked_activation_task = activate_task - raise deadlock_exc from None + + # Wrap the future in a asyncio.Future so the current loop can await it + activation_future = asyncio.wrap_future(activation_job) + try: + completed = await _wait_until_done( + activation_future, self._deadlock_timeout_seconds + ) + except asyncio.CancelledError: + # If wait is cancelled, manually forward to future + activation_future.cancel() + raise + + if not completed: + # Cancel only work the executor hasn't started. If it has + # started, keep its wrapper awaitable for safe eviction. + + # Cancel the activation job future, False indicates it cannot be canceled + cancelled_before_start = activation_job.cancel() + deadlock_exc = _DeadlockError.from_deadlocked_workflow( + None if cancelled_before_start else workflow.instance, + self._deadlock_timeout_seconds, + ) + # if we weren't able to cancel the activation job, it is either running + # or finished. attempt_deadlock_interruption accounts for both scenarios + if not cancelled_before_start: + workflow.deadlocked_activation_task = activation_future + workflow.attempt_deadlock_interruption() + raise deadlock_exc + + # If all went well the activation job's result is threaded to the task's result + completion = activation_future.result() except Exception as err: if isinstance(err, _DeadlockError): @@ -342,48 +495,85 @@ async def _handle_activation( "Failed handling activation on workflow with run ID %s", act.run_id ) - completion.failed.failure.SetInParent() - try: - data_converter.failure_converter.to_failure( - err, - data_converter.payload_converter, - completion.failed.failure, - ) - except Exception as inner_err: - logger.exception( - "Failed converting activation exception on workflow with run ID %s", - act.run_id, - ) - completion.failed.failure.message = ( - f"Failed converting activation exception: {inner_err}" - ) + if ( + isinstance(err, temporalio.exceptions.ApplicationError) + and err.non_retryable + ): + # Fail the workflow execution terminally rather than failing the task + command = completion.successful.commands.add() + failure = command.fail_workflow_execution.failure + failure.SetInParent() + try: + data_converter.failure_converter.to_failure( + err, + data_converter.payload_converter, + failure, + ) + except Exception as inner_err: + logger.exception( + "Failed converting activation exception on workflow with run ID %s", + act.run_id, + ) + failure.message = ( + f"Failed converting activation exception: {inner_err}" + ) + else: + completion.failed.failure.SetInParent() + try: + data_converter.failure_converter.to_failure( + err, + data_converter.payload_converter, + completion.failed.failure, + ) + except Exception as inner_err: + logger.exception( + "Failed converting activation exception on workflow with run ID %s", + act.run_id, + ) + completion.failed.failure.message = ( + f"Failed converting activation exception: {inner_err}" + ) completion.run_id = act.run_id # Encode completion - if self._data_converter.payload_codec and workflow: - assert data_converter.payload_codec - payload_codec = _CommandAwarePayloadCodec( - workflow.instance, - context_free_payload_codec=self._data_converter.payload_codec, - workflow_context_payload_codec=data_converter.payload_codec, - workflow_context=temporalio.converter.WorkflowSerializationContext( - namespace=self._namespace, - workflow_id=workflow.workflow_id, - ), + if workflow and self._data_converter._has_codec_or_external_storage: + workflow_context = temporalio.converter.WorkflowSerializationContext( + namespace=self._namespace, + workflow_id=workflow.workflow_id, + ) + data_converter = _CommandAwareDataConverter.create( + instance=workflow.instance, + context_free_dc=self._data_converter, + workflow_context_dc=self._data_converter.with_context(workflow_context), + workflow_context=workflow_context, + ) + + upload_metrics = temporalio.converter._extstore.StorageOperationMetrics() + try: + upload_metrics = await temporalio.bridge.worker.encode_completion( + completion, + data_converter, + encode_headers=self._encode_headers, + storage_concurrency_limit=self._max_workflow_task_external_storage_concurrency, + ) + except Exception as err: + logger.exception( + "Failed encoding completion on workflow with run ID %s", act.run_id + ) + completion.failed.Clear() + completion.failed.failure.message = f"Failed encoding completion: {err}" + + # Reported on the completion so core can include them in its workflow-task duration + # log; core measures the duration itself. + if download_metrics.payload_count > 0: + _set_external_storage_metrics( + completion.payload_download_metrics, download_metrics + ) + if upload_metrics.payload_count > 0: + _set_external_storage_metrics( + completion.payload_upload_metrics, upload_metrics ) - try: - await temporalio.bridge.worker.encode_completion( - completion, - payload_codec, - encode_headers=self._encode_headers, - ) - except Exception as err: - logger.exception( - "Failed encoding completion on workflow with run ID %s", act.run_id - ) - completion.failed.Clear() - completion.failed.failure.message = f"Failed encoding completion: {err}" # Send off completion if LOG_PROTOS: @@ -432,30 +622,35 @@ async def _handle_cache_eviction( # eviction complete successfully because this is the only way we can # confirm the event loop was torn down gracefully and therefore no # GC'ing of the tasks occurs (which can cause them to wake up in - # different threads). We will wait deadlock timeout amount (2s if - # enabled) before making it clear to users that eviction is being - # swallowed. Any error or timeout of eviction causes us to retry - # forever because something in users code is preventing eviction. + # different threads). Log if teardown times out, but keep waiting + # for the same call. Retry only if the call fails. seen_fail = False - handle_eviction_task: asyncio.Future | None = None + eviction_future: asyncio.Future | None = None while True: try: - # We only create the eviction task if we haven't already or - # it is done. This is because if it already is running and - # timed out, it's still running (and holding on to a - # thread). But if did complete running but failed with - # another error, we want to re-create the task. - if not handle_eviction_task or handle_eviction_task.done(): - handle_eviction_task = ( - asyncio.get_running_loop().run_in_executor( - self._workflow_task_executor, - workflow.activate, - act, - ) + if self._debug_mode: + await self._activate_inline_for_debug( + asyncio.get_running_loop(), workflow, act ) - await asyncio.wait_for( - handle_eviction_task, self._deadlock_timeout_seconds - ) + else: + if eviction_future is None: + eviction_future = ( + asyncio.get_running_loop().run_in_executor( + self._workflow_task_executor, + workflow.activate, + act, + ) + ) + # Keep the call on timeout: it may still be running, or + # it may finish while we sleep before checking again. + if not await _wait_until_done( + eviction_future, self._deadlock_timeout_seconds + ): + raise asyncio.TimeoutError + try: + eviction_future.result() + finally: + eviction_future = None # Break if it succeeds break except BaseException as err: @@ -467,8 +662,9 @@ async def _handle_cache_eviction( # exception if isinstance(err, asyncio.TimeoutError): logger.error( - "Timed out running eviction job for run ID %s, continually " - + "retrying eviction. This is usually caused by inadvertently " + "Timed out running eviction job for run ID %s. " + + "Waiting for the eviction call to finish before retrying. " + + "This is usually caused by inadvertently " + "catching 'BaseException's like asyncio.CancelledError or " + "_WorkflowBeingEvictedError and still continuing work. " + "Since eviction could not be processed, this worker " @@ -515,6 +711,40 @@ async def _handle_cache_eviction( logger.debug("Shutting down worker on eviction hook exception") self._bridge_worker().initiate_shutdown() + async def _decode_nexus_previous_run_outcome( + self, + run_id: str, + init: temporalio.bridge.proto.workflow_activation.InitializeWorkflow, + outcome: temporalio.bridge.proto.workflow_activation.InitializeWorkflow, + download_metrics: temporalio.converter._extstore.StorageOperationMetrics, + ) -> None: + """Decode an outcome from :py:func:`_take_nexus_previous_run_outcome` and restore it.""" + nexus_context = temporalio.converter._serialization_context._propagated_nexus_serialization_context( + init + ) + assert nexus_context + act = temporalio.bridge.proto.workflow_activation.WorkflowActivation( + run_id=run_id, + jobs=[ + temporalio.bridge.proto.workflow_activation.WorkflowActivationJob( + initialize_workflow=outcome + ) + ], + ) + metrics = await temporalio.bridge.worker.decode_activation( + act, + self._data_converter.with_context(nexus_context), + decode_headers=self._encode_headers, + storage_concurrency_limit=self._max_workflow_task_external_storage_concurrency, + ) + download_metrics.merge(metrics) + # Constructing the activation copied the outcome, so read the decoded fields from it + decoded = act.jobs[0].initialize_workflow + if decoded.HasField("continued_failure"): + init.continued_failure.CopyFrom(decoded.continued_failure) + if decoded.HasField("last_completion_result"): + init.last_completion_result.CopyFrom(decoded.last_completion_result) + def _create_workflow_instance( self, act: temporalio.bridge.proto.workflow_activation.WorkflowActivation, @@ -553,6 +783,7 @@ def _create_workflow_instance( first_execution_run_id=init.first_execution_run_id, headers=dict(init.headers), namespace=self._namespace, + original_execution_run_id=init.original_execution_run_id or act.run_id, parent=parent, root=root, raw_memo=dict(init.memo.fields), @@ -586,7 +817,7 @@ def _create_workflow_instance( # Create instance from details det = WorkflowInstanceDetails( - payload_converter_class=self._data_converter.payload_converter_class, + payload_converter_factory=self._data_converter._new_payload_converter, failure_converter_class=self._data_converter.failure_converter_class, interceptor_classes=self._interceptor_classes, defn=defn, @@ -595,8 +826,13 @@ def _create_workflow_instance( extern_functions=self._extern_functions, disable_eager_activity_execution=self._disable_eager_activity_execution, worker_level_failure_exception_types=self._workflow_failure_exception_types, + patch_activation_callback=self._patch_activation_callback, last_completion_result=init.last_completion_result, last_failure=last_failure, + default_workflow_logic_flags=frozenset(self._default_workflow_logic_flags), + nexus_serialization_context=temporalio.converter._serialization_context._propagated_nexus_serialization_context( + init + ), ) if defn.sandboxed: return self._workflow_runner.create_instance(det) @@ -609,6 +845,14 @@ def nondeterminism_as_workflow_fail(self) -> bool: for typ in self._workflow_failure_exception_types ) + def _set_default_workflow_logic_flag( + self, flag: _WorkflowLogicFlag, *, enabled: bool + ) -> None: + if enabled: + self._default_workflow_logic_flags.add(flag) + else: + self._default_workflow_logic_flags.discard(flag) + def nondeterminism_as_workflow_fail_for_types(self) -> set[str]: return { k @@ -644,9 +888,11 @@ def swap_traceback(self) -> None: self._new_tb = None @classmethod - def from_deadlocked_workflow(cls, workflow: WorkflowInstance, timeout: int | None): + def from_deadlocked_workflow( + cls, workflow: WorkflowInstance | None, timeout: int | None + ): msg = f"[TMPRL1101] Potential deadlock detected: workflow didn't yield within {timeout} second(s)." - tid = workflow.get_thread_id() + tid = workflow.get_thread_id() if workflow is not None else None if not tid: return cls(msg) @@ -693,13 +939,20 @@ def _gen_tb_helper( class _RunningWorkflow: - def __init__(self, instance: WorkflowInstance, workflow_id: str): + def __init__( + self, + instance: WorkflowInstance, + workflow_id: str, + ): self.instance = instance self.workflow_id = workflow_id self.deadlocked_activation_task: Awaitable | None = None self._deadlock_can_be_interrupted_lock = threading.Lock() self._deadlock_can_be_interrupted = False + def get_info(self) -> temporalio.workflow.Info: + return self.instance.get_info() + def activate( self, act: temporalio.bridge.proto.workflow_activation.WorkflowActivation ) -> temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion: @@ -726,45 +979,98 @@ def attempt_deadlock_interruption(self) -> None: @dataclass(frozen=True) -class _CommandAwarePayloadCodec(temporalio.converter.PayloadCodec): - """A payload codec that sets serialization context for the command associated with each payload. +class _CommandAwareDataConverter(temporalio.converter.DataConverter): + """Data converter that resolves serialization context per-command. - This codec responds to the context variable set by + Responds to the context variable set by :py:class:`_command_aware_visitor.CommandAwarePayloadVisitor`. """ - instance: WorkflowInstance - context_free_payload_codec: temporalio.converter.PayloadCodec - workflow_context_payload_codec: temporalio.converter.PayloadCodec - workflow_context: temporalio.converter.WorkflowSerializationContext + _ca_instance: WorkflowInstance = dataclasses.field( + default=None, + repr=False, + compare=False, # type: ignore[assignment] + ) + _ca_context_free_dc: temporalio.converter.DataConverter = dataclasses.field( + default=None, + repr=False, + compare=False, # type: ignore[assignment] + ) + _ca_workflow_context_dc: temporalio.converter.DataConverter = dataclasses.field( + default=None, + repr=False, + compare=False, # type: ignore[assignment] + ) + _ca_workflow_context: temporalio.converter.WorkflowSerializationContext = ( + dataclasses.field( + default=None, + repr=False, + compare=False, # type: ignore[assignment] + ) + ) - async def encode( - self, - payloads: Sequence[temporalio.api.common.v1.Payload], + @staticmethod + def create( + instance: WorkflowInstance, + context_free_dc: temporalio.converter.DataConverter, + workflow_context_dc: temporalio.converter.DataConverter, + workflow_context: temporalio.converter.WorkflowSerializationContext, + ) -> _CommandAwareDataConverter: + return _CommandAwareDataConverter( + payload_converter_class=workflow_context_dc.payload_converter_class, + payload_codec=workflow_context_dc.payload_codec, + failure_converter_class=workflow_context_dc.failure_converter_class, + external_storage=workflow_context_dc.external_storage, + _ca_instance=instance, + _ca_context_free_dc=context_free_dc, + _ca_workflow_context_dc=workflow_context_dc, + _ca_workflow_context=workflow_context, + ) + + def _get_current_dc(self) -> temporalio.converter.DataConverter: + context = self._ca_instance.get_serialization_context( + _command_aware_visitor.current_command_info.get(), + ) + if context is None: + return self._ca_context_free_dc + if context == self._ca_workflow_context: + return self._ca_workflow_context_dc + return self._ca_context_free_dc.with_context(context) + + async def _encode_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] ) -> list[temporalio.api.common.v1.Payload]: - return await self._get_current_command_codec().encode(payloads) + return await self._get_current_dc()._encode_payload_sequence(payloads) - async def decode( - self, - payloads: Sequence[temporalio.api.common.v1.Payload], + async def _external_store_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] ) -> list[temporalio.api.common.v1.Payload]: - return await self._get_current_command_codec().decode(payloads) + command_info = _command_aware_visitor.current_command_info.get() + store_ctx = self._ca_instance.get_external_store_context(command_info) + dc = self._get_current_dc()._with_store_context(store_ctx) + return await dc._external_store_payload_sequence(payloads) - def _get_current_command_codec(self) -> temporalio.converter.PayloadCodec: - if not isinstance( - self.context_free_payload_codec, - temporalio.converter.WithSerializationContext, - ): - return self.context_free_payload_codec + async def _encode_reference_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return await self._get_current_dc()._encode_reference_payload_sequence(payloads) - if context := self.instance.get_serialization_context( - _command_aware_visitor.current_command_info.get(), - ): - if context == self.workflow_context: - return self.workflow_context_payload_codec - return self.context_free_payload_codec.with_context(context) + async def _decode_reference_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return await self._get_current_dc()._decode_reference_payload_sequence(payloads) + + async def _external_retrieve_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return await self._get_current_dc()._external_retrieve_payload_sequence( + payloads + ) - return self.context_free_payload_codec + async def _decode_payload_sequence( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return await self._get_current_dc()._decode_payload_sequence(payloads) class _InterruptDeadlockError(BaseException): diff --git a/temporalio/worker/_workflow_instance.py b/temporalio/worker/_workflow_instance.py index 1139be0420..bf7c6a4273 100644 --- a/temporalio/worker/_workflow_instance.py +++ b/temporalio/worker/_workflow_instance.py @@ -9,11 +9,11 @@ import json import logging import random -import sys import threading import traceback import warnings from abc import ABC, abstractmethod +from collections import deque from collections.abc import ( Awaitable, Callable, @@ -26,27 +26,19 @@ Sequence, ) from contextlib import contextmanager -from dataclasses import dataclass +from dataclasses import dataclass, field from datetime import timedelta from enum import IntEnum from typing import ( Any, - Deque, - Dict, Generic, - List, NoReturn, - Optional, - Set, - Tuple, - Type, TypeAlias, TypeVar, - Union, cast, ) -import nexusrpc.handler +import nexusrpc from nexusrpc import InputT, OutputT from typing_extensions import Self, TypedDict, TypeVarTuple, Unpack @@ -63,11 +55,23 @@ import temporalio.bridge.proto.workflow_completion import temporalio.common import temporalio.converter +import temporalio.converter._serialization_context import temporalio.exceptions +import temporalio.nexus.system import temporalio.workflow +from temporalio.converter import StorageDriverStoreContext, StorageDriverWorkflowInfo +from temporalio.nexus.system.workflow_service._system_nexus_interceptor import ( + _start_system_nexus_operation, + _SystemNexusWorkflowOutboundInterceptorTerminal, +) from temporalio.service import __version__ from ..api.failure.v1.message_pb2 import Failure +from ..workflow._event_groups import ( + _capture_event_group_markers, + _inbound_event_group, + _inbound_update_event_group, +) from . import _command_aware_visitor from ._interceptor import ( ContinueAsNewInput, @@ -91,6 +95,17 @@ LOG_IGNORE_DURING_DELETE = False +async def _shield_await(fut: asyncio.Future[Any]) -> Any: + """Await a future without cancelling it if the awaiting task is cancelled. + + This behaves like ``asyncio.shield(fut)`` but avoids the spurious + "exception in shielded future" error log on Python 3.11+ when the + awaiting task is cancelled and the future eventually fails. + """ + await asyncio.wait([fut]) + return fut.result() + + class WorkflowRunner(ABC): """Abstract runner for workflows that creates workflow instances to run. @@ -124,7 +139,8 @@ def create_instance(self, det: WorkflowInstanceDetails) -> WorkflowInstance: raise NotImplementedError def set_worker_level_failure_exception_types( - self, types: Sequence[type[BaseException]] + self, + types: Sequence[type[BaseException]], # type:ignore[reportUnusedParameter] ) -> None: """Set worker-level failure exception types that will be used to validate in the sandbox when calling ``prepare_workflow``. @@ -135,11 +151,22 @@ def set_worker_level_failure_exception_types( pass +@dataclass(frozen=True) +class PatchActivationInput: + """Input for the worker patch activation callback.""" + + workflow_info: temporalio.workflow.Info + """Information about the workflow execution calling ``patched``.""" + + patch_id: str + """Patch ID passed to ``patched``.""" + + @dataclass(frozen=True) class WorkflowInstanceDetails: """Immutable details for creating a workflow instance.""" - payload_converter_class: type[temporalio.converter.PayloadConverter] + payload_converter_factory: Callable[[], temporalio.converter.PayloadConverter] failure_converter_class: type[temporalio.converter.FailureConverter] interceptor_classes: Sequence[type[WorkflowInboundInterceptor]] defn: temporalio.workflow._Definition @@ -148,8 +175,16 @@ class WorkflowInstanceDetails: extern_functions: Mapping[str, Callable] disable_eager_activity_execution: bool worker_level_failure_exception_types: Sequence[type[BaseException]] + patch_activation_callback: Callable[[PatchActivationInput], bool] | None last_completion_result: temporalio.api.common.v1.Payloads last_failure: Failure | None + default_workflow_logic_flags: frozenset[_WorkflowLogicFlag] = field( + default_factory=lambda: _DEFAULT_ENABLED_WORKFLOW_LOGIC_FLAGS + ) + nexus_serialization_context: ( + temporalio.converter.NexusSerializationContext | None + ) = None + """Serialization context of the Nexus operation handler that started the workflow, if any.""" class WorkflowInstance(ABC): @@ -188,6 +223,26 @@ def get_serialization_context( """ raise NotImplementedError + @abstractmethod + def get_external_store_context( + self, + command_info: _command_aware_visitor.CommandInfo | None, + ) -> StorageDriverStoreContext: + """Return appropriate store context for external storage operations. + + Args: + command_info: Optional information identifying the associated command. + + Returns: + The store context associated with the command. + """ + raise NotImplementedError + + @abstractmethod + def get_info(self) -> temporalio.workflow.Info: + """Return the workflow info for this instance.""" + raise NotImplementedError + def get_thread_id(self) -> int | None: """Return the thread identifier that this workflow is running on. @@ -230,7 +285,7 @@ def __init__(self, det: WorkflowInstanceDetails) -> None: self._defn = det.defn self._workflow_input: ExecuteWorkflowInput | None = None self._info = det.info - self._context_free_payload_converter = det.payload_converter_class() + self._context_free_payload_converter = det.payload_converter_factory() self._context_free_failure_converter = det.failure_converter_class() workflow_context = temporalio.converter.WorkflowSerializationContext( namespace=det.info.namespace, @@ -242,25 +297,49 @@ def __init__(self, det: WorkflowInstanceDetails) -> None: self._workflow_context_failure_converter = self._failure_converter_with_context( workflow_context ) + # A workflow started by a Nexus operation handler returns its result and closing failure to + # the Nexus caller, which decodes them with the handler's Nexus context. A retried or cron run + # reads the previous run's result and failure with the same context. + self._nexus_serialization_context = det.nexus_serialization_context + if self._nexus_serialization_context: + self._result_payload_converter = self._payload_converter_with_context( + self._nexus_serialization_context + ) + self._result_failure_converter = self._failure_converter_with_context( + self._nexus_serialization_context + ) + else: + self._result_payload_converter = self._workflow_context_payload_converter + self._result_failure_converter = self._workflow_context_failure_converter + # Keyed by update protocol instance ID. Kept until the activation that finished the update + # has been encoded, so the codec can encode its response with the same context. + self._nexus_update_contexts: dict[ + str, temporalio.converter.NexusSerializationContext + ] = {} + self._finished_nexus_update_ids: list[str] = [] self._extern_functions = det.extern_functions self._disable_eager_activity_execution = det.disable_eager_activity_execution self._worker_level_failure_exception_types = ( det.worker_level_failure_exception_types ) + self._patch_activation_callback = det.patch_activation_callback + self._default_workflow_logic_flags = det.default_workflow_logic_flags self._primary_task: asyncio.Task[None] | None = None + self._cancel_primary_task_pending = False self._time_ns = 0 - self._cancel_requested = False + self._cancel_reason: str | None = None self._deployment_version_for_current_task: None | ( temporalio.bridge.proto.common.WorkerDeploymentVersion ) = None self._current_history_length = 0 self._current_history_size = 0 self._continue_as_new_suggested = False + self._target_worker_deployment_version_changed = False # Lazily loaded self._untyped_converted_memo: MutableMapping[str, Any] | None = None # Handles which are ready to run on the next event loop iteration - self._ready: Deque[asyncio.Handle] = collections.deque() + self._ready: deque[asyncio.Handle] = collections.deque() self._conditions: list[tuple[Callable[[], bool], asyncio.Future]] = [] # Keyed by seq self._pending_timers: dict[int, _TimerHandle] = {} @@ -278,7 +357,10 @@ def __init__(self, det: WorkflowInstanceDetails) -> None: self._object: Any = None self._is_replaying: bool = False self._random = random.Random(det.randomness_seed) + self._current_seed = det.randomness_seed + self._seed_callbacks: list[Callable[[int], None]] = [] self._read_only = False + self._in_query_or_validator = False # Patches we have been notified of and memoized patch responses self._patches_notified: set[str] = set() @@ -400,6 +482,9 @@ def activate( temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion() ) self._current_completion.successful.SetInParent() + for protocol_instance_id in self._finished_nexus_update_ids: + self._nexus_update_contexts.pop(protocol_instance_id, None) + self._finished_nexus_update_ids.clear() self._current_activation_error: Exception | None = None self._deployment_version_for_current_task = ( @@ -408,10 +493,16 @@ def activate( self._current_history_length = act.history_length self._current_history_size = act.history_size_bytes self._continue_as_new_suggested = act.continue_as_new_suggested + self._target_worker_deployment_version_changed = ( + act.target_worker_deployment_version_changed + ) self._time_ns = act.timestamp.ToNanoseconds() self._is_replaying = act.is_replaying self._current_thread_id = threading.get_ident() self._current_internal_flags = act.available_internal_flags + self._single_batch_activation = self._workflow_logic_flag_enabled( + _WorkflowLogicFlag.PROCESS_WORKFLOW_ACTIVATION_JOBS_AS_SINGLE_BATCH + ) activation_err: Exception | None = None try: # Split into job sets with patches, then signals + updates, then @@ -432,21 +523,44 @@ def activate( else: job_sets[3].append(job) + # Core guarantees query-only activations. Fail the workflow task if violated. + assert not job_sets[3] or not any(job_sets[:3]), ( + "Query jobs must not share an activation with non-query jobs. " + "This is an SDK Core bug." + ) + if start_job: self._workflow_input = self._make_workflow_input(start_job) - # Apply every job set, running after each set - for index, job_set in enumerate(job_sets): - if not job_set: - continue - for job in job_set: - # Let errors bubble out of these to the caller to fail the task - self._apply(job) - - # Run one iteration of the loop. We do not allow conditions to - # be checked in patch jobs (first index) or query jobs (last - # index). - self._run_once(check_conditions=index == 1 or index == 2) + if self._single_batch_activation: + # Applying every job before giving workflow tasks a chance to + # run prevents their order in the activation from hiding state + # that arrived in the same workflow task. + for job_set in job_sets: + for job in job_set: + # Let errors bubble out of these to the caller to fail the task + self._apply(job) + if any(job_sets): + self._run_once( + check_conditions=bool(job_sets[1] or job_sets[2]), + jobs=act.jobs, + ) + else: + # Preserve the legacy scheduling order for histories which do + # not contain the single-batch workflow logic flag. + for index, job_set in enumerate(job_sets): + if not job_set: + continue + for job in job_set: + # Let errors bubble out of these to the caller to fail the task + self._apply(job) + + # Run one iteration of the loop. We do not allow conditions to + # be checked in patch jobs (first index) or query jobs (last + # index). + self._run_once( + check_conditions=index == 1 or index == 2, jobs=act.jobs + ) except Exception as err: # We want some errors during activation, like those that can happen # during payload conversion, to be able to fail the workflow not the @@ -473,6 +587,11 @@ def activate( self._versioning_behavior.value ) + if self._deleting: + # An interrupt while a finished task schedules its done callbacks + # can prevent its removal. It has no coroutine left to tear down. + self._tasks.difference_update([t for t in self._tasks if t.done()]) + # If we're deleting, there better be no more tasks. It is important for # the integrity of the system that we check this. If there are tasks # remaining, they and any associated coroutines will get garbage @@ -511,7 +630,9 @@ def activate( ) self._current_completion.failed.failure.application_failure_info.SetInParent() - def is_completion(command): + def is_completion( + command: temporalio.bridge.proto.workflow_commands.workflow_commands_pb2.WorkflowCommand, + ): return ( command.HasField("complete_workflow_execution") or command.HasField("continue_as_new_workflow_execution") @@ -573,13 +694,16 @@ def _apply( def _apply_cancel_workflow( self, job: temporalio.bridge.proto.workflow_activation.CancelWorkflow ) -> None: - self._cancel_requested = True - # TODO(cretz): Details or cancel message or whatever? + self._cancel_reason = job.reason if self._primary_task: # The primary task may not have started yet and we want to give the # workflow the ability to receive the cancellation, so we must defer # this cancellation to the next iteration of the event loop. self.call_soon(self._primary_task.cancel) + elif self._single_batch_activation: + # Initialization is the only job that creates the primary task, so + # retain a same-activation cancellation until that task exists. + self._cancel_primary_task_pending = True def _apply_do_update( self, job: temporalio.bridge.proto.workflow_activation.DoUpdate @@ -587,6 +711,24 @@ def _apply_do_update( # Run the validator & handler in a task. Everything, including looking up the update definition, needs to be # inside the task, since the update may not be defined until after we have started the workflow - for example # if an update is in the first WFT & is also registered dynamically at the top of workflow code. + # An update sent by a Nexus operation handler returns its result and failure to the Nexus + # caller, which decodes them with the handler's Nexus context. Its input keeps the workflow + # context. + nexus_context = temporalio.converter._serialization_context._propagated_nexus_serialization_context( + job + ) + if nexus_context: + self._nexus_update_contexts[job.protocol_instance_id] = nexus_context + result_payload_converter = self._payload_converter_with_context( + nexus_context + ) + result_failure_converter = self._failure_converter_with_context( + nexus_context + ) + else: + result_payload_converter = self._workflow_context_payload_converter + result_failure_converter = self._workflow_context_failure_converter + async def run_update() -> None: # Set the current update for the life of this task temporalio.workflow._set_current_update_info( @@ -622,7 +764,7 @@ async def run_update() -> None: ) if job.run_validator and defn.validator is not None: - with self._as_read_only(): + with self._as_read_only(in_query_or_validator=True): self._inbound.handle_update_validator(handler_input) # Re-process arguments to avoid any problems caused by user mutation of them during validation args = self._process_handler_args( @@ -640,10 +782,9 @@ async def run_update() -> None: command = None # type: ignore # Run the handler - success = await self._inbound.handle_update_handler(handler_input) - result_payloads = self._workflow_context_payload_converter.to_payloads( - [success] - ) + with _inbound_update_event_group(job.id).scope(): + success = await self._inbound.handle_update_handler(handler_input) + result_payloads = result_payload_converter.to_payloads([success]) if len(result_payloads) != 1: raise ValueError( f"Expected 1 result payload, got {len(result_payloads)}" @@ -675,14 +816,22 @@ async def run_update() -> None: job.protocol_instance_id ) command.update_response.rejected.SetInParent() - self._workflow_context_failure_converter.to_failure( + result_failure_converter.to_failure( err, - self._workflow_context_payload_converter, + result_payload_converter, command.update_response.rejected, ) else: self._current_activation_error = err return + except _ContinueAsNewError: + # Continue-as-new is only valid from the top-level workflow. + # From an update handler it must fail the workflow task + # instead of escaping this detached task. + self._current_activation_error = RuntimeError( + "Cannot continue as new from an update handler" + ) + return except BaseException: if self._deleting: if LOG_IGNORE_DURING_DELETE: @@ -693,6 +842,8 @@ async def run_update() -> None: raise finally: self._in_progress_updates.pop(job.id, None) + if nexus_context: + self._finished_nexus_update_ids.append(job.protocol_instance_id) self.create_task( run_update(), @@ -714,7 +865,7 @@ def _apply_query_workflow( # Wrap entire bunch of work in a task async def run_query() -> None: try: - with self._as_read_only(): + with self._as_read_only(in_query_or_validator=True): # Named query or dynamic defn = self._queries.get(job.query_type) or self._queries.get(None) if not defn: @@ -772,10 +923,9 @@ def _apply_notify_has_patch( self._patches_notified.add(job.patch_id) def _apply_remove_from_cache( - self, job: temporalio.bridge.proto.workflow_activation.RemoveFromCache + self, _job: temporalio.bridge.proto.workflow_activation.RemoveFromCache ) -> None: self._deleting = True - self._cancel_requested = True # We consider eviction to be under replay so that certain code like # logging that avoids replaying doesn't run during eviction either self._is_replaying = True @@ -794,6 +944,7 @@ def _apply_resolve_activity( workflow_id=self._info.workflow_id, workflow_type=self._info.workflow_type, activity_type=handle._input.activity, + activity_id=handle._input.activity_id, activity_task_queue=( handle._input.task_queue or self._info.task_queue if isinstance(handle._input, StartActivityInput) @@ -891,6 +1042,13 @@ def _apply_resolve_child_workflow_execution_start( job.failed.workflow_id, job.failed.workflow_type ) ) + elif ( + job.failed.cause + == temporalio.bridge.proto.child_workflow.StartChildWorkflowExecutionFailedCause.START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID_VERSIONING_OVERRIDE + ): + handle._resolve_failure( + temporalio.exceptions.InvalidVersioningOverrideError() + ) else: handle._resolve_failure( RuntimeError(f"Unknown child start fail cause: {job.failed.cause}") @@ -954,10 +1112,24 @@ def _apply_resolve_nexus_operation( # Handle the four oneof variants of NexusOperationResult result = job.result if result.HasField("completed"): + payload_converter = handle._payload_converter + if temporalio.nexus.system.is_system_endpoint(handle._input.endpoint): + serialization_context = ( + temporalio.nexus.system._get_serialization_context( + handle._input.service, + handle._input.operation_name, + handle._input.input, + ) + ) + if serialization_context is not None: + payload_converter = temporalio.nexus.system._get_payload_converter( + self._payload_converter_with_context(serialization_context), + self._failure_converter_with_context(serialization_context), + ) [output] = self._convert_payloads( [result.completed], [handle._input.output_type] if handle._input.output_type else None, - handle._payload_converter, + payload_converter, ) handle._resolve_success(output) elif result.HasField("failed"): @@ -991,6 +1163,10 @@ def _apply_resolve_request_cancel_external_workflow( f"Failed finding pending external cancel for sequence {job.seq}" ) fut, external_workflow_id = pending + # Cancelling the task that awaits the request also cancels this future, + # but the request was already sent and Core still resolves it + if fut.cancelled(): + return # We intentionally let this error if future is already done if job.HasField("failure"): workflow_context = temporalio.converter.WorkflowSerializationContext( @@ -1040,16 +1216,14 @@ def _apply_signal_workflow( self._process_signal_job(signal_defn, job) def _apply_initialize_workflow( - self, job: temporalio.bridge.proto.workflow_activation.InitializeWorkflow + self, _job: temporalio.bridge.proto.workflow_activation.InitializeWorkflow ) -> None: # Async call to run on the scheduler thread. This will be wrapped in # another function which applies exception handling. async def run_workflow(input: ExecuteWorkflowInput) -> None: try: result = await self._inbound.execute_workflow(input) - result_payloads = self._workflow_context_payload_converter.to_payloads( - [result] - ) + result_payloads = self._result_payload_converter.to_payloads([result]) if len(result_payloads) != 1: raise ValueError( f"Expected 1 result payload, got {len(result_payloads)}" @@ -1073,11 +1247,22 @@ async def run_workflow(input: ExecuteWorkflowInput) -> None: self._run_top_level_workflow_function(run_workflow(self._workflow_input)), name="run", ) + if self._cancel_primary_task_pending: + self._cancel_primary_task_pending = False + self.call_soon(self._primary_task.cancel) def _apply_update_random_seed( self, job: temporalio.bridge.proto.workflow_activation.UpdateRandomSeed ) -> None: self._random.seed(job.randomness_seed) + self._current_seed = job.randomness_seed + # Notify all registered callbacks + for callback in self._seed_callbacks: + try: + callback(job.randomness_seed) + except Exception: + # Ignore callback errors to avoid disrupting workflow execution + pass def _make_workflow_input( self, init_job: temporalio.bridge.proto.workflow_activation.InitializeWorkflow @@ -1116,6 +1301,7 @@ def workflow_continue_as_new( task_queue: str | None, run_timeout: timedelta | None, task_timeout: timedelta | None, + backoff_start_interval: timedelta | None, retry_policy: temporalio.common.RetryPolicy | None, memo: Mapping[str, Any] | None, search_attributes: None @@ -1123,6 +1309,9 @@ def workflow_continue_as_new( temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes ), versioning_intent: temporalio.workflow.VersioningIntent | None, + initial_versioning_behavior: temporalio.workflow.ContinueAsNewVersioningBehavior + | None, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, ) -> NoReturn: self._assert_not_read_only("continue as new") # Use definition if callable @@ -1135,7 +1324,7 @@ def workflow_continue_as_new( name = defn.name arg_types = defn.arg_types elif workflow is not None: - raise TypeError("Workflow must be None, a string, or callable") + raise TypeError("Workflow must be None, a string, or callable") # type:ignore[reportUnreachable] self._outbound.continue_as_new( ContinueAsNewInput( @@ -1144,16 +1333,20 @@ def workflow_continue_as_new( task_queue=task_queue, run_timeout=run_timeout, task_timeout=task_timeout, + backoff_start_interval=backoff_start_interval, retry_policy=retry_policy, memo=memo, search_attributes=search_attributes, headers={}, arg_types=arg_types, versioning_intent=versioning_intent, + initial_versioning_behavior=initial_versioning_behavior, + event_groups=event_groups, ) ) - # TODO(cretz): Why can't MyPy infer the above never returns? - raise RuntimeError("Unreachable") + + def workflow_cancellation_reason(self) -> str | None: + return self._cancel_reason def workflow_extern_functions(self) -> Mapping[str, Callable]: return self._extern_functions @@ -1173,6 +1366,9 @@ def workflow_get_current_deployment_version( deployment_name=self._deployment_version_for_current_task.deployment_name, ) + def get_info(self) -> temporalio.workflow.Info: + return self._info + def workflow_get_current_history_length(self) -> int: return self._current_history_length @@ -1221,9 +1417,18 @@ def workflow_instance(self) -> Any: def workflow_is_continue_as_new_suggested(self) -> bool: return self._continue_as_new_suggested + def workflow_is_target_worker_deployment_version_changed(self) -> bool: + return self._target_worker_deployment_version_changed + def workflow_is_replaying(self) -> bool: return self._is_replaying + def workflow_is_replaying_history_events(self) -> bool: + return self._is_replaying and not self._in_query_or_validator + + def workflow_is_read_only(self) -> bool: + return self._read_only + def workflow_memo(self) -> Mapping[str, Any]: if self._untyped_converted_memo is None: self._untyped_converted_memo = { @@ -1245,7 +1450,12 @@ def workflow_memo_value( type_hint, # type: ignore[arg-type] ) - def workflow_upsert_memo(self, updates: Mapping[str, Any]) -> None: + def workflow_upsert_memo( + self, + updates: Mapping[str, Any], + *, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, + ) -> None: # Converting before creating a command so that we don't leave a partial command in case of conversion failure. update_payloads = {} removals = [] @@ -1261,7 +1471,10 @@ def workflow_upsert_memo(self, updates: Mapping[str, Any]) -> None: if not update_payloads and not removals: return + markers = _capture_event_group_markers(event_groups) + command = self._add_command() + command.event_group_markers.extend(markers) fields = command.modify_workflow_properties.upserted_memo.fields # Updating memo inside info by downcasting to mutable mapping. @@ -1305,7 +1518,13 @@ def workflow_metric_meter(self) -> temporalio.common.MetricMeter: self._metric_meter = _ReplaySafeMetricMeter(metric_meter) return self._metric_meter - def workflow_patch(self, id: str, *, deprecated: bool) -> bool: + def workflow_patch( + self, + id: str, + *, + deprecated: bool, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, + ) -> bool: self._assert_not_read_only("patch") # We use a previous memoized result of this if present. If this is being # deprecated, we can still use memoized result and skip the command. @@ -1313,10 +1532,26 @@ def workflow_patch(self, id: str, *, deprecated: bool) -> bool: if use_patch is not None: return use_patch - use_patch = not self._is_replaying or id in self._patches_notified + # Replay and history markers already determine the branch, and deprecation must + # keep existing patch semantics, so only a genuinely new patch consults the + # callback. + if deprecated or self._is_replaying or id in self._patches_notified: + use_patch = not self._is_replaying or id in self._patches_notified + elif self._patch_activation_callback is not None: + with self._as_read_only(in_query_or_validator=False): + use_patch = self._patch_activation_callback( + PatchActivationInput(workflow_info=self._info, patch_id=id) + ) + if type(use_patch) is not bool: + raise TypeError("Patch activation callback must return true or false") + else: + use_patch = True self._patches_memoized[id] = use_patch if use_patch: + markers = _capture_event_group_markers(event_groups) + command = self._add_command() + command.event_group_markers.extend(markers) command.set_patch_marker.patch_id = id command.set_patch_marker.deprecated = deprecated return use_patch @@ -1415,6 +1650,7 @@ def workflow_start_activity( activity_id: str | None, versioning_intent: temporalio.workflow.VersioningIntent | None, summary: str | None = None, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, priority: temporalio.common.Priority = temporalio.common.Priority.default, ) -> temporalio.workflow.ActivityHandle[Any]: self._assert_not_read_only("start activity") @@ -1452,6 +1688,7 @@ def workflow_start_activity( ret_type=ret_type, versioning_intent=versioning_intent, summary=summary, + event_groups=event_groups, priority=priority, ) ) @@ -1480,7 +1717,9 @@ async def workflow_start_child_workflow( versioning_intent: temporalio.workflow.VersioningIntent | None, static_summary: str | None = None, static_details: str | None = None, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, ) -> temporalio.workflow.ChildWorkflowHandle[Any, Any]: # Use definition if callable name: str @@ -1518,8 +1757,10 @@ async def workflow_start_child_workflow( arg_types=arg_types, ret_type=ret_type, versioning_intent=versioning_intent, + versioning_override=versioning_override, static_summary=static_summary, static_details=static_details, + event_groups=event_groups, priority=priority, ) ) @@ -1537,6 +1778,7 @@ def workflow_start_local_activity( cancellation_type: temporalio.workflow.ActivityCancellationType, activity_id: str | None, summary: str | None, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, ) -> temporalio.workflow.ActivityHandle[Any]: # Get activity definition if it's callable name: str @@ -1570,6 +1812,7 @@ def workflow_start_local_activity( local_retry_threshold=local_retry_threshold, cancellation_type=cancellation_type, summary=summary, + event_groups=event_groups, headers={}, arg_types=arg_types, ret_type=ret_type, @@ -1584,11 +1827,31 @@ async def workflow_start_nexus_operation( input: Any, output_type: type[OutputT] | None, schedule_to_close_timeout: timedelta | None, + schedule_to_start_timeout: timedelta | None, + start_to_close_timeout: timedelta | None, cancellation_type: temporalio.workflow.NexusOperationCancellationType, headers: Mapping[str, str] | None, summary: str | None, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, ) -> temporalio.workflow.NexusOperationHandle[OutputT]: - # start_nexus_operation + if temporalio.nexus.system.is_system_endpoint(endpoint): + return await _start_system_nexus_operation( + self._outbound, + StartNexusOperationInput( + endpoint=temporalio.nexus.system.TEMPORAL_SYSTEM_ENDPOINT, + service=service, + operation=operation, + input=input, + output_type=output_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + cancellation_type=cancellation_type, + headers=None, + summary=summary, + event_groups=event_groups, + ), + ) return await self._outbound.start_nexus_operation( StartNexusOperationInput( endpoint=endpoint, @@ -1597,9 +1860,12 @@ async def workflow_start_nexus_operation( input=input, output_type=output_type, schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, cancellation_type=cancellation_type, headers=headers, summary=summary, + event_groups=event_groups, ) ) @@ -1612,8 +1878,14 @@ def workflow_upsert_search_attributes( temporalio.common.SearchAttributes | Sequence[temporalio.common.SearchAttributeUpdate] ), + *, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, ) -> None: - v = self._add_command().upsert_workflow_search_attributes + markers = _capture_event_group_markers(event_groups) + + command = self._add_command() + command.event_group_markers.extend(markers) + v = command.upsert_workflow_search_attributes # Update the attrs on info, casting to their mutable forms first mut_attrs = cast( @@ -1633,7 +1905,7 @@ def workflow_upsert_search_attributes( mut_attrs.update(attributes) for k, vals in attributes.items(): # Add to command - v.search_attributes[k].CopyFrom( + v.search_attributes.indexed_fields[k].CopyFrom( temporalio.converter.encode_search_attribute_values(vals) ) @@ -1674,7 +1946,7 @@ def workflow_upsert_search_attributes( # Update typed and untyped keys, replacing typed as needed for update in attributes: # Set on command (delete is a proper null) - v.search_attributes[update.key.name].CopyFrom( + v.search_attributes.indexed_fields[update.key.name].CopyFrom( temporalio.converter.encode_typed_search_attribute_value( update.key, update.value ) @@ -1713,7 +1985,11 @@ def workflow_upsert_search_attributes( ) async def workflow_sleep( - self, duration: float, *, summary: str | None = None + self, + duration: float, + *, + summary: str | None = None, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, ) -> None: user_metadata = ( temporalio.api.sdk.v1.UserMetadata( @@ -1722,11 +1998,16 @@ async def workflow_sleep( if summary else None ) + markers = _capture_event_group_markers(event_groups) + fut = self.create_future() - self._timer_impl( + timer_handle = self._timer_impl( duration, - _TimerOptions(user_metadata=user_metadata), - lambda: fut.set_result(None), + _TimerOptions(user_metadata=user_metadata, event_group_markers=markers), + lambda: fut.set_result(None) if not fut.done() else None, + ) + fut.add_done_callback( + lambda f: timer_handle.cancel() if f.cancelled() else None ) await fut @@ -1736,8 +2017,22 @@ async def workflow_wait_condition( *, timeout: float | None = None, timeout_summary: str | None = None, + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, ) -> None: self._assert_not_read_only("wait condition") + cancellation_requested_before = self._cancel_reason is not None + + # Some asyncio.wait_for implementations can prefer a ready condition + # result or timeout over task cancellation that becomes ready in the same + # event-loop turn. Only detect a new request so workflows can catch + # cancellation and keep going. + def cancellation_arrived() -> bool: + return ( + self._single_batch_activation + and not cancellation_requested_before + and self._cancel_reason is not None + ) + fut = self.create_future() self._conditions.append((fn, fut)) user_metadata = ( @@ -1749,13 +2044,28 @@ async def workflow_wait_condition( if timeout_summary else None ) - ctxvars = contextvars.copy_context() - - async def in_context(): - _TimerOptionsCtxVar.set(_TimerOptions(user_metadata=user_metadata)) + markers = _capture_event_group_markers(event_groups) + # asyncio.wait_for() starts its timer from this task, so the options are + # set in the task's context and reset once the wait ends + token = _TimerOptionsCtxVar.set( + _TimerOptions(user_metadata=user_metadata, event_group_markers=markers) + ) + try: await asyncio.wait_for(fut, timeout) - - await ctxvars.run(in_context) + except asyncio.TimeoutError: + if cancellation_arrived(): + raise asyncio.CancelledError() + raise + finally: + try: + _TimerOptionsCtxVar.reset(token) + except ValueError: + # Closing rather than resuming a coroutine suspended here + # unwinds it in another context, and the one the options were + # set in is being discarded anyway + pass + if cancellation_arrived(): + raise asyncio.CancelledError() def workflow_get_current_details(self) -> str: return self._current_details @@ -1765,9 +2075,9 @@ def workflow_set_current_details(self, details: str): self._current_details = details def workflow_is_failure_exception(self, err: BaseException) -> bool: - # An exception is a failure instead of a task fail if it's already a - # failure error or if it is a timeout error or if it is an instance of - # any of the failure types in the worker or workflow-level setting + # An exception causes the workflow to fail (rather than the task) if it + # is already a failure error, a timeout error, or an instance of any of the + # failure exception types configured at the worker or workflow level. wf_failure_exception_types = self._defn.failure_exception_types if self._dynamic_failure_exception_types is not None: wf_failure_exception_types = self._dynamic_failure_exception_types @@ -1794,27 +2104,35 @@ def workflow_last_completion_result(self, type_hint: type | None) -> Any | None: return None if type_hint is None: - return self._workflow_context_payload_converter.from_payload( + return self._result_payload_converter.from_payload( self._last_completion_result.payloads[0] ) else: - return self._workflow_context_payload_converter.from_payload( + return self._result_payload_converter.from_payload( self._last_completion_result.payloads[0], type_hint ) def workflow_last_failure(self) -> BaseException | None: if self._last_failure: - return self._workflow_context_failure_converter.from_failure( - self._last_failure, self._workflow_context_payload_converter + return self._result_failure_converter.from_failure( + self._last_failure, self._result_payload_converter ) return None + def workflow_random_seed(self) -> int: + return self._current_seed + + def workflow_register_random_seed_callback( + self, callback: Callable[[int], None] + ) -> None: + self._assert_not_read_only("register random seed callback") + self._seed_callbacks.append(callback) + #### Calls from outbound impl #### # These are in alphabetical order and all start with "_outbound_". def _outbound_continue_as_new(self, input: ContinueAsNewInput) -> NoReturn: - # Just throw raise _ContinueAsNewError(self, input) def _outbound_schedule_activity( @@ -1831,39 +2149,25 @@ def _outbound_schedule_activity( # Function that runs in the handle async def run_activity() -> Any: + handle._started = True while True: - # Mark it as started each loop because backoff could cause it to - # be marked as unstarted - handle._started = True try: - # We have to shield because we don't want the underlying - # result future to be cancelled - return await asyncio.shield(handle._result_fut) + return await self._await_temporal_operation( + handle._result_fut, + lambda _err: handle._request_cancel(), + completed_cancellation_flag=_WorkflowLogicFlag.RAISE_ON_CANCELLING_COMPLETED_ACTIVITY, + ) except _ActivityDoBackoffError as err: # We have to sleep then reschedule. Note this sleep can be # cancelled like any other timer. - await asyncio.sleep( - err.backoff.backoff_duration.ToTimedelta().total_seconds() + await self.workflow_sleep( + err.backoff.backoff_duration.ToTimedelta().total_seconds(), + event_groups=input.event_groups, ) handle._apply_schedule_command(err.backoff) # We have to put the handle back on the pending activity # dict with its new seq self._pending_activities[handle._seq] = handle - except asyncio.CancelledError: - # If an activity future completes at the same time as a cancellation is being processed, the cancellation would be swallowed - # _WorkflowLogicFlag.RAISE_ON_CANCELLING_COMPLETED_ACTIVITY will correctly reraise the exception - if handle._result_fut.done(): - if ( - not self._is_replaying - or _WorkflowLogicFlag.RAISE_ON_CANCELLING_COMPLETED_ACTIVITY - in self._current_internal_flags - ): - self._current_completion.successful.used_internal_flags.append( - _WorkflowLogicFlag.RAISE_ON_CANCELLING_COMPLETED_ACTIVITY - ) - raise - # Send a cancel request to the activity - handle._apply_cancel_command(self._add_command()) # Create the handle and set as pending handle = _ActivityHandle(self, input, run_activity()) @@ -1881,6 +2185,8 @@ async def _outbound_signal_child_workflow( ) ) payloads = payload_converter.to_payloads(input.args) if input.args else None + markers = _capture_event_group_markers(input.event_groups) + command = self._add_command() v = command.signal_external_workflow_execution v.child_workflow_id = input.child_workflow_id @@ -1889,6 +2195,8 @@ async def _outbound_signal_child_workflow( v.args.extend(payloads) if input.headers: temporalio.common._apply_headers(input.headers, v.headers) + command.event_group_markers.extend(markers) + await self._signal_external_workflow(command) async def _outbound_signal_external_workflow( @@ -1901,6 +2209,8 @@ async def _outbound_signal_external_workflow( ) ) payloads = payload_converter.to_payloads(input.args) if input.args else None + markers = _capture_event_group_markers(input.event_groups) + command = self._add_command() v = command.signal_external_workflow_execution v.workflow_execution.namespace = input.namespace @@ -1912,6 +2222,8 @@ async def _outbound_signal_external_workflow( v.args.extend(payloads) if input.headers: temporalio.common._apply_headers(input.headers, v.headers) + command.event_group_markers.extend(markers) + await self._signal_external_workflow(command) async def _outbound_start_child_workflow( @@ -1920,10 +2232,14 @@ async def _outbound_start_child_workflow( handle: _ChildWorkflowHandle # Common code for handling cancel for start and run - def apply_child_cancel_error() -> None: - # Send a cancel request to the child + def apply_child_cancel_error( + err: asyncio.CancelledError, + ) -> None: cancel_command = self._add_command() - handle._apply_cancel_command(cancel_command) + # Send a cancel request to the child, forwarding the msg passed to + # Task.cancel(msg) (if any) as the cancellation reason. + reason = err.args[0] if err.args and isinstance(err.args[0], str) else "" + handle._apply_cancel_command(cancel_command, reason=reason) # If the cancel command is for external workflow, we # have to add a seq and mark it pending if cancel_command.HasField("request_cancel_external_workflow_execution"): @@ -1941,13 +2257,9 @@ def apply_child_cancel_error() -> None: # Function that runs in the handle async def run_child() -> Any: - while True: - try: - # We have to shield because we don't want the future itself - # to be cancelled - return await asyncio.shield(handle._result_fut) - except asyncio.CancelledError: - apply_child_cancel_error() + return await self._await_temporal_operation( + handle._result_fut, apply_child_cancel_error + ) # Create the handle and set as pending handle = _ChildWorkflowHandle( @@ -1957,14 +2269,12 @@ async def run_child() -> Any: self._pending_child_workflows[handle._seq] = handle # Wait on start before returning - while True: - try: - # We have to shield because we don't want the future itself - # to be cancelled - await asyncio.shield(handle._start_fut) - return handle - except asyncio.CancelledError: - apply_child_cancel_error() + await self._await_temporal_operation( + handle._start_fut, + apply_child_cancel_error, + reraise_on_workflow_cancellation=True, + ) + return handle async def _outbound_start_nexus_operation( self, input: StartNexusOperationInput[Any, OutputT] @@ -1985,26 +2295,73 @@ async def _outbound_start_nexus_operation( handle: _NexusOperationHandle[OutputT] async def operation_handle_fn() -> OutputT: - while True: - try: - return cast(OutputT, await asyncio.shield(handle._result_fut)) - except asyncio.CancelledError: - cancel_command = self._add_command() - handle._apply_cancel_command(cancel_command) + return cast( + OutputT, + await self._await_temporal_operation( + handle._result_fut, + lambda _err: handle._apply_cancel_command(self._add_command()), + ), + ) + if temporalio.nexus.system.is_system_endpoint(input.endpoint): + serialization_context = temporalio.nexus.system._get_serialization_context( + input.service, + input.operation_name, + input.input, + ) + user_payload_converter = self._context_free_payload_converter + user_failure_converter = self._context_free_failure_converter + if serialization_context is not None: + user_payload_converter = self._payload_converter_with_context( + serialization_context + ) + user_failure_converter = self._failure_converter_with_context( + serialization_context + ) + payload_converter = temporalio.nexus.system._get_payload_converter( + user_payload_converter, + user_failure_converter, + ) + failure_converter = user_failure_converter + else: + serialization_context = temporalio.converter.NexusSerializationContext( + endpoint=input.endpoint, + service=input.service, + operation=input.operation_name, + ) + payload_converter = self._payload_converter_with_context( + serialization_context + ) + failure_converter = self._failure_converter_with_context( + serialization_context + ) handle = _NexusOperationHandle( - self, self._next_seq("nexus_operation"), input, operation_handle_fn() + self, + self._next_seq("nexus_operation"), + input, + operation_handle_fn(), + payload_converter, + failure_converter, ) handle._apply_schedule_command() self._pending_nexus_operations[handle._seq] = handle - while True: - try: - await asyncio.shield(handle._start_fut) - return handle - except asyncio.CancelledError: - cancel_command = self._add_command() - handle._apply_cancel_command(cancel_command) + await self._await_temporal_operation( + handle._start_fut, + lambda _err: handle._apply_cancel_command(self._add_command()), + reraise_on_workflow_cancellation=True, + ) + return handle + + async def _intercept_system_nexus_operation( + self, input: StartNexusOperationInput[Any, OutputT] + ) -> temporalio.workflow.NexusOperationHandle[OutputT]: + return await self._outbound.start_system_nexus_operation(input) + + async def _schedule_system_nexus_operation( + self, input: StartNexusOperationInput[Any, OutputT] + ) -> _NexusOperationHandle[OutputT]: + return await self._outbound_start_nexus_operation(input) #### Miscellaneous helpers #### # These are in alphabetical order. @@ -2013,14 +2370,25 @@ def _add_command(self) -> temporalio.bridge.proto.workflow_commands.WorkflowComm self._assert_not_read_only("add command") return self._current_completion.successful.commands.add() + def _workflow_logic_flag_enabled(self, flag: _WorkflowLogicFlag) -> bool: + if flag in self._current_internal_flags: + return True + if self._is_replaying or flag not in self._default_workflow_logic_flags: + return False + self._current_completion.successful.used_internal_flags.append(flag) + return True + @contextmanager - def _as_read_only(self) -> Iterator[None]: - prev_val = self._read_only + def _as_read_only(self, *, in_query_or_validator: bool) -> Iterator[None]: + prev_read_only = self._read_only + prev_in_query_or_validator = self._in_query_or_validator self._read_only = True + self._in_query_or_validator = in_query_or_validator try: yield None finally: - self._read_only = prev_val + self._read_only = prev_read_only + self._in_query_or_validator = prev_in_query_or_validator def _assert_not_read_only( self, action_attempted: str, *, allow_during_delete: bool = False @@ -2034,6 +2402,50 @@ def _assert_not_read_only( f"While in read-only function, action attempted: {action_attempted}" ) + async def _await_temporal_operation( + self, + fut: asyncio.Future[_T], + apply_cancel: Callable[ + [asyncio.CancelledError], + None, + ], + *, + completed_cancellation_flag: _WorkflowLogicFlag | None = None, + reraise_on_workflow_cancellation: bool = False, + ) -> _T: + while True: + try: + # Protect the operation's result from task cancellation so a + # Temporal cancellation command can decide its outcome. The + # custom shield also avoids spurious error logs on Python 3.11+. + return await _shield_await(fut) + except asyncio.CancelledError as err: + if fut.done(): + # Retrying the shield after both futures become ready would + # return the result and erase the task cancellation. + if self._single_batch_activation: + raise + if completed_cancellation_flag is not None and ( + not self._is_replaying + or completed_cancellation_flag in self._current_internal_flags + ): + self._current_completion.successful.used_internal_flags.append( + completed_cancellation_flag + ) + raise + + apply_cancel(err) + + # Clear the cancellation counter so the next await does not + # immediately re-raise CancelledError. + if (task := asyncio.current_task()) is not None: + task.uncancel() + + if reraise_on_workflow_cancellation and ( + self._cancel_reason is not None or self._deleting + ): + raise + async def _cancel_external_workflow( self, # Should not have seq set @@ -2117,6 +2529,21 @@ def get_serialization_context( workflow_id=self._info.workflow_id, ) + if self._nexus_serialization_context and command_info.command_type in ( + temporalio.api.enums.v1.command_type_pb2.CommandType.COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION, + temporalio.api.enums.v1.command_type_pb2.CommandType.COMMAND_TYPE_FAIL_WORKFLOW_EXECUTION, + ): + # The result and closing failure go back to the Nexus caller + return self._nexus_serialization_context + + if ( + command_info.command_type + == temporalio.api.enums.v1.command_type_pb2.CommandType.COMMAND_TYPE_PROTOCOL_MESSAGE + and command_info.update_protocol_instance_id in self._nexus_update_contexts + ): + # The update's result and failure go back to the Nexus caller + return self._nexus_update_contexts[command_info.update_protocol_instance_id] + if ( command_info.command_type == temporalio.api.enums.v1.command_type_pb2.CommandType.COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK @@ -2129,6 +2556,7 @@ def get_serialization_context( workflow_id=self._info.workflow_id, workflow_type=self._info.workflow_type, activity_type=activity_handle._input.activity, + activity_id=activity_handle._input.activity_id, activity_task_queue=( activity_handle._input.task_queue if isinstance(activity_handle._input, StartActivityInput) @@ -2169,10 +2597,20 @@ def get_serialization_context( == temporalio.api.enums.v1.command_type_pb2.CommandType.COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION and command_info.command_seq in self._pending_nexus_operations ): - # Use empty context for nexus operations: users will never want to encrypt using a - # key derived from caller workflow context because the caller workflow context is - # not available on the handler side for decryption. - return None + nexus_operation = self._pending_nexus_operations[command_info.command_seq] + if temporalio.nexus.system.is_system_endpoint( + nexus_operation._input.endpoint + ): + return temporalio.nexus.system._get_serialization_context( + nexus_operation._input.service, + nexus_operation._input.operation_name, + nexus_operation._input.input, + ) + return temporalio.converter.NexusSerializationContext( + endpoint=nexus_operation._input.endpoint, + service=nexus_operation._input.service, + operation=nexus_operation._input.operation_name, + ) else: # Use payload codec with workflow context for all other payloads @@ -2181,6 +2619,81 @@ def get_serialization_context( workflow_id=self._info.workflow_id, ) + def get_external_store_context( + self, + command_info: _command_aware_visitor.CommandInfo | None, + ) -> StorageDriverStoreContext: + # The current workflow is the default target for external store + # operations. For commands that target other workflows, those workflows + # are the target for that command's external store operation. For + # workflow activities, the target is the current workflow since the + # activity is bound to the lifetime of the current workflow, the + # activity run information is the same as the current workflow, and + # successfully completed activities are not involved in replay. + # Otherwise, the storage space for a given workflow would be disparate + # if stored under activity information. + current_wf = StorageDriverWorkflowInfo( + id=self._info.workflow_id, + run_id=self._info.run_id, + type=self._info.workflow_type, + namespace=self._info.namespace, + ) + + if command_info is None: + return StorageDriverStoreContext( + namespace=self._info.namespace, target=current_wf + ) + + COMMAND_TYPE = temporalio.api.enums.v1.command_type_pb2.CommandType + + if ( + command_info.command_type + == COMMAND_TYPE.COMMAND_TYPE_START_CHILD_WORKFLOW_EXECUTION + and command_info.command_seq in self._pending_child_workflows + ): + child = self._pending_child_workflows[command_info.command_seq] + return StorageDriverStoreContext( + namespace=self._info.namespace, + target=StorageDriverWorkflowInfo( + id=child._input.id, + type=child._input.workflow, + namespace=self._info.namespace, + ), + ) + + elif ( + command_info.command_type + == COMMAND_TYPE.COMMAND_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION + and command_info.command_seq in self._pending_external_signals + ): + _, target_id = self._pending_external_signals[command_info.command_seq] + return StorageDriverStoreContext( + namespace=self._info.namespace, + target=StorageDriverWorkflowInfo( + id=target_id, namespace=self._info.namespace + ), + ) + + elif ( + command_info.command_type + == COMMAND_TYPE.COMMAND_TYPE_COMPLETE_WORKFLOW_EXECUTION + and self._info.parent is not None + and self._info.continued_run_id is None + ): + return StorageDriverStoreContext( + namespace=self._info.namespace, + target=StorageDriverWorkflowInfo( + id=self._info.parent.workflow_id, + run_id=self._info.parent.run_id, + namespace=self._info.parent.namespace, + ), + ) + + else: + return StorageDriverStoreContext( + namespace=self._info.namespace, target=current_wf + ) + def _instantiate_workflow_object(self) -> Any: if not self._workflow_input: raise RuntimeError("Expected workflow input. This is a Python SDK bug.") @@ -2197,7 +2710,7 @@ def _instantiate_workflow_object(self) -> Any: if self._defn.name is None and self._defn.dynamic_config_fn is not None: dynamic_config = None try: - with self._as_read_only(): + with self._as_read_only(in_query_or_validator=False): dynamic_config = self._defn.dynamic_config_fn(workflow_instance) except Exception as err: logger.exception( @@ -2295,7 +2808,10 @@ def _process_signal_job( ) except Exception: logger.exception( - f"Failed deserializing signal input for {job.signal_name}, dropping the signal" + f"Failed deserializing signal input for {job.signal_name}" + f" on workflow {self._info.workflow_type} with ID {self._info.workflow_id}" + f" and run ID {self._info.run_id}, dropping the signal", + extra={"temporal_workflow": self._info._logger_details()}, ) return input = HandleSignalInput( @@ -2308,11 +2824,15 @@ def _process_signal_job( job.signal_name, defn.unfinished_policy ) - def done_callback(f): + def done_callback(_f: Any): self._in_progress_signals.pop(id, None) + async def run_signal() -> None: + with _inbound_event_group(job.originating_event_id).scope(): + await self._inbound.handle_signal(input) + task = self.create_task( - self._run_top_level_workflow_function(self._inbound.handle_signal(input)), + self._run_top_level_workflow_function(run_signal()), name=f"signal: {job.signal_name}", ) task.add_done_callback(done_callback) @@ -2332,7 +2852,7 @@ def _register_task( # Add to and remove from our own non-weak set instead of relying on # Python's weak set which can collect these too early self._tasks.add(task) - task.add_done_callback(self._tasks.remove) + task.add_done_callback(self._tasks.discard) # When the workflow is GC'd (for whatever reason, e.g. eviction or # worker shutdown), still-open tasks get a message logged to the # exception handler about still pending. We disable this if the @@ -2340,7 +2860,14 @@ def _register_task( if hasattr(task, "_log_destroy_pending"): setattr(task, "_log_destroy_pending", False) - def _run_once(self, *, check_conditions: bool) -> None: + def _run_once( + self, + *, + check_conditions: bool, + jobs: Sequence[ + temporalio.bridge.proto.workflow_activation.WorkflowActivationJob + ], + ) -> None: try: asyncio._set_running_loop(self) @@ -2365,7 +2892,17 @@ def _run_once(self, *, check_conditions: bool) -> None: # Check conditions which may add to the ready list. Also remove # conditions whose futures have already cancelled (e.g. when # timed out). - if check_conditions: + # + # Rejected updates leave nothing in history, so a condition they + # let through (e.g. one on a value refreshed every activation) + # could not unblock on replay. + if check_conditions and ( + any(not job.HasField("do_update") for job in jobs) + or any( + c.update_response.HasField("accepted") + for c in self._current_completion.successful.commands + ) + ): self._conditions[:] = [ t for t in self._conditions @@ -2414,8 +2951,9 @@ async def _run_top_level_workflow_function(self, coro: Awaitable[None]) -> None: # cancel later on will show the workflow as cancelled. But this is # a Temporal limitation in that cancellation is a state not an # event. - if self._cancel_requested and temporalio.exceptions.is_cancelled_exception( - err + if ( + self._cancel_reason is not None + and temporalio.exceptions.is_cancelled_exception(err) ): self._add_command().cancel_workflow_execution.SetInParent() elif self.workflow_is_failure_exception(err): @@ -2430,8 +2968,8 @@ def _set_workflow_failure(self, err: BaseException) -> None: failure = self._add_command().fail_workflow_execution.failure failure.SetInParent() try: - self._workflow_context_failure_converter.to_failure( - err, self._workflow_context_payload_converter, failure + self._result_failure_converter.to_failure( + err, self._result_payload_converter, failure ) except Exception as inner_err: raise ValueError("Failed converting workflow exception") from inner_err @@ -2451,15 +2989,17 @@ async def _signal_external_workflow( ) self._pending_external_signals[seq] = (done_fut, target_workflow_id) + def apply_cancel( + _err: asyncio.CancelledError, + ) -> None: + # `cancel_signal_workflow` is a Core-only command and apply only if the Signal command + # has not yet been sent to the server. The cancel request itself can't produce a WFT + # command. Hence there's no point in attaching Event Groups or User Metadata to it. + command = self._add_command() + command.cancel_signal_workflow.seq = seq + # Wait until completed or cancelled - while True: - try: - # We have to shield because we don't want the future itself - # to be cancelled - return await asyncio.shield(done_fut) - except asyncio.CancelledError: - cancel_command = self._add_command() - cancel_command.cancel_signal_workflow.seq = seq + return await self._await_temporal_operation(done_fut, apply_cancel) def _stack_trace(self) -> str: stacks = [] @@ -2581,10 +3121,22 @@ def _timer_impl( if delay < 0: raise RuntimeError("Attempting to schedule timer with negative delay") + if options.event_group_markers is None: + options = _TimerOptions( + user_metadata=options.user_metadata, + event_group_markers=_capture_event_group_markers(None), + ) + # Create, schedule, and return seq = self._next_seq("timer") handle = _TimerHandle( - seq, self.time() + delay, options, callback, args, self, context + seq, + self.time() + delay, + options, + callback, + args, + self, + context, ) handle._apply_start_command(self._add_command(), delay) self._pending_timers[seq] = handle @@ -2657,12 +3209,14 @@ def create_task( *, name: str | None = None, context: contextvars.Context | None = None, + eager_start: bool | None = None, ) -> asyncio.Task[_T]: - # Context only supported on newer Python versions - if sys.version_info >= (3, 11): - task = asyncio.Task(coro, loop=self, context=context) # type: ignore - else: - task = asyncio.Task(coro, loop=self) # type: ignore + if eager_start: + # Eager execution would bypass the workflow's deterministic task queue. + raise NotImplementedError( + "Eager task execution is not supported in workflows" + ) + task = asyncio.Task(coro, loop=self, context=context) # type: ignore self._register_task(task, name=name) return task @@ -2755,6 +3309,9 @@ def call_exception_handler(self, context: _Context) -> None: def get_debug(self) -> bool: return False + def is_running(self) -> bool: + return True + class _WorkflowInboundImpl(WorkflowInboundInterceptor): def __init__( # type: ignore @@ -2814,11 +3371,18 @@ async def handle_update_handler(self, input: HandleUpdateInput) -> Any: return handler(*input.args) -class _WorkflowOutboundImpl(WorkflowOutboundInterceptor): +class _WorkflowOutboundImpl( + _SystemNexusWorkflowOutboundInterceptorTerminal, WorkflowOutboundInterceptor +): def __init__(self, instance: _WorkflowInstanceImpl) -> None: # type: ignore # We are intentionally not calling the base class's __init__ here self._instance = instance + async def _outbound_start_nexus_operation( + self, input: StartNexusOperationInput[InputT, OutputT] + ) -> temporalio.workflow.NexusOperationHandle[OutputT]: + return await self._instance._outbound_start_nexus_operation(input) + def continue_as_new(self, input: ContinueAsNewInput) -> NoReturn: self._instance._outbound_continue_as_new(input) @@ -2848,6 +3412,16 @@ async def start_nexus_operation( ) -> _NexusOperationHandle[OutputT]: return await self._instance._outbound_start_nexus_operation(input) + async def _intercept_system_nexus_operation( + self, input: StartNexusOperationInput[InputT, OutputT] + ) -> temporalio.workflow.NexusOperationHandle[OutputT]: + return await self._instance._intercept_system_nexus_operation(input) + + async def start_system_nexus_operation( + self, input: StartNexusOperationInput[Any, OutputT] + ) -> _NexusOperationHandle[OutputT]: + return await self._instance._schedule_system_nexus_operation(input) + def start_local_activity( self, input: StartLocalActivityInput ) -> temporalio.workflow.ActivityHandle[Any]: @@ -2857,6 +3431,7 @@ def start_local_activity( @dataclass(frozen=True) class _TimerOptions: user_metadata: temporalio.api.sdk.v1.UserMetadata | None = None + event_group_markers: Sequence[temporalio.api.sdk.v1.EventGroupMarker] | None = None _TimerOptionsCtxVar: contextvars.ContextVar[_TimerOptions] = contextvars.ContextVar( @@ -2869,7 +3444,7 @@ def __init__( self, seq: int, when: float, - options: _TimerOptions | None, + options: _TimerOptions, callback: Callable[..., Any], args: Sequence[Any], loop: asyncio.AbstractEventLoop, @@ -2885,8 +3460,9 @@ def _apply_start_command( delay: float, ) -> None: command.start_timer.seq = self._seq - if self._options and self._options.user_metadata: + if self._options.user_metadata: command.user_metadata.CopyFrom(self._options.user_metadata) + command.event_group_markers.extend(self._options.event_group_markers or ()) command.start_timer.start_to_fire_timeout.FromNanoseconds(int(delay * 1e9)) def _apply_cancel_command( @@ -2894,6 +3470,7 @@ def _apply_cancel_command( command: temporalio.bridge.proto.workflow_commands.WorkflowCommand, ) -> None: command.cancel_timer.seq = self._seq + command.event_group_markers.extend(self._options.event_group_markers or ()) class _ActivityDoBackoffError(BaseException): @@ -2917,6 +3494,7 @@ def __init__( self._input = input self._result_fut = instance.create_future() self._started = False + self._cancel_command_seq: int | None = None instance._register_task(self, name=f"activity: {input.activity}") self._payload_converter = self._instance._payload_converter_with_context( temporalio.converter.ActivitySerializationContext( @@ -2924,6 +3502,7 @@ def __init__( workflow_id=self._instance._info.workflow_id, workflow_type=self._instance._info.workflow_type, activity_type=self._input.activity, + activity_id=self._input.activity_id, activity_task_queue=( self._input.task_queue or self._instance._info.task_queue if isinstance(self._input, StartActivityInput) @@ -2932,6 +3511,7 @@ def __init__( is_local=isinstance(self._input, StartLocalActivityInput), ) ) + self._event_group_markers = _capture_event_group_markers(input.event_groups) def cancel(self, msg: Any | None = None) -> bool: # Allow the cancel to go through for the task even if we're deleting, @@ -2942,12 +3522,17 @@ def cancel(self, msg: Any | None = None) -> bool: # to send a cancel command because the async function won't run to trap # the cancel (i.e. cancelled before started) if not self._started and not self.done(): - self._apply_cancel_command(self._instance._add_command()) - # Message not supported in older versions - if sys.version_info < (3, 9): - return super().cancel() + self._request_cancel() return super().cancel(msg) + def _request_cancel(self) -> None: + # While evicting, _add_command must still run because the + # _WorkflowBeingEvictedError it raises is what ends this handle's task + if self._cancel_command_seq == self._seq and not self._instance._deleting: + return + self._cancel_command_seq = self._seq + self._apply_cancel_command(self._instance._add_command()) + def _resolve_success(self, result: Any) -> None: # We intentionally let this error if already done self._result_fut.set_result(result) @@ -2968,8 +3553,8 @@ def _resolve_backoff( self._result_fut.set_exception(_ActivityDoBackoffError(backoff)) # Replace the result future since that one is resolved now self._result_fut = self._instance.create_future() - # Mark this as not started since it's a new future - self._started = False + # Leave _started set: run_activity is running and traps a cancel in its + # backoff sleep, and Core has no command for the new seq to cancel yet def _apply_schedule_command( self, @@ -3016,6 +3601,7 @@ def _apply_schedule_command( command.user_metadata.summary.CopyFrom( self._payload_converter.to_payload(self._input.summary) ) + command.event_group_markers.extend(self._event_group_markers) v.cancellation_type = cast( temporalio.bridge.proto.workflow_commands.ActivityCancellationType.ValueType, int(self._input.cancellation_type), @@ -3060,6 +3646,7 @@ def _apply_cancel_command( command.request_cancel_activity.seq = self._seq else: command.request_cancel_local_activity.seq = self._seq + command.event_group_markers.extend(self._event_group_markers) class _ChildWorkflowHandle(temporalio.workflow.ChildWorkflowHandle[Any, Any]): @@ -3088,6 +3675,7 @@ def __init__( self._failure_converter = self._instance._failure_converter_with_context( workflow_context ) + self._event_group_markers = _capture_event_group_markers(input.event_groups) @property def id(self) -> str: @@ -3103,6 +3691,7 @@ async def signal( arg: Any = temporalio.common._arg_unset, *, args: Sequence[Any] = [], + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, ) -> None: self._instance._assert_not_read_only("signal child handle") await self._instance._outbound.signal_child_workflow( @@ -3113,6 +3702,7 @@ async def signal( args=temporalio.common._arg_or_args(arg, args), child_workflow_id=self._input.id, headers={}, + event_groups=event_groups, ) ) @@ -3176,7 +3766,7 @@ def _apply_start_command(self) -> None: v.memo[k].CopyFrom(self._payload_converter.to_payloads([val])[0]) if self._input.search_attributes: _encode_search_attributes( - self._input.search_attributes, v.search_attributes + self._input.search_attributes, v.search_attributes.indexed_fields ) v.cancellation_type = cast( temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.ValueType, @@ -3184,6 +3774,8 @@ def _apply_start_command(self) -> None: ) if self._input.versioning_intent: v.versioning_intent = self._input.versioning_intent._to_proto() + if self._input.versioning_override: + v.versioning_override.CopyFrom(self._input.versioning_override._to_proto()) if self._input.static_summary: command.user_metadata.summary.CopyFrom( self._payload_converter.to_payload(self._input.static_summary) @@ -3192,6 +3784,7 @@ def _apply_start_command(self) -> None: command.user_metadata.details.CopyFrom( self._payload_converter.to_payload(self._input.static_details) ) + command.event_group_markers.extend(self._event_group_markers) if self._input.priority: v.priority.CopyFrom(self._input.priority._to_proto()) @@ -3199,8 +3792,13 @@ def _apply_start_command(self) -> None: def _apply_cancel_command( self, command: temporalio.bridge.proto.workflow_commands.WorkflowCommand, + *, + reason: str = "", ) -> None: - command.cancel_child_workflow_execution.child_workflow_seq = self._seq + v = command.cancel_child_workflow_execution + v.child_workflow_seq = self._seq + v.reason = reason + command.event_group_markers.extend(self._event_group_markers) class _ExternalWorkflowHandle(temporalio.workflow.ExternalWorkflowHandle[Any]): @@ -3229,6 +3827,7 @@ async def signal( arg: Any = temporalio.common._arg_unset, *, args: Sequence[Any] = [], + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, ) -> None: self._instance._assert_not_read_only("signal external handle") await self._instance._outbound.signal_external_workflow( @@ -3241,23 +3840,32 @@ async def signal( workflow_id=self._id, workflow_run_id=self._run_id, headers={}, + event_groups=event_groups, ) ) - async def cancel(self) -> None: + async def cancel( + self, + *, + reason: str = "", + event_groups: Sequence[temporalio.workflow.EventGroup] | None = None, + ) -> None: self._instance._assert_not_read_only("cancel external handle") + + markers = _capture_event_group_markers(event_groups) + command = self._instance._add_command() + command.event_group_markers.extend(markers) v = command.request_cancel_external_workflow_execution v.workflow_execution.namespace = self._instance._info.namespace v.workflow_execution.workflow_id = self._id if self._run_id: v.workflow_execution.run_id = self._run_id + v.reason = reason + await self._instance._cancel_external_workflow(command) -# TODO(nexus-preview): are we sure we don't want to inherit from asyncio.Task as -# ActivityHandle and ChildWorkflowHandle do? I worry that we should provide .done(), -# .result(), .exception() etc for consistency. class _NexusOperationHandle(temporalio.workflow.NexusOperationHandle[OutputT]): def __init__( self, @@ -3265,15 +3873,20 @@ def __init__( seq: int, input: StartNexusOperationInput[Any, OutputT], fn: Coroutine[Any, Any, OutputT], + payload_converter: temporalio.converter.PayloadConverter, + failure_converter: temporalio.converter.FailureConverter, ): self._instance = instance self._seq = seq self._input = input - self._task = asyncio.Task(fn) + self._task = instance.create_task( + fn, name=f"nexus: {input.service}/{input.operation_name}" + ) self._start_fut: asyncio.Future[str | None] = instance.create_future() self._result_fut: asyncio.Future[OutputT | None] = instance.create_future() - self._payload_converter = self._instance._context_free_payload_converter - self._failure_converter = self._instance._context_free_failure_converter + self._payload_converter = payload_converter + self._failure_converter = failure_converter + self._event_group_markers = _capture_event_group_markers(input.event_groups) @property def operation_token(self) -> str | None: @@ -3318,6 +3931,12 @@ def _apply_schedule_command(self) -> None: v.schedule_to_close_timeout.FromTimedelta( self._input.schedule_to_close_timeout ) + if self._input.schedule_to_start_timeout is not None: + v.schedule_to_start_timeout.FromTimedelta( + self._input.schedule_to_start_timeout + ) + if self._input.start_to_close_timeout is not None: + v.start_to_close_timeout.FromTimedelta(self._input.start_to_close_timeout) v.cancellation_type = cast( temporalio.bridge.proto.nexus.NexusOperationCancellationType.ValueType, int(self._input.cancellation_type), @@ -3331,12 +3950,14 @@ def _apply_schedule_command(self) -> None: command.user_metadata.summary.CopyFrom( self._payload_converter.to_payload(self._input.summary) ) + command.event_group_markers.extend(self._event_group_markers) def _apply_cancel_command( self, command: temporalio.bridge.proto.workflow_commands.WorkflowCommand, ) -> None: command.request_cancel_nexus_operation.seq = self._seq + command.event_group_markers.extend(self._event_group_markers) class _ContinueAsNewError(temporalio.workflow.ContinueAsNewError): @@ -3346,6 +3967,7 @@ def __init__( super().__init__("Continue as new") self._instance = instance self._input = input + self._event_group_markers = _capture_event_group_markers(input.event_groups) def _apply_command(self) -> None: # Convert arguments before creating command in case it raises error @@ -3380,6 +4002,8 @@ def _apply_command(self) -> None: v.workflow_run_timeout.FromTimedelta(self._input.run_timeout) if self._input.task_timeout: v.workflow_task_timeout.FromTimedelta(self._input.task_timeout) + if self._input.backoff_start_interval: + v.backoff_start_interval.FromTimedelta(self._input.backoff_start_interval) if self._input.headers: temporalio.common._apply_headers(self._input.headers, v.headers) if self._input.retry_policy: @@ -3389,10 +4013,16 @@ def _apply_command(self) -> None: v.memo[k].CopyFrom(val) if self._input.search_attributes: _encode_search_attributes( - self._input.search_attributes, v.search_attributes + self._input.search_attributes, v.search_attributes.indexed_fields ) if self._input.versioning_intent: v.versioning_intent = self._input.versioning_intent._to_proto() + if self._input.initial_versioning_behavior: + v.initial_versioning_behavior = cast( + "temporalio.api.enums.v1.ContinueAsNewVersioningBehavior.ValueType", + int(self._input.initial_versioning_behavior), + ) + command.event_group_markers.extend(self._event_group_markers) def _encode_search_attributes( @@ -3635,3 +4265,7 @@ class _WorkflowLogicFlag(IntEnum): """Flags that may be set on task/activation completion to differentiate new from old workflow behavior.""" RAISE_ON_CANCELLING_COMPLETED_ACTIVITY = 1 + PROCESS_WORKFLOW_ACTIVATION_JOBS_AS_SINGLE_BATCH = 2 + + +_DEFAULT_ENABLED_WORKFLOW_LOGIC_FLAGS: frozenset[_WorkflowLogicFlag] = frozenset() diff --git a/temporalio/worker/workflow_sandbox/_importer.py b/temporalio/worker/workflow_sandbox/_importer.py index 8dde47254e..ab0d69db91 100644 --- a/temporalio/worker/workflow_sandbox/_importer.py +++ b/temporalio/worker/workflow_sandbox/_importer.py @@ -19,12 +19,7 @@ from contextlib import ExitStack, contextmanager from typing import ( Any, - Dict, Generic, - List, - Optional, - Set, - Tuple, TypeVar, no_type_check, ) @@ -58,11 +53,15 @@ class Importer: """Importer that restricts modules.""" def __init__( - self, restrictions: SandboxRestrictions, restriction_context: RestrictionContext + self, + restrictions: SandboxRestrictions, + restriction_context: RestrictionContext, + workflow_module_name: str | None = None, ) -> None: """Create importer.""" self.restrictions = restrictions self.restriction_context = restriction_context + self._workflow_module_name = workflow_module_name self.new_modules: dict[str, types.ModuleType] = { "sys": sys, "builtins": builtins, @@ -79,7 +78,7 @@ def __init__( ) if builtin_matcher: - def restrict_built_in(name: str, orig: Any, *args, **kwargs): + def restrict_built_in(name: str, orig: Any, *args: Any, **kwargs: Any): # Check if restricted against matcher if ( builtin_matcher @@ -88,7 +87,15 @@ def restrict_built_in(name: str, orig: Any, *args, **kwargs): ) and not temporalio.workflow.unsafe.is_sandbox_unrestricted() ): - raise RestrictedWorkflowAccessError(f"__builtins__.{name}") + # If a per-builtin child matcher carries a custom + # leaf_message (e.g. directing the user to debug_mode for + # breakpoint()), surface that instead of the generic + # pass-through-modules advice. + child = builtin_matcher.children.get(name) + override_message = child.leaf_message if child else None + raise RestrictedWorkflowAccessError( + f"__builtins__.{name}", override_message=override_message + ) return orig(*args, **kwargs) for k in dir(builtins): @@ -147,7 +154,9 @@ def applied(self) -> Iterator[None]: try: with _thread_local_sys_modules.applied(sys, "modules", self.new_modules): with _thread_local_import.applied( - builtins, "__import__", self.import_func + builtins, + "__import__", + self.import_func, # type: ignore[reportArgumentType] ): with self._builtins_restricted(): yield None @@ -172,7 +181,7 @@ def _traced_import( name: str, globals: Mapping[str, object] | None = None, locals: Mapping[str, object] | None = None, - fromlist: Sequence[str] = (), + fromlist: Sequence[str] | None = (), level: int = 0, ) -> types.ModuleType: _trace("Importing %s (fromlist: %s, level: %s)", name, fromlist, level) @@ -188,9 +197,10 @@ def _import( name: str, globals: Mapping[str, object] | None = None, locals: Mapping[str, object] | None = None, - fromlist: Sequence[str] = (), + fromlist: Sequence[str] | None = (), level: int = 0, ) -> types.ModuleType: + fromlist = fromlist or () # We have to resolve the full name, it can be relative at different # levels full_name = _resolve_module_name(name, globals, level) @@ -253,7 +263,12 @@ def _import( sys.modules[full_name] = new_mod new_spec.loader.exec_module(new_mod) - mod = importlib.__import__(name, globals, locals, fromlist, level) + mod = _loaded_module_for_import(full_name, fromlist, level) + if mod is None: + package = sys.modules.get(full_name) if fromlist else None + if package is not None and hasattr(package, "__path__"): + self._pass_through_fromlist_submodules(package, fromlist) + mod = importlib.__import__(name, globals, locals, fromlist, level) # Check for restrictions if necessary and apply if mod.__name__ not in self.modules_checked_for_restrictions: self.modules_checked_for_restrictions.add(mod.__name__) @@ -264,6 +279,31 @@ def _import( return mod + def _pass_through_fromlist_submodules( + self, + package: types.ModuleType, + fromlist: Sequence[str], + recursive: bool = False, + ) -> None: + # importlib imports a package's fromlist submodules with its own import + # function, so they never reach the passthrough handling in _import. + for item in fromlist: + if item == "*": + if not recursive and hasattr(package, "__all__"): + self._pass_through_fromlist_submodules( + package, package.__all__, recursive=True + ) + elif not hasattr(package, item): + submodule = f"{package.__name__}.{item}" + if self._is_passed_through(submodule): + try: + self.import_func(submodule) + except ModuleNotFoundError as err: + # Like importlib, leave an item that is not a module + # for the from import to reject + if err.name != submodule: + raise + def _assert_valid_module(self, name: str) -> None: if ( self.restrictions.invalid_modules.match_access( @@ -301,13 +341,19 @@ def _is_import_notification_policy_applied( return policy in self.restrictions.import_notification_policy + def _is_passed_through(self, name: str) -> bool: + return ( + temporalio.workflow.unsafe.is_imports_passed_through() + or self.module_configured_passthrough(name) + ) + def _maybe_passthrough_module(self, name: str) -> types.ModuleType | None: # If imports not passed through and all modules are not passed through # and name not in passthrough modules, check parents - if ( - not temporalio.workflow.unsafe.is_imports_passed_through() - and not self.module_configured_passthrough(name) - ): + if not self._is_passed_through(name): + # Workflow modules are intentionally reloaded to isolate their state. + if name == self._workflow_module_name: + return None if self._is_import_notification_policy_applied( temporalio.workflow.SandboxImportNotificationPolicy.RAISE_ON_UNINTENTIONAL_PASSTHROUGH ): @@ -480,15 +526,11 @@ def __setitem__(self, key: str, value: types.ModuleType) -> None: def __or__( self, other: Mapping[str, types.ModuleType] ) -> dict[str, types.ModuleType]: - if sys.version_info < (3, 9): - raise NotImplementedError return self.current.__or__(other) # type: ignore[operator] def __ior__( self, other: Mapping[str, types.ModuleType] ) -> dict[str, types.ModuleType]: - if sys.version_info < (3, 9): - raise NotImplementedError return self.current.__ior__(other) __ror__ = __or__ @@ -497,7 +539,7 @@ def copy(self) -> dict[str, types.ModuleType]: return self.current.copy() @classmethod - def fromkeys(cls, *args, **kwargs) -> Any: + def fromkeys(cls, *args: Any, **kwargs: Any) -> Any: return dict.fromkeys(*args, **kwargs) def _lazily_passthrough_if_available(self, key: str) -> types.ModuleType | None: @@ -538,6 +580,27 @@ def _get_thread_local_builtin(name: str) -> _ThreadLocalCallable: return ret +def _loaded_module_for_import( + full_name: str, fromlist: Sequence[str], level: int +) -> types.ModuleType | None: + # The failing GC warning path uses an ordinary absolute import. Leave the + # more involved forms, which may load children or run module hooks, to importlib. + if fromlist or level: + return None + mod = _fully_imported(full_name) + if mod is None: + return None + top = full_name.partition(".")[0] + return mod if top == full_name else _fully_imported(top) + + +def _fully_imported(name: str) -> types.ModuleType | None: + mod = sys.modules.get(name) + if mod is None or getattr(getattr(mod, "__spec__", None), "_initializing", False): + return None + return mod + + def _resolve_module_name( name: str, globals: Mapping[str, object] | None, level: int ) -> str: @@ -565,7 +628,7 @@ def _calc___package__(globals: Mapping[str, object]) -> str: if package is not None: if spec is not None and package != spec.parent: warnings.warn( - "__package__ != __spec__.parent " f"({package!r} != {spec.parent!r})", + f"__package__ != __spec__.parent ({package!r} != {spec.parent!r})", DeprecationWarning, stacklevel=3, ) diff --git a/temporalio/worker/workflow_sandbox/_in_sandbox.py b/temporalio/worker/workflow_sandbox/_in_sandbox.py index 3756749ca2..d183748990 100644 --- a/temporalio/worker/workflow_sandbox/_in_sandbox.py +++ b/temporalio/worker/workflow_sandbox/_in_sandbox.py @@ -6,13 +6,14 @@ import dataclasses import logging -from typing import Any, Optional, Type +from typing import Any import temporalio.bridge.proto.workflow_activation import temporalio.bridge.proto.workflow_completion import temporalio.converter import temporalio.worker._workflow_instance import temporalio.workflow +from temporalio.converter._extstore import StorageDriverStoreContext from temporalio.worker import _command_aware_visitor logger = logging.getLogger(__name__) @@ -88,3 +89,10 @@ def get_serialization_context( ) -> temporalio.converter.SerializationContext | None: """Get serialization context.""" return self.instance.get_serialization_context(command_info) + + def get_external_store_context( + self, + command_info: _command_aware_visitor.CommandInfo | None, + ) -> StorageDriverStoreContext: + """Get store context for external storage.""" + return self.instance.get_external_store_context(command_info) diff --git a/temporalio/worker/workflow_sandbox/_restrictions.py b/temporalio/worker/workflow_sandbox/_restrictions.py index 34f517de1b..606a17d8cb 100644 --- a/temporalio/worker/workflow_sandbox/_restrictions.py +++ b/temporalio/worker/workflow_sandbox/_restrictions.py @@ -23,11 +23,6 @@ from typing import ( Any, ClassVar, - Dict, - Optional, - Set, - Tuple, - Type, TypeVar, cast, ) @@ -38,7 +33,7 @@ HAVE_PYDANTIC = True except ImportError: - HAVE_PYDANTIC = False + HAVE_PYDANTIC = False # type: ignore[reportConstantRedefinition] import temporalio.exceptions import temporalio.workflow @@ -518,10 +513,10 @@ def with_child_unrestricted(self, *child_path: str) -> SandboxMatcher: # Due to how Pydantic is importing lazily inside of some classes, we choose # to always pass it through "pydantic", - # OpenAI and OpenAI agent modules in workflows we always want to pass - # through and reference the out-of-sandbox forms - "openai", - "agents", + # Same for its compiled core, which Pydantic-based libraries import lazily + "pydantic_core", + # Pydantic caches constraint classes by identity across sandboxes. + "annotated_types", } ) @@ -560,17 +555,36 @@ def _public_callables(parent: Any, *, exclude: set[str] = set()) -> set[str]: SandboxRestrictions.invalid_module_members_default = SandboxMatcher( children={ "__builtins__": SandboxMatcher( - use={ - "breakpoint", - "input", - "open", + children={ + "breakpoint": SandboxMatcher( + match_self=True, + only_runtime=True, + leaf_message=( + "breakpoint() inside workflow code requires " + "debug_mode=True on the Worker (or the " + "TEMPORAL_DEBUG environment variable). Without it, " + "the call cannot reach the debugger." + ), + ), }, + use={"input", "open"}, # Too many things use open() at import time, e.g. pytest's assertion # rewriter only_runtime=True, ), "asyncio": SandboxMatcher( children={ + "TaskGroup": SandboxMatcher( + children={ + "__call__": SandboxMatcher( + match_self=True, + leaf_warning=UserWarning, + leaf_message=( + "asyncio.TaskGroup() has non-deterministic task cancellation order" + ), + ) + }, + ), "as_completed": SandboxMatcher( children={ "__call__": SandboxMatcher( @@ -640,16 +654,17 @@ def _public_callables(parent: Any, *, exclude: set[str] = set()) -> set[str]: "os": SandboxMatcher( # As of https://github.com/python/cpython/pull/132662 in python 3.14 we have to allow os.path calls # which may occur during exception tracing. See https://github.com/python/cpython/issues/140228. + # The linecache change behind it was backported to python 3.13.12. children={ "path": SandboxMatcher.none - if sys.version_info >= (3, 14) + if sys.version_info >= (3, 13, 12) else SandboxMatcher.all }, access={"name"}, use={"*"}, # As of https://github.com/python/cpython/pull/112097, os.stat # calls are now made when displaying errors - exclude={"stat", "path"} if sys.version_info >= (3, 14) else {"stat"}, + exclude={"stat", "path"} if sys.version_info >= (3, 13, 12) else {"stat"}, # Only restricted at runtime only_runtime=True, ), @@ -721,7 +736,9 @@ def _public_callables(parent: Any, *, exclude: set[str] = set()) -> set[str]: "token_urlsafe", } ), - "select": SandboxMatcher.all_uses_runtime, + # Python 3.15 probes kqueue while importing subprocess on macOS. + # kevent is an inert value that kqueue.control must receive unproxied. + "select": SandboxMatcher(use={"*"}, exclude={"kevent"}, only_runtime=True), "selectors": SandboxMatcher.all_uses_runtime, "shelve": SandboxMatcher.all_uses, "shutil": SandboxMatcher.all_uses, @@ -739,6 +756,10 @@ def _public_callables(parent: Any, *, exclude: set[str] = set()) -> set[str]: use={ "pthread_getcpuclockid", "get_clock_info", + # Not available on every platform (e.g. Windows); matching a + # nonexistent attribute is harmless + "clock_gettime", + "clock_gettime_ns", "localtime", "monotonic", "monotonic_ns", @@ -770,7 +791,9 @@ def _public_callables(parent: Any, *, exclude: set[str] = set()) -> set[str]: "urllib": SandboxMatcher( children={"request": SandboxMatcher.all_uses}, ), - "uuid": SandboxMatcher(use={"uuid1", "uuid4"}, only_runtime=True), + # uuid7 only exists in the stdlib on Python 3.14+; matching a + # nonexistent attribute is harmless on older versions + "uuid": SandboxMatcher(use={"uuid1", "uuid4", "uuid7"}, only_runtime=True), "webbrowser": SandboxMatcher.all_uses, "xmlrpc": SandboxMatcher.all_uses, "zipfile": SandboxMatcher( @@ -861,6 +884,8 @@ def set_on_proxy(self, v: _RestrictedProxy) -> None: class _RestrictedProxyLookup: + bind_func: Callable[[_RestrictedProxy, Any], Callable[..., Any]] | None + def __init__( self, access_func: Callable | None = None, @@ -873,7 +898,7 @@ def __init__( if hasattr(access_func, "__get__"): # A Python function, can be turned into a bound method. - def _bind_func(instance: _RestrictedProxy, obj: Any) -> Callable: + def _bind_func(_instance: _RestrictedProxy, obj: Any) -> Callable: return access_func.__get__(obj, type(obj)) # type: ignore bind_func = _bind_func @@ -881,7 +906,7 @@ def _bind_func(instance: _RestrictedProxy, obj: Any) -> Callable: elif access_func is not None: # A C function, use partial to bind the first argument. - def _bind_func(instance: _RestrictedProxy, obj: Any) -> Callable: + def _bind_func(_instance: _RestrictedProxy, obj: Any) -> Callable: return functools.partial(access_func, obj) # type: ignore bind_func = _bind_func @@ -896,12 +921,12 @@ def _bind_func(instance: _RestrictedProxy, obj: Any) -> Callable: self.is_attr = is_attr def __set_name__(self, owner: _RestrictedProxy, name: str) -> None: - self.name = name + self.name = name # type: ignore[reportUninitializedInstanceVariable] def __get__(self, instance: _RestrictedProxy, owner: type | None = None) -> Any: - if instance is None: - if self.class_value is not None: - return self.class_value + if instance is None: # type: ignore[reportUninitializedInstanceVariable] + if self.class_value is not None: # type: ignore[reportUnreachable] + return self.class_value # type: ignore[reportUnreachable] return self @@ -951,13 +976,20 @@ def __init__( super().__init__(access_func, fallback_func=fallback_func) def bind_f(instance: _RestrictedProxy, obj: Any) -> Callable: - def i_op(self: Any, other: Any) -> _RestrictedProxy: - f(self, other) # type: ignore - return instance + def i_op(self: Any, other: Any) -> Any: + result = access_func(self, other) # type: ignore + if result is self: + return instance + if _is_restrictable(result): + state = _RestrictionState.from_proxy(instance) + return _RestrictedProxy( + state.name, result, state.context, state.matcher + ) + return result return i_op.__get__(obj, type(obj)) # type: ignore - self.bind_f = bind_f + self.bind_func = bind_f _OpF = TypeVar("_OpF", bound=Callable[..., Any]) @@ -989,7 +1021,7 @@ def _is_restrictable(v: Any) -> bool: class _RestrictedProxy: - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: # When we instantiate this class, we have the signature of: # __init__( # self, @@ -1037,7 +1069,7 @@ def __setattr__(self, __name: str, __value: Any) -> None: state.assert_child_not_restricted(__name) setattr(state.obj, __name, __value) - def __call__(self, *args, **kwargs) -> _RestrictedProxy: + def __call__(self, *args: Any, **kwargs: Any) -> _RestrictedProxy: state = _RestrictionState.from_proxy(self) _trace("__call__ on %s", state.name) state.assert_child_not_restricted("__call__") diff --git a/temporalio/worker/workflow_sandbox/_runner.py b/temporalio/worker/workflow_sandbox/_runner.py index 35023f141e..74cdaf8f32 100644 --- a/temporalio/worker/workflow_sandbox/_runner.py +++ b/temporalio/worker/workflow_sandbox/_runner.py @@ -10,13 +10,14 @@ from collections.abc import Sequence from dataclasses import dataclass, field from datetime import datetime, timedelta, timezone -from typing import Any, Optional, Type +from typing import Any import temporalio.bridge.proto.workflow_activation import temporalio.bridge.proto.workflow_completion import temporalio.common import temporalio.converter import temporalio.workflow +from temporalio.converter._extstore import StorageDriverStoreContext from temporalio.worker import _command_aware_visitor from ...api.common.v1.message_pb2 import Payloads @@ -40,6 +41,7 @@ first_execution_run_id="sandbox-validate-first-run_id", headers={}, namespace="sandbox-validate-namespace", + original_execution_run_id="sandbox-validate-original-execution-run_id", parent=None, root=None, raw_memo={}, @@ -78,7 +80,7 @@ def prepare_workflow(self, defn: temporalio.workflow._Definition) -> None: # Just create with fake info which validates self.create_instance( WorkflowInstanceDetails( - payload_converter_class=temporalio.converter.DataConverter.default.payload_converter_class, + payload_converter_factory=temporalio.converter.DataConverter.default._new_payload_converter, failure_converter_class=temporalio.converter.DataConverter.default.failure_converter_class, interceptor_classes=[], defn=defn, @@ -88,6 +90,7 @@ def prepare_workflow(self, defn: temporalio.workflow._Definition) -> None: extern_functions={}, disable_eager_activity_execution=False, worker_level_failure_exception_types=self._worker_level_failure_exception_types, + patch_activation_callback=None, last_completion_result=Payloads(), last_failure=Failure(), ), @@ -115,7 +118,11 @@ def __init__( ) -> None: self.instance_details = instance_details self.runner_class = runner_class - self.importer = Importer(restrictions, RestrictionContext()) + self.importer = Importer( + restrictions, + RestrictionContext(), + workflow_module_name=self._workflow_module_name(), + ) self._current_thread_id: int | None = None @@ -125,13 +132,17 @@ def __init__( } self._create_instance() - def _create_instance(self) -> None: + def _workflow_module_name(self) -> str: module_name = self.instance_details.defn.cls.__module__ # If the module name is __main__ then we change to __temporal_main__ so # we don't trigger top-level execution that happens in __main__. We do # not support importing __main__. if module_name == "__main__": module_name = "__temporal_main__" + return module_name + + def _create_instance(self) -> None: + module_name = self._workflow_module_name() try: # Import user code self._run_code( @@ -186,6 +197,9 @@ def _run_code(self, code: str, **extra_globals: Any) -> None: for k, v in extra_globals.items(): self.globals_and_locals.pop(k, None) + def get_info(self) -> temporalio.workflow.Info: + return self.instance_details.info + def get_thread_id(self) -> int | None: return self._current_thread_id @@ -205,3 +219,25 @@ def get_serialization_context( return self.globals_and_locals.pop("__temporal_context", None) # type: ignore finally: self.importer.restriction_context.is_runtime = False + + def get_external_store_context( + self, + command_info: _command_aware_visitor.CommandInfo | None, + ) -> StorageDriverStoreContext: + # Forward call to the sandboxed instance + self.importer.restriction_context.is_runtime = True + try: + self._run_code( + "with __temporal_importer.applied():\n" + " __temporal_context = __temporal_in_sandbox.get_external_store_context(__temporal_command_info)\n", + __temporal_importer=self.importer, + __temporal_command_info=command_info, + ) + return self.globals_and_locals.pop( + "__temporal_context", + StorageDriverStoreContext( + namespace=self.instance_details.info.namespace + ), + ) # type: ignore + finally: + self.importer.restriction_context.is_runtime = False diff --git a/temporalio/workflow.py b/temporalio/workflow.py deleted file mode 100644 index 72e42e2fb0..0000000000 --- a/temporalio/workflow.py +++ /dev/null @@ -1,5689 +0,0 @@ -"""Utilities that can decorate or be called inside workflows.""" - -from __future__ import annotations - -import asyncio -import contextvars -import inspect -import logging -import threading -import typing -import uuid -import warnings -from abc import ABC, abstractmethod -from collections.abc import ( - Awaitable, - Callable, - Generator, - Iterable, - Iterator, - Mapping, - MutableMapping, - Sequence, -) -from contextlib import contextmanager -from dataclasses import dataclass -from datetime import datetime, timedelta, timezone -from enum import Enum, Flag, IntEnum, auto -from functools import partial -from random import Random -from typing import ( - TYPE_CHECKING, - Any, - Concatenate, - Dict, - Generic, - List, - Literal, - NoReturn, - Optional, - Tuple, - Type, - TypeVar, - Union, - cast, - overload, -) - -import nexusrpc -import nexusrpc.handler -from nexusrpc import InputT, OutputT -from typing_extensions import ( - Protocol, - TypedDict, - runtime_checkable, -) - -import temporalio.api.common.v1 -import temporalio.bridge.proto.child_workflow -import temporalio.bridge.proto.common -import temporalio.bridge.proto.nexus -import temporalio.bridge.proto.workflow_activation -import temporalio.bridge.proto.workflow_commands -import temporalio.common -import temporalio.converter -import temporalio.exceptions -import temporalio.nexus -import temporalio.workflow -from temporalio.nexus._util import ServiceHandlerT - -from .types import ( - AnyType, - CallableAsyncNoParam, - CallableAsyncSingleParam, - CallableAsyncType, - CallableSyncNoParam, - CallableSyncOrAsyncReturnNoneType, - CallableSyncOrAsyncType, - CallableSyncSingleParam, - CallableType, - ClassType, - MethodAsyncNoParam, - MethodAsyncSingleParam, - MethodSyncNoParam, - MethodSyncOrAsyncNoParam, - MethodSyncOrAsyncSingleParam, - MethodSyncSingleParam, - MultiParamSpec, - ParamType, - ProtocolReturnType, - ReturnType, - SelfType, -) - - -@overload -def defn(cls: ClassType) -> ClassType: ... - - -@overload -def defn( - *, - name: str | None = None, - sandboxed: bool = True, - failure_exception_types: Sequence[type[BaseException]] = [], - versioning_behavior: temporalio.common.VersioningBehavior = temporalio.common.VersioningBehavior.UNSPECIFIED, -) -> Callable[[ClassType], ClassType]: ... - - -@overload -def defn( - *, - sandboxed: bool = True, - dynamic: bool = False, - versioning_behavior: temporalio.common.VersioningBehavior = temporalio.common.VersioningBehavior.UNSPECIFIED, -) -> Callable[[ClassType], ClassType]: ... - - -def defn( - cls: ClassType | None = None, - *, - name: str | None = None, - sandboxed: bool = True, - dynamic: bool = False, - failure_exception_types: Sequence[type[BaseException]] = [], - versioning_behavior: temporalio.common.VersioningBehavior = temporalio.common.VersioningBehavior.UNSPECIFIED, -) -> Callable[[ClassType], ClassType]: - """Decorator for workflow classes. - - This must be set on any registered workflow class (it is ignored if on a - base class). - - Args: - cls: The class to decorate. - name: Name to use for the workflow. Defaults to class ``__name__``. This - cannot be set if dynamic is set. - sandboxed: Whether the workflow should run in a sandbox. Default is - true. - dynamic: If true, this activity will be dynamic. Dynamic workflows have - to accept a single 'Sequence[RawValue]' parameter. This cannot be - set to true if name is present. - failure_exception_types: The types of exceptions that, if a - workflow-thrown exception extends, will cause the workflow/update to - fail instead of suspending the workflow via task failure. These are - applied in addition to ones set on the worker constructor. If - ``Exception`` is set, it effectively will fail a workflow/update in - all user exception cases. WARNING: This setting is experimental. - versioning_behavior: Specifies the versioning behavior to use for this workflow. - WARNING: This setting is experimental. - """ - - def decorator(cls: ClassType) -> ClassType: - # This performs validation - _Definition._apply_to_class( - cls, - workflow_name=name or cls.__name__ if not dynamic else None, - sandboxed=sandboxed, - failure_exception_types=failure_exception_types, - versioning_behavior=versioning_behavior, - ) - return cls - - if cls is not None: - return decorator(cls) - return decorator - - -def init( - init_fn: CallableType, -) -> CallableType: - """Decorator for the workflow init method. - - This may be used on the __init__ method of the workflow class to specify - that it accepts the same workflow input arguments as the ``@workflow.run`` - method. If used, the parameters of your __init__ and ``@workflow.run`` - methods must be identical. - - Args: - init_fn: The __init__ method to decorate. - """ - if init_fn.__name__ != "__init__": - raise ValueError("@workflow.init may only be used on the __init__ method") - - setattr(init_fn, "__temporal_workflow_init", True) - return init_fn - - -def run(fn: CallableAsyncType) -> CallableAsyncType: - """Decorator for the workflow run method. - - This must be used on one and only one async method defined on the same class - as ``@workflow.defn``. This can be defined on a base class method but must - then be explicitly overridden and defined on the workflow class. - - Run methods can only have positional parameters. Best practice is to only - take a single object/dataclass argument that can accept more fields later if - needed. - - Args: - fn: The function to decorate. - """ - if not inspect.iscoroutinefunction(fn): - raise ValueError("Workflow run method must be an async function") - # Disallow local classes because we need to have the class globally - # referenceable by name - if "" in fn.__qualname__: - raise ValueError( - "Local classes unsupported, @workflow.run cannot be on a local class" - ) - setattr(fn, "__temporal_workflow_run", True) - # TODO(cretz): Why is MyPy unhappy with this return? - return fn # type: ignore[return-value] - - -class HandlerUnfinishedPolicy(Enum): - """Actions taken if a workflow terminates with running handlers. - - Policy defining actions taken when a workflow exits while update or signal handlers are running. - The workflow exit may be due to successful return, failure, cancellation, or continue-as-new. - """ - - WARN_AND_ABANDON = 1 - """Issue a warning in addition to abandoning.""" - ABANDON = 2 - """Abandon the handler. - - In the case of an update handler this means that the client will receive an error rather than - the update result.""" - - -class UnfinishedUpdateHandlersWarning(RuntimeWarning): - """The workflow exited before all update handlers had finished executing.""" - - -class UnfinishedSignalHandlersWarning(RuntimeWarning): - """The workflow exited before all signal handlers had finished executing.""" - - -@overload -def signal( - fn: CallableSyncOrAsyncReturnNoneType, -) -> CallableSyncOrAsyncReturnNoneType: ... - - -@overload -def signal( - *, - unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, - description: str | None = None, -) -> Callable[ - [CallableSyncOrAsyncReturnNoneType], CallableSyncOrAsyncReturnNoneType -]: ... - - -@overload -def signal( - *, - name: str, - unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, - description: str | None = None, -) -> Callable[ - [CallableSyncOrAsyncReturnNoneType], CallableSyncOrAsyncReturnNoneType -]: ... - - -@overload -def signal( - *, - dynamic: Literal[True], - unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, - description: str | None = None, -) -> Callable[ - [CallableSyncOrAsyncReturnNoneType], CallableSyncOrAsyncReturnNoneType -]: ... - - -def signal( - fn: CallableSyncOrAsyncReturnNoneType | None = None, - *, - name: str | None = None, - dynamic: bool | None = False, - unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, - description: str | None = None, -) -> ( - Callable[[CallableSyncOrAsyncReturnNoneType], CallableSyncOrAsyncReturnNoneType] - | CallableSyncOrAsyncReturnNoneType -): - """Decorator for a workflow signal method. - - This is used on any async or non-async method that you wish to be called upon - receiving a signal. If a function overrides one with this decorator, it too - must be decorated. - - Signal methods can only have positional parameters. Best practice for - non-dynamic signal methods is to only take a single object/dataclass - argument that can accept more fields later if needed. Return values from - signal methods are ignored. - - Args: - fn: The function to decorate. - name: Signal name. Defaults to method ``__name__``. Cannot be present - when ``dynamic`` is present. - dynamic: If true, this handles all signals not otherwise handled. The - parameters of the method must be self, a string name, and a - ``*args`` positional varargs. Cannot be present when ``name`` is - present. - unfinished_policy: Actions taken if a workflow terminates with - a running instance of this handler. - description: A short description of the signal that may appear in the UI/CLI. - """ - - def decorator( - name: str | None, - unfinished_policy: HandlerUnfinishedPolicy, - fn: CallableSyncOrAsyncReturnNoneType, - ) -> CallableSyncOrAsyncReturnNoneType: - if not name and not dynamic: - name = fn.__name__ - defn = _SignalDefinition( - name=name, - fn=fn, - is_method=True, - unfinished_policy=unfinished_policy, - description=description, - ) - setattr(fn, "__temporal_signal_definition", defn) - if defn.dynamic_vararg: - warnings.warn( - "Dynamic signals with vararg third param is deprecated, use Sequence[RawValue]", - DeprecationWarning, - stacklevel=2, - ) - return fn - - if not fn: - if name is not None and dynamic: - raise RuntimeError("Cannot provide name and dynamic boolean") - return partial(decorator, name, unfinished_policy) - else: - return decorator(fn.__name__, unfinished_policy, fn) - - -@overload -def query(fn: CallableType) -> CallableType: ... - - -@overload -def query( - *, name: str, description: str | None = None -) -> Callable[[CallableType], CallableType]: ... - - -@overload -def query( - *, dynamic: Literal[True], description: str | None = None -) -> Callable[[CallableType], CallableType]: ... - - -@overload -def query(*, description: str) -> Callable[[CallableType], CallableType]: ... - - -def query( - fn: CallableType | None = None, # type: ignore[reportInvalidTypeVarUse] - *, - name: str | None = None, - dynamic: bool | None = False, - description: str | None = None, -): - """Decorator for a workflow query method. - - This is used on any non-async method that expects to handle a query. If a - function overrides one with this decorator, it too must be decorated. - - Query methods can only have positional parameters. Best practice for - non-dynamic query methods is to only take a single object/dataclass - argument that can accept more fields later if needed. The return value is - the resulting query value. Query methods must not mutate any workflow state. - - Args: - fn: The function to decorate. - name: Query name. Defaults to method ``__name__``. Cannot be present - when ``dynamic`` is present. - dynamic: If true, this handles all queries not otherwise handled. The - parameters of the method should be self, a string name, and a - ``Sequence[RawValue]``. An older form of this accepted vararg - parameters which will now warn. Cannot be present when ``name`` is - present. - description: A short description of the query that may appear in the UI/CLI. - """ - - def decorator( - name: str | None, - description: str | None, - fn: CallableType, - *, - bypass_async_check: bool = False, - ) -> CallableType: - if not name and not dynamic: - name = fn.__name__ - if not bypass_async_check and inspect.iscoroutinefunction(fn): - warnings.warn( - "Queries as async def functions are deprecated", - DeprecationWarning, - stacklevel=2, - ) - defn = _QueryDefinition( - name=name, fn=fn, is_method=True, description=description - ) - setattr(fn, "__temporal_query_definition", defn) - if defn.dynamic_vararg: - warnings.warn( - "Dynamic queries with vararg third param is deprecated, use Sequence[RawValue]", - DeprecationWarning, - stacklevel=2, - ) - return fn - - if name is not None or dynamic or description: - if name is not None and dynamic: - raise RuntimeError("Cannot provide name and dynamic boolean") - return partial(decorator, name, description) - if fn is None: - raise RuntimeError("Cannot create query without function or name or dynamic") - if inspect.iscoroutinefunction(fn): - warnings.warn( - "Queries as async def functions are deprecated", - DeprecationWarning, - stacklevel=2, - ) - return decorator(fn.__name__, description, fn, bypass_async_check=True) - - -@dataclass(frozen=True) -class DynamicWorkflowConfig: - """Returned by functions using the :py:func:`dynamic_config` decorator, see it for more.""" - - failure_exception_types: Sequence[type[BaseException]] | None = None - """The types of exceptions that, if a workflow-thrown exception extends, will cause the - workflow/update to fail instead of suspending the workflow via task failure. These are applied - in addition to ones set on the worker constructor. If ``Exception`` is set, it effectively will - fail a workflow/update in all user exception cases. - - Always overrides the equivalent parameter on :py:func:`defn` if set not-None. - - WARNING: This setting is experimental. - """ - versioning_behavior: temporalio.common.VersioningBehavior = ( - temporalio.common.VersioningBehavior.UNSPECIFIED - ) - """Specifies the versioning behavior to use for this workflow. - - Always overrides the equivalent parameter on :py:func:`defn`. - - WARNING: This setting is experimental. - """ - - -def dynamic_config( - fn: MethodSyncNoParam[SelfType, DynamicWorkflowConfig], -) -> MethodSyncNoParam[SelfType, DynamicWorkflowConfig]: - """Decorator to allow configuring a dynamic workflow's behavior. - - Because dynamic workflows may conceptually represent more than one workflow type, it may be - desirable to have different settings for fields that would normally be passed to - :py:func:`defn`, but vary based on the workflow type name or other information available in - the workflow's context. This function will be called after the workflow's :py:func:`init`, - if it has one, but before the workflow's :py:func:`run` method. - - The method must only take self as a parameter, and any values set in the class it returns will - override those provided to :py:func:`defn`. - - Cannot be specified on non-dynamic workflows. - - Args: - fn: The function to decorate. - """ - if inspect.iscoroutinefunction(fn): - raise ValueError("Workflow dynamic_config method must be synchronous") - params = list(inspect.signature(fn).parameters.values()) - if len(params) != 1: - raise ValueError("Workflow dynamic_config method must only take self parameter") - - # Add marker attribute - setattr(fn, "__temporal_workflow_dynamic_config", True) - return fn - - -@dataclass(frozen=True) -class Info: - """Information about the running workflow. - - Retrieved inside a workflow via :py:func:`info`. This object is immutable - with the exception of the :py:attr:`search_attributes` and - :py:attr:`typed_search_attributes` which is updated on - :py:func:`upsert_search_attributes`. - - Note, required fields may be added here in future versions. This class - should never be constructed by users. - """ - - attempt: int - continued_run_id: str | None - cron_schedule: str | None - execution_timeout: timedelta | None - first_execution_run_id: str - headers: Mapping[str, temporalio.api.common.v1.Payload] - namespace: str - parent: ParentInfo | None - root: RootInfo | None - priority: temporalio.common.Priority - """The priority of this workflow execution. If not set, or this server predates priorities, - then returns a default instance.""" - raw_memo: Mapping[str, temporalio.api.common.v1.Payload] - retry_policy: temporalio.common.RetryPolicy | None - run_id: str - run_timeout: timedelta | None - - search_attributes: temporalio.common.SearchAttributes - """Search attributes for the workflow. - - .. deprecated:: - Use :py:attr:`typed_search_attributes` instead. - """ - - start_time: datetime - """The start time of the first task executed by the workflow.""" - - task_queue: str - task_timeout: timedelta - - typed_search_attributes: temporalio.common.TypedSearchAttributes - """Search attributes for the workflow. - - Note, this may have invalid values or be missing values if passing the - deprecated form of dictionary attributes to - :py:meth:`upsert_search_attributes`. - """ - - workflow_id: str - - workflow_start_time: datetime - """The start time of the workflow based on the workflow initialization.""" - - workflow_type: str - - def _logger_details(self) -> Mapping[str, Any]: - return { - # TODO(cretz): worker ID? - "attempt": self.attempt, - "namespace": self.namespace, - "run_id": self.run_id, - "task_queue": self.task_queue, - "workflow_id": self.workflow_id, - "workflow_type": self.workflow_type, - } - - def get_current_build_id(self) -> str: - """Get the Build ID of the worker which executed the current Workflow Task. - - May be undefined if the task was completed by a worker without a Build ID. If this worker is - the one executing this task for the first time and has a Build ID set, then its ID will be - used. This value may change over the lifetime of the workflow run, but is deterministic and - safe to use for branching. - - .. deprecated:: - Use get_current_deployment_version instead. - """ - return _Runtime.current().workflow_get_current_build_id() - - def get_current_deployment_version( - self, - ) -> temporalio.common.WorkerDeploymentVersion | None: - """Get the deployment version of the worker which executed the current Workflow Task. - - May be None if the task was completed by a worker without a deployment version or build - id. If this worker is the one executing this task for the first time and has a deployment - version set, then its ID will be used. This value may change over the lifetime of the - workflow run, but is deterministic and safe to use for branching. - """ - return _Runtime.current().workflow_get_current_deployment_version() - - def get_current_history_length(self) -> int: - """Get the current number of events in history. - - Note, this value may not be up to date if accessed inside a query. - - Returns: - Current number of events in history (up until the current task). - """ - return _Runtime.current().workflow_get_current_history_length() - - def get_current_history_size(self) -> int: - """Get the current byte size of history. - - Note, this value may not be up to date if accessed inside a query. - - Returns: - Current byte-size of history (up until the current task). - """ - return _Runtime.current().workflow_get_current_history_size() - - def is_continue_as_new_suggested(self) -> bool: - """Get whether or not continue as new is suggested. - - Note, this value may not be up to date if accessed inside a query. - - Returns: - True if the server is configured to suggest continue as new and it - is suggested. - """ - return _Runtime.current().workflow_is_continue_as_new_suggested() - - -@dataclass(frozen=True) -class ParentInfo: - """Information about the parent workflow.""" - - namespace: str - run_id: str - workflow_id: str - - -@dataclass(frozen=True) -class RootInfo: - """Information about the root workflow.""" - - run_id: str - workflow_id: str - - -@dataclass(frozen=True) -class UpdateInfo: - """Information about a workflow update.""" - - id: str - """Update ID.""" - - name: str - """Update type name.""" - - @property - def _logger_details(self) -> Mapping[str, Any]: - """Data to be included in string appended to default logging output.""" - return { - "update_id": self.id, - "update_name": self.name, - } - - -class _Runtime(ABC): - @staticmethod - def current() -> _Runtime: - loop = _Runtime.maybe_current() - if not loop: - raise _NotInWorkflowEventLoopError("Not in workflow event loop") - return loop - - @staticmethod - def maybe_current() -> _Runtime | None: - try: - return getattr( - asyncio.get_running_loop(), "__temporal_workflow_runtime", None - ) - except RuntimeError: - return None - - @staticmethod - def set_on_loop(loop: asyncio.AbstractEventLoop, runtime: _Runtime | None) -> None: - if runtime: - setattr(loop, "__temporal_workflow_runtime", runtime) - elif hasattr(loop, "__temporal_workflow_runtime"): - delattr(loop, "__temporal_workflow_runtime") - - def __init__(self) -> None: - super().__init__() - self._logger_details: Mapping[str, Any] | None = None - - @property - def logger_details(self) -> Mapping[str, Any]: - if self._logger_details is None: - self._logger_details = self.workflow_info()._logger_details() - return self._logger_details - - @abstractmethod - def workflow_all_handlers_finished(self) -> bool: ... - - @abstractmethod - def workflow_continue_as_new( - self, - *args: Any, - workflow: None | Callable | str, - task_queue: str | None, - run_timeout: timedelta | None, - task_timeout: timedelta | None, - retry_policy: temporalio.common.RetryPolicy | None, - memo: Mapping[str, Any] | None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ), - versioning_intent: VersioningIntent | None, - ) -> NoReturn: ... - - @abstractmethod - def workflow_extern_functions(self) -> Mapping[str, Callable]: ... - - @abstractmethod - def workflow_get_current_build_id(self) -> str: ... - - @abstractmethod - def workflow_get_current_deployment_version( - self, - ) -> temporalio.common.WorkerDeploymentVersion | None: ... - - @abstractmethod - def workflow_get_current_history_length(self) -> int: ... - - @abstractmethod - def workflow_get_current_history_size(self) -> int: ... - - @abstractmethod - def workflow_get_external_workflow_handle( - self, id: str, *, run_id: str | None - ) -> ExternalWorkflowHandle[Any]: ... - - @abstractmethod - def workflow_get_query_handler(self, name: str | None) -> Callable | None: ... - - @abstractmethod - def workflow_get_signal_handler(self, name: str | None) -> Callable | None: ... - - @abstractmethod - def workflow_get_update_handler(self, name: str | None) -> Callable | None: ... - - @abstractmethod - def workflow_get_update_validator(self, name: str | None) -> Callable | None: ... - - @abstractmethod - def workflow_info(self) -> Info: ... - - @abstractmethod - def workflow_instance(self) -> Any: ... - - @abstractmethod - def workflow_is_continue_as_new_suggested(self) -> bool: ... - - @abstractmethod - def workflow_is_replaying(self) -> bool: ... - - @abstractmethod - def workflow_memo(self) -> Mapping[str, Any]: ... - - @abstractmethod - def workflow_memo_value( - self, key: str, default: Any, *, type_hint: type | None - ) -> Any: ... - - @abstractmethod - def workflow_upsert_memo(self, updates: Mapping[str, Any]) -> None: ... - - @abstractmethod - def workflow_metric_meter(self) -> temporalio.common.MetricMeter: ... - - @abstractmethod - def workflow_patch(self, id: str, *, deprecated: bool) -> bool: ... - - @abstractmethod - def workflow_payload_converter(self) -> temporalio.converter.PayloadConverter: ... - - @abstractmethod - def workflow_random(self) -> Random: ... - - @abstractmethod - def workflow_set_query_handler( - self, name: str | None, handler: Callable | None - ) -> None: ... - - @abstractmethod - def workflow_set_signal_handler( - self, name: str | None, handler: Callable | None - ) -> None: ... - - @abstractmethod - def workflow_set_update_handler( - self, - name: str | None, - handler: Callable | None, - validator: Callable | None, - ) -> None: ... - - @abstractmethod - def workflow_start_activity( - self, - activity: Any, - *args: Any, - task_queue: str | None, - result_type: type | None, - schedule_to_close_timeout: timedelta | None, - schedule_to_start_timeout: timedelta | None, - start_to_close_timeout: timedelta | None, - heartbeat_timeout: timedelta | None, - retry_policy: temporalio.common.RetryPolicy | None, - cancellation_type: ActivityCancellationType, - activity_id: str | None, - versioning_intent: VersioningIntent | None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - ) -> ActivityHandle[Any]: ... - - @abstractmethod - async def workflow_start_child_workflow( - self, - workflow: Any, - *args: Any, - id: str, - task_queue: str | None, - result_type: type | None, - cancellation_type: ChildWorkflowCancellationType, - parent_close_policy: ParentClosePolicy, - execution_timeout: timedelta | None, - run_timeout: timedelta | None, - task_timeout: timedelta | None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy, - retry_policy: temporalio.common.RetryPolicy | None, - cron_schedule: str, - memo: Mapping[str, Any] | None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ), - versioning_intent: VersioningIntent | None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, - ) -> ChildWorkflowHandle[Any, Any]: ... - - @abstractmethod - def workflow_start_local_activity( - self, - activity: Any, - *args: Any, - result_type: type | None, - schedule_to_close_timeout: timedelta | None, - schedule_to_start_timeout: timedelta | None, - start_to_close_timeout: timedelta | None, - retry_policy: temporalio.common.RetryPolicy | None, - local_retry_threshold: timedelta | None, - cancellation_type: ActivityCancellationType, - activity_id: str | None, - summary: str | None, - ) -> ActivityHandle[Any]: ... - - @abstractmethod - async def workflow_start_nexus_operation( - self, - endpoint: str, - service: str, - operation: nexusrpc.Operation[InputT, OutputT] | str | Callable[..., Any], - input: Any, - output_type: type[OutputT] | None, - schedule_to_close_timeout: timedelta | None, - cancellation_type: temporalio.workflow.NexusOperationCancellationType, - headers: Mapping[str, str] | None, - summary: str | None, - ) -> NexusOperationHandle[OutputT]: ... - - @abstractmethod - def workflow_time_ns(self) -> int: ... - - @abstractmethod - def workflow_upsert_search_attributes( - self, - attributes: ( - temporalio.common.SearchAttributes - | Sequence[temporalio.common.SearchAttributeUpdate] - ), - ) -> None: ... - - @abstractmethod - async def workflow_sleep( - self, duration: float, *, summary: str | None = None - ) -> None: ... - - @abstractmethod - async def workflow_wait_condition( - self, - fn: Callable[[], bool], - *, - timeout: float | None = None, - timeout_summary: str | None = None, - ) -> None: ... - - @abstractmethod - def workflow_get_current_details(self) -> str: ... - - @abstractmethod - def workflow_set_current_details(self, details: str): ... - - @abstractmethod - def workflow_is_failure_exception(self, err: BaseException) -> bool: ... - - @abstractmethod - def workflow_has_last_completion_result(self) -> bool: ... - - @abstractmethod - def workflow_last_completion_result(self, type_hint: type | None) -> Any | None: ... - - @abstractmethod - def workflow_last_failure(self) -> BaseException | None: ... - - -_current_update_info: contextvars.ContextVar[UpdateInfo] = contextvars.ContextVar( - "__temporal_current_update_info" -) - - -def _set_current_update_info(info: UpdateInfo) -> None: - _current_update_info.set(info) - - -def current_update_info() -> UpdateInfo | None: - """Info for the current update if any. - - This is powered by :py:mod:`contextvars` so it is only valid within the - update handler and coroutines/tasks it has started. - - Returns: - Info for the current update handler the code calling this is executing - within if any. - """ - return _current_update_info.get(None) - - -def deprecate_patch(id: str) -> None: - """Mark a patch as deprecated. - - This marks a workflow that had :py:func:`patched` in a previous version of - the code as no longer applicable because all workflows that use the old code - path are done and will never be queried again. Therefore the old code path - is removed as well. - - Args: - id: The identifier originally used with :py:func:`patched`. - """ - _Runtime.current().workflow_patch(id, deprecated=True) - - -def extern_functions() -> Mapping[str, Callable]: - """External functions available in the workflow sandbox. - - Returns: - Mapping of external functions that can be called from inside a workflow - sandbox. - """ - return _Runtime.current().workflow_extern_functions() - - -def info() -> Info: - """Current workflow's info. - - Returns: - Info for the currently running workflow. - """ - return _Runtime.current().workflow_info() - - -def instance() -> Any: - """Current workflow's instance. - - Returns: - The currently running workflow instance. - """ - return _Runtime.current().workflow_instance() - - -def in_workflow() -> bool: - """Whether the code is currently running in a workflow.""" - return _Runtime.maybe_current() is not None - - -def memo() -> Mapping[str, Any]: - """Current workflow's memo values, converted without type hints. - - Since type hints are not used, the default converted values will come back. - For example, if the memo was originally created with a dataclass, the value - will be a dict. To convert using proper type hints, use - :py:func:`memo_value`. - - Returns: - Mapping of all memo keys and they values without type hints. - """ - return _Runtime.current().workflow_memo() - - -def is_failure_exception(err: BaseException) -> bool: - """Checks if the given exception is a workflow failure in the current workflow. - - Returns: - True if the given exception is a workflow failure in the current workflow. - """ - return _Runtime.current().workflow_is_failure_exception(err) - - -@overload -def memo_value(key: str, default: Any = temporalio.common._arg_unset) -> Any: ... - - -@overload -def memo_value(key: str, *, type_hint: type[ParamType]) -> ParamType: ... - - -@overload -def memo_value( - key: str, default: AnyType, *, type_hint: type[ParamType] -) -> AnyType | ParamType: ... - - -def memo_value( - key: str, - default: Any = temporalio.common._arg_unset, - *, - type_hint: type | None = None, -) -> Any: - """Memo value for the given key, optional default, and optional type - hint. - - Args: - key: Key to get memo value for. - default: Default to use if key is not present. If unset, a - :py:class:`KeyError` is raised when the key does not exist. - type_hint: Type hint to use when converting. - - Returns: - Memo value, converted with the type hint if present. - - Raises: - KeyError: Key not present and default not set. - """ - return _Runtime.current().workflow_memo_value(key, default, type_hint=type_hint) - - -def upsert_memo(updates: Mapping[str, Any]) -> None: - """Adds, modifies, and/or removes memos, with upsert semantics. - - Every memo that has a matching key has its value replaced with the one specified in ``updates``. - If the value is set to ``None``, the memo is removed instead. - For every key with no existing memo, a new memo is added with specified value (unless the value is ``None``). - Memos with keys not included in ``updates`` remain unchanged. - """ - return _Runtime.current().workflow_upsert_memo(updates) - - -def get_current_details() -> str: - """Get the current details of the workflow which may appear in the UI/CLI. - Unlike static details set at start, this value can be updated throughout - the life of the workflow and is independent of the static details. - This can be in Temporal markdown format and can span multiple lines. - """ - return _Runtime.current().workflow_get_current_details() - - -def has_last_completion_result() -> bool: - """Gets whether there is a last completion result of the workflow.""" - return _Runtime.current().workflow_has_last_completion_result() - - -@overload -def get_last_completion_result() -> Any | None: ... - - -@overload -def get_last_completion_result(type_hint: type[ParamType]) -> ParamType | None: ... - - -def get_last_completion_result(type_hint: type | None = None) -> Any | None: - """Get the result of the last run of the workflow. This will be None if there was - no previous completion or the result was None. has_last_completion_result() - can be used to differentiate. - """ - return _Runtime.current().workflow_last_completion_result(type_hint) - - -def get_last_failure() -> BaseException | None: - """Get the last failure of the workflow if it has run previously.""" - return _Runtime.current().workflow_last_failure() - - -def set_current_details(description: str) -> None: - """Set the current details of the workflow which may appear in the UI/CLI. - Unlike static details set at start, this value can be updated throughout - the life of the workflow and is independent of the static details. - This can be in Temporal markdown format and can span multiple lines. - """ - _Runtime.current().workflow_set_current_details(description) - - -def metric_meter() -> temporalio.common.MetricMeter: - """Get the metric meter for the current workflow. - - This meter is replay safe which means that metrics will not be recorded - during replay. - - Returns: - Current metric meter for this workflow for recording metrics. - """ - return _Runtime.current().workflow_metric_meter() - - -def now() -> datetime: - """Current time from the workflow perspective. - - This is the workflow equivalent of :py:func:`datetime.now` with the - :py:attr:`timezone.utc` parameter. - - Returns: - UTC datetime for the current workflow time. The datetime does have UTC - set as the time zone. - """ - return datetime.fromtimestamp(time(), timezone.utc) - - -def patched(id: str) -> bool: - """Patch a workflow. - - When called, this will only return true if code should take the newer path - which means this is either not replaying or is replaying and has seen this - patch before. - - Use :py:func:`deprecate_patch` when all workflows are done and will never be - queried again. The old code path can be used at that time too. - - Args: - id: The identifier for this patch. This identifier may be used - repeatedly in the same workflow to represent the same patch - - Returns: - True if this should take the newer path, false if it should take the - older path. - """ - return _Runtime.current().workflow_patch(id, deprecated=False) - - -def payload_converter() -> temporalio.converter.PayloadConverter: - """Get the payload converter for the current workflow. - - The returned converter has :py:class:`temporalio.converter.WorkflowSerializationContext` set. - This is often used for dynamic workflows/signals/queries to convert - payloads. - """ - return _Runtime.current().workflow_payload_converter() - - -def random() -> Random: - """Get a deterministic pseudo-random number generator. - - Note, this random number generator is not cryptographically safe and should - not be used for security purposes. - - Returns: - The deterministically-seeded pseudo-random number generator. - """ - return _Runtime.current().workflow_random() - - -def time() -> float: - """Current seconds since the epoch from the workflow perspective. - - This is the workflow equivalent of :py:func:`time.time`. - - Returns: - Seconds since the epoch as a float. - """ - return time_ns() / 1e9 - - -def time_ns() -> int: - """Current nanoseconds since the epoch from the workflow perspective. - - This is the workflow equivalent of :py:func:`time.time_ns`. - - Returns: - Nanoseconds since the epoch - """ - return _Runtime.current().workflow_time_ns() - - -def upsert_search_attributes( - attributes: ( - temporalio.common.SearchAttributes - | Sequence[temporalio.common.SearchAttributeUpdate] - ), -) -> None: - """Upsert search attributes for this workflow. - - Args: - attributes: The attributes to set. This should be a sequence of - updates (i.e. values created via value_set and value_unset calls on - search attribute keys). The dictionary form of attributes is - DEPRECATED and if used, result in invalid key types on the - typed_search_attributes property in the info. - """ - if not attributes: - return - temporalio.common._warn_on_deprecated_search_attributes(attributes) - _Runtime.current().workflow_upsert_search_attributes(attributes) - - -# Needs to be defined here to avoid a circular import -@runtime_checkable -class UpdateMethodMultiParam(Protocol[MultiParamSpec, ProtocolReturnType]): - """Decorated workflow update functions implement this.""" - - _defn: temporalio.workflow._UpdateDefinition - - def __call__( - self, *args: MultiParamSpec.args, **kwargs: MultiParamSpec.kwargs - ) -> ProtocolReturnType | Awaitable[ProtocolReturnType]: - """Generic callable type callback.""" - ... - - def validator( - self, vfunc: Callable[MultiParamSpec, None] - ) -> Callable[MultiParamSpec, None]: - """Use to decorate a function to validate the arguments passed to the update handler.""" - ... - - -@overload -def update( - fn: Callable[MultiParamSpec, Awaitable[ReturnType]], -) -> UpdateMethodMultiParam[MultiParamSpec, ReturnType]: ... - - -@overload -def update( - fn: Callable[MultiParamSpec, ReturnType], -) -> UpdateMethodMultiParam[MultiParamSpec, ReturnType]: ... - - -@overload -def update( - *, - unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, - description: str | None = None, -) -> Callable[ - [Callable[MultiParamSpec, ReturnType]], - UpdateMethodMultiParam[MultiParamSpec, ReturnType], -]: ... - - -@overload -def update( - *, - name: str, - unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, - description: str | None = None, -) -> Callable[ - [Callable[MultiParamSpec, ReturnType]], - UpdateMethodMultiParam[MultiParamSpec, ReturnType], -]: ... - - -@overload -def update( - *, - dynamic: Literal[True], - unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, - description: str | None = None, -) -> Callable[ - [Callable[MultiParamSpec, ReturnType]], - UpdateMethodMultiParam[MultiParamSpec, ReturnType], -]: ... - - -def update( - fn: CallableSyncOrAsyncType | None = None, # type: ignore[reportInvalidTypeVarUse] - *, - name: str | None = None, - dynamic: bool | None = False, - unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, - description: str | None = None, -) -> ( - UpdateMethodMultiParam[MultiParamSpec, ReturnType] - | Callable[ - [Callable[MultiParamSpec, ReturnType]], - UpdateMethodMultiParam[MultiParamSpec, ReturnType], - ] -): - """Decorator for a workflow update handler method. - - This is used on any async or non-async method that you wish to be called upon - receiving an update. If a function overrides one with this decorator, it too - must be decorated. - - You may also optionally define a validator method that will be called before - this handler you have applied this decorator to. You can specify the validator - with ``@update_handler_function_name.validator``. - - Update methods can only have positional parameters. Best practice for - non-dynamic update methods is to only take a single object/dataclass - argument that can accept more fields later if needed. The handler may return - a serializable value which will be sent back to the caller of the update. - - Args: - fn: The function to decorate. - name: Update name. Defaults to method ``__name__``. Cannot be present - when ``dynamic`` is present. - dynamic: If true, this handles all updates not otherwise handled. The - parameters of the method must be self, a string name, and a - ``*args`` positional varargs. Cannot be present when ``name`` is - present. - unfinished_policy: Actions taken if a workflow terminates with - a running instance of this handler. - description: A short description of the update that may appear in the UI/CLI. - """ - - def decorator( - name: str | None, - unfinished_policy: HandlerUnfinishedPolicy, - fn: CallableSyncOrAsyncType, - ) -> CallableSyncOrAsyncType: - if not name and not dynamic: - name = fn.__name__ - defn = _UpdateDefinition( - name=name, - fn=fn, - is_method=True, - unfinished_policy=unfinished_policy, - description=description, - ) - if defn.dynamic_vararg: - raise RuntimeError( - "Dynamic updates do not support a vararg third param, use Sequence[RawValue]", - ) - setattr(fn, "_defn", defn) - setattr(fn, "validator", partial(_update_validator, defn)) - return fn - - if not fn: - if name is not None and dynamic: - raise RuntimeError("Cannot provide name and dynamic boolean") - return partial(decorator, name, unfinished_policy) # type: ignore[reportReturnType, return-value] - else: - return decorator(fn.__name__, unfinished_policy, fn) # type: ignore[reportReturnType, return-value] - - -def _update_validator( - update_def: _UpdateDefinition, fn: Callable[..., None] | None = None -) -> Callable[..., None] | None: - """Decorator for a workflow update validator method.""" - if fn is not None: - update_def.set_validator(fn) - return fn - - -def uuid4() -> uuid.UUID: - """Get a new, determinism-safe v4 UUID based on :py:func:`random`. - - Note, this UUID is not cryptographically safe and should not be used for - security purposes. - - Returns: - A deterministically-seeded v4 UUID. - """ - return uuid.UUID(bytes=random().getrandbits(16 * 8).to_bytes(16, "big"), version=4) - - -async def sleep(duration: float | timedelta, *, summary: str | None = None) -> None: - """Sleep for the given duration. - - Args: - duration: Duration to sleep in seconds or as a timedelta. - summary: A single-line fixed summary for this timer that may appear in UI/CLI. - This can be in single-line Temporal markdown format. - """ - await _Runtime.current().workflow_sleep( - duration=( - duration.total_seconds() if isinstance(duration, timedelta) else duration - ), - summary=summary, - ) - - -async def wait_condition( - fn: Callable[[], bool], - *, - timeout: timedelta | float | None = None, - timeout_summary: str | None = None, -) -> None: - """Wait on a callback to become true. - - This function returns when the callback returns true (invoked each loop - iteration) or the timeout has been reached. - - Args: - fn: Non-async callback that accepts no parameters and returns a boolean. - timeout: Optional number of seconds to wait until throwing - :py:class:`asyncio.TimeoutError`. - timeout_summary: Optional simple string identifying the timer (created if ``timeout`` is - present) that may be visible in UI/CLI. While it can be normal text, it is best to treat - as a timer ID. - """ - await _Runtime.current().workflow_wait_condition( - fn, - timeout=timeout.total_seconds() if isinstance(timeout, timedelta) else timeout, - timeout_summary=timeout_summary, - ) - - -_sandbox_unrestricted = threading.local() -_in_sandbox = threading.local() -_imports_passed_through = threading.local() -_sandbox_import_notification_policy_override = threading.local() - - -class SandboxImportNotificationPolicy(Flag): - """Defines the behavior taken when modules are imported into the sandbox after the workflow is initially loaded or unintentionally missing from the passthrough list.""" - - SILENT = auto() - """Allow imports that do not violate sandbox restrictions and no warnings are generated.""" - WARN_ON_DYNAMIC_IMPORT = auto() - """Allows dynamic imports that do not violate sandbox restrictions but issues a warning when an import is triggered in the sandbox after initial workflow load.""" - WARN_ON_UNINTENTIONAL_PASSTHROUGH = auto() - """Allows imports that do not violate sandbox restrictions but issues a warning when an import is triggered in the sandbox that was unintentionally passed through.""" - RAISE_ON_UNINTENTIONAL_PASSTHROUGH = auto() - """Raise an error when an import is triggered in the sandbox that was unintentionally passed through.""" - - -class unsafe: - """Contains static methods that should not normally be called during - workflow execution except in advanced cases. - """ - - def __init__(self) -> None: # noqa: D107 - raise NotImplementedError - - @staticmethod - def in_sandbox() -> bool: - """Whether the code is executing on a sandboxed thread. - - Returns: - True if the code is executing in the sandbox thread. - """ - return getattr(_in_sandbox, "value", False) - - @staticmethod - def _set_in_sandbox(v: bool) -> None: - _in_sandbox.value = v - - @staticmethod - def is_replaying() -> bool: - """Whether the workflow is currently replaying. - - Returns: - True if the workflow is currently replaying - """ - return _Runtime.current().workflow_is_replaying() - - @staticmethod - def is_sandbox_unrestricted() -> bool: - """Whether the current block of code is not restricted via sandbox. - - Returns: - True if the current code is not restricted in the sandbox. - """ - # Activations happen in different threads than init and possibly the - # local hasn't been initialized in _that_ thread, so we allow unset here - # instead of just setting value = False globally. - return getattr(_sandbox_unrestricted, "value", False) - - @staticmethod - @contextmanager - def sandbox_unrestricted() -> Iterator[None]: - """A context manager to run code without sandbox restrictions.""" - # Only apply if not already applied. Nested calls just continue - # unrestricted. - if unsafe.is_sandbox_unrestricted(): - yield None - return - _sandbox_unrestricted.value = True - try: - yield None - finally: - _sandbox_unrestricted.value = False - - @staticmethod - def is_imports_passed_through() -> bool: - """Whether the current block of code is in - :py:meth:imports_passed_through. - - Returns: - True if the current code's imports will be passed through - """ - # See comment in is_sandbox_unrestricted for why we allow unset instead - # of just global false. - return getattr(_imports_passed_through, "value", False) - - @staticmethod - @contextmanager - def imports_passed_through() -> Iterator[None]: - """Context manager to mark all imports that occur within it as passed - through (meaning not reloaded by the sandbox). - """ - # Only apply if not already applied. Nested calls just continue - # passed through. - if unsafe.is_imports_passed_through(): - yield None - return - _imports_passed_through.value = True - try: - yield None - finally: - _imports_passed_through.value = False - - @staticmethod - def current_import_notification_policy_override() -> ( - SandboxImportNotificationPolicy | None - ): - """Gets the current import notification policy override if one is set.""" - applied_policy = getattr( - _sandbox_import_notification_policy_override, - "value", - None, - ) - return applied_policy - - @staticmethod - @contextmanager - def sandbox_import_notification_policy( - policy: SandboxImportNotificationPolicy, - ) -> Iterator[None]: - """Context manager to apply the given import notification policy.""" - original_policy = _sandbox_import_notification_policy_override.value = getattr( - _sandbox_import_notification_policy_override, - "value", - None, - ) - _sandbox_import_notification_policy_override.value = policy - try: - yield None - finally: - _sandbox_import_notification_policy_override.value = original_policy - - -class LoggerAdapter(logging.LoggerAdapter): - """Adapter that adds details to the log about the running workflow. - - Attributes: - workflow_info_on_message: Boolean for whether a string representation of - a dict of some workflow info will be appended to each message. - Default is True. - workflow_info_on_extra: Boolean for whether a ``temporal_workflow`` - dictionary value will be added to the ``extra`` dictionary with some - workflow info, making it present on the ``LogRecord.__dict__`` for - use by others. Default is True. - full_workflow_info_on_extra: Boolean for whether a ``workflow_info`` - value will be added to the ``extra`` dictionary with the entire - workflow info, making it present on the ``LogRecord.__dict__`` for - use by others. Default is False. - log_during_replay: Boolean for whether logs should occur during replay. - Default is False. - - Values added to ``extra`` are merged with the ``extra`` dictionary from a - logging call, with values from the logging call taking precedence. I.e. the - behavior is that of ``merge_extra=True`` in Python >= 3.13. - """ - - def __init__(self, logger: logging.Logger, extra: Mapping[str, Any] | None) -> None: - """Create the logger adapter.""" - super().__init__(logger, extra or {}) - self.workflow_info_on_message = True - self.workflow_info_on_extra = True - self.full_workflow_info_on_extra = False - self.log_during_replay = False - - def process( - self, msg: Any, kwargs: MutableMapping[str, Any] - ) -> tuple[Any, MutableMapping[str, Any]]: - """Override to add workflow details.""" - extra: dict[str, Any] = {} - msg_extra: dict[str, Any] = {} - - if ( - self.workflow_info_on_message - or self.workflow_info_on_extra - or self.full_workflow_info_on_extra - ): - runtime = _Runtime.maybe_current() - if runtime: - workflow_details = runtime.logger_details - if self.workflow_info_on_message: - msg_extra.update(workflow_details) - if self.workflow_info_on_extra: - extra["temporal_workflow"] = workflow_details - if self.full_workflow_info_on_extra: - extra["workflow_info"] = runtime.workflow_info() - update_info = current_update_info() - if update_info: - update_details = update_info._logger_details - if self.workflow_info_on_message: - msg_extra.update(update_details) - if self.workflow_info_on_extra: - extra.setdefault("temporal_workflow", {}).update(update_details) - - kwargs["extra"] = {**extra, **(kwargs.get("extra") or {})} - if msg_extra: - msg = f"{msg} ({msg_extra})" - return (msg, kwargs) - - def isEnabledFor(self, level: int) -> bool: - """Override to ignore replay logs.""" - if not self.log_during_replay and unsafe.is_replaying(): - return False - return super().isEnabledFor(level) - - @property - def base_logger(self) -> logging.Logger: - """Underlying logger usable for actions such as adding - handlers/formatters. - """ - return self.logger - - -logger = LoggerAdapter(logging.getLogger(__name__), None) -"""Logger that will have contextual workflow details embedded. - -Logs are skipped during replay by default. -""" - - -@dataclass(frozen=True) -class _Definition: - name: str | None - cls: type - run_fn: Callable[..., Awaitable] - signals: Mapping[str | None, _SignalDefinition] - queries: Mapping[str | None, _QueryDefinition] - updates: Mapping[str | None, _UpdateDefinition] - sandboxed: bool - failure_exception_types: Sequence[type[BaseException]] - # Types loaded on post init if both are None - arg_types: list[type] | None = None - ret_type: type | None = None - versioning_behavior: temporalio.common.VersioningBehavior | None = None - dynamic_config_fn: Callable[..., DynamicWorkflowConfig] | None = None - - @staticmethod - def from_class(cls: type) -> _Definition | None: # type: ignore[reportSelfClsParameterName] - # We make sure to only return it if it's on _this_ class - defn = getattr(cls, "__temporal_workflow_definition", None) - if defn and defn.cls == cls: - return defn - return None - - @staticmethod - def must_from_class(cls: type) -> _Definition: # type: ignore[reportSelfClsParameterName] - ret = _Definition.from_class(cls) - if ret: - return ret - cls_name = getattr(cls, "__name__", "") - raise ValueError( - f"Workflow {cls_name} missing attributes, was it decorated with @workflow.defn?" - ) - - @staticmethod - def from_run_fn(fn: Callable[..., Awaitable[Any]]) -> _Definition | None: - return getattr(fn, "__temporal_workflow_definition", None) - - @staticmethod - def must_from_run_fn(fn: Callable[..., Awaitable[Any]]) -> _Definition: - ret = _Definition.from_run_fn(fn) - if ret: - return ret - fn_name = getattr(fn, "__qualname__", "") - raise ValueError( - f"Function {fn_name} missing attributes, was it decorated with @workflow.run and was its class decorated with @workflow.defn?" - ) - - @classmethod - def get_name_and_result_type( - cls, name_or_run_fn: str | Callable[..., Awaitable[Any]] - ) -> tuple[str, type | None]: - if isinstance(name_or_run_fn, str): - return name_or_run_fn, None - elif callable(name_or_run_fn): - defn = cls.must_from_run_fn(name_or_run_fn) - if not defn.name: - raise ValueError("Cannot invoke dynamic workflow explicitly") - return defn.name, defn.ret_type - else: - raise TypeError("Workflow must be a string or callable") - - @staticmethod - def _apply_to_class( - cls: type, # type: ignore[reportSelfClsParameterName] - *, - workflow_name: str | None, - sandboxed: bool, - failure_exception_types: Sequence[type[BaseException]], - versioning_behavior: temporalio.common.VersioningBehavior, - ) -> None: - # Check it's not being doubly applied - if _Definition.from_class(cls): - raise ValueError("Class already contains workflow definition") - issues: list[str] = [] - - # Collect run fn and all signal/query/update fns - init_fn: Callable[..., None] | None = None - run_fn: Callable[..., Awaitable[Any]] | None = None - dynamic_config_fn: Callable[..., DynamicWorkflowConfig] | None = None - seen_run_attr = False - signals: dict[str | None, _SignalDefinition] = {} - queries: dict[str | None, _QueryDefinition] = {} - updates: dict[str | None, _UpdateDefinition] = {} - for name, member in inspect.getmembers(cls): - if hasattr(member, "__temporal_workflow_run"): - seen_run_attr = True - if not _is_unbound_method_on_cls(member, cls): - issues.append( - f"@workflow.run method {name} must be defined on {cls.__qualname__}" - ) - elif run_fn is not None: - issues.append( - f"Multiple @workflow.run methods found (at least on {name} and {run_fn.__name__})" - ) - else: - # We can guarantee the @workflow.run decorator did - # validation of the function itself - run_fn = member - elif hasattr(member, "__temporal_signal_definition"): - signal_defn = cast( - _SignalDefinition, getattr(member, "__temporal_signal_definition") - ) - if signal_defn.name in signals: - defn_name = signal_defn.name or "" - # TODO(cretz): Remove cast when https://github.com/python/mypy/issues/5485 fixed - other_fn = cast(Callable, signals[signal_defn.name].fn) - issues.append( - f"Multiple signal methods found for {defn_name} " - f"(at least on {name} and {other_fn.__name__})" - ) - else: - signals[signal_defn.name] = signal_defn - elif hasattr(member, "__temporal_query_definition"): - query_defn = cast( - _QueryDefinition, getattr(member, "__temporal_query_definition") - ) - if query_defn.name in queries: - defn_name = query_defn.name or "" - issues.append( - f"Multiple query methods found for {defn_name} " - f"(at least on {name} and {queries[query_defn.name].fn.__name__})" - ) - else: - queries[query_defn.name] = query_defn - elif name == "__init__" and hasattr(member, "__temporal_workflow_init"): - init_fn = member - elif hasattr(member, "__temporal_workflow_dynamic_config"): - if workflow_name: - issues.append( - "@workflow.dynamic_config can only be used in dynamic workflows, but " - f"workflow class {workflow_name} ({cls.__name__}) is not dynamic" - ) - if dynamic_config_fn: - issues.append( - "@workflow.dynamic_config can only be defined once per workflow" - ) - dynamic_config_fn = member - elif isinstance(member, UpdateMethodMultiParam): - update_defn = member._defn - if update_defn.name in updates: - defn_name = update_defn.name or "" - issues.append( - f"Multiple update methods found for {defn_name} " - f"(at least on {name} and {updates[update_defn.name].fn.__name__})" - ) - elif update_defn.validator and not _parameters_identical_up_to_naming( - update_defn.fn, update_defn.validator - ): - issues.append( - f"Update validator method {update_defn.validator.__name__} parameters " - f"do not match update method {update_defn.fn.__name__} parameters" - ) - else: - updates[update_defn.name] = update_defn - - # Check base classes haven't defined things with different decorators - for base_cls in inspect.getmro(cls)[1:]: - for _, base_member in inspect.getmembers(base_cls): - # We only care about methods defined on this class - if not inspect.isfunction(base_member) or not _is_unbound_method_on_cls( - base_member, base_cls - ): - continue - if hasattr(base_member, "__temporal_workflow_run"): - seen_run_attr = True - if not run_fn or base_member.__name__ != run_fn.__name__: - issues.append( - f"@workflow.run defined on {base_member.__qualname__} but not on the override" - ) - elif hasattr(base_member, "__temporal_signal_definition"): - signal_defn = cast( - _SignalDefinition, - getattr(base_member, "__temporal_signal_definition"), - ) - if signal_defn.name not in signals: - issues.append( - f"@workflow.signal defined on {base_member.__qualname__} but not on the override" - ) - elif hasattr(base_member, "__temporal_query_definition"): - query_defn = cast( - _QueryDefinition, - getattr(base_member, "__temporal_query_definition"), - ) - if query_defn.name not in queries: - issues.append( - f"@workflow.query defined on {base_member.__qualname__} but not on the override" - ) - elif isinstance(base_member, UpdateMethodMultiParam): - update_defn = base_member._defn - if update_defn.name not in updates: - issues.append( - f"@workflow.update defined on {base_member.__qualname__} but not on the override" - ) - - if not seen_run_attr: - issues.append("Missing @workflow.run method") - if init_fn and run_fn: - if not _parameters_identical_up_to_naming(init_fn, run_fn): - issues.append( - "@workflow.init and @workflow.run method parameters do not match" - ) - if issues: - if len(issues) == 1: - raise ValueError(f"Invalid workflow class: {issues[0]}") - raise ValueError( - f"Invalid workflow class for {len(issues)} reasons: {', '.join(issues)}" - ) - - assert run_fn - assert seen_run_attr - defn = _Definition( - name=workflow_name, - cls=cls, - run_fn=run_fn, - signals=signals, - queries=queries, - updates=updates, - sandboxed=sandboxed, - failure_exception_types=failure_exception_types, - versioning_behavior=versioning_behavior, - dynamic_config_fn=dynamic_config_fn, - ) - setattr(cls, "__temporal_workflow_definition", defn) - setattr(run_fn, "__temporal_workflow_definition", defn) - - def __post_init__(self) -> None: - if self.arg_types is None and self.ret_type is None: - dynamic = self.name is None - arg_types, ret_type = temporalio.common._type_hints_from_func(self.run_fn) - # If dynamic, must be a sequence of raw values - if dynamic and ( - not arg_types - or len(arg_types) != 1 - or arg_types[0] != Sequence[temporalio.common.RawValue] - ): - raise TypeError( - "Dynamic workflow must accept a single Sequence[temporalio.common.RawValue]" - ) - object.__setattr__(self, "arg_types", arg_types) - object.__setattr__(self, "ret_type", ret_type) - - -def _parameters_identical_up_to_naming(fn1: Callable, fn2: Callable) -> bool: - """Return True if the functions have identical parameter lists, ignoring parameter names.""" - - def params(fn: Callable) -> list[inspect.Parameter]: - # Ignore name when comparing parameters (remaining fields are kind, - # default, and annotation). - return [p.replace(name="x") for p in inspect.signature(fn).parameters.values()] - - # We require that any type annotations present match exactly; i.e. we do - # not support any notion of subtype compatibility. - return params(fn1) == params(fn2) - - -# Async safe version of partial -def _bind_method(obj: Any, fn: Callable[..., Any]) -> Callable[..., Any]: - # Curry instance on the definition function since that represents an - # unbound method - if inspect.iscoroutinefunction(fn): - # We cannot use functools.partial here because in <= 3.7 that isn't - # considered an inspect.iscoroutinefunction - fn = cast(Callable[..., Awaitable[Any]], fn) - - async def with_object(*args, **kwargs) -> Any: - return await fn(obj, *args, **kwargs) - - return with_object - return partial(fn, obj) - - -# Returns true if normal form, false if vararg form -def _assert_dynamic_handler_args( - fn: Callable, arg_types: list[type] | None, is_method: bool -) -> bool: - # Dynamic query/signal/update must have three args: self, name, and - # Sequence[RawValue]. An older form accepted varargs for the third param for signals/queries so - # we will too (but will warn in the signal/query code). - params = list(inspect.signature(fn).parameters.values()) - total_expected_params = 3 if is_method else 2 - if ( - len(params) == total_expected_params - and params[-2].kind is inspect.Parameter.POSITIONAL_OR_KEYWORD - and params[-1].kind is inspect.Parameter.VAR_POSITIONAL - ): - # Old var-arg form - return False - if ( - not arg_types - or len(arg_types) != 2 - or arg_types[0] != str - or ( - arg_types[1] != Sequence[temporalio.common.RawValue] - and arg_types[1] != typing.Sequence[temporalio.common.RawValue] - ) - ): - raise RuntimeError( - "Dynamic handler must have 3 arguments: self, str, and Sequence[temporalio.common.RawValue]" - ) - return True - - -@dataclass(frozen=True) -class _SignalDefinition: - # None if dynamic - name: str | None - fn: Callable[..., None | Awaitable[None]] - is_method: bool - unfinished_policy: HandlerUnfinishedPolicy = ( - HandlerUnfinishedPolicy.WARN_AND_ABANDON - ) - description: str | None = None - # Types loaded on post init if None - arg_types: list[type] | None = None - dynamic_vararg: bool = False - - @staticmethod - def from_fn(fn: Callable) -> _SignalDefinition | None: - return getattr(fn, "__temporal_signal_definition", None) - - @staticmethod - def must_name_from_fn_or_str(signal: str | Callable) -> str: - if callable(signal): - defn = _SignalDefinition.from_fn(signal) - if not defn: - raise RuntimeError( - f"Signal definition not found on {signal.__qualname__}, " - "is it decorated with @workflow.signal?" - ) - elif not defn.name: - raise RuntimeError("Cannot invoke dynamic signal definition") - # TODO(cretz): Check count/type of args at runtime? - return defn.name - return str(signal) - - def __post_init__(self) -> None: - if self.arg_types is None: - arg_types, _ = temporalio.common._type_hints_from_func(self.fn) - # If dynamic, assert it - if not self.name: - object.__setattr__( - self, - "dynamic_vararg", - not _assert_dynamic_handler_args( - self.fn, arg_types, self.is_method - ), - ) - object.__setattr__(self, "arg_types", arg_types) - - def bind_fn(self, obj: Any) -> Callable[..., Any]: - return _bind_method(obj, self.fn) - - -@dataclass(frozen=True) -class _QueryDefinition: - # None if dynamic - name: str | None - fn: Callable[..., Any] - is_method: bool - description: str | None = None - # Types loaded on post init if both are None - arg_types: list[type] | None = None - ret_type: type | None = None - dynamic_vararg: bool = False - - @staticmethod - def from_fn(fn: Callable) -> _QueryDefinition | None: - return getattr(fn, "__temporal_query_definition", None) - - def __post_init__(self) -> None: - if self.arg_types is None and self.ret_type is None: - arg_types, ret_type = temporalio.common._type_hints_from_func(self.fn) - # If dynamic, assert it - if not self.name: - object.__setattr__( - self, - "dynamic_vararg", - not _assert_dynamic_handler_args( - self.fn, arg_types, self.is_method - ), - ) - object.__setattr__(self, "arg_types", arg_types) - object.__setattr__(self, "ret_type", ret_type) - - def bind_fn(self, obj: Any) -> Callable[..., Any]: - return _bind_method(obj, self.fn) - - -@dataclass(frozen=True) -class _UpdateDefinition: - # None if dynamic - name: str | None - fn: Callable[..., Any | Awaitable[Any]] - is_method: bool - unfinished_policy: HandlerUnfinishedPolicy = ( - HandlerUnfinishedPolicy.WARN_AND_ABANDON - ) - description: str | None = None - # Types loaded on post init if None - arg_types: list[type] | None = None - ret_type: type | None = None - validator: Callable[..., None] | None = None - dynamic_vararg: bool = False - - def __post_init__(self) -> None: - if self.arg_types is None: - arg_types, ret_type = temporalio.common._type_hints_from_func(self.fn) - # Disallow dynamic varargs - if not self.name and not _assert_dynamic_handler_args( - self.fn, arg_types, self.is_method - ): - raise RuntimeError( - "Dynamic updates do not support a vararg third param, use Sequence[RawValue]", - ) - object.__setattr__(self, "arg_types", arg_types) - object.__setattr__(self, "ret_type", ret_type) - - def bind_fn(self, obj: Any) -> Callable[..., Any]: - return _bind_method(obj, self.fn) - - def bind_validator(self, obj: Any) -> Callable[..., Any]: - if self.validator is not None: - return _bind_method(obj, self.validator) - return lambda *args, **kwargs: None - - def set_validator(self, validator: Callable[..., None]) -> None: - if self.validator: - raise RuntimeError(f"Validator already set for update {self.name}") - object.__setattr__(self, "validator", validator) - - @classmethod - def get_name_and_result_type( - cls, - name_or_update_fn: str | Callable[..., Any], - ) -> tuple[str, type | None]: - if isinstance(name_or_update_fn, temporalio.workflow.UpdateMethodMultiParam): - defn = name_or_update_fn._defn - if not defn.name: - raise RuntimeError("Cannot invoke dynamic update definition") - # TODO(cretz): Check count/type of args at runtime? - return defn.name, defn.ret_type - else: - return str(name_or_update_fn), None - - -# See https://mypy.readthedocs.io/en/latest/runtime_troubles.html#using-classes-that-are-generic-in-stubs-but-not-at-runtime -if TYPE_CHECKING: - - class _AsyncioTask(asyncio.Task[AnyType]): - pass - -else: - # TODO: inherited classes should be other way around? - class _AsyncioTask(Generic[AnyType], asyncio.Task): - pass - - -class ActivityHandle(_AsyncioTask[ReturnType]): # type: ignore[type-var] - """Handle returned from :py:func:`start_activity` and - :py:func:`start_local_activity`. - - This extends :py:class:`asyncio.Task` and supports all task features. - """ - - pass - - -class ActivityCancellationType(IntEnum): - """How an activity cancellation should be handled.""" - - TRY_CANCEL = int( - temporalio.bridge.proto.workflow_commands.ActivityCancellationType.TRY_CANCEL - ) - WAIT_CANCELLATION_COMPLETED = int( - temporalio.bridge.proto.workflow_commands.ActivityCancellationType.WAIT_CANCELLATION_COMPLETED - ) - ABANDON = int( - temporalio.bridge.proto.workflow_commands.ActivityCancellationType.ABANDON - ) - - -class ActivityConfig(TypedDict, total=False): - """TypedDict of config that can be used for :py:func:`start_activity` and - :py:func:`execute_activity`. - """ - - task_queue: str | None - schedule_to_close_timeout: timedelta | None - schedule_to_start_timeout: timedelta | None - start_to_close_timeout: timedelta | None - heartbeat_timeout: timedelta | None - retry_policy: temporalio.common.RetryPolicy | None - cancellation_type: ActivityCancellationType - activity_id: str | None - versioning_intent: VersioningIntent | None - summary: str | None - priority: temporalio.common.Priority - - -# Overload for async no-param activity -@overload -def start_activity( - activity: CallableAsyncNoParam[ReturnType], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync no-param activity -@overload -def start_activity( - activity: CallableSyncNoParam[ReturnType], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async single-param activity -@overload -def start_activity( - activity: CallableAsyncSingleParam[ParamType, ReturnType], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync single-param activity -@overload -def start_activity( - activity: CallableSyncSingleParam[ParamType, ReturnType], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async multi-param activity -@overload -def start_activity( - activity: Callable[..., Awaitable[ReturnType]], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync multi-param activity -@overload -def start_activity( - activity: Callable[..., ReturnType], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for string-name activity -@overload -def start_activity( - activity: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - task_queue: str | None = None, - result_type: type | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[Any]: ... - - -def start_activity( - activity: Any, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - task_queue: str | None = None, - result_type: type | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[Any]: - """Start an activity and return its handle. - - At least one of ``schedule_to_close_timeout`` or ``start_to_close_timeout`` - must be present. - - Args: - activity: Activity name or function reference. - arg: Single argument to the activity. - args: Multiple arguments to the activity. Cannot be set if arg is. - task_queue: Task queue to run the activity on. Defaults to the current - workflow's task queue. - result_type: For string activities, this can set the specific result - type hint to deserialize into. - schedule_to_close_timeout: Max amount of time the activity can take from - first being scheduled to being completed before it times out. This - is inclusive of all retries. - schedule_to_start_timeout: Max amount of time the activity can take to - be started from first being scheduled. - start_to_close_timeout: Max amount of time a single activity run can - take from when it starts to when it completes. This is per retry. - heartbeat_timeout: How frequently an activity must invoke heartbeat - while running before it is considered timed out. - retry_policy: How an activity is retried on failure. If unset, a - server-defined default is used. Set maximum attempts to 1 to disable - retries. - cancellation_type: How the activity is treated when it is cancelled from - the workflow. - activity_id: Optional unique identifier for the activity. This is an - advanced setting that should not be set unless users are sure they - need to. Contact Temporal before setting this value. - versioning_intent: When using the Worker Versioning feature, specifies whether this Activity - should run on a worker with a compatible Build Id or not. - Deprecated: Use Worker Deployment versioning instead. - summary: A single-line fixed summary for this activity that may appear in UI/CLI. - This can be in single-line Temporal markdown format. - priority: Priority of the activity. - - Returns: - An activity handle to the activity which is an async task. - """ - return _Runtime.current().workflow_start_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - task_queue=task_queue, - result_type=result_type, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - heartbeat_timeout=heartbeat_timeout, - retry_policy=retry_policy, - cancellation_type=cancellation_type, - activity_id=activity_id, - versioning_intent=versioning_intent, - summary=summary, - priority=priority, - ) - - -# Overload for async no-param activity -@overload -async def execute_activity( - activity: CallableAsyncNoParam[ReturnType], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for sync no-param activity -@overload -async def execute_activity( - activity: CallableSyncNoParam[ReturnType], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for async single-param activity -@overload -async def execute_activity( - activity: CallableAsyncSingleParam[ParamType, ReturnType], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for sync single-param activity -@overload -async def execute_activity( - activity: CallableSyncSingleParam[ParamType, ReturnType], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for async multi-param activity -@overload -async def execute_activity( - activity: Callable[..., Awaitable[ReturnType]], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for sync multi-param activity -@overload -async def execute_activity( - activity: Callable[..., ReturnType], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for string-name activity -@overload -async def execute_activity( - activity: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - task_queue: str | None = None, - result_type: type | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> Any: ... - - -async def execute_activity( - activity: Any, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - task_queue: str | None = None, - result_type: type | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> Any: - """Start an activity and wait for completion. - - This is a shortcut for ``await`` :py:meth:`start_activity`. - """ - # We call the runtime directly instead of top-level start_activity to ensure - # we don't miss new parameters - return await _Runtime.current().workflow_start_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - task_queue=task_queue, - result_type=result_type, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - heartbeat_timeout=heartbeat_timeout, - retry_policy=retry_policy, - cancellation_type=cancellation_type, - activity_id=activity_id, - versioning_intent=versioning_intent, - summary=summary, - priority=priority, - ) - - -# Overload for async no-param activity -@overload -def start_activity_class( - activity: Type[CallableAsyncNoParam[ReturnType]], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync no-param activity -@overload -def start_activity_class( - activity: Type[CallableSyncNoParam[ReturnType]], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async single-param activity -@overload -def start_activity_class( - activity: Type[CallableAsyncSingleParam[ParamType, ReturnType]], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync single-param activity -@overload -def start_activity_class( - activity: Type[CallableSyncSingleParam[ParamType, ReturnType]], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async multi-param activity -@overload -def start_activity_class( - activity: Type[Callable[..., Awaitable[ReturnType]]], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync multi-param activity -@overload -def start_activity_class( - activity: Type[Callable[..., ReturnType]], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -def start_activity_class( - activity: Type[Callable], - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[Any]: - """Start an activity from a callable class. - - See :py:meth:`start_activity` for parameter and return details. - """ - return _Runtime.current().workflow_start_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - task_queue=task_queue, - result_type=None, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - heartbeat_timeout=heartbeat_timeout, - retry_policy=retry_policy, - cancellation_type=cancellation_type, - activity_id=activity_id, - versioning_intent=versioning_intent, - summary=summary, - priority=priority, - ) - - -# Overload for async no-param activity -@overload -async def execute_activity_class( - activity: Type[CallableAsyncNoParam[ReturnType]], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for sync no-param activity -@overload -async def execute_activity_class( - activity: Type[CallableSyncNoParam[ReturnType]], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for async single-param activity -@overload -async def execute_activity_class( - activity: Type[CallableAsyncSingleParam[ParamType, ReturnType]], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for sync single-param activity -@overload -async def execute_activity_class( - activity: Type[CallableSyncSingleParam[ParamType, ReturnType]], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for async multi-param activity -@overload -async def execute_activity_class( - activity: Type[Callable[..., Awaitable[ReturnType]]], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for sync multi-param activity -@overload -async def execute_activity_class( - activity: Type[Callable[..., ReturnType]], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -async def execute_activity_class( - activity: Type[Callable], - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> Any: - """Start an activity from a callable class and wait for completion. - - This is a shortcut for ``await`` :py:meth:`start_activity_class`. - """ - return await _Runtime.current().workflow_start_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - task_queue=task_queue, - result_type=None, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - heartbeat_timeout=heartbeat_timeout, - retry_policy=retry_policy, - cancellation_type=cancellation_type, - activity_id=activity_id, - versioning_intent=versioning_intent, - summary=summary, - priority=priority, - ) - - -# Overload for async no-param activity -@overload -def start_activity_method( - activity: MethodAsyncNoParam[SelfType, ReturnType], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync no-param activity -@overload -def start_activity_method( - activity: MethodSyncNoParam[SelfType, ReturnType], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async single-param activity -@overload -def start_activity_method( - activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync single-param activity -@overload -def start_activity_method( - activity: MethodSyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async multi-param activity -@overload -def start_activity_method( - activity: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync multi-param activity -@overload -def start_activity_method( - activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[ReturnType]: ... - - -def start_activity_method( - activity: Callable, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ActivityHandle[Any]: - """Start an activity from a method. - - See :py:meth:`start_activity` for parameter and return details. - """ - return _Runtime.current().workflow_start_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - task_queue=task_queue, - result_type=None, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - heartbeat_timeout=heartbeat_timeout, - retry_policy=retry_policy, - cancellation_type=cancellation_type, - activity_id=activity_id, - versioning_intent=versioning_intent, - summary=summary, - priority=priority, - ) - - -# Overload for async no-param activity -@overload -async def execute_activity_method( - activity: MethodAsyncNoParam[SelfType, ReturnType], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for sync no-param activity -@overload -async def execute_activity_method( - activity: MethodSyncNoParam[SelfType, ReturnType], - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for async single-param activity -@overload -async def execute_activity_method( - activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for sync single-param activity -@overload -async def execute_activity_method( - activity: MethodSyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for async multi-param activity -@overload -async def execute_activity_method( - activity: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for sync multi-param activity -@overload -async def execute_activity_method( - activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], - *, - args: Sequence[Any], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -async def execute_activity_method( - activity: Callable, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - task_queue: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - heartbeat_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - versioning_intent: VersioningIntent | None = None, - summary: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> Any: - """Start an activity from a method and wait for completion. - - This is a shortcut for ``await`` :py:meth:`start_activity_method`. - """ - # We call the runtime directly instead of top-level start_activity to ensure - # we don't miss new parameters - return await _Runtime.current().workflow_start_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - task_queue=task_queue, - result_type=None, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - heartbeat_timeout=heartbeat_timeout, - retry_policy=retry_policy, - cancellation_type=cancellation_type, - activity_id=activity_id, - versioning_intent=versioning_intent, - summary=summary, - priority=priority, - ) - - -class LocalActivityConfig(TypedDict, total=False): - """TypedDict of config that can be used for :py:func:`start_local_activity` - and :py:func:`execute_local_activity`. - """ - - schedule_to_close_timeout: timedelta | None - schedule_to_start_timeout: timedelta | None - start_to_close_timeout: timedelta | None - retry_policy: temporalio.common.RetryPolicy | None - local_retry_threshold: timedelta | None - cancellation_type: ActivityCancellationType - activity_id: str | None - summary: str | None - - -# Overload for async no-param activity -@overload -def start_local_activity( - activity: CallableAsyncNoParam[ReturnType], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync no-param activity -@overload -def start_local_activity( - activity: CallableSyncNoParam[ReturnType], - *, - activity_id: str | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async single-param activity -@overload -def start_local_activity( - activity: CallableAsyncSingleParam[ParamType, ReturnType], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync single-param activity -@overload -def start_local_activity( - activity: CallableSyncSingleParam[ParamType, ReturnType], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async multi-param activity -@overload -def start_local_activity( - activity: Callable[..., Awaitable[ReturnType]], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync multi-param activity -@overload -def start_local_activity( - activity: Callable[..., ReturnType], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for string-name activity -@overload -def start_local_activity( - activity: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - result_type: type | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[Any]: ... - - -def start_local_activity( - activity: Any, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - result_type: type | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[Any]: - """Start a local activity and return its handle. - - At least one of ``schedule_to_close_timeout`` or ``start_to_close_timeout`` - must be present. - - Args: - activity: Activity name or function reference. - arg: Single argument to the activity. - args: Multiple arguments to the activity. Cannot be set if arg is. - result_type: For string activities, this can set the specific result - type hint to deserialize into. - schedule_to_close_timeout: Max amount of time the activity can take from - first being scheduled to being completed before it times out. This - is inclusive of all retries. - schedule_to_start_timeout: Max amount of time the activity can take to - be started from first being scheduled. - start_to_close_timeout: Max amount of time a single activity run can - take from when it starts to when it completes. This is per retry. - retry_policy: How an activity is retried on failure. If unset, an - SDK-defined default is used. Set maximum attempts to 1 to disable - retries. - cancellation_type: How the activity is treated when it is cancelled from - the workflow. - activity_id: Optional unique identifier for the activity. This is an - advanced setting that should not be set unless users are sure they - need to. Contact Temporal before setting this value. - summary: Optional summary for the activity. - - Returns: - An activity handle to the activity which is an async task. - """ - return _Runtime.current().workflow_start_local_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - result_type=result_type, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - retry_policy=retry_policy, - local_retry_threshold=local_retry_threshold, - cancellation_type=cancellation_type, - activity_id=activity_id, - summary=summary, - ) - - -# Overload for async no-param activity -@overload -async def execute_local_activity( - activity: CallableAsyncNoParam[ReturnType], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for sync no-param activity -@overload -async def execute_local_activity( - activity: CallableSyncNoParam[ReturnType], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for async single-param activity -@overload -async def execute_local_activity( - activity: CallableAsyncSingleParam[ParamType, ReturnType], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for sync single-param activity -@overload -async def execute_local_activity( - activity: CallableSyncSingleParam[ParamType, ReturnType], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for async multi-param activity -@overload -async def execute_local_activity( - activity: Callable[..., Awaitable[ReturnType]], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for sync multi-param activity -@overload -async def execute_local_activity( - activity: Callable[..., ReturnType], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for string-name activity -@overload -async def execute_local_activity( - activity: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - result_type: type | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> Any: ... - - -async def execute_local_activity( - activity: Any, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - result_type: type | None = None, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> Any: - """Start a local activity and wait for completion. - - This is a shortcut for ``await`` :py:meth:`start_local_activity`. - """ - # We call the runtime directly instead of top-level start_local_activity to - # ensure we don't miss new parameters - return await _Runtime.current().workflow_start_local_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - result_type=result_type, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - retry_policy=retry_policy, - local_retry_threshold=local_retry_threshold, - cancellation_type=cancellation_type, - activity_id=activity_id, - summary=summary, - ) - - -# Overload for async no-param activity -@overload -def start_local_activity_class( - activity: type[CallableAsyncNoParam[ReturnType]], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync no-param activity -@overload -def start_local_activity_class( - activity: type[CallableSyncNoParam[ReturnType]], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async single-param activity -@overload -def start_local_activity_class( - activity: type[CallableAsyncSingleParam[ParamType, ReturnType]], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync single-param activity -@overload -def start_local_activity_class( - activity: type[CallableSyncSingleParam[ParamType, ReturnType]], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async multi-param activity -@overload -def start_local_activity_class( - activity: Type[Callable[..., Awaitable[ReturnType]]], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync multi-param activity -@overload -def start_local_activity_class( - activity: Type[Callable[..., ReturnType]], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -def start_local_activity_class( - activity: Type[Callable], - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[Any]: - """Start a local activity from a callable class. - - See :py:meth:`start_local_activity` for parameter and return details. - """ - return _Runtime.current().workflow_start_local_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - result_type=None, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - retry_policy=retry_policy, - local_retry_threshold=local_retry_threshold, - cancellation_type=cancellation_type, - activity_id=activity_id, - summary=summary, - ) - - -# Overload for async no-param activity -@overload -async def execute_local_activity_class( - activity: Type[CallableAsyncNoParam[ReturnType]], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for sync no-param activity -@overload -async def execute_local_activity_class( - activity: Type[CallableSyncNoParam[ReturnType]], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for async single-param activity -@overload -async def execute_local_activity_class( - activity: Type[CallableAsyncSingleParam[ParamType, ReturnType]], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for sync single-param activity -@overload -async def execute_local_activity_class( - activity: Type[CallableSyncSingleParam[ParamType, ReturnType]], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for async multi-param activity -@overload -async def execute_local_activity_class( - activity: Type[Callable[..., Awaitable[ReturnType]]], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for sync multi-param activity -@overload -async def execute_local_activity_class( - activity: Type[Callable[..., ReturnType]], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -async def execute_local_activity_class( - activity: Type[Callable], - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> Any: - """Start a local activity from a callable class and wait for completion. - - This is a shortcut for ``await`` :py:meth:`start_local_activity_class`. - """ - # We call the runtime directly instead of top-level start_local_activity to - # ensure we don't miss new parameters - return await _Runtime.current().workflow_start_local_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - result_type=None, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - retry_policy=retry_policy, - local_retry_threshold=local_retry_threshold, - cancellation_type=cancellation_type, - activity_id=activity_id, - summary=summary, - ) - - -# Overload for async no-param activity -@overload -def start_local_activity_method( - activity: MethodAsyncNoParam[SelfType, ReturnType], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync no-param activity -@overload -def start_local_activity_method( - activity: MethodSyncNoParam[SelfType, ReturnType], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async single-param activity -@overload -def start_local_activity_method( - activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync single-param activity -@overload -def start_local_activity_method( - activity: MethodSyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for async multi-param activity -@overload -def start_local_activity_method( - activity: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -# Overload for sync multi-param activity -@overload -def start_local_activity_method( - activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[ReturnType]: ... - - -def start_local_activity_method( - activity: Callable, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ActivityHandle[Any]: - """Start a local activity from a method. - - See :py:meth:`start_local_activity` for parameter and return details. - """ - return _Runtime.current().workflow_start_local_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - result_type=None, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - retry_policy=retry_policy, - local_retry_threshold=local_retry_threshold, - cancellation_type=cancellation_type, - activity_id=activity_id, - summary=summary, - ) - - -# Overload for async no-param activity -@overload -async def execute_local_activity_method( - activity: MethodAsyncNoParam[SelfType, ReturnType], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for sync no-param activity -@overload -async def execute_local_activity_method( - activity: MethodSyncNoParam[SelfType, ReturnType], - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for async single-param activity -@overload -async def execute_local_activity_method( - activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for sync single-param activity -@overload -async def execute_local_activity_method( - activity: MethodSyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for async multi-param activity -@overload -async def execute_local_activity_method( - activity: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -# Overload for sync multi-param activity -@overload -async def execute_local_activity_method( - activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], - *, - args: Sequence[Any], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> ReturnType: ... - - -async def execute_local_activity_method( - activity: Callable, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - schedule_to_close_timeout: timedelta | None = None, - schedule_to_start_timeout: timedelta | None = None, - start_to_close_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - local_retry_threshold: timedelta | None = None, - cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, - activity_id: str | None = None, - summary: str | None = None, -) -> Any: - """Start a local activity from a method and wait for completion. - - This is a shortcut for ``await`` :py:meth:`start_local_activity_method`. - """ - # We call the runtime directly instead of top-level start_local_activity to - # ensure we don't miss new parameters - return await _Runtime.current().workflow_start_local_activity( - activity, - *temporalio.common._arg_or_args(arg, args), - result_type=None, - schedule_to_close_timeout=schedule_to_close_timeout, - schedule_to_start_timeout=schedule_to_start_timeout, - start_to_close_timeout=start_to_close_timeout, - retry_policy=retry_policy, - local_retry_threshold=local_retry_threshold, - cancellation_type=cancellation_type, - activity_id=activity_id, - summary=summary, - ) - - -class ChildWorkflowHandle(_AsyncioTask[ReturnType], Generic[SelfType, ReturnType]): # type: ignore[type-var] - """Handle for interacting with a child workflow. - - This is created via :py:func:`start_child_workflow`. - - This extends :py:class:`asyncio.Task` and supports all task features. - """ - - @property - def id(self) -> str: - """ID for the workflow.""" - raise NotImplementedError - - @property - def first_execution_run_id(self) -> str | None: - """Run ID for the workflow.""" - raise NotImplementedError - - @overload - async def signal( - self, - signal: MethodSyncOrAsyncNoParam[SelfType, None], - ) -> None: ... - - @overload - async def signal( - self, - signal: MethodSyncOrAsyncSingleParam[SelfType, ParamType, None], - arg: ParamType, - ) -> None: ... - - @overload - async def signal( - self, - signal: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[None] | None], - *, - args: Sequence[Any], - ) -> None: ... - - @overload - async def signal( - self, - signal: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - ) -> None: ... - - async def signal( - self, - signal: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - ) -> None: - """Signal this child workflow. - - Args: - signal: Name or method reference for the signal. - arg: Single argument to the signal. - args: Multiple arguments to the signal. Cannot be set if arg is. - - """ - raise NotImplementedError - - -class ChildWorkflowCancellationType(IntEnum): - """How a child workflow cancellation should be handled.""" - - ABANDON = int( - temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.ABANDON - ) - TRY_CANCEL = int( - temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.TRY_CANCEL - ) - WAIT_CANCELLATION_COMPLETED = int( - temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED - ) - WAIT_CANCELLATION_REQUESTED = int( - temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.WAIT_CANCELLATION_REQUESTED - ) - - -class ParentClosePolicy(IntEnum): - """How a child workflow should be handled when the parent closes.""" - - UNSPECIFIED = int( - temporalio.bridge.proto.child_workflow.ParentClosePolicy.PARENT_CLOSE_POLICY_UNSPECIFIED - ) - TERMINATE = int( - temporalio.bridge.proto.child_workflow.ParentClosePolicy.PARENT_CLOSE_POLICY_TERMINATE - ) - ABANDON = int( - temporalio.bridge.proto.child_workflow.ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON - ) - REQUEST_CANCEL = int( - temporalio.bridge.proto.child_workflow.ParentClosePolicy.PARENT_CLOSE_POLICY_REQUEST_CANCEL - ) - - -class ChildWorkflowConfig(TypedDict, total=False): - """TypedDict of config that can be used for :py:func:`start_child_workflow` - and :py:func:`execute_child_workflow`. - """ - - id: str | None - task_queue: str | None - cancellation_type: ChildWorkflowCancellationType - parent_close_policy: ParentClosePolicy - execution_timeout: timedelta | None - run_timeout: timedelta | None - task_timeout: timedelta | None - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy - retry_policy: temporalio.common.RetryPolicy | None - cron_schedule: str - memo: Mapping[str, Any] | None - search_attributes: None | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) - versioning_intent: VersioningIntent | None - static_summary: str | None - static_details: str | None - priority: temporalio.common.Priority - - -# Overload for no-param workflow -@overload -async def start_child_workflow( - workflow: MethodAsyncNoParam[SelfType, ReturnType], - *, - id: str | None = None, - task_queue: str | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ChildWorkflowHandle[SelfType, ReturnType]: ... - - -# Overload for single-param workflow -@overload -async def start_child_workflow( - workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - id: str | None = None, - task_queue: str | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ChildWorkflowHandle[SelfType, ReturnType]: ... - - -# Overload for multi-param workflow -@overload -async def start_child_workflow( - workflow: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], - *, - args: Sequence[Any], - id: str | None = None, - task_queue: str | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ChildWorkflowHandle[SelfType, ReturnType]: ... - - -# Overload for string-name workflow -@overload -async def start_child_workflow( - workflow: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str | None = None, - task_queue: str | None = None, - result_type: type | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ChildWorkflowHandle[Any, Any]: ... - - -async def start_child_workflow( - workflow: Any, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str | None = None, - task_queue: str | None = None, - result_type: type | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ChildWorkflowHandle[Any, Any]: - """Start a child workflow and return its handle. - - Args: - workflow: String name or class method decorated with ``@workflow.run`` - for the workflow to start. - arg: Single argument to the child workflow. - args: Multiple arguments to the child workflow. Cannot be set if arg is. - id: Optional unique identifier for the workflow execution. If not set, - defaults to :py:func:`uuid4`. - task_queue: Task queue to run the workflow on. Defaults to the current - workflow's task queue. - result_type: For string workflows, this can set the specific result type - hint to deserialize into. - cancellation_type: How the child workflow will react to cancellation. - parent_close_policy: How to handle the child workflow when the parent - workflow closes. - execution_timeout: Total workflow execution timeout including - retries and continue as new. - run_timeout: Timeout of a single workflow run. - task_timeout: Timeout of a single workflow task. - id_reuse_policy: How already-existing IDs are treated. - retry_policy: Retry policy for the workflow. - cron_schedule: See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ - memo: Memo for the workflow. - search_attributes: Search attributes for the workflow. The dictionary - form of this is DEPRECATED. - versioning_intent: When using the Worker Versioning feature, specifies whether this Child - Workflow should run on a worker with a compatible Build Id or not. - Deprecated: Use Worker Deployment versioning instead. - static_summary: A single-line fixed summary for this child workflow execution that may appear - in the UI/CLI. This can be in single-line Temporal markdown format. - static_details: General fixed details for this child workflow execution that may appear in - UI/CLI. This can be in Temporal markdown format and can span multiple lines. This is - a fixed value on the workflow that cannot be updated. For details that can be - updated, use :py:meth:`get_current_details` within the workflow. - priority: Priority to use for this workflow. - - Returns: - A workflow handle to the started/existing workflow. - """ - temporalio.common._warn_on_deprecated_search_attributes(search_attributes) - return await _Runtime.current().workflow_start_child_workflow( - workflow, - *temporalio.common._arg_or_args(arg, args), - id=id or str(uuid4()), - task_queue=task_queue, - result_type=result_type, - cancellation_type=cancellation_type, - parent_close_policy=parent_close_policy, - execution_timeout=execution_timeout, - run_timeout=run_timeout, - task_timeout=task_timeout, - id_reuse_policy=id_reuse_policy, - retry_policy=retry_policy, - cron_schedule=cron_schedule, - memo=memo, - search_attributes=search_attributes, - versioning_intent=versioning_intent, - static_summary=static_summary, - static_details=static_details, - priority=priority, - ) - - -# Overload for no-param workflow -@overload -async def execute_child_workflow( - workflow: MethodAsyncNoParam[SelfType, ReturnType], - *, - id: str | None = None, - task_queue: str | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for single-param workflow -@overload -async def execute_child_workflow( - workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], - arg: ParamType, - *, - id: str | None = None, - task_queue: str | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for multi-param workflow -@overload -async def execute_child_workflow( - workflow: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], - *, - args: Sequence[Any], - id: str | None = None, - task_queue: str | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> ReturnType: ... - - -# Overload for string-name workflow -@overload -async def execute_child_workflow( - workflow: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str | None = None, - task_queue: str | None = None, - result_type: type | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> Any: ... - - -async def execute_child_workflow( - workflow: Any, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - id: str | None = None, - task_queue: str | None = None, - result_type: type | None = None, - cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, - parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, - execution_timeout: timedelta | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, - retry_policy: temporalio.common.RetryPolicy | None = None, - cron_schedule: str = "", - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, - static_summary: str | None = None, - static_details: str | None = None, - priority: temporalio.common.Priority = temporalio.common.Priority.default, -) -> Any: - """Start a child workflow and wait for completion. - - This is a shortcut for ``await (await`` :py:meth:`start_child_workflow` ``)``. - """ - temporalio.common._warn_on_deprecated_search_attributes(search_attributes) - # We call the runtime directly instead of top-level start_child_workflow to - # ensure we don't miss new parameters - handle = await _Runtime.current().workflow_start_child_workflow( - workflow, - *temporalio.common._arg_or_args(arg, args), - id=id or str(uuid4()), - task_queue=task_queue, - result_type=result_type, - cancellation_type=cancellation_type, - parent_close_policy=parent_close_policy, - execution_timeout=execution_timeout, - run_timeout=run_timeout, - task_timeout=task_timeout, - id_reuse_policy=id_reuse_policy, - retry_policy=retry_policy, - cron_schedule=cron_schedule, - memo=memo, - search_attributes=search_attributes, - versioning_intent=versioning_intent, - static_summary=static_summary, - static_details=static_details, - priority=priority, - ) - return await handle - - -class NexusOperationHandle(Generic[OutputT]): - """Handle for interacting with a Nexus operation. - - .. warning:: - This API is experimental and unstable. - """ - - # TODO(nexus-preview): should attempts to instantiate directly throw? - - def cancel(self) -> bool: - """Request cancellation of the operation.""" - raise NotImplementedError - - def __await__(self) -> Generator[Any, Any, OutputT]: - """Support await.""" - raise NotImplementedError - - @property - def operation_token(self) -> str | None: - """The operation token for this handle.""" - raise NotImplementedError - - -class ExternalWorkflowHandle(Generic[SelfType]): - """Handle for interacting with an external workflow. - - This is created via :py:func:`get_external_workflow_handle` or - :py:func:`get_external_workflow_handle_for`. - """ - - @property - def id(self) -> str: - """ID for the workflow.""" - raise NotImplementedError - - @property - def run_id(self) -> str | None: - """Run ID for the workflow if any.""" - raise NotImplementedError - - @overload - async def signal( - self, - signal: MethodSyncOrAsyncNoParam[SelfType, None], - ) -> None: ... - - @overload - async def signal( - self, - signal: MethodSyncOrAsyncSingleParam[SelfType, ParamType, None], - arg: ParamType, - ) -> None: ... - - @overload - async def signal( - self, - signal: str, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - ) -> None: ... - - async def signal( - self, - signal: str | Callable, - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - ) -> None: - """Signal this external workflow. - - Args: - signal: Name or method reference for the signal. - arg: Single argument to the signal. - args: Multiple arguments to the signal. Cannot be set if arg is. - - """ - raise NotImplementedError - - async def cancel(self) -> None: - """Send a cancellation request to this external workflow. - - This will fail if the workflow cannot accept the request (e.g. if the - workflow is not found). - """ - raise NotImplementedError - - -def get_external_workflow_handle( - workflow_id: str, - *, - run_id: str | None = None, -) -> ExternalWorkflowHandle[Any]: - """Get a workflow handle to an existing workflow by its ID. - - Args: - workflow_id: Workflow ID to get a handle to. - run_id: Optional run ID for the workflow. - - Returns: - The external workflow handle. - """ - return _Runtime.current().workflow_get_external_workflow_handle( - workflow_id, run_id=run_id - ) - - -def get_external_workflow_handle_for( - workflow: ( - MethodAsyncNoParam[SelfType, Any] | MethodAsyncSingleParam[SelfType, Any, Any] - ), - workflow_id: str, - *, - run_id: str | None = None, -) -> ExternalWorkflowHandle[SelfType]: - """Get a typed workflow handle to an existing workflow by its ID. - - This is the same as :py:func:`get_external_workflow_handle` but typed. Note, - the workflow type given is not validated, it is only for typing. - - Args: - workflow: The workflow run method to use for typing the handle. - workflow_id: Workflow ID to get a handle to. - run_id: Optional run ID for the workflow. - - Returns: - The external workflow handle. - """ - return get_external_workflow_handle(workflow_id, run_id=run_id) - - -class ContinueAsNewError(BaseException): - """Error thrown by :py:func:`continue_as_new`. - - This should not be caught, but instead be allowed to throw out of the - workflow which then triggers the continue as new. This should never be - instantiated directly. - """ - - def __init__(self, *args: object) -> None: - """Direct instantiation is disabled. Use :py:func:`continue_as_new`.""" - if type(self) == ContinueAsNewError: - raise RuntimeError("Cannot instantiate ContinueAsNewError directly") - super().__init__(*args) - - -# Overload for self (unfortunately, cannot type args) -@overload -def continue_as_new( - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - task_queue: str | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, -) -> NoReturn: ... - - -# Overload for no-param workflow -@overload -def continue_as_new( - *, - workflow: MethodAsyncNoParam[SelfType, Any], - task_queue: str | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, -) -> NoReturn: ... - - -# Overload for single-param workflow -@overload -def continue_as_new( - arg: ParamType, - *, - workflow: MethodAsyncSingleParam[SelfType, ParamType, Any], - task_queue: str | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, -) -> NoReturn: ... - - -# Overload for multi-param workflow -@overload -def continue_as_new( - *, - workflow: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[Any]], - args: Sequence[Any], - task_queue: str | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, -) -> NoReturn: ... - - -# Overload for string-name workflow -@overload -def continue_as_new( - *, - workflow: str, - args: Sequence[Any] = [], - task_queue: str | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, -) -> NoReturn: ... - - -def continue_as_new( - arg: Any = temporalio.common._arg_unset, - *, - args: Sequence[Any] = [], - workflow: None | Callable | str = None, - task_queue: str | None = None, - run_timeout: timedelta | None = None, - task_timeout: timedelta | None = None, - retry_policy: temporalio.common.RetryPolicy | None = None, - memo: Mapping[str, Any] | None = None, - search_attributes: None - | ( - temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes - ) = None, - versioning_intent: VersioningIntent | None = None, -) -> NoReturn: - """Stop the workflow immediately and continue as new. - - Args: - arg: Single argument to the continued workflow. - args: Multiple arguments to the continued workflow. Cannot be set if arg - is. - workflow: Specific workflow to continue to. Defaults to the current - workflow. - task_queue: Task queue to run the workflow on. Defaults to the current - workflow's task queue. - run_timeout: Timeout of a single workflow run. Defaults to the current - workflow's run timeout. - task_timeout: Timeout of a single workflow task. Defaults to the current - workflow's task timeout. - memo: Memo for the workflow. Defaults to the current workflow's memo. - search_attributes: Search attributes for the workflow. Defaults to the - current workflow's search attributes. The dictionary form of this is - DEPRECATED. - versioning_intent: When using the Worker Versioning feature, specifies whether this Workflow - should Continue-as-New onto a worker with a compatible Build Id or not. - Deprecated: Use Worker Deployment versioning instead. - - Returns: - Never returns, always raises a :py:class:`ContinueAsNewError`. - - Raises: - ContinueAsNewError: Always raised by this function. Should not be caught - but instead be allowed to - """ - temporalio.common._warn_on_deprecated_search_attributes(search_attributes) - _Runtime.current().workflow_continue_as_new( - *temporalio.common._arg_or_args(arg, args), - workflow=workflow, - task_queue=task_queue, - run_timeout=run_timeout, - task_timeout=task_timeout, - retry_policy=retry_policy, - memo=memo, - search_attributes=search_attributes, - versioning_intent=versioning_intent, - ) - - -def get_signal_handler(name: str) -> Callable | None: - """Get the signal handler for the given name if any. - - This includes handlers created via the ``@workflow.signal`` decorator. - - Args: - name: Name of the signal. - - Returns: - Callable for the signal if any. If a handler is not found for the name, - this will not return the dynamic handler even if there is one. - """ - return _Runtime.current().workflow_get_signal_handler(name) - - -def set_signal_handler(name: str, handler: Callable | None) -> None: - """Set or unset the signal handler for the given name. - - This overrides any existing handlers for the given name, including handlers - created via the ``@workflow.signal`` decorator. - - When set, all unhandled past signals for the given name are immediately sent - to the handler. - - Args: - name: Name of the signal. - handler: Callable to set or None to unset. - """ - _Runtime.current().workflow_set_signal_handler(name, handler) - - -def get_dynamic_signal_handler() -> Callable | None: - """Get the dynamic signal handler if any. - - This includes dynamic handlers created via the ``@workflow.signal`` - decorator. - - Returns: - Callable for the dynamic signal handler if any. - """ - return _Runtime.current().workflow_get_signal_handler(None) - - -def set_dynamic_signal_handler(handler: Callable | None) -> None: - """Set or unset the dynamic signal handler. - - This overrides the existing dynamic handler even if it was created via the - ``@workflow.signal`` decorator. - - When set, all unhandled past signals are immediately sent to the handler. - - Args: - handler: Callable to set or None to unset. - """ - _Runtime.current().workflow_set_signal_handler(None, handler) - - -def get_query_handler(name: str) -> Callable | None: - """Get the query handler for the given name if any. - - This includes handlers created via the ``@workflow.query`` decorator. - - Args: - name: Name of the query. - - Returns: - Callable for the query if any. If a handler is not found for the name, - this will not return the dynamic handler even if there is one. - """ - return _Runtime.current().workflow_get_query_handler(name) - - -def set_query_handler(name: str, handler: Callable | None) -> None: - """Set or unset the query handler for the given name. - - This overrides any existing handlers for the given name, including handlers - created via the ``@workflow.query`` decorator. - - Args: - name: Name of the query. - handler: Callable to set or None to unset. - """ - _Runtime.current().workflow_set_query_handler(name, handler) - - -def get_dynamic_query_handler() -> Callable | None: - """Get the dynamic query handler if any. - - This includes dynamic handlers created via the ``@workflow.query`` - decorator. - - Returns: - Callable for the dynamic query handler if any. - """ - return _Runtime.current().workflow_get_query_handler(None) - - -def set_dynamic_query_handler(handler: Callable | None) -> None: - """Set or unset the dynamic query handler. - - This overrides the existing dynamic handler even if it was created via the - ``@workflow.query`` decorator. - - Args: - handler: Callable to set or None to unset. - """ - _Runtime.current().workflow_set_query_handler(None, handler) - - -def get_update_handler(name: str) -> Callable | None: - """Get the update handler for the given name if any. - - This includes handlers created via the ``@workflow.update`` decorator. - - Args: - name: Name of the update. - - Returns: - Callable for the update if any. If a handler is not found for the name, - this will not return the dynamic handler even if there is one. - """ - return _Runtime.current().workflow_get_update_handler(name) - - -def set_update_handler( - name: str, handler: Callable | None, *, validator: Callable | None = None -) -> None: - """Set or unset the update handler for the given name. - - This overrides any existing handlers for the given name, including handlers - created via the ``@workflow.update`` decorator. - - Args: - name: Name of the update. - handler: Callable to set or None to unset. - validator: Callable to set or None to unset as the update validator. - """ - _Runtime.current().workflow_set_update_handler(name, handler, validator) - - -def get_dynamic_update_handler() -> Callable | None: - """Get the dynamic update handler if any. - - This includes dynamic handlers created via the ``@workflow.update`` - decorator. - - Returns: - Callable for the dynamic update handler if any. - """ - return _Runtime.current().workflow_get_update_handler(None) - - -def set_dynamic_update_handler( - handler: Callable | None, *, validator: Callable | None = None -) -> None: - """Set or unset the dynamic update handler. - - This overrides the existing dynamic handler even if it was created via the - ``@workflow.update`` decorator. - - Args: - handler: Callable to set or None to unset. - validator: Callable to set or None to unset as the update validator. - """ - _Runtime.current().workflow_set_update_handler(None, handler, validator) - - -def all_handlers_finished() -> bool: - """Whether update and signal handlers have finished executing. - - Consider waiting on this condition before workflow return or continue-as-new, to prevent - interruption of in-progress handlers by workflow exit: - ``await workflow.wait_condition(lambda: workflow.all_handlers_finished())`` - - Returns: - True if there are no in-progress update or signal handler executions. - """ - return _Runtime.current().workflow_all_handlers_finished() - - -def as_completed( - fs: Iterable[Awaitable[AnyType]], *, timeout: float | None = None -) -> Iterator[Awaitable[AnyType]]: - """Return an iterator whose values are coroutines. - - This is a deterministic version of :py:func:`asyncio.as_completed`. This - function should be used instead of that one in workflows. - """ - # Taken almost verbatim from - # https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L584 - # but the "set" is changed out for a "list" and fixed up some typing/format - - if asyncio.isfuture(fs) or asyncio.iscoroutine(fs): - raise TypeError(f"expect an iterable of futures, not {type(fs).__name__}") - - done: asyncio.Queue[asyncio.Future | None] = asyncio.Queue() - - loop = asyncio.get_event_loop() - todo: list[asyncio.Future] = [asyncio.ensure_future(f, loop=loop) for f in list(fs)] - timeout_handle = None - - def _on_timeout(): - for f in todo: - f.remove_done_callback(_on_completion) - done.put_nowait(None) # Queue a dummy value for _wait_for_one(). - todo.clear() # Can't do todo.remove(f) in the loop. - - def _on_completion(f): - if not todo: - return # _on_timeout() was here first. - todo.remove(f) - done.put_nowait(f) - if not todo and timeout_handle is not None: - timeout_handle.cancel() - - async def _wait_for_one(): - f = await done.get() - if f is None: - # Dummy value from _on_timeout(). - raise asyncio.TimeoutError - return f.result() # May raise f.exception(). - - for f in todo: - f.add_done_callback(_on_completion) - if todo and timeout is not None: - timeout_handle = loop.call_later(timeout, _on_timeout) - for _ in range(len(todo)): - yield _wait_for_one() - - -if TYPE_CHECKING: - _FT = TypeVar("_FT", bound=asyncio.Future[Any]) -else: - _FT = TypeVar("_FT", bound=asyncio.Future) - - -@overload -async def wait( # type: ignore[misc] - fs: Iterable[_FT], - *, - timeout: float | None = None, - return_when: str = asyncio.ALL_COMPLETED, -) -> tuple[list[_FT], list[_FT]]: ... - - -@overload -async def wait( - fs: Iterable[asyncio.Task[AnyType]], - *, - timeout: float | None = None, - return_when: str = asyncio.ALL_COMPLETED, -) -> tuple[list[asyncio.Task[AnyType]], list[asyncio.Task[AnyType]]]: ... - - -async def wait( - fs: Iterable, - *, - timeout: float | None = None, - return_when: str = asyncio.ALL_COMPLETED, -) -> tuple: - """Wait for the Futures or Tasks given by fs to complete. - - This is a deterministic version of :py:func:`asyncio.wait`. This function - should be used instead of that one in workflows. - """ - # Taken almost verbatim from - # https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L435 - # but the "set" is changed out for a "list" and fixed up some typing/format - - if asyncio.isfuture(fs) or asyncio.iscoroutine(fs): - raise TypeError(f"Expect an iterable of Tasks/Futures, not {type(fs).__name__}") - if not fs: - raise ValueError("Sequence of Tasks/Futures must not be empty.") - if return_when not in ( - asyncio.FIRST_COMPLETED, - asyncio.FIRST_EXCEPTION, - asyncio.ALL_COMPLETED, - ): - raise ValueError(f"Invalid return_when value: {return_when}") - - fs = list(fs) - - if any(asyncio.iscoroutine(f) for f in fs): - raise TypeError("Passing coroutines is forbidden, use tasks explicitly.") - - loop = asyncio.get_running_loop() - return await _wait(fs, timeout, return_when, loop) - - -async def _wait( - fs: Iterable[asyncio.Future | asyncio.Task], - timeout: float | None, - return_when: str, - loop: asyncio.AbstractEventLoop, -) -> tuple[list, list]: - # Taken almost verbatim from - # https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L522 - # but the "set" is changed out for a "list" and fixed up some typing/format - - assert fs, "Sequence of Tasks/Futures must not be empty." - waiter = loop.create_future() - timeout_handle = None - if timeout is not None: - timeout_handle = loop.call_later(timeout, _release_waiter, waiter) - counter = len(fs) # type: ignore[arg-type] - - def _on_completion(f): - nonlocal counter - counter -= 1 - if ( - counter <= 0 - or return_when == asyncio.FIRST_COMPLETED - or return_when == asyncio.FIRST_EXCEPTION - and (not f.cancelled() and f.exception() is not None) - ): - if timeout_handle is not None: - timeout_handle.cancel() - if not waiter.done(): - waiter.set_result(None) - - for f in fs: - f.add_done_callback(_on_completion) - - try: - await waiter - finally: - if timeout_handle is not None: - timeout_handle.cancel() - for f in fs: - f.remove_done_callback(_on_completion) - - done, pending = [], [] - for f in fs: - if f.done(): - done.append(f) - else: - pending.append(f) - return done, pending - - -def _release_waiter(waiter: asyncio.Future[Any], *args) -> None: - # Taken almost verbatim from - # https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L467 - - if not waiter.done(): - waiter.set_result(None) - - -def _is_unbound_method_on_cls(fn: Callable[..., Any], cls: type) -> bool: - # Python 3 does not make this easy, ref https://stackoverflow.com/questions/3589311 - return ( - inspect.isfunction(fn) - and inspect.getmodule(fn) is inspect.getmodule(cls) - and fn.__qualname__.rsplit(".", 1)[0] == cls.__name__ - ) - - -class _UnexpectedEvictionError(temporalio.exceptions.TemporalError): - def __init__( - self, - reason: temporalio.bridge.proto.workflow_activation.RemoveFromCache.EvictionReason.ValueType, - message: str, - ) -> None: - self.reason = temporalio.bridge.proto.workflow_activation.RemoveFromCache.EvictionReason.Name( - reason - ) - self.message = message - super().__init__(f"{self.reason}: {message}") - - -class NondeterminismError(temporalio.exceptions.TemporalError): - """Error that can be thrown during replay for non-deterministic workflow.""" - - def __init__(self, message: str) -> None: - """Initialize a nondeterminism error.""" - super().__init__(message) - self.message = message - - -class ReadOnlyContextError(temporalio.exceptions.TemporalError): - """Error thrown when trying to do mutable workflow calls in a read-only - context like a query or update validator. - """ - - def __init__(self, message: str) -> None: - """Initialize a read-only context error.""" - super().__init__(message) - self.message = message - - -class _NotInWorkflowEventLoopError(temporalio.exceptions.TemporalError): - def __init__(self, *args: object) -> None: - super().__init__("Not in workflow event loop") - self.message = "Not in workflow event loop" - - -class VersioningIntent(Enum): - """Indicates whether the user intends certain commands to be run on a compatible worker Build - Id version or not. - - `COMPATIBLE` indicates that the command should run on a worker with compatible version if - possible. It may not be possible if the target task queue does not also have knowledge of the - current worker's Build Id. - - `DEFAULT` indicates that the command should run on the target task queue's current - overall-default Build Id. - - Where this type is accepted optionally, an unset value indicates that the SDK should choose the - most sensible default behavior for the type of command, accounting for whether the command will - be run on the same task queue as the current worker. - - .. deprecated:: - Use Worker Deployment versioning instead. - """ - - COMPATIBLE = 1 - DEFAULT = 2 - - def _to_proto(self) -> temporalio.bridge.proto.common.VersioningIntent.ValueType: - if self == VersioningIntent.COMPATIBLE: - return temporalio.bridge.proto.common.VersioningIntent.COMPATIBLE - elif self == VersioningIntent.DEFAULT: - return temporalio.bridge.proto.common.VersioningIntent.DEFAULT - return temporalio.bridge.proto.common.VersioningIntent.UNSPECIFIED - - -ServiceT = TypeVar("ServiceT") - - -class NexusOperationCancellationType(IntEnum): - """Defines behavior of a Nexus operation when the caller workflow initiates cancellation. - - Pass one of these values to :py:meth:`NexusClient.start_operation` to define cancellation - behavior. - - To initiate cancellation, use :py:meth:`NexusOperationHandle.cancel` and then ``await`` the - operation handle. This will result in a :py:class:`exceptions.NexusOperationError`. The values - of this enum define what is guaranteed to have happened by that point. - """ - - ABANDON = int(temporalio.bridge.proto.nexus.NexusOperationCancellationType.ABANDON) - """Do not send any cancellation request to the operation handler; just report cancellation to the caller""" - - TRY_CANCEL = int( - temporalio.bridge.proto.nexus.NexusOperationCancellationType.TRY_CANCEL - ) - """Send a cancellation request but immediately report cancellation to the caller. Note that this - does not guarantee that cancellation is delivered to the operation handler if the caller exits - before the delivery is done. - """ - - WAIT_REQUESTED = int( - temporalio.bridge.proto.nexus.NexusOperationCancellationType.WAIT_CANCELLATION_REQUESTED - ) - """Send a cancellation request and wait for confirmation that the request was received. - Does not wait for the operation to complete. - """ - - WAIT_COMPLETED = int( - temporalio.bridge.proto.nexus.NexusOperationCancellationType.WAIT_CANCELLATION_COMPLETED - ) - """Send a cancellation request and wait for the operation to complete. - Note that the operation may not complete as cancelled (for example, if it catches the - :py:exc:`asyncio.CancelledError` resulting from the cancellation request).""" - - -class NexusClient(ABC, Generic[ServiceT]): - """A client for invoking Nexus operations. - - .. warning:: - This API is experimental and unstable. - - Example:: - - nexus_client = workflow.create_nexus_client( - endpoint=my_nexus_endpoint, - service=MyService, - ) - handle = await nexus_client.start_operation( - operation=MyService.my_operation, - input=MyOperationInput(value="hello"), - schedule_to_close_timeout=timedelta(seconds=10), - ) - result = await handle.result() - """ - - # Overload for nexusrpc.Operation - @overload - @abstractmethod - async def start_operation( - self, - operation: nexusrpc.Operation[InputT, OutputT], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> NexusOperationHandle[OutputT]: ... - - # Overload for string operation name - @overload - @abstractmethod - async def start_operation( - self, - operation: str, - input: Any, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> NexusOperationHandle[OutputT]: ... - - # Overload for workflow_run_operation methods - @overload - @abstractmethod - async def start_operation( - self, - operation: Callable[ - [ServiceHandlerT, temporalio.nexus.WorkflowRunOperationContext, InputT], - Awaitable[temporalio.nexus.WorkflowHandle[OutputT]], - ], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> NexusOperationHandle[OutputT]: ... - - # Overload for sync_operation methods (async def) - @overload - @abstractmethod - async def start_operation( - self, - operation: Callable[ - [ServiceHandlerT, nexusrpc.handler.StartOperationContext, InputT], - Awaitable[OutputT], - ], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> NexusOperationHandle[OutputT]: ... - - # Overload for sync_operation methods (def) - @overload - @abstractmethod - async def start_operation( - self, - operation: Callable[ - [ServiceHandlerT, nexusrpc.handler.StartOperationContext, InputT], - OutputT, - ], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> NexusOperationHandle[OutputT]: ... - - # Overload for operation_handler - @overload - @abstractmethod - async def start_operation( - self, - operation: Callable[ - [ServiceHandlerT], nexusrpc.handler.OperationHandler[InputT, OutputT] - ], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> NexusOperationHandle[OutputT]: ... - - @abstractmethod - async def start_operation( - self, - operation: Any, - input: Any, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> Any: - """Start a Nexus operation and return its handle. - - Args: - operation: The Nexus operation. - input: The Nexus operation input. - output_type: The Nexus operation output type. - schedule_to_close_timeout: Timeout for the entire operation attempt. - headers: Headers to send with the Nexus HTTP request. - - Returns: - A handle to the Nexus operation. The result can be obtained as - ```python - await handle.result() - ``` - """ - ... - - # Overload for nexusrpc.Operation - @overload - @abstractmethod - async def execute_operation( - self, - operation: nexusrpc.Operation[InputT, OutputT], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> OutputT: ... - - # Overload for string operation name - @overload - @abstractmethod - async def execute_operation( - self, - operation: str, - input: Any, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> OutputT: ... - - # Overload for workflow_run_operation methods - @overload - @abstractmethod - async def execute_operation( - self, - operation: Callable[ - [ServiceHandlerT, temporalio.nexus.WorkflowRunOperationContext, InputT], - Awaitable[temporalio.nexus.WorkflowHandle[OutputT]], - ], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> OutputT: ... - - # TODO(nexus-preview): in practice, both these overloads match an async def sync - # operation (i.e. either can be deleted without causing a type error). - - # Overload for sync_operation methods (async def) - @overload - @abstractmethod - async def execute_operation( - self, - operation: Callable[ - [ServiceT, nexusrpc.handler.StartOperationContext, InputT], - Awaitable[OutputT], - ], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> OutputT: ... - - # Overload for sync_operation methods (def) - @overload - @abstractmethod - async def execute_operation( - self, - operation: Callable[ - [ServiceT, nexusrpc.handler.StartOperationContext, InputT], - OutputT, - ], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> OutputT: ... - - # Overload for operation_handler - @overload - @abstractmethod - async def execute_operation( - self, - operation: Callable[ - [ServiceT], - nexusrpc.handler.OperationHandler[InputT, OutputT], - ], - input: InputT, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> OutputT: ... - - @abstractmethod - async def execute_operation( - self, - operation: Any, - input: Any, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> Any: - """Execute a Nexus operation and return its result. - - Args: - operation: The Nexus operation. - input: The Nexus operation input. - output_type: The Nexus operation output type. - schedule_to_close_timeout: Timeout for the entire operation attempt. - headers: Headers to send with the Nexus HTTP request. - - Returns: - The operation result. - """ - ... - - -class _NexusClient(NexusClient[ServiceT]): - def __init__( - self, - *, - endpoint: str, - service: type[ServiceT] | str, - ) -> None: - """Create a Nexus client. - - Args: - service: The Nexus service. - endpoint: The Nexus endpoint. - """ - # If service is not a str, then it must be a service interface or implementation - # class. - if isinstance(service, str): - self.service_name = service - elif service_defn := nexusrpc.get_service_definition(service): - self.service_name = service_defn.name - else: - raise ValueError( - f"`service` may be a name (str), or a class decorated with either " - f"@nexusrpc.handler.service_handler or @nexusrpc.service. " - f"Invalid service type: {type(service)}" - ) - self.endpoint = endpoint - - async def start_operation( - self, - operation: Any, - input: Any, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> Any: - return ( - await temporalio.workflow._Runtime.current().workflow_start_nexus_operation( - endpoint=self.endpoint, - service=self.service_name, - operation=operation, - input=input, - output_type=output_type, - schedule_to_close_timeout=schedule_to_close_timeout, - cancellation_type=cancellation_type, - headers=headers, - summary=summary, - ) - ) - - async def execute_operation( - self, - operation: Any, - input: Any, - *, - output_type: type[OutputT] | None = None, - schedule_to_close_timeout: timedelta | None = None, - cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, - headers: Mapping[str, str] | None = None, - summary: str | None = None, - ) -> Any: - handle = await self.start_operation( - operation, - input, - output_type=output_type, - schedule_to_close_timeout=schedule_to_close_timeout, - cancellation_type=cancellation_type, - headers=headers, - summary=summary, - ) - return await handle - - -@overload -def create_nexus_client( - *, - service: type[ServiceT], - endpoint: str, -) -> NexusClient[ServiceT]: ... - - -@overload -def create_nexus_client( - *, - service: str, - endpoint: str, -) -> NexusClient[Any]: ... - - -def create_nexus_client( - *, - service: type[ServiceT] | str, - endpoint: str, -) -> NexusClient[ServiceT]: - """Create a Nexus client. - - .. warning:: - This API is experimental and unstable. - - Args: - service: The Nexus service. - endpoint: The Nexus endpoint. - """ - return _NexusClient(endpoint=endpoint, service=service) diff --git a/temporalio/workflow/__init__.py b/temporalio/workflow/__init__.py new file mode 100644 index 0000000000..c631fd88e8 --- /dev/null +++ b/temporalio/workflow/__init__.py @@ -0,0 +1,334 @@ +"""Utilities that can decorate or be called inside workflows.""" + +from __future__ import annotations + +# BEGIN GENERATED NEXUS SYSTEM EXPORTS +from temporalio.nexus.system.workflow_service import ( + signal_with_start_workflow, +) + +# END GENERATED NEXUS SYSTEM EXPORTS +from ..types import ( + AnyType, + CallableAsyncNoParam, + CallableAsyncSingleParam, + CallableAsyncType, + CallableSyncNoParam, + CallableSyncOrAsyncReturnNoneType, + CallableSyncOrAsyncType, + CallableSyncSingleParam, + CallableType, + ClassType, + MethodAsyncNoParam, + MethodAsyncSingleParam, + MethodSyncNoParam, + MethodSyncOrAsyncNoParam, + MethodSyncOrAsyncSingleParam, + MethodSyncSingleParam, + MultiParamSpec, + ParamType, + ProtocolReturnType, + ReturnType, + SelfType, +) +from ._activities import ( + ActivityCancellationType, + ActivityConfig, + ActivityHandle, + LocalActivityConfig, + _AsyncioTask, + execute_activity, + execute_activity_class, + execute_activity_method, + execute_local_activity, + execute_local_activity_class, + execute_local_activity_method, + start_activity, + start_activity_class, + start_activity_method, + start_local_activity, + start_local_activity_class, + start_local_activity_method, +) +from ._asyncio import ( + _FT, + _release_waiter, + _wait, + as_completed, + wait, +) +from ._context import ( + Info, + ParentInfo, + RootInfo, + UpdateInfo, + _current_update_info, + _Runtime, + _set_current_update_info, + cancellation_reason, + current_update_info, + deprecate_patch, + extern_functions, + get_current_details, + get_last_completion_result, + get_last_failure, + has_last_completion_result, + in_workflow, + info, + instance, + is_failure_exception, + memo, + memo_value, + metric_meter, + new_random, + now, + patched, + payload_converter, + random, + random_seed, + register_random_seed_callback, + set_current_details, + sleep, + time, + time_ns, + upsert_memo, + upsert_search_attributes, + uuid4, + uuid7, + wait_condition, +) +from ._definition import ( + DynamicWorkflowConfig, + _Definition, + _is_unbound_method_on_cls, + _parameters_identical_up_to_naming, + defn, + dynamic_config, + init, + run, +) +from ._event_groups import ( + EventGroup, + create_event_group, +) +from ._exceptions import ( + ContinueAsNewVersioningBehavior, + NondeterminismError, + ReadOnlyContextError, + VersioningIntent, + _NotInWorkflowEventLoopError, +) +from ._handlers import ( + HandlerUnfinishedPolicy, + UnfinishedSignalHandlersWarning, + UnfinishedUpdateHandlersWarning, + UpdateMethodMultiParam, + _assert_dynamic_handler_args, + _bind_method, + _QueryDefinition, + _SignalDefinition, + _update_validator, + _UpdateDefinition, + query, + signal, + update, +) +from ._nexus import ( + NexusClient, + NexusOperationCancellationType, + NexusOperationHandle, + _NexusClient, + create_nexus_client, +) +from ._sandbox import ( + LoggerAdapter, + SandboxImportNotificationPolicy, + _build_log_context, + _imports_passed_through, + _in_sandbox, + _sandbox_import_notification_policy_override, + _sandbox_unrestricted, + logger, + unsafe, +) +from ._workflow_ops import ( + ChildWorkflowCancellationType, + ChildWorkflowConfig, + ChildWorkflowHandle, + ContinueAsNewError, + ExternalWorkflowHandle, + ParentClosePolicy, + all_handlers_finished, + continue_as_new, + execute_child_workflow, + get_dynamic_query_handler, + get_dynamic_signal_handler, + get_dynamic_update_handler, + get_external_workflow_handle, + get_external_workflow_handle_for, + get_query_handler, + get_signal_handler, + get_update_handler, + set_dynamic_query_handler, + set_dynamic_signal_handler, + set_dynamic_update_handler, + set_query_handler, + set_signal_handler, + set_update_handler, + start_child_workflow, +) + +__all__ = [ + "ActivityCancellationType", + "ActivityConfig", + "ActivityHandle", + "LocalActivityConfig", + "execute_activity", + "execute_activity_class", + "execute_activity_method", + "execute_local_activity", + "execute_local_activity_class", + "execute_local_activity_method", + "start_activity", + "start_activity_class", + "start_activity_method", + "start_local_activity", + "start_local_activity_class", + "start_local_activity_method", + "as_completed", + "wait", + "Info", + "ParentInfo", + "RootInfo", + "UpdateInfo", + "cancellation_reason", + "current_update_info", + "deprecate_patch", + "extern_functions", + "get_current_details", + "get_last_completion_result", + "get_last_failure", + "has_last_completion_result", + "in_workflow", + "info", + "instance", + "is_failure_exception", + "memo", + "memo_value", + "metric_meter", + "new_random", + "now", + "patched", + "payload_converter", + "random", + "random_seed", + "register_random_seed_callback", + "set_current_details", + "sleep", + "time", + "time_ns", + "upsert_memo", + "upsert_search_attributes", + "uuid4", + "uuid7", + "wait_condition", + "DynamicWorkflowConfig", + "defn", + "dynamic_config", + "init", + "run", + "EventGroup", + "create_event_group", + "ContinueAsNewVersioningBehavior", + "NondeterminismError", + "ReadOnlyContextError", + "VersioningIntent", + "HandlerUnfinishedPolicy", + "UnfinishedSignalHandlersWarning", + "UnfinishedUpdateHandlersWarning", + "UpdateMethodMultiParam", + "query", + "signal", + "update", + "NexusClient", + "NexusOperationCancellationType", + "NexusOperationHandle", + "create_nexus_client", + "LoggerAdapter", + "SandboxImportNotificationPolicy", + "logger", + "unsafe", + "ChildWorkflowCancellationType", + "ChildWorkflowConfig", + "ChildWorkflowHandle", + "ContinueAsNewError", + "ExternalWorkflowHandle", + "ParentClosePolicy", + "all_handlers_finished", + "continue_as_new", + "execute_child_workflow", + "get_dynamic_query_handler", + "get_dynamic_signal_handler", + "get_dynamic_update_handler", + "get_external_workflow_handle", + "get_external_workflow_handle_for", + "get_query_handler", + "get_signal_handler", + "get_update_handler", + "set_dynamic_query_handler", + "set_dynamic_signal_handler", + "set_dynamic_update_handler", + "set_query_handler", + "set_signal_handler", + "set_update_handler", + "start_child_workflow", + "_AsyncioTask", + "_FT", + "_release_waiter", + "_wait", + "_current_update_info", + "_Runtime", + "_set_current_update_info", + "_Definition", + "_is_unbound_method_on_cls", + "_parameters_identical_up_to_naming", + "_NotInWorkflowEventLoopError", + "_assert_dynamic_handler_args", + "_bind_method", + "_QueryDefinition", + "_SignalDefinition", + "_update_validator", + "_UpdateDefinition", + "_NexusClient", + "_build_log_context", + "_imports_passed_through", + "_in_sandbox", + "_sandbox_import_notification_policy_override", + "_sandbox_unrestricted", + # Re-export Temporal-owned names that old temporalio/workflow.py imported + # at module scope so explicit imports from temporalio.workflow keep working. + "AnyType", + "CallableAsyncNoParam", + "CallableAsyncSingleParam", + "CallableAsyncType", + "CallableSyncNoParam", + "CallableSyncOrAsyncReturnNoneType", + "CallableSyncOrAsyncType", + "CallableSyncSingleParam", + "CallableType", + "ClassType", + "MethodAsyncNoParam", + "MethodAsyncSingleParam", + "MethodSyncNoParam", + "MethodSyncOrAsyncNoParam", + "MethodSyncOrAsyncSingleParam", + "MethodSyncSingleParam", + "MultiParamSpec", + "ParamType", + "ProtocolReturnType", + "ReturnType", + "SelfType", + # BEGIN GENERATED NEXUS SYSTEM __ALL__ + "signal_with_start_workflow", + # END GENERATED NEXUS SYSTEM __ALL__ +] diff --git a/temporalio/workflow/_activities.py b/temporalio/workflow/_activities.py new file mode 100644 index 0000000000..abb24ab096 --- /dev/null +++ b/temporalio/workflow/_activities.py @@ -0,0 +1,2127 @@ +from __future__ import annotations + +import asyncio +from collections.abc import Awaitable, Callable, Sequence +from datetime import timedelta +from enum import IntEnum +from typing import TYPE_CHECKING, Any, Concatenate, Generic, TypedDict, overload + +import temporalio.bridge.proto.workflow_commands +import temporalio.common + +from ..types import ( + AnyType, + CallableAsyncNoParam, + CallableAsyncSingleParam, + CallableSyncNoParam, + CallableSyncSingleParam, + MethodAsyncNoParam, + MethodAsyncSingleParam, + MethodSyncNoParam, + MethodSyncSingleParam, + MultiParamSpec, + ParamType, + ReturnType, + SelfType, +) +from ._context import _Runtime +from ._event_groups import EventGroup +from ._exceptions import VersioningIntent + +__all__ = [ + "ActivityCancellationType", + "ActivityConfig", + "ActivityHandle", + "LocalActivityConfig", + "execute_activity", + "execute_activity_class", + "execute_activity_method", + "execute_local_activity", + "execute_local_activity_class", + "execute_local_activity_method", + "start_activity", + "start_activity_class", + "start_activity_method", + "start_local_activity", + "start_local_activity_class", + "start_local_activity_method", +] + +# See https://mypy.readthedocs.io/en/latest/runtime_troubles.html#using-classes-that-are-generic-in-stubs-but-not-at-runtime +if TYPE_CHECKING: + + class _AsyncioTask(asyncio.Task[AnyType]): + pass + +else: + # TODO: inherited classes should be other way around? + class _AsyncioTask(Generic[AnyType], asyncio.Task): + pass + + +class ActivityHandle(_AsyncioTask[ReturnType]): # type: ignore[type-var] + """Handle returned from :py:func:`start_activity` and + :py:func:`start_local_activity`. + + This extends :py:class:`asyncio.Task` and supports all task features. + """ + + pass + + +class ActivityCancellationType(IntEnum): + """How an activity cancellation should be handled.""" + + TRY_CANCEL = int( + temporalio.bridge.proto.workflow_commands.ActivityCancellationType.TRY_CANCEL + ) + WAIT_CANCELLATION_COMPLETED = int( + temporalio.bridge.proto.workflow_commands.ActivityCancellationType.WAIT_CANCELLATION_COMPLETED + ) + ABANDON = int( + temporalio.bridge.proto.workflow_commands.ActivityCancellationType.ABANDON + ) + + +class ActivityConfig(TypedDict, total=False): + """TypedDict of config that can be used for :py:func:`start_activity` and + :py:func:`execute_activity`. + + ``event_groups`` is experimental and may change without notice. + """ + + task_queue: str | None + schedule_to_close_timeout: timedelta | None + schedule_to_start_timeout: timedelta | None + start_to_close_timeout: timedelta | None + heartbeat_timeout: timedelta | None + retry_policy: temporalio.common.RetryPolicy | None + cancellation_type: ActivityCancellationType + activity_id: str | None + versioning_intent: VersioningIntent | None + summary: str | None + event_groups: Sequence[EventGroup] | None + priority: temporalio.common.Priority + + +# Overload for async no-param activity +@overload +def start_activity( + activity: CallableAsyncNoParam[ReturnType], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync no-param activity +@overload +def start_activity( + activity: CallableSyncNoParam[ReturnType], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async single-param activity +@overload +def start_activity( + activity: CallableAsyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync single-param activity +@overload +def start_activity( + activity: CallableSyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async multi-param activity +@overload +def start_activity( + activity: Callable[..., Awaitable[ReturnType]], + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync multi-param activity +@overload +def start_activity( + activity: Callable[..., ReturnType], + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for string-name activity +@overload +def start_activity( + activity: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + task_queue: str | None = None, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[Any]: ... + + +def start_activity( + activity: Any, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + task_queue: str | None = None, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[Any]: + """Start an activity and return its handle. + + At least one of ``schedule_to_close_timeout`` or ``start_to_close_timeout`` + must be present. + + Args: + activity: Activity name or function reference. + arg: Single argument to the activity. + args: Multiple arguments to the activity. Cannot be set if arg is. + task_queue: Task queue to run the activity on. Defaults to the current + workflow's task queue. + result_type: For string activities, this can set the specific result + type hint to deserialize into. + schedule_to_close_timeout: Max amount of time the activity can take from + first being scheduled to being completed before it times out. This + is inclusive of all retries. + schedule_to_start_timeout: Max amount of time the activity can take to + be started from first being scheduled. + start_to_close_timeout: Max amount of time a single activity run can + take from when it starts to when it completes. This is per retry. + heartbeat_timeout: How frequently an activity must invoke heartbeat + while running before it is considered timed out. + retry_policy: How an activity is retried on failure. If unset, a + server-defined default is used. Set maximum attempts to 1 to disable + retries. + cancellation_type: How the activity is treated when it is cancelled from + the workflow. + activity_id: Optional unique identifier for the activity. This is an + advanced setting that should not be set unless users are sure they + need to. Contact Temporal before setting this value. + versioning_intent: When using the Worker Versioning feature, specifies whether this Activity + should run on a worker with a compatible Build Id or not. + Deprecated: Use Worker Deployment versioning instead. + summary: A single-line fixed summary for this activity that may appear in UI/CLI. + This can be in single-line Temporal markdown format. + event_groups: Event Groups to associate this command with, in + addition to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + priority: Priority of the activity. + + Returns: + An activity handle to the activity which is an async task. + """ + return _Runtime.current().workflow_start_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + task_queue=task_queue, + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + retry_policy=retry_policy, + cancellation_type=cancellation_type, + activity_id=activity_id, + versioning_intent=versioning_intent, + summary=summary, + event_groups=event_groups, + priority=priority, + ) + + +# Overload for async no-param activity +@overload +async def execute_activity( + activity: CallableAsyncNoParam[ReturnType], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for sync no-param activity +@overload +async def execute_activity( + activity: CallableSyncNoParam[ReturnType], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for async single-param activity +@overload +async def execute_activity( + activity: CallableAsyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for sync single-param activity +@overload +async def execute_activity( + activity: CallableSyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for async multi-param activity +@overload +async def execute_activity( + activity: Callable[..., Awaitable[ReturnType]], + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for sync multi-param activity +@overload +async def execute_activity( + activity: Callable[..., ReturnType], + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for string-name activity +@overload +async def execute_activity( + activity: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + task_queue: str | None = None, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> Any: ... + + +async def execute_activity( + activity: Any, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + task_queue: str | None = None, + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> Any: + """Start an activity and wait for completion. + + This is a shortcut for ``await`` :py:meth:`start_activity`. + """ + # We call the runtime directly instead of top-level start_activity to ensure + # we don't miss new parameters + return await _Runtime.current().workflow_start_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + task_queue=task_queue, + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + retry_policy=retry_policy, + cancellation_type=cancellation_type, + activity_id=activity_id, + versioning_intent=versioning_intent, + summary=summary, + event_groups=event_groups, + priority=priority, + ) + + +# Overload for async no-param activity +@overload +def start_activity_class( + activity: type[CallableAsyncNoParam[ReturnType]], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync no-param activity +@overload +def start_activity_class( + activity: type[CallableSyncNoParam[ReturnType]], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async single-param activity +@overload +def start_activity_class( + activity: type[CallableAsyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync single-param activity +@overload +def start_activity_class( + activity: type[CallableSyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async multi-param activity +@overload +def start_activity_class( + activity: type[Callable[..., Awaitable[ReturnType]]], # type: ignore[reportOverlappingOverload] + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync multi-param activity +@overload +def start_activity_class( # type: ignore[reportOverlappingOverload] + activity: type[Callable[..., ReturnType]], # type: ignore[reportOverlappingOverload] + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +def start_activity_class( + activity: type[Callable], # type: ignore[reportOverlappingOverload] + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[Any]: + """Start an activity from a callable class. + + See :py:meth:`start_activity` for parameter and return details. + """ + return _Runtime.current().workflow_start_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + task_queue=task_queue, + result_type=None, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + retry_policy=retry_policy, + cancellation_type=cancellation_type, + activity_id=activity_id, + versioning_intent=versioning_intent, + summary=summary, + event_groups=event_groups, + priority=priority, + ) + + +# Overload for async no-param activity +@overload +async def execute_activity_class( + activity: type[CallableAsyncNoParam[ReturnType]], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for sync no-param activity +@overload +async def execute_activity_class( + activity: type[CallableSyncNoParam[ReturnType]], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for async single-param activity +@overload +async def execute_activity_class( + activity: type[CallableAsyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for sync single-param activity +@overload +async def execute_activity_class( + activity: type[CallableSyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for async multi-param activity +@overload +async def execute_activity_class( + activity: type[Callable[..., Awaitable[ReturnType]]], # type: ignore[reportOverlappingOverload] + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for sync multi-param activity +@overload +async def execute_activity_class( + activity: type[Callable[..., ReturnType]], # type: ignore[reportOverlappingOverload] + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +async def execute_activity_class( + activity: type[Callable], # type: ignore[reportOverlappingOverload] + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> Any: + """Start an activity from a callable class and wait for completion. + + This is a shortcut for ``await`` :py:meth:`start_activity_class`. + """ + return await _Runtime.current().workflow_start_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + task_queue=task_queue, + result_type=None, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + retry_policy=retry_policy, + cancellation_type=cancellation_type, + activity_id=activity_id, + versioning_intent=versioning_intent, + summary=summary, + event_groups=event_groups, + priority=priority, + ) + + +# Overload for async no-param activity +@overload +def start_activity_method( + activity: MethodAsyncNoParam[SelfType, ReturnType], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync no-param activity +@overload +def start_activity_method( + activity: MethodSyncNoParam[SelfType, ReturnType], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async single-param activity +@overload +def start_activity_method( + activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync single-param activity +@overload +def start_activity_method( + activity: MethodSyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async multi-param activity +@overload +def start_activity_method( + activity: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync multi-param activity +@overload +def start_activity_method( + activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[ReturnType]: ... + + +def start_activity_method( + activity: Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ActivityHandle[Any]: + """Start an activity from a method. + + See :py:meth:`start_activity` for parameter and return details. + """ + return _Runtime.current().workflow_start_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + task_queue=task_queue, + result_type=None, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + retry_policy=retry_policy, + cancellation_type=cancellation_type, + activity_id=activity_id, + versioning_intent=versioning_intent, + summary=summary, + event_groups=event_groups, + priority=priority, + ) + + +# Overload for async no-param activity +@overload +async def execute_activity_method( + activity: MethodAsyncNoParam[SelfType, ReturnType], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for sync no-param activity +@overload +async def execute_activity_method( + activity: MethodSyncNoParam[SelfType, ReturnType], + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for async single-param activity +@overload +async def execute_activity_method( + activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for sync single-param activity +@overload +async def execute_activity_method( + activity: MethodSyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for async multi-param activity +@overload +async def execute_activity_method( + activity: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +# Overload for sync multi-param activity +@overload +async def execute_activity_method( + activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], + *, + args: Sequence[Any], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> ReturnType: ... + + +async def execute_activity_method( + activity: Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + task_queue: str | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + heartbeat_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + versioning_intent: VersioningIntent | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, +) -> Any: + """Start an activity from a method and wait for completion. + + This is a shortcut for ``await`` :py:meth:`start_activity_method`. + """ + # We call the runtime directly instead of top-level start_activity to ensure + # we don't miss new parameters + return await _Runtime.current().workflow_start_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + task_queue=task_queue, + result_type=None, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + heartbeat_timeout=heartbeat_timeout, + retry_policy=retry_policy, + cancellation_type=cancellation_type, + activity_id=activity_id, + versioning_intent=versioning_intent, + summary=summary, + event_groups=event_groups, + priority=priority, + ) + + +class LocalActivityConfig(TypedDict, total=False): + """TypedDict of config that can be used for :py:func:`start_local_activity` + and :py:func:`execute_local_activity`. + + ``event_groups`` is experimental and may change without notice. + """ + + schedule_to_close_timeout: timedelta | None + schedule_to_start_timeout: timedelta | None + start_to_close_timeout: timedelta | None + retry_policy: temporalio.common.RetryPolicy | None + local_retry_threshold: timedelta | None + cancellation_type: ActivityCancellationType + activity_id: str | None + summary: str | None + event_groups: Sequence[EventGroup] | None + + +# Overload for async no-param activity +@overload +def start_local_activity( + activity: CallableAsyncNoParam[ReturnType], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync no-param activity +@overload +def start_local_activity( + activity: CallableSyncNoParam[ReturnType], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async single-param activity +@overload +def start_local_activity( + activity: CallableAsyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync single-param activity +@overload +def start_local_activity( + activity: CallableSyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async multi-param activity +@overload +def start_local_activity( + activity: Callable[..., Awaitable[ReturnType]], + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync multi-param activity +@overload +def start_local_activity( + activity: Callable[..., ReturnType], + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for string-name activity +@overload +def start_local_activity( + activity: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[Any]: ... + + +def start_local_activity( + activity: Any, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[Any]: + """Start a local activity and return its handle. + + At least one of ``schedule_to_close_timeout`` or ``start_to_close_timeout`` + must be present. + + Args: + activity: Activity name or function reference. + arg: Single argument to the activity. + args: Multiple arguments to the activity. Cannot be set if arg is. + result_type: For string activities, this can set the specific result + type hint to deserialize into. + schedule_to_close_timeout: Max amount of time the activity can take from + first being scheduled to being completed before it times out. This + is inclusive of all retries. + schedule_to_start_timeout: Max amount of time the activity can take to + be started from first being scheduled. + start_to_close_timeout: Max amount of time a single activity run can + take from when it starts to when it completes. This is per retry. + retry_policy: How an activity is retried on failure. If unset, an + SDK-defined default is used. Set maximum attempts to 1 to disable + retries. + cancellation_type: How the activity is treated when it is cancelled from + the workflow. + activity_id: Optional unique identifier for the activity. This is an + advanced setting that should not be set unless users are sure they + need to. Contact Temporal before setting this value. + summary: Optional summary for the activity. + event_groups: Event Groups to associate this command with, in + addition to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + + Returns: + An activity handle to the activity which is an async task. + """ + return _Runtime.current().workflow_start_local_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + retry_policy=retry_policy, + local_retry_threshold=local_retry_threshold, + cancellation_type=cancellation_type, + activity_id=activity_id, + summary=summary, + event_groups=event_groups, + ) + + +# Overload for async no-param activity +@overload +async def execute_local_activity( + activity: CallableAsyncNoParam[ReturnType], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for sync no-param activity +@overload +async def execute_local_activity( + activity: CallableSyncNoParam[ReturnType], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for async single-param activity +@overload +async def execute_local_activity( + activity: CallableAsyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for sync single-param activity +@overload +async def execute_local_activity( + activity: CallableSyncSingleParam[ParamType, ReturnType], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for async multi-param activity +@overload +async def execute_local_activity( + activity: Callable[..., Awaitable[ReturnType]], + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for sync multi-param activity +@overload +async def execute_local_activity( + activity: Callable[..., ReturnType], + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for string-name activity +@overload +async def execute_local_activity( + activity: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> Any: ... + + +async def execute_local_activity( + activity: Any, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + result_type: type | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> Any: + """Start a local activity and wait for completion. + + This is a shortcut for ``await`` :py:meth:`start_local_activity`. + """ + # We call the runtime directly instead of top-level start_local_activity to + # ensure we don't miss new parameters + return await _Runtime.current().workflow_start_local_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + result_type=result_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + retry_policy=retry_policy, + local_retry_threshold=local_retry_threshold, + cancellation_type=cancellation_type, + activity_id=activity_id, + summary=summary, + event_groups=event_groups, + ) + + +# Overload for async no-param activity +@overload +def start_local_activity_class( + activity: type[CallableAsyncNoParam[ReturnType]], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync no-param activity +@overload +def start_local_activity_class( + activity: type[CallableSyncNoParam[ReturnType]], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async single-param activity +@overload +def start_local_activity_class( + activity: type[CallableAsyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync single-param activity +@overload +def start_local_activity_class( + activity: type[CallableSyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async multi-param activity +@overload +def start_local_activity_class( + activity: type[Callable[..., Awaitable[ReturnType]]], # type: ignore[reportInvalidTypeForm] + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync multi-param activity +@overload +def start_local_activity_class( # type: ignore[reportOverlappingOverload] + activity: type[Callable[..., ReturnType]], # type: ignore[reportInvalidTypeForm] + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +def start_local_activity_class( + activity: type[Callable], # type: ignore[reportInvalidTypeForm] + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[Any]: + """Start a local activity from a callable class. + + See :py:meth:`start_local_activity` for parameter and return details. + """ + return _Runtime.current().workflow_start_local_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + result_type=None, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + retry_policy=retry_policy, + local_retry_threshold=local_retry_threshold, + cancellation_type=cancellation_type, + activity_id=activity_id, + summary=summary, + event_groups=event_groups, + ) + + +# Overload for async no-param activity +@overload +async def execute_local_activity_class( + activity: type[CallableAsyncNoParam[ReturnType]], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for sync no-param activity +@overload +async def execute_local_activity_class( + activity: type[CallableSyncNoParam[ReturnType]], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for async single-param activity +@overload +async def execute_local_activity_class( + activity: type[CallableAsyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for sync single-param activity +@overload +async def execute_local_activity_class( + activity: type[CallableSyncSingleParam[ParamType, ReturnType]], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for async multi-param activity +@overload +async def execute_local_activity_class( # type: ignore[reportOverlappingOverload] + activity: type[Callable[..., Awaitable[ReturnType]]], # type: ignore[reportInvalidTypeForm] + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for sync multi-param activity +@overload +async def execute_local_activity_class( + activity: type[Callable[..., ReturnType]], # type: ignore[reportInvalidTypeForm] + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +async def execute_local_activity_class( + activity: type[Callable], # type: ignore[reportInvalidTypeForm] + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> Any: + """Start a local activity from a callable class and wait for completion. + + This is a shortcut for ``await`` :py:meth:`start_local_activity_class`. + """ + # We call the runtime directly instead of top-level start_local_activity to + # ensure we don't miss new parameters + return await _Runtime.current().workflow_start_local_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + result_type=None, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + retry_policy=retry_policy, + local_retry_threshold=local_retry_threshold, + cancellation_type=cancellation_type, + activity_id=activity_id, + summary=summary, + event_groups=event_groups, + ) + + +# Overload for async no-param activity +@overload +def start_local_activity_method( + activity: MethodAsyncNoParam[SelfType, ReturnType], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync no-param activity +@overload +def start_local_activity_method( + activity: MethodSyncNoParam[SelfType, ReturnType], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async single-param activity +@overload +def start_local_activity_method( + activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync single-param activity +@overload +def start_local_activity_method( + activity: MethodSyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for async multi-param activity +@overload +def start_local_activity_method( + activity: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +# Overload for sync multi-param activity +@overload +def start_local_activity_method( + activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[ReturnType]: ... + + +def start_local_activity_method( + activity: Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ActivityHandle[Any]: + """Start a local activity from a method. + + See :py:meth:`start_local_activity` for parameter and return details. + """ + return _Runtime.current().workflow_start_local_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + result_type=None, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + retry_policy=retry_policy, + local_retry_threshold=local_retry_threshold, + cancellation_type=cancellation_type, + activity_id=activity_id, + summary=summary, + event_groups=event_groups, + ) + + +# Overload for async no-param activity +@overload +async def execute_local_activity_method( + activity: MethodAsyncNoParam[SelfType, ReturnType], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for sync no-param activity +@overload +async def execute_local_activity_method( + activity: MethodSyncNoParam[SelfType, ReturnType], + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for async single-param activity +@overload +async def execute_local_activity_method( + activity: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for sync single-param activity +@overload +async def execute_local_activity_method( + activity: MethodSyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for async multi-param activity +@overload +async def execute_local_activity_method( + activity: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +# Overload for sync multi-param activity +@overload +async def execute_local_activity_method( + activity: Callable[Concatenate[SelfType, MultiParamSpec], ReturnType], + *, + args: Sequence[Any], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> ReturnType: ... + + +async def execute_local_activity_method( + activity: Callable, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + local_retry_threshold: timedelta | None = None, + cancellation_type: ActivityCancellationType = ActivityCancellationType.TRY_CANCEL, + activity_id: str | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> Any: + """Start a local activity from a method and wait for completion. + + This is a shortcut for ``await`` :py:meth:`start_local_activity_method`. + """ + # We call the runtime directly instead of top-level start_local_activity to + # ensure we don't miss new parameters + return await _Runtime.current().workflow_start_local_activity( + activity, + *temporalio.common._arg_or_args(arg, args), + result_type=None, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + retry_policy=retry_policy, + local_retry_threshold=local_retry_threshold, + cancellation_type=cancellation_type, + activity_id=activity_id, + summary=summary, + event_groups=event_groups, + ) diff --git a/temporalio/workflow/_asyncio.py b/temporalio/workflow/_asyncio.py new file mode 100644 index 0000000000..5ca7e66d81 --- /dev/null +++ b/temporalio/workflow/_asyncio.py @@ -0,0 +1,180 @@ +from __future__ import annotations + +import asyncio +from collections.abc import Awaitable, Iterable, Iterator +from typing import TYPE_CHECKING, Any, TypeVar, overload + +from ..types import AnyType + +__all__ = [ + "as_completed", + "wait", +] + + +def as_completed( + fs: Iterable[Awaitable[AnyType]], *, timeout: float | None = None +) -> Iterator[Awaitable[AnyType]]: + """Return an iterator whose values are coroutines. + + This is a deterministic version of :py:func:`asyncio.as_completed`. This + function should be used instead of that one in workflows. + """ + # Taken almost verbatim from + # https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L584 + # but the "set" is changed out for a "list" and fixed up some typing/format + + if asyncio.isfuture(fs) or asyncio.iscoroutine(fs): + raise TypeError(f"expect an iterable of futures, not {type(fs).__name__}") + + done: asyncio.Queue[asyncio.Future | None] = asyncio.Queue() + + loop = asyncio.get_event_loop() + todo: list[asyncio.Future] = [asyncio.ensure_future(f, loop=loop) for f in list(fs)] + timeout_handle = None + + def _on_timeout(): + for f in todo: + f.remove_done_callback(_on_completion) + done.put_nowait(None) # Queue a dummy value for _wait_for_one(). + todo.clear() # Can't do todo.remove(f) in the loop. + + def _on_completion(f): # type:ignore[reportMissingParameterType] + if not todo: + return # _on_timeout() was here first. + todo.remove(f) + done.put_nowait(f) + if not todo and timeout_handle is not None: + timeout_handle.cancel() + + async def _wait_for_one(): + f = await done.get() + if f is None: + # Dummy value from _on_timeout(). + raise asyncio.TimeoutError + return f.result() # May raise f.exception(). + + for f in todo: + f.add_done_callback(_on_completion) + if todo and timeout is not None: + timeout_handle = loop.call_later(timeout, _on_timeout) + for _ in range(len(todo)): + yield _wait_for_one() + + +if TYPE_CHECKING: + _FT = TypeVar("_FT", bound=asyncio.Future[Any]) +else: + _FT = TypeVar("_FT", bound=asyncio.Future) + + +@overload +async def wait( # type: ignore[misc] + fs: Iterable[_FT], + *, + timeout: float | None = None, + return_when: str = asyncio.ALL_COMPLETED, +) -> tuple[list[_FT], list[_FT]]: ... + + +@overload +async def wait( + fs: Iterable[asyncio.Task[AnyType]], + *, + timeout: float | None = None, + return_when: str = asyncio.ALL_COMPLETED, +) -> tuple[list[asyncio.Task[AnyType]], list[asyncio.Task[AnyType]]]: ... + + +async def wait( + fs: Iterable, + *, + timeout: float | None = None, + return_when: str = asyncio.ALL_COMPLETED, +) -> tuple: + """Wait for the Futures or Tasks given by fs to complete. + + This is a deterministic version of :py:func:`asyncio.wait`. This function + should be used instead of that one in workflows. + """ + # Taken almost verbatim from + # https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L435 + # but the "set" is changed out for a "list" and fixed up some typing/format + + if asyncio.isfuture(fs) or asyncio.iscoroutine(fs): + raise TypeError(f"Expect an iterable of Tasks/Futures, not {type(fs).__name__}") + if not fs: + raise ValueError("Sequence of Tasks/Futures must not be empty.") + if return_when not in ( + asyncio.FIRST_COMPLETED, + asyncio.FIRST_EXCEPTION, + asyncio.ALL_COMPLETED, + ): + raise ValueError(f"Invalid return_when value: {return_when}") + + fs = list(fs) + + if any(asyncio.iscoroutine(f) for f in fs): + raise TypeError("Passing coroutines is forbidden, use tasks explicitly.") + + loop = asyncio.get_running_loop() + return await _wait(fs, timeout, return_when, loop) + + +async def _wait( + fs: Iterable[asyncio.Future | asyncio.Task], + timeout: float | None, + return_when: str, + loop: asyncio.AbstractEventLoop, +) -> tuple[list, list]: + # Taken almost verbatim from + # https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L522 + # but the "set" is changed out for a "list" and fixed up some typing/format + + assert fs, "Sequence of Tasks/Futures must not be empty." + waiter = loop.create_future() + timeout_handle = None + if timeout is not None: + timeout_handle = loop.call_later(timeout, _release_waiter, waiter) + counter = len(fs) # type: ignore[arg-type] + + def _on_completion(f): # type:ignore[reportMissingParameterType] + nonlocal counter + counter -= 1 + if ( + counter <= 0 + or return_when == asyncio.FIRST_COMPLETED + or return_when == asyncio.FIRST_EXCEPTION + and (not f.cancelled() and f.exception() is not None) + ): + if timeout_handle is not None: + timeout_handle.cancel() + if not waiter.done(): + waiter.set_result(None) + + for f in fs: + f.add_done_callback(_on_completion) + + try: + await waiter + finally: + if timeout_handle is not None: + timeout_handle.cancel() + for f in fs: + f.remove_done_callback(_on_completion) + + done, pending = [], [] + for f in fs: + if f.done(): + done.append(f) + else: + pending.append(f) + return done, pending + + +def _release_waiter(waiter: asyncio.Future[Any], *_args: Any) -> None: + # Taken almost verbatim from + # https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L467 + + if not waiter.done(): + waiter.set_result(None) diff --git a/temporalio/workflow/_context.py b/temporalio/workflow/_context.py new file mode 100644 index 0000000000..a33759c37a --- /dev/null +++ b/temporalio/workflow/_context.py @@ -0,0 +1,1061 @@ +from __future__ import annotations + +import asyncio +import contextvars +import uuid +from abc import ABC, abstractmethod +from collections.abc import Callable, Mapping, Sequence +from dataclasses import dataclass +from datetime import datetime, timedelta, timezone +from random import Random +from typing import TYPE_CHECKING, Any, NoReturn, overload + +import nexusrpc +from nexusrpc import InputT, OutputT + +import temporalio.api.common.v1 +import temporalio.common +import temporalio.converter + +from ..types import AnyType, ParamType +from ._exceptions import _NotInWorkflowEventLoopError + +if TYPE_CHECKING: + from ._activities import ActivityCancellationType, ActivityHandle + from ._event_groups import EventGroup + from ._exceptions import ContinueAsNewVersioningBehavior, VersioningIntent + from ._nexus import NexusOperationCancellationType, NexusOperationHandle + from ._workflow_ops import ( + ChildWorkflowCancellationType, + ChildWorkflowHandle, + ExternalWorkflowHandle, + ParentClosePolicy, + ) + +__all__ = [ + "Info", + "ParentInfo", + "RootInfo", + "UpdateInfo", + "cancellation_reason", + "current_update_info", + "deprecate_patch", + "extern_functions", + "get_current_details", + "get_last_completion_result", + "get_last_failure", + "has_last_completion_result", + "in_workflow", + "info", + "instance", + "is_failure_exception", + "memo", + "memo_value", + "metric_meter", + "new_random", + "now", + "patched", + "payload_converter", + "random", + "random_seed", + "register_random_seed_callback", + "set_current_details", + "sleep", + "time", + "time_ns", + "upsert_memo", + "upsert_search_attributes", + "uuid4", + "uuid7", + "wait_condition", +] + + +@dataclass(frozen=True) +class Info: + """Information about the running workflow. + + Retrieved inside a workflow via :py:func:`info`. This object is immutable + with the exception of the :py:attr:`search_attributes` and + :py:attr:`typed_search_attributes` which is updated on + :py:func:`upsert_search_attributes`. + + Note, required fields may be added here in future versions. This class + should never be constructed by users. + """ + + attempt: int + continued_run_id: str | None + cron_schedule: str | None + execution_timeout: timedelta | None + first_execution_run_id: str + headers: Mapping[str, temporalio.api.common.v1.Payload] + namespace: str + + original_execution_run_id: str + """Run ID recorded on the ``WorkflowExecutionStarted`` event. + + Unlike :py:attr:`run_id`, this value is preserved across workflow resets. + """ + + parent: ParentInfo | None + root: RootInfo | None + priority: temporalio.common.Priority + """The priority of this workflow execution. If not set, or this server predates priorities, + then returns a default instance.""" + raw_memo: Mapping[str, temporalio.api.common.v1.Payload] + retry_policy: temporalio.common.RetryPolicy | None + run_id: str + run_timeout: timedelta | None + + search_attributes: temporalio.common.SearchAttributes + """Search attributes for the workflow. + + .. deprecated:: + Use :py:attr:`typed_search_attributes` instead. + """ + + start_time: datetime + """The start time of the first task executed by the workflow.""" + + task_queue: str + task_timeout: timedelta + + typed_search_attributes: temporalio.common.TypedSearchAttributes + """Search attributes for the workflow. + + Note, this may have invalid values or be missing values if passing the + deprecated form of dictionary attributes to + :py:meth:`upsert_search_attributes`. + """ + + workflow_id: str + + workflow_start_time: datetime + """The start time of the workflow based on the workflow initialization.""" + + workflow_type: str + + def _logger_details(self) -> Mapping[str, Any]: + return { + # TODO(cretz): worker ID? + "attempt": self.attempt, + "namespace": self.namespace, + "run_id": self.run_id, + "task_queue": self.task_queue, + "workflow_id": self.workflow_id, + "workflow_type": self.workflow_type, + } + + def get_current_build_id(self) -> str: + """Get the Build ID of the worker which executed the current Workflow Task. + + May be undefined if the task was completed by a worker without a Build ID. If this worker is + the one executing this task for the first time and has a Build ID set, then its ID will be + used. This value may change over the lifetime of the workflow run, but is deterministic and + safe to use for branching. + + .. deprecated:: + Use get_current_deployment_version instead. + """ + return _Runtime.current().workflow_get_current_build_id() + + def get_current_deployment_version( + self, + ) -> temporalio.common.WorkerDeploymentVersion | None: + """Get the deployment version of the worker which executed the current Workflow Task. + + May be None if the task was completed by a worker without a deployment version or build + id. If this worker is the one executing this task for the first time and has a deployment + version set, then its ID will be used. This value may change over the lifetime of the + workflow run, but is deterministic and safe to use for branching. + """ + return _Runtime.current().workflow_get_current_deployment_version() + + def get_current_history_length(self) -> int: + """Get the current number of events in history. + + Note, this value may not be up to date if accessed inside a query. + + Returns: + Current number of events in history (up until the current task). + """ + return _Runtime.current().workflow_get_current_history_length() + + def get_current_history_size(self) -> int: + """Get the current byte size of history. + + Note, this value may not be up to date if accessed inside a query. + + Returns: + Current byte-size of history (up until the current task). + """ + return _Runtime.current().workflow_get_current_history_size() + + def is_continue_as_new_suggested(self) -> bool: + """Get whether or not continue as new is suggested. + + Note, this value may not be up to date if accessed inside a query. + + Returns: + True if the server is configured to suggest continue as new and it + is suggested. + """ + return _Runtime.current().workflow_is_continue_as_new_suggested() + + def is_target_worker_deployment_version_changed(self) -> bool: + """Check whether the target worker deployment version has changed. + + Note: Upgrade-on-Continue-as-New is currently experimental. + + Returns: + True if the target worker deployment version has changed. + """ + return _Runtime.current().workflow_is_target_worker_deployment_version_changed() + + +@dataclass(frozen=True) +class ParentInfo: + """Information about the parent workflow.""" + + namespace: str + run_id: str + workflow_id: str + + +@dataclass(frozen=True) +class RootInfo: + """Information about the root workflow.""" + + run_id: str + workflow_id: str + + +@dataclass(frozen=True) +class UpdateInfo: + """Information about a workflow update.""" + + id: str + """Update ID.""" + + name: str + """Update type name.""" + + @property + def _logger_details(self) -> Mapping[str, Any]: + """Data to be included in string appended to default logging output.""" + return { + "update_id": self.id, + "update_name": self.name, + } + + +class _Runtime(ABC): + @staticmethod + def current() -> _Runtime: + loop = _Runtime.maybe_current() + if not loop: + raise _NotInWorkflowEventLoopError("Not in workflow event loop") + return loop + + @staticmethod + def maybe_current() -> _Runtime | None: + try: + return getattr( + asyncio.get_running_loop(), "__temporal_workflow_runtime", None + ) + except RuntimeError: + return None + + @staticmethod + def set_on_loop(loop: asyncio.AbstractEventLoop, runtime: _Runtime | None) -> None: + if runtime: + setattr(loop, "__temporal_workflow_runtime", runtime) + elif hasattr(loop, "__temporal_workflow_runtime"): + delattr(loop, "__temporal_workflow_runtime") + + def __init__(self) -> None: + super().__init__() + self._logger_details: Mapping[str, Any] | None = None + + @property + def logger_details(self) -> Mapping[str, Any]: + if self._logger_details is None: + self._logger_details = self.workflow_info()._logger_details() + return self._logger_details + + @abstractmethod + def workflow_all_handlers_finished(self) -> bool: ... + + @abstractmethod + def workflow_continue_as_new( + self, + *args: Any, + workflow: None | Callable | str, + task_queue: str | None, + run_timeout: timedelta | None, + task_timeout: timedelta | None, + backoff_start_interval: timedelta | None, + retry_policy: temporalio.common.RetryPolicy | None, + memo: Mapping[str, Any] | None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ), + versioning_intent: VersioningIntent | None, + initial_versioning_behavior: ContinueAsNewVersioningBehavior | None, + event_groups: Sequence[EventGroup] | None = None, + ) -> NoReturn: ... + + @abstractmethod + def workflow_cancellation_reason(self) -> str | None: ... + + @abstractmethod + def workflow_extern_functions(self) -> Mapping[str, Callable]: ... + + @abstractmethod + def workflow_get_current_build_id(self) -> str: ... + + @abstractmethod + def workflow_get_current_deployment_version( + self, + ) -> temporalio.common.WorkerDeploymentVersion | None: ... + + @abstractmethod + def workflow_get_current_history_length(self) -> int: ... + + @abstractmethod + def workflow_get_current_history_size(self) -> int: ... + + @abstractmethod + def workflow_get_external_workflow_handle( + self, id: str, *, run_id: str | None + ) -> ExternalWorkflowHandle[Any]: ... + + @abstractmethod + def workflow_get_query_handler(self, name: str | None) -> Callable | None: ... + + @abstractmethod + def workflow_get_signal_handler(self, name: str | None) -> Callable | None: ... + + @abstractmethod + def workflow_get_update_handler(self, name: str | None) -> Callable | None: ... + + @abstractmethod + def workflow_get_update_validator(self, name: str | None) -> Callable | None: ... + + @abstractmethod + def workflow_info(self) -> Info: ... + + @abstractmethod + def workflow_instance(self) -> Any: ... + + @abstractmethod + def workflow_is_continue_as_new_suggested(self) -> bool: ... + + @abstractmethod + def workflow_is_target_worker_deployment_version_changed(self) -> bool: ... + + @abstractmethod + def workflow_is_replaying(self) -> bool: ... + + @abstractmethod + def workflow_is_replaying_history_events(self) -> bool: ... + + @abstractmethod + def workflow_is_read_only(self) -> bool: ... + + @abstractmethod + def workflow_memo(self) -> Mapping[str, Any]: ... + + @abstractmethod + def workflow_memo_value( + self, key: str, default: Any, *, type_hint: type | None + ) -> Any: ... + + @abstractmethod + def workflow_upsert_memo( + self, + updates: Mapping[str, Any], + *, + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + @abstractmethod + def workflow_metric_meter(self) -> temporalio.common.MetricMeter: ... + + @abstractmethod + def workflow_patch( + self, + id: str, + *, + deprecated: bool, + event_groups: Sequence[EventGroup] | None = None, + ) -> bool: ... + + @abstractmethod + def workflow_payload_converter(self) -> temporalio.converter.PayloadConverter: ... + + @abstractmethod + def workflow_random(self) -> Random: ... + + @abstractmethod + def workflow_set_query_handler( + self, name: str | None, handler: Callable | None + ) -> None: ... + + @abstractmethod + def workflow_set_signal_handler( + self, name: str | None, handler: Callable | None + ) -> None: ... + + @abstractmethod + def workflow_set_update_handler( + self, + name: str | None, + handler: Callable | None, + validator: Callable | None, + ) -> None: ... + + @abstractmethod + def workflow_start_activity( + self, + activity: Any, + *args: Any, + task_queue: str | None, + result_type: type | None, + schedule_to_close_timeout: timedelta | None, + schedule_to_start_timeout: timedelta | None, + start_to_close_timeout: timedelta | None, + heartbeat_timeout: timedelta | None, + retry_policy: temporalio.common.RetryPolicy | None, + cancellation_type: ActivityCancellationType, + activity_id: str | None, + versioning_intent: VersioningIntent | None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + ) -> ActivityHandle[Any]: ... + + @abstractmethod + async def workflow_start_child_workflow( + self, + workflow: Any, + *args: Any, + id: str, + task_queue: str | None, + result_type: type | None, + cancellation_type: ChildWorkflowCancellationType, + parent_close_policy: ParentClosePolicy, + execution_timeout: timedelta | None, + run_timeout: timedelta | None, + task_timeout: timedelta | None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy, + retry_policy: temporalio.common.RetryPolicy | None, + cron_schedule: str, + memo: Mapping[str, Any] | None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ), + versioning_intent: VersioningIntent | None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, + ) -> ChildWorkflowHandle[Any, Any]: ... + + @abstractmethod + def workflow_start_local_activity( + self, + activity: Any, + *args: Any, + result_type: type | None, + schedule_to_close_timeout: timedelta | None, + schedule_to_start_timeout: timedelta | None, + start_to_close_timeout: timedelta | None, + retry_policy: temporalio.common.RetryPolicy | None, + local_retry_threshold: timedelta | None, + cancellation_type: ActivityCancellationType, + activity_id: str | None, + summary: str | None, + event_groups: Sequence[EventGroup] | None = None, + ) -> ActivityHandle[Any]: ... + + @abstractmethod + async def workflow_start_nexus_operation( + self, + endpoint: str, + service: str, + operation: nexusrpc.Operation[InputT, OutputT] | str | Callable[..., Any], + input: Any, + output_type: type[OutputT] | None, + schedule_to_close_timeout: timedelta | None, + schedule_to_start_timeout: timedelta | None, + start_to_close_timeout: timedelta | None, + cancellation_type: NexusOperationCancellationType, + headers: Mapping[str, str] | None, + summary: str | None, + event_groups: Sequence[EventGroup] | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + @abstractmethod + def workflow_time_ns(self) -> int: ... + + @abstractmethod + def workflow_upsert_search_attributes( + self, + attributes: ( + temporalio.common.SearchAttributes + | Sequence[temporalio.common.SearchAttributeUpdate] + ), + *, + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + @abstractmethod + async def workflow_sleep( + self, + duration: float, + *, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + @abstractmethod + async def workflow_wait_condition( + self, + fn: Callable[[], bool], + *, + timeout: float | None = None, + timeout_summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + @abstractmethod + def workflow_get_current_details(self) -> str: ... + + @abstractmethod + def workflow_set_current_details(self, details: str): ... + + @abstractmethod + def workflow_is_failure_exception(self, err: BaseException) -> bool: ... + + @abstractmethod + def workflow_has_last_completion_result(self) -> bool: ... + + @abstractmethod + def workflow_last_completion_result(self, type_hint: type | None) -> Any | None: ... + + @abstractmethod + def workflow_last_failure(self) -> BaseException | None: ... + + @abstractmethod + def workflow_random_seed(self) -> int: ... + + @abstractmethod + def workflow_register_random_seed_callback( + self, callback: Callable[[int], None] + ) -> None: ... + + +_current_update_info: contextvars.ContextVar[UpdateInfo] = contextvars.ContextVar( + "__temporal_current_update_info" +) + + +def _set_current_update_info(info: UpdateInfo) -> None: # type: ignore[reportUnusedFunction] + _current_update_info.set(info) + + +def current_update_info() -> UpdateInfo | None: + """Info for the current update if any. + + This is powered by :py:mod:`contextvars` so it is only valid within the + update handler and coroutines/tasks it has started. + + Returns: + Info for the current update handler the code calling this is executing + within if any. + """ + return _current_update_info.get(None) + + +def deprecate_patch( + id: str, *, event_groups: Sequence[EventGroup] | None = None +) -> None: + """Mark a patch as deprecated. + + This marks a workflow that had :py:func:`patched` in a previous version of + the code as no longer applicable because all workflows that use the old code + path are done and will never be queried again. Therefore the old code path + is removed as well. + + Args: + id: The identifier originally used with :py:func:`patched`. + event_groups: Event Groups to associate this command with, in addition + to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + """ + _Runtime.current().workflow_patch(id, deprecated=True, event_groups=event_groups) + + +def extern_functions() -> Mapping[str, Callable]: + """External functions available in the workflow sandbox. + + Returns: + Mapping of external functions that can be called from inside a workflow + sandbox. + """ + return _Runtime.current().workflow_extern_functions() + + +def info() -> Info: + """Current workflow's info. + + Returns: + Info for the currently running workflow. + """ + return _Runtime.current().workflow_info() + + +def instance() -> Any: + """Current workflow's instance. + + Returns: + The currently running workflow instance. + """ + return _Runtime.current().workflow_instance() + + +def in_workflow() -> bool: + """Whether the code is currently running in a workflow.""" + return _Runtime.maybe_current() is not None + + +def cancellation_reason() -> str | None: + """Reason the workflow was cancelled, or None if no external cancellation + request has been received. + + A non-None value (including an empty string) indicates that the workflow + received an explicit cancellation request from the server. This can be used + when catching an :py:class:`asyncio.CancelledError` to distinguish a + workflow-level cancel from a cancel that originated from inner asyncio task + cancellation. + + Note, this only reflects cancellation requested via the server; it is not + set for cache eviction or for cancels of inner tasks/scopes. + + Returns: + The reason string sent with the workflow cancellation request (which + may be empty), or ``None`` if the workflow has not been cancelled via + an external request. + """ + return _Runtime.current().workflow_cancellation_reason() + + +def memo() -> Mapping[str, Any]: + """Current workflow's memo values, converted without type hints. + + Since type hints are not used, the default converted values will come back. + For example, if the memo was originally created with a dataclass, the value + will be a dict. To convert using proper type hints, use + :py:func:`memo_value`. + + Returns: + Mapping of all memo keys and they values without type hints. + """ + return _Runtime.current().workflow_memo() + + +def is_failure_exception(err: BaseException) -> bool: + """Checks if the given exception is a workflow failure in the current workflow. + + Returns: + True if the given exception is a workflow failure in the current workflow. + """ + return _Runtime.current().workflow_is_failure_exception(err) + + +@overload +def memo_value(key: str, default: Any = temporalio.common._arg_unset) -> Any: ... + + +@overload +def memo_value(key: str, *, type_hint: type[ParamType]) -> ParamType: ... + + +@overload +def memo_value( + key: str, default: AnyType, *, type_hint: type[ParamType] +) -> AnyType | ParamType: ... + + +def memo_value( + key: str, + default: Any = temporalio.common._arg_unset, + *, + type_hint: type | None = None, +) -> Any: + """Memo value for the given key, optional default, and optional type + hint. + + Args: + key: Key to get memo value for. + default: Default to use if key is not present. If unset, a + :py:class:`KeyError` is raised when the key does not exist. + type_hint: Type hint to use when converting. + + Returns: + Memo value, converted with the type hint if present. + + Raises: + KeyError: Key not present and default not set. + """ + return _Runtime.current().workflow_memo_value(key, default, type_hint=type_hint) + + +def upsert_memo( + updates: Mapping[str, Any], + *, + event_groups: Sequence[EventGroup] | None = None, +) -> None: + """Adds, modifies, and/or removes memos, with upsert semantics. + + Every memo that has a matching key has its value replaced with the one specified in ``updates``. + If the value is set to ``None``, the memo is removed instead. + For every key with no existing memo, a new memo is added with specified value (unless the value is ``None``). + Memos with keys not included in ``updates`` remain unchanged. + + Args: + updates: Mapping of memo keys to values. A value of ``None`` removes + the memo. + event_groups: Event Groups to associate this command with, in addition + to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + """ + return _Runtime.current().workflow_upsert_memo(updates, event_groups=event_groups) + + +def get_current_details() -> str: + """Get the current details of the workflow which may appear in the UI/CLI. + Unlike static details set at start, this value can be updated throughout + the life of the workflow and is independent of the static details. + This can be in Temporal markdown format and can span multiple lines. + """ + return _Runtime.current().workflow_get_current_details() + + +def has_last_completion_result() -> bool: + """Gets whether there is a last completion result of the workflow.""" + return _Runtime.current().workflow_has_last_completion_result() + + +@overload +def get_last_completion_result() -> Any | None: ... + + +@overload +def get_last_completion_result(type_hint: type[ParamType]) -> ParamType | None: ... + + +def get_last_completion_result(type_hint: type | None = None) -> Any | None: + """Get the result of the last run of the workflow. This will be None if there was + no previous completion or the result was None. has_last_completion_result() + can be used to differentiate. + """ + return _Runtime.current().workflow_last_completion_result(type_hint) + + +def get_last_failure() -> BaseException | None: + """Get the last failure of the workflow if it has run previously.""" + return _Runtime.current().workflow_last_failure() + + +def set_current_details(description: str) -> None: + """Set the current details of the workflow which may appear in the UI/CLI. + Unlike static details set at start, this value can be updated throughout + the life of the workflow and is independent of the static details. + This can be in Temporal markdown format and can span multiple lines. + """ + _Runtime.current().workflow_set_current_details(description) + + +def metric_meter() -> temporalio.common.MetricMeter: + """Get the metric meter for the current workflow. + + This meter is replay safe which means that metrics will not be recorded + during replay. + + Returns: + Current metric meter for this workflow for recording metrics. + """ + return _Runtime.current().workflow_metric_meter() + + +def now() -> datetime: + """Current time from the workflow perspective. + + This is the workflow equivalent of :py:func:`datetime.now` with the + :py:attr:`timezone.utc` parameter. + + Returns: + UTC datetime for the current workflow time. The datetime does have UTC + set as the time zone. + """ + return datetime.fromtimestamp(time(), timezone.utc) + + +def patched(id: str, *, event_groups: Sequence[EventGroup] | None = None) -> bool: + """Patch a workflow. + + When called, this will only return true if code should take the newer path + which means this is either not replaying or is replaying and has seen this + patch before. + + Use :py:func:`deprecate_patch` when all workflows are done and will never be + queried again. The old code path can be used at that time too. + + Args: + id: The identifier for this patch. This identifier may be used + repeatedly in the same workflow to represent the same patch + event_groups: Event Groups to associate this command with, in addition + to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + + Returns: + True if this should take the newer path, false if it should take the + older path. + """ + return _Runtime.current().workflow_patch( + id, deprecated=False, event_groups=event_groups + ) + + +def payload_converter() -> temporalio.converter.PayloadConverter: + """Get the payload converter for the current workflow. + + The returned converter has :py:class:`temporalio.converter.WorkflowSerializationContext` set. + This is often used for dynamic workflows/signals/queries to convert + payloads. + """ + return _Runtime.current().workflow_payload_converter() + + +def random() -> Random: + """Get a deterministic pseudo-random number generator. + + Note, this random number generator is not cryptographically safe and should + not be used for security purposes. + + Returns: + The deterministically-seeded pseudo-random number generator. + """ + return _Runtime.current().workflow_random() + + +def random_seed() -> int: + """Get the current random seed value from core. + + This returns the seed value currently being used by the workflow's + deterministic random number generator. + + Returns: + The current random seed as an integer. + """ + return _Runtime.current().workflow_random_seed() + + +def register_random_seed_callback(callback: Callable[[int], None]) -> None: + """Register a callback to be notified when the random seed changes. + + The callback will be invoked whenever the workflow receives a new random + seed from the core. This is useful for maintaining external random number + generators that need to stay in sync with the workflow's randomness. + + Args: + callback: Function to be called with the new seed value when it changes. + """ + return _Runtime.current().workflow_register_random_seed_callback(callback) + + +def new_random(name: str | None = None) -> Random: + """Create a Random instance that automatically reseeds when the workflow seed changes. + + This creates a new Random instance that is initially seeded with the current + workflow seed, and automatically registers a callback to reseed itself + whenever the workflow receives a new seed from core. + + Args: + name: Mixed into the seed when given, so differently named instances, + and :py:func:`random`, produce different sequences. Without it the + instance starts out identical to :py:func:`random`. + + Returns: + A Random instance that stays synchronized with the workflow's randomness. + """ + + def seed_for(workflow_seed: int) -> int | str: + if name is None: + # Unchanged: the same integer seed as :py:func:`random`. + return workflow_seed + return f"{workflow_seed}:{name}" + + auto_random = Random(seed_for(random_seed())) + + def reseed_callback(new_seed: int) -> None: + auto_random.seed(seed_for(new_seed)) + + register_random_seed_callback(reseed_callback) + return auto_random + + +def time() -> float: + """Current seconds since the epoch from the workflow perspective. + + This is the workflow equivalent of :py:func:`time.time`. + + Returns: + Seconds since the epoch as a float. + """ + return time_ns() / 1e9 + + +def time_ns() -> int: + """Current nanoseconds since the epoch from the workflow perspective. + + This is the workflow equivalent of :py:func:`time.time_ns`. + + Returns: + Nanoseconds since the epoch + """ + return _Runtime.current().workflow_time_ns() + + +def upsert_search_attributes( + attributes: ( + temporalio.common.SearchAttributes + | Sequence[temporalio.common.SearchAttributeUpdate] + ), + *, + event_groups: Sequence[EventGroup] | None = None, +) -> None: + """Upsert search attributes for this workflow. + + Args: + attributes: The attributes to set. This should be a sequence of + updates (i.e. values created via value_set and value_unset calls on + search attribute keys). The dictionary form of attributes is + DEPRECATED and if used, result in invalid key types on the + typed_search_attributes property in the info. + event_groups: Event Groups to associate this command with, in addition + to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + """ + if not attributes: + return + temporalio.common._warn_on_deprecated_search_attributes(attributes) + _Runtime.current().workflow_upsert_search_attributes( + attributes, event_groups=event_groups + ) + + +def uuid4() -> uuid.UUID: + """Get a new, determinism-safe v4 UUID based on :py:func:`random`. + + Note, this UUID is not cryptographically safe and should not be used for + security purposes. + + Returns: + A deterministically-seeded v4 UUID. + """ + return uuid.UUID(bytes=random().getrandbits(16 * 8).to_bytes(16, "big"), version=4) + + +def uuid7() -> uuid.UUID: + """Get a new, determinism-safe v7 UUID based on :py:func:`time_ns` and + :py:func:`random`. + + Per RFC 9562, the UUID's leading 48 bits are the current workflow time as + milliseconds since the epoch, so UUIDs from successive workflow tasks sort + by creation time. The remaining 74 bits are random. UUIDs generated within + the same workflow task share the same workflow time and are not guaranteed + to be monotonically ordered with respect to one another. + + Note, this UUID is not cryptographically safe and should not be used for + security purposes. + + Returns: + A deterministically-seeded v7 UUID. + """ + # uuid.UUID's version parameter only accepts 1-5 before Python 3.14, so + # the version and variant bits are set manually. + unix_ts_ms = (time_ns() // 1_000_000) & 0xFFFF_FFFF_FFFF + rand = random() + rand_a = rand.getrandbits(12) + rand_b = rand.getrandbits(62) + return uuid.UUID( + int=(unix_ts_ms << 80) | (0x7 << 76) | (rand_a << 64) | (0b10 << 62) | rand_b + ) + + +async def sleep( + duration: float | timedelta, + *, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> None: + """Sleep for the given duration. + + Args: + duration: Duration to sleep in seconds or as a timedelta. + summary: A single-line fixed summary for this timer that may appear in UI/CLI. + This can be in single-line Temporal markdown format. + event_groups: Event Groups to associate this command with, in addition + to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + """ + await _Runtime.current().workflow_sleep( + duration=( + duration.total_seconds() if isinstance(duration, timedelta) else duration + ), + summary=summary, + event_groups=event_groups, + ) + + +async def wait_condition( + fn: Callable[[], bool], + *, + timeout: timedelta | float | None = None, + timeout_summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> None: + """Wait on a callback to become true. + + This function returns when the callback returns true (invoked each loop + iteration) or the timeout has been reached. + + Importantly, using `None` value for ``timeout`` means that no Temporal timer is created. This + means changing from `None` to a positive value (or the inverse) constitutes a nondeterministic + change to workflow code. Using ``0`` will cause this function to immediately throw a timeout and + should not be used. + + Args: + fn: Non-async callback that accepts no parameters and returns a boolean. + timeout: Optional number of seconds to wait until throwing + :py:class:`asyncio.TimeoutError`. + timeout_summary: Optional simple string identifying the timer (created if ``timeout`` is + present) that may be visible in UI/CLI. While it can be normal text, it is best to treat + as a timer ID. + event_groups: Event Groups to associate the timer command (created if + ``timeout`` is present) with, in addition to those active in the + current scope. See :py:func:`temporalio.workflow.create_event_group`. + """ + await _Runtime.current().workflow_wait_condition( + fn, + timeout=timeout.total_seconds() if isinstance(timeout, timedelta) else timeout, + timeout_summary=timeout_summary, + event_groups=event_groups, + ) diff --git a/temporalio/workflow/_definition.py b/temporalio/workflow/_definition.py new file mode 100644 index 0000000000..a14e7640ab --- /dev/null +++ b/temporalio/workflow/_definition.py @@ -0,0 +1,466 @@ +from __future__ import annotations + +import inspect +from collections.abc import Awaitable, Callable, Mapping, Sequence +from dataclasses import dataclass +from typing import Any, cast, overload + +import temporalio.common + +from ..types import ( + CallableAsyncType, + CallableType, + ClassType, + MethodSyncNoParam, + SelfType, +) +from ._handlers import ( + UpdateMethodMultiParam, + _QueryDefinition, + _SignalDefinition, + _UpdateDefinition, +) + +__all__ = [ + "DynamicWorkflowConfig", + "defn", + "dynamic_config", + "init", + "run", +] + + +@overload +def defn(cls: ClassType) -> ClassType: ... + + +@overload +def defn( + *, + name: str | None = None, + sandboxed: bool = True, + failure_exception_types: Sequence[type[BaseException]] = [], + versioning_behavior: temporalio.common.VersioningBehavior = temporalio.common.VersioningBehavior.UNSPECIFIED, +) -> Callable[[ClassType], ClassType]: ... + + +@overload +def defn( + *, + sandboxed: bool = True, + dynamic: bool = False, + versioning_behavior: temporalio.common.VersioningBehavior = temporalio.common.VersioningBehavior.UNSPECIFIED, +) -> Callable[[ClassType], ClassType]: ... + + +def defn( + cls: ClassType | None = None, + *, + name: str | None = None, + sandboxed: bool = True, + dynamic: bool = False, + failure_exception_types: Sequence[type[BaseException]] = [], + versioning_behavior: temporalio.common.VersioningBehavior = temporalio.common.VersioningBehavior.UNSPECIFIED, +) -> Callable[[ClassType], ClassType]: + """Decorator for workflow classes. + + This must be set on any registered workflow class (it is ignored if on a + base class). + + Args: + cls: The class to decorate. + name: Name to use for the workflow. Defaults to class ``__name__``. This + cannot be set if dynamic is set. + sandboxed: Whether the workflow should run in a sandbox. Default is + true. + dynamic: If true, this workflow will be dynamic. Dynamic workflows have + to accept a single 'Sequence[RawValue]' parameter. This cannot be + set to true if name is present. + failure_exception_types: The types of exceptions that, if a + workflow-thrown exception extends, will cause the workflow/update to + fail instead of suspending the workflow via task failure. These are + applied in addition to ones set on the worker constructor. If + ``Exception`` is set, it effectively will fail a workflow/update in + all user exception cases. WARNING: This setting is experimental. + versioning_behavior: Specifies the versioning behavior to use for this workflow. + """ + + def decorator(cls: ClassType) -> ClassType: + # This performs validation + _Definition._apply_to_class( + cls, + workflow_name=name or cls.__name__ if not dynamic else None, + sandboxed=sandboxed, + failure_exception_types=failure_exception_types, + versioning_behavior=versioning_behavior, + ) + return cls + + if cls is not None: + return decorator(cls) + return decorator + + +def init( + init_fn: CallableType, +) -> CallableType: + """Decorator for the workflow init method. + + This may be used on the __init__ method of the workflow class to specify + that it accepts the same workflow input arguments as the ``@workflow.run`` + method. If used, the parameters of your __init__ and ``@workflow.run`` + methods must be identical. + + Args: + init_fn: The __init__ method to decorate. + """ + if init_fn.__name__ != "__init__": + raise ValueError("@workflow.init may only be used on the __init__ method") + + setattr(init_fn, "__temporal_workflow_init", True) + return init_fn + + +def run(fn: CallableAsyncType) -> CallableAsyncType: + """Decorator for the workflow run method. + + This must be used on one and only one async method defined on the same class + as ``@workflow.defn``. This can be defined on a base class method but must + then be explicitly overridden and defined on the workflow class. + + Run methods can only have positional parameters. Best practice is to only + take a single object/dataclass argument that can accept more fields later if + needed. + + Args: + fn: The function to decorate. + """ + if not inspect.iscoroutinefunction(fn): + raise ValueError("Workflow run method must be an async function") + # Disallow local classes because we need to have the class globally + # referenceable by name + if "" in fn.__qualname__: + raise ValueError( + "Local classes unsupported, @workflow.run cannot be on a local class" + ) + setattr(fn, "__temporal_workflow_run", True) + # TODO(cretz): Why is MyPy unhappy with this return? + return fn # type: ignore[return-value] + + +@dataclass(frozen=True) +class DynamicWorkflowConfig: + """Returned by functions using the :py:func:`dynamic_config` decorator, see it for more.""" + + failure_exception_types: Sequence[type[BaseException]] | None = None + """The types of exceptions that, if a workflow-thrown exception extends, will cause the + workflow/update to fail instead of suspending the workflow via task failure. These are applied + in addition to ones set on the worker constructor. If ``Exception`` is set, it effectively will + fail a workflow/update in all user exception cases. + + Always overrides the equivalent parameter on :py:func:`defn` if set not-None. + + WARNING: This setting is experimental. + """ + versioning_behavior: temporalio.common.VersioningBehavior = ( + temporalio.common.VersioningBehavior.UNSPECIFIED + ) + """Specifies the versioning behavior to use for this workflow. + + Always overrides the equivalent parameter on :py:func:`defn`. + """ + + +def dynamic_config( + fn: MethodSyncNoParam[SelfType, DynamicWorkflowConfig], +) -> MethodSyncNoParam[SelfType, DynamicWorkflowConfig]: + """Decorator to allow configuring a dynamic workflow's behavior. + + Because dynamic workflows may conceptually represent more than one workflow type, it may be + desirable to have different settings for fields that would normally be passed to + :py:func:`defn`, but vary based on the workflow type name or other information available in + the workflow's context. This function will be called after the workflow's :py:func:`init`, + if it has one, but before the workflow's :py:func:`run` method. + + The method must only take self as a parameter, and any values set in the class it returns will + override those provided to :py:func:`defn`. + + Cannot be specified on non-dynamic workflows. + + Args: + fn: The function to decorate. + """ + if inspect.iscoroutinefunction(fn): + raise ValueError("Workflow dynamic_config method must be synchronous") + params = list(inspect.signature(fn).parameters.values()) + if len(params) != 1: + raise ValueError("Workflow dynamic_config method must only take self parameter") + + # Add marker attribute + setattr(fn, "__temporal_workflow_dynamic_config", True) + return fn + + +@dataclass(frozen=True) +class _Definition: + name: str | None + cls: type + run_fn: Callable[..., Awaitable] + signals: Mapping[str | None, _SignalDefinition] + queries: Mapping[str | None, _QueryDefinition] + updates: Mapping[str | None, _UpdateDefinition] + sandboxed: bool + failure_exception_types: Sequence[type[BaseException]] + # Types loaded on post init if both are None + arg_types: list[type] | None = None + ret_type: type | None = None + versioning_behavior: temporalio.common.VersioningBehavior | None = None + dynamic_config_fn: Callable[..., DynamicWorkflowConfig] | None = None + + @staticmethod + def from_class(cls: type) -> _Definition | None: # type: ignore[reportSelfClsParameterName] + # We make sure to only return it if it's on _this_ class + defn = getattr(cls, "__temporal_workflow_definition", None) + if defn and defn.cls == cls: + return defn + return None + + @staticmethod + def must_from_class(cls: type) -> _Definition: # type: ignore[reportSelfClsParameterName] + ret = _Definition.from_class(cls) + if ret: + return ret + cls_name = getattr(cls, "__name__", "") + raise ValueError( + f"Workflow {cls_name} missing attributes, was it decorated with @workflow.defn?" + ) + + @staticmethod + def from_run_fn(fn: Callable[..., Awaitable[Any]]) -> _Definition | None: + return getattr(fn, "__temporal_workflow_definition", None) + + @staticmethod + def must_from_run_fn(fn: Callable[..., Awaitable[Any]]) -> _Definition: + ret = _Definition.from_run_fn(fn) + if ret: + return ret + fn_name = getattr(fn, "__qualname__", "") + raise ValueError( + f"Function {fn_name} missing attributes, was it decorated with @workflow.run and was its class decorated with @workflow.defn?" + ) + + @classmethod + def get_name_and_result_type( + cls, name_or_run_fn: str | Callable[..., Awaitable[Any]] + ) -> tuple[str, type | None]: + if isinstance(name_or_run_fn, str): + return name_or_run_fn, None + elif callable(name_or_run_fn): + defn = cls.must_from_run_fn(name_or_run_fn) + if not defn.name: + raise ValueError("Cannot invoke dynamic workflow explicitly") + return defn.name, defn.ret_type + else: + raise TypeError("Workflow must be a string or callable") # type: ignore[reportUnreachable] + + @staticmethod + def _apply_to_class( + cls: type, # type: ignore[reportSelfClsParameterName] + *, + workflow_name: str | None, + sandboxed: bool, + failure_exception_types: Sequence[type[BaseException]], + versioning_behavior: temporalio.common.VersioningBehavior, + ) -> None: + # Check it's not being doubly applied + if _Definition.from_class(cls): + raise ValueError("Class already contains workflow definition") + issues: list[str] = [] + + # Collect run fn and all signal/query/update fns + init_fn: Callable[..., None] | None = None + run_fn: Callable[..., Awaitable[Any]] | None = None + dynamic_config_fn: Callable[..., DynamicWorkflowConfig] | None = None + seen_run_attr = False + signals: dict[str | None, _SignalDefinition] = {} + queries: dict[str | None, _QueryDefinition] = {} + updates: dict[str | None, _UpdateDefinition] = {} + for name, member in inspect.getmembers(cls): + if hasattr(member, "__temporal_workflow_run"): + seen_run_attr = True + if not _is_unbound_method_on_cls(member, cls): + issues.append( + f"@workflow.run method {name} must be defined on {cls.__qualname__}" + ) + elif run_fn is not None: + issues.append( + f"Multiple @workflow.run methods found (at least on {name} and {run_fn.__name__})" + ) + else: + # We can guarantee the @workflow.run decorator did + # validation of the function itself + run_fn = member + elif hasattr(member, "__temporal_signal_definition"): + signal_defn = cast( + _SignalDefinition, getattr(member, "__temporal_signal_definition") + ) + if signal_defn.name in signals: + defn_name = signal_defn.name or "" + # TODO(cretz): Remove cast when https://github.com/python/mypy/issues/5485 fixed + other_fn = cast(Callable, signals[signal_defn.name].fn) + issues.append( + f"Multiple signal methods found for {defn_name} " + f"(at least on {name} and {other_fn.__name__})" + ) + else: + signals[signal_defn.name] = signal_defn + elif hasattr(member, "__temporal_query_definition"): + query_defn = cast( + _QueryDefinition, getattr(member, "__temporal_query_definition") + ) + if query_defn.name in queries: + defn_name = query_defn.name or "" + issues.append( + f"Multiple query methods found for {defn_name} " + f"(at least on {name} and {queries[query_defn.name].fn.__name__})" + ) + else: + queries[query_defn.name] = query_defn + elif name == "__init__" and hasattr(member, "__temporal_workflow_init"): + init_fn = member + elif hasattr(member, "__temporal_workflow_dynamic_config"): + if workflow_name: + issues.append( + "@workflow.dynamic_config can only be used in dynamic workflows, but " + f"workflow class {workflow_name} ({cls.__name__}) is not dynamic" + ) + if dynamic_config_fn: + issues.append( + "@workflow.dynamic_config can only be defined once per workflow" + ) + dynamic_config_fn = member + elif isinstance(member, UpdateMethodMultiParam): + update_defn = member._defn + if update_defn.name in updates: + defn_name = update_defn.name or "" + issues.append( + f"Multiple update methods found for {defn_name} " + f"(at least on {name} and {updates[update_defn.name].fn.__name__})" + ) + elif update_defn.validator and not _parameters_identical_up_to_naming( + update_defn.fn, update_defn.validator + ): + issues.append( + f"Update validator method {update_defn.validator.__name__} parameters " + f"do not match update method {update_defn.fn.__name__} parameters" + ) + else: + updates[update_defn.name] = update_defn + + # Check base classes haven't defined things with different decorators + for base_cls in inspect.getmro(cls)[1:]: + for _, base_member in inspect.getmembers(base_cls): + # We only care about methods defined on this class + if not inspect.isfunction(base_member) or not _is_unbound_method_on_cls( + base_member, base_cls + ): + continue + if hasattr(base_member, "__temporal_workflow_run"): + seen_run_attr = True + if not run_fn or base_member.__name__ != run_fn.__name__: + issues.append( + f"@workflow.run defined on {base_member.__qualname__} but not on the override" + ) + elif hasattr(base_member, "__temporal_signal_definition"): + signal_defn = cast( + _SignalDefinition, + getattr(base_member, "__temporal_signal_definition"), + ) + if signal_defn.name not in signals: + issues.append( + f"@workflow.signal defined on {base_member.__qualname__} but not on the override" + ) + elif hasattr(base_member, "__temporal_query_definition"): + query_defn = cast( + _QueryDefinition, + getattr(base_member, "__temporal_query_definition"), + ) + if query_defn.name not in queries: + issues.append( + f"@workflow.query defined on {base_member.__qualname__} but not on the override" + ) + elif isinstance(base_member, UpdateMethodMultiParam): + update_defn = base_member._defn + if update_defn.name not in updates: + issues.append( + f"@workflow.update defined on {base_member.__qualname__} but not on the override" + ) + + if not seen_run_attr: + issues.append("Missing @workflow.run method") + if init_fn and run_fn: + if not _parameters_identical_up_to_naming(init_fn, run_fn): + issues.append( + "@workflow.init and @workflow.run method parameters do not match" + ) + if issues: + if len(issues) == 1: + raise ValueError(f"Invalid workflow class: {issues[0]}") + raise ValueError( + f"Invalid workflow class for {len(issues)} reasons: {', '.join(issues)}" + ) + + assert run_fn + assert seen_run_attr + defn = _Definition( + name=workflow_name, + cls=cls, + run_fn=run_fn, + signals=signals, + queries=queries, + updates=updates, + sandboxed=sandboxed, + failure_exception_types=failure_exception_types, + versioning_behavior=versioning_behavior, + dynamic_config_fn=dynamic_config_fn, + ) + setattr(cls, "__temporal_workflow_definition", defn) + setattr(run_fn, "__temporal_workflow_definition", defn) + + def __post_init__(self) -> None: + if self.arg_types is None and self.ret_type is None: + dynamic = self.name is None + arg_types, ret_type = temporalio.common._type_hints_from_func(self.run_fn) + # If dynamic, must be a sequence of raw values + if dynamic and ( + not arg_types + or len(arg_types) != 1 + or arg_types[0] != Sequence[temporalio.common.RawValue] + ): + raise TypeError( + "Dynamic workflow must accept a single Sequence[temporalio.common.RawValue]" + ) + object.__setattr__(self, "arg_types", arg_types) + object.__setattr__(self, "ret_type", ret_type) + + +def _parameters_identical_up_to_naming(fn1: Callable, fn2: Callable) -> bool: + """Return True if the functions have identical parameter lists, ignoring parameter names.""" + + def params(fn: Callable) -> list[inspect.Parameter]: + # Ignore name when comparing parameters (remaining fields are kind, + # default, and annotation). + return [p.replace(name="x") for p in inspect.signature(fn).parameters.values()] + + # We require that any type annotations present match exactly; i.e. we do + # not support any notion of subtype compatibility. + return params(fn1) == params(fn2) + + +def _is_unbound_method_on_cls(fn: Callable[..., Any], cls: type) -> bool: + # Python 3 does not make this easy, ref https://stackoverflow.com/questions/3589311 + return ( + inspect.isfunction(fn) + and inspect.getmodule(fn) is inspect.getmodule(cls) + and fn.__qualname__.rsplit(".", 1)[0] == cls.__name__ + ) diff --git a/temporalio/workflow/_event_groups.py b/temporalio/workflow/_event_groups.py new file mode 100644 index 0000000000..2f34b69609 --- /dev/null +++ b/temporalio/workflow/_event_groups.py @@ -0,0 +1,239 @@ +"""Event Groups, a way to group logically related workflow events. + +.. warning:: + Event Groups is an experimental API and may change without notice. +""" + +from __future__ import annotations + +import contextvars +from abc import ABC, abstractmethod +from collections.abc import Iterator, Sequence +from contextlib import contextmanager +from dataclasses import dataclass, field + +import temporalio.api.sdk.v1 +import temporalio.converter + +from ._context import _Runtime +from ._sandbox import logger + +__all__ = [ + "EventGroup", + "create_event_group", + "_inbound_event_group", + "_inbound_update_event_group", + "_capture_event_group_markers", +] + + +class EventGroup(ABC): + """A discrete token associating workflow commands, and the history events + they produce, with a logical group for UI and observability purposes. + + Multiple Event Groups may be attached to a single command, and a single + Event Group may be attached to multiple commands. + + Instances are created with :py:func:`create_event_group`. They may be + attached to specific commands via the ``event_groups`` option of the API + producing the command, or to every command produced within a block of + workflow code via :py:meth:`scope`. + + .. warning:: + Event Groups is an experimental API and may change without notice. + """ + + @contextmanager + def scope(self) -> Iterator[None]: + """Context manager attaching this Event Group to every command produced + within it. + + Scopes nest and compose: a command produced inside an inner scope + carries the Event Groups of all enclosing scopes. Coroutines started + within a scope inherit it, since they capture the context active at + their creation. + + Only usable from within a workflow. + + .. warning:: + Event Groups is an experimental API and may change without notice. + """ + _Runtime.current() + token = _active_event_groups.set(self._applied_over(_active_event_groups.get())) + try: + yield + finally: + try: + _active_event_groups.reset(token) + except ValueError: + # Unwinding from a context other than the one the scope was + # entered in, which happens when a coroutine suspended inside + # the scope is closed rather than resumed. The context the + # value was set in is being discarded anyway. + pass + + @abstractmethod + def _applied_over(self, active: _ActiveEventGroups) -> _ActiveEventGroups: + """Return the active set resulting from entering this group's scope.""" + ... + + @abstractmethod + def _to_proto(self) -> temporalio.api.sdk.v1.EventGroupMarker: + """Serialize as the marker attached to a workflow command.""" + ... + + +class _LabelEventGroup(EventGroup): + """An Event Group explicitly created by workflow code.""" + + def __init__(self, id: str, label: str | None) -> None: + self._id = id + self._label = label + + def _applied_over(self, active: _ActiveEventGroups) -> _ActiveEventGroups: + return _ActiveEventGroups( + implicit=active.implicit, + explicit={**active.explicit, self._id: self}, + ) + + def _to_proto(self) -> temporalio.api.sdk.v1.EventGroupMarker: + if self._label is None: + return temporalio.api.sdk.v1.EventGroupMarker( + label=temporalio.api.sdk.v1.EventGroupMarker.Label(id=self._id) + ) + # Deliberately the SDK's default converter, not the user-provided one. + return temporalio.api.sdk.v1.EventGroupMarker( + label=temporalio.api.sdk.v1.EventGroupMarker.Label( + id=self._id, + label=temporalio.converter.PayloadConverter.default.to_payload( + self._label + ), + ) + ) + + +class _ImplicitEventGroup(EventGroup): + """An Event Group created by the SDK around an inbound signal or update. + + The workflow's main function deliberately gets no such group, so commands it + produces outside any explicit scope carry no markers at all. + """ + + def __init__(self, marker: temporalio.api.sdk.v1.EventGroupMarker) -> None: + self._marker = marker + + def _applied_over(self, active: _ActiveEventGroups) -> _ActiveEventGroups: + # Implicit groups intentionally do not inherit the enclosing scope: a + # handler registered inside an explicit scope must not attribute its + # commands to that scope. + return _ActiveEventGroups(implicit=self) + + def _to_proto(self) -> temporalio.api.sdk.v1.EventGroupMarker: + return self._marker + + +class _StubImplicitEventGroup(EventGroup): + """No-op implicit group used when an inbound event ID is missing or invalid. + + Event Groups must not fail a workflow task, so the handler still enters a + scope that isolates it from enclosing explicit groups without emitting a + marker. + """ + + def _applied_over(self, active: _ActiveEventGroups) -> _ActiveEventGroups: + return _ActiveEventGroups() + + def _to_proto(self) -> temporalio.api.sdk.v1.EventGroupMarker: + return temporalio.api.sdk.v1.EventGroupMarker() + + +@dataclass(frozen=True) +class _ActiveEventGroups: + implicit: EventGroup | None = None + explicit: dict[str, _LabelEventGroup] = field(default_factory=dict) + + +_active_event_groups: contextvars.ContextVar[_ActiveEventGroups] = ( + contextvars.ContextVar( + "__temporal_active_event_groups", default=_ActiveEventGroups() + ) +) + + +def create_event_group(id: str, *, label: str | None = None) -> EventGroup: + """Create an Event Group that can be attached to commands scheduled by this + workflow. + + Attach the returned group via command ``event_groups`` options, or via + :py:meth:`EventGroup.scope`. + + Args: + id: Non-empty group identity. Commands with the same ``id`` belong to + the same group. The user-provided ID is stored as plain text in the + workflow history and should therefore not contain sensitive + information. + label: Optional non-empty display text for the UI / CLI. If provided, + it is persisted to history as a codec-encoded Payload. + + .. warning:: + Event Groups is an experimental API and may change without notice. + """ + _Runtime.current() + if not id: + raise ValueError("Event group id cannot be empty") + if label is not None and not label: + raise ValueError("Event group label cannot be empty") + return _LabelEventGroup(id, label) + + +def _inbound_event_group(event_id: int) -> EventGroup: + """Create the implicit Event Group for an inbound signal's history event.""" + if event_id <= 0: + logger.warning( + "Cannot create implicit Event Group for signal with invalid " + "originating event ID: %s", + event_id, + ) + return _StubImplicitEventGroup() + return _ImplicitEventGroup( + temporalio.api.sdk.v1.EventGroupMarker( + inbound_event=temporalio.api.sdk.v1.EventGroupMarker.InboundEvent( + inbound_event_id=event_id + ) + ) + ) + + +def _inbound_update_event_group(update_id: str) -> EventGroup: + """Create the implicit Event Group for an inbound update.""" + return _ImplicitEventGroup( + temporalio.api.sdk.v1.EventGroupMarker( + inbound_update=temporalio.api.sdk.v1.EventGroupMarker.InboundUpdate( + inbound_update_id=update_id + ) + ) + ) + + +def _capture_event_group_markers( + directs: Sequence[EventGroup] | None, +) -> list[temporalio.api.sdk.v1.EventGroupMarker]: + """Snapshot ambient and directly attached Event Groups as command markers. + + Must be called from the context the command was requested in, which is not + necessarily the one it is ultimately built in. + """ + active = _active_event_groups.get() + explicit = active.explicit + if directs: + explicit = dict(explicit) + for group in directs: + if not isinstance(group, _LabelEventGroup): + raise TypeError( + "Event groups must be created with workflow.create_event_group()" + ) + explicit[group._id] = group + markers = [group._to_proto() for group in explicit.values()] + if active.implicit: + markers.insert(0, active.implicit._to_proto()) + return markers diff --git a/temporalio/workflow/_exceptions.py b/temporalio/workflow/_exceptions.py new file mode 100644 index 0000000000..2d34c2fedd --- /dev/null +++ b/temporalio/workflow/_exceptions.py @@ -0,0 +1,119 @@ +from __future__ import annotations + +from enum import Enum, IntEnum + +import temporalio.api.enums.v1 +import temporalio.bridge.proto.common +import temporalio.exceptions + +__all__ = [ + "NondeterminismError", + "ReadOnlyContextError", + "VersioningIntent", + "ContinueAsNewVersioningBehavior", +] + + +class NondeterminismError(temporalio.exceptions.TemporalError): + """Error that can be thrown during replay for non-deterministic workflow.""" + + def __init__(self, message: str) -> None: + """Initialize a nondeterminism error.""" + super().__init__(message) + self.message = message + + +class ReadOnlyContextError(temporalio.exceptions.TemporalError): + """Error thrown when trying to do mutable workflow calls in a read-only + context like a query or update validator. + """ + + def __init__(self, message: str) -> None: + """Initialize a read-only context error.""" + super().__init__(message) + self.message = message + + +class _NotInWorkflowEventLoopError( # pyright: ignore[reportUnusedClass] + temporalio.exceptions.TemporalError +): + def __init__(self, *args: object) -> None: + super().__init__("Not in workflow event loop") + self.message = "Not in workflow event loop" + + +class VersioningIntent(Enum): + """Indicates whether the user intends certain commands to be run on a compatible worker Build + Id version or not. + + `COMPATIBLE` indicates that the command should run on a worker with compatible version if + possible. It may not be possible if the target task queue does not also have knowledge of the + current worker's Build Id. + + `DEFAULT` indicates that the command should run on the target task queue's current + overall-default Build Id. + + Where this type is accepted optionally, an unset value indicates that the SDK should choose the + most sensible default behavior for the type of command, accounting for whether the command will + be run on the same task queue as the current worker. + + .. deprecated:: + Use Worker Deployment versioning instead. + """ + + COMPATIBLE = 1 + DEFAULT = 2 + + def _to_proto(self) -> temporalio.bridge.proto.common.VersioningIntent.ValueType: + if self == VersioningIntent.COMPATIBLE: + return temporalio.bridge.proto.common.VersioningIntent.COMPATIBLE + elif self == VersioningIntent.DEFAULT: + return temporalio.bridge.proto.common.VersioningIntent.DEFAULT + return temporalio.bridge.proto.common.VersioningIntent.UNSPECIFIED + + +class ContinueAsNewVersioningBehavior(IntEnum): + """Experimental. Optionally decide the versioning behavior that the first task of the new run should use. + For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version + of the previous run. + """ + + UNSPECIFIED = int( + temporalio.api.enums.v1.ContinueAsNewVersioningBehavior.CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED + ) + """An initial versioning behavior is not set, follow the existing continue-as-new inheritance semantics. + See https://docs.temporal.io/worker-versioning#inheritance-semantics for more detail. + """ + + AUTO_UPGRADE = int( + temporalio.api.enums.v1.ContinueAsNewVersioningBehavior.CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE + ) + """Start the new run with AutoUpgrade behavior. Use the Target Version of the workflow's task queue at + start-time, as AutoUpgrade workflows do. After the first workflow task completes, use whatever + Versioning Behavior the workflow is annotated with in the workflow code. + + Note that if the previous workflow had a Pinned override, that override will be inherited by the + new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new + command. If a Pinned override is inherited by the new run, and the new run starts with AutoUpgrade + behavior, the base version of the new run will be the Target Version as described above, but the + effective version will be whatever is specified by the Versioning Override until the override is removed. + """ + + USE_RAMPING_VERSION = int( + temporalio.api.enums.v1.ContinueAsNewVersioningBehavior.CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION + ) + """Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's + Target Version. After the first workflow task completes, the workflow will use whatever Versioning + Behavior it is annotated with. If there is no Ramping Version by the time that the first workflow task + is dispatched, it will be sent to the Current Version. + + It is highly discouraged to use this if the workflow is annotated with AutoUpgrade behavior, because + this setting ONLY applies to the first task of the workflow. If, after the first task, the workflow + is AutoUpgrade, it will behave like a normal AutoUpgrade workflow and go to the Target Version, which + may be the Current Version instead of the Ramping Version. + + Note that if the workflow being continued has a Pinned override, that override will be inherited by the + new workflow run regardless of the ContinueAsNewVersioningBehavior specified in the continue-as-new + command. Versioning Override always takes precedence until it's removed manually via + UpdateWorkflowExecutionOptions. + """ diff --git a/temporalio/workflow/_handlers.py b/temporalio/workflow/_handlers.py new file mode 100644 index 0000000000..99fafa2051 --- /dev/null +++ b/temporalio/workflow/_handlers.py @@ -0,0 +1,595 @@ +from __future__ import annotations + +import inspect +import typing +import warnings +from collections.abc import Awaitable, Callable, Sequence +from dataclasses import dataclass +from enum import Enum +from functools import partial +from typing import Any, Literal, cast, overload + +from typing_extensions import Protocol, runtime_checkable + +import temporalio.common + +from ..types import ( + CallableSyncOrAsyncReturnNoneType, + CallableSyncOrAsyncType, + CallableType, + MultiParamSpec, + ProtocolReturnType, + ReturnType, +) + +__all__ = [ + "HandlerUnfinishedPolicy", + "UnfinishedSignalHandlersWarning", + "UnfinishedUpdateHandlersWarning", + "UpdateMethodMultiParam", + "query", + "signal", + "update", +] + + +class HandlerUnfinishedPolicy(Enum): + """Actions taken if a workflow terminates with running handlers. + + Policy defining actions taken when a workflow exits while update or signal handlers are running. + The workflow exit may be due to successful return, failure, cancellation, or continue-as-new. + """ + + WARN_AND_ABANDON = 1 + """Issue a warning in addition to abandoning.""" + ABANDON = 2 + """Abandon the handler. + + In the case of an update handler this means that the client will receive an error rather than + the update result.""" + + +class UnfinishedUpdateHandlersWarning(RuntimeWarning): + """The workflow exited before all update handlers had finished executing.""" + + +class UnfinishedSignalHandlersWarning(RuntimeWarning): + """The workflow exited before all signal handlers had finished executing.""" + + +@overload +def signal( + fn: CallableSyncOrAsyncReturnNoneType, +) -> CallableSyncOrAsyncReturnNoneType: ... + + +@overload +def signal( + *, + unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, + description: str | None = None, +) -> Callable[ + [CallableSyncOrAsyncReturnNoneType], CallableSyncOrAsyncReturnNoneType +]: ... + + +@overload +def signal( + *, + name: str, + unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, + description: str | None = None, +) -> Callable[ + [CallableSyncOrAsyncReturnNoneType], CallableSyncOrAsyncReturnNoneType +]: ... + + +@overload +def signal( + *, + dynamic: Literal[True], + unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, + description: str | None = None, +) -> Callable[ + [CallableSyncOrAsyncReturnNoneType], CallableSyncOrAsyncReturnNoneType +]: ... + + +def signal( + fn: CallableSyncOrAsyncReturnNoneType | None = None, + *, + name: str | None = None, + dynamic: bool | None = False, + unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, + description: str | None = None, +) -> ( + Callable[[CallableSyncOrAsyncReturnNoneType], CallableSyncOrAsyncReturnNoneType] + | CallableSyncOrAsyncReturnNoneType +): + """Decorator for a workflow signal method. + + This is used on any async or non-async method that you wish to be called upon + receiving a signal. If a function overrides one with this decorator, it too + must be decorated. + + Signal methods can only have positional parameters. Best practice for + non-dynamic signal methods is to only take a single object/dataclass + argument that can accept more fields later if needed. Return values from + signal methods are ignored. + + Args: + fn: The function to decorate. + name: Signal name. Defaults to method ``__name__``. Cannot be present + when ``dynamic`` is present. + dynamic: If true, this handles all signals not otherwise handled. The + parameters of the method must be self, a string name, and a + ``*args`` positional varargs. Cannot be present when ``name`` is + present. + unfinished_policy: Actions taken if a workflow terminates with + a running instance of this handler. + description: A short description of the signal that may appear in the UI/CLI. + """ + + def decorator( + name: str | None, + unfinished_policy: HandlerUnfinishedPolicy, + fn: CallableSyncOrAsyncReturnNoneType, + ) -> CallableSyncOrAsyncReturnNoneType: + if not name and not dynamic: + name = fn.__name__ + defn = _SignalDefinition( + name=name, + fn=fn, + is_method=True, + unfinished_policy=unfinished_policy, + description=description, + ) + setattr(fn, "__temporal_signal_definition", defn) + if defn.dynamic_vararg: + warnings.warn( + "Dynamic signals with vararg third param is deprecated, use Sequence[RawValue]", + DeprecationWarning, + stacklevel=2, + ) + return fn + + if not fn: + if name is not None and dynamic: + raise RuntimeError("Cannot provide name and dynamic boolean") + return partial(decorator, name, unfinished_policy) + else: + return decorator(fn.__name__, unfinished_policy, fn) + + +@overload +def query(fn: CallableType) -> CallableType: ... + + +@overload +def query( + *, name: str, description: str | None = None +) -> Callable[[CallableType], CallableType]: ... + + +@overload +def query( + *, dynamic: Literal[True], description: str | None = None +) -> Callable[[CallableType], CallableType]: ... + + +@overload +def query(*, description: str) -> Callable[[CallableType], CallableType]: ... + + +def query( + fn: CallableType | None = None, # type: ignore[reportInvalidTypeVarUse] + *, + name: str | None = None, + dynamic: bool | None = False, + description: str | None = None, +): + """Decorator for a workflow query method. + + This is used on any non-async method that expects to handle a query. If a + function overrides one with this decorator, it too must be decorated. + + Query methods can only have positional parameters. Best practice for + non-dynamic query methods is to only take a single object/dataclass + argument that can accept more fields later if needed. The return value is + the resulting query value. Query methods must not mutate any workflow state. + + Args: + fn: The function to decorate. + name: Query name. Defaults to method ``__name__``. Cannot be present + when ``dynamic`` is present. + dynamic: If true, this handles all queries not otherwise handled. The + parameters of the method should be self, a string name, and a + ``Sequence[RawValue]``. An older form of this accepted vararg + parameters which will now warn. Cannot be present when ``name`` is + present. + description: A short description of the query that may appear in the UI/CLI. + """ + + def decorator( + name: str | None, + description: str | None, + fn: CallableType, + *, + bypass_async_check: bool = False, + ) -> CallableType: + if not name and not dynamic: + name = fn.__name__ + if not bypass_async_check and inspect.iscoroutinefunction(fn): + warnings.warn( + "Queries as async def functions are deprecated", + DeprecationWarning, + stacklevel=2, + ) + defn = _QueryDefinition( + name=name, fn=fn, is_method=True, description=description + ) + setattr(fn, "__temporal_query_definition", defn) + if defn.dynamic_vararg: + warnings.warn( + "Dynamic queries with vararg third param is deprecated, use Sequence[RawValue]", + DeprecationWarning, + stacklevel=2, + ) + return fn + + if name is not None or dynamic or description: + if name is not None and dynamic: + raise RuntimeError("Cannot provide name and dynamic boolean") + return partial(decorator, name, description) + if fn is None: + raise RuntimeError("Cannot create query without function or name or dynamic") + if inspect.iscoroutinefunction(fn): + warnings.warn( + "Queries as async def functions are deprecated", + DeprecationWarning, + stacklevel=2, + ) + return decorator(fn.__name__, description, fn, bypass_async_check=True) + + +@runtime_checkable +class UpdateMethodMultiParam(Protocol[MultiParamSpec, ProtocolReturnType]): + """Decorated workflow update functions implement this.""" + + _defn: _UpdateDefinition + + def __call__( + self, *args: MultiParamSpec.args, **kwargs: MultiParamSpec.kwargs + ) -> ProtocolReturnType | Awaitable[ProtocolReturnType]: + """Generic callable type callback.""" + ... + + def validator( + self, vfunc: Callable[MultiParamSpec, None] + ) -> Callable[MultiParamSpec, None]: + """Use to decorate a function to validate the arguments passed to the update handler. + + The validator must be a regular (non-``async``) function. Decorating an + ``async def`` function raises :py:class:`ValueError`. + """ + ... + + +@overload +def update( + fn: Callable[MultiParamSpec, Awaitable[ReturnType]], +) -> UpdateMethodMultiParam[MultiParamSpec, ReturnType]: ... + + +@overload +def update( + fn: Callable[MultiParamSpec, ReturnType], +) -> UpdateMethodMultiParam[MultiParamSpec, ReturnType]: ... + + +@overload +def update( + *, + unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, + description: str | None = None, +) -> Callable[ + [Callable[MultiParamSpec, ReturnType]], + UpdateMethodMultiParam[MultiParamSpec, ReturnType], +]: ... + + +@overload +def update( + *, + name: str, + unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, + description: str | None = None, +) -> Callable[ + [Callable[MultiParamSpec, ReturnType]], + UpdateMethodMultiParam[MultiParamSpec, ReturnType], +]: ... + + +@overload +def update( + *, + dynamic: Literal[True], + unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, + description: str | None = None, +) -> Callable[ + [Callable[MultiParamSpec, ReturnType]], + UpdateMethodMultiParam[MultiParamSpec, ReturnType], +]: ... + + +def update( + fn: CallableSyncOrAsyncType | None = None, # type: ignore[reportInvalidTypeVarUse] + *, + name: str | None = None, + dynamic: bool | None = False, + unfinished_policy: HandlerUnfinishedPolicy = HandlerUnfinishedPolicy.WARN_AND_ABANDON, + description: str | None = None, +) -> ( + UpdateMethodMultiParam[MultiParamSpec, ReturnType] + | Callable[ + [Callable[MultiParamSpec, ReturnType]], + UpdateMethodMultiParam[MultiParamSpec, ReturnType], + ] +): + """Decorator for a workflow update handler method. + + This is used on any async or non-async method that you wish to be called upon + receiving an update. If a function overrides one with this decorator, it too + must be decorated. + + You may also optionally define a validator method that will be called before + this handler you have applied this decorator to. You can specify the validator + with ``@update_handler_function_name.validator``. + + Update methods can only have positional parameters. Best practice for + non-dynamic update methods is to only take a single object/dataclass + argument that can accept more fields later if needed. The handler may return + a serializable value which will be sent back to the caller of the update. + + Args: + fn: The function to decorate. + name: Update name. Defaults to method ``__name__``. Cannot be present + when ``dynamic`` is present. + dynamic: If true, this handles all updates not otherwise handled. The + parameters of the method must be self, a string name, and a + ``*args`` positional varargs. Cannot be present when ``name`` is + present. + unfinished_policy: Actions taken if a workflow terminates with + a running instance of this handler. + description: A short description of the update that may appear in the UI/CLI. + """ + + def decorator( + name: str | None, + unfinished_policy: HandlerUnfinishedPolicy, + fn: CallableSyncOrAsyncType, + ) -> CallableSyncOrAsyncType: + if not name and not dynamic: + name = fn.__name__ + defn = _UpdateDefinition( + name=name, + fn=fn, + is_method=True, + unfinished_policy=unfinished_policy, + description=description, + ) + if defn.dynamic_vararg: + raise RuntimeError( + "Dynamic updates do not support a vararg third param, use Sequence[RawValue]", + ) + setattr(fn, "_defn", defn) + setattr(fn, "validator", partial(_update_validator, defn)) + return fn + + if not fn: + if name is not None and dynamic: + raise RuntimeError("Cannot provide name and dynamic boolean") + return partial(decorator, name, unfinished_policy) # type: ignore[reportReturnType, return-value] + else: + return decorator(fn.__name__, unfinished_policy, fn) # type: ignore[reportReturnType, return-value] + + +def _update_validator( + update_def: _UpdateDefinition, fn: Callable[..., None] | None = None +) -> Callable[..., None] | None: + """Decorator for a workflow update validator method.""" + if fn is not None: + update_def.set_validator(fn) + return fn + + +def _bind_method(obj: Any, fn: Callable[..., Any]) -> Callable[..., Any]: + # Curry instance on the definition function since that represents an + # unbound method + if inspect.iscoroutinefunction(fn): + # We cannot use functools.partial here because in <= 3.7 that isn't + # considered an inspect.iscoroutinefunction + fn = cast(Callable[..., Awaitable[Any]], fn) + + async def with_object(*args: Any, **kwargs: Any) -> Any: + return await fn(obj, *args, **kwargs) + + return with_object + return partial(fn, obj) + + +def _assert_dynamic_handler_args( + fn: Callable, arg_types: list[type] | None, is_method: bool +) -> bool: + # Dynamic query/signal/update must have three args: self, name, and + # Sequence[RawValue]. An older form accepted varargs for the third param for signals/queries so + # we will too (but will warn in the signal/query code). + params = list(inspect.signature(fn).parameters.values()) + total_expected_params = 3 if is_method else 2 + if ( + len(params) == total_expected_params + and params[-2].kind is inspect.Parameter.POSITIONAL_OR_KEYWORD + and params[-1].kind is inspect.Parameter.VAR_POSITIONAL + ): + # Old var-arg form + return False + if ( + not arg_types + or len(arg_types) != 2 + or arg_types[0] is not str + or ( + arg_types[1] != Sequence[temporalio.common.RawValue] + and arg_types[1] != typing.Sequence[temporalio.common.RawValue] # type: ignore[reportDeprecated] + ) + ): + raise RuntimeError( + "Dynamic handler must have 3 arguments: self, str, and Sequence[RawValue]" + ) + return True + + +@dataclass(frozen=True) +class _SignalDefinition: + # None if dynamic + name: str | None + fn: Callable[..., None | Awaitable[None]] + is_method: bool + unfinished_policy: HandlerUnfinishedPolicy = ( + HandlerUnfinishedPolicy.WARN_AND_ABANDON + ) + description: str | None = None + # Types loaded on post init if None + arg_types: list[type] | None = None + dynamic_vararg: bool = False + + @staticmethod + def from_fn(fn: Callable) -> _SignalDefinition | None: + return getattr(fn, "__temporal_signal_definition", None) + + @staticmethod + def must_name_from_fn_or_str(signal: str | Callable) -> str: + if callable(signal): + defn = _SignalDefinition.from_fn(signal) + if not defn: + raise RuntimeError( + f"Signal definition not found on {signal.__qualname__}, " + "is it decorated with @workflow.signal?" + ) + elif not defn.name: + raise RuntimeError("Cannot invoke dynamic signal definition") + # TODO(cretz): Check count/type of args at runtime? + return defn.name + return str(signal) + + def __post_init__(self) -> None: + if self.arg_types is None: + arg_types, _ = temporalio.common._type_hints_from_func(self.fn) + # If dynamic, assert it + if not self.name: + object.__setattr__( + self, + "dynamic_vararg", + not _assert_dynamic_handler_args( + self.fn, arg_types, self.is_method + ), + ) + object.__setattr__(self, "arg_types", arg_types) + + def bind_fn(self, obj: Any) -> Callable[..., Any]: + return _bind_method(obj, self.fn) + + +@dataclass(frozen=True) +class _QueryDefinition: + # None if dynamic + name: str | None + fn: Callable[..., Any] + is_method: bool + description: str | None = None + # Types loaded on post init if both are None + arg_types: list[type] | None = None + ret_type: type | None = None + dynamic_vararg: bool = False + + @staticmethod + def from_fn(fn: Callable) -> _QueryDefinition | None: + return getattr(fn, "__temporal_query_definition", None) + + def __post_init__(self) -> None: + if self.arg_types is None and self.ret_type is None: + arg_types, ret_type = temporalio.common._type_hints_from_func(self.fn) + # If dynamic, assert it + if not self.name: + object.__setattr__( + self, + "dynamic_vararg", + not _assert_dynamic_handler_args( + self.fn, arg_types, self.is_method + ), + ) + object.__setattr__(self, "arg_types", arg_types) + object.__setattr__(self, "ret_type", ret_type) + + def bind_fn(self, obj: Any) -> Callable[..., Any]: + return _bind_method(obj, self.fn) + + +@dataclass(frozen=True) +class _UpdateDefinition: + # None if dynamic + name: str | None + fn: Callable[..., Any | Awaitable[Any]] + is_method: bool + unfinished_policy: HandlerUnfinishedPolicy = ( + HandlerUnfinishedPolicy.WARN_AND_ABANDON + ) + description: str | None = None + # Types loaded on post init if None + arg_types: list[type] | None = None + ret_type: type | None = None + validator: Callable[..., None] | None = None + dynamic_vararg: bool = False + + def __post_init__(self) -> None: + if self.arg_types is None: + arg_types, ret_type = temporalio.common._type_hints_from_func(self.fn) + # Disallow dynamic varargs + if not self.name and not _assert_dynamic_handler_args( + self.fn, arg_types, self.is_method + ): + raise RuntimeError( + "Dynamic updates do not support a vararg third param, use Sequence[RawValue]", + ) + object.__setattr__(self, "arg_types", arg_types) + object.__setattr__(self, "ret_type", ret_type) + + def bind_fn(self, obj: Any) -> Callable[..., Any]: + return _bind_method(obj, self.fn) + + def bind_validator(self, obj: Any) -> Callable[..., Any]: + if self.validator is not None: + return _bind_method(obj, self.validator) + return lambda *args, **kwargs: None + + def set_validator(self, validator: Callable[..., None]) -> None: + # Validators are called without being awaited, so an async one would + # never run and every update would be accepted. + if inspect.iscoroutinefunction(validator): + raise ValueError("Update validator must not be an async function") + if self.validator: + raise RuntimeError(f"Validator already set for update {self.name}") + object.__setattr__(self, "validator", validator) + + @classmethod + def get_name_and_result_type( + cls, + name_or_update_fn: str | Callable[..., Any], + ) -> tuple[str, type | None]: + if isinstance(name_or_update_fn, UpdateMethodMultiParam): + defn = name_or_update_fn._defn + if not defn.name: + raise RuntimeError("Cannot invoke dynamic update definition") + # TODO(cretz): Check count/type of args at runtime? + return defn.name, defn.ret_type + else: + return str(name_or_update_fn), None diff --git a/temporalio/workflow/_nexus.py b/temporalio/workflow/_nexus.py new file mode 100644 index 0000000000..a23432545a --- /dev/null +++ b/temporalio/workflow/_nexus.py @@ -0,0 +1,584 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections.abc import Awaitable, Callable, Generator, Mapping, Sequence +from datetime import timedelta +from enum import IntEnum +from typing import Any, Generic, overload + +import nexusrpc +import nexusrpc.handler +from nexusrpc import InputT, OutputT + +import temporalio.bridge.proto.nexus +import temporalio.nexus +from temporalio.types import NexusServiceType + +from ._context import _Runtime +from ._event_groups import EventGroup + +__all__ = [ + "NexusClient", + "NexusOperationCancellationType", + "NexusOperationHandle", + "create_nexus_client", +] + + +class NexusOperationHandle(Generic[OutputT]): + """Handle for interacting with a Nexus operation.""" + + # TODO(nexus-preview): should attempts to instantiate directly throw? + + def cancel(self) -> bool: + """Request cancellation of the operation.""" + raise NotImplementedError + + def __await__(self) -> Generator[Any, Any, OutputT]: + """Support await.""" + raise NotImplementedError + + @property + def operation_token(self) -> str | None: + """The operation token for this handle.""" + raise NotImplementedError + + +class NexusOperationCancellationType(IntEnum): + """Defines behavior of a Nexus operation when the caller workflow initiates cancellation. + + Pass one of these values to :py:meth:`NexusClient.start_operation` to define cancellation + behavior. + + To initiate cancellation, use :py:meth:`NexusOperationHandle.cancel` and then ``await`` the + operation handle. This will result in a :py:class:`exceptions.NexusOperationError`. The values + of this enum define what is guaranteed to have happened by that point. + """ + + ABANDON = int(temporalio.bridge.proto.nexus.NexusOperationCancellationType.ABANDON) + """Do not send any cancellation request to the operation handler; just report cancellation to the caller""" + + TRY_CANCEL = int( + temporalio.bridge.proto.nexus.NexusOperationCancellationType.TRY_CANCEL + ) + """Send a cancellation request but immediately report cancellation to the caller. Note that this + does not guarantee that cancellation is delivered to the operation handler if the caller exits + before the delivery is done. + """ + + WAIT_REQUESTED = int( + temporalio.bridge.proto.nexus.NexusOperationCancellationType.WAIT_CANCELLATION_REQUESTED + ) + """Send a cancellation request and wait for confirmation that the request was received. + Does not wait for the operation to complete. + """ + + WAIT_COMPLETED = int( + temporalio.bridge.proto.nexus.NexusOperationCancellationType.WAIT_CANCELLATION_COMPLETED + ) + """Send a cancellation request and wait for the operation to complete. + Note that the operation may not complete as cancelled (for example, if it catches the + :py:exc:`asyncio.CancelledError` resulting from the cancellation request).""" + + +class NexusClient(ABC, Generic[NexusServiceType]): + """A client for invoking Nexus operations. + + Example:: + + nexus_client = workflow.create_nexus_client( + endpoint=my_nexus_endpoint, + service=MyService, + ) + handle = await nexus_client.start_operation( + operation=MyService.my_operation, + input=MyOperationInput(value="hello"), + schedule_to_close_timeout=timedelta(seconds=10), + ) + result = await handle.result() + """ + + # Overload for nexusrpc.Operation + @overload + @abstractmethod + async def start_operation( + self, + operation: nexusrpc.Operation[InputT, OutputT], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for string operation name + @overload + @abstractmethod + async def start_operation( + self, + operation: str, + input: Any, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for workflow_run_operation methods + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [NexusServiceType, temporalio.nexus.WorkflowRunOperationContext, InputT], + Awaitable[temporalio.nexus.WorkflowHandle[OutputT]], + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for sync_operation methods (async def) + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [NexusServiceType, nexusrpc.handler.StartOperationContext, InputT], + Awaitable[OutputT], + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for sync_operation methods (def) + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [NexusServiceType, nexusrpc.handler.StartOperationContext, InputT], + OutputT, + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for operation_handler + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [NexusServiceType], nexusrpc.handler.OperationHandler[InputT, OutputT] + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + # Overload for temporal_operation methods + @overload + @abstractmethod + async def start_operation( + self, + operation: Callable[ + [ + NexusServiceType, + temporalio.nexus.TemporalStartOperationContext, + temporalio.nexus.TemporalNexusClient, + InputT, + ], + Awaitable[temporalio.nexus.TemporalOperationResult[OutputT]], + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> NexusOperationHandle[OutputT]: ... + + @abstractmethod + async def start_operation( + self, + operation: Any, + input: Any, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> Any: + """Start a Nexus operation and return its handle. + + Args: + operation: The Nexus operation. + input: The Nexus operation input. + output_type: The Nexus operation output type. + schedule_to_close_timeout: Timeout for the entire operation attempt. + schedule_to_start_timeout: Timeout for the operation to be started. + start_to_close_timeout: Timeout for async operations to complete after starting. + cancellation_type: How the operation is treated when it is cancelled from + the workflow. + headers: Headers to send with the Nexus HTTP request. + summary: A single-line fixed summary for this operation that may appear + in UI/CLI. This can be in single-line Temporal markdown format. + event_groups: Event Groups to associate this command with, in + addition to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + + Returns: + A handle to the Nexus operation. The result can be obtained as + ```python + await handle.result() + ``` + """ + ... + + # Overload for nexusrpc.Operation + @overload + @abstractmethod + async def execute_operation( + self, + operation: nexusrpc.Operation[InputT, OutputT], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> OutputT: ... + + # Overload for string operation name + @overload + @abstractmethod + async def execute_operation( + self, + operation: str, + input: Any, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> OutputT: ... + + # Overload for workflow_run_operation methods + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [NexusServiceType, temporalio.nexus.WorkflowRunOperationContext, InputT], + Awaitable[temporalio.nexus.WorkflowHandle[OutputT]], + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> OutputT: ... + + # Overload for sync_operation methods (async def) + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [NexusServiceType, nexusrpc.handler.StartOperationContext, InputT], + Awaitable[OutputT], + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> OutputT: ... + + # Overload for sync_operation methods (def) + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [NexusServiceType, nexusrpc.handler.StartOperationContext, InputT], + OutputT, + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> OutputT: ... + + # Overload for operation_handler + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [NexusServiceType], + nexusrpc.handler.OperationHandler[InputT, OutputT], + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> OutputT: ... + + # Overload for temporal_operation methods + @overload + @abstractmethod + async def execute_operation( + self, + operation: Callable[ + [ + NexusServiceType, + temporalio.nexus.TemporalStartOperationContext, + temporalio.nexus.TemporalNexusClient, + InputT, + ], + Awaitable[temporalio.nexus.TemporalOperationResult[OutputT]], + ], + input: InputT, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> OutputT: ... + + @abstractmethod + async def execute_operation( + self, + operation: Any, + input: Any, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> Any: + """Execute a Nexus operation and return its result. + + Args: + operation: The Nexus operation. + input: The Nexus operation input. + output_type: The Nexus operation output type. + schedule_to_close_timeout: Timeout for the entire operation attempt. + schedule_to_start_timeout: Timeout for the operation to be started. + start_to_close_timeout: Timeout for async operations to complete after starting. + cancellation_type: How the operation is treated when it is cancelled from + the workflow. + headers: Headers to send with the Nexus HTTP request. + summary: A single-line fixed summary for this operation that may appear + in UI/CLI. This can be in single-line Temporal markdown format. + event_groups: Event Groups to associate this command with, in + addition to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + + Returns: + The operation result. + """ + ... + + +class _NexusClient(NexusClient[NexusServiceType]): + def __init__( + self, + *, + endpoint: str, + service: type[NexusServiceType] | str, + ) -> None: + """Create a Nexus client. + + Args: + service: The Nexus service. + endpoint: The Nexus endpoint. + """ + # If service is not a str, then it must be a service interface or implementation + # class. + if isinstance(service, str): + self.service_name = service + elif service_defn := nexusrpc.get_service_definition(service): + self.service_name = service_defn.name + else: + raise ValueError( + f"`service` may be a name (str), or a class decorated with either " + f"@nexusrpc.handler.service_handler or @nexusrpc.service. " + f"Invalid service type: {type(service)}" + ) + self.endpoint = endpoint + + async def start_operation( + self, + operation: Any, + input: Any, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> Any: + return await _Runtime.current().workflow_start_nexus_operation( + endpoint=self.endpoint, + service=self.service_name, + operation=operation, + input=input, + output_type=output_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + cancellation_type=cancellation_type, + headers=headers, + summary=summary, + event_groups=event_groups, + ) + + async def execute_operation( + self, + operation: Any, + input: Any, + *, + output_type: type[OutputT] | None = None, + schedule_to_close_timeout: timedelta | None = None, + schedule_to_start_timeout: timedelta | None = None, + start_to_close_timeout: timedelta | None = None, + cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, + headers: Mapping[str, str] | None = None, + summary: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + ) -> Any: + handle = await self.start_operation( + operation, + input, + output_type=output_type, + schedule_to_close_timeout=schedule_to_close_timeout, + schedule_to_start_timeout=schedule_to_start_timeout, + start_to_close_timeout=start_to_close_timeout, + cancellation_type=cancellation_type, + headers=headers, + summary=summary, + event_groups=event_groups, + ) + return await handle + + +@overload +def create_nexus_client( + *, + service: type[NexusServiceType], + endpoint: str, +) -> NexusClient[NexusServiceType]: ... + + +@overload +def create_nexus_client( + *, + service: str, + endpoint: str, +) -> NexusClient[Any]: ... + + +def create_nexus_client( + *, + service: type[NexusServiceType] | str, + endpoint: str, +) -> NexusClient[NexusServiceType]: + """Create a Nexus client. + + Args: + service: The Nexus service. + endpoint: The Nexus endpoint. + """ + return _NexusClient(endpoint=endpoint, service=service) diff --git a/temporalio/workflow/_sandbox.py b/temporalio/workflow/_sandbox.py new file mode 100644 index 0000000000..a30c2aed41 --- /dev/null +++ b/temporalio/workflow/_sandbox.py @@ -0,0 +1,324 @@ +from __future__ import annotations + +import logging +import threading +from collections.abc import Iterator, Mapping, MutableMapping +from contextlib import contextmanager +from enum import Flag, auto +from typing import Any + +from ._context import Info, _Runtime, current_update_info + +__all__ = [ + "LoggerAdapter", + "SandboxImportNotificationPolicy", + "logger", + "unsafe", +] + +_sandbox_unrestricted = threading.local() +_in_sandbox = threading.local() +_imports_passed_through = threading.local() +_sandbox_import_notification_policy_override = threading.local() + + +class SandboxImportNotificationPolicy(Flag): + """Defines the behavior taken when modules are imported into the sandbox after the workflow is initially loaded or unintentionally missing from the passthrough list.""" + + SILENT = auto() + """Allow imports that do not violate sandbox restrictions and no warnings are generated.""" + WARN_ON_DYNAMIC_IMPORT = auto() + """Allows dynamic imports that do not violate sandbox restrictions but issues a warning when an import is triggered in the sandbox after initial workflow load.""" + WARN_ON_UNINTENTIONAL_PASSTHROUGH = auto() + """Allows imports that do not violate sandbox restrictions but issues a warning when an import is triggered in the sandbox that was unintentionally passed through. + + The workflow's defining module is exempt because it is intentionally reloaded + in the sandbox. + """ + RAISE_ON_UNINTENTIONAL_PASSTHROUGH = auto() + """Raise an error when an import is triggered in the sandbox that was unintentionally passed through. + + The workflow's defining module is exempt because it is intentionally reloaded + in the sandbox. + """ + + +class unsafe: + """Contains static methods that should not normally be called during + workflow execution except in advanced cases. + """ + + def __init__(self) -> None: # noqa: D107 + raise NotImplementedError + + @staticmethod + def in_sandbox() -> bool: + """Whether the code is executing on a sandboxed thread. + + Returns: + True if the code is executing in the sandbox thread. + """ + return getattr(_in_sandbox, "value", False) + + @staticmethod + def _set_in_sandbox(v: bool) -> None: + _in_sandbox.value = v + + @staticmethod + def is_replaying() -> bool: + """Whether the workflow is currently replaying. + + This includes queries and update validators that occur during replay. + + Returns: + True if the workflow is currently replaying + """ + return _Runtime.current().workflow_is_replaying() + + @staticmethod + def is_replaying_history_events() -> bool: + """Whether the workflow is replaying history events. + + This excludes queries and update validators, which are live operations. + + Returns: + True if replaying history events, False otherwise. + """ + return _Runtime.current().workflow_is_replaying_history_events() + + @staticmethod + def is_read_only() -> bool: + """Whether the workflow is currently in read-only mode. + + Read-only mode occurs during queries and update validators where + side effects are not allowed. + + Returns: + True if the workflow is in read-only mode, False otherwise. + """ + return _Runtime.current().workflow_is_read_only() + + @staticmethod + def is_sandbox_unrestricted() -> bool: + """Whether the current block of code is not restricted via sandbox. + + Returns: + True if the current code is not restricted in the sandbox. + """ + # Activations happen in different threads than init and possibly the + # local hasn't been initialized in _that_ thread, so we allow unset here + # instead of just setting value = False globally. + return getattr(_sandbox_unrestricted, "value", False) + + @staticmethod + @contextmanager + def sandbox_unrestricted() -> Iterator[None]: + """A context manager to run code without sandbox restrictions.""" + # Only apply if not already applied. Nested calls just continue + # unrestricted. + if unsafe.is_sandbox_unrestricted(): + yield None + return + _sandbox_unrestricted.value = True + try: + yield None + finally: + _sandbox_unrestricted.value = False + + @staticmethod + def is_imports_passed_through() -> bool: + """Whether the current block of code is in + :py:meth:imports_passed_through. + + Returns: + True if the current code's imports will be passed through + """ + # See comment in is_sandbox_unrestricted for why we allow unset instead + # of just global false. + return getattr(_imports_passed_through, "value", False) + + @staticmethod + @contextmanager + def imports_passed_through() -> Iterator[None]: + """Context manager to mark all imports that occur within it as passed + through (meaning not reloaded by the sandbox). + """ + # Only apply if not already applied. Nested calls just continue + # passed through. + if unsafe.is_imports_passed_through(): + yield None + return + _imports_passed_through.value = True + try: + yield None + finally: + _imports_passed_through.value = False + + @staticmethod + def current_import_notification_policy_override() -> ( + SandboxImportNotificationPolicy | None + ): + """Gets the current import notification policy override if one is set.""" + applied_policy = getattr( + _sandbox_import_notification_policy_override, + "value", + None, + ) + return applied_policy + + @staticmethod + @contextmanager + def sandbox_import_notification_policy( + policy: SandboxImportNotificationPolicy, + ) -> Iterator[None]: + """Context manager to apply the given import notification policy.""" + original_policy = _sandbox_import_notification_policy_override.value = getattr( + _sandbox_import_notification_policy_override, + "value", + None, + ) + _sandbox_import_notification_policy_override.value = policy + try: + yield None + finally: + _sandbox_import_notification_policy_override.value = original_policy + + +def _build_log_context( + workflow_details: Mapping[str, Any] | None, + update_details: Mapping[str, Any] | None = None, + *, + workflow_info_on_message: bool = True, + workflow_info_on_extra: bool = True, + full_workflow_info: Info | None = None, +) -> tuple[dict[str, Any], dict[str, Any]]: + """Build the msg_extra suffix and extra dict entries for a temporal log record. + + Returns: + (msg_extra, extra) where msg_extra should be appended to the log message + and extra should be merged into the log record's extra dict. + """ + msg_extra: dict[str, Any] = {} + extra: dict[str, Any] = {} + + if workflow_details is not None: + if workflow_info_on_message: + msg_extra.update(workflow_details) + if workflow_info_on_extra: + extra["temporal_workflow"] = dict(workflow_details) + + if update_details is not None: + if workflow_info_on_message: + msg_extra.update(update_details) + if workflow_info_on_extra: + extra.setdefault("temporal_workflow", {}).update(update_details) + + if full_workflow_info is not None: + extra["workflow_info"] = full_workflow_info + + return msg_extra, extra + + +class LoggerAdapter(logging.LoggerAdapter): + """Adapter that adds details to the log about the running workflow. + + Attributes: + workflow_info_on_message: Boolean for whether a string representation of + a dict of some workflow info will be appended to each message. + Default is True. + workflow_info_on_extra: Boolean for whether a ``temporal_workflow`` + dictionary value will be added to the ``extra`` dictionary with some + workflow info, making it present on the ``LogRecord.__dict__`` for + use by others. Default is True. + full_workflow_info_on_extra: Boolean for whether a ``workflow_info`` + value will be added to the ``extra`` dictionary with the entire + workflow info, making it present on the ``LogRecord.__dict__`` for + use by others. Default is False. + log_during_replay: Boolean for whether logs should occur during replay. + Default is False. + + Values added to ``extra`` are merged with the ``extra`` dictionary from a + logging call, with values from the logging call taking precedence. I.e. the + behavior is that of ``merge_extra=True`` in Python >= 3.13. + """ + + def __init__(self, logger: logging.Logger, extra: Mapping[str, Any] | None) -> None: + """Create the logger adapter.""" + super().__init__(logger, extra or {}) + self.workflow_info_on_message = True + self.workflow_info_on_extra = True + self.full_workflow_info_on_extra = False + self.log_during_replay = False + self.disable_sandbox = False + + def process( + self, msg: Any, kwargs: MutableMapping[str, Any] + ) -> tuple[Any, MutableMapping[str, Any]]: + """Override to add workflow details.""" + msg_extra: dict[str, Any] = {} + extra: dict[str, Any] = {} + + if ( + self.workflow_info_on_message + or self.workflow_info_on_extra + or self.full_workflow_info_on_extra + ): + runtime = _Runtime.maybe_current() + update_info = current_update_info() + msg_extra, extra = _build_log_context( + runtime.logger_details if runtime else None, + update_info._logger_details if update_info else None, + workflow_info_on_message=self.workflow_info_on_message, + workflow_info_on_extra=self.workflow_info_on_extra, + full_workflow_info=runtime.workflow_info() + if runtime and self.full_workflow_info_on_extra + else None, + ) + + kwargs["extra"] = {**extra, **(kwargs.get("extra") or {})} + if msg_extra: + msg = f"{msg} ({msg_extra})" + return msg, kwargs + + def log( + self, + level: int, + msg: object, + *args: Any, + stacklevel: int = 1, + **kwargs: Any, + ): + """Override to potentially disable the sandbox.""" + stacklevel += 1 + if self.disable_sandbox: + with unsafe.sandbox_unrestricted(): + with unsafe.imports_passed_through(): + super().log(level, msg, *args, stacklevel=stacklevel, **kwargs) + else: + super().log(level, msg, *args, stacklevel=stacklevel, **kwargs) + + def isEnabledFor(self, level: int) -> bool: + """Override to ignore replay logs.""" + if not self.log_during_replay and unsafe.is_replaying_history_events(): + return False + return super().isEnabledFor(level) + + @property + def base_logger(self) -> logging.Logger: + """Underlying logger usable for actions such as adding + handlers/formatters. + """ + return self.logger + + def unsafe_disable_sandbox(self, value: bool = True): + """Disable the sandbox during log processing. + Can be turned back on with unsafe_disable_sandbox(False). + """ + self.disable_sandbox = value + + +logger = LoggerAdapter(logging.getLogger("temporalio.workflow"), None) +"""Logger that will have contextual workflow details embedded. + +Logs are skipped during replay by default. +""" diff --git a/temporalio/workflow/_workflow_ops.py b/temporalio/workflow/_workflow_ops.py new file mode 100644 index 0000000000..bbf95f6c2e --- /dev/null +++ b/temporalio/workflow/_workflow_ops.py @@ -0,0 +1,1095 @@ +from __future__ import annotations + +from collections.abc import Awaitable, Callable, Mapping, Sequence +from datetime import timedelta +from enum import IntEnum +from typing import Any, Concatenate, Generic, NoReturn, TypedDict, overload + +import temporalio.bridge.proto.child_workflow +import temporalio.common + +from ..types import ( + MethodAsyncNoParam, + MethodAsyncSingleParam, + MethodSyncOrAsyncNoParam, + MethodSyncOrAsyncSingleParam, + MultiParamSpec, + ParamType, + ReturnType, + SelfType, +) +from ._activities import _AsyncioTask +from ._context import _Runtime, uuid4 +from ._event_groups import EventGroup +from ._exceptions import ContinueAsNewVersioningBehavior, VersioningIntent + +__all__ = [ + "ChildWorkflowCancellationType", + "ChildWorkflowConfig", + "ChildWorkflowHandle", + "ContinueAsNewError", + "ExternalWorkflowHandle", + "ParentClosePolicy", + "all_handlers_finished", + "continue_as_new", + "execute_child_workflow", + "get_dynamic_query_handler", + "get_dynamic_signal_handler", + "get_dynamic_update_handler", + "get_external_workflow_handle", + "get_external_workflow_handle_for", + "get_query_handler", + "get_signal_handler", + "get_update_handler", + "set_dynamic_query_handler", + "set_dynamic_signal_handler", + "set_dynamic_update_handler", + "set_query_handler", + "set_signal_handler", + "set_update_handler", + "start_child_workflow", +] + + +class ChildWorkflowHandle(_AsyncioTask[ReturnType], Generic[SelfType, ReturnType]): # type: ignore[type-var] + """Handle for interacting with a child workflow. + + This is created via :py:func:`start_child_workflow`. + + This extends :py:class:`asyncio.Task` and supports all task features. + """ + + @property + def id(self) -> str: + """ID for the workflow.""" + raise NotImplementedError + + @property + def first_execution_run_id(self) -> str | None: + """Run ID for the workflow.""" + raise NotImplementedError + + @overload + async def signal( + self, + signal: MethodSyncOrAsyncNoParam[SelfType, None], + *, + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + @overload + async def signal( + self, + signal: MethodSyncOrAsyncSingleParam[SelfType, ParamType, None], + arg: ParamType, + *, + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + @overload + async def signal( + self, + signal: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[None] | None], + *, + args: Sequence[Any], + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + @overload + async def signal( + self, + signal: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + async def signal( + self, + signal: str | Callable, # type: ignore[reportUnusedParameter] + arg: Any = temporalio.common._arg_unset, # type: ignore[reportUnusedParameter] + *, + args: Sequence[Any] = [], # type: ignore[reportUnusedParameter] + event_groups: Sequence[EventGroup] | None = None, # type: ignore[reportUnusedParameter] + ) -> None: + """Signal this child workflow. + + Args: + signal: Name or method reference for the signal. + arg: Single argument to the signal. + args: Multiple arguments to the signal. Cannot be set if arg is. + event_groups: Event Groups to associate this command with, in + addition to any from the current Event Group scope. + + """ + raise NotImplementedError + + +class ChildWorkflowCancellationType(IntEnum): + """How a child workflow cancellation should be handled.""" + + ABANDON = int( + temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.ABANDON + ) + TRY_CANCEL = int( + temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.TRY_CANCEL + ) + WAIT_CANCELLATION_COMPLETED = int( + temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED + ) + WAIT_CANCELLATION_REQUESTED = int( + temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.WAIT_CANCELLATION_REQUESTED + ) + + +class ParentClosePolicy(IntEnum): + """How a child workflow should be handled when the parent closes.""" + + UNSPECIFIED = int( + temporalio.bridge.proto.child_workflow.ParentClosePolicy.PARENT_CLOSE_POLICY_UNSPECIFIED + ) + TERMINATE = int( + temporalio.bridge.proto.child_workflow.ParentClosePolicy.PARENT_CLOSE_POLICY_TERMINATE + ) + ABANDON = int( + temporalio.bridge.proto.child_workflow.ParentClosePolicy.PARENT_CLOSE_POLICY_ABANDON + ) + REQUEST_CANCEL = int( + temporalio.bridge.proto.child_workflow.ParentClosePolicy.PARENT_CLOSE_POLICY_REQUEST_CANCEL + ) + + +class ChildWorkflowConfig(TypedDict, total=False): + """TypedDict of config that can be used for :py:func:`start_child_workflow` + and :py:func:`execute_child_workflow`. + + ``event_groups`` and ``versioning_override`` are experimental and may change + without notice. + """ + + id: str | None + task_queue: str | None + cancellation_type: ChildWorkflowCancellationType + parent_close_policy: ParentClosePolicy + execution_timeout: timedelta | None + run_timeout: timedelta | None + task_timeout: timedelta | None + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy + retry_policy: temporalio.common.RetryPolicy | None + cron_schedule: str + memo: Mapping[str, Any] | None + search_attributes: None | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) + versioning_intent: VersioningIntent | None + versioning_override: temporalio.common.VersioningOverride | None + static_summary: str | None + static_details: str | None + event_groups: Sequence[EventGroup] | None + priority: temporalio.common.Priority + + +# Overload for no-param workflow +@overload +async def start_child_workflow( + workflow: MethodAsyncNoParam[SelfType, ReturnType], + *, + id: str | None = None, + task_queue: str | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> ChildWorkflowHandle[SelfType, ReturnType]: ... + + +# Overload for single-param workflow +@overload +async def start_child_workflow( + workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + id: str | None = None, + task_queue: str | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> ChildWorkflowHandle[SelfType, ReturnType]: ... + + +# Overload for multi-param workflow +@overload +async def start_child_workflow( + workflow: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], + *, + args: Sequence[Any], + id: str | None = None, + task_queue: str | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> ChildWorkflowHandle[SelfType, ReturnType]: ... + + +# Overload for string-name workflow +@overload +async def start_child_workflow( + workflow: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str | None = None, + task_queue: str | None = None, + result_type: type | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> ChildWorkflowHandle[Any, Any]: ... + + +async def start_child_workflow( + workflow: Any, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str | None = None, + task_queue: str | None = None, + result_type: type | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> ChildWorkflowHandle[Any, Any]: + """Start a child workflow and return its handle. + + Args: + workflow: String name or class method decorated with ``@workflow.run`` + for the workflow to start. + arg: Single argument to the child workflow. + args: Multiple arguments to the child workflow. Cannot be set if arg is. + id: Optional unique identifier for the workflow execution. If not set, + defaults to :py:func:`uuid4`. + task_queue: Task queue to run the workflow on. Defaults to the current + workflow's task queue. + result_type: For string workflows, this can set the specific result type + hint to deserialize into. + cancellation_type: How the child workflow will react to cancellation. + parent_close_policy: How to handle the child workflow when the parent + workflow closes. + execution_timeout: Total workflow execution timeout including + retries and continue as new. + run_timeout: Timeout of a single workflow run. + task_timeout: Timeout of a single workflow task. + id_reuse_policy: How already-existing IDs are treated. + retry_policy: Retry policy for the workflow. + cron_schedule: See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ + memo: Memo for the workflow. + search_attributes: Search attributes for the workflow. The dictionary + form of this is DEPRECATED. + versioning_intent: When using the Worker Versioning feature, specifies whether this Child + Workflow should run on a worker with a compatible Build Id or not. + Deprecated: Use Worker Deployment versioning instead. + static_summary: A single-line fixed summary for this child workflow execution that may appear + in the UI/CLI. This can be in single-line Temporal markdown format. + static_details: General fixed details for this child workflow execution that may appear in + UI/CLI. This can be in Temporal markdown format and can span multiple lines. This is + a fixed value on the workflow that cannot be updated. For details that can be + updated, use :py:meth:`get_current_details` within the workflow. + event_groups: Event Groups to associate this command with, in + addition to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + priority: Priority to use for this workflow. + versioning_override: Experimental override of the child workflow's versioning + behavior. Takes precedence over versioning inherited from the parent + workflow. Requires Temporal Server 1.32 or newer. + + Returns: + A workflow handle to the started/existing workflow. + """ + temporalio.common._warn_on_deprecated_search_attributes(search_attributes) + return await _Runtime.current().workflow_start_child_workflow( + workflow, + *temporalio.common._arg_or_args(arg, args), + id=id or str(uuid4()), + task_queue=task_queue, + result_type=result_type, + cancellation_type=cancellation_type, + parent_close_policy=parent_close_policy, + execution_timeout=execution_timeout, + run_timeout=run_timeout, + task_timeout=task_timeout, + id_reuse_policy=id_reuse_policy, + retry_policy=retry_policy, + cron_schedule=cron_schedule, + memo=memo, + search_attributes=search_attributes, + versioning_intent=versioning_intent, + static_summary=static_summary, + static_details=static_details, + event_groups=event_groups, + priority=priority, + versioning_override=versioning_override, + ) + + +# Overload for no-param workflow +@overload +async def execute_child_workflow( + workflow: MethodAsyncNoParam[SelfType, ReturnType], + *, + id: str | None = None, + task_queue: str | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> ReturnType: ... + + +# Overload for single-param workflow +@overload +async def execute_child_workflow( + workflow: MethodAsyncSingleParam[SelfType, ParamType, ReturnType], + arg: ParamType, + *, + id: str | None = None, + task_queue: str | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> ReturnType: ... + + +# Overload for multi-param workflow +@overload +async def execute_child_workflow( + workflow: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[ReturnType]], + *, + args: Sequence[Any], + id: str | None = None, + task_queue: str | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> ReturnType: ... + + +# Overload for string-name workflow +@overload +async def execute_child_workflow( + workflow: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str | None = None, + task_queue: str | None = None, + result_type: type | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> Any: ... + + +async def execute_child_workflow( + workflow: Any, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + id: str | None = None, + task_queue: str | None = None, + result_type: type | None = None, + cancellation_type: ChildWorkflowCancellationType = ChildWorkflowCancellationType.WAIT_CANCELLATION_COMPLETED, + parent_close_policy: ParentClosePolicy = ParentClosePolicy.TERMINATE, + execution_timeout: timedelta | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + id_reuse_policy: temporalio.common.WorkflowIDReusePolicy = temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + retry_policy: temporalio.common.RetryPolicy | None = None, + cron_schedule: str = "", + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + static_summary: str | None = None, + static_details: str | None = None, + event_groups: Sequence[EventGroup] | None = None, + priority: temporalio.common.Priority = temporalio.common.Priority.default, + versioning_override: temporalio.common.VersioningOverride | None = None, +) -> Any: + """Start a child workflow and wait for completion. + + This is a shortcut for ``await (await`` :py:meth:`start_child_workflow` ``)``. + """ + temporalio.common._warn_on_deprecated_search_attributes(search_attributes) + # We call the runtime directly instead of top-level start_child_workflow to + # ensure we don't miss new parameters + handle = await _Runtime.current().workflow_start_child_workflow( + workflow, + *temporalio.common._arg_or_args(arg, args), + id=id or str(uuid4()), + task_queue=task_queue, + result_type=result_type, + cancellation_type=cancellation_type, + parent_close_policy=parent_close_policy, + execution_timeout=execution_timeout, + run_timeout=run_timeout, + task_timeout=task_timeout, + id_reuse_policy=id_reuse_policy, + retry_policy=retry_policy, + cron_schedule=cron_schedule, + memo=memo, + search_attributes=search_attributes, + versioning_intent=versioning_intent, + static_summary=static_summary, + static_details=static_details, + event_groups=event_groups, + priority=priority, + versioning_override=versioning_override, + ) + return await handle + + +class ExternalWorkflowHandle(Generic[SelfType]): + """Handle for interacting with an external workflow. + + This is created via :py:func:`get_external_workflow_handle` or + :py:func:`get_external_workflow_handle_for`. + """ + + @property + def id(self) -> str: + """ID for the workflow.""" + raise NotImplementedError + + @property + def run_id(self) -> str | None: + """Run ID for the workflow if any.""" + raise NotImplementedError + + @overload + async def signal( + self, + signal: MethodSyncOrAsyncNoParam[SelfType, None], + *, + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + @overload + async def signal( + self, + signal: MethodSyncOrAsyncSingleParam[SelfType, ParamType, None], + arg: ParamType, + *, + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + @overload + async def signal( + self, + signal: str, + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + event_groups: Sequence[EventGroup] | None = None, + ) -> None: ... + + async def signal( + self, + signal: str | Callable, # type: ignore[reportUnusedParameter] + arg: Any = temporalio.common._arg_unset, # type: ignore[reportUnusedParameter] + *, + args: Sequence[Any] = [], # type: ignore[reportUnusedParameter] + event_groups: Sequence[EventGroup] | None = None, # type: ignore[reportUnusedParameter] + ) -> None: + """Signal this external workflow. + + Args: + signal: Name or method reference for the signal. + arg: Single argument to the signal. + args: Multiple arguments to the signal. Cannot be set if arg is. + event_groups: Event Groups to associate this command with, in + addition to any from the current Event Group scope. + + """ + raise NotImplementedError + + async def cancel( + self, + *, + reason: str = "", # pyright: ignore[reportUnusedParameter] + event_groups: Sequence[EventGroup] | None = None, # pyright: ignore[reportUnusedParameter] + ) -> None: + """Send a cancellation request to this external workflow. + + This will fail if the workflow cannot accept the request (e.g. if the + workflow is not found). + + Args: + reason: Reason recorded with the cancellation request. Available in + the target workflow via :py:func:`cancellation_reason`. + event_groups: Event Groups to associate this command with, in + addition to any from the current Event Group scope. + """ + raise NotImplementedError + + +def get_external_workflow_handle( + workflow_id: str, + *, + run_id: str | None = None, +) -> ExternalWorkflowHandle[Any]: + """Get a workflow handle to an existing workflow by its ID. + + Args: + workflow_id: Workflow ID to get a handle to. + run_id: Optional run ID for the workflow. + + Returns: + The external workflow handle. + """ + return _Runtime.current().workflow_get_external_workflow_handle( + workflow_id, run_id=run_id + ) + + +def get_external_workflow_handle_for( + workflow: MethodAsyncNoParam[SelfType, Any] # type: ignore[reportUnusedParameter] + | MethodAsyncSingleParam[SelfType, Any, Any], + workflow_id: str, + *, + run_id: str | None = None, +) -> ExternalWorkflowHandle[SelfType]: + """Get a typed workflow handle to an existing workflow by its ID. + + This is the same as :py:func:`get_external_workflow_handle` but typed. Note, + the workflow type given is not validated, it is only for typing. + + Args: + workflow: The workflow run method to use for typing the handle. + workflow_id: Workflow ID to get a handle to. + run_id: Optional run ID for the workflow. + + Returns: + The external workflow handle. + """ + return get_external_workflow_handle(workflow_id, run_id=run_id) + + +class ContinueAsNewError(BaseException): + """Error thrown by :py:func:`continue_as_new`. + + This should not be caught, but instead be allowed to throw out of the + workflow which then triggers the continue as new. This should never be + instantiated directly. + """ + + def __init__(self, *args: object) -> None: + """Direct instantiation is disabled. Use :py:func:`continue_as_new`.""" + if type(self) is ContinueAsNewError: + raise RuntimeError("Cannot instantiate ContinueAsNewError directly") + super().__init__(*args) + + +# Overload for self (unfortunately, cannot type args) +@overload +def continue_as_new( + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + task_queue: str | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + backoff_start_interval: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + initial_versioning_behavior: ContinueAsNewVersioningBehavior | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> NoReturn: ... + + +# Overload for no-param workflow +@overload +def continue_as_new( + *, + workflow: MethodAsyncNoParam[SelfType, Any], + task_queue: str | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + backoff_start_interval: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + initial_versioning_behavior: ContinueAsNewVersioningBehavior | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> NoReturn: ... + + +# Overload for single-param workflow +@overload +def continue_as_new( + arg: ParamType, + *, + workflow: MethodAsyncSingleParam[SelfType, ParamType, Any], + task_queue: str | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + backoff_start_interval: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + initial_versioning_behavior: ContinueAsNewVersioningBehavior | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> NoReturn: ... + + +# Overload for multi-param workflow +@overload +def continue_as_new( + *, + workflow: Callable[Concatenate[SelfType, MultiParamSpec], Awaitable[Any]], + args: Sequence[Any], + task_queue: str | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + backoff_start_interval: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + initial_versioning_behavior: ContinueAsNewVersioningBehavior | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> NoReturn: ... + + +# Overload for string-name workflow +@overload +def continue_as_new( + *, + workflow: str, + args: Sequence[Any] = [], + task_queue: str | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + backoff_start_interval: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + initial_versioning_behavior: ContinueAsNewVersioningBehavior | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> NoReturn: ... + + +def continue_as_new( + arg: Any = temporalio.common._arg_unset, + *, + args: Sequence[Any] = [], + workflow: None | Callable | str = None, + task_queue: str | None = None, + run_timeout: timedelta | None = None, + task_timeout: timedelta | None = None, + backoff_start_interval: timedelta | None = None, + retry_policy: temporalio.common.RetryPolicy | None = None, + memo: Mapping[str, Any] | None = None, + search_attributes: None + | ( + temporalio.common.SearchAttributes | temporalio.common.TypedSearchAttributes + ) = None, + versioning_intent: VersioningIntent | None = None, + initial_versioning_behavior: ContinueAsNewVersioningBehavior | None = None, + event_groups: Sequence[EventGroup] | None = None, +) -> NoReturn: + """Stop the workflow immediately and continue as new. + + Args: + arg: Single argument to the continued workflow. + args: Multiple arguments to the continued workflow. Cannot be set if arg + is. + workflow: Specific workflow to continue to. Defaults to the current + workflow. + task_queue: Task queue to run the workflow on. Defaults to the current + workflow's task queue. + run_timeout: Timeout of a single workflow run. Defaults to the current + workflow's run timeout. + task_timeout: Timeout of a single workflow task. Defaults to the current + workflow's task timeout. + backoff_start_interval: Delay before the first workflow task of the + continued run is scheduled. + memo: Memo for the workflow. Defaults to the current workflow's memo. + search_attributes: Search attributes for the workflow. Defaults to the + current workflow's search attributes. The dictionary form of this is + DEPRECATED. + versioning_intent: When using the Worker Versioning feature, specifies whether this Workflow + should Continue-as-New onto a worker with a compatible Build Id or not. + Deprecated: Use Worker Deployment versioning instead. + event_groups: Event Groups to associate this command with, in + addition to those active in the current scope. See + :py:func:`temporalio.workflow.create_event_group`. + + Returns: + Never returns, always raises a :py:class:`ContinueAsNewError`. + + Raises: + ContinueAsNewError: Always raised by this function. Should not be caught + but instead be allowed to + """ + temporalio.common._warn_on_deprecated_search_attributes(search_attributes) + _Runtime.current().workflow_continue_as_new( + *temporalio.common._arg_or_args(arg, args), + workflow=workflow, + task_queue=task_queue, + run_timeout=run_timeout, + task_timeout=task_timeout, + backoff_start_interval=backoff_start_interval, + retry_policy=retry_policy, + memo=memo, + search_attributes=search_attributes, + versioning_intent=versioning_intent, + initial_versioning_behavior=initial_versioning_behavior, + event_groups=event_groups, + ) + + +def get_signal_handler(name: str) -> Callable | None: + """Get the signal handler for the given name if any. + + This includes handlers created via the ``@workflow.signal`` decorator. + + Args: + name: Name of the signal. + + Returns: + Callable for the signal if any. If a handler is not found for the name, + this will not return the dynamic handler even if there is one. + """ + return _Runtime.current().workflow_get_signal_handler(name) + + +def set_signal_handler(name: str, handler: Callable | None) -> None: + """Set or unset the signal handler for the given name. + + This overrides any existing handlers for the given name, including handlers + created via the ``@workflow.signal`` decorator. + + When set, all unhandled past signals for the given name are immediately sent + to the handler. + + Args: + name: Name of the signal. + handler: Callable to set or None to unset. + """ + _Runtime.current().workflow_set_signal_handler(name, handler) + + +def get_dynamic_signal_handler() -> Callable | None: + """Get the dynamic signal handler if any. + + This includes dynamic handlers created via the ``@workflow.signal`` + decorator. + + Returns: + Callable for the dynamic signal handler if any. + """ + return _Runtime.current().workflow_get_signal_handler(None) + + +def set_dynamic_signal_handler(handler: Callable | None) -> None: + """Set or unset the dynamic signal handler. + + This overrides the existing dynamic handler even if it was created via the + ``@workflow.signal`` decorator. + + When set, all unhandled past signals are immediately sent to the handler. + + Args: + handler: Callable to set or None to unset. + """ + _Runtime.current().workflow_set_signal_handler(None, handler) + + +def get_query_handler(name: str) -> Callable | None: + """Get the query handler for the given name if any. + + This includes handlers created via the ``@workflow.query`` decorator. + + Args: + name: Name of the query. + + Returns: + Callable for the query if any. If a handler is not found for the name, + this will not return the dynamic handler even if there is one. + """ + return _Runtime.current().workflow_get_query_handler(name) + + +def set_query_handler(name: str, handler: Callable | None) -> None: + """Set or unset the query handler for the given name. + + This overrides any existing handlers for the given name, including handlers + created via the ``@workflow.query`` decorator. + + Args: + name: Name of the query. + handler: Callable to set or None to unset. + """ + _Runtime.current().workflow_set_query_handler(name, handler) + + +def get_dynamic_query_handler() -> Callable | None: + """Get the dynamic query handler if any. + + This includes dynamic handlers created via the ``@workflow.query`` + decorator. + + Returns: + Callable for the dynamic query handler if any. + """ + return _Runtime.current().workflow_get_query_handler(None) + + +def set_dynamic_query_handler(handler: Callable | None) -> None: + """Set or unset the dynamic query handler. + + This overrides the existing dynamic handler even if it was created via the + ``@workflow.query`` decorator. + + Args: + handler: Callable to set or None to unset. + """ + _Runtime.current().workflow_set_query_handler(None, handler) + + +def get_update_handler(name: str) -> Callable | None: + """Get the update handler for the given name if any. + + This includes handlers created via the ``@workflow.update`` decorator. + + Args: + name: Name of the update. + + Returns: + Callable for the update if any. If a handler is not found for the name, + this will not return the dynamic handler even if there is one. + """ + return _Runtime.current().workflow_get_update_handler(name) + + +def set_update_handler( + name: str, handler: Callable | None, *, validator: Callable | None = None +) -> None: + """Set or unset the update handler for the given name. + + This overrides any existing handlers for the given name, including handlers + created via the ``@workflow.update`` decorator. + + Args: + name: Name of the update. + handler: Callable to set or None to unset. + validator: Callable to set or None to unset as the update validator. + This must not be an ``async def`` function. + """ + _Runtime.current().workflow_set_update_handler(name, handler, validator) + + +def get_dynamic_update_handler() -> Callable | None: + """Get the dynamic update handler if any. + + This includes dynamic handlers created via the ``@workflow.update`` + decorator. + + Returns: + Callable for the dynamic update handler if any. + """ + return _Runtime.current().workflow_get_update_handler(None) + + +def set_dynamic_update_handler( + handler: Callable | None, *, validator: Callable | None = None +) -> None: + """Set or unset the dynamic update handler. + + This overrides the existing dynamic handler even if it was created via the + ``@workflow.update`` decorator. + + Args: + handler: Callable to set or None to unset. + validator: Callable to set or None to unset as the update validator. + This must not be an ``async def`` function. + """ + _Runtime.current().workflow_set_update_handler(None, handler, validator) + + +def all_handlers_finished() -> bool: + """Whether update and signal handlers have finished executing. + + Consider waiting on this condition before workflow return or continue-as-new, to prevent + interruption of in-progress handlers by workflow exit: + ``await workflow.wait_condition(lambda: workflow.all_handlers_finished())`` + + Returns: + True if there are no in-progress update or signal handler executions. + """ + return _Runtime.current().workflow_all_handlers_finished() diff --git a/tests/__init__.py b/tests/__init__.py index 6a624f6caa..4d76781a29 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1 @@ -DEV_SERVER_DOWNLOAD_VERSION = "default" +DEV_SERVER_DOWNLOAD_VERSION = "v1.9.3-nexus-serialization-context" diff --git a/tests/api/test_grpc_stub.py b/tests/api/test_grpc_stub.py index ba00774e06..64ac90256a 100644 --- a/tests/api/test_grpc_stub.py +++ b/tests/api/test_grpc_stub.py @@ -1,7 +1,7 @@ import re from collections.abc import Mapping from datetime import timedelta -from typing import Any, Union, cast +from typing import Any, cast import pytest from google.protobuf.empty_pb2 import Empty diff --git a/tests/api/test_protobuf.py b/tests/api/test_protobuf.py new file mode 100644 index 0000000000..b42b4e96bb --- /dev/null +++ b/tests/api/test_protobuf.py @@ -0,0 +1,31 @@ +import importlib +import pickle + +import pytest + + +@pytest.mark.parametrize( + ("module_name", "type_name"), + [ + ("temporalio.api.common.v1.message_pb2", "Payload"), + ("temporalio.bridge.proto.common.common_pb2", "NamespacedWorkflowExecution"), + ( + "temporalio.api.dependencies.nexusannotations.v1.options_pb2", + "OperationOptions", + ), + ( + "temporalio.api.dependencies.protoc_gen_openapiv2.options.openapiv2_pb2", + "Info", + ), + ( + "tests.worker.workflow_sandbox.testmodules.proto.proto_message_pb2", + "SomeMessage", + ), + ], +) +def test_generated_protobuf_pickle(module_name: str, type_name: str): + module = importlib.import_module(module_name) + message = getattr(module, type_name)() + + assert type(message).__module__ == module_name + assert pickle.loads(pickle.dumps(message)) == message diff --git a/tests/bridge/runtime_shutdown.py b/tests/bridge/runtime_shutdown.py new file mode 100644 index 0000000000..c7d92dd5ae --- /dev/null +++ b/tests/bridge/runtime_shutdown.py @@ -0,0 +1,33 @@ +"""Exercise native callbacks during a real interpreter shutdown.""" + +import asyncio +import atexit +import pickle +import sys +import threading + +if __name__ == "__main__": + release = threading.Event() + completed: list[bool] = [] + atexit.register(lambda: print("completed callbacks:", len(completed))) + + # Import the bridge after registering the observer so that its shutdown + # hook runs before the observer. Callbacks live in the helper module so + # their globals do not keep this script's runtimes alive. + import runtime_shutdown_helpers # type: ignore[reportImplicitRelativeImport] + + # Release the callbacks before the bridge waits for them. + atexit.register(release.set) + + if sys.argv[1] == "client": + connect_config, namespace = pickle.load(sys.stdin.buffer) + asyncio.run( + runtime_shutdown_helpers.run_client( + connect_config, namespace, release, completed + ) + ) + else: + runtimes = [ + runtime_shutdown_helpers.start_runtime(release, completed) + for _ in range(int(sys.argv[1])) + ] diff --git a/tests/bridge/runtime_shutdown_helpers.py b/tests/bridge/runtime_shutdown_helpers.py new file mode 100644 index 0000000000..4441263f6e --- /dev/null +++ b/tests/bridge/runtime_shutdown_helpers.py @@ -0,0 +1,73 @@ +"""Native callbacks for the interpreter shutdown subprocess.""" + +import asyncio +import threading +from collections.abc import Callable, Sequence +from contextvars import Context +from typing import Any +from unittest.mock import patch + +import temporalio.api.workflowservice.v1 +import temporalio.bridge.runtime +import temporalio.client +import temporalio.service + + +def start_runtime( + release: threading.Event, completed: list[bool] +) -> temporalio.bridge.runtime.Runtime: + started = threading.Event() + + def forward_logs( + _entries: Sequence[temporalio.bridge.runtime.BufferedLogEntry], + ) -> None: + started.set() + assert release.wait(10) + completed.append(True) + + runtime = temporalio.bridge.runtime.Runtime( + options=temporalio.bridge.runtime.RuntimeOptions( + telemetry=temporalio.bridge.runtime.TelemetryConfig( + logging=temporalio.bridge.runtime.LoggingConfig( + filter="INFO", forward_to=forward_logs, format=None + ), + metrics=None, + ) + ) + ) + runtime.write_test_info_log("before interpreter shutdown", "") + assert started.wait(10) + return runtime + + +async def run_client( + connect_config: temporalio.service.ConnectConfig, + namespace: str, + release: threading.Event, + completed: list[bool], +) -> None: + client = await temporalio.client.Client.connect( + namespace=namespace, **vars(connect_config) + ) + started = threading.Event() + loop = asyncio.get_running_loop() + original_call_soon = loop.call_soon_threadsafe + + def call_soon( + callback: Callable[..., Any], *args: Any, context: Context | None = None + ) -> asyncio.Handle: + result = original_call_soon(callback, *args, context=context) + started.set() + assert release.wait(10) + completed.append(True) + return result + + # Let Python receive the RPC result while the Rust completion callback + # is still active, reproducing the interpreter shutdown race. + with patch.object(loop, "call_soon_threadsafe", call_soon): + await client.workflow_service.describe_namespace( + temporalio.api.workflowservice.v1.DescribeNamespaceRequest( + namespace=client.namespace + ) + ) + assert started.wait(10) diff --git a/tests/bridge/test_runtime.py b/tests/bridge/test_runtime.py index de6622f04a..9106dca699 100644 --- a/tests/bridge/test_runtime.py +++ b/tests/bridge/test_runtime.py @@ -1,6 +1,10 @@ +import subprocess +import sys +from pathlib import Path from threading import Event, Thread from time import sleep -from typing import Optional + +import pytest from temporalio.bridge.runtime import Runtime @@ -9,6 +13,25 @@ class SomeException(Exception): pass +@pytest.mark.parametrize("runtime_count", [1, 3]) +def test_bridge_runtime_shutdown_before_finalization(runtime_count: int): + result = subprocess.run( + [ + sys.executable, + "-X", + "faulthandler", + str(Path(__file__).with_name("runtime_shutdown.py")), + str(runtime_count), + ], + capture_output=True, + text=True, + timeout=30, + ) + assert result.returncode == 0, result.stderr + assert result.stdout.strip() == f"completed callbacks: {runtime_count}" + assert result.stderr == "" + + def test_bridge_runtime_raise_in_thread(): waiting = Event() exc_in_thread: BaseException | None = None diff --git a/tests/conftest.py b/tests/conftest.py index 41f8e1f383..b96e58f667 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,13 +1,22 @@ import asyncio +import gc import multiprocessing.context import os import sys from collections.abc import AsyncGenerator, Iterator +import opentelemetry._logs._internal +import opentelemetry.metrics +import opentelemetry.metrics._internal +import opentelemetry.trace import pytest import pytest_asyncio +from opentelemetry.metrics import NoOpMeterProvider +from opentelemetry.util._once import Once +import temporalio.converter._extstore from temporalio.client import Client +from temporalio.envconfig import ClientConfigProfile from temporalio.testing import WorkflowEnvironment from temporalio.worker import SharedStateManager from tests.helpers.worker import ExternalPythonWorker, ExternalWorker @@ -17,51 +26,75 @@ # If there is an integration test environment variable set, we must remove the # first path from the sys.path so we can import the wheel instead if os.getenv("TEMPORAL_INTEGRATION_TEST"): - assert ( - sys.path[0] == os.getcwd() - ), "Expected first sys.path to be the current working dir" + assert sys.path[0] == os.getcwd(), ( + "Expected first sys.path to be the current working dir" + ) sys.path.pop(0) # Import temporalio and confirm it is prefixed with virtual env import temporalio - assert temporalio.__file__.startswith( - sys.prefix - ), f"Expected {temporalio.__file__} to be in {sys.prefix}" - -# Unless specifically overridden, we expect tests to run under protobuf 4.x/5.x lib -import google.protobuf - -protobuf_version = google.protobuf.__version__ -if os.getenv("TEMPORAL_TEST_PROTO3"): - assert protobuf_version.startswith( - "3." - ), f"Expected protobuf 3.x, got {protobuf_version}" -else: - assert ( - protobuf_version.startswith("4.") - or protobuf_version.startswith("5.") - or protobuf_version.startswith("6.") - ), f"Expected protobuf 4.x/5.x/6.x, got {protobuf_version}" + assert temporalio.__file__.startswith(sys.prefix), ( + f"Expected {temporalio.__file__} to be in {sys.prefix}" + ) -def pytest_runtest_setup(item): +def pytest_runtest_setup(item): # type: ignore[reportMissingParameterType] """Print a newline so that custom printed output starts on new line.""" if item.config.getoption("-s"): print() -def pytest_addoption(parser): +def pytest_collection_finish() -> None: + # Freeze the import-time heap once so full GC passes only cover test allocations + gc.collect() + gc.freeze() + + +def pytest_addoption(parser): # type: ignore[reportMissingParameterType] parser.addoption( "-E", "--workflow-environment", default="local", - help="Which workflow environment to use ('local', 'time-skipping', or ip:port for existing server)", + help="Which workflow environment to use ('local', 'time-skipping-v1', 'time-skipping-v2', 'envconfig', or ip:port for existing server)", ) +def _uses_envconfig_server(env_type: str | None) -> bool: + return env_type == "envconfig" + + +def pytest_configure(config: pytest.Config) -> None: + config.addinivalue_line( + "markers", + "requires_local_server: test requires local-server-only behavior and cannot run against an envconfig server", + ) + + +def pytest_collection_modifyitems( + config: pytest.Config, items: list[pytest.Item] +) -> None: + if not _uses_envconfig_server(config.getoption("--workflow-environment")): + return + skip_local_only = pytest.mark.skip( + reason="requires a local Temporal server, not the configured envconfig server" + ) + for item in items: + if item.get_closest_marker("requires_local_server"): + item.add_marker(skip_local_only) + + +async def _create_env_from_envconfig() -> WorkflowEnvironment: + config = ClientConfigProfile.load().to_client_connect_config() + if not config.get("target_host"): + raise ValueError( + "An envconfig workflow environment requires TEMPORAL_ADDRESS or an envconfig profile with an address" + ) + return WorkflowEnvironment.from_client(await Client.connect(**config)) + + @pytest.fixture(scope="session") def event_loop(): - loop = asyncio.get_event_loop_policy().new_event_loop() + loop = asyncio.get_event_loop_policy().new_event_loop() # type: ignore[reportDeprecated] yield loop try: loop.close() @@ -77,17 +110,19 @@ def __init__(self, underlying: asyncio.AbstractEventLoopPolicy): # type: ignore def get_event_loop(self): return self._underlying.get_event_loop() - def set_event_loop(self, loop): + def set_event_loop(self, loop): # type: ignore[reportMissingParameterType] return self._underlying.set_event_loop(loop) def new_event_loop(self): # type: ignore[reportIncompatibleMethodOverride] return None - def get_child_watcher(self): - return self._underlying.get_child_watcher() + if sys.version_info < (3, 14): - def set_child_watcher(self, watcher): - return self._underlying.set_child_watcher(watcher) + def get_child_watcher(self): + return self._underlying.get_child_watcher() # type: ignore[reportDeprecated] + + def set_child_watcher(self, watcher): # type: ignore[reportMissingParameterType] + return self._underlying.set_child_watcher(watcher) # type: ignore[reportDeprecated] @pytest.fixture(scope="session") @@ -95,39 +130,72 @@ def env_type(request: pytest.FixtureRequest) -> str: return request.config.getoption("--workflow-environment") # type: ignore[reportReturnType] -@pytest_asyncio.fixture(scope="session") +@pytest_asyncio.fixture(scope="session") # type: ignore[reportUntypedFunctionDecorator] async def env(env_type: str) -> AsyncGenerator[WorkflowEnvironment, None]: - if env_type == "local": - http_port = 7243 + dev_server_extra_args = [ + "--dynamic-config-value", + "system.forceSearchAttributesCacheRefreshOnRead=true", + "--dynamic-config-value", + f"limit.historyCount.suggestContinueAsNew={CONTINUE_AS_NEW_SUGGEST_HISTORY_COUNT}", + "--dynamic-config-value", + "system.enableEagerWorkflowStart=true", + "--dynamic-config-value", + "frontend.enableExecuteMultiOperation=true", + "--dynamic-config-value", + "frontend.workerVersioningWorkflowAPIs=true", + "--dynamic-config-value", + "frontend.workerVersioningDataAPIs=true", + "--dynamic-config-value", + "system.enableDeploymentVersions=true", + "--dynamic-config-value", + "frontend.activityAPIsEnabled=true", + "--dynamic-config-value", + "frontend.enableCancelWorkerPollsOnShutdown=true", + "--dynamic-config-value", + "frontend.WorkerHeartbeatsEnabled=true", + "--dynamic-config-value", + "frontend.ListWorkersEnabled=true", + "--dynamic-config-value", + "component.nexusoperations.recordCancelRequestCompletionEvents=true", + "--dynamic-config-value", + "activity.enableStandalone=true", + "--dynamic-config-value", + "activity.startDelayEnabled=true", + "--dynamic-config-value", + "history.enableChasm=true", + "--dynamic-config-value", + "history.enableTransitionHistory=true", + "--dynamic-config-value", + "history.enableCHASMCallbacks=true", + "--dynamic-config-value", + "history.enableCHASMSignalBacklinks=true", + "--dynamic-config-value", + "nexusoperation.enableStandalone=true", + "--dynamic-config-value", + 'system.system.refreshNexusEndpointsMinWait="0s"', + "--dynamic-config-value", + "frontend.WorkflowTimeSkippingEnabled=true", + "--dynamic-config-value", + "history.enableSignalWithStartFromWorkflow=true", + "--dynamic-config-value", + "history.enableUpdateCallbacks=true", + "--dynamic-config-value", + "activity.enableCallbacks=true", + ] + if _uses_envconfig_server(env_type): + env = await _create_env_from_envconfig() + elif env_type == "local": env = await WorkflowEnvironment.start_local( - dev_server_extra_args=[ - "--dynamic-config-value", - "system.forceSearchAttributesCacheRefreshOnRead=true", - "--dynamic-config-value", - f"limit.historyCount.suggestContinueAsNew={CONTINUE_AS_NEW_SUGGEST_HISTORY_COUNT}", - "--dynamic-config-value", - "system.enableEagerWorkflowStart=true", - "--dynamic-config-value", - "frontend.enableExecuteMultiOperation=true", - "--dynamic-config-value", - "frontend.workerVersioningWorkflowAPIs=true", - "--dynamic-config-value", - "frontend.workerVersioningDataAPIs=true", - "--dynamic-config-value", - "system.enableDeploymentVersions=true", - "--dynamic-config-value", - "frontend.activityAPIsEnabled=true", - "--dynamic-config-value", - "component.nexusoperations.recordCancelRequestCompletionEvents=true", - "--http-port", - str(http_port), - ], + dev_server_extra_args=dev_server_extra_args, dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, ) - # TODO(nexus-preview): expose this in a more principled way - env._http_port = http_port # type: ignore - elif env_type == "time-skipping": + elif env_type == "time-skipping-v1": env = await WorkflowEnvironment.start_time_skipping() + elif env_type == "time-skipping-v2": + env = await WorkflowEnvironment.start_time_skipping_v2( + dev_server_extra_args=dev_server_extra_args, + dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, + ) else: env = WorkflowEnvironment.from_client(await Client.connect(env_type)) @@ -163,12 +231,12 @@ def mp_fork_ctx() -> Iterator[multiprocessing.context.BaseContext | None]: p.join() -@pytest_asyncio.fixture +@pytest_asyncio.fixture # type: ignore[reportUntypedFunctionDecorator] async def client(env: WorkflowEnvironment) -> Client: return env.client -@pytest_asyncio.fixture(scope="session") +@pytest_asyncio.fixture(scope="session") # type: ignore[reportUntypedFunctionDecorator] async def worker( env: WorkflowEnvironment, ) -> AsyncGenerator[ExternalWorker, None]: @@ -182,11 +250,18 @@ async def worker( # hook forcefully kills the process as success when the exit code from pytest # is a success. @pytest.hookimpl(hookwrapper=True, trylast=True) -def pytest_cmdline_main(config): +def pytest_cmdline_main(config): # type: ignore[reportMissingParameterType, reportUnusedParameter] result = yield - if result.get_result() == 0: + exit_code = result.get_result() + numprocesses = getattr(config.option, "numprocesses", None) + running_with_xdist = hasattr(config, "workerinput") or numprocesses not in ( + None, + 0, + "0", + ) + if exit_code == 0 and not running_with_xdist: os._exit(0) - return result.get_result() + return exit_code CONTINUE_AS_NEW_SUGGEST_HISTORY_COUNT = 50 @@ -195,3 +270,80 @@ def pytest_cmdline_main(config): @pytest.fixture def continue_as_new_suggest_history_count() -> int: return CONTINUE_AS_NEW_SUGGEST_HISTORY_COUNT + + +# OpenTelemetry's global providers are set-once per process with no public +# way to unset them, so tests needing their own provider must reset the +# globals directly -- the same isolation pattern OpenTelemetry's own test +# suite uses (opentelemetry.test.globals_test). Isolation cannot be delegated +# to scheduling: CI runs pytest-xdist with --dist=worksteal, which ignores +# xdist_group pinning, so any test in the suite can share a worker process +# with any other. Every test that installs a global provider must therefore +# use these fixtures and leave the globals reset behind it. + + +@pytest.fixture +def reset_otel_tracer_provider(): + """Isolate global OpenTelemetry tracer provider state around a test. + + Proxy tracers bound to a real provider stay bound forever; OTel has no + rebind mechanism for tracers. Tests must install their provider before + any span is created through a proxy tracer they care about. + """ + opentelemetry.trace._TRACER_PROVIDER_SET_ONCE = Once() + opentelemetry.trace._TRACER_PROVIDER = None + yield + opentelemetry.trace._TRACER_PROVIDER_SET_ONCE = Once() + opentelemetry.trace._TRACER_PROVIDER = None + + +def _reset_meter_provider_globals() -> None: + # Reset the set-once latch, then park proxy meters on a no-op provider: + # set_meter_provider rebinds every proxy meter and its instruments, so + # instruments bound during an earlier test stop recording into that + # test's dead reader. Reset the latch again so the next installer wins. + opentelemetry.metrics._internal._METER_PROVIDER_SET_ONCE = Once() + opentelemetry.metrics._internal._METER_PROVIDER = None + opentelemetry.metrics.set_meter_provider(NoOpMeterProvider()) + opentelemetry.metrics._internal._METER_PROVIDER_SET_ONCE = Once() + opentelemetry.metrics._internal._METER_PROVIDER = None + + +@pytest.fixture +def reset_otel_meter_provider(): + """Isolate global OpenTelemetry meter provider state around a test. + + Both setup and teardown park proxy meters on a no-op provider, so + instruments bound by other tests neither record into this test's provider + unexpectedly nor keep recording into this test's reader afterwards. Any + set_meter_provider call rebinds proxy meters, so tests that install their + own provider are unaffected by the parking. + """ + _reset_meter_provider_globals() + yield + _reset_meter_provider_globals() + + +@pytest.fixture +def reset_otel_logger_provider(): + """Isolate global OpenTelemetry logger provider state around a test. + + Unlike proxy meters, proxy loggers cache their real logger on first use + and never rebind, even across a later set_logger_provider call. Tests + exercising a library's module-level logger must clear that cache + themselves (e.g. Google ADK's telemetry logger). + """ + opentelemetry._logs._internal._LOGGER_PROVIDER_SET_ONCE = Once() + opentelemetry._logs._internal._LOGGER_PROVIDER = None + yield + opentelemetry._logs._internal._LOGGER_PROVIDER_SET_ONCE = Once() + opentelemetry._logs._internal._LOGGER_PROVIDER = None + + +@pytest.fixture +def encode_storage_references(monkeypatch: pytest.MonkeyPatch) -> None: + """Turn on writing marked, codec-encoded external storage references, which + is off by default until a later release.""" + monkeypatch.setattr( + temporalio.converter._extstore, "_ENCODE_STORAGE_REFERENCES", True + ) diff --git a/tests/contrib/aws/__init__.py b/tests/contrib/aws/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/contrib/aws/lambda_worker/__init__.py b/tests/contrib/aws/lambda_worker/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/contrib/aws/lambda_worker/test_lambda_worker.py b/tests/contrib/aws/lambda_worker/test_lambda_worker.py new file mode 100644 index 0000000000..897ec17bdb --- /dev/null +++ b/tests/contrib/aws/lambda_worker/test_lambda_worker.py @@ -0,0 +1,816 @@ +"""Tests for temporalio.contrib.aws.lambda_worker.""" + +from __future__ import annotations + +import asyncio +import dataclasses +import itertools +from collections.abc import Awaitable, Callable +from contextlib import asynccontextmanager +from datetime import timedelta +from pathlib import Path +from typing import Any +from unittest.mock import AsyncMock, MagicMock, patch + +import pytest + +from temporalio.common import WorkerDeploymentVersion +from temporalio.contrib.aws.lambda_worker._configure import ( + LambdaWorkerConfig, + _run_shutdown_hooks, +) +from temporalio.contrib.aws.lambda_worker._defaults import ( + DEFAULT_MAX_CACHED_WORKFLOWS, + DEFAULT_MAX_CONCURRENT_ACTIVITIES, + DEFAULT_MAX_CONCURRENT_LOCAL_ACTIVITIES, + DEFAULT_MAX_CONCURRENT_NEXUS_TASKS, + DEFAULT_MAX_CONCURRENT_WORKFLOW_TASKS, + apply_lambda_worker_defaults, + build_lambda_identity, + lambda_default_config_file_path, +) +from temporalio.contrib.aws.lambda_worker._run_worker import ( + _run_worker_internal, + _WorkerDeps, +) +from temporalio.envconfig import ClientConfigProfile +from temporalio.worker import WorkerConfig + +TEST_VERSION = WorkerDeploymentVersion( + deployment_name="test-deployment", + build_id="test-build", +) + + +# ---- LambdaWorkerConfig tests ---- + + +class TestLambdaWorkerConfig: + def test_worker_config_task_queue(self) -> None: + config = LambdaWorkerConfig() + assert config.worker_config.get("task_queue") is None + config.worker_config["task_queue"] = "my-queue" + assert config.worker_config["task_queue"] == "my-queue" + + def test_worker_config_workflows(self) -> None: + config = LambdaWorkerConfig() + + class FakeWorkflow: + pass + + config.worker_config["workflows"] = [FakeWorkflow] + assert FakeWorkflow in config.worker_config["workflows"] + + def test_worker_config_activities(self) -> None: + config = LambdaWorkerConfig() + + def fake_activity() -> None: + pass + + config.worker_config["activities"] = [fake_activity] + assert fake_activity in config.worker_config["activities"] + + def test_client_connect_config_directly_modifiable(self) -> None: + config = LambdaWorkerConfig() + config.client_connect_config["namespace"] = "custom-ns" + assert config.client_connect_config["namespace"] == "custom-ns" + + def test_worker_config_directly_modifiable(self) -> None: + config = LambdaWorkerConfig() + config.worker_config["max_concurrent_activities"] = 42 + assert config.worker_config["max_concurrent_activities"] == 42 + + def test_shutdown_deadline_buffer(self) -> None: + config = LambdaWorkerConfig() + config.shutdown_deadline_buffer = timedelta(seconds=5) + assert config.shutdown_deadline_buffer == timedelta(seconds=5) + + def test_shutdown_hooks_list(self) -> None: + config = LambdaWorkerConfig() + fn = MagicMock() + config.shutdown_hooks.append(fn) + assert fn in config.shutdown_hooks + + @pytest.mark.asyncio + async def test_run_shutdown_hooks_in_order(self) -> None: + config = LambdaWorkerConfig() + order: list[str] = [] + config.shutdown_hooks.append(lambda: order.append("first")) + config.shutdown_hooks.append(lambda: order.append("second")) + await _run_shutdown_hooks(config) + assert order == ["first", "second"] + + @pytest.mark.asyncio + async def test_run_shutdown_hooks_async(self) -> None: + config = LambdaWorkerConfig() + called = False + + async def async_hook() -> None: + nonlocal called + called = True + + config.shutdown_hooks.append(async_hook) + await _run_shutdown_hooks(config) + assert called + + @pytest.mark.asyncio + async def test_run_shutdown_hooks_error_continues(self) -> None: + config = LambdaWorkerConfig() + second_called = False + + def failing_hook() -> None: + raise RuntimeError("flush failed") + + def second_hook() -> None: + nonlocal second_called + second_called = True + + config.shutdown_hooks.append(failing_hook) + config.shutdown_hooks.append(second_hook) + await _run_shutdown_hooks(config) + assert second_called + + def test_is_dataclass(self) -> None: + assert dataclasses.is_dataclass(LambdaWorkerConfig) + + def test_default_field_independence(self) -> None: + """Each instance gets its own mutable containers.""" + a = LambdaWorkerConfig() + b = LambdaWorkerConfig() + a.worker_config["max_concurrent_activities"] = 99 + assert "max_concurrent_activities" not in b.worker_config + + +# ---- Defaults tests ---- + + +class TestDefaults: + def test_apply_lambda_worker_defaults(self) -> None: + config: WorkerConfig = {} + apply_lambda_worker_defaults(config) + assert ( + config.get("max_concurrent_activities") == DEFAULT_MAX_CONCURRENT_ACTIVITIES + ) + assert ( + config.get("max_concurrent_workflow_tasks") + == DEFAULT_MAX_CONCURRENT_WORKFLOW_TASKS + ) + assert ( + config.get("max_concurrent_local_activities") + == DEFAULT_MAX_CONCURRENT_LOCAL_ACTIVITIES + ) + assert ( + config.get("max_concurrent_nexus_tasks") + == DEFAULT_MAX_CONCURRENT_NEXUS_TASKS + ) + assert config.get("max_cached_workflows") == DEFAULT_MAX_CACHED_WORKFLOWS + assert config.get("disable_eager_activity_execution") is True + + def test_apply_lambda_worker_defaults_preserves_existing(self) -> None: + config: WorkerConfig = { + "max_concurrent_activities": 50, + "graceful_shutdown_timeout": timedelta(seconds=10), + } + apply_lambda_worker_defaults(config) + assert config.get("max_concurrent_activities") == 50 + assert config.get("graceful_shutdown_timeout") == timedelta(seconds=10) + assert config.get("disable_eager_activity_execution") is True + + def test_build_lambda_identity(self) -> None: + assert ( + build_lambda_identity("req-123", "arn:aws:lambda:us-east-1:123:function:f") + == "req-123@arn:aws:lambda:us-east-1:123:function:f" + ) + + def test_build_lambda_identity_empty(self) -> None: + assert build_lambda_identity("", "") == "unknown@unknown" + + def test_lambda_default_config_file_path_env_var(self) -> None: + env = {"TEMPORAL_CONFIG_FILE": "/custom/path.toml"} + assert ( + lambda_default_config_file_path(env.get) # type: ignore[arg-type] + == Path("/custom/path.toml") + ) + + def test_lambda_default_config_file_path_lambda_root(self) -> None: + env = {"LAMBDA_TASK_ROOT": "/var/task"} + assert ( + lambda_default_config_file_path(env.get) # type: ignore[arg-type] + == Path("/var/task/temporal.toml") + ) + + def test_lambda_default_config_file_path_cwd(self) -> None: + env: dict[str, str] = {} + assert ( + lambda_default_config_file_path(env.get) # type: ignore[arg-type] + == Path("temporal.toml") + ) + + +# ---- RunWorker tests ---- + + +def _make_lambda_context( + *, + remaining_ms: int = 3_600_000, + request_id: str = "req-123", + function_arn: str = "arn:aws:lambda:us-east-1:123:function:my-func", +) -> Any: + """Create a mock Lambda context object.""" + ctx = MagicMock() + ctx.get_remaining_time_in_millis.return_value = remaining_ms + ctx.aws_request_id = request_id + ctx.invoked_function_arn = function_arn + return ctx + + +def _make_test_deps( + *, + connect_kwargs_capture: list[dict[str, Any]] | None = None, + worker_kwargs_capture: list[dict[str, Any]] | None = None, +) -> _WorkerDeps: + """Create test deps with mocked connect and worker.""" + mock_client = MagicMock() + mock_worker = MagicMock() + mock_worker.run = AsyncMock() + + async def fake_connect(**kwargs: Any) -> Any: + if connect_kwargs_capture is not None: + connect_kwargs_capture.append(kwargs) + return mock_client + + def fake_create_worker(_client: Any, **kwargs: Any) -> Any: + if worker_kwargs_capture is not None: + worker_kwargs_capture.append(kwargs) + return mock_worker + + return _WorkerDeps( + connect=fake_connect, + create_worker=fake_create_worker, + load_config=lambda: ClientConfigProfile(), + getenv={"TEMPORAL_TASK_QUEUE": "test-queue"}.get, # type: ignore[arg-type] + extract_lambda_ctx=lambda ctx: ( + ( + ctx.aws_request_id, + ctx.invoked_function_arn, + ) + if hasattr(ctx, "aws_request_id") + else None + ), + ) + + +async def _connect_fails(**_kwargs: Any) -> Any: + raise RuntimeError("cannot connect") + + +def _create_worker_fails(_client: Any, **_kwargs: Any) -> Any: + raise ValueError("bad worker config") + + +async def _run_fails() -> None: + raise RuntimeError("worker boom") + + +async def _run_cancelled() -> None: + raise asyncio.CancelledError() + + +def _create_worker_running(run: Callable[[], Awaitable[None]]) -> Callable[..., Any]: + """A create_worker whose worker runs *run* instead of returning right away.""" + worker = MagicMock() + worker.run = run + return lambda _client, **_kwargs: worker + + +def _invoke( + handler: Callable[[Any, Any], None], error: type[BaseException] | None +) -> None: + """Invoke *handler* once, expecting it to raise *error* if one is given.""" + if error is None: + handler({}, _make_lambda_context()) + else: + with pytest.raises(error): + handler({}, _make_lambda_context()) + + +# (deps overrides, expected exception) for each way an invocation can end. +_INVOCATION_ENDINGS = [ + pytest.param({}, None, id="success"), + pytest.param({"getenv": lambda _: None}, ValueError, id="task-queue-error"), + pytest.param({"connect": _connect_fails}, RuntimeError, id="connect-error"), + pytest.param( + {"create_worker": _create_worker_fails}, ValueError, id="create-worker-error" + ), + pytest.param( + {"create_worker": _create_worker_running(_run_fails)}, + RuntimeError, + id="worker-error", + ), + pytest.param( + {"create_worker": _create_worker_running(_run_cancelled)}, + asyncio.CancelledError, + id="cancelled", + ), +] + + +class TestRunWorkerInternal: + def test_returns_handler(self) -> None: + deps = _make_test_deps() + handler = _run_worker_internal(TEST_VERSION, lambda config: None, deps) + assert callable(handler) + + def test_success(self) -> None: + deps = _make_test_deps() + + def configure(config: LambdaWorkerConfig) -> None: + config.worker_config["workflows"] = [type("FakeWf", (), {})] + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + + def test_configure_callback_error(self) -> None: + deps = _make_test_deps() + + def bad_configure(_config: LambdaWorkerConfig) -> None: + raise RuntimeError("bad config") + + # configure runs per invocation, so the error surfaces when the handler is invoked. + handler = _run_worker_internal(TEST_VERSION, bad_configure, deps) + with pytest.raises(RuntimeError, match="bad config"): + handler({}, _make_lambda_context()) + + def test_missing_task_queue(self) -> None: + deps = _make_test_deps() + deps.getenv = lambda _: None # type: ignore[assignment] + handler = _run_worker_internal(TEST_VERSION, lambda config: None, deps) + with pytest.raises(ValueError, match="task queue not configured"): + handler({}, _make_lambda_context()) + + def test_missing_version(self) -> None: + deps = _make_test_deps() + with pytest.raises(ValueError, match="version is required"): + _run_worker_internal( + WorkerDeploymentVersion(deployment_name="", build_id=""), + lambda config: None, + deps, + ) + + def test_user_overrides_applied(self) -> None: + connect_capture: list[dict[str, Any]] = [] + worker_capture: list[dict[str, Any]] = [] + deps = _make_test_deps( + connect_kwargs_capture=connect_capture, + worker_kwargs_capture=worker_capture, + ) + + def configure(config: LambdaWorkerConfig) -> None: + config.worker_config["task_queue"] = "user-queue" + config.client_connect_config["namespace"] = "custom-ns" + config.worker_config["max_concurrent_activities"] = 99 + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + + assert connect_capture[0]["namespace"] == "custom-ns" + assert worker_capture[0]["max_concurrent_activities"] == 99 + + def test_lambda_defaults_applied(self) -> None: + worker_capture: list[dict[str, Any]] = [] + deps = _make_test_deps(worker_kwargs_capture=worker_capture) + handler = _run_worker_internal(TEST_VERSION, lambda config: None, deps) + handler({}, _make_lambda_context()) + + kwargs = worker_capture[0] + assert kwargs["max_concurrent_activities"] == DEFAULT_MAX_CONCURRENT_ACTIVITIES + assert ( + kwargs["max_concurrent_workflow_tasks"] + == DEFAULT_MAX_CONCURRENT_WORKFLOW_TASKS + ) + assert kwargs["disable_eager_activity_execution"] is True + dc = kwargs["deployment_config"] + assert dc.use_worker_versioning is True + assert dc.version == TEST_VERSION + + def test_identity_from_lambda_context(self) -> None: + connect_capture: list[dict[str, Any]] = [] + deps = _make_test_deps(connect_kwargs_capture=connect_capture) + handler = _run_worker_internal(TEST_VERSION, lambda config: None, deps) + handler( + {}, + _make_lambda_context( + request_id="req-abc-123", + function_arn="arn:aws:lambda:us-east-1:123456:function:my-func", + ), + ) + + assert ( + connect_capture[0]["identity"] + == "req-abc-123@arn:aws:lambda:us-east-1:123456:function:my-func" + ) + + def test_identity_user_override_wins(self) -> None: + connect_capture: list[dict[str, Any]] = [] + deps = _make_test_deps(connect_kwargs_capture=connect_capture) + + def configure(config: LambdaWorkerConfig) -> None: + config.client_connect_config["identity"] = "my-custom-identity" + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + assert connect_capture[0]["identity"] == "my-custom-identity" + + def test_identity_no_lambda_context(self) -> None: + connect_capture: list[dict[str, Any]] = [] + deps = _make_test_deps(connect_kwargs_capture=connect_capture) + deps.extract_lambda_ctx = lambda ctx: None + handler = _run_worker_internal(TEST_VERSION, lambda config: None, deps) + handler({}, MagicMock(spec=[])) + assert "identity" not in connect_capture[0] + + def test_shutdown_hooks_called(self) -> None: + deps = _make_test_deps() + shutdown_called = False + + def configure(config: LambdaWorkerConfig) -> None: + def hook() -> None: + nonlocal shutdown_called + shutdown_called = True + + config.shutdown_hooks.append(hook) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + assert shutdown_called + + def test_shutdown_hooks_called_per_invocation(self) -> None: + deps = _make_test_deps() + shutdown_count = 0 + + def configure(config: LambdaWorkerConfig) -> None: + def hook() -> None: + nonlocal shutdown_count + shutdown_count += 1 + + config.shutdown_hooks.append(hook) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + handler({}, _make_lambda_context()) + handler({}, _make_lambda_context()) + assert shutdown_count == 3 + + def test_shutdown_hooks_multiple_funcs_order(self) -> None: + deps = _make_test_deps() + order: list[str] = [] + + def configure(config: LambdaWorkerConfig) -> None: + config.shutdown_hooks.append(lambda: order.append("first")) + config.shutdown_hooks.append(lambda: order.append("second")) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + assert order == ["first", "second"] + + def test_shutdown_hooks_error_continues(self) -> None: + deps = _make_test_deps() + second_called = False + + def configure(config: LambdaWorkerConfig) -> None: + def failing() -> None: + raise RuntimeError("flush failed") + + def second() -> None: + nonlocal second_called + second_called = True + + config.shutdown_hooks.append(failing) + config.shutdown_hooks.append(second) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + assert second_called + + @pytest.mark.parametrize(("overrides", "error"), _INVOCATION_ENDINGS) + def test_shutdown_hooks_run_however_invocation_ends( + self, overrides: dict[str, Any], error: type[BaseException] | None + ) -> None: + deps = dataclasses.replace(_make_test_deps(), **overrides) + hook_calls = 0 + + def configure(config: LambdaWorkerConfig) -> None: + def hook() -> None: + nonlocal hook_calls + hook_calls += 1 + + config.shutdown_hooks.append(hook) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + _invoke(handler, error) + assert hook_calls == 1 + + def test_shutdown_hook_error_keeps_invocation_failure(self) -> None: + deps = dataclasses.replace( + _make_test_deps(), create_worker=_create_worker_running(_run_fails) + ) + order: list[str] = [] + + def configure(config: LambdaWorkerConfig) -> None: + def failing() -> None: + raise RuntimeError("flush failed") + + config.shutdown_hooks.append(failing) + config.shutdown_hooks.append(lambda: order.append("second")) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + with pytest.raises(RuntimeError, match="worker boom"): + handler({}, _make_lambda_context()) + assert order == ["second"] + + def test_shutdown_hooks_run_when_deadline_is_too_short(self) -> None: + deps = _make_test_deps() + order: list[str] = [] + + def configure(config: LambdaWorkerConfig) -> None: + config.shutdown_deadline_buffer = timedelta(milliseconds=1500) + config.shutdown_hooks.append(lambda: order.append("hook")) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + with pytest.raises(RuntimeError, match="Lambda timeout is too short"): + handler({}, _make_lambda_context(remaining_ms=2000)) + assert order == ["hook"] + + def test_shutdown_hooks_run_when_deadline_stops_worker(self) -> None: + """The usual end of an invocation: the worker is cancelled at the deadline.""" + + async def run_until_cancelled() -> None: + await asyncio.Event().wait() + + deps = dataclasses.replace( + _make_test_deps(), create_worker=_create_worker_running(run_until_cancelled) + ) + order: list[str] = [] + + def configure(config: LambdaWorkerConfig) -> None: + config.shutdown_deadline_buffer = timedelta(milliseconds=500) + config.shutdown_hooks.append(lambda: order.append("hook")) + + # The first reading passes the deadline check, the second leaves 50ms for work. + context = _make_lambda_context() + context.get_remaining_time_in_millis.side_effect = [2000, 550] + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, context) + assert order == ["hook"] + + def test_tight_deadline_raises_error(self) -> None: + deps = _make_test_deps() + + def configure(config: LambdaWorkerConfig) -> None: + config.shutdown_deadline_buffer = timedelta(milliseconds=1500) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + with pytest.raises(RuntimeError, match="Lambda timeout is too short"): + handler({}, _make_lambda_context(remaining_ms=2000)) + + def test_tight_deadline_logs_warning(self) -> None: + deps = _make_test_deps() + + def configure(config: LambdaWorkerConfig) -> None: + config.shutdown_deadline_buffer = timedelta(milliseconds=500) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + with patch( + "temporalio.contrib.aws.lambda_worker._run_worker.logger" + ) as mock_logger: + handler({}, _make_lambda_context(remaining_ms=2000)) + mock_logger.warning.assert_called_once() + assert "less than 5s" in mock_logger.warning.call_args[0][0] + + def test_per_invocation_lifecycle(self) -> None: + """Each invocation creates its own client and worker.""" + connect_count = 0 + deps = _make_test_deps() + original_connect = deps.connect + + async def counting_connect(**kwargs: Any) -> Any: + nonlocal connect_count + connect_count += 1 + return await original_connect(**kwargs) + + deps.connect = counting_connect + + handler = _run_worker_internal(TEST_VERSION, lambda config: None, deps) + handler({}, _make_lambda_context()) + handler({}, _make_lambda_context()) + handler({}, _make_lambda_context()) + assert connect_count == 3 + + def test_task_queue_from_config(self) -> None: + worker_capture: list[dict[str, Any]] = [] + deps = _make_test_deps(worker_kwargs_capture=worker_capture) + deps.getenv = lambda _: None # type: ignore[assignment] + + def configure(config: LambdaWorkerConfig) -> None: + config.worker_config["task_queue"] = "explicit-queue" + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + assert worker_capture[0]["task_queue"] == "explicit-queue" + + def test_task_queue_pre_populated_from_env(self) -> None: + """Task queue is pre-populated from TEMPORAL_TASK_QUEUE env var.""" + deps = _make_test_deps() + task_queues: list[str | None] = [] + + def configure(config: LambdaWorkerConfig) -> None: + task_queues.append(config.worker_config.get("task_queue")) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + assert task_queues[0] == "test-queue" + + def test_config_pre_populated_with_defaults(self) -> None: + """Configure callback receives pre-populated LambdaWorkerConfig.""" + deps = _make_test_deps() + captured: list[LambdaWorkerConfig] = [] + + def configure(config: LambdaWorkerConfig) -> None: + captured.append(config) + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + wc = captured[0].worker_config + assert wc.get("max_concurrent_activities") == DEFAULT_MAX_CONCURRENT_ACTIVITIES + assert wc.get("disable_eager_activity_execution") is True + dc = wc.get("deployment_config") + assert dc is not None + assert dc.use_worker_versioning is True + assert dc.version == TEST_VERSION + + def test_no_deadline_runs_until_complete(self) -> None: + """When no deadline is available, worker runs until it completes.""" + deps = _make_test_deps() + handler = _run_worker_internal(TEST_VERSION, lambda config: None, deps) + ctx = MagicMock(spec=["aws_request_id", "invoked_function_arn"]) + ctx.aws_request_id = "req-123" + ctx.invoked_function_arn = "arn:aws:lambda:us-east-1:123:function:f" + handler({}, ctx) + + +class TestAsyncConfigure: + """configure may be sync, an async coroutine, or an async generator; all run once per + invocation inside that invocation's event loop.""" + + def test_async_configure_called_per_invocation(self) -> None: + deps = _make_test_deps() + calls = 0 + + async def configure(config: LambdaWorkerConfig) -> None: + nonlocal calls + calls += 1 + config.worker_config["task_queue"] = "async-queue" + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + handler({}, _make_lambda_context()) + assert calls == 2 + + def test_async_configure_can_set_data_converter(self) -> None: + connect_capture: list[dict[str, Any]] = [] + deps = _make_test_deps(connect_kwargs_capture=connect_capture) + sentinel = object() + + async def configure(config: LambdaWorkerConfig) -> None: + config.client_connect_config["data_converter"] = sentinel # type: ignore[typeddict-item] + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + assert connect_capture[0]["data_converter"] is sentinel + + def test_async_generator_setup_runs_before_connect_teardown_after(self) -> None: + order: list[str] = [] + deps = _make_test_deps() + + original_connect = deps.connect + + async def tracking_connect(**kwargs: Any) -> Any: + order.append("connect") + return await original_connect(**kwargs) + + deps.connect = tracking_connect + + async def configure(config: LambdaWorkerConfig): + order.append("setup") + config.worker_config["task_queue"] = "gen-queue" + yield + order.append("teardown") + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + assert order == ["setup", "connect", "teardown"] + + def test_async_generator_teardown_runs_on_error(self) -> None: + """Teardown after the yield runs even when the worker run raises.""" + torn_down = False + deps = _make_test_deps() + + async def failing_run() -> None: + raise RuntimeError("worker boom") + + def fake_create_worker(_client: Any, **_kwargs: Any) -> Any: + w = MagicMock() + w.run = failing_run + return w + + deps.create_worker = fake_create_worker + + async def configure(config: LambdaWorkerConfig): + nonlocal torn_down + config.worker_config["task_queue"] = "gen-queue" + try: + yield + finally: + torn_down = True + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + with pytest.raises(RuntimeError, match="worker boom"): + handler({}, _make_lambda_context()) + assert torn_down + + @pytest.mark.parametrize(("overrides", "error"), _INVOCATION_ENDINGS) + def test_async_generator_shutdown_hooks_run_before_teardown( + self, overrides: dict[str, Any], error: type[BaseException] | None + ) -> None: + """Shutdown hooks run before the post-yield teardown however the invocation ends, + so a hook can still use the resource the teardown closes.""" + deps = dataclasses.replace(_make_test_deps(), **overrides) + events: list[str] = [] + + async def configure(config: LambdaWorkerConfig): + config.shutdown_hooks.append(lambda: events.append("hook")) + try: + yield + finally: + events.append("teardown") + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + _invoke(handler, error) + assert events == ["hook", "teardown"] + + def test_async_generator_resource_per_invocation(self) -> None: + """Each invocation builds and tears down its own resource instance. Tagging each + resource with a construction sequence number proves the instances are distinct + (open-1/close-1, then open-2/close-2) rather than one resource reopened.""" + events: list[str] = [] + counter = itertools.count(1) + deps = _make_test_deps() + + class FakeResource: + def __init__(self) -> None: + self.n = next(counter) + + async def __aenter__(self) -> FakeResource: + events.append(f"open-{self.n}") + return self + + async def __aexit__(self, *exc: Any) -> None: + events.append(f"close-{self.n}") + + async def configure(config: LambdaWorkerConfig): + config.worker_config["task_queue"] = "gen-queue" + async with FakeResource(): + yield + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + handler({}, _make_lambda_context()) + assert events == ["open-1", "close-1", "open-2", "close-2"] + + def test_async_configure_validates_task_queue_per_invocation(self) -> None: + deps = _make_test_deps() + deps.getenv = lambda _: None # type: ignore[assignment] + + async def configure(_config: LambdaWorkerConfig) -> None: + pass + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + with pytest.raises(ValueError, match="task queue not configured"): + handler({}, _make_lambda_context()) + + def test_asynccontextmanager_decorated_configure_supported(self) -> None: + """A @asynccontextmanager-decorated configure is entered and exited per invocation, + the same as a bare async generator.""" + events: list[str] = [] + deps = _make_test_deps() + + @asynccontextmanager + async def configure(config: LambdaWorkerConfig): + events.append("setup") + config.worker_config["task_queue"] = "gen-queue" + yield + events.append("teardown") + + handler = _run_worker_internal(TEST_VERSION, configure, deps) + handler({}, _make_lambda_context()) + assert events == ["setup", "teardown"] diff --git a/tests/contrib/aws/lambda_worker/test_otel.py b/tests/contrib/aws/lambda_worker/test_otel.py new file mode 100644 index 0000000000..3f7e6285f6 --- /dev/null +++ b/tests/contrib/aws/lambda_worker/test_otel.py @@ -0,0 +1,267 @@ +"""Tests for temporalio.contrib.aws.lambda_worker.otel.""" + +from __future__ import annotations + +import threading +from collections.abc import Iterator, Sequence +from datetime import timedelta +from typing import Any +from unittest.mock import patch + +import pytest +from opentelemetry import trace +from opentelemetry.sdk.trace import ReadableSpan, TracerProvider +from opentelemetry.sdk.trace.export import ( + BatchSpanProcessor, + SpanExporter, + SpanExportResult, +) +from opentelemetry.util._once import Once + +from temporalio.contrib.aws.lambda_worker import otel +from temporalio.contrib.aws.lambda_worker._configure import ( + LambdaWorkerConfig, + _run_shutdown_hooks, +) +from temporalio.contrib.aws.lambda_worker.otel import ( + OtelOptions, + apply_defaults, + apply_tracing, + build_metrics_telemetry_config, +) +from temporalio.contrib.opentelemetry import OpenTelemetryPlugin +from temporalio.runtime import OpenTelemetryConfig, TelemetryConfig + + +class TestApplyTracing: + def test_adds_plugin(self) -> None: + config = LambdaWorkerConfig() + apply_tracing(config) + plugins = config.worker_config.get("plugins", []) + assert len(plugins) == 1 + assert isinstance(plugins[0], OpenTelemetryPlugin) + + def test_appends_to_existing_plugins(self) -> None: + config = LambdaWorkerConfig() + existing = OpenTelemetryPlugin() + config.worker_config["plugins"] = [existing] + apply_tracing(config) + plugins = config.worker_config["plugins"] + assert len(plugins) == 2 + assert plugins[0] is existing + + def test_registers_flush_shutdown_hook(self) -> None: + config = LambdaWorkerConfig() + apply_tracing(config) + assert len(config.shutdown_hooks) == 1 + + @pytest.mark.asyncio + async def test_shutdown_hook_flushes(self) -> None: + config = LambdaWorkerConfig() + apply_tracing(config) + # Should not raise even with the default noop global provider. + await _run_shutdown_hooks(config) + + +class TestBuildMetricsTelemetryConfig: + def test_returns_telemetry_config(self) -> None: + tc = build_metrics_telemetry_config(endpoint="http://localhost:4317") + assert isinstance(tc, TelemetryConfig) + assert isinstance(tc.metrics, OpenTelemetryConfig) + assert tc.metrics.url == "http://localhost:4317" + + def test_default_endpoint(self) -> None: + tc = build_metrics_telemetry_config() + assert isinstance(tc.metrics, OpenTelemetryConfig) + assert tc.metrics.url == "http://localhost:4317" + + def test_service_name_as_global_tag(self) -> None: + tc = build_metrics_telemetry_config(service_name="my-svc") + assert tc.global_tags.get("service_name") == "my-svc" + + def test_no_service_name_no_tag(self) -> None: + tc = build_metrics_telemetry_config() + assert "service_name" not in tc.global_tags + + def test_metric_periodicity(self) -> None: + tc = build_metrics_telemetry_config(metric_periodicity=timedelta(seconds=30)) + assert isinstance(tc.metrics, OpenTelemetryConfig) + assert tc.metrics.metric_periodicity == timedelta(seconds=30) + + def test_composable_with_custom_runtime(self) -> None: + """User can compose the returned config into a custom Runtime.""" + import dataclasses + + tc = build_metrics_telemetry_config(endpoint="http://localhost:4317") + custom_tc = dataclasses.replace(tc, logging=None) + assert custom_tc.logging is None + assert isinstance(custom_tc.metrics, OpenTelemetryConfig) + + +class TestApplyDefaults: + def test_configures_metrics_and_tracing(self) -> None: + config = LambdaWorkerConfig() + apply_defaults(config, OtelOptions(collector_endpoint="http://localhost:4317")) + + # Metrics: runtime should be set. + assert "runtime" in config.client_connect_config + # Tracing: plugin should be added. + plugins = config.worker_config.get("plugins", []) + assert len(plugins) == 1 + assert isinstance(plugins[0], OpenTelemetryPlugin) + # Shutdown hook for tracer flush. + assert len(config.shutdown_hooks) == 1 + + def test_sets_global_tracer_provider(self) -> None: + from opentelemetry.trace import get_tracer_provider + + from temporalio.contrib.opentelemetry._tracer_provider import ( + ReplaySafeTracerProvider, + ) + + config = LambdaWorkerConfig() + apply_defaults(config) + provider = get_tracer_provider() + assert isinstance(provider, ReplaySafeTracerProvider) + + def test_service_name_from_options(self) -> None: + config = LambdaWorkerConfig() + apply_defaults(config, OtelOptions(service_name="my-service")) + assert "runtime" in config.client_connect_config + + def test_service_name_from_env(self) -> None: + config = LambdaWorkerConfig() + with patch.dict("os.environ", {"OTEL_SERVICE_NAME": "env-service"}): + apply_defaults(config) + assert "runtime" in config.client_connect_config + + def test_service_name_from_lambda_function_name(self) -> None: + config = LambdaWorkerConfig() + with patch.dict( + "os.environ", + {"AWS_LAMBDA_FUNCTION_NAME": "my-lambda"}, + clear=True, + ): + apply_defaults(config) + assert "runtime" in config.client_connect_config + + def test_endpoint_from_env(self) -> None: + config = LambdaWorkerConfig() + with patch.dict( + "os.environ", + {"OTEL_EXPORTER_OTLP_ENDPOINT": "http://custom:4317"}, + ): + apply_defaults(config) + assert "runtime" in config.client_connect_config + + def test_default_options_used_when_none(self) -> None: + config = LambdaWorkerConfig() + apply_defaults(config) + assert "runtime" in config.client_connect_config + assert len(config.shutdown_hooks) == 1 + + +class _RecordingExporter(SpanExporter): + def __init__(self) -> None: + super().__init__() + self.exported: list[str] = [] + + def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: + self.exported.extend(span.name for span in spans) + return SpanExportResult.SUCCESS + + +def _span_export_threads() -> int: + return sum( + 1 for t in threading.enumerate() if t.name == "OtelBatchSpanRecordProcessor" + ) + + +class TestApplyDefaultsWarmInvocations: + """``configure`` runs on every Lambda invocation in the same warm process.""" + + @pytest.fixture(autouse=True) + def exporters( + self, monkeypatch: pytest.MonkeyPatch + ) -> Iterator[list[_RecordingExporter]]: + """Isolate the global provider and record every span exporter that gets built.""" + # OpenTelemetry only allows the global provider to be set once per process. + exporters: list[_RecordingExporter] = [] + monkeypatch.setattr(trace, "_TRACER_PROVIDER", None) + monkeypatch.setattr(trace, "_TRACER_PROVIDER_SET_ONCE", Once()) + monkeypatch.setattr(otel, "_installed_tracer_provider", None, raising=False) + + def build_processor(*_args: Any, **_kwargs: Any) -> BatchSpanProcessor: + exporter = _RecordingExporter() + exporters.append(exporter) + return BatchSpanProcessor(exporter) + + monkeypatch.setattr( + otel._serverless, # type: ignore[reportPrivateUsage] + "build_otlp_span_processor", + build_processor, + ) + yield exporters + provider = trace.get_tracer_provider() + if isinstance(provider, TracerProvider): + provider.shutdown() + + def test_reuses_provider_across_invocations( + self, exporters: list[_RecordingExporter] + ) -> None: + baseline = _span_export_threads() + providers = [] + for _ in range(4): + apply_defaults(LambdaWorkerConfig()) + providers.append(trace.get_tracer_provider()) + assert len({id(p) for p in providers}) == 1 + assert len(exporters) == 1 + assert _span_export_threads() == baseline + 1 + + def test_does_not_warn_about_overriding_provider( + self, caplog: pytest.LogCaptureFixture + ) -> None: + apply_defaults(LambdaWorkerConfig()) + caplog.clear() + apply_defaults(LambdaWorkerConfig()) + assert "Overriding of current TracerProvider" not in caplog.text + + @pytest.mark.asyncio + async def test_flush_hook_exports_on_every_invocation( + self, exporters: list[_RecordingExporter] + ) -> None: + for invocation in range(3): + config = LambdaWorkerConfig() + apply_defaults(config) + tracer = trace.get_tracer("test") + with tracer.start_as_current_span(f"span-{invocation}"): + pass + await _run_shutdown_hooks(config) + assert exporters[0].exported == ["span-0", "span-1", "span-2"] + + def test_unused_provider_is_shut_down_when_global_already_set(self) -> None: + foreign = TracerProvider() + trace.set_tracer_provider(foreign) + baseline = _span_export_threads() + for _ in range(3): + apply_defaults(LambdaWorkerConfig()) + assert trace.get_tracer_provider() is foreign + assert _span_export_threads() == baseline + + +class TestOtelOptions: + def test_defaults(self) -> None: + opts = OtelOptions() + assert opts.service_name == "" + assert opts.collector_endpoint == "" + assert opts.metric_periodicity == timedelta(seconds=10) + + def test_custom_values(self) -> None: + opts = OtelOptions( + service_name="svc", + collector_endpoint="http://host:4317", + metric_periodicity=timedelta(seconds=30), + ) + assert opts.service_name == "svc" + assert opts.collector_endpoint == "http://host:4317" + assert opts.metric_periodicity == timedelta(seconds=30) diff --git a/tests/contrib/aws/s3driver/__init__.py b/tests/contrib/aws/s3driver/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/contrib/aws/s3driver/conftest.py b/tests/contrib/aws/s3driver/conftest.py new file mode 100644 index 0000000000..6213014af7 --- /dev/null +++ b/tests/contrib/aws/s3driver/conftest.py @@ -0,0 +1,65 @@ +"""Shared fixtures for S3 storage driver tests.""" + +from __future__ import annotations + +import socket +import urllib.request +from collections.abc import AsyncIterator, Iterator + +import aioboto3 +import pytest +from types_aiobotocore_s3.client import S3Client + +from temporalio.contrib.aws.s3driver import S3StorageDriverClient +from temporalio.contrib.aws.s3driver.aioboto3 import new_aioboto3_client + +BUCKET = "test-bucket" +CLIENT_REGION = "us-east-1" + + +def _find_free_port() -> int: + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + s.bind(("127.0.0.1", 0)) + return s.getsockname()[1] + + +@pytest.fixture(scope="session") +def moto_server_url() -> Iterator[str]: + """Start a moto S3 server for the test session and yield its base URL.""" + port = _find_free_port() + from moto.server import ThreadedMotoServer + + server = ThreadedMotoServer(port=port) + server.start() + yield f"http://127.0.0.1:{port}" + server.stop() + + +@pytest.fixture +async def aioboto3_client(moto_server_url: str) -> AsyncIterator[S3Client]: + """Yield an aioboto3 S3 client pointed at the moto server. + + Resets all moto state before each test to guarantee isolation, then + pre-creates the standard test bucket. + """ + urllib.request.urlopen( + urllib.request.Request( + f"{moto_server_url}/moto-api/reset", method="POST", data=b"" + ) + ) + session = aioboto3.Session() + async with session.client( + "s3", + region_name=CLIENT_REGION, + endpoint_url=moto_server_url, + aws_access_key_id="testing", + aws_secret_access_key="testing", + ) as client: + await client.create_bucket(Bucket=BUCKET) + yield client + + +@pytest.fixture +def driver_client(aioboto3_client: S3Client) -> S3StorageDriverClient: + """Wrap the aioboto3 S3 client in an S3StorageDriverClient adapter.""" + return new_aioboto3_client(aioboto3_client) diff --git a/tests/contrib/aws/s3driver/test_s3driver.py b/tests/contrib/aws/s3driver/test_s3driver.py new file mode 100644 index 0000000000..add26b3698 --- /dev/null +++ b/tests/contrib/aws/s3driver/test_s3driver.py @@ -0,0 +1,1157 @@ +"""Unit tests for S3StorageDriver using moto's ThreadedMotoServer to mock AWS S3. + +moto's standard mock_aws() context manager intercepts boto3/botocore via the +requests library and does not intercept aiobotocore (which aioboto3 wraps), +because aiobotocore uses aiohttp and returns coroutines where moto's mock +returns plain bytes. ThreadedMotoServer starts a real local HTTP server; the +aioboto3 client is pointed at it via endpoint_url so all API calls are +intercepted correctly. +""" + +from __future__ import annotations + +import asyncio +import hashlib +from collections.abc import Callable, Coroutine +from functools import wraps +from typing import Any +from unittest.mock import AsyncMock, MagicMock + +import pytest +from botocore.exceptions import ClientError +from types_aiobotocore_s3.client import S3Client + +from temporalio.api.common.v1 import Payload +from temporalio.contrib.aws.s3driver import ( + S3StorageDriver, + S3StorageDriverClient, +) +from temporalio.contrib.aws.s3driver._driver import _format_client_context +from temporalio.contrib.aws.s3driver.aioboto3 import _Aioboto3StorageDriverClient +from temporalio.converter import ( + JSONPlainPayloadConverter, + StorageDriverActivityInfo, + StorageDriverClaim, + StorageDriverRetrieveContext, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, +) +from tests.contrib.aws.s3driver.conftest import BUCKET, CLIENT_REGION + +_CONVERTER = JSONPlainPayloadConverter() + + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- + + +def make_payload(value: str = "hello") -> Payload: + p = _CONVERTER.to_payload(value) + assert p is not None + return p + + +def make_store_context( + target: StorageDriverActivityInfo | StorageDriverWorkflowInfo | None = None, +) -> StorageDriverStoreContext: + return StorageDriverStoreContext( + target=target, + ) + + +def make_workflow_context( + namespace: str = "my-namespace", + workflow_id: str = "my-workflow", + workflow_type: str | None = None, + run_id: str | None = None, +) -> StorageDriverStoreContext: + return make_store_context( + target=StorageDriverWorkflowInfo( + id=workflow_id, type=workflow_type, run_id=run_id, namespace=namespace + ), + ) + + +def make_activity_context( + namespace: str = "my-namespace", + activity_id: str | None = "my-activity", + activity_type: str | None = None, + run_id: str | None = None, +) -> StorageDriverStoreContext: + return make_store_context( + target=StorageDriverActivityInfo( + id=activity_id, type=activity_type, run_id=run_id, namespace=namespace + ), + ) + + +# --------------------------------------------------------------------------- +# Fixtures +# --------------------------------------------------------------------------- + + +class CountingDriverClient(S3StorageDriverClient): + """S3StorageDriverClient wrapper that counts calls to each method.""" + + def __init__(self, delegate: S3StorageDriverClient) -> None: + self._delegate = delegate + self.put_object_count = 0 + self.get_object_count = 0 + self.object_exists_count = 0 + + async def put_object(self, *, bucket: str, key: str, data: bytes) -> None: + """Delegate to wrapped client and increment put_object counter.""" + self.put_object_count += 1 + await self._delegate.put_object(bucket=bucket, key=key, data=data) + + async def object_exists(self, *, bucket: str, key: str) -> bool: + """Delegate to wrapped client and increment object_exists counter.""" + self.object_exists_count += 1 + return await self._delegate.object_exists(bucket=bucket, key=key) + + async def get_object(self, *, bucket: str, key: str) -> bytes: + """Delegate to wrapped client and increment get_object counter.""" + self.get_object_count += 1 + return await self._delegate.get_object(bucket=bucket, key=key) + + +class FailOnceDriverClient(S3StorageDriverClient): + """S3StorageDriverClient wrapper that fails the first call to a specified + method and blocks subsequent calls until cancelled. + + Used to verify that the driver cancels in-flight tasks when one fails. + """ + + def __init__( + self, + delegate: S3StorageDriverClient, + fail_on: str, + ) -> None: + self._delegate = delegate + self._fail_on = fail_on + self._call_count = 0 + self.cancelled: list[bool] = [] + + async def _maybe_fail(self) -> None: + self._call_count += 1 + if self._call_count == 1: + raise ConnectionError("S3 connection lost") + try: + await asyncio.sleep(60) + except asyncio.CancelledError: + self.cancelled.append(True) + raise + + async def put_object(self, *, bucket: str, key: str, data: bytes) -> None: + """Delegate or fail depending on configuration.""" + if self._fail_on == "put_object": + await self._maybe_fail() + await self._delegate.put_object(bucket=bucket, key=key, data=data) + + async def object_exists(self, *, bucket: str, key: str) -> bool: + """Delegate or fail depending on configuration.""" + if self._fail_on == "object_exists": + await self._maybe_fail() + return await self._delegate.object_exists(bucket=bucket, key=key) + + async def get_object(self, *, bucket: str, key: str) -> bytes: + """Delegate or fail depending on configuration.""" + if self._fail_on == "get_object": + await self._maybe_fail() + return await self._delegate.get_object(bucket=bucket, key=key) + + +@pytest.fixture +def counting_driver_client( + driver_client: S3StorageDriverClient, +) -> CountingDriverClient: + """Wrap the driver client in a counting decorator.""" + return CountingDriverClient(driver_client) + + +# --------------------------------------------------------------------------- +# TestS3StorageDriverInit — no S3 calls; MagicMock client is sufficient +# --------------------------------------------------------------------------- + + +class TestS3StorageDriverInit: + def test_default_name(self) -> None: + driver = S3StorageDriver( + client=MagicMock(spec=S3StorageDriverClient), bucket=BUCKET + ) + assert driver.name() == "aws.s3driver" + + def test_custom_name(self) -> None: + driver = S3StorageDriver( + client=MagicMock(spec=S3StorageDriverClient), + bucket=BUCKET, + driver_name="my-s3", + ) + assert driver.name() == "my-s3" + + def test_type(self) -> None: + driver = S3StorageDriver( + client=MagicMock(spec=S3StorageDriverClient), bucket=BUCKET + ) + assert driver.type() == "aws.s3driver" + + +# --------------------------------------------------------------------------- +# TestS3StorageDriverKeyConstruction +# --------------------------------------------------------------------------- + + +class TestS3StorageDriverKeyConstruction: + @pytest.mark.parametrize( + "target_type,identity", + [ + (StorageDriverWorkflowInfo, "wt/null/wi"), + (StorageDriverActivityInfo, "at/null/ai"), + ], + ) + async def test_empty_namespace( + self, + driver_client: S3StorageDriverClient, + target_type: type[StorageDriverWorkflowInfo] | type[StorageDriverActivityInfo], + identity: str, + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + [claim] = await driver.store( + make_store_context(target_type(namespace="")), [payload] + ) + digest = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert claim.claim_data["key"] == ( + f"v0/ns/null/{identity}/null/ri/null/d/sha256/{digest}" + ) + assert await driver.retrieve(StorageDriverRetrieveContext(), [claim]) == [ + payload + ] + + @pytest.mark.parametrize( + "target_type", [StorageDriverWorkflowInfo, StorageDriverActivityInfo] + ) + @pytest.mark.parametrize("size", [1023, 1024, 1025]) + @pytest.mark.parametrize("char", ["x", "日"]) + async def test_key_length_boundary( + self, + driver_client: S3StorageDriverClient, + target_type: type[StorageDriverWorkflowInfo] | type[StorageDriverActivityInfo], + size: int, + char: str, + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + digest = hashlib.sha256(payload.SerializeToString()).hexdigest() + identity = ( + "wt/Type/wi" if target_type is StorageDriverWorkflowInfo else "at/Type/ai" + ) + prefix = f"v0/ns/ns/{identity}/" + suffix = f"/ri/run/d/sha256/{digest}" + remaining = size - len(prefix) - len(suffix) + encoded_char = "x" if char == "x" else "%E6%97%A5" + count, padding = divmod(remaining, len(encoded_char)) + target_id = char * count + "x" * padding + [claim] = await driver.store( + make_store_context( + target_type(namespace="ns", type="Type", id=target_id, run_id="run") + ), + [payload], + ) + assert claim.claim_data["key"] == ( + f"v0/ns/ns/d/sha256/{digest}" + if size > 1024 + else f"{prefix}{encoded_char * count}{'x' * padding}{suffix}" + ) + assert await driver.retrieve(StorageDriverRetrieveContext(), [claim]) == [ + payload + ] + + @pytest.mark.parametrize( + "target_type", [StorageDriverWorkflowInfo, StorageDriverActivityInfo] + ) + async def test_long_keys_preserve_namespace( + self, + driver_client: S3StorageDriverClient, + target_type: type[StorageDriverWorkflowInfo] | type[StorageDriverActivityInfo], + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + digest = hashlib.sha256(payload.SerializeToString()).hexdigest() + claims = [] + for namespace, encoded in [ + ("first", "first"), + ("second /%", "second%20%2F%25"), + ("", "null"), + ]: + [claim] = await driver.store( + make_store_context(target_type(namespace=namespace, id="日" * 110)), + [payload], + ) + assert claim.claim_data["key"] == f"v0/ns/{encoded}/d/sha256/{digest}" + claims.append(claim) + assert len({claim.claim_data["key"] for claim in claims}) == 3 + assert ( + await driver.retrieve(StorageDriverRetrieveContext(), claims) + == [payload] * 3 + ) + + async def test_key_context_none(self, driver_client: S3StorageDriverClient) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + [claim] = await driver.store(make_store_context(), [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert claim.claim_data["key"] == f"v0/ns/null/d/sha256/{expected_hash}" + + @pytest.mark.parametrize( + "target,namespace,prefix", + [ + (None, "ambient /%", "v0/ns/ambient%20%2F%25"), + (None, None, "v0/ns/null"), + (None, "", "v0/ns/null"), + ( + StorageDriverWorkflowInfo(namespace="target"), + "ambient", + "v0/ns/target/wt", + ), + ( + StorageDriverActivityInfo(namespace="target"), + "ambient", + "v0/ns/target/at", + ), + (StorageDriverWorkflowInfo(namespace=""), "ambient", "v0/ns/null/wt"), + ], + ) + async def test_key_ambient_namespace( + self, + driver_client: S3StorageDriverClient, + target: StorageDriverWorkflowInfo | StorageDriverActivityInfo | None, + namespace: str | None, + prefix: str, + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + [claim] = await driver.store( + StorageDriverStoreContext(target=target, namespace=namespace), [payload] + ) + digest = hashlib.sha256(payload.SerializeToString()).hexdigest() + key = claim.claim_data["key"] + assert key.startswith(f"{prefix}/") + assert key.endswith(f"/d/sha256/{digest}") + if target is None: + assert key == f"{prefix}/d/sha256/{digest}" + assert await driver.retrieve(StorageDriverRetrieveContext(), [claim]) == [ + payload + ] + + async def test_long_key_without_target_uses_ambient_namespace(self) -> None: + client = AsyncMock(spec=S3StorageDriverClient) + client.object_exists.return_value = False + driver = S3StorageDriver(client=client, bucket=BUCKET) + payload = make_payload() + digest = hashlib.sha256(payload.SerializeToString()).hexdigest() + namespace = "x" * 1024 + [claim] = await driver.store( + StorageDriverStoreContext(namespace=namespace), [payload] + ) + assert claim.claim_data["key"] == f"v0/ns/{namespace}/d/sha256/{digest}" + + async def test_key_context_workflow( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_workflow_context(namespace="ns1", workflow_id="wf1") + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/wt/null/wi/wf1/ri/null/d/sha256/{expected_hash}" + ) + + async def test_key_context_workflow_with_type_and_run_id( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_workflow_context( + namespace="ns1", + workflow_id="wf1", + workflow_type="MyWorkflow", + run_id="run-abc", + ) + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/wt/MyWorkflow/wi/wf1/ri/run-abc/d/sha256/{expected_hash}" + ) + + async def test_key_context_activity( + self, driver_client: S3StorageDriverClient + ) -> None: + """activity target uses activity key segment.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_activity_context(namespace="ns1", activity_id="act1") + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/at/null/ai/act1/ri/null/d/sha256/{expected_hash}" + ) + + async def test_key_context_activity_with_type_and_run_id( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_activity_context( + namespace="ns1", + activity_id="act1", + activity_type="MyActivity", + run_id="run-abc", + ) + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/at/MyActivity/ai/act1/ri/run-abc/d/sha256/{expected_hash}" + ) + + async def test_key_preserves_case( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_workflow_context(namespace="MyNamespace", workflow_id="MyWorkflow") + [claim] = await driver.store(ctx, [payload]) + key = claim.claim_data["key"] + assert "MyNamespace" in key + assert "MyWorkflow" in key + + async def test_key_urlencodes_workflow_id_with_slashes( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_workflow_context(namespace="ns1", workflow_id="order/123/v2") + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/wt/null/wi/order%2F123%2Fv2/ri/null/d/sha256/{expected_hash}" + ) + + async def test_key_urlencodes_workflow_id_with_special_chars( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_workflow_context(namespace="ns1", workflow_id="wf#1 &foo=bar") + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/wt/null/wi/wf%231%20%26foo%3Dbar/ri/null/d/sha256/{expected_hash}" + ) + + async def test_key_urlencodes_activity_id( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_activity_context(namespace="ns1", activity_id="act/1#2") + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/at/null/ai/act%2F1%232/ri/null/d/sha256/{expected_hash}" + ) + + async def test_key_urlencodes_namespace( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_workflow_context(namespace="my/ns#1", workflow_id="wf1") + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/my%2Fns%231/wt/null/wi/wf1/ri/null/d/sha256/{expected_hash}" + ) + + async def test_key_preserves_s3_safe_special_chars( + self, driver_client: S3StorageDriverClient + ) -> None: + """S3's safe special characters are left unescaped per the key spec.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + # Every special character S3 lists as safe: ! - _ . * ' ( ) + ctx = make_workflow_context(namespace="ns1", workflow_id="!-_.*'()") + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/wt/null/wi/!-_.*'()/ri/null/d/sha256/{expected_hash}" + ) + + async def test_key_escapes_tilde( + self, driver_client: S3StorageDriverClient + ) -> None: + """Tilde is not in S3's safe set and must be percent-encoded (%7E).""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_workflow_context(namespace="ns1", workflow_id="wf~1") + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/wt/null/wi/wf%7E1/ri/null/d/sha256/{expected_hash}" + ) + + async def test_key_escapes_non_ascii_as_utf8_bytes( + self, driver_client: S3StorageDriverClient + ) -> None: + """Non-ASCII characters are percent-encoded byte by byte from UTF-8.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + # "é" is U+00E9, which is 0xC3 0xA9 in UTF-8. + ctx = make_workflow_context(namespace="ns1", workflow_id="café") + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert ( + claim.claim_data["key"] + == f"v0/ns/ns1/wt/null/wi/caf%C3%A9/ri/null/d/sha256/{expected_hash}" + ) + + async def test_key_matches_spec_workflow_example( + self, driver_client: S3StorageDriverClient + ) -> None: + """Reproduces the workflow key example from the S3 key spec.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_workflow_context( + namespace="payments prod", + workflow_type="ChargeWorkflow", + workflow_id="order+123=abc", + run_id="3f1d6c7a-8b2e-4f7a-9d0a-87a6f95e4d31", + ) + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert claim.claim_data["key"] == ( + "v0/ns/payments%20prod/wt/ChargeWorkflow/wi/order%2B123%3Dabc" + f"/ri/3f1d6c7a-8b2e-4f7a-9d0a-87a6f95e4d31/d/sha256/{expected_hash}" + ) + + async def test_key_matches_spec_activity_example( + self, driver_client: S3StorageDriverClient + ) -> None: + """Reproduces the activity key example from the S3 key spec.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + ctx = make_activity_context( + namespace="payments prod", + activity_type="Capture/Charge", + activity_id="activity id+42", + run_id="9e1d1fd9-2f8a-4c40-93e2-731f31b9268b", + ) + [claim] = await driver.store(ctx, [payload]) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert claim.claim_data["key"] == ( + "v0/ns/payments%20prod/at/Capture%2FCharge/ai/activity%20id%2B42" + f"/ri/9e1d1fd9-2f8a-4c40-93e2-731f31b9268b/d/sha256/{expected_hash}" + ) + + async def test_key_urlencoded_roundtrip( + self, driver_client: S3StorageDriverClient + ) -> None: + """Payloads stored with special-char IDs can be retrieved correctly.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload("special-char-roundtrip") + ctx = make_workflow_context(namespace="ns/1", workflow_id="wf/2#3") + [claim] = await driver.store(ctx, [payload]) + [retrieved] = await driver.retrieve(StorageDriverRetrieveContext(), [claim]) + assert retrieved == payload + + +# --------------------------------------------------------------------------- +# TestS3StorageDriverStoreRetrieve +# --------------------------------------------------------------------------- + + +class TestS3StorageDriverStoreRetrieve: + @pytest.mark.parametrize("identity", ["wt", "at"]) + async def test_retrieve_legacy_empty_namespace_key( + self, + aioboto3_client: S3Client, + driver_client: S3StorageDriverClient, + identity: str, + ) -> None: + payload = make_payload() + data = payload.SerializeToString() + digest = hashlib.sha256(data).hexdigest() + identifier = "wi" if identity == "wt" else "ai" + key = f"v0/{identity}/null/{identifier}/null/ri/null/d/sha256/{digest}" + await aioboto3_client.put_object(Bucket=BUCKET, Key=key, Body=data) + claim = StorageDriverClaim( + { + "bucket": BUCKET, + "key": key, + "hash_algorithm": "sha256", + "hash_value": digest, + } + ) + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + assert await driver.retrieve(StorageDriverRetrieveContext(), [claim]) == [ + payload + ] + + async def test_store_returns_claim_with_bucket_key_and_hash( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload() + [claim] = await driver.store(make_store_context(), [payload]) + assert claim.claim_data["bucket"] == BUCKET + assert "key" in claim.claim_data + assert claim.claim_data["hash_algorithm"] == "sha256" + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + assert claim.claim_data["hash_value"] == expected_hash + + async def test_roundtrip_single_payload( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload("round-trip value") + [claim] = await driver.store(make_store_context(), [payload]) + [retrieved] = await driver.retrieve(StorageDriverRetrieveContext(), [claim]) + assert retrieved == payload + + async def test_roundtrip_multiple_payloads( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payloads = [make_payload(f"value-{i}") for i in range(3)] + claims = await driver.store(make_store_context(), payloads) + retrieved = await driver.retrieve(StorageDriverRetrieveContext(), claims) + assert retrieved == payloads + + async def test_empty_payloads_returns_empty_list( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + assert await driver.store(make_store_context(), []) == [] + assert await driver.retrieve(StorageDriverRetrieveContext(), []) == [] + + async def test_roundtrip_multipart_payload( + self, aioboto3_client: S3Client, driver_client: S3StorageDriverClient + ) -> None: + """Payloads above the 8 MiB multipart threshold are uploaded via multipart + and retrieved correctly. The S3 ETag for multipart objects contains a '-' + suffix (e.g. 'hash-2'), which we assert to confirm multipart was used.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + # Slightly above the default 8 MiB multipart_threshold + large_payload = make_payload("x" * (9 * 1024 * 1024)) + [claim] = await driver.store(make_store_context(), [large_payload]) + [retrieved] = await driver.retrieve(StorageDriverRetrieveContext(), [claim]) + assert retrieved == large_payload + head = await aioboto3_client.head_object( + Bucket=BUCKET, Key=claim.claim_data["key"] + ) + assert "-" in head["ETag"], "Expected a multipart ETag (hash-N format)" + + async def test_content_addressable_deduplication( + self, aioboto3_client: S3Client, driver_client: S3StorageDriverClient + ) -> None: + """Two identical payloads produce the same S3 key; only one object is stored.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload("same-value") + claims = await driver.store(make_store_context(), [payload, payload]) + assert claims[0].claim_data["key"] == claims[1].claim_data["key"] + response = await aioboto3_client.list_objects_v2(Bucket=BUCKET) + assert response["KeyCount"] == 1 + + async def test_skips_upload_when_key_exists( + self, counting_driver_client: CountingDriverClient + ) -> None: + """When a key already exists in S3, put_object is not called again.""" + driver = S3StorageDriver(client=counting_driver_client, bucket=BUCKET) + payload = make_payload("upload-once") + + await driver.store(make_store_context(), [payload]) + assert counting_driver_client.put_object_count == 1 + + await driver.store(make_store_context(), [payload]) + assert counting_driver_client.put_object_count == 1, ( + "put_object should not be called for an existing key" + ) + + async def test_skips_upload_preserves_data( + self, driver_client: S3StorageDriverClient + ) -> None: + """Storing the same payload twice returns correct data on retrieve.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload("preserve-me") + + [claim1] = await driver.store(make_store_context(), [payload]) + [claim2] = await driver.store(make_store_context(), [payload]) + assert claim1 == claim2 + + [retrieved] = await driver.retrieve(StorageDriverRetrieveContext(), [claim2]) + assert retrieved == payload + + async def test_retrieve_validates_hash( + self, driver_client: S3StorageDriverClient + ) -> None: + """Retrieve raises RuntimeError when the hash in the claim doesn't match.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload("check-integrity") + [claim] = await driver.store(make_store_context(), [payload]) + + tampered_claim = StorageDriverClaim( + claim_data={ + **claim.claim_data, + "hash_value": "0" * 64, + }, + ) + with pytest.raises( + ValueError, + match=r"S3StorageDriver integrity check failed \[bucket=.+, key=.+\]: expected sha256:.+, got sha256:.+", + ): + await driver.retrieve(StorageDriverRetrieveContext(), [tampered_claim]) + + async def test_retrieve_rejects_unsupported_hash_algorithm( + self, driver_client: S3StorageDriverClient + ) -> None: + """Retrieve raises ValueError when the claim specifies a non-sha256 algorithm.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload("unsupported-algo") + [claim] = await driver.store(make_store_context(), [payload]) + + bad_claim = StorageDriverClaim( + claim_data={ + **claim.claim_data, + "hash_algorithm": "md5", + }, + ) + with pytest.raises( + ValueError, + match=r"S3StorageDriver unsupported hash algorithm \[bucket=.+, key=.+\]: expected sha256, got md5", + ): + await driver.retrieve(StorageDriverRetrieveContext(), [bad_claim]) + + async def test_retrieve_without_hash_in_claim( + self, driver_client: S3StorageDriverClient + ) -> None: + """Claims missing content hash fields raise ValueError on retrieve.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payload = make_payload("no-hash-claim") + [claim] = await driver.store(make_store_context(), [payload]) + + legacy_claim = StorageDriverClaim( + claim_data={ + "bucket": claim.claim_data["bucket"], + "key": claim.claim_data["key"], + }, + ) + with pytest.raises( + ValueError, + match=r"S3StorageDriver claim is missing required content hash information", + ): + await driver.retrieve(StorageDriverRetrieveContext(), [legacy_claim]) + + +# --------------------------------------------------------------------------- +# TestS3StorageDriverBucketCallable +# --------------------------------------------------------------------------- + + +class TestS3StorageDriverBucketCallable: + async def test_callable_selector_routes_bucket( + self, aioboto3_client: S3Client, driver_client: S3StorageDriverClient + ) -> None: + other_bucket = "other-bucket" + await aioboto3_client.create_bucket(Bucket=other_bucket) + driver = S3StorageDriver( + client=driver_client, + bucket=lambda ctx, p: other_bucket, + ) + [claim] = await driver.store(make_store_context(), [make_payload()]) + assert claim.claim_data["bucket"] == other_bucket + + async def test_selector_called_per_payload( + self, driver_client: S3StorageDriverClient + ) -> None: + call_count = 0 + + def counting_selector(_ctx: StorageDriverStoreContext, _p: Payload) -> str: + nonlocal call_count + call_count += 1 + return BUCKET + + driver = S3StorageDriver(client=driver_client, bucket=counting_selector) + await driver.store( + make_store_context(), [make_payload(f"v{i}") for i in range(3)] + ) + assert call_count == 3 + + async def test_selector_routes_by_activity_type( + self, aioboto3_client: S3Client, driver_client: S3StorageDriverClient + ) -> None: + """bucket callable can route payloads to different buckets by activity type.""" + bucket_a = "bucket-type-a" + bucket_b = "bucket-type-b" + await aioboto3_client.create_bucket(Bucket=bucket_a) + await aioboto3_client.create_bucket(Bucket=bucket_b) + + type_buckets = {"type-a": bucket_a, "type-b": bucket_b} + + def type_selector(ctx: StorageDriverStoreContext, p: Payload) -> str: + del p + act = ( + ctx.target + if isinstance(ctx.target, StorageDriverActivityInfo) + else None + ) + if act and act.type and act.type in type_buckets: + return type_buckets[act.type] + return BUCKET + + driver = S3StorageDriver(client=driver_client, bucket=type_selector) + + ctx_a = make_activity_context( + namespace="ns1", + activity_id="act1", + activity_type="type-a", + ) + [claim_a] = await driver.store(ctx_a, [make_payload("payload-a")]) + assert claim_a.claim_data["bucket"] == bucket_a + + ctx_b = make_activity_context( + namespace="ns1", + activity_id="act2", + activity_type="type-b", + ) + [claim_b] = await driver.store(ctx_b, [make_payload("payload-b")]) + assert claim_b.claim_data["bucket"] == bucket_b + + async def test_selector_receives_context_and_payload( + self, driver_client: S3StorageDriverClient + ) -> None: + received: list[tuple[StorageDriverStoreContext, Payload]] = [] + + def capturing_selector(ctx: StorageDriverStoreContext, p: Payload) -> str: + received.append((ctx, p)) + return BUCKET + + payload = make_payload() + store_ctx = make_workflow_context() + driver = S3StorageDriver(client=driver_client, bucket=capturing_selector) + await driver.store(store_ctx, [payload]) + + assert len(received) == 1 + assert received[0][0] is store_ctx + assert received[0][1] == payload + + +# --------------------------------------------------------------------------- +# TestS3StorageDriverErrors +# --------------------------------------------------------------------------- + + +class TestS3StorageDriverErrors: + async def test_store_access_denied_does_not_upload(self) -> None: + aws_client = MagicMock() + cause = ClientError( + {"Error": {"Code": "403", "Message": "Forbidden"}}, "HeadObject" + ) + aws_client.head_object = AsyncMock(side_effect=cause) + aws_client.upload_fileobj = AsyncMock() + driver = S3StorageDriver(_Aioboto3StorageDriverClient(aws_client), BUCKET) + with pytest.raises(RuntimeError) as error: + await driver.store(make_store_context(), [make_payload()]) + assert error.value.__cause__ is cause + aws_client.upload_fileobj.assert_not_awaited() + + async def test_store_nonexistent_bucket_raises( + self, driver_client: S3StorageDriverClient + ) -> None: + bucket = "does-not-exist" + payload = make_payload() + driver = S3StorageDriver(client=driver_client, bucket=bucket) + expected_hash = hashlib.sha256(payload.SerializeToString()).hexdigest() + expected_key = f"v0/ns/null/d/sha256/{expected_hash}" + with pytest.raises(RuntimeError) as exc_info: + await driver.store(make_store_context(), [payload]) + assert ( + str(exc_info.value) + == f"S3StorageDriver store failed [bucket={bucket}, key={expected_key}, client_region={CLIENT_REGION}]" + ) + assert isinstance(exc_info.value.__cause__, ClientError) + assert ( + exc_info.value.__cause__.response.get("Error", {}).get("Code") + == "NoSuchBucket" + ) + + async def test_retrieve_nonexistent_key_raises( + self, driver_client: S3StorageDriverClient + ) -> None: + key = "/d/sha256/nonexistent" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + claim = StorageDriverClaim(claim_data={"bucket": BUCKET, "key": key}) + with pytest.raises(RuntimeError) as exc_info: + await driver.retrieve(StorageDriverRetrieveContext(), [claim]) + assert ( + str(exc_info.value) + == f"S3StorageDriver retrieve failed [bucket={BUCKET}, key={key}, client_region={CLIENT_REGION}]" + ) + assert isinstance(exc_info.value.__cause__, ClientError) + assert ( + exc_info.value.__cause__.response.get("Error", {}).get("Code") + == "NoSuchKey" + ) + + async def test_retrieve_nonexistent_bucket_raises( + self, driver_client: S3StorageDriverClient + ) -> None: + bucket = "does-not-exist" + key = "/d/sha256/anything" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + claim = StorageDriverClaim(claim_data={"bucket": bucket, "key": key}) + with pytest.raises(RuntimeError) as exc_info: + await driver.retrieve(StorageDriverRetrieveContext(), [claim]) + assert ( + str(exc_info.value) + == f"S3StorageDriver retrieve failed [bucket={bucket}, key={key}, client_region={CLIENT_REGION}]" + ) + assert isinstance(exc_info.value.__cause__, ClientError) + assert ( + exc_info.value.__cause__.response.get("Error", {}).get("Code") + == "NoSuchBucket" + ) + + async def test_bucket_callable_exception_propagates( + self, driver_client: S3StorageDriverClient + ) -> None: + selector = MagicMock(side_effect=RuntimeError("selector failed")) + driver = S3StorageDriver(client=driver_client, bucket=selector) + with pytest.raises(RuntimeError, match="selector failed"): + await driver.store(make_store_context(), [make_payload()]) + + def test_max_payload_size_zero_raises(self) -> None: + with pytest.raises( + ValueError, match="max_payload_size must be greater than zero" + ): + S3StorageDriver( + client=MagicMock(spec=S3StorageDriverClient), + bucket=BUCKET, + max_payload_size=0, + ) + + def test_max_payload_size_negative_raises(self) -> None: + with pytest.raises( + ValueError, match="max_payload_size must be greater than zero" + ): + S3StorageDriver( + client=MagicMock(spec=S3StorageDriverClient), + bucket=BUCKET, + max_payload_size=-1, + ) + + async def test_payload_exceeds_max_size_raises( + self, driver_client: S3StorageDriverClient + ) -> None: + driver = S3StorageDriver( + client=driver_client, bucket=BUCKET, max_payload_size=10 + ) + with pytest.raises( + ValueError, + match=r"Payload size \d+ bytes exceeds the configured max_payload_size of 10 bytes", + ): + await driver.store(make_store_context(), [make_payload("exceeds-limit")]) + + async def test_payload_at_max_size_succeeds( + self, driver_client: S3StorageDriverClient + ) -> None: + payload = make_payload("x") + driver = S3StorageDriver( + client=driver_client, + bucket=BUCKET, + max_payload_size=len(payload.SerializeToString()), + ) + await driver.store(make_store_context(), [payload]) + + +# --------------------------------------------------------------------------- +# TestS3StorageDriverConcurrency +# --------------------------------------------------------------------------- + + +class _AsyncBarrier: + """Minimal asyncio.Barrier equivalent for Python <3.11.""" + + def __init__(self, parties: int) -> None: + self._parties = parties + self._count = 0 + self._event = asyncio.Event() + + async def wait(self) -> None: + self._count += 1 + if self._count >= self._parties: + self._event.set() + else: + await self._event.wait() + + +def _barrier_wrapper( + fn: Callable[..., Coroutine[Any, Any, Any]], barrier: _AsyncBarrier +): + """Wrap an async method to wait at a barrier before proceeding. + + All concurrent callers must reach the barrier before any of them continue. + If the calls are sequential, the barrier will never be satisfied and the + test times out. + """ + + @wraps(fn) + async def wrapper(*args: Any, **kwargs: Any) -> Any: + await asyncio.wait_for(barrier.wait(), timeout=5) + return await fn(*args, **kwargs) + + return wrapper + + +class TestS3StorageDriverConcurrency: + async def test_store_payloads_concurrently( + self, driver_client: S3StorageDriverClient + ) -> None: + """All uploads must be in-flight concurrently. + + A barrier sized to ``num_payloads`` blocks each upload until every + upload has started. If the driver dispatches sequentially the barrier + is never satisfied and the test times out. + """ + num_payloads = 5 + barrier = _AsyncBarrier(num_payloads) + driver_client.put_object = _barrier_wrapper(driver_client.put_object, barrier) # type: ignore[method-assign] + + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payloads = [make_payload(f"concurrent-store-{i}") for i in range(num_payloads)] + + claims = await driver.store(make_store_context(), payloads) + assert len(claims) == num_payloads + + async def test_retrieve_payloads_concurrently( + self, driver_client: S3StorageDriverClient + ) -> None: + """All downloads must be in-flight concurrently.""" + num_payloads = 5 + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payloads = [ + make_payload(f"concurrent-retrieve-{i}") for i in range(num_payloads) + ] + claims = await driver.store(make_store_context(), payloads) + + barrier = _AsyncBarrier(num_payloads) + driver_client.get_object = _barrier_wrapper(driver_client.get_object, barrier) # type: ignore[method-assign] + + retrieved = await driver.retrieve(StorageDriverRetrieveContext(), claims) + assert retrieved == payloads + + async def test_store_cancels_remaining_on_failure( + self, driver_client: S3StorageDriverClient + ) -> None: + """When one upload fails, all other in-flight uploads are cancelled.""" + faulty_client = FailOnceDriverClient( + delegate=driver_client, + fail_on="object_exists", + ) + driver = S3StorageDriver(client=faulty_client, bucket=BUCKET) + payloads = [make_payload(f"cancel-store-{i}") for i in range(3)] + + with pytest.raises( + RuntimeError, + match=r"S3StorageDriver store failed \[bucket=.+, key=.+\]", + ) as exc_info: + await driver.store(make_store_context(), payloads) + + assert isinstance(exc_info.value.__cause__, ConnectionError) + assert str(exc_info.value.__cause__) == "S3 connection lost" + assert len(faulty_client.cancelled) == 2, ( + "Expected 2 remaining tasks to be cancelled" + ) + + async def test_retrieve_cancels_remaining_on_failure( + self, driver_client: S3StorageDriverClient + ) -> None: + """When one download fails, all other in-flight downloads are cancelled.""" + driver = S3StorageDriver(client=driver_client, bucket=BUCKET) + payloads = [make_payload(f"cancel-retrieve-{i}") for i in range(3)] + claims = await driver.store(make_store_context(), payloads) + + faulty_client = FailOnceDriverClient( + delegate=driver_client, + fail_on="get_object", + ) + driver = S3StorageDriver(client=faulty_client, bucket=BUCKET) + + with pytest.raises( + RuntimeError, + match=r"S3StorageDriver retrieve failed \[bucket=.+, key=.+\]", + ) as exc_info: + await driver.retrieve(StorageDriverRetrieveContext(), claims) + + assert isinstance(exc_info.value.__cause__, ConnectionError) + assert str(exc_info.value.__cause__) == "S3 connection lost" + assert len(faulty_client.cancelled) == 2, ( + "Expected 2 remaining tasks to be cancelled" + ) + + +# --------------------------------------------------------------------------- +# TestAioboto3StorageDriverClientDescribe +# --------------------------------------------------------------------------- + + +class TestAioboto3StorageDriverClientDescribe: + def _make_client(self, region: str | None) -> _Aioboto3StorageDriverClient: + mock_s3 = MagicMock() + mock_s3.meta.region_name = region + return _Aioboto3StorageDriverClient(mock_s3) + + def test_returns_region(self) -> None: + client = self._make_client(region="ap-southeast-1") + assert client.describe() == {"client_region": "ap-southeast-1"} + + def test_omits_region_when_none(self) -> None: + client = self._make_client(region=None) + assert client.describe() == {} + + def test_omits_region_when_empty_string(self) -> None: + client = self._make_client(region="") + assert client.describe() == {} + + +# --------------------------------------------------------------------------- +# TestFormatClientContext +# --------------------------------------------------------------------------- + + +class TestFormatClientContext: + def test_formats_entry(self) -> None: + client = MagicMock(spec=S3StorageDriverClient) + client.describe.return_value = {"region": "us-east-1"} + assert _format_client_context(client) == ", region=us-east-1" + + def test_returns_empty_string_for_empty_describe(self) -> None: + client = MagicMock(spec=S3StorageDriverClient) + client.describe.return_value = {} + assert _format_client_context(client) == "" + + def test_returns_empty_string_when_describe_raises(self) -> None: + client = MagicMock(spec=S3StorageDriverClient) + client.describe.side_effect = RuntimeError("oops") + assert _format_client_context(client) == "" diff --git a/tests/contrib/aws/s3driver/test_s3driver_worker.py b/tests/contrib/aws/s3driver/test_s3driver_worker.py new file mode 100644 index 0000000000..e08a099c27 --- /dev/null +++ b/tests/contrib/aws/s3driver/test_s3driver_worker.py @@ -0,0 +1,522 @@ +"""Worker integration tests for S3StorageDriver key structure. + +Runs real Temporal workflows against a real worker (backed by a moto S3 +server) and asserts the S3 object key structure produced for each Temporal +primitive: workflow input/output, activity input/output, signals, queries, +updates, and child workflows. +""" + +from __future__ import annotations + +import dataclasses +import hashlib +import uuid +from collections.abc import AsyncIterator +from datetime import timedelta + +import aioboto3 +import pytest +from types_aiobotocore_s3.client import S3Client + +import temporalio.converter +from temporalio.client import Client, WorkflowFailureError +from temporalio.contrib.aws.s3driver import S3StorageDriver +from temporalio.contrib.aws.s3driver.aioboto3 import new_aioboto3_client +from temporalio.converter import ExternalStorage, JSONPlainPayloadConverter +from temporalio.exceptions import ActivityError, ApplicationError +from temporalio.testing import WorkflowEnvironment +from tests.contrib.aws.s3driver.conftest import BUCKET, CLIENT_REGION +from tests.contrib.aws.s3driver.workflows import ( + LARGE, + ChildWorkflow, + DocumentIngestionWorkflow, + LargeIOWorkflow, + LargeOutputNoRetryWorkflow, + ModelTrainingWorkflow, + OrderFulfillmentWorkflow, + ParentWithChildWorkflow, + PaymentProcessingWorkflow, + SignalQueryUpdateWorkflow, + download_document, + extract_text, + index_document, + large_io_activity, + large_output_activity, +) +from tests.helpers import new_worker + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- + +_THRESHOLD = 256 # bytes — low so all test payloads are offloaded + +# --------------------------------------------------------------------------- +# Fixtures +# --------------------------------------------------------------------------- + + +@pytest.fixture +async def tmprl_client( + env: WorkflowEnvironment, aioboto3_client: S3Client +) -> AsyncIterator[Client]: + """Temporal client wired with ExternalStorage backed by the moto S3 server.""" + driver = S3StorageDriver(client=new_aioboto3_client(aioboto3_client), bucket=BUCKET) + yield await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=_THRESHOLD, + ), + ), + ) + + +# --------------------------------------------------------------------------- +# Helper +# --------------------------------------------------------------------------- + + +async def _list_keys(aioboto3_client: S3Client) -> list[str]: + resp = await aioboto3_client.list_objects_v2(Bucket=BUCKET) + return sorted( + key for obj in resp.get("Contents", []) if (key := obj.get("Key")) is not None + ) + + +# --------------------------------------------------------------------------- +# Tests +# --------------------------------------------------------------------------- + + +async def test_s3_driver_workflow_input_key( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + workflow_id = str(uuid.uuid4()) + async with new_worker( + tmprl_client, LargeIOWorkflow, activities=[large_io_activity] + ) as worker: + await tmprl_client.execute_workflow( + LargeIOWorkflow.run, + LARGE, + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + keys = await _list_keys(aioboto3_client) + + # Client stores workflow input with ri=null (run ID not yet assigned); + # worker stores activity input with ri=run_id — same bytes, two S3 objects. + assert len(keys) == 2 + assert all( + f"/ns/{tmprl_client.namespace}/wt/LargeIOWorkflow/wi/{workflow_id}/ri/" in k + for k in keys + ) + # Client-side store: ri=null because run ID is not yet known. + assert sum(1 for k in keys if "/ri/null/" in k) == 1 + # Worker-side store: ri=run_id, assigned by the server. + assert sum(1 for k in keys if "/ri/null/" not in k) == 1 + + +async def test_s3_driver_workflow_output_key( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + workflow_id = str(uuid.uuid4()) + async with new_worker( + tmprl_client, LargeIOWorkflow, activities=[large_io_activity] + ) as worker: + result = await tmprl_client.execute_workflow( + LargeIOWorkflow.run, + "small", # small input stays inline; workflow returns LARGE + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + assert result == LARGE + keys = await _list_keys(aioboto3_client) + # Activity result and workflow result dedup to same key + assert len(keys) == 1 + assert ( + f"/ns/{tmprl_client.namespace}/wt/LargeIOWorkflow/wi/{workflow_id}/ri/" + in keys[0] + ) + # Run ID is known for both activity completion and workflow completion + assert "/ri/null/" not in keys[0] + + +async def test_s3_driver_workflow_activity_input_key( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + workflow_id = str(uuid.uuid4()) + async with new_worker( + tmprl_client, LargeIOWorkflow, activities=[large_io_activity] + ) as worker: + await tmprl_client.execute_workflow( + LargeIOWorkflow.run, + LARGE, # passed through as the activity's input + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + keys = await _list_keys(aioboto3_client) + # Client start (ri=null) + worker schedules activity (ri=run_id) — same bytes, two objects. + assert len(keys) == 2 + # Both keys are under the workflow wi/ri prefix, not the activity. + assert all( + f"/ns/{tmprl_client.namespace}/wt/LargeIOWorkflow/wi/{workflow_id}/ri/" in k + for k in keys + ) + # Activity input is keyed under the scheduling workflow, not the activity. + assert all("/ai/" not in k for k in keys) + + +async def test_s3_driver_workflow_activity_output_key( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + workflow_id = str(uuid.uuid4()) + async with new_worker( + tmprl_client, LargeIOWorkflow, activities=[large_io_activity] + ) as worker: + await tmprl_client.execute_workflow( + LargeIOWorkflow.run, + "small", # small input; activity returns LARGE + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + keys = await _list_keys(aioboto3_client) + # Activity result and workflow result are both LARGE so they deduplicate to one object. + assert len(keys) == 1 + assert ( + f"/ns/{tmprl_client.namespace}/wt/LargeIOWorkflow/wi/{workflow_id}/ri/" + in keys[0] + ) + # ri=run_id for both stores (run ID is known by the time the activity completes). + assert "/ri/null/" not in keys[0] + + +async def test_s3_driver_standalone_activity_input_key( + env: WorkflowEnvironment, tmprl_client: Client, aioboto3_client: S3Client +) -> None: + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + async with new_worker( + tmprl_client, activities=[large_io_activity], task_queue=task_queue + ): + await tmprl_client.execute_activity( + large_io_activity, + LARGE, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + keys = await _list_keys(aioboto3_client) + # Input and output are the same LARGE bytes but stored under different keys. + assert len(keys) == 2 + # Both keyed under the activity, not a workflow. + assert all( + f"/ns/{tmprl_client.namespace}/at/large_io_activity/ai/{activity_id}/ri/" in k + for k in keys + ) + assert all("/wt/" not in k for k in keys) + # Client-side store does not have run ID information + assert sum(1 for k in keys if "/ri/null/" in k) == 1 + # Worker-side store does have run ID information + assert sum(1 for k in keys if "/ri/null/" not in k) == 1 + + +async def test_s3_driver_standalone_activity_output_key( + env: WorkflowEnvironment, tmprl_client: Client, aioboto3_client: S3Client +) -> None: + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + async with new_worker( + tmprl_client, activities=[large_output_activity], task_queue=task_queue + ): + await tmprl_client.execute_activity( + large_output_activity, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + keys = await _list_keys(aioboto3_client) + # Only the output is large; keyed under the activity. + assert len(keys) == 1 + assert ( + f"/ns/{tmprl_client.namespace}/at/large_output_activity/ai/{activity_id}/ri/" + in keys[0] + ) + assert "/ri/null/" not in keys[0] + assert "/wt/" not in keys[0] + + +async def test_s3_driver_signal_arg_key( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + workflow_id = str(uuid.uuid4()) + async with new_worker(tmprl_client, SignalQueryUpdateWorkflow) as worker: + handle = await tmprl_client.start_workflow( + SignalQueryUpdateWorkflow.run, + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + await handle.signal(SignalQueryUpdateWorkflow.finish, LARGE) + await handle.result() + keys = await _list_keys(aioboto3_client) + # Signal arg + workflow result — two distinct keys (different wt and ri). + assert len(keys) == 2 + # Signal arg: client stores with wt=null (type not known) and ri=null. + assert any(f"/wt/null/wi/{workflow_id}/ri/null/" in k for k in keys) + # Workflow result: worker stores with real type and ri=run_id. + assert any(f"/wt/SignalQueryUpdateWorkflow/wi/{workflow_id}/" in k for k in keys) + + +async def test_s3_driver_query_result_key( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + workflow_id = str(uuid.uuid4()) + async with new_worker(tmprl_client, SignalQueryUpdateWorkflow) as worker: + handle = await tmprl_client.start_workflow( + SignalQueryUpdateWorkflow.run, + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + result = await handle.query(SignalQueryUpdateWorkflow.get_value, LARGE) + assert result == LARGE + await handle.signal(SignalQueryUpdateWorkflow.finish, "done") + await handle.result() + keys = await _list_keys(aioboto3_client) + # Query arg + (query result deduplicated with workflow result) — two distinct keys. + assert len(keys) == 2 + # Query arg: client stores with wt=null (type not known) and ri=null. + assert any(f"/wt/null/wi/{workflow_id}/ri/null/" in k for k in keys) + # Query result and workflow result are both LARGE and deduplicate to one key with ri=run_id. + assert any(f"/wt/SignalQueryUpdateWorkflow/wi/{workflow_id}/" in k for k in keys) + + +async def test_s3_driver_update_result_key( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + workflow_id = str(uuid.uuid4()) + async with new_worker(tmprl_client, SignalQueryUpdateWorkflow) as worker: + handle = await tmprl_client.start_workflow( + SignalQueryUpdateWorkflow.run, + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + result = await handle.execute_update(SignalQueryUpdateWorkflow.do_update, LARGE) + assert result == LARGE + await handle.signal(SignalQueryUpdateWorkflow.finish, "done") + await handle.result() + keys = await _list_keys(aioboto3_client) + # Update arg + (update result deduplicated with workflow result) — two distinct keys. + assert len(keys) == 2 + # Update arg: client stores with wt=null (type not known) and ri=null. + assert any(f"/wt/null/wi/{workflow_id}/ri/null/" in k for k in keys) + # Update result and workflow result are both LARGE and deduplicate to one key with ri=run_id. + assert any(f"/wt/SignalQueryUpdateWorkflow/wi/{workflow_id}/" in k for k in keys) + + +async def test_s3_driver_child_workflow_input_key( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + workflow_id = str(uuid.uuid4()) + async with new_worker( + tmprl_client, ParentWithChildWorkflow, ChildWorkflow + ) as worker: + await tmprl_client.execute_workflow( + ParentWithChildWorkflow.run, + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + keys = await _list_keys(aioboto3_client) + child_workflow_id = f"{workflow_id}-child" + # Child input is the only large payload — stored under the child's wi/ri. + assert len(keys) == 1 + # Keyed under the child: child input is stored in the child's context. + assert ( + f"/ns/{tmprl_client.namespace}/wt/ChildWorkflow/wi/{child_workflow_id}/ri/" + in keys[0] + ) + + +async def test_s3_driver_identified_casing( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + workflow_id = f"MyWorkflow-{uuid.uuid4()}" + async with new_worker( + tmprl_client, LargeIOWorkflow, activities=[large_io_activity] + ) as worker: + await tmprl_client.execute_workflow( + LargeIOWorkflow.run, + LARGE, + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + keys = await _list_keys(aioboto3_client) + # Client start (ri=null) + worker stores (ri=run_id) — two objects. + assert len(keys) == 2 + # Workflow ID is percent-encoded but casing is preserved verbatim. + assert all( + f"/ns/{tmprl_client.namespace}/wt/LargeIOWorkflow/wi/{workflow_id}/ri/" in k + for k in keys + ), "Workflow ID should preserve original case in the key" + + +async def test_s3_driver_content_dedup( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + """Document ingestion produces exactly two distinct S3 keys, even though + the payloads are repeatedly passed to different activities.""" + workflow_id = str(uuid.uuid4()) + async with new_worker( + tmprl_client, + DocumentIngestionWorkflow, + activities=[download_document, extract_text, index_document], + ) as worker: + await tmprl_client.execute_workflow( + DocumentIngestionWorkflow.run, + "doc-001", + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + keys = await _list_keys(aioboto3_client) + # Two distinct content hashes (LARGE from download, LARGE_2 from extract) → two keys. + assert len(keys) == 2 + # Both are under the same workflow wi/ri prefix despite crossing activity boundaries. + assert all( + f"/ns/{tmprl_client.namespace}/wt/DocumentIngestionWorkflow/wi/{workflow_id}/ri/" + in k + for k in keys + ) + # The two keys differ by content hash only. + assert keys[0] != keys[1] + + +async def test_s3_driver_single_workflow_same_key_namespace( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + """A training job started with a large config, injected with large override + parameters mid-run, and polled for large metrics — all produce S3 keys + containing the same workflow ID.""" + workflow_id = str(uuid.uuid4()) + async with new_worker(tmprl_client, ModelTrainingWorkflow) as worker: + handle = await tmprl_client.start_workflow( + ModelTrainingWorkflow.run, + LARGE, # large training config as workflow input + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + metrics = await handle.execute_update( + ModelTrainingWorkflow.get_metrics, "checkpoint-1" + ) + assert metrics is not None + await handle.signal(ModelTrainingWorkflow.apply_overrides, LARGE) + await handle.signal(ModelTrainingWorkflow.complete) + await handle.result() + keys = await _list_keys(aioboto3_client) + # Four distinct keys: client start, signal arg, update result, workflow result. + assert len(keys) == 4 + # All keys are anchored under the same workflow ID regardless of which primitive carried the payload. + assert all(f"/wi/{workflow_id}/" in k for k in keys) + + +async def test_s3_driver_parent_child_independent_key_namespaces( + tmprl_client: Client, aioboto3_client: S3Client +) -> None: + """An order fulfillment workflow spawns a child payment processor and passes + it a large order payload. Child input is keyed under the parent (it lives in + the parent's history); child output is keyed under the parent (for lifecycle + resilience — the child result lives in the parent's completion history).""" + workflow_id = str(uuid.uuid4()) + payment_id = f"{workflow_id}-payment" + async with new_worker( + tmprl_client, OrderFulfillmentWorkflow, PaymentProcessingWorkflow + ) as worker: + await tmprl_client.execute_workflow( + OrderFulfillmentWorkflow.run, + LARGE, # large order details passed to parent and forwarded to child + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + keys = await _list_keys(aioboto3_client) + parent_keys = [k for k in keys if f"/wi/{workflow_id}/" in k] + child_keys = [k for k in keys if f"/wi/{payment_id}/" in k] + # Parent accumulates 3 keys: + # 1. Client start stored in parent's key space (ri=null) + # 2. Child result stored in parent's key space + # 3. Parent's own workflow result + assert len(parent_keys) == 3 + # Child accumulates 1 key: its input from the parent + assert len(child_keys) == 1 + + +async def test_s3_store_failure_surfaces_in_workflow_history( + env: WorkflowEnvironment, moto_server_url: str +) -> None: + """Verifies that an S3 store failure (nonexistent bucket) produces a + RuntimeError with bucket and key context that is visible in Temporal + workflow history via the WorkflowFailureError cause chain.""" + bad_bucket = "nonexistent-bucket" + session = aioboto3.Session() + async with session.client( + "s3", + region_name=CLIENT_REGION, + endpoint_url=moto_server_url, + aws_access_key_id="testing", + aws_secret_access_key="testing", + ) as client: + driver = S3StorageDriver(client=new_aioboto3_client(client), bucket=bad_bucket) + bad_client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=_THRESHOLD, + ), + ), + ) + workflow_id = str(uuid.uuid4()) + async with new_worker( + bad_client, LargeOutputNoRetryWorkflow, activities=[large_output_activity] + ) as worker: + with pytest.raises(WorkflowFailureError) as exc_info: + await bad_client.execute_workflow( + LargeOutputNoRetryWorkflow.run, + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + + large_payload = JSONPlainPayloadConverter().to_payload(LARGE) + assert large_payload is not None + expected_hash = hashlib.sha256(large_payload.SerializeToString()).hexdigest() + + assert isinstance(exc_info.value, WorkflowFailureError) + activity_error = exc_info.value.__cause__ + assert isinstance(activity_error, ActivityError) + app_error = activity_error.__cause__ + assert isinstance(app_error, ApplicationError) + assert app_error.type == "RuntimeError" + # Key includes run_id which is only known at runtime; use substring checks. + msg = app_error.message + assert f"S3StorageDriver store failed [bucket={bad_bucket}, key=" in msg + assert f"/wt/LargeOutputNoRetryWorkflow/wi/{workflow_id}/ri/" in msg + assert f"/d/sha256/{expected_hash}, client_region={CLIENT_REGION}]" in msg diff --git a/tests/contrib/aws/s3driver/workflows.py b/tests/contrib/aws/s3driver/workflows.py new file mode 100644 index 0000000000..4f4b430990 --- /dev/null +++ b/tests/contrib/aws/s3driver/workflows.py @@ -0,0 +1,223 @@ +"""Workflow and activity definitions for test_s3driver.py integration tests. + +Kept in a separate module so the workflow sandbox does not encounter +aioboto3/aiobotocore/botocore/urllib3 imports when preparing workflow classes. +""" + +from __future__ import annotations + +from datetime import timedelta + +from temporalio import activity, workflow +from temporalio.common import RetryPolicy + +LARGE = "x" * 356 # ~358 bytes as a JSON string, above the 256-byte test threshold +LARGE_2 = "y" * 356 # distinct large payload with a different SHA-256 hash + + +@activity.defn +async def large_io_activity(_data: str) -> str: + return LARGE + + +@activity.defn +async def large_output_activity() -> str: + """Returns a large payload with no retries; used to test S3 store failures.""" + return LARGE + + +@workflow.defn +class LargeOutputNoRetryWorkflow: + """Executes a single activity that returns a large payload with no retries. + + Used to verify that S3 store failures surface in workflow history without + retries masking the error. + """ + + @workflow.run + async def run(self) -> str: + return await workflow.execute_activity( + large_output_activity, + schedule_to_close_timeout=timedelta(seconds=10), + retry_policy=RetryPolicy(maximum_attempts=1), + ) + + +@workflow.defn +class LargeIOWorkflow: + """Passes its input to an activity and returns a large output.""" + + @workflow.run + async def run(self, data: str) -> str: + await workflow.execute_activity( + large_io_activity, + data, + schedule_to_close_timeout=timedelta(seconds=10), + ) + return LARGE + + +@activity.defn +async def download_document(document_id: str) -> str: + """Downloads the raw document content from remote storage.""" + del document_id + return LARGE # simulates a large raw document + + +@activity.defn +async def extract_text(raw_content: str) -> str: + """Extracts and normalizes text from the raw document content.""" + del raw_content + return LARGE_2 # simulates extracted text — different content, different hash + + +@activity.defn +async def index_document(text: str) -> str: + """Indexes the extracted text into the search index. Returns the index record ID.""" + del text + return "idx-00001" # small confirmation — not offloaded to external storage + + +@workflow.defn +class DocumentIngestionWorkflow: + """Downloads a document, extracts its text, and indexes it for search. + + Illustrates how large intermediate payloads (raw document content, extracted + text) are transparently offloaded to S3 between activity boundaries without + any special handling in the workflow code. + """ + + @workflow.run + async def run(self, document_id: str) -> str: + raw_content = await workflow.execute_activity( + download_document, + document_id, + schedule_to_close_timeout=timedelta(seconds=10), + ) + extracted_text = await workflow.execute_activity( + extract_text, + raw_content, + schedule_to_close_timeout=timedelta(seconds=10), + ) + return await workflow.execute_activity( + index_document, + extracted_text, + schedule_to_close_timeout=timedelta(seconds=10), + ) + + +@workflow.defn +class ChildWorkflow: + @workflow.run + async def run(self, data: str) -> str: + return f"{len(data)}" + + +@workflow.defn +class ParentWithChildWorkflow: + """Delegates work to a child workflow whose ID is {parent_id}-child.""" + + @workflow.run + async def run(self) -> str: + child_id = f"{workflow.info().workflow_id}-child" + return await workflow.execute_child_workflow( + ChildWorkflow.run, + LARGE, + id=child_id, + execution_timeout=timedelta(seconds=10), + ) + + +@workflow.defn +class PaymentProcessingWorkflow: + """Processes payment for an order and returns a large payment confirmation. + + Intended to be spawned as a child of OrderFulfillmentWorkflow. + """ + + @workflow.run + async def run(self, order_details: str) -> str: + del order_details + return LARGE_2 # payment confirmation + + +@workflow.defn +class OrderFulfillmentWorkflow: + """Coordinates order fulfillment by delegating payment to a child workflow. + + Passes the large order details to a PaymentProcessingWorkflow child whose ID + is {parent_id}-payment, then returns the child's payment confirmation. + """ + + @workflow.run + async def run(self, order_details: str) -> str: + payment_id = f"{workflow.info().workflow_id}-payment" + return await workflow.execute_child_workflow( + PaymentProcessingWorkflow.run, + order_details, + id=payment_id, + execution_timeout=timedelta(seconds=10), + ) + + +@workflow.defn +class ModelTrainingWorkflow: + """Simulates a long-running ML training job. + + Accepts a large training config as input, allows the caller to inject + override parameters mid-run via signal, and exposes intermediate metrics + via an update. Demonstrates that large payloads crossing all three + primitive boundaries (input, signal arg, update result) are stored under + the same workflow ID prefix in S3. + """ + + def __init__(self) -> None: + self._overrides_received = False + self._done = False + + @workflow.run + async def run(self, training_config: str) -> str: + del training_config + await workflow.wait_condition(lambda: self._done) + return LARGE # final training summary + + @workflow.signal + async def apply_overrides(self, override_params: str) -> None: + """Injects updated hyperparameters into the running training job.""" + del override_params + self._overrides_received = True + + @workflow.signal + async def complete(self) -> None: + self._done = True + + @workflow.update + async def get_metrics(self, checkpoint_id: str) -> str: + """Returns the current training metrics snapshot.""" + del checkpoint_id + return LARGE_2 # large metrics payload + + +@workflow.defn +class SignalQueryUpdateWorkflow: + """Long-running workflow that accepts a signal, query, and update.""" + + def __init__(self) -> None: + self._done = False + + @workflow.run + async def run(self) -> str: + await workflow.wait_condition(lambda: self._done) + return LARGE + + @workflow.signal + async def finish(self, _data: str) -> None: + self._done = True + + @workflow.query + def get_value(self, _data: str) -> str: + return LARGE + + @workflow.update + async def do_update(self, _data: str) -> str: + return LARGE diff --git a/tests/contrib/gcp/__init__.py b/tests/contrib/gcp/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/contrib/gcp/cloud_run/__init__.py b/tests/contrib/gcp/cloud_run/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/contrib/gcp/cloud_run/id/__init__.py b/tests/contrib/gcp/cloud_run/id/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/contrib/gcp/cloud_run/id/test_cloud_run_id_plugin.py b/tests/contrib/gcp/cloud_run/id/test_cloud_run_id_plugin.py new file mode 100644 index 0000000000..52055ad588 --- /dev/null +++ b/tests/contrib/gcp/cloud_run/id/test_cloud_run_id_plugin.py @@ -0,0 +1,127 @@ +"""Tests for the Google Cloud Run worker-ID plugin.""" + +from __future__ import annotations + +import os +import socket +from typing import cast +from unittest.mock import Mock + +import pytest + +from temporalio.contrib.gcp.cloud_run.id import ( + CloudRunIdPlugin, + GoogleCloudRunMetadata, +) +from temporalio.service import ConnectConfig, ServiceClient + + +def _metadata( + *, + instance_id: str = "instance-1", + name: str = "my-pool", + revision: str = "rev-1", +) -> GoogleCloudRunMetadata: + return GoogleCloudRunMetadata( + instance_id=instance_id, + name=name, + revision=revision, + ) + + +def _closed_port() -> int: + """Return a port number that nothing is listening on.""" + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.bind(("127.0.0.1", 0)) + port = sock.getsockname()[1] + sock.close() + return port + + +def _service_client() -> ServiceClient: + return cast(ServiceClient, Mock(spec=ServiceClient)) + + +# ---- Client identity ---- + + +class TestClientIdentity: + @pytest.mark.asyncio + async def test_sets_identity_when_unset(self) -> None: + plugin = CloudRunIdPlugin( + metadata=_metadata(instance_id="abc", revision="rev-1") + ) + # ConnectConfig auto-fills identity with @ when none is given. + config = ConnectConfig(target_host="localhost:7233") + assert config.identity == f"{os.getpid()}@{socket.gethostname()}" + service_client = _service_client() + + async def connect(input: ConnectConfig) -> ServiceClient: + assert input.identity == "abc@rev-1" + return service_client + + assert await plugin.connect_service_client(config, connect) is service_client + assert config.identity == "abc@rev-1" + + @pytest.mark.asyncio + async def test_preserves_caller_identity(self) -> None: + plugin = CloudRunIdPlugin( + metadata=_metadata(instance_id="abc", revision="rev-1") + ) + config = ConnectConfig(target_host="localhost:7233", identity="my-identity") + service_client = _service_client() + + async def connect(input: ConnectConfig) -> ServiceClient: + assert input.identity == "my-identity" + return service_client + + assert await plugin.connect_service_client(config, connect) is service_client + assert config.identity == "my-identity" + + +# ---- Metadata fetching / caching ---- + + +class TestMetadataFetch: + def test_construction_does_not_fetch(self) -> None: + # A bad metadata URL must not raise at construction -- the fetch is lazy. + CloudRunIdPlugin( + metadata_url=f"http://127.0.0.1:{_closed_port()}/instance/id", + getenv={}.get, # type: ignore[arg-type] + ) + + @pytest.mark.asyncio + async def test_connect_fails_fast_off_platform(self) -> None: + plugin = CloudRunIdPlugin( + timeout=1.0, + metadata_url=f"http://127.0.0.1:{_closed_port()}/instance/id", + getenv={}.get, # type: ignore[arg-type] + ) + config = ConnectConfig(target_host="localhost:7233") + + async def connect(_input: ConnectConfig) -> ServiceClient: + raise AssertionError("should not connect when metadata is unavailable") + + with pytest.raises(RuntimeError, match="metadata server"): + await plugin.connect_service_client(config, connect) + + @pytest.mark.asyncio + async def test_metadata_fetched_from_server_at_connect( + self, monkeypatch: pytest.MonkeyPatch + ) -> None: + fetch = Mock(return_value=_metadata(instance_id="abc", revision="rev-1")) + monkeypatch.setattr( + "temporalio.contrib.gcp.cloud_run.id._cloud_run_id_plugin.get_google_cloud_run_metadata", + fetch, + ) + plugin = CloudRunIdPlugin() + config = ConnectConfig(target_host="localhost:7233") + + async def connect(_input: ConnectConfig) -> ServiceClient: + return _service_client() + + await plugin.connect_service_client(config, connect) + + # Fetched from the metadata server when the client connects. + fetch.assert_called_once() + assert config.identity == "abc@rev-1" diff --git a/tests/contrib/gcp/cloud_run/id/test_metadata.py b/tests/contrib/gcp/cloud_run/id/test_metadata.py new file mode 100644 index 0000000000..75b11d65b8 --- /dev/null +++ b/tests/contrib/gcp/cloud_run/id/test_metadata.py @@ -0,0 +1,220 @@ +"""Tests for temporalio.contrib.gcp.cloud_run.id.""" + +from __future__ import annotations + +import socket +import threading +from collections.abc import Iterator +from email.message import Message +from http.server import BaseHTTPRequestHandler, HTTPServer +from typing import Any + +import pytest + +from temporalio.contrib.gcp.cloud_run.id import ( + GoogleCloudRunMetadata, + get_google_cloud_run_metadata, +) + + +def _metadata( + *, + instance_id: str = "instance-1", + name: str = "", + revision: str = "", +) -> GoogleCloudRunMetadata: + return GoogleCloudRunMetadata( + instance_id=instance_id, + name=name, + revision=revision, + ) + + +# ---- Local metadata-server fixture ---- + + +class _MetadataServer(HTTPServer): + """In-process stand-in for the Cloud Run metadata server. + + Records the headers and path of the last request and serves a configurable + status and body so tests can assert on both the request and the response. + """ + + url: str = "" + response_status: int = 200 + response_body: str = "instance-1" + received_path: str | None = None + received_headers: Message[str, str] | None = None + + +class _Handler(BaseHTTPRequestHandler): + def do_GET(self) -> None: # noqa: N802 (http.server naming) + server: _MetadataServer = self.server # type: ignore[assignment] + server.received_path = self.path + server.received_headers = self.headers + body = server.response_body.encode("utf-8") + self.send_response(server.response_status) + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def log_message(self, format: str, *args: Any) -> None: # noqa: A002 + # Silence the default stderr request logging. The parameter is named + # ``format`` to match BaseHTTPRequestHandler.log_message. + pass + + +@pytest.fixture +def metadata_server() -> Iterator[_MetadataServer]: + server = _MetadataServer(("127.0.0.1", 0), _Handler) + thread = threading.Thread(target=server.serve_forever, daemon=True) + thread.start() + port = server.server_address[1] + server.url = f"http://127.0.0.1:{port}/computeMetadata/v1/instance/id" + try: + yield server + finally: + server.shutdown() + server.server_close() + thread.join(timeout=5) + + +def _closed_port() -> int: + """Return a port number that nothing is listening on.""" + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.bind(("127.0.0.1", 0)) + port = sock.getsockname()[1] + sock.close() + return port + + +# ---- Environment precedence ---- + + +class TestEnvPrecedence: + def test_worker_pool_wins_over_service( + self, metadata_server: _MetadataServer + ) -> None: + env = {"CLOUD_RUN_WORKER_POOL": "my-pool", "K_SERVICE": "my-service"} + metadata = get_google_cloud_run_metadata( + metadata_url=metadata_server.url, + getenv=env.get, # type: ignore[arg-type] + ) + assert metadata.name == "my-pool" + + def test_service_used_when_pool_absent( + self, metadata_server: _MetadataServer + ) -> None: + env = {"K_SERVICE": "my-service"} + metadata = get_google_cloud_run_metadata( + metadata_url=metadata_server.url, + getenv=env.get, # type: ignore[arg-type] + ) + assert metadata.name == "my-service" + + def test_name_empty_when_neither_set( + self, metadata_server: _MetadataServer + ) -> None: + metadata = get_google_cloud_run_metadata( + metadata_url=metadata_server.url, + getenv={}.get, # type: ignore[arg-type] + ) + assert metadata.name == "" + + def test_cloud_run_revision_wins_over_k_revision( + self, metadata_server: _MetadataServer + ) -> None: + env = {"CLOUD_RUN_REVISION": "rev-cr", "K_REVISION": "rev-k"} + metadata = get_google_cloud_run_metadata( + metadata_url=metadata_server.url, + getenv=env.get, # type: ignore[arg-type] + ) + assert metadata.revision == "rev-cr" + + def test_k_revision_used_when_cloud_run_revision_absent( + self, metadata_server: _MetadataServer + ) -> None: + env = {"K_REVISION": "rev-k"} + metadata = get_google_cloud_run_metadata( + metadata_url=metadata_server.url, + getenv=env.get, # type: ignore[arg-type] + ) + assert metadata.revision == "rev-k" + + def test_revision_empty_when_neither_set( + self, metadata_server: _MetadataServer + ) -> None: + metadata = get_google_cloud_run_metadata( + metadata_url=metadata_server.url, + getenv={}.get, # type: ignore[arg-type] + ) + assert metadata.revision == "" + + +# ---- Worker identity ---- + + +class TestWorkerIdentity: + def test_identity_uses_revision(self) -> None: + metadata = _metadata(instance_id="abc", name="my-pool", revision="rev-1") + assert metadata.identity == "abc@rev-1" + + def test_identity_falls_back_to_name(self) -> None: + metadata = _metadata(instance_id="abc", name="my-pool", revision="") + assert metadata.identity == "abc@my-pool" + + def test_identity_falls_back_to_instance_id(self) -> None: + metadata = _metadata(instance_id="abc", name="", revision="") + assert metadata.identity == "abc" + + +# ---- HTTP fetch ---- + + +class TestHttpFetch: + def test_sends_metadata_flavor_header_and_trims_body( + self, metadata_server: _MetadataServer + ) -> None: + metadata_server.response_body = " instance-xyz\n" + metadata = get_google_cloud_run_metadata( + metadata_url=metadata_server.url, + getenv={}.get, # type: ignore[arg-type] + ) + assert metadata.instance_id == "instance-xyz" + assert metadata_server.received_headers is not None + assert metadata_server.received_headers.get("Metadata-Flavor") == "Google" + assert metadata_server.received_path == "/computeMetadata/v1/instance/id" + + def test_errors_on_non_200(self, metadata_server: _MetadataServer) -> None: + metadata_server.response_status = 500 + metadata_server.response_body = "boom" + with pytest.raises(RuntimeError, match="metadata server"): + get_google_cloud_run_metadata( + metadata_url=metadata_server.url, + getenv={}.get, # type: ignore[arg-type] + ) + + def test_errors_when_unreachable(self) -> None: + url = f"http://127.0.0.1:{_closed_port()}/computeMetadata/v1/instance/id" + with pytest.raises(RuntimeError, match="metadata server"): + get_google_cloud_run_metadata( + metadata_url=url, + timeout=1.0, + getenv={}.get, # type: ignore[arg-type] + ) + + def test_end_to_end_from_env_and_server( + self, metadata_server: _MetadataServer + ) -> None: + metadata_server.response_body = "instance-42" + env = {"CLOUD_RUN_WORKER_POOL": "my-pool", "CLOUD_RUN_REVISION": "rev-7"} + metadata = get_google_cloud_run_metadata( + metadata_url=metadata_server.url, + getenv=env.get, # type: ignore[arg-type] + ) + assert metadata == GoogleCloudRunMetadata( + instance_id="instance-42", + name="my-pool", + revision="rev-7", + ) + assert metadata.identity == "instance-42@rev-7" diff --git a/tests/contrib/gcp/cloud_run/opentelemetry/__init__.py b/tests/contrib/gcp/cloud_run/opentelemetry/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/contrib/gcp/cloud_run/opentelemetry/test_opentelemetry.py b/tests/contrib/gcp/cloud_run/opentelemetry/test_opentelemetry.py new file mode 100644 index 0000000000..245721d24f --- /dev/null +++ b/tests/contrib/gcp/cloud_run/opentelemetry/test_opentelemetry.py @@ -0,0 +1,315 @@ +"""Tests for the Google Cloud Run OpenTelemetry plugin.""" + +from __future__ import annotations + +from datetime import timedelta +from typing import Any, cast +from unittest.mock import Mock, call + +import pytest +from opentelemetry.trace import NoOpTracerProvider, set_tracer_provider + +from temporalio.client import ClientConfig +from temporalio.contrib.gcp.cloud_run.opentelemetry import ( + CLOUD_RUN_SERVICE_ENV_VAR, + CLOUD_RUN_WORKER_POOL_ENV_VAR, + DEFAULT_METRIC_PERIODICITY, + DEFAULT_OTLP_ENDPOINT, + DEFAULT_SERVICE_NAME, + OTEL_EXPORTER_OTLP_ENDPOINT_ENV_VAR, + OTEL_SERVICE_NAME_ENV_VAR, + OpenTelemetryPlugin, + build_metrics_telemetry_config, +) +from temporalio.contrib.opentelemetry import ( + OpenTelemetryInterceptor, + create_tracer_provider, +) +from temporalio.contrib.opentelemetry._tracer_provider import ( + ReplaySafeTracerProvider, +) +from temporalio.runtime import OpenTelemetryConfig, Runtime +from temporalio.service import ConnectConfig, ServiceClient +from temporalio.worker import Worker + + +@pytest.fixture(autouse=True) +def _reset_global_provider( # pyright: ignore[reportUnusedFunction] + reset_otel_tracer_provider: None, # pyright: ignore[reportUnusedParameter] +) -> None: + pass + + +@pytest.fixture +def tracer_provider() -> ReplaySafeTracerProvider: + return create_tracer_provider(shutdown_on_exit=False) + + +def _application_owned_plugin( + tracer_provider: ReplaySafeTracerProvider, + **kwargs: Any, +) -> OpenTelemetryPlugin: + return OpenTelemetryPlugin( + tracer_provider=tracer_provider, + runtime=cast(Runtime, Mock(spec=Runtime)), + **kwargs, + ) + + +def _clear_environment(monkeypatch: pytest.MonkeyPatch) -> None: + for name in ( + OTEL_EXPORTER_OTLP_ENDPOINT_ENV_VAR, + OTEL_SERVICE_NAME_ENV_VAR, + CLOUD_RUN_WORKER_POOL_ENV_VAR, + CLOUD_RUN_SERVICE_ENV_VAR, + ): + monkeypatch.delenv(name, raising=False) + + +def test_defaults_and_plugin_integration( + tracer_provider: ReplaySafeTracerProvider, monkeypatch: pytest.MonkeyPatch +) -> None: + _clear_environment(monkeypatch) + + plugin = _application_owned_plugin(tracer_provider) + + assert plugin.endpoint == DEFAULT_OTLP_ENDPOINT + assert plugin.service_name == DEFAULT_SERVICE_NAME + assert plugin.tracer_provider is tracer_provider + assert plugin.name() == "OpenTelemetryPlugin" + + config = plugin.configure_client( + cast(ClientConfig, cast(object, {"interceptors": []})) + ) + assert len(config["interceptors"]) == 1 + assert isinstance(config["interceptors"][0], OpenTelemetryInterceptor) + + +def test_resolution_precedence( + tracer_provider: ReplaySafeTracerProvider, monkeypatch: pytest.MonkeyPatch +) -> None: + _clear_environment(monkeypatch) + monkeypatch.setenv(CLOUD_RUN_SERVICE_ENV_VAR, "cloud-run-service") + plugin = _application_owned_plugin(tracer_provider) + assert plugin.service_name == "cloud-run-service" + + monkeypatch.setenv(CLOUD_RUN_WORKER_POOL_ENV_VAR, "worker-pool") + plugin = _application_owned_plugin(tracer_provider) + assert plugin.service_name == "worker-pool" + + monkeypatch.setenv(OTEL_SERVICE_NAME_ENV_VAR, "otel-service") + monkeypatch.setenv(OTEL_EXPORTER_OTLP_ENDPOINT_ENV_VAR, "http://collector:4317") + plugin = _application_owned_plugin(tracer_provider) + assert plugin.service_name == "otel-service" + assert plugin.endpoint == "http://collector:4317" + + plugin = _application_owned_plugin( + tracer_provider, + endpoint="https://explicit-collector:4317", + service_name="explicit-service", + ) + assert plugin.service_name == "explicit-service" + assert plugin.endpoint == "https://explicit-collector:4317" + + +def test_ignores_empty_environment_values( + tracer_provider: ReplaySafeTracerProvider, monkeypatch: pytest.MonkeyPatch +) -> None: + # Empty environment values are falsy and are skipped, falling through to + # the next source in the chain. Whitespace is not stripped, so only truly + # empty values are ignored (matching the shared serverless behavior). + monkeypatch.setenv(OTEL_SERVICE_NAME_ENV_VAR, "") + monkeypatch.setenv(CLOUD_RUN_WORKER_POOL_ENV_VAR, "") + monkeypatch.setenv(CLOUD_RUN_SERVICE_ENV_VAR, "cloud-run-service") + + plugin = _application_owned_plugin(tracer_provider) + + assert plugin.service_name == "cloud-run-service" + + +def test_build_metrics_telemetry_config(monkeypatch: pytest.MonkeyPatch) -> None: + _clear_environment(monkeypatch) + monkeypatch.setenv(CLOUD_RUN_WORKER_POOL_ENV_VAR, "worker-pool") + config = build_metrics_telemetry_config( + endpoint="http://collector:4317", + metric_periodicity=timedelta(seconds=30), + ) + + assert isinstance(config.metrics, OpenTelemetryConfig) + assert config.metrics.url == "http://collector:4317" + assert config.metrics.metric_periodicity == timedelta(seconds=30) + assert config.global_tags == {"service_name": "worker-pool"} + + +def test_default_metric_periodicity_is_sixty_seconds( + monkeypatch: pytest.MonkeyPatch, +) -> None: + _clear_environment(monkeypatch) + + config = build_metrics_telemetry_config() + + assert DEFAULT_METRIC_PERIODICITY == timedelta(seconds=60) + assert isinstance(config.metrics, OpenTelemetryConfig) + assert config.metrics.metric_periodicity == timedelta(seconds=60) + + +@pytest.mark.asyncio +async def test_connect_service_client_installs_runtime( + tracer_provider: ReplaySafeTracerProvider, +) -> None: + runtime = cast(Runtime, Mock(spec=Runtime)) + plugin = OpenTelemetryPlugin( + tracer_provider=tracer_provider, + runtime=runtime, + ) + config = ConnectConfig(target_host="localhost:7233") + service_client = cast(ServiceClient, Mock(spec=ServiceClient)) + + async def connect(input: ConnectConfig) -> ServiceClient: + assert input.runtime is runtime + return service_client + + assert await plugin.connect_service_client(config, connect) is service_client + + conflicting_config = ConnectConfig( + target_host="localhost:7233", + runtime=cast(Runtime, Mock(spec=Runtime)), + ) + with pytest.raises(ValueError, match="runtime conflicts"): + await plugin.connect_service_client(conflicting_config, connect) + + +def test_force_flush_and_application_owned_shutdown( + tracer_provider: ReplaySafeTracerProvider, monkeypatch: pytest.MonkeyPatch +) -> None: + force_flush = Mock(return_value=True) + shutdown = Mock() + monkeypatch.setattr(tracer_provider, "force_flush", force_flush) + monkeypatch.setattr(tracer_provider, "shutdown", shutdown) + plugin = _application_owned_plugin(tracer_provider) + + assert plugin.force_flush(timedelta(seconds=2)) + assert plugin.shutdown(timedelta(seconds=3)) + assert plugin.shutdown(timedelta(seconds=4)) + + assert force_flush.call_args_list == [call(2000), call(3000)] + shutdown.assert_not_called() + + +def test_plugin_owned_provider_is_shut_down( + tracer_provider: ReplaySafeTracerProvider, monkeypatch: pytest.MonkeyPatch +) -> None: + force_flush = Mock(return_value=True) + shutdown = Mock() + monkeypatch.setattr(tracer_provider, "force_flush", force_flush) + monkeypatch.setattr(tracer_provider, "shutdown", shutdown) + monkeypatch.setattr( + "temporalio.contrib.gcp.cloud_run.opentelemetry._opentelemetry._create_tracer_provider", + lambda endpoint, service_name: tracer_provider, + ) + runtime = cast(Runtime, Mock(spec=Runtime)) + runtime_factory = Mock(return_value=runtime) + monkeypatch.setattr( + "temporalio.contrib.gcp.cloud_run.opentelemetry._opentelemetry.Runtime", + runtime_factory, + ) + + plugin = OpenTelemetryPlugin() + + assert plugin.runtime is runtime + telemetry = runtime_factory.call_args.kwargs["telemetry"] + assert isinstance(telemetry.metrics, OpenTelemetryConfig) + assert telemetry.metrics.url == DEFAULT_OTLP_ENDPOINT + assert telemetry.metrics.metric_periodicity == DEFAULT_METRIC_PERIODICITY + assert telemetry.global_tags == {"service_name": DEFAULT_SERVICE_NAME} + assert plugin.shutdown(timedelta(seconds=2)) + force_flush.assert_called_once_with(2000) + shutdown.assert_called_once_with() + + +def test_plugin_owned_provider_is_cleaned_up_on_runtime_failure( + tracer_provider: ReplaySafeTracerProvider, monkeypatch: pytest.MonkeyPatch +) -> None: + shutdown = Mock() + monkeypatch.setattr(tracer_provider, "shutdown", shutdown) + monkeypatch.setattr( + "temporalio.contrib.gcp.cloud_run.opentelemetry._opentelemetry._create_tracer_provider", + lambda endpoint, service_name: tracer_provider, + ) + monkeypatch.setattr( + "temporalio.contrib.gcp.cloud_run.opentelemetry._opentelemetry.Runtime", + Mock(side_effect=RuntimeError("runtime failed")), + ) + + with pytest.raises(RuntimeError, match="runtime failed"): + OpenTelemetryPlugin() + + shutdown.assert_called_once_with() + + +def test_rejects_conflicting_global_tracer_provider( + tracer_provider: ReplaySafeTracerProvider, monkeypatch: pytest.MonkeyPatch +) -> None: + existing_provider = create_tracer_provider(shutdown_on_exit=False) + set_tracer_provider(existing_provider) + shutdown = Mock() + monkeypatch.setattr(tracer_provider, "shutdown", shutdown) + monkeypatch.setattr( + "temporalio.contrib.gcp.cloud_run.opentelemetry._opentelemetry._create_tracer_provider", + lambda endpoint, service_name: tracer_provider, + ) + + with pytest.raises(RuntimeError, match="already configured"): + OpenTelemetryPlugin(runtime=cast(Runtime, Mock(spec=Runtime))) + + shutdown.assert_called_once_with() + + +@pytest.mark.asyncio +@pytest.mark.parametrize("flush_on_worker_stop", [False, True]) +async def test_worker_stop_flush_is_opt_in( + tracer_provider: ReplaySafeTracerProvider, + monkeypatch: pytest.MonkeyPatch, + flush_on_worker_stop: bool, +) -> None: + calls: list[str] = [] + + def record_flush(_timeout_millis: int) -> bool: + calls.append("flush") + return True + + force_flush = Mock(side_effect=record_flush) + monkeypatch.setattr(tracer_provider, "force_flush", force_flush) + plugin = _application_owned_plugin( + tracer_provider, + flush_on_worker_stop=flush_on_worker_stop, + flush_timeout=timedelta(seconds=2), + ) + + async def run(_worker: Worker) -> None: + calls.append("run") + + await plugin.run_worker(cast(Worker, Mock(spec=Worker)), run) + + assert calls == (["run", "flush"] if flush_on_worker_stop else ["run"]) + + +def test_validates_options(tracer_provider: ReplaySafeTracerProvider) -> None: + with pytest.raises(ValueError, match="flush_timeout must be positive"): + _application_owned_plugin(tracer_provider, flush_timeout=timedelta(seconds=-1)) + with pytest.raises(ValueError, match="metric_periodicity cannot be set"): + _application_owned_plugin( + tracer_provider, metric_periodicity=timedelta(seconds=1) + ) + with pytest.raises(ValueError, match="metric_periodicity must be positive"): + build_metrics_telemetry_config(metric_periodicity=timedelta(0)) + + plugin = _application_owned_plugin(tracer_provider) + with pytest.raises(ValueError, match="timeout must be positive"): + plugin.force_flush(timedelta(0)) + + with pytest.raises(TypeError, match="create_tracer_provider"): + OpenTelemetryPlugin( + tracer_provider=NoOpTracerProvider(), + runtime=cast(Runtime, Mock(spec=Runtime)), + ) diff --git a/tests/contrib/gcp/gcsdriver/__init__.py b/tests/contrib/gcp/gcsdriver/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/contrib/gcp/gcsdriver/conftest.py b/tests/contrib/gcp/gcsdriver/conftest.py new file mode 100644 index 0000000000..04378cf421 --- /dev/null +++ b/tests/contrib/gcp/gcsdriver/conftest.py @@ -0,0 +1,153 @@ +"""Fixtures for GCS tests against a pytest-managed local emulator.""" + +from __future__ import annotations + +import hashlib +import io +import platform +import shutil +import socket +import subprocess +import tarfile +import tempfile +import time +import urllib.error +import urllib.request +import uuid +from collections.abc import AsyncIterator, Iterator +from pathlib import Path + +import aiohttp +import pytest +from gcloud.aio.storage import Storage + +_EMULATOR_VERSION = "1.56.1" +_EMULATOR_CHECKSUMS = { + "Darwin_amd64": "bbcbb78e57c4a7ad242bc971b70a57f963c8daa616ae649254562fbd7f2bc54d", + "Darwin_arm64": "039d7a520869115b9bc1b354f73612d2dad0aa27b22104f111d8c94985007fe1", + "Linux_amd64": "0f2f9f6884417acd5cc27126a9aa237ccc627372a4aa5008b399641de6db9469", + "Linux_arm64": "89a4b887a50834ce5844f47f9938a1203a89330e660b2af7851b858fa489fa96", + "Windows_amd64": "79c1a92b6d666c6fc2a60439f8ebee9e01b918dad90cae6f003ade4a5877a566", +} + + +def _emulator_binary(config: pytest.Config) -> Path: + installed_binary = shutil.which("fake-gcs-server") + if installed_binary: + return Path(installed_binary).resolve(strict=True) + machine = platform.machine().lower() + arch = {"x86_64": "amd64", "aarch64": "arm64"}.get(machine, machine) + target = f"{platform.system()}_{arch}" + if target not in _EMULATOR_CHECKSUMS: + pytest.fail(f"No fake GCS binary for {target}; install fake-gcs-server on PATH") + assert config.cache is not None + cache = config.cache.mkdir("fake-gcs-server") / _EMULATOR_VERSION / target + cache.mkdir(parents=True, exist_ok=True) + filename = ( + "fake-gcs-server.exe" if platform.system() == "Windows" else "fake-gcs-server" + ) + binary = cache / filename + if binary.is_file(): + return binary + url = ( + "https://github.com/fsouza/fake-gcs-server/releases/download/" + f"v{_EMULATOR_VERSION}/fake-gcs-server_{_EMULATOR_VERSION}_{target}.tar.gz" + ) + with urllib.request.urlopen(url, timeout=30) as response: + data = response.read() + if hashlib.sha256(data).hexdigest() != _EMULATOR_CHECKSUMS[target]: + pytest.fail(f"Checksum mismatch for {url}") + with tempfile.TemporaryDirectory(dir=cache) as staging: + staged_binary = Path(staging) / filename + with tarfile.open(fileobj=io.BytesIO(data)) as archive: + with staged_binary.open("wb") as dest: + source = archive.extractfile(filename) + assert source is not None + with source: + shutil.copyfileobj(source, dest) + staged_binary.chmod(0o755) + try: + # Workers may finish downloading together; Windows refuses replacement. + staged_binary.rename(binary) + except FileExistsError: + pass + return binary + + +@pytest.fixture(scope="session") +def gcs_server_url( + pytestconfig: pytest.Config, tmp_path_factory: pytest.TempPathFactory +) -> Iterator[str]: + binary = _emulator_binary(pytestconfig) + with socket.socket() as sock: + sock.bind(("127.0.0.1", 0)) + port = sock.getsockname()[1] + endpoint = f"http://127.0.0.1:{port}" + log_path = tmp_path_factory.mktemp("fake-gcs-server") / "server.log" + with log_path.open("w") as log: + process = subprocess.Popen( + [ + str(binary), + "-scheme", + "http", + "-host", + "127.0.0.1", + "-port", + str(port), + "-backend", + "memory", + "-external-url", + endpoint, + ], + stdout=log, + stderr=subprocess.STDOUT, + ) + try: + deadline = time.monotonic() + 15 + while process.poll() is None and time.monotonic() < deadline: + try: + with urllib.request.urlopen( + f"{endpoint}/storage/v1/b?project=temporal-test", timeout=1 + ): + pass + except urllib.error.URLError: + time.sleep(0.05) + else: + yield endpoint + return + pytest.fail(f"Fake GCS server failed to start:\n{log_path.read_text()}") + finally: + if process.poll() is None: + process.terminate() + try: + process.wait(timeout=5) + except subprocess.TimeoutExpired: + process.kill() + process.wait(timeout=5) + + +@pytest.fixture +def gcs_bucket() -> str: + return f"temporal-test-{uuid.uuid4()}" + + +@pytest.fixture +async def gcs_storage(gcs_server_url: str, gcs_bucket: str) -> AsyncIterator[Storage]: + async with aiohttp.ClientSession() as session: + async with session.post( + f"{gcs_server_url}/storage/v1/b", + params={"project": "temporal-test"}, + json={"name": gcs_bucket}, + ) as response: + response.raise_for_status() + async with Storage(api_root=gcs_server_url) as storage: + try: + yield storage + finally: + objects = await storage.list_objects(gcs_bucket) + for item in objects.get("items", []): + await storage.delete(gcs_bucket, item["name"]) + async with session.delete( + f"{gcs_server_url}/storage/v1/b/{gcs_bucket}" + ) as response: + response.raise_for_status() diff --git a/tests/contrib/gcp/gcsdriver/test_gcsdriver.py b/tests/contrib/gcp/gcsdriver/test_gcsdriver.py new file mode 100644 index 0000000000..a8b2bea3ec --- /dev/null +++ b/tests/contrib/gcp/gcsdriver/test_gcsdriver.py @@ -0,0 +1,514 @@ +"""Tests for the GCS storage driver and its async client adapter.""" + +from __future__ import annotations + +import asyncio +import hashlib +from unittest.mock import AsyncMock, MagicMock + +import pytest +from aiohttp import ClientResponseError +from gcloud.aio.storage import Storage + +from temporalio.api.common.v1 import Payload +from temporalio.contrib.gcp.gcsdriver import GCSStorageDriver, GCSStorageDriverClient +from temporalio.contrib.gcp.gcsdriver.gcloud_aio import new_gcloud_aio_client +from temporalio.converter import ( + ExternalStorage, + StorageDriverActivityInfo, + StorageDriverClaim, + StorageDriverRetrieveContext, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, +) + + +class MemoryClient(GCSStorageDriverClient): + def __init__(self) -> None: + self.objects: dict[tuple[str, str], bytes] = {} + self.uploads = 0 + + async def object_exists(self, *, bucket: str, object_name: str) -> bool: + return (bucket, object_name) in self.objects + + async def put_object(self, *, bucket: str, object_name: str, data: bytes) -> None: + self.uploads += 1 + self.objects.setdefault((bucket, object_name), data) + + async def get_object(self, *, bucket: str, object_name: str) -> bytes: + return self.objects[bucket, object_name] + + +@pytest.fixture +def client() -> MemoryClient: + return MemoryClient() + + +def payload(value: bytes = b"hello") -> Payload: + return Payload( + metadata={"encoding": b"binary/plain", "custom": b"\x00\xff"}, data=value + ) + + +def test_configuration(client: MemoryClient) -> None: + driver = GCSStorageDriver(client, "bucket") + assert driver.name() == driver.type() == "gcp.gcsdriver" + assert GCSStorageDriver(client, "bucket", driver_name="archive").name() == "archive" + for limit in (0, -1): + with pytest.raises(ValueError, match="max_payload_size"): + GCSStorageDriver(client, "bucket", max_payload_size=limit) + + +@pytest.mark.parametrize( + "target,prefix", + [ + (None, "v0/ns/null"), + ( + StorageDriverWorkflowInfo(namespace=""), + "v0/ns/null/wt/null/wi/null/ri/null", + ), + ( + StorageDriverActivityInfo(namespace=""), + "v0/ns/null/at/null/ai/null/ri/null", + ), + ( + StorageDriverWorkflowInfo( + namespace="ns", type="Workflow", id="wf", run_id="run" + ), + "v0/ns/ns/wt/Workflow/wi/wf/ri/run", + ), + ( + StorageDriverActivityInfo(namespace="ns", type="Activity", id="act"), + "v0/ns/ns/at/Activity/ai/act/ri/null", + ), + ( + StorageDriverWorkflowInfo(namespace="ns"), + "v0/ns/ns/wt/null/wi/null/ri/null", + ), + ( + StorageDriverWorkflowInfo(namespace="ns /%", id="日本語 😀", type="A+B=C"), + "v0/ns/ns %2F%25/wt/A+B=C/wi/日本語 😀/ri/null", + ), + ], +) +async def test_object_names( + client: MemoryClient, + target: StorageDriverWorkflowInfo | StorageDriverActivityInfo | None, + prefix: str, +) -> None: + original = payload() + [claim] = await GCSStorageDriver(client, "bucket").store( + StorageDriverStoreContext(target=target), [original] + ) + digest = hashlib.sha256(original.SerializeToString()).hexdigest() + assert claim.claim_data == { + "bucket": "bucket", + "object_name": f"{prefix}/d/sha256/{digest}", + "hash_algorithm": "sha256", + "hash_value": digest, + } + + +@pytest.mark.parametrize( + "target,namespace,prefix", + [ + (None, "ambient /%", "v0/ns/ambient %2F%25"), + (None, None, "v0/ns/null"), + (None, "", "v0/ns/null"), + (StorageDriverWorkflowInfo(namespace="target"), "ambient", "v0/ns/target/wt"), + (StorageDriverActivityInfo(namespace="target"), "ambient", "v0/ns/target/at"), + (StorageDriverWorkflowInfo(namespace=""), "ambient", "v0/ns/null/wt"), + ], +) +async def test_object_names_ambient_namespace( + client: MemoryClient, + target: StorageDriverWorkflowInfo | StorageDriverActivityInfo | None, + namespace: str | None, + prefix: str, +) -> None: + original = payload() + [claim] = await GCSStorageDriver(client, "bucket").store( + StorageDriverStoreContext(target=target, namespace=namespace), [original] + ) + digest = hashlib.sha256(original.SerializeToString()).hexdigest() + object_name = claim.claim_data["object_name"] + assert object_name.startswith(f"{prefix}/") + assert object_name.endswith(f"/d/sha256/{digest}") + if target is None: + assert object_name == f"{prefix}/d/sha256/{digest}" + + +async def test_long_object_name_without_target_uses_ambient_namespace( + client: MemoryClient, +) -> None: + original = payload() + digest = hashlib.sha256(original.SerializeToString()).hexdigest() + namespace = "日" * 400 + [claim] = await GCSStorageDriver(client, "bucket").store( + StorageDriverStoreContext(namespace=namespace), [original] + ) + assert claim.claim_data["object_name"] == f"v0/ns/{namespace}/d/sha256/{digest}" + + +@pytest.mark.parametrize( + "value,encoded", + [ + ("hello-world_v2.0", "hello-world_v2.0"), + ("日本語 café 😀", "日本語 café 😀"), + ("a+b=c@d!$&'();,", "a+b=c@d!$&'();,"), + ('#[]*?:"<>|/%', "%23%5B%5D%2A%3F%3A%22%3C%3E%7C%2F%25"), + ("\x00\n\r\x1f\x7f\x80\x9f", "%00%0A%0D%1F%7F%C2%80%C2%9F"), + (".", "%2E"), + ("..", "%2E%2E"), + ("...", "..."), + ("a.b", "a.b"), + ("a/b", "a%2Fb"), + ("a%2Fb", "a%252Fb"), + ], +) +async def test_object_name_encoding( + client: MemoryClient, value: str, encoded: str +) -> None: + [claim] = await GCSStorageDriver(client, "bucket").store( + StorageDriverStoreContext( + target=StorageDriverWorkflowInfo( + namespace=value, type=value, id=value, run_id=value + ) + ), + [payload()], + ) + assert claim.claim_data["object_name"].startswith( + f"v0/ns/{encoded}/wt/{encoded}/wi/{encoded}/ri/{encoded}/d/sha256/" + ) + + +async def test_round_trip_and_deduplication(client: MemoryClient) -> None: + driver = GCSStorageDriver(client, "bucket") + originals = [payload(), payload(b"world")] + claims = await driver.store(StorageDriverStoreContext(), originals) + assert await driver.store(StorageDriverStoreContext(), originals) == claims + assert client.uploads == 2 + assert ( + await GCSStorageDriver(client, "new-bucket").retrieve( + StorageDriverRetrieveContext(), claims + ) + == originals + ) + assert await driver.store(StorageDriverStoreContext(), []) == [] + assert await driver.retrieve(StorageDriverRetrieveContext(), []) == [] + + +async def test_retrieve_canonical_claim(client: MemoryClient) -> None: + original = payload() + data = original.SerializeToString() + client.objects["source-bucket", "existing/object"] = data + claim = StorageDriverClaim( + { + "bucket": "source-bucket", + "object_name": "existing/object", + "hash_algorithm": "sha256", + "hash_value": hashlib.sha256(data).hexdigest(), + } + ) + assert await GCSStorageDriver(client, "destination-bucket").retrieve( + StorageDriverRetrieveContext(), [claim] + ) == [original] + + +async def test_callable_bucket(client: MemoryClient) -> None: + context = StorageDriverStoreContext( + target=StorageDriverWorkflowInfo(namespace="ns") + ) + + def choose_bucket(ctx: StorageDriverStoreContext, value: Payload) -> str: + assert ctx is context + return value.data.decode() + + claims = await GCSStorageDriver(client, choose_bucket).store( + context, [payload(b"first"), payload(b"second")] + ) + assert [c.claim_data["bucket"] for c in claims] == ["first", "second"] + + +async def test_size_includes_metadata(client: MemoryClient) -> None: + original = payload() + driver = GCSStorageDriver(client, "bucket", max_payload_size=original.ByteSize()) + await driver.store(StorageDriverStoreContext(), [original]) + original.metadata["extra"] = b"too large" + with pytest.raises(ValueError, match="max_payload_size"): + await driver.store(StorageDriverStoreContext(), [original]) + assert client.uploads == 1 + + +@pytest.mark.parametrize( + "target_type", [StorageDriverWorkflowInfo, StorageDriverActivityInfo] +) +@pytest.mark.parametrize("size", [1023, 1024, 1025]) +@pytest.mark.parametrize("char", ["x", "日"]) +async def test_object_name_limit( + client: MemoryClient, + target_type: type[StorageDriverWorkflowInfo] | type[StorageDriverActivityInfo], + size: int, + char: str, +) -> None: + original = payload() + digest = hashlib.sha256(original.SerializeToString()).hexdigest() + identity = ( + "wt/Type/wi" if target_type is StorageDriverWorkflowInfo else "at/Type/ai" + ) + prefix = f"v0/ns/ns/{identity}/" + suffix = f"/ri/run/d/sha256/{digest}" + remaining = size - len(prefix) - len(suffix) + count, padding = divmod(remaining, len(char.encode("utf-8"))) + target_id = char * count + "x" * padding + context = StorageDriverStoreContext( + target=target_type(namespace="ns", type="Type", id=target_id, run_id="run") + ) + driver = GCSStorageDriver(client, "bucket") + [claim] = await driver.store(context, [original]) + assert claim.claim_data["object_name"] == ( + f"v0/ns/ns/d/sha256/{digest}" if size > 1024 else f"{prefix}{target_id}{suffix}" + ) + assert await driver.retrieve(StorageDriverRetrieveContext(), [claim]) == [original] + + +async def test_long_object_names_preserve_namespace(client: MemoryClient) -> None: + driver = GCSStorageDriver(client, "bucket") + claims = [] + for namespace in ("first", "second", ""): + [claim] = await driver.store( + StorageDriverStoreContext( + target=StorageDriverWorkflowInfo(namespace=namespace, id="日" * 400) + ), + [payload()], + ) + assert claim.claim_data["object_name"].startswith( + f"v0/ns/{namespace or 'null'}/d/sha256/" + ) + claims.append(claim) + assert len(client.objects) == 3 + assert ( + await driver.retrieve(StorageDriverRetrieveContext(), claims) == [payload()] * 3 + ) + + +@pytest.mark.parametrize( + "field,value", + [("hash_algorithm", "md5"), ("hash_value", ""), ("hash_algorithm", "")], +) +async def test_invalid_hash_claim(client: MemoryClient, field: str, value: str) -> None: + driver = GCSStorageDriver(client, "bucket") + [claim] = await driver.store(StorageDriverStoreContext(), [payload()]) + data = dict(claim.claim_data) + data[field] = value + with pytest.raises(ValueError, match="hash"): + await driver.retrieve( + StorageDriverRetrieveContext(), [StorageDriverClaim(data)] + ) + + +async def test_corruption(client: MemoryClient) -> None: + driver = GCSStorageDriver(client, "bucket") + [claim] = await driver.store(StorageDriverStoreContext(), [payload()]) + client.objects["bucket", claim.claim_data["object_name"]] = b"corrupted" + with pytest.raises(ValueError, match="integrity check failed"): + await driver.retrieve(StorageDriverRetrieveContext(), [claim]) + + +async def test_external_storage_reference_and_threshold(client: MemoryClient) -> None: + driver = GCSStorageDriver(client, "bucket") + storage = ExternalStorage(drivers=[driver], payload_size_threshold=100) + original = payload(b"large" * 100) + assert await storage._store_payload(payload()) == payload() + reference = await storage._store_payload(original) + assert reference.metadata["encoding"] == b"json/protobuf" + assert ( + reference.metadata["messageType"] + == b"temporal.api.sdk.v1.ExternalStorageReference" + ) + assert reference.external_payloads[0].size_bytes == original.ByteSize() + assert await storage._retrieve_payload(reference) == original + + +@pytest.mark.parametrize("operation", ["object_exists", "put_object", "get_object"]) +async def test_provider_error_context(operation: str) -> None: + client = AsyncMock(spec=GCSStorageDriverClient) + client.object_exists.return_value = False + cause = ConnectionError("connection lost") + getattr(client, operation).side_effect = cause + driver = GCSStorageDriver(client, "bucket") + with pytest.raises(RuntimeError, match="bucket=bucket, object_name=") as error: + if operation == "get_object": + await driver.retrieve( + StorageDriverRetrieveContext(), + [ + StorageDriverClaim( + {"bucket": "bucket", "object_name": "object_name"} + ) + ], + ) + else: + await driver.store(StorageDriverStoreContext(), [payload()]) + assert error.value.__cause__ is cause + + +@pytest.mark.parametrize("retrieving", [False, True]) +@pytest.mark.parametrize("cancel_parent", [False, True]) +async def test_batch_cancellation(retrieving: bool, cancel_parent: bool) -> None: + client = AsyncMock(spec=GCSStorageDriverClient) + client.object_exists.return_value = False + both_started = asyncio.Event() + release = asyncio.Event() + started = 0 + cancelled = 0 + + async def transfer(**_kwargs: object) -> None: + nonlocal started, cancelled + started += 1 + index = started + if started == 2: + both_started.set() + try: + await release.wait() + if index == 1: + raise ConnectionError("failed") + await asyncio.Event().wait() + except asyncio.CancelledError: + cancelled += 1 + raise + + client.get_object.side_effect = transfer + client.put_object.side_effect = transfer + driver = GCSStorageDriver(client, "bucket") + task: asyncio.Task[list[Payload]] | asyncio.Task[list[StorageDriverClaim]] + if retrieving: + claim = StorageDriverClaim({"bucket": "bucket", "object_name": "object_name"}) + task = asyncio.create_task( + driver.retrieve(StorageDriverRetrieveContext(), [claim, claim]) + ) + else: + task = asyncio.create_task( + driver.store(StorageDriverStoreContext(), [payload(), payload(b"other")]) + ) + await both_started.wait() + if cancel_parent: + task.cancel() + with pytest.raises(asyncio.CancelledError): + await task + assert cancelled == 2 + else: + release.set() + with pytest.raises(RuntimeError): + await task + assert cancelled == 1 + + +@pytest.mark.parametrize("retrieving", [False, True]) +async def test_concurrent_transfers_preserve_order(retrieving: bool) -> None: + client = AsyncMock(spec=GCSStorageDriverClient) + client.object_exists.return_value = False + originals = [payload(str(i).encode()) for i in range(3)] + futures: list[asyncio.Future[bytes]] = [ + asyncio.get_running_loop().create_future() for _ in originals + ] + started = 0 + all_started = asyncio.Event() + + async def transfer(**_kwargs: object) -> bytes: + nonlocal started + future = futures[started] + started += 1 + if started == len(originals): + all_started.set() + return await future + + client.get_object.side_effect = transfer + client.put_object.side_effect = transfer + driver = GCSStorageDriver(client, "bucket") + claims = [ + StorageDriverClaim( + { + "bucket": "bucket", + "object_name": str(i), + "hash_algorithm": "sha256", + "hash_value": hashlib.sha256(p.SerializeToString()).hexdigest(), + } + ) + for i, p in enumerate(originals) + ] + task: asyncio.Task[list[Payload]] | asyncio.Task[list[StorageDriverClaim]] + if retrieving: + task = asyncio.create_task( + driver.retrieve(StorageDriverRetrieveContext(), claims) + ) + else: + task = asyncio.create_task(driver.store(StorageDriverStoreContext(), originals)) + await all_started.wait() + for i in reversed(range(len(originals))): + futures[i].set_result(originals[i].SerializeToString()) + await asyncio.sleep(0) + if retrieving: + assert await task == originals + else: + for actual, expected in zip(await task, claims, strict=True): + assert isinstance(actual, StorageDriverClaim) + assert actual.claim_data["hash_value"] == expected.claim_data["hash_value"] + + +def response_error(status: int) -> ClientResponseError: + return ClientResponseError(MagicMock(), (), status=status) + + +@pytest.mark.parametrize("status", [None, 404, 403, 500]) +async def test_adapter_object_exists(status: int | None) -> None: + storage = AsyncMock(spec=Storage) + if status: + storage.download_metadata.side_effect = response_error(status) + client = new_gcloud_aio_client(storage) + if status in (403, 500): + with pytest.raises(ClientResponseError): + await client.object_exists(bucket="bucket", object_name="object_name") + else: + assert await client.object_exists( + bucket="bucket", object_name="object_name" + ) is (status is None) + storage.download_metadata.assert_awaited_once_with("bucket", "object_name") + + +@pytest.mark.parametrize("status", [None, 412, 403, 404, 500]) +async def test_adapter_conditional_upload(status: int | None) -> None: + storage = AsyncMock(spec=Storage) + if status: + storage.upload.side_effect = response_error(status) + storage.download_metadata.return_value = {"name": "object_name"} + client = new_gcloud_aio_client(storage) + if status in (403, 404, 500): + with pytest.raises(ClientResponseError): + await client.put_object( + bucket="bucket", object_name="object_name", data=b"data" + ) + else: + await client.put_object( + bucket="bucket", object_name="object_name", data=b"data" + ) + storage.upload.assert_awaited_once_with( + "bucket", + "object_name", + b"data", + content_type="application/octet-stream", + parameters={"ifGenerationMatch": "0"}, + force_resumable_upload=False, + ) + storage.download_metadata.assert_not_awaited() + + +async def test_adapter_download() -> None: + storage = AsyncMock(spec=Storage) + storage.download.return_value = b"\x00\xff" + assert ( + await new_gcloud_aio_client(storage).get_object( + bucket="bucket", object_name="object_name" + ) + == b"\x00\xff" + ) + storage.download.assert_awaited_once_with("bucket", "object_name") diff --git a/tests/contrib/gcp/gcsdriver/test_gcsdriver_integration.py b/tests/contrib/gcp/gcsdriver/test_gcsdriver_integration.py new file mode 100644 index 0000000000..30e01d4720 --- /dev/null +++ b/tests/contrib/gcp/gcsdriver/test_gcsdriver_integration.py @@ -0,0 +1,179 @@ +"""Driver and worker integration tests using a local GCS emulator.""" + +import asyncio +import dataclasses +import hashlib +import uuid +from datetime import timedelta + +import pytest +from aiohttp import ClientResponseError +from gcloud.aio.storage import Storage + +from temporalio.api.common.v1 import Payload +from temporalio.contrib.gcp.gcsdriver import GCSStorageDriver +from temporalio.contrib.gcp.gcsdriver.gcloud_aio import new_gcloud_aio_client +from temporalio.converter import ( + DataConverter, + ExternalStorage, + StorageDriverClaim, + StorageDriverRetrieveContext, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, +) +from temporalio.testing import WorkflowEnvironment +from tests.contrib.gcp.gcsdriver.workflows import EchoWorkflow, echo_activity +from tests.helpers import new_worker + + +async def test_gcs_adapter_object_operations( + gcs_storage: Storage, gcs_bucket: str +) -> None: + client = new_gcloud_aio_client(gcs_storage) + name = "日本語 café 😀 /%+=" + assert not await client.object_exists(bucket=gcs_bucket, object_name=name) + with pytest.raises(ClientResponseError) as error: + await client.get_object(bucket=gcs_bucket, object_name=name) + assert error.value.status == 404 + await client.put_object(bucket=gcs_bucket, object_name=name, data=b"\x00\xff") + assert await client.object_exists(bucket=gcs_bucket, object_name=name) + assert await client.get_object(bucket=gcs_bucket, object_name=name) == b"\x00\xff" + + +@pytest.mark.parametrize("operation", ["object_exists", "put_object", "get_object"]) +async def test_gcs_adapter_missing_bucket( + gcs_storage: Storage, gcs_bucket: str, operation: str +) -> None: + client = new_gcloud_aio_client(gcs_storage) + missing_bucket = f"{gcs_bucket}-missing" + if operation == "object_exists": + assert not await client.object_exists( + bucket=missing_bucket, object_name="object" + ) + else: + with pytest.raises(ClientResponseError) as error: + if operation == "put_object": + await client.put_object( + bucket=missing_bucket, object_name="object", data=b"data" + ) + else: + await client.get_object(bucket=missing_bucket, object_name="object") + assert error.value.status == 404 + + +async def test_gcs_adapter_concurrent_creation( + gcs_storage: Storage, gcs_bucket: str +) -> None: + client = new_gcloud_aio_client(gcs_storage) + name = "concurrent-object" + candidates = [f"writer-{i}".encode() for i in range(5)] + await asyncio.gather( + *( + client.put_object(bucket=gcs_bucket, object_name=name, data=data) + for data in candidates + ) + ) + stored = await client.get_object(bucket=gcs_bucket, object_name=name) + assert stored in candidates + before = await gcs_storage.download_metadata(gcs_bucket, name) + await client.put_object(bucket=gcs_bucket, object_name=name, data=b"replacement") + after = await gcs_storage.download_metadata(gcs_bucket, name) + assert after["generation"] == before["generation"] + assert await client.get_object(bucket=gcs_bucket, object_name=name) == stored + + +async def test_gcs_retrieve_canonical_claim( + gcs_storage: Storage, gcs_bucket: str +) -> None: + original = Payload(metadata={"encoding": b"binary/plain"}, data=b"external-writer") + data = original.SerializeToString() + name = "existing/日本語 object" + await gcs_storage.upload(gcs_bucket, name, data, force_resumable_upload=False) + claim = StorageDriverClaim( + { + "bucket": gcs_bucket, + "object_name": name, + "hash_algorithm": "sha256", + "hash_value": hashlib.sha256(data).hexdigest(), + } + ) + driver = GCSStorageDriver(new_gcloud_aio_client(gcs_storage), "unused-bucket") + assert await driver.retrieve(StorageDriverRetrieveContext(), [claim]) == [original] + + +async def test_gcs_long_object_name_round_trip( + gcs_storage: Storage, gcs_bucket: str +) -> None: + driver = GCSStorageDriver(new_gcloud_aio_client(gcs_storage), gcs_bucket) + original = Payload(data=b"long-identity") + [claim] = await driver.store( + StorageDriverStoreContext( + target=StorageDriverWorkflowInfo(namespace="ns /%", id="日" * 400) + ), + [original], + ) + assert claim.claim_data["object_name"].startswith("v0/ns/ns %2F%25/d/sha256/") + assert await driver.retrieve(StorageDriverRetrieveContext(), [claim]) == [original] + + +@pytest.mark.parametrize("size", [0, 6 * 1024 * 1024]) +async def test_gcs_emulator_round_trip( + gcs_storage: Storage, gcs_bucket: str, size: int +) -> None: + client = new_gcloud_aio_client(gcs_storage) + driver = GCSStorageDriver(client, gcs_bucket) + original = Payload( + metadata={"encoding": b"binary/plain", "custom": b"\x00\xff"}, data=b"x" * size + ) + context = StorageDriverStoreContext( + target=StorageDriverWorkflowInfo( + namespace="ns", id="日本語 /%+", type="Workflow" + ) + ) + claims = await driver.store(context, [original]) + assert await driver.store(context, [original]) == claims + assert await driver.retrieve(StorageDriverRetrieveContext(), claims) == [original] + object_name = claims[0].claim_data["object_name"] + replacement = b"must not overwrite" + original.data + await asyncio.gather( + client.put_object(bucket=gcs_bucket, object_name=object_name, data=replacement), + client.put_object(bucket=gcs_bucket, object_name=object_name, data=replacement), + ) + assert ( + await client.get_object(bucket=gcs_bucket, object_name=object_name) + == original.SerializeToString() + ) + + +async def test_gcs_workflow_round_trip( + gcs_storage: Storage, gcs_bucket: str, env: WorkflowEnvironment +) -> None: + driver = GCSStorageDriver(new_gcloud_aio_client(gcs_storage), gcs_bucket) + client = await env.connect_client( + data_converter=dataclasses.replace( + DataConverter.default, + external_storage=ExternalStorage( + drivers=[driver], payload_size_threshold=256 + ), + ) + ) + value = "large workflow input 日本語" * 100 + workflow_id = str(uuid.uuid4()) + async with new_worker(client, EchoWorkflow, activities=[echo_activity]) as worker: + assert ( + await client.execute_workflow( + EchoWorkflow.run, + value, + id=workflow_id, + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=30), + ) + == value + ) + objects = await gcs_storage.list_objects(gcs_bucket) + keys = [item["name"] for item in objects["items"]] + assert len(keys) == 2 + assert all( + f"/wt/EchoWorkflow/wi/{workflow_id}/ri/" in object_name for object_name in keys + ) + assert sum("/ri/null/" in object_name for object_name in keys) == 1 diff --git a/tests/contrib/gcp/gcsdriver/workflows.py b/tests/contrib/gcp/gcsdriver/workflows.py new file mode 100644 index 0000000000..7db8ef2afc --- /dev/null +++ b/tests/contrib/gcp/gcsdriver/workflows.py @@ -0,0 +1,20 @@ +"""Workflow definitions kept separate from optional GCS client imports.""" + +from datetime import timedelta + +import temporalio.activity +import temporalio.workflow + + +@temporalio.activity.defn +async def echo_activity(value: str) -> str: + return value + + +@temporalio.workflow.defn +class EchoWorkflow: + @temporalio.workflow.run + async def run(self, value: str) -> str: + return await temporalio.workflow.execute_activity( + echo_activity, value, start_to_close_timeout=timedelta(seconds=10) + ) diff --git a/tests/contrib/openai_agents/histories/agents-as-tools-workflow-history.json b/tests/contrib/openai_agents/histories/agents-as-tools-workflow-history.json deleted file mode 100644 index 21090cbddd..0000000000 --- a/tests/contrib/openai_agents/histories/agents-as-tools-workflow-history.json +++ /dev/null @@ -1,651 +0,0 @@ -{ - "events": [ - { - "eventId": "1", - "eventTime": "2025-06-30T16:04:02.623610Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", - "taskId": "1056429", - "workflowExecutionStartedEventAttributes": { - "workflowType": { - "name": "AgentsAsToolsWorkflow" - }, - "taskQueue": { - "name": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlRyYW5zbGF0ZSB0byBTcGFuaXNoOiAnSSBhbSBmdWxsJyI=" - } - ] - }, - "workflowExecutionTimeout": "30s", - "workflowRunTimeout": "30s", - "workflowTaskTimeout": "10s", - "originalExecutionRunId": "0197c194-c7bf-794e-a2e3-1486d80ca4bb", - "identity": "16872@Tims-MacBook-Pro.local", - "firstExecutionRunId": "0197c194-c7bf-794e-a2e3-1486d80ca4bb", - "attempt": 1, - "workflowExecutionExpirationTime": "2025-06-30T16:04:32.623Z", - "firstWorkflowTaskBackoff": "0s", - "workflowId": "agents-as-tools-workflow-5595c716-c9ec-4aa9-8cec-c1b995bdca50" - } - }, - { - "eventId": "2", - "eventTime": "2025-06-30T16:04:02.623655Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056430", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "3", - "eventTime": "2025-06-30T16:04:02.625165Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056436", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "2", - "identity": "16872@Tims-MacBook-Pro.local", - "requestId": "57afdb83-3d04-4219-93d5-1390ccbc78e9", - "historySizeBytes": "438", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "4", - "eventTime": "2025-06-30T16:04:02.666927Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056440", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "2", - "startedEventId": "3", - "identity": "16872@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": { - "coreUsedFlags": [ - 3, - 2, - 1 - ], - "sdkName": "temporal-python", - "sdkVersion": "1.13.0" - }, - "meteringMetadata": {} - } - }, - { - "eventId": "5", - "eventTime": "2025-06-30T16:04:02.666956Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056441", - "activityTaskScheduledEventAttributes": { - "activityId": "1", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJPcmNoZXN0cmF0b3IgZXZhbHVhdG9yIiwic3BhbklkIjoic3Bhbl85N2RkOTkxZDczZDQ0MTY3ODliODMxODAiLCJ0cmFjZUlkIjoidHJhY2VfN2ZjMzk4YmZiZGYzNDhmMDg0YTYzZDRkNjI0OGUwNDUifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHRyYW5zbGF0aW9uIGFnZW50LiBZb3UgdXNlIHRoZSB0b29scyBnaXZlbiB0byB5b3UgdG8gdHJhbnNsYXRlLklmIGFza2VkIGZvciBtdWx0aXBsZSB0cmFuc2xhdGlvbnMsIHlvdSBjYWxsIHRoZSByZWxldmFudCB0b29scyBpbiBvcmRlci5Zb3UgbmV2ZXIgdHJhbnNsYXRlIG9uIHlvdXIgb3duLCB5b3UgYWx3YXlzIHVzZSB0aGUgcHJvdmlkZWQgdG9vbHMuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJUcmFuc2xhdGUgdG8gU3BhbmlzaDogJ0kgYW0gZnVsbCciLCJyb2xlIjoidXNlciJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOm51bGwsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbeyJuYW1lIjoidHJhbnNsYXRlX3RvX3NwYW5pc2giLCJkZXNjcmlwdGlvbiI6IlRyYW5zbGF0ZSB0aGUgdXNlcidzIG1lc3NhZ2UgdG8gU3BhbmlzaCIsInBhcmFtc19qc29uX3NjaGVtYSI6eyJwcm9wZXJ0aWVzIjp7ImlucHV0Ijp7InRpdGxlIjoiSW5wdXQiLCJ0eXBlIjoic3RyaW5nIn19LCJyZXF1aXJlZCI6WyJpbnB1dCJdLCJ0aXRsZSI6InRyYW5zbGF0ZV90b19zcGFuaXNoX2FyZ3MiLCJ0eXBlIjoib2JqZWN0IiwiYWRkaXRpb25hbFByb3BlcnRpZXMiOmZhbHNlfSwic3RyaWN0X2pzb25fc2NoZW1hIjp0cnVlfSx7Im5hbWUiOiJ0cmFuc2xhdGVfdG9fZnJlbmNoIiwiZGVzY3JpcHRpb24iOiJUcmFuc2xhdGUgdGhlIHVzZXIncyBtZXNzYWdlIHRvIEZyZW5jaCIsInBhcmFtc19qc29uX3NjaGVtYSI6eyJwcm9wZXJ0aWVzIjp7ImlucHV0Ijp7InRpdGxlIjoiSW5wdXQiLCJ0eXBlIjoic3RyaW5nIn19LCJyZXF1aXJlZCI6WyJpbnB1dCJdLCJ0aXRsZSI6InRyYW5zbGF0ZV90b19mcmVuY2hfYXJncyIsInR5cGUiOiJvYmplY3QiLCJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2V9LCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9LHsibmFtZSI6InRyYW5zbGF0ZV90b19pdGFsaWFuIiwiZGVzY3JpcHRpb24iOiJUcmFuc2xhdGUgdGhlIHVzZXIncyBtZXNzYWdlIHRvIEl0YWxpYW4iLCJwYXJhbXNfanNvbl9zY2hlbWEiOnsicHJvcGVydGllcyI6eyJpbnB1dCI6eyJ0aXRsZSI6IklucHV0IiwidHlwZSI6InN0cmluZyJ9fSwicmVxdWlyZWQiOlsiaW5wdXQiXSwidGl0bGUiOiJ0cmFuc2xhdGVfdG9faXRhbGlhbl9hcmdzIiwidHlwZSI6Im9iamVjdCIsImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjpmYWxzZX0sInN0cmljdF9qc29uX3NjaGVtYSI6dHJ1ZX1dLCJvdXRwdXRfc2NoZW1hIjpudWxsLCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "4", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlRyYW5zbGF0ZSB0byBTcGFuaXNoOiAnSSBhbSBmdWxsJyI=" - } - } - }, - { - "eventId": "6", - "eventTime": "2025-06-30T16:04:02.667697Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056447", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "5", - "identity": "16872@Tims-MacBook-Pro.local", - "requestId": "a4e24baa-fc8b-4b3d-90bf-55a08e7d3680", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "7", - "eventTime": "2025-06-30T16:04:02.686423Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056448", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImFyZ3VtZW50cyI6IntcImlucHV0XCI6XCJJIGFtIGZ1bGxcIn0iLCJjYWxsX2lkIjoiY2FsbCIsIm5hbWUiOiJ0cmFuc2xhdGVfdG9fc3BhbmlzaCIsInR5cGUiOiJmdW5jdGlvbl9jYWxsIiwiaWQiOiJpZCIsInN0YXR1cyI6ImNvbXBsZXRlZCJ9XSwidXNhZ2UiOnsicmVxdWVzdHMiOjAsImlucHV0X3Rva2VucyI6MCwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjAsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjowfSwicmVzcG9uc2VfaWQiOm51bGx9" - } - ] - }, - "scheduledEventId": "5", - "startedEventId": "6", - "identity": "16872@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "8", - "eventTime": "2025-06-30T16:04:02.686427Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056449", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16872@Tims-MacBook-Pro.local-547b7584bee9475f87bc46161a6291a5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "9", - "eventTime": "2025-06-30T16:04:02.687098Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056453", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "8", - "identity": "16872@Tims-MacBook-Pro.local", - "requestId": "3709df1d-7d2a-4929-af1c-1ab8d2074b00", - "historySizeBytes": "3467", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "10", - "eventTime": "2025-06-30T16:04:02.718095Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056457", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "8", - "startedEventId": "9", - "identity": "16872@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "11", - "eventTime": "2025-06-30T16:04:02.718115Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056458", - "activityTaskScheduledEventAttributes": { - "activityId": "2", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJPcmNoZXN0cmF0b3IgZXZhbHVhdG9yIiwic3BhbklkIjoic3Bhbl81ZTUwYjU3ODU2ZWI0NWY4Yjk4MDI4N2QiLCJ0cmFjZUlkIjoidHJhY2VfN2ZjMzk4YmZiZGYzNDhmMDg0YTYzZDRkNjI0OGUwNDUifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IHRyYW5zbGF0ZSB0aGUgdXNlcidzIG1lc3NhZ2UgdG8gU3BhbmlzaCIsImlucHV0IjpbeyJjb250ZW50IjoiSSBhbSBmdWxsIiwicm9sZSI6InVzZXIifV0sIm1vZGVsX3NldHRpbmdzIjp7InRlbXBlcmF0dXJlIjpudWxsLCJ0b3BfcCI6bnVsbCwiZnJlcXVlbmN5X3BlbmFsdHkiOm51bGwsInByZXNlbmNlX3BlbmFsdHkiOm51bGwsInRvb2xfY2hvaWNlIjpudWxsLCJwYXJhbGxlbF90b29sX2NhbGxzIjpudWxsLCJ0cnVuY2F0aW9uIjpudWxsLCJtYXhfdG9rZW5zIjpudWxsLCJyZWFzb25pbmciOm51bGwsIm1ldGFkYXRhIjpudWxsLCJzdG9yZSI6bnVsbCwiaW5jbHVkZV91c2FnZSI6bnVsbCwiZXh0cmFfcXVlcnkiOm51bGwsImV4dHJhX2JvZHkiOm51bGwsImV4dHJhX2hlYWRlcnMiOm51bGwsImV4dHJhX2FyZ3MiOm51bGx9LCJ0b29scyI6W10sIm91dHB1dF9zY2hlbWEiOm51bGwsImhhbmRvZmZzIjpbXSwidHJhY2luZyI6MSwicHJldmlvdXNfcmVzcG9uc2VfaWQiOm51bGwsInByb21wdCI6bnVsbH0=" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IkkgYW0gZnVsbCI=" - } - } - }, - { - "eventId": "12", - "eventTime": "2025-06-30T16:04:02.718843Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056463", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "11", - "identity": "16872@Tims-MacBook-Pro.local", - "requestId": "988daf7d-b4fa-44cb-868f-e2f5e7663f37", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "13", - "eventTime": "2025-06-30T16:04:02.732675Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056464", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoiIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiRXN0b3kgbGxlbm8uIiwidHlwZSI6Im91dHB1dF90ZXh0In1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjowLCJpbnB1dF90b2tlbnMiOjAsImlucHV0X3Rva2Vuc19kZXRhaWxzIjp7ImNhY2hlZF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjowLCJvdXRwdXRfdG9rZW5zX2RldGFpbHMiOnsicmVhc29uaW5nX3Rva2VucyI6MH0sInRvdGFsX3Rva2VucyI6MH0sInJlc3BvbnNlX2lkIjpudWxsfQ==" - } - ] - }, - "scheduledEventId": "11", - "startedEventId": "12", - "identity": "16872@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "14", - "eventTime": "2025-06-30T16:04:02.732678Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056465", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16872@Tims-MacBook-Pro.local-547b7584bee9475f87bc46161a6291a5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "15", - "eventTime": "2025-06-30T16:04:02.733464Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056469", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "14", - "identity": "16872@Tims-MacBook-Pro.local", - "requestId": "26e50494-c82f-4c88-a9a1-aa77bddcb994", - "historySizeBytes": "5361", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "16", - "eventTime": "2025-06-30T16:04:02.738255Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056473", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "14", - "startedEventId": "15", - "identity": "16872@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "17", - "eventTime": "2025-06-30T16:04:02.738276Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056474", - "activityTaskScheduledEventAttributes": { - "activityId": "3", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJPcmNoZXN0cmF0b3IgZXZhbHVhdG9yIiwic3BhbklkIjoic3Bhbl9mYWFjMGZkM2Y2ZTE0OTEwOWNkNTBiMjMiLCJ0cmFjZUlkIjoidHJhY2VfN2ZjMzk4YmZiZGYzNDhmMDg0YTYzZDRkNjI0OGUwNDUifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHRyYW5zbGF0aW9uIGFnZW50LiBZb3UgdXNlIHRoZSB0b29scyBnaXZlbiB0byB5b3UgdG8gdHJhbnNsYXRlLklmIGFza2VkIGZvciBtdWx0aXBsZSB0cmFuc2xhdGlvbnMsIHlvdSBjYWxsIHRoZSByZWxldmFudCB0b29scyBpbiBvcmRlci5Zb3UgbmV2ZXIgdHJhbnNsYXRlIG9uIHlvdXIgb3duLCB5b3UgYWx3YXlzIHVzZSB0aGUgcHJvdmlkZWQgdG9vbHMuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJUcmFuc2xhdGUgdG8gU3BhbmlzaDogJ0kgYW0gZnVsbCciLCJyb2xlIjoidXNlciJ9LHsiYXJndW1lbnRzIjoie1wiaW5wdXRcIjpcIkkgYW0gZnVsbFwifSIsImNhbGxfaWQiOiJjYWxsIiwibmFtZSI6InRyYW5zbGF0ZV90b19zcGFuaXNoIiwidHlwZSI6ImZ1bmN0aW9uX2NhbGwiLCJpZCI6ImlkIiwic3RhdHVzIjoiY29tcGxldGVkIn0seyJjYWxsX2lkIjoiY2FsbCIsIm91dHB1dCI6IkVzdG95IGxsZW5vLiIsInR5cGUiOiJmdW5jdGlvbl9jYWxsX291dHB1dCJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOm51bGwsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbeyJuYW1lIjoidHJhbnNsYXRlX3RvX3NwYW5pc2giLCJkZXNjcmlwdGlvbiI6IlRyYW5zbGF0ZSB0aGUgdXNlcidzIG1lc3NhZ2UgdG8gU3BhbmlzaCIsInBhcmFtc19qc29uX3NjaGVtYSI6eyJwcm9wZXJ0aWVzIjp7ImlucHV0Ijp7InRpdGxlIjoiSW5wdXQiLCJ0eXBlIjoic3RyaW5nIn19LCJyZXF1aXJlZCI6WyJpbnB1dCJdLCJ0aXRsZSI6InRyYW5zbGF0ZV90b19zcGFuaXNoX2FyZ3MiLCJ0eXBlIjoib2JqZWN0IiwiYWRkaXRpb25hbFByb3BlcnRpZXMiOmZhbHNlfSwic3RyaWN0X2pzb25fc2NoZW1hIjp0cnVlfSx7Im5hbWUiOiJ0cmFuc2xhdGVfdG9fZnJlbmNoIiwiZGVzY3JpcHRpb24iOiJUcmFuc2xhdGUgdGhlIHVzZXIncyBtZXNzYWdlIHRvIEZyZW5jaCIsInBhcmFtc19qc29uX3NjaGVtYSI6eyJwcm9wZXJ0aWVzIjp7ImlucHV0Ijp7InRpdGxlIjoiSW5wdXQiLCJ0eXBlIjoic3RyaW5nIn19LCJyZXF1aXJlZCI6WyJpbnB1dCJdLCJ0aXRsZSI6InRyYW5zbGF0ZV90b19mcmVuY2hfYXJncyIsInR5cGUiOiJvYmplY3QiLCJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2V9LCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9LHsibmFtZSI6InRyYW5zbGF0ZV90b19pdGFsaWFuIiwiZGVzY3JpcHRpb24iOiJUcmFuc2xhdGUgdGhlIHVzZXIncyBtZXNzYWdlIHRvIEl0YWxpYW4iLCJwYXJhbXNfanNvbl9zY2hlbWEiOnsicHJvcGVydGllcyI6eyJpbnB1dCI6eyJ0aXRsZSI6IklucHV0IiwidHlwZSI6InN0cmluZyJ9fSwicmVxdWlyZWQiOlsiaW5wdXQiXSwidGl0bGUiOiJ0cmFuc2xhdGVfdG9faXRhbGlhbl9hcmdzIiwidHlwZSI6Im9iamVjdCIsImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjpmYWxzZX0sInN0cmljdF9qc29uX3NjaGVtYSI6dHJ1ZX1dLCJvdXRwdXRfc2NoZW1hIjpudWxsLCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "16", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - } - }, - { - "eventId": "18", - "eventTime": "2025-06-30T16:04:02.739011Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056479", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "17", - "identity": "16872@Tims-MacBook-Pro.local", - "requestId": "dd454850-7b41-4ea2-aa03-88eb1995aa5a", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "19", - "eventTime": "2025-06-30T16:04:02.743068Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056480", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoiIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiVGhlIHRyYW5zbGF0aW9uIHRvIFNwYW5pc2ggaXM6IFwiRXN0b3kgbGxlbm8uXCIiLCJ0eXBlIjoib3V0cHV0X3RleHQifV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9XSwidXNhZ2UiOnsicmVxdWVzdHMiOjAsImlucHV0X3Rva2VucyI6MCwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjAsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjowfSwicmVzcG9uc2VfaWQiOm51bGx9" - } - ] - }, - "scheduledEventId": "17", - "startedEventId": "18", - "identity": "16872@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "20", - "eventTime": "2025-06-30T16:04:02.743071Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056481", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16872@Tims-MacBook-Pro.local-547b7584bee9475f87bc46161a6291a5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "21", - "eventTime": "2025-06-30T16:04:02.743631Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056485", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "20", - "identity": "16872@Tims-MacBook-Pro.local", - "requestId": "3d42b98e-c61a-463b-ad9c-4ae65de03d86", - "historySizeBytes": "8542", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "22", - "eventTime": "2025-06-30T16:04:02.748200Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056489", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "20", - "startedEventId": "21", - "identity": "16872@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "23", - "eventTime": "2025-06-30T16:04:02.748225Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056490", - "activityTaskScheduledEventAttributes": { - "activityId": "4", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJPcmNoZXN0cmF0b3IgZXZhbHVhdG9yIiwic3BhbklkIjoic3Bhbl85MDVlNTdkZGNjYTU0NDhmYTFkYTE1NzkiLCJ0cmFjZUlkIjoidHJhY2VfN2ZjMzk4YmZiZGYzNDhmMDg0YTYzZDRkNjI0OGUwNDUifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGluc3BlY3QgdHJhbnNsYXRpb25zLCBjb3JyZWN0IHRoZW0gaWYgbmVlZGVkLCBhbmQgcHJvZHVjZSBhIGZpbmFsIGNvbmNhdGVuYXRlZCByZXNwb25zZS4iLCJpbnB1dCI6W3siY29udGVudCI6IlRyYW5zbGF0ZSB0byBTcGFuaXNoOiAnSSBhbSBmdWxsJyIsInJvbGUiOiJ1c2VyIn0seyJhcmd1bWVudHMiOiJ7XCJpbnB1dFwiOlwiSSBhbSBmdWxsXCJ9IiwiY2FsbF9pZCI6ImNhbGwiLCJuYW1lIjoidHJhbnNsYXRlX3RvX3NwYW5pc2giLCJ0eXBlIjoiZnVuY3Rpb25fY2FsbCIsImlkIjoiaWQiLCJzdGF0dXMiOiJjb21wbGV0ZWQifSx7ImNhbGxfaWQiOiJjYWxsIiwib3V0cHV0IjoiRXN0b3kgbGxlbm8uIiwidHlwZSI6ImZ1bmN0aW9uX2NhbGxfb3V0cHV0In0seyJpZCI6IiIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IlRoZSB0cmFuc2xhdGlvbiB0byBTcGFuaXNoIGlzOiBcIkVzdG95IGxsZW5vLlwiIiwidHlwZSI6Im91dHB1dF90ZXh0In1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sIm1vZGVsX3NldHRpbmdzIjp7InRlbXBlcmF0dXJlIjpudWxsLCJ0b3BfcCI6bnVsbCwiZnJlcXVlbmN5X3BlbmFsdHkiOm51bGwsInByZXNlbmNlX3BlbmFsdHkiOm51bGwsInRvb2xfY2hvaWNlIjpudWxsLCJwYXJhbGxlbF90b29sX2NhbGxzIjpudWxsLCJ0cnVuY2F0aW9uIjpudWxsLCJtYXhfdG9rZW5zIjpudWxsLCJyZWFzb25pbmciOm51bGwsIm1ldGFkYXRhIjpudWxsLCJzdG9yZSI6bnVsbCwiaW5jbHVkZV91c2FnZSI6bnVsbCwiZXh0cmFfcXVlcnkiOm51bGwsImV4dHJhX2JvZHkiOm51bGwsImV4dHJhX2hlYWRlcnMiOm51bGwsImV4dHJhX2FyZ3MiOm51bGx9LCJ0b29scyI6W10sIm91dHB1dF9zY2hlbWEiOm51bGwsImhhbmRvZmZzIjpbXSwidHJhY2luZyI6MSwicHJldmlvdXNfcmVzcG9uc2VfaWQiOm51bGwsInByb21wdCI6bnVsbH0=" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "22", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiVGhlIHRyYW5zbGF0aW9uIHRvIFNwYW5pc2ggaXM6IFwiRXN0b3kgbGxlbm8uXCIiLCJ0eXBlIjoib3V0cHV0X3RleHQifV0=" - } - } - }, - { - "eventId": "24", - "eventTime": "2025-06-30T16:04:02.748848Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056495", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "23", - "identity": "16872@Tims-MacBook-Pro.local", - "requestId": "6bc19064-47e9-404a-a461-180920e82f88", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "25", - "eventTime": "2025-06-30T16:04:02.753447Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056496", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoiIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiVGhlIHRyYW5zbGF0aW9uIHRvIFNwYW5pc2ggaXM6IFwiRXN0b3kgbGxlbm8uXCIiLCJ0eXBlIjoib3V0cHV0X3RleHQifV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9XSwidXNhZ2UiOnsicmVxdWVzdHMiOjAsImlucHV0X3Rva2VucyI6MCwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjAsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjowfSwicmVzcG9uc2VfaWQiOm51bGx9" - } - ] - }, - "scheduledEventId": "23", - "startedEventId": "24", - "identity": "16872@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "26", - "eventTime": "2025-06-30T16:04:02.753450Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056497", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16872@Tims-MacBook-Pro.local-547b7584bee9475f87bc46161a6291a5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "1e8fa3c8-41b4-4ea7-907b-63088b63e36f" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "27", - "eventTime": "2025-06-30T16:04:02.754059Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056501", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "26", - "identity": "16872@Tims-MacBook-Pro.local", - "requestId": "cbfd4087-6e86-498e-b451-5c26e2548334", - "historySizeBytes": "11023", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "28", - "eventTime": "2025-06-30T16:04:02.758051Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056505", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "26", - "startedEventId": "27", - "identity": "16872@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "29", - "eventTime": "2025-06-30T16:04:02.758068Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", - "taskId": "1056506", - "workflowExecutionCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlRoZSB0cmFuc2xhdGlvbiB0byBTcGFuaXNoIGlzOiBcIkVzdG95IGxsZW5vLlwiIg==" - } - ] - }, - "workflowTaskCompletedEventId": "28" - } - } - ] -} \ No newline at end of file diff --git a/tests/contrib/openai_agents/histories/customer-service-workflow-history.json b/tests/contrib/openai_agents/histories/customer-service-workflow-history.json deleted file mode 100644 index d5c878c4b1..0000000000 --- a/tests/contrib/openai_agents/histories/customer-service-workflow-history.json +++ /dev/null @@ -1,1356 +0,0 @@ -{ - "events": [ - { - "eventId": "1", - "eventTime": "2025-06-30T16:05:23.897631Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", - "taskId": "1056511", - "workflowExecutionStartedEventAttributes": { - "workflowType": { - "name": "CustomerServiceWorkflow" - }, - "taskQueue": { - "name": "be82986c-9ddc-441b-9833-c3fce7c79df1", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "workflowExecutionTimeout": "30s", - "workflowRunTimeout": "30s", - "workflowTaskTimeout": "10s", - "originalExecutionRunId": "0197c196-0539-799c-8a5d-af7f3d1b59e2", - "identity": "16915@Tims-MacBook-Pro.local", - "firstExecutionRunId": "0197c196-0539-799c-8a5d-af7f3d1b59e2", - "attempt": 1, - "workflowExecutionExpirationTime": "2025-06-30T16:05:53.897Z", - "firstWorkflowTaskBackoff": "0s", - "workflowId": "customer-service-d7028390-930d-4478-b69f-185af000bb17" - } - }, - { - "eventId": "2", - "eventTime": "2025-06-30T16:05:23.897679Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056512", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "be82986c-9ddc-441b-9833-c3fce7c79df1", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "3", - "eventTime": "2025-06-30T16:05:23.898564Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056518", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "2", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "d4bd65f3-93f8-46cb-bf44-e7f2a750e7e4", - "historySizeBytes": "367", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "4", - "eventTime": "2025-06-30T16:05:23.935560Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056522", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "2", - "startedEventId": "3", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": { - "coreUsedFlags": [ - 1, - 2, - 3 - ], - "sdkName": "temporal-python", - "sdkVersion": "1.13.0" - }, - "meteringMetadata": {} - } - }, - { - "eventId": "5", - "eventTime": "2025-06-30T16:05:23.935885Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056526", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "6", - "eventTime": "2025-06-30T16:05:23.935887Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056527", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "5", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "request-from-RespondWorkflowTaskCompleted", - "historySizeBytes": "634", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "7", - "eventTime": "2025-06-30T16:05:23.945868Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056528", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "5", - "startedEventId": "6", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "8", - "eventTime": "2025-06-30T16:05:23.945901Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED", - "taskId": "1056529", - "workflowExecutionUpdateAcceptedEventAttributes": { - "protocolInstanceId": "84ebe654-6558-4df3-a536-f391bd61ddef", - "acceptedRequestMessageId": "84ebe654-6558-4df3-a536-f391bd61ddef/request", - "acceptedRequestSequencingEventId": "5", - "acceptedRequest": { - "meta": { - "updateId": "84ebe654-6558-4df3-a536-f391bd61ddef", - "identity": "16915@Tims-MacBook-Pro.local" - }, - "input": { - "name": "process_user_message", - "args": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ1c2VyX2lucHV0IjoiSGVsbG8iLCJjaGF0X2xlbmd0aCI6MH0=" - } - ] - } - } - } - } - }, - { - "eventId": "9", - "eventTime": "2025-06-30T16:05:23.945923Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056530", - "activityTaskScheduledEventAttributes": { - "activityId": "1", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "be82986c-9ddc-441b-9833-c3fce7c79df1", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJDdXN0b21lciBzZXJ2aWNlIiwic3BhbklkIjoic3Bhbl9lZmRlY2VhZjBmMzI0MDgyOGQxNTM4OWMiLCJ0cmFjZUlkIjoidHJhY2VfNzgwYzg0NjY5OTgzNGQ1ODljMjZkNzYyZDliNzMwOWIifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiIyBTeXN0ZW0gY29udGV4dFxuWW91IGFyZSBwYXJ0IG9mIGEgbXVsdGktYWdlbnQgc3lzdGVtIGNhbGxlZCB0aGUgQWdlbnRzIFNESywgZGVzaWduZWQgdG8gbWFrZSBhZ2VudCBjb29yZGluYXRpb24gYW5kIGV4ZWN1dGlvbiBlYXN5LiBBZ2VudHMgdXNlcyB0d28gcHJpbWFyeSBhYnN0cmFjdGlvbjogKipBZ2VudHMqKiBhbmQgKipIYW5kb2ZmcyoqLiBBbiBhZ2VudCBlbmNvbXBhc3NlcyBpbnN0cnVjdGlvbnMgYW5kIHRvb2xzIGFuZCBjYW4gaGFuZCBvZmYgYSBjb252ZXJzYXRpb24gdG8gYW5vdGhlciBhZ2VudCB3aGVuIGFwcHJvcHJpYXRlLiBIYW5kb2ZmcyBhcmUgYWNoaWV2ZWQgYnkgY2FsbGluZyBhIGhhbmRvZmYgZnVuY3Rpb24sIGdlbmVyYWxseSBuYW1lZCBgdHJhbnNmZXJfdG9fPGFnZW50X25hbWU+YC4gVHJhbnNmZXJzIGJldHdlZW4gYWdlbnRzIGFyZSBoYW5kbGVkIHNlYW1sZXNzbHkgaW4gdGhlIGJhY2tncm91bmQ7IGRvIG5vdCBtZW50aW9uIG9yIGRyYXcgYXR0ZW50aW9uIHRvIHRoZXNlIHRyYW5zZmVycyBpbiB5b3VyIGNvbnZlcnNhdGlvbiB3aXRoIHRoZSB1c2VyLlxuIFlvdSBhcmUgYSBoZWxwZnVsIHRyaWFnaW5nIGFnZW50LiBZb3UgY2FuIHVzZSB5b3VyIHRvb2xzIHRvIGRlbGVnYXRlIHF1ZXN0aW9ucyB0byBvdGhlciBhcHByb3ByaWF0ZSBhZ2VudHMuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJIZWxsbyIsInJvbGUiOiJ1c2VyIn1dLCJtb2RlbF9zZXR0aW5ncyI6eyJ0ZW1wZXJhdHVyZSI6bnVsbCwidG9wX3AiOm51bGwsImZyZXF1ZW5jeV9wZW5hbHR5IjpudWxsLCJwcmVzZW5jZV9wZW5hbHR5IjpudWxsLCJ0b29sX2Nob2ljZSI6bnVsbCwicGFyYWxsZWxfdG9vbF9jYWxscyI6bnVsbCwidHJ1bmNhdGlvbiI6bnVsbCwibWF4X3Rva2VucyI6bnVsbCwicmVhc29uaW5nIjpudWxsLCJtZXRhZGF0YSI6bnVsbCwic3RvcmUiOm51bGwsImluY2x1ZGVfdXNhZ2UiOm51bGwsImV4dHJhX3F1ZXJ5IjpudWxsLCJleHRyYV9ib2R5IjpudWxsLCJleHRyYV9oZWFkZXJzIjpudWxsLCJleHRyYV9hcmdzIjpudWxsfSwidG9vbHMiOltdLCJvdXRwdXRfc2NoZW1hIjpudWxsLCJoYW5kb2ZmcyI6W3sidG9vbF9uYW1lIjoidHJhbnNmZXJfdG9fZmFxX2FnZW50IiwidG9vbF9kZXNjcmlwdGlvbiI6IkhhbmRvZmYgdG8gdGhlIEZBUSBBZ2VudCBhZ2VudCB0byBoYW5kbGUgdGhlIHJlcXVlc3QuIEEgaGVscGZ1bCBhZ2VudCB0aGF0IGNhbiBhbnN3ZXIgcXVlc3Rpb25zIGFib3V0IHRoZSBhaXJsaW5lLiIsImlucHV0X2pzb25fc2NoZW1hIjp7ImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjpmYWxzZSwidHlwZSI6Im9iamVjdCIsInByb3BlcnRpZXMiOnt9LCJyZXF1aXJlZCI6W119LCJhZ2VudF9uYW1lIjoiRkFRIEFnZW50Iiwic3RyaWN0X2pzb25fc2NoZW1hIjp0cnVlfSx7InRvb2xfbmFtZSI6InRyYW5zZmVyX3RvX3NlYXRfYm9va2luZ19hZ2VudCIsInRvb2xfZGVzY3JpcHRpb24iOiJIYW5kb2ZmIHRvIHRoZSBTZWF0IEJvb2tpbmcgQWdlbnQgYWdlbnQgdG8gaGFuZGxlIHRoZSByZXF1ZXN0LiBBIGhlbHBmdWwgYWdlbnQgdGhhdCBjYW4gdXBkYXRlIGEgc2VhdCBvbiBhIGZsaWdodC4iLCJpbnB1dF9qc29uX3NjaGVtYSI6eyJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2UsInR5cGUiOiJvYmplY3QiLCJwcm9wZXJ0aWVzIjp7fSwicmVxdWlyZWQiOltdfSwiYWdlbnRfbmFtZSI6IlNlYXQgQm9va2luZyBBZ2VudCIsInN0cmljdF9qc29uX3NjaGVtYSI6dHJ1ZX1dLCJ0cmFjaW5nIjoxLCJwcmV2aW91c19yZXNwb25zZV9pZCI6bnVsbCwicHJvbXB0IjpudWxsfQ==" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "7", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IkhlbGxvIg==" - } - } - }, - { - "eventId": "10", - "eventTime": "2025-06-30T16:05:23.946659Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056536", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "9", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "3a5187f5-d97d-4dc3-bad1-9fbcd45973c0", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "11", - "eventTime": "2025-06-30T16:05:23.966721Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056537", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoiIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiSGkgdGhlcmUhIEhvdyBjYW4gSSBhc3Npc3QgeW91IHRvZGF5PyIsInR5cGUiOiJvdXRwdXRfdGV4dCJ9XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn1dLCJ1c2FnZSI6eyJyZXF1ZXN0cyI6MCwiaW5wdXRfdG9rZW5zIjowLCJpbnB1dF90b2tlbnNfZGV0YWlscyI6eyJjYWNoZWRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MCwib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjB9LCJyZXNwb25zZV9pZCI6bnVsbH0=" - } - ] - }, - "scheduledEventId": "9", - "startedEventId": "10", - "identity": "16915@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "12", - "eventTime": "2025-06-30T16:05:23.966725Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056538", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "13", - "eventTime": "2025-06-30T16:05:23.967600Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056542", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "12", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "b906d85d-cd71-4656-b6a7-082a1bc52243", - "historySizeBytes": "4251", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "14", - "eventTime": "2025-06-30T16:05:23.979403Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056546", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "12", - "startedEventId": "13", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "15", - "eventTime": "2025-06-30T16:05:23.979438Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED", - "taskId": "1056547", - "workflowExecutionUpdateCompletedEventAttributes": { - "meta": { - "updateId": "84ebe654-6558-4df3-a536-f391bd61ddef", - "identity": "16915@Tims-MacBook-Pro.local" - }, - "outcome": { - "success": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "WyJVc2VyOiBIZWxsbyIsIlRyaWFnZSBBZ2VudDogSGkgdGhlcmUhIEhvdyBjYW4gSSBhc3Npc3QgeW91IHRvZGF5PyJd" - } - ] - } - }, - "acceptedEventId": "8" - } - }, - { - "eventId": "16", - "eventTime": "2025-06-30T16:05:23.984766Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056553", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "17", - "eventTime": "2025-06-30T16:05:23.985105Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056554", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "16", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "209063cf-510e-46c2-9896-edc64b67472e", - "historySizeBytes": "4689", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "18", - "eventTime": "2025-06-30T16:05:23.994030Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056555", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "16", - "startedEventId": "17", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "19", - "eventTime": "2025-06-30T16:05:23.994061Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED", - "taskId": "1056556", - "workflowExecutionUpdateAcceptedEventAttributes": { - "protocolInstanceId": "582a5778-a28c-4a2d-bee1-9629da75c8a5", - "acceptedRequestMessageId": "582a5778-a28c-4a2d-bee1-9629da75c8a5/request", - "acceptedRequestSequencingEventId": "16", - "acceptedRequest": { - "meta": { - "updateId": "582a5778-a28c-4a2d-bee1-9629da75c8a5", - "identity": "16915@Tims-MacBook-Pro.local" - }, - "input": { - "name": "process_user_message", - "args": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ1c2VyX2lucHV0IjoiQm9vayBtZSBhIGZsaWdodCB0byBQRFgiLCJjaGF0X2xlbmd0aCI6Mn0=" - } - ] - } - } - } - } - }, - { - "eventId": "20", - "eventTime": "2025-06-30T16:05:23.994084Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056557", - "activityTaskScheduledEventAttributes": { - "activityId": "2", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "be82986c-9ddc-441b-9833-c3fce7c79df1", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJDdXN0b21lciBzZXJ2aWNlIiwic3BhbklkIjoic3Bhbl8wM2Y5YzFkYWQ4MmM0N2JmYTE4MWExMTAiLCJ0cmFjZUlkIjoidHJhY2VfZGQxMWQyNTYxOWQ1NDZmMGE4MDgxMzc3OTdiYzE2MjMifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiIyBTeXN0ZW0gY29udGV4dFxuWW91IGFyZSBwYXJ0IG9mIGEgbXVsdGktYWdlbnQgc3lzdGVtIGNhbGxlZCB0aGUgQWdlbnRzIFNESywgZGVzaWduZWQgdG8gbWFrZSBhZ2VudCBjb29yZGluYXRpb24gYW5kIGV4ZWN1dGlvbiBlYXN5LiBBZ2VudHMgdXNlcyB0d28gcHJpbWFyeSBhYnN0cmFjdGlvbjogKipBZ2VudHMqKiBhbmQgKipIYW5kb2ZmcyoqLiBBbiBhZ2VudCBlbmNvbXBhc3NlcyBpbnN0cnVjdGlvbnMgYW5kIHRvb2xzIGFuZCBjYW4gaGFuZCBvZmYgYSBjb252ZXJzYXRpb24gdG8gYW5vdGhlciBhZ2VudCB3aGVuIGFwcHJvcHJpYXRlLiBIYW5kb2ZmcyBhcmUgYWNoaWV2ZWQgYnkgY2FsbGluZyBhIGhhbmRvZmYgZnVuY3Rpb24sIGdlbmVyYWxseSBuYW1lZCBgdHJhbnNmZXJfdG9fPGFnZW50X25hbWU+YC4gVHJhbnNmZXJzIGJldHdlZW4gYWdlbnRzIGFyZSBoYW5kbGVkIHNlYW1sZXNzbHkgaW4gdGhlIGJhY2tncm91bmQ7IGRvIG5vdCBtZW50aW9uIG9yIGRyYXcgYXR0ZW50aW9uIHRvIHRoZXNlIHRyYW5zZmVycyBpbiB5b3VyIGNvbnZlcnNhdGlvbiB3aXRoIHRoZSB1c2VyLlxuIFlvdSBhcmUgYSBoZWxwZnVsIHRyaWFnaW5nIGFnZW50LiBZb3UgY2FuIHVzZSB5b3VyIHRvb2xzIHRvIGRlbGVnYXRlIHF1ZXN0aW9ucyB0byBvdGhlciBhcHByb3ByaWF0ZSBhZ2VudHMuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJIZWxsbyIsInJvbGUiOiJ1c2VyIn0seyJpZCI6IiIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IkhpIHRoZXJlISBIb3cgY2FuIEkgYXNzaXN0IHlvdSB0b2RheT8iLCJ0eXBlIjoib3V0cHV0X3RleHQifV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9LHsiY29udGVudCI6IkJvb2sgbWUgYSBmbGlnaHQgdG8gUERYIiwicm9sZSI6InVzZXIifV0sIm1vZGVsX3NldHRpbmdzIjp7InRlbXBlcmF0dXJlIjpudWxsLCJ0b3BfcCI6bnVsbCwiZnJlcXVlbmN5X3BlbmFsdHkiOm51bGwsInByZXNlbmNlX3BlbmFsdHkiOm51bGwsInRvb2xfY2hvaWNlIjpudWxsLCJwYXJhbGxlbF90b29sX2NhbGxzIjpudWxsLCJ0cnVuY2F0aW9uIjpudWxsLCJtYXhfdG9rZW5zIjpudWxsLCJyZWFzb25pbmciOm51bGwsIm1ldGFkYXRhIjpudWxsLCJzdG9yZSI6bnVsbCwiaW5jbHVkZV91c2FnZSI6bnVsbCwiZXh0cmFfcXVlcnkiOm51bGwsImV4dHJhX2JvZHkiOm51bGwsImV4dHJhX2hlYWRlcnMiOm51bGwsImV4dHJhX2FyZ3MiOm51bGx9LCJ0b29scyI6W10sIm91dHB1dF9zY2hlbWEiOm51bGwsImhhbmRvZmZzIjpbeyJ0b29sX25hbWUiOiJ0cmFuc2Zlcl90b19mYXFfYWdlbnQiLCJ0b29sX2Rlc2NyaXB0aW9uIjoiSGFuZG9mZiB0byB0aGUgRkFRIEFnZW50IGFnZW50IHRvIGhhbmRsZSB0aGUgcmVxdWVzdC4gQSBoZWxwZnVsIGFnZW50IHRoYXQgY2FuIGFuc3dlciBxdWVzdGlvbnMgYWJvdXQgdGhlIGFpcmxpbmUuIiwiaW5wdXRfanNvbl9zY2hlbWEiOnsiYWRkaXRpb25hbFByb3BlcnRpZXMiOmZhbHNlLCJ0eXBlIjoib2JqZWN0IiwicHJvcGVydGllcyI6e30sInJlcXVpcmVkIjpbXX0sImFnZW50X25hbWUiOiJGQVEgQWdlbnQiLCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9LHsidG9vbF9uYW1lIjoidHJhbnNmZXJfdG9fc2VhdF9ib29raW5nX2FnZW50IiwidG9vbF9kZXNjcmlwdGlvbiI6IkhhbmRvZmYgdG8gdGhlIFNlYXQgQm9va2luZyBBZ2VudCBhZ2VudCB0byBoYW5kbGUgdGhlIHJlcXVlc3QuIEEgaGVscGZ1bCBhZ2VudCB0aGF0IGNhbiB1cGRhdGUgYSBzZWF0IG9uIGEgZmxpZ2h0LiIsImlucHV0X2pzb25fc2NoZW1hIjp7ImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjpmYWxzZSwidHlwZSI6Im9iamVjdCIsInByb3BlcnRpZXMiOnt9LCJyZXF1aXJlZCI6W119LCJhZ2VudF9uYW1lIjoiU2VhdCBCb29raW5nIEFnZW50Iiwic3RyaWN0X2pzb25fc2NoZW1hIjp0cnVlfV0sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "18", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IkJvb2sgbWUgYSBmbGlnaHQgdG8gUERYIg==" - } - } - }, - { - "eventId": "21", - "eventTime": "2025-06-30T16:05:23.994909Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056563", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "20", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "10361ec0-e6e9-4d84-a302-41e06e1c96a4", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "22", - "eventTime": "2025-06-30T16:05:24.001754Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056564", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImFyZ3VtZW50cyI6Int9IiwiY2FsbF9pZCI6ImNhbGwiLCJuYW1lIjoidHJhbnNmZXJfdG9fc2VhdF9ib29raW5nX2FnZW50IiwidHlwZSI6ImZ1bmN0aW9uX2NhbGwiLCJpZCI6ImlkIiwic3RhdHVzIjoiY29tcGxldGVkIn1dLCJ1c2FnZSI6eyJyZXF1ZXN0cyI6MCwiaW5wdXRfdG9rZW5zIjowLCJpbnB1dF90b2tlbnNfZGV0YWlscyI6eyJjYWNoZWRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MCwib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjB9LCJyZXNwb25zZV9pZCI6bnVsbH0=" - } - ] - }, - "scheduledEventId": "20", - "startedEventId": "21", - "identity": "16915@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "23", - "eventTime": "2025-06-30T16:05:24.001757Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056565", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "24", - "eventTime": "2025-06-30T16:05:24.002535Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056569", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "23", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "469bede9-5aa7-4e8b-bd27-cb987cc6808f", - "historySizeBytes": "8515", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "25", - "eventTime": "2025-06-30T16:05:24.007974Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056573", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "23", - "startedEventId": "24", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "26", - "eventTime": "2025-06-30T16:05:24.008Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056574", - "activityTaskScheduledEventAttributes": { - "activityId": "3", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "be82986c-9ddc-441b-9833-c3fce7c79df1", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJDdXN0b21lciBzZXJ2aWNlIiwic3BhbklkIjoic3Bhbl9iZDhiMDA3NzhmOWE0NjBkYTYxNjc2OTciLCJ0cmFjZUlkIjoidHJhY2VfZGQxMWQyNTYxOWQ1NDZmMGE4MDgxMzc3OTdiYzE2MjMifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiIyBTeXN0ZW0gY29udGV4dFxuWW91IGFyZSBwYXJ0IG9mIGEgbXVsdGktYWdlbnQgc3lzdGVtIGNhbGxlZCB0aGUgQWdlbnRzIFNESywgZGVzaWduZWQgdG8gbWFrZSBhZ2VudCBjb29yZGluYXRpb24gYW5kIGV4ZWN1dGlvbiBlYXN5LiBBZ2VudHMgdXNlcyB0d28gcHJpbWFyeSBhYnN0cmFjdGlvbjogKipBZ2VudHMqKiBhbmQgKipIYW5kb2ZmcyoqLiBBbiBhZ2VudCBlbmNvbXBhc3NlcyBpbnN0cnVjdGlvbnMgYW5kIHRvb2xzIGFuZCBjYW4gaGFuZCBvZmYgYSBjb252ZXJzYXRpb24gdG8gYW5vdGhlciBhZ2VudCB3aGVuIGFwcHJvcHJpYXRlLiBIYW5kb2ZmcyBhcmUgYWNoaWV2ZWQgYnkgY2FsbGluZyBhIGhhbmRvZmYgZnVuY3Rpb24sIGdlbmVyYWxseSBuYW1lZCBgdHJhbnNmZXJfdG9fPGFnZW50X25hbWU+YC4gVHJhbnNmZXJzIGJldHdlZW4gYWdlbnRzIGFyZSBoYW5kbGVkIHNlYW1sZXNzbHkgaW4gdGhlIGJhY2tncm91bmQ7IGRvIG5vdCBtZW50aW9uIG9yIGRyYXcgYXR0ZW50aW9uIHRvIHRoZXNlIHRyYW5zZmVycyBpbiB5b3VyIGNvbnZlcnNhdGlvbiB3aXRoIHRoZSB1c2VyLlxuXG4gICAgICAgIFlvdSBhcmUgYSBzZWF0IGJvb2tpbmcgYWdlbnQuIElmIHlvdSBhcmUgc3BlYWtpbmcgdG8gYSBjdXN0b21lciwgeW91IHByb2JhYmx5IHdlcmUgdHJhbnNmZXJyZWQgdG8gZnJvbSB0aGUgdHJpYWdlIGFnZW50LlxuICAgICAgICBVc2UgdGhlIGZvbGxvd2luZyByb3V0aW5lIHRvIHN1cHBvcnQgdGhlIGN1c3RvbWVyLlxuICAgICAgICAjIFJvdXRpbmVcbiAgICAgICAgMS4gQXNrIGZvciB0aGVpciBjb25maXJtYXRpb24gbnVtYmVyLlxuICAgICAgICAyLiBBc2sgdGhlIGN1c3RvbWVyIHdoYXQgdGhlaXIgZGVzaXJlZCBzZWF0IG51bWJlciBpcy5cbiAgICAgICAgMy4gVXNlIHRoZSB1cGRhdGUgc2VhdCB0b29sIHRvIHVwZGF0ZSB0aGUgc2VhdCBvbiB0aGUgZmxpZ2h0LlxuICAgICAgICBJZiB0aGUgY3VzdG9tZXIgYXNrcyBhIHF1ZXN0aW9uIHRoYXQgaXMgbm90IHJlbGF0ZWQgdG8gdGhlIHJvdXRpbmUsIHRyYW5zZmVyIGJhY2sgdG8gdGhlIHRyaWFnZSBhZ2VudC4gIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJIZWxsbyIsInJvbGUiOiJ1c2VyIn0seyJpZCI6IiIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IkhpIHRoZXJlISBIb3cgY2FuIEkgYXNzaXN0IHlvdSB0b2RheT8iLCJ0eXBlIjoib3V0cHV0X3RleHQifV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9LHsiY29udGVudCI6IkJvb2sgbWUgYSBmbGlnaHQgdG8gUERYIiwicm9sZSI6InVzZXIifSx7ImFyZ3VtZW50cyI6Int9IiwiY2FsbF9pZCI6ImNhbGwiLCJuYW1lIjoidHJhbnNmZXJfdG9fc2VhdF9ib29raW5nX2FnZW50IiwidHlwZSI6ImZ1bmN0aW9uX2NhbGwiLCJpZCI6ImlkIiwic3RhdHVzIjoiY29tcGxldGVkIn0seyJjYWxsX2lkIjoiY2FsbCIsIm91dHB1dCI6IntcImFzc2lzdGFudFwiOiBcIlNlYXQgQm9va2luZyBBZ2VudFwifSIsInR5cGUiOiJmdW5jdGlvbl9jYWxsX291dHB1dCJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOm51bGwsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbeyJuYW1lIjoidXBkYXRlX3NlYXQiLCJkZXNjcmlwdGlvbiI6IlVwZGF0ZSB0aGUgc2VhdCBmb3IgYSBnaXZlbiBjb25maXJtYXRpb24gbnVtYmVyLiIsInBhcmFtc19qc29uX3NjaGVtYSI6eyJwcm9wZXJ0aWVzIjp7ImNvbmZpcm1hdGlvbl9udW1iZXIiOnsiZGVzY3JpcHRpb24iOiJUaGUgY29uZmlybWF0aW9uIG51bWJlciBmb3IgdGhlIGZsaWdodC4iLCJ0aXRsZSI6IkNvbmZpcm1hdGlvbiBOdW1iZXIiLCJ0eXBlIjoic3RyaW5nIn0sIm5ld19zZWF0Ijp7ImRlc2NyaXB0aW9uIjoiVGhlIG5ldyBzZWF0IHRvIHVwZGF0ZSB0by4iLCJ0aXRsZSI6Ik5ldyBTZWF0IiwidHlwZSI6InN0cmluZyJ9fSwicmVxdWlyZWQiOlsiY29uZmlybWF0aW9uX251bWJlciIsIm5ld19zZWF0Il0sInRpdGxlIjoidXBkYXRlX3NlYXRfYXJncyIsInR5cGUiOiJvYmplY3QiLCJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2V9LCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9XSwib3V0cHV0X3NjaGVtYSI6bnVsbCwiaGFuZG9mZnMiOlt7InRvb2xfbmFtZSI6InRyYW5zZmVyX3RvX3RyaWFnZV9hZ2VudCIsInRvb2xfZGVzY3JpcHRpb24iOiJIYW5kb2ZmIHRvIHRoZSBUcmlhZ2UgQWdlbnQgYWdlbnQgdG8gaGFuZGxlIHRoZSByZXF1ZXN0LiBBIHRyaWFnZSBhZ2VudCB0aGF0IGNhbiBkZWxlZ2F0ZSBhIGN1c3RvbWVyJ3MgcmVxdWVzdCB0byB0aGUgYXBwcm9wcmlhdGUgYWdlbnQuIiwiaW5wdXRfanNvbl9zY2hlbWEiOnsiYWRkaXRpb25hbFByb3BlcnRpZXMiOmZhbHNlLCJ0eXBlIjoib2JqZWN0IiwicHJvcGVydGllcyI6e30sInJlcXVpcmVkIjpbXX0sImFnZW50X25hbWUiOiJUcmlhZ2UgQWdlbnQiLCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9XSwidHJhY2luZyI6MSwicHJldmlvdXNfcmVzcG9uc2VfaWQiOm51bGwsInByb21wdCI6bnVsbH0=" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "25", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - } - }, - { - "eventId": "27", - "eventTime": "2025-06-30T16:05:24.008726Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056579", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "26", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "b483ade7-523e-404a-8b26-34e3f751d9da", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "28", - "eventTime": "2025-06-30T16:05:24.013004Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056580", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoiIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiQ291bGQgeW91IHBsZWFzZSBwcm92aWRlIHlvdXIgY29uZmlybWF0aW9uIG51bWJlcj8iLCJ0eXBlIjoib3V0cHV0X3RleHQifV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9XSwidXNhZ2UiOnsicmVxdWVzdHMiOjAsImlucHV0X3Rva2VucyI6MCwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjAsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjowfSwicmVzcG9uc2VfaWQiOm51bGx9" - } - ] - }, - "scheduledEventId": "26", - "startedEventId": "27", - "identity": "16915@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "29", - "eventTime": "2025-06-30T16:05:24.013007Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056581", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "30", - "eventTime": "2025-06-30T16:05:24.013661Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056585", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "29", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "273fc019-be1e-4174-be04-ba910235a319", - "historySizeBytes": "12696", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "31", - "eventTime": "2025-06-30T16:05:24.018308Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056589", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "29", - "startedEventId": "30", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "32", - "eventTime": "2025-06-30T16:05:24.018335Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED", - "taskId": "1056590", - "workflowExecutionUpdateCompletedEventAttributes": { - "meta": { - "updateId": "582a5778-a28c-4a2d-bee1-9629da75c8a5", - "identity": "16915@Tims-MacBook-Pro.local" - }, - "outcome": { - "success": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "WyJVc2VyOiBCb29rIG1lIGEgZmxpZ2h0IHRvIFBEWCIsIlRyaWFnZSBBZ2VudDogU2tpcHBpbmcgaXRlbTogSGFuZG9mZkNhbGxJdGVtIiwiSGFuZGVkIG9mZiBmcm9tIFRyaWFnZSBBZ2VudCB0byBTZWF0IEJvb2tpbmcgQWdlbnQiLCJTZWF0IEJvb2tpbmcgQWdlbnQ6IENvdWxkIHlvdSBwbGVhc2UgcHJvdmlkZSB5b3VyIGNvbmZpcm1hdGlvbiBudW1iZXI/Il0=" - } - ] - } - }, - "acceptedEventId": "19" - } - }, - { - "eventId": "33", - "eventTime": "2025-06-30T16:05:24.020885Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056596", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "34", - "eventTime": "2025-06-30T16:05:24.021110Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056597", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "33", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "d7f1a655-e077-4c3c-8781-5b4a69d39782", - "historySizeBytes": "13272", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "35", - "eventTime": "2025-06-30T16:05:24.028049Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056598", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "33", - "startedEventId": "34", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "36", - "eventTime": "2025-06-30T16:05:24.028075Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED", - "taskId": "1056599", - "workflowExecutionUpdateAcceptedEventAttributes": { - "protocolInstanceId": "602020f4-2885-4f5b-9e72-e1dfcb2db850", - "acceptedRequestMessageId": "602020f4-2885-4f5b-9e72-e1dfcb2db850/request", - "acceptedRequestSequencingEventId": "33", - "acceptedRequest": { - "meta": { - "updateId": "602020f4-2885-4f5b-9e72-e1dfcb2db850", - "identity": "16915@Tims-MacBook-Pro.local" - }, - "input": { - "name": "process_user_message", - "args": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ1c2VyX2lucHV0IjoiMTExMTEiLCJjaGF0X2xlbmd0aCI6Nn0=" - } - ] - } - } - } - } - }, - { - "eventId": "37", - "eventTime": "2025-06-30T16:05:24.028089Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056600", - "activityTaskScheduledEventAttributes": { - "activityId": "4", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "be82986c-9ddc-441b-9833-c3fce7c79df1", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJDdXN0b21lciBzZXJ2aWNlIiwic3BhbklkIjoic3Bhbl84YTYzOGIwY2ZkYzE0MjA5YWMyNTUwNGEiLCJ0cmFjZUlkIjoidHJhY2VfNjg3MTkwZDNhMDM2NGNlYWExYTlhYzhhYzNmMDgwOTkifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiIyBTeXN0ZW0gY29udGV4dFxuWW91IGFyZSBwYXJ0IG9mIGEgbXVsdGktYWdlbnQgc3lzdGVtIGNhbGxlZCB0aGUgQWdlbnRzIFNESywgZGVzaWduZWQgdG8gbWFrZSBhZ2VudCBjb29yZGluYXRpb24gYW5kIGV4ZWN1dGlvbiBlYXN5LiBBZ2VudHMgdXNlcyB0d28gcHJpbWFyeSBhYnN0cmFjdGlvbjogKipBZ2VudHMqKiBhbmQgKipIYW5kb2ZmcyoqLiBBbiBhZ2VudCBlbmNvbXBhc3NlcyBpbnN0cnVjdGlvbnMgYW5kIHRvb2xzIGFuZCBjYW4gaGFuZCBvZmYgYSBjb252ZXJzYXRpb24gdG8gYW5vdGhlciBhZ2VudCB3aGVuIGFwcHJvcHJpYXRlLiBIYW5kb2ZmcyBhcmUgYWNoaWV2ZWQgYnkgY2FsbGluZyBhIGhhbmRvZmYgZnVuY3Rpb24sIGdlbmVyYWxseSBuYW1lZCBgdHJhbnNmZXJfdG9fPGFnZW50X25hbWU+YC4gVHJhbnNmZXJzIGJldHdlZW4gYWdlbnRzIGFyZSBoYW5kbGVkIHNlYW1sZXNzbHkgaW4gdGhlIGJhY2tncm91bmQ7IGRvIG5vdCBtZW50aW9uIG9yIGRyYXcgYXR0ZW50aW9uIHRvIHRoZXNlIHRyYW5zZmVycyBpbiB5b3VyIGNvbnZlcnNhdGlvbiB3aXRoIHRoZSB1c2VyLlxuXG4gICAgICAgIFlvdSBhcmUgYSBzZWF0IGJvb2tpbmcgYWdlbnQuIElmIHlvdSBhcmUgc3BlYWtpbmcgdG8gYSBjdXN0b21lciwgeW91IHByb2JhYmx5IHdlcmUgdHJhbnNmZXJyZWQgdG8gZnJvbSB0aGUgdHJpYWdlIGFnZW50LlxuICAgICAgICBVc2UgdGhlIGZvbGxvd2luZyByb3V0aW5lIHRvIHN1cHBvcnQgdGhlIGN1c3RvbWVyLlxuICAgICAgICAjIFJvdXRpbmVcbiAgICAgICAgMS4gQXNrIGZvciB0aGVpciBjb25maXJtYXRpb24gbnVtYmVyLlxuICAgICAgICAyLiBBc2sgdGhlIGN1c3RvbWVyIHdoYXQgdGhlaXIgZGVzaXJlZCBzZWF0IG51bWJlciBpcy5cbiAgICAgICAgMy4gVXNlIHRoZSB1cGRhdGUgc2VhdCB0b29sIHRvIHVwZGF0ZSB0aGUgc2VhdCBvbiB0aGUgZmxpZ2h0LlxuICAgICAgICBJZiB0aGUgY3VzdG9tZXIgYXNrcyBhIHF1ZXN0aW9uIHRoYXQgaXMgbm90IHJlbGF0ZWQgdG8gdGhlIHJvdXRpbmUsIHRyYW5zZmVyIGJhY2sgdG8gdGhlIHRyaWFnZSBhZ2VudC4gIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJIZWxsbyIsInJvbGUiOiJ1c2VyIn0seyJpZCI6IiIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IkhpIHRoZXJlISBIb3cgY2FuIEkgYXNzaXN0IHlvdSB0b2RheT8iLCJ0eXBlIjoib3V0cHV0X3RleHQifV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9LHsiY29udGVudCI6IkJvb2sgbWUgYSBmbGlnaHQgdG8gUERYIiwicm9sZSI6InVzZXIifSx7ImFyZ3VtZW50cyI6Int9IiwiY2FsbF9pZCI6ImNhbGwiLCJuYW1lIjoidHJhbnNmZXJfdG9fc2VhdF9ib29raW5nX2FnZW50IiwidHlwZSI6ImZ1bmN0aW9uX2NhbGwiLCJpZCI6ImlkIiwic3RhdHVzIjoiY29tcGxldGVkIn0seyJjYWxsX2lkIjoiY2FsbCIsIm91dHB1dCI6IntcImFzc2lzdGFudFwiOiBcIlNlYXQgQm9va2luZyBBZ2VudFwifSIsInR5cGUiOiJmdW5jdGlvbl9jYWxsX291dHB1dCJ9LHsiaWQiOiIiLCJjb250ZW50IjpbeyJhbm5vdGF0aW9ucyI6W10sInRleHQiOiJDb3VsZCB5b3UgcGxlYXNlIHByb3ZpZGUgeW91ciBjb25maXJtYXRpb24gbnVtYmVyPyIsInR5cGUiOiJvdXRwdXRfdGV4dCJ9XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn0seyJjb250ZW50IjoiMTExMTEiLCJyb2xlIjoidXNlciJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOm51bGwsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbeyJuYW1lIjoidXBkYXRlX3NlYXQiLCJkZXNjcmlwdGlvbiI6IlVwZGF0ZSB0aGUgc2VhdCBmb3IgYSBnaXZlbiBjb25maXJtYXRpb24gbnVtYmVyLiIsInBhcmFtc19qc29uX3NjaGVtYSI6eyJwcm9wZXJ0aWVzIjp7ImNvbmZpcm1hdGlvbl9udW1iZXIiOnsiZGVzY3JpcHRpb24iOiJUaGUgY29uZmlybWF0aW9uIG51bWJlciBmb3IgdGhlIGZsaWdodC4iLCJ0aXRsZSI6IkNvbmZpcm1hdGlvbiBOdW1iZXIiLCJ0eXBlIjoic3RyaW5nIn0sIm5ld19zZWF0Ijp7ImRlc2NyaXB0aW9uIjoiVGhlIG5ldyBzZWF0IHRvIHVwZGF0ZSB0by4iLCJ0aXRsZSI6Ik5ldyBTZWF0IiwidHlwZSI6InN0cmluZyJ9fSwicmVxdWlyZWQiOlsiY29uZmlybWF0aW9uX251bWJlciIsIm5ld19zZWF0Il0sInRpdGxlIjoidXBkYXRlX3NlYXRfYXJncyIsInR5cGUiOiJvYmplY3QiLCJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2V9LCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9XSwib3V0cHV0X3NjaGVtYSI6bnVsbCwiaGFuZG9mZnMiOlt7InRvb2xfbmFtZSI6InRyYW5zZmVyX3RvX3RyaWFnZV9hZ2VudCIsInRvb2xfZGVzY3JpcHRpb24iOiJIYW5kb2ZmIHRvIHRoZSBUcmlhZ2UgQWdlbnQgYWdlbnQgdG8gaGFuZGxlIHRoZSByZXF1ZXN0LiBBIHRyaWFnZSBhZ2VudCB0aGF0IGNhbiBkZWxlZ2F0ZSBhIGN1c3RvbWVyJ3MgcmVxdWVzdCB0byB0aGUgYXBwcm9wcmlhdGUgYWdlbnQuIiwiaW5wdXRfanNvbl9zY2hlbWEiOnsiYWRkaXRpb25hbFByb3BlcnRpZXMiOmZhbHNlLCJ0eXBlIjoib2JqZWN0IiwicHJvcGVydGllcyI6e30sInJlcXVpcmVkIjpbXX0sImFnZW50X25hbWUiOiJUcmlhZ2UgQWdlbnQiLCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9XSwidHJhY2luZyI6MSwicHJldmlvdXNfcmVzcG9uc2VfaWQiOm51bGwsInByb21wdCI6bnVsbH0=" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "35", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IjExMTExIg==" - } - } - }, - { - "eventId": "38", - "eventTime": "2025-06-30T16:05:24.028711Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056606", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "37", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "c867017e-9504-4840-b8cb-278f9e06c9f0", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "39", - "eventTime": "2025-06-30T16:05:24.032775Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056607", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoiIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiVGhhbmtzISBXaGF0IHNlYXQgbnVtYmVyIHdvdWxkIHlvdSBsaWtlIHRvIGNoYW5nZSB0bz8iLCJ0eXBlIjoib3V0cHV0X3RleHQifV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9XSwidXNhZ2UiOnsicmVxdWVzdHMiOjAsImlucHV0X3Rva2VucyI6MCwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjAsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjowfSwicmVzcG9uc2VfaWQiOm51bGx9" - } - ] - }, - "scheduledEventId": "37", - "startedEventId": "38", - "identity": "16915@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "40", - "eventTime": "2025-06-30T16:05:24.032778Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056608", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "41", - "eventTime": "2025-06-30T16:05:24.033341Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056612", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "40", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "cb909484-7de0-4129-9173-eb67c1e3bf01", - "historySizeBytes": "18123", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "42", - "eventTime": "2025-06-30T16:05:24.037741Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056616", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "40", - "startedEventId": "41", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "43", - "eventTime": "2025-06-30T16:05:24.037767Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED", - "taskId": "1056617", - "workflowExecutionUpdateCompletedEventAttributes": { - "meta": { - "updateId": "602020f4-2885-4f5b-9e72-e1dfcb2db850", - "identity": "16915@Tims-MacBook-Pro.local" - }, - "outcome": { - "success": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "WyJVc2VyOiAxMTExMSIsIlNlYXQgQm9va2luZyBBZ2VudDogVGhhbmtzISBXaGF0IHNlYXQgbnVtYmVyIHdvdWxkIHlvdSBsaWtlIHRvIGNoYW5nZSB0bz8iXQ==" - } - ] - } - }, - "acceptedEventId": "36" - } - }, - { - "eventId": "44", - "eventTime": "2025-06-30T16:05:24.040731Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056623", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "45", - "eventTime": "2025-06-30T16:05:24.040950Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056624", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "44", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "58b7c276-20e4-4db6-baab-12599793bd59", - "historySizeBytes": "18581", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "46", - "eventTime": "2025-06-30T16:05:24.048105Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056625", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "44", - "startedEventId": "45", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "47", - "eventTime": "2025-06-30T16:05:24.048131Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED", - "taskId": "1056626", - "workflowExecutionUpdateAcceptedEventAttributes": { - "protocolInstanceId": "221628d3-083b-4982-aa48-635abf7e8435", - "acceptedRequestMessageId": "221628d3-083b-4982-aa48-635abf7e8435/request", - "acceptedRequestSequencingEventId": "44", - "acceptedRequest": { - "meta": { - "updateId": "221628d3-083b-4982-aa48-635abf7e8435", - "identity": "16915@Tims-MacBook-Pro.local" - }, - "input": { - "name": "process_user_message", - "args": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ1c2VyX2lucHV0IjoiQW55IHdpbmRvdyBzZWF0IiwiY2hhdF9sZW5ndGgiOjh9" - } - ] - } - } - } - } - }, - { - "eventId": "48", - "eventTime": "2025-06-30T16:05:24.048150Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056627", - "activityTaskScheduledEventAttributes": { - "activityId": "5", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "be82986c-9ddc-441b-9833-c3fce7c79df1", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJDdXN0b21lciBzZXJ2aWNlIiwic3BhbklkIjoic3Bhbl9hNzQ4NTg4ZDQwNDQ0YjRkYTRhOTk4ZjYiLCJ0cmFjZUlkIjoidHJhY2VfMDhhZTY0ZGUyNzQ3NGVkY2IyMWZiYTk4ZjkyYjEyYTEifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiIyBTeXN0ZW0gY29udGV4dFxuWW91IGFyZSBwYXJ0IG9mIGEgbXVsdGktYWdlbnQgc3lzdGVtIGNhbGxlZCB0aGUgQWdlbnRzIFNESywgZGVzaWduZWQgdG8gbWFrZSBhZ2VudCBjb29yZGluYXRpb24gYW5kIGV4ZWN1dGlvbiBlYXN5LiBBZ2VudHMgdXNlcyB0d28gcHJpbWFyeSBhYnN0cmFjdGlvbjogKipBZ2VudHMqKiBhbmQgKipIYW5kb2ZmcyoqLiBBbiBhZ2VudCBlbmNvbXBhc3NlcyBpbnN0cnVjdGlvbnMgYW5kIHRvb2xzIGFuZCBjYW4gaGFuZCBvZmYgYSBjb252ZXJzYXRpb24gdG8gYW5vdGhlciBhZ2VudCB3aGVuIGFwcHJvcHJpYXRlLiBIYW5kb2ZmcyBhcmUgYWNoaWV2ZWQgYnkgY2FsbGluZyBhIGhhbmRvZmYgZnVuY3Rpb24sIGdlbmVyYWxseSBuYW1lZCBgdHJhbnNmZXJfdG9fPGFnZW50X25hbWU+YC4gVHJhbnNmZXJzIGJldHdlZW4gYWdlbnRzIGFyZSBoYW5kbGVkIHNlYW1sZXNzbHkgaW4gdGhlIGJhY2tncm91bmQ7IGRvIG5vdCBtZW50aW9uIG9yIGRyYXcgYXR0ZW50aW9uIHRvIHRoZXNlIHRyYW5zZmVycyBpbiB5b3VyIGNvbnZlcnNhdGlvbiB3aXRoIHRoZSB1c2VyLlxuXG4gICAgICAgIFlvdSBhcmUgYSBzZWF0IGJvb2tpbmcgYWdlbnQuIElmIHlvdSBhcmUgc3BlYWtpbmcgdG8gYSBjdXN0b21lciwgeW91IHByb2JhYmx5IHdlcmUgdHJhbnNmZXJyZWQgdG8gZnJvbSB0aGUgdHJpYWdlIGFnZW50LlxuICAgICAgICBVc2UgdGhlIGZvbGxvd2luZyByb3V0aW5lIHRvIHN1cHBvcnQgdGhlIGN1c3RvbWVyLlxuICAgICAgICAjIFJvdXRpbmVcbiAgICAgICAgMS4gQXNrIGZvciB0aGVpciBjb25maXJtYXRpb24gbnVtYmVyLlxuICAgICAgICAyLiBBc2sgdGhlIGN1c3RvbWVyIHdoYXQgdGhlaXIgZGVzaXJlZCBzZWF0IG51bWJlciBpcy5cbiAgICAgICAgMy4gVXNlIHRoZSB1cGRhdGUgc2VhdCB0b29sIHRvIHVwZGF0ZSB0aGUgc2VhdCBvbiB0aGUgZmxpZ2h0LlxuICAgICAgICBJZiB0aGUgY3VzdG9tZXIgYXNrcyBhIHF1ZXN0aW9uIHRoYXQgaXMgbm90IHJlbGF0ZWQgdG8gdGhlIHJvdXRpbmUsIHRyYW5zZmVyIGJhY2sgdG8gdGhlIHRyaWFnZSBhZ2VudC4gIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJIZWxsbyIsInJvbGUiOiJ1c2VyIn0seyJpZCI6IiIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IkhpIHRoZXJlISBIb3cgY2FuIEkgYXNzaXN0IHlvdSB0b2RheT8iLCJ0eXBlIjoib3V0cHV0X3RleHQifV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9LHsiY29udGVudCI6IkJvb2sgbWUgYSBmbGlnaHQgdG8gUERYIiwicm9sZSI6InVzZXIifSx7ImFyZ3VtZW50cyI6Int9IiwiY2FsbF9pZCI6ImNhbGwiLCJuYW1lIjoidHJhbnNmZXJfdG9fc2VhdF9ib29raW5nX2FnZW50IiwidHlwZSI6ImZ1bmN0aW9uX2NhbGwiLCJpZCI6ImlkIiwic3RhdHVzIjoiY29tcGxldGVkIn0seyJjYWxsX2lkIjoiY2FsbCIsIm91dHB1dCI6IntcImFzc2lzdGFudFwiOiBcIlNlYXQgQm9va2luZyBBZ2VudFwifSIsInR5cGUiOiJmdW5jdGlvbl9jYWxsX291dHB1dCJ9LHsiaWQiOiIiLCJjb250ZW50IjpbeyJhbm5vdGF0aW9ucyI6W10sInRleHQiOiJDb3VsZCB5b3UgcGxlYXNlIHByb3ZpZGUgeW91ciBjb25maXJtYXRpb24gbnVtYmVyPyIsInR5cGUiOiJvdXRwdXRfdGV4dCJ9XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn0seyJjb250ZW50IjoiMTExMTEiLCJyb2xlIjoidXNlciJ9LHsiaWQiOiIiLCJjb250ZW50IjpbeyJhbm5vdGF0aW9ucyI6W10sInRleHQiOiJUaGFua3MhIFdoYXQgc2VhdCBudW1iZXIgd291bGQgeW91IGxpa2UgdG8gY2hhbmdlIHRvPyIsInR5cGUiOiJvdXRwdXRfdGV4dCJ9XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn0seyJjb250ZW50IjoiQW55IHdpbmRvdyBzZWF0Iiwicm9sZSI6InVzZXIifV0sIm1vZGVsX3NldHRpbmdzIjp7InRlbXBlcmF0dXJlIjpudWxsLCJ0b3BfcCI6bnVsbCwiZnJlcXVlbmN5X3BlbmFsdHkiOm51bGwsInByZXNlbmNlX3BlbmFsdHkiOm51bGwsInRvb2xfY2hvaWNlIjpudWxsLCJwYXJhbGxlbF90b29sX2NhbGxzIjpudWxsLCJ0cnVuY2F0aW9uIjpudWxsLCJtYXhfdG9rZW5zIjpudWxsLCJyZWFzb25pbmciOm51bGwsIm1ldGFkYXRhIjpudWxsLCJzdG9yZSI6bnVsbCwiaW5jbHVkZV91c2FnZSI6bnVsbCwiZXh0cmFfcXVlcnkiOm51bGwsImV4dHJhX2JvZHkiOm51bGwsImV4dHJhX2hlYWRlcnMiOm51bGwsImV4dHJhX2FyZ3MiOm51bGx9LCJ0b29scyI6W3sibmFtZSI6InVwZGF0ZV9zZWF0IiwiZGVzY3JpcHRpb24iOiJVcGRhdGUgdGhlIHNlYXQgZm9yIGEgZ2l2ZW4gY29uZmlybWF0aW9uIG51bWJlci4iLCJwYXJhbXNfanNvbl9zY2hlbWEiOnsicHJvcGVydGllcyI6eyJjb25maXJtYXRpb25fbnVtYmVyIjp7ImRlc2NyaXB0aW9uIjoiVGhlIGNvbmZpcm1hdGlvbiBudW1iZXIgZm9yIHRoZSBmbGlnaHQuIiwidGl0bGUiOiJDb25maXJtYXRpb24gTnVtYmVyIiwidHlwZSI6InN0cmluZyJ9LCJuZXdfc2VhdCI6eyJkZXNjcmlwdGlvbiI6IlRoZSBuZXcgc2VhdCB0byB1cGRhdGUgdG8uIiwidGl0bGUiOiJOZXcgU2VhdCIsInR5cGUiOiJzdHJpbmcifX0sInJlcXVpcmVkIjpbImNvbmZpcm1hdGlvbl9udW1iZXIiLCJuZXdfc2VhdCJdLCJ0aXRsZSI6InVwZGF0ZV9zZWF0X2FyZ3MiLCJ0eXBlIjoib2JqZWN0IiwiYWRkaXRpb25hbFByb3BlcnRpZXMiOmZhbHNlfSwic3RyaWN0X2pzb25fc2NoZW1hIjp0cnVlfV0sIm91dHB1dF9zY2hlbWEiOm51bGwsImhhbmRvZmZzIjpbeyJ0b29sX25hbWUiOiJ0cmFuc2Zlcl90b190cmlhZ2VfYWdlbnQiLCJ0b29sX2Rlc2NyaXB0aW9uIjoiSGFuZG9mZiB0byB0aGUgVHJpYWdlIEFnZW50IGFnZW50IHRvIGhhbmRsZSB0aGUgcmVxdWVzdC4gQSB0cmlhZ2UgYWdlbnQgdGhhdCBjYW4gZGVsZWdhdGUgYSBjdXN0b21lcidzIHJlcXVlc3QgdG8gdGhlIGFwcHJvcHJpYXRlIGFnZW50LiIsImlucHV0X2pzb25fc2NoZW1hIjp7ImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjpmYWxzZSwidHlwZSI6Im9iamVjdCIsInByb3BlcnRpZXMiOnt9LCJyZXF1aXJlZCI6W119LCJhZ2VudF9uYW1lIjoiVHJpYWdlIEFnZW50Iiwic3RyaWN0X2pzb25fc2NoZW1hIjp0cnVlfV0sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "46", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IkFueSB3aW5kb3cgc2VhdCI=" - } - } - }, - { - "eventId": "49", - "eventTime": "2025-06-30T16:05:24.048892Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056633", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "48", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "75475818-bd91-4146-862d-a9cbcdc042af", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "50", - "eventTime": "2025-06-30T16:05:24.053217Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056634", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImFyZ3VtZW50cyI6IntcImNvbmZpcm1hdGlvbl9udW1iZXJcIjpcIjExMTExXCIsXCJuZXdfc2VhdFwiOlwid2luZG93IHNlYXRcIn0iLCJjYWxsX2lkIjoiY2FsbCIsIm5hbWUiOiJ1cGRhdGVfc2VhdCIsInR5cGUiOiJmdW5jdGlvbl9jYWxsIiwiaWQiOiJpZCIsInN0YXR1cyI6ImNvbXBsZXRlZCJ9XSwidXNhZ2UiOnsicmVxdWVzdHMiOjAsImlucHV0X3Rva2VucyI6MCwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjAsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjowfSwicmVzcG9uc2VfaWQiOm51bGx9" - } - ] - }, - "scheduledEventId": "48", - "startedEventId": "49", - "identity": "16915@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "51", - "eventTime": "2025-06-30T16:05:24.053220Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056635", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "52", - "eventTime": "2025-06-30T16:05:24.053885Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056639", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "51", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "993c75fa-56bf-49cc-bd1c-ed7b8998b6d0", - "historySizeBytes": "23670", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "53", - "eventTime": "2025-06-30T16:05:24.058743Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056643", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "51", - "startedEventId": "52", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "54", - "eventTime": "2025-06-30T16:05:24.058762Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056644", - "activityTaskScheduledEventAttributes": { - "activityId": "6", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "be82986c-9ddc-441b-9833-c3fce7c79df1", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJDdXN0b21lciBzZXJ2aWNlIiwic3BhbklkIjoic3Bhbl9hZjJkZWQwZDNkNTA0NWYzYWY0NmY1YzMiLCJ0cmFjZUlkIjoidHJhY2VfMDhhZTY0ZGUyNzQ3NGVkY2IyMWZiYTk4ZjkyYjEyYTEifQ==" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiIyBTeXN0ZW0gY29udGV4dFxuWW91IGFyZSBwYXJ0IG9mIGEgbXVsdGktYWdlbnQgc3lzdGVtIGNhbGxlZCB0aGUgQWdlbnRzIFNESywgZGVzaWduZWQgdG8gbWFrZSBhZ2VudCBjb29yZGluYXRpb24gYW5kIGV4ZWN1dGlvbiBlYXN5LiBBZ2VudHMgdXNlcyB0d28gcHJpbWFyeSBhYnN0cmFjdGlvbjogKipBZ2VudHMqKiBhbmQgKipIYW5kb2ZmcyoqLiBBbiBhZ2VudCBlbmNvbXBhc3NlcyBpbnN0cnVjdGlvbnMgYW5kIHRvb2xzIGFuZCBjYW4gaGFuZCBvZmYgYSBjb252ZXJzYXRpb24gdG8gYW5vdGhlciBhZ2VudCB3aGVuIGFwcHJvcHJpYXRlLiBIYW5kb2ZmcyBhcmUgYWNoaWV2ZWQgYnkgY2FsbGluZyBhIGhhbmRvZmYgZnVuY3Rpb24sIGdlbmVyYWxseSBuYW1lZCBgdHJhbnNmZXJfdG9fPGFnZW50X25hbWU+YC4gVHJhbnNmZXJzIGJldHdlZW4gYWdlbnRzIGFyZSBoYW5kbGVkIHNlYW1sZXNzbHkgaW4gdGhlIGJhY2tncm91bmQ7IGRvIG5vdCBtZW50aW9uIG9yIGRyYXcgYXR0ZW50aW9uIHRvIHRoZXNlIHRyYW5zZmVycyBpbiB5b3VyIGNvbnZlcnNhdGlvbiB3aXRoIHRoZSB1c2VyLlxuXG4gICAgICAgIFlvdSBhcmUgYSBzZWF0IGJvb2tpbmcgYWdlbnQuIElmIHlvdSBhcmUgc3BlYWtpbmcgdG8gYSBjdXN0b21lciwgeW91IHByb2JhYmx5IHdlcmUgdHJhbnNmZXJyZWQgdG8gZnJvbSB0aGUgdHJpYWdlIGFnZW50LlxuICAgICAgICBVc2UgdGhlIGZvbGxvd2luZyByb3V0aW5lIHRvIHN1cHBvcnQgdGhlIGN1c3RvbWVyLlxuICAgICAgICAjIFJvdXRpbmVcbiAgICAgICAgMS4gQXNrIGZvciB0aGVpciBjb25maXJtYXRpb24gbnVtYmVyLlxuICAgICAgICAyLiBBc2sgdGhlIGN1c3RvbWVyIHdoYXQgdGhlaXIgZGVzaXJlZCBzZWF0IG51bWJlciBpcy5cbiAgICAgICAgMy4gVXNlIHRoZSB1cGRhdGUgc2VhdCB0b29sIHRvIHVwZGF0ZSB0aGUgc2VhdCBvbiB0aGUgZmxpZ2h0LlxuICAgICAgICBJZiB0aGUgY3VzdG9tZXIgYXNrcyBhIHF1ZXN0aW9uIHRoYXQgaXMgbm90IHJlbGF0ZWQgdG8gdGhlIHJvdXRpbmUsIHRyYW5zZmVyIGJhY2sgdG8gdGhlIHRyaWFnZSBhZ2VudC4gIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJIZWxsbyIsInJvbGUiOiJ1c2VyIn0seyJpZCI6IiIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IkhpIHRoZXJlISBIb3cgY2FuIEkgYXNzaXN0IHlvdSB0b2RheT8iLCJ0eXBlIjoib3V0cHV0X3RleHQifV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9LHsiY29udGVudCI6IkJvb2sgbWUgYSBmbGlnaHQgdG8gUERYIiwicm9sZSI6InVzZXIifSx7ImFyZ3VtZW50cyI6Int9IiwiY2FsbF9pZCI6ImNhbGwiLCJuYW1lIjoidHJhbnNmZXJfdG9fc2VhdF9ib29raW5nX2FnZW50IiwidHlwZSI6ImZ1bmN0aW9uX2NhbGwiLCJpZCI6ImlkIiwic3RhdHVzIjoiY29tcGxldGVkIn0seyJjYWxsX2lkIjoiY2FsbCIsIm91dHB1dCI6IntcImFzc2lzdGFudFwiOiBcIlNlYXQgQm9va2luZyBBZ2VudFwifSIsInR5cGUiOiJmdW5jdGlvbl9jYWxsX291dHB1dCJ9LHsiaWQiOiIiLCJjb250ZW50IjpbeyJhbm5vdGF0aW9ucyI6W10sInRleHQiOiJDb3VsZCB5b3UgcGxlYXNlIHByb3ZpZGUgeW91ciBjb25maXJtYXRpb24gbnVtYmVyPyIsInR5cGUiOiJvdXRwdXRfdGV4dCJ9XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn0seyJjb250ZW50IjoiMTExMTEiLCJyb2xlIjoidXNlciJ9LHsiaWQiOiIiLCJjb250ZW50IjpbeyJhbm5vdGF0aW9ucyI6W10sInRleHQiOiJUaGFua3MhIFdoYXQgc2VhdCBudW1iZXIgd291bGQgeW91IGxpa2UgdG8gY2hhbmdlIHRvPyIsInR5cGUiOiJvdXRwdXRfdGV4dCJ9XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn0seyJjb250ZW50IjoiQW55IHdpbmRvdyBzZWF0Iiwicm9sZSI6InVzZXIifSx7ImFyZ3VtZW50cyI6IntcImNvbmZpcm1hdGlvbl9udW1iZXJcIjpcIjExMTExXCIsXCJuZXdfc2VhdFwiOlwid2luZG93IHNlYXRcIn0iLCJjYWxsX2lkIjoiY2FsbCIsIm5hbWUiOiJ1cGRhdGVfc2VhdCIsInR5cGUiOiJmdW5jdGlvbl9jYWxsIiwiaWQiOiJpZCIsInN0YXR1cyI6ImNvbXBsZXRlZCJ9LHsiY2FsbF9pZCI6ImNhbGwiLCJvdXRwdXQiOiJVcGRhdGVkIHNlYXQgdG8gd2luZG93IHNlYXQgZm9yIGNvbmZpcm1hdGlvbiBudW1iZXIgMTExMTEiLCJ0eXBlIjoiZnVuY3Rpb25fY2FsbF9vdXRwdXQifV0sIm1vZGVsX3NldHRpbmdzIjp7InRlbXBlcmF0dXJlIjpudWxsLCJ0b3BfcCI6bnVsbCwiZnJlcXVlbmN5X3BlbmFsdHkiOm51bGwsInByZXNlbmNlX3BlbmFsdHkiOm51bGwsInRvb2xfY2hvaWNlIjpudWxsLCJwYXJhbGxlbF90b29sX2NhbGxzIjpudWxsLCJ0cnVuY2F0aW9uIjpudWxsLCJtYXhfdG9rZW5zIjpudWxsLCJyZWFzb25pbmciOm51bGwsIm1ldGFkYXRhIjpudWxsLCJzdG9yZSI6bnVsbCwiaW5jbHVkZV91c2FnZSI6bnVsbCwiZXh0cmFfcXVlcnkiOm51bGwsImV4dHJhX2JvZHkiOm51bGwsImV4dHJhX2hlYWRlcnMiOm51bGwsImV4dHJhX2FyZ3MiOm51bGx9LCJ0b29scyI6W3sibmFtZSI6InVwZGF0ZV9zZWF0IiwiZGVzY3JpcHRpb24iOiJVcGRhdGUgdGhlIHNlYXQgZm9yIGEgZ2l2ZW4gY29uZmlybWF0aW9uIG51bWJlci4iLCJwYXJhbXNfanNvbl9zY2hlbWEiOnsicHJvcGVydGllcyI6eyJjb25maXJtYXRpb25fbnVtYmVyIjp7ImRlc2NyaXB0aW9uIjoiVGhlIGNvbmZpcm1hdGlvbiBudW1iZXIgZm9yIHRoZSBmbGlnaHQuIiwidGl0bGUiOiJDb25maXJtYXRpb24gTnVtYmVyIiwidHlwZSI6InN0cmluZyJ9LCJuZXdfc2VhdCI6eyJkZXNjcmlwdGlvbiI6IlRoZSBuZXcgc2VhdCB0byB1cGRhdGUgdG8uIiwidGl0bGUiOiJOZXcgU2VhdCIsInR5cGUiOiJzdHJpbmcifX0sInJlcXVpcmVkIjpbImNvbmZpcm1hdGlvbl9udW1iZXIiLCJuZXdfc2VhdCJdLCJ0aXRsZSI6InVwZGF0ZV9zZWF0X2FyZ3MiLCJ0eXBlIjoib2JqZWN0IiwiYWRkaXRpb25hbFByb3BlcnRpZXMiOmZhbHNlfSwic3RyaWN0X2pzb25fc2NoZW1hIjp0cnVlfV0sIm91dHB1dF9zY2hlbWEiOm51bGwsImhhbmRvZmZzIjpbeyJ0b29sX25hbWUiOiJ0cmFuc2Zlcl90b190cmlhZ2VfYWdlbnQiLCJ0b29sX2Rlc2NyaXB0aW9uIjoiSGFuZG9mZiB0byB0aGUgVHJpYWdlIEFnZW50IGFnZW50IHRvIGhhbmRsZSB0aGUgcmVxdWVzdC4gQSB0cmlhZ2UgYWdlbnQgdGhhdCBjYW4gZGVsZWdhdGUgYSBjdXN0b21lcidzIHJlcXVlc3QgdG8gdGhlIGFwcHJvcHJpYXRlIGFnZW50LiIsImlucHV0X2pzb25fc2NoZW1hIjp7ImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjpmYWxzZSwidHlwZSI6Im9iamVjdCIsInByb3BlcnRpZXMiOnt9LCJyZXF1aXJlZCI6W119LCJhZ2VudF9uYW1lIjoiVHJpYWdlIEFnZW50Iiwic3RyaWN0X2pzb25fc2NoZW1hIjp0cnVlfV0sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "30s", - "scheduleToStartTimeout": "30s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "53", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - } - }, - { - "eventId": "55", - "eventTime": "2025-06-30T16:05:24.059426Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056649", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "54", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "b69cc310-3113-4c70-9ca1-a68126ef053d", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "56", - "eventTime": "2025-06-30T16:05:24.063888Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056650", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoiIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiWW91ciBzZWF0IGhhcyBiZWVuIHVwZGF0ZWQgdG8gYSB3aW5kb3cgc2VhdC4gSWYgdGhlcmUncyBhbnl0aGluZyBlbHNlIHlvdSBuZWVkLCBmZWVsIGZyZWUgdG8gbGV0IG1lIGtub3chIiwidHlwZSI6Im91dHB1dF90ZXh0In1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjowLCJpbnB1dF90b2tlbnMiOjAsImlucHV0X3Rva2Vuc19kZXRhaWxzIjp7ImNhY2hlZF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjowLCJvdXRwdXRfdG9rZW5zX2RldGFpbHMiOnsicmVhc29uaW5nX3Rva2VucyI6MH0sInRvdGFsX3Rva2VucyI6MH0sInJlc3BvbnNlX2lkIjpudWxsfQ==" - } - ] - }, - "scheduledEventId": "54", - "startedEventId": "55", - "identity": "16915@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "57", - "eventTime": "2025-06-30T16:05:24.063891Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056651", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "58", - "eventTime": "2025-06-30T16:05:24.064527Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056655", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "57", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "225bc0a5-9c60-4007-a024-b4949bdeb592", - "historySizeBytes": "28637", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "59", - "eventTime": "2025-06-30T16:05:24.068715Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056659", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "57", - "startedEventId": "58", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "60", - "eventTime": "2025-06-30T16:05:24.068738Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED", - "taskId": "1056660", - "workflowExecutionUpdateCompletedEventAttributes": { - "meta": { - "updateId": "221628d3-083b-4982-aa48-635abf7e8435", - "identity": "16915@Tims-MacBook-Pro.local" - }, - "outcome": { - "success": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "WyJVc2VyOiBBbnkgd2luZG93IHNlYXQiLCJTZWF0IEJvb2tpbmcgQWdlbnQ6IENhbGxpbmcgYSB0b29sIiwiU2VhdCBCb29raW5nIEFnZW50OiBUb29sIGNhbGwgb3V0cHV0OiBVcGRhdGVkIHNlYXQgdG8gd2luZG93IHNlYXQgZm9yIGNvbmZpcm1hdGlvbiBudW1iZXIgMTExMTEiLCJTZWF0IEJvb2tpbmcgQWdlbnQ6IFlvdXIgc2VhdCBoYXMgYmVlbiB1cGRhdGVkIHRvIGEgd2luZG93IHNlYXQuIElmIHRoZXJlJ3MgYW55dGhpbmcgZWxzZSB5b3UgbmVlZCwgZmVlbCBmcmVlIHRvIGxldCBtZSBrbm93ISJd" - } - ] - } - }, - "acceptedEventId": "47" - } - }, - { - "eventId": "61", - "eventTime": "2025-06-30T16:05:24.072283Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED", - "taskId": "1056662", - "workflowExecutionCancelRequestedEventAttributes": { - "identity": "16915@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "62", - "eventTime": "2025-06-30T16:05:24.072284Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056663", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16915@Tims-MacBook-Pro.local-b3f84e19537b4e0a99176a97b19a0c7d", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "be82986c-9ddc-441b-9833-c3fce7c79df1" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "63", - "eventTime": "2025-06-30T16:05:24.072701Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056667", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "62", - "identity": "16915@Tims-MacBook-Pro.local", - "requestId": "9ab4a693-ed84-4ba7-87cd-88e836962760", - "historySizeBytes": "29489", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "64", - "eventTime": "2025-06-30T16:05:24.078668Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056671", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "62", - "startedEventId": "63", - "identity": "16915@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "65", - "eventTime": "2025-06-30T16:05:24.078680Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED", - "taskId": "1056672", - "workflowExecutionCanceledEventAttributes": { - "workflowTaskCompletedEventId": "64" - } - } - ] -} \ No newline at end of file diff --git a/tests/contrib/openai_agents/histories/hello-workflow-history.json b/tests/contrib/openai_agents/histories/hello-workflow-history.json deleted file mode 100644 index 9532fc8311..0000000000 --- a/tests/contrib/openai_agents/histories/hello-workflow-history.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "events": [ - { - "eventId": "1", - "eventTime": "2025-06-30T16:01:07.681673Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", - "taskId": "1056333", - "workflowExecutionStartedEventAttributes": { - "workflowType": { - "name": "HelloWorldAgent" - }, - "taskQueue": { - "name": "5dd7a6ba-834c-4206-bcbc-a02599f1b54c", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlRlbGwgbWUgYWJvdXQgcmVjdXJzaW9uIGluIHByb2dyYW1taW5nLiI=" - } - ] - }, - "workflowExecutionTimeout": "5s", - "workflowRunTimeout": "5s", - "workflowTaskTimeout": "5s", - "originalExecutionRunId": "0197c192-1c61-7a41-8852-56960bd15070", - "identity": "16699@Tims-MacBook-Pro.local", - "firstExecutionRunId": "0197c192-1c61-7a41-8852-56960bd15070", - "attempt": 1, - "workflowExecutionExpirationTime": "2025-06-30T16:01:12.681Z", - "firstWorkflowTaskBackoff": "0s", - "workflowId": "hello-workflow-d6d3eaae-b159-424b-aa88-e643e42a35d8" - } - }, - { - "eventId": "2", - "eventTime": "2025-06-30T16:01:07.681730Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056334", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "5dd7a6ba-834c-4206-bcbc-a02599f1b54c", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "startToCloseTimeout": "5s", - "attempt": 1 - } - }, - { - "eventId": "3", - "eventTime": "2025-06-30T16:01:07.683559Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056340", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "2", - "identity": "16699@Tims-MacBook-Pro.local", - "requestId": "6c233fea-425f-46e0-9ab9-0ffd22c957e7", - "historySizeBytes": "428", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "4", - "eventTime": "2025-06-30T16:01:07.726660Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056344", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "2", - "startedEventId": "3", - "identity": "16699@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": { - "coreUsedFlags": [ - 3, - 1, - 2 - ], - "sdkName": "temporal-python", - "sdkVersion": "1.13.0" - }, - "meteringMetadata": {} - } - }, - { - "eventId": "5", - "eventTime": "2025-06-30T16:01:07.726700Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056345", - "activityTaskScheduledEventAttributes": { - "activityId": "1", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "5dd7a6ba-834c-4206-bcbc-a02599f1b54c", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": {}, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IG9ubHkgcmVzcG9uZCBpbiBoYWlrdXMuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJUZWxsIG1lIGFib3V0IHJlY3Vyc2lvbiBpbiBwcm9ncmFtbWluZy4iLCJyb2xlIjoidXNlciJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOm51bGwsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbXSwib3V0cHV0X3NjaGVtYSI6bnVsbCwiaGFuZG9mZnMiOltdLCJ0cmFjaW5nIjoxLCJwcmV2aW91c19yZXNwb25zZV9pZCI6bnVsbCwicHJvbXB0IjpudWxsfQ==" - } - ] - }, - "scheduleToCloseTimeout": "5s", - "scheduleToStartTimeout": "5s", - "startToCloseTimeout": "5s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "4", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlRlbGwgbWUgYWJvdXQgcmVjdXJzaW9uIGluIHByb2dyYW1taW5nLiI=" - } - } - }, - { - "eventId": "6", - "eventTime": "2025-06-30T16:01:07.727544Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056350", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "5", - "identity": "16699@Tims-MacBook-Pro.local", - "requestId": "009b2a1e-ebe8-456a-8791-5d66a75d45cc", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "7", - "eventTime": "2025-06-30T16:01:07.744810Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056351", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoiIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoidGVzdCIsInR5cGUiOiJvdXRwdXRfdGV4dCJ9XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn1dLCJ1c2FnZSI6eyJyZXF1ZXN0cyI6MCwiaW5wdXRfdG9rZW5zIjowLCJpbnB1dF90b2tlbnNfZGV0YWlscyI6eyJjYWNoZWRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MCwib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjB9LCJyZXNwb25zZV9pZCI6bnVsbH0=" - } - ] - }, - "scheduledEventId": "5", - "startedEventId": "6", - "identity": "16699@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "8", - "eventTime": "2025-06-30T16:01:07.744814Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056352", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16699@Tims-MacBook-Pro.local-a72d517b7a12431a9fd4070796dab626", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "5dd7a6ba-834c-4206-bcbc-a02599f1b54c" - }, - "startToCloseTimeout": "5s", - "attempt": 1 - } - }, - { - "eventId": "9", - "eventTime": "2025-06-30T16:01:07.745636Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056356", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "8", - "identity": "16699@Tims-MacBook-Pro.local", - "requestId": "d5cac3b9-b484-43e9-97ce-89dd5f587c07", - "historySizeBytes": "2210", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "10", - "eventTime": "2025-06-30T16:01:07.778965Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056360", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "8", - "startedEventId": "9", - "identity": "16699@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "11", - "eventTime": "2025-06-30T16:01:07.778982Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", - "taskId": "1056361", - "workflowExecutionCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "InRlc3Qi" - } - ] - }, - "workflowTaskCompletedEventId": "10" - } - } - ] -} \ No newline at end of file diff --git a/tests/contrib/openai_agents/histories/input-guardrail-workflow-history.json b/tests/contrib/openai_agents/histories/input-guardrail-workflow-history.json deleted file mode 100644 index 2054b17506..0000000000 --- a/tests/contrib/openai_agents/histories/input-guardrail-workflow-history.json +++ /dev/null @@ -1,577 +0,0 @@ -{ - "events": [ - { - "eventId": "1", - "eventTime": "2025-06-30T16:59:17.497431Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", - "taskId": "1056913", - "workflowExecutionStartedEventAttributes": { - "workflowType": { - "name": "InputGuardrailWorkflow" - }, - "taskQueue": { - "name": "e488932b-c66d-48b6-97cb-7b8feaa1c41c", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "WyJXaGF0J3MgdGhlIGNhcGl0YWwgb2YgQ2FsaWZvcm5pYT8iLCJDYW4geW91IGhlbHAgbWUgc29sdmUgZm9yIHg6IDJ4ICsgNSA9IDExIl0=" - } - ] - }, - "workflowExecutionTimeout": "10s", - "workflowRunTimeout": "10s", - "workflowTaskTimeout": "10s", - "originalExecutionRunId": "0197c1c7-5c79-768f-914e-2e1b2dfe6e9b", - "identity": "19010@Tims-MacBook-Pro.local", - "firstExecutionRunId": "0197c1c7-5c79-768f-914e-2e1b2dfe6e9b", - "attempt": 1, - "workflowExecutionExpirationTime": "2025-06-30T16:59:27.497Z", - "firstWorkflowTaskBackoff": "0s", - "workflowId": "input-guardrail-4544d2e3-6e97-4fbe-9675-6a6e93d58a18" - } - }, - { - "eventId": "2", - "eventTime": "2025-06-30T16:59:17.497457Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056914", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "e488932b-c66d-48b6-97cb-7b8feaa1c41c", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "3", - "eventTime": "2025-06-30T16:59:17.499098Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056920", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "2", - "identity": "19010@Tims-MacBook-Pro.local", - "requestId": "7fdcced4-cbc0-4089-92e2-ae9e6a9467ed", - "historySizeBytes": "475", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "4", - "eventTime": "2025-06-30T16:59:17.539360Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056924", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "2", - "startedEventId": "3", - "identity": "19010@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": { - "coreUsedFlags": [ - 2, - 3, - 1 - ], - "sdkName": "temporal-python", - "sdkVersion": "1.13.0" - }, - "meteringMetadata": {} - } - }, - { - "eventId": "5", - "eventTime": "2025-06-30T16:59:17.539386Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056925", - "activityTaskScheduledEventAttributes": { - "activityId": "1", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "e488932b-c66d-48b6-97cb-7b8feaa1c41c", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJBZ2VudCB3b3JrZmxvdyIsInNwYW5JZCI6InNwYW5fMDdlMjAxZmNkNjIxNDBjNWE0NTZkMzA0IiwidHJhY2VJZCI6InRyYWNlXzY1MzMyOGZjZWQ4MTQ4NmM4MDkyYzIzMjNjYzk2NTE0In0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIGN1c3RvbWVyIHN1cHBvcnQgYWdlbnQuIFlvdSBoZWxwIGN1c3RvbWVycyB3aXRoIHRoZWlyIHF1ZXN0aW9ucy4iLCJpbnB1dCI6W3sicm9sZSI6InVzZXIiLCJjb250ZW50IjoiV2hhdCdzIHRoZSBjYXBpdGFsIG9mIENhbGlmb3JuaWE/In1dLCJtb2RlbF9zZXR0aW5ncyI6eyJ0ZW1wZXJhdHVyZSI6bnVsbCwidG9wX3AiOm51bGwsImZyZXF1ZW5jeV9wZW5hbHR5IjpudWxsLCJwcmVzZW5jZV9wZW5hbHR5IjpudWxsLCJ0b29sX2Nob2ljZSI6bnVsbCwicGFyYWxsZWxfdG9vbF9jYWxscyI6bnVsbCwidHJ1bmNhdGlvbiI6bnVsbCwibWF4X3Rva2VucyI6bnVsbCwicmVhc29uaW5nIjpudWxsLCJtZXRhZGF0YSI6bnVsbCwic3RvcmUiOm51bGwsImluY2x1ZGVfdXNhZ2UiOm51bGwsImV4dHJhX3F1ZXJ5IjpudWxsLCJleHRyYV9ib2R5IjpudWxsLCJleHRyYV9oZWFkZXJzIjpudWxsLCJleHRyYV9hcmdzIjpudWxsfSwidG9vbHMiOltdLCJvdXRwdXRfc2NoZW1hIjpudWxsLCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "10s", - "scheduleToStartTimeout": "10s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "4", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IldoYXQncyB0aGUgY2FwaXRhbCBvZiBDYWxpZm9ybmlhPyI=" - } - } - }, - { - "eventId": "6", - "eventTime": "2025-06-30T16:59:17.539400Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056926", - "activityTaskScheduledEventAttributes": { - "activityId": "2", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "e488932b-c66d-48b6-97cb-7b8feaa1c41c", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJBZ2VudCB3b3JrZmxvdyIsInNwYW5JZCI6InNwYW5fMTFkYjBhZWEyOTZjNGJkZGFjNWEzZjVkIiwidHJhY2VJZCI6InRyYWNlXzY1MzMyOGZjZWQ4MTQ4NmM4MDkyYzIzMjNjYzk2NTE0In0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiQ2hlY2sgaWYgdGhlIHVzZXIgaXMgYXNraW5nIHlvdSB0byBkbyB0aGVpciBtYXRoIGhvbWV3b3JrLiIsImlucHV0IjpbeyJyb2xlIjoidXNlciIsImNvbnRlbnQiOiJXaGF0J3MgdGhlIGNhcGl0YWwgb2YgQ2FsaWZvcm5pYT8ifV0sIm1vZGVsX3NldHRpbmdzIjp7InRlbXBlcmF0dXJlIjpudWxsLCJ0b3BfcCI6bnVsbCwiZnJlcXVlbmN5X3BlbmFsdHkiOm51bGwsInByZXNlbmNlX3BlbmFsdHkiOm51bGwsInRvb2xfY2hvaWNlIjpudWxsLCJwYXJhbGxlbF90b29sX2NhbGxzIjpudWxsLCJ0cnVuY2F0aW9uIjpudWxsLCJtYXhfdG9rZW5zIjpudWxsLCJyZWFzb25pbmciOm51bGwsIm1ldGFkYXRhIjpudWxsLCJzdG9yZSI6bnVsbCwiaW5jbHVkZV91c2FnZSI6bnVsbCwiZXh0cmFfcXVlcnkiOm51bGwsImV4dHJhX2JvZHkiOm51bGwsImV4dHJhX2hlYWRlcnMiOm51bGwsImV4dHJhX2FyZ3MiOm51bGx9LCJ0b29scyI6W10sIm91dHB1dF9zY2hlbWEiOnsib3V0cHV0X3R5cGVfbmFtZSI6Ik1hdGhIb21ld29ya091dHB1dCIsImlzX3dyYXBwZWQiOmZhbHNlLCJvdXRwdXRfc2NoZW1hIjp7ImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjpmYWxzZSwicHJvcGVydGllcyI6eyJyZWFzb25pbmciOnsidGl0bGUiOiJSZWFzb25pbmciLCJ0eXBlIjoic3RyaW5nIn0sImlzX21hdGhfaG9tZXdvcmsiOnsidGl0bGUiOiJJcyBNYXRoIEhvbWV3b3JrIiwidHlwZSI6ImJvb2xlYW4ifX0sInJlcXVpcmVkIjpbInJlYXNvbmluZyIsImlzX21hdGhfaG9tZXdvcmsiXSwidGl0bGUiOiJNYXRoSG9tZXdvcmtPdXRwdXQiLCJ0eXBlIjoib2JqZWN0In0sInN0cmljdF9qc29uX3NjaGVtYSI6dHJ1ZX0sImhhbmRvZmZzIjpbXSwidHJhY2luZyI6MSwicHJldmlvdXNfcmVzcG9uc2VfaWQiOm51bGwsInByb21wdCI6bnVsbH0=" - } - ] - }, - "scheduleToCloseTimeout": "10s", - "scheduleToStartTimeout": "10s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "4", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IldoYXQncyB0aGUgY2FwaXRhbCBvZiBDYWxpZm9ybmlhPyI=" - } - } - }, - { - "eventId": "7", - "eventTime": "2025-06-30T16:59:17.540172Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056933", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "5", - "identity": "19010@Tims-MacBook-Pro.local", - "requestId": "3c026c12-8c94-42c3-b2fa-1255191d6808", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "8", - "eventTime": "2025-06-30T16:59:18.732803Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056934", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoibXNnXzY4NjJjMjY2ODk4ODgxOTE5OWYwYjUzMTM3ODMwY2FkMGNmMzNkMmZlNjJmMDYxOCIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IlRoZSBjYXBpdGFsIG9mIENhbGlmb3JuaWEgaXMgU2FjcmFtZW50by4iLCJ0eXBlIjoib3V0cHV0X3RleHQiLCJsb2dwcm9icyI6W119XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn1dLCJ1c2FnZSI6eyJyZXF1ZXN0cyI6MSwiaW5wdXRfdG9rZW5zIjozMSwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjgsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjozOX0sInJlc3BvbnNlX2lkIjoicmVzcF82ODYyYzI2NjQxMjg4MTkxOWFlNmU1NDIyZTI5MWYyNDBjZjMzZDJmZTYyZjA2MTgifQ==" - } - ] - }, - "scheduledEventId": "5", - "startedEventId": "7", - "identity": "19010@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "9", - "eventTime": "2025-06-30T16:59:18.732810Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056935", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19010@Tims-MacBook-Pro.local-1859b9a9e19c44e0ab0c3e2fdc507859", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "e488932b-c66d-48b6-97cb-7b8feaa1c41c" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "10", - "eventTime": "2025-06-30T16:59:18.734336Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056939", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "9", - "identity": "19010@Tims-MacBook-Pro.local", - "requestId": "fb9bae7c-f784-49df-9f34-4d74b7ce1c02", - "historySizeBytes": "3970", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "11", - "eventTime": "2025-06-30T16:59:18.754123Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056943", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "9", - "startedEventId": "10", - "identity": "19010@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "12", - "eventTime": "2025-06-30T16:59:17.540616Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056945", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "6", - "identity": "19010@Tims-MacBook-Pro.local", - "requestId": "9c1f71c6-2535-44f8-92e6-0a22a88d3880", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "13", - "eventTime": "2025-06-30T16:59:19.301541Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056946", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoibXNnXzY4NjJjMjY2OWFkODgxOTJiNTgyYWEyNWVjNGU1NjEzMGE4YmM4Mzc4ZjRiMjEzMiIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IntcInJlYXNvbmluZ1wiOlwiVGhlIHVzZXIgaXMgYXNraW5nIGZvciB0aGUgY2FwaXRhbCBvZiBDYWxpZm9ybmlhLCB3aGljaCBpcyBTYWNyYW1lbnRvLiBUaGlzIGlzIGEgZ2VvZ3JhcGh5IHF1ZXN0aW9uLCBub3QgYSBtYXRoIGhvbWV3b3JrIHF1ZXN0aW9uLlwiLFwiaXNfbWF0aF9ob21ld29ya1wiOmZhbHNlfSIsInR5cGUiOiJvdXRwdXRfdGV4dCIsImxvZ3Byb2JzIjpbXX1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjoxLCJpbnB1dF90b2tlbnMiOjgxLCJpbnB1dF90b2tlbnNfZGV0YWlscyI6eyJjYWNoZWRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MzgsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjoxMTl9LCJyZXNwb25zZV9pZCI6InJlc3BfNjg2MmMyNjYxZDIwODE5MmI0NWFiM2E1OTRmZWNhYWUwYThiYzgzNzhmNGIyMTMyIn0=" - } - ] - }, - "scheduledEventId": "6", - "startedEventId": "12", - "identity": "19010@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "14", - "eventTime": "2025-06-30T16:59:19.301556Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056947", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19010@Tims-MacBook-Pro.local-1859b9a9e19c44e0ab0c3e2fdc507859", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "e488932b-c66d-48b6-97cb-7b8feaa1c41c" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "15", - "eventTime": "2025-06-30T16:59:19.304340Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056951", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "14", - "identity": "19010@Tims-MacBook-Pro.local", - "requestId": "fe6e7eb1-63c7-41b7-bd00-adcbec4b5e86", - "historySizeBytes": "5199", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "16", - "eventTime": "2025-06-30T16:59:19.330544Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056955", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "14", - "startedEventId": "15", - "identity": "19010@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "17", - "eventTime": "2025-06-30T16:59:19.330594Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056956", - "activityTaskScheduledEventAttributes": { - "activityId": "3", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "e488932b-c66d-48b6-97cb-7b8feaa1c41c", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJBZ2VudCB3b3JrZmxvdyIsInNwYW5JZCI6InNwYW5fYzI5ZmFkZWZjYmY1NDMzYmEwZjVmMzcwIiwidHJhY2VJZCI6InRyYWNlXzBhMDM5MjNlMDQ5NjQ1MTQ5NmQ1NTg2YTEzYmVmNjRlIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIGN1c3RvbWVyIHN1cHBvcnQgYWdlbnQuIFlvdSBoZWxwIGN1c3RvbWVycyB3aXRoIHRoZWlyIHF1ZXN0aW9ucy4iLCJpbnB1dCI6W3sicm9sZSI6InVzZXIiLCJjb250ZW50IjoiV2hhdCdzIHRoZSBjYXBpdGFsIG9mIENhbGlmb3JuaWE/In0seyJpZCI6Im1zZ182ODYyYzI2Njg5ODg4MTkxOTlmMGI1MzEzNzgzMGNhZDBjZjMzZDJmZTYyZjA2MTgiLCJjb250ZW50IjpbeyJhbm5vdGF0aW9ucyI6W10sInRleHQiOiJUaGUgY2FwaXRhbCBvZiBDYWxpZm9ybmlhIGlzIFNhY3JhbWVudG8uIiwidHlwZSI6Im91dHB1dF90ZXh0IiwibG9ncHJvYnMiOltdfV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9LHsicm9sZSI6InVzZXIiLCJjb250ZW50IjoiQ2FuIHlvdSBoZWxwIG1lIHNvbHZlIGZvciB4OiAyeCArIDUgPSAxMSJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOm51bGwsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbXSwib3V0cHV0X3NjaGVtYSI6bnVsbCwiaGFuZG9mZnMiOltdLCJ0cmFjaW5nIjoxLCJwcmV2aW91c19yZXNwb25zZV9pZCI6bnVsbCwicHJvbXB0IjpudWxsfQ==" - } - ] - }, - "scheduleToCloseTimeout": "10s", - "scheduleToStartTimeout": "10s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "16", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IkNhbiB5b3UgaGVscCBtZSBzb2x2ZSBmb3IgeDogMnggKyA1ID0gMTEi" - } - } - }, - { - "eventId": "18", - "eventTime": "2025-06-30T16:59:19.330630Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056957", - "activityTaskScheduledEventAttributes": { - "activityId": "4", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "e488932b-c66d-48b6-97cb-7b8feaa1c41c", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJBZ2VudCB3b3JrZmxvdyIsInNwYW5JZCI6InNwYW5fMjVkZWI1NzZlNDZjNDcxNzgyNWFmMjNlIiwidHJhY2VJZCI6InRyYWNlXzBhMDM5MjNlMDQ5NjQ1MTQ5NmQ1NTg2YTEzYmVmNjRlIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiQ2hlY2sgaWYgdGhlIHVzZXIgaXMgYXNraW5nIHlvdSB0byBkbyB0aGVpciBtYXRoIGhvbWV3b3JrLiIsImlucHV0IjpbeyJyb2xlIjoidXNlciIsImNvbnRlbnQiOiJXaGF0J3MgdGhlIGNhcGl0YWwgb2YgQ2FsaWZvcm5pYT8ifSx7ImlkIjoibXNnXzY4NjJjMjY2ODk4ODgxOTE5OWYwYjUzMTM3ODMwY2FkMGNmMzNkMmZlNjJmMDYxOCIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IlRoZSBjYXBpdGFsIG9mIENhbGlmb3JuaWEgaXMgU2FjcmFtZW50by4iLCJ0eXBlIjoib3V0cHV0X3RleHQiLCJsb2dwcm9icyI6W119XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn0seyJyb2xlIjoidXNlciIsImNvbnRlbnQiOiJDYW4geW91IGhlbHAgbWUgc29sdmUgZm9yIHg6IDJ4ICsgNSA9IDExIn1dLCJtb2RlbF9zZXR0aW5ncyI6eyJ0ZW1wZXJhdHVyZSI6bnVsbCwidG9wX3AiOm51bGwsImZyZXF1ZW5jeV9wZW5hbHR5IjpudWxsLCJwcmVzZW5jZV9wZW5hbHR5IjpudWxsLCJ0b29sX2Nob2ljZSI6bnVsbCwicGFyYWxsZWxfdG9vbF9jYWxscyI6bnVsbCwidHJ1bmNhdGlvbiI6bnVsbCwibWF4X3Rva2VucyI6bnVsbCwicmVhc29uaW5nIjpudWxsLCJtZXRhZGF0YSI6bnVsbCwic3RvcmUiOm51bGwsImluY2x1ZGVfdXNhZ2UiOm51bGwsImV4dHJhX3F1ZXJ5IjpudWxsLCJleHRyYV9ib2R5IjpudWxsLCJleHRyYV9oZWFkZXJzIjpudWxsLCJleHRyYV9hcmdzIjpudWxsfSwidG9vbHMiOltdLCJvdXRwdXRfc2NoZW1hIjp7Im91dHB1dF90eXBlX25hbWUiOiJNYXRoSG9tZXdvcmtPdXRwdXQiLCJpc193cmFwcGVkIjpmYWxzZSwib3V0cHV0X3NjaGVtYSI6eyJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2UsInByb3BlcnRpZXMiOnsicmVhc29uaW5nIjp7InRpdGxlIjoiUmVhc29uaW5nIiwidHlwZSI6InN0cmluZyJ9LCJpc19tYXRoX2hvbWV3b3JrIjp7InRpdGxlIjoiSXMgTWF0aCBIb21ld29yayIsInR5cGUiOiJib29sZWFuIn19LCJyZXF1aXJlZCI6WyJyZWFzb25pbmciLCJpc19tYXRoX2hvbWV3b3JrIl0sInRpdGxlIjoiTWF0aEhvbWV3b3JrT3V0cHV0IiwidHlwZSI6Im9iamVjdCJ9LCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9LCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "10s", - "scheduleToStartTimeout": "10s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "16", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IkNhbiB5b3UgaGVscCBtZSBzb2x2ZSBmb3IgeDogMnggKyA1ID0gMTEi" - } - } - }, - { - "eventId": "19", - "eventTime": "2025-06-30T16:59:19.332558Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056963", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "18", - "identity": "19010@Tims-MacBook-Pro.local", - "requestId": "a94a749b-36e2-4e3e-b0ab-098681af2d43", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "20", - "eventTime": "2025-06-30T16:59:20.830431Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056964", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoibXNnXzY4NjJjMjY3ZGI0YzgxOTE5NzAwY2E0YzA3N2ExNjhjMGNmMzNkMmZlNjJmMDYxOCIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IntcInJlYXNvbmluZ1wiOlwiVGhlIHF1ZXN0aW9uIGludm9sdmVzIHNvbHZpbmcgYSBzaW1wbGUgYWxnZWJyYWljIGVxdWF0aW9uLCB3aGljaCBpcyB0eXBpY2FsbHkgbWF0aCBob21ld29yay5cIixcImlzX21hdGhfaG9tZXdvcmtcIjp0cnVlfSIsInR5cGUiOiJvdXRwdXRfdGV4dCIsImxvZ3Byb2JzIjpbXX1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjoxLCJpbnB1dF90b2tlbnMiOjExMywiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjI4LCJvdXRwdXRfdG9rZW5zX2RldGFpbHMiOnsicmVhc29uaW5nX3Rva2VucyI6MH0sInRvdGFsX3Rva2VucyI6MTQxfSwicmVzcG9uc2VfaWQiOiJyZXNwXzY4NjJjMjY3ODNjODgxOTFiOTUwZWZjZDkyMmVkZGViMGNmMzNkMmZlNjJmMDYxOCJ9" - } - ] - }, - "scheduledEventId": "18", - "startedEventId": "19", - "identity": "19010@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "21", - "eventTime": "2025-06-30T16:59:20.830437Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056965", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19010@Tims-MacBook-Pro.local-1859b9a9e19c44e0ab0c3e2fdc507859", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "e488932b-c66d-48b6-97cb-7b8feaa1c41c" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "22", - "eventTime": "2025-06-30T16:59:20.832113Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056969", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "21", - "identity": "19010@Tims-MacBook-Pro.local", - "requestId": "a1f78a09-290c-44cc-b1f3-69bc460a789f", - "historySizeBytes": "9386", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "23", - "eventTime": "2025-06-30T16:59:20.851289Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056973", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "21", - "startedEventId": "22", - "identity": "19010@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "24", - "eventTime": "2025-06-30T16:59:20.851318Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", - "taskId": "1056974", - "workflowExecutionCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "WyJUaGUgY2FwaXRhbCBvZiBDYWxpZm9ybmlhIGlzIFNhY3JhbWVudG8uIiwiU29ycnksIEkgY2FuJ3QgaGVscCB5b3Ugd2l0aCB5b3VyIG1hdGggaG9tZXdvcmsuIl0=" - } - ] - }, - "workflowTaskCompletedEventId": "23" - } - } - ] -} \ No newline at end of file diff --git a/tests/contrib/openai_agents/histories/output-guardrail-workflow-history.json b/tests/contrib/openai_agents/histories/output-guardrail-workflow-history.json deleted file mode 100644 index a7a62944cf..0000000000 --- a/tests/contrib/openai_agents/histories/output-guardrail-workflow-history.json +++ /dev/null @@ -1,238 +0,0 @@ -{ - "events": [ - { - "eventId": "1", - "eventTime": "2025-06-30T17:01:02.451819Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", - "taskId": "1057012", - "workflowExecutionStartedEventAttributes": { - "workflowType": { - "name": "OutputGuardrailWorkflow" - }, - "taskQueue": { - "name": "2227feb4-0f1d-4092-9653-308e9366edb0", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "workflowExecutionTimeout": "10s", - "workflowRunTimeout": "10s", - "workflowTaskTimeout": "10s", - "originalExecutionRunId": "0197c1c8-f673-7c7b-a3b7-5b55d2a76055", - "identity": "19075@Tims-MacBook-Pro.local", - "firstExecutionRunId": "0197c1c8-f673-7c7b-a3b7-5b55d2a76055", - "attempt": 1, - "workflowExecutionExpirationTime": "2025-06-30T17:01:12.452Z", - "firstWorkflowTaskBackoff": "0s", - "workflowId": "output-guardrail-7c013c8e-95a7-4b77-8652-2f13ef3f630a" - } - }, - { - "eventId": "2", - "eventTime": "2025-06-30T17:01:02.451853Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057013", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "2227feb4-0f1d-4092-9653-308e9366edb0", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "3", - "eventTime": "2025-06-30T17:01:02.453766Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057019", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "2", - "identity": "19075@Tims-MacBook-Pro.local", - "requestId": "1b34e4ee-2f73-41aa-b870-64018017afd6", - "historySizeBytes": "367", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "4", - "eventTime": "2025-06-30T17:01:02.489825Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057023", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "2", - "startedEventId": "3", - "identity": "19075@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": { - "coreUsedFlags": [ - 3, - 2, - 1 - ], - "sdkName": "temporal-python", - "sdkVersion": "1.13.0" - }, - "meteringMetadata": {} - } - }, - { - "eventId": "5", - "eventTime": "2025-06-30T17:01:02.489848Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057024", - "activityTaskScheduledEventAttributes": { - "activityId": "1", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "2227feb4-0f1d-4092-9653-308e9366edb0", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJBZ2VudCB3b3JrZmxvdyIsInNwYW5JZCI6InNwYW5fOTM4OGFhZjhjM2MzNDRkOThiNWYyODZjIiwidHJhY2VJZCI6InRyYWNlXzFlMTcxMjY1ZTg2NDRjNmViNTQ1MDI3ZDkyZTU3NTA0In0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIGhlbHBmdWwgYXNzaXN0YW50LiIsImlucHV0IjpbeyJjb250ZW50IjoiTXkgcGhvbmUgbnVtYmVyIGlzIDY1MC0xMjMtNDU2Ny4gV2hlcmUgZG8geW91IHRoaW5rIEkgbGl2ZT8iLCJyb2xlIjoidXNlciJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOm51bGwsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbXSwib3V0cHV0X3NjaGVtYSI6eyJvdXRwdXRfdHlwZV9uYW1lIjoiTWVzc2FnZU91dHB1dCIsImlzX3dyYXBwZWQiOmZhbHNlLCJvdXRwdXRfc2NoZW1hIjp7ImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjpmYWxzZSwicHJvcGVydGllcyI6eyJyZWFzb25pbmciOnsiZGVzY3JpcHRpb24iOiJUaG91Z2h0cyBvbiBob3cgdG8gcmVzcG9uZCB0byB0aGUgdXNlcidzIG1lc3NhZ2UiLCJ0aXRsZSI6IlJlYXNvbmluZyIsInR5cGUiOiJzdHJpbmcifSwicmVzcG9uc2UiOnsiZGVzY3JpcHRpb24iOiJUaGUgcmVzcG9uc2UgdG8gdGhlIHVzZXIncyBtZXNzYWdlIiwidGl0bGUiOiJSZXNwb25zZSIsInR5cGUiOiJzdHJpbmcifSwidXNlcl9uYW1lIjp7ImFueU9mIjpbeyJ0eXBlIjoic3RyaW5nIn0seyJ0eXBlIjoibnVsbCJ9XSwiZGVzY3JpcHRpb24iOiJUaGUgbmFtZSBvZiB0aGUgdXNlciB3aG8gc2VudCB0aGUgbWVzc2FnZSwgaWYga25vd24iLCJ0aXRsZSI6IlVzZXIgTmFtZSJ9fSwicmVxdWlyZWQiOlsicmVhc29uaW5nIiwicmVzcG9uc2UiLCJ1c2VyX25hbWUiXSwidGl0bGUiOiJNZXNzYWdlT3V0cHV0IiwidHlwZSI6Im9iamVjdCJ9LCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9LCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "10s", - "scheduleToStartTimeout": "10s", - "startToCloseTimeout": "10s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "4", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "Ik15IHBob25lIG51bWJlciBpcyA2NTAtMTIzLTQ1NjcuIFdoZXJlIGRvIHlvdSB0aGluayBJIGxpdmU/Ig==" - } - } - }, - { - "eventId": "6", - "eventTime": "2025-06-30T17:01:02.490525Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057029", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "5", - "identity": "19075@Tims-MacBook-Pro.local", - "requestId": "c9f74d43-742f-4fa0-8f18-ce8272e945e5", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "7", - "eventTime": "2025-06-30T17:01:07.210264Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057030", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoibXNnXzY4NjJjMmQwNGYyODgxOTFhNWNjNGZlNTExZmFjNGQ2MDE5ZmJiMjcwODliMTk0NCIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IntcInJlYXNvbmluZ1wiOlwiVGhlIGFyZWEgY29kZSA2NTAgaXMgYXNzb2NpYXRlZCB3aXRoIHRoZSBTYW4gRnJhbmNpc2NvIEJheSBBcmVhLCBzcGVjaWZpY2FsbHkgdGhlIFNhbiBNYXRlbyBDb3VudHkgYW5kIHBhcnRzIG9mIFNhbnRhIENsYXJhIENvdW50eSBpbiBDYWxpZm9ybmlhLiBIb3dldmVyLCBqdXN0IGJlY2F1c2UgYSBwaG9uZSBudW1iZXIgaGFzIGEgY2VydGFpbiBhcmVhIGNvZGUgZG9lc24ndCBndWFyYW50ZWUgdGhlIHBlcnNvbiBjdXJyZW50bHkgcmVzaWRlcyB0aGVyZSwgYXMgcGVvcGxlIGNhbiBrZWVwIHRoZWlyIG51bWJlciB3aGVuIHRoZXkgbW92ZS5cIixcInJlc3BvbnNlXCI6XCJUaGUgNjUwIGFyZWEgY29kZSBpcyBhc3NvY2lhdGVkIHdpdGggdGhlIFNhbiBGcmFuY2lzY28gQmF5IEFyZWEsIHBhcnRpY3VsYXJseSBhcm91bmQgU2FuIE1hdGVvIGFuZCBwYXJ0cyBvZiBTYW50YSBDbGFyYSBDb3VudHkgaW4gQ2FsaWZvcm5pYS4gRG8geW91IGN1cnJlbnRseSBsaXZlIGluIHRoYXQgcmVnaW9uP1wiLFwidXNlcl9uYW1lXCI6bnVsbH0iLCJ0eXBlIjoib3V0cHV0X3RleHQiLCJsb2dwcm9icyI6W119XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn1dLCJ1c2FnZSI6eyJyZXF1ZXN0cyI6MSwiaW5wdXRfdG9rZW5zIjoxNDAsImlucHV0X3Rva2Vuc19kZXRhaWxzIjp7ImNhY2hlZF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjoxMDYsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjoyNDZ9LCJyZXNwb25zZV9pZCI6InJlc3BfNjg2MmMyY2VkODI4ODE5MWFmYWMwNTc3YmYwNzcxY2QwMTlmYmIyNzA4OWIxOTQ0In0=" - } - ] - }, - "scheduledEventId": "5", - "startedEventId": "6", - "identity": "19075@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "8", - "eventTime": "2025-06-30T17:01:07.210272Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057031", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19075@Tims-MacBook-Pro.local-7257bf626c8f40a3ade67d81e59bc041", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "2227feb4-0f1d-4092-9653-308e9366edb0" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "9", - "eventTime": "2025-06-30T17:01:07.212046Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057035", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "8", - "identity": "19075@Tims-MacBook-Pro.local", - "requestId": "dac29894-c41b-46f8-8c24-5e9cf456b3cf", - "historySizeBytes": "3608", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "10", - "eventTime": "2025-06-30T17:01:07.236912Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057039", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "8", - "startedEventId": "9", - "identity": "19075@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "11", - "eventTime": "2025-06-30T17:01:07.236935Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", - "taskId": "1057040", - "workflowExecutionCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "ZmFsc2U=" - } - ] - }, - "workflowTaskCompletedEventId": "10" - } - } - ] -} \ No newline at end of file diff --git a/tests/contrib/openai_agents/histories/research-workflow-history.json b/tests/contrib/openai_agents/histories/research-workflow-history.json deleted file mode 100644 index be38a0be0d..0000000000 --- a/tests/contrib/openai_agents/histories/research-workflow-history.json +++ /dev/null @@ -1,1755 +0,0 @@ -{ - "events": [ - { - "eventId": "1", - "eventTime": "2025-06-30T17:04:02.147299Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", - "taskId": "1057045", - "workflowExecutionStartedEventAttributes": { - "workflowType": { - "name": "ResearchWorkflow" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IkNhcmliYmVhbiB2YWNhdGlvbiBzcG90cyBpbiBBcHJpbCwgb3B0aW1pemluZyBmb3Igc3VyZmluZywgaGlraW5nIGFuZCB3YXRlciBzcG9ydHMi" - } - ] - }, - "workflowExecutionTimeout": "120s", - "workflowRunTimeout": "120s", - "workflowTaskTimeout": "10s", - "originalExecutionRunId": "0197c1cb-b463-748c-b871-7ae94b2add9a", - "identity": "19167@Tims-MacBook-Pro.local", - "firstExecutionRunId": "0197c1cb-b463-748c-b871-7ae94b2add9a", - "attempt": 1, - "workflowExecutionExpirationTime": "2025-06-30T17:06:02.147Z", - "firstWorkflowTaskBackoff": "0s", - "workflowId": "research-workflow-73f9d702-cddc-4608-91d8-c9999dc21a77" - } - }, - { - "eventId": "2", - "eventTime": "2025-06-30T17:04:02.147325Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057046", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "3", - "eventTime": "2025-06-30T17:04:02.148179Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057052", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "2", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "3402fa90-f9c3-4948-9fe0-71f8e7410534", - "historySizeBytes": "472", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "4", - "eventTime": "2025-06-30T17:04:02.187114Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057056", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "2", - "startedEventId": "3", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": { - "coreUsedFlags": [ - 3, - 1, - 2 - ], - "sdkName": "temporal-python", - "sdkVersion": "1.13.0" - }, - "meteringMetadata": {} - } - }, - { - "eventId": "5", - "eventTime": "2025-06-30T17:04:02.187138Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057057", - "activityTaskScheduledEventAttributes": { - "activityId": "1", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fODk0ZTM0YTlkYTM1NDdjMjkxZDNmODQzIiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIGhlbHBmdWwgcmVzZWFyY2ggYXNzaXN0YW50LiBHaXZlbiBhIHF1ZXJ5LCBjb21lIHVwIHdpdGggYSBzZXQgb2Ygd2ViIHNlYXJjaGVzIHRvIHBlcmZvcm0gdG8gYmVzdCBhbnN3ZXIgdGhlIHF1ZXJ5LiBPdXRwdXQgYmV0d2VlbiA1IGFuZCAyMCB0ZXJtcyB0byBxdWVyeSBmb3IuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJRdWVyeTogQ2FyaWJiZWFuIHZhY2F0aW9uIHNwb3RzIGluIEFwcmlsLCBvcHRpbWl6aW5nIGZvciBzdXJmaW5nLCBoaWtpbmcgYW5kIHdhdGVyIHNwb3J0cyIsInJvbGUiOiJ1c2VyIn1dLCJtb2RlbF9zZXR0aW5ncyI6eyJ0ZW1wZXJhdHVyZSI6bnVsbCwidG9wX3AiOm51bGwsImZyZXF1ZW5jeV9wZW5hbHR5IjpudWxsLCJwcmVzZW5jZV9wZW5hbHR5IjpudWxsLCJ0b29sX2Nob2ljZSI6bnVsbCwicGFyYWxsZWxfdG9vbF9jYWxscyI6bnVsbCwidHJ1bmNhdGlvbiI6bnVsbCwibWF4X3Rva2VucyI6bnVsbCwicmVhc29uaW5nIjpudWxsLCJtZXRhZGF0YSI6bnVsbCwic3RvcmUiOm51bGwsImluY2x1ZGVfdXNhZ2UiOm51bGwsImV4dHJhX3F1ZXJ5IjpudWxsLCJleHRyYV9ib2R5IjpudWxsLCJleHRyYV9oZWFkZXJzIjpudWxsLCJleHRyYV9hcmdzIjpudWxsfSwidG9vbHMiOltdLCJvdXRwdXRfc2NoZW1hIjp7Im91dHB1dF90eXBlX25hbWUiOiJXZWJTZWFyY2hQbGFuIiwiaXNfd3JhcHBlZCI6ZmFsc2UsIm91dHB1dF9zY2hlbWEiOnsiJGRlZnMiOnsiV2ViU2VhcmNoSXRlbSI6eyJwcm9wZXJ0aWVzIjp7InJlYXNvbiI6eyJ0aXRsZSI6IlJlYXNvbiIsInR5cGUiOiJzdHJpbmcifSwicXVlcnkiOnsidGl0bGUiOiJRdWVyeSIsInR5cGUiOiJzdHJpbmcifX0sInJlcXVpcmVkIjpbInJlYXNvbiIsInF1ZXJ5Il0sInRpdGxlIjoiV2ViU2VhcmNoSXRlbSIsInR5cGUiOiJvYmplY3QiLCJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2V9fSwicHJvcGVydGllcyI6eyJzZWFyY2hlcyI6eyJpdGVtcyI6eyIkcmVmIjoiIy8kZGVmcy9XZWJTZWFyY2hJdGVtIn0sInRpdGxlIjoiU2VhcmNoZXMiLCJ0eXBlIjoiYXJyYXkifX0sInJlcXVpcmVkIjpbInNlYXJjaGVzIl0sInRpdGxlIjoiV2ViU2VhcmNoUGxhbiIsInR5cGUiOiJvYmplY3QiLCJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2V9LCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9LCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "4", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlF1ZXJ5OiBDYXJpYmJlYW4gdmFjYXRpb24gc3BvdHMgaW4gQXByaWwsIG9wdGltaXppbmcgZm9yIHN1cmZpbmcsIGhpa2luZyBhbmQgd2F0ZXIgc3BvcnRzIg==" - } - } - }, - { - "eventId": "6", - "eventTime": "2025-06-30T17:04:02.187940Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057062", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "5", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "f624e2d5-6ce2-4b33-aa8e-e60051a1e843", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "7", - "eventTime": "2025-06-30T17:04:08.022291Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057063", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoibXNnXzY4NjJjMzgzMTU2MDgxOTJiZjA5MDQ1Nzg1NmRhY2RhMDFlMzE0ODRkMWY3MjhmYSIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IntcInNlYXJjaGVzXCI6W3tcInJlYXNvblwiOlwiVG8gZmluZCBkZXN0aW5hdGlvbnMgaW4gdGhlIENhcmliYmVhbiB0aGF0IGFyZSBpZGVhbCBmb3Igc3VyZmluZyBpbiBBcHJpbC5cIixcInF1ZXJ5XCI6XCJiZXN0IENhcmliYmVhbiBzdXJmaW5nIHNwb3RzIGluIEFwcmlsXCJ9LHtcInJlYXNvblwiOlwiVG8gaWRlbnRpZnkgdG9wIGhpa2luZyBkZXN0aW5hdGlvbnMgaW4gdGhlIENhcmliYmVhbiBmb3IgQXByaWwgdmFjYXRpb25zLlwiLFwicXVlcnlcIjpcImJlc3QgQ2FyaWJiZWFuIGhpa2luZyBkZXN0aW5hdGlvbnMgQXByaWxcIn0se1wicmVhc29uXCI6XCJUbyBleHBsb3JlIGdlbmVyYWwgQ2FyaWJiZWFuIHdhdGVyIHNwb3J0cyBvcHBvcnR1bml0aWVzIGF2YWlsYWJsZSBpbiBBcHJpbC5cIixcInF1ZXJ5XCI6XCJ0b3AgQ2FyaWJiZWFuIHdhdGVyIHNwb3J0cyBpbiBBcHJpbFwifSx7XCJyZWFzb25cIjpcIlRvIGRldGVybWluZSBzcGVjaWZpYyBpc2xhbmRzIGluIHRoZSBDYXJpYmJlYW4ga25vd24gZm9yIG91dGRvb3IgYWN0aXZpdGllcyBsaWtlIHN1cmZpbmcgYW5kIGhpa2luZyBpbiBBcHJpbC5cIixcInF1ZXJ5XCI6XCJDYXJpYmJlYW4gaXNsYW5kcyBzdXJmaW5nIGhpa2luZyBBcHJpbFwifSx7XCJyZWFzb25cIjpcIlRvIGZpbmQgdHJhdmVsIGd1aWRlcyBmb2N1c2luZyBvbiBvdXRkb29yIGFkdmVudHVyZSBpbiB0aGUgQ2FyaWJiZWFuIGR1cmluZyBBcHJpbC5cIixcInF1ZXJ5XCI6XCJDYXJpYmJlYW4gYWR2ZW50dXJlIHRyYXZlbCBndWlkZXMgQXByaWxcIn0se1wicmVhc29uXCI6XCJUbyBsZWFybiBhYm91dCB3ZWF0aGVyIGNvbmRpdGlvbnMgaW4gdGhlIENhcmliYmVhbiBpbiBBcHJpbCwgZm9jdXNpbmcgb24gb3V0ZG9vciBhY3Rpdml0aWVzLlwiLFwicXVlcnlcIjpcIkNhcmliYmVhbiB3ZWF0aGVyIEFwcmlsIHN1cmZpbmcgaGlraW5nXCJ9LHtcInJlYXNvblwiOlwiVG8gZGlzY292ZXIgYWxsLWluY2x1c2l2ZSB2YWNhdGlvbiBwYWNrYWdlcyBmb3IgYW4gYWR2ZW50dXJlLWZvY3VzZWQgQXByaWwgdHJpcC5cIixcInF1ZXJ5XCI6XCJDYXJpYmJlYW4gdmFjYXRpb24gcGFja2FnZXMgc3VyZmluZyBoaWtpbmcgQXByaWxcIn0se1wicmVhc29uXCI6XCJUbyByZWFkIHJldmlld3MgZnJvbSB0cmF2ZWxlcnMgd2hvIHZpc2l0ZWQgdGhlIENhcmliYmVhbiBmb3IgYWN0aXZlIHZhY2F0aW9ucyBpbiBBcHJpbC5cIixcInF1ZXJ5XCI6XCJDYXJpYmJlYW4gYWR2ZW50dXJlIHZhY2F0aW9uIHJldmlld3MgQXByaWxcIn0se1wicmVhc29uXCI6XCJUbyBmaW5kIGluZm9ybWF0aW9uIG9uIHJlbnRhbCBlcXVpcG1lbnQgYXZhaWxhYmlsaXR5IGZvciB3YXRlciBzcG9ydHMgYW5kIGhpa2luZyBpbiB0aGUgQ2FyaWJiZWFuLlwiLFwicXVlcnlcIjpcIndhdGVyIHNwb3J0cyBnZWFyIHJlbnRhbHMgQ2FyaWJiZWFuIEFwcmlsXCJ9LHtcInJlYXNvblwiOlwiVG8gY2hlY2sgZm9yIGFueSBmZXN0aXZhbHMgb3IgZXZlbnRzIHJlbGF0ZWQgdG8gc3VyZmluZyBvciB3YXRlciBzcG9ydHMgaW4gdGhlIENhcmliYmVhbiBpbiBBcHJpbC5cIixcInF1ZXJ5XCI6XCJDYXJpYmJlYW4gc3VyZmluZyBmZXN0aXZhbHMgQXByaWxcIn1dfSIsInR5cGUiOiJvdXRwdXRfdGV4dCIsImxvZ3Byb2JzIjpbXX1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjoxLCJpbnB1dF90b2tlbnMiOjE1NiwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjI2NCwib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjQyMH0sInJlc3BvbnNlX2lkIjoicmVzcF82ODYyYzM4Mjg5MWM4MTkyYjllYmM1ZTczZTZjYjkyNzAxZTMxNDg0ZDFmNzI4ZmEifQ==" - } - ] - }, - "scheduledEventId": "5", - "startedEventId": "6", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "8", - "eventTime": "2025-06-30T17:04:08.022297Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057064", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "9", - "eventTime": "2025-06-30T17:04:08.023559Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057068", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "8", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "be4c32dd-d90a-466e-890e-acf232228fe2", - "historySizeBytes": "4901", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "10", - "eventTime": "2025-06-30T17:04:08.052244Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057072", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "8", - "startedEventId": "9", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "11", - "eventTime": "2025-06-30T17:04:08.052279Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057073", - "activityTaskScheduledEventAttributes": { - "activityId": "2", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fMGQ4ZjIzZmU3N2ZiNDUyMTgzMjg5NWE1IiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogYmVzdCBDYXJpYmJlYW4gc3VyZmluZyBzcG90cyBpbiBBcHJpbFxuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGZpbmQgZGVzdGluYXRpb25zIGluIHRoZSBDYXJpYmJlYW4gdGhhdCBhcmUgaWRlYWwgZm9yIHN1cmZpbmcgaW4gQXByaWwuIiwicm9sZSI6InVzZXIifV0sIm1vZGVsX3NldHRpbmdzIjp7InRlbXBlcmF0dXJlIjpudWxsLCJ0b3BfcCI6bnVsbCwiZnJlcXVlbmN5X3BlbmFsdHkiOm51bGwsInByZXNlbmNlX3BlbmFsdHkiOm51bGwsInRvb2xfY2hvaWNlIjoicmVxdWlyZWQiLCJwYXJhbGxlbF90b29sX2NhbGxzIjpudWxsLCJ0cnVuY2F0aW9uIjpudWxsLCJtYXhfdG9rZW5zIjpudWxsLCJyZWFzb25pbmciOm51bGwsIm1ldGFkYXRhIjpudWxsLCJzdG9yZSI6bnVsbCwiaW5jbHVkZV91c2FnZSI6bnVsbCwiZXh0cmFfcXVlcnkiOm51bGwsImV4dHJhX2JvZHkiOm51bGwsImV4dHJhX2hlYWRlcnMiOm51bGwsImV4dHJhX2FyZ3MiOm51bGx9LCJ0b29scyI6W3sidXNlcl9sb2NhdGlvbiI6bnVsbCwic2VhcmNoX2NvbnRleHRfc2l6ZSI6Im1lZGl1bSJ9XSwib3V0cHV0X3NjaGVtYSI6bnVsbCwiaGFuZG9mZnMiOltdLCJ0cmFjaW5nIjoxLCJwcmV2aW91c19yZXNwb25zZV9pZCI6bnVsbCwicHJvbXB0IjpudWxsfQ==" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiBiZXN0IENhcmliYmVhbiBzdXJmaW5nIHNwb3RzIGluIEFwcmlsXG5SZWFzb24gZm9yIHNlYXJjaGluZzogVG8gZmluZCBkZXN0aW5hdGlvbnMgaW4gdGhlIg==" - } - } - }, - { - "eventId": "12", - "eventTime": "2025-06-30T17:04:08.052305Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057074", - "activityTaskScheduledEventAttributes": { - "activityId": "3", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fNzVkZGQwY2I1MGRkNDlmZTk1OGUwNDM0IiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogYmVzdCBDYXJpYmJlYW4gaGlraW5nIGRlc3RpbmF0aW9ucyBBcHJpbFxuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGlkZW50aWZ5IHRvcCBoaWtpbmcgZGVzdGluYXRpb25zIGluIHRoZSBDYXJpYmJlYW4gZm9yIEFwcmlsIHZhY2F0aW9ucy4iLCJyb2xlIjoidXNlciJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOiJyZXF1aXJlZCIsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbeyJ1c2VyX2xvY2F0aW9uIjpudWxsLCJzZWFyY2hfY29udGV4dF9zaXplIjoibWVkaXVtIn1dLCJvdXRwdXRfc2NoZW1hIjpudWxsLCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiBiZXN0IENhcmliYmVhbiBoaWtpbmcgZGVzdGluYXRpb25zIEFwcmlsXG5SZWFzb24gZm9yIHNlYXJjaGluZzogVG8gaWRlbnRpZnkgdG9wIGhpa2luZyBkIg==" - } - } - }, - { - "eventId": "13", - "eventTime": "2025-06-30T17:04:08.052314Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057075", - "activityTaskScheduledEventAttributes": { - "activityId": "4", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fZjA1ZmY2MGFmMTgwNDIyZTk5NDNiZDQwIiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogdG9wIENhcmliYmVhbiB3YXRlciBzcG9ydHMgaW4gQXByaWxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBleHBsb3JlIGdlbmVyYWwgQ2FyaWJiZWFuIHdhdGVyIHNwb3J0cyBvcHBvcnR1bml0aWVzIGF2YWlsYWJsZSBpbiBBcHJpbC4iLCJyb2xlIjoidXNlciJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOiJyZXF1aXJlZCIsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbeyJ1c2VyX2xvY2F0aW9uIjpudWxsLCJzZWFyY2hfY29udGV4dF9zaXplIjoibWVkaXVtIn1dLCJvdXRwdXRfc2NoZW1hIjpudWxsLCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiB0b3AgQ2FyaWJiZWFuIHdhdGVyIHNwb3J0cyBpbiBBcHJpbFxuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGV4cGxvcmUgZ2VuZXJhbCBDYXJpYmJlYW4gIg==" - } - } - }, - { - "eventId": "14", - "eventTime": "2025-06-30T17:04:08.052320Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057076", - "activityTaskScheduledEventAttributes": { - "activityId": "5", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fNWNjYWE0NGVlNDUzNGM3NzljZTdjMWRmIiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogQ2FyaWJiZWFuIGlzbGFuZHMgc3VyZmluZyBoaWtpbmcgQXByaWxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBkZXRlcm1pbmUgc3BlY2lmaWMgaXNsYW5kcyBpbiB0aGUgQ2FyaWJiZWFuIGtub3duIGZvciBvdXRkb29yIGFjdGl2aXRpZXMgbGlrZSBzdXJmaW5nIGFuZCBoaWtpbmcgaW4gQXByaWwuIiwicm9sZSI6InVzZXIifV0sIm1vZGVsX3NldHRpbmdzIjp7InRlbXBlcmF0dXJlIjpudWxsLCJ0b3BfcCI6bnVsbCwiZnJlcXVlbmN5X3BlbmFsdHkiOm51bGwsInByZXNlbmNlX3BlbmFsdHkiOm51bGwsInRvb2xfY2hvaWNlIjoicmVxdWlyZWQiLCJwYXJhbGxlbF90b29sX2NhbGxzIjpudWxsLCJ0cnVuY2F0aW9uIjpudWxsLCJtYXhfdG9rZW5zIjpudWxsLCJyZWFzb25pbmciOm51bGwsIm1ldGFkYXRhIjpudWxsLCJzdG9yZSI6bnVsbCwiaW5jbHVkZV91c2FnZSI6bnVsbCwiZXh0cmFfcXVlcnkiOm51bGwsImV4dHJhX2JvZHkiOm51bGwsImV4dHJhX2hlYWRlcnMiOm51bGwsImV4dHJhX2FyZ3MiOm51bGx9LCJ0b29scyI6W3sidXNlcl9sb2NhdGlvbiI6bnVsbCwic2VhcmNoX2NvbnRleHRfc2l6ZSI6Im1lZGl1bSJ9XSwib3V0cHV0X3NjaGVtYSI6bnVsbCwiaGFuZG9mZnMiOltdLCJ0cmFjaW5nIjoxLCJwcmV2aW91c19yZXNwb25zZV9pZCI6bnVsbCwicHJvbXB0IjpudWxsfQ==" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiBDYXJpYmJlYW4gaXNsYW5kcyBzdXJmaW5nIGhpa2luZyBBcHJpbFxuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGRldGVybWluZSBzcGVjaWZpYyBpc2xhIg==" - } - } - }, - { - "eventId": "15", - "eventTime": "2025-06-30T17:04:08.052331Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057077", - "activityTaskScheduledEventAttributes": { - "activityId": "6", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fZGU2MjJhMmZlNGY0NDJmMmEwMGIxZTFiIiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogQ2FyaWJiZWFuIGFkdmVudHVyZSB0cmF2ZWwgZ3VpZGVzIEFwcmlsXG5SZWFzb24gZm9yIHNlYXJjaGluZzogVG8gZmluZCB0cmF2ZWwgZ3VpZGVzIGZvY3VzaW5nIG9uIG91dGRvb3IgYWR2ZW50dXJlIGluIHRoZSBDYXJpYmJlYW4gZHVyaW5nIEFwcmlsLiIsInJvbGUiOiJ1c2VyIn1dLCJtb2RlbF9zZXR0aW5ncyI6eyJ0ZW1wZXJhdHVyZSI6bnVsbCwidG9wX3AiOm51bGwsImZyZXF1ZW5jeV9wZW5hbHR5IjpudWxsLCJwcmVzZW5jZV9wZW5hbHR5IjpudWxsLCJ0b29sX2Nob2ljZSI6InJlcXVpcmVkIiwicGFyYWxsZWxfdG9vbF9jYWxscyI6bnVsbCwidHJ1bmNhdGlvbiI6bnVsbCwibWF4X3Rva2VucyI6bnVsbCwicmVhc29uaW5nIjpudWxsLCJtZXRhZGF0YSI6bnVsbCwic3RvcmUiOm51bGwsImluY2x1ZGVfdXNhZ2UiOm51bGwsImV4dHJhX3F1ZXJ5IjpudWxsLCJleHRyYV9ib2R5IjpudWxsLCJleHRyYV9oZWFkZXJzIjpudWxsLCJleHRyYV9hcmdzIjpudWxsfSwidG9vbHMiOlt7InVzZXJfbG9jYXRpb24iOm51bGwsInNlYXJjaF9jb250ZXh0X3NpemUiOiJtZWRpdW0ifV0sIm91dHB1dF9zY2hlbWEiOm51bGwsImhhbmRvZmZzIjpbXSwidHJhY2luZyI6MSwicHJldmlvdXNfcmVzcG9uc2VfaWQiOm51bGwsInByb21wdCI6bnVsbH0=" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiBDYXJpYmJlYW4gYWR2ZW50dXJlIHRyYXZlbCBndWlkZXMgQXByaWxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBmaW5kIHRyYXZlbCBndWlkZXMgZm9jIg==" - } - } - }, - { - "eventId": "16", - "eventTime": "2025-06-30T17:04:08.052336Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057078", - "activityTaskScheduledEventAttributes": { - "activityId": "7", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fMGI1ODRlYzQyOTE4NDA2NmE0OGQwMTM4IiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogQ2FyaWJiZWFuIHdlYXRoZXIgQXByaWwgc3VyZmluZyBoaWtpbmdcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBsZWFybiBhYm91dCB3ZWF0aGVyIGNvbmRpdGlvbnMgaW4gdGhlIENhcmliYmVhbiBpbiBBcHJpbCwgZm9jdXNpbmcgb24gb3V0ZG9vciBhY3Rpdml0aWVzLiIsInJvbGUiOiJ1c2VyIn1dLCJtb2RlbF9zZXR0aW5ncyI6eyJ0ZW1wZXJhdHVyZSI6bnVsbCwidG9wX3AiOm51bGwsImZyZXF1ZW5jeV9wZW5hbHR5IjpudWxsLCJwcmVzZW5jZV9wZW5hbHR5IjpudWxsLCJ0b29sX2Nob2ljZSI6InJlcXVpcmVkIiwicGFyYWxsZWxfdG9vbF9jYWxscyI6bnVsbCwidHJ1bmNhdGlvbiI6bnVsbCwibWF4X3Rva2VucyI6bnVsbCwicmVhc29uaW5nIjpudWxsLCJtZXRhZGF0YSI6bnVsbCwic3RvcmUiOm51bGwsImluY2x1ZGVfdXNhZ2UiOm51bGwsImV4dHJhX3F1ZXJ5IjpudWxsLCJleHRyYV9ib2R5IjpudWxsLCJleHRyYV9oZWFkZXJzIjpudWxsLCJleHRyYV9hcmdzIjpudWxsfSwidG9vbHMiOlt7InVzZXJfbG9jYXRpb24iOm51bGwsInNlYXJjaF9jb250ZXh0X3NpemUiOiJtZWRpdW0ifV0sIm91dHB1dF9zY2hlbWEiOm51bGwsImhhbmRvZmZzIjpbXSwidHJhY2luZyI6MSwicHJldmlvdXNfcmVzcG9uc2VfaWQiOm51bGwsInByb21wdCI6bnVsbH0=" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiBDYXJpYmJlYW4gd2VhdGhlciBBcHJpbCBzdXJmaW5nIGhpa2luZ1xuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGxlYXJuIGFib3V0IHdlYXRoZXIgY29uIg==" - } - } - }, - { - "eventId": "17", - "eventTime": "2025-06-30T17:04:08.052343Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057079", - "activityTaskScheduledEventAttributes": { - "activityId": "8", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fMTAxYTRmMjUzMzgyNDU1ZmE2NjczMDU4IiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogQ2FyaWJiZWFuIHZhY2F0aW9uIHBhY2thZ2VzIHN1cmZpbmcgaGlraW5nIEFwcmlsXG5SZWFzb24gZm9yIHNlYXJjaGluZzogVG8gZGlzY292ZXIgYWxsLWluY2x1c2l2ZSB2YWNhdGlvbiBwYWNrYWdlcyBmb3IgYW4gYWR2ZW50dXJlLWZvY3VzZWQgQXByaWwgdHJpcC4iLCJyb2xlIjoidXNlciJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOiJyZXF1aXJlZCIsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbeyJ1c2VyX2xvY2F0aW9uIjpudWxsLCJzZWFyY2hfY29udGV4dF9zaXplIjoibWVkaXVtIn1dLCJvdXRwdXRfc2NoZW1hIjpudWxsLCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiBDYXJpYmJlYW4gdmFjYXRpb24gcGFja2FnZXMgc3VyZmluZyBoaWtpbmcgQXByaWxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBkaXNjb3ZlciBhbGwtIg==" - } - } - }, - { - "eventId": "18", - "eventTime": "2025-06-30T17:04:08.052350Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057080", - "activityTaskScheduledEventAttributes": { - "activityId": "9", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fMThlZjMzYmI0ODFjNDM1M2I2NjA5YTU3IiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogQ2FyaWJiZWFuIGFkdmVudHVyZSB2YWNhdGlvbiByZXZpZXdzIEFwcmlsXG5SZWFzb24gZm9yIHNlYXJjaGluZzogVG8gcmVhZCByZXZpZXdzIGZyb20gdHJhdmVsZXJzIHdobyB2aXNpdGVkIHRoZSBDYXJpYmJlYW4gZm9yIGFjdGl2ZSB2YWNhdGlvbnMgaW4gQXByaWwuIiwicm9sZSI6InVzZXIifV0sIm1vZGVsX3NldHRpbmdzIjp7InRlbXBlcmF0dXJlIjpudWxsLCJ0b3BfcCI6bnVsbCwiZnJlcXVlbmN5X3BlbmFsdHkiOm51bGwsInByZXNlbmNlX3BlbmFsdHkiOm51bGwsInRvb2xfY2hvaWNlIjoicmVxdWlyZWQiLCJwYXJhbGxlbF90b29sX2NhbGxzIjpudWxsLCJ0cnVuY2F0aW9uIjpudWxsLCJtYXhfdG9rZW5zIjpudWxsLCJyZWFzb25pbmciOm51bGwsIm1ldGFkYXRhIjpudWxsLCJzdG9yZSI6bnVsbCwiaW5jbHVkZV91c2FnZSI6bnVsbCwiZXh0cmFfcXVlcnkiOm51bGwsImV4dHJhX2JvZHkiOm51bGwsImV4dHJhX2hlYWRlcnMiOm51bGwsImV4dHJhX2FyZ3MiOm51bGx9LCJ0b29scyI6W3sidXNlcl9sb2NhdGlvbiI6bnVsbCwic2VhcmNoX2NvbnRleHRfc2l6ZSI6Im1lZGl1bSJ9XSwib3V0cHV0X3NjaGVtYSI6bnVsbCwiaGFuZG9mZnMiOltdLCJ0cmFjaW5nIjoxLCJwcmV2aW91c19yZXNwb25zZV9pZCI6bnVsbCwicHJvbXB0IjpudWxsfQ==" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiBDYXJpYmJlYW4gYWR2ZW50dXJlIHZhY2F0aW9uIHJldmlld3MgQXByaWxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyByZWFkIHJldmlld3MgZnJvbSB0Ig==" - } - } - }, - { - "eventId": "19", - "eventTime": "2025-06-30T17:04:08.052356Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057081", - "activityTaskScheduledEventAttributes": { - "activityId": "10", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fZGY5YjBmMTc5ZDgwNDZhODk1NGE2MmI4IiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogd2F0ZXIgc3BvcnRzIGdlYXIgcmVudGFscyBDYXJpYmJlYW4gQXByaWxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBmaW5kIGluZm9ybWF0aW9uIG9uIHJlbnRhbCBlcXVpcG1lbnQgYXZhaWxhYmlsaXR5IGZvciB3YXRlciBzcG9ydHMgYW5kIGhpa2luZyBpbiB0aGUgQ2FyaWJiZWFuLiIsInJvbGUiOiJ1c2VyIn1dLCJtb2RlbF9zZXR0aW5ncyI6eyJ0ZW1wZXJhdHVyZSI6bnVsbCwidG9wX3AiOm51bGwsImZyZXF1ZW5jeV9wZW5hbHR5IjpudWxsLCJwcmVzZW5jZV9wZW5hbHR5IjpudWxsLCJ0b29sX2Nob2ljZSI6InJlcXVpcmVkIiwicGFyYWxsZWxfdG9vbF9jYWxscyI6bnVsbCwidHJ1bmNhdGlvbiI6bnVsbCwibWF4X3Rva2VucyI6bnVsbCwicmVhc29uaW5nIjpudWxsLCJtZXRhZGF0YSI6bnVsbCwic3RvcmUiOm51bGwsImluY2x1ZGVfdXNhZ2UiOm51bGwsImV4dHJhX3F1ZXJ5IjpudWxsLCJleHRyYV9ib2R5IjpudWxsLCJleHRyYV9oZWFkZXJzIjpudWxsLCJleHRyYV9hcmdzIjpudWxsfSwidG9vbHMiOlt7InVzZXJfbG9jYXRpb24iOm51bGwsInNlYXJjaF9jb250ZXh0X3NpemUiOiJtZWRpdW0ifV0sIm91dHB1dF9zY2hlbWEiOm51bGwsImhhbmRvZmZzIjpbXSwidHJhY2luZyI6MSwicHJldmlvdXNfcmVzcG9uc2VfaWQiOm51bGwsInByb21wdCI6bnVsbH0=" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiB3YXRlciBzcG9ydHMgZ2VhciByZW50YWxzIENhcmliYmVhbiBBcHJpbFxuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGZpbmQgaW5mb3JtYXRpb24gb24gIg==" - } - } - }, - { - "eventId": "20", - "eventTime": "2025-06-30T17:04:08.052364Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057082", - "activityTaskScheduledEventAttributes": { - "activityId": "11", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fZmQ5MDM0YzhmYjEzNDM3NmI5NTFiNTQxIiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHJlc2VhcmNoIGFzc2lzdGFudC4gR2l2ZW4gYSBzZWFyY2ggdGVybSwgeW91IHNlYXJjaCB0aGUgd2ViIGZvciB0aGF0IHRlcm0gYW5kIHByb2R1Y2UgYSBjb25jaXNlIHN1bW1hcnkgb2YgdGhlIHJlc3VsdHMuIFRoZSBzdW1tYXJ5IG11c3QgMi0zIHBhcmFncmFwaHMgYW5kIGxlc3MgdGhhbiAzMDAgd29yZHMuIENhcHR1cmUgdGhlIG1haW4gcG9pbnRzLiBXcml0ZSBzdWNjaW5jdGx5LCBubyBuZWVkIHRvIGhhdmUgY29tcGxldGUgc2VudGVuY2VzIG9yIGdvb2QgZ3JhbW1hci4gVGhpcyB3aWxsIGJlIGNvbnN1bWVkIGJ5IHNvbWVvbmUgc3ludGhlc2l6aW5nIGEgcmVwb3J0LCBzbyBpdHMgdml0YWwgeW91IGNhcHR1cmUgdGhlIGVzc2VuY2UgYW5kIGlnbm9yZSBhbnkgZmx1ZmYuIERvIG5vdCBpbmNsdWRlIGFueSBhZGRpdGlvbmFsIGNvbW1lbnRhcnkgb3RoZXIgdGhhbiB0aGUgc3VtbWFyeSBpdHNlbGYuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJTZWFyY2ggdGVybTogQ2FyaWJiZWFuIHN1cmZpbmcgZmVzdGl2YWxzIEFwcmlsXG5SZWFzb24gZm9yIHNlYXJjaGluZzogVG8gY2hlY2sgZm9yIGFueSBmZXN0aXZhbHMgb3IgZXZlbnRzIHJlbGF0ZWQgdG8gc3VyZmluZyBvciB3YXRlciBzcG9ydHMgaW4gdGhlIENhcmliYmVhbiBpbiBBcHJpbC4iLCJyb2xlIjoidXNlciJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOiJyZXF1aXJlZCIsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbeyJ1c2VyX2xvY2F0aW9uIjpudWxsLCJzZWFyY2hfY29udGV4dF9zaXplIjoibWVkaXVtIn1dLCJvdXRwdXRfc2NoZW1hIjpudWxsLCJoYW5kb2ZmcyI6W10sInRyYWNpbmciOjEsInByZXZpb3VzX3Jlc3BvbnNlX2lkIjpudWxsLCJwcm9tcHQiOm51bGx9" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlNlYXJjaCB0ZXJtOiBDYXJpYmJlYW4gc3VyZmluZyBmZXN0aXZhbHMgQXByaWxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBjaGVjayBmb3IgYW55IGZlc3RpdmFscyBvciBlIg==" - } - } - }, - { - "eventId": "21", - "eventTime": "2025-06-30T17:04:08.055354Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057104", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "13", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "d557b03c-0aa2-472d-81ae-a52c689c73ac", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "22", - "eventTime": "2025-06-30T17:04:13.729426Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057105", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODg1NzQwODE5ZGIxYzZiYmQ0ZTBhYjE3NzQwYmNhMmE4M2UyZjlmMjE0IiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IHRvcCBDYXJpYmJlYW4gd2F0ZXIgc3BvcnRzIGluIEFwcmlsXFxuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGV4cGxvcmUgZ2VuZXJhbCBDYXJpYmJlYW4gd2F0ZXIgc3BvcnRzIG9wcG9ydHVuaXRpZXMgYXZhaWxhYmxlIGluIEFwcmlsLiIsInR5cGUiOiJzZWFyY2gifSwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6IndlYl9zZWFyY2hfY2FsbCJ9LHsiaWQiOiJtc2dfNjg2MmMzOGI3OWUwODE5ZGFmMTEwNmNmZjQ0NTIzZDQwYmNhMmE4M2UyZjlmMjE0IiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOlt7ImVuZF9pbmRleCI6MzgyLCJzdGFydF9pbmRleCI6Mjc1LCJ0aXRsZSI6IkNhcmliYmVhbiBXYXRlcnNwb3J0cyBIb2xpZGF5cyBHdWlkZSAtIEVsaXRlIElzbGFuZCBSZXNvcnRzIiwidHlwZSI6InVybF9jaXRhdGlvbiIsInVybCI6Imh0dHBzOi8vZWxpdGVpc2xhbmRob2xpZGF5cy5jb20vY2FyaWJiZWFuLXdhdGVyc3BvcnRzLWd1aWRlLz91dG1fc291cmNlPW9wZW5haSJ9LHsiZW5kX2luZGV4Ijo3OTgsInN0YXJ0X2luZGV4Ijo2OTEsInRpdGxlIjoiQ2FyaWJiZWFuIFdhdGVyc3BvcnRzIEhvbGlkYXlzIEd1aWRlIC0gRWxpdGUgSXNsYW5kIFJlc29ydHMiLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly9lbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbS9jYXJpYmJlYW4td2F0ZXJzcG9ydHMtZ3VpZGUvP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjExNTEsInN0YXJ0X2luZGV4IjoxMDQ0LCJ0aXRsZSI6IkNhcmliYmVhbiBXYXRlcnNwb3J0cyBIb2xpZGF5cyBHdWlkZSAtIEVsaXRlIElzbGFuZCBSZXNvcnRzIiwidHlwZSI6InVybF9jaXRhdGlvbiIsInVybCI6Imh0dHBzOi8vZWxpdGVpc2xhbmRob2xpZGF5cy5jb20vY2FyaWJiZWFuLXdhdGVyc3BvcnRzLWd1aWRlLz91dG1fc291cmNlPW9wZW5haSJ9XSwidGV4dCI6IkluIEFwcmlsLCB0aGUgQ2FyaWJiZWFuIG9mZmVycyBhIHZhcmlldHkgb2Ygd2F0ZXIgc3BvcnRzIHN1aXRhYmxlIGZvciBlbnRodXNpYXN0cyBvZiBhbGwgbGV2ZWxzLiBTdXJmaW5nIGlzIHBhcnRpY3VsYXJseSBwb3B1bGFyIGR1cmluZyB0aGlzIG1vbnRoLCBhcyBpdCBmYWxscyB3aXRoaW4gdGhlIHBlYWsgc2Vhc29uIGZyb20gTm92ZW1iZXIgdG8gQXByaWwsIHByb3ZpZGluZyBjb25zaXN0ZW50IHdhdmVzIGZvciBib3RoIHNlYXNvbmVkIHN1cmZlcnMgYW5kIGJlZ2lubmVycy4gKFtlbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbV0oaHR0cHM6Ly9lbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbS9jYXJpYmJlYW4td2F0ZXJzcG9ydHMtZ3VpZGUvP3V0bV9zb3VyY2U9b3BlbmFpKSlcblxuS2l0ZXN1cmZpbmcgaXMgYW5vdGhlciBmYXZvcmVkIGFjdGl2aXR5IGFjcm9zcyB0aGUgQ2FyaWJiZWFuIGlzbGFuZHMgaW4gQXByaWwsIHRoYW5rcyB0byBzdGVhZHkgd2luZHMgYW5kIGlkZWFsIHdhdmUgY29uZGl0aW9ucywgbWFraW5nIGl0IGFjY2Vzc2libGUgZm9yIGJvdGggbm92aWNlcyBhbmQgZXhwZXJ0cy4gU25vcmtlbGluZyBhbHNvIHRocml2ZXMgZHVyaW5nIHRoaXMgcGVyaW9kLCB3aXRoIGNsZWFyIHdhdGVycyBhbmQgYWJ1bmRhbnQgbWFyaW5lIGxpZmUgb2ZmZXJpbmcgdW5pcXVlIHVuZGVyd2F0ZXIgZXhwZXJpZW5jZXMuIChbZWxpdGVpc2xhbmRob2xpZGF5cy5jb21dKGh0dHBzOi8vZWxpdGVpc2xhbmRob2xpZGF5cy5jb20vY2FyaWJiZWFuLXdhdGVyc3BvcnRzLWd1aWRlLz91dG1fc291cmNlPW9wZW5haSkpXG5cblNhaWxpbmcgcmVtYWlucyBhIHRpbWVsZXNzIHB1cnN1aXQgaW4gdGhlIENhcmliYmVhbiwgd2l0aCBBcHJpbCdzIGZhdm9yYWJsZSB3ZWF0aGVyIGNvbmRpdGlvbnMgZW5oYW5jaW5nIHRoZSBleHBlcmllbmNlLiBXaGV0aGVyIHlvdSdyZSBuYXZpZ2F0aW5nIHRoZSBzZWFzIHdpdGggZmFtaWx5IG9yIGZyaWVuZHMsIHRoZSBwb3NzaWJpbGl0eSBvZiBlbmNvdW50ZXJpbmcgZG9scGhpbnMgYWRkcyB0byB0aGUgYWR2ZW50dXJlLiAoW2VsaXRlaXNsYW5kaG9saWRheXMuY29tXShodHRwczovL2VsaXRlaXNsYW5kaG9saWRheXMuY29tL2NhcmliYmVhbi13YXRlcnNwb3J0cy1ndWlkZS8/dXRtX3NvdXJjZT1vcGVuYWkpKVxuXG5PdmVyYWxsLCBBcHJpbCdzIGNsaW1hdGUgaW4gdGhlIENhcmliYmVhbiBpcyBjb25kdWNpdmUgdG8gYSB3aWRlIHJhbmdlIG9mIHdhdGVyIHNwb3J0cywgZW5zdXJpbmcgbWVtb3JhYmxlIGV4cGVyaWVuY2VzIGZvciB2aXNpdG9ycy4gIiwidHlwZSI6Im91dHB1dF90ZXh0IiwibG9ncHJvYnMiOltdfV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9XSwidXNhZ2UiOnsicmVxdWVzdHMiOjEsImlucHV0X3Rva2VucyI6NDM5LCJpbnB1dF90b2tlbnNfZGV0YWlscyI6eyJjYWNoZWRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MjUyLCJvdXRwdXRfdG9rZW5zX2RldGFpbHMiOnsicmVhc29uaW5nX3Rva2VucyI6MH0sInRvdGFsX3Rva2VucyI6NjkxfSwicmVzcG9uc2VfaWQiOiJyZXNwXzY4NjJjMzg4NDYzMDgxOWQ5NDFlZjU4YzhiNWVjN2ZiMGJjYTJhODNlMmY5ZjIxNCJ9" - } - ] - }, - "scheduledEventId": "13", - "startedEventId": "21", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "23", - "eventTime": "2025-06-30T17:04:13.729436Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057106", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "24", - "eventTime": "2025-06-30T17:04:13.732404Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057110", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "23", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "fd7235cd-3500-4ffa-8a6e-4296483f9fd7", - "historySizeBytes": "24914", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "25", - "eventTime": "2025-06-30T17:04:13.755190Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057114", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "23", - "startedEventId": "24", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "26", - "eventTime": "2025-06-30T17:04:08.053707Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057116", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "20", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "fd2ccba8-5cd9-481d-93c6-3494d352620e", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "27", - "eventTime": "2025-06-30T17:04:14.229949Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057117", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODgzZmMwODFhMGFmMDgxMDIyNmNlZjA4ODMwYmNhYzI3NGQwYWNmNDIxIiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IENhcmliYmVhbiBzdXJmaW5nIGZlc3RpdmFscyBBcHJpbFxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBjaGVjayBmb3IgYW55IGZlc3RpdmFscyBvciBldmVudHMgcmVsYXRlZCB0byBzdXJmaW5nIG9yIHdhdGVyIHNwb3J0cyBpbiB0aGUgQ2FyaWJiZWFuIGluIEFwcmlsLiIsInR5cGUiOiJzZWFyY2gifSwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6IndlYl9zZWFyY2hfY2FsbCJ9LHsiaWQiOiJtc2dfNjg2MmMzOGI4MDA0ODFhMDk2YjQ0MmNjYjNhMTcwODYwYmNhYzI3NGQwYWNmNDIxIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiSW4gQXByaWwsIHRoZSBDYXJpYmJlYW4gaG9zdHMgc2V2ZXJhbCBub3RhYmxlIHN1cmZpbmcgYW5kIHdhdGVyIHNwb3J0cyBldmVudHMuIFRoZSBCYXJiYWRvcyBTdXJmIFBybywgcGFydCBvZiB0aGUgV29ybGQgU3VyZiBMZWFndWUncyBRdWFsaWZ5aW5nIFNlcmllcywgdHlwaWNhbGx5IHRha2VzIHBsYWNlIGluIEFwcmlsIGF0IERyaWxsIEhhbGwgQmVhY2gsIGF0dHJhY3RpbmcgaW50ZXJuYXRpb25hbCBzdXJmZXJzLiBTaW1pbGFybHksIHRoZSBNYXJ0aW5pcXVlIFN1cmYgUHJvLCBhbm90aGVyIFdTTCBRdWFsaWZ5aW5nIFNlcmllcyBldmVudCwgaXMgdXN1YWxseSBoZWxkIGluIEFwcmlsIGF0IEJhc3NlLVBvaW50ZSwgZmVhdHVyaW5nIGJvdGggbWVuJ3MgYW5kIHdvbWVuJ3MgY29tcGV0aXRpb25zLiBBZGRpdGlvbmFsbHksIHRoZSBDYXJpYmJlYW4gU3VyZiBOZXR3b3JrIG9mdGVuIG9yZ2FuaXplcyByZWdpb25hbCBjb21wZXRpdGlvbnMgZHVyaW5nIHRoaXMgbW9udGgsIHRob3VnaCBzcGVjaWZpYyBkYXRlcyBhbmQgbG9jYXRpb25zIGNhbiB2YXJ5IGFubnVhbGx5LlxuXG5CZXlvbmQgc3VyZmluZywgdGhlIENhcmliYmVhbiBvZmZlcnMgdmFyaW91cyB3YXRlciBzcG9ydHMgZmVzdGl2YWxzIGluIEFwcmlsLiBUaGUgU3QuIFRob21hcyBJbnRlcm5hdGlvbmFsIFJlZ2F0dGEgaW4gdGhlIFUuUy4gVmlyZ2luIElzbGFuZHMgaXMgYSBwcm9taW5lbnQgc2FpbGluZyBldmVudCBkcmF3aW5nIHBhcnRpY2lwYW50cyB3b3JsZHdpZGUuIEluIHRoZSBCYWhhbWFzLCB0aGUgTmF0aW9uYWwgRmFtaWx5IElzbGFuZCBSZWdhdHRhIHNob3djYXNlcyB0cmFkaXRpb25hbCBCYWhhbWlhbiBzbG9vcCBzYWlsaW5nLiBUaGVzZSBldmVudHMgaGlnaGxpZ2h0IHRoZSByZWdpb24ncyByaWNoIG1hcml0aW1lIGN1bHR1cmUgYW5kIHByb3ZpZGUgb3Bwb3J0dW5pdGllcyBmb3IgYm90aCBjb21wZXRpdGlvbiBhbmQgY3VsdHVyYWwgZXhjaGFuZ2UuICIsInR5cGUiOiJvdXRwdXRfdGV4dCIsImxvZ3Byb2JzIjpbXX1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjoxLCJpbnB1dF90b2tlbnMiOjQ1MSwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjE3Niwib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjYyN30sInJlc3BvbnNlX2lkIjoicmVzcF82ODYyYzM4ODMzNjQ4MWEwYjJlMjgyZjk0Y2I3YWVmMTBiY2FjMjc0ZDBhY2Y0MjEifQ==" - } - ] - }, - "scheduledEventId": "20", - "startedEventId": "26", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "28", - "eventTime": "2025-06-30T17:04:14.229965Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057118", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "29", - "eventTime": "2025-06-30T17:04:14.232810Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057122", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "28", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "8d346ab1-ac2a-4ffd-8229-c1cd4d96c851", - "historySizeBytes": "27265", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "30", - "eventTime": "2025-06-30T17:04:14.253917Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057126", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "28", - "startedEventId": "29", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "31", - "eventTime": "2025-06-30T17:04:08.056512Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057128", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "18", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "a22ce3cb-4ed7-44b1-ab43-a0f0ffa81f7f", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "32", - "eventTime": "2025-06-30T17:04:14.465038Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057129", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODg1MWU0ODFhMjgxNWQ2ZGUwNWRkZjY3YzMwNGVmY2I0Y2FhMzc4OTIzIiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IENhcmliYmVhbiBhZHZlbnR1cmUgdmFjYXRpb24gcmV2aWV3cyBBcHJpbFxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyByZWFkIHJldmlld3MgZnJvbSB0cmF2ZWxlcnMgd2hvIHZpc2l0ZWQgdGhlIENhcmliYmVhbiBmb3IgYWN0aXZlIHZhY2F0aW9ucyBpbiBBcHJpbC4iLCJ0eXBlIjoic2VhcmNoIn0sInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJ3ZWJfc2VhcmNoX2NhbGwifSx7ImlkIjoibXNnXzY4NjJjMzhjNTQ2NDgxYTJhMjUxOWE4NTA3MGQyYzUxMDRlZmNiNGNhYTM3ODkyMyIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbeyJlbmRfaW5kZXgiOjY3NSwic3RhcnRfaW5kZXgiOjQ3OSwidGl0bGUiOiJIaWdobGlnaHQgb2Ygb3VyIHZhY2F0aW9uICEgLSBSZXZpZXcgb2YgT2NlYW4gQWR2ZW50dXJlcyAtIFNhaWxpbmcgQWR2ZW50dXJlLCBQdW50YSBDYW5hLCBEb21pbmljYW4gUmVwdWJsaWMgLSBUcmlwYWR2aXNvciIsInR5cGUiOiJ1cmxfY2l0YXRpb24iLCJ1cmwiOiJodHRwczovL3d3dy50cmlwYWR2aXNvci5jb20vU2hvd1VzZXJSZXZpZXdzLWcxNDcyOTMtZDI2MjQ3ODktcjIwNjExNDEwNS1PY2Vhbl9BZHZlbnR1cmVzX1NhaWxpbmdfQWR2ZW50dXJlLVB1bnRhX0NhbmFfTGFfQWx0YWdyYWNpYV9Qcm92aW5jZV9Eb21pbmljYW5fUi5odG1sP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjExNzcsInN0YXJ0X2luZGV4Ijo5ODEsInRpdGxlIjoiSGlnaGxpZ2h0IG9mIG91ciB2YWNhdGlvbiAhIC0gUmV2aWV3IG9mIE9jZWFuIEFkdmVudHVyZXMgLSBTYWlsaW5nIEFkdmVudHVyZSwgUHVudGEgQ2FuYSwgRG9taW5pY2FuIFJlcHVibGljIC0gVHJpcGFkdmlzb3IiLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly93d3cudHJpcGFkdmlzb3IuY29tL1Nob3dVc2VyUmV2aWV3cy1nMTQ3MjkzLWQyNjI0Nzg5LXIyMDYxMTQxMDUtT2NlYW5fQWR2ZW50dXJlc19TYWlsaW5nX0FkdmVudHVyZS1QdW50YV9DYW5hX0xhX0FsdGFncmFjaWFfUHJvdmluY2VfRG9taW5pY2FuX1IuaHRtbD91dG1fc291cmNlPW9wZW5haSJ9XSwidGV4dCI6IkluIEFwcmlsIDIwMTQsIHRyYXZlbGVycyBoaWdobGlnaHRlZCB0aGUgT2NlYW4gQWR2ZW50dXJlcyBTYWlsaW5nIEFkdmVudHVyZSBpbiBQdW50YSBDYW5hLCBEb21pbmljYW4gUmVwdWJsaWMsIGFzIGEgc3RhbmRvdXQgZXhwZXJpZW5jZS4gT25lIHJldmlld2VyIGRlc2NyaWJlZCBpdCBhcyB0aGUgXCJoaWdobGlnaHQgb2Ygb3VyIHRyaXAsXCIgcHJhaXNpbmcgdGhlIGNyZXcncyBob3NwaXRhbGl0eSBhbmQgdGhlIHZhcmlldHkgb2YgYWN0aXZpdGllcywgaW5jbHVkaW5nIHNub3JrZWxpbmcsIHdhdGVyIHZvbGxleWJhbGwgaW4gYSBuYXR1cmFsIHBvb2wsIGRhbmNpbmcgZW50ZXJ0YWlubWVudCwgYW5kIGEgdGFzdHkgbHVuY2guIFRoZXkgYXBwcmVjaWF0ZWQgdGhhdCB0aGUgZXhjdXJzaW9uIG9mZmVyZWQgbW9yZSB0aGFuIGp1c3QgZHJpbmtpbmcgYW5kIHNpZ2h0c2VlaW5nLCBwcm92aWRpbmcgYSB3ZWxsLXJvdW5kZWQgYWR2ZW50dXJlLiAoW3RyaXBhZHZpc29yLmNvbV0oaHR0cHM6Ly93d3cudHJpcGFkdmlzb3IuY29tL1Nob3dVc2VyUmV2aWV3cy1nMTQ3MjkzLWQyNjI0Nzg5LXIyMDYxMTQxMDUtT2NlYW5fQWR2ZW50dXJlc19TYWlsaW5nX0FkdmVudHVyZS1QdW50YV9DYW5hX0xhX0FsdGFncmFjaWFfUHJvdmluY2VfRG9taW5pY2FuX1IuaHRtbD91dG1fc291cmNlPW9wZW5haSkpXG5cbkFub3RoZXIgdHJhdmVsZXIsIHdobyBoYWQgcHJldmlvdXNseSBiZWVuIG9uIGEgc2ltaWxhciBjcnVpc2UgaW4gUHVudGEgQ2FuYSwgYWxzbyBoYWQgYSBncmVhdCB0aW1lIG9uIHRoaXMgc2FpbGluZyBhZHZlbnR1cmUuIFRoZXNlIHJldmlld3Mgc3VnZ2VzdCB0aGF0IHRoZSBPY2VhbiBBZHZlbnR1cmVzIFNhaWxpbmcgQWR2ZW50dXJlIG9mZmVycyBhIG1lbW9yYWJsZSBhbmQgZW5nYWdpbmcgZXhwZXJpZW5jZSBmb3IgdmlzaXRvcnMgc2Vla2luZyBhY3RpdmUgdmFjYXRpb25zIGluIHRoZSBDYXJpYmJlYW4gZHVyaW5nIEFwcmlsLiAoW3RyaXBhZHZpc29yLmNvbV0oaHR0cHM6Ly93d3cudHJpcGFkdmlzb3IuY29tL1Nob3dVc2VyUmV2aWV3cy1nMTQ3MjkzLWQyNjI0Nzg5LXIyMDYxMTQxMDUtT2NlYW5fQWR2ZW50dXJlc19TYWlsaW5nX0FkdmVudHVyZS1QdW50YV9DYW5hX0xhX0FsdGFncmFjaWFfUHJvdmluY2VfRG9taW5pY2FuX1IuaHRtbD91dG1fc291cmNlPW9wZW5haSkpICIsInR5cGUiOiJvdXRwdXRfdGV4dCIsImxvZ3Byb2JzIjpbXX1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjoxLCJpbnB1dF90b2tlbnMiOjQ0NSwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjI1NSwib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjcwMH0sInJlc3BvbnNlX2lkIjoicmVzcF82ODYyYzM4ODQyOTg4MWEyYTA1ZWRjY2E4ZWVlZGNlYjA0ZWZjYjRjYWEzNzg5MjMifQ==" - } - ] - }, - "scheduledEventId": "18", - "startedEventId": "31", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "33", - "eventTime": "2025-06-30T17:04:14.465051Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057130", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "34", - "eventTime": "2025-06-30T17:04:14.468099Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057134", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "33", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "4c859afe-32a8-43d9-a119-762c5395ed83", - "historySizeBytes": "30561", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "35", - "eventTime": "2025-06-30T17:04:14.491467Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057138", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "33", - "startedEventId": "34", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "36", - "eventTime": "2025-06-30T17:04:08.057968Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057140", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "11", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "47181d54-67b5-45e1-a8ab-1dc4ef8efe5f", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "37", - "eventTime": "2025-06-30T17:04:14.630040Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057141", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODg1YmFjODFhMThiMWFmNTg0MzFhZTdhNmQwMmJlNGVkODIyYmZlMTY2IiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IGJlc3QgQ2FyaWJiZWFuIHN1cmZpbmcgc3BvdHMgaW4gQXByaWxcXG5SZWFzb24gZm9yIHNlYXJjaGluZzogVG8gZmluZCBkZXN0aW5hdGlvbnMgaW4gdGhlIENhcmliYmVhbiB0aGF0IGFyZSBpZGVhbCBmb3Igc3VyZmluZyBpbiBBcHJpbC4iLCJ0eXBlIjoic2VhcmNoIn0sInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJ3ZWJfc2VhcmNoX2NhbGwifSx7ImlkIjoibXNnXzY4NjJjMzhjYWExODgxYTE5YWZmZmQ4Njc5MTI1Yzk4MDJiZTRlZDgyMmJmZTE2NiIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IkFwcmlsIGlzIGFuIGV4Y2VsbGVudCBtb250aCBmb3Igc3VyZmluZyBpbiB0aGUgQ2FyaWJiZWFuLCB3aXRoIGNvbnNpc3RlbnQgc3dlbGxzIGFuZCBmYXZvcmFibGUgd2VhdGhlciBjb25kaXRpb25zLiBUb3AgZGVzdGluYXRpb25zIGluY2x1ZGUgUmluY29uIGluIFB1ZXJ0byBSaWNvLCBrbm93biBmb3IgaXRzIHZhcmlldHkgb2YgYnJlYWtzIHN1aXRhYmxlIGZvciBhbGwgbGV2ZWxzOyBCYXRoc2hlYmEgaW4gQmFyYmFkb3MsIG9mZmVyaW5nIHBvd2VyZnVsIHdhdmVzIGF0IHRoZSBTb3VwIEJvd2w7IGFuZCBQbGF5YSBFbmN1ZW50cm8gaW4gdGhlIERvbWluaWNhbiBSZXB1YmxpYywgZmVhdHVyaW5nIGNvbnNpc3RlbnQgd2F2ZXMgYW5kIGEgdmlicmFudCBzdXJmIGNvbW11bml0eS4gT3RoZXIgbm90YWJsZSBzcG90cyBhcmUgQWd1YWRpbGxhIGluIFB1ZXJ0byBSaWNvLCB3aXRoIGl0cyBkaXZlcnNlIHN1cmYgYnJlYWtzOyBhbmQgTG9uZyBCYXkgaW4gSmFtYWljYSwgcHJvdmlkaW5nIG1lbGxvdyB3YXZlcyBpZGVhbCBmb3IgYmVnaW5uZXJzLlxuXG5UaGVzZSBsb2NhdGlvbnMgb2ZmZXIgYSBtaXggb2YgcmVlZiBhbmQgYmVhY2ggYnJlYWtzLCBjYXRlcmluZyB0byBzdXJmZXJzIG9mIHZhcnlpbmcgc2tpbGwgbGV2ZWxzLiBUaGUgd2FybSBDYXJpYmJlYW4gd2F0ZXJzIGFuZCBjb25zaXN0ZW50IHN3ZWxscyBkdXJpbmcgQXByaWwgbWFrZSB0aGVzZSBzcG90cyBwYXJ0aWN1bGFybHkgYXBwZWFsaW5nLiBBZGRpdGlvbmFsbHksIHRoZSBsb2NhbCBzdXJmIGN1bHR1cmVzIGFuZCBhbWVuaXRpZXMgZW5oYW5jZSB0aGUgb3ZlcmFsbCBleHBlcmllbmNlIGZvciB2aXNpdGluZyBzdXJmZXJzLiAiLCJ0eXBlIjoib3V0cHV0X3RleHQiLCJsb2dwcm9icyI6W119XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn1dLCJ1c2FnZSI6eyJyZXF1ZXN0cyI6MSwiaW5wdXRfdG9rZW5zIjo0NDUsImlucHV0X3Rva2Vuc19kZXRhaWxzIjp7ImNhY2hlZF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjoxNTMsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjo1OTh9LCJyZXNwb25zZV9pZCI6InJlc3BfNjg2MmMzODg0YTU0ODFhMTk1MWYwZWJiY2Y0MTc3NTAwMmJlNGVkODIyYmZlMTY2In0=" - } - ] - }, - "scheduledEventId": "11", - "startedEventId": "36", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "38", - "eventTime": "2025-06-30T17:04:14.630050Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057142", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "39", - "eventTime": "2025-06-30T17:04:14.632394Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057146", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "38", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "f1cb6087-b8e6-4a50-9593-cd4756a36eb4", - "historySizeBytes": "32756", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "40", - "eventTime": "2025-06-30T17:04:14.654900Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057150", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "38", - "startedEventId": "39", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "41", - "eventTime": "2025-06-30T17:04:08.055162Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057152", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "15", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "71ba1129-bb64-45fd-9e6a-55250b147d40", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "42", - "eventTime": "2025-06-30T17:04:14.959509Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057153", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODg1MWRjODFhMmE0NzA4NGU3OGRhZWY4OWQwNjNlNzllZTBiN2I1ODY3IiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IENhcmliYmVhbiBhZHZlbnR1cmUgdHJhdmVsIGd1aWRlcyBBcHJpbFxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBmaW5kIHRyYXZlbCBndWlkZXMgZm9jdXNpbmcgb24gb3V0ZG9vciBhZHZlbnR1cmUgaW4gdGhlIENhcmliYmVhbiBkdXJpbmcgQXByaWwuIiwidHlwZSI6InNlYXJjaCJ9LCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoid2ViX3NlYXJjaF9jYWxsIn0seyJpZCI6Im1zZ182ODYyYzM4YmI3M2M4MWEyYWUyOWFmNTgzZDJkOGIyYzA2M2U3OWVlMGI3YjU4NjciLCJjb250ZW50IjpbeyJhbm5vdGF0aW9ucyI6W10sInRleHQiOiJJbiBBcHJpbCwgdGhlIENhcmliYmVhbiBvZmZlcnMgYSBwbGV0aG9yYSBvZiBhZHZlbnR1cmUgYWN0aXZpdGllcyBzdWl0YWJsZSBmb3Igb3V0ZG9vciBlbnRodXNpYXN0cy4gVGhlIHJlZ2lvbidzIHdhcm0gdGVtcGVyYXR1cmVzIGFuZCByZWxhdGl2ZWx5IGRyeSBjb25kaXRpb25zIG1ha2UgaXQgaWRlYWwgZm9yIHZhcmlvdXMgcHVyc3VpdHMuXG5cbioqSGlraW5nIGFuZCBUcmVra2luZyoqOiBEZXN0aW5hdGlvbnMgbGlrZSBEb21pbmljYSwga25vd24gYXMgdGhlIFwiTmF0dXJlIElzbGFuZCxcIiBwcm92aWRlIGV4dGVuc2l2ZSBoaWtpbmcgdHJhaWxzIHRocm91Z2ggcmFpbmZvcmVzdHMgYW5kIHRvIHZvbGNhbmljIHBlYWtzLiBKYW1haWNhJ3MgQmx1ZSBNb3VudGFpbnMgb2ZmZXIgY2hhbGxlbmdpbmcgdHJla3Mgd2l0aCByZXdhcmRpbmcgcGFub3JhbWljIHZpZXdzLlxuXG4qKldhdGVyIFNwb3J0cyoqOiBUaGUgQmFoYW1hcyBhbmQgdGhlIENheW1hbiBJc2xhbmRzIGFyZSByZW5vd25lZCBmb3Igc2N1YmEgZGl2aW5nIGFuZCBzbm9ya2VsaW5nLCBmZWF0dXJpbmcgdmlicmFudCBjb3JhbCByZWVmcyBhbmQgZGl2ZXJzZSBtYXJpbmUgbGlmZS4gUHVlcnRvIFJpY28ncyBSaW5jb24gaXMgYSBob3RzcG90IGZvciBzdXJmaW5nLCB3aXRoIGNvbnNpc3RlbnQgd2F2ZXMgZHVyaW5nIHRoaXMgcGVyaW9kLlxuXG4qKlNhaWxpbmcgYW5kIEtheWFraW5nKio6IFRoZSBCcml0aXNoIFZpcmdpbiBJc2xhbmRzIGFyZSBhIHNhaWxvcidzIHBhcmFkaXNlLCBvZmZlcmluZyBjYWxtIHdhdGVycyBhbmQgbnVtZXJvdXMgaXNsYW5kcyB0byBleHBsb3JlLiBJbiBCZWxpemUsIGtheWFraW5nIHRocm91Z2ggdGhlIEdyZWF0IEJsdWUgSG9sZSBwcm92aWRlcyBhIHVuaXF1ZSBhZHZlbnR1cmUgZXhwZXJpZW5jZS5cblxuKipXaWxkbGlmZSBFeHBsb3JhdGlvbioqOiBBcHJpbCBpcyBwcmltZSB0aW1lIGZvciBiaXJkd2F0Y2hpbmcgaW4gVHJpbmlkYWQgYW5kIFRvYmFnbywgaG9tZSB0byBzcGVjaWVzIGxpa2UgdGhlIFNjYXJsZXQgSWJpcy4gSW4gU3QuIEx1Y2lhLCB2aXNpdG9ycyBjYW4gZXhwZXJpZW5jZSB0dXJ0bGUgd2F0Y2hpbmcgYXMgbGVhdGhlcmJhY2sgdHVydGxlcyBjb21lIGFzaG9yZSB0byBuZXN0LlxuXG4qKkN1bHR1cmFsIEZlc3RpdmFscyoqOiBUaGUgU3QuIFRob21hcyBDYXJuaXZhbCBpbiB0aGUgVS5TLiBWaXJnaW4gSXNsYW5kcyBvY2N1cnMgaW4gQXByaWwsIGJsZW5kaW5nIGN1bHR1cmFsIGZlc3Rpdml0aWVzIHdpdGggYWR2ZW50dXJlIG9wcG9ydHVuaXRpZXMuXG5cblRyYXZlbGVycyBzaG91bGQgY29uc3VsdCBzcGVjaWZpYyB0cmF2ZWwgZ3VpZGVzIGZvciBkZXRhaWxlZCBpbmZvcm1hdGlvbiBvbiB0aGVzZSBhY3Rpdml0aWVzLCBpbmNsdWRpbmcgc2FmZXR5IHRpcHMsIGVxdWlwbWVudCByZW50YWxzLCBhbmQgbG9jYWwgcmVndWxhdGlvbnMuICIsInR5cGUiOiJvdXRwdXRfdGV4dCIsImxvZ3Byb2JzIjpbXX1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjoxLCJpbnB1dF90b2tlbnMiOjQ0MywiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjI3MCwib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjcxM30sInJlc3BvbnNlX2lkIjoicmVzcF82ODYyYzM4ODQ1ZWM4MWEyOWQ1MjYyYzRlNGIyODhlZTA2M2U3OWVlMGI3YjU4NjcifQ==" - } - ] - }, - "scheduledEventId": "15", - "startedEventId": "41", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "43", - "eventTime": "2025-06-30T17:04:14.959531Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057154", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "44", - "eventTime": "2025-06-30T17:04:14.962477Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057158", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "43", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "84049bbb-0a74-4768-98ad-ce9f20e10a63", - "historySizeBytes": "35568", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "45", - "eventTime": "2025-06-30T17:04:14.985519Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057162", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "43", - "startedEventId": "44", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "46", - "eventTime": "2025-06-30T17:04:08.054957Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057164", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "17", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "c516d2b5-8215-4d6a-8cb0-695831a80a31", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "47", - "eventTime": "2025-06-30T17:04:15.153730Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057165", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODg0YjkwODFhMmFlYTYyMjg0MzA5MTJmZjEwNjlkNjI5MmViMjJlZmUwIiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IENhcmliYmVhbiB2YWNhdGlvbiBwYWNrYWdlcyBzdXJmaW5nIGhpa2luZyBBcHJpbFxcblJlYXNvbiBmb3Igc2VhcmNoaW5nOiBUbyBkaXNjb3ZlciBhbGwtaW5jbHVzaXZlIHZhY2F0aW9uIHBhY2thZ2VzIGZvciBhbiBhZHZlbnR1cmUtZm9jdXNlZCBBcHJpbCB0cmlwLiIsInR5cGUiOiJzZWFyY2gifSwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6IndlYl9zZWFyY2hfY2FsbCJ9LHsiaWQiOiJtc2dfNjg2MmMzOGI2ODdjODFhMjhiY2I2ZmM1ZmVjOWNmMTMwNjlkNjI5MmViMjJlZmUwIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOlt7ImVuZF9pbmRleCI6NTcyLCJzdGFydF9pbmRleCI6NDcyLCJ0aXRsZSI6IkFkdmVudHVyZSBCZWdpbnMgYXQgQ29jb251dCBCYXkiLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly9jYmF5cmVzb3J0LmNvbS9hY3Rpdml0aWVzL2FkdmVudHVyZS1iZWdpbnMtY29jb251dC1iYXk/dXRtX3NvdXJjZT1vcGVuYWkifSx7ImVuZF9pbmRleCI6MTA4MSwic3RhcnRfaW5kZXgiOjk4MiwidGl0bGUiOiJXYW5kZXJsdXN0IENhcmliYmVhbiB8IERvbWluaWNhIEFkdmVudHVyZSAmIE5hdHVyZSBWYWNhdGlvbiBQYWNrYWdlcyB8IEZvciBOYXR1cmUgTG92ZXJzIGFuZCBBY3RpdmUgVHJhdmVsZXJzIiwidHlwZSI6InVybF9jaXRhdGlvbiIsInVybCI6Imh0dHBzOi8vd3d3LndhbmRlcmx1c3RjYXJpYmJlYW4uY29tL2NvcHktb2YtcGFja2FnZXM/dXRtX3NvdXJjZT1vcGVuYWkifSx7ImVuZF9pbmRleCI6MTU0NSwic3RhcnRfaW5kZXgiOjE0NzcsInRpdGxlIjoiQWxsLUluY2x1c2l2ZSBWYWNhdGlvbiBQYWNrYWdlcyB8IFNsaWNrcm9jayBCZWxpemUgQWR2ZW50dXJlcyIsInR5cGUiOiJ1cmxfY2l0YXRpb24iLCJ1cmwiOiJodHRwczovL3NsaWNrcm9jay5jb20vcGFja2FnZXMvP3V0bV9zb3VyY2U9b3BlbmFpIn1dLCJ0ZXh0IjoiRm9yIGFuIGFkdmVudHVyZS1mb2N1c2VkLCBhbGwtaW5jbHVzaXZlIENhcmliYmVhbiB2YWNhdGlvbiBpbiBBcHJpbCB0aGF0IGNvbWJpbmVzIHN1cmZpbmcgYW5kIGhpa2luZywgY29uc2lkZXIgdGhlIGZvbGxvd2luZyBvcHRpb25zOlxuXG4qKjEuIFN0LiBMdWNpYTogQ29jb251dCBCYXkgQmVhY2ggUmVzb3J0ICYgU3BhKipcblxuTG9jYXRlZCBvbiBTdC4gTHVjaWEncyBzb3V0aGVybiBjb2FzdCwgQ29jb251dCBCYXkgb2ZmZXJzIGEgcmFuZ2Ugb2YgYWR2ZW50dXJlIGFjdGl2aXRpZXMuIEd1ZXN0cyBjYW4gZW5nYWdlIGluIGtpdGUgc3VyZmluZywgaGlraW5nIHRocm91Z2ggcmFpbmZvcmVzdHMsIHNub3JrZWxpbmcsIHppcC1saW5pbmcsIGFuZCBvZmYtcm9hZGluZyBleGN1cnNpb25zLiBUaGUgcmVzb3J0IHByb3ZpZGVzIG5hdHVyZSBndWlkZXMgdG8gbGVhZCByYWluZm9yZXN0IGhpa2VzIGFuZCB3YXRlcmZhbGwgdmlzaXRzLiAoW2NiYXlyZXNvcnQuY29tXShodHRwczovL2NiYXlyZXNvcnQuY29tL2FjdGl2aXRpZXMvYWR2ZW50dXJlLWJlZ2lucy1jb2NvbnV0LWJheT91dG1fc291cmNlPW9wZW5haSkpXG5cbioqMi4gRG9taW5pY2E6IFdhbmRlcmx1c3QgQ2FyaWJiZWFuIEFkdmVudHVyZSBUcmF2ZWwgQm91dGlxdWUgSG90ZWwqKlxuXG5XYW5kZXJsdXN0IENhcmliYmVhbiBzcGVjaWFsaXplcyBpbiBhZHZlbnR1cmUgdHJhdmVsIHBhY2thZ2VzIG9uIHRoZSBpc2xhbmQgb2YgRG9taW5pY2EuIEFjdGl2aXRpZXMgaW5jbHVkZSBoaWtpbmcgdG8gd2F0ZXJmYWxscywgc25vcmtlbGluZyBpbiBwcmlzdGluZSByZWVmcywgc2N1YmEgZGl2aW5nLCBrYXlha2luZywgY2FueW9uaW5nLCB3aGFsZSB3YXRjaGluZywgYmlyZCB3YXRjaGluZywgYmlraW5nLCBhbmQgaG9yc2ViYWNrIHJpZGluZy4gVGhlIGhvdGVsIG9mZmVycyBwZXJzb25hbGl6ZWQgc21hbGwgZ3JvdXAgcGFja2FnZXMgdGFpbG9yZWQgdG8gYWN0aXZlIHRyYXZlbGVycy4gKFt3YW5kZXJsdXN0Y2FyaWJiZWFuLmNvbV0oaHR0cHM6Ly93d3cud2FuZGVybHVzdGNhcmliYmVhbi5jb20vY29weS1vZi1wYWNrYWdlcz91dG1fc291cmNlPW9wZW5haSkpXG5cbioqMy4gQmVsaXplOiBTbGlja3JvY2sgQmVsaXplIEFkdmVudHVyZXMqKlxuXG5TbGlja3JvY2sgb2ZmZXJzIGFsbC1pbmNsdXNpdmUgYWR2ZW50dXJlIHZhY2F0aW9uIHBhY2thZ2VzIG9uIExvbmcgQ2F5ZSwgcGFydCBvZiBHbG92ZXLigJlzIFJlZWYgQXRvbGwuIEd1ZXN0cyBzdGF5IGluIGJlYWNoZnJvbnQgY2FiYW5hcyBhbmQgcGFydGljaXBhdGUgaW4gYWN0aXZpdGllcyBzdWNoIGFzIHNlYSBrYXlha2luZywgc25vcmtlbGluZywgd2luZHN1cmZpbmcsIHN1cmYga2F5YWtpbmcsIGFuZCBzdGFuZC11cCBwYWRkbGVib2FyZGluZy4gVGhlIDgtbmlnaHQgcGFja2FnZSBpbmNsdWRlcyBhIG5pZ2h0IGF0IFBlbGljYW4gQmVhY2ggUmVzb3J0IGFuZCBzZXZlbiBuaWdodHMgb24gdGhlIGlzbGFuZC4gKFtzbGlja3JvY2suY29tXShodHRwczovL3NsaWNrcm9jay5jb20vcGFja2FnZXMvP3V0bV9zb3VyY2U9b3BlbmFpKSlcblxuKipXZWF0aGVyIENvbnNpZGVyYXRpb25zIGZvciBBcHJpbDoqKlxuXG4tICoqTW9udGVnbyBCYXksIEphbWFpY2E6KiogQXZlcmFnZSB0ZW1wZXJhdHVyZXMgcmFuZ2UgZnJvbSAyM8KwQyB0byAzM8KwQyAoNzPCsEYgdG8gOTHCsEYpLlxuXG4tICoqUHVlcnRvIFZpZWpvLCBDb3N0YSBSaWNhOioqIEF2ZXJhZ2UgdGVtcGVyYXR1cmVzIHJhbmdlIGZyb20gMjDCsEMgdG8gMzbCsEMgKDY4wrBGIHRvIDk3wrBGKS5cblxuLSAqKkNhYmFyZXRlLCBEb21pbmljYW4gUmVwdWJsaWM6KiogQXZlcmFnZSB0ZW1wZXJhdHVyZXMgcmFuZ2UgZnJvbSAxNcKwQyB0byAzM8KwQyAoNTnCsEYgdG8gOTHCsEYpLlxuXG5UaGVzZSBkZXN0aW5hdGlvbnMgb2ZmZXIgYSBibGVuZCBvZiBzdXJmaW5nIGFuZCBoaWtpbmcgYWN0aXZpdGllcyB3aXRoaW4gYWxsLWluY2x1c2l2ZSBwYWNrYWdlcywgY2F0ZXJpbmcgdG8gYWR2ZW50dXJlIGVudGh1c2lhc3RzIHNlZWtpbmcgYW4gYWN0aXZlIENhcmliYmVhbiB2YWNhdGlvbiBpbiBBcHJpbC4gIiwidHlwZSI6Im91dHB1dF90ZXh0IiwibG9ncHJvYnMiOltdfV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9XSwidXNhZ2UiOnsicmVxdWVzdHMiOjEsImlucHV0X3Rva2VucyI6NDQzLCJpbnB1dF90b2tlbnNfZGV0YWlscyI6eyJjYWNoZWRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6NDQyLCJvdXRwdXRfdG9rZW5zX2RldGFpbHMiOnsicmVhc29uaW5nX3Rva2VucyI6MH0sInRvdGFsX3Rva2VucyI6ODg1fSwicmVzcG9uc2VfaWQiOiJyZXNwXzY4NjJjMzg4NDNhODgxYTI4ZTAwOWE2NTExMWJhOGUxMDY5ZDYyOTJlYjIyZWZlMCJ9" - } - ] - }, - "scheduledEventId": "17", - "startedEventId": "46", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "48", - "eventTime": "2025-06-30T17:04:15.153740Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057166", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "49", - "eventTime": "2025-06-30T17:04:15.156252Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057170", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "48", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "af4a9e00-a4d9-4d01-be55-b439ee29e776", - "historySizeBytes": "39649", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "50", - "eventTime": "2025-06-30T17:04:15.178141Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057174", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "48", - "startedEventId": "49", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "51", - "eventTime": "2025-06-30T17:04:08.054151Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057176", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "14", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "02e6bade-6bcb-4ea0-a4dc-343eb2398951", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "52", - "eventTime": "2025-06-30T17:04:15.535164Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057177", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODg0Zjc0ODFhMGIzZTBhMzQ4NjE0MmQ1MGYwZGYwZmM2ZTgwMWIzYmJkIiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IENhcmliYmVhbiBpc2xhbmRzIHN1cmZpbmcgaGlraW5nIEFwcmlsXFxuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGRldGVybWluZSBzcGVjaWZpYyBpc2xhbmRzIGluIHRoZSBDYXJpYmJlYW4ga25vd24gZm9yIG91dGRvb3IgYWN0aXZpdGllcyBsaWtlIHN1cmZpbmcgYW5kIGhpa2luZyBpbiBBcHJpbC4iLCJ0eXBlIjoic2VhcmNoIn0sInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJ3ZWJfc2VhcmNoX2NhbGwifSx7ImlkIjoibXNnXzY4NjJjMzhjNTUyODgxYTBhMzM1OTllOGJmM2U1MDg0MGRmMGZjNmU4MDFiM2JiZCIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IlNldmVyYWwgQ2FyaWJiZWFuIGlzbGFuZHMgb2ZmZXIgZXhjZWxsZW50IG9wcG9ydHVuaXRpZXMgZm9yIGJvdGggc3VyZmluZyBhbmQgaGlraW5nIGluIEFwcmlsLiBKYW1haWNhLCBwYXJ0aWN1bGFybHkgdGhlIE1vbnRlZ28gQmF5IGFyZWEsIHByb3ZpZGVzIHdhcm0gdGVtcGVyYXR1cmVzIHJhbmdpbmcgZnJvbSAyMi45wrBDIHRvIDMzLjTCsEMsIGlkZWFsIGZvciBvdXRkb29yIGFjdGl2aXRpZXMuIFRoZSBpc2xhbmQgZmVhdHVyZXMgc3VyZiBzcG90cyBsaWtlIEJvc3RvbiBCYXkgYW5kIExvbmcgQmF5LCBhbmQgaGlraW5nIHRyYWlscyBpbiB0aGUgQmx1ZSBNb3VudGFpbnMuXG5cbkJhcmJhZG9zLCB3aXRoIHRlbXBlcmF0dXJlcyBiZXR3ZWVuIDIyLjjCsEMgYW5kIDMxLjHCsEMsIGlzIGtub3duIGZvciBjb25zaXN0ZW50IHN1cmYgYnJlYWtzIHN1Y2ggYXMgU291cCBCb3dsIGFuZCBGcmVpZ2h0cyBCYXkuIFRoZSBpc2xhbmQgYWxzbyBvZmZlcnMgaGlraW5nIG9wcG9ydHVuaXRpZXMgaW4gYXJlYXMgbGlrZSB0aGUgU2NvdGxhbmQgRGlzdHJpY3QuXG5cblRoZSBEb21pbmljYW4gUmVwdWJsaWMsIGVzcGVjaWFsbHkgYXJvdW5kIFB1bnRhIENhbmEsIGV4cGVyaWVuY2VzIHRlbXBlcmF0dXJlcyBmcm9tIDIwLjPCsEMgdG8gMzEuNcKwQy4gU3VyZmluZyBpcyBwb3B1bGFyIGluIENhYmFyZXRlLCB3aGlsZSB0aGUgQ29yZGlsbGVyYSBDZW50cmFsIG1vdW50YWlucyBwcm92aWRlIGV4dGVuc2l2ZSBoaWtpbmcgdHJhaWxzLlxuXG5Db3N0YSBSaWNhJ3MgUHVlcnRvIFZpZWpvIHJlZ2lvbiwgd2l0aCB0ZW1wZXJhdHVyZXMgYmV0d2VlbiAyMC4wwrBDIGFuZCAzNi4xwrBDLCBvZmZlcnMgc3VyZiBzcG90cyBsaWtlIFNhbHNhIEJyYXZhIGFuZCBQbGF5YSBDb2NsZXMsIGFsb25nc2lkZSBoaWtpbmcgaW4gdGhlIG5lYXJieSBHYW5kb2NhLU1hbnphbmlsbG8gV2lsZGxpZmUgUmVmdWdlLlxuXG5QdWVydG8gUmljbywgcGFydGljdWxhcmx5IFNhbiBKdWFuLCBoYXMgdGVtcGVyYXR1cmVzIHJhbmdpbmcgZnJvbSAyMi4wwrBDIHRvIDMxLjXCsEMuIFRoZSBpc2xhbmQgZmVhdHVyZXMgc3VyZiBzcG90cyBsaWtlIFJpbmNvbiBhbmQgSXNhYmVsYSwgYW5kIGhpa2luZyB0cmFpbHMgaW4gRWwgWXVucXVlIE5hdGlvbmFsIEZvcmVzdC5cblxuVGhlc2UgaXNsYW5kcyBwcm92aWRlIGEgY29tYmluYXRpb24gb2Ygc3VyZmluZyBhbmQgaGlraW5nIGV4cGVyaWVuY2VzIHN1aXRhYmxlIGZvciBBcHJpbCdzIGNsaW1hdGUuICIsInR5cGUiOiJvdXRwdXRfdGV4dCIsImxvZ3Byb2JzIjpbXX1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjoxLCJpbnB1dF90b2tlbnMiOjQ1MSwiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjI2Niwib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjcxN30sInJlc3BvbnNlX2lkIjoicmVzcF82ODYyYzM4ODNkZWM4MWEwYmQzM2RmMWE3MzY0MDczMzBkZjBmYzZlODAxYjNiYmQifQ==" - } - ] - }, - "scheduledEventId": "14", - "startedEventId": "51", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "53", - "eventTime": "2025-06-30T17:04:15.535176Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057178", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "54", - "eventTime": "2025-06-30T17:04:15.537839Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057182", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "53", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "769bd159-6aec-4a6c-aaf0-d40e77f3c033", - "historySizeBytes": "42285", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "55", - "eventTime": "2025-06-30T17:04:15.560851Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057186", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "53", - "startedEventId": "54", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "56", - "eventTime": "2025-06-30T17:04:08.057282Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057188", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "19", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "84749c23-921d-4b23-9571-e0c651d6d0ab", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "57", - "eventTime": "2025-06-30T17:04:16.071889Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057189", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODg3NmYwODE5ZGFiMTA3NzIyODIzNDFhZGIwNmNlY2JlYzBjMjgyZGI1IiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IHdhdGVyIHNwb3J0cyBnZWFyIHJlbnRhbHMgQ2FyaWJiZWFuIEFwcmlsXFxuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGZpbmQgaW5mb3JtYXRpb24gb24gcmVudGFsIGVxdWlwbWVudCBhdmFpbGFiaWxpdHkgZm9yIHdhdGVyIHNwb3J0cyBhbmQgaGlraW5nIGluIHRoZSBDYXJpYmJlYW4uIiwidHlwZSI6InNlYXJjaCJ9LCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoid2ViX3NlYXJjaF9jYWxsIn0seyJpZCI6Im1zZ182ODYyYzM4YWRjYzg4MTlkYTQ0MTNmYzYzMGE0NmYyODA2Y2VjYmVjMGMyODJkYjUiLCJjb250ZW50IjpbeyJhbm5vdGF0aW9ucyI6W3siZW5kX2luZGV4Ijo0NzksInN0YXJ0X2luZGV4IjozOTEsInRpdGxlIjoiUkVOVEFMUyB8IFJpbmNvbiBDYXBpdGFsIFdhdGVyIFNwb3J0cyIsInR5cGUiOiJ1cmxfY2l0YXRpb24iLCJ1cmwiOiJodHRwczovL3d3dy5jYXBpdGFsd2F0ZXJzcG9ydHMuY29tL3JlbnRhbHM/dXRtX3NvdXJjZT1vcGVuYWkifSx7ImVuZF9pbmRleCI6OTMxLCJzdGFydF9pbmRleCI6ODMyLCJ0aXRsZSI6IlBsYWNlbmNpYSBBd2Vzb21lIFdhdGVyIFNwb3J0cyIsInR5cGUiOiJ1cmxfY2l0YXRpb24iLCJ1cmwiOiJodHRwczovL3d3dy5wbGFjZW5jaWFhd2Vzb21ld2F0ZXJzcG9ydHMuY29tLz91dG1fc291cmNlPW9wZW5haSJ9LHsiZW5kX2luZGV4IjoxMzU0LCJzdGFydF9pbmRleCI6MTI3NSwidGl0bGUiOiJDYXJpYmJlYW4gUGFkZGxpbmcgfCBLYXlhayAmIFBhZGRsZWJvYXJkIFJlbnRhbHMgYXQgU3QuIE1hcnRpbiIsInR5cGUiOiJ1cmxfY2l0YXRpb24iLCJ1cmwiOiJodHRwczovL3d3dy5jYXJpYmJlYW5wYWRkbGluZy5jb20vP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjE2NDksInN0YXJ0X2luZGV4IjoxNTY4LCJ0aXRsZSI6IlN0LiBUaG9tYXMgV2F0ZXIgU3BvcnRzIFJlbnRhbHMgLSBJc2xhbmQgQWR2ZW50dXJlcyIsInR5cGUiOiJ1cmxfY2l0YXRpb24iLCJ1cmwiOiJodHRwczovL2Z1bmJvYXRkYXkuY29tL3dhdGVyLXNwb3J0LXJlbnRhbHMvP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjIwMDEsInN0YXJ0X2luZGV4IjoxOTIwLCJ0aXRsZSI6IlN0LiBLaXR0cyBXYXRlciBTcG9ydHMg4oCTIFRoZSAjMSBXYXRlciBTcG9ydHMgQ2VudGVyIGluIHRoZSBDYXJpYmJlYW4iLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly93d3cuc3RraXR0c3dhdGVyc3BvcnRzLmNvbS8/dXRtX3NvdXJjZT1vcGVuYWkifSx7ImVuZF9pbmRleCI6MjM4OSwic3RhcnRfaW5kZXgiOjIyOTEsInRpdGxlIjoiSXNsYW5kIFN1cmYgJiBTYWlsIC0gQlZJIFRyYXZlbGxlciIsInR5cGUiOiJ1cmxfY2l0YXRpb24iLCJ1cmwiOiJodHRwczovL3d3dy5idml0cmF2ZWxsZXIuY29tL3dhdGVyc3BvcnRzL2lzbGFuZC1zdXJmLXNhaWwvP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjI3MzYsInN0YXJ0X2luZGV4IjoyNjYzLCJ0aXRsZSI6IlJlbnRhbHMgaW4gUHVlcnRvIFJpY28gfCBBcXVhdGljYSBQdWVydG8gUmljbyIsInR5cGUiOiJ1cmxfY2l0YXRpb24iLCJ1cmwiOiJodHRwczovL3d3dy5hcXVhdGljYXByLmNvbS9yZW50YWxzLz91dG1fc291cmNlPW9wZW5haSJ9XSwidGV4dCI6IkluIHRoZSBDYXJpYmJlYW4sIG51bWVyb3VzIHdhdGVyIHNwb3J0cyBnZWFyIHJlbnRhbCBzZXJ2aWNlcyBhcmUgYXZhaWxhYmxlIHRvIGVuaGFuY2UgeW91ciBhcXVhdGljIGFkdmVudHVyZXMuIEZvciBpbnN0YW5jZSwgKipSaW5jb24gQ2FwaXRhbCBXYXRlciBTcG9ydHMqKiBvZmZlcnMgYSB2YXJpZXR5IG9mIGVxdWlwbWVudCwgaW5jbHVkaW5nIGpldCBza2lzLCBrYXlha3MsIHN1cmZib2FyZHMsIHBhZGRsZWJvYXJkcywgc25vcmtlbCBhbmQgc2N1YmEgZ2VhciwgZmlzaGluZyBlcXVpcG1lbnQsIGJlYWNoIGNoYWlycywgdW1icmVsbGFzLCBhbmQgYmFuYW5hIGJvYXRzLiBUaGV5IHJlY29tbWVuZCBjb250YWN0aW5nIHRoZW0gZGlyZWN0bHkgdG8gbWFrZSBhIHJlc2VydmF0aW9uLiAoW2NhcGl0YWx3YXRlcnNwb3J0cy5jb21dKGh0dHBzOi8vd3d3LmNhcGl0YWx3YXRlcnNwb3J0cy5jb20vcmVudGFscz91dG1fc291cmNlPW9wZW5haSkpXG5cblNpbWlsYXJseSwgKipQbGFjZW5jaWEgQXdlc29tZSBXYXRlciBTcG9ydHMqKiBpbiBCZWxpemUgcHJvdmlkZXMgcmVudGFscyBmb3IgamV0IHNraXMsIGtheWFrcywgcGFkZGxlYm9hcmRzLCBhbmQgc25vcmtlbCBnZWFyLiBUaGVpciBqZXQgc2tpcyBjYW4gYWNjb21tb2RhdGUgdHdvIGFkdWx0cyBhbmQgYXJlIGF2YWlsYWJsZSBmb3IgcmVudCB0aHJvdWdob3V0IHRoZSB5ZWFyLiBUaGV5IGFsc28gb2ZmZXIgaG91cmx5LCBoYWxmLWRheSwgZnVsbC1kYXksIGFuZCB3ZWVrbHkgcmVudGFscyBmb3IgcGFkZGxlYm9hcmRzIGFuZCBrYXlha3MsIHdpdGggZGVsaXZlcnkgb3B0aW9ucyBmb3Igd2Vla2x5IHJlbnRhbHMuIChbcGxhY2VuY2lhYXdlc29tZXdhdGVyc3BvcnRzLmNvbV0oaHR0cHM6Ly93d3cucGxhY2VuY2lhYXdlc29tZXdhdGVyc3BvcnRzLmNvbS8/dXRtX3NvdXJjZT1vcGVuYWkpKVxuXG5JbiBTYWludC1NYXJ0aW4sICoqQ2FyaWJiZWFuIFBhZGRsaW5nKiogc3BlY2lhbGl6ZXMgaW4gZWNvLWZyaWVuZGx5IGFkdmVudHVyZXMsIG9mZmVyaW5nIGtheWFrIGFuZCBwYWRkbGVib2FyZCByZW50YWxzLCBhcyB3ZWxsIGFzIHNub3JrZWxpbmcgZXhwZXJpZW5jZXMuIFRoZXkgcHJvdmlkZSB0b3AtcXVhbGl0eSBlcXVpcG1lbnQgYW5kIHBlcnNvbmFsaXplZCBhZHZlbnR1cmUgcGFja2FnZXMgdGFpbG9yZWQgdG8gdmFyaW91cyBza2lsbCBsZXZlbHMuIFRoZWlyIHByaW1lIGxvY2F0aW9uIG9mZmVycyBkaXJlY3QgYWNjZXNzIHRvIHBpY3R1cmVzcXVlIHNwb3RzIGxpa2UgUGluZWwgSXNsYW5kLiAoW2NhcmliYmVhbnBhZGRsaW5nLmNvbV0oaHR0cHM6Ly93d3cuY2FyaWJiZWFucGFkZGxpbmcuY29tLz91dG1fc291cmNlPW9wZW5haSkpXG5cbkZvciB0aG9zZSB2aXNpdGluZyBTdC4gVGhvbWFzLCAqKklzbGFuZCBBZHZlbnR1cmVzKiogb2ZmZXJzIHNub3JrZWwgZ2VhciwgY29vbGVycywgbm9vZGxlcywgZmxvYXQgbWF0cywgYW5kIGZvbGRpbmcgYmVhY2ggY2hhaXJzIGZvciByZW50LiBUaGV5IGhhdmUgcGljay11cCBsb2NhdGlvbnMgYXQgTWFyZ2FyaXRhdmlsbGUgUmVzb3J0IGFuZCBFbHlzaWFuIFJlc29ydC4gKFtmdW5ib2F0ZGF5LmNvbV0oaHR0cHM6Ly9mdW5ib2F0ZGF5LmNvbS93YXRlci1zcG9ydC1yZW50YWxzLz91dG1fc291cmNlPW9wZW5haSkpXG5cbkluIFN0LiBLaXR0cywgKipTdC4gS2l0dHMgV2F0ZXIgU3BvcnRzKiogcHJvdmlkZXMgYSB3aWRlIHJhbmdlIG9mIGFjdGl2aXRpZXMsIGluY2x1ZGluZyBqZXQgc2tpIHJlbnRhbHMsIGZseWJvYXJkaW5nLCBwYWRkbGVib2FyZGluZywga2F5YWtpbmcsIGFuZCBzbm9ya2VsaW5nLiBUaGV5IG9mZmVyIHZhcmlvdXMgcGFja2FnZXMsIHN1Y2ggYXMgdGhlIEFsbCBEYXkgQWN0aW9uIFBhc3MsIHdoaWNoIGluY2x1ZGVzIG11bHRpcGxlIGFjdGl2aXRpZXMgaW4gb25lIGRheS4gKFtzdGtpdHRzd2F0ZXJzcG9ydHMuY29tXShodHRwczovL3d3dy5zdGtpdHRzd2F0ZXJzcG9ydHMuY29tLz91dG1fc291cmNlPW9wZW5haSkpXG5cbkluIFRvcnRvbGEsICoqSXNsYW5kIFN1cmYgJiBTYWlsKiogb2ZmZXJzIGEgdmFyaWV0eSBvZiB3YXRlciB0b3lzIGFuZCBzcG9ydHMgZXF1aXBtZW50IGZvciByZW50LCBpbmNsdWRpbmcga2F5YWtzLCBzdGFuZC11cCBwYWRkbGVib2FyZHMsIHN1cmZib2FyZHMsIGZpc2hpbmcgZ2Vhciwgc25vcmtlbGluZyBlcXVpcG1lbnQsIGFuZCBmbG9hdHMuIFRoZXkgcHJvdmlkZSBmcmVlIGRlbGl2ZXJ5IHRvIGNoYXJ0ZXIgY29tcGFuaWVzLCBob3RlbHMsIHZpbGxhcywgYW5kIGJlYWNoZXMgaXNsYW5kLXdpZGUuIChbYnZpdHJhdmVsbGVyLmNvbV0oaHR0cHM6Ly93d3cuYnZpdHJhdmVsbGVyLmNvbS93YXRlcnNwb3J0cy9pc2xhbmQtc3VyZi1zYWlsLz91dG1fc291cmNlPW9wZW5haSkpXG5cbkluIFB1ZXJ0byBSaWNvLCAqKkFxdWF0aWNhIFVuZGVyd2F0ZXIgQWR2ZW50dXJlcyoqIG9mZmVycyBzY3ViYSBhbmQgc25vcmtlbCBnZWFyIHJlbnRhbHMgYW5kIHNhbGVzLCBpbmNsdWRpbmcgbWFza3MsIHNub3JrZWxzLCBmaW5zLCBCQ0RzLCByZWd1bGF0b3JzLCBhbmQgdGFua3MuIFRoZXkgYXJlIGNvbnZlbmllbnRseSBsb2NhdGVkIG5lYXIgc2V2ZXJhbCBwb3B1bGFyIGJlYWNoZXMgYW5kIHByb3ZpZGUgaGlnaC1xdWFsaXR5LCBzYWZldHktdGVzdGVkIGVxdWlwbWVudC4gKFthcXVhdGljYXByLmNvbV0oaHR0cHM6Ly93d3cuYXF1YXRpY2Fwci5jb20vcmVudGFscy8/dXRtX3NvdXJjZT1vcGVuYWkpKVxuXG5SZWdhcmRpbmcgaGlraW5nIGdlYXIgcmVudGFscywgc3BlY2lmaWMgaW5mb3JtYXRpb24gaXMgbGltaXRlZC4gSXQncyBhZHZpc2FibGUgdG8gY29udGFjdCBsb2NhbCB0b3VyIG9wZXJhdG9ycyBvciBvdXRkb29yIGFkdmVudHVyZSBjb21wYW5pZXMgaW4geW91ciBjaG9zZW4gZGVzdGluYXRpb24gdG8gaW5xdWlyZSBhYm91dCB0aGUgYXZhaWxhYmlsaXR5IG9mIGhpa2luZyBlcXVpcG1lbnQgcmVudGFscy4gIiwidHlwZSI6Im91dHB1dF90ZXh0IiwibG9ncHJvYnMiOltdfV0sInJvbGUiOiJhc3Npc3RhbnQiLCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoibWVzc2FnZSJ9XSwidXNhZ2UiOnsicmVxdWVzdHMiOjEsImlucHV0X3Rva2VucyI6NDQ5LCJpbnB1dF90b2tlbnNfZGV0YWlscyI6eyJjYWNoZWRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6NjM3LCJvdXRwdXRfdG9rZW5zX2RldGFpbHMiOnsicmVhc29uaW5nX3Rva2VucyI6MH0sInRvdGFsX3Rva2VucyI6MTA4Nn0sInJlc3BvbnNlX2lkIjoicmVzcF82ODYyYzM4ODZkZTg4MTlkOTNkNDBkYmMzYTcxMTIwODA2Y2VjYmVjMGMyODJkYjUifQ==" - } - ] - }, - "scheduledEventId": "19", - "startedEventId": "56", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "58", - "eventTime": "2025-06-30T17:04:16.071903Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057190", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "59", - "eventTime": "2025-06-30T17:04:16.074976Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057194", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "58", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "75ed8ca4-07ab-4876-895d-bceaecf1380b", - "historySizeBytes": "47945", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "60", - "eventTime": "2025-06-30T17:04:16.097762Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057198", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "58", - "startedEventId": "59", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "61", - "eventTime": "2025-06-30T17:04:08.058230Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057200", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "12", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "28fc40c3-6a61-47ea-8a8f-10f21da99d69", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "62", - "eventTime": "2025-06-30T17:04:16.487908Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057201", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODg1YWE4ODFhMWE2ODVjODNjMTA4NTRjNjEwOTkyNGRmNjIxYWNlOWUwIiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IGJlc3QgQ2FyaWJiZWFuIGhpa2luZyBkZXN0aW5hdGlvbnMgQXByaWxcXG5SZWFzb24gZm9yIHNlYXJjaGluZzogVG8gaWRlbnRpZnkgdG9wIGhpa2luZyBkZXN0aW5hdGlvbnMgaW4gdGhlIENhcmliYmVhbiBmb3IgQXByaWwgdmFjYXRpb25zLiIsInR5cGUiOiJzZWFyY2gifSwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6IndlYl9zZWFyY2hfY2FsbCJ9LHsiaWQiOiJtc2dfNjg2MmMzOGMwZjE4ODFhMWFhMmRjZTZiZjdjYmM3MDcwOTkyNGRmNjIxYWNlOWUwIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOlt7ImVuZF9pbmRleCI6NzQxLCJzdGFydF9pbmRleCI6NjQ1LCJ0aXRsZSI6Ikhpa2luZyBhbmQgTmF0dXJlIFRyYWlscyBpbiB0aGUgQ2FyaWJiZWFuIC0gQ2FyaWJ1bmUiLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly93d3cuY2FyaWJ1bmUuY29tL2NhcmliYmVhbi1oaWtpbmctYW5kLW5hdHVyZS10cmFpbHMvP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjEyNzMsInN0YXJ0X2luZGV4IjoxMTc3LCJ0aXRsZSI6Ikhpa2luZyBhbmQgTmF0dXJlIFRyYWlscyBpbiB0aGUgQ2FyaWJiZWFuIC0gQ2FyaWJ1bmUiLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly93d3cuY2FyaWJ1bmUuY29tL2NhcmliYmVhbi1oaWtpbmctYW5kLW5hdHVyZS10cmFpbHMvP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjE4MzMsInN0YXJ0X2luZGV4IjoxNzMyLCJ0aXRsZSI6IjUgYmVzdCBoaWtlcyBpbiB0aGUgQ2FyaWJiZWFuIC0gTG9uZWx5IFBsYW5ldCIsInR5cGUiOiJ1cmxfY2l0YXRpb24iLCJ1cmwiOiJodHRwczovL3d3dy5sb25lbHlwbGFuZXQuY29tL2FydGljbGVzL2Jlc3QtaGlrZXMtaW4tY2FyaWJiZWFuP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjIyNTEsInN0YXJ0X2luZGV4IjoyMTY4LCJ0aXRsZSI6Ik1vdW50IFNjZW5lcnkiLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvTW91bnRfU2NlbmVyeT91dG1fc291cmNlPW9wZW5haSJ9LHsiZW5kX2luZGV4IjoyNzQ5LCJzdGFydF9pbmRleCI6MjY1MywidGl0bGUiOiJIaWtpbmcgYW5kIE5hdHVyZSBUcmFpbHMgaW4gdGhlIENhcmliYmVhbiAtIENhcmlidW5lIiwidHlwZSI6InVybF9jaXRhdGlvbiIsInVybCI6Imh0dHBzOi8vd3d3LmNhcmlidW5lLmNvbS9jYXJpYmJlYW4taGlraW5nLWFuZC1uYXR1cmUtdHJhaWxzLz91dG1fc291cmNlPW9wZW5haSJ9XSwidGV4dCI6IkFwcmlsIGlzIGFuIGV4Y2VsbGVudCB0aW1lIHRvIGV4cGxvcmUgdGhlIENhcmliYmVhbidzIGRpdmVyc2UgaGlraW5nIGRlc3RpbmF0aW9ucywgb2ZmZXJpbmcgZmF2b3JhYmxlIHdlYXRoZXIgY29uZGl0aW9ucyBhbmQgdmlicmFudCBuYXR1cmFsIGxhbmRzY2FwZXMuIEhlcmUgYXJlIHNvbWUgdG9wIGhpa2luZyBzcG90cyB0byBjb25zaWRlcjpcblxuKioxLiBFbCBZdW5xdWUgTmF0aW9uYWwgRm9yZXN0LCBQdWVydG8gUmljbyoqXG5cbkFzIHRoZSBvbmx5IHRyb3BpY2FsIHJhaW5mb3Jlc3QgaW4gdGhlIFUuUy4gTmF0aW9uYWwgRm9yZXN0IFN5c3RlbSwgRWwgWXVucXVlIHNwYW5zIGFwcHJveGltYXRlbHkgMjgsMDAwIGFjcmVzIHdpdGggYSBuZXR3b3JrIG9mIHdlbGwtbWFpbnRhaW5lZCB0cmFpbHMuIEhpa2VycyBjYW4gZXhwZXJpZW5jZSBkaXZlcnNlIGZsb3JhIGFuZCBmYXVuYSwgaW5jbHVkaW5nIHRoZSBQdWVydG8gUmljYW4gcGFycm90IGFuZCBjb3F1w60gZnJvZywgYW5kIHZpc2l0IHN0dW5uaW5nIHdhdGVyZmFsbHMgbGlrZSBMYSBNaW5hIEZhbGxzLiBPYnNlcnZhdGlvbiB0b3dlcnMgc3VjaCBhcyBZb2thaHUgVG93ZXIgcHJvdmlkZSBwYW5vcmFtaWMgdmlld3Mgb2YgdGhlIGZvcmVzdCBjYW5vcHkgYW5kIGNvYXN0bGluZS4gKFtjYXJpYnVuZS5jb21dKGh0dHBzOi8vd3d3LmNhcmlidW5lLmNvbS9jYXJpYmJlYW4taGlraW5nLWFuZC1uYXR1cmUtdHJhaWxzLz91dG1fc291cmNlPW9wZW5haSkpXG5cbioqMi4gQmx1ZSBNb3VudGFpbiBQZWFrLCBKYW1haWNhKipcblxuU3RhbmRpbmcgYXQgNyw0MDIgZmVldCwgQmx1ZSBNb3VudGFpbiBQZWFrIGlzIEphbWFpY2EncyBoaWdoZXN0IHBvaW50LiBUaGUgaGlrZSB0byB0aGUgc3VtbWl0IGlzIHBvcHVsYXIgZm9yIGl0cyBicmVhdGh0YWtpbmcgc3VucmlzZSB2aWV3cywgd2hlcmUsIG9uIGNsZWFyIGRheXMsIHRoZSBkaXN0YW50IGNvYXN0bGluZSBvZiBDdWJhIGlzIHZpc2libGUuIFRoZSBhcmVhIGlzIGEgVU5FU0NPIFdvcmxkIEhlcml0YWdlIFNpdGUsIGhvbWUgdG8gZW5kZW1pYyBzcGVjaWVzIGxpa2UgdGhlIEphbWFpY2FuIHN3YWxsb3d0YWlsIGJ1dHRlcmZseSwgYW5kIGlzIHJlbm93bmVkIGZvciBpdHMgQmx1ZSBNb3VudGFpbiBDb2ZmZWUgcGxhbnRhdGlvbnMgb2ZmZXJpbmcgdG91cnMgYW5kIHRhc3RpbmdzLiAoW2NhcmlidW5lLmNvbV0oaHR0cHM6Ly93d3cuY2FyaWJ1bmUuY29tL2NhcmliYmVhbi1oaWtpbmctYW5kLW5hdHVyZS10cmFpbHMvP3V0bV9zb3VyY2U9b3BlbmFpKSlcblxuKiozLiBXYWl0dWt1YnVsaSBOYXRpb25hbCBUcmFpbCwgRG9taW5pY2EqKlxuXG5TdHJldGNoaW5nIDExNSBtaWxlcyBhY3Jvc3MgRG9taW5pY2EsIHRoZSBXYWl0dWt1YnVsaSBOYXRpb25hbCBUcmFpbCBpcyB0aGUgQ2FyaWJiZWFuJ3MgZmlyc3QgbG9uZy1kaXN0YW5jZSBoaWtpbmcgdHJhaWwuIERpdmlkZWQgaW50byAxNCBzZWdtZW50cywgaXQgdHJhdmVyc2VzIHZvbGNhbmljIGNyYXRlcnMsIGhvdCBzcHJpbmdzLCBhbmQgYm9pbGluZyBsYWtlcywgc2hvd2Nhc2luZyB0aGUgaXNsYW5kJ3MgZ2VvdGhlcm1hbCBhY3Rpdml0eS4gSGlrZXJzIGNhbiB2aXNpdCBpbmRpZ2Vub3VzIEthbGluYWdvIHZpbGxhZ2VzLCBoaXN0b3JpYyBmb3J0cywgYW5kIGNvbG9uaWFsIHBsYW50YXRpb25zLCBleHBlcmllbmNpbmcgZGl2ZXJzZSBlY29zeXN0ZW1zIGZyb20gcmFpbmZvcmVzdHMgdG8gY29hc3RhbCBhcmVhcy4gKFtsb25lbHlwbGFuZXQuY29tXShodHRwczovL3d3dy5sb25lbHlwbGFuZXQuY29tL2FydGljbGVzL2Jlc3QtaGlrZXMtaW4tY2FyaWJiZWFuP3V0bV9zb3VyY2U9b3BlbmFpKSlcblxuKio0LiBNb3VudCBTY2VuZXJ5LCBTYWJhKipcblxuTW91bnQgU2NlbmVyeSwgdGhlIGhpZ2hlc3QgcG9pbnQgaW4gdGhlIEtpbmdkb20gb2YgdGhlIE5ldGhlcmxhbmRzLCBvZmZlcnMgYSBzdHJlbnVvdXMgaGlrZSB1cCAxLDA2NCBzdGVwcyB0byBpdHMgc3VtbWl0LiBUaGUgdHJhaWwgcGFzc2VzIHRocm91Z2ggcmFpbmZvcmVzdCBhbmQgY2xvdWQgZm9yZXN0LCBmZWF0dXJpbmcgdHJlZSBmZXJucywgd2lsZCBwbGFudGFpbnMsIGFuZCBNb3VudGFpbiBQYWxtcy4gQXQgdGhlIHN1bW1pdCwgaGlrZXJzIGFyZSByZXdhcmRlZCB3aXRoIHBhbm9yYW1pYyB2aWV3cyBvZiB0aGUgaXNsYW5kLiAoW2VuLndpa2lwZWRpYS5vcmddKGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL01vdW50X1NjZW5lcnk/dXRtX3NvdXJjZT1vcGVuYWkpKVxuXG4qKjUuIFNvdWZyacOocmUgVm9sY2FubyBUcmFpbCwgU2FpbnQgVmluY2VudCoqXG5cblRoZSBTb3VmcmnDqHJlIFZvbGNhbm8gVHJhaWwgbGVhZHMgdG8gdGhlIHN1bW1pdCBvZiBMYSBTb3VmcmnDqHJlLCBhbiBhY3RpdmUgc3RyYXRvdm9sY2Fuby4gVGhlIGNoYWxsZW5naW5nIGhpa2Ugb2ZmZXJzIHN0dW5uaW5nIHZpZXdzIG9mIHRoZSBpc2xhbmQncyBsdXNoIGxhbmRzY2FwZSBhbmQgdGhlIENhcmliYmVhbiBTZWEuIFRoZSB0cmFpbCBwYXNzZXMgdGhyb3VnaCBkZW5zZSByYWluZm9yZXN0LCBhbHBpbmUgbWVhZG93cywgYW5kIHZvbGNhbmljIHJvY2sgZm9ybWF0aW9ucywgd2l0aCBndWlkZWQgdG91cnMgcHJvdmlkaW5nIGluc2lnaHRzIGludG8gdGhlIHZvbGNhbm8ncyBoaXN0b3J5IGFuZCBnZW9sb2d5LiAoW2NhcmlidW5lLmNvbV0oaHR0cHM6Ly93d3cuY2FyaWJ1bmUuY29tL2NhcmliYmVhbi1oaWtpbmctYW5kLW5hdHVyZS10cmFpbHMvP3V0bV9zb3VyY2U9b3BlbmFpKSlcblxuVGhlc2UgZGVzdGluYXRpb25zIG9mZmVyIGEgYmxlbmQgb2YgbmF0dXJhbCBiZWF1dHksIGN1bHR1cmFsIGV4cGVyaWVuY2VzLCBhbmQgdmFyeWluZyBsZXZlbHMgb2YgaGlraW5nIGNoYWxsZW5nZXMsIG1ha2luZyB0aGVtIGlkZWFsIGZvciBhbiBBcHJpbCBDYXJpYmJlYW4gYWR2ZW50dXJlLiAiLCJ0eXBlIjoib3V0cHV0X3RleHQiLCJsb2dwcm9icyI6W119XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn1dLCJ1c2FnZSI6eyJyZXF1ZXN0cyI6MSwiaW5wdXRfdG9rZW5zIjo0MzksImlucHV0X3Rva2Vuc19kZXRhaWxzIjp7ImNhY2hlZF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjo2MjMsIm91dHB1dF90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjowfSwidG90YWxfdG9rZW5zIjoxMDYyfSwicmVzcG9uc2VfaWQiOiJyZXNwXzY4NjJjMzg4NDk5YzgxYTE5YmZkYzE2YTkwNTRlMTFhMDk5MjRkZjYyMWFjZTllMCJ9" - } - ] - }, - "scheduledEventId": "12", - "startedEventId": "61", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "63", - "eventTime": "2025-06-30T17:04:16.487920Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057202", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "64", - "eventTime": "2025-06-30T17:04:16.490618Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057206", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "63", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "8d7affff-d2aa-4ba2-b5f4-292116da9943", - "historySizeBytes": "53223", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "65", - "eventTime": "2025-06-30T17:04:16.512689Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057210", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "63", - "startedEventId": "64", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "66", - "eventTime": "2025-06-30T17:04:08.056909Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057212", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "16", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "908ff46c-062a-47dd-aaa4-758df766d4f4", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "67", - "eventTime": "2025-06-30T17:04:23.897293Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057213", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoid3NfNjg2MmMzODg0YTk4ODFhMGE1ZTE2NzhhMWE4MWVlZDEwNmY1MDA1M2RmMTljYTdiIiwiYWN0aW9uIjp7InF1ZXJ5IjoiU2VhcmNoIHRlcm06IENhcmliYmVhbiB3ZWF0aGVyIEFwcmlsIHN1cmZpbmcgaGlraW5nXFxuUmVhc29uIGZvciBzZWFyY2hpbmc6IFRvIGxlYXJuIGFib3V0IHdlYXRoZXIgY29uZGl0aW9ucyBpbiB0aGUgQ2FyaWJiZWFuIGluIEFwcmlsLCBmb2N1c2luZyBvbiBvdXRkb29yIGFjdGl2aXRpZXMuIiwidHlwZSI6InNlYXJjaCJ9LCJzdGF0dXMiOiJjb21wbGV0ZWQiLCJ0eXBlIjoid2ViX3NlYXJjaF9jYWxsIn0seyJpZCI6Im1zZ182ODYyYzM5NTAwMTg4MWEwODkzYTA0YWVhYjJhNDQzYjA2ZjUwMDUzZGYxOWNhN2IiLCJjb250ZW50IjpbeyJhbm5vdGF0aW9ucyI6W3siZW5kX2luZGV4Ijo1MDEsInN0YXJ0X2luZGV4Ijo0MDgsInRpdGxlIjoiQXByaWwgaW4gdGhlIENhcmliYmVhbjogV2VhdGhlciBhbmQgRXZlbnQgR3VpZGUiLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly93d3cudHJpcHNhdnZ5LmNvbS9hcHJpbC1pbi10aGUtY2FyaWJiZWFuLTE0ODc2NTk/dXRtX3NvdXJjZT1vcGVuYWkifSx7ImVuZF9pbmRleCI6OTQ0LCJzdGFydF9pbmRleCI6ODM1LCJ0aXRsZSI6IkJlc3QgVGltZSBUbyBWaXNpdCBDYXJpYmJlYW4gfCBCYWNrcm9hZHMiLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly93d3cuYmFja3JvYWRzLmNvbS9wcm8tdGlwcy90cmF2ZWwtZ3VpZGVzL3doZW4tdG8tdmlzaXQvY2FyaWJiZWFuP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjEzNzQsInN0YXJ0X2luZGV4IjoxMjY1LCJ0aXRsZSI6IkJlc3QgVGltZSBUbyBWaXNpdCBDYXJpYmJlYW4gfCBCYWNrcm9hZHMiLCJ0eXBlIjoidXJsX2NpdGF0aW9uIiwidXJsIjoiaHR0cHM6Ly93d3cuYmFja3JvYWRzLmNvbS9wcm8tdGlwcy90cmF2ZWwtZ3VpZGVzL3doZW4tdG8tdmlzaXQvY2FyaWJiZWFuP3V0bV9zb3VyY2U9b3BlbmFpIn0seyJlbmRfaW5kZXgiOjE2NDQsInN0YXJ0X2luZGV4IjoxNTUxLCJ0aXRsZSI6IkFwcmlsIGluIHRoZSBDYXJpYmJlYW46IFdlYXRoZXIgYW5kIEV2ZW50IEd1aWRlIiwidHlwZSI6InVybF9jaXRhdGlvbiIsInVybCI6Imh0dHBzOi8vd3d3LnRyaXBzYXZ2eS5jb20vYXByaWwtaW4tdGhlLWNhcmliYmVhbi0xNDg3NjU5P3V0bV9zb3VyY2U9b3BlbmFpIn1dLCJ0ZXh0IjoiQXByaWwgaW4gdGhlIENhcmliYmVhbiBvZmZlcnMgd2FybSB0ZW1wZXJhdHVyZXMsIHR5cGljYWxseSByYW5naW5nIGZyb20gZGF5dGltZSBoaWdocyBpbiB0aGUgbWlkLTgwc8KwRiAoMjgtMzDCsEMpIHRvIG5pZ2h0dGltZSBsb3dzIGluIHRoZSBtaWQtNzBzwrBGICgyMC0yNMKwQykuIFRoaXMgcGVyaW9kIG1hcmtzIHRoZSBlbmQgb2YgdGhlIGRyeSBzZWFzb24sIHJlc3VsdGluZyBpbiBwcmVkb21pbmFudGx5IHN1bm55IGRheXMgd2l0aCBtaW5pbWFsIHJhaW5mYWxsLCBtYWtpbmcgaXQgaWRlYWwgZm9yIG91dGRvb3IgYWN0aXZpdGllcy4gV2F0ZXIgdGVtcGVyYXR1cmVzIGFyZSBhbHNvIHdhcm0sIGF2ZXJhZ2luZyBhcm91bmQgODDCsEYgKDI3wrBDKSwgcGVyZmVjdCBmb3Igc3dpbW1pbmcgYW5kIHdhdGVyIHNwb3J0cy4gKFt0cmlwc2F2dnkuY29tXShodHRwczovL3d3dy50cmlwc2F2dnkuY29tL2FwcmlsLWluLXRoZS1jYXJpYmJlYW4tMTQ4NzY1OT91dG1fc291cmNlPW9wZW5haSkpXG5cbkZvciBzdXJmaW5nIGVudGh1c2lhc3RzLCB0aGUgQ2FyaWJiZWFuIHByb3ZpZGVzIGZhdm9yYWJsZSBjb25kaXRpb25zIGluIEFwcmlsLiBXaGlsZSB0aGUgbGFyZ2VzdCBzd2VsbHMgb2NjdXIgZHVyaW5nIHRoZSBsYXRlIHJhaW55IHNlYXNvbiwgdGhlIHBlcmlvZCBmcm9tIE5vdmVtYmVyIHRvIEFwcmlsIG9mZmVycyBjb25zaXN0ZW50IHdhdmVzIHN1aXRhYmxlIGZvciBzdXJmZXJzIG9mIHZhcmlvdXMgc2tpbGwgbGV2ZWxzLiBOb3RhYmxlIHN1cmZpbmcgZGVzdGluYXRpb25zIGluY2x1ZGUgUHVlcnRvIFJpY28sIHRoZSBEb21pbmljYW4gUmVwdWJsaWMsIGFuZCBCYXJiYWRvcy4gKFtiYWNrcm9hZHMuY29tXShodHRwczovL3d3dy5iYWNrcm9hZHMuY29tL3Byby10aXBzL3RyYXZlbC1ndWlkZXMvd2hlbi10by12aXNpdC9jYXJpYmJlYW4/dXRtX3NvdXJjZT1vcGVuYWkpKVxuXG5IaWtpbmcgb3Bwb3J0dW5pdGllcyBhYm91bmQgaW4gdGhlIENhcmliYmVhbidzIG1vdW50YWlub3VzIHJlZ2lvbnMuIERlc3RpbmF0aW9ucyBzdWNoIGFzIEVsIFl1bnF1ZSBpbiBQdWVydG8gUmljbywgdGhlIEJsdWUgTW91bnRhaW5zIGluIEphbWFpY2EsIGFuZCB0aGUgYXJlYSBhcm91bmQgSmFyYWJhY29hIGluIHRoZSBEb21pbmljYW4gUmVwdWJsaWMgb2ZmZXIgZXhjZWxsZW50IHRyYWlscy4gQXByaWwncyB3YXJtIGFuZCBkcnkgd2VhdGhlciBwcm92aWRlcyBjb21mb3J0YWJsZSBjb25kaXRpb25zIGZvciBleHBsb3JpbmcgdGhlc2UgbGFuZHNjYXBlcy4gKFtiYWNrcm9hZHMuY29tXShodHRwczovL3d3dy5iYWNrcm9hZHMuY29tL3Byby10aXBzL3RyYXZlbC1ndWlkZXMvd2hlbi10by12aXNpdC9jYXJpYmJlYW4/dXRtX3NvdXJjZT1vcGVuYWkpKVxuXG5BZGRpdGlvbmFsbHksIEFwcmlsIGhvc3RzIHZhcmlvdXMgY3VsdHVyYWwgZXZlbnRzIGFjcm9zcyB0aGUgQ2FyaWJiZWFuLCBpbmNsdWRpbmcgRWFzdGVyIGNlbGVicmF0aW9ucyBhbmQgcmVnYXR0YXMgbGlrZSBBbnRpZ3VhIFNhaWxpbmcgV2VlaywgZW5oYW5jaW5nIHRoZSB0cmF2ZWwgZXhwZXJpZW5jZS4gKFt0cmlwc2F2dnkuY29tXShodHRwczovL3d3dy50cmlwc2F2dnkuY29tL2FwcmlsLWluLXRoZS1jYXJpYmJlYW4tMTQ4NzY1OT91dG1fc291cmNlPW9wZW5haSkpICIsInR5cGUiOiJvdXRwdXRfdGV4dCIsImxvZ3Byb2JzIjpbXX1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjoxLCJpbnB1dF90b2tlbnMiOjQ0NywiaW5wdXRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MH0sIm91dHB1dF90b2tlbnMiOjM1Nywib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjgwNH0sInJlc3BvbnNlX2lkIjoicmVzcF82ODYyYzM4ODQ0Mzg4MWEwOWFhZDhjMDA5YTA4NTRlYjA2ZjUwMDUzZGYxOWNhN2IifQ==" - } - ] - }, - "scheduledEventId": "16", - "startedEventId": "66", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "68", - "eventTime": "2025-06-30T17:04:23.897299Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057214", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "69", - "eventTime": "2025-06-30T17:04:23.898956Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057218", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "68", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "18f86b97-7a89-42c6-b337-73336ac8bd84", - "historySizeBytes": "57064", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "70", - "eventTime": "2025-06-30T17:04:23.918626Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057222", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "68", - "startedEventId": "69", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "71", - "eventTime": "2025-06-30T17:04:23.918651Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1057223", - "activityTaskScheduledEventAttributes": { - "activityId": "12", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJSZXNlYXJjaCB0cmFjZSIsInNwYW5JZCI6InNwYW5fNjlmM2NiZTkyZDJlNGU3NGEyNDFjYmY1IiwidHJhY2VJZCI6InRyYWNlXzUyYjBiNjQ1MjNmMDQ3ZDc5MTI2YTc2OTY5ZGIzMTllIn0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIHNlbmlvciByZXNlYXJjaGVyIHRhc2tlZCB3aXRoIHdyaXRpbmcgYSBjb2hlc2l2ZSByZXBvcnQgZm9yIGEgcmVzZWFyY2ggcXVlcnkuIFlvdSB3aWxsIGJlIHByb3ZpZGVkIHdpdGggdGhlIG9yaWdpbmFsIHF1ZXJ5LCBhbmQgc29tZSBpbml0aWFsIHJlc2VhcmNoIGRvbmUgYnkgYSByZXNlYXJjaCBhc3Npc3RhbnQuXG5Zb3Ugc2hvdWxkIGZpcnN0IGNvbWUgdXAgd2l0aCBhbiBvdXRsaW5lIGZvciB0aGUgcmVwb3J0IHRoYXQgZGVzY3JpYmVzIHRoZSBzdHJ1Y3R1cmUgYW5kIGZsb3cgb2YgdGhlIHJlcG9ydC4gVGhlbiwgZ2VuZXJhdGUgdGhlIHJlcG9ydCBhbmQgcmV0dXJuIHRoYXQgYXMgeW91ciBmaW5hbCBvdXRwdXQuXG5UaGUgZmluYWwgb3V0cHV0IHNob3VsZCBiZSBpbiBtYXJrZG93biBmb3JtYXQsIGFuZCBpdCBzaG91bGQgYmUgbGVuZ3RoeSBhbmQgZGV0YWlsZWQuIEFpbSBmb3IgNS0xMCBwYWdlcyBvZiBjb250ZW50LCBhdCBsZWFzdCAxMDAwIHdvcmRzLiIsImlucHV0IjpbeyJjb250ZW50IjoiT3JpZ2luYWwgcXVlcnk6IENhcmliYmVhbiB2YWNhdGlvbiBzcG90cyBpbiBBcHJpbCwgb3B0aW1pemluZyBmb3Igc3VyZmluZywgaGlraW5nIGFuZCB3YXRlciBzcG9ydHNcblN1bW1hcml6ZWQgc2VhcmNoIHJlc3VsdHM6IFtcIkluIEFwcmlsLCB0aGUgQ2FyaWJiZWFuIG9mZmVycyBhIHZhcmlldHkgb2Ygd2F0ZXIgc3BvcnRzIHN1aXRhYmxlIGZvciBlbnRodXNpYXN0cyBvZiBhbGwgbGV2ZWxzLiBTdXJmaW5nIGlzIHBhcnRpY3VsYXJseSBwb3B1bGFyIGR1cmluZyB0aGlzIG1vbnRoLCBhcyBpdCBmYWxscyB3aXRoaW4gdGhlIHBlYWsgc2Vhc29uIGZyb20gTm92ZW1iZXIgdG8gQXByaWwsIHByb3ZpZGluZyBjb25zaXN0ZW50IHdhdmVzIGZvciBib3RoIHNlYXNvbmVkIHN1cmZlcnMgYW5kIGJlZ2lubmVycy4gKFtlbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbV0oaHR0cHM6Ly9lbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbS9jYXJpYmJlYW4td2F0ZXJzcG9ydHMtZ3VpZGUvP3V0bV9zb3VyY2U9b3BlbmFpKSlcXG5cXG5LaXRlc3VyZmluZyBpcyBhbm90aGVyIGZhdm9yZWQgYWN0aXZpdHkgYWNyb3NzIHRoZSBDYXJpYmJlYW4gaXNsYW5kcyBpbiBBcHJpbCwgdGhhbmtzIHRvIHN0ZWFkeSB3aW5kcyBhbmQgaWRlYWwgd2F2ZSBjb25kaXRpb25zLCBtYWtpbmcgaXQgYWNjZXNzaWJsZSBmb3IgYm90aCBub3ZpY2VzIGFuZCBleHBlcnRzLiBTbm9ya2VsaW5nIGFsc28gdGhyaXZlcyBkdXJpbmcgdGhpcyBwZXJpb2QsIHdpdGggY2xlYXIgd2F0ZXJzIGFuZCBhYnVuZGFudCBtYXJpbmUgbGlmZSBvZmZlcmluZyB1bmlxdWUgdW5kZXJ3YXRlciBleHBlcmllbmNlcy4gKFtlbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbV0oaHR0cHM6Ly9lbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbS9jYXJpYmJlYW4td2F0ZXJzcG9ydHMtZ3VpZGUvP3V0bV9zb3VyY2U9b3BlbmFpKSlcXG5cXG5TYWlsaW5nIHJlbWFpbnMgYSB0aW1lbGVzcyBwdXJzdWl0IGluIHRoZSBDYXJpYmJlYW4sIHdpdGggQXByaWwncyBmYXZvcmFibGUgd2VhdGhlciBjb25kaXRpb25zIGVuaGFuY2luZyB0aGUgZXhwZXJpZW5jZS4gV2hldGhlciB5b3UncmUgbmF2aWdhdGluZyB0aGUgc2VhcyB3aXRoIGZhbWlseSBvciBmcmllbmRzLCB0aGUgcG9zc2liaWxpdHkgb2YgZW5jb3VudGVyaW5nIGRvbHBoaW5zIGFkZHMgdG8gdGhlIGFkdmVudHVyZS4gKFtlbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbV0oaHR0cHM6Ly9lbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbS9jYXJpYmJlYW4td2F0ZXJzcG9ydHMtZ3VpZGUvP3V0bV9zb3VyY2U9b3BlbmFpKSlcXG5cXG5PdmVyYWxsLCBBcHJpbCdzIGNsaW1hdGUgaW4gdGhlIENhcmliYmVhbiBpcyBjb25kdWNpdmUgdG8gYSB3aWRlIHJhbmdlIG9mIHdhdGVyIHNwb3J0cywgZW5zdXJpbmcgbWVtb3JhYmxlIGV4cGVyaWVuY2VzIGZvciB2aXNpdG9ycy4gXCIsIFwiSW4gQXByaWwsIHRoZSBDYXJpYmJlYW4gaG9zdHMgc2V2ZXJhbCBub3RhYmxlIHN1cmZpbmcgYW5kIHdhdGVyIHNwb3J0cyBldmVudHMuIFRoZSBCYXJiYWRvcyBTdXJmIFBybywgcGFydCBvZiB0aGUgV29ybGQgU3VyZiBMZWFndWUncyBRdWFsaWZ5aW5nIFNlcmllcywgdHlwaWNhbGx5IHRha2VzIHBsYWNlIGluIEFwcmlsIGF0IERyaWxsIEhhbGwgQmVhY2gsIGF0dHJhY3RpbmcgaW50ZXJuYXRpb25hbCBzdXJmZXJzLiBTaW1pbGFybHksIHRoZSBNYXJ0aW5pcXVlIFN1cmYgUHJvLCBhbm90aGVyIFdTTCBRdWFsaWZ5aW5nIFNlcmllcyBldmVudCwgaXMgdXN1YWxseSBoZWxkIGluIEFwcmlsIGF0IEJhc3NlLVBvaW50ZSwgZmVhdHVyaW5nIGJvdGggbWVuJ3MgYW5kIHdvbWVuJ3MgY29tcGV0aXRpb25zLiBBZGRpdGlvbmFsbHksIHRoZSBDYXJpYmJlYW4gU3VyZiBOZXR3b3JrIG9mdGVuIG9yZ2FuaXplcyByZWdpb25hbCBjb21wZXRpdGlvbnMgZHVyaW5nIHRoaXMgbW9udGgsIHRob3VnaCBzcGVjaWZpYyBkYXRlcyBhbmQgbG9jYXRpb25zIGNhbiB2YXJ5IGFubnVhbGx5LlxcblxcbkJleW9uZCBzdXJmaW5nLCB0aGUgQ2FyaWJiZWFuIG9mZmVycyB2YXJpb3VzIHdhdGVyIHNwb3J0cyBmZXN0aXZhbHMgaW4gQXByaWwuIFRoZSBTdC4gVGhvbWFzIEludGVybmF0aW9uYWwgUmVnYXR0YSBpbiB0aGUgVS5TLiBWaXJnaW4gSXNsYW5kcyBpcyBhIHByb21pbmVudCBzYWlsaW5nIGV2ZW50IGRyYXdpbmcgcGFydGljaXBhbnRzIHdvcmxkd2lkZS4gSW4gdGhlIEJhaGFtYXMsIHRoZSBOYXRpb25hbCBGYW1pbHkgSXNsYW5kIFJlZ2F0dGEgc2hvd2Nhc2VzIHRyYWRpdGlvbmFsIEJhaGFtaWFuIHNsb29wIHNhaWxpbmcuIFRoZXNlIGV2ZW50cyBoaWdobGlnaHQgdGhlIHJlZ2lvbidzIHJpY2ggbWFyaXRpbWUgY3VsdHVyZSBhbmQgcHJvdmlkZSBvcHBvcnR1bml0aWVzIGZvciBib3RoIGNvbXBldGl0aW9uIGFuZCBjdWx0dXJhbCBleGNoYW5nZS4gXCIsICdJbiBBcHJpbCAyMDE0LCB0cmF2ZWxlcnMgaGlnaGxpZ2h0ZWQgdGhlIE9jZWFuIEFkdmVudHVyZXMgU2FpbGluZyBBZHZlbnR1cmUgaW4gUHVudGEgQ2FuYSwgRG9taW5pY2FuIFJlcHVibGljLCBhcyBhIHN0YW5kb3V0IGV4cGVyaWVuY2UuIE9uZSByZXZpZXdlciBkZXNjcmliZWQgaXQgYXMgdGhlIFwiaGlnaGxpZ2h0IG9mIG91ciB0cmlwLFwiIHByYWlzaW5nIHRoZSBjcmV3XFwncyBob3NwaXRhbGl0eSBhbmQgdGhlIHZhcmlldHkgb2YgYWN0aXZpdGllcywgaW5jbHVkaW5nIHNub3JrZWxpbmcsIHdhdGVyIHZvbGxleWJhbGwgaW4gYSBuYXR1cmFsIHBvb2wsIGRhbmNpbmcgZW50ZXJ0YWlubWVudCwgYW5kIGEgdGFzdHkgbHVuY2guIFRoZXkgYXBwcmVjaWF0ZWQgdGhhdCB0aGUgZXhjdXJzaW9uIG9mZmVyZWQgbW9yZSB0aGFuIGp1c3QgZHJpbmtpbmcgYW5kIHNpZ2h0c2VlaW5nLCBwcm92aWRpbmcgYSB3ZWxsLXJvdW5kZWQgYWR2ZW50dXJlLiAoW3RyaXBhZHZpc29yLmNvbV0oaHR0cHM6Ly93d3cudHJpcGFkdmlzb3IuY29tL1Nob3dVc2VyUmV2aWV3cy1nMTQ3MjkzLWQyNjI0Nzg5LXIyMDYxMTQxMDUtT2NlYW5fQWR2ZW50dXJlc19TYWlsaW5nX0FkdmVudHVyZS1QdW50YV9DYW5hX0xhX0FsdGFncmFjaWFfUHJvdmluY2VfRG9taW5pY2FuX1IuaHRtbD91dG1fc291cmNlPW9wZW5haSkpXFxuXFxuQW5vdGhlciB0cmF2ZWxlciwgd2hvIGhhZCBwcmV2aW91c2x5IGJlZW4gb24gYSBzaW1pbGFyIGNydWlzZSBpbiBQdW50YSBDYW5hLCBhbHNvIGhhZCBhIGdyZWF0IHRpbWUgb24gdGhpcyBzYWlsaW5nIGFkdmVudHVyZS4gVGhlc2UgcmV2aWV3cyBzdWdnZXN0IHRoYXQgdGhlIE9jZWFuIEFkdmVudHVyZXMgU2FpbGluZyBBZHZlbnR1cmUgb2ZmZXJzIGEgbWVtb3JhYmxlIGFuZCBlbmdhZ2luZyBleHBlcmllbmNlIGZvciB2aXNpdG9ycyBzZWVraW5nIGFjdGl2ZSB2YWNhdGlvbnMgaW4gdGhlIENhcmliYmVhbiBkdXJpbmcgQXByaWwuIChbdHJpcGFkdmlzb3IuY29tXShodHRwczovL3d3dy50cmlwYWR2aXNvci5jb20vU2hvd1VzZXJSZXZpZXdzLWcxNDcyOTMtZDI2MjQ3ODktcjIwNjExNDEwNS1PY2Vhbl9BZHZlbnR1cmVzX1NhaWxpbmdfQWR2ZW50dXJlLVB1bnRhX0NhbmFfTGFfQWx0YWdyYWNpYV9Qcm92aW5jZV9Eb21pbmljYW5fUi5odG1sP3V0bV9zb3VyY2U9b3BlbmFpKSkgJywgJ0FwcmlsIGlzIGFuIGV4Y2VsbGVudCBtb250aCBmb3Igc3VyZmluZyBpbiB0aGUgQ2FyaWJiZWFuLCB3aXRoIGNvbnNpc3RlbnQgc3dlbGxzIGFuZCBmYXZvcmFibGUgd2VhdGhlciBjb25kaXRpb25zLiBUb3AgZGVzdGluYXRpb25zIGluY2x1ZGUgUmluY29uIGluIFB1ZXJ0byBSaWNvLCBrbm93biBmb3IgaXRzIHZhcmlldHkgb2YgYnJlYWtzIHN1aXRhYmxlIGZvciBhbGwgbGV2ZWxzOyBCYXRoc2hlYmEgaW4gQmFyYmFkb3MsIG9mZmVyaW5nIHBvd2VyZnVsIHdhdmVzIGF0IHRoZSBTb3VwIEJvd2w7IGFuZCBQbGF5YSBFbmN1ZW50cm8gaW4gdGhlIERvbWluaWNhbiBSZXB1YmxpYywgZmVhdHVyaW5nIGNvbnNpc3RlbnQgd2F2ZXMgYW5kIGEgdmlicmFudCBzdXJmIGNvbW11bml0eS4gT3RoZXIgbm90YWJsZSBzcG90cyBhcmUgQWd1YWRpbGxhIGluIFB1ZXJ0byBSaWNvLCB3aXRoIGl0cyBkaXZlcnNlIHN1cmYgYnJlYWtzOyBhbmQgTG9uZyBCYXkgaW4gSmFtYWljYSwgcHJvdmlkaW5nIG1lbGxvdyB3YXZlcyBpZGVhbCBmb3IgYmVnaW5uZXJzLlxcblxcblRoZXNlIGxvY2F0aW9ucyBvZmZlciBhIG1peCBvZiByZWVmIGFuZCBiZWFjaCBicmVha3MsIGNhdGVyaW5nIHRvIHN1cmZlcnMgb2YgdmFyeWluZyBza2lsbCBsZXZlbHMuIFRoZSB3YXJtIENhcmliYmVhbiB3YXRlcnMgYW5kIGNvbnNpc3RlbnQgc3dlbGxzIGR1cmluZyBBcHJpbCBtYWtlIHRoZXNlIHNwb3RzIHBhcnRpY3VsYXJseSBhcHBlYWxpbmcuIEFkZGl0aW9uYWxseSwgdGhlIGxvY2FsIHN1cmYgY3VsdHVyZXMgYW5kIGFtZW5pdGllcyBlbmhhbmNlIHRoZSBvdmVyYWxsIGV4cGVyaWVuY2UgZm9yIHZpc2l0aW5nIHN1cmZlcnMuICcsICdJbiBBcHJpbCwgdGhlIENhcmliYmVhbiBvZmZlcnMgYSBwbGV0aG9yYSBvZiBhZHZlbnR1cmUgYWN0aXZpdGllcyBzdWl0YWJsZSBmb3Igb3V0ZG9vciBlbnRodXNpYXN0cy4gVGhlIHJlZ2lvblxcJ3Mgd2FybSB0ZW1wZXJhdHVyZXMgYW5kIHJlbGF0aXZlbHkgZHJ5IGNvbmRpdGlvbnMgbWFrZSBpdCBpZGVhbCBmb3IgdmFyaW91cyBwdXJzdWl0cy5cXG5cXG4qKkhpa2luZyBhbmQgVHJla2tpbmcqKjogRGVzdGluYXRpb25zIGxpa2UgRG9taW5pY2EsIGtub3duIGFzIHRoZSBcIk5hdHVyZSBJc2xhbmQsXCIgcHJvdmlkZSBleHRlbnNpdmUgaGlraW5nIHRyYWlscyB0aHJvdWdoIHJhaW5mb3Jlc3RzIGFuZCB0byB2b2xjYW5pYyBwZWFrcy4gSmFtYWljYVxcJ3MgQmx1ZSBNb3VudGFpbnMgb2ZmZXIgY2hhbGxlbmdpbmcgdHJla3Mgd2l0aCByZXdhcmRpbmcgcGFub3JhbWljIHZpZXdzLlxcblxcbioqV2F0ZXIgU3BvcnRzKio6IFRoZSBCYWhhbWFzIGFuZCB0aGUgQ2F5bWFuIElzbGFuZHMgYXJlIHJlbm93bmVkIGZvciBzY3ViYSBkaXZpbmcgYW5kIHNub3JrZWxpbmcsIGZlYXR1cmluZyB2aWJyYW50IGNvcmFsIHJlZWZzIGFuZCBkaXZlcnNlIG1hcmluZSBsaWZlLiBQdWVydG8gUmljb1xcJ3MgUmluY29uIGlzIGEgaG90c3BvdCBmb3Igc3VyZmluZywgd2l0aCBjb25zaXN0ZW50IHdhdmVzIGR1cmluZyB0aGlzIHBlcmlvZC5cXG5cXG4qKlNhaWxpbmcgYW5kIEtheWFraW5nKio6IFRoZSBCcml0aXNoIFZpcmdpbiBJc2xhbmRzIGFyZSBhIHNhaWxvclxcJ3MgcGFyYWRpc2UsIG9mZmVyaW5nIGNhbG0gd2F0ZXJzIGFuZCBudW1lcm91cyBpc2xhbmRzIHRvIGV4cGxvcmUuIEluIEJlbGl6ZSwga2F5YWtpbmcgdGhyb3VnaCB0aGUgR3JlYXQgQmx1ZSBIb2xlIHByb3ZpZGVzIGEgdW5pcXVlIGFkdmVudHVyZSBleHBlcmllbmNlLlxcblxcbioqV2lsZGxpZmUgRXhwbG9yYXRpb24qKjogQXByaWwgaXMgcHJpbWUgdGltZSBmb3IgYmlyZHdhdGNoaW5nIGluIFRyaW5pZGFkIGFuZCBUb2JhZ28sIGhvbWUgdG8gc3BlY2llcyBsaWtlIHRoZSBTY2FybGV0IEliaXMuIEluIFN0LiBMdWNpYSwgdmlzaXRvcnMgY2FuIGV4cGVyaWVuY2UgdHVydGxlIHdhdGNoaW5nIGFzIGxlYXRoZXJiYWNrIHR1cnRsZXMgY29tZSBhc2hvcmUgdG8gbmVzdC5cXG5cXG4qKkN1bHR1cmFsIEZlc3RpdmFscyoqOiBUaGUgU3QuIFRob21hcyBDYXJuaXZhbCBpbiB0aGUgVS5TLiBWaXJnaW4gSXNsYW5kcyBvY2N1cnMgaW4gQXByaWwsIGJsZW5kaW5nIGN1bHR1cmFsIGZlc3Rpdml0aWVzIHdpdGggYWR2ZW50dXJlIG9wcG9ydHVuaXRpZXMuXFxuXFxuVHJhdmVsZXJzIHNob3VsZCBjb25zdWx0IHNwZWNpZmljIHRyYXZlbCBndWlkZXMgZm9yIGRldGFpbGVkIGluZm9ybWF0aW9uIG9uIHRoZXNlIGFjdGl2aXRpZXMsIGluY2x1ZGluZyBzYWZldHkgdGlwcywgZXF1aXBtZW50IHJlbnRhbHMsIGFuZCBsb2NhbCByZWd1bGF0aW9ucy4gJywgXCJGb3IgYW4gYWR2ZW50dXJlLWZvY3VzZWQsIGFsbC1pbmNsdXNpdmUgQ2FyaWJiZWFuIHZhY2F0aW9uIGluIEFwcmlsIHRoYXQgY29tYmluZXMgc3VyZmluZyBhbmQgaGlraW5nLCBjb25zaWRlciB0aGUgZm9sbG93aW5nIG9wdGlvbnM6XFxuXFxuKioxLiBTdC4gTHVjaWE6IENvY29udXQgQmF5IEJlYWNoIFJlc29ydCAmIFNwYSoqXFxuXFxuTG9jYXRlZCBvbiBTdC4gTHVjaWEncyBzb3V0aGVybiBjb2FzdCwgQ29jb251dCBCYXkgb2ZmZXJzIGEgcmFuZ2Ugb2YgYWR2ZW50dXJlIGFjdGl2aXRpZXMuIEd1ZXN0cyBjYW4gZW5nYWdlIGluIGtpdGUgc3VyZmluZywgaGlraW5nIHRocm91Z2ggcmFpbmZvcmVzdHMsIHNub3JrZWxpbmcsIHppcC1saW5pbmcsIGFuZCBvZmYtcm9hZGluZyBleGN1cnNpb25zLiBUaGUgcmVzb3J0IHByb3ZpZGVzIG5hdHVyZSBndWlkZXMgdG8gbGVhZCByYWluZm9yZXN0IGhpa2VzIGFuZCB3YXRlcmZhbGwgdmlzaXRzLiAoW2NiYXlyZXNvcnQuY29tXShodHRwczovL2NiYXlyZXNvcnQuY29tL2FjdGl2aXRpZXMvYWR2ZW50dXJlLWJlZ2lucy1jb2NvbnV0LWJheT91dG1fc291cmNlPW9wZW5haSkpXFxuXFxuKioyLiBEb21pbmljYTogV2FuZGVybHVzdCBDYXJpYmJlYW4gQWR2ZW50dXJlIFRyYXZlbCBCb3V0aXF1ZSBIb3RlbCoqXFxuXFxuV2FuZGVybHVzdCBDYXJpYmJlYW4gc3BlY2lhbGl6ZXMgaW4gYWR2ZW50dXJlIHRyYXZlbCBwYWNrYWdlcyBvbiB0aGUgaXNsYW5kIG9mIERvbWluaWNhLiBBY3Rpdml0aWVzIGluY2x1ZGUgaGlraW5nIHRvIHdhdGVyZmFsbHMsIHNub3JrZWxpbmcgaW4gcHJpc3RpbmUgcmVlZnMsIHNjdWJhIGRpdmluZywga2F5YWtpbmcsIGNhbnlvbmluZywgd2hhbGUgd2F0Y2hpbmcsIGJpcmQgd2F0Y2hpbmcsIGJpa2luZywgYW5kIGhvcnNlYmFjayByaWRpbmcuIFRoZSBob3RlbCBvZmZlcnMgcGVyc29uYWxpemVkIHNtYWxsIGdyb3VwIHBhY2thZ2VzIHRhaWxvcmVkIHRvIGFjdGl2ZSB0cmF2ZWxlcnMuIChbd2FuZGVybHVzdGNhcmliYmVhbi5jb21dKGh0dHBzOi8vd3d3LndhbmRlcmx1c3RjYXJpYmJlYW4uY29tL2NvcHktb2YtcGFja2FnZXM/dXRtX3NvdXJjZT1vcGVuYWkpKVxcblxcbioqMy4gQmVsaXplOiBTbGlja3JvY2sgQmVsaXplIEFkdmVudHVyZXMqKlxcblxcblNsaWNrcm9jayBvZmZlcnMgYWxsLWluY2x1c2l2ZSBhZHZlbnR1cmUgdmFjYXRpb24gcGFja2FnZXMgb24gTG9uZyBDYXllLCBwYXJ0IG9mIEdsb3ZlcuKAmXMgUmVlZiBBdG9sbC4gR3Vlc3RzIHN0YXkgaW4gYmVhY2hmcm9udCBjYWJhbmFzIGFuZCBwYXJ0aWNpcGF0ZSBpbiBhY3Rpdml0aWVzIHN1Y2ggYXMgc2VhIGtheWFraW5nLCBzbm9ya2VsaW5nLCB3aW5kc3VyZmluZywgc3VyZiBrYXlha2luZywgYW5kIHN0YW5kLXVwIHBhZGRsZWJvYXJkaW5nLiBUaGUgOC1uaWdodCBwYWNrYWdlIGluY2x1ZGVzIGEgbmlnaHQgYXQgUGVsaWNhbiBCZWFjaCBSZXNvcnQgYW5kIHNldmVuIG5pZ2h0cyBvbiB0aGUgaXNsYW5kLiAoW3NsaWNrcm9jay5jb21dKGh0dHBzOi8vc2xpY2tyb2NrLmNvbS9wYWNrYWdlcy8/dXRtX3NvdXJjZT1vcGVuYWkpKVxcblxcbioqV2VhdGhlciBDb25zaWRlcmF0aW9ucyBmb3IgQXByaWw6KipcXG5cXG4tICoqTW9udGVnbyBCYXksIEphbWFpY2E6KiogQXZlcmFnZSB0ZW1wZXJhdHVyZXMgcmFuZ2UgZnJvbSAyM8KwQyB0byAzM8KwQyAoNzPCsEYgdG8gOTHCsEYpLlxcblxcbi0gKipQdWVydG8gVmllam8sIENvc3RhIFJpY2E6KiogQXZlcmFnZSB0ZW1wZXJhdHVyZXMgcmFuZ2UgZnJvbSAyMMKwQyB0byAzNsKwQyAoNjjCsEYgdG8gOTfCsEYpLlxcblxcbi0gKipDYWJhcmV0ZSwgRG9taW5pY2FuIFJlcHVibGljOioqIEF2ZXJhZ2UgdGVtcGVyYXR1cmVzIHJhbmdlIGZyb20gMTXCsEMgdG8gMzPCsEMgKDU5wrBGIHRvIDkxwrBGKS5cXG5cXG5UaGVzZSBkZXN0aW5hdGlvbnMgb2ZmZXIgYSBibGVuZCBvZiBzdXJmaW5nIGFuZCBoaWtpbmcgYWN0aXZpdGllcyB3aXRoaW4gYWxsLWluY2x1c2l2ZSBwYWNrYWdlcywgY2F0ZXJpbmcgdG8gYWR2ZW50dXJlIGVudGh1c2lhc3RzIHNlZWtpbmcgYW4gYWN0aXZlIENhcmliYmVhbiB2YWNhdGlvbiBpbiBBcHJpbC4gXCIsIFwiU2V2ZXJhbCBDYXJpYmJlYW4gaXNsYW5kcyBvZmZlciBleGNlbGxlbnQgb3Bwb3J0dW5pdGllcyBmb3IgYm90aCBzdXJmaW5nIGFuZCBoaWtpbmcgaW4gQXByaWwuIEphbWFpY2EsIHBhcnRpY3VsYXJseSB0aGUgTW9udGVnbyBCYXkgYXJlYSwgcHJvdmlkZXMgd2FybSB0ZW1wZXJhdHVyZXMgcmFuZ2luZyBmcm9tIDIyLjnCsEMgdG8gMzMuNMKwQywgaWRlYWwgZm9yIG91dGRvb3IgYWN0aXZpdGllcy4gVGhlIGlzbGFuZCBmZWF0dXJlcyBzdXJmIHNwb3RzIGxpa2UgQm9zdG9uIEJheSBhbmQgTG9uZyBCYXksIGFuZCBoaWtpbmcgdHJhaWxzIGluIHRoZSBCbHVlIE1vdW50YWlucy5cXG5cXG5CYXJiYWRvcywgd2l0aCB0ZW1wZXJhdHVyZXMgYmV0d2VlbiAyMi44wrBDIGFuZCAzMS4xwrBDLCBpcyBrbm93biBmb3IgY29uc2lzdGVudCBzdXJmIGJyZWFrcyBzdWNoIGFzIFNvdXAgQm93bCBhbmQgRnJlaWdodHMgQmF5LiBUaGUgaXNsYW5kIGFsc28gb2ZmZXJzIGhpa2luZyBvcHBvcnR1bml0aWVzIGluIGFyZWFzIGxpa2UgdGhlIFNjb3RsYW5kIERpc3RyaWN0LlxcblxcblRoZSBEb21pbmljYW4gUmVwdWJsaWMsIGVzcGVjaWFsbHkgYXJvdW5kIFB1bnRhIENhbmEsIGV4cGVyaWVuY2VzIHRlbXBlcmF0dXJlcyBmcm9tIDIwLjPCsEMgdG8gMzEuNcKwQy4gU3VyZmluZyBpcyBwb3B1bGFyIGluIENhYmFyZXRlLCB3aGlsZSB0aGUgQ29yZGlsbGVyYSBDZW50cmFsIG1vdW50YWlucyBwcm92aWRlIGV4dGVuc2l2ZSBoaWtpbmcgdHJhaWxzLlxcblxcbkNvc3RhIFJpY2EncyBQdWVydG8gVmllam8gcmVnaW9uLCB3aXRoIHRlbXBlcmF0dXJlcyBiZXR3ZWVuIDIwLjDCsEMgYW5kIDM2LjHCsEMsIG9mZmVycyBzdXJmIHNwb3RzIGxpa2UgU2Fsc2EgQnJhdmEgYW5kIFBsYXlhIENvY2xlcywgYWxvbmdzaWRlIGhpa2luZyBpbiB0aGUgbmVhcmJ5IEdhbmRvY2EtTWFuemFuaWxsbyBXaWxkbGlmZSBSZWZ1Z2UuXFxuXFxuUHVlcnRvIFJpY28sIHBhcnRpY3VsYXJseSBTYW4gSnVhbiwgaGFzIHRlbXBlcmF0dXJlcyByYW5naW5nIGZyb20gMjIuMMKwQyB0byAzMS41wrBDLiBUaGUgaXNsYW5kIGZlYXR1cmVzIHN1cmYgc3BvdHMgbGlrZSBSaW5jb24gYW5kIElzYWJlbGEsIGFuZCBoaWtpbmcgdHJhaWxzIGluIEVsIFl1bnF1ZSBOYXRpb25hbCBGb3Jlc3QuXFxuXFxuVGhlc2UgaXNsYW5kcyBwcm92aWRlIGEgY29tYmluYXRpb24gb2Ygc3VyZmluZyBhbmQgaGlraW5nIGV4cGVyaWVuY2VzIHN1aXRhYmxlIGZvciBBcHJpbCdzIGNsaW1hdGUuIFwiLCBcIkluIHRoZSBDYXJpYmJlYW4sIG51bWVyb3VzIHdhdGVyIHNwb3J0cyBnZWFyIHJlbnRhbCBzZXJ2aWNlcyBhcmUgYXZhaWxhYmxlIHRvIGVuaGFuY2UgeW91ciBhcXVhdGljIGFkdmVudHVyZXMuIEZvciBpbnN0YW5jZSwgKipSaW5jb24gQ2FwaXRhbCBXYXRlciBTcG9ydHMqKiBvZmZlcnMgYSB2YXJpZXR5IG9mIGVxdWlwbWVudCwgaW5jbHVkaW5nIGpldCBza2lzLCBrYXlha3MsIHN1cmZib2FyZHMsIHBhZGRsZWJvYXJkcywgc25vcmtlbCBhbmQgc2N1YmEgZ2VhciwgZmlzaGluZyBlcXVpcG1lbnQsIGJlYWNoIGNoYWlycywgdW1icmVsbGFzLCBhbmQgYmFuYW5hIGJvYXRzLiBUaGV5IHJlY29tbWVuZCBjb250YWN0aW5nIHRoZW0gZGlyZWN0bHkgdG8gbWFrZSBhIHJlc2VydmF0aW9uLiAoW2NhcGl0YWx3YXRlcnNwb3J0cy5jb21dKGh0dHBzOi8vd3d3LmNhcGl0YWx3YXRlcnNwb3J0cy5jb20vcmVudGFscz91dG1fc291cmNlPW9wZW5haSkpXFxuXFxuU2ltaWxhcmx5LCAqKlBsYWNlbmNpYSBBd2Vzb21lIFdhdGVyIFNwb3J0cyoqIGluIEJlbGl6ZSBwcm92aWRlcyByZW50YWxzIGZvciBqZXQgc2tpcywga2F5YWtzLCBwYWRkbGVib2FyZHMsIGFuZCBzbm9ya2VsIGdlYXIuIFRoZWlyIGpldCBza2lzIGNhbiBhY2NvbW1vZGF0ZSB0d28gYWR1bHRzIGFuZCBhcmUgYXZhaWxhYmxlIGZvciByZW50IHRocm91Z2hvdXQgdGhlIHllYXIuIFRoZXkgYWxzbyBvZmZlciBob3VybHksIGhhbGYtZGF5LCBmdWxsLWRheSwgYW5kIHdlZWtseSByZW50YWxzIGZvciBwYWRkbGVib2FyZHMgYW5kIGtheWFrcywgd2l0aCBkZWxpdmVyeSBvcHRpb25zIGZvciB3ZWVrbHkgcmVudGFscy4gKFtwbGFjZW5jaWFhd2Vzb21ld2F0ZXJzcG9ydHMuY29tXShodHRwczovL3d3dy5wbGFjZW5jaWFhd2Vzb21ld2F0ZXJzcG9ydHMuY29tLz91dG1fc291cmNlPW9wZW5haSkpXFxuXFxuSW4gU2FpbnQtTWFydGluLCAqKkNhcmliYmVhbiBQYWRkbGluZyoqIHNwZWNpYWxpemVzIGluIGVjby1mcmllbmRseSBhZHZlbnR1cmVzLCBvZmZlcmluZyBrYXlhayBhbmQgcGFkZGxlYm9hcmQgcmVudGFscywgYXMgd2VsbCBhcyBzbm9ya2VsaW5nIGV4cGVyaWVuY2VzLiBUaGV5IHByb3ZpZGUgdG9wLXF1YWxpdHkgZXF1aXBtZW50IGFuZCBwZXJzb25hbGl6ZWQgYWR2ZW50dXJlIHBhY2thZ2VzIHRhaWxvcmVkIHRvIHZhcmlvdXMgc2tpbGwgbGV2ZWxzLiBUaGVpciBwcmltZSBsb2NhdGlvbiBvZmZlcnMgZGlyZWN0IGFjY2VzcyB0byBwaWN0dXJlc3F1ZSBzcG90cyBsaWtlIFBpbmVsIElzbGFuZC4gKFtjYXJpYmJlYW5wYWRkbGluZy5jb21dKGh0dHBzOi8vd3d3LmNhcmliYmVhbnBhZGRsaW5nLmNvbS8/dXRtX3NvdXJjZT1vcGVuYWkpKVxcblxcbkZvciB0aG9zZSB2aXNpdGluZyBTdC4gVGhvbWFzLCAqKklzbGFuZCBBZHZlbnR1cmVzKiogb2ZmZXJzIHNub3JrZWwgZ2VhciwgY29vbGVycywgbm9vZGxlcywgZmxvYXQgbWF0cywgYW5kIGZvbGRpbmcgYmVhY2ggY2hhaXJzIGZvciByZW50LiBUaGV5IGhhdmUgcGljay11cCBsb2NhdGlvbnMgYXQgTWFyZ2FyaXRhdmlsbGUgUmVzb3J0IGFuZCBFbHlzaWFuIFJlc29ydC4gKFtmdW5ib2F0ZGF5LmNvbV0oaHR0cHM6Ly9mdW5ib2F0ZGF5LmNvbS93YXRlci1zcG9ydC1yZW50YWxzLz91dG1fc291cmNlPW9wZW5haSkpXFxuXFxuSW4gU3QuIEtpdHRzLCAqKlN0LiBLaXR0cyBXYXRlciBTcG9ydHMqKiBwcm92aWRlcyBhIHdpZGUgcmFuZ2Ugb2YgYWN0aXZpdGllcywgaW5jbHVkaW5nIGpldCBza2kgcmVudGFscywgZmx5Ym9hcmRpbmcsIHBhZGRsZWJvYXJkaW5nLCBrYXlha2luZywgYW5kIHNub3JrZWxpbmcuIFRoZXkgb2ZmZXIgdmFyaW91cyBwYWNrYWdlcywgc3VjaCBhcyB0aGUgQWxsIERheSBBY3Rpb24gUGFzcywgd2hpY2ggaW5jbHVkZXMgbXVsdGlwbGUgYWN0aXZpdGllcyBpbiBvbmUgZGF5LiAoW3N0a2l0dHN3YXRlcnNwb3J0cy5jb21dKGh0dHBzOi8vd3d3LnN0a2l0dHN3YXRlcnNwb3J0cy5jb20vP3V0bV9zb3VyY2U9b3BlbmFpKSlcXG5cXG5JbiBUb3J0b2xhLCAqKklzbGFuZCBTdXJmICYgU2FpbCoqIG9mZmVycyBhIHZhcmlldHkgb2Ygd2F0ZXIgdG95cyBhbmQgc3BvcnRzIGVxdWlwbWVudCBmb3IgcmVudCwgaW5jbHVkaW5nIGtheWFrcywgc3RhbmQtdXAgcGFkZGxlYm9hcmRzLCBzdXJmYm9hcmRzLCBmaXNoaW5nIGdlYXIsIHNub3JrZWxpbmcgZXF1aXBtZW50LCBhbmQgZmxvYXRzLiBUaGV5IHByb3ZpZGUgZnJlZSBkZWxpdmVyeSB0byBjaGFydGVyIGNvbXBhbmllcywgaG90ZWxzLCB2aWxsYXMsIGFuZCBiZWFjaGVzIGlzbGFuZC13aWRlLiAoW2J2aXRyYXZlbGxlci5jb21dKGh0dHBzOi8vd3d3LmJ2aXRyYXZlbGxlci5jb20vd2F0ZXJzcG9ydHMvaXNsYW5kLXN1cmYtc2FpbC8/dXRtX3NvdXJjZT1vcGVuYWkpKVxcblxcbkluIFB1ZXJ0byBSaWNvLCAqKkFxdWF0aWNhIFVuZGVyd2F0ZXIgQWR2ZW50dXJlcyoqIG9mZmVycyBzY3ViYSBhbmQgc25vcmtlbCBnZWFyIHJlbnRhbHMgYW5kIHNhbGVzLCBpbmNsdWRpbmcgbWFza3MsIHNub3JrZWxzLCBmaW5zLCBCQ0RzLCByZWd1bGF0b3JzLCBhbmQgdGFua3MuIFRoZXkgYXJlIGNvbnZlbmllbnRseSBsb2NhdGVkIG5lYXIgc2V2ZXJhbCBwb3B1bGFyIGJlYWNoZXMgYW5kIHByb3ZpZGUgaGlnaC1xdWFsaXR5LCBzYWZldHktdGVzdGVkIGVxdWlwbWVudC4gKFthcXVhdGljYXByLmNvbV0oaHR0cHM6Ly93d3cuYXF1YXRpY2Fwci5jb20vcmVudGFscy8/dXRtX3NvdXJjZT1vcGVuYWkpKVxcblxcblJlZ2FyZGluZyBoaWtpbmcgZ2VhciByZW50YWxzLCBzcGVjaWZpYyBpbmZvcm1hdGlvbiBpcyBsaW1pdGVkLiBJdCdzIGFkdmlzYWJsZSB0byBjb250YWN0IGxvY2FsIHRvdXIgb3BlcmF0b3JzIG9yIG91dGRvb3IgYWR2ZW50dXJlIGNvbXBhbmllcyBpbiB5b3VyIGNob3NlbiBkZXN0aW5hdGlvbiB0byBpbnF1aXJlIGFib3V0IHRoZSBhdmFpbGFiaWxpdHkgb2YgaGlraW5nIGVxdWlwbWVudCByZW50YWxzLiBcIiwgXCJBcHJpbCBpcyBhbiBleGNlbGxlbnQgdGltZSB0byBleHBsb3JlIHRoZSBDYXJpYmJlYW4ncyBkaXZlcnNlIGhpa2luZyBkZXN0aW5hdGlvbnMsIG9mZmVyaW5nIGZhdm9yYWJsZSB3ZWF0aGVyIGNvbmRpdGlvbnMgYW5kIHZpYnJhbnQgbmF0dXJhbCBsYW5kc2NhcGVzLiBIZXJlIGFyZSBzb21lIHRvcCBoaWtpbmcgc3BvdHMgdG8gY29uc2lkZXI6XFxuXFxuKioxLiBFbCBZdW5xdWUgTmF0aW9uYWwgRm9yZXN0LCBQdWVydG8gUmljbyoqXFxuXFxuQXMgdGhlIG9ubHkgdHJvcGljYWwgcmFpbmZvcmVzdCBpbiB0aGUgVS5TLiBOYXRpb25hbCBGb3Jlc3QgU3lzdGVtLCBFbCBZdW5xdWUgc3BhbnMgYXBwcm94aW1hdGVseSAyOCwwMDAgYWNyZXMgd2l0aCBhIG5ldHdvcmsgb2Ygd2VsbC1tYWludGFpbmVkIHRyYWlscy4gSGlrZXJzIGNhbiBleHBlcmllbmNlIGRpdmVyc2UgZmxvcmEgYW5kIGZhdW5hLCBpbmNsdWRpbmcgdGhlIFB1ZXJ0byBSaWNhbiBwYXJyb3QgYW5kIGNvcXXDrSBmcm9nLCBhbmQgdmlzaXQgc3R1bm5pbmcgd2F0ZXJmYWxscyBsaWtlIExhIE1pbmEgRmFsbHMuIE9ic2VydmF0aW9uIHRvd2VycyBzdWNoIGFzIFlva2FodSBUb3dlciBwcm92aWRlIHBhbm9yYW1pYyB2aWV3cyBvZiB0aGUgZm9yZXN0IGNhbm9weSBhbmQgY29hc3RsaW5lLiAoW2NhcmlidW5lLmNvbV0oaHR0cHM6Ly93d3cuY2FyaWJ1bmUuY29tL2NhcmliYmVhbi1oaWtpbmctYW5kLW5hdHVyZS10cmFpbHMvP3V0bV9zb3VyY2U9b3BlbmFpKSlcXG5cXG4qKjIuIEJsdWUgTW91bnRhaW4gUGVhaywgSmFtYWljYSoqXFxuXFxuU3RhbmRpbmcgYXQgNyw0MDIgZmVldCwgQmx1ZSBNb3VudGFpbiBQZWFrIGlzIEphbWFpY2EncyBoaWdoZXN0IHBvaW50LiBUaGUgaGlrZSB0byB0aGUgc3VtbWl0IGlzIHBvcHVsYXIgZm9yIGl0cyBicmVhdGh0YWtpbmcgc3VucmlzZSB2aWV3cywgd2hlcmUsIG9uIGNsZWFyIGRheXMsIHRoZSBkaXN0YW50IGNvYXN0bGluZSBvZiBDdWJhIGlzIHZpc2libGUuIFRoZSBhcmVhIGlzIGEgVU5FU0NPIFdvcmxkIEhlcml0YWdlIFNpdGUsIGhvbWUgdG8gZW5kZW1pYyBzcGVjaWVzIGxpa2UgdGhlIEphbWFpY2FuIHN3YWxsb3d0YWlsIGJ1dHRlcmZseSwgYW5kIGlzIHJlbm93bmVkIGZvciBpdHMgQmx1ZSBNb3VudGFpbiBDb2ZmZWUgcGxhbnRhdGlvbnMgb2ZmZXJpbmcgdG91cnMgYW5kIHRhc3RpbmdzLiAoW2NhcmlidW5lLmNvbV0oaHR0cHM6Ly93d3cuY2FyaWJ1bmUuY29tL2NhcmliYmVhbi1oaWtpbmctYW5kLW5hdHVyZS10cmFpbHMvP3V0bV9zb3VyY2U9b3BlbmFpKSlcXG5cXG4qKjMuIFdhaXR1a3VidWxpIE5hdGlvbmFsIFRyYWlsLCBEb21pbmljYSoqXFxuXFxuU3RyZXRjaGluZyAxMTUgbWlsZXMgYWNyb3NzIERvbWluaWNhLCB0aGUgV2FpdHVrdWJ1bGkgTmF0aW9uYWwgVHJhaWwgaXMgdGhlIENhcmliYmVhbidzIGZpcnN0IGxvbmctZGlzdGFuY2UgaGlraW5nIHRyYWlsLiBEaXZpZGVkIGludG8gMTQgc2VnbWVudHMsIGl0IHRyYXZlcnNlcyB2b2xjYW5pYyBjcmF0ZXJzLCBob3Qgc3ByaW5ncywgYW5kIGJvaWxpbmcgbGFrZXMsIHNob3djYXNpbmcgdGhlIGlzbGFuZCdzIGdlb3RoZXJtYWwgYWN0aXZpdHkuIEhpa2VycyBjYW4gdmlzaXQgaW5kaWdlbm91cyBLYWxpbmFnbyB2aWxsYWdlcywgaGlzdG9yaWMgZm9ydHMsIGFuZCBjb2xvbmlhbCBwbGFudGF0aW9ucywgZXhwZXJpZW5jaW5nIGRpdmVyc2UgZWNvc3lzdGVtcyBmcm9tIHJhaW5mb3Jlc3RzIHRvIGNvYXN0YWwgYXJlYXMuIChbbG9uZWx5cGxhbmV0LmNvbV0oaHR0cHM6Ly93d3cubG9uZWx5cGxhbmV0LmNvbS9hcnRpY2xlcy9iZXN0LWhpa2VzLWluLWNhcmliYmVhbj91dG1fc291cmNlPW9wZW5haSkpXFxuXFxuKio0LiBNb3VudCBTY2VuZXJ5LCBTYWJhKipcXG5cXG5Nb3VudCBTY2VuZXJ5LCB0aGUgaGlnaGVzdCBwb2ludCBpbiB0aGUgS2luZ2RvbSBvZiB0aGUgTmV0aGVybGFuZHMsIG9mZmVycyBhIHN0cmVudW91cyBoaWtlIHVwIDEsMDY0IHN0ZXBzIHRvIGl0cyBzdW1taXQuIFRoZSB0cmFpbCBwYXNzZXMgdGhyb3VnaCByYWluZm9yZXN0IGFuZCBjbG91ZCBmb3Jlc3QsIGZlYXR1cmluZyB0cmVlIGZlcm5zLCB3aWxkIHBsYW50YWlucywgYW5kIE1vdW50YWluIFBhbG1zLiBBdCB0aGUgc3VtbWl0LCBoaWtlcnMgYXJlIHJld2FyZGVkIHdpdGggcGFub3JhbWljIHZpZXdzIG9mIHRoZSBpc2xhbmQuIChbZW4ud2lraXBlZGlhLm9yZ10oaHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvTW91bnRfU2NlbmVyeT91dG1fc291cmNlPW9wZW5haSkpXFxuXFxuKio1LiBTb3VmcmnDqHJlIFZvbGNhbm8gVHJhaWwsIFNhaW50IFZpbmNlbnQqKlxcblxcblRoZSBTb3VmcmnDqHJlIFZvbGNhbm8gVHJhaWwgbGVhZHMgdG8gdGhlIHN1bW1pdCBvZiBMYSBTb3VmcmnDqHJlLCBhbiBhY3RpdmUgc3RyYXRvdm9sY2Fuby4gVGhlIGNoYWxsZW5naW5nIGhpa2Ugb2ZmZXJzIHN0dW5uaW5nIHZpZXdzIG9mIHRoZSBpc2xhbmQncyBsdXNoIGxhbmRzY2FwZSBhbmQgdGhlIENhcmliYmVhbiBTZWEuIFRoZSB0cmFpbCBwYXNzZXMgdGhyb3VnaCBkZW5zZSByYWluZm9yZXN0LCBhbHBpbmUgbWVhZG93cywgYW5kIHZvbGNhbmljIHJvY2sgZm9ybWF0aW9ucywgd2l0aCBndWlkZWQgdG91cnMgcHJvdmlkaW5nIGluc2lnaHRzIGludG8gdGhlIHZvbGNhbm8ncyBoaXN0b3J5IGFuZCBnZW9sb2d5LiAoW2NhcmlidW5lLmNvbV0oaHR0cHM6Ly93d3cuY2FyaWJ1bmUuY29tL2NhcmliYmVhbi1oaWtpbmctYW5kLW5hdHVyZS10cmFpbHMvP3V0bV9zb3VyY2U9b3BlbmFpKSlcXG5cXG5UaGVzZSBkZXN0aW5hdGlvbnMgb2ZmZXIgYSBibGVuZCBvZiBuYXR1cmFsIGJlYXV0eSwgY3VsdHVyYWwgZXhwZXJpZW5jZXMsIGFuZCB2YXJ5aW5nIGxldmVscyBvZiBoaWtpbmcgY2hhbGxlbmdlcywgbWFraW5nIHRoZW0gaWRlYWwgZm9yIGFuIEFwcmlsIENhcmliYmVhbiBhZHZlbnR1cmUuIFwiLCBcIkFwcmlsIGluIHRoZSBDYXJpYmJlYW4gb2ZmZXJzIHdhcm0gdGVtcGVyYXR1cmVzLCB0eXBpY2FsbHkgcmFuZ2luZyBmcm9tIGRheXRpbWUgaGlnaHMgaW4gdGhlIG1pZC04MHPCsEYgKDI4LTMwwrBDKSB0byBuaWdodHRpbWUgbG93cyBpbiB0aGUgbWlkLTcwc8KwRiAoMjAtMjTCsEMpLiBUaGlzIHBlcmlvZCBtYXJrcyB0aGUgZW5kIG9mIHRoZSBkcnkgc2Vhc29uLCByZXN1bHRpbmcgaW4gcHJlZG9taW5hbnRseSBzdW5ueSBkYXlzIHdpdGggbWluaW1hbCByYWluZmFsbCwgbWFraW5nIGl0IGlkZWFsIGZvciBvdXRkb29yIGFjdGl2aXRpZXMuIFdhdGVyIHRlbXBlcmF0dXJlcyBhcmUgYWxzbyB3YXJtLCBhdmVyYWdpbmcgYXJvdW5kIDgwwrBGICgyN8KwQyksIHBlcmZlY3QgZm9yIHN3aW1taW5nIGFuZCB3YXRlciBzcG9ydHMuIChbdHJpcHNhdnZ5LmNvbV0oaHR0cHM6Ly93d3cudHJpcHNhdnZ5LmNvbS9hcHJpbC1pbi10aGUtY2FyaWJiZWFuLTE0ODc2NTk/dXRtX3NvdXJjZT1vcGVuYWkpKVxcblxcbkZvciBzdXJmaW5nIGVudGh1c2lhc3RzLCB0aGUgQ2FyaWJiZWFuIHByb3ZpZGVzIGZhdm9yYWJsZSBjb25kaXRpb25zIGluIEFwcmlsLiBXaGlsZSB0aGUgbGFyZ2VzdCBzd2VsbHMgb2NjdXIgZHVyaW5nIHRoZSBsYXRlIHJhaW55IHNlYXNvbiwgdGhlIHBlcmlvZCBmcm9tIE5vdmVtYmVyIHRvIEFwcmlsIG9mZmVycyBjb25zaXN0ZW50IHdhdmVzIHN1aXRhYmxlIGZvciBzdXJmZXJzIG9mIHZhcmlvdXMgc2tpbGwgbGV2ZWxzLiBOb3RhYmxlIHN1cmZpbmcgZGVzdGluYXRpb25zIGluY2x1ZGUgUHVlcnRvIFJpY28sIHRoZSBEb21pbmljYW4gUmVwdWJsaWMsIGFuZCBCYXJiYWRvcy4gKFtiYWNrcm9hZHMuY29tXShodHRwczovL3d3dy5iYWNrcm9hZHMuY29tL3Byby10aXBzL3RyYXZlbC1ndWlkZXMvd2hlbi10by12aXNpdC9jYXJpYmJlYW4/dXRtX3NvdXJjZT1vcGVuYWkpKVxcblxcbkhpa2luZyBvcHBvcnR1bml0aWVzIGFib3VuZCBpbiB0aGUgQ2FyaWJiZWFuJ3MgbW91bnRhaW5vdXMgcmVnaW9ucy4gRGVzdGluYXRpb25zIHN1Y2ggYXMgRWwgWXVucXVlIGluIFB1ZXJ0byBSaWNvLCB0aGUgQmx1ZSBNb3VudGFpbnMgaW4gSmFtYWljYSwgYW5kIHRoZSBhcmVhIGFyb3VuZCBKYXJhYmFjb2EgaW4gdGhlIERvbWluaWNhbiBSZXB1YmxpYyBvZmZlciBleGNlbGxlbnQgdHJhaWxzLiBBcHJpbCdzIHdhcm0gYW5kIGRyeSB3ZWF0aGVyIHByb3ZpZGVzIGNvbWZvcnRhYmxlIGNvbmRpdGlvbnMgZm9yIGV4cGxvcmluZyB0aGVzZSBsYW5kc2NhcGVzLiAoW2JhY2tyb2Fkcy5jb21dKGh0dHBzOi8vd3d3LmJhY2tyb2Fkcy5jb20vcHJvLXRpcHMvdHJhdmVsLWd1aWRlcy93aGVuLXRvLXZpc2l0L2NhcmliYmVhbj91dG1fc291cmNlPW9wZW5haSkpXFxuXFxuQWRkaXRpb25hbGx5LCBBcHJpbCBob3N0cyB2YXJpb3VzIGN1bHR1cmFsIGV2ZW50cyBhY3Jvc3MgdGhlIENhcmliYmVhbiwgaW5jbHVkaW5nIEVhc3RlciBjZWxlYnJhdGlvbnMgYW5kIHJlZ2F0dGFzIGxpa2UgQW50aWd1YSBTYWlsaW5nIFdlZWssIGVuaGFuY2luZyB0aGUgdHJhdmVsIGV4cGVyaWVuY2UuIChbdHJpcHNhdnZ5LmNvbV0oaHR0cHM6Ly93d3cudHJpcHNhdnZ5LmNvbS9hcHJpbC1pbi10aGUtY2FyaWJiZWFuLTE0ODc2NTk/dXRtX3NvdXJjZT1vcGVuYWkpKSBcIl0iLCJyb2xlIjoidXNlciJ9XSwibW9kZWxfc2V0dGluZ3MiOnsidGVtcGVyYXR1cmUiOm51bGwsInRvcF9wIjpudWxsLCJmcmVxdWVuY3lfcGVuYWx0eSI6bnVsbCwicHJlc2VuY2VfcGVuYWx0eSI6bnVsbCwidG9vbF9jaG9pY2UiOm51bGwsInBhcmFsbGVsX3Rvb2xfY2FsbHMiOm51bGwsInRydW5jYXRpb24iOm51bGwsIm1heF90b2tlbnMiOm51bGwsInJlYXNvbmluZyI6bnVsbCwibWV0YWRhdGEiOm51bGwsInN0b3JlIjpudWxsLCJpbmNsdWRlX3VzYWdlIjpudWxsLCJleHRyYV9xdWVyeSI6bnVsbCwiZXh0cmFfYm9keSI6bnVsbCwiZXh0cmFfaGVhZGVycyI6bnVsbCwiZXh0cmFfYXJncyI6bnVsbH0sInRvb2xzIjpbXSwib3V0cHV0X3NjaGVtYSI6eyJvdXRwdXRfdHlwZV9uYW1lIjoiUmVwb3J0RGF0YSIsImlzX3dyYXBwZWQiOmZhbHNlLCJvdXRwdXRfc2NoZW1hIjp7InByb3BlcnRpZXMiOnsic2hvcnRfc3VtbWFyeSI6eyJ0aXRsZSI6IlNob3J0IFN1bW1hcnkiLCJ0eXBlIjoic3RyaW5nIn0sIm1hcmtkb3duX3JlcG9ydCI6eyJ0aXRsZSI6Ik1hcmtkb3duIFJlcG9ydCIsInR5cGUiOiJzdHJpbmcifSwiZm9sbG93X3VwX3F1ZXN0aW9ucyI6eyJpdGVtcyI6eyJ0eXBlIjoic3RyaW5nIn0sInRpdGxlIjoiRm9sbG93IFVwIFF1ZXN0aW9ucyIsInR5cGUiOiJhcnJheSJ9fSwicmVxdWlyZWQiOlsic2hvcnRfc3VtbWFyeSIsIm1hcmtkb3duX3JlcG9ydCIsImZvbGxvd191cF9xdWVzdGlvbnMiXSwidGl0bGUiOiJSZXBvcnREYXRhIiwidHlwZSI6Im9iamVjdCIsImFkZGl0aW9uYWxQcm9wZXJ0aWVzIjpmYWxzZX0sInN0cmljdF9qc29uX3NjaGVtYSI6dHJ1ZX0sImhhbmRvZmZzIjpbXSwidHJhY2luZyI6MSwicHJldmlvdXNfcmVzcG9uc2VfaWQiOm51bGwsInByb21wdCI6bnVsbH0=" - } - ] - }, - "scheduleToCloseTimeout": "120s", - "scheduleToStartTimeout": "120s", - "startToCloseTimeout": "120s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "70", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "Ik9yaWdpbmFsIHF1ZXJ5OiBDYXJpYmJlYW4gdmFjYXRpb24gc3BvdHMgaW4gQXByaWwsIG9wdGltaXppbmcgZm9yIHN1cmZpbmcsIGhpa2luZyBhbmQgd2F0ZXIgc3BvcnRzXG5TIg==" - } - } - }, - { - "eventId": "72", - "eventTime": "2025-06-30T17:04:23.919583Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1057227", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "71", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "eb8cb709-d324-46b5-a684-56f29f218ed6", - "attempt": 1, - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "73", - "eventTime": "2025-06-30T17:04:50.687490Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1057228", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoibXNnXzY4NjJjMzk4ZTcxODgxOWQ5Yzg1OTJjMWI3MGY2ZDM1MGRlNTlkZjk2NDhmZjBlMyIsImNvbnRlbnQiOlt7ImFubm90YXRpb25zIjpbXSwidGV4dCI6IntcInNob3J0X3N1bW1hcnlcIjpcIkFwcmlsIGlzIGFuIGV4Y2VsbGVudCB0aW1lIGZvciBhIENhcmliYmVhbiB2YWNhdGlvbiBmb2N1c2luZyBvbiBzdXJmaW5nLCBoaWtpbmcsIGFuZCB3YXRlciBzcG9ydHMuIFRvcCBzcG90cyBpbmNsdWRlIFJpbmNvbiBpbiBQdWVydG8gUmljbyBhbmQgQmF0aHNoZWJhIGluIEJhcmJhZG9zIGZvciBzdXJmaW5nLCB3aGlsZSBEb21pbmljYSdzIHRyYWlscyBhbmQgSmFtYWljYSdzIEJsdWUgTW91bnRhaW5zIG9mZmVyIHJlbWFya2FibGUgaGlraW5nLiBXYXRlciBhY3Rpdml0aWVzLCBzdWNoIGFzIGtpdGVzdXJmaW5nIGFuZCBzbm9ya2VsaW5nLCB0aHJpdmUgaW4gdGhpcyBtb250aCBkdWUgdG8gaWRlYWwgd2VhdGhlciBhbmQgbWFyaW5lIGNvbmRpdGlvbnMuIEN1bHR1cmFsIGZlc3RpdmFscyBhbmQgd2FybSB0ZW1wZXJhdHVyZXMgZnVydGhlciBlbnJpY2ggdGhlIGV4cGVyaWVuY2UuXCIsXCJtYXJrZG93bl9yZXBvcnRcIjpcIiMgQ2FyaWJiZWFuIFZhY2F0aW9uIFNwb3RzIGluIEFwcmlsOiBBIEd1aWRlIHRvIFN1cmZpbmcsIEhpa2luZywgYW5kIFdhdGVyIFNwb3J0cyBcXG5cXG4jIyBJbnRyb2R1Y3Rpb25cXG5cXG5BcHJpbCBpcyBhIHByaW1lIG1vbnRoIGZvciBhZHZlbnR1cmUgc2Vla2VycyBpbiB0aGUgQ2FyaWJiZWFuLCBwcm92aWRpbmcgYW4gb3B0aW1hbCBibGVuZCBvZiBjb25zaXN0ZW50IHN1cmZpbmcgd2F2ZXMsIHZpYnJhbnQgaGlraW5nIHRyYWlscywgYW5kIGRpdmVyc2Ugd2F0ZXIgc3BvcnRzLiBUaGUgcmVnaW9uJ3MgZmF2b3JhYmxlIGNsaW1hdGUsIGNoYXJhY3Rlcml6ZWQgYnkgd2FybSB0ZW1wZXJhdHVyZXMgYW5kIGRyeSBjb25kaXRpb25zLCBlbmhhbmNlcyB0aGVzZSBvdXRkb29yIGV4cGVyaWVuY2VzLiBUaGlzIHJlcG9ydCBleHBsb3JlcyB0aGUgdG9wIENhcmliYmVhbiBkZXN0aW5hdGlvbnMgaW4gQXByaWwgZm9yIHN1cmZpbmcsIGhpa2luZywgYW5kIGVuZ2FnaW5nIGluIHdhdGVyIHNwb3J0cywgZW5zdXJpbmcgdHJhdmVsZXJzIGNhbiBtYXhpbWl6ZSB0aGVpciB2YWNhdGlvbi5cXG5cXG4jIyBTdXJmaW5nIGluIHRoZSBDYXJpYmJlYW5cXG5cXG4jIyMgVG9wIFN1cmZpbmcgRGVzdGluYXRpb25zXFxuXFxuKioxLiBSaW5jb24sIFB1ZXJ0byBSaWNvKipcXG4gICAtIEtub3duIGZvciBhIHZhcmlldHkgb2YgYnJlYWtzIHN1aXRhYmxlIGZvciBhbGwgbGV2ZWxzLlxcbiAgIC0gT2ZmZXJzIGEgd2FybSBzdXJmIGNvbW11bml0eSBhbmQgY29uc2lzdGVudCBzd2VsbHMuXFxuXFxuKioyLiBCYXRoc2hlYmEsIEJhcmJhZG9zKipcXG4gICAtIEZhbW91cyBmb3IgdGhlIFNvdXAgQm93bCwgb2ZmZXJpbmcgcG93ZXJmdWwgd2F2ZXMuXFxuICAgLSBBdHRyYWN0cyBib3RoIGxvY2FsIGFuZCBpbnRlcm5hdGlvbmFsIHN1cmZlcnMuXFxuXFxuKiozLiBQbGF5YSBFbmN1ZW50cm8sIERvbWluaWNhbiBSZXB1YmxpYyoqXFxuICAgLSBGZWF0dXJlcyBjb25zaXN0ZW50IHdhdmVzIGFuZCBhIHZpYnJhbnQgc3VyZiBzY2VuZS5cXG5cXG4qKjQuIEFndWFkaWxsYSwgUHVlcnRvIFJpY28sIGFuZCBMb25nIEJheSwgSmFtYWljYSoqXFxuICAgLSBQcm92aWRlIGRpdmVyc2Ugc3VyZiBicmVha3MgYW5kIGJlZ2lubmVyLWZyaWVuZGx5IHdhdmVzLlxcblxcbiMjIyBTdXJmaW5nIEV2ZW50c1xcbiAgIC0gKipCYXJiYWRvcyBTdXJmIFBybyoqIGFuZCAqKk1hcnRpbmlxdWUgU3VyZiBQcm8qKiBhcmUgV1NMIGV2ZW50cyBvY2N1cnJpbmcgaW4gQXByaWwsIGRyYXdpbmcgaW50ZXJuYXRpb25hbCBjb21wZXRpdG9ycy5cXG5cXG4jIyBIaWtpbmcgQWR2ZW50dXJlc1xcblxcbiMjIyBOb3RhYmxlIEhpa2luZyBUcmFpbHNcXG5cXG4qKjEuIEVsIFl1bnF1ZSBOYXRpb25hbCBGb3Jlc3QsIFB1ZXJ0byBSaWNvKipcXG4gICAtIE9mZmVycyBhIG5ldHdvcmsgb2YgdHJhaWxzIHNob3djYXNpbmcgdW5pcXVlIGZsb3JhIGFuZCBmYXVuYS5cXG5cXG4qKjIuIEJsdWUgTW91bnRhaW4gUGVhaywgSmFtYWljYSoqXFxuICAgLSBQcm92aWRlcyBwYW5vcmFtaWMgc3VucmlzZSB2aWV3cyBhbmQgY3VsdHVyYWwgZW5jb3VudGVycy5cXG5cXG4qKjMuIFdhaXR1a3VidWxpIE5hdGlvbmFsIFRyYWlsLCBEb21pbmljYSoqXFxuICAgLSBTcGFucyAxMTUgbWlsZXMsIHRyYXZlcnNpbmcgdm9sY2FuaWMgYW5kIGN1bHR1cmFsIGxhbmRzY2FwZXMuXFxuXFxuIyMjIEhpa2luZyBUaXBzXFxuICAgLSBBcHJpbOKAmXMgd2VhdGhlciBwcm92aWRlcyBjb21mb3J0YWJsZSBjb25kaXRpb25zIGZvciBleHBsb3JpbmcgbW91bnRhaW5vdXMgYW5kIHJhaW5mb3Jlc3QgdHJhaWxzLiBcXG4gICAtIEVuZ2FnZSB3aXRoIGxvY2FsIGd1aWRlcyBmb3Igc2FmZSBhbmQgaW5mb3JtYXRpdmUgaGlrZXMuXFxuXFxuIyMgV2F0ZXIgU3BvcnRzIE9wcG9ydHVuaXRpZXNcXG5cXG4jIyMgUG9wdWxhciBBY3Rpdml0aWVzXFxuXFxuKioxLiBLaXRlc3VyZmluZyBhbmQgU25vcmtlbGluZyoqXFxuICAgLSBTdGVhZHkgd2luZHMgaW4gQXByaWwgcGVyZmVjdCBmb3Iga2l0ZXN1cmZpbmcsIGVzcGVjaWFsbHkgYXJvdW5kIENhYmFyZXRlIGluIHRoZSBEb21pbmljYW4gUmVwdWJsaWMuXFxuICAgLSBTbm9ya2VsaW5nIG9wcG9ydHVuaXRpZXMgYWJvdW5kLCB3aXRoIGNsZWFyIHdhdGVycyBob3N0aW5nIGRpdmVyc2UgbWFyaW5lIGxpZmUuXFxuXFxuKioyLiBTYWlsaW5nIGFuZCBLYXlha2luZyoqXFxuICAgLSBUaGUgQnJpdGlzaCBWaXJnaW4gSXNsYW5kcyBvZmZlciBleGNlcHRpb25hbCBzYWlsaW5nIGNvbmRpdGlvbnMuXFxuICAgLSBCZWxpemUncyBHcmVhdCBCbHVlIEhvbGUgaXMgYW4gaWNvbmljIGtheWFraW5nIGRlc3RpbmF0aW9uLlxcblxcbiMjIyBFcXVpcG1lbnQgUmVudGFsc1xcbiAgIC0gTnVtZXJvdXMgcmVudGFsIHNlcnZpY2VzLCBzdWNoIGFzIFJpbmNvbiBDYXBpdGFsIFdhdGVyIFNwb3J0cywgcHJvdmlkZSBhY2Nlc3MgdG8gamV0IHNraXMsIGtheWFrcywgYW5kIHNub3JrZWxpbmcgZ2Vhci5cXG5cXG4jIyBDdWx0dXJhbCBFdmVudHMgYW5kIExvY2FsIEluc2lnaHRzXFxuXFxuIyMjIEZlc3RpdmFscyBhbmQgQ2VsZWJyYXRpb25zXFxuXFxuKioxLiBTdC4gVGhvbWFzIEludGVybmF0aW9uYWwgUmVnYXR0YSwgVS5TLiBWaXJnaW4gSXNsYW5kcyoqXFxuICAgLSBBIGtleSBzYWlsaW5nIGV2ZW50IHByb21vdGluZyBjdWx0dXJhbCBleGNoYW5nZS5cXG5cXG4qKjIuIE5hdGlvbmFsIEZhbWlseSBJc2xhbmQgUmVnYXR0YSwgQmFoYW1hcyoqXFxuICAgLSBDZWxlYnJhdGVzIHRyYWRpdGlvbmFsIEJhaGFtaWFuIHNsb29wIHNhaWxpbmcuXFxuXFxuIyMjIExvY2FsIFJlY29tbWVuZGF0aW9uc1xcbiAgIC0gUGFydGljaXBhdGUgaW4gZ3VpZGVkIHRvdXJzIGFuZCBsb2NhbCBldmVudHMgdG8gZW5oYW5jZSBjdWx0dXJhbCB1bmRlcnN0YW5kaW5nIGFuZCBleHBlcmllbmNlLlxcblxcbiMjIFdlYXRoZXIgQ29uc2lkZXJhdGlvbnNcXG5cXG4tICoqVGVtcGVyYXR1cmUgT3ZlcnZpZXc6KipcXG4gIC0gQXZlcmFnZSBkYXkgdGVtcGVyYXR1cmVzIGluIHRoZSBtaWQtODBzwrBGICgyOC0zMMKwQykgYW5kIHdhcm0gd2F0ZXIgdGVtcGVyYXR1cmVzIGFyb3VuZCA4MMKwRiAoMjfCsEMpLlxcblxcbi0gKipSYWluZmFsbCBJbnNpZ2h0czoqKlxcbiAgLSBNaW5pbWFsIHJhaW5mYWxsIGFzIEFwcmlsIG1hcmtzIHRoZSBlbmQgb2YgdGhlIGRyeSBzZWFzb24sIHByb3ZpZGluZyBtb3N0bHkgc3VubnkgZGF5cy5cXG5cXG4jIyBDb25jbHVzaW9uXFxuXFxuQXByaWwgaXMgYW4gaWRlYWwgbW9udGggZm9yIGFkdmVudHVyZSB2YWNhdGlvbnMgaW4gdGhlIENhcmliYmVhbiwgb2ZmZXJpbmcgYSBzZWFtbGVzcyBjb21iaW5hdGlvbiBvZiBzdXJmaW5nLCBoaWtpbmcsIGFuZCB3YXRlciBzcG9ydHMgYWxvbmcgd2l0aCBlbnJpY2hpbmcgY3VsdHVyYWwgZXhwZXJpZW5jZXMuIFdpdGggZGl2ZXJzZSBkZXN0aW5hdGlvbnMgY2F0ZXJpbmcgdG8gYWxsIHNraWxsIGxldmVscyBhbmQgaW50ZXJlc3RzLCB0cmF2ZWxlcnMgYXJlIHN1cmUgdG8gZmluZCBhIGZ1bGZpbGxpbmcgYW5kIG1lbW9yYWJsZSB0cmF2ZWwgZXhwZXJpZW5jZS4gQXMgc3VjaCwgdGhpcyBtb250aCBpcyBwZXJmZWN0IGZvciB0aG9zZSBzZWVraW5nIGFuIGFjdGl2ZSBhbmQgdmlicmFudCBnZXRhd2F5LlxcblxcbiMjIFJlZmVyZW5jZXNcXG5cXG4tIEVsaXRlIElzbGFuZCBIb2xpZGF5cyBbQ2FyaWJiZWFuIFdhdGVyIFNwb3J0cyBHdWlkZV0oaHR0cHM6Ly9lbGl0ZWlzbGFuZGhvbGlkYXlzLmNvbS9jYXJpYmJlYW4td2F0ZXJzcG9ydHMtZ3VpZGUvP3V0bV9zb3VyY2U9b3BlbmFpKVxcbi0gVHJpcEFkdmlzb3IgW09jZWFuIEFkdmVudHVyZXMgU2FpbGluZyBBZHZlbnR1cmUgUmV2aWV3c10oaHR0cHM6Ly93d3cudHJpcGFkdmlzb3IuY29tL1Nob3dVc2VyUmV2aWV3cy1nMTQ3MjkzLWQyNjI0Nzg5LXIyMDYxMTQxMDUtT2NlYW5fQWR2ZW50dXJlc19TYWlsaW5nX0FkdmVudHVyZS1QdW50YV9DYW5hX0xhX0FsdGFncmFjaWFfUHJvdmluY2VfRG9taW5pY2FuX1IuaHRtbD91dG1fc291cmNlPW9wZW5haSlcXG4tIFNsaWNrcm9jayBCZWxpemUgQWR2ZW50dXJlcyBbUGFja2FnZXNdKGh0dHBzOi8vc2xpY2tyb2NrLmNvbS9wYWNrYWdlcy8/dXRtX3NvdXJjZT1vcGVuYWkpXFxuLSBPdGhlciByZWxldmFudCB0cmF2ZWwgYXJ0aWNsZXMgYW5kIGxvY2FsIGd1aWRlcy5cXG5cXG4tLS1cXG5cXG5Gb3IgbW9yZSBwZXJzb25hbGl6ZWQgdHJhdmVsIGd1aWRhbmNlLCBjb25zaWRlciByZWFjaGluZyBvdXQgdG8gbG9jYWwgdG91cmlzbSBib2FyZHMgb3IgdHJhdmVsIGFnZW5jaWVzIHNwZWNpYWxpemluZyBpbiBDYXJpYmJlYW4gYWR2ZW50dXJlcy5cIixcImZvbGxvd191cF9xdWVzdGlvbnNcIjpbXCJXaGF0IGFyZSB0aGUgc2FmZXR5IHRpcHMgZm9yIHN1cmZpbmcgaW4gdGhlIENhcmliYmVhbj9cIixcIkhvdyBjYW4gdHJhdmVsZXJzIGFycmFuZ2UgZXF1aXBtZW50IHJlbnRhbHMgaW4gYWR2YW5jZT9cIixcIldoYXQgYXJlIHRoZSBiZXN0IGN1bHR1cmFsIGV4cGVyaWVuY2VzIGluIHRoZSBDYXJpYmJlYW4gaW4gQXByaWw/XCIsXCJIb3cgZG8gd2VhdGhlciBjb25kaXRpb25zIHZhcnkgYW1vbmcgQ2FyaWJiZWFuIGlzbGFuZHMgaW4gQXByaWw/XCIsXCJXaGF0IGFyZSB0aGUgZmFtaWx5LWZyaWVuZGx5IGFkdmVudHVyZSBvcHRpb25zIGluIHRoZSBDYXJpYmJlYW4/XCJdfSIsInR5cGUiOiJvdXRwdXRfdGV4dCIsImxvZ3Byb2JzIjpbXX1dLCJyb2xlIjoiYXNzaXN0YW50Iiwic3RhdHVzIjoiY29tcGxldGVkIiwidHlwZSI6Im1lc3NhZ2UifV0sInVzYWdlIjp7InJlcXVlc3RzIjoxLCJpbnB1dF90b2tlbnMiOjM3ODEsImlucHV0X3Rva2Vuc19kZXRhaWxzIjp7ImNhY2hlZF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjoxMTExLCJvdXRwdXRfdG9rZW5zX2RldGFpbHMiOnsicmVhc29uaW5nX3Rva2VucyI6MH0sInRvdGFsX3Rva2VucyI6NDg5Mn0sInJlc3BvbnNlX2lkIjoicmVzcF82ODYyYzM5ODE1NGM4MTlkYmVmOWU5ZjQ2NGE3YjcyNDBkZTU5ZGY5NjQ4ZmYwZTMifQ==" - } - ] - }, - "scheduledEventId": "71", - "startedEventId": "72", - "identity": "19167@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "74", - "eventTime": "2025-06-30T17:04:50.687501Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1057229", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "19167@Tims-MacBook-Pro.local-f783ce7516bc48e59108b7b5cd31d0e5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "fc97ba3c-6c32-4f4c-a986-8d7f4f5c7f80" - }, - "startToCloseTimeout": "10s", - "attempt": 1 - } - }, - { - "eventId": "75", - "eventTime": "2025-06-30T17:04:50.690917Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1057233", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "74", - "identity": "19167@Tims-MacBook-Pro.local", - "requestId": "88402abb-bcf0-4c2d-8fd3-823f221c29bd", - "historySizeBytes": "82270", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - } - } - }, - { - "eventId": "76", - "eventTime": "2025-06-30T17:04:50.710583Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1057237", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "74", - "startedEventId": "75", - "identity": "19167@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "9f32b5d9789ece25bfb8515a7023ec78" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "77", - "eventTime": "2025-06-30T17:04:50.710627Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", - "taskId": "1057238", - "workflowExecutionCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IiMgQ2FyaWJiZWFuIFZhY2F0aW9uIFNwb3RzIGluIEFwcmlsOiBBIEd1aWRlIHRvIFN1cmZpbmcsIEhpa2luZywgYW5kIFdhdGVyIFNwb3J0cyBcblxuIyMgSW50cm9kdWN0aW9uXG5cbkFwcmlsIGlzIGEgcHJpbWUgbW9udGggZm9yIGFkdmVudHVyZSBzZWVrZXJzIGluIHRoZSBDYXJpYmJlYW4sIHByb3ZpZGluZyBhbiBvcHRpbWFsIGJsZW5kIG9mIGNvbnNpc3RlbnQgc3VyZmluZyB3YXZlcywgdmlicmFudCBoaWtpbmcgdHJhaWxzLCBhbmQgZGl2ZXJzZSB3YXRlciBzcG9ydHMuIFRoZSByZWdpb24ncyBmYXZvcmFibGUgY2xpbWF0ZSwgY2hhcmFjdGVyaXplZCBieSB3YXJtIHRlbXBlcmF0dXJlcyBhbmQgZHJ5IGNvbmRpdGlvbnMsIGVuaGFuY2VzIHRoZXNlIG91dGRvb3IgZXhwZXJpZW5jZXMuIFRoaXMgcmVwb3J0IGV4cGxvcmVzIHRoZSB0b3AgQ2FyaWJiZWFuIGRlc3RpbmF0aW9ucyBpbiBBcHJpbCBmb3Igc3VyZmluZywgaGlraW5nLCBhbmQgZW5nYWdpbmcgaW4gd2F0ZXIgc3BvcnRzLCBlbnN1cmluZyB0cmF2ZWxlcnMgY2FuIG1heGltaXplIHRoZWlyIHZhY2F0aW9uLlxuXG4jIyBTdXJmaW5nIGluIHRoZSBDYXJpYmJlYW5cblxuIyMjIFRvcCBTdXJmaW5nIERlc3RpbmF0aW9uc1xuXG4qKjEuIFJpbmNvbiwgUHVlcnRvIFJpY28qKlxuICAgLSBLbm93biBmb3IgYSB2YXJpZXR5IG9mIGJyZWFrcyBzdWl0YWJsZSBmb3IgYWxsIGxldmVscy5cbiAgIC0gT2ZmZXJzIGEgd2FybSBzdXJmIGNvbW11bml0eSBhbmQgY29uc2lzdGVudCBzd2VsbHMuXG5cbioqMi4gQmF0aHNoZWJhLCBCYXJiYWRvcyoqXG4gICAtIEZhbW91cyBmb3IgdGhlIFNvdXAgQm93bCwgb2ZmZXJpbmcgcG93ZXJmdWwgd2F2ZXMuXG4gICAtIEF0dHJhY3RzIGJvdGggbG9jYWwgYW5kIGludGVybmF0aW9uYWwgc3VyZmVycy5cblxuKiozLiBQbGF5YSBFbmN1ZW50cm8sIERvbWluaWNhbiBSZXB1YmxpYyoqXG4gICAtIEZlYXR1cmVzIGNvbnNpc3RlbnQgd2F2ZXMgYW5kIGEgdmlicmFudCBzdXJmIHNjZW5lLlxuXG4qKjQuIEFndWFkaWxsYSwgUHVlcnRvIFJpY28sIGFuZCBMb25nIEJheSwgSmFtYWljYSoqXG4gICAtIFByb3ZpZGUgZGl2ZXJzZSBzdXJmIGJyZWFrcyBhbmQgYmVnaW5uZXItZnJpZW5kbHkgd2F2ZXMuXG5cbiMjIyBTdXJmaW5nIEV2ZW50c1xuICAgLSAqKkJhcmJhZG9zIFN1cmYgUHJvKiogYW5kICoqTWFydGluaXF1ZSBTdXJmIFBybyoqIGFyZSBXU0wgZXZlbnRzIG9jY3VycmluZyBpbiBBcHJpbCwgZHJhd2luZyBpbnRlcm5hdGlvbmFsIGNvbXBldGl0b3JzLlxuXG4jIyBIaWtpbmcgQWR2ZW50dXJlc1xuXG4jIyMgTm90YWJsZSBIaWtpbmcgVHJhaWxzXG5cbioqMS4gRWwgWXVucXVlIE5hdGlvbmFsIEZvcmVzdCwgUHVlcnRvIFJpY28qKlxuICAgLSBPZmZlcnMgYSBuZXR3b3JrIG9mIHRyYWlscyBzaG93Y2FzaW5nIHVuaXF1ZSBmbG9yYSBhbmQgZmF1bmEuXG5cbioqMi4gQmx1ZSBNb3VudGFpbiBQZWFrLCBKYW1haWNhKipcbiAgIC0gUHJvdmlkZXMgcGFub3JhbWljIHN1bnJpc2Ugdmlld3MgYW5kIGN1bHR1cmFsIGVuY291bnRlcnMuXG5cbioqMy4gV2FpdHVrdWJ1bGkgTmF0aW9uYWwgVHJhaWwsIERvbWluaWNhKipcbiAgIC0gU3BhbnMgMTE1IG1pbGVzLCB0cmF2ZXJzaW5nIHZvbGNhbmljIGFuZCBjdWx0dXJhbCBsYW5kc2NhcGVzLlxuXG4jIyMgSGlraW5nIFRpcHNcbiAgIC0gQXByaWzigJlzIHdlYXRoZXIgcHJvdmlkZXMgY29tZm9ydGFibGUgY29uZGl0aW9ucyBmb3IgZXhwbG9yaW5nIG1vdW50YWlub3VzIGFuZCByYWluZm9yZXN0IHRyYWlscy4gXG4gICAtIEVuZ2FnZSB3aXRoIGxvY2FsIGd1aWRlcyBmb3Igc2FmZSBhbmQgaW5mb3JtYXRpdmUgaGlrZXMuXG5cbiMjIFdhdGVyIFNwb3J0cyBPcHBvcnR1bml0aWVzXG5cbiMjIyBQb3B1bGFyIEFjdGl2aXRpZXNcblxuKioxLiBLaXRlc3VyZmluZyBhbmQgU25vcmtlbGluZyoqXG4gICAtIFN0ZWFkeSB3aW5kcyBpbiBBcHJpbCBwZXJmZWN0IGZvciBraXRlc3VyZmluZywgZXNwZWNpYWxseSBhcm91bmQgQ2FiYXJldGUgaW4gdGhlIERvbWluaWNhbiBSZXB1YmxpYy5cbiAgIC0gU25vcmtlbGluZyBvcHBvcnR1bml0aWVzIGFib3VuZCwgd2l0aCBjbGVhciB3YXRlcnMgaG9zdGluZyBkaXZlcnNlIG1hcmluZSBsaWZlLlxuXG4qKjIuIFNhaWxpbmcgYW5kIEtheWFraW5nKipcbiAgIC0gVGhlIEJyaXRpc2ggVmlyZ2luIElzbGFuZHMgb2ZmZXIgZXhjZXB0aW9uYWwgc2FpbGluZyBjb25kaXRpb25zLlxuICAgLSBCZWxpemUncyBHcmVhdCBCbHVlIEhvbGUgaXMgYW4gaWNvbmljIGtheWFraW5nIGRlc3RpbmF0aW9uLlxuXG4jIyMgRXF1aXBtZW50IFJlbnRhbHNcbiAgIC0gTnVtZXJvdXMgcmVudGFsIHNlcnZpY2VzLCBzdWNoIGFzIFJpbmNvbiBDYXBpdGFsIFdhdGVyIFNwb3J0cywgcHJvdmlkZSBhY2Nlc3MgdG8gamV0IHNraXMsIGtheWFrcywgYW5kIHNub3JrZWxpbmcgZ2Vhci5cblxuIyMgQ3VsdHVyYWwgRXZlbnRzIGFuZCBMb2NhbCBJbnNpZ2h0c1xuXG4jIyMgRmVzdGl2YWxzIGFuZCBDZWxlYnJhdGlvbnNcblxuKioxLiBTdC4gVGhvbWFzIEludGVybmF0aW9uYWwgUmVnYXR0YSwgVS5TLiBWaXJnaW4gSXNsYW5kcyoqXG4gICAtIEEga2V5IHNhaWxpbmcgZXZlbnQgcHJvbW90aW5nIGN1bHR1cmFsIGV4Y2hhbmdlLlxuXG4qKjIuIE5hdGlvbmFsIEZhbWlseSBJc2xhbmQgUmVnYXR0YSwgQmFoYW1hcyoqXG4gICAtIENlbGVicmF0ZXMgdHJhZGl0aW9uYWwgQmFoYW1pYW4gc2xvb3Agc2FpbGluZy5cblxuIyMjIExvY2FsIFJlY29tbWVuZGF0aW9uc1xuICAgLSBQYXJ0aWNpcGF0ZSBpbiBndWlkZWQgdG91cnMgYW5kIGxvY2FsIGV2ZW50cyB0byBlbmhhbmNlIGN1bHR1cmFsIHVuZGVyc3RhbmRpbmcgYW5kIGV4cGVyaWVuY2UuXG5cbiMjIFdlYXRoZXIgQ29uc2lkZXJhdGlvbnNcblxuLSAqKlRlbXBlcmF0dXJlIE92ZXJ2aWV3OioqXG4gIC0gQXZlcmFnZSBkYXkgdGVtcGVyYXR1cmVzIGluIHRoZSBtaWQtODBzwrBGICgyOC0zMMKwQykgYW5kIHdhcm0gd2F0ZXIgdGVtcGVyYXR1cmVzIGFyb3VuZCA4MMKwRiAoMjfCsEMpLlxuXG4tICoqUmFpbmZhbGwgSW5zaWdodHM6KipcbiAgLSBNaW5pbWFsIHJhaW5mYWxsIGFzIEFwcmlsIG1hcmtzIHRoZSBlbmQgb2YgdGhlIGRyeSBzZWFzb24sIHByb3ZpZGluZyBtb3N0bHkgc3VubnkgZGF5cy5cblxuIyMgQ29uY2x1c2lvblxuXG5BcHJpbCBpcyBhbiBpZGVhbCBtb250aCBmb3IgYWR2ZW50dXJlIHZhY2F0aW9ucyBpbiB0aGUgQ2FyaWJiZWFuLCBvZmZlcmluZyBhIHNlYW1sZXNzIGNvbWJpbmF0aW9uIG9mIHN1cmZpbmcsIGhpa2luZywgYW5kIHdhdGVyIHNwb3J0cyBhbG9uZyB3aXRoIGVucmljaGluZyBjdWx0dXJhbCBleHBlcmllbmNlcy4gV2l0aCBkaXZlcnNlIGRlc3RpbmF0aW9ucyBjYXRlcmluZyB0byBhbGwgc2tpbGwgbGV2ZWxzIGFuZCBpbnRlcmVzdHMsIHRyYXZlbGVycyBhcmUgc3VyZSB0byBmaW5kIGEgZnVsZmlsbGluZyBhbmQgbWVtb3JhYmxlIHRyYXZlbCBleHBlcmllbmNlLiBBcyBzdWNoLCB0aGlzIG1vbnRoIGlzIHBlcmZlY3QgZm9yIHRob3NlIHNlZWtpbmcgYW4gYWN0aXZlIGFuZCB2aWJyYW50IGdldGF3YXkuXG5cbiMjIFJlZmVyZW5jZXNcblxuLSBFbGl0ZSBJc2xhbmQgSG9saWRheXMgW0NhcmliYmVhbiBXYXRlciBTcG9ydHMgR3VpZGVdKGh0dHBzOi8vZWxpdGVpc2xhbmRob2xpZGF5cy5jb20vY2FyaWJiZWFuLXdhdGVyc3BvcnRzLWd1aWRlLz91dG1fc291cmNlPW9wZW5haSlcbi0gVHJpcEFkdmlzb3IgW09jZWFuIEFkdmVudHVyZXMgU2FpbGluZyBBZHZlbnR1cmUgUmV2aWV3c10oaHR0cHM6Ly93d3cudHJpcGFkdmlzb3IuY29tL1Nob3dVc2VyUmV2aWV3cy1nMTQ3MjkzLWQyNjI0Nzg5LXIyMDYxMTQxMDUtT2NlYW5fQWR2ZW50dXJlc19TYWlsaW5nX0FkdmVudHVyZS1QdW50YV9DYW5hX0xhX0FsdGFncmFjaWFfUHJvdmluY2VfRG9taW5pY2FuX1IuaHRtbD91dG1fc291cmNlPW9wZW5haSlcbi0gU2xpY2tyb2NrIEJlbGl6ZSBBZHZlbnR1cmVzIFtQYWNrYWdlc10oaHR0cHM6Ly9zbGlja3JvY2suY29tL3BhY2thZ2VzLz91dG1fc291cmNlPW9wZW5haSlcbi0gT3RoZXIgcmVsZXZhbnQgdHJhdmVsIGFydGljbGVzIGFuZCBsb2NhbCBndWlkZXMuXG5cbi0tLVxuXG5Gb3IgbW9yZSBwZXJzb25hbGl6ZWQgdHJhdmVsIGd1aWRhbmNlLCBjb25zaWRlciByZWFjaGluZyBvdXQgdG8gbG9jYWwgdG91cmlzbSBib2FyZHMgb3IgdHJhdmVsIGFnZW5jaWVzIHNwZWNpYWxpemluZyBpbiBDYXJpYmJlYW4gYWR2ZW50dXJlcy4i" - } - ] - }, - "workflowTaskCompletedEventId": "76" - } - } - ] -} \ No newline at end of file diff --git a/tests/contrib/openai_agents/histories/tools-workflow-history.json b/tests/contrib/openai_agents/histories/tools-workflow-history.json deleted file mode 100644 index 66304d61ec..0000000000 --- a/tests/contrib/openai_agents/histories/tools-workflow-history.json +++ /dev/null @@ -1,506 +0,0 @@ -{ - "events": [ - { - "eventId": "1", - "eventTime": "2025-06-30T16:01:58.250193Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", - "taskId": "1056366", - "workflowExecutionStartedEventAttributes": { - "workflowType": { - "name": "ToolsWorkflow" - }, - "taskQueue": { - "name": "98bba13c-e75a-446d-a2f8-077680fb23af", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IldoYXQgaXMgdGhlIHdlYXRoZXIgaW4gVG9raW8/Ig==" - } - ] - }, - "workflowExecutionTimeout": "5s", - "workflowRunTimeout": "5s", - "workflowTaskTimeout": "5s", - "originalExecutionRunId": "0197c192-e1ea-72ee-9435-c3625ba774b3", - "identity": "16733@Tims-MacBook-Pro.local", - "firstExecutionRunId": "0197c192-e1ea-72ee-9435-c3625ba774b3", - "attempt": 1, - "workflowExecutionExpirationTime": "2025-06-30T16:02:03.250Z", - "firstWorkflowTaskBackoff": "0s", - "workflowId": "tools-workflow-03ac713e-18d8-4075-be78-48ffaecbe8ee" - } - }, - { - "eventId": "2", - "eventTime": "2025-06-30T16:01:58.250225Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056367", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "98bba13c-e75a-446d-a2f8-077680fb23af", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "startToCloseTimeout": "5s", - "attempt": 1 - } - }, - { - "eventId": "3", - "eventTime": "2025-06-30T16:01:58.251382Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056373", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "2", - "identity": "16733@Tims-MacBook-Pro.local", - "requestId": "5ba49c87-5a13-4c88-978b-a7fe5d7e6aa2", - "historySizeBytes": "413", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "4", - "eventTime": "2025-06-30T16:01:58.297122Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056377", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "2", - "startedEventId": "3", - "identity": "16733@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": { - "coreUsedFlags": [ - 3, - 1, - 2 - ], - "sdkName": "temporal-python", - "sdkVersion": "1.13.0" - }, - "meteringMetadata": {} - } - }, - { - "eventId": "5", - "eventTime": "2025-06-30T16:01:58.297147Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056378", - "activityTaskScheduledEventAttributes": { - "activityId": "1", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "98bba13c-e75a-446d-a2f8-077680fb23af", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJBZ2VudCB3b3JrZmxvdyIsInNwYW5JZCI6InNwYW5fOWNmMTNjMDk5ZGQ0NGQ1N2JhOGYzMjg4IiwidHJhY2VJZCI6InRyYWNlXzM0ODdhZjk2ZGZmNzQ5MzJiNDNhNmRiMzkzMjMyYzc0In0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIGhlbHBmdWwgYWdlbnQuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJXaGF0IGlzIHRoZSB3ZWF0aGVyIGluIFRva2lvPyIsInJvbGUiOiJ1c2VyIn1dLCJtb2RlbF9zZXR0aW5ncyI6eyJ0ZW1wZXJhdHVyZSI6bnVsbCwidG9wX3AiOm51bGwsImZyZXF1ZW5jeV9wZW5hbHR5IjpudWxsLCJwcmVzZW5jZV9wZW5hbHR5IjpudWxsLCJ0b29sX2Nob2ljZSI6bnVsbCwicGFyYWxsZWxfdG9vbF9jYWxscyI6bnVsbCwidHJ1bmNhdGlvbiI6bnVsbCwibWF4X3Rva2VucyI6bnVsbCwicmVhc29uaW5nIjpudWxsLCJtZXRhZGF0YSI6bnVsbCwic3RvcmUiOm51bGwsImluY2x1ZGVfdXNhZ2UiOm51bGwsImV4dHJhX3F1ZXJ5IjpudWxsLCJleHRyYV9ib2R5IjpudWxsLCJleHRyYV9oZWFkZXJzIjpudWxsLCJleHRyYV9hcmdzIjpudWxsfSwidG9vbHMiOlt7Im5hbWUiOiJnZXRfd2VhdGhlciIsImRlc2NyaXB0aW9uIjoiR2V0IHRoZSB3ZWF0aGVyIGZvciBhIGdpdmVuIGNpdHkuIiwicGFyYW1zX2pzb25fc2NoZW1hIjp7InByb3BlcnRpZXMiOnsiY2l0eSI6eyJ0aXRsZSI6IkNpdHkiLCJ0eXBlIjoic3RyaW5nIn19LCJyZXF1aXJlZCI6WyJjaXR5Il0sInRpdGxlIjoiZ2V0X3dlYXRoZXJfYXJncyIsInR5cGUiOiJvYmplY3QiLCJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2V9LCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9XSwib3V0cHV0X3NjaGVtYSI6bnVsbCwiaGFuZG9mZnMiOltdLCJ0cmFjaW5nIjoxLCJwcmV2aW91c19yZXNwb25zZV9pZCI6bnVsbCwicHJvbXB0IjpudWxsfQ==" - } - ] - }, - "scheduleToCloseTimeout": "5s", - "scheduleToStartTimeout": "5s", - "startToCloseTimeout": "5s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "4", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - }, - "userMetadata": { - "summary": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IldoYXQgaXMgdGhlIHdlYXRoZXIgaW4gVG9raW8/Ig==" - } - } - }, - { - "eventId": "6", - "eventTime": "2025-06-30T16:01:58.298046Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056383", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "5", - "identity": "16733@Tims-MacBook-Pro.local", - "requestId": "ae5199c4-4759-4cf5-8a14-09bcf3232edb", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "7", - "eventTime": "2025-06-30T16:01:58.317880Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056384", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImFyZ3VtZW50cyI6IntcImNpdHlcIjpcIlRva3lvXCJ9IiwiY2FsbF9pZCI6ImNhbGwiLCJuYW1lIjoiZ2V0X3dlYXRoZXIiLCJ0eXBlIjoiZnVuY3Rpb25fY2FsbCIsImlkIjoiaWQiLCJzdGF0dXMiOiJjb21wbGV0ZWQifV0sInVzYWdlIjp7InJlcXVlc3RzIjowLCJpbnB1dF90b2tlbnMiOjAsImlucHV0X3Rva2Vuc19kZXRhaWxzIjp7ImNhY2hlZF90b2tlbnMiOjB9LCJvdXRwdXRfdG9rZW5zIjowLCJvdXRwdXRfdG9rZW5zX2RldGFpbHMiOnsicmVhc29uaW5nX3Rva2VucyI6MH0sInRvdGFsX3Rva2VucyI6MH0sInJlc3BvbnNlX2lkIjpudWxsfQ==" - } - ] - }, - "scheduledEventId": "5", - "startedEventId": "6", - "identity": "16733@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "8", - "eventTime": "2025-06-30T16:01:58.317883Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056385", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16733@Tims-MacBook-Pro.local-d864298eeab644f88e86e84252c851f5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "98bba13c-e75a-446d-a2f8-077680fb23af" - }, - "startToCloseTimeout": "5s", - "attempt": 1 - } - }, - { - "eventId": "9", - "eventTime": "2025-06-30T16:01:58.318575Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056389", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "8", - "identity": "16733@Tims-MacBook-Pro.local", - "requestId": "bec333bb-94d5-4daa-9156-fca8ef1fd141", - "historySizeBytes": "2605", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "10", - "eventTime": "2025-06-30T16:01:58.352463Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056393", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "8", - "startedEventId": "9", - "identity": "16733@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "11", - "eventTime": "2025-06-30T16:01:58.352485Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056394", - "activityTaskScheduledEventAttributes": { - "activityId": "2", - "activityType": { - "name": "get_weather" - }, - "taskQueue": { - "name": "98bba13c-e75a-446d-a2f8-077680fb23af", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJBZ2VudCB3b3JrZmxvdyIsInNwYW5JZCI6InNwYW5fZDhlMzdkYjVjNDZjNGZmZGEwOTk1MTg5IiwidHJhY2VJZCI6InRyYWNlXzM0ODdhZjk2ZGZmNzQ5MzJiNDNhNmRiMzkzMjMyYzc0In0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IntcImNpdHlcIjpcIlRva3lvXCJ9Ig==" - } - ] - }, - "scheduleToCloseTimeout": "5s", - "scheduleToStartTimeout": "5s", - "startToCloseTimeout": "5s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "10", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - } - }, - { - "eventId": "12", - "eventTime": "2025-06-30T16:01:58.353293Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056398", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "11", - "identity": "16733@Tims-MacBook-Pro.local", - "requestId": "612e8fe0-d67f-48fa-8b3b-692b86898abe", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "13", - "eventTime": "2025-06-30T16:01:58.357887Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056399", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJjaXR5Ijoie1wiY2l0eVwiOlwiVG9reW9cIn0iLCJ0ZW1wZXJhdHVyZV9yYW5nZSI6IjE0LTIwQyIsImNvbmRpdGlvbnMiOiJTdW5ueSB3aXRoIHdpbmQuIn0=" - } - ] - }, - "scheduledEventId": "11", - "startedEventId": "12", - "identity": "16733@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "14", - "eventTime": "2025-06-30T16:01:58.357890Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056400", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16733@Tims-MacBook-Pro.local-d864298eeab644f88e86e84252c851f5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "98bba13c-e75a-446d-a2f8-077680fb23af" - }, - "startToCloseTimeout": "5s", - "attempt": 1 - } - }, - { - "eventId": "15", - "eventTime": "2025-06-30T16:01:58.358535Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056404", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "14", - "identity": "16733@Tims-MacBook-Pro.local", - "requestId": "5860a55b-57b1-4439-88a1-fc6612cd0a1f", - "historySizeBytes": "3649", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "16", - "eventTime": "2025-06-30T16:01:58.363611Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056408", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "14", - "startedEventId": "15", - "identity": "16733@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "17", - "eventTime": "2025-06-30T16:01:58.363630Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", - "taskId": "1056409", - "activityTaskScheduledEventAttributes": { - "activityId": "3", - "activityType": { - "name": "invoke_model_activity" - }, - "taskQueue": { - "name": "98bba13c-e75a-446d-a2f8-077680fb23af", - "kind": "TASK_QUEUE_KIND_NORMAL" - }, - "header": { - "fields": { - "__openai_span": { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJ0cmFjZU5hbWUiOiJBZ2VudCB3b3JrZmxvdyIsInNwYW5JZCI6InNwYW5fNjNhN2VkYWE0MzU3NDU5OWIzOTFkNzAzIiwidHJhY2VJZCI6InRyYWNlXzM0ODdhZjk2ZGZmNzQ5MzJiNDNhNmRiMzkzMjMyYzc0In0=" - } - } - }, - "input": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJtb2RlbF9uYW1lIjpudWxsLCJzeXN0ZW1faW5zdHJ1Y3Rpb25zIjoiWW91IGFyZSBhIGhlbHBmdWwgYWdlbnQuIiwiaW5wdXQiOlt7ImNvbnRlbnQiOiJXaGF0IGlzIHRoZSB3ZWF0aGVyIGluIFRva2lvPyIsInJvbGUiOiJ1c2VyIn0seyJhcmd1bWVudHMiOiJ7XCJjaXR5XCI6XCJUb2t5b1wifSIsImNhbGxfaWQiOiJjYWxsIiwibmFtZSI6ImdldF93ZWF0aGVyIiwidHlwZSI6ImZ1bmN0aW9uX2NhbGwiLCJpZCI6ImlkIiwic3RhdHVzIjoiY29tcGxldGVkIn0seyJjYWxsX2lkIjoiY2FsbCIsIm91dHB1dCI6IldlYXRoZXIoY2l0eT0ne1wiY2l0eVwiOlwiVG9reW9cIn0nLCB0ZW1wZXJhdHVyZV9yYW5nZT0nMTQtMjBDJywgY29uZGl0aW9ucz0nU3Vubnkgd2l0aCB3aW5kLicpIiwidHlwZSI6ImZ1bmN0aW9uX2NhbGxfb3V0cHV0In1dLCJtb2RlbF9zZXR0aW5ncyI6eyJ0ZW1wZXJhdHVyZSI6bnVsbCwidG9wX3AiOm51bGwsImZyZXF1ZW5jeV9wZW5hbHR5IjpudWxsLCJwcmVzZW5jZV9wZW5hbHR5IjpudWxsLCJ0b29sX2Nob2ljZSI6bnVsbCwicGFyYWxsZWxfdG9vbF9jYWxscyI6bnVsbCwidHJ1bmNhdGlvbiI6bnVsbCwibWF4X3Rva2VucyI6bnVsbCwicmVhc29uaW5nIjpudWxsLCJtZXRhZGF0YSI6bnVsbCwic3RvcmUiOm51bGwsImluY2x1ZGVfdXNhZ2UiOm51bGwsImV4dHJhX3F1ZXJ5IjpudWxsLCJleHRyYV9ib2R5IjpudWxsLCJleHRyYV9oZWFkZXJzIjpudWxsLCJleHRyYV9hcmdzIjpudWxsfSwidG9vbHMiOlt7Im5hbWUiOiJnZXRfd2VhdGhlciIsImRlc2NyaXB0aW9uIjoiR2V0IHRoZSB3ZWF0aGVyIGZvciBhIGdpdmVuIGNpdHkuIiwicGFyYW1zX2pzb25fc2NoZW1hIjp7InByb3BlcnRpZXMiOnsiY2l0eSI6eyJ0aXRsZSI6IkNpdHkiLCJ0eXBlIjoic3RyaW5nIn19LCJyZXF1aXJlZCI6WyJjaXR5Il0sInRpdGxlIjoiZ2V0X3dlYXRoZXJfYXJncyIsInR5cGUiOiJvYmplY3QiLCJhZGRpdGlvbmFsUHJvcGVydGllcyI6ZmFsc2V9LCJzdHJpY3RfanNvbl9zY2hlbWEiOnRydWV9XSwib3V0cHV0X3NjaGVtYSI6bnVsbCwiaGFuZG9mZnMiOltdLCJ0cmFjaW5nIjoxLCJwcmV2aW91c19yZXNwb25zZV9pZCI6bnVsbCwicHJvbXB0IjpudWxsfQ==" - } - ] - }, - "scheduleToCloseTimeout": "5s", - "scheduleToStartTimeout": "5s", - "startToCloseTimeout": "5s", - "heartbeatTimeout": "0s", - "workflowTaskCompletedEventId": "16", - "retryPolicy": { - "initialInterval": "1s", - "backoffCoefficient": 2.0, - "maximumInterval": "100s" - }, - "useWorkflowBuildId": true - } - }, - { - "eventId": "18", - "eventTime": "2025-06-30T16:01:58.364372Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", - "taskId": "1056413", - "activityTaskStartedEventAttributes": { - "scheduledEventId": "17", - "identity": "16733@Tims-MacBook-Pro.local", - "requestId": "0b072618-f02f-483e-8a13-260fa095eb59", - "attempt": 1, - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "19", - "eventTime": "2025-06-30T16:01:58.378926Z", - "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", - "taskId": "1056414", - "activityTaskCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "eyJvdXRwdXQiOlt7ImlkIjoiIiwiY29udGVudCI6W3siYW5ub3RhdGlvbnMiOltdLCJ0ZXh0IjoiVGVzdCB3ZWF0aGVyIHJlc3VsdCIsInR5cGUiOiJvdXRwdXRfdGV4dCJ9XSwicm9sZSI6ImFzc2lzdGFudCIsInN0YXR1cyI6ImNvbXBsZXRlZCIsInR5cGUiOiJtZXNzYWdlIn1dLCJ1c2FnZSI6eyJyZXF1ZXN0cyI6MCwiaW5wdXRfdG9rZW5zIjowLCJpbnB1dF90b2tlbnNfZGV0YWlscyI6eyJjYWNoZWRfdG9rZW5zIjowfSwib3V0cHV0X3Rva2VucyI6MCwib3V0cHV0X3Rva2Vuc19kZXRhaWxzIjp7InJlYXNvbmluZ190b2tlbnMiOjB9LCJ0b3RhbF90b2tlbnMiOjB9LCJyZXNwb25zZV9pZCI6bnVsbH0=" - } - ] - }, - "scheduledEventId": "17", - "startedEventId": "18", - "identity": "16733@Tims-MacBook-Pro.local" - } - }, - { - "eventId": "20", - "eventTime": "2025-06-30T16:01:58.378930Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", - "taskId": "1056415", - "workflowTaskScheduledEventAttributes": { - "taskQueue": { - "name": "16733@Tims-MacBook-Pro.local-d864298eeab644f88e86e84252c851f5", - "kind": "TASK_QUEUE_KIND_STICKY", - "normalName": "98bba13c-e75a-446d-a2f8-077680fb23af" - }, - "startToCloseTimeout": "5s", - "attempt": 1 - } - }, - { - "eventId": "21", - "eventTime": "2025-06-30T16:01:58.379545Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", - "taskId": "1056419", - "workflowTaskStartedEventAttributes": { - "scheduledEventId": "20", - "identity": "16733@Tims-MacBook-Pro.local", - "requestId": "3180f9ec-370c-47f8-a020-653eaf69367a", - "historySizeBytes": "6053", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - } - } - }, - { - "eventId": "22", - "eventTime": "2025-06-30T16:01:58.385250Z", - "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", - "taskId": "1056423", - "workflowTaskCompletedEventAttributes": { - "scheduledEventId": "20", - "startedEventId": "21", - "identity": "16733@Tims-MacBook-Pro.local", - "workerVersion": { - "buildId": "01c9746b80ed5a14fc25fb053c5e410a" - }, - "sdkMetadata": {}, - "meteringMetadata": {} - } - }, - { - "eventId": "23", - "eventTime": "2025-06-30T16:01:58.385268Z", - "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", - "taskId": "1056424", - "workflowExecutionCompletedEventAttributes": { - "result": { - "payloads": [ - { - "metadata": { - "encoding": "anNvbi9wbGFpbg==" - }, - "data": "IlRlc3Qgd2VhdGhlciByZXN1bHQi" - } - ] - }, - "workflowTaskCompletedEventId": "22" - } - } - ] -} \ No newline at end of file diff --git a/tests/contrib/openai_agents/research_agents/planner_agent.py b/tests/contrib/openai_agents/research_agents/planner_agent.py deleted file mode 100644 index 8289d86364..0000000000 --- a/tests/contrib/openai_agents/research_agents/planner_agent.py +++ /dev/null @@ -1,29 +0,0 @@ -from agents import Agent -from pydantic import BaseModel - -PROMPT = ( - "You are a helpful research assistant. Given a query, come up with a set of web searches " - "to perform to best answer the query. Output between 2 and 3 terms to query for." -) - - -class WebSearchItem(BaseModel): - reason: str - "Your reasoning for why this search is important to the query." - - query: str - "The search term to use for the web search." - - -class WebSearchPlan(BaseModel): - searches: list[WebSearchItem] - """A list of web searches to perform to best answer the query.""" - - -def new_planner_agent(): - return Agent( - name="PlannerAgent", - instructions=PROMPT, - model="gpt-4o", - output_type=WebSearchPlan, - ) diff --git a/tests/contrib/openai_agents/research_agents/printer.py b/tests/contrib/openai_agents/research_agents/printer.py deleted file mode 100644 index fa448e7bf4..0000000000 --- a/tests/contrib/openai_agents/research_agents/printer.py +++ /dev/null @@ -1,45 +0,0 @@ -from typing import Any - -from rich.console import Console, Group -from rich.live import Live -from rich.spinner import Spinner - - -class Printer: - def __init__(self, console: Console): - self.live = Live(console=console) - self.items: dict[str, tuple[str, bool]] = {} - self.hide_done_ids: set[str] = set() - self.live.start() - - def end(self) -> None: - self.live.stop() - - def hide_done_checkmark(self, item_id: str) -> None: - self.hide_done_ids.add(item_id) - - def update_item( - self, - item_id: str, - content: str, - is_done: bool = False, - hide_checkmark: bool = False, - ) -> None: - self.items[item_id] = (content, is_done) - if hide_checkmark: - self.hide_done_ids.add(item_id) - self.flush() - - def mark_item_done(self, item_id: str) -> None: - self.items[item_id] = (self.items[item_id][0], True) - self.flush() - - def flush(self) -> None: - renderables: list[Any] = [] - for item_id, (content, is_done) in self.items.items(): - if is_done: - prefix = "✅ " if item_id not in self.hide_done_ids else "" - renderables.append(prefix + content) - else: - renderables.append(Spinner("dots", text=content)) - self.live.update(Group(*renderables)) diff --git a/tests/contrib/openai_agents/research_agents/research_manager.py b/tests/contrib/openai_agents/research_agents/research_manager.py deleted file mode 100644 index f37eb6293c..0000000000 --- a/tests/contrib/openai_agents/research_agents/research_manager.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -import asyncio - -from agents import Runner, custom_span, gen_trace_id, trace - -import temporalio.workflow -from tests.contrib.openai_agents.research_agents.planner_agent import ( - WebSearchItem, - WebSearchPlan, - new_planner_agent, -) -from tests.contrib.openai_agents.research_agents.search_agent import new_search_agent -from tests.contrib.openai_agents.research_agents.writer_agent import ( - ReportData, - new_writer_agent, -) - - -class ResearchManager: - def __init__(self): - self.search_agent = new_search_agent() - self.planner_agent = new_planner_agent() - self.writer_agent = new_writer_agent() - - async def run(self, query: str) -> str: - trace_id = gen_trace_id() - with trace("Research trace", trace_id=trace_id): - search_plan = await self._plan_searches(query) - search_results = await self._perform_searches(search_plan) - report = await self._write_report(query, search_results) - - return report.markdown_report - - async def _plan_searches(self, query: str) -> WebSearchPlan: - result = await Runner.run( - self.planner_agent, - f"Query: {query}", - ) - return result.final_output_as(WebSearchPlan) - - async def _perform_searches(self, search_plan: WebSearchPlan) -> list[str]: - with custom_span("Search the web"): - num_completed = 0 - tasks = [ - asyncio.create_task(self._search(item)) for item in search_plan.searches - ] - results = [] - for task in temporalio.workflow.as_completed(tasks): - result = await task - if result is not None: - results.append(result) - num_completed += 1 - return results - - async def _search(self, item: WebSearchItem) -> str | None: - input = f"Search term: {item.query}\nReason for searching: {item.reason}" - try: - result = await Runner.run( - self.search_agent, - input, - ) - return str(result.final_output) - except Exception: - raise - - async def _write_report(self, query: str, search_results: list[str]) -> ReportData: - input = f"Original query: {query}\nSummarized search results: {search_results}" - result = await Runner.run( - self.writer_agent, - input, - ) - - return result.final_output_as(ReportData) diff --git a/tests/contrib/openai_agents/research_agents/search_agent.py b/tests/contrib/openai_agents/research_agents/search_agent.py deleted file mode 100644 index 43c30ed88f..0000000000 --- a/tests/contrib/openai_agents/research_agents/search_agent.py +++ /dev/null @@ -1,20 +0,0 @@ -from agents import Agent, WebSearchTool -from agents.model_settings import ModelSettings - -INSTRUCTIONS = ( - "You are a research assistant. Given a search term, you search the web for that term and " - "produce a concise summary of the results. The summary must 2-3 paragraphs and less than 300 " - "words. Capture the main points. Write succinctly, no need to have complete sentences or good " - "grammar. This will be consumed by someone synthesizing a report, so its vital you capture the " - "essence and ignore any fluff. Do not include any additional commentary other than the summary " - "itself." -) - - -def new_search_agent(): - return Agent( - name="Search agent", - instructions=INSTRUCTIONS, - tools=[WebSearchTool()], - model_settings=ModelSettings(tool_choice="required"), - ) diff --git a/tests/contrib/openai_agents/research_agents/writer_agent.py b/tests/contrib/openai_agents/research_agents/writer_agent.py deleted file mode 100644 index 9d8a34b0b6..0000000000 --- a/tests/contrib/openai_agents/research_agents/writer_agent.py +++ /dev/null @@ -1,33 +0,0 @@ -# Agent used to synthesize a final report from the individual summaries. -from agents import Agent -from pydantic import BaseModel - -PROMPT = ( - "You are a senior researcher tasked with writing a cohesive report for a research query. " - "You will be provided with the original query, and some initial research done by a research " - "assistant.\n" - "You should first come up with an outline for the report that describes the structure and " - "flow of the report. Then, generate the report and return that as your final output.\n" - "The final output should be in markdown format, and it should be lengthy and detailed. Aim " - "for 5-10 pages of content, at least 1000 words." -) - - -class ReportData(BaseModel): - short_summary: str - """A short 2-3 sentence summary of the findings.""" - - markdown_report: str - """The final report""" - - follow_up_questions: list[str] - """Suggested topics to research further""" - - -def new_writer_agent(): - return Agent( - name="WriterAgent", - instructions=PROMPT, - model="o3-mini", - output_type=ReportData, - ) diff --git a/tests/contrib/openai_agents/test_openai.py b/tests/contrib/openai_agents/test_openai.py deleted file mode 100644 index 381a213cd3..0000000000 --- a/tests/contrib/openai_agents/test_openai.py +++ /dev/null @@ -1,2637 +0,0 @@ -import asyncio -import json -import os -import sys -import uuid -from collections.abc import AsyncIterator, Callable, Sequence -from dataclasses import dataclass -from datetime import timedelta -from typing import ( - Any, - Optional, - Union, - cast, -) - -import nexusrpc -import pydantic -import pytest -from agents import ( - Agent, - AgentBase, - AgentOutputSchemaBase, - CodeInterpreterTool, - FileSearchTool, - GuardrailFunctionOutput, - Handoff, - HostedMCPTool, - ImageGenerationTool, - InputGuardrailTripwireTriggered, - ItemHelpers, - MCPToolApprovalFunctionResult, - MCPToolApprovalRequest, - MessageOutputItem, - Model, - ModelProvider, - ModelResponse, - ModelSettings, - ModelTracing, - OpenAIChatCompletionsModel, - OpenAIResponsesModel, - OutputGuardrailTripwireTriggered, - RunConfig, - RunContextWrapper, - Runner, - SQLiteSession, - Tool, - TResponseInputItem, - Usage, - function_tool, - handoff, - input_guardrail, - output_guardrail, - trace, -) -from agents.extensions.handoff_prompt import RECOMMENDED_PROMPT_PREFIX -from agents.items import ( - HandoffOutputItem, - ToolCallItem, - ToolCallOutputItem, - TResponseOutputItem, - TResponseStreamEvent, -) -from agents.mcp import MCPServer, MCPServerStdio -from openai import APIStatusError, AsyncOpenAI, BaseModel -from openai.types.responses import ( - EasyInputMessageParam, - ResponseCodeInterpreterToolCall, - ResponseFileSearchToolCall, - ResponseFunctionToolCall, - ResponseFunctionToolCallParam, - ResponseFunctionWebSearch, - ResponseInputTextParam, - ResponseOutputMessage, - ResponseOutputText, -) -from openai.types.responses.response_file_search_tool_call import Result -from openai.types.responses.response_function_web_search import ActionSearch -from openai.types.responses.response_input_item_param import Message -from openai.types.responses.response_output_item import ( - ImageGenerationCall, - McpApprovalRequest, - McpCall, -) -from openai.types.responses.response_prompt_param import ResponsePromptParam -from pydantic import ConfigDict, Field, TypeAdapter - -from temporalio import activity, workflow -from temporalio.client import Client, WorkflowFailureError, WorkflowHandle -from temporalio.common import RetryPolicy -from temporalio.contrib import openai_agents -from temporalio.contrib.openai_agents import ( - ModelActivityParameters, - StatefulMCPServerProvider, - StatelessMCPServerProvider, -) -from temporalio.contrib.openai_agents._model_parameters import ModelSummaryProvider -from temporalio.contrib.openai_agents._openai_runner import _convert_agent -from temporalio.contrib.openai_agents._temporal_model_stub import ( - _extract_summary, - _TemporalModelStub, -) -from temporalio.contrib.openai_agents.testing import ( - AgentEnvironment, - ResponseBuilders, - TestModel, - TestModelProvider, -) -from temporalio.contrib.pydantic import pydantic_data_converter -from temporalio.exceptions import ApplicationError, CancelledError, TemporalError -from temporalio.testing import WorkflowEnvironment -from temporalio.workflow import ActivityConfig -from tests.contrib.openai_agents.research_agents.research_manager import ( - ResearchManager, -) -from tests.helpers import assert_eventually, new_worker -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name - - -def hello_mock_model(): - return TestModel.returning_responses([ResponseBuilders.output_message("test")]) - - -@workflow.defn -class HelloWorldAgent: - @workflow.run - async def run(self, prompt: str) -> str: - agent = Agent[None]( - name="Assistant", - instructions="You only respond in haikus.", - ) - result = await Runner.run(starting_agent=agent, input=prompt) - return result.final_output - - -@pytest.mark.parametrize("use_local_model", [True, False]) -async def test_hello_world_agent(client: Client, use_local_model: bool): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - model = hello_mock_model() if use_local_model else None - async with AgentEnvironment( - model=model, - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker(client, HelloWorldAgent) as worker: - result = await client.execute_workflow( - HelloWorldAgent.run, - "Tell me about recursion in programming.", - id=f"hello-workflow-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=5), - ) - if use_local_model: - assert result == "test" - - -@dataclass -class Weather: - city: str - temperature_range: str - conditions: str - - -@activity.defn -async def get_weather(city: str) -> Weather: - """ - Get the weather for a given city. - """ - return Weather(city=city, temperature_range="14-20C", conditions="Sunny with wind.") - - -@activity.defn -async def get_weather_country(city: str, country: str) -> Weather: - """ - Get the weather for a given city in a country. - """ - return Weather(city=city, temperature_range="14-20C", conditions="Sunny with wind.") - - -@dataclass -class WeatherInput: - city: str - - -@activity.defn -async def get_weather_object(input: WeatherInput) -> Weather: - """ - Get the weather for a given city. - """ - return Weather( - city=input.city, temperature_range="14-20C", conditions="Sunny with wind." - ) - - -@activity.defn -async def get_weather_context(ctx: RunContextWrapper[str], city: str) -> Weather: - """ - Get the weather for a given city. - """ - return Weather(city=city, temperature_range="14-20C", conditions=ctx.context) - - -class ActivityWeatherService: - @activity.defn - async def get_weather_method(self, city: str) -> Weather: - """ - Get the weather for a given city. - """ - return Weather( - city=city, temperature_range="14-20C", conditions="Sunny with wind." - ) - - -@nexusrpc.service -class WeatherService: - get_weather_nexus_operation: nexusrpc.Operation[WeatherInput, Weather] - - -@nexusrpc.handler.service_handler(service=WeatherService) -class WeatherServiceHandler: - @nexusrpc.handler.sync_operation - async def get_weather_nexus_operation( - self, ctx: nexusrpc.handler.StartOperationContext, input: WeatherInput - ) -> Weather: - return Weather( - city=input.city, temperature_range="14-20C", conditions="Sunny with wind." - ) - - -def weather_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.tool_call('{"city":"Tokyo"}', "get_weather"), - ResponseBuilders.tool_call( - '{"input":{"city":"Tokyo"}}', "get_weather_object" - ), - ResponseBuilders.tool_call( - '{"city":"Tokyo","country":"Japan"}', "get_weather_country" - ), - ResponseBuilders.tool_call('{"city":"Tokyo"}', "get_weather_context"), - ResponseBuilders.tool_call('{"city":"Tokyo"}', "get_weather_method"), - ResponseBuilders.output_message("Test weather result"), - ] - ) - - -def nexus_weather_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.tool_call( - '{"input":{"city":"Tokyo"}}', "get_weather_nexus_operation" - ), - ResponseBuilders.output_message("Test nexus weather result"), - ] - ) - - -@workflow.defn -class ToolsWorkflow: - @workflow.run - async def run(self, question: str) -> str: - agent = Agent[str]( - name="Tools Workflow", - instructions="You are a helpful agent.", - tools=[ - openai_agents.workflow.activity_as_tool( - get_weather, start_to_close_timeout=timedelta(seconds=10) - ), - openai_agents.workflow.activity_as_tool( - get_weather_object, start_to_close_timeout=timedelta(seconds=10) - ), - openai_agents.workflow.activity_as_tool( - get_weather_country, start_to_close_timeout=timedelta(seconds=10) - ), - openai_agents.workflow.activity_as_tool( - get_weather_context, start_to_close_timeout=timedelta(seconds=10) - ), - openai_agents.workflow.activity_as_tool( - ActivityWeatherService.get_weather_method, - start_to_close_timeout=timedelta(seconds=10), - ), - openai_agents.workflow.activity_as_tool( - get_weather_failure, - start_to_close_timeout=timedelta(seconds=10), - ), - ], - ) - result = await Runner.run( - starting_agent=agent, input=question, context="Stormy" - ) - return result.final_output - - -@workflow.defn -class NexusToolsWorkflow: - @workflow.run - async def run(self, question: str) -> str: - agent = Agent[str]( - name="Nexus Tools Workflow", - instructions="You are a helpful agent.", - tools=[ - openai_agents.workflow.nexus_operation_as_tool( - WeatherService.get_weather_nexus_operation, - service=WeatherService, - endpoint=make_nexus_endpoint_name(workflow.info().task_queue), - schedule_to_close_timeout=timedelta(seconds=10), - ), - ], - ) - result = await Runner.run( - starting_agent=agent, input=question, context="Stormy" - ) - return result.final_output - - -@pytest.mark.parametrize("use_local_model", [True, False]) -async def test_tool_workflow(client: Client, use_local_model: bool): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - model = weather_mock_model() if use_local_model else None - async with AgentEnvironment( - model=model, - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - ToolsWorkflow, - activities=[ - get_weather, - get_weather_object, - get_weather_country, - get_weather_context, - ActivityWeatherService().get_weather_method, - ], - ) as worker: - workflow_handle = await client.start_workflow( - ToolsWorkflow.run, - "What is the weather in Tokio?", - id=f"tools-workflow-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - result = await workflow_handle.result() - - if use_local_model: - assert result == "Test weather result" - - events = [] - async for e in workflow_handle.fetch_history_events(): - if e.HasField("activity_task_completed_event_attributes"): - events.append(e) - - assert len(events) == 11 - assert ( - "function_call" - in events[0] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Sunny with wind" - in events[1] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "function_call" - in events[2] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Sunny with wind" - in events[3] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "function_call" - in events[4] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Sunny with wind" - in events[5] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "function_call" - in events[6] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Stormy" - in events[7] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "function_call" - in events[8] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Sunny with wind" - in events[9] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Test weather result" - in events[10] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - - -@activity.defn -async def get_weather_failure(city: str) -> Weather: - """ - Get the weather for a given city. - """ - raise ApplicationError("No weather", non_retryable=True) - - -def weather_failure_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.tool_call('{"city":"Tokyo"}', "get_weather_failure"), - ] - ) - - -async def test_tool_failure_workflow(client: Client): - async with AgentEnvironment( - model=weather_failure_mock_model(), - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - ToolsWorkflow, - activities=[ - get_weather_failure, - ], - ) as worker: - workflow_handle = await client.start_workflow( - ToolsWorkflow.run, - "What is the weather in Tokio?", - id=f"tools-failure-workflow-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=2), - ) - with pytest.raises(WorkflowFailureError) as e: - result = await workflow_handle.result() - cause = e.value.cause - assert isinstance(cause, ApplicationError) - assert "Workflow failure exception in Agents Framework" in cause.message - - -@pytest.mark.parametrize("use_local_model", [True, False]) -async def test_nexus_tool_workflow( - client: Client, env: WorkflowEnvironment, use_local_model: bool -): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - - model = nexus_weather_mock_model() if use_local_model else None - async with AgentEnvironment( - model=model, - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as agent_env: - client = agent_env.applied_on_client(client) - - async with new_worker( - client, - NexusToolsWorkflow, - nexus_service_handlers=[WeatherServiceHandler()], - ) as worker: - await create_nexus_endpoint(worker.task_queue, client) - - workflow_handle = await client.start_workflow( - NexusToolsWorkflow.run, - "What is the weather in Tokio?", - id=f"nexus-tools-workflow-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - result = await workflow_handle.result() - - if use_local_model: - assert result == "Test nexus weather result" - - events = [] - async for e in workflow_handle.fetch_history_events(): - if e.HasField( - "activity_task_completed_event_attributes" - ) or e.HasField("nexus_operation_completed_event_attributes"): - events.append(e) - - assert len(events) == 3 - assert ( - "function_call" - in events[0] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Sunny with wind" - in events[ - 1 - ].nexus_operation_completed_event_attributes.result.data.decode() - ) - assert ( - "Test nexus weather result" - in events[2] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - - -def research_mock_model(): - responses = [ - ResponseBuilders.output_message( - '{"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."}]}' - ) - ] - for _ in range(10): - responses.append( - ModelResponse( - output=[ - ResponseFunctionWebSearch( - id="", - status="completed", - type="web_search_call", - action=ActionSearch(query="", type="search"), - ), - ResponseBuilders.response_output_message("Granada"), - ], - usage=Usage(), - response_id=None, - ) - ) - responses.append( - ResponseBuilders.output_message( - '{"follow_up_questions":[], "markdown_report":"report", "short_summary":"rep"}' - ) - ) - return TestModel.returning_responses(responses) - - -@workflow.defn -class ResearchWorkflow: - @workflow.run - async def run(self, query: str): - return await ResearchManager().run(query) - - -@pytest.mark.parametrize("use_local_model", [True, False]) -@pytest.mark.timeout(120) -async def test_research_workflow(client: Client, use_local_model: bool): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - model = research_mock_model() if use_local_model else None - async with AgentEnvironment( - model=model, - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=120), - schedule_to_close_timeout=timedelta(seconds=120), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - ResearchWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - ResearchWorkflow.run, - "Caribbean vacation spots in April, optimizing for surfing, hiking and water sports", - id=f"research-workflow-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=120), - ) - result = await workflow_handle.result() - - if use_local_model: - assert result == "report" - - events = [] - async for e in workflow_handle.fetch_history_events(): - if e.HasField("activity_task_completed_event_attributes"): - events.append(e) - - assert len(events) == 12 - assert ( - '"type":"output_text"' - in events[0] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - for i in range(1, 11): - assert ( - "web_search_call" - in events[i] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - - assert ( - '"type":"output_text"' - in events[11] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - - -def orchestrator_agent() -> Agent: - spanish_agent = Agent[None]( - name="spanish_agent", - instructions="You translate the user's message to Spanish", - handoff_description="An english to spanish translator", - ) - - french_agent = Agent[None]( - name="french_agent", - instructions="You translate the user's message to French", - handoff_description="An english to french translator", - ) - - italian_agent = Agent[None]( - name="italian_agent", - instructions="You translate the user's message to Italian", - handoff_description="An english to italian translator", - ) - - orchestrator_agent = Agent[None]( - name="orchestrator_agent", - instructions=( - "You are a translation agent. You use the tools given to you to translate." - "If asked for multiple translations, you call the relevant tools in order." - "You never translate on your own, you always use the provided tools." - ), - tools=[ - spanish_agent.as_tool( - tool_name="translate_to_spanish", - tool_description="Translate the user's message to Spanish", - ), - french_agent.as_tool( - tool_name="translate_to_french", - tool_description="Translate the user's message to French", - ), - italian_agent.as_tool( - tool_name="translate_to_italian", - tool_description="Translate the user's message to Italian", - ), - ], - ) - return orchestrator_agent - - -def synthesizer_agent() -> Agent: - return Agent( - name="synthesizer_agent", - instructions="You inspect translations, correct them if needed, and produce a final concatenated response.", - ) - - -@workflow.defn -class AgentsAsToolsWorkflow: - @workflow.run - async def run(self, msg: str) -> str: - # Run the entire orchestration in a single trace - with trace("Orchestrator evaluator"): - orchestrator = orchestrator_agent() - synthesizer = synthesizer_agent() - - orchestrator_result = await Runner.run( - starting_agent=orchestrator, input=msg - ) - - for item in orchestrator_result.new_items: - if isinstance(item, MessageOutputItem): - text = ItemHelpers.text_message_output(item) - if text: - print(f" - Translation step: {text}") - - synthesizer_result = await Runner.run( - starting_agent=synthesizer, input=orchestrator_result.to_input_list() - ) - - return synthesizer_result.final_output - - -def agent_as_tools_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.tool_call('{"input":"I am full"}', "translate_to_spanish"), - ResponseBuilders.output_message("Estoy lleno."), - ResponseBuilders.output_message( - 'The translation to Spanish is: "Estoy lleno."' - ), - ResponseBuilders.output_message( - 'The translation to Spanish is: "Estoy lleno."' - ), - ] - ) - - -@pytest.mark.parametrize("use_local_model", [True, False]) -async def test_agents_as_tools_workflow(client: Client, use_local_model: bool): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - model = agent_as_tools_mock_model() if use_local_model else None - async with AgentEnvironment( - model=model, - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - AgentsAsToolsWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - AgentsAsToolsWorkflow.run, - "Translate to Spanish: 'I am full'", - id=f"agents-as-tools-workflow-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - result = await workflow_handle.result() - - if use_local_model: - assert result == 'The translation to Spanish is: "Estoy lleno."' - - events = [] - async for e in workflow_handle.fetch_history_events(): - if e.HasField("activity_task_completed_event_attributes"): - events.append(e) - - assert len(events) == 4 - assert ( - "function_call" - in events[0] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Estoy lleno" - in events[1] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "The translation to Spanish is:" - in events[2] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "The translation to Spanish is:" - in events[3] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - - -class AirlineAgentContext(BaseModel): - passenger_name: str | None = None - confirmation_number: str | None = None - seat_number: str | None = None - flight_number: str | None = None - - -@function_tool( - name_override="faq_lookup_tool", - description_override="Lookup frequently asked questions.", -) -async def faq_lookup_tool(question: str) -> str: - if "bag" in question or "baggage" in question: - return ( - "You are allowed to bring one bag on the plane. " - "It must be under 50 pounds and 22 inches x 14 inches x 9 inches." - ) - elif "seats" in question or "plane" in question: - return ( - "There are 120 seats on the plane. " - "There are 22 business class seats and 98 economy seats. " - "Exit rows are rows 4 and 16. " - "Rows 5-8 are Economy Plus, with extra legroom. " - ) - elif "wifi" in question: - return "We have free wifi on the plane, join Airline-Wifi" - return "I'm sorry, I don't know the answer to that question." - - -@function_tool -async def update_seat( - context: RunContextWrapper[AirlineAgentContext], - confirmation_number: str, - new_seat: str, -) -> str: - # Update the context based on the customer's input - context.context.confirmation_number = confirmation_number - context.context.seat_number = new_seat - # Ensure that the flight number has been set by the incoming handoff - assert context.context.flight_number is not None, "Flight number is required" - return f"Updated seat to {new_seat} for confirmation number {confirmation_number}" - - -### HOOKS - - -async def on_seat_booking_handoff( - context: RunContextWrapper[AirlineAgentContext], -) -> None: - try: - flight_number = f"FLT-{workflow.random().randint(100, 999)}" - except TemporalError: - flight_number = "FLT-100" - context.context.flight_number = flight_number - - -### AGENTS - - -def init_agents() -> Agent[AirlineAgentContext]: - """ - Initialize the agents for the airline customer service workflow. - :return: triage agent - """ - faq_agent = Agent[AirlineAgentContext]( - name="FAQ Agent", - handoff_description="A helpful agent that can answer questions about the airline.", - instructions=f"""{RECOMMENDED_PROMPT_PREFIX} - You are an FAQ agent. If you are speaking to a customer, you probably were transferred to from the triage agent. - Use the following routine to support the customer. - # Routine - 1. Identify the last question asked by the customer. - 2. Use the faq lookup tool to answer the question. Do not rely on your own knowledge. - 3. If you cannot answer the question, transfer back to the triage agent.""", - tools=[faq_lookup_tool], - ) - - seat_booking_agent = Agent[AirlineAgentContext]( - name="Seat Booking Agent", - handoff_description="A helpful agent that can update a seat on a flight.", - instructions=f"""{RECOMMENDED_PROMPT_PREFIX} - You are a seat booking agent. If you are speaking to a customer, you probably were transferred to from the triage agent. - Use the following routine to support the customer. - # Routine - 1. Ask for their confirmation number. - 2. Ask the customer what their desired seat number is. - 3. Use the update seat tool to update the seat on the flight. - If the customer asks a question that is not related to the routine, transfer back to the triage agent. """, - tools=[update_seat], - ) - - triage_agent = Agent[AirlineAgentContext]( - name="Triage Agent", - handoff_description="A triage agent that can delegate a customer's request to the appropriate agent.", - instructions=( - f"{RECOMMENDED_PROMPT_PREFIX} " - "You are a helpful triaging agent. You can use your tools to delegate questions to other appropriate agents." - ), - handoffs=[ - faq_agent, - handoff(agent=seat_booking_agent, on_handoff=on_seat_booking_handoff), - ], - ) - - faq_agent.handoffs.append(triage_agent) - seat_booking_agent.handoffs.append(triage_agent) - return triage_agent - - -class ProcessUserMessageInput(BaseModel): - user_input: str - chat_length: int - - -def customer_service_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.output_message("Hi there! How can I assist you today?"), - ResponseBuilders.tool_call("{}", "transfer_to_seat_booking_agent"), - ResponseBuilders.output_message( - "Could you please provide your confirmation number?" - ), - ResponseBuilders.output_message( - "Thanks! What seat number would you like to change to?" - ), - ResponseBuilders.tool_call( - '{"confirmation_number":"11111","new_seat":"window seat"}', - "update_seat", - ), - ResponseBuilders.output_message( - "Your seat has been updated to a window seat. If there's anything else you need, feel free to let me know!" - ), - ResponseBuilders.tool_call("{}", "transfer_to_triage_agent"), - ResponseBuilders.output_message("You're welcome!"), - ] - ) - - -@workflow.defn -class CustomerServiceWorkflow: - def __init__(self, input_items: list[TResponseInputItem] = []): - self.chat_history: list[str] = [] - self.current_agent: Agent[AirlineAgentContext] = init_agents() - self.context = AirlineAgentContext() - self.input_items = input_items - - @workflow.run - async def run(self, input_items: list[TResponseInputItem] = []): - await workflow.wait_condition(lambda: False) - workflow.continue_as_new(self.input_items) - - @workflow.query - def get_chat_history(self) -> list[str]: - return self.chat_history - - @workflow.update - async def process_user_message(self, input: ProcessUserMessageInput) -> list[str]: - length = len(self.chat_history) - self.chat_history.append(f"User: {input.user_input}") - with trace("Customer service", group_id=workflow.info().workflow_id): - self.input_items.append({"content": input.user_input, "role": "user"}) - result = await Runner.run( - starting_agent=self.current_agent, - input=self.input_items, - context=self.context, - ) - - for new_item in result.new_items: - agent_name = new_item.agent.name - if isinstance(new_item, MessageOutputItem): - self.chat_history.append( - f"{agent_name}: {ItemHelpers.text_message_output(new_item)}" - ) - elif isinstance(new_item, HandoffOutputItem): - self.chat_history.append( - f"Handed off from {new_item.source_agent.name} to {new_item.target_agent.name}" - ) - elif isinstance(new_item, ToolCallItem): - self.chat_history.append(f"{agent_name}: Calling a tool") - elif isinstance(new_item, ToolCallOutputItem): - self.chat_history.append( - f"{agent_name}: Tool call output: {new_item.output}" - ) - else: - self.chat_history.append( - f"{agent_name}: Skipping item: {new_item.__class__.__name__}" - ) - self.input_items = result.to_input_list() - self.current_agent = result.last_agent - workflow.set_current_details("\n\n".join(self.chat_history)) - return self.chat_history[length:] - - @process_user_message.validator - def validate_process_user_message(self, input: ProcessUserMessageInput) -> None: - if not input.user_input: - raise ValueError("User input cannot be empty.") - if len(input.user_input) > 1000: - raise ValueError("User input is too long. Please limit to 1000 characters.") - if input.chat_length != len(self.chat_history): - raise ValueError("Stale chat history. Please refresh the chat.") - - -@pytest.mark.parametrize("use_local_model", [True, False]) -async def test_customer_service_workflow(client: Client, use_local_model: bool): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - model = customer_service_mock_model() if use_local_model else None - async with AgentEnvironment( - model=model, - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - questions = [ - "Hello", - "Book me a flight to PDX", - "11111", - "Any window seat", - "Take me back to the triage agent to say goodbye", - ] - - async with new_worker( - client, - CustomerServiceWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - CustomerServiceWorkflow.run, - id=f"customer-service-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - history: list[Any] = [] - for q in questions: - message_input = ProcessUserMessageInput( - user_input=q, chat_length=len(history) - ) - new_history = await workflow_handle.execute_update( - CustomerServiceWorkflow.process_user_message, message_input - ) - history.extend(new_history) - print(*new_history, sep="\n") - - await workflow_handle.cancel() - - with pytest.raises(WorkflowFailureError) as err: - await workflow_handle.result() - assert isinstance(err.value.cause, CancelledError) - - if use_local_model: - events = [] - async for e in WorkflowHandle( - client, - workflow_handle.id, - run_id=workflow_handle._first_execution_run_id, - ).fetch_history_events(): - if e.HasField("activity_task_completed_event_attributes"): - events.append(e) - - assert len(events) == 8 - assert ( - "Hi there! How can I assist you today?" - in events[0] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "transfer_to_seat_booking_agent" - in events[1] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Could you please provide your confirmation number?" - in events[2] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Thanks! What seat number would you like to change to?" - in events[3] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "update_seat" - in events[4] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "Your seat has been updated to a window seat. If there's anything else you need, feel free to let me know!" - in events[5] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "transfer_to_triage_agent" - in events[6] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - assert ( - "You're welcome!" - in events[7] - .activity_task_completed_event_attributes.result.payloads[0] - .data.decode() - ) - - -class InputGuardrailModel(OpenAIResponsesModel): - __test__ = False - responses: list[ModelResponse] = [ - ResponseBuilders.output_message("The capital of California is Sacramento."), - ResponseBuilders.output_message("x=3"), - ] - guardrail_responses = [ - ResponseBuilders.output_message( - '{"is_math_homework":false,"reasoning":"The question asked is about the capital of California, which is a geography-related query, not math."}' - ), - ResponseBuilders.output_message( - '{"is_math_homework":true,"reasoning":"The question involves solving an equation for a variable, which is a typical math homework problem."}' - ), - ] - - def __init__( - self, - model: str, - openai_client: AsyncOpenAI, - ) -> None: - super().__init__(model, openai_client) - self._responses = iter(self.responses) - self._guardrail_responses = iter(self.guardrail_responses) - - async def get_response( - self, - system_instructions: str | None, - input: str | list[TResponseInputItem], - model_settings: ModelSettings, - tools: list[Tool], - output_schema: AgentOutputSchemaBase | None, - handoffs: list[Handoff], - tracing: ModelTracing, - previous_response_id: str | None = None, - conversation_id: str | None = None, - prompt: ResponsePromptParam | None = None, - ) -> ModelResponse: - if ( - system_instructions - == "Check if the user is asking you to do their math homework." - ): - return next(self._guardrail_responses) - else: - return next(self._responses) - - -### 1. An agent-based guardrail that is triggered if the user is asking to do math homework -class MathHomeworkOutput(BaseModel): - reasoning: str - is_math_homework: bool - model_config = ConfigDict(extra="forbid") - - -guardrail_agent: Agent = Agent( - name="Guardrail check", - instructions="Check if the user is asking you to do their math homework.", - output_type=MathHomeworkOutput, -) - - -@input_guardrail -async def math_guardrail( - context: RunContextWrapper[None], - agent: Agent, - input: str | list[TResponseInputItem], -) -> GuardrailFunctionOutput: - """This is an input guardrail function, which happens to call an agent to check if the input - is a math homework question. - """ - result = await Runner.run(guardrail_agent, input, context=context.context) - final_output = result.final_output_as(MathHomeworkOutput) - - return GuardrailFunctionOutput( - output_info=final_output, - tripwire_triggered=final_output.is_math_homework, - ) - - -@workflow.defn -class InputGuardrailWorkflow: - @workflow.run - async def run(self, messages: list[str]) -> list[str]: - agent = Agent( - name="Customer support agent", - instructions="You are a customer support agent. You help customers with their questions.", - input_guardrails=[math_guardrail], - ) - - input_data: list[TResponseInputItem] = [] - results: list[str] = [] - - for user_input in messages: - input_data.append( - { - "role": "user", - "content": user_input, - } - ) - - try: - result = await Runner.run(agent, input_data) - results.append(result.final_output) - # If the guardrail didn't trigger, we use the result as the input for the next run - input_data = result.to_input_list() - except InputGuardrailTripwireTriggered: - # If the guardrail triggered, we instead add a refusal message to the input - message = "Sorry, I can't help you with your math homework." - results.append(message) - input_data.append( - { - "role": "assistant", - "content": message, - } - ) - return results - - -@pytest.mark.parametrize("use_local_model", [True, False]) -async def test_input_guardrail(client: Client, use_local_model: bool): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - model = ( - InputGuardrailModel("", openai_client=AsyncOpenAI(api_key="Fake key")) - if use_local_model - else None - ) - async with AgentEnvironment( - model=model, - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - InputGuardrailWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - InputGuardrailWorkflow.run, - [ - "What's the capital of California?", - "Can you help me solve for x: 2x + 5 = 11", - ], - id=f"input-guardrail-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - result = await workflow_handle.result() - - if use_local_model: - assert len(result) == 2 - assert result[0] == "The capital of California is Sacramento." - assert result[1] == "Sorry, I can't help you with your math homework." - - -def output_guardrail_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.output_message( - '{"reasoning":"The phone number\'s area code (650) is associated with a region. However, the exact location is not definitive, but it\'s commonly linked to the San Francisco Peninsula in California, including cities like San Mateo, Palo Alto, and parts of Silicon Valley. It\'s important to note that area codes don\'t always guarantee a specific location due to mobile number portability.","response":"The area code 650 is typically associated with California, particularly the San Francisco Peninsula, including cities like Palo Alto and San Mateo.","user_name":null}' - ) - ] - ) - - -# The agent's output type -class MessageOutput(BaseModel): - reasoning: str = Field( - description="Thoughts on how to respond to the user's message" - ) - response: str = Field(description="The response to the user's message") - user_name: str | None = Field( - description="The name of the user who sent the message, if known" - ) - model_config = ConfigDict(extra="forbid") - - -@output_guardrail -async def sensitive_data_check( - context: RunContextWrapper, agent: Agent, output: MessageOutput -) -> GuardrailFunctionOutput: - phone_number_in_response = "650" in output.response - phone_number_in_reasoning = "650" in output.reasoning - - return GuardrailFunctionOutput( - output_info={ - "phone_number_in_response": phone_number_in_response, - "phone_number_in_reasoning": phone_number_in_reasoning, - }, - tripwire_triggered=phone_number_in_response or phone_number_in_reasoning, - ) - - -output_guardrail_agent = Agent( - name="Assistant", - instructions="You are a helpful assistant.", - output_type=MessageOutput, - output_guardrails=[sensitive_data_check], -) - - -@workflow.defn -class OutputGuardrailWorkflow: - @workflow.run - async def run(self) -> bool: - try: - await Runner.run( - output_guardrail_agent, - "My phone number is 650-123-4567. Where do you think I live?", - ) - return True - except OutputGuardrailTripwireTriggered: - return False - - -@pytest.mark.parametrize("use_local_model", [True, False]) -async def test_output_guardrail(client: Client, use_local_model: bool): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - model = output_guardrail_mock_model() if use_local_model else None - async with AgentEnvironment( - model=model, - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - OutputGuardrailWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - OutputGuardrailWorkflow.run, - id=f"output-guardrail-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - result = await workflow_handle.result() - - if use_local_model: - assert not result - - -def workflow_tool_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.tool_call("{}", "run_tool"), - ResponseBuilders.output_message("Workflow tool was used"), - ] - ) - - -@workflow.defn -class WorkflowToolWorkflow: - @workflow.run - async def run(self) -> None: - agent: Agent = Agent( - name="Assistant", - instructions="You are a helpful assistant.", - tools=[function_tool(self.run_tool)], - ) - await Runner.run( - agent, - "My phone number is 650-123-4567. Where do you think I live?", - ) - - async def run_tool(self): - print("Tool ran with self:", self) - workflow.logger.info("Tool ran with self: %s", self) - return None - - -async def test_workflow_method_tools(client: Client): - async with AgentEnvironment( - model=workflow_tool_mock_model(), - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - WorkflowToolWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - WorkflowToolWorkflow.run, - id=f"workflow-tool-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - await workflow_handle.result() - - -async def test_response_serialization(): - # This should not be used in another test, or this test needs to change to use another unloaded type - from openai.types.responses.response_output_item import LocalShellCall - - data = json.loads( - b'{"id":"", "action":{"command": [],"env": {},"type": "exec"},"call_id":"","status":"completed","type":"local_shell_call"}' - ) - call = TypeAdapter(LocalShellCall).validate_python(data) - model_response = ModelResponse( - output=[ - call, - ], - usage=Usage(), - response_id="", - ) - encoded = await pydantic_data_converter.encode([model_response]) - - -async def assert_status_retry_behavior(status: int, client: Client, should_retry: bool): - def status_error(status: int): - with workflow.unsafe.imports_passed_through(): - with workflow.unsafe.sandbox_unrestricted(): - import httpx - raise APIStatusError( - message="Something went wrong.", - response=httpx.Response( - status_code=status, request=httpx.Request("GET", url="") - ), - body=None, - ) - - async with AgentEnvironment( - model=TestModel(lambda: status_error(status)), - model_params=ModelActivityParameters( - retry_policy=RetryPolicy(maximum_attempts=2), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - HelloWorldAgent, - ) as worker: - workflow_handle = await client.start_workflow( - HelloWorldAgent.run, - "Input", - id=f"workflow-tool-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - with pytest.raises(WorkflowFailureError) as e: - await workflow_handle.result() - - found = False - async for event in workflow_handle.fetch_history_events(): - if event.HasField("activity_task_started_event_attributes"): - found = True - if should_retry: - assert event.activity_task_started_event_attributes.attempt == 2 - else: - assert event.activity_task_started_event_attributes.attempt == 1 - assert found - - -async def test_exception_handling(client: Client): - await assert_status_retry_behavior(408, client, should_retry=True) - await assert_status_retry_behavior(409, client, should_retry=True) - await assert_status_retry_behavior(429, client, should_retry=True) - await assert_status_retry_behavior(500, client, should_retry=True) - - await assert_status_retry_behavior(400, client, should_retry=False) - await assert_status_retry_behavior(403, client, should_retry=False) - await assert_status_retry_behavior(404, client, should_retry=False) - - -class CustomModelProvider(ModelProvider): - def get_model(self, model_name: str | None) -> Model: - client = AsyncOpenAI(base_url="https://api.openai.com/v1") - return OpenAIChatCompletionsModel(model="gpt-4o", openai_client=client) - - -async def test_chat_completions_model(client: Client): - if not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - async with AgentEnvironment( - model_provider=CustomModelProvider(), - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - WorkflowToolWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - WorkflowToolWorkflow.run, - id=f"workflow-tool-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - await workflow_handle.result() - - -class WaitModel(Model): - async def get_response( - self, - system_instructions: str | None, - input: str | list[TResponseInputItem], - model_settings: ModelSettings, - tools: list[Tool], - output_schema: AgentOutputSchemaBase | None, - handoffs: list[Handoff], - tracing: ModelTracing, - **kwargs, - ) -> ModelResponse: - activity.logger.info("Waiting") - await asyncio.sleep(1.0) - activity.logger.info("Returning") - return ResponseBuilders.output_message("test") - - def stream_response( - self, - system_instructions: str | None, - input: str | list[TResponseInputItem], - model_settings: ModelSettings, - tools: list[Tool], - output_schema: AgentOutputSchemaBase | None, - handoffs: list[Handoff], - tracing: ModelTracing, - **kwargs, - ) -> AsyncIterator[TResponseStreamEvent]: - raise NotImplementedError() - - -@workflow.defn -class AlternateModelAgent: - @workflow.run - async def run(self, prompt: str) -> str: - agent = Agent[None]( - name="Assistant", - instructions="You only respond in haikus.", - model="test_model", - ) - result = await Runner.run(starting_agent=agent, input=prompt) - return result.final_output - - -class CheckModelNameProvider(ModelProvider): - def get_model(self, model_name: str | None) -> Model: - assert model_name == "test_model" - return hello_mock_model() - - -async def test_alternative_model(client: Client): - async with AgentEnvironment( - model_provider=CheckModelNameProvider(), - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - AlternateModelAgent, - ) as worker: - workflow_handle = await client.start_workflow( - AlternateModelAgent.run, - "Hello", - id=f"alternative-model-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - await workflow_handle.result() - - -async def test_heartbeat(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: - pytest.skip("Relies on real timing, skip.") - - async with AgentEnvironment( - model=WaitModel(), - model_params=ModelActivityParameters( - heartbeat_timeout=timedelta(seconds=0.5), - ), - ) as agent_env: - client = agent_env.applied_on_client(client) - - async with new_worker( - client, - HelloWorldAgent, - ) as worker: - workflow_handle = await client.start_workflow( - HelloWorldAgent.run, - "Tell me about recursion in programming.", - id=f"workflow-tool-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=5.0), - ) - await workflow_handle.result() - - -def test_summary_extraction(): - input: list[TResponseInputItem] = [ - EasyInputMessageParam( - content="First message", - role="user", - ) - ] - - assert _extract_summary(input) == "First message" - - input.append( - Message( - content=[ - ResponseInputTextParam( - text="Second message", - type="input_text", - ) - ], - role="user", - ) - ) - assert _extract_summary(input) == "Second message" - - input.append( - ResponseFunctionToolCallParam( - arguments="", - call_id="", - name="", - type="function_call", - ) - ) - assert _extract_summary(input) == "Second message" - - -@workflow.defn -class SessionWorkflow: - @workflow.run - async def run(self) -> None: - agent: Agent = Agent( - name="Assistant", - instructions="You are a helpful assistant.", - ) - await Runner.run( - agent, - "My phone number is 650-123-4567. Where do you think I live?", - session=SQLiteSession(session_id="id"), - ) - - -async def test_session(client: Client): - async with AgentEnvironment(model=hello_mock_model()) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - SessionWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - SessionWorkflow.run, - id=f"session-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10.0), - retry_policy=RetryPolicy(maximum_attempts=1), - ) - - async def check(): - async for evt in workflow_handle.fetch_history_events(): - # Sometimes just creating the sqlite session takes too long for a workflow in CI, so check both - if evt.HasField("workflow_task_failed_event_attributes") and ( - "Temporal workflows don't support SQLite sessions" - in evt.workflow_task_failed_event_attributes.failure.message - or "Potential deadlock detected" - in evt.workflow_task_failed_event_attributes.failure.message - ): - return - - await assert_eventually(check) - - -async def test_lite_llm(client: Client, env: WorkflowEnvironment): - if not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - if sys.version_info >= (3, 14): - pytest.skip("Lite LLM does not yet support Python 3.14") - - from agents.extensions.models.litellm_provider import LitellmProvider - - async with AgentEnvironment( - model_provider=LitellmProvider(), - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - ), - ) as agent_env: - client = agent_env.applied_on_client(client) - - async with new_worker( - client, - HelloWorldAgent, - ) as worker: - workflow_handle = await client.start_workflow( - HelloWorldAgent.run, - "Tell me about recursion in programming", - id=f"lite-llm-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - await workflow_handle.result() - - -def file_search_tool_mock_model(): - return TestModel.returning_responses( - [ - ModelResponse( - output=[ - ResponseFileSearchToolCall( - queries=["side character in the Iliad"], - type="file_search_call", - id="id", - status="completed", - results=[ - Result(text="Some scene"), - Result(text="Other scene"), - ], - ), - ResponseBuilders.response_output_message("Patroclus"), - ], - usage=Usage(), - response_id=None, - ), - ] - ) - - -@workflow.defn -class FileSearchToolWorkflow: - @workflow.run - async def run(self, question: str) -> str: - agent = Agent[str]( - name="File Search Workflow", - instructions="You are a librarian. You should use your tools to source all your information.", - tools=[ - FileSearchTool( - max_num_results=3, - vector_store_ids=["vs_687fd7f5e69c8191a2740f06bc9a159d"], - include_search_results=True, - ) - ], - ) - result = await Runner.run(starting_agent=agent, input=question) - - # A file search was performed - assert any( - isinstance(item, ToolCallItem) - and isinstance(item.raw_item, ResponseFileSearchToolCall) - for item in result.new_items - ) - return result.final_output - - -@pytest.mark.parametrize("use_local_model", [True, False]) -async def test_file_search_tool(client: Client, use_local_model): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - model = file_search_tool_mock_model() if use_local_model else None - async with AgentEnvironment( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30) - ), - model=model, - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - FileSearchToolWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - FileSearchToolWorkflow.run, - "Tell me about a side character in the Iliad.", - id=f"file-search-tool-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - result = await workflow_handle.result() - if use_local_model: - assert result == "Patroclus" - - -def image_generation_mock_model(): - return TestModel.returning_responses( - [ - ModelResponse( - output=[ - ImageGenerationCall( - type="image_generation_call", - id="id", - status="completed", - ), - ResponseBuilders.response_output_message("Patroclus"), - ], - usage=Usage(), - response_id=None, - ), - ] - ) - - -@workflow.defn -class ImageGenerationWorkflow: - @workflow.run - async def run(self, question: str) -> str: - agent = Agent[str]( - name="Image Generation Workflow", - instructions="You are a helpful agent.", - tools=[ - ImageGenerationTool( - tool_config={"type": "image_generation", "quality": "low"}, - ) - ], - ) - result = await Runner.run(starting_agent=agent, input=question) - - # An image generation was performed - assert any( - isinstance(item, ToolCallItem) - and isinstance(item.raw_item, ImageGenerationCall) - for item in result.new_items - ) - return result.final_output - - -# Can't currently validate against real server, we aren't verified for image generation -@pytest.mark.parametrize("use_local_model", [True]) -async def test_image_generation_tool(client: Client, use_local_model): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - model = image_generation_mock_model() if use_local_model else None - async with AgentEnvironment( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30) - ), - model=model, - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - ImageGenerationWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - ImageGenerationWorkflow.run, - "Create an image of a frog eating a pizza, comic book style.", - id=f"image-generation-tool-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - result = await workflow_handle.result() - - -def code_interpreter_mock_model(): - return TestModel.returning_responses( - [ - ModelResponse( - output=[ - ResponseCodeInterpreterToolCall( - container_id="", - code="some code", - type="code_interpreter_call", - id="id", - status="completed", - ), - ResponseBuilders.response_output_message("Over 9000"), - ], - usage=Usage(), - response_id=None, - ), - ] - ) - - -@workflow.defn -class CodeInterpreterWorkflow: - @workflow.run - async def run(self, question: str) -> str: - agent = Agent[str]( - name="Code Interpreter Workflow", - instructions="You are a helpful agent.", - tools=[ - CodeInterpreterTool( - tool_config={ - "type": "code_interpreter", - "container": {"type": "auto"}, - }, - ) - ], - ) - result = await Runner.run(starting_agent=agent, input=question) - - assert any( - isinstance(item, ToolCallItem) - and isinstance(item.raw_item, ResponseCodeInterpreterToolCall) - for item in result.new_items - ) - return result.final_output - - -async def test_code_interpreter_tool(client: Client): - async with AgentEnvironment( - model=code_interpreter_mock_model(), - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=60), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - CodeInterpreterWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - CodeInterpreterWorkflow.run, - "What is the square root of273 * 312821 plus 1782?", - id=f"code-interpreter-tool-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=60), - ) - result = await workflow_handle.result() - assert result == "Over 9000" - - -def hosted_mcp_mock_model(): - return TestModel.returning_responses( - [ - ModelResponse( - output=[ - McpApprovalRequest( - arguments="", - name="", - server_label="gitmcp", - type="mcp_approval_request", - id="id", - ) - ], - usage=Usage(), - response_id=None, - ), - ModelResponse( - output=[ - McpCall( - arguments="", - name="", - server_label="", - type="mcp_call", - id="id", - output="Mcp output", - ), - ResponseBuilders.response_output_message("Some language"), - ], - usage=Usage(), - response_id=None, - ), - ] - ) - - -@workflow.defn -class HostedMCPWorkflow: - @workflow.run - async def run(self, question: str) -> str: - requested_approval = False - - def approve(_: MCPToolApprovalRequest) -> MCPToolApprovalFunctionResult: - nonlocal requested_approval - requested_approval = True - return MCPToolApprovalFunctionResult(approve=True) - - agent = Agent[str]( - name="Hosted MCP Workflow", - instructions="You are a helpful agent.", - tools=[ - HostedMCPTool( - tool_config={ - "type": "mcp", - "server_label": "gitmcp", - "server_url": "https://gitmcp.io/openai/codex", - "require_approval": "always", - }, - on_approval_request=approve, - ) - ], - ) - result = await Runner.run(starting_agent=agent, input=question) - assert requested_approval - assert any( - isinstance(item, ToolCallItem) and isinstance(item.raw_item, McpCall) - for item in result.new_items - ) - return result.final_output - - -async def test_hosted_mcp_tool(client: Client): - async with AgentEnvironment( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=120) - ), - model=hosted_mcp_mock_model(), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - HostedMCPWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - HostedMCPWorkflow.run, - "Which language is this repo written in?", - id=f"hosted-mcp-tool-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=120), - ) - result = await workflow_handle.result() - assert result == "Some language" - - -class AssertDifferentModelProvider(ModelProvider): - model_names: set[str | None] - - def __init__(self, model: Model): - self._model = model - self.model_names = set() - - def get_model(self, model_name: str | None) -> Model: - self.model_names.add(model_name) - return self._model - - -def multiple_models_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.tool_call("{}", "transfer_to_underling"), - ResponseBuilders.output_message( - "I'm here to help! Was there a specific task you needed assistance with regarding the storeroom?" - ), - ] - ) - - -@workflow.defn -class MultipleModelWorkflow: - @workflow.run - async def run(self, use_run_config: bool): - underling = Agent[None]( - name="Underling", - instructions="You do all the work you are told.", - ) - - starting_agent = Agent[None]( - name="Lazy Assistant", - model="gpt-4o-mini", - instructions="You delegate all your work to another agent.", - handoffs=[underling], - ) - result = await Runner.run( - starting_agent=starting_agent, - input="Have you cleaned the store room yet?", - run_config=RunConfig(model="gpt-4o") if use_run_config else None, - ) - return result.final_output - - -async def test_multiple_models(client: Client): - provider = AssertDifferentModelProvider(multiple_models_mock_model()) - async with AgentEnvironment( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=120) - ), - model_provider=provider, - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - MultipleModelWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - MultipleModelWorkflow.run, - False, - id=f"multiple-model-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - result = await workflow_handle.result() - assert provider.model_names == {None, "gpt-4o-mini"} - - -async def test_run_config_models(client: Client): - provider = AssertDifferentModelProvider(multiple_models_mock_model()) - async with AgentEnvironment( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=120) - ), - model_provider=provider, - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - MultipleModelWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - MultipleModelWorkflow.run, - True, - id=f"run-config-model-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - result = await workflow_handle.result() - - # Only the model from the runconfig override is used - assert provider.model_names == {"gpt-4o"} - - -async def test_summary_provider(client: Client): - class SummaryProvider(ModelSummaryProvider): - def provide( - self, - agent: Agent[Any] | None, - instructions: str | None, - input: str | list[TResponseInputItem], - ) -> str: - return "My summary" - - async with AgentEnvironment( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=120), - summary_override=SummaryProvider(), - ), - model=hello_mock_model(), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - HelloWorldAgent, - ) as worker: - workflow_handle = await client.start_workflow( - HelloWorldAgent.run, - "Prompt", - id=f"summary-provider-model-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - result = await workflow_handle.result() - async for e in workflow_handle.fetch_history_events(): - if e.HasField("activity_task_scheduled_event_attributes"): - assert e.user_metadata.summary.data == b'"My summary"' - - -class OutputType(pydantic.BaseModel): - answer: str - model_config = ConfigDict(extra="forbid") # Forbid additional properties - - -@workflow.defn -class OutputTypeWorkflow: - @workflow.run - async def run(self) -> OutputType: - agent: Agent = Agent( - name="Assistant", - instructions="You are a helpful assistant, adhere to the json schema output", - output_type=OutputType, - ) - result = await Runner.run( - starting_agent=agent, - input="Hello!", - ) - return result.final_output - - -def output_type_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.output_message( - '{"answer": "My answer"}', - ), - ] - ) - - -async def test_output_type(client: Client): - async with AgentEnvironment( - model=output_type_mock_model(), - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=120), - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - OutputTypeWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - OutputTypeWorkflow.run, - id=f"output-type-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=10), - ) - result = await workflow_handle.result() - assert isinstance(result, OutputType) - assert result.answer == "My answer" - - -@workflow.defn -class McpServerWorkflow: - @workflow.run - async def run(self, caching: bool, factory_argument: Any | None) -> str: - from agents.mcp import MCPServer - - server: MCPServer = openai_agents.workflow.stateless_mcp_server( - "HelloServer", cache_tools_list=caching, factory_argument=factory_argument - ) - agent = Agent[str]( - name="MCP ServerWorkflow", - instructions="Use the tools to assist the customer.", - mcp_servers=[server], - ) - result = await Runner.run( - starting_agent=agent, input="Say hello to Tom and Tim." - ) - return result.final_output - - -@workflow.defn -class McpServerStatefulWorkflow: - @workflow.run - async def run(self, timeout: timedelta, factory_argument: Any | None) -> str: - async with openai_agents.workflow.stateful_mcp_server( - "HelloServer", - config=ActivityConfig( - schedule_to_start_timeout=timeout, - start_to_close_timeout=timedelta(seconds=30), - ), - factory_argument=factory_argument, - ) as server: - agent = Agent[str]( - name="MCP ServerWorkflow", - instructions="Use the tools to assist the customer.", - mcp_servers=[server], - ) - result = await Runner.run( - starting_agent=agent, input="Say hello to Tom and Tim." - ) - return result.final_output - - -def tracking_mcp_mock_model(): - return TestModel.returning_responses( - [ - ResponseBuilders.tool_call( - arguments='{"name":"Tom"}', - name="Say-Hello", - ), - ResponseBuilders.tool_call( - arguments='{"name":"Tim"}', - name="Say-Hello", - ), - ResponseBuilders.output_message("Hi Tom and Tim!"), - ] - ) - - -def get_tracking_server(name: str): - from agents.mcp import MCPServer # type: ignore - from mcp import GetPromptResult, ListPromptsResult # type: ignore - from mcp import Tool as MCPTool # type: ignore - from mcp.types import CallToolResult, TextContent # type: ignore - - class TrackingMCPServer(MCPServer): - calls: list[str] - - def __init__(self, name: str): - self._name = name - self.calls = [] - super().__init__() - - async def connect(self): - self.calls.append("connect") - - @property - def name(self) -> str: - return self._name - - async def cleanup(self): - self.calls.append("cleanup") - - async def list_tools( - self, - run_context: RunContextWrapper[Any] | None = None, - agent: AgentBase | None = None, - ) -> list[MCPTool]: - self.calls.append("list_tools") - return [ - MCPTool( - name="Say-Hello", - inputSchema={ - "type": "object", - "properties": { - "name": {"type": "string"}, - }, - "required": ["name"], - "$schema": "http://json-schema.org/draft-07/schema#", - }, - ) - ] - - async def call_tool( - self, tool_name: str, arguments: dict[str, Any] | None - ) -> CallToolResult: - self.calls.append("call_tool") - name = (arguments or {}).get("name") or "John Doe" - return CallToolResult( - content=[TextContent(type="text", text=f"Hello {name}")] - ) - - async def list_prompts(self) -> ListPromptsResult: - raise NotImplementedError() - - async def get_prompt( - self, name: str, arguments: dict[str, Any] | None = None - ) -> GetPromptResult: - raise NotImplementedError() - - return TrackingMCPServer(name) - - -@pytest.mark.parametrize("use_local_model", [True, False]) -@pytest.mark.parametrize("stateful", [True, False]) -@pytest.mark.parametrize("caching", [True, False]) -async def test_mcp_server( - client: Client, use_local_model: bool, stateful: bool, caching: bool -): - if not use_local_model and not os.environ.get("OPENAI_API_KEY"): - pytest.skip("No openai API key") - - if stateful and caching: - pytest.skip("Caching is only supported for stateless MCP servers") - - from agents.mcp import MCPServer # type: ignore - - from temporalio.contrib.openai_agents import ( - StatefulMCPServerProvider, - StatelessMCPServerProvider, - ) - - tracking_server = get_tracking_server(name="HelloServer") - server: StatefulMCPServerProvider | StatelessMCPServerProvider = ( - StatefulMCPServerProvider("HelloServer", lambda _: tracking_server) - if stateful - else StatelessMCPServerProvider("HelloServer", lambda _: tracking_server) - ) - - model = tracking_mcp_mock_model() if use_local_model else None - async with AgentEnvironment( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=120) - ), - model=model, - mcp_server_providers=[server], - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, McpServerStatefulWorkflow, McpServerWorkflow - ) as worker: - if stateful: - result = await client.execute_workflow( - McpServerStatefulWorkflow.run, - args=[timedelta(seconds=30), None], - id=f"mcp-server-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - else: - result = await client.execute_workflow( - McpServerWorkflow.run, - args=[caching, None], - id=f"mcp-server-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - if use_local_model: - assert result == "Hi Tom and Tim!" - if use_local_model: - print(tracking_server.calls) - if stateful: - assert tracking_server.calls == [ - "connect", - "list_tools", - "call_tool", - "list_tools", - "call_tool", - "list_tools", - "cleanup", - ] - assert len(cast(StatefulMCPServerProvider, server)._servers) == 0 - else: - if caching: - assert tracking_server.calls == [ - "connect", - "list_tools", - "cleanup", - "connect", - "call_tool", - "cleanup", - "connect", - "call_tool", - "cleanup", - ] - else: - assert tracking_server.calls == [ - "connect", - "list_tools", - "cleanup", - "connect", - "call_tool", - "cleanup", - "connect", - "list_tools", - "cleanup", - "connect", - "call_tool", - "cleanup", - "connect", - "list_tools", - "cleanup", - ] - - -@pytest.mark.parametrize("stateful", [True, False]) -async def test_mcp_server_factory_argument(client: Client, stateful: bool): - def factory(args: Any | None) -> MCPServer: - print("Invoking factory: ", args) - if args is not None: - assert args is not None - assert cast(dict[str, str], args).get("user") == "blah" - - return get_tracking_server("HelloServer") - - server: StatefulMCPServerProvider | StatelessMCPServerProvider = ( - StatefulMCPServerProvider("HelloServer", factory) - if stateful - else StatelessMCPServerProvider("HelloServer", factory) - ) - - async with AgentEnvironment( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=120) - ), - model=tracking_mcp_mock_model(), - mcp_server_providers=[server], - ) as env: - client = env.applied_on_client(client) - - headers = {"user": "blah"} - async with new_worker( - client, McpServerStatefulWorkflow, McpServerWorkflow - ) as worker: - if stateful: - result = await client.execute_workflow( - McpServerStatefulWorkflow.run, - args=[timedelta(seconds=30), headers], - id=f"mcp-server-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - else: - result = await client.execute_workflow( - McpServerWorkflow.run, - args=[False, headers], - id=f"mcp-server-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - - -async def test_stateful_mcp_server_no_worker(client: Client): - server = StatefulMCPServerProvider( - "Filesystem-Server", - lambda _: MCPServerStdio( - name="Filesystem-Server", - params={ - "command": "npx", - "args": [ - "-y", - "@modelcontextprotocol/server-filesystem", - os.path.dirname(os.path.abspath(__file__)), - ], - }, - ), - ) - - # Override the connect activity to not actually start a worker - @activity.defn(name="Filesystem-Server-stateful-connect") - async def connect() -> None: - await asyncio.sleep(30) - - def override_get_activities() -> Sequence[Callable]: - return (connect,) - - server.get_activities = override_get_activities # type:ignore - - async with AgentEnvironment( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=120) - ), - model=tracking_mcp_mock_model(), - mcp_server_providers=[server], - ) as env: - client = env.applied_on_client(client) - - async with new_worker( - client, - McpServerStatefulWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - McpServerStatefulWorkflow.run, - args=[timedelta(seconds=1), None], - id=f"mcp-server-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=30), - ) - with pytest.raises(WorkflowFailureError) as err: - await workflow_handle.result() - assert isinstance(err.value.cause, ApplicationError) - assert ( - err.value.cause.message - == "MCP Stateful Server Worker failed to schedule activity." - ) - - -async def test_model_conversion_loops(): - agent = init_agents() - converted = _convert_agent(ModelActivityParameters(), agent, None) - seat_booking_handoff = converted.handoffs[1] - assert isinstance(seat_booking_handoff, Handoff) - context: RunContextWrapper[AirlineAgentContext] = RunContextWrapper( - context=AirlineAgentContext() # type: ignore - ) - seat_booking_agent = await seat_booking_handoff.on_invoke_handoff(context, "") - triage_agent = seat_booking_agent.handoffs[0] - assert isinstance(triage_agent, Agent) - assert isinstance(triage_agent.model, _TemporalModelStub) - seat_booking_agent = await seat_booking_handoff.on_invoke_handoff(context, "") - triage_agent = seat_booking_agent.handoffs[0] - assert isinstance(triage_agent, Agent) - assert isinstance(triage_agent.model, _TemporalModelStub) - seat_booking_agent = await seat_booking_handoff.on_invoke_handoff(context, "") - triage_agent = seat_booking_agent.handoffs[0] - assert isinstance(triage_agent, Agent) - assert isinstance(triage_agent.model, _TemporalModelStub) - - -async def test_local_hello_world_agent(client: Client): - async with AgentEnvironment( - model=hello_mock_model(), - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30), - use_local_activity=True, - ), - ) as env: - client = env.applied_on_client(client) - - async with new_worker(client, HelloWorldAgent) as worker: - handle = await client.start_workflow( - HelloWorldAgent.run, - "Tell me about recursion in programming.", - id=f"hello-workflow-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=5), - ) - result = await handle.result() - assert result == "test" - local_activity_found = False - async for e in handle.fetch_history_events(): - if e.HasField("marker_recorded_event_attributes"): - local_activity_found = True - assert local_activity_found - - -async def test_split_workers(client: Client): - new_config = client.config() - - workflow_plugin = openai_agents.OpenAIAgentsPlugin( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30) - ), - model_provider=TestModelProvider(hello_mock_model()), - register_activities=False, - ) - new_config["plugins"] = [workflow_plugin] - workflow_client = Client(**new_config) - - # Workflow worker - async with new_worker( - workflow_client, HelloWorldAgent, no_remote_activities=True - ) as worker: - activity_plugin = openai_agents.OpenAIAgentsPlugin( - model_params=ModelActivityParameters( - start_to_close_timeout=timedelta(seconds=30) - ), - model_provider=TestModelProvider(hello_mock_model()), - ) - new_config["plugins"] = [activity_plugin] - activity_client = Client(**new_config) - # Activity Worker - async with new_worker( - activity_client, task_queue=worker.task_queue - ) as activity_worker: - result = await activity_client.execute_workflow( - HelloWorldAgent.run, - "Tell me about recursion in programming.", - id=f"hello-workflow-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=120), - ) - assert result == "test" diff --git a/tests/contrib/openai_agents/test_openai_replay.py b/tests/contrib/openai_agents/test_openai_replay.py deleted file mode 100644 index 6db4633925..0000000000 --- a/tests/contrib/openai_agents/test_openai_replay.py +++ /dev/null @@ -1,46 +0,0 @@ -from pathlib import Path - -import pytest - -from temporalio.client import WorkflowHistory -from temporalio.contrib.openai_agents import OpenAIAgentsPlugin -from temporalio.worker import Replayer -from tests.contrib.openai_agents.test_openai import ( - AgentsAsToolsWorkflow, - CustomerServiceWorkflow, - HelloWorldAgent, - InputGuardrailWorkflow, - OutputGuardrailWorkflow, - ResearchWorkflow, - ToolsWorkflow, -) - - -@pytest.mark.parametrize( - "file_name", - [ - "agents-as-tools-workflow-history.json", - "customer-service-workflow-history.json", - "hello-workflow-history.json", - "input-guardrail-workflow-history.json", - "output-guardrail-workflow-history.json", - "research-workflow-history.json", - "tools-workflow-history.json", - ], -) -async def test_replay(file_name: str) -> None: - with (Path(__file__).with_name("histories") / file_name).open("r") as f: - history_json = f.read() - - await Replayer( - workflows=[ - ResearchWorkflow, - ToolsWorkflow, - CustomerServiceWorkflow, - AgentsAsToolsWorkflow, - HelloWorldAgent, - InputGuardrailWorkflow, - OutputGuardrailWorkflow, - ], - plugins=[OpenAIAgentsPlugin()], - ).replay_workflow(WorkflowHistory.from_json("fake", history_json)) diff --git a/tests/contrib/openai_agents/test_openai_tracing.py b/tests/contrib/openai_agents/test_openai_tracing.py deleted file mode 100644 index f0a98c2b61..0000000000 --- a/tests/contrib/openai_agents/test_openai_tracing.py +++ /dev/null @@ -1,144 +0,0 @@ -import uuid -from datetime import timedelta -from typing import Any - -from agents import Span, Trace, TracingProcessor -from agents.tracing import get_trace_provider - -from temporalio.client import Client -from temporalio.contrib.openai_agents.testing import ( - AgentEnvironment, -) -from tests.contrib.openai_agents.test_openai import ( - ResearchWorkflow, - research_mock_model, -) -from tests.helpers import new_worker - - -class MemoryTracingProcessor(TracingProcessor): - # True for start events, false for end - trace_events: list[tuple[Trace, bool]] = [] - span_events: list[tuple[Span, bool]] = [] - - def on_trace_start(self, trace: Trace) -> None: - self.trace_events.append((trace, True)) - - def on_trace_end(self, trace: Trace) -> None: - self.trace_events.append((trace, False)) - - def on_span_start(self, span: Span[Any]) -> None: - self.span_events.append((span, True)) - - def on_span_end(self, span: Span[Any]) -> None: - self.span_events.append((span, False)) - - def shutdown(self) -> None: - pass - - def force_flush(self) -> None: - pass - - -async def test_tracing(client: Client): - async with AgentEnvironment(model=research_mock_model()) as env: - client = env.applied_on_client(client) - - provider = get_trace_provider() - - processor = MemoryTracingProcessor() - provider.set_processors([processor]) - - async with new_worker( - client, - ResearchWorkflow, - ) as worker: - workflow_handle = await client.start_workflow( - ResearchWorkflow.run, - "Caribbean vacation spots in April, optimizing for surfing, hiking and water sports", - id=f"research-workflow-{uuid.uuid4()}", - task_queue=worker.task_queue, - execution_timeout=timedelta(seconds=120), - ) - result = await workflow_handle.result() - - # There is one closed root trace - assert len(processor.trace_events) == 2 - assert ( - processor.trace_events[0][0].trace_id - == processor.trace_events[1][0].trace_id - ) - assert processor.trace_events[0][1] - assert not processor.trace_events[1][1] - - def paired_span(a: tuple[Span[Any], bool], b: tuple[Span[Any], bool]) -> None: - assert a[0].trace_id == b[0].trace_id - assert a[1] - assert not b[1] - - # Initial planner spans - There are only 3 because we don't make an actual model call - paired_span(processor.span_events[0], processor.span_events[5]) - assert ( - processor.span_events[0][0].span_data.export().get("name") == "PlannerAgent" - ) - - paired_span(processor.span_events[1], processor.span_events[4]) - assert ( - processor.span_events[1][0].span_data.export().get("name") - == "temporal:startActivity" - ) - - paired_span(processor.span_events[2], processor.span_events[3]) - assert ( - processor.span_events[2][0].span_data.export().get("name") - == "temporal:executeActivity" - ) - - for span, start in processor.span_events[6:-6]: - span_data = span.span_data.export() - - # All spans should be closed - if start: - assert any( - span.span_id == s.span_id and not s_start - for (s, s_start) in processor.span_events - ) - - # Start activity is always parented to an agent - if span_data.get("name") == "temporal:startActivity": - parents = [ - s for (s, _) in processor.span_events if s.span_id == span.parent_id - ] - assert ( - len(parents) == 2 - and parents[0].span_data.export()["type"] == "agent" - ) - - # Execute is parented to start - if span_data.get("name") == "temporal:executeActivity": - parents = [ - s for (s, _) in processor.span_events if s.span_id == span.parent_id - ] - assert ( - len(parents) == 2 - and parents[0].span_data.export()["name"] - == "temporal:startActivity" - ) - - # Final writer spans - There are only 3 because we don't make an actual model call - paired_span(processor.span_events[-6], processor.span_events[-1]) - assert ( - processor.span_events[-6][0].span_data.export().get("name") == "WriterAgent" - ) - - paired_span(processor.span_events[-5], processor.span_events[-2]) - assert ( - processor.span_events[-5][0].span_data.export().get("name") - == "temporal:startActivity" - ) - - paired_span(processor.span_events[-4], processor.span_events[-3]) - assert ( - processor.span_events[-4][0].span_data.export().get("name") - == "temporal:executeActivity" - ) diff --git a/tests/contrib/opentelemetry/test_logger_provider.py b/tests/contrib/opentelemetry/test_logger_provider.py new file mode 100644 index 0000000000..400802a17f --- /dev/null +++ b/tests/contrib/opentelemetry/test_logger_provider.py @@ -0,0 +1,247 @@ +"""Unit tests for ReplaySafeLoggerProvider.""" + +from collections.abc import Iterator, Mapping +from contextlib import contextmanager +from typing import Any +from unittest.mock import patch + +import pytest +from opentelemetry._logs import ( + Logger, + LoggerProvider, + LogRecord, + NoOpLogger, + NoOpLoggerProvider, +) +from opentelemetry.sdk._logs import LoggerProvider as SdkLoggerProvider +from opentelemetry.sdk._logs.export import ( + InMemoryLogRecordExporter, + SimpleLogRecordProcessor, +) + +from temporalio import workflow +from temporalio.contrib.opentelemetry import ReplaySafeLoggerProvider + + +def _sdk_provider() -> tuple[ReplaySafeLoggerProvider, InMemoryLogRecordExporter]: + exporter = InMemoryLogRecordExporter() + inner = SdkLoggerProvider() + inner.add_log_record_processor(SimpleLogRecordProcessor(exporter)) + return ReplaySafeLoggerProvider(inner), exporter + + +def test_replay_safe_logger_provider_emit_passes_through_outside_workflow(): + provider, exporter = _sdk_provider() + logger = provider.get_logger("test-logger") + + logger.emit(LogRecord(event_name="record-form", body="hello")) + logger.emit(event_name="kwargs-form", body="world", attributes={"attr": "val"}) + + records = [log.log_record for log in exporter.get_finished_logs()] + assert [(r.event_name, r.body) for r in records] == [ + ("record-form", "hello"), + ("kwargs-form", "world"), + ] + assert records[1].attributes and dict(records[1].attributes) == {"attr": "val"} + + +@pytest.mark.parametrize( + "attributes", + [None, {"attr": "val"}, {"nested": {"values": [1, b"bytes", None]}}], +) +def test_replay_safe_logger_provider_delegates_get_logger_arguments( + attributes: Mapping[str, Any] | None, +): + class RecordingLoggerProvider(LoggerProvider): + def __init__(self) -> None: + self.calls: list[tuple] = [] + self._inner = SdkLoggerProvider() + + def get_logger( + self, + name: str, + version: str | None = None, + schema_url: str | None = None, + attributes: Mapping[str, Any] | None = None, + ) -> Logger: + self.calls.append((name, version, schema_url, attributes)) + return self._inner.get_logger(name, version, schema_url, attributes) + + inner_provider = RecordingLoggerProvider() + provider = ReplaySafeLoggerProvider(inner_provider) + provider.get_logger( + "test-logger", + version="1.2.3", + schema_url="https://example.com/schema", + attributes=attributes, + ) + + assert inner_provider.calls == [ + ("test-logger", "1.2.3", "https://example.com/schema", attributes) + ] + + +def test_replay_safe_logger_provider_supports_older_otel_signatures(): + """Newer opentelemetry-api parameters (emit keyword fields, 1.38) must + only be forwarded when the caller passes them, so loggers with older + signatures keep working.""" + + class Pre138Logger(NoOpLogger): + def __init__(self) -> None: + super().__init__("pre-1.38-logger") + self.records: list[LogRecord] = [] + + def emit(self, record: LogRecord) -> None: # type: ignore[override] + self.records.append(record) + + class Pre138LoggerProvider(NoOpLoggerProvider): + def __init__(self) -> None: + self.logger = Pre138Logger() + self.get_logger_calls: list[tuple[str, str | None, str | None, object]] = [] + + def get_logger( # type: ignore[override] + self, + name: str, + version: str | None = None, + schema_url: str | None = None, + attributes: object = None, + ) -> Logger: + self.get_logger_calls.append((name, version, schema_url, attributes)) + return self.logger + + inner_provider = Pre138LoggerProvider() + provider = ReplaySafeLoggerProvider(inner_provider) + record = LogRecord(event_name="event", body="hello") + provider.get_logger("test-logger").emit(record) + + assert inner_provider.get_logger_calls == [("test-logger", None, None, None)] + assert inner_provider.logger.records == [record] + + +@contextmanager +def _workflow_replay_state(*, replaying_history_events: bool) -> Iterator[None]: + """Simulate workflow context during replay. When replaying_history_events + is False this is the query/update-validator state: is_replaying() is True + but is_replaying_history_events() is False.""" + with ( + patch.object(workflow, "in_workflow", return_value=True), + patch.object(workflow.unsafe, "is_replaying", return_value=True), + patch.object( + workflow.unsafe, + "is_replaying_history_events", + return_value=replaying_history_events, + ), + ): + yield + + +def test_replay_safe_logger_provider_drops_emissions_replaying_history_events(): + provider, exporter = _sdk_provider() + logger = provider.get_logger("test-logger") + + with _workflow_replay_state(replaying_history_events=True): + logger.emit(LogRecord(event_name="replayed", body="dropped")) + + assert not exporter.get_finished_logs() + + +def test_replay_safe_logger_provider_emits_from_live_operations_during_replay(): + """Queries and update validators execute at most once per request even + when the workflow is replaying, so the gate must use + is_replaying_history_events(), not is_replaying(), and keep their + emissions.""" + provider, exporter = _sdk_provider() + logger = provider.get_logger("test-logger") + + with _workflow_replay_state(replaying_history_events=False): + logger.emit(LogRecord(event_name="live-query", body="kept")) + + records = [log.log_record for log in exporter.get_finished_logs()] + assert [(r.event_name, r.body) for r in records] == [("live-query", "kept")] + + +class _EnabledLogger(NoOpLogger): + def __init__(self) -> None: + super().__init__("enabled-logger") + self.enabled_calls: list[dict[str, Any]] = [] + + def enabled(self, **kwargs: Any) -> bool: + self.enabled_calls.append(kwargs) + return True + + +class _EnabledLoggerProvider(NoOpLoggerProvider): + def __init__(self) -> None: + self.logger = _EnabledLogger() + + def get_logger(self, *args: Any, **kwargs: Any) -> Logger: # type: ignore[override] + return self.logger + + +def test_replay_safe_logger_provider_delegates_enabled_outside_workflow(): + inner_provider = _EnabledLoggerProvider() + logger: Any = ReplaySafeLoggerProvider(inner_provider).get_logger("test-logger") + + assert logger.enabled(event_name="event") + assert inner_provider.logger.enabled_calls == [{"event_name": "event"}] + + +def test_replay_safe_logger_provider_disabled_replaying_history_events(): + """Callers that check enabled() before building a record must skip it + during replay, since emit() would drop it.""" + inner_provider = _EnabledLoggerProvider() + logger: Any = ReplaySafeLoggerProvider(inner_provider).get_logger("test-logger") + + with _workflow_replay_state(replaying_history_events=True): + assert not logger.enabled(event_name="event") + assert not inner_provider.logger.enabled_calls + + +def test_replay_safe_logger_provider_enabled_for_live_operations_during_replay(): + inner_provider = _EnabledLoggerProvider() + logger: Any = ReplaySafeLoggerProvider(inner_provider).get_logger("test-logger") + + with _workflow_replay_state(replaying_history_events=False): + assert logger.enabled(event_name="live-query") + assert inner_provider.logger.enabled_calls == [{"event_name": "live-query"}] + + +def test_replay_safe_logger_provider_enabled_without_inner_enabled(): + """Loggers from opentelemetry-api before 1.45 have no enabled(), so + callers that probe for it must not get an AttributeError.""" + + class LoggerWithoutEnabled: + def emit(self, *_args: Any, **_kwargs: Any) -> None: + pass + + class LoggerWithoutEnabledProvider(NoOpLoggerProvider): + def get_logger(self, *args: Any, **kwargs: Any) -> Any: # type: ignore[override] + return LoggerWithoutEnabled() + + logger: Any = ReplaySafeLoggerProvider(LoggerWithoutEnabledProvider()).get_logger( + "test-logger" + ) + + assert logger.enabled() + with _workflow_replay_state(replaying_history_events=True): + assert not logger.enabled() + + +def test_replay_safe_logger_provider_delegates_other_attributes(): + provider, _ = _sdk_provider() + assert provider.force_flush() + provider.shutdown() + + +def test_replay_safe_logger_provider_delegates_other_logger_attributes(): + class AttributedLogger(NoOpLogger): + def __init__(self) -> None: + super().__init__("attributed-logger") + self.custom = "custom-value" + + class AttributedLoggerProvider(NoOpLoggerProvider): + def get_logger(self, *args: Any, **kwargs: Any) -> Logger: # type: ignore[override] + return AttributedLogger() + + logger = ReplaySafeLoggerProvider(AttributedLoggerProvider()).get_logger("test") + assert logger.custom == "custom-value" # type: ignore[attr-defined] diff --git a/tests/contrib/opentelemetry/test_meter_provider.py b/tests/contrib/opentelemetry/test_meter_provider.py new file mode 100644 index 0000000000..3cefbc6e2b --- /dev/null +++ b/tests/contrib/opentelemetry/test_meter_provider.py @@ -0,0 +1,371 @@ +"""Tests for ReplaySafeMeterProvider.""" + +import uuid +from collections.abc import Iterable, Iterator +from contextlib import contextmanager +from unittest.mock import patch + +import opentelemetry.metrics +import pytest +from opentelemetry.context import Context +from opentelemetry.metrics import ( + CallbackOptions, + Counter, + Histogram, + Meter, + MeterProvider, + NoOpMeter, + NoOpMeterProvider, + Observation, +) +from opentelemetry.sdk.metrics import MeterProvider as SdkMeterProvider +from opentelemetry.sdk.metrics.export import InMemoryMetricReader +from opentelemetry.util.types import Attributes + +from temporalio import workflow +from temporalio.api.enums.v1 import EventType +from temporalio.client import Client +from temporalio.contrib.opentelemetry import ReplaySafeMeterProvider +from temporalio.worker import UnsandboxedWorkflowRunner +from tests.helpers import assert_eventually, new_worker + + +def _metric_data_points(reader: InMemoryMetricReader) -> dict[str, list]: + points: dict[str, list] = {} + data = reader.get_metrics_data() + if data is None: + return points + for rm in data.resource_metrics: + for sm in rm.scope_metrics: + for metric in sm.metrics: + points.setdefault(metric.name, []).extend(metric.data.data_points) + return points + + +def test_replay_safe_meter_provider_sync_instruments_pass_through_outside_workflow(): + reader = InMemoryMetricReader() + provider = ReplaySafeMeterProvider(SdkMeterProvider(metric_readers=[reader])) + meter = provider.get_meter("test-meter") + + meter.create_counter("counter").add(2, {"attr": "val"}) + meter.create_up_down_counter("up_down_counter").add(-3) + meter.create_histogram("histogram").record(4) + meter.create_gauge("gauge").set(5) + + points = _metric_data_points(reader) + assert points["counter"][0].value == 2 + assert dict(points["counter"][0].attributes) == {"attr": "val"} + assert points["up_down_counter"][0].value == -3 + assert points["histogram"][0].count == 1 + assert points["histogram"][0].sum == 4 + assert points["gauge"][0].value == 5 + + +def test_replay_safe_meter_provider_observable_instruments_pass_through(): + def callback(options: CallbackOptions) -> Iterable[Observation]: # type: ignore[reportUnusedParameter] + return [Observation(10)] + + reader = InMemoryMetricReader() + provider = ReplaySafeMeterProvider(SdkMeterProvider(metric_readers=[reader])) + meter = provider.get_meter("test-meter") + + meter.create_observable_counter("observable_counter", callbacks=[callback]) + meter.create_observable_gauge("observable_gauge", callbacks=[callback]) + meter.create_observable_up_down_counter( + "observable_up_down_counter", callbacks=[callback] + ) + + points = _metric_data_points(reader) + assert points["observable_counter"][0].value == 10 + assert points["observable_gauge"][0].value == 10 + assert points["observable_up_down_counter"][0].value == 10 + + +def test_replay_safe_meter_provider_delegates_get_meter_arguments(): + class RecordingMeterProvider(MeterProvider): + def __init__(self) -> None: + self.calls: list[tuple] = [] + self._inner = SdkMeterProvider() + + def get_meter( + self, + name: str, + version: str | None = None, + schema_url: str | None = None, + attributes: Attributes | None = None, + ) -> Meter: + self.calls.append((name, version, schema_url, attributes)) + return self._inner.get_meter(name, version, schema_url, attributes) + + inner_provider = RecordingMeterProvider() + provider = ReplaySafeMeterProvider(inner_provider) + meter = provider.get_meter( + "test-meter", + version="1.2.3", + schema_url="https://example.com/schema", + attributes={"attr": "val"}, + ) + + assert inner_provider.calls == [ + ("test-meter", "1.2.3", "https://example.com/schema", {"attr": "val"}) + ] + assert meter.name == "test-meter" + assert meter.version == "1.2.3" + assert meter.schema_url == "https://example.com/schema" + + +def test_replay_safe_meter_provider_supports_older_otel_signatures(): + """Newer opentelemetry-api parameters (sync instrument context, 1.28; + create_histogram explicit_bucket_boundaries_advisory, 1.30) must only be + forwarded when set, so providers with older signatures keep working.""" + + class Pre128Counter(Counter): + def __init__(self) -> None: + self.calls: list[tuple[int | float, Attributes | None]] = [] + + def add( # type: ignore[override] + self, + amount: int | float, + attributes: Attributes | None = None, + ) -> None: + self.calls.append((amount, attributes)) + + class Pre130Meter(NoOpMeter): + def __init__(self) -> None: + super().__init__("pre-1.30-meter") + self.counter = Pre128Counter() + self.histogram_calls: list[tuple[str, str, str]] = [] + + def create_counter( # type: ignore[override] + self, + name: str, + unit: str = "", + description: str = "", + ) -> Counter: + return self.counter + + def create_histogram( # type: ignore[override] + self, + name: str, + unit: str = "", + description: str = "", + ) -> Histogram: + self.histogram_calls.append((name, unit, description)) + return super().create_histogram(name, unit, description) + + class Pre128MeterProvider(NoOpMeterProvider): + def __init__(self) -> None: + self.meter = Pre130Meter() + self.get_meter_calls: list[ + tuple[str, str | None, str | None, Attributes | None] + ] = [] + + def get_meter( # type: ignore[override] + self, + name: str, + version: str | None = None, + schema_url: str | None = None, + attributes: Attributes | None = None, + ) -> Meter: + self.get_meter_calls.append((name, version, schema_url, attributes)) + return self.meter + + inner_provider = Pre128MeterProvider() + provider = ReplaySafeMeterProvider(inner_provider) + meter = provider.get_meter("test-meter") + meter.create_histogram("histogram").record(1) + meter.create_counter("counter").add(2, {"attr": "val"}) + + assert inner_provider.get_meter_calls == [("test-meter", None, None, None)] + assert inner_provider.meter.histogram_calls == [("histogram", "", "")] + assert inner_provider.meter.counter.calls == [(2, {"attr": "val"})] + + +def test_replay_safe_meter_provider_forwards_context_when_set(): + class RecordingCounter(Counter): + def __init__(self) -> None: + self.calls: list[tuple[int | float, Attributes | None, Context | None]] = [] + + def add( + self, + amount: int | float, + attributes: Attributes | None = None, + context: Context | None = None, + ) -> None: + self.calls.append((amount, attributes, context)) + + class RecordingMeter(NoOpMeter): + def __init__(self) -> None: + super().__init__("recording-meter") + self.counter = RecordingCounter() + + def create_counter( # type: ignore[override] + self, + name: str, + unit: str = "", + description: str = "", + ) -> Counter: + return self.counter + + class RecordingProvider(NoOpMeterProvider): + def __init__(self) -> None: + self.meter = RecordingMeter() + + def get_meter( # type: ignore[override] + self, + name: str, + version: str | None = None, + schema_url: str | None = None, + attributes: Attributes | None = None, + ) -> Meter: + return self.meter + + inner_provider = RecordingProvider() + provider = ReplaySafeMeterProvider(inner_provider) + context = Context() + provider.get_meter("test-meter").create_counter("counter").add( + 3, {"attr": "val"}, context + ) + + assert inner_provider.meter.counter.calls == [(3, {"attr": "val"}, context)] + + +def test_replay_safe_meter_provider_delegates_other_attributes(): + inner_provider = SdkMeterProvider() + provider = ReplaySafeMeterProvider(inner_provider) + assert provider.force_flush() + provider.shutdown() + + +@contextmanager +def _workflow_replay_state(*, replaying_history_events: bool) -> Iterator[None]: + """Simulate workflow context during replay. When replaying_history_events + is False this is the query/update-validator state: is_replaying() is True + but is_replaying_history_events() is False.""" + with ( + patch.object(workflow, "in_workflow", return_value=True), + patch.object(workflow.unsafe, "is_replaying", return_value=True), + patch.object( + workflow.unsafe, + "is_replaying_history_events", + return_value=replaying_history_events, + ), + ): + yield + + +def test_replay_safe_meter_provider_drops_recordings_replaying_history_events(): + reader = InMemoryMetricReader() + provider = ReplaySafeMeterProvider(SdkMeterProvider(metric_readers=[reader])) + counter = provider.get_meter("test-meter").create_counter("counter") + + with _workflow_replay_state(replaying_history_events=True): + counter.add(1) + + assert not _metric_data_points(reader).get("counter") + + +def test_replay_safe_meter_provider_records_from_live_operations_during_replay(): + """Queries and update validators execute at most once per request even + when the workflow is replaying, so the gate must use + is_replaying_history_events(), not is_replaying(), and keep their + recordings.""" + reader = InMemoryMetricReader() + provider = ReplaySafeMeterProvider(SdkMeterProvider(metric_readers=[reader])) + counter = provider.get_meter("test-meter").create_counter("counter") + + with _workflow_replay_state(replaying_history_events=False): + counter.add(1) + + assert _metric_data_points(reader)["counter"][0].value == 1 + + +@workflow.defn +class QueryDuringReplayWorkflow: + def __init__(self) -> None: + self._proceed = False + + @workflow.run + async def run(self) -> None: + opentelemetry.metrics.get_meter("replay-query-meter").create_counter( + "run_counter" + ).add(1) + await workflow.wait_condition(lambda: self._proceed) + + @workflow.signal + def proceed(self) -> None: + self._proceed = True + + @workflow.query + def query_and_record(self) -> bool: + opentelemetry.metrics.get_meter("replay-query-meter").create_counter( + "query_counter" + ).add(1) + return workflow.unsafe.is_replaying() + + +async def test_replay_safe_meter_provider_records_query_during_replay( + client: Client, + reset_otel_meter_provider, # type: ignore[reportUnusedParameter] +): + """End-to-end check of the replay predicate: with the workflow cache + disabled, a query forces a full history replay before its handler runs. + The replayed run() recording must be dropped while the query handler's + recording -- live, once per request -- must be kept.""" + reader = InMemoryMetricReader() + provider = ReplaySafeMeterProvider(SdkMeterProvider(metric_readers=[reader])) + opentelemetry.metrics.set_meter_provider(provider) + assert opentelemetry.metrics.get_meter_provider() is provider + + async with new_worker( + client, + QueryDuringReplayWorkflow, + # No cache, so the query task must replay history from scratch. + max_cached_workflows=0, + # Unsandboxed, so workflow code sees this process's global provider. + workflow_runner=UnsandboxedWorkflowRunner(), + ) as worker: + handle = await client.start_workflow( + QueryDuringReplayWorkflow.run, + id=f"query-during-replay-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Query only after the first workflow task completes: the live run() + # recording then exists and the evicted workflow must replay it. + async def first_workflow_task_completed() -> None: + history = await handle.fetch_history() + assert any( + event.event_type == EventType.EVENT_TYPE_WORKFLOW_TASK_COMPLETED + for event in history.events + ) + + await assert_eventually(first_workflow_task_completed) + + was_replaying = await handle.query(QueryDuringReplayWorkflow.query_and_record) + # Pins that the disputed condition was exercised: the handler ran with + # is_replaying() True, and its recording was still kept below. + assert was_replaying + + await handle.signal(QueryDuringReplayWorkflow.proceed) + await handle.result() + history = await handle.fetch_history() + + if any( + event.event_type + in ( + EventType.EVENT_TYPE_WORKFLOW_TASK_FAILED, + EventType.EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT, + ) + for event in history.events + ): + pytest.skip( + "Workflow task retried during the live run; exact telemetry " + "counts require a retry-free history" + ) + + points = _metric_data_points(reader) + # Live run recorded once; the query task's replay of run() was dropped. + assert points["run_counter"][0].value == 1 + # The query handler's recording during that replay was kept. + assert points["query_counter"][0].value == 1 diff --git a/tests/contrib/opentelemetry/test_metrics_exporter.py b/tests/contrib/opentelemetry/test_metrics_exporter.py new file mode 100644 index 0000000000..0f228216a5 --- /dev/null +++ b/tests/contrib/opentelemetry/test_metrics_exporter.py @@ -0,0 +1,240 @@ +from __future__ import annotations + +import asyncio +from typing import Any + +import pytest +from opentelemetry.sdk.metrics import MeterProvider +from opentelemetry.sdk.metrics.export import InMemoryMetricReader + +from temporalio.contrib.opentelemetry import MetricsExporter +from temporalio.runtime import MetricBuffer, Runtime, TelemetryConfig + + +def _make_runtime_and_exporter( + **telemetry_kwargs: Any, +) -> tuple[Runtime, MetricBuffer, MeterProvider, InMemoryMetricReader, MetricsExporter]: + buffer = MetricBuffer(10_000) + runtime = Runtime( + telemetry=TelemetryConfig( + metrics=buffer, attach_service_name=False, **telemetry_kwargs + ) + ) + reader = InMemoryMetricReader() + meter_provider = MeterProvider(metric_readers=[reader]) + exporter = MetricsExporter(buffer, meter_provider) + return runtime, buffer, meter_provider, reader, exporter + + +def _collect_metrics_by_name(reader: InMemoryMetricReader) -> dict[str, Any]: + data = reader.get_metrics_data() + result: dict[str, Any] = {} + if not data: + return result + for resource_metrics in data.resource_metrics: + for scope_metrics in resource_metrics.scope_metrics: + for metric in scope_metrics.metrics: + result[metric.name] = metric + return result + + +async def test_metrics_exporter_counter(): + runtime, _, _, reader, exporter = _make_runtime_and_exporter() + + counter = runtime.metric_meter.create_counter( + "my-counter", "my-counter-desc", "my-counter-unit" + ) + counter.add(100) + counter.with_additional_attributes({"foo": "bar"}).add(200) + + exporter._drain_once() + + metrics = _collect_metrics_by_name(reader) + assert "my-counter" in metrics + metric = metrics["my-counter"] + assert metric.description == "my-counter-desc" + assert metric.unit == "my-counter-unit" + points = { + tuple(sorted(p.attributes.items())): p.value for p in metric.data.data_points + } + assert points[()] == 100 + assert points[(("foo", "bar"),)] == 200 + + # Draining again with no new adds should not change values (counters + # accumulate deltas across drains, not reset). + exporter._drain_once() + metrics = _collect_metrics_by_name(reader) + points = { + tuple(sorted(p.attributes.items())): p.value + for p in metrics["my-counter"].data.data_points + } + assert points[()] == 100 + assert points[(("foo", "bar"),)] == 200 + + # More adds accumulate on top. + counter.add(50) + exporter._drain_once() + metrics = _collect_metrics_by_name(reader) + points = { + tuple(sorted(p.attributes.items())): p.value + for p in metrics["my-counter"].data.data_points + } + assert points[()] == 150 + + +async def test_metrics_exporter_gauge_reflects_latest_value(): + runtime, _, _, reader, exporter = _make_runtime_and_exporter() + + gauge = runtime.metric_meter.create_gauge_float("my-gauge") + gauge.set(1.5) + exporter._drain_once() + + metrics = _collect_metrics_by_name(reader) + points = list(metrics["my-gauge"].data.data_points) + assert len(points) == 1 + assert points[0].value == 1.5 + + # Setting a new value should replace, not add to, the prior one. + gauge.set(9.5) + exporter._drain_once() + metrics = _collect_metrics_by_name(reader) + points = list(metrics["my-gauge"].data.data_points) + assert len(points) == 1 + assert points[0].value == 9.5 + + +async def test_metrics_exporter_histogram(): + runtime, _, _, reader, exporter = _make_runtime_and_exporter() + + histogram = runtime.metric_meter.create_histogram_float("my-histogram") + histogram.record(1.0) + histogram.record(2.0) + histogram.record(3.0) + exporter._drain_once() + + metrics = _collect_metrics_by_name(reader) + points = list(metrics["my-histogram"].data.data_points) + assert len(points) == 1 + assert points[0].count == 3 + assert points[0].sum == 6.0 + + +async def test_metrics_exporter_attributes_passthrough(): + runtime, _, _, reader, exporter = _make_runtime_and_exporter() + + counter = runtime.metric_meter.create_counter("attrs-counter") + counter.with_additional_attributes({"foo": "bar", "baz": 123}).add(1) + exporter._drain_once() + + metrics = _collect_metrics_by_name(reader) + points = list(metrics["attrs-counter"].data.data_points) + assert len(points) == 1 + assert dict(points[0].attributes) == {"foo": "bar", "baz": 123} + + +async def test_metrics_exporter_instruments_created_per_call(): + runtime, _, _, reader, exporter = _make_runtime_and_exporter() + + # Like an activity that creates its instruments on each call: each call + # brings new metric and attribute objects, and a cache keyed by id() that + # doesn't hold them would see their ids reused. + calls = [("model-a", 100, 900), ("model-b", 7, 40), ("model-c", 55, 300)] + for model, tokens, latency_ms in calls: + meter = runtime.metric_meter.with_additional_attributes({"model": model}) + meter.create_counter("tokens").add(tokens) + meter.create_histogram("latency").record(latency_ms) + meter.create_gauge("last-tokens").set(tokens) + exporter._drain_once() + + metrics = _collect_metrics_by_name(reader) + tokens_by_model = {model: tokens for model, tokens, _ in calls} + assert { + p.attributes["model"]: p.value for p in metrics["tokens"].data.data_points + } == tokens_by_model + assert { + p.attributes["model"]: p.value for p in metrics["last-tokens"].data.data_points + } == tokens_by_model + assert { + p.attributes["model"]: (p.count, p.sum) + for p in metrics["latency"].data.data_points + } == {model: (1, latency_ms) for model, _, latency_ms in calls} + + +async def test_metrics_exporter_buffer_not_attached_raises(): + unattached_buffer = MetricBuffer(10_000) + reader = InMemoryMetricReader() + meter_provider = MeterProvider(metric_readers=[reader]) + exporter = MetricsExporter(unattached_buffer, meter_provider) + + with pytest.raises(RuntimeError): + exporter._drain_once() + + with pytest.raises(RuntimeError): + await exporter.run() + + +async def test_metrics_exporter_run_shutdown_lifecycle(): + from datetime import timedelta + + runtime, _, _, reader, exporter = _make_runtime_and_exporter() + exporter._poll_interval = timedelta(milliseconds=10) + + counter = runtime.metric_meter.create_counter("lifecycle-counter") + + async with exporter: + counter.add(42) + # Give the background poller a couple of cycles to drain. + await asyncio.sleep(0.2) + + metrics = _collect_metrics_by_name(reader) + points = list(metrics["lifecycle-counter"].data.data_points) + assert points[0].value == 42 + + # After exit, the background task must actually be done (not leaked). + assert exporter._run_task is not None + assert exporter._run_task.done() + + +async def test_metrics_exporter_shutdown_before_run_starts_does_not_hang(): + # __aenter__ only schedules run() via ensure_future; it doesn't run it. + # If the `async with` body never suspends, __aexit__ can call shutdown() + # (setting the shutdown event) before the run() task has executed at + # all. run() must still notice that pending shutdown on its first loop + # check instead of clearing the event and polling forever. + _, _, _, _, exporter = _make_runtime_and_exporter() + + async def enter_and_exit_immediately() -> None: + async with exporter: + pass + + await asyncio.wait_for(enter_and_exit_immediately(), timeout=5) + + assert exporter._run_task is not None + assert exporter._run_task.done() + + +async def test_metrics_exporter_error_in_one_update_does_not_block_others(): + runtime, _, _, reader, exporter = _make_runtime_and_exporter() + + good_counter = runtime.metric_meter.create_counter("good-counter") + bad_counter = runtime.metric_meter.create_counter("bad-counter") + good_counter.add(1) + bad_counter.add(1) + + errors: list[Exception] = [] + exporter._on_error = errors.append + + original_apply_update = exporter._apply_update + + def flaky_apply_update(update: Any) -> None: + if update.metric.name == "bad-counter": + raise ValueError("simulated failure applying bad-counter") + original_apply_update(update) + + exporter._apply_update = flaky_apply_update # type: ignore[method-assign] + exporter._drain_once() + + assert len(errors) == 1 + metrics = _collect_metrics_by_name(reader) + assert "good-counter" in metrics + assert "bad-counter" not in metrics diff --git a/tests/contrib/test_opentelemetry.py b/tests/contrib/opentelemetry/test_opentelemetry.py similarity index 69% rename from tests/contrib/test_opentelemetry.py rename to tests/contrib/opentelemetry/test_opentelemetry.py index c85cf1d1fd..88fd2b4a7a 100644 --- a/tests/contrib/test_opentelemetry.py +++ b/tests/contrib/opentelemetry/test_opentelemetry.py @@ -1,20 +1,22 @@ from __future__ import annotations import asyncio +import contextvars import gc import logging import queue import threading import uuid from collections.abc import Callable, Generator, Iterable -from concurrent.futures import ThreadPoolExecutor +from concurrent.futures import Future, ThreadPoolExecutor from contextlib import contextmanager from dataclasses import dataclass from datetime import timedelta -from typing import Dict, List, Optional, cast +from typing import Any, ParamSpec, TypeVar, cast import nexusrpc import opentelemetry.context +import opentelemetry.trace import pytest from opentelemetry import baggage, context from opentelemetry.sdk.trace import ReadableSpan, TracerProvider @@ -26,19 +28,32 @@ from temporalio.client import Client, WithStartWorkflowOperation, WorkflowUpdateStage from temporalio.common import RetryPolicy, WorkflowIDConflictPolicy from temporalio.contrib.opentelemetry import ( + OpenTelemetryInterceptor, TracingInterceptor, TracingWorkflowInboundInterceptor, + create_tracer_provider, ) +from temporalio.contrib.opentelemetry import _context as otel_context from temporalio.contrib.opentelemetry import workflow as otel_workflow +from temporalio.contrib.opentelemetry._otel_interceptor import ( + _TracingWorkflowInboundInterceptor as _OtelTracingWorkflowInboundInterceptor, +) from temporalio.exceptions import ( ApplicationError, ApplicationErrorCategory, NexusOperationError, ) from temporalio.testing import WorkflowEnvironment -from temporalio.worker import UnsandboxedWorkflowRunner, Worker +from temporalio.worker import ( + ExecuteWorkflowInput, + Interceptor, + UnsandboxedWorkflowRunner, + Worker, + WorkflowInboundInterceptor, + WorkflowInterceptorClassInput, +) from tests.helpers import LogCapturer -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from tests.helpers.nexus import make_nexus_endpoint_name @dataclass @@ -88,6 +103,34 @@ class TracingWorkflowActionActivity: fail_on_non_replay_before_complete: bool = False +@workflow.defn +class SignalWithStartHeaderWorkflow: + def __init__(self) -> None: + self._signaled = False + + @workflow.run + async def run(self) -> bool: + await workflow.wait_condition(lambda: self._signaled) + return "_tracer-data" in workflow.info().headers + + @workflow.signal + def notify(self) -> None: + self._signaled = True + + +@workflow.defn +class SignalWithStartCallerWorkflow: + @workflow.run + async def run(self, target_id: str, task_queue: str) -> str: + handle = await workflow.signal_with_start_workflow( + SignalWithStartHeaderWorkflow.run, + id=target_id, + task_queue=task_queue, + signal=SignalWithStartHeaderWorkflow.notify, + ) + return handle.id + + @dataclass class TracingWorkflowActionContinueAsNew: param: TracingWorkflowParam @@ -96,7 +139,7 @@ class TracingWorkflowActionContinueAsNew: @workflow.defn class ExpectCancelNexusWorkflow: @workflow.run - async def run(self, input: str): + async def run(self, _input: str): try: await asyncio.wait_for(asyncio.Future(), 2) except asyncio.TimeoutError: @@ -229,9 +272,44 @@ def update_validator(self) -> None: pass +@pytest.mark.requires_local_server +async def test_workflow_signal_with_start_propagates_trace_headers( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + provider = TracerProvider() + exporter = InMemorySpanExporter() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + tracer = get_tracer(__name__, tracer_provider=provider) + config = client.config() + config["interceptors"] = [TracingInterceptor(tracer)] + client = Client(**config) + + async with Worker( + client, + task_queue=f"signal-with-start-{uuid.uuid4()}", + workflows=[SignalWithStartCallerWorkflow, SignalWithStartHeaderWorkflow], + workflow_runner=UnsandboxedWorkflowRunner(), + ) as worker: + target_id = f"signal-with-start-target-{uuid.uuid4()}" + with tracer.start_as_current_span("signal-with-start"): + caller = await client.start_workflow( + SignalWithStartCallerWorkflow.run, + args=[target_id, worker.task_queue], + id=f"signal-with-start-caller-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert await caller.result() == target_id + assert await client.get_workflow_handle(target_id).result() is True + assert any( + span.name == "SignalWithStartWorkflow" for span in exporter.get_finished_spans() + ) + + async def test_opentelemetry_tracing(client: Client, env: WorkflowEnvironment): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1424" ) @@ -367,7 +445,7 @@ async def test_opentelemetry_tracing(client: Client, env: WorkflowEnvironment): async def test_opentelemetry_tracing_update_with_start( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1424" ) @@ -457,8 +535,9 @@ async def test_opentelemetry_tracing_update_with_start( ] +@pytest.mark.requires_local_server async def test_opentelemetry_tracing_nexus(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1424" ) @@ -475,7 +554,7 @@ async def test_opentelemetry_tracing_nexus(client: Client, env: WorkflowEnvironm client = Client(**client_config) task_queue = f"task-queue-{uuid.uuid4()}" - await create_nexus_endpoint(task_queue, client) + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) async with Worker( client, task_queue=task_queue, @@ -705,9 +784,7 @@ async def run(self) -> dict[str, str]: ) -async def test_opentelemetry_baggage_propagation_basic( - client_with_tracing: Client, env: WorkflowEnvironment -): +async def test_opentelemetry_baggage_propagation_basic(client_with_tracing: Client): task_queue = f"task_queue_{uuid.uuid4()}" async with Worker( client_with_tracing, @@ -722,23 +799,20 @@ async def test_opentelemetry_baggage_propagation_basic( task_queue=task_queue, ) - assert ( - result["user_id"] == "test-user-123" - ), "user.id baggage should propagate to activity" - assert ( - result["tenant_id"] == "some-corp" - ), "tenant.id baggage should propagate to activity" + assert result["user_id"] == "test-user-123", ( + "user.id baggage should propagate to activity" + ) + assert result["tenant_id"] == "some-corp", ( + "tenant.id baggage should propagate to activity" + ) @activity.defn async def read_baggage_local_activity() -> dict[str, str]: - return cast( - dict[str, str], - { - "user_id": get_baggage_value("user.id"), - "tenant_id": get_baggage_value("tenant.id"), - }, - ) + return { + "user_id": get_baggage_value("user.id"), + "tenant_id": get_baggage_value("tenant.id"), + } @workflow.defn @@ -752,7 +826,7 @@ async def run(self) -> dict[str, str]: async def test_opentelemetry_baggage_propagation_local_activity( - client_with_tracing: Client, env: WorkflowEnvironment + client_with_tracing: Client, ): task_queue = f"task_queue_{uuid.uuid4()}" async with Worker( @@ -799,7 +873,7 @@ async def run(self) -> None: async def test_opentelemetry_baggage_propagation_with_retries( - client_with_tracing: Client, env: WorkflowEnvironment + client_with_tracing: Client, ) -> None: global retry_attempt_baggage_values retry_attempt_baggage_values = [] @@ -855,57 +929,47 @@ async def run(self) -> None: ) async def test_opentelemetry_context_restored_after_activity( client_with_tracing: Client, - env: WorkflowEnvironment, activity: Callable[[], None], expect_failure: bool, + monkeypatch: pytest.MonkeyPatch, ) -> None: - attach_count = 0 - detach_count = 0 - original_attach = context.attach - original_detach = context.detach + # Every context the interceptors attach must be detached again, also when + # the activity raises. Counting through the interceptors' own detach keeps + # this independent of other users of opentelemetry.context, such as the + # threading instrumentation's attach/detach around every thread's run(). + detached: list[bool] = [] + original_detach = otel_context._detach - def tracked_attach(ctx): - nonlocal attach_count - attach_count += 1 - return original_attach(ctx) - - def tracked_detach(token): - nonlocal detach_count - detach_count += 1 - return original_detach(token) - - context.attach = tracked_attach - context.detach = tracked_detach - - try: - task_queue = f"task_queue_{uuid.uuid4()}" - async with Worker( - client_with_tracing, - task_queue=task_queue, - workflows=[ContextClearWorkflow], - activities=[activity], - ): - with baggage_values({"user.id": "test-123"}): - try: - await client_with_tracing.execute_workflow( - ContextClearWorkflow.run, - id=f"workflow_{uuid.uuid4()}", - task_queue=task_queue, - ) - assert ( - not expect_failure - ), "This test should have raised an exception" - except Exception: - assert expect_failure, "This test is not expeced to raise" + def tracked_detach(ctx: Any, token: Any) -> bool: + result = original_detach(ctx, token) + detached.append(result) + return result - assert ( - attach_count == detach_count - ), f"Context leak detected: {attach_count} attaches vs {detach_count} detaches. " - assert attach_count > 0, "Expected at least one context attach/detach" + monkeypatch.setattr(otel_context, "_detach", tracked_detach) - finally: - context.attach = original_attach - context.detach = original_detach + task_queue = f"task_queue_{uuid.uuid4()}" + async with Worker( + client_with_tracing, + task_queue=task_queue, + workflows=[ContextClearWorkflow], + activities=[activity], + ): + with baggage_values({"user.id": "test-123"}): + try: + await client_with_tracing.execute_workflow( + ContextClearWorkflow.run, + id=f"workflow_{uuid.uuid4()}", + task_queue=task_queue, + ) + assert not expect_failure, "This test should have raised an exception" + except Exception: + assert expect_failure, "This test is not expeced to raise" + + assert detached, "Expected at least one context attach/detach" + assert all(detached), ( + f"Context leak detected: {detached.count(False)} of {len(detached)} " + "attached contexts were not detached" + ) @activity.defn @@ -924,7 +988,7 @@ async def run(self) -> str: async def test_opentelemetry_interceptor_works_if_no_context( - client_with_tracing: Client, env: WorkflowEnvironment + client_with_tracing: Client, ): task_queue = f"task_queue_{uuid.uuid4()}" async with Worker( @@ -950,22 +1014,80 @@ async def test_opentelemetry_interceptor_works_if_no_context( # * signal failure and wft failure from signal -def test_opentelemetry_safe_detach(): +async def test_opentelemetry_standalone_activity_tracing( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + exporter = InMemorySpanExporter() + provider = TracerProvider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + tracer = get_tracer(__name__, tracer_provider=provider) + client_config = client.config() + client_config["interceptors"] = [TracingInterceptor(tracer)] + client = Client(**client_config) + + task_queue = f"task_queue_{uuid.uuid4()}" + activity_id = f"activity_{uuid.uuid4()}" + async with Worker( + client, + task_queue=task_queue, + activities=[tracing_activity], + ): + handle = await client.start_activity( + tracing_activity, + TracingActivityParam(heartbeat=False), + id=activity_id, + task_queue=task_queue, + schedule_to_close_timeout=timedelta(seconds=10), + ) + await handle.result() + + finished_spans = exporter.get_finished_spans() + assert dump_spans(finished_spans, with_attributes=False) == [ + "StartActivity:tracing_activity", + " RunActivity:tracing_activity", + ] + start_activity_span = next( + s for s in finished_spans if s.name == "StartActivity:tracing_activity" + ) + assert start_activity_span.attributes is not None + assert start_activity_span.attributes["temporalActivityID"] == activity_id + assert start_activity_span.attributes["temporalActivityType"] == "tracing_activity" + + +def _v1_workflow_context(success_is_complete: bool = True) -> Any: class _fake_self: - def _load_workflow_context_carrier(*args): + def _load_workflow_context_carrier(*_args): return None - def _set_on_context(self, ctx): + def _set_on_context(self, ctx: Any): return opentelemetry.context.set_value("test-key", "test-value", ctx) - def _completed_span(*args, **kwargs): + def _completed_span(*args: Any, **_kwargs: Any): pass - # create a context manager and force enter to happen on this thread - context_manager = TracingWorkflowInboundInterceptor._top_level_workflow_context( + return TracingWorkflowInboundInterceptor._top_level_workflow_context( _fake_self(), # type: ignore - success_is_complete=True, + success_is_complete=success_is_complete, + ) + + +def _v2_workflow_context() -> Any: + class _fake_input: + headers: dict[str, Any] = {} + + return _OtelTracingWorkflowInboundInterceptor._top_level_workflow_context( + object(), # type: ignore + _fake_input(), # type: ignore ) + + +def _assert_context_detach_is_safe(make_context_manager: Callable[[], Any]) -> None: + # create a context manager and force enter to happen on this thread + context_manager = make_context_manager() context_manager.__enter__() # move reference to context manager into queue @@ -992,6 +1114,170 @@ def otel_context_error(record: logging.LogRecord) -> bool: and "Failed to detach context" in record.message ) - assert ( - capturer.find(otel_context_error) is None - ), "Detach from context message should not be logged" + assert capturer.find(otel_context_error) is None, ( + "Detach from context message should not be logged" + ) + + +@pytest.mark.parametrize( + "make_context_manager", + [_v1_workflow_context, _v2_workflow_context], + ids=["TracingInterceptor", "OpenTelemetryInterceptor"], +) +@pytest.mark.parametrize( + "threading_instrumented", [False, True], ids=["plain", "threading-instrumented"] +) +def test_opentelemetry_safe_detach( + make_context_manager: Callable[[], Any], threading_instrumented: bool +): + if not threading_instrumented: + _assert_context_detach_is_safe(make_context_manager) + return + # OpenTelemetry's threading instrumentation (strands turns it on when an + # Agent is created) propagates the current Context object into new + # threads, so a context-identity check alone would detach a token minted + # on another thread. + threading_instrumentation = pytest.importorskip( + "opentelemetry.instrumentation.threading" + ) + instrumentor = threading_instrumentation.ThreadingInstrumentor() + already_instrumented = instrumentor.is_instrumented_by_opentelemetry + if not already_instrumented: + instrumentor.instrument() + try: + _assert_context_detach_is_safe(make_context_manager) + finally: + if not already_instrumented: + instrumentor.uninstrument() + + +def _run_in_context_on_new_thread( + ctx: contextvars.Context, fn: Callable[[], Any] +) -> Any: + with ThreadPoolExecutor(max_workers=1) as pool: + return pool.submit(ctx.run, fn).result(timeout=5) + + +@pytest.mark.parametrize( + "make_context_manager", + [lambda: _v1_workflow_context(success_is_complete=False), _v2_workflow_context], + ids=["TracingInterceptor", "OpenTelemetryInterceptor"], +) +def test_opentelemetry_detach_after_thread_change( + make_context_manager: Callable[[], Any], +): + # Workflow activations run on a thread pool, so the asyncio task that + # entered one of these context managers can leave it on another thread + # while keeping the same contextvars.Context. The token is valid there and + # the detach must restore the outer context. + task_context = contextvars.copy_context() + outer = opentelemetry.context.set_value("outer", True) + task_context.run(opentelemetry.context.attach, outer) + context_manager = make_context_manager() + + _run_in_context_on_new_thread(task_context, context_manager.__enter__) + assert task_context.run(opentelemetry.context.get_current) is not outer + _run_in_context_on_new_thread( + task_context, lambda: context_manager.__exit__(None, None, None) + ) + assert task_context.run(opentelemetry.context.get_current) is outer + + +_P = ParamSpec("_P") +_T = TypeVar("_T") + + +class _AlternatingThreadExecutor(ThreadPoolExecutor): + """Runs each submission on a different thread than the one before it, the + way successive activations of a workflow can land on different pool + threads under load.""" + + def __init__(self) -> None: + super().__init__(max_workers=1) + self._pools = [ThreadPoolExecutor(max_workers=1) for _ in range(2)] + self._submissions = 0 + + def submit( + self, fn: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs + ) -> Future[_T]: + pool = self._pools[self._submissions % len(self._pools)] + self._submissions += 1 + return pool.submit(fn, *args, **kwargs) + + def shutdown(self, wait: bool = True, *, cancel_futures: bool = False) -> None: + for pool in self._pools: + pool.shutdown(wait, cancel_futures=cancel_futures) + super().shutdown(wait, cancel_futures=cancel_futures) + + +@workflow.defn +class TimerWorkflow: + @workflow.run + async def run(self) -> None: + # Two activations: the start, and the timer firing. + await asyncio.sleep(0.01) + + +@pytest.mark.parametrize( + "make_interceptor", + [lambda: TracingInterceptor(get_tracer(__name__)), OpenTelemetryInterceptor], + ids=["TracingInterceptor", "OpenTelemetryInterceptor"], +) +async def test_opentelemetry_context_restored_after_activation_thread_change( + client: Client, + make_interceptor: Callable[[], Interceptor], + reset_otel_tracer_provider: Any, # type: ignore[reportUnusedParameter] +): + # OpenTelemetryInterceptor insists on a replay-safe global provider. + opentelemetry.trace.set_tracer_provider(create_tracer_provider()) + records: list[tuple[threading.Thread, threading.Thread, bool]] = [] + + class ContextRestoredWorkflowInboundInterceptor(WorkflowInboundInterceptor): + async def execute_workflow(self, input: ExecuteWorkflowInput) -> Any: + entered_on = threading.current_thread() + before = opentelemetry.context.get_current() + result = await super().execute_workflow(input) + records.append( + ( + entered_on, + threading.current_thread(), + opentelemetry.context.get_current() is before, + ) + ) + return result + + class ContextRestoredInterceptor(Interceptor): + def workflow_interceptor_class( + self, input: WorkflowInterceptorClassInput + ) -> type[WorkflowInboundInterceptor] | None: + return ContextRestoredWorkflowInboundInterceptor + + executor = _AlternatingThreadExecutor() + try: + async with Worker( + client, + task_queue=f"task_queue_{uuid.uuid4()}", + workflows=[TimerWorkflow], + # The first interceptor is the outermost, so it sees whatever the + # tracing interceptor leaves attached. + interceptors=[ContextRestoredInterceptor(), make_interceptor()], + workflow_task_executor=executor, + workflow_runner=UnsandboxedWorkflowRunner(), + ) as worker: + await client.execute_workflow( + TimerWorkflow.run, + id=f"workflow_{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + finally: + executor.shutdown() + + assert len(records) == 1 + entered_on, left_on, context_restored = records[0] + assert entered_on is not left_on, ( + "The workflow was expected to change threads between its activations" + ) + assert context_restored, ( + "The tracing interceptor must detach its context even though the " + "workflow left it on a different thread than it entered on" + ) diff --git a/tests/contrib/opentelemetry/test_opentelemetry_plugin.py b/tests/contrib/opentelemetry/test_opentelemetry_plugin.py new file mode 100644 index 0000000000..74d461904a --- /dev/null +++ b/tests/contrib/opentelemetry/test_opentelemetry_plugin.py @@ -0,0 +1,891 @@ +import logging +import uuid +from datetime import timedelta +from typing import Any + +import nexusrpc +import opentelemetry.trace +import pytest +from opentelemetry.sdk.trace.export import SimpleSpanProcessor +from opentelemetry.sdk.trace.export.in_memory_span_exporter import ( + InMemorySpanExporter, +) +from opentelemetry.trace import ( + get_tracer, +) + +import temporalio.contrib.opentelemetry.workflow +import temporalio.worker._workflow_instance +from temporalio import activity, nexus, workflow +from temporalio.api.common.v1 import WorkflowExecution +from temporalio.api.enums.v1 import EventType, ResetReapplyType +from temporalio.api.workflowservice.v1 import ResetWorkflowExecutionRequest +from temporalio.client import ( + Client, + WorkflowFailureError, + WorkflowQueryFailedError, + WorkflowUpdateFailedError, +) +from temporalio.contrib.opentelemetry import OpenTelemetryPlugin, create_tracer_provider +from temporalio.exceptions import ApplicationError +from temporalio.testing import WorkflowEnvironment + +# Import the dump_spans function from the original opentelemetry test +from tests.contrib.opentelemetry.test_opentelemetry import dump_spans +from tests.helpers import assert_eventually, new_worker +from tests.helpers.nexus import make_nexus_endpoint_name + +logger = logging.getLogger(__name__) + + +@activity.defn +async def simple_no_context_activity() -> str: + with get_tracer(__name__).start_as_current_span("Activity"): + pass + return "success" + + +@workflow.defn +class SimpleNexusWorkflow: + @workflow.run + async def run(self, input: str) -> str: + return f"nexus-result-{input}" + + +@nexusrpc.handler.service_handler +class ComprehensiveNexusService: + @nexus.workflow_run_operation + async def test_operation( + self, ctx: nexus.WorkflowRunOperationContext, input: str + ) -> nexus.WorkflowHandle[str]: + return await ctx.start_workflow( + SimpleNexusWorkflow.run, + input, + id=f"nexus-wf-{ctx.request_id}", + ) + + +@workflow.defn +class BasicTraceWorkflow: + @workflow.run + async def run(self): + tracer = get_tracer(__name__) + temporalio.contrib.opentelemetry.workflow.completed_span("Completed Span") + with tracer.start_as_current_span("Hello World"): + await workflow.execute_activity( + simple_no_context_activity, + start_to_close_timeout=timedelta(seconds=10), + ) + await workflow.execute_activity( + simple_no_context_activity, + start_to_close_timeout=timedelta(seconds=10), + ) + span = tracer.start_span("Not context") + with tracer.start_as_current_span("Inner"): + await workflow.execute_activity( + simple_no_context_activity, + start_to_close_timeout=timedelta(seconds=10), + ) + span.end() + return + + +@workflow.defn +class SignalWithStartHeaderWorkflow: + def __init__(self) -> None: + self._signaled = False + + @workflow.run + async def run(self) -> bool: + await workflow.wait_condition(lambda: self._signaled) + return "_tracer-data" in workflow.info().headers + + @workflow.signal + def notify(self) -> None: + self._signaled = True + + +@workflow.defn +class SignalWithStartCallerWorkflow: + @workflow.run + async def run(self, target_id: str, task_queue: str) -> str: + handle = await workflow.signal_with_start_workflow( + SignalWithStartHeaderWorkflow.run, + id=target_id, + task_queue=task_queue, + signal=SignalWithStartHeaderWorkflow.notify, + ) + return handle.id + + +async def test_otel_tracing_basic(client: Client, reset_otel_tracer_provider: Any): # type: ignore[reportUnusedParameter] + exporter = InMemorySpanExporter() + provider = create_tracer_provider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + opentelemetry.trace.set_tracer_provider(provider) + + new_config = client.config() + new_config["plugins"] = [OpenTelemetryPlugin()] + new_client = Client(**new_config) + + async with new_worker( + new_client, + BasicTraceWorkflow, + activities=[simple_no_context_activity], + max_cached_workflows=0, + ) as worker: + tracer = get_tracer(__name__) + + with tracer.start_as_current_span("Research workflow"): + workflow_handle = await new_client.start_workflow( + BasicTraceWorkflow.run, + id=f"research-workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=120), + ) + await workflow_handle.result() + + spans = exporter.get_finished_spans() + + expected_hierarchy = [ + "Research workflow", + " Completed Span", + " Hello World", + " Activity", + " Activity", + " Inner", + " Activity", + " Not context", + ] + + # Verify the span hierarchy matches expectations + actual_hierarchy = dump_spans(spans, with_attributes=False) + assert actual_hierarchy == expected_hierarchy, ( + f"Span hierarchy mismatch.\nExpected:\n{expected_hierarchy}\nActual:\n{actual_hierarchy}" + ) + + +@pytest.mark.requires_local_server +async def test_workflow_signal_with_start_propagates_trace_headers( + client: Client, + env: WorkflowEnvironment, + reset_otel_tracer_provider: Any, # type: ignore[reportUnusedParameter] +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + exporter = InMemorySpanExporter() + provider = create_tracer_provider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + opentelemetry.trace.set_tracer_provider(provider) + config = client.config() + config["plugins"] = [OpenTelemetryPlugin(add_temporal_spans=True)] + client = Client(**config) + + async with new_worker( + client, SignalWithStartCallerWorkflow, SignalWithStartHeaderWorkflow + ) as worker: + target_id = f"signal-with-start-target-{uuid.uuid4()}" + with get_tracer(__name__).start_as_current_span("signal-with-start"): + caller = await client.start_workflow( + SignalWithStartCallerWorkflow.run, + args=[target_id, worker.task_queue], + id=f"signal-with-start-caller-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=3), + ) + assert await caller.result() == target_id + assert await client.get_workflow_handle(target_id).result() is True + assert any( + span.name == "SignalWithStartWorkflow" for span in exporter.get_finished_spans() + ) + + +@workflow.defn +class ComprehensiveWorkflow: + def __init__(self) -> None: + self._signal_count = 0 + self._update_completed = False + self._nexus_result: str = "" + + @workflow.run + async def run(self, actions: list[str]) -> dict[str, str]: + results = {} + tracer = get_tracer(__name__) + with tracer.start_as_current_span("MainWorkflow"): + for action in actions: + if action == "activity": + with tracer.start_as_current_span("ActivitySection"): + result = await workflow.execute_activity( + simple_no_context_activity, + start_to_close_timeout=timedelta(seconds=10), + ) + results["activity"] = result + + elif action == "local_activity": + with tracer.start_as_current_span("LocalActivitySection"): + result = await workflow.execute_local_activity( + simple_no_context_activity, + start_to_close_timeout=timedelta(seconds=10), + ) + results["local_activity"] = result + + elif action == "child_workflow": + with tracer.start_as_current_span("ChildWorkflowSection"): + child_handle = await workflow.start_child_workflow( + BasicTraceWorkflow.run, + id=f"child-{workflow.info().workflow_id}", + ) + + await child_handle + results["child_workflow"] = "completed" + + elif action == "timer": + with tracer.start_as_current_span("TimerSection"): + await workflow.sleep(0.01) + results["timer"] = "completed" + + elif action == "wait_signal": + with tracer.start_as_current_span("WaitSignalSection"): + await workflow.wait_condition(lambda: self._signal_count > 0) + results["wait_signal"] = ( + f"received_{self._signal_count}_signals" + ) + + elif action == "wait_update": + with tracer.start_as_current_span("WaitUpdateSection"): + await workflow.wait_condition(lambda: self._update_completed) + results["wait_update"] = "update_received" + + elif action == "nexus": + with tracer.start_as_current_span("NexusSection"): + nexus_client = workflow.create_nexus_client( + endpoint=make_nexus_endpoint_name( + workflow.info().task_queue + ), + service=ComprehensiveNexusService, + ) + nexus_handle = await nexus_client.start_operation( + operation=ComprehensiveNexusService.test_operation, + input="test-input", + ) + nexus_result = await nexus_handle + results["nexus"] = nexus_result + + elif action == "continue_as_new": + with tracer.start_as_current_span("ContinueAsNewSection"): + if ( + len(results) > 0 + ): # Only continue as new if we've done some work + workflow.continue_as_new( + [] + ) # Empty actions to finish quickly + results["continue_as_new"] = "prepared" + + return results + + @workflow.query + def get_status(self) -> dict[str, Any]: + return { + "signal_count": self._signal_count, + "update_completed": self._update_completed, + } + + @workflow.signal + def notify(self, message: str) -> None: # type: ignore[reportUnusedParameter] + self._signal_count += 1 + + @workflow.update + def update_status(self, status: str) -> str: + self._update_completed = True + return f"updated_to_{status}" + + @update_status.validator + def validate_update_status(self, status: str) -> None: + if not status: + raise ValueError("Status cannot be empty") + + +@pytest.mark.requires_local_server +async def test_opentelemetry_comprehensive_tracing( + client: Client, + env: WorkflowEnvironment, + reset_otel_tracer_provider: Any, # type: ignore[reportUnusedParameter] +): + """Test OpenTelemetry v2 integration across all workflow operations.""" + if env.supports_time_skipping_v1: + pytest.skip("Fails on java test server.") + + exporter = InMemorySpanExporter() + provider = create_tracer_provider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + opentelemetry.trace.set_tracer_provider(provider) + + new_config = client.config() + new_config["plugins"] = [OpenTelemetryPlugin(add_temporal_spans=True)] + new_client = Client(**new_config) + + async with new_worker( + new_client, + ComprehensiveWorkflow, + BasicTraceWorkflow, # For child workflow + SimpleNexusWorkflow, # For Nexus operation + activities=[simple_no_context_activity], + nexus_service_handlers=[ComprehensiveNexusService()], + max_cached_workflows=0, + ) as worker: + # Create Nexus endpoint for this task queue + await env.create_nexus_endpoint( + make_nexus_endpoint_name(worker.task_queue), worker.task_queue + ) + + with get_tracer(__name__).start_as_current_span("ComprehensiveTest") as span: + span.set_attribute("test.type", "comprehensive") + + # Start workflow with various actions + workflow_handle = await new_client.start_workflow( + ComprehensiveWorkflow.run, + [ + "activity", + "local_activity", + "child_workflow", + "timer", + "nexus", + "wait_signal", + "wait_update", + ], + id=f"comprehensive-workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=120), + ) + + logger.info(f"Comprehensive workflow query") + + # Test query + status = await workflow_handle.query(ComprehensiveWorkflow.get_status) + assert status["signal_count"] == 0 + + logger.info(f"Comprehensive workflow signal") + + # Test signal + await workflow_handle.signal(ComprehensiveWorkflow.notify, "test-signal-1") + await workflow_handle.signal(ComprehensiveWorkflow.notify, "test-signal-2") + + logger.info(f"Comprehensive workflow update") + + # Test update + update_result = await workflow_handle.execute_update( + ComprehensiveWorkflow.update_status, "active" + ) + assert update_result == "updated_to_active" + + logger.info(f"Comprehensive workflow get result") + + # Get final result + result = await workflow_handle.result() + + # Verify results + expected_keys = { + "activity", + "local_activity", + "child_workflow", + "timer", + "nexus", + "wait_signal", + "wait_update", + } + assert all(key in result for key in expected_keys) + assert result["activity"] == "success" + assert result["local_activity"] == "success" + assert result["child_workflow"] == "completed" + assert result["timer"] == "completed" + assert result["nexus"] == "nexus-result-test-input" + assert result["wait_signal"] == "received_2_signals" + assert result["wait_update"] == "update_received" + + spans = exporter.get_finished_spans() + + # Note: Even though we call signal twice, dump_spans() deduplicates signal spans + # as they "can duplicate in rare situations" according to the original test + + expected_hierarchy = [ + "ComprehensiveTest", + " StartWorkflow:ComprehensiveWorkflow", + " RunWorkflow:ComprehensiveWorkflow", + " MainWorkflow", + " ActivitySection", + " StartActivity:simple_no_context_activity", + " RunActivity:simple_no_context_activity", + " Activity", + " LocalActivitySection", + " StartActivity:simple_no_context_activity", + " RunActivity:simple_no_context_activity", + " Activity", + " ChildWorkflowSection", + " StartChildWorkflow:BasicTraceWorkflow", + " RunWorkflow:BasicTraceWorkflow", + " Completed Span", + " Hello World", + " StartActivity:simple_no_context_activity", + " RunActivity:simple_no_context_activity", + " Activity", + " StartActivity:simple_no_context_activity", + " RunActivity:simple_no_context_activity", + " Activity", + " Inner", + " StartActivity:simple_no_context_activity", + " RunActivity:simple_no_context_activity", + " Activity", + " Not context", + " TimerSection", + " NexusSection", + " StartNexusOperation:ComprehensiveNexusService/test_operation", + " RunStartNexusOperationHandler:ComprehensiveNexusService/test_operation", + " StartWorkflow:SimpleNexusWorkflow", + " RunWorkflow:SimpleNexusWorkflow", + " WaitSignalSection", + " WaitUpdateSection", + " QueryWorkflow:get_status", + " HandleQuery:get_status", + " SignalWorkflow:notify", + " HandleSignal:notify", + " StartWorkflowUpdate:update_status", + " ValidateUpdate:update_status", + " HandleUpdate:update_status", + ] + + # Verify the span hierarchy matches expectations + actual_hierarchy = dump_spans(spans, with_attributes=False) + assert actual_hierarchy == expected_hierarchy, ( + f"Span hierarchy mismatch.\nExpected:\n{expected_hierarchy}\nActual:\n{actual_hierarchy}" + ) + + +async def test_otel_tracing_with_added_spans( + client: Client, + reset_otel_tracer_provider: Any, # type: ignore[reportUnusedParameter] +): + exporter = InMemorySpanExporter() + provider = create_tracer_provider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + opentelemetry.trace.set_tracer_provider(provider) + + plugin = OpenTelemetryPlugin(add_temporal_spans=True) + new_config = client.config() + new_config["plugins"] = [plugin] + new_client = Client(**new_config) + + async with new_worker( + new_client, + BasicTraceWorkflow, + activities=[simple_no_context_activity], + max_cached_workflows=0, + ) as worker: + with get_tracer(__name__).start_as_current_span("Research workflow"): + workflow_handle = await new_client.start_workflow( + BasicTraceWorkflow.run, + id=f"research-workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=120), + ) + await workflow_handle.result() + + spans = exporter.get_finished_spans() + + expected_hierarchy = [ + "Research workflow", + " StartWorkflow:BasicTraceWorkflow", + " RunWorkflow:BasicTraceWorkflow", + " Completed Span", + " Hello World", + " StartActivity:simple_no_context_activity", + " RunActivity:simple_no_context_activity", + " Activity", + " StartActivity:simple_no_context_activity", + " RunActivity:simple_no_context_activity", + " Activity", + " Inner", + " StartActivity:simple_no_context_activity", + " RunActivity:simple_no_context_activity", + " Activity", + " Not context", + ] + + # Verify the span hierarchy matches expectations + actual_hierarchy = dump_spans(spans, with_attributes=False) + assert actual_hierarchy == expected_hierarchy, ( + f"Span hierarchy mismatch.\nExpected:\n{expected_hierarchy}\nActual:\n{actual_hierarchy}" + ) + + +task_fail_once_workflow_has_failed = False + + +@workflow.defn(sandboxed=False) +class FailingTaskWorkflow: + @workflow.run + async def run(self): + tracer = get_tracer(__name__) + with tracer.start_as_current_span("FailingWorkflowSpan"): + with tracer.start_as_current_span("FailingWorkflow CompletedSpan"): + pass + global task_fail_once_workflow_has_failed + if not task_fail_once_workflow_has_failed: + task_fail_once_workflow_has_failed = True + raise RuntimeError("Intentional workflow task failure") + task_fail_once_workflow_has_failed = False + + return + + +async def test_otel_tracing_workflow_task_failure( + client: Client, + reset_otel_tracer_provider: Any, # type: ignore[reportUnusedParameter] +): + """Test OpenTelemetry behavior when a workflow task fails.""" + exporter = InMemorySpanExporter() + provider = create_tracer_provider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + opentelemetry.trace.set_tracer_provider(provider) + + new_config = client.config() + new_config["plugins"] = [OpenTelemetryPlugin(add_temporal_spans=True)] + new_client = Client(**new_config) + + async with new_worker( + new_client, + FailingTaskWorkflow, + max_cached_workflows=0, + ) as worker: + with get_tracer(__name__).start_as_current_span("FailingWorkflowTest"): + workflow_handle = await new_client.start_workflow( + FailingTaskWorkflow.run, + id=f"failing-workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=30), + ) + + await workflow_handle.result() + + spans = exporter.get_finished_spans() + + # Verify the span hierarchy includes the failure, but only once + # Spans which completed during the failed task will duplicate + expected_hierarchy = [ + "FailingWorkflowTest", + " StartWorkflow:FailingTaskWorkflow", + " RunWorkflow:FailingTaskWorkflow", + " FailingWorkflowSpan", + " FailingWorkflow CompletedSpan", + " FailingWorkflow CompletedSpan", + ] + + actual_hierarchy = dump_spans(spans, with_attributes=False) + assert actual_hierarchy == expected_hierarchy, ( + f"Span hierarchy mismatch.\nExpected:\n{expected_hierarchy}\nActual:\n{actual_hierarchy}" + ) + + +@workflow.defn +class FailingWorkflow: + @workflow.run + async def run(self): + tracer = get_tracer(__name__) + with tracer.start_as_current_span("FailingWorkflowSpan"): + raise ApplicationError("Intentional workflow failure", non_retryable=True) + + +async def test_otel_tracing_workflow_failure( + client: Client, + reset_otel_tracer_provider: Any, # type: ignore[reportUnusedParameter] +): + """Test OpenTelemetry behavior when a workflow task fails.""" + exporter = InMemorySpanExporter() + provider = create_tracer_provider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + opentelemetry.trace.set_tracer_provider(provider) + + new_config = client.config() + new_config["plugins"] = [OpenTelemetryPlugin(add_temporal_spans=True)] + new_client = Client(**new_config) + + async with new_worker( + new_client, + FailingWorkflow, + max_cached_workflows=0, + ) as worker: + with get_tracer(__name__).start_as_current_span("FailingWorkflowTest"): + workflow_handle = await new_client.start_workflow( + FailingWorkflow.run, + id=f"failing-workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=30), + ) + + with pytest.raises(WorkflowFailureError): + await workflow_handle.result() + + spans = exporter.get_finished_spans() + + # Verify the span hierarchy includes the failure when it fails the whole workflow + expected_hierarchy = [ + "FailingWorkflowTest", + " StartWorkflow:FailingWorkflow", + " RunWorkflow:FailingWorkflow", + " FailingWorkflowSpan", + ] + + actual_hierarchy = dump_spans(spans, with_attributes=False) + assert actual_hierarchy == expected_hierarchy, ( + f"Span hierarchy mismatch.\nExpected:\n{expected_hierarchy}\nActual:\n{actual_hierarchy}" + ) + + +async def test_otel_standalone_activity_tracing( + client: Client, + env: WorkflowEnvironment, + reset_otel_tracer_provider: Any, # type: ignore[reportUnusedParameter] +): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + exporter = InMemorySpanExporter() + provider = create_tracer_provider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + opentelemetry.trace.set_tracer_provider(provider) + + new_config = client.config() + new_config["plugins"] = [OpenTelemetryPlugin(add_temporal_spans=True)] + new_client = Client(**new_config) + + activity_id = f"activity_{uuid.uuid4()}" + async with new_worker( + new_client, + activities=[simple_no_context_activity], + ) as worker: + handle = await new_client.start_activity( + simple_no_context_activity, + id=activity_id, + task_queue=worker.task_queue, + schedule_to_close_timeout=timedelta(seconds=10), + ) + await handle.result() + + finished_spans = exporter.get_finished_spans() + assert dump_spans(finished_spans, with_attributes=False) == [ + "StartActivity:simple_no_context_activity", + " RunActivity:simple_no_context_activity", + " Activity", + ] + start_activity_span = next( + s + for s in finished_spans + if s.name == "StartActivity:simple_no_context_activity" + and s.attributes is not None + and s.attributes.get("temporalActivityID") == activity_id + ) + assert start_activity_span.attributes is not None + assert ( + start_activity_span.attributes["temporalActivityType"] + == "simple_no_context_activity" + ) + + +def test_replay_safe_span_delegates_extra_attributes(): + """Test that _ReplaySafeSpan delegates attribute access to the underlying span. + + Concrete span implementations (e.g. opentelemetry.sdk.trace.Span) expose + attributes beyond the Span ABC such as .attributes, .name, .kind, and + .resource. _ReplaySafeSpan must forward these so that instrumentation + libraries that rely on them work correctly. + """ + from opentelemetry.sdk.trace import TracerProvider as SdkTracerProvider + + from temporalio.contrib.opentelemetry._tracer_provider import _ReplaySafeSpan + + provider = SdkTracerProvider() + tracer = provider.get_tracer("test") + inner_span = tracer.start_span("test-span") + + wrapper = _ReplaySafeSpan(inner_span) + + # These properties exist on the SDK span but not on the Span ABC + assert wrapper.name == "test-span" + assert wrapper.kind is not None + assert wrapper.resource is not None + assert wrapper.attributes is not None or wrapper.attributes == {} + + # Verify that AttributeError is still raised for truly missing attributes + with pytest.raises(AttributeError): + _ = wrapper.nonexistent_attribute_xyz + + inner_span.end() + + +@workflow.defn +class RejectingHandlersWorkflow: + def __init__(self) -> None: + self._value: int | None = None + + @workflow.run + async def run(self) -> int | None: + await workflow.wait_condition(lambda: self._value is not None) + return self._value + + @workflow.update + def set_value(self, value: int) -> None: + self._value = value + + @set_value.validator + def validate_set_value(self, value: int) -> None: + if value < 0: + raise ValueError("value must not be negative") + + @workflow.query + def failing_query(self) -> str: + raise ValueError("query failed") + + +async def test_otel_tracing_rejected_update_and_failed_query( + client: Client, + reset_otel_tracer_provider: Any, # type: ignore[reportUnusedParameter] +): + exporter = InMemorySpanExporter() + provider = create_tracer_provider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + opentelemetry.trace.set_tracer_provider(provider) + + new_config = client.config() + new_config["plugins"] = [OpenTelemetryPlugin(add_temporal_spans=True)] + new_client = Client(**new_config) + + async with new_worker(new_client, RejectingHandlersWorkflow) as worker: + handle = await new_client.start_workflow( + RejectingHandlersWorkflow.run, + id=f"rejecting-handlers-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + with pytest.raises(WorkflowUpdateFailedError): + await handle.execute_update(RejectingHandlersWorkflow.set_value, -1) + with pytest.raises(WorkflowQueryFailedError): + await handle.query(RejectingHandlersWorkflow.failing_query) + await handle.execute_update(RejectingHandlersWorkflow.set_value, 1) + assert await handle.result() == 1 + + spans = exporter.get_finished_spans() + + # The rejected update and the failed query are still traced + expected_hierarchy = [ + "StartWorkflow:RejectingHandlersWorkflow", + " RunWorkflow:RejectingHandlersWorkflow", + "StartWorkflowUpdate:set_value", + " ValidateUpdate:set_value", + "QueryWorkflow:failing_query", + " HandleQuery:failing_query", + "StartWorkflowUpdate:set_value", + " ValidateUpdate:set_value", + " HandleUpdate:set_value", + ] + actual_hierarchy = dump_spans(spans, with_attributes=False) + assert actual_hierarchy == expected_hierarchy, ( + f"Span hierarchy mismatch.\nExpected:\n{expected_hierarchy}\nActual:\n{actual_hierarchy}" + ) + failed_spans = [ + span + for span in spans + if span.name in ("ValidateUpdate:set_value", "HandleQuery:failing_query") + and span.status.status_code == opentelemetry.trace.StatusCode.ERROR + ] + assert len(failed_spans) == 2 + + +@workflow.defn +class ResetReapplyUpdateWorkflow: + def __init__(self) -> None: + self._approved = False + + @workflow.run + async def run(self) -> str: + await workflow.execute_activity( + simple_no_context_activity, start_to_close_timeout=timedelta(seconds=10) + ) + await workflow.wait_condition(lambda: self._approved) + return "done" + + @workflow.update + async def approve(self) -> None: + self._approved = True + + +async def test_otel_tracing_reset_reapplied_update_span_id( + client: Client, + env: WorkflowEnvironment, + reset_otel_tracer_provider: Any, # type: ignore[reportUnusedParameter] +): + """A reapplied update after a reset must not reuse another span's ID. + + The random seed update arrives in the same activation as the reapplied + update, so the handler must only run once the new seed is applied. + """ + if env.supports_time_skipping_v1: + pytest.skip("Java test server doesn't support reset") + + exporter = InMemorySpanExporter() + provider = create_tracer_provider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + opentelemetry.trace.set_tracer_provider(provider) + + new_config = client.config() + new_config["plugins"] = [OpenTelemetryPlugin(add_temporal_spans=True)] + new_client = Client(**new_config) + + worker = new_worker( + new_client, + ResetReapplyUpdateWorkflow, + activities=[simple_no_context_activity], + max_cached_workflows=0, + ) + worker._set_default_workflow_logic_flag( + temporalio.worker._workflow_instance._WorkflowLogicFlag.PROCESS_WORKFLOW_ACTIVATION_JOBS_AS_SINGLE_BATCH, + enabled=True, + ) + async with worker: + handle = await new_client.start_workflow( + ResetReapplyUpdateWorkflow.run, + id=f"otel-reset-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Let the first workflow task complete before sending the update so the + # original run handles the update in a later task. + async def first_task_completed() -> int: + async for event in handle.fetch_history_events(): + if event.event_type is EventType.EVENT_TYPE_WORKFLOW_TASK_COMPLETED: + return event.event_id + raise AssertionError("First workflow task has not completed") + + reset_point = await assert_eventually(first_task_completed) + await handle.execute_update(ResetReapplyUpdateWorkflow.approve) + assert await handle.result() == "done" + + # Reset to the first workflow task, reapplying the update. + await new_client.workflow_service.reset_workflow_execution( + ResetWorkflowExecutionRequest( + namespace=new_client.namespace, + workflow_execution=WorkflowExecution(workflow_id=handle.id), + reason="test", + reset_reapply_type=ResetReapplyType.RESET_REAPPLY_TYPE_ALL_ELIGIBLE, + request_id=str(uuid.uuid4()), + workflow_task_finish_event_id=reset_point, + ) + ) + assert await new_client.get_workflow_handle(handle.id).result() == "done" + + spans = exporter.get_finished_spans() + assert [span.name for span in spans].count("HandleUpdate:approve") == 2 + names_by_span_id: dict[int, set[str]] = {} + for span in spans: + assert span.context is not None + names_by_span_id.setdefault(span.context.span_id, set()).add(span.name) + shared = {k: v for k, v in names_by_span_id.items() if len(v) > 1} + assert not shared, f"different spans share a span ID: {shared}" diff --git a/tests/contrib/opentelemetry/test_serverless.py b/tests/contrib/opentelemetry/test_serverless.py new file mode 100644 index 0000000000..a80b53b09a --- /dev/null +++ b/tests/contrib/opentelemetry/test_serverless.py @@ -0,0 +1,179 @@ +"""Tests for temporalio.contrib.opentelemetry._serverless.""" + +from __future__ import annotations + +import sys +from datetime import timedelta + +import pytest +from opentelemetry.sdk.trace.export import BatchSpanProcessor + +from temporalio.contrib.opentelemetry import _serverless +from temporalio.runtime import OpenTelemetryConfig + + +class TestResolveEndpoint: + def test_explicit_wins(self) -> None: + assert ( + _serverless.resolve_endpoint( + "http://explicit:4317", + env={"OTEL_EXPORTER_OTLP_ENDPOINT": "http://env:4317"}, + ) + == "http://explicit:4317" + ) + + def test_env_fallback(self) -> None: + assert ( + _serverless.resolve_endpoint( + None, env={"OTEL_EXPORTER_OTLP_ENDPOINT": "http://env:4317"} + ) + == "http://env:4317" + ) + + def test_default_when_nothing_set(self) -> None: + assert _serverless.resolve_endpoint(None, env={}) == ( + _serverless.DEFAULT_OTLP_ENDPOINT + ) + + def test_empty_explicit_and_env_are_skipped(self) -> None: + assert ( + _serverless.resolve_endpoint("", env={"OTEL_EXPORTER_OTLP_ENDPOINT": ""}) + == _serverless.DEFAULT_OTLP_ENDPOINT + ) + + def test_custom_default(self) -> None: + assert ( + _serverless.resolve_endpoint(None, env={}, default="http://custom:4317") + == "http://custom:4317" + ) + + +class TestResolveServiceName: + def test_explicit_wins(self) -> None: + assert ( + _serverless.resolve_service_name( + "explicit", + ["FALLBACK"], + "default", + env={"OTEL_SERVICE_NAME": "otel", "FALLBACK": "fallback"}, + ) + == "explicit" + ) + + def test_otel_service_name_precedes_fallbacks(self) -> None: + assert ( + _serverless.resolve_service_name( + None, + ["FALLBACK"], + "default", + env={"OTEL_SERVICE_NAME": "otel", "FALLBACK": "fallback"}, + ) + == "otel" + ) + + def test_fallback_env_vars_checked_in_order(self) -> None: + assert ( + _serverless.resolve_service_name( + None, + ["FIRST", "SECOND"], + "default", + env={"SECOND": "second-value"}, + ) + == "second-value" + ) + assert ( + _serverless.resolve_service_name( + None, + ["FIRST", "SECOND"], + "default", + env={"FIRST": "first-value", "SECOND": "second-value"}, + ) + == "first-value" + ) + + def test_default_when_nothing_set(self) -> None: + assert ( + _serverless.resolve_service_name(None, ["FALLBACK"], "default", env={}) + == "default" + ) + + def test_empty_values_are_skipped(self) -> None: + # Empty strings are falsy and are skipped, falling through to the next + # source in the chain. + assert ( + _serverless.resolve_service_name( + "", + ["FIRST", "SECOND"], + "default", + env={"OTEL_SERVICE_NAME": "", "FIRST": "", "SECOND": "second-value"}, + ) + == "second-value" + ) + + def test_whitespace_is_not_stripped(self) -> None: + # No stripping: a whitespace-only value is truthy and is used as-is, + # matching the pre-existing AWS Lambda behavior. + assert ( + _serverless.resolve_service_name( + None, + ["FALLBACK"], + "default", + env={"OTEL_SERVICE_NAME": " ", "FALLBACK": "fallback"}, + ) + == " " + ) + + +class TestBuildMetricsTelemetryConfig: + def test_with_service_name(self) -> None: + config = _serverless.build_metrics_telemetry_config( + endpoint="http://collector:4317", + service_name="my-service", + metric_periodicity=timedelta(seconds=30), + ) + assert isinstance(config.metrics, OpenTelemetryConfig) + assert config.metrics.url == "http://collector:4317" + assert config.metrics.metric_periodicity == timedelta(seconds=30) + assert config.global_tags == {"service_name": "my-service"} + + def test_without_service_name(self) -> None: + config = _serverless.build_metrics_telemetry_config( + endpoint="http://collector:4317", + service_name="", + metric_periodicity=None, + ) + assert isinstance(config.metrics, OpenTelemetryConfig) + assert config.metrics.url == "http://collector:4317" + assert config.metrics.metric_periodicity is None + assert config.global_tags == {} + + def test_empty_endpoint_uses_default(self) -> None: + config = _serverless.build_metrics_telemetry_config( + endpoint="", + service_name="svc", + metric_periodicity=None, + ) + assert isinstance(config.metrics, OpenTelemetryConfig) + assert config.metrics.url == _serverless.DEFAULT_OTLP_ENDPOINT + + +class TestBuildOtlpSpanProcessor: + def test_returns_batch_span_processor(self) -> None: + processor = _serverless.build_otlp_span_processor("http://localhost:4317") + try: + assert isinstance(processor, BatchSpanProcessor) + finally: + processor.shutdown() + + def test_raises_import_error_when_exporter_absent( + self, monkeypatch: pytest.MonkeyPatch + ) -> None: + # Setting the module to None in sys.modules makes the lazy import raise + # ImportError, simulating the exporter not being installed. + monkeypatch.setitem( + sys.modules, + "opentelemetry.exporter.otlp.proto.grpc.trace_exporter", + None, + ) + with pytest.raises(ImportError): + _serverless.build_otlp_span_processor("http://localhost:4317") diff --git a/tests/contrib/opentelemetry/test_tracer_provider.py b/tests/contrib/opentelemetry/test_tracer_provider.py new file mode 100644 index 0000000000..61b6dccd65 --- /dev/null +++ b/tests/contrib/opentelemetry/test_tracer_provider.py @@ -0,0 +1,65 @@ +"""Tests for ReplaySafeTracerProvider.""" + +from __future__ import annotations + +from opentelemetry.trace import NoOpTracer, Tracer +from opentelemetry.util.types import Attributes + +from temporalio.contrib.opentelemetry import create_tracer_provider + + +def test_replay_safe_tracer_provider_delegates_get_tracer_arguments(): + """get_tracer forwards all arguments, including attributes (1.26+), to + the wrapped provider.""" + provider = create_tracer_provider() + seen: list[tuple[str, str | None, str | None, Attributes | None]] = [] + + def recording_get_tracer( + instrumenting_module_name: str, + instrumenting_library_version: str | None = None, + schema_url: str | None = None, + attributes: Attributes | None = None, + ) -> Tracer: + seen.append( + ( + instrumenting_module_name, + instrumenting_library_version, + schema_url, + attributes, + ) + ) + return NoOpTracer() + + setattr(provider._tracer_provider, "get_tracer", recording_get_tracer) + + provider.get_tracer("mod", "1.0", "https://schema", {"k": "v"}) + + assert seen == [("mod", "1.0", "https://schema", {"k": "v"})] + + +def test_replay_safe_span_delegates_add_link(): + """add_link must delegate to the wrapped span (it previously inherited + OTel's no-op default and silently dropped links).""" + from opentelemetry.sdk.trace.export import SimpleSpanProcessor + from opentelemetry.sdk.trace.export.in_memory_span_exporter import ( + InMemorySpanExporter, + ) + + provider = create_tracer_provider() + exporter = InMemorySpanExporter() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + tracer = provider.get_tracer("add-link-test") + + linked = tracer.start_span("linked") + linked.end() + linked_context = linked.get_span_context() + + span = tracer.start_span("linker") + span.add_link(linked_context, {"k": "v"}) + span.end() + + exported = {s.name: s for s in exporter.get_finished_spans()} + links = exported["linker"].links + assert len(links) == 1 + assert links[0].context.span_id == linked_context.span_id + assert links[0].attributes and dict(links[0].attributes) == {"k": "v"} diff --git a/tests/contrib/opentelemetry/test_wrapper_abc_drift.py b/tests/contrib/opentelemetry/test_wrapper_abc_drift.py new file mode 100644 index 0000000000..132a4b8f0f --- /dev/null +++ b/tests/contrib/opentelemetry/test_wrapper_abc_drift.py @@ -0,0 +1,111 @@ +"""Drift guard: replay-safe wrappers must override the full public surface of +the OpenTelemetry ABCs they subclass. + +OpenTelemetry adds new API surface to its ABCs as non-abstract no-op defaults +(e.g. ``Meter.create_gauge`` in 1.23, ``Span.add_link`` in 1.23). Because +those defaults exist on the class, ``__getattr__`` delegation cannot intercept +them, so any method a wrapper does not explicitly override silently no-ops +instead of delegating to the wrapped instance -- swallowing telemetry for +every caller. These tests enumerate the installed ABCs by reflection so a new +opentelemetry-api release that grows surface fails loudly (notably in the +latest-dependency CI job) instead of degrading silently. +""" + +import inspect + +import pytest +from opentelemetry._logs import Logger, LoggerProvider +from opentelemetry.metrics import ( + Counter, + Histogram, + Meter, + MeterProvider, + UpDownCounter, + _Gauge, +) +from opentelemetry.trace import Span, Tracer, TracerProvider + +from temporalio.contrib.opentelemetry import ( + ReplaySafeLoggerProvider, + ReplaySafeMeterProvider, + ReplaySafeTracerProvider, +) +from temporalio.contrib.opentelemetry._logger_provider import _ReplaySafeLogger +from temporalio.contrib.opentelemetry._meter_provider import ( + _ReplaySafeCounter, + _ReplaySafeGauge, + _ReplaySafeHistogram, + _ReplaySafeMeter, + _ReplaySafeUpDownCounter, +) +from temporalio.contrib.opentelemetry._tracer_provider import ( + _ReplaySafeSpan, + _ReplaySafeTracer, +) + + +def _public_surface(abc: type) -> set[str]: + """Method names a wrapper must cover: every public callable attribute of + the ABC (which includes non-abstract no-op defaults) plus every non-dunder + abstract method. Properties are excluded: they carry instrumentation-scope + metadata, not telemetry, and inheriting them is safe.""" + surface = { + name + for name in dir(abc) + if not name.startswith("_") and callable(inspect.getattr_static(abc, name)) + } + surface.update( + name + for name in getattr(abc, "__abstractmethods__", ()) + if not name.startswith("__") + ) + return surface + + +# (wrapper, wrapped OTel ABC, intentionally inherited members). An entry in +# the third element is an explicit opt-out: add a name there only when +# inheriting the OTel default is deliberate, and say why in a comment. +_WRAPPER_CASES: list[tuple[type, type, frozenset[str]]] = [ + (_ReplaySafeMeter, Meter, frozenset()), + (ReplaySafeMeterProvider, MeterProvider, frozenset()), + (_ReplaySafeCounter, Counter, frozenset()), + (_ReplaySafeUpDownCounter, UpDownCounter, frozenset()), + (_ReplaySafeHistogram, Histogram, frozenset()), + (_ReplaySafeGauge, _Gauge, frozenset()), + (_ReplaySafeLogger, Logger, frozenset()), + (ReplaySafeLoggerProvider, LoggerProvider, frozenset()), + (_ReplaySafeTracer, Tracer, frozenset()), + (ReplaySafeTracerProvider, TracerProvider, frozenset()), + (_ReplaySafeSpan, Span, frozenset()), +] + + +@pytest.mark.parametrize( + ("wrapper", "abc", "intentionally_inherited"), + _WRAPPER_CASES, + ids=[wrapper.__name__ for wrapper, _, _ in _WRAPPER_CASES], +) +def test_wrapper_overrides_full_otel_abc_surface( + wrapper: type, abc: type, intentionally_inherited: frozenset[str] +): + surface = _public_surface(abc) + assert surface, ( + f"reflection found no public methods on {abc.__module__}.{abc.__qualname__};" + " the drift guard would be vacuous" + ) + + missing = surface - set(vars(wrapper)) - intentionally_inherited + assert not missing, ( + f"{wrapper.__name__} inherits {sorted(missing)} from" + f" {abc.__module__}.{abc.__qualname__} without overriding them. Inherited" + " OTel defaults no-op instead of delegating to the wrapped instance," + " silently dropping telemetry for all callers. Override each method" + " (delegate, wrap, or replay-gate as appropriate) or add it to this" + " test's intentionally-inherited allowlist with a comment." + ) + + stale = intentionally_inherited - surface + assert not stale, ( + f"allowlist entries {sorted(stale)} for {wrapper.__name__} are not on" + f" {abc.__module__}.{abc.__qualname__} anymore; remove them" + ) diff --git a/tests/contrib/pydantic/activities.py b/tests/contrib/pydantic/activities.py index 4b5a83d5b0..7cd4abd307 100644 --- a/tests/contrib/pydantic/activities.py +++ b/tests/contrib/pydantic/activities.py @@ -1,5 +1,4 @@ from datetime import datetime -from typing import List from uuid import UUID from temporalio import activity diff --git a/tests/contrib/pydantic/models.py b/tests/contrib/pydantic/models.py index 97e2694db6..dddeb5d7e9 100644 --- a/tests/contrib/pydantic/models.py +++ b/tests/contrib/pydantic/models.py @@ -7,12 +7,8 @@ from typing import ( Annotated, Any, - Dict, Generic, - List, - Tuple, TypeVar, - Union, cast, ) @@ -370,21 +366,21 @@ def _assert_timedelta_validity(td: timedelta): assert issubclass(td.__class__, timedelta) -PydanticModels = Union[ - StandardTypesModel, - StrictStandardTypesModel, - ComplexTypesModel, - SpecialTypesModel, - StrictSpecialTypesModel, - ParentModel, - FieldFeaturesModel, - AnnotatedFieldsModel, - GenericModel[Any], - UnionModel, - PydanticDatetimeModel, - PydanticDateModel, - PydanticTimedeltaModel, -] +PydanticModels = ( + StandardTypesModel + | StrictStandardTypesModel + | ComplexTypesModel + | SpecialTypesModel + | StrictSpecialTypesModel + | ParentModel + | FieldFeaturesModel + | AnnotatedFieldsModel + | GenericModel[Any] + | UnionModel + | PydanticDatetimeModel + | PydanticDateModel + | PydanticTimedeltaModel +) def make_list_of_pydantic_objects() -> list[PydanticModels]: @@ -419,7 +415,7 @@ def make_dataclass_objects() -> list[MyDataClass]: ComplexCustomType = tuple[list[MyDataClass], list[PydanticModels]] -ComplexCustomUnionType = list[Union[MyDataClass, PydanticModels]] +ComplexCustomUnionType = list[MyDataClass | PydanticModels] class PydanticModelWithStrictField(BaseModel): diff --git a/tests/contrib/pydantic/models_2.py b/tests/contrib/pydantic/models_2.py index decec56dfc..4794f95a4a 100644 --- a/tests/contrib/pydantic/models_2.py +++ b/tests/contrib/pydantic/models_2.py @@ -7,13 +7,7 @@ from re import Pattern from typing import ( Any, - Dict, - List, NamedTuple, - Optional, - Set, - Tuple, - Union, cast, ) diff --git a/tests/contrib/pydantic/test_pydantic.py b/tests/contrib/pydantic/test_pydantic.py index c70eee56f6..c3ab95f181 100644 --- a/tests/contrib/pydantic/test_pydantic.py +++ b/tests/contrib/pydantic/test_pydantic.py @@ -2,20 +2,31 @@ import datetime import os import pathlib +import pickle +import typing import uuid import pydantic import pytest from pydantic import BaseModel +import temporalio.contrib.pydantic from temporalio.client import Client -from temporalio.contrib.pydantic import pydantic_data_converter +from temporalio.contrib.pydantic import ( + PydanticJSONPlainPayloadConverter, + PydanticPayloadConverter, + pydantic_data_converter, +) from temporalio.worker import Worker from temporalio.worker.workflow_sandbox._restrictions import ( RestrictionContext, SandboxMatcher, _RestrictedProxy, ) +from tests.contrib.pydantic.activities import ( + misc_objects_activity, + pydantic_objects_activity, +) from tests.contrib.pydantic.models import ( PydanticModels, PydanticModelWithStrictField, @@ -35,10 +46,236 @@ RoundTripPydanticObjectsWorkflow, _test_pydantic_model_with_strict_field, clone_objects, - misc_objects_activity, - pydantic_objects_activity, ) +_MANY_TYPE_HINTS = tuple( + typing.cast(type, typing.cast(object, typing.Annotated[list[int], index])) + for index in range(1025) +) +_UNHASHABLE_TYPE_HINT = typing.cast( + type, typing.cast(object, typing.Annotated[list[int], []]) +) + + +@pytest.mark.parametrize("populate_cache", [False, True]) +def test_pydantic_json_converter_pickle(populate_cache: bool): + class Model(BaseModel): + value: int + default: int = 0 + + converter = PydanticJSONPlainPayloadConverter( + temporalio.contrib.pydantic.ToJsonOptions(exclude_unset=True), + max_cached_type_adapters=2, + ) + value = Model(value=1) + payload = converter.to_payload(value) + assert payload is not None + if populate_cache: + assert converter.from_payload(payload, Model) == value + cache_info = converter._type_adapter.cache_info() + + restored = pickle.loads(pickle.dumps(converter)) + + assert converter._type_adapter.cache_info() == cache_info + assert restored._type_adapter.cache_info().maxsize == 2 + assert restored._type_adapter.cache_info().currsize == 0 + assert restored.to_payload(value) == payload + assert payload.data == b'{"value":1}' + assert restored.from_payload(payload, Model) == value + assert restored.from_payload(payload, Model) == value + assert restored._type_adapter.cache_info().hits == 1 + + +class AliasModel(BaseModel): + order_id: int = pydantic.Field(default=-1, alias="orderId") + note: str = "" + ratio: float = 1.0 + wait: datetime.timedelta = datetime.timedelta(seconds=1) + data: bytes = b"data" + + +@pytest.mark.parametrize( + "value", + [ + AliasModel(orderId=7), + float("inf"), + float("-inf"), + float("nan"), + [float("inf"), 1.5, float("nan")], + {"ratio": float("inf")}, + {"wait": datetime.timedelta(minutes=1), "data": b"data"}, + ], +) +def test_to_json_options_wire_format_matches_default(value: object): + default_payload = PydanticJSONPlainPayloadConverter().to_payload(value) + for options in ( + temporalio.contrib.pydantic.ToJsonOptions(), + temporalio.contrib.pydantic.ToJsonOptions(exclude_unset=False), + ): + options_payload = PydanticJSONPlainPayloadConverter(options).to_payload(value) + assert default_payload is not None + assert options_payload is not None + assert options_payload.data == default_payload.data + + +def test_to_json_options_exclude_unset_keeps_aliases(): + converter = PydanticJSONPlainPayloadConverter( + temporalio.contrib.pydantic.ToJsonOptions(exclude_unset=True) + ) + payload = converter.to_payload(AliasModel(orderId=7)) + assert payload is not None + assert payload.data == b'{"orderId":7}' + assert converter.from_payload(payload, AliasModel) == AliasModel(orderId=7) + + +async def test_pydantic_data_converter_pickle(): + restored = pickle.loads(pickle.dumps(pydantic_data_converter)) + value = {"a": 1} + assert await restored.decode(await restored.encode([value]), [dict]) == [value] + + +@pytest.mark.parametrize( + ( + "converter_kwargs", + "type_hints", + "expected_type_adapter_constructions", + ), + [ + # Default caches repeated hints + ({}, (list[int], list[int]), 1), + # Zero disables caching + ({"max_cached_type_adapters": 0}, (list[int], list[int]), 2), + # Unhashable hints bypass the cache + ({}, (_UNHASHABLE_TYPE_HINT, _UNHASHABLE_TYPE_HINT), 2), + # Default bound is 1024: 1025 distinct hints evict the first + ({}, _MANY_TYPE_HINTS + (_MANY_TYPE_HINTS[0],), 1026), + # None is unbounded: no eviction + ( + {"max_cached_type_adapters": None}, + _MANY_TYPE_HINTS + (_MANY_TYPE_HINTS[0],), + 1025, + ), + # Explicit bound evicts least recently used + ( + {"max_cached_type_adapters": 1}, + (list[int], _MANY_TYPE_HINTS[0], list[int]), + 3, + ), + ], +) +def test_type_adapter_reuse( + monkeypatch: pytest.MonkeyPatch, + converter_kwargs: dict[str, typing.Any], + type_hints: tuple[type, ...], + expected_type_adapter_constructions: int, +): + actual_type_adapter = pydantic.TypeAdapter + type_adapter_constructions = 0 + + def counting_type_adapter( + type_hint: typing.Any, + ) -> pydantic.TypeAdapter[typing.Any]: + nonlocal type_adapter_constructions + type_adapter_constructions += 1 + return actual_type_adapter(type_hint) + + monkeypatch.setattr( + "temporalio.contrib.pydantic.TypeAdapter", counting_type_adapter + ) + converter = PydanticJSONPlainPayloadConverter(**converter_kwargs) + payload = converter.to_payload([1]) + assert payload is not None + for type_hint in type_hints: + assert converter.from_payload(payload, type_hint) == [1] + assert type_adapter_constructions == expected_type_adapter_constructions + + +@pytest.mark.parametrize( + ("max_cached_type_adapters", "expected_type_adapter_constructions"), + [(None, 1), (0, 2)], +) +def test_composite_converter_forwards_type_adapter_cache_size( + monkeypatch: pytest.MonkeyPatch, + max_cached_type_adapters: int | None, + expected_type_adapter_constructions: int, +): + actual_type_adapter = pydantic.TypeAdapter + type_adapter_constructions = 0 + + def counting_type_adapter( + type_hint: typing.Any, + ) -> pydantic.TypeAdapter[typing.Any]: + nonlocal type_adapter_constructions + type_adapter_constructions += 1 + return actual_type_adapter(type_hint) + + monkeypatch.setattr( + "temporalio.contrib.pydantic.TypeAdapter", counting_type_adapter + ) + converter = PydanticPayloadConverter( + max_cached_type_adapters=max_cached_type_adapters + ) + payloads = converter.to_payloads([[1], [2]]) + assert converter.from_payloads(payloads, [list[int], list[int]]) == [[1], [2]] + assert type_adapter_constructions == expected_type_adapter_constructions + + +def test_type_adapter_reuse_across_threads_with_deferred_build(): + import concurrent.futures + + class DeferredModel(BaseModel): + model_config = pydantic.ConfigDict(defer_build=True) + value: int + + converter = PydanticJSONPlainPayloadConverter() + payload = converter.to_payload(DeferredModel(value=1)) + assert payload is not None + + def decode() -> DeferredModel: + return converter.from_payload(payload, DeferredModel) + + with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor: + results = list(executor.map(lambda _: decode(), range(64))) + assert all(result == DeferredModel(value=1) for result in results) + + +def test_type_adapter_cache_distinguishes_reimported_classes(): + # The workflow sandbox re-imports user modules, producing distinct class + # objects with identical names. Class hints hash by identity, so each + # world's class must get its own cache slot and validate to itself. + import types + + source = "from pydantic import BaseModel\n\nclass Foo(BaseModel):\n name: str\n" + + def load_module() -> types.ModuleType: + module = types.ModuleType("test_reimported_models") + exec(compile(source, "test_reimported_models.py", "exec"), module.__dict__) + return module + + foo_outside = load_module().Foo + foo_sandbox = load_module().Foo + assert foo_outside is not foo_sandbox + assert hash(foo_outside) != hash(foo_sandbox) + + # Worst case: one converter shared across both worlds (the real sandbox + # creates a separate converter per workflow instance). + converter = PydanticJSONPlainPayloadConverter() + payload = converter.to_payload(foo_outside(name="x")) + assert payload is not None + decoded_outside = converter.from_payload(payload, foo_outside) + decoded_sandbox = converter.from_payload(payload, foo_sandbox) + assert type(decoded_outside) is foo_outside + assert type(decoded_sandbox) is foo_sandbox + + +@pytest.mark.parametrize( + "converter_type", + [PydanticJSONPlainPayloadConverter, PydanticPayloadConverter], +) +def test_type_adapter_cache_rejects_negative_size(converter_type: type): + with pytest.raises(ValueError, match="max_cached_type_adapters cannot be negative"): + converter_type(max_cached_type_adapters=-1) + async def test_instantiation_outside_sandbox(): make_list_of_pydantic_objects() diff --git a/tests/contrib/pydantic/workflows.py b/tests/contrib/pydantic/workflows.py index d67e7db426..4733dec4cf 100644 --- a/tests/contrib/pydantic/workflows.py +++ b/tests/contrib/pydantic/workflows.py @@ -1,6 +1,5 @@ import dataclasses from datetime import datetime, timedelta -from typing import List from uuid import UUID from pydantic import BaseModel, create_model @@ -26,7 +25,7 @@ def clone_objects(objects: list[PydanticModels]) -> list[PydanticModels]: new_objects = [] for o in objects: fields = {} - for name, f in o.model_fields.items(): + for name, f in o.model_fields.items(): # type: ignore[reportDeprecated] fields[name] = (f.annotation, f) model = create_model(o.__class__.__name__, **fields) # type: ignore new_objects.append(model(**o.model_dump(by_alias=True))) @@ -171,5 +170,5 @@ async def run( @workflow.defn class NoTypeAnnotationsWorkflow: @workflow.run - async def run(self, arg): + async def run(self, arg): # type: ignore[reportMissingParameterType] return arg diff --git a/tests/contrib/workflow_streams/__init__.py b/tests/contrib/workflow_streams/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/contrib/workflow_streams/test_closed_streams.py b/tests/contrib/workflow_streams/test_closed_streams.py new file mode 100644 index 0000000000..d032bc2e12 --- /dev/null +++ b/tests/contrib/workflow_streams/test_closed_streams.py @@ -0,0 +1,620 @@ +"""Closed-run stream reads and subscription run isolation.""" + +from __future__ import annotations + +import asyncio +import json +import uuid +from dataclasses import dataclass +from datetime import timedelta +from types import SimpleNamespace +from typing import Any +from unittest.mock import AsyncMock, MagicMock, patch + +import pytest + +from temporalio import workflow +from temporalio.client import ( + Client, + WorkflowExecutionStatus, + WorkflowHandle, + WorkflowQueryFailedError, + WorkflowQueryRejectedError, + WorkflowUpdateFailedError, + WorkflowUpdateRPCTimeoutOrCancelledError, +) +from temporalio.common import QueryRejectCondition, RawValue +from temporalio.contrib.workflow_streams import ( + PollInput, + PollResult, + WorkflowStream, + WorkflowStreamClient, +) +from temporalio.contrib.workflow_streams._types import ( + _decode_payload, + _WorkflowStreamWireItem, +) +from temporalio.converter import DataConverter +from temporalio.exceptions import ApplicationError +from temporalio.service import RPCError, RPCStatusCode +from tests.helpers import assert_eq_eventually, new_worker + +POLL = "__temporal_workflow_stream_poll" +WIRE_ABC = "ChgKCGVuY29kaW5nEgxiaW5hcnkvcGxhaW4SA2FiYw==" +TERMINAL_STATUSES = [ + WorkflowExecutionStatus.COMPLETED, + WorkflowExecutionStatus.FAILED, + WorkflowExecutionStatus.CANCELED, + WorkflowExecutionStatus.TERMINATED, + WorkflowExecutionStatus.TIMED_OUT, +] + + +def mock_stream( + status: WorkflowExecutionStatus = WorkflowExecutionStatus.COMPLETED, +) -> tuple[WorkflowStreamClient, Any, Any, Any]: + client = MagicMock(spec=Client) + client.data_converter = DataConverter.default + poll = MagicMock(spec=WorkflowHandle) + poll.id = "workflow" + poll._client = client + poll.start_update = AsyncMock( + side_effect=RPCError("closed", RPCStatusCode.NOT_FOUND, b"") + ) + poll.describe = AsyncMock( + return_value=SimpleNamespace(status=status, run_id="closed-run") + ) + read = MagicMock(spec=WorkflowHandle) + read.describe = poll.describe + read.query = AsyncMock(return_value=PollResult()) + client.get_workflow_handle.return_value = read + return WorkflowStreamClient(poll, client=client), client, poll, read + + +@pytest.mark.parametrize("status", TERMINAL_STATUSES) +async def test_workflow_streams_terminal_pages(status: WorkflowExecutionStatus) -> None: + stream, client, poll, read = mock_stream(status) + read.query.side_effect = [ + PollResult([_WorkflowStreamWireItem("events", WIRE_ABC, 3)], 4, True), + PollResult([_WorkflowStreamWireItem("events", WIRE_ABC, 5)], 6, False), + ] + items = [item async for item in stream.subscribe("events", 3, result_type=bytes)] + assert [(item.offset, item.data) for item in items] == [(3, b"abc"), (5, b"abc")] + client.get_workflow_handle.assert_called_once_with("workflow", run_id="closed-run") + assert poll.start_update.await_count == 1 + assert [call.args for call in read.query.await_args_list] == [ + (POLL, PollInput(["events"], 3)), + (POLL, PollInput(["events"], 4)), + ] + + +async def test_workflow_streams_direct_handle_keeps_default_converter() -> None: + _, client, poll, read = mock_stream() + read.query.return_value = PollResult( + [_WorkflowStreamWireItem("events", WIRE_ABC, 0)], 1 + ) + stream = WorkflowStreamClient(poll) + items = [item async for item in stream.subscribe(result_type=RawValue)] + assert items[0].data.payload.data == b"abc" + client.get_workflow_handle.assert_called_once_with("workflow", run_id="closed-run") + + +async def test_workflow_streams_update_to_query_resumes_at_next_offset() -> None: + stream, client, poll, read = mock_stream() + poll.start_update.side_effect = [ + SimpleNamespace( + workflow_run_id="closed-run", + result=AsyncMock( + return_value=PollResult( + [_WorkflowStreamWireItem("events", WIRE_ABC, i) for i in (0, 1)], + 2, + True, + ) + ), + ), + SimpleNamespace( + workflow_run_id="closed-run", + result=AsyncMock( + return_value=PollResult( + [_WorkflowStreamWireItem("events", WIRE_ABC, 2)], 3 + ) + ), + ), + SimpleNamespace( + workflow_run_id="closed-run", + result=AsyncMock( + side_effect=WorkflowUpdateFailedError( + ApplicationError("closed", type="AcceptedUpdateCompletedWorkflow") + ) + ), + ), + ] + read.query.side_effect = [ + PollResult([_WorkflowStreamWireItem("events", WIRE_ABC, 3)], 4, True), + PollResult([_WorkflowStreamWireItem("events", WIRE_ABC, 4)], 5), + ] + items = [ + item + async for item in stream.subscribe( + "events", result_type=bytes, poll_cooldown=timedelta(0) + ) + ] + assert [(item.offset, item.data) for item in items] == [ + (i, b"abc") for i in range(5) + ] + assert [call.args for call in poll.start_update.await_args_list] == [ + (POLL, PollInput(["events"], offset)) for offset in (0, 2, 3) + ] + assert [call.args for call in read.query.await_args_list] == [ + (POLL, PollInput(["events"], offset)) for offset in (3, 4) + ] + read.describe.assert_awaited_once() + assert client.get_workflow_handle.call_count == 2 + for call in client.get_workflow_handle.call_args_list: + assert call.args == ("workflow",) + assert call.kwargs == {"run_id": "closed-run"} + + +@pytest.mark.parametrize( + "failure", ["running", "unknown", "missing_run", "describe", "query"] +) +async def test_workflow_streams_unconfirmed_closure_and_query_errors( + failure: str, +) -> None: + stream, _, poll, read = mock_stream() + expected: Exception + if failure in ("running", "unknown", "missing_run"): + if failure == "missing_run": + poll.describe.return_value.run_id = "" + else: + poll.describe.return_value.status = ( + WorkflowExecutionStatus.RUNNING if failure == "running" else None + ) + expected = poll.start_update.side_effect + elif failure == "describe": + poll.describe.side_effect = RPCError("missing", RPCStatusCode.NOT_FOUND, b"") + expected = poll.start_update.side_effect + else: + expected = WorkflowQueryFailedError("missing handler or query rejected") + read.query.side_effect = expected + with pytest.raises(type(expected)) as err: + _ = [item async for item in stream.subscribe()] + assert err.value is expected + + +@pytest.mark.parametrize("accepted", [False, True]) +@pytest.mark.parametrize("failure", ["rpc", "update", "timeout"]) +async def test_workflow_streams_describe_failure_preserves_poll_error( + accepted: bool, failure: str +) -> None: + stream, _, poll, read = mock_stream() + expected: Exception + if failure == "rpc": + expected = RPCError("poll failed", RPCStatusCode.UNAVAILABLE, b"") + elif failure == "update": + expected = WorkflowUpdateFailedError(ApplicationError("poll failed")) + else: + expected = WorkflowUpdateRPCTimeoutOrCancelledError() + cause = expected.__cause__ + poll.describe.side_effect = RPCError( + "describe failed", RPCStatusCode.NOT_FOUND, b"" + ) + if accepted: + poll.start_update.side_effect = None + poll.start_update.return_value = SimpleNamespace( + workflow_run_id="closed-run", result=AsyncMock(side_effect=expected) + ) + else: + poll.start_update.side_effect = expected + with pytest.raises(type(expected)) as err: + _ = [item async for item in stream.subscribe()] + assert err.value is expected + assert err.value.__cause__ is cause + read.query.assert_not_awaited() + + +async def test_workflow_streams_describe_cancellation_propagates() -> None: + stream, _, poll, read = mock_stream() + poll.describe.side_effect = asyncio.CancelledError + with pytest.raises(asyncio.CancelledError): + _ = [item async for item in stream.subscribe()] + read.query.assert_not_awaited() + + +async def test_workflow_streams_run_tracking_is_local_to_each_attempt() -> None: + stream, client, poll, _ = mock_stream() + admitted: asyncio.Queue[str] = asyncio.Queue() + outcomes: dict[str, asyncio.Future[PollResult]] = {} + reads: dict[str, Any] = {} + + async def start_update(*_args: Any, **_kwargs: Any) -> Any: + run_id = f"run-{len(outcomes)}" + future: asyncio.Future[PollResult] = asyncio.get_running_loop().create_future() + outcomes[run_id] = future + admitted.put_nowait(run_id) + return SimpleNamespace(workflow_run_id=run_id, result=lambda: future) + + def pinned_handle(workflow_id: str, *, run_id: str | None = None) -> Any: + assert workflow_id == "workflow" + assert run_id is not None + if run_id not in reads: + read = MagicMock(spec=WorkflowHandle) + read.describe = AsyncMock( + return_value=SimpleNamespace( + status=WorkflowExecutionStatus.COMPLETED, run_id=run_id + ) + ) + read.query = AsyncMock( + return_value=PollResult( + [_WorkflowStreamWireItem(run_id, WIRE_ABC, 0)], 1 + ) + ) + reads[run_id] = read + return reads[run_id] + + poll.start_update.side_effect = start_update + client.get_workflow_handle.side_effect = pinned_handle + + async def consume() -> list[str]: + return [item.topic async for item in stream.subscribe()] + + first = asyncio.create_task(consume()) + assert await admitted.get() == "run-0" + second = asyncio.create_task(consume()) + assert await admitted.get() == "run-1" + for run_id in ["run-1", "run-0"]: + outcomes[run_id].set_exception( + WorkflowUpdateFailedError( + ApplicationError("closed", type="AcceptedUpdateCompletedWorkflow") + ) + ) + assert await first == ["run-0"] + assert await second == ["run-1"] + + +async def test_workflow_streams_continue_as_new_resets_accepted_run() -> None: + stream, client, poll, read = mock_stream() + accepted = SimpleNamespace( + workflow_run_id="old-run", + result=AsyncMock( + side_effect=WorkflowUpdateFailedError( + ApplicationError("closed", type="AcceptedUpdateCompletedWorkflow") + ) + ), + ) + poll.start_update.side_effect = None + poll.start_update.return_value = accepted + old = MagicMock(spec=WorkflowHandle) + old.describe = AsyncMock( + return_value=SimpleNamespace( + status=WorkflowExecutionStatus.CONTINUED_AS_NEW, run_id="old-run" + ) + ) + successor = MagicMock(spec=WorkflowHandle) + successor._client = client + successor.start_update = AsyncMock( + side_effect=RPCError("closed", RPCStatusCode.NOT_FOUND, b"") + ) + successor.describe = AsyncMock( + return_value=SimpleNamespace( + status=WorkflowExecutionStatus.COMPLETED, run_id="successor-run" + ) + ) + read.query.return_value = PollResult( + [_WorkflowStreamWireItem("events", WIRE_ABC, 0)], 1 + ) + + def get_handle(workflow_id: str, *, run_id: str | None = None) -> Any: + assert workflow_id == "workflow" + return old if run_id == "old-run" else successor if run_id is None else read + + client.get_workflow_handle.side_effect = get_handle + assert [item.data async for item in stream.subscribe()] == [b"abc"] + old.describe.assert_awaited_once() + successor.describe.assert_awaited_once() + assert client.get_workflow_handle.call_args_list[-1].kwargs == { + "run_id": "successor-run" + } + + +async def test_workflow_streams_shared_wire_vector() -> None: + converter = DataConverter.default + request = '{"topics":["events"],"from_offset":3}' + response = ( + '{"items":[{"topic":"events","data":"' + + WIRE_ABC + + '","offset":3}],"next_offset":4,"more_ready":false}' + ) + for value, expected in [ + (PollInput(["events"], 3), request), + (PollResult([_WorkflowStreamWireItem("events", WIRE_ABC, 3)], 4), response), + ]: + payloads = await converter.encode([value]) + assert json.loads(payloads[0].data) == json.loads(expected) + decoded = (await converter.decode(payloads, [type(value)]))[0] + assert decoded == value + assert _decode_payload(WIRE_ABC).data == b"abc" + assert _decode_payload(WIRE_ABC).metadata == {"encoding": b"binary/plain"} + + +@dataclass +class ClosedStreamInput: + count: int = 3 + size: int = 1 + truncate: int = 0 + fail: bool = False + tail: bool = False + + +@workflow.defn +class ClosedStreamWorkflow: + @workflow.init + def __init__(self, arg: ClosedStreamInput) -> None: + self.stream = WorkflowStream() + self.closed = False + + @workflow.signal + def close(self) -> None: + self.closed = True + + @workflow.signal + def detach(self) -> None: + self.stream.detach_pollers() + + @workflow.run + async def run(self, arg: ClosedStreamInput) -> None: + for i in range(arg.count): + self.stream.topic("events" if i % 2 == 0 else "other").publish( + bytes([i]) * arg.size + ) + self.stream.truncate(arg.truncate) + await workflow.wait_condition(lambda: self.closed) + if arg.tail: + self.stream.topic("events").publish(b"tail") + if arg.fail: + raise ApplicationError("closed stream failure") + + +@pytest.mark.parametrize("status", TERMINAL_STATUSES) +async def test_workflow_streams_read_after_terminal_cold_replay( + client: Client, status: WorkflowExecutionStatus +) -> None: + async with new_worker( + client, ClosedStreamWorkflow, max_cached_workflows=0 + ) as worker: + handle = await client.start_workflow( + ClosedStreamWorkflow.run, + ClosedStreamInput(fail=status == WorkflowExecutionStatus.FAILED), + id=f"closed-stream-{uuid.uuid4()}", + task_queue=worker.task_queue, + run_timeout=timedelta(seconds=2) + if status == WorkflowExecutionStatus.TIMED_OUT + else None, + ) + stream = WorkflowStreamClient(handle) + await assert_eq_eventually(3, stream.get_offset) + if status == WorkflowExecutionStatus.CANCELED: + await handle.cancel() + elif status == WorkflowExecutionStatus.TERMINATED: + await handle.terminate() + elif status != WorkflowExecutionStatus.TIMED_OUT: + await handle.signal(ClosedStreamWorkflow.close) + + async def execution_status() -> WorkflowExecutionStatus: + status = (await handle.describe()).status + assert status is not None + return status + + await assert_eq_eventually(status, execution_status) + before = await handle.fetch_history() + items = [item async for item in stream.subscribe(result_type=bytes)] + assert [item.data for item in items] == [b"\x00", b"\x01", b"\x02"] + assert [item.offset for item in items] == [0, 1, 2] + assert (await handle.fetch_history()).events == before.events + + +@pytest.mark.parametrize( + "arg,topics,offset,expected", + [ + (ClosedStreamInput(count=0), None, 0, []), + (ClosedStreamInput(), ["missing"], 0, []), + (ClosedStreamInput(), None, 1, [1, 2]), + (ClosedStreamInput(), None, 3, []), + (ClosedStreamInput(), None, 10, []), + (ClosedStreamInput(count=6, truncate=3), None, 1, [3, 4, 5]), + (ClosedStreamInput(count=8, size=200_000), None, 0, list(range(8))), + (ClosedStreamInput(count=8, size=200_000), ["events"], 0, [0, 2, 4, 6]), + ], +) +async def test_workflow_streams_closed_retention_and_pagination( + client: Client, + arg: ClosedStreamInput, + topics: list[str] | None, + offset: int, + expected: list[int], +) -> None: + async with new_worker(client, ClosedStreamWorkflow) as worker: + handle = await client.start_workflow( + ClosedStreamWorkflow.run, + arg, + id=f"closed-stream-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal(ClosedStreamWorkflow.close) + await handle.result() + stream = WorkflowStreamClient.create(client, handle.id) + items = [ + item async for item in stream.subscribe(topics, offset, result_type=bytes) + ] + assert [item.offset for item in items] == expected + assert [item.data for item in items] == [ + bytes([i]) * arg.size for i in expected + ] + + +@pytest.mark.filterwarnings( + "ignore::temporalio.workflow.UnfinishedUpdateHandlersWarning" +) +async def test_workflow_streams_accepted_poll_drains_unread_tail( + client: Client, +) -> None: + async with new_worker(client, ClosedStreamWorkflow) as worker: + handle = await client.start_workflow( + ClosedStreamWorkflow.run, + ClosedStreamInput(tail=True), + id=f"closed-stream-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + stream = WorkflowStreamClient(handle) + await assert_eq_eventually(3, stream.get_offset) + accepted = asyncio.Event() + original_start = handle.start_update + + async def start(*args: Any, **kwargs: Any) -> Any: + update = await original_start(*args, **kwargs) + if args[1].from_offset == 3: + accepted.set() + return update + + async def consume() -> list[tuple[int, bytes]]: + return [ + (item.offset, item.data) + async for item in stream.subscribe( + result_type=bytes, poll_cooldown=timedelta(0) + ) + ] + + with patch.object(handle, "start_update", side_effect=start): + task = asyncio.create_task(consume()) + await accepted.wait() + await handle.signal(ClosedStreamWorkflow.close) + assert await task == [ + (0, b"\x00"), + (1, b"\x01"), + (2, b"\x02"), + (3, b"tail"), + ] + + +async def test_workflow_streams_query_is_immediate_while_draining( + client: Client, +) -> None: + async with new_worker(client, ClosedStreamWorkflow) as worker: + handle = await client.start_workflow( + ClosedStreamWorkflow.run, + ClosedStreamInput(count=6, truncate=3), + id=f"closed-stream-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal(ClosedStreamWorkflow.detach) + result = await handle.query(POLL, PollInput([], 1), result_type=PollResult) + assert [item.offset for item in result.items] == [3, 4, 5] + empty = await handle.query( + POLL, PollInput(["missing"], 6), result_type=PollResult + ) + assert empty == PollResult([], 6) + await handle.signal(ClosedStreamWorkflow.close) + await handle.result() + + +async def test_workflow_streams_closed_codec_and_raw_conversion(client: Client) -> None: + from tests.test_converter import SimpleCodec + + config = client.config() + config["data_converter"] = DataConverter(payload_codec=SimpleCodec()) + codec_client = Client(**config) + async with new_worker( + codec_client, ClosedStreamWorkflow, max_cached_workflows=0 + ) as worker: + handle = await codec_client.start_workflow( + ClosedStreamWorkflow.run, + ClosedStreamInput(), + id=f"closed-stream-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal(ClosedStreamWorkflow.close) + await handle.result() + stream = WorkflowStreamClient.create(codec_client, handle.id) + typed = [item.data async for item in stream.subscribe(result_type=bytes)] + raw = [ + item.data.payload.data + async for item in stream.subscribe(result_type=RawValue) + ] + assert typed == raw == [b"\x00", b"\x01", b"\x02"] + + +async def test_workflow_streams_closed_explicit_run_after_workflow_id_reuse( + client: Client, +) -> None: + async with new_worker(client, ClosedStreamWorkflow) as worker: + workflow_id = f"closed-stream-{uuid.uuid4()}" + old = await client.start_workflow( + ClosedStreamWorkflow.run, + ClosedStreamInput(), + id=workflow_id, + task_queue=worker.task_queue, + ) + await old.signal(ClosedStreamWorkflow.close) + await old.result() + new = await client.start_workflow( + ClosedStreamWorkflow.run, + ClosedStreamInput(count=1), + id=workflow_id, + task_queue=worker.task_queue, + ) + pinned = WorkflowStreamClient( + client.get_workflow_handle(workflow_id, run_id=old.result_run_id) + ) + + async def consume() -> list[int]: + return [item.offset async for item in pinned.subscribe()] + + assert await asyncio.gather(consume(), consume()) == [[0, 1, 2], [0, 1, 2]] + await new.signal(ClosedStreamWorkflow.close) + await new.result() + latest = WorkflowStreamClient.create(client, workflow_id) + assert [item.offset async for item in latest.subscribe()] == [0] + + +@workflow.defn +class LegacyClosedStreamWorkflow: + @workflow.run + async def run(self) -> None: + pass + + +async def test_workflow_streams_missing_query_and_configured_query_rejection( + client: Client, +) -> None: + async with new_worker( + client, ClosedStreamWorkflow, LegacyClosedStreamWorkflow + ) as worker: + legacy = await client.start_workflow( + LegacyClosedStreamWorkflow.run, + id=f"closed-stream-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await legacy.result() + with pytest.raises(WorkflowQueryFailedError): + _ = [item async for item in WorkflowStreamClient(legacy).subscribe()] + + handle = await client.start_workflow( + ClosedStreamWorkflow.run, + ClosedStreamInput(), + id=f"closed-stream-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal(ClosedStreamWorkflow.close) + await handle.result() + config = client.config() + config["default_workflow_query_reject_condition"] = ( + QueryRejectCondition.NOT_OPEN + ) + stream = WorkflowStreamClient.create(Client(**config), handle.id) + with pytest.raises(WorkflowQueryRejectedError): + _ = [item async for item in stream.subscribe()] + + missing = WorkflowStreamClient.create(client, f"missing-{uuid.uuid4()}") + with pytest.raises(RPCError) as err: + _ = [item async for item in missing.subscribe()] + assert err.value.status == RPCStatusCode.NOT_FOUND diff --git a/tests/contrib/workflow_streams/test_payload_roundtrip.py b/tests/contrib/workflow_streams/test_payload_roundtrip.py new file mode 100644 index 0000000000..545d3a4051 --- /dev/null +++ b/tests/contrib/workflow_streams/test_payload_roundtrip.py @@ -0,0 +1,137 @@ +"""Regression guards for the workflow_streams Payload wire format. + +1. The default JSON converter does not handle ``Payload`` embedded in a + dataclass — serialization fails with ``TypeError``. This rules out a + naive nested-Payload wire format. +2. A proto-serialized ``Payload`` inside a dataclass does round-trip. + This is the wire format used: base64 of ``Payload.SerializeToString()`` + inside ``PublishEntry``/``_WorkflowStreamWireItem``, surfacing + ``Payload`` (or a decoded value via ``result_type=``) at the user API. +""" + +from __future__ import annotations + +import base64 +import uuid +from dataclasses import dataclass, field + +import pytest + +from temporalio import workflow +from temporalio.api.common.v1 import Payload +from temporalio.client import Client +from tests.helpers import new_worker + + +@dataclass +class NestedPayloadEnvelope: + items: list[Payload] = field(default_factory=list) + + +@dataclass +class SerializedEntry: + topic: str + data: str # base64(Payload.SerializeToString()) + + +@dataclass +class SerializedEnvelope: + items: list[SerializedEntry] = field(default_factory=list) + + +@workflow.defn +class NestedPayloadWorkflow: + def __init__(self) -> None: + self._received: NestedPayloadEnvelope | None = None + + @workflow.signal + def receive(self, envelope: NestedPayloadEnvelope) -> None: + self._received = envelope + + @workflow.query + def decoded_strings(self) -> list[str]: + assert self._received is not None + conv = workflow.payload_converter() + return [conv.from_payload(p, str) for p in self._received.items] + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._received is not None) + + +@workflow.defn +class SerializedPayloadWorkflow: + def __init__(self) -> None: + self._received: SerializedEnvelope | None = None + + @workflow.signal + def receive(self, envelope: SerializedEnvelope) -> None: + self._received = envelope + + @workflow.query + def decoded_strings(self) -> list[str]: + assert self._received is not None + conv = workflow.payload_converter() + out: list[str] = [] + for entry in self._received.items: + p = Payload() + p.ParseFromString(base64.b64decode(entry.data)) + out.append(conv.from_payload(p, str)) + return out + + @workflow.query + def topics(self) -> list[str]: + assert self._received is not None + return [e.topic for e in self._received.items] + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._received is not None) + + +@pytest.mark.asyncio +async def test_nested_payload_in_dataclass_fails(client: Client) -> None: + """Confirm the load-bearing negative result: Payload inside dataclass doesn't serialize.""" + conv = client.data_converter.payload_converter + payloads = [conv.to_payloads([v])[0] for v in ["hello", "world"]] + envelope = NestedPayloadEnvelope(items=payloads) + + async with new_worker(client, NestedPayloadWorkflow) as worker: + handle = await client.start_workflow( + NestedPayloadWorkflow.run, + id=f"nested-payload-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + with pytest.raises(TypeError, match="Payload is not JSON serializable"): + await handle.signal(NestedPayloadWorkflow.receive, envelope) + await handle.terminate() + + +@pytest.mark.asyncio +async def test_serialized_payload_fallback_round_trips(client: Client) -> None: + """Proto-serialize Payload -> base64 -> dataclass round-trips through signal.""" + conv = client.data_converter.payload_converter + originals = ["hello", "world", "payload"] + payloads = [conv.to_payloads([v])[0] for v in originals] + envelope = SerializedEnvelope( + items=[ + SerializedEntry( + topic=f"t{i}", + data=base64.b64encode(p.SerializeToString()).decode("ascii"), + ) + for i, p in enumerate(payloads) + ] + ) + + async with new_worker(client, SerializedPayloadWorkflow) as worker: + handle = await client.start_workflow( + SerializedPayloadWorkflow.run, + id=f"serialized-payload-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal(SerializedPayloadWorkflow.receive, envelope) + decoded = await handle.query(SerializedPayloadWorkflow.decoded_strings) + assert decoded == originals + topics = await handle.query(SerializedPayloadWorkflow.topics) + assert topics == ["t0", "t1", "t2"] + await handle.result() diff --git a/tests/contrib/workflow_streams/test_workflow_streams.py b/tests/contrib/workflow_streams/test_workflow_streams.py new file mode 100644 index 0000000000..a61db95f9e --- /dev/null +++ b/tests/contrib/workflow_streams/test_workflow_streams.py @@ -0,0 +1,2850 @@ +"""E2E integration tests for temporalio.contrib.workflow_streams.""" + +from __future__ import annotations + +import asyncio +import uuid +from asyncio import timeout as _async_timeout +from collections.abc import Sequence +from dataclasses import dataclass +from datetime import timedelta +from typing import Any, cast +from unittest.mock import patch + +import google.protobuf.duration_pb2 +import nexusrpc +import nexusrpc.handler +import pytest + +import temporalio.api.common.v1 +import temporalio.api.nexus.v1 +import temporalio.api.operatorservice.v1 +import temporalio.api.workflowservice.v1 +from temporalio import activity, nexus, workflow +from temporalio.client import ( + Client, + WorkflowHandle, + WorkflowUpdateFailedError, + WorkflowUpdateStage, +) +from temporalio.common import RawValue +from temporalio.contrib.workflow_streams import ( + PollInput, + PollResult, + PublishEntry, + PublishInput, + TopicHandle, + WorkflowStream, + WorkflowStreamClient, + WorkflowStreamItem, + WorkflowStreamState, + WorkflowTopicHandle, +) +from temporalio.contrib.workflow_streams._types import _encode_payload +from temporalio.converter import DataConverter, PayloadCodec +from temporalio.exceptions import ActivityError, ApplicationError +from temporalio.nexus import WorkflowRunOperationContext, workflow_run_operation +from temporalio.service import RPCError, RPCStatusCode +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from tests.helpers import assert_eq_eventually, new_worker +from tests.helpers.nexus import make_nexus_endpoint_name + + +def _wire_bytes(data: bytes) -> str: + """Build a PublishEntry.data string from raw bytes. + + Mirrors what :class:`WorkflowStreamClient` produces on the encode path: + default payload converter turns the bytes into a ``Payload``, which + is then proto-serialized and base64-encoded for the wire. + """ + payload = DataConverter.default.payload_converter.to_payloads([data])[0] + return _encode_payload(payload) + + +class FailingEncodePayloadCodec(PayloadCodec): + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + raise RuntimeError("payload codec encode failed") + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return list(payloads) + + +# --------------------------------------------------------------------------- +# Test workflows (must be module-level, not local classes) +# --------------------------------------------------------------------------- + + +@workflow.defn +class BasicWorkflowStreamWorkflow: + @workflow.init + def __init__(self) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class CancelSubscriptionWorkflow: + @workflow.init + def __init__(self) -> None: + self.stream = WorkflowStream() + self._cancel_requested = False + + @workflow.signal + def cancel_subscription(self) -> None: + self._cancel_requested = True + + @workflow.run + async def run(self) -> str: + self.stream.topic("events", type=bytes).publish(b"seed") + handle = workflow.start_activity( + "subscribe_until_cancelled", + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=1), + cancellation_type=workflow.ActivityCancellationType.WAIT_CANCELLATION_COMPLETED, + ) + await workflow.wait_condition(lambda: self._cancel_requested) + handle.cancel() + try: + result = await handle + except ActivityError as err: + result = type(err.cause).__name__ + self.stream.detach_pollers() + await workflow.wait_condition(workflow.all_handlers_finished) + return result + + +@workflow.defn +class ActivityPublishWorkflow: + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self, count: int) -> None: + await workflow.execute_activity( + "publish_items", + count, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=10), + ) + self.stream.topic("status", type=bytes).publish(b"activity_done") + await workflow.wait_condition(lambda: self._closed) + + +@dataclass +class AgentEvent: + kind: str + payload: dict[str, Any] + + +@workflow.defn +class StructuredPublishWorkflow: + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self, count: int) -> None: + for i in range(count): + self.stream.topic("events", type=AgentEvent).publish( + AgentEvent(kind="tick", payload={"i": i}) + ) + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class TopicHandlePublishWorkflow: + """Workflow that publishes via the workflow-side topic handle.""" + + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self.events = self.stream.topic("events", type=AgentEvent) + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self, count: int) -> None: + for i in range(count): + self.events.publish(AgentEvent(kind="tick", payload={"i": i})) + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class WorkflowSidePublishWorkflow: + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self, count: int) -> None: + for i in range(count): + self.stream.topic("events", type=bytes).publish(f"item-{i}".encode()) + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class MultiTopicWorkflow: + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self, count: int) -> None: + await workflow.execute_activity( + "publish_multi_topic", + count, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=10), + ) + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class InterleavedWorkflow: + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self, count: int) -> None: + self.stream.topic("status", type=bytes).publish(b"started") + await workflow.execute_activity( + "publish_items", + count, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=10), + ) + self.stream.topic("status", type=bytes).publish(b"done") + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class PriorityWorkflow: + @workflow.init + def __init__(self) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self) -> None: + await workflow.execute_activity( + "publish_with_priority", + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=10), + ) + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class FlushOnExitWorkflow: + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self, count: int) -> None: + await workflow.execute_activity( + "publish_batch_test", + count, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=10), + ) + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class MaxBatchWorkflow: + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.query + def publisher_sequences(self) -> dict[str, int]: + return {pid: ps.sequence for pid, ps in self.stream._publishers.items()} + + @workflow.run + async def run(self, count: int) -> None: + await workflow.execute_activity( + "publish_with_max_batch", + count, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=10), + ) + self.stream.topic("status", type=bytes).publish(b"activity_done") + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class LateWorkflowStreamWorkflow: + """Calls WorkflowStream() from @workflow.run, not from @workflow.init. + + The constructor inspects the caller's frame and requires the + function name to be ``__init__``; called from ``run``, it must + raise ``RuntimeError``. The workflow returns the error message so + the test can assert on it without forcing a workflow task failure. + """ + + @workflow.run + async def run(self) -> str: + try: + WorkflowStream() + except RuntimeError as e: + return str(e) + return "no error raised" + + +@workflow.defn +class DoubleInitWorkflow: + """Calls WorkflowStream() twice from @workflow.init. + + The first call succeeds; the second must raise RuntimeError because + the workflow stream signal handler is already registered. The workflow + stashes the error message so the test can assert on it without + forcing a workflow task failure. + """ + + @workflow.init + def __init__(self) -> None: + self.stream = WorkflowStream() + self._closed = False + self.double_init_error: str | None = None + try: + WorkflowStream() + except RuntimeError as e: + self.double_init_error = str(e) + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.query + def get_double_init_error(self) -> str | None: + return self.double_init_error + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._closed) + + +# --------------------------------------------------------------------------- +# Activities +# --------------------------------------------------------------------------- + + +@activity.defn(name="publish_items") +async def publish_items(count: int) -> None: + client = WorkflowStreamClient.from_within_activity( + batch_interval=timedelta(milliseconds=500) + ) + async with client: + for i in range(count): + activity.heartbeat() + client.topic("events", type=bytes).publish(f"item-{i}".encode()) + + +class CancellableSubscriber: + def __init__(self) -> None: + self.started = asyncio.Event() + + @activity.defn(name="subscribe_until_cancelled") + async def subscribe(self) -> str: + async def heartbeat() -> None: + while True: + activity.heartbeat() + await asyncio.sleep(0.1) + + heartbeat_task = asyncio.create_task(heartbeat()) + try: + stream = WorkflowStreamClient.from_within_activity() + try: + async for _ in stream.subscribe(result_type=bytes): + self.started.set() + except asyncio.CancelledError: + return "subscription-cancelled" + return "subscription-ended" + finally: + heartbeat_task.cancel() + await asyncio.gather(heartbeat_task, return_exceptions=True) + + +@activity.defn(name="publish_multi_topic") +async def publish_multi_topic(count: int) -> None: + topics = ["a", "b", "c"] + client = WorkflowStreamClient.from_within_activity( + batch_interval=timedelta(milliseconds=500) + ) + async with client: + for i in range(count): + activity.heartbeat() + topic = topics[i % len(topics)] + client.topic(topic, type=bytes).publish(f"{topic}-{i}".encode()) + + +@activity.defn(name="publish_with_priority") +async def publish_with_priority() -> None: + # Long batch_interval AND long post-publish hold ensure that only a + # working force_flush wakeup can deliver items before __aexit__ flushes. + # The hold is deliberately much longer than the test's collect timeout + # so a regression (force_flush no-op) surfaces as a missing item rather + # than flaking on slow CI. + client = WorkflowStreamClient.from_within_activity( + batch_interval=timedelta(seconds=60) + ) + async with client: + client.topic("events", type=bytes).publish(b"normal-0") + client.topic("events", type=bytes).publish(b"normal-1") + client.topic("events", type=bytes).publish(b"priority", force_flush=True) + for _ in range(100): + activity.heartbeat() + await asyncio.sleep(0.1) + + +@activity.defn(name="publish_batch_test") +async def publish_batch_test(count: int) -> None: + client = WorkflowStreamClient.from_within_activity( + batch_interval=timedelta(seconds=60) + ) + async with client: + for i in range(count): + activity.heartbeat() + client.topic("events", type=bytes).publish(f"item-{i}".encode()) + + +@activity.defn(name="publish_with_max_batch") +async def publish_with_max_batch(count: int) -> None: + client = WorkflowStreamClient.from_within_activity( + batch_interval=timedelta(seconds=60), max_batch_size=3 + ) + async with client: + for i in range(count): + activity.heartbeat() + client.topic("events", type=bytes).publish(f"item-{i}".encode()) + # Yield so the flusher task can run when max_batch_size triggers + # _flush_event. Real workloads (e.g. agents awaiting LLM streams) + # yield constantly; a tight loop with no awaits would never let + # the flusher fire and would collapse back to exit-only flushing. + await asyncio.sleep(0) + # Long batch_interval ensures only max_batch_size triggers flushes. + # Context manager exit flushes any remainder. + + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- + + +async def _is_different_run( + old_handle: WorkflowHandle[Any, Any], + new_handle: WorkflowHandle[Any, Any], +) -> bool: + """Check if new_handle points to a different run than old_handle.""" + try: + desc = await new_handle.describe() + return desc.run_id != old_handle.result_run_id + except Exception: + return False + + +async def collect_items( + client: Client, + handle: WorkflowHandle[Any, Any], + topics: list[str] | None, + from_offset: int, + expected_count: int, + timeout: float = 15.0, + *, + result_type: type | None = bytes, +) -> list[WorkflowStreamItem]: + """Subscribe and collect exactly expected_count items, with timeout. + + Default ``result_type=bytes`` matches the bytes-oriented tests that + compare ``item.data`` against literal byte strings. Pass + ``result_type=None`` for the converter's default ``Any`` decoding, + or ``result_type=RawValue`` for a ``RawValue``-wrapped ``Payload``. + """ + stream = WorkflowStreamClient.create(client, handle.id) + items: list[WorkflowStreamItem] = [] + try: + async with _async_timeout(timeout): + async for item in stream.subscribe( + topics=topics, + from_offset=from_offset, + poll_cooldown=timedelta(0), + result_type=result_type, + ): + items.append(item) + if len(items) >= expected_count: + break + except asyncio.TimeoutError: + pass + return items + + +# --------------------------------------------------------------------------- +# Tests +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_activity_publish_and_subscribe(client: Client) -> None: + """Activity publishes items, external client subscribes and receives them.""" + count = 10 + async with new_worker( + client, + ActivityPublishWorkflow, + activities=[publish_items], + ) as worker: + handle = await client.start_workflow( + ActivityPublishWorkflow.run, + count, + id=f"workflow-stream-basic-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + # Collect activity items + the "activity_done" status item + items = await collect_items(client, handle, None, 0, count + 1) + assert len(items) == count + 1 + + # Check activity items + for i in range(count): + assert items[i].topic == "events" + assert items[i].data == f"item-{i}".encode() + + # Check workflow-side status item + assert items[count].topic == "status" + assert items[count].data == b"activity_done" + + await handle.signal(ActivityPublishWorkflow.close) + + +@pytest.mark.asyncio +async def test_structured_type_round_trip(client: Client) -> None: + """Workflow publishes dataclass values; subscriber decodes via result_type.""" + count = 4 + async with new_worker(client, StructuredPublishWorkflow) as worker: + handle = await client.start_workflow( + StructuredPublishWorkflow.run, + count, + id=f"workflow-stream-structured-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + items = await collect_items( + client, handle, None, 0, count, result_type=AgentEvent + ) + assert len(items) == count + for i, item in enumerate(items): + assert isinstance(item.data, AgentEvent) + assert item.data == AgentEvent(kind="tick", payload={"i": i}) + + await handle.signal(StructuredPublishWorkflow.close) + + +@pytest.mark.asyncio +async def test_subscribe_default_decode_and_raw_value(client: Client) -> None: + """No ``result_type`` decodes via Any; ``result_type=RawValue`` yields a ``Payload``.""" + count = 2 + async with new_worker(client, StructuredPublishWorkflow) as worker: + handle = await client.start_workflow( + StructuredPublishWorkflow.run, + count, + id=f"workflow-stream-default-decode-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + any_items = await collect_items( + client, handle, None, 0, count, result_type=None + ) + assert len(any_items) == count + for i, item in enumerate(any_items): + # Default JSON converter decodes a dataclass to a plain dict. + assert item.data == {"kind": "tick", "payload": {"i": i}} + + raw_items = await collect_items( + client, handle, None, 0, count, result_type=RawValue + ) + assert len(raw_items) == count + for item in raw_items: + assert isinstance(item.data, RawValue) + assert item.data.payload.data # non-empty serialized JSON bytes + + await handle.signal(StructuredPublishWorkflow.close) + + +@pytest.mark.asyncio +async def test_subscribe_with_payload_result_type_rejected(client: Client) -> None: + """``subscribe(result_type=Payload)`` raises — there is no Payload decode path. + + Mirrors the topic-handle rejection (``stream.topic(name, type=Payload)``) + so the direct ``subscribe`` API can't smuggle in the same ambiguity that + the topic-handle layer already guards against. Users wanting raw payloads + pass ``result_type=RawValue``. + """ + from temporalio.api.common.v1 import Payload + + handle = client.get_workflow_handle("nonexistent-workflow-id") + stream = WorkflowStreamClient(handle) + with pytest.raises(RuntimeError, match="result_type=Payload"): + async for _ in stream.subscribe(result_type=Payload): + pass + + +@pytest.mark.asyncio +async def test_topic_handle_workflow_side_publish_and_subscribe( + client: Client, +) -> None: + """Workflow publishes via WorkflowStream.topic; client subscribes via TopicHandle.""" + count = 3 + async with new_worker(client, TopicHandlePublishWorkflow) as worker: + handle = await client.start_workflow( + TopicHandlePublishWorkflow.run, + count, + id=f"workflow-stream-topic-handle-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + stream = WorkflowStreamClient.create(client, handle.id) + events = stream.topic("events", type=AgentEvent) + assert isinstance(events, TopicHandle) + assert events.name == "events" + assert events.type is AgentEvent + + items: list[WorkflowStreamItem] = [] + async with _async_timeout(15.0): + async for item in events.subscribe(poll_cooldown=timedelta(0)): + items.append(item) + if len(items) >= count: + break + assert [item.data for item in items] == [ + AgentEvent(kind="tick", payload={"i": i}) for i in range(count) + ] + + await handle.signal(TopicHandlePublishWorkflow.close) + + +@workflow.defn +class TopicHandleUniquenessWorkflow: + """Probes the WorkflowStream.topic uniqueness check in @workflow.init. + + Returns a tuple (idempotent_ok, error_message) so the test can assert + both branches: same-type rebind is silent, different-type rebind raises. + """ + + @workflow.init + def __init__(self) -> None: + from temporalio.api.common.v1 import Payload + + self.stream = WorkflowStream() + first = self.stream.topic("events", type=AgentEvent) + self._idempotent_ok = ( + isinstance( + self.stream.topic("events", type=AgentEvent), WorkflowTopicHandle + ) + and first.type is AgentEvent + ) + try: + self.stream.topic("events", type=bytes) + except RuntimeError as exc: + self._error = str(exc) + else: + self._error = "" + try: + self.stream.topic("misused", type=Payload) + except RuntimeError as exc: + self._payload_error = str(exc) + else: + self._payload_error = "" + + @workflow.run + async def run(self) -> tuple[bool, str, str]: + return (self._idempotent_ok, self._error, self._payload_error) + + +@pytest.mark.asyncio +async def test_topic_handle_uniqueness_on_workflow_stream(client: Client) -> None: + """Same-type rebind is idempotent; different-type rebind raises in @workflow.init. + + Also covers the workflow-side rejection of ``type=Payload`` — + binding a topic to ``Payload`` itself has no decode path, so + ``WorkflowStream.topic`` raises in ``@workflow.init``. + """ + async with new_worker(client, TopicHandleUniquenessWorkflow) as worker: + idempotent_ok, error, payload_error = await client.execute_workflow( + TopicHandleUniquenessWorkflow.run, + id=f"workflow-stream-handle-unique-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert idempotent_ok is True + assert "already bound to type" in error + assert "events" in error + assert "type=Payload" in payload_error + + +@pytest.mark.asyncio +async def test_topic_handle_client_uniqueness(client: Client) -> None: + """Re-binding a topic name to a different type on a client raises.""" + handle = client.get_workflow_handle("nonexistent-workflow-id") + stream = WorkflowStreamClient(handle) + + first = stream.topic("events", type=AgentEvent) + assert first.name == "events" + assert first.type is AgentEvent + + # Same type is idempotent. + again = stream.topic("events", type=AgentEvent) + assert again.type is AgentEvent + + # Different type raises. + with pytest.raises(RuntimeError, match="already bound to type"): + stream.topic("events", type=bytes) + + # Different topic with a different type is fine. + other = stream.topic("other", type=bytes) + assert other.type is bytes + + # Any escape hatch coexists on a different topic. Omitting ``type`` + # is the documented form (defaults to ``typing.Any``); we also + # exercise the explicit ``type=Any`` path with the cast required + # because ``Any`` is a typing special form rather than a class. + raw = stream.topic("forwarded") + assert raw.type is Any + explicit = stream.topic( + "forwarded-explicit", type=cast(type[Any], cast(object, Any)) + ) + assert explicit.type is Any + + # Binding to Payload itself is rejected — subscribers would have + # no decode path. Pre-built Payload values can still be published + # via a normally-typed handle (zero-copy fast path). + from temporalio.api.common.v1 import Payload + + with pytest.raises(RuntimeError, match="type=Payload"): + stream.topic("misused", type=Payload) + + +@pytest.mark.asyncio +async def test_topic_handle_payload_passthrough(client: Client) -> None: + """Pre-built Payloads pass through topic.publish regardless of bound type.""" + count = 2 + async with new_worker(client, BasicWorkflowStreamWorkflow) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-handle-payload-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + stream = WorkflowStreamClient.create( + client, handle.id, batch_interval=timedelta(milliseconds=50) + ) + events = stream.topic("events", type=bytes) + async with stream: + converter = DataConverter.default.payload_converter + for i in range(count): + payload = converter.to_payloads([f"raw-{i}".encode()])[0] + events.publish(payload) + await stream.flush() + + items = await collect_items(client, handle, ["events"], 0, count) + assert [item.data for item in items] == [ + f"raw-{i}".encode() for i in range(count) + ] + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_topic_filtering(client: Client) -> None: + """Publish to multiple topics, subscribe with filter.""" + count = 9 # 3 per topic + async with new_worker( + client, + MultiTopicWorkflow, + activities=[publish_multi_topic], + ) as worker: + handle = await client.start_workflow( + MultiTopicWorkflow.run, + count, + id=f"workflow-stream-filter-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Subscribe to topic "a" only — should get 3 items + a_items = await collect_items(client, handle, ["a"], 0, 3) + assert len(a_items) == 3 + assert all(item.topic == "a" for item in a_items) + + # Subscribe to ["a", "c"] — should get 6 items + ac_items = await collect_items(client, handle, ["a", "c"], 0, 6) + assert len(ac_items) == 6 + assert all(item.topic in ("a", "c") for item in ac_items) + + # Subscribe to all (None) — should get all 9 + all_items = await collect_items(client, handle, None, 0, 9) + assert len(all_items) == 9 + + await handle.signal(MultiTopicWorkflow.close) + + +@pytest.mark.asyncio +async def test_subscribe_from_offset_and_per_item_offsets(client: Client) -> None: + """Subscribe from zero and non-zero offsets; each item carries its global offset.""" + count = 5 + async with new_worker( + client, + WorkflowSidePublishWorkflow, + ) as worker: + handle = await client.start_workflow( + WorkflowSidePublishWorkflow.run, + count, + id=f"workflow-stream-offset-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Subscribe from offset 0 — all items, offsets 0..count-1 + all_items = await collect_items(client, handle, None, 0, count) + assert len(all_items) == count + for i, item in enumerate(all_items): + assert item.offset == i + assert item.data == f"item-{i}".encode() + + # Subscribe from offset 3 — items 3, 4 with offsets 3, 4 + later_items = await collect_items(client, handle, None, 3, 2) + assert len(later_items) == 2 + assert later_items[0].offset == 3 + assert later_items[0].data == b"item-3" + assert later_items[1].offset == 4 + assert later_items[1].data == b"item-4" + + await handle.signal(WorkflowSidePublishWorkflow.close) + + +@pytest.mark.asyncio +async def test_per_item_offsets_with_topic_filter(client: Client) -> None: + """Per-item offsets are global (not per-topic) even when filtering.""" + count = 9 # 3 per topic (a, b, c round-robin) + async with new_worker( + client, + MultiTopicWorkflow, + activities=[publish_multi_topic], + ) as worker: + handle = await client.start_workflow( + MultiTopicWorkflow.run, + count, + id=f"workflow-stream-item-offset-filter-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Subscribe to topic "a" only — items are at global offsets 0, 3, 6 + a_items = await collect_items(client, handle, ["a"], 0, 3) + assert len(a_items) == 3 + assert a_items[0].offset == 0 + assert a_items[1].offset == 3 + assert a_items[2].offset == 6 + + # Subscribe to topic "b" — items are at global offsets 1, 4, 7 + b_items = await collect_items(client, handle, ["b"], 0, 3) + assert len(b_items) == 3 + assert b_items[0].offset == 1 + assert b_items[1].offset == 4 + assert b_items[2].offset == 7 + + await handle.signal(MultiTopicWorkflow.close) + + +@pytest.mark.asyncio +async def test_poll_truncated_offset_returns_application_error(client: Client) -> None: + """Polling a truncated offset raises ApplicationError (not ValueError) + and does not crash the workflow task.""" + async with new_worker( + client, + TruncateWorkflow, + ) as worker: + handle = await client.start_workflow( + TruncateWorkflow.run, + 5, + id=f"workflow-stream-trunc-error-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Truncate up to offset 3 via update — completion is explicit. + await handle.execute_update("truncate", 3) + + # Poll from offset 1 (truncated) — should get ApplicationError, + # NOT crash the workflow task. Catching WorkflowUpdateFailedError is + # sufficient to prove the handler raised ApplicationError: Temporal's + # update protocol completes the update with this error only when the + # handler raises ApplicationError. A bare ValueError (or any other + # exception) would fail the workflow task instead, causing + # execute_update to hang — not raise. The follow-up collect_items + # below proves the workflow task wasn't poisoned. + with pytest.raises(WorkflowUpdateFailedError) as exc_info: + await handle.execute_update( + "__temporal_workflow_stream_poll", + PollInput(topics=[], from_offset=1), + result_type=PollResult, + ) + cause = exc_info.value.cause + assert isinstance(cause, ApplicationError) + assert cause.type == "TruncatedOffset" + + # Workflow should still be usable — poll from valid offset 3 + items = await collect_items(client, handle, None, 3, 2) + assert len(items) == 2 + assert items[0].offset == 3 + + await handle.signal("close") + + +@pytest.mark.asyncio +async def test_truncate_past_end_raises_application_error(client: Client) -> None: + """truncate() with an offset past the log end raises ApplicationError + (type=TruncateOutOfRange) — the update surfaces as a clean failure + without poisoning the workflow task.""" + async with new_worker( + client, + TruncateWorkflow, + ) as worker: + handle = await client.start_workflow( + TruncateWorkflow.run, + 2, + id=f"workflow-stream-trunc-oor-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Only 2 items exist; asking to truncate to offset 5 is out of range. + with pytest.raises(WorkflowUpdateFailedError) as exc_info: + await handle.execute_update("truncate", 5) + cause = exc_info.value.cause + assert isinstance(cause, ApplicationError) + assert cause.type == "TruncateOutOfRange" + + # Workflow task wasn't poisoned — a valid poll still completes. + items = await collect_items(client, handle, None, 0, 2) + assert len(items) == 2 + + await handle.signal("close") + + +@pytest.mark.asyncio +async def test_subscribe_recovers_from_truncation(client: Client) -> None: + """subscribe() auto-recovers when offset falls behind truncation.""" + async with new_worker( + client, + TruncateWorkflow, + ) as worker: + handle = await client.start_workflow( + TruncateWorkflow.run, + 5, + id=f"workflow-stream-trunc-recover-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Truncate first 3. The update returns after the handler completes. + await handle.execute_update("truncate", 3) + + # subscribe from offset 1 (truncated) — should auto-recover + # and deliver items from base_offset (3) + stream = WorkflowStreamClient(handle) + items: list[WorkflowStreamItem] = [] + try: + async with _async_timeout(5): + async for item in stream.subscribe( + from_offset=1, poll_cooldown=timedelta(0), result_type=bytes + ): + items.append(item) + if len(items) >= 2: + break + except asyncio.TimeoutError: + pass + assert len(items) == 2 + assert items[0].offset == 3 + + await handle.signal("close") + + +@pytest.mark.asyncio +async def test_truncate_during_waiting_poll_raises_truncated_offset( + client: Client, +) -> None: + """A truncate that advances ``base_offset`` past a waiting poll's + ``from_offset`` must wake the poll and raise ``TruncatedOffset``. + + Reproduces the bug where ``_on_poll`` captured ``log_offset`` once + before ``wait_condition`` and then sliced ``self._log[log_offset:]`` + against the post-truncate state. With the old predicate + ``len(self._log) > log_offset`` the wait would either never fire + (truncation shrinks the log below the captured offset) or fire on a + later publish and silently emit the wrong items at offsets the + subscriber had already moved past. + """ + async with new_worker(client, TruncateRaceWorkflow) as worker: + handle = await client.start_workflow( + TruncateRaceWorkflow.run, + id=f"workflow-stream-trunc-race-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Seed: 5 items at offsets 0..4. base_offset stays 0. + await handle.execute_update(TruncateRaceWorkflow.publish, 5) + + # Park a poll from offset=10 — past the current end of the log. + # With wait_for_stage=ACCEPTED the handler has begun executing + # and is parked at workflow.wait_condition by the time the + # client gets the handle back. + poll_handle = await handle.start_update( + "__temporal_workflow_stream_poll", + PollInput(topics=[], from_offset=10), + result_type=PollResult, + wait_for_stage=WorkflowUpdateStage.ACCEPTED, + ) + + # In one workflow activation: publish 7 more items (log grows to + # 12 entries at offsets 0..11) and then truncate to 11. Result: + # base_offset=11, log=[item @11]. The waiting poll's + # from_offset=10 is now strictly less than base_offset, so the + # fixed predicate must wake it and the post-wait recompute must + # raise TruncatedOffset. Both halves of the fix are exercised: + # without the predicate change the wait stays asleep through + # this activation; without the post-wait recompute the slice + # silently returns wrong items / next_offset. + await handle.execute_update(TruncateRaceWorkflow.publish_then_truncate, (7, 11)) + + with pytest.raises(WorkflowUpdateFailedError) as exc_info: + await poll_handle.result() + cause = exc_info.value.cause + assert isinstance(cause, ApplicationError) + assert cause.type == "TruncatedOffset" + + await handle.signal(TruncateRaceWorkflow.close) + + +@pytest.mark.asyncio +async def test_workflow_and_activity_publish_interleaved(client: Client) -> None: + """Workflow publishes status events around activity publishing.""" + count = 5 + async with new_worker( + client, + InterleavedWorkflow, + activities=[publish_items], + ) as worker: + handle = await client.start_workflow( + InterleavedWorkflow.run, + count, + id=f"workflow-stream-interleave-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Total: 1 (started) + count (activity) + 1 (done) = count + 2 + items = await collect_items(client, handle, None, 0, count + 2) + assert len(items) == count + 2 + + # First item is workflow-side "started" + assert items[0].topic == "status" + assert items[0].data == b"started" + + # Middle items are from activity + for i in range(count): + assert items[i + 1].topic == "events" + assert items[i + 1].data == f"item-{i}".encode() + + # Last item is workflow-side "done" + assert items[count + 1].topic == "status" + assert items[count + 1].data == b"done" + + await handle.signal(InterleavedWorkflow.close) + + +@pytest.mark.asyncio +async def test_priority_flush(client: Client) -> None: + """Priority publish triggers immediate flush without waiting for timer.""" + async with new_worker( + client, + PriorityWorkflow, + activities=[publish_with_priority], + ) as worker: + handle = await client.start_workflow( + PriorityWorkflow.run, + id=f"workflow-stream-priority-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # If priority works, items arrive within milliseconds of the publish. + # The activity holds for ~10s after priority publish; this timeout + # gives plenty of margin for workflow/worker scheduling on slow CI + # while staying well below the activity hold so a regression (no + # priority wakeup) surfaces as a missing item, not a pass via + # __aexit__ flush. + items = await collect_items(client, handle, None, 0, 3, timeout=5.0) + assert len(items) == 3 + assert items[2].data == b"priority" + + await handle.signal(PriorityWorkflow.close) + + +@pytest.mark.asyncio +async def test_iterator_cancellation(client: Client) -> None: + """Cancelling a subscription iterator after it has yielded an item + propagates cancellation.""" + async with new_worker( + client, + BasicWorkflowStreamWorkflow, + ) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-cancel-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Seed one item so the iterator provably reaches an active state + # before we cancel — no sleep-based wait. + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="events", data=_wire_bytes(b"seed"))] + ), + ) + + stream_client = WorkflowStreamClient.create(client, handle.id) + first_item = asyncio.Event() + items: list[WorkflowStreamItem] = [] + + async def subscribe_and_collect() -> None: + async for item in stream_client.subscribe( + from_offset=0, poll_cooldown=timedelta(0), result_type=bytes + ): + items.append(item) + first_item.set() + + task = asyncio.create_task(subscribe_and_collect()) + # Bounded wait so a subscribe regression fails fast instead of hanging. + async with _async_timeout(5): + await first_item.wait() + task.cancel() + with pytest.raises(asyncio.CancelledError): + await task + + assert len(items) == 1 + assert items[0].data == b"seed" + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_activity_subscription_propagates_cancellation(client: Client) -> None: + subscriber = CancellableSubscriber() + async with new_worker( + client, + CancelSubscriptionWorkflow, + activities=[subscriber.subscribe], + ) as worker: + handle = await client.start_workflow( + CancelSubscriptionWorkflow.run, + id=f"workflow-stream-activity-cancel-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + async with _async_timeout(5): + await subscriber.started.wait() + await handle.signal(CancelSubscriptionWorkflow.cancel_subscription) + assert await handle.result() == "subscription-cancelled" + + +@pytest.mark.asyncio +async def test_context_manager_flushes_on_exit(client: Client) -> None: + """Context manager exit flushes all buffered items.""" + count = 5 + async with new_worker( + client, + FlushOnExitWorkflow, + activities=[publish_batch_test], + ) as worker: + handle = await client.start_workflow( + FlushOnExitWorkflow.run, + count, + id=f"workflow-stream-flush-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Despite 60s batch interval, all items arrive because __aexit__ flushes + items = await collect_items(client, handle, None, 0, count, timeout=15.0) + assert len(items) == count + for i in range(count): + assert items[i].data == f"item-{i}".encode() + + await handle.signal(FlushOnExitWorkflow.close) + + +@pytest.mark.asyncio +async def test_explicit_flush_barrier(client: Client) -> None: + """``await client.flush()`` is a synchronization point. + + Verifies the documented contract: + 1. Returns immediately when the buffer is empty. + 2. After it returns, items published before the call are durable + on the workflow side (observable via ``get_offset()``) — even + when the timer-driven flush would not yet have fired. + 3. Calling it again after a successful flush is a no-op. + + Uses a 60s ``batch_interval`` so a regression where ``flush()`` + silently relies on the background timer surfaces as a hang + against the test's 5s timeout, not a slow pass. + """ + async with new_worker( + client, + BasicWorkflowStreamWorkflow, + ) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-flush-barrier-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + stream = WorkflowStreamClient.create( + client, handle.id, batch_interval=timedelta(seconds=60) + ) + + async with _async_timeout(5): + # 1. Empty-buffer flush is a no-op (must not block). + assert await stream.get_offset() == 0 + await stream.flush() + assert await stream.get_offset() == 0 + + # 2. Flush makes prior publishes visible without waiting on + # the 60s batch timer. + stream.topic("events", type=bytes).publish(b"a") + stream.topic("events", type=bytes).publish(b"b") + stream.topic("events", type=bytes).publish(b"c") + await stream.flush() + assert await stream.get_offset() == 3 + + # 3. Second flush with no new items is a no-op. + await stream.flush() + assert await stream.get_offset() == 3 + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_concurrent_subscribers(client: Client) -> None: + """Two subscribers on different topics make interleaved progress. + + Publishes A-0, waits for subscriber A to observe it; publishes B-0, + waits for subscriber B to observe it. At this point both subscribers + have received exactly one item and are polling for their second, + so both subscriptions are provably in flight at the same time. + Then publishes A-1, B-1 the same way. A sequential execution (A drains + then B starts) cannot satisfy the ordering because B's first item + isn't published until after A has already received its first. + """ + async with new_worker( + client, + BasicWorkflowStreamWorkflow, + ) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-concurrent-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + stream = WorkflowStreamClient(handle) + a_items: list[WorkflowStreamItem] = [] + b_items: list[WorkflowStreamItem] = [] + a_got = [asyncio.Event(), asyncio.Event()] + b_got = [asyncio.Event(), asyncio.Event()] + + async def collect( + topic: str, + collected: list[WorkflowStreamItem], + events: list[asyncio.Event], + ) -> None: + async for item in stream.subscribe( + topics=[topic], + from_offset=0, + poll_cooldown=timedelta(0), + result_type=bytes, + ): + collected.append(item) + events[len(collected) - 1].set() + if len(collected) >= len(events): + break + + a_task = asyncio.create_task(collect("a", a_items, a_got)) + b_task = asyncio.create_task(collect("b", b_items, b_got)) + + async def publish(topic: str, data: bytes) -> None: + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput(items=[PublishEntry(topic=topic, data=_wire_bytes(data))]), + ) + + try: + async with _async_timeout(10): + await publish("a", b"a-0") + await a_got[0].wait() + await publish("b", b"b-0") + await b_got[0].wait() + # Both subscribers are now mid-subscription, each having + # seen one item and polling for the next. + await publish("a", b"a-1") + await a_got[1].wait() + await publish("b", b"b-1") + await b_got[1].wait() + + await asyncio.gather(a_task, b_task) + finally: + a_task.cancel() + b_task.cancel() + + assert [i.data for i in a_items] == [b"a-0", b"a-1"] + assert [i.data for i in b_items] == [b"b-0", b"b-1"] + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_max_batch_size(client: Client) -> None: + """max_batch_size triggers auto-flush without waiting for timer.""" + count = 7 # with max_batch_size=3: flushes at 3, 6, then remainder 1 on exit + async with new_worker( + client, + MaxBatchWorkflow, + activities=[publish_with_max_batch], + max_cached_workflows=0, + ) as worker: + handle = await client.start_workflow( + MaxBatchWorkflow.run, + count, + id=f"workflow-stream-maxbatch-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + # count items from activity + 1 "activity_done" from workflow + items = await collect_items(client, handle, None, 0, count + 1, timeout=15.0) + assert len(items) == count + 1 + for i in range(count): + assert items[i].data == f"item-{i}".encode() + + # max_batch_size actually engages: at least one flush fires during + # the publish loop, so 7 items ship as >=2 signals. Without this + # assertion the test would pass even if max_batch_size were ignored + # and all 7 items went out in a single exit-time flush (batch_count + # == 1). Note: max_batch_size is a *trigger* threshold, not a cap — + # the flusher may take more items from the buffer than max_batch_size + # if more were added while a prior signal was in flight, so the exact + # batch count depends on interleaving. Asserting >= 2 is the + # non-flaky way to verify the mechanism is live. + seqs = await handle.query(MaxBatchWorkflow.publisher_sequences) + assert len(seqs) == 1, f"expected one publisher, got {seqs}" + (batch_count,) = seqs.values() + assert batch_count >= 2, ( + f"expected >=2 batches with max_batch_size=3 and 7 items, got " + f"{batch_count} — max_batch_size did not trigger a mid-loop flush" + ) + + await handle.signal(MaxBatchWorkflow.close) + + +@pytest.mark.asyncio +async def test_replay_safety(client: Client) -> None: + """Workflow stream broker survives workflow replay (max_cached_workflows=0).""" + async with new_worker( + client, + InterleavedWorkflow, + activities=[publish_items], + max_cached_workflows=0, + ) as worker: + handle = await client.start_workflow( + InterleavedWorkflow.run, + 5, + id=f"workflow-stream-replay-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + # 1 (started) + 5 (activity) + 1 (done) = 7 + items = await collect_items(client, handle, None, 0, 7) + # Full ordered sequence — endpoint-only checks would miss mid-stream + # replay corruption (reordering, duplication, dropped items). + assert [i.data for i in items] == [ + b"started", + b"item-0", + b"item-1", + b"item-2", + b"item-3", + b"item-4", + b"done", + ] + assert [i.offset for i in items] == list(range(7)) + await handle.signal(InterleavedWorkflow.close) + + +@pytest.mark.asyncio +async def test_flush_retry_preserves_items_after_failures( + client: Client, +) -> None: + """After flush failures, a subsequent successful flush delivers all items + in publish order, exactly once. + + Exercises the retry code path behaviorally: simulated delivery failures + must not drop items, must not duplicate them on retry, and must not + reorder items published during the failed state. + """ + async with new_worker(client, BasicWorkflowStreamWorkflow) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-flush-retry-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + stream = WorkflowStreamClient(handle) + real_signal = handle.signal + fail_remaining = 2 + + async def maybe_failing_signal(*args: Any, **kwargs: Any) -> Any: + nonlocal fail_remaining + if fail_remaining > 0: + fail_remaining -= 1 + raise RuntimeError("simulated delivery failure") + return await real_signal(*args, **kwargs) + + with patch.object(handle, "signal", side_effect=maybe_failing_signal): + stream.topic("events", type=bytes).publish(b"item-0") + stream.topic("events", type=bytes).publish(b"item-1") + with pytest.raises(RuntimeError): + await stream._flush() + + # Publish more during the failed state — must not overtake the + # pending retry on eventual delivery. + stream.topic("events", type=bytes).publish(b"item-2") + with pytest.raises(RuntimeError): + await stream._flush() + + # Third flush succeeds, delivering the pending retry batch. + await stream._flush() + # Fourth flush delivers the buffered "item-2". + await stream._flush() + + items = await collect_items(client, handle, None, 0, 3) + assert [i.data for i in items] == [b"item-0", b"item-1", b"item-2"] + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +@pytest.mark.parametrize("status", [RPCStatusCode.UNAVAILABLE, RPCStatusCode.CANCELLED]) +async def test_background_flusher_retries_failed_signal( + client: Client, status: RPCStatusCode +) -> None: + async with new_worker(client, BasicWorkflowStreamWorkflow) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-background-flush-retry-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + stream = WorkflowStreamClient(handle, batch_interval=timedelta(milliseconds=10)) + real_signal = handle.signal + first_flush_failed = asyncio.Event() + retry_succeeded = asyncio.Event() + + async def fail_first_signal(*args: Any, **kwargs: Any) -> None: + if not first_flush_failed.is_set(): + first_flush_failed.set() + raise RPCError( + message="simulated delivery failure", + status=status, + raw_grpc_status=b"", + ) + await real_signal(*args, **kwargs) + retry_succeeded.set() + + with patch.object(handle, "signal", side_effect=fail_first_signal): + async with stream: + stream.topic("events", type=bytes).publish(b"item") + await asyncio.wait_for(first_flush_failed.wait(), timeout=5) + await asyncio.wait_for(retry_succeeded.wait(), timeout=5) + + items = await collect_items(client, handle, None, 0, 1) + assert [item.data for item in items] == [b"item"] + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_background_flusher_propagates_payload_codec_error( + client: Client, +) -> None: + async with new_worker(client, BasicWorkflowStreamWorkflow) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-background-flush-codec-error-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + config = client.config() + config["data_converter"] = DataConverter( + payload_codec=FailingEncodePayloadCodec() + ) + codec_client = Client(**config) + stream = WorkflowStreamClient.create( + codec_client, + handle.id, + batch_interval=timedelta(milliseconds=10), + ) + stream._flush_task = asyncio.create_task(stream._run_flusher()) + + stream.topic("events", type=bytes).publish(b"item", force_flush=True) + with pytest.raises(RuntimeError, match="payload codec encode failed"): + await asyncio.wait_for(stream._flush_task, timeout=1) + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_background_flusher_propagates_message_too_large( + client: Client, +) -> None: + handle = client.get_workflow_handle("workflow-stream-message-too-large") + stream = WorkflowStreamClient(handle, batch_interval=timedelta(milliseconds=10)) + error = RPCError( + message="grpc: received message larger than max", + status=RPCStatusCode.RESOURCE_EXHAUSTED, + raw_grpc_status=b"", + ) + + with patch.object(handle, "signal", side_effect=error): + flusher = asyncio.create_task(stream._run_flusher()) + stream.topic("events", type=bytes).publish(b"item", force_flush=True) + with pytest.raises(RPCError, match="received message larger than max"): + await asyncio.wait_for(flusher, timeout=1) + + +@pytest.mark.asyncio +async def test_flush_raises_after_max_retry_duration(client: Client) -> None: + """When max_retry_duration is exceeded, flush raises TimeoutError and the + client can resume publishing without losing subsequent items.""" + async with new_worker(client, BasicWorkflowStreamWorkflow) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-retry-expiry-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Inject a controllable clock into the client module. The client's + # retry check compares `time.monotonic() - _pending_since` against + # `max_retry_duration`, so advancing the clock between flushes makes + # the timeout fire deterministically regardless of wall-clock speed + # or clock resolution. + stream = WorkflowStreamClient( + handle, max_retry_duration=timedelta(milliseconds=100) + ) + real_signal = handle.signal + fail_signals = True + + async def maybe_failing_signal(*args: Any, **kwargs: Any) -> Any: + if fail_signals: + raise RuntimeError("simulated failure") + return await real_signal(*args, **kwargs) + + clock = [0.0] + with ( + patch( + "temporalio.contrib.workflow_streams._client.time.monotonic", + side_effect=lambda: clock[0], + ), + patch.object(handle, "signal", side_effect=maybe_failing_signal), + ): + stream.topic("events", type=bytes).publish(b"lost") + + # First flush fails and enters the pending-retry state. + with pytest.raises(RuntimeError): + await stream._flush() + + # Advance the clock well past max_retry_duration. + clock[0] = 10.0 + + # Next flush raises TimeoutError — the pending batch is abandoned. + with pytest.raises(TimeoutError, match="max_retry_duration"): + await stream._flush() + + # Stop failing signals; subsequent publishes must succeed. + fail_signals = False + stream.topic("events", type=bytes).publish(b"kept") + await stream._flush() + + items = await collect_items(client, handle, None, 0, 1) + assert len(items) == 1 + assert items[0].data == b"kept" + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_dedup_rejects_duplicate_signal(client: Client) -> None: + """Workflow deduplicates signals with the same publisher_id + sequence.""" + async with new_worker( + client, + BasicWorkflowStreamWorkflow, + ) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-dedup-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Send a batch with publisher_id and sequence + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="events", data=_wire_bytes(b"item-0"))], + publisher_id="test-pub", + sequence=1, + ), + ) + + # Send the same sequence again — should be deduped + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="events", data=_wire_bytes(b"duplicate"))], + publisher_id="test-pub", + sequence=1, + ), + ) + + # Send a new sequence — should go through + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="events", data=_wire_bytes(b"item-1"))], + publisher_id="test-pub", + sequence=2, + ), + ) + + # Should have 2 items, not 3 (collect_items' update call acts as barrier) + items = await collect_items(client, handle, None, 0, 2) + assert len(items) == 2 + assert items[0].data == b"item-0" + assert items[1].data == b"item-1" + + # Verify offset is 2 (not 3) + stream_client = WorkflowStreamClient(handle) + offset = await stream_client.get_offset() + assert offset == 2 + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_double_init_raises(client: Client) -> None: + """Instantiating WorkflowStream twice from @workflow.init raises RuntimeError. + + The first WorkflowStream() registers the __temporal_workflow_stream_publish signal handler; the + second call detects the existing handler and raises rather than + silently overwriting it. + """ + async with new_worker(client, DoubleInitWorkflow) as worker: + handle = await client.start_workflow( + DoubleInitWorkflow.run, + id=f"workflow-stream-double-init-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + err = await handle.query(DoubleInitWorkflow.get_double_init_error) + assert err is not None + assert "already registered" in err + await handle.signal(DoubleInitWorkflow.close) + + +@pytest.mark.asyncio +async def test_workflow_stream_outside_init_raises(client: Client) -> None: + """Constructing WorkflowStream outside @workflow.init raises RuntimeError. + + The workflow calls WorkflowStream() from @workflow.run; the caller-frame + guard must reject the call because the caller's function name is + ``run``, not ``__init__``. + """ + async with new_worker(client, LateWorkflowStreamWorkflow) as worker: + result = await client.execute_workflow( + LateWorkflowStreamWorkflow.run, + id=f"workflow-stream-late-init-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert "must be constructed directly from the workflow's" in result + assert "'run'" in result + + +@pytest.mark.asyncio +async def test_truncate_stream(client: Client) -> None: + """WorkflowStream.truncate discards prefix and adjusts base_offset.""" + async with new_worker( + client, + TruncateWorkflow, + ) as worker: + handle = await client.start_workflow( + TruncateWorkflow.run, + 5, + id=f"workflow-stream-truncate-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Verify all 5 items + items = await collect_items(client, handle, None, 0, 5) + assert len(items) == 5 + + # Truncate up to offset 3 (discard items 0, 1, 2). The update + # returns after the handler completes. + await handle.execute_update("truncate", 3) + + # Offset should still be 5 (truncation moves base_offset, not tail) + stream_client = WorkflowStreamClient(handle) + offset = await stream_client.get_offset() + assert offset == 5 + + # Reading from offset 3 should work (items 3, 4) + items_after = await collect_items(client, handle, None, 3, 2) + assert len(items_after) == 2 + assert items_after[0].data == b"item-3" + assert items_after[1].data == b"item-4" + + await handle.signal("close") + + +@pytest.mark.asyncio +async def test_ttl_pruning_in_get_stream_state(client: Client) -> None: + """WorkflowStream.get_state prunes publishers whose last-seen time exceeds the + TTL while retaining newer publishers. The log itself is unaffected. + + Uses a wall-clock gap between publishes so that workflow.time() + advances between the two publishers' tasks. workflow.time() can't be + cleanly injected from outside, so a short real sleep is the mechanism. + """ + async with new_worker( + client, + TTLTestWorkflow, + ) as worker: + handle = await client.start_workflow( + TTLTestWorkflow.run, + id=f"workflow-stream-ttl-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # pub-old arrives first. + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="events", data=_wire_bytes(b"old"))], + publisher_id="pub-old", + sequence=1, + ), + ) + + # Sanity: pub-old is recorded (generous TTL retains it). + state_before = await handle.query(TTLTestWorkflow.get_state_with_ttl, 9999.0) + assert "pub-old" in state_before.publishers + + # Let workflow.time() advance by real wall-clock time. Use a + # generous gap (1.0s) relative to the TTL (0.5s) so the test + # tolerates CI scheduling delays — pub-old must be >=0.5s past, + # pub-new must be <0.5s past, at the moment of the query. + await asyncio.sleep(1.0) + + # pub-new arrives after the gap. + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="events", data=_wire_bytes(b"new"))], + publisher_id="pub-new", + sequence=1, + ), + ) + + # TTL=0.5s prunes pub-old (~1.0s old) but keeps pub-new (~0s). + state = await handle.query(TTLTestWorkflow.get_state_with_ttl, 0.5) + assert "pub-old" not in state.publishers + assert "pub-new" in state.publishers + # Log contents are not touched by publisher pruning. + assert len(state.log) == 2 + + await handle.signal("close") + + +# --------------------------------------------------------------------------- +# Truncate and TTL test workflows +# --------------------------------------------------------------------------- + + +@workflow.defn +class TruncateWorkflow: + """Test scaffolding that exposes WorkflowStream.truncate via a user-authored + update. + + The contrib module does not define a built-in external truncate API — + truncation is a workflow-internal decision (typically driven by + consumer progress or a retention policy). Workflows that want external + control wire up their own signal or update. We use an update here so + callers get explicit completion (signals are fire-and-forget). + + The ``truncate`` update is ``async`` and opens with + ``await asyncio.sleep(0)`` — the documented recipe from the + contrib/stream README for sync-shaped handlers that read ``WorkflowStream`` + state. The yield lets any buffered ``__temporal_workflow_stream_publish`` signal in + the same activation apply before the handler inspects ``self._log``. + This keeps the test workflow aligned with the pattern users are + directed to follow. + + ``prepub_count`` seeds the log with N byte-payload items during + ``@workflow.init`` as test convenience, so the error-path tests + have deterministic log content without an extra round trip to + publish from the client. + """ + + @workflow.init + def __init__(self, prepub_count: int = 0) -> None: + self.stream = WorkflowStream() + self._closed = False + for i in range(prepub_count): + self.stream.topic("events", type=bytes).publish(f"item-{i}".encode()) + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.update + async def truncate(self, up_to_offset: int) -> None: + # Recipe from README.md "Gotcha" section: yield once so any + # buffered __temporal_workflow_stream_publish in the same activation applies + # before we read self._log. asyncio.sleep(0) is a pure asyncio + # yield — no Temporal timer, no history event. + await asyncio.sleep(0) + self.stream.truncate(up_to_offset) + + @workflow.run + async def run(self, _prepub_count: int = 0) -> None: + # _prepub_count is consumed in @workflow.init above. @workflow.run + # must accept the same positional args, but the names are free + # to differ. + del _prepub_count + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class TruncateRaceWorkflow: + """Workflow that exposes ``publish`` and ``publish_then_truncate`` + updates so a test can deterministically interleave a waiting + ``__temporal_workflow_stream_poll`` update against a truncate that + advances ``base_offset`` past the poll's ``from_offset``. + + The ``publish_then_truncate`` handler runs publish loop and truncate + in a single workflow activation (no awaits between them), so a poll + parked at ``wait_condition`` sees the post-truncate state on its + next predicate evaluation rather than firing on an intermediate + publish. + """ + + @workflow.init + def __init__(self) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.update + async def publish(self, count: int) -> None: + await asyncio.sleep(0) + topic = self.stream.topic("events", type=bytes) + for i in range(count): + topic.publish(f"item-{i}".encode()) + + @workflow.update + async def publish_then_truncate(self, args: tuple[int, int]) -> None: + await asyncio.sleep(0) + publish_count, truncate_to = args + topic = self.stream.topic("events", type=bytes) + for i in range(publish_count): + topic.publish(f"prepub-{i}".encode()) + self.stream.truncate(truncate_to) + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class TTLTestWorkflow: + """Workflow that exposes WorkflowStream.get_state via query for TTL testing.""" + + @workflow.init + def __init__(self) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.query + def get_state_with_ttl(self, ttl_seconds: float) -> WorkflowStreamState: + # Query arg is passed as float because the default JSON payload + # converter does not serialize ``timedelta``; convert here. + return self.stream.get_state(publisher_ttl=timedelta(seconds=ttl_seconds)) + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._closed) + + +# --------------------------------------------------------------------------- +# Continue-as-new workflow and test +# --------------------------------------------------------------------------- + + +@dataclass +class CANWorkflowInputTyped: + """Uses proper typing.""" + + stream_state: WorkflowStreamState | None = None + + +@workflow.defn +class ContinueAsNewTypedWorkflow: + """CAN workflow using properly-typed stream_state.""" + + @workflow.init + def __init__(self, input: CANWorkflowInputTyped) -> None: + self.stream = WorkflowStream(prior_state=input.stream_state) + self._should_continue = False + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.signal + def trigger_continue(self) -> None: + self._should_continue = True + + @workflow.query + def publisher_sequences(self) -> dict[str, int]: + return {pid: ps.sequence for pid, ps in self.stream._publishers.items()} + + @workflow.run + async def run(self, _input: CANWorkflowInputTyped) -> None: + # _input is consumed in @workflow.init above. @workflow.run must + # accept the same positional args, but the names are free to differ. + del _input + while True: + await workflow.wait_condition(lambda: self._should_continue or self._closed) + if self._closed: + return + if self._should_continue: + self._should_continue = False + self.stream.detach_pollers() + await workflow.wait_condition(workflow.all_handlers_finished) + workflow.continue_as_new( + args=[ + CANWorkflowInputTyped( + stream_state=self.stream.get_state(), + ) + ] + ) + + +@pytest.mark.asyncio +async def test_continue_as_new_properly_typed(client: Client) -> None: + """CAN preserves the log, global offsets, AND publisher dedup state + when stream_state is properly typed as ``WorkflowStreamState | None``.""" + async with new_worker( + client, + ContinueAsNewTypedWorkflow, + ) as worker: + handle = await client.start_workflow( + ContinueAsNewTypedWorkflow.run, + CANWorkflowInputTyped(), + id=f"workflow-stream-can-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Publish 3 items with an explicit publisher_id/sequence so dedup + # state is seeded and we can verify it survives CAN. + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[ + PublishEntry(topic="events", data=_wire_bytes(b"item-0")), + PublishEntry(topic="events", data=_wire_bytes(b"item-1")), + PublishEntry(topic="events", data=_wire_bytes(b"item-2")), + ], + publisher_id="pub", + sequence=1, + ), + ) + + items_before = await collect_items(client, handle, None, 0, 3) + assert len(items_before) == 3 + + await handle.signal(ContinueAsNewTypedWorkflow.trigger_continue) + + new_handle = client.get_workflow_handle(handle.id) + await assert_eq_eventually( + True, + lambda: _is_different_run(handle, new_handle), + ) + + # Log contents and offsets preserved across CAN. + items_after = await collect_items(client, new_handle, None, 0, 3) + assert [i.data for i in items_after] == [b"item-0", b"item-1", b"item-2"] + assert [i.offset for i in items_after] == [0, 1, 2] + + # Dedup state preserved: the carried publisher_sequences dict has + # pub -> 1 after CAN. + seqs_after_can = await new_handle.query( + ContinueAsNewTypedWorkflow.publisher_sequences + ) + assert seqs_after_can == {"pub": 1} + + # Re-sending publisher_id="pub", sequence=1 must be rejected by + # dedup — both the log and the publisher_sequences entry stay put. + await new_handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[ + PublishEntry(topic="events", data=_wire_bytes(b"dup")), + ], + publisher_id="pub", + sequence=1, + ), + ) + seqs_after_dup = await new_handle.query( + ContinueAsNewTypedWorkflow.publisher_sequences + ) + assert seqs_after_dup == {"pub": 1} + + # A fresh sequence from the same publisher is accepted, advances + # publisher_sequences to 2, and the new item gets offset 3. + await new_handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[ + PublishEntry(topic="events", data=_wire_bytes(b"item-3")), + ], + publisher_id="pub", + sequence=2, + ), + ) + seqs_after_accept = await new_handle.query( + ContinueAsNewTypedWorkflow.publisher_sequences + ) + assert seqs_after_accept == {"pub": 2} + items_all = await collect_items(client, new_handle, None, 0, 4) + assert [i.data for i in items_all] == [ + b"item-0", + b"item-1", + b"item-2", + b"item-3", + ] + assert items_all[3].offset == 3 + + await new_handle.signal(ContinueAsNewTypedWorkflow.close) + + +@workflow.defn +class ContinueAsNewHelperWorkflow: + """CAN workflow that uses the packaged ``WorkflowStream.continue_as_new`` helper.""" + + @workflow.init + def __init__(self, input: CANWorkflowInputTyped) -> None: + self.stream = WorkflowStream(prior_state=input.stream_state) + self._should_continue = False + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.signal + def trigger_continue(self) -> None: + self._should_continue = True + + @workflow.run + async def run(self, _input: CANWorkflowInputTyped) -> None: + del _input + while True: + await workflow.wait_condition(lambda: self._should_continue or self._closed) + if self._closed: + return + if self._should_continue: + self._should_continue = False + await self.stream.continue_as_new( + lambda state: [CANWorkflowInputTyped(stream_state=state)], + ) + + +@pytest.mark.asyncio +async def test_continue_as_new_helper(client: Client) -> None: + """The ``WorkflowStream.continue_as_new`` helper preserves log and dedup state + just like the explicit detach_pollers/wait/CAN recipe.""" + async with new_worker( + client, + ContinueAsNewHelperWorkflow, + ) as worker: + handle = await client.start_workflow( + ContinueAsNewHelperWorkflow.run, + CANWorkflowInputTyped(), + id=f"workflow-stream-can-helper-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[ + PublishEntry(topic="events", data=_wire_bytes(b"item-0")), + PublishEntry(topic="events", data=_wire_bytes(b"item-1")), + ], + publisher_id="pub", + sequence=1, + ), + ) + + items_before = await collect_items(client, handle, None, 0, 2) + assert [i.data for i in items_before] == [b"item-0", b"item-1"] + + await handle.signal(ContinueAsNewHelperWorkflow.trigger_continue) + + new_handle = client.get_workflow_handle(handle.id) + await assert_eq_eventually( + True, + lambda: _is_different_run(handle, new_handle), + ) + + items_after = await collect_items(client, new_handle, None, 0, 2) + assert [i.data for i in items_after] == [b"item-0", b"item-1"] + assert [i.offset for i in items_after] == [0, 1] + + await new_handle.signal(ContinueAsNewHelperWorkflow.close) + + +@workflow.defn +class DrainingGateWorkflow: + """CAN workflow that detaches pollers and then *holds* in the draining state + until released, so a subscriber deterministically hits the draining poll + rejection before the rollover completes.""" + + @workflow.init + def __init__(self, input: CANWorkflowInputTyped) -> None: + self.stream = WorkflowStream(prior_state=input.stream_state) + self._should_continue = False + self._release = False + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.signal + def trigger_continue(self) -> None: + self._should_continue = True + + @workflow.signal + def release(self) -> None: + self._release = True + + @workflow.run + async def run(self, _input: CANWorkflowInputTyped) -> None: + del _input + await workflow.wait_condition(lambda: self._should_continue or self._closed) + if self._closed: + return + # Detach but stay open until released, so new polls are rejected with + # StreamDraining for a deterministic window. + self.stream.detach_pollers() + await workflow.wait_condition(lambda: self._release) + await workflow.wait_condition(workflow.all_handlers_finished) + workflow.continue_as_new( + args=[CANWorkflowInputTyped(stream_state=self.stream.get_state())] + ) + + +@pytest.mark.asyncio +async def test_subscribe_retries_while_draining(client: Client) -> None: + """A poll rejected because the stream is draining for continue-as-new must + be retried, not surfaced as an error: the subscription stays alive through + the rollover and resumes on the successor run.""" + async with new_worker(client, DrainingGateWorkflow) as worker: + handle = await client.start_workflow( + DrainingGateWorkflow.run, + CANWorkflowInputTyped(), + id=f"workflow-stream-draining-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="events", data=_wire_bytes(b"item-0"))], + publisher_id="pub", + sequence=1, + ), + ) + + stream = WorkflowStreamClient.create(client, handle.id) + received: list[WorkflowStreamItem] = [] + + async def consume() -> None: + async for item in stream.subscribe( + from_offset=0, poll_cooldown=timedelta(0), result_type=bytes + ): + received.append(item) + + async def received_count() -> int: + return len(received) + + task = asyncio.create_task(consume()) + new_handle = client.get_workflow_handle(handle.id) + try: + await assert_eq_eventually(1, received_count) + + # Detach; the subscriber's polls are now rejected with StreamDraining. + await handle.signal(DrainingGateWorkflow.trigger_continue) + # The subscription must keep retrying, not error out. + await asyncio.sleep(1.0) + assert not task.done(), "draining rejection must not end the subscription" + + # Release: the workflow continues-as-new; the subscription resumes on + # the successor run and receives an item published there. + await handle.signal(DrainingGateWorkflow.release) + await assert_eq_eventually( + True, lambda: _is_different_run(handle, new_handle) + ) + await new_handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="events", data=_wire_bytes(b"item-1"))], + publisher_id="pub", + sequence=2, + ), + ) + + await assert_eq_eventually(2, received_count) + assert [i.data for i in received] == [b"item-0", b"item-1"] + assert [i.offset for i in received] == [0, 1] + finally: + task.cancel() + try: + await task + except asyncio.CancelledError: + pass + await new_handle.signal(DrainingGateWorkflow.close) + + +# --------------------------------------------------------------------------- +# Cross-workflow workflow stream (Scenario 1) +# --------------------------------------------------------------------------- + + +@dataclass +class CrossWorkflowInput: + broker_workflow_id: str + expected_count: int + + +@workflow.defn +class BrokerWorkflow: + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self, count: int) -> None: + for i in range(count): + self.stream.topic("events", type=bytes).publish(f"broker-{i}".encode()) + await workflow.wait_condition(lambda: self._closed) + + +@workflow.defn +class SubscriberWorkflow: + @workflow.run + async def run(self, input: CrossWorkflowInput) -> list[str]: + return await workflow.execute_activity( + "subscribe_to_broker", + input, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=10), + ) + + +@activity.defn(name="subscribe_to_broker") +async def subscribe_to_broker(input: CrossWorkflowInput) -> list[str]: + client = WorkflowStreamClient.create( + client=activity.client(), + workflow_id=input.broker_workflow_id, + ) + items: list[str] = [] + async with _async_timeout(15.0): + async for item in client.subscribe( + topics=["events"], + from_offset=0, + poll_cooldown=timedelta(0), + result_type=bytes, + ): + items.append(item.data.decode()) + activity.heartbeat() + if len(items) >= input.expected_count: + break + return items + + +@pytest.mark.asyncio +async def test_cross_workflow_stream(client: Client) -> None: + """Workflow B's activity subscribes to events published by Workflow A.""" + count = 5 + task_queue = str(uuid.uuid4()) + + async with new_worker( + client, + BrokerWorkflow, + SubscriberWorkflow, + activities=[subscribe_to_broker], + task_queue=task_queue, + ): + broker_id = f"workflow-stream-broker-{uuid.uuid4()}" + broker_handle = await client.start_workflow( + BrokerWorkflow.run, + count, + id=broker_id, + task_queue=task_queue, + ) + + sub_handle = await client.start_workflow( + SubscriberWorkflow.run, + CrossWorkflowInput( + broker_workflow_id=broker_id, + expected_count=count, + ), + id=f"workflow-stream-subscriber-{uuid.uuid4()}", + task_queue=task_queue, + ) + + result = await sub_handle.result() + assert result == [f"broker-{i}" for i in range(count)] + + # Also verify external subscription still works + external_items = await collect_items( + client, broker_handle, ["events"], 0, count + ) + assert len(external_items) == count + + await broker_handle.signal(BrokerWorkflow.close) + + +# --------------------------------------------------------------------------- +# Standalone activity (started directly via Client, no parent workflow) +# --------------------------------------------------------------------------- + + +@dataclass +class StandalonePublishInput: + broker_workflow_id: str + count: int + + +@activity.defn(name="standalone_publish_to_broker") +async def standalone_publish_to_broker(input: StandalonePublishInput) -> None: + """Publish to a broker workflow from a standalone activity. + + Same usage as in any external program: build a Client (here taken + via ``activity.client()``), pass an explicit workflow id to + ``WorkflowStreamClient.create``. ``from_within_activity`` is not usable + here because the activity has no parent workflow. + """ + assert activity.info().workflow_id is None, ( + "test bug: this activity should be standalone" + ) + client = WorkflowStreamClient.create( + client=activity.client(), + workflow_id=input.broker_workflow_id, + batch_interval=timedelta(milliseconds=500), + ) + async with client: + for i in range(input.count): + activity.heartbeat() + client.topic("events", type=bytes).publish(f"standalone-{i}".encode()) + + +@activity.defn(name="standalone_subscribe_to_broker") +async def standalone_subscribe_to_broker(input: CrossWorkflowInput) -> list[str]: + assert activity.info().workflow_id is None, ( + "test bug: this activity should be standalone" + ) + client = WorkflowStreamClient.create( + client=activity.client(), + workflow_id=input.broker_workflow_id, + ) + items: list[str] = [] + async with _async_timeout(15.0): + async for item in client.subscribe( + topics=["events"], + from_offset=0, + poll_cooldown=timedelta(0), + result_type=bytes, + ): + items.append(item.data.decode()) + activity.heartbeat() + if len(items) >= input.expected_count: + break + return items + + +@activity.defn(name="standalone_from_within_activity_misuse") +async def standalone_from_within_activity_misuse() -> str: + """Calling from_within_activity in a standalone activity must raise a clear error.""" + try: + WorkflowStreamClient.from_within_activity() + except RuntimeError as e: + return str(e) + return "" + + +@pytest.mark.asyncio +async def test_standalone_activity_publish( + client: Client, env: WorkflowEnvironment +) -> None: + """Activity started directly via Client.start_activity publishes via create().""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server does not support Client.start_activity: " + "https://github.com/temporalio/sdk-java/issues/2741" + ) + count = 5 + task_queue = str(uuid.uuid4()) + + async with new_worker( + client, + BasicWorkflowStreamWorkflow, + activities=[standalone_publish_to_broker], + task_queue=task_queue, + ): + broker_id = f"workflow-stream-standalone-broker-{uuid.uuid4()}" + broker_handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=broker_id, + task_queue=task_queue, + ) + + activity_handle = await client.start_activity( + standalone_publish_to_broker, + StandalonePublishInput(broker_workflow_id=broker_id, count=count), + id=f"standalone-publish-{uuid.uuid4()}", + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=10), + ) + await activity_handle.result() + + items = await collect_items(client, broker_handle, ["events"], 0, count) + assert [i.data for i in items] == [ + f"standalone-{i}".encode() for i in range(count) + ] + + await broker_handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_standalone_activity_subscribe( + client: Client, env: WorkflowEnvironment +) -> None: + """Standalone activity subscribes to a broker workflow via create().""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server does not support Client.start_activity: " + "https://github.com/temporalio/sdk-java/issues/2741" + ) + count = 5 + task_queue = str(uuid.uuid4()) + + async with new_worker( + client, + BrokerWorkflow, + activities=[standalone_subscribe_to_broker], + task_queue=task_queue, + ): + broker_id = f"workflow-stream-standalone-sub-broker-{uuid.uuid4()}" + broker_handle = await client.start_workflow( + BrokerWorkflow.run, + count, + id=broker_id, + task_queue=task_queue, + ) + + activity_handle = await client.start_activity( + standalone_subscribe_to_broker, + CrossWorkflowInput( + broker_workflow_id=broker_id, + expected_count=count, + ), + id=f"standalone-subscribe-{uuid.uuid4()}", + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=10), + ) + result = await activity_handle.result() + assert result == [f"broker-{i}" for i in range(count)] + + await broker_handle.signal(BrokerWorkflow.close) + + +@pytest.mark.asyncio +async def test_from_within_activity_in_standalone_activity_raises( + client: Client, env: WorkflowEnvironment +) -> None: + """from_within_activity() raises a clear error pointing at create() when used in a + standalone activity (one without a parent workflow).""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server does not support Client.start_activity: " + "https://github.com/temporalio/sdk-java/issues/2741" + ) + task_queue = str(uuid.uuid4()) + + async with new_worker( + client, + activities=[standalone_from_within_activity_misuse], + task_queue=task_queue, + ): + activity_handle = await client.start_activity( + standalone_from_within_activity_misuse, + id=f"standalone-misuse-{uuid.uuid4()}", + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=10), + ) + msg = await activity_handle.result() + assert "no parent workflow" in msg + assert "WorkflowStreamClient.create" in msg + + +# --------------------------------------------------------------------------- +# Cross-namespace workflow stream via Nexus (Scenario 2) +# --------------------------------------------------------------------------- + + +@dataclass +class StartBrokerInput: + count: int + broker_id: str + + +@dataclass +class NexusCallerInput: + count: int + broker_id: str + endpoint: str + + +@workflow.defn +class NexusBrokerWorkflow: + @workflow.init + def __init__(self, count: int) -> None: + self.stream = WorkflowStream() + self._closed = False + + @workflow.signal + def close(self) -> None: + self._closed = True + + @workflow.run + async def run(self, count: int) -> str: + for i in range(count): + self.stream.topic("events", type=bytes).publish(f"nexus-{i}".encode()) + await workflow.wait_condition(lambda: self._closed) + return "done" + + +@nexusrpc.service +class WorkflowStreamNexusService: + start_broker: nexusrpc.Operation[StartBrokerInput, str] + + +@nexusrpc.handler.service_handler(service=WorkflowStreamNexusService) +class WorkflowStreamNexusHandler: + @workflow_run_operation + async def start_broker( + self, ctx: WorkflowRunOperationContext, input: StartBrokerInput + ) -> nexus.WorkflowHandle[str]: + return await ctx.start_workflow( + NexusBrokerWorkflow.run, + input.count, + id=input.broker_id, + ) + + +@workflow.defn +class NexusCallerWorkflow: + @workflow.run + async def run(self, input: NexusCallerInput) -> str: + nc = workflow.create_nexus_client( + service=WorkflowStreamNexusService, + endpoint=input.endpoint, + ) + return await nc.execute_operation( + WorkflowStreamNexusService.start_broker, + StartBrokerInput(count=input.count, broker_id=input.broker_id), + ) + + +async def create_cross_namespace_endpoint( + client: Client, + endpoint_name: str, + target_namespace: str, + task_queue: str, +) -> None: + await client.operator_service.create_nexus_endpoint( + temporalio.api.operatorservice.v1.CreateNexusEndpointRequest( + spec=temporalio.api.nexus.v1.EndpointSpec( + name=endpoint_name, + target=temporalio.api.nexus.v1.EndpointTarget( + worker=temporalio.api.nexus.v1.EndpointTarget.Worker( + namespace=target_namespace, + task_queue=task_queue, + ) + ), + ) + ) + ) + + +@pytest.mark.asyncio +async def test_poll_more_ready_when_response_exceeds_size_limit( + client: Client, +) -> None: + """Poll response sets more_ready=True when items exceed ~1MB wire size.""" + async with new_worker( + client, + BasicWorkflowStreamWorkflow, + ) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-more-ready-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Publish items that total well over 1MB in the poll response. + # Send in separate signals to stay under the RPC size limit. + # Each item is ~200KB; 8 items = ~1.6MB wire (base64 inflates ~33%). + chunk = b"x" * 200_000 + for _ in range(8): + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="big", data=_wire_bytes(chunk))] + ), + ) + + # First poll from offset 0 — should get some items but not all. + # (The update acts as a barrier for all prior publish signals.) + result1: PollResult = await handle.execute_update( + "__temporal_workflow_stream_poll", + PollInput(topics=[], from_offset=0), + result_type=PollResult, + ) + assert result1.more_ready is True + assert len(result1.items) < 8 + assert result1.next_offset < 8 + + # Continue polling until we have all items + all_items = list(result1.items) + offset = result1.next_offset + last_result: PollResult = result1 + while len(all_items) < 8: + last_result = await handle.execute_update( + "__temporal_workflow_stream_poll", + PollInput(topics=[], from_offset=offset), + result_type=PollResult, + ) + all_items.extend(last_result.items) + offset = last_result.next_offset + assert len(all_items) == 8 + # The final poll that drained the log should set more_ready=False + assert last_result.more_ready is False + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +async def test_subscribe_iterates_through_more_ready(client: Client) -> None: + """Subscriber correctly yields all items when polls are size-truncated.""" + async with new_worker( + client, + BasicWorkflowStreamWorkflow, + ) as worker: + handle = await client.start_workflow( + BasicWorkflowStreamWorkflow.run, + id=f"workflow-stream-more-ready-iter-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Publish 8 x 200KB items (~2MB+ wire, exceeds 1MB cap) + chunk = b"x" * 200_000 + for _ in range(8): + await handle.signal( + "__temporal_workflow_stream_publish", + PublishInput( + items=[PublishEntry(topic="big", data=_wire_bytes(chunk))] + ), + ) + + # subscribe() should seamlessly iterate through all 8 items + items = await collect_items(client, handle, None, 0, 8, timeout=10.0) + assert len(items) == 8 + for item in items: + assert item.data == chunk + + await handle.signal(BasicWorkflowStreamWorkflow.close) + + +@pytest.mark.asyncio +@pytest.mark.requires_local_server +async def test_cross_namespace_nexus_stream( + client: Client, env: WorkflowEnvironment +) -> None: + """Nexus operation starts a workflow stream broker in another namespace; test subscribes.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus not supported with time-skipping server") + + count = 5 + handler_ns = f"handler-ns-{uuid.uuid4().hex[:8]}" + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + broker_id = f"nexus-broker-{uuid.uuid4()}" + + # Register the handler namespace with the dev server + await client.workflow_service.register_namespace( + temporalio.api.workflowservice.v1.RegisterNamespaceRequest( + namespace=handler_ns, + workflow_execution_retention_period=google.protobuf.duration_pb2.Duration( + seconds=86400, + ), + ) + ) + + handler_client = await env.connect_client( + namespace=handler_ns, + ) + + # Create endpoint targeting the handler namespace + await create_cross_namespace_endpoint( + client, + endpoint_name, + target_namespace=handler_ns, + task_queue=task_queue, + ) + + # Handler worker in handler namespace + async with Worker( + handler_client, + task_queue=task_queue, + workflows=[NexusBrokerWorkflow], + nexus_service_handlers=[WorkflowStreamNexusHandler()], + ): + # Caller worker in default namespace + caller_tq = str(uuid.uuid4()) + async with new_worker( + client, + NexusCallerWorkflow, + task_queue=caller_tq, + ): + # Start caller — invokes Nexus op which starts broker in handler ns + caller_handle = await client.start_workflow( + NexusCallerWorkflow.run, + NexusCallerInput( + count=count, + broker_id=broker_id, + endpoint=endpoint_name, + ), + id=f"nexus-caller-{uuid.uuid4()}", + task_queue=caller_tq, + ) + + # Wait for the broker workflow to be started by the Nexus operation + broker_handle = handler_client.get_workflow_handle(broker_id) + + async def broker_started() -> bool: + try: + await broker_handle.describe() + return True + except Exception: + return False + + await assert_eq_eventually( + True, broker_started, timeout=timedelta(seconds=15) + ) + + # Subscribe to broker events from the handler namespace + items = await collect_items( + handler_client, broker_handle, ["events"], 0, count + ) + assert len(items) == count + for i in range(count): + assert items[i].topic == "events" + assert items[i].data == f"nexus-{i}".encode() + + # Clean up — signal broker to close so caller can complete + await broker_handle.signal("close") + result = await caller_handle.result() + assert result == "done" diff --git a/tests/helpers/__init__.py b/tests/helpers/__init__.py index 09bc61b455..4c0462bc0c 100644 --- a/tests/helpers/__init__.py +++ b/tests/helpers/__init__.py @@ -3,19 +3,16 @@ import logging.handlers import queue import socket +import threading import time import uuid -from collections.abc import Awaitable, Callable, Sequence +from collections.abc import Awaitable, Callable, Iterator, Sequence from contextlib import closing, contextmanager from dataclasses import dataclass from datetime import datetime, timedelta, timezone from typing import ( Any, - List, - Optional, - Type, TypeVar, - Union, cast, ) @@ -34,7 +31,11 @@ PollWorkflowExecutionUpdateRequest, UnpauseActivityRequest, ) -from temporalio.client import BuildIdOpAddNewDefault, Client, WorkflowHandle +from temporalio.client import ( + BuildIdOpAddNewDefault, + Client, + WorkflowHandle, +) from temporalio.common import SearchAttributeKey from temporalio.converter import DataConverter from temporalio.service import RPCError, RPCStatusCode @@ -53,7 +54,7 @@ def new_worker( workflow_runner: WorkflowRunner = SandboxedWorkflowRunner(), max_cached_workflows: int = 1000, workflow_failure_exception_types: Sequence[type[BaseException]] = [], - **kwargs, + **kwargs, # type:ignore[reportMissingParameterType] ) -> Worker: return Worker( client, @@ -75,6 +76,7 @@ async def assert_eventually( *, timeout: timedelta = timedelta(seconds=10), interval: timedelta = timedelta(milliseconds=200), + retry_on_rpc_cancelled: bool = True, ) -> T: start_sec = time.monotonic() while True: @@ -84,6 +86,11 @@ async def assert_eventually( except AssertionError: if timedelta(seconds=time.monotonic() - start_sec) >= timeout: raise + except RPCError as e: + if not (retry_on_rpc_cancelled and e.status == RPCStatusCode.CANCELLED): + raise + if timedelta(seconds=time.monotonic() - start_sec) >= timeout: + raise await asyncio.sleep(interval.total_seconds()) @@ -154,6 +161,24 @@ async def ensure_search_attributes_present( assert {key.name for key in keys}.issubset(resp.custom_attributes.keys()) +def assert_duration_same(expected: float, actual: float, tolerance: float) -> None: + """Assert two durations (in seconds) are the same within ``tolerance``.""" + delta = abs(actual - expected) + assert delta <= tolerance, ( + f"expected {expected}s ± {tolerance}s, got {actual}s (delta {delta:.3f}s)" + ) + + +async def find_history_event( + handle: WorkflowHandle, predicate: Callable[[HistoryEvent], bool] +) -> HistoryEvent | None: + """Return the first history event matching ``predicate``, or ``None``.""" + async for event in handle.fetch_history_events(): + if predicate(event): + return event + return None + + def find_free_port() -> int: with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: s.bind(("", 0)) @@ -187,7 +212,7 @@ async def admitted_update_task( handle: WorkflowHandle, update_method: UpdateMethodMultiParam, id: str, - **kwargs, + **kwargs, # type:ignore[reportMissingParameterType] ) -> asyncio.Task: """ Return an asyncio.Task for an update after waiting for it to be admitted. @@ -251,6 +276,44 @@ async def check() -> PendingActivityInfo: return await assert_eventually(check, timeout=timeout) +async def assert_event_subsequence( + wf_handle: WorkflowHandle, + expected_events: list[EventType.ValueType], + timeout: timedelta = timedelta(seconds=5), +) -> None: + """ + Given a workflow handle and a sequence of event types, assert that the workflow's history + contains that subsequence of events in the order specified. + """ + + async def check(): + history = await wf_handle.fetch_history() + + _all_events = iter(history.events) + _expected_events = iter(expected_events) + + previous_expected_event_type_name = None + for expected_event_type in _expected_events: + expected_event_type_name = EventType.Name(expected_event_type).removeprefix( + "EVENT_TYPE_" + ) + has_expected = next( + (e for e in _all_events if e.event_type == expected_event_type), + None, + ) + if not has_expected: + if previous_expected_event_type_name is not None: + prefix = f"After {previous_expected_event_type_name}, " + else: + prefix = "" + raise AssertionError( + f"{prefix}expected {expected_event_type_name} in workflow {wf_handle.id}" + ) + previous_expected_event_type_name = expected_event_type_name + + await assert_eventually(check, timeout=timeout) + + async def get_pending_activity_info( handle: WorkflowHandle, activity_id: str, @@ -263,8 +326,28 @@ async def get_pending_activity_info( return None +_wait_for_pause_events: dict[str, threading.Event] = {} + + +def wait_for_pause_event(activity_id: str) -> None: + event = _wait_for_pause_events.get(activity_id) + if event is not None: + event.wait() + + +async def async_wait_for_pause_event(activity_id: str) -> None: + event = _wait_for_pause_events.get(activity_id) + if event is not None: + await asyncio.get_running_loop().run_in_executor(None, event.wait) + + async def pause_and_assert(client: Client, handle: WorkflowHandle, activity_id: str): - """Pause the given activity and assert it becomes paused.""" + """Pause the given activity and assert it becomes paused. + + Registers an event before calling the pause API so cooperating test + activities (those that catch the pause-induced cancel via + wait_for_pause_release) hang until we have observed paused=true. + """ desc = await handle.describe() req = PauseActivityRequest( namespace=client.namespace, @@ -274,14 +357,19 @@ async def pause_and_assert(client: Client, handle: WorkflowHandle, activity_id: ), id=activity_id, ) - await client.workflow_service.pause_activity(req) - # Assert eventually paused - async def check_paused() -> bool: - info = await assert_pending_activity_exists_eventually(handle, activity_id) - return info.paused + _wait_for_pause_events[activity_id] = threading.Event() + try: + await client.workflow_service.pause_activity(req) + + async def check_paused() -> None: + info = await assert_pending_activity_exists_eventually(handle, activity_id) + assert info.paused, f"Activity {activity_id} not yet paused" - await assert_eventually(check_paused) + await assert_eventually(check_paused) + finally: + _wait_for_pause_events[activity_id].set() + del _wait_for_pause_events[activity_id] async def unpause_and_assert(client: Client, handle: WorkflowHandle, activity_id: str): @@ -298,9 +386,9 @@ async def unpause_and_assert(client: Client, handle: WorkflowHandle, activity_id await client.workflow_service.unpause_activity(req) # Assert eventually not paused - async def check_unpaused() -> bool: + async def check_unpaused() -> None: info = await assert_pending_activity_exists_eventually(handle, activity_id) - return not info.paused + assert not info.paused, f"Activity {activity_id} still paused" await assert_eventually(check_unpaused) @@ -420,12 +508,12 @@ def __init__(self) -> None: self.log_queue: queue.Queue[logging.LogRecord] = queue.Queue() @contextmanager - def logs_captured(self, *loggers: logging.Logger): + def logs_captured(self, *loggers: logging.Logger, level: int = logging.INFO): handler = logging.handlers.QueueHandler(self.log_queue) prev_levels = [l.level for l in loggers] for l in loggers: - l.setLevel(logging.INFO) + l.setLevel(level) l.addHandler(handler) try: yield self @@ -444,3 +532,25 @@ def find( if pred(record): return record return None + + def find_all( + self, pred: Callable[[logging.LogRecord], bool] + ) -> list[logging.LogRecord]: + return [ + record + for record in cast(list[logging.LogRecord], self.log_queue.queue) + if pred(record) + ] + + +class LogHandler: + @staticmethod + @contextmanager + def apply(logger: logging.Logger, handler: logging.Handler) -> Iterator[None]: + level = logger.level + logger.addHandler(handler) + try: + yield + finally: + logger.removeHandler(handler) + logger.level = level diff --git a/tests/helpers/external_coroutine.py b/tests/helpers/external_coroutine.py index 72fa8f25aa..9af6e85ecb 100644 --- a/tests/helpers/external_coroutine.py +++ b/tests/helpers/external_coroutine.py @@ -2,8 +2,6 @@ File used in conjunction with external_stack_trace.py to test filenames in multi-file workflows. """ -from typing import List - from temporalio import workflow diff --git a/tests/helpers/fork.py b/tests/helpers/fork.py index e6d84652fa..d465a4808e 100644 --- a/tests/helpers/fork.py +++ b/tests/helpers/fork.py @@ -3,7 +3,6 @@ import asyncio import multiprocessing import multiprocessing.context -import sys from dataclasses import dataclass from typing import Any @@ -40,8 +39,8 @@ def assertion_error(message: str) -> _ForkTestResult: ) -class _TestFork: - _expected: _ForkTestResult +class _TestFork: # type:ignore[reportUnusedClass] + _expected: _ForkTestResult # type:ignore[reportUninitializedInstanceVariable] async def coro(self) -> Any: raise NotImplementedError() @@ -66,7 +65,7 @@ def run(self, mp_fork_context: multiprocessing.context.BaseContext | None): if not mp_fork_context or not process_factory: pytest.skip("fork context not available") - self._parent_conn, self._child_conn = mp_fork_context.Pipe(duplex=False) + self._parent_conn, self._child_conn = mp_fork_context.Pipe(duplex=False) # type:ignore[reportUninitializedInstanceVariable] # start fork child_process = process_factory(target=self.entry, args=(), daemon=False) child_process.start() diff --git a/tests/helpers/nexus.py b/tests/helpers/nexus.py index 63dde9621b..0af468b44f 100644 --- a/tests/helpers/nexus.py +++ b/tests/helpers/nexus.py @@ -1,20 +1,9 @@ -import dataclasses -from collections.abc import Mapping -from dataclasses import dataclass -from typing import Any, Optional -from urllib.parse import urlparse +from collections.abc import Sequence -import temporalio.api.failure.v1 -import temporalio.api.nexus.v1 -import temporalio.api.operatorservice.v1 -import temporalio.workflow -from temporalio.client import Client -from temporalio.converter import FailureConverter, PayloadConverter -from temporalio.testing import WorkflowEnvironment - -with temporalio.workflow.unsafe.imports_passed_through(): - import httpx - from google.protobuf import json_format +import temporalio.api.common.v1 +import temporalio.api.enums.v1 +import temporalio.api.history.v1 +from temporalio.client import WorkflowHistory def make_nexus_endpoint_name(task_queue: str) -> str: @@ -22,110 +11,92 @@ def make_nexus_endpoint_name(task_queue: str) -> str: return f"nexus-endpoint-{task_queue}" -# TODO(nexus-preview): How do we recommend that users create endpoints in their own tests? -# See https://github.com/temporalio/sdk-typescript/pull/1708/files?show-viewed-files=true&file-filters%5B%5D=&w=0#r2082549085 -async def create_nexus_endpoint( - task_queue: str, client: Client -) -> temporalio.api.operatorservice.v1.CreateNexusEndpointResponse: - name = make_nexus_endpoint_name(task_queue) - return await client.operator_service.create_nexus_endpoint( - temporalio.api.operatorservice.v1.CreateNexusEndpointRequest( - spec=temporalio.api.nexus.v1.EndpointSpec( - name=name, - target=temporalio.api.nexus.v1.EndpointTarget( - worker=temporalio.api.nexus.v1.EndpointTarget.Worker( - namespace=client.namespace, - task_queue=task_queue, - ) - ), - ) +def events_of_type( + history: WorkflowHistory, + event_type: temporalio.api.enums.v1.EventType.ValueType, +) -> list[temporalio.api.history.v1.HistoryEvent]: + return [event for event in history.events if event.event_type == event_type] + + +def links_from_workflow_execution_started_event( + event: temporalio.api.history.v1.HistoryEvent, +) -> list[temporalio.api.common.v1.Link]: + callback_links = [ + link + for callback in event.workflow_execution_started_event_attributes.completion_callbacks + for link in callback.links + ] + if callback_links: + return list(callback_links) + return list(event.links) + + +def workflow_event_link_event_type( + workflow_event: temporalio.api.common.v1.Link.WorkflowEvent, +) -> temporalio.api.enums.v1.EventType.ValueType: + if workflow_event.HasField("request_id_ref"): + return workflow_event.request_id_ref.event_type + return workflow_event.event_ref.event_type + + +def expected_nexus_operation_link( + *, + namespace: str, + operation_id: str, + run_id: str, +) -> temporalio.api.common.v1.Link: + return temporalio.api.common.v1.Link( + nexus_operation=temporalio.api.common.v1.Link.NexusOperation( + namespace=namespace, + operation_id=operation_id, + run_id=run_id, ) ) -@dataclass -class ServiceClient: - server_address: str # E.g. http://127.0.0.1:7243 - endpoint: str - service: str - - async def start_operation( - self, - operation: str, - body: dict[str, Any] | None = None, - headers: Mapping[str, str] = {}, - ) -> httpx.Response: - """ - Start a Nexus operation. - """ - # TODO(nexus-preview): Support callback URL as query param - async with httpx.AsyncClient() as http_client: - return await http_client.post( - f"http://{self.server_address}/nexus/endpoints/{self.endpoint}/services/{self.service}/{operation}", - json=body, - headers=headers, - ) - - async def cancel_operation( - self, - operation: str, - token: str, - ) -> httpx.Response: - async with httpx.AsyncClient() as http_client: - return await http_client.post( - f"http://{self.server_address}/nexus/endpoints/{self.endpoint}/services/{self.service}/{operation}/cancel", - # Token can also be sent as "Nexus-Operation-Token" header - params={"token": token}, +def expected_workflow_event_link( + *, + namespace: str, + workflow_id: str, + run_id: str, + event_type: temporalio.api.enums.v1.EventType.ValueType, + event_id: int = 0, + request_id: str | None = None, +) -> temporalio.api.common.v1.Link: + if request_id is not None: + return temporalio.api.common.v1.Link( + workflow_event=temporalio.api.common.v1.Link.WorkflowEvent( + namespace=namespace, + workflow_id=workflow_id, + run_id=run_id, + request_id_ref=temporalio.api.common.v1.Link.WorkflowEvent.RequestIdReference( + request_id=request_id, + event_type=event_type, + ), ) + ) - @staticmethod - def default_server_address(env: WorkflowEnvironment) -> str: - # TODO(nexus-preview): nexus tests are making http requests directly but this is - # not officially supported. - parsed = urlparse(env.client.service_client.config.target_host) - host = parsed.hostname or "127.0.0.1" - http_port = getattr(env, "_http_port", 7243) - return f"{host}:{http_port}" - - -def dataclass_as_dict(dataclass: Any) -> dict[str, Any]: - """ - Return a shallow dict of the dataclass's fields. - - dataclasses.as_dict goes too far (attempts to pickle values) - """ - return { - field.name: getattr(dataclass, field.name) - for field in dataclasses.fields(dataclass) - } - - -@dataclass -class Failure: - """A Nexus Failure object, with details parsed into an exception. - - https://github.com/nexus-rpc/api/blob/main/SPEC.md#failure - """ + return temporalio.api.common.v1.Link( + workflow_event=temporalio.api.common.v1.Link.WorkflowEvent( + namespace=namespace, + workflow_id=workflow_id, + run_id=run_id, + event_ref=temporalio.api.common.v1.Link.WorkflowEvent.EventReference( + event_id=event_id, + event_type=event_type, + ), + ) + ) - message: str = "" - metadata: dict[str, str] | None = None - details: dict[str, Any] | None = None - exception_from_details: BaseException | None = dataclasses.field( - init=False, default=None - ) +def assert_links_match( + links: Sequence[temporalio.api.common.v1.Link], + *expected_links: temporalio.api.common.v1.Link, +) -> None: + actual = sorted(list(links), key=_link_sort_key) + expected = sorted(list(expected_links), key=_link_sort_key) + assert actual == expected - def __post_init__(self) -> None: - if self.metadata and (error_type := self.metadata.get("type")): - self.exception_from_details = self._instantiate_exception( - error_type, self.details - ) - def _instantiate_exception( - self, error_type: str, details: dict[str, Any] | None - ) -> BaseException: - proto = { - "temporal.api.failure.v1.Failure": temporalio.api.failure.v1.Failure, - }[error_type]() - json_format.ParseDict(self.details, proto, ignore_unknown_fields=True) - return FailureConverter.default.from_failure(proto, PayloadConverter.default) +def _link_sort_key(link: temporalio.api.common.v1.Link) -> bytes: + return link.SerializeToString(deterministic=True) diff --git a/tests/helpers/time_skipping.py b/tests/helpers/time_skipping.py new file mode 100644 index 0000000000..49f238359f --- /dev/null +++ b/tests/helpers/time_skipping.py @@ -0,0 +1,44 @@ +"""Helpers for time-skipping tests.""" + +from __future__ import annotations + +import platform + +import pytest + +from temporalio.api.enums.v1 import event_type_pb2 as _event_type +from temporalio.client import WorkflowHandle + + +def skip_if_time_skipping_v1_unsupported() -> None: + """Skip when a V1 time-skipping environment cannot be started here.""" + if platform.machine() not in ("i386", "AMD64", "x86_64"): + pytest.skip("Time skipping server does not run outside x86") + + +async def _has_time_skipping_transitioned_event(handle: WorkflowHandle) -> bool: + """Return True iff the workflow history contains the time-skipping transition event + ``EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED``.""" + async for e in handle.fetch_history_events(): + if ( + e.event_type + == _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED + ): + return True + return False + + +async def assert_time_was_skipped(handle: WorkflowHandle) -> None: + """Fail if the workflow history has no time-skipping event.""" + assert await _has_time_skipping_transitioned_event(handle), ( + f"workflow {handle.id} has no TIME_SKIPPING_TRANSITIONED events — " + f"time skipping never engaged" + ) + + +async def assert_time_was_not_skipped(handle: WorkflowHandle) -> None: + """Fail if the workflow history has any time-skipping event.""" + assert not await _has_time_skipping_transitioned_event(handle), ( + f"workflow {handle.id} has at least one TIME_SKIPPING_TRANSITIONED " + f"event — time skipping engaged unexpectedly" + ) diff --git a/tests/helpers/trace.py b/tests/helpers/trace.py new file mode 100644 index 0000000000..913bd27da3 --- /dev/null +++ b/tests/helpers/trace.py @@ -0,0 +1,111 @@ +"""Helpers for asserting indented trace hierarchies.""" + +from __future__ import annotations + +from collections.abc import Sequence +from dataclasses import dataclass, field + + +@dataclass +class TraceNode: + name: str + children: list[TraceNode] = field(default_factory=list) + + +def format_trace_hierarchy(roots: Sequence[TraceNode]) -> list[str]: + """Render a trace forest as indented lines.""" + lines: list[str] = [] + + def render(node: TraceNode, depth: int) -> None: + lines.append(" " * depth + node.name) + for child in node.children: + render(child, depth + 1) + + for root in roots: + render(root, 0) + return lines + + +def assert_trace_hierarchy( + actual: Sequence[TraceNode], expected: Sequence[str] +) -> None: + """Assert a trace hierarchy, allowing matching Start/Run siblings to swap. + + Activity execution can begin before the asynchronously published Start span + reaches an in-memory exporter. The two spans retain the same parent, so this + accepts only that sibling transposition and preserves all other ordering. + """ + actual_tree = TraceNode("", list(actual)) + expected_tree = _parse_trace(expected) + assert _nodes_match(actual_tree, expected_tree), ( + "Trace hierarchy differed.\n" + f"Actual:\n{chr(10).join(format_trace_hierarchy(actual))}\n" + f"Expected:\n{chr(10).join(expected)}" + ) + + +def _parse_trace(trace: Sequence[str]) -> TraceNode: + root = TraceNode("") + stack: list[tuple[int, TraceNode]] = [(-1, root)] + for line in trace: + name = line.lstrip() + indent = len(line) - len(name) + assert name and indent % 2 == 0, f"Invalid trace line: {line!r}" + depth = indent // 2 + while stack[-1][0] >= depth: + stack.pop() + assert depth == stack[-1][0] + 1, f"Invalid trace nesting: {line!r}" + node = TraceNode(name) + stack[-1][1].children.append(node) + stack.append((depth, node)) + return root + + +def _nodes_match(actual: TraceNode, expected: TraceNode) -> bool: + if actual.name != expected.name or len(actual.children) != len(expected.children): + return False + + index = 0 + while index < len(actual.children): + actual_child = actual.children[index] + expected_child = expected.children[index] + if _nodes_match(actual_child, expected_child): + index += 1 + continue + + if index + 1 == len(actual.children): + return False + actual_pair = actual.children[index : index + 2] + expected_pair = expected.children[index : index + 2] + if not _is_start_run_pair(*actual_pair) or not _is_start_run_pair( + *expected_pair + ): + return False + expected_by_name = {node.name: node for node in expected_pair} + if any(node.name not in expected_by_name for node in actual_pair): + return False + if not all( + _nodes_match(node, expected_by_name[node.name]) for node in actual_pair + ): + return False + index += 2 + + return True + + +def _is_start_run_pair(first: TraceNode, second: TraceNode) -> bool: + first_start = _start_run_suffix(first.name) + second_start = _start_run_suffix(second.name) + first_run = _run_suffix(first.name) + second_run = _run_suffix(second.name) + return (first_start is not None and first_start == second_run) or ( + second_start is not None and second_start == first_run + ) + + +def _start_run_suffix(name: str) -> str | None: + return name.removeprefix("Start") if name.startswith("Start") else None + + +def _run_suffix(name: str) -> str | None: + return name.removeprefix("Run") if name.startswith("Run") else None diff --git a/tests/helpers/worker.py b/tests/helpers/worker.py index 5c6e6898cf..b21be3b36f 100644 --- a/tests/helpers/worker.py +++ b/tests/helpers/worker.py @@ -12,7 +12,7 @@ from collections.abc import Sequence from dataclasses import dataclass from datetime import timedelta -from typing import Any, Optional, Tuple +from typing import Any import temporalio.converter from temporalio import workflow @@ -132,7 +132,7 @@ async def handle_action( elif action.signal: signal_event = asyncio.Event() - def signal_handler(arg: Any | None = None) -> None: + def signal_handler(_arg: Any | None = None) -> None: signal_event.set() workflow.set_signal_handler(action.signal.name, signal_handler) diff --git a/tests/nexus/test_dynamic_creation_of_user_handler_classes.py b/tests/nexus/test_dynamic_creation_of_user_handler_classes.py index bc4eacd278..1c1b1b350d 100644 --- a/tests/nexus/test_dynamic_creation_of_user_handler_classes.py +++ b/tests/nexus/test_dynamic_creation_of_user_handler_classes.py @@ -1,16 +1,18 @@ import uuid -import httpx +import nexusrpc import nexusrpc.handler import pytest -from nexusrpc.handler import sync_operation from temporalio import nexus, workflow from temporalio.client import Client -from temporalio.nexus._util import get_operation_factory from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker -from tests.helpers.nexus import ServiceClient, create_nexus_endpoint +from tests.helpers.nexus import make_nexus_endpoint_name + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server @workflow.defn @@ -20,11 +22,6 @@ async def run(self, input: int) -> int: return input + 1 -@nexusrpc.service -class MyService: - increment: nexusrpc.Operation[int, int] - - class MyIncrementOperationHandler(nexusrpc.handler.OperationHandler[int, int]): async def start( self, @@ -45,18 +42,22 @@ async def cancel( raise NotImplementedError -@nexusrpc.handler.service_handler -class MyServiceHandlerWithWorkflowRunOperation: - @nexusrpc.handler._decorators.operation_handler - def increment(self) -> nexusrpc.handler.OperationHandler[int, int]: - return MyIncrementOperationHandler() +@workflow.defn +class IncrementCallerWorkflow: + @workflow.run + async def run(self, input: int, task_queue: str) -> int: + client = workflow.create_nexus_client( + service="MyService", + endpoint=make_nexus_endpoint_name(task_queue), + ) + return await client.execute_operation("increment", input, output_type=int) async def test_run_nexus_service_from_programmatically_created_service_handler( client: Client, env: WorkflowEnvironment, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) @@ -78,85 +79,17 @@ async def test_run_nexus_service_from_programmatically_created_service_handler( }, ) - service_name = service_handler.service.name - - endpoint = (await create_nexus_endpoint(task_queue, client)).endpoint.id + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) async with Worker( client, task_queue=task_queue, nexus_service_handlers=[service_handler], + workflows=[IncrementCallerWorkflow, MyWorkflow], ): - server_address = ServiceClient.default_server_address(env) - async with httpx.AsyncClient() as http_client: - response = await http_client.post( - f"http://{server_address}/nexus/endpoints/{endpoint}/services/{service_name}/increment", - json=1, - ) - assert response.status_code == 201 - - -def make_incrementer_user_service_definition_and_service_handler_classes( - op_names: list[str], -) -> tuple[type, type]: - # - # service contract - # - - ops = {name: nexusrpc.Operation[int, int] for name in op_names} - service_cls: type = nexusrpc.service(type("ServiceContract", (), ops)) - - # - # service handler - # - @sync_operation - async def _increment_op( - self, - ctx: nexusrpc.handler.StartOperationContext, - input: int, - ) -> int: - return input + 1 - - op_handler_factories = {} - for name in op_names: - op_handler_factory, _ = get_operation_factory(_increment_op) - assert op_handler_factory - op_handler_factories[name] = op_handler_factory - - handler_cls: type = nexusrpc.handler.service_handler(service=service_cls)( - type("ServiceImpl", (), op_handler_factories) - ) - - return service_cls, handler_cls - - -@pytest.mark.skip( - reason="Dynamic creation of service contract using type() is not supported" -) -async def test_dynamic_creation_of_user_handler_classes( - client: Client, env: WorkflowEnvironment -): - task_queue = str(uuid.uuid4()) - - service_cls, handler_cls = ( - make_incrementer_user_service_definition_and_service_handler_classes( - ["increment"] + result = await client.execute_workflow( + IncrementCallerWorkflow.run, + args=[5, task_queue], + id=str(uuid.uuid4()), + task_queue=task_queue, ) - ) - - assert (service_defn := nexusrpc.get_service_definition(service_cls)) - service_name = service_defn.name - - endpoint = (await create_nexus_endpoint(task_queue, client)).endpoint.id - async with Worker( - client, - task_queue=task_queue, - nexus_service_handlers=[handler_cls()], - ): - server_address = ServiceClient.default_server_address(env) - async with httpx.AsyncClient() as http_client: - response = await http_client.post( - f"http://{server_address}/nexus/endpoints/{endpoint}/services/{service_name}/increment", - json=1, - ) - assert response.status_code == 200 - assert response.json() == 2 + assert result == 6 diff --git a/tests/nexus/test_handler.py b/tests/nexus/test_handler.py deleted file mode 100644 index 2bb10ae430..0000000000 --- a/tests/nexus/test_handler.py +++ /dev/null @@ -1,1107 +0,0 @@ -""" -See https://github.com/nexus-rpc/api/blob/main/SPEC.md - -This file contains test coverage for Nexus StartOperation and CancelOperation -operations issued by a caller directly via HTTP. - -The response to StartOperation may indicate a protocol-level failure (400 -BAD_REQUEST, 520 UPSTREAM_TIMEOUT, etc). In this case the body is a valid -Failure object. - - -(https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors) - -""" - -import asyncio -import concurrent.futures -import logging -import pprint -import uuid -from collections.abc import Callable, Mapping -from concurrent.futures.thread import ThreadPoolExecutor -from dataclasses import dataclass, field -from types import MappingProxyType -from typing import Any, Optional, Union - -import httpx -import nexusrpc -import pytest -from nexusrpc import ( - HandlerError, - HandlerErrorType, - OperationError, - OperationErrorState, -) -from nexusrpc.handler import ( - CancelOperationContext, - OperationHandler, - StartOperationContext, - StartOperationResultSync, - service_handler, - sync_operation, -) -from nexusrpc.handler._decorators import operation_handler - -from temporalio import nexus, workflow -from temporalio.client import Client -from temporalio.common import WorkflowIDReusePolicy -from temporalio.exceptions import ApplicationError -from temporalio.nexus import ( - WorkflowRunOperationContext, - workflow_run_operation, -) -from temporalio.testing import WorkflowEnvironment -from temporalio.worker import Worker -from tests.helpers.nexus import ( - Failure, - ServiceClient, - create_nexus_endpoint, - dataclass_as_dict, -) - - -@dataclass -class Input: - value: str - - -@dataclass -class Output: - value: str - - -@dataclass -class NonSerializableOutput: - callable: Callable[[], Any] = lambda: None - - -# TODO(nexus-prelease): Test attaching multiple callers to the same operation. -# TODO(nexus-preview): type check nexus implementation under mypy -# TODO(nexus-preview): test malformed inbound_links and outbound_links - - -@nexusrpc.service -class MyService: - echo: nexusrpc.Operation[Input, Output] - echo_renamed: nexusrpc.Operation[Input, Output] = nexusrpc.Operation( - name="echo-renamed" - ) - hang: nexusrpc.Operation[Input, Output] - log: nexusrpc.Operation[Input, Output] - workflow_run_operation_happy_path: nexusrpc.Operation[Input, Output] - sync_operation_with_non_async_def: nexusrpc.Operation[Input, Output] - operation_returning_unwrapped_result_at_runtime_error: nexusrpc.Operation[ - Input, Output - ] - non_retryable_application_error: nexusrpc.Operation[Input, Output] - retryable_application_error: nexusrpc.Operation[Input, Output] - check_operation_timeout_header: nexusrpc.Operation[Input, Output] - workflow_run_op_link_test: nexusrpc.Operation[Input, Output] - handler_error_internal: nexusrpc.Operation[Input, Output] - operation_error_failed: nexusrpc.Operation[Input, Output] - idempotency_check: nexusrpc.Operation[None, Output] - non_serializable_output: nexusrpc.Operation[Input, NonSerializableOutput] - - -@workflow.defn -class MyWorkflow: - @workflow.run - async def run(self, input: Input) -> Output: - return Output(value=f"from workflow: {input.value}") - - -@workflow.defn -class WorkflowWithoutTypeAnnotations: - @workflow.run - async def run(self, input): # type: ignore - return Output(value=f"from workflow without type annotations: {input}") - - -@workflow.defn -class MyLinkTestWorkflow: - @workflow.run - async def run(self, input: Input) -> Output: - return Output(value=f"from link test workflow: {input.value}") - - -# The service_handler decorator is applied by the test -class MyServiceHandler: - @sync_operation - async def echo(self, ctx: StartOperationContext, input: Input) -> Output: - assert ctx.headers["test-header-key"] == "test-header-value" - ctx.outbound_links.extend(ctx.inbound_links) - assert nexus.in_operation() - return Output( - value=f"from start method on {self.__class__.__name__}: {input.value}" - ) - - # The name override is present in the service definition. But the test below submits - # the same operation name in the request whether using a service definition or now. - # The name override here is necessary when the test is not using the service - # definition. It should be permitted when the service definition is in effect, as - # long as the name override is the same as that in the service definition. - @sync_operation(name="echo-renamed") - async def echo_renamed(self, ctx: StartOperationContext, input: Input) -> Output: - return await self.echo(ctx, input) - - @sync_operation - async def hang(self, ctx: StartOperationContext, input: Input) -> Output: - await asyncio.Future() - return Output(value="won't reach here") - - @sync_operation - async def non_retryable_application_error( - self, ctx: StartOperationContext, input: Input - ) -> Output: - raise ApplicationError( - "non-retryable application error", - "details arg", - # TODO(nexus-preview): what values of `type` should be tested? - type="TestFailureType", - non_retryable=True, - ) - - @sync_operation - async def retryable_application_error( - self, ctx: StartOperationContext, input: Input - ) -> Output: - raise ApplicationError( - "retryable application error", - "details arg", - type="TestFailureType", - non_retryable=False, - ) - - @sync_operation - async def handler_error_internal( - self, ctx: StartOperationContext, input: Input - ) -> Output: - raise HandlerError( - message="deliberate internal handler error", - type=HandlerErrorType.INTERNAL, - retryable_override=False, - ) from RuntimeError("cause message") - - @sync_operation - async def operation_error_failed( - self, ctx: StartOperationContext, input: Input - ) -> Output: - raise OperationError( - message="deliberate operation error", - state=OperationErrorState.FAILED, - ) - - @sync_operation - async def check_operation_timeout_header( - self, ctx: StartOperationContext, input: Input - ) -> Output: - assert "operation-timeout" in ctx.headers - return Output( - value=f"from start method on {self.__class__.__name__}: {input.value}" - ) - - @sync_operation - async def log(self, ctx: StartOperationContext, input: Input) -> Output: - nexus.logger.info( - "Logging from start method", extra={"input_value": input.value} - ) - return Output(value=f"logged: {input.value}") - - @workflow_run_operation - async def workflow_run_operation_happy_path( - self, ctx: WorkflowRunOperationContext, input: Input - ) -> nexus.WorkflowHandle[Output]: - assert nexus.in_operation() - return await ctx.start_workflow( - MyWorkflow.run, - input, - id=str(uuid.uuid4()), - id_reuse_policy=WorkflowIDReusePolicy.REJECT_DUPLICATE, - ) - - @sync_operation - async def sync_operation_with_non_async_def( - self, ctx: StartOperationContext, input: Input - ) -> Output: - return Output( - value=f"from start method on {self.__class__.__name__}: {input.value}" - ) - - @workflow_run_operation - async def workflow_run_op_link_test( - self, ctx: WorkflowRunOperationContext, input: Input - ) -> nexus.WorkflowHandle[Output]: - assert any( - link.url == "http://inbound-link/" for link in ctx.inbound_links - ), "Inbound link not found" - assert ctx.request_id == "test-request-id-123", "Request ID mismatch" - ctx.outbound_links.extend(ctx.inbound_links) - - return await ctx.start_workflow( - MyLinkTestWorkflow.run, - input, - id=str(uuid.uuid4()), - ) - - class OperationHandlerReturningUnwrappedResult(OperationHandler[Input, Output]): - async def start( # type: ignore[override] # intentional test error - self, - ctx: StartOperationContext, - input: Input, - # This return type is a type error, but VSCode doesn't flag it unless - # "python.analysis.typeCheckingMode" is set to "strict" - ) -> Output: - # Invalid: start method must wrap result as StartOperationResultSync - # or StartOperationResultAsync - return Output(value="unwrapped result error") - - async def cancel(self, ctx: CancelOperationContext, token: str) -> None: - raise NotImplementedError - - @operation_handler - def operation_returning_unwrapped_result_at_runtime_error( - self, - ) -> OperationHandler[Input, Output]: - return MyServiceHandler.OperationHandlerReturningUnwrappedResult() - - @sync_operation - async def idempotency_check( - self, ctx: StartOperationContext, input: None - ) -> Output: - return Output(value=f"request_id: {ctx.request_id}") - - @sync_operation - async def non_serializable_output( - self, ctx: StartOperationContext, input: Input - ) -> NonSerializableOutput: - return NonSerializableOutput() - - -# Immutable dicts that can be used as dataclass field defaults - -SUCCESSFUL_RESPONSE_HEADERS = MappingProxyType( - { - "content-type": "application/json", - } -) - -UNSUCCESSFUL_RESPONSE_HEADERS = MappingProxyType( - { - "content-type": "application/json", - "temporal-nexus-failure-source": "worker", - } -) - - -@dataclass -class SuccessfulResponse: - status_code: int - body_json: dict[str, Any] | Callable[[dict[str, Any]], bool] | None = None - headers: Mapping[str, str] = field( - default_factory=lambda: SUCCESSFUL_RESPONSE_HEADERS - ) - - -@dataclass -class UnsuccessfulResponse: - status_code: int - failure_message: str | Callable[[str], bool] - # Is the Nexus Failure expected to have the details field populated? - failure_details: bool = True - # Expected value of inverse of non_retryable attribute of exception. - retryable_exception: bool = True - body_json: Callable[[dict[str, Any]], bool] | None = None - headers: Mapping[str, str] = field( - default_factory=lambda: UNSUCCESSFUL_RESPONSE_HEADERS - ) - - -class _TestCase: - operation: str - service_defn: str = "MyService" - input: Input = Input("") - headers: dict[str, str] = {} - expected: SuccessfulResponse - expected_without_service_definition: SuccessfulResponse | None = None - skip = "" - - @classmethod - def check_response( - cls, - response: httpx.Response, - with_service_definition: bool, - ) -> None: - assert response.status_code == cls.expected.status_code, ( - f"expected status code {cls.expected.status_code} " - f"but got {response.status_code} for response content" - f"{pprint.pformat(response.content.decode())}" - ) - if not with_service_definition and cls.expected_without_service_definition: - expected = cls.expected_without_service_definition - else: - expected = cls.expected - if expected.body_json is not None: - body = response.json() - assert isinstance(body, dict) - if isinstance(expected.body_json, dict): - assert body == expected.body_json - else: - assert expected.body_json(body) - assert response.headers.items() >= cls.expected.headers.items() - - -class _FailureTestCase(_TestCase): - expected: UnsuccessfulResponse # type: ignore[assignment] - - @classmethod - def check_response( - cls, response: httpx.Response, with_service_definition: bool - ) -> None: - super().check_response(response, with_service_definition) - failure = Failure(**response.json()) - - if isinstance(cls.expected.failure_message, str): - assert failure.message == cls.expected.failure_message - else: - assert cls.expected.failure_message(failure.message) - - -class SyncHandlerHappyPath(_TestCase): - operation = "echo" - input = Input("hello") - # TODO(nexus-prerelease): why is application/json randomly scattered around these tests? - headers = { - "Content-Type": "application/json", - "Test-Header-Key": "test-header-value", - "Nexus-Link": '; type="test"', - } - expected = SuccessfulResponse( - status_code=200, - body_json={"value": "from start method on MyServiceHandler: hello"}, - ) - # TODO(nexus-prerelease): headers should be lower-cased - assert ( - headers.get("Nexus-Link") == '; type="test"' - ), "Nexus-Link header not echoed correctly." - - -class SyncHandlerHappyPathRenamed(SyncHandlerHappyPath): - operation = "echo-renamed" - - -class SyncHandlerHappyPathNonAsyncDef(_TestCase): - operation = "sync_operation_with_non_async_def" - input = Input("hello") - expected = SuccessfulResponse( - status_code=200, - body_json={"value": "from start method on MyServiceHandler: hello"}, - ) - - -class AsyncHandlerHappyPath(_TestCase): - operation = "workflow_run_operation_happy_path" - input = Input("hello") - headers = {"Operation-Timeout": "777s"} - expected = SuccessfulResponse( - status_code=201, - ) - - -class WorkflowRunOpLinkTestHappyPath(_TestCase): - # TODO(nexus-prerelease): fix this test - skip = "Yields invalid link" - operation = "workflow_run_op_link_test" - input = Input("link-test-input") - headers = { - "Nexus-Link": '; type="test"', - "Nexus-Request-Id": "test-request-id-123", - } - expected = SuccessfulResponse( - status_code=201, - ) - - @classmethod - def check_response( - cls, response: httpx.Response, with_service_definition: bool - ) -> None: - super().check_response(response, with_service_definition) - nexus_link = response.headers.get("nexus-link") - assert nexus_link is not None, "nexus-link header not found in response" - assert nexus_link.startswith( - " Output: - assert ctx.headers["test-header-key"] == "test-header-value" - ctx.outbound_links.extend(ctx.inbound_links) - return Output( - value=f"from start method on {self.__class__.__name__}: {input.value}" - ) - - -@service_handler(service=EchoService) -class DefaultCancelHandler: - @sync_operation - async def echo(self, ctx: StartOperationContext, input: Input) -> Output: - return Output( - value=f"from start method on {self.__class__.__name__}: {input.value}" - ) - - -@service_handler(service=EchoService) -class SyncCancelHandler: - class SyncCancel(OperationHandler[Input, Output]): - async def start( - self, - ctx: StartOperationContext, - input: Input, - # This return type is a type error, but VSCode doesn't flag it unless - # "python.analysis.typeCheckingMode" is set to "strict" - ) -> StartOperationResultSync[Output]: - # Invalid: start method must wrap result as StartOperationResultSync - # or StartOperationResultAsync - return StartOperationResultSync(Output(value="Hello")) # type: ignore - - def cancel(self, ctx: CancelOperationContext, token: str) -> None: - return None # type: ignore - - @operation_handler - def echo(self) -> OperationHandler[Input, Output]: - return SyncCancelHandler.SyncCancel() - - -class SyncHandlerNoExecutor(_InstantiationCase): - handler = SyncStartHandler - executor = False - exception = RuntimeError - match = "you have not supplied an executor" - - -class DefaultCancel(_InstantiationCase): - handler = DefaultCancelHandler - executor = False - exception = None - - -class SyncCancel(_InstantiationCase): - handler = SyncCancelHandler - executor = False - exception = RuntimeError - match = "you have not supplied an executor" - - -@pytest.mark.parametrize( - "test_case", - [SyncHandlerNoExecutor, DefaultCancel, SyncCancel], -) -async def test_handler_instantiation( - test_case: type[_InstantiationCase], client: Client -): - task_queue = str(uuid.uuid4()) - - if test_case.exception is not None: - with pytest.raises(test_case.exception, match=test_case.match): - Worker( - client, - task_queue=task_queue, - nexus_service_handlers=[test_case.handler()], - nexus_task_executor=ThreadPoolExecutor() - if test_case.executor - else None, - ) - else: - Worker( - client, - task_queue=task_queue, - nexus_service_handlers=[test_case.handler()], - nexus_task_executor=ThreadPoolExecutor() if test_case.executor else None, - ) - - -async def test_cancel_operation_with_invalid_token(env: WorkflowEnvironment): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - - """Verify that canceling an operation with an invalid token fails correctly.""" - task_queue = str(uuid.uuid4()) - endpoint = (await create_nexus_endpoint(task_queue, env.client)).endpoint.id - service_client = ServiceClient( - server_address=ServiceClient.default_server_address(env), - endpoint=endpoint, - service=MyService.__name__, - ) - - decorator = service_handler(service=MyService) - user_service_handler = decorator(MyServiceHandler)() - - async with Worker( - env.client, - task_queue=task_queue, - nexus_service_handlers=[user_service_handler], - nexus_task_executor=concurrent.futures.ThreadPoolExecutor(), - ): - cancel_response = await service_client.cancel_operation( - "workflow_run_operation_happy_path", - token="this-is-not-a-valid-token", - ) - assert cancel_response.status_code == 404 - failure = Failure(**cancel_response.json()) - assert "failed to decode operation token" in failure.message.lower() - - -async def test_request_id_is_received_by_sync_operation( - env: WorkflowEnvironment, -): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - - task_queue = str(uuid.uuid4()) - endpoint = (await create_nexus_endpoint(task_queue, env.client)).endpoint.id - service_client = ServiceClient( - server_address=ServiceClient.default_server_address(env), - endpoint=endpoint, - service=MyService.__name__, - ) - - decorator = service_handler(service=MyService) - user_service_handler = decorator(MyServiceHandler)() - - async with Worker( - env.client, - task_queue=task_queue, - nexus_service_handlers=[user_service_handler], - nexus_task_executor=concurrent.futures.ThreadPoolExecutor(), - ): - request_id = str(uuid.uuid4()) - resp = await service_client.start_operation( - "idempotency_check", None, {"Nexus-Request-Id": request_id} - ) - assert resp.status_code == 200 - assert resp.json() == {"value": f"request_id: {request_id}"} - - -@workflow.defn -class EchoWorkflow: - @workflow.run - async def run(self, input: Input) -> Output: - return Output(value=input.value) - - -@service_handler -class ServiceHandlerForRequestIdTest: - @workflow_run_operation - async def operation_backed_by_a_workflow( - self, ctx: WorkflowRunOperationContext, input: Input - ) -> nexus.WorkflowHandle[Output]: - return await ctx.start_workflow( - EchoWorkflow.run, - input, - id=input.value, - id_reuse_policy=WorkflowIDReusePolicy.REJECT_DUPLICATE, - ) - - @workflow_run_operation - async def operation_that_executes_a_workflow_before_starting_the_backing_workflow( - self, ctx: WorkflowRunOperationContext, input: Input - ) -> nexus.WorkflowHandle[Output]: - await nexus.client().start_workflow( - EchoWorkflow.run, - input, - id=input.value, - task_queue=nexus.info().task_queue, - ) - # This should fail. It will not fail if the Nexus request ID was incorrectly - # propagated to both StartWorkflow requests. - return await ctx.start_workflow( - EchoWorkflow.run, - input, - id=input.value, - id_reuse_policy=WorkflowIDReusePolicy.REJECT_DUPLICATE, - ) - - -async def test_request_id_becomes_start_workflow_request_id(env: WorkflowEnvironment): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - - # We send two Nexus requests that would start a workflow with the same workflow ID, - # using reuse_policy=REJECT_DUPLICATE. This would fail if they used different - # request IDs. However, when we use the same request ID, it does not fail, - # demonstrating that the Nexus Start Operation request ID has become the - # StartWorkflow request ID. - task_queue = str(uuid.uuid4()) - endpoint = (await create_nexus_endpoint(task_queue, env.client)).endpoint.id - service_client = ServiceClient( - server_address=ServiceClient.default_server_address(env), - endpoint=endpoint, - service=ServiceHandlerForRequestIdTest.__name__, - ) - - async def start_two_workflows_with_conflicting_workflow_ids( - request_ids: tuple[tuple[str, int, str], tuple[str, int, str]], - ): - workflow_id = str(uuid.uuid4()) - for request_id, status_code, error_message in request_ids: - resp = await service_client.start_operation( - "operation_backed_by_a_workflow", - dataclass_as_dict(Input(workflow_id)), - {"Nexus-Request-Id": request_id}, - ) - assert resp.status_code == status_code, ( - f"expected status code {status_code} " - f"but got {resp.status_code} for response content " - f"{pprint.pformat(resp.content.decode())}" - ) - if not error_message: - assert status_code == 201 - op_info = resp.json() - assert op_info["token"] - assert op_info["state"] == "running" - else: - assert status_code >= 400 - failure = Failure(**resp.json()) - assert failure.message == error_message - - async def start_two_workflows_in_a_single_operation( - request_id: str, status_code: int, error_message: str - ): - resp = await service_client.start_operation( - "operation_that_executes_a_workflow_before_starting_the_backing_workflow", - dataclass_as_dict(Input("test-workflow-id")), - {"Nexus-Request-Id": request_id}, - ) - assert resp.status_code == status_code - if error_message: - failure = Failure(**resp.json()) - assert failure.message == error_message - - async with Worker( - env.client, - task_queue=task_queue, - nexus_service_handlers=[ServiceHandlerForRequestIdTest()], - nexus_task_executor=concurrent.futures.ThreadPoolExecutor(), - ): - request_id_1, request_id_2 = str(uuid.uuid4()), str(uuid.uuid4()) - # Reusing the same request ID does not fail - await start_two_workflows_with_conflicting_workflow_ids( - ((request_id_1, 201, ""), (request_id_1, 201, "")) - ) - # Using a different request ID does fail - # TODO(nexus-prerelease) I think that this should be a 409 per the spec. Go and - # Java are not doing that. - await start_two_workflows_with_conflicting_workflow_ids( - ( - (request_id_1, 201, ""), - (request_id_2, 500, "Workflow execution already started"), - ) - ) - # Two workflows started in the same operation should fail, since the Nexus - # request ID should be propagated to the backing workflow only. - await start_two_workflows_in_a_single_operation( - request_id_1, 500, "Workflow execution already started" - ) diff --git a/tests/nexus/test_handler_async_operation.py b/tests/nexus/test_handler_async_operation.py deleted file mode 100644 index 76aef59f6e..0000000000 --- a/tests/nexus/test_handler_async_operation.py +++ /dev/null @@ -1,217 +0,0 @@ -""" -Test that the Nexus SDK can be used to define an operation that responds asynchronously. -""" - -from __future__ import annotations - -import asyncio -import concurrent.futures -import dataclasses -import uuid -from collections.abc import Coroutine -from dataclasses import dataclass, field -from typing import Any, Type, Union - -import pytest -from nexusrpc.handler import ( - CancelOperationContext, - OperationHandler, - StartOperationContext, - StartOperationResultAsync, - service_handler, -) -from nexusrpc.handler._decorators import operation_handler - -from temporalio.testing import WorkflowEnvironment -from temporalio.worker import Worker -from tests.helpers.nexus import ServiceClient, create_nexus_endpoint - - -@dataclass -class Input: - value: str - - -@dataclass -class Output: - value: str - - -@dataclass -class AsyncOperationWithAsyncDefs(OperationHandler[Input, Output]): - executor: TaskExecutor - - async def start( - self, ctx: StartOperationContext, input: Input - ) -> StartOperationResultAsync: - async def task() -> Output: - await asyncio.sleep(0.1) - return Output("Hello from async operation!") - - task_id = str(uuid.uuid4()) - await self.executor.add_task(task_id, task()) - return StartOperationResultAsync(token=task_id) - - async def cancel(self, ctx: CancelOperationContext, token: str) -> None: - self.executor.request_cancel_task(task_id=token) - - -@dataclass -class AsyncOperationWithNonAsyncDefs(OperationHandler[Input, Output]): - executor: TaskExecutor - - def start( - self, ctx: StartOperationContext, input: Input - ) -> StartOperationResultAsync: - async def task() -> Output: - await asyncio.sleep(0.1) - return Output("Hello from async operation!") - - task_id = str(uuid.uuid4()) - self.executor.add_task_sync(task_id, task()) - return StartOperationResultAsync(token=task_id) - - def cancel(self, ctx: CancelOperationContext, token: str) -> None: - self.executor.request_cancel_task(task_id=token) - - -@dataclass -@service_handler -class MyServiceHandlerWithAsyncDefs: - executor: TaskExecutor - - @operation_handler - def async_operation(self) -> OperationHandler[Input, Output]: - return AsyncOperationWithAsyncDefs(self.executor) - - -@dataclass -@service_handler -class MyServiceHandlerWithNonAsyncDefs: - executor: TaskExecutor - - @operation_handler - def async_operation(self) -> OperationHandler[Input, Output]: - return AsyncOperationWithNonAsyncDefs(self.executor) - - -@pytest.mark.parametrize( - "service_handler_cls", - [ - MyServiceHandlerWithAsyncDefs, - MyServiceHandlerWithNonAsyncDefs, - ], -) -async def test_async_operation_lifecycle( - env: WorkflowEnvironment, - service_handler_cls: ( - type[MyServiceHandlerWithAsyncDefs] | type[MyServiceHandlerWithNonAsyncDefs] - ), -): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - - task_executor = await TaskExecutor.connect() - task_queue = str(uuid.uuid4()) - endpoint = (await create_nexus_endpoint(task_queue, env.client)).endpoint.id - service_client = ServiceClient( - ServiceClient.default_server_address(env), - endpoint, - service_handler_cls.__name__, - ) - - async with Worker( - env.client, - task_queue=task_queue, - nexus_service_handlers=[service_handler_cls(task_executor)], - nexus_task_executor=concurrent.futures.ThreadPoolExecutor(), - ): - start_response = await service_client.start_operation( - "async_operation", - body=dataclass_as_dict(Input(value="Hello from test")), - ) - assert start_response.status_code == 201 - assert start_response.json()["token"] - assert start_response.json()["state"] == "running" - - # Cancel it - cancel_response = await service_client.cancel_operation( - "async_operation", - token=start_response.json()["token"], - ) - assert cancel_response.status_code == 202 - - # get_info and get_result not implemented by server - - -@dataclass -class TaskExecutor: - """ - This class represents the task execution platform being used by the team operating the - Nexus operation. - """ - - event_loop: asyncio.AbstractEventLoop - tasks: dict[str, asyncio.Task[Any]] = field(default_factory=dict) - - @classmethod - async def connect(cls) -> TaskExecutor: - return cls(event_loop=asyncio.get_running_loop()) - - async def add_task(self, task_id: str, coro: Coroutine[Any, Any, Any]) -> None: - """ - Add a task to the task execution platform. - """ - if task_id in self.tasks: - raise RuntimeError(f"Task with id {task_id} already exists") - - # This function is async def because in reality this step will often write to - # durable storage. - self.tasks[task_id] = asyncio.create_task(coro) - - def add_task_sync(self, task_id: str, coro: Coroutine[Any, Any, Any]) -> None: - """ - Add a task to the task execution platform from a sync context. - """ - asyncio.run_coroutine_threadsafe( - self.add_task(task_id, coro), self.event_loop - ).result() - - async def get_task_result(self, task_id: str) -> Any: - """ - Get the result of a task from the task execution platform. - """ - task = self.tasks.get(task_id) - if not task: - raise RuntimeError(f"Task not found with id {task_id}") - return await task - - def get_task_result_sync(self, task_id: str) -> Any: - """ - Get the result of a task from the task execution platform from a sync context. - """ - return asyncio.run_coroutine_threadsafe( - self.get_task_result(task_id), self.event_loop - ).result() - - def request_cancel_task(self, task_id: str) -> None: - """ - Request cancellation of a task on the task execution platform. - """ - task = self.tasks.get(task_id) - if not task: - raise RuntimeError(f"Task not found with id {task_id}") - task.cancel() - # Not implemented: cancellation confirmation, deletion on cancellation - - -def dataclass_as_dict(dataclass: Any) -> dict[str, Any]: - """ - Return a shallow dict of the dataclass's fields. - - dataclasses.as_dict goes too far (attempts to pickle values) - """ - return { - field.name: getattr(dataclass, field.name) - for field in dataclasses.fields(dataclass) - } diff --git a/tests/nexus/test_handler_interface_implementation.py b/tests/nexus/test_handler_interface_implementation.py index 58a139ad81..127b50d01d 100644 --- a/tests/nexus/test_handler_interface_implementation.py +++ b/tests/nexus/test_handler_interface_implementation.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Any, Optional +from typing import Any, ClassVar import nexusrpc import nexusrpc.handler @@ -12,9 +12,9 @@ @dataclass class _InterfaceImplementationTestCase: - Interface: type[Any] - Impl: type[Any] - error_message: str | None + Interface: ClassVar[type[Any]] + Impl: ClassVar[type[Any]] + error_message: ClassVar[str | None] class ValidImpl(_InterfaceImplementationTestCase): @@ -44,11 +44,29 @@ async def op( error_message = None +class MissingWorkflowRunDecorator(_InterfaceImplementationTestCase): + """Missing @workflow_run_operation decorator raises appropriate error.""" + + @nexusrpc.service + class Interface: + my_workflow_op: nexusrpc.Operation[str, int] + + class Impl: + # Method exists but MISSING @workflow_run_operation decorator + async def my_workflow_op( + self, _ctx: WorkflowRunOperationContext, _input: str + ) -> nexus.WorkflowHandle[int]: + raise NotImplementedError + + error_message = "does not implement an operation with method name 'my_workflow_op'" + + @pytest.mark.parametrize( "test_case", [ ValidImpl, ValidWorkflowRunImpl, + MissingWorkflowRunDecorator, ], ) def test_service_decorator_enforces_interface_conformance( @@ -56,7 +74,9 @@ def test_service_decorator_enforces_interface_conformance( ): if test_case.error_message: with pytest.raises(Exception) as ei: - nexusrpc.handler.service_handler(test_case.Interface)(test_case.Impl) + nexusrpc.handler.service_handler(service=test_case.Interface)( + test_case.Impl + ) err = ei.value assert test_case.error_message in str(err) else: diff --git a/tests/nexus/test_handler_operation_definitions.py b/tests/nexus/test_handler_operation_definitions.py index a9e9cb4548..ef1e51ff61 100644 --- a/tests/nexus/test_handler_operation_definitions.py +++ b/tests/nexus/test_handler_operation_definitions.py @@ -3,8 +3,9 @@ and input/output types. """ +import warnings from dataclasses import dataclass -from typing import Any, Type +from typing import Any, ClassVar import nexusrpc.handler import pytest @@ -26,8 +27,8 @@ class Output: @dataclass class _TestCase: - Service: type[Any] - expected_operations: dict[str, nexusrpc.Operation] + Service: ClassVar[type[Any]] + expected_operations: ClassVar[dict[str, nexusrpc.Operation]] class NotCalled(_TestCase): @@ -35,14 +36,13 @@ class NotCalled(_TestCase): class Service: @workflow_run_operation async def my_workflow_run_operation_handler( - self, ctx: WorkflowRunOperationContext, input: Input + self, _ctx: WorkflowRunOperationContext, _input: Input ) -> nexus.WorkflowHandle[Output]: raise NotImplementedError expected_operations = { "my_workflow_run_operation_handler": nexusrpc.Operation( name="my_workflow_run_operation_handler", - method_name="my_workflow_run_operation_handler", input_type=Input, output_type=Output, ), @@ -54,7 +54,7 @@ class CalledWithoutArgs(_TestCase): class Service: @workflow_run_operation async def my_workflow_run_operation_handler( - self, ctx: WorkflowRunOperationContext, input: Input + self, _ctx: WorkflowRunOperationContext, _input: Input ) -> nexus.WorkflowHandle[Output]: raise NotImplementedError @@ -66,14 +66,13 @@ class CalledWithNameOverride(_TestCase): class Service: @workflow_run_operation(name="operation-name") async def workflow_run_operation_with_name_override( - self, ctx: WorkflowRunOperationContext, input: Input + self, _ctx: WorkflowRunOperationContext, _input: Input ) -> nexus.WorkflowHandle[Output]: raise NotImplementedError expected_operations = { "workflow_run_operation_with_name_override": nexusrpc.Operation( name="operation-name", - method_name="workflow_run_operation_with_name_override", input_type=Input, output_type=Output, ), @@ -101,3 +100,101 @@ async def test_collected_operation_names( assert actual_op.name == expected_op.name assert actual_op.input_type == expected_op.input_type assert actual_op.output_type == expected_op.output_type + + +def test_unsafe_narrow_context_annotations_warn_and_drop_input_type(): + """Unsafe context annotations warn and prevent input type inference. + + Decorators construct a specific context type at runtime. If a handler annotates a + narrower or unrelated context type, the decorator cannot safely call it, so we + should warn and avoid using the handler annotation to infer operation input type. + """ + + with pytest.warns( + UserWarning, + match="Expected parameter 1 .* TemporalStartOperationContext", + ): + + class MyTemporalOpCtx(nexus.TemporalStartOperationContext): + def custom_method(self): + raise NotImplementedError + + class TemporalOperationHandler: + @nexus.temporal_operation # type: ignore[arg-type] + async def op( + self, + _ctx: MyTemporalOpCtx, + _client: nexus.TemporalNexusClient, + _input: Input, + ) -> nexus.TemporalOperationResult[Output]: + raise NotImplementedError + + _, temporal_op = get_operation_factory(TemporalOperationHandler.op) + assert isinstance(temporal_op, nexusrpc.Operation) + assert temporal_op.input_type is None + assert temporal_op.output_type == Output + + with pytest.warns( + UserWarning, + match="Expected parameter 1 .* WorkflowRunOperationContext", + ): + + class MyWorkflowRunOpCtx(nexus.WorkflowRunOperationContext): + def custom_method(self): + raise NotImplementedError + + class WorkflowRunOperationHandler: + @workflow_run_operation # type: ignore[arg-type] + async def op( + self, + _ctx: MyWorkflowRunOpCtx, + _input: Input, + ) -> nexus.WorkflowHandle[Output]: + raise NotImplementedError + + _, workflow_op = get_operation_factory(WorkflowRunOperationHandler.op) + assert isinstance(workflow_op, nexusrpc.Operation) + assert workflow_op.input_type is None + assert workflow_op.output_type == Output + + +def test_safe_broader_context_annotations_preserve_input_type_without_warnings(): + """Safe context annotations preserve input type inference without warnings. + + A handler can safely annotate a context parameter with the exact runtime context + type or a broader base type. These cases should keep handler-derived operation + input metadata intact. + """ + + with warnings.catch_warnings(record=True) as caught: + warnings.simplefilter("always") + + class TemporalOperationHandler: + @nexus.temporal_operation + async def op( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _client: nexus.TemporalNexusClient, + _input: Input, + ) -> nexus.TemporalOperationResult[Output]: + raise NotImplementedError + + class WorkflowRunStartContextHandler: + @workflow_run_operation + async def op( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: Input, + ) -> nexus.WorkflowHandle[Output]: + raise NotImplementedError + + assert not caught + + for method in ( + TemporalOperationHandler.op, + WorkflowRunStartContextHandler.op, + ): + _, op = get_operation_factory(method) + assert isinstance(op, nexusrpc.Operation) + assert op.input_type == Input + assert op.output_type == Output diff --git a/tests/nexus/test_link_conversion.py b/tests/nexus/test_link_conversion.py index ac130122a4..cf8e1a1173 100644 --- a/tests/nexus/test_link_conversion.py +++ b/tests/nexus/test_link_conversion.py @@ -8,6 +8,28 @@ import temporalio.api.enums.v1 import temporalio.nexus._link_conversion +_CALLBACK_TYPE = temporalio.api.common.v1.Link.Callback.DESCRIPTOR.full_name +_WORKFLOW_EXECUTION = temporalio.api.enums.v1.ExecutionType.EXECUTION_TYPE_WORKFLOW + + +def _callback_link( + execution_type: temporalio.api.enums.v1.ExecutionType.ValueType, + business_id: str, + component_path: list[str] | None = None, +) -> temporalio.api.common.v1.Link: + return temporalio.api.common.v1.Link( + callback=temporalio.api.common.v1.Link.Callback( + namespace="ns", + execution=temporalio.api.common.v1.Execution( + type=execution_type, + business_id=business_id, + run_id="run-id", + ), + component_path=component_path, + request_id="request-id", + ) + ) + @pytest.mark.parametrize( ["query_param_str", "expected_event_ref"], @@ -140,17 +162,19 @@ def test_request_id_reference_to_query_params( @pytest.mark.parametrize( - ["event", "expected_link"], + ["wf_event_link", "expected_link"], [ ( - temporalio.api.common.v1.Link.WorkflowEvent( - namespace="ns", - workflow_id="wid", - run_id="rid", - request_id_ref=temporalio.api.common.v1.Link.WorkflowEvent.RequestIdReference( - event_type=temporalio.api.enums.v1.event_type_pb2.EVENT_TYPE_WORKFLOW_TASK_COMPLETED, - request_id="req-123", - ), + temporalio.api.common.v1.Link( + workflow_event=temporalio.api.common.v1.Link.WorkflowEvent( + namespace="ns", + workflow_id="wid", + run_id="rid", + request_id_ref=temporalio.api.common.v1.Link.WorkflowEvent.RequestIdReference( + event_type=temporalio.api.enums.v1.event_type_pb2.EVENT_TYPE_WORKFLOW_TASK_COMPLETED, + request_id="req-123", + ), + ) ), nexusrpc.Link( type=temporalio.api.common.v1.Link.WorkflowEvent.DESCRIPTOR.full_name, @@ -158,32 +182,255 @@ def test_request_id_reference_to_query_params( ), ), ( - temporalio.api.common.v1.Link.WorkflowEvent( - namespace="ns2", - workflow_id="wid2", - run_id="rid2", - event_ref=temporalio.api.common.v1.Link.WorkflowEvent.EventReference( - event_id=42, - event_type=temporalio.api.enums.v1.event_type_pb2.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED, - ), + temporalio.api.common.v1.Link( + workflow_event=temporalio.api.common.v1.Link.WorkflowEvent( + namespace="ns2", + workflow_id="wid2", + run_id="rid2", + event_ref=temporalio.api.common.v1.Link.WorkflowEvent.EventReference( + event_id=42, + event_type=temporalio.api.enums.v1.event_type_pb2.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED, + ), + ) ), nexusrpc.Link( type=temporalio.api.common.v1.Link.WorkflowEvent.DESCRIPTOR.full_name, url="temporal:///namespaces/ns2/workflows/wid2/rid2/history?eventID=42&eventType=WorkflowExecutionCompleted&referenceType=EventReference", ), ), + ( + temporalio.api.common.v1.Link( + workflow_event=temporalio.api.common.v1.Link.WorkflowEvent( + namespace="ns2", + workflow_id="wid/2", + run_id="rid2", + event_ref=temporalio.api.common.v1.Link.WorkflowEvent.EventReference( + event_id=42, + event_type=temporalio.api.enums.v1.event_type_pb2.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED, + ), + ) + ), + nexusrpc.Link( + type=temporalio.api.common.v1.Link.WorkflowEvent.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns2/workflows/wid%2F2/rid2/history?eventID=42&eventType=WorkflowExecutionCompleted&referenceType=EventReference", + ), + ), ], ) def test_link_conversion_workflow_event_to_link_and_back( - event: temporalio.api.common.v1.Link.WorkflowEvent, expected_link: nexusrpc.Link + wf_event_link: temporalio.api.common.v1.Link, expected_link: nexusrpc.Link ): - actual_link = temporalio.nexus._link_conversion.workflow_event_to_nexus_link(event) + actual_link = temporalio.nexus._link_conversion.workflow_event_to_nexus_link( + wf_event_link.workflow_event + ) assert expected_link == actual_link - actual_event = temporalio.nexus._link_conversion.nexus_link_to_workflow_event( + actual_event = temporalio.nexus._link_conversion.nexus_link_to_workflow_event_link( actual_link ) - assert event == actual_event + assert wf_event_link == actual_event + + +@pytest.mark.parametrize( + ["workflow_link", "expected_link"], + [ + ( + temporalio.api.common.v1.Link( + workflow=temporalio.api.common.v1.Link.Workflow( + namespace="ns", + workflow_id="wid", + run_id="rid", + reason="query", + ) + ), + nexusrpc.Link( + type=temporalio.api.common.v1.Link.Workflow.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns/workflows/wid/rid?reason=query", + ), + ), + ( + temporalio.api.common.v1.Link( + workflow=temporalio.api.common.v1.Link.Workflow( + namespace="ns2", + workflow_id="wid/2", + run_id="rid2", + ) + ), + nexusrpc.Link( + type=temporalio.api.common.v1.Link.Workflow.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns2/workflows/wid%2F2/rid2", + ), + ), + ], +) +def test_link_conversion_workflow_to_link_and_back( + workflow_link: temporalio.api.common.v1.Link, expected_link: nexusrpc.Link +): + actual_link = temporalio.nexus._link_conversion.workflow_to_nexus_link( + workflow_link.workflow + ) + assert expected_link == actual_link + + actual_workflow = temporalio.nexus._link_conversion.nexus_link_to_workflow_link( + actual_link + ) + assert workflow_link == actual_workflow + + assert ( + expected_link + == temporalio.nexus._link_conversion.temporal_link_to_nexus_link(workflow_link) + ) + assert ( + workflow_link + == temporalio.nexus._link_conversion.nexus_link_to_temporal_link(expected_link) + ) + + +@pytest.mark.parametrize( + ["operation_link", "expected_link"], + [ + ( + temporalio.api.common.v1.Link( + nexus_operation=temporalio.api.common.v1.Link.NexusOperation( + namespace="ns", + operation_id="op-id", + run_id="run-id", + ) + ), + nexusrpc.Link( + type=temporalio.api.common.v1.Link.NexusOperation.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns/nexus-operations/op-id/run-id/details", + ), + ), + ( + temporalio.api.common.v1.Link( + nexus_operation=temporalio.api.common.v1.Link.NexusOperation( + namespace="ns", + operation_id="op-id", + ) + ), + nexusrpc.Link( + type=temporalio.api.common.v1.Link.NexusOperation.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns/nexus-operations/op-id//details", + ), + ), + ( + temporalio.api.common.v1.Link( + nexus_operation=temporalio.api.common.v1.Link.NexusOperation( + namespace="ns", + operation_id="op/id", + ) + ), + nexusrpc.Link( + type=temporalio.api.common.v1.Link.NexusOperation.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns/nexus-operations/op%2Fid//details", + ), + ), + ( + temporalio.api.common.v1.Link( + nexus_operation=temporalio.api.common.v1.Link.NexusOperation( + namespace="ns", + operation_id="op/id", + run_id="run/id", + ) + ), + nexusrpc.Link( + type=temporalio.api.common.v1.Link.NexusOperation.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns/nexus-operations/op%2Fid/run%2Fid/details", + ), + ), + ], +) +def test_link_conversion_nexus_operation_to_link_and_back( + operation_link: temporalio.api.common.v1.Link, + expected_link: nexusrpc.Link, +): + actual_link = temporalio.nexus._link_conversion.nexus_operation_to_nexus_link( + operation_link.nexus_operation + ) + assert expected_link == actual_link + + actual_operation = ( + temporalio.nexus._link_conversion.nexus_link_to_nexus_operation_link( + actual_link + ) + ) + assert operation_link == actual_operation + + assert ( + expected_link + == temporalio.nexus._link_conversion.temporal_link_to_nexus_link(operation_link) + ) + assert ( + operation_link + == temporalio.nexus._link_conversion.nexus_link_to_temporal_link(expected_link) + ) + + +def test_nexus_operation_link_with_unparseable_url_is_ignored(): + # The canonical path is /nexus-operations/{op_id}/{run_id}/details; a URL missing the + # run-id/details suffix (e.g. the legacy ?runID= form) does not parse. + link = nexusrpc.Link( + type=temporalio.api.common.v1.Link.NexusOperation.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns/nexus-operations/op-id?runID=run-id", + ) + assert temporalio.nexus._link_conversion.nexus_link_to_temporal_link(link) is None + + +@pytest.mark.parametrize( + ["link", "expected_link"], + [ + ( + nexusrpc.Link( + type=temporalio.api.common.v1.Link.Activity.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns/activities/act-id/run-id/details", + ), + temporalio.api.common.v1.Link( + activity=temporalio.api.common.v1.Link.Activity( + namespace="ns", + activity_id="act-id", + run_id="run-id", + ), + ), + ), + ( + nexusrpc.Link( + type=temporalio.api.common.v1.Link.Activity.DESCRIPTOR.full_name, + url="temporal:///namespaces/ns%2F/activities/act-id%2F/run-id%3E/details", + ), + temporalio.api.common.v1.Link( + activity=temporalio.api.common.v1.Link.Activity( + namespace="ns/", + activity_id="act-id/", + run_id="run-id>", + ), + ), + ), + ], +) +def test_link_conversion_nexus_link_to_activity_link( + link: nexusrpc.Link, + expected_link: temporalio.api.common.v1.Link, +): + from_activity_link = temporalio.nexus._link_conversion.activity_link_to_nexus_link( + expected_link.activity + ) + assert link == from_activity_link + + from_temporal_link = temporalio.nexus._link_conversion.temporal_link_to_nexus_link( + expected_link + ) + assert link == from_temporal_link + + actual_activity = temporalio.nexus._link_conversion.nexus_link_to_activity_link( + link + ) + assert expected_link == actual_activity + + actual_temporal_link = ( + temporalio.nexus._link_conversion.nexus_link_to_temporal_link(link) + ) + assert expected_link == actual_temporal_link def test_link_conversion_utilities(): @@ -204,3 +451,152 @@ def test_link_conversion_utilities(): assert p2c("a") == "A" assert c2p("A") == "A" + + +def test_event_reference_to_query_params_omits_unset_event_id(): + """An unset event ID is 0, which is not a valid event ID, so it is left out entirely. + + The event type alone identifies the event in that case; a WorkflowExecutionStarted link, for + example, always refers to the first event. + """ + query_params_str = temporalio.nexus._link_conversion._event_reference_to_query_params( + temporalio.api.common.v1.Link.WorkflowEvent.EventReference( + event_type=temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED, + ) + ) + query_params = urllib.parse.parse_qs(query_params_str) + assert ( + temporalio.nexus._link_conversion.LINK_EVENT_ID_PARAM_NAME not in query_params + ) + assert query_params[ + temporalio.nexus._link_conversion.LINK_EVENT_TYPE_PARAM_NAME + ] == ["WorkflowExecutionStarted"] + + # A real event ID is still sent. + query_params_str = temporalio.nexus._link_conversion._event_reference_to_query_params( + temporalio.api.common.v1.Link.WorkflowEvent.EventReference( + event_id=1, + event_type=temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED, + ) + ) + assert urllib.parse.parse_qs(query_params_str)[ + temporalio.nexus._link_conversion.LINK_EVENT_ID_PARAM_NAME + ] == ["1"] + + +@pytest.mark.parametrize( + ["converter", "url"], + [ + ( + "nexus_link_to_workflow_event_link", + "https:///namespaces/ns/workflows/wid/rid/history" + "?referenceType=EventReference&eventType=WorkflowExecutionStarted", + ), + ("nexus_link_to_workflow_link", "https:///namespaces/ns/workflows/wid/rid"), + ( + "nexus_link_to_nexus_operation_link", + "https:///namespaces/ns/nexus-operations/op-id/rid/details", + ), + ( + "nexus_link_to_activity_link", + "https:///namespaces/ns/activities/act-id/rid/details", + ), + ], +) +def test_link_with_non_temporal_scheme_is_ignored(converter: str, url: str): + """A link must carry the temporal scheme; the path alone does not make it one of ours.""" + link = nexusrpc.Link(url=url, type="ignored") + assert getattr(temporalio.nexus._link_conversion, converter)(link) is None + + +@pytest.mark.parametrize( + ["url", "expected_link"], + [ + ( + "temporal:///namespaces/ns/workflows/wf-id/run-id/callbacks/request-id", + _callback_link(_WORKFLOW_EXECUTION, "wf-id"), + ), + ( + "temporal:///namespaces/ns/activities/act-id/run-id/callbacks/request-id", + _callback_link( + temporalio.api.enums.v1.ExecutionType.EXECUTION_TYPE_ACTIVITY, "act-id" + ), + ), + ( + "temporal:///namespaces/ns/nexus-operations/op-id/run-id/callbacks/request-id", + _callback_link( + temporalio.api.enums.v1.ExecutionType.EXECUTION_TYPE_NEXUS_OPERATION, + "op-id", + ), + ), + ( + "temporal:///namespaces/ns/workflows/wf-id/run-id/callbacks/request-id" + "?componentPath=A%3AB&componentPath=C%2FD&componentPath=E_F", + _callback_link(_WORKFLOW_EXECUTION, "wf-id", ["A:B", "C/D", "E_F"]), + ), + # Segments end in a user-supplied ID, so a comma inside one is reachable. + ( + "temporal:///namespaces/ns/workflows/wf-id/run-id/callbacks/request-id" + "?componentPath=Updates&componentPath=id%2Cwith%2Ccommas", + _callback_link(_WORKFLOW_EXECUTION, "wf-id", ["Updates", "id,with,commas"]), + ), + # Only a path whose order differs from its sorted order proves order is preserved. + ( + "temporal:///namespaces/ns/workflows/wf-id/run-id/callbacks/request-id" + "?componentPath=zulu&componentPath=alpha&componentPath=", + _callback_link(_WORKFLOW_EXECUTION, "wf-id", ["zulu", "alpha", ""]), + ), + ( + "temporal:///namespaces/ns%2Fwith-slash/workflows/wf-id%2Fcallbacks%2Ffake" + "/run-id/callbacks/request%20id%3Fx%3D1", + temporalio.api.common.v1.Link( + callback=temporalio.api.common.v1.Link.Callback( + namespace="ns/with-slash", + execution=temporalio.api.common.v1.Execution( + type=_WORKFLOW_EXECUTION, + business_id="wf-id/callbacks/fake", + run_id="run-id", + ), + request_id="request id?x=1", + ) + ), + ), + ], +) +def test_link_conversion_callback_to_link_and_back( + url: str, expected_link: temporalio.api.common.v1.Link +): + link = nexusrpc.Link(url=url, type=_CALLBACK_TYPE) + assert ( + temporalio.nexus._link_conversion.temporal_link_to_nexus_link(expected_link) + == link + ) + assert ( + temporalio.nexus._link_conversion.nexus_link_to_temporal_link(link) + == expected_link + ) + + +def test_callback_link_with_unsupported_execution_type_is_ignored(): + assert ( + temporalio.nexus._link_conversion.temporal_link_to_nexus_link( + _callback_link( + temporalio.api.enums.v1.ExecutionType.EXECUTION_TYPE_UNSPECIFIED, + "wf-id", + ) + ) + is None + ) + + +@pytest.mark.parametrize( + "url", + [ + "https:///namespaces/ns/workflows/wf-id/run-id/callbacks/request-id", + "temporal:///namespaces/ns/workflows/wf-id/run-id/callbacks", + "temporal:///namespaces/ns/schedules/sched-id/run-id/callbacks/request-id", + ], +) +def test_invalid_callback_nexus_link_is_ignored(url: str): + link = nexusrpc.Link(url=url, type=_CALLBACK_TYPE) + assert temporalio.nexus._link_conversion.nexus_link_to_temporal_link(link) is None diff --git a/tests/nexus/test_link_propagation.py b/tests/nexus/test_link_propagation.py new file mode 100644 index 0000000000..f656f57c10 --- /dev/null +++ b/tests/nexus/test_link_propagation.py @@ -0,0 +1,911 @@ +"""Unit tests for Nexus link propagation. + +These exercise link propagation when a Nexus operation handler queries or signals a +workflow, or starts a workflow, workflow update, or activity against a mocked workflow +service. End-to-end signal backlinks require a server with +EnableCHASMSignalBacklinks enabled and are not covered here. +""" + +from __future__ import annotations + +from collections.abc import Generator +from datetime import timedelta +from typing import Any +from unittest import mock + +import nexusrpc +import nexusrpc.handler +import pytest +from nexusrpc.handler import ( + OperationHandler, + StartOperationContext, + StartOperationResultAsync, + service_handler, + sync_operation, +) +from nexusrpc.handler._decorators import operation_handler + +import temporalio.api.common.v1 +import temporalio.api.enums.v1 +import temporalio.api.nexus.v1 +import temporalio.api.update.v1 +import temporalio.api.workflowservice.v1 +import temporalio.client +import temporalio.common +import temporalio.converter +import temporalio.nexus._link_conversion +import temporalio.nexus._operation_context +import temporalio.nexus._token +from temporalio.client._impl import _ClientImpl +from temporalio.client._interceptor import ( + QueryWorkflowInput, + SignalWorkflowInput, + StartActivityInput, + StartWorkflowInput, + StartWorkflowUpdateInput, + UpdateWithStartUpdateWorkflowInput, +) +from temporalio.nexus._operation_context import _TemporalStartOperationContext +from temporalio.worker._nexus import _NexusTaskCancellation, _NexusWorker + +NAMESPACE = "test-namespace" +WORKFLOW_ID = "wf-target" + + +def _workflow_event_link( + workflow_id: str, + run_id: str, + event_type: temporalio.api.enums.v1.EventType.ValueType, +) -> temporalio.api.common.v1.Link: + return temporalio.api.common.v1.Link( + workflow_event=temporalio.api.common.v1.Link.WorkflowEvent( + namespace=NAMESPACE, + workflow_id=workflow_id, + run_id=run_id, + event_ref=temporalio.api.common.v1.Link.WorkflowEvent.EventReference( + event_type=event_type, + ), + ) + ) + + +def _workflow_link( + workflow_id: str, run_id: str, *, reason: str +) -> temporalio.api.common.v1.Link: + return temporalio.api.common.v1.Link( + workflow=temporalio.api.common.v1.Link.Workflow( + namespace=NAMESPACE, + workflow_id=workflow_id, + run_id=run_id, + reason=reason, + ) + ) + + +def _inbound_nexus_link() -> temporalio.api.common.v1.Link: + return _workflow_event_link( + "caller-wf", + "caller-run", + temporalio.api.enums.v1.EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED, + ) + + +@pytest.fixture +def nexus_ctx() -> Generator[_TemporalStartOperationContext]: + """Install a Nexus start-operation context with a single inbound link. + + The inbound link is provided in nexusrpc.Link form, exactly as the worker populates it from + the inbound Nexus task. Yields the temporal context so tests can inspect outbound_links. + """ + inbound = temporalio.nexus._link_conversion.workflow_event_to_nexus_link( + _inbound_nexus_link().workflow_event + ) + nexus_context = nexusrpc.handler.StartOperationContext( + service="svc", + operation="op", + headers={}, + request_id="req-id", + callback_url="https://callback.example", + inbound_links=[inbound], + callback_headers={"callback-header": "value"}, + task_cancellation=_NexusTaskCancellation(), + ) + ctx = temporalio.nexus._operation_context._TemporalStartOperationContext( + nexus_context=nexus_context, + client=mock.MagicMock(namespace=NAMESPACE), + info=lambda: temporalio.nexus.Info( + endpoint="endpoint", namespace=NAMESPACE, task_queue="tq" + ), + _runtime_metric_meter=mock.MagicMock(), + _worker_shutdown_event=mock.MagicMock(), + ) + token = temporalio.nexus._operation_context._temporal_start_operation_context.set( + ctx + ) + try: + yield ctx + finally: + temporalio.nexus._operation_context._temporal_start_operation_context.reset( + token + ) + + +@pytest.fixture +def nexus_ctx_linkless() -> Generator[_TemporalStartOperationContext]: + """Like `nexus_ctx`, but with no inbound links and no callback URL.""" + nexus_context = nexusrpc.handler.StartOperationContext( + service="svc", + operation="op", + headers={}, + request_id="req-id", + callback_url=None, + inbound_links=[], + callback_headers={}, + task_cancellation=_NexusTaskCancellation(), + ) + ctx = temporalio.nexus._operation_context._TemporalStartOperationContext( + nexus_context=nexus_context, + client=mock.MagicMock(namespace=NAMESPACE), + info=lambda: temporalio.nexus.Info( + endpoint="endpoint", namespace=NAMESPACE, task_queue="tq" + ), + _runtime_metric_meter=mock.MagicMock(), + _worker_shutdown_event=mock.MagicMock(), + ) + token = temporalio.nexus._operation_context._temporal_start_operation_context.set( + ctx + ) + try: + yield ctx + finally: + temporalio.nexus._operation_context._temporal_start_operation_context.reset( + token + ) + + +def _make_client_impl(workflow_service: Any) -> _ClientImpl: + client = mock.MagicMock() + client.namespace = NAMESPACE + client.identity = "test-identity" + client.workflow_service = workflow_service + client.data_converter = temporalio.converter.DataConverter.default + return _ClientImpl(client) + + +def _signal_input() -> SignalWorkflowInput: + return SignalWorkflowInput( + id=WORKFLOW_ID, + run_id=None, + signal="test-signal", + args=[], + headers={}, + rpc_metadata={}, + rpc_timeout=None, + ) + + +def _query_input() -> QueryWorkflowInput: + return QueryWorkflowInput( + id=WORKFLOW_ID, + run_id=None, + query="query-done", + args=[], + reject_condition=None, + headers={}, + ret_type=bool, + rpc_metadata={}, + rpc_timeout=None, + ) + + +def _start_input(start_signal: str | None = None) -> StartWorkflowInput: + return StartWorkflowInput( + workflow="TestWorkflow", + args=[], + id=WORKFLOW_ID, + task_queue="tq", + execution_timeout=None, + run_timeout=None, + task_timeout=None, + id_reuse_policy=temporalio.common.WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy=temporalio.common.WorkflowIDConflictPolicy.UNSPECIFIED, + retry_policy=None, + cron_schedule="", + memo=None, + search_attributes=None, + start_delay=None, + headers={}, + start_signal=start_signal, + start_signal_args=[], + static_summary=None, + static_details=None, + ret_type=None, + rpc_metadata={}, + rpc_timeout=None, + request_eager_start=False, + priority=temporalio.common.Priority.default, + versioning_override=None, + ) + + +def _start_activity_input() -> StartActivityInput: + return StartActivityInput( + activity_type="TestActivity", + args=[], + id="activity-target", + task_queue="tq", + result_type=None, + schedule_to_close_timeout=None, + start_to_close_timeout=timedelta(seconds=10), + schedule_to_start_timeout=None, + heartbeat_timeout=None, + id_reuse_policy=temporalio.common.ActivityIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy=temporalio.common.ActivityIDConflictPolicy.FAIL, + retry_policy=None, + priority=temporalio.common.Priority.default, + search_attributes=None, + summary=None, + start_delay=None, + headers={}, + rpc_metadata={}, + rpc_timeout=None, + ) + + +def _start_workflow_update_input() -> StartWorkflowUpdateInput: + return StartWorkflowUpdateInput( + id=WORKFLOW_ID, + run_id="target-run", + first_execution_run_id=None, + update_id="update-id", + update="test-update", + args=[], + wait_for_stage=temporalio.client.WorkflowUpdateStage.ACCEPTED, + headers={}, + ret_type=None, + rpc_metadata={}, + rpc_timeout=None, + ) + + +def _update_with_start_update_input() -> UpdateWithStartUpdateWorkflowInput: + return UpdateWithStartUpdateWorkflowInput( + update_id="update-id", + update="test-update", + args=[], + wait_for_stage=temporalio.client.WorkflowUpdateStage.ACCEPTED, + headers={}, + ret_type=None, + ) + + +def _outbound_link_urls(ctx: Any) -> list[str]: + return [link.url for link in ctx.nexus_context.outbound_links] + + +def test_response_link_captures_workflow_link( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + nexus_ctx._add_response_link( + _workflow_link(WORKFLOW_ID, "target-run", reason="Query processed") + ) + + assert nexus_ctx.nexus_context.outbound_links == [ + nexusrpc.Link( + type=temporalio.api.common.v1.Link.Workflow.DESCRIPTOR.full_name, + url=( + "temporal:///namespaces/test-namespace/workflows/" + "wf-target/target-run?reason=Query+processed" + ), + ) + ] + + +# ── signal ──────────────────────────────────────────────────────────────────────────────── + + +# Query responses differ from Signal responses by linking to the Workflow rather than an event. +async def test_query_captures_response_workflow_link( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + payloads = await temporalio.converter.DataConverter.default.encode([False]) + workflow_service = mock.MagicMock() + workflow_service.query_workflow = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.QueryWorkflowResponse( + query_result=temporalio.api.common.v1.Payloads(payloads=payloads), + link=_workflow_link(WORKFLOW_ID, "target-run", reason="Query processed"), + ) + ) + impl = _make_client_impl(workflow_service) + + result = await impl.query_workflow(_query_input()) + + assert result is False + assert nexus_ctx.nexus_context.outbound_links == [ + nexusrpc.Link( + type=temporalio.api.common.v1.Link.Workflow.DESCRIPTOR.full_name, + url=( + "temporal:///namespaces/test-namespace/workflows/" + "wf-target/target-run?reason=Query+processed" + ), + ) + ] + + +# Signal responses link to the event that accepted the Signal. +async def test_signal_forwards_inbound_links_and_captures_response_backlink( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + response_link = _workflow_event_link( + WORKFLOW_ID, + "target-run", + temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED, + ) + workflow_service = mock.MagicMock() + workflow_service.signal_workflow_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.SignalWorkflowExecutionResponse( + link=response_link + ) + ) + impl = _make_client_impl(workflow_service) + + await impl.signal_workflow(_signal_input()) + + # Forward: the request carries the single inbound link. + sent = workflow_service.signal_workflow_execution.call_args.args[0] + assert len(sent.links) == 1 + assert sent.links[0] == _inbound_nexus_link() + + # Backward: the response link is added to the operation's outbound links (as a Nexus link). + assert len(nexus_ctx.nexus_context.outbound_links) == 1 + assert "wf-target" in _outbound_link_urls(nexus_ctx)[0] + + +async def test_signal_against_older_server_captures_no_backlink( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + workflow_service = mock.MagicMock() + workflow_service.signal_workflow_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.SignalWorkflowExecutionResponse() + ) + impl = _make_client_impl(workflow_service) + + await impl.signal_workflow(_signal_input()) + + # Forward direction still works regardless of server version. + sent = workflow_service.signal_workflow_execution.call_args.args[0] + assert len(sent.links) == 1 + + # Backward: no backlink because the server returned no link. + assert nexus_ctx.nexus_context.outbound_links == [] + + +async def test_multiple_signals_accumulate_all_backlinks( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + first = _workflow_event_link( + "callee-a", + "run-a", + temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED, + ) + second = _workflow_event_link( + "callee-b", + "run-b", + temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED, + ) + workflow_service = mock.MagicMock() + workflow_service.signal_workflow_execution = mock.AsyncMock( + side_effect=[ + temporalio.api.workflowservice.v1.SignalWorkflowExecutionResponse( + link=first + ), + temporalio.api.workflowservice.v1.SignalWorkflowExecutionResponse( + link=second + ), + ] + ) + impl = _make_client_impl(workflow_service) + + await impl.signal_workflow(_signal_input()) + await impl.signal_workflow(_signal_input()) + + urls = _outbound_link_urls(nexus_ctx) + assert len(urls) == 2 + assert "callee-a" in urls[0] + assert "callee-b" in urls[1] + + +async def test_signal_outside_nexus_context_does_not_touch_links() -> None: + workflow_service = mock.MagicMock() + workflow_service.signal_workflow_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.SignalWorkflowExecutionResponse() + ) + impl = _make_client_impl(workflow_service) + + await impl.signal_workflow(_signal_input()) + + sent = workflow_service.signal_workflow_execution.call_args.args[0] + assert len(sent.links) == 0 + + +# ── signal-with-start ─────────────────────────────────────────────────────────────────────── + + +async def test_signal_with_start_forwards_inbound_links_and_captures_backlink( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + response_link = _workflow_event_link( + WORKFLOW_ID, + "target-run", + temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED, + ) + workflow_service = mock.MagicMock() + workflow_service.signal_with_start_workflow_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse( + run_id="target-run", + signal_link=response_link, + ) + ) + impl = _make_client_impl(workflow_service) + + await impl.start_workflow(_start_input(start_signal="test-signal")) + + # Forward: the SignalWithStart request carries the inbound link. + sent = workflow_service.signal_with_start_workflow_execution.call_args.args[0] + assert len(sent.links) == 1 + assert sent.links[0] == _inbound_nexus_link() + + # Backward: response.signal_link is captured as an outbound Nexus link. + assert len(nexus_ctx.nexus_context.outbound_links) == 1 + assert "wf-target" in _outbound_link_urls(nexus_ctx)[0] + + +async def test_signal_with_start_against_older_server_captures_no_backlink( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + workflow_service = mock.MagicMock() + workflow_service.signal_with_start_workflow_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse( + run_id="target-run", + ) + ) + impl = _make_client_impl(workflow_service) + + await impl.start_workflow(_start_input(start_signal="test-signal")) + + sent = workflow_service.signal_with_start_workflow_execution.call_args.args[0] + assert len(sent.links) == 1 + assert nexus_ctx.nexus_context.outbound_links == [] + + +# ── start ───────────────────────────────────────────────────────────────────────────────── + + +async def test_start_forwards_inbound_links_and_captures_backlink( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + server_link = _workflow_event_link( + WORKFLOW_ID, + "target-run", + temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED, + ) + workflow_service = mock.MagicMock() + workflow_service.start_workflow_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse( + run_id="target-run", + link=server_link, + ) + ) + impl = _make_client_impl(workflow_service) + + await impl.start_workflow(_start_input()) + + # Forward: the start request carries the single inbound link. + sent = workflow_service.start_workflow_execution.call_args.args[0] + assert len(sent.links) == 1 + assert sent.links[0] == _inbound_nexus_link() + + # Backward: a plain start captures a backlink + assert len(nexus_ctx.nexus_context.outbound_links) == 1 + assert "wf-target" in _outbound_link_urls(nexus_ctx)[0] + + +async def test_start_against_older_server_captures_no_backlink( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + workflow_service = mock.MagicMock() + workflow_service.start_workflow_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse( + run_id="target-run", + ) + ) + impl = _make_client_impl(workflow_service) + + await impl.start_workflow(_start_input()) + + # Forward direction still works regardless of server version. + sent = workflow_service.start_workflow_execution.call_args.args[0] + assert len(sent.links) == 1 + assert sent.links[0] == _inbound_nexus_link() + + # Backward: a plain start fabricates a backlink when the server doesn't return one. + assert len(nexus_ctx.nexus_context.outbound_links) == 1 + assert "wf-target" in _outbound_link_urls(nexus_ctx)[0] + + +async def test_start_outside_nexus_context_does_not_touch_links() -> None: + workflow_service = mock.MagicMock() + workflow_service.start_workflow_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse( + run_id="target-run", + ) + ) + impl = _make_client_impl(workflow_service) + + # Should not raise even though there is no Nexus context. + handle = await impl.start_workflow(_start_input()) + assert handle.result_run_id == "target-run" + sent = workflow_service.start_workflow_execution.call_args.args[0] + assert len(sent.links) == 0 + + +# ── start: on-conflict options ────────────────────────────────────────────────────────────── +# +# A start issued from inside a Nexus operation handler enables all on_conflict_options so that, +# under a WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING policy, a detected conflict attaches the +# request id, completion callbacks, and links to the existing run. + + +def _start_response() -> ( + temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse +): + return temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse( + run_id="target-run", + ) + + +@pytest.mark.usefixtures("nexus_ctx") +async def test_start_from_nexus_context_sets_all_on_conflict_options() -> None: + workflow_service = mock.MagicMock() + workflow_service.start_workflow_execution = mock.AsyncMock( + return_value=_start_response() + ) + impl = _make_client_impl(workflow_service) + + await impl.start_workflow(_start_input()) + + sent = workflow_service.start_workflow_execution.call_args.args[0] + assert sent.HasField("on_conflict_options") + assert sent.on_conflict_options.attach_request_id + assert sent.on_conflict_options.attach_completion_callbacks + assert sent.on_conflict_options.attach_links + assert sent.request_id + assert sent.request_id != "req-id" + assert len(sent.completion_callbacks) == 0 + + +@pytest.mark.usefixtures("nexus_ctx") +async def test_backing_workflow_start_gets_nexus_request_fields() -> None: + workflow_service = mock.MagicMock() + workflow_service.start_workflow_execution = mock.AsyncMock( + return_value=_start_response() + ) + impl = _make_client_impl(workflow_service) + + with temporalio.nexus._operation_context._nexus_backing_start_context(): + await impl.start_workflow(_start_input()) + + sent = workflow_service.start_workflow_execution.call_args.args[0] + assert sent.HasField("on_conflict_options") + assert sent.on_conflict_options.attach_request_id + assert sent.on_conflict_options.attach_completion_callbacks + assert sent.on_conflict_options.attach_links + assert len(sent.links) == 1 + assert sent.links[0] == _inbound_nexus_link() + assert sent.request_id == "req-id" + assert len(sent.completion_callbacks) == 1 + operation_token = temporalio.nexus._token.OperationToken.decode( + sent.completion_callbacks[0].nexus.header["nexus-operation-token"] + ) + assert operation_token.type is temporalio.nexus._token.OperationTokenType.WORKFLOW + assert operation_token.namespace == NAMESPACE + assert operation_token.workflow_id == WORKFLOW_ID + assert list(sent.completion_callbacks[0].links) == [_inbound_nexus_link()] + + +async def test_start_outside_nexus_context_leaves_on_conflict_options_unset() -> None: + workflow_service = mock.MagicMock() + workflow_service.start_workflow_execution = mock.AsyncMock( + return_value=_start_response() + ) + impl = _make_client_impl(workflow_service) + + await impl.start_workflow(_start_input()) + + sent = workflow_service.start_workflow_execution.call_args.args[0] + assert not sent.HasField("on_conflict_options") + + +# ── workflow update ────────────────────────────────────────────────────────────── + + +def _workflow_update_response( + link: temporalio.api.common.v1.Link | None = None, +) -> temporalio.api.workflowservice.v1.UpdateWorkflowExecutionResponse: + response = temporalio.api.workflowservice.v1.UpdateWorkflowExecutionResponse( + update_ref=temporalio.api.update.v1.UpdateRef( + workflow_execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=WORKFLOW_ID, + run_id="target-run", + ), + update_id="update-id", + ), + stage=temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, + ) + if link is not None: + response.link.CopyFrom(link) + return response + + +async def test_backing_workflow_update_gets_nexus_request_fields_and_backlink( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + response_link = _workflow_event_link( + WORKFLOW_ID, + "target-run", + temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED, + ) + workflow_service = mock.MagicMock() + workflow_service.update_workflow_execution = mock.AsyncMock( + return_value=_workflow_update_response(response_link) + ) + impl = _make_client_impl(workflow_service) + + with temporalio.nexus._operation_context._nexus_backing_start_context(): + handle = await impl.start_workflow_update(_start_workflow_update_input()) + + assert handle.id == "update-id" + assert handle.workflow_id == WORKFLOW_ID + assert handle.workflow_run_id == "target-run" + + sent = workflow_service.update_workflow_execution.call_args.args[0] + assert sent.request.request_id == "req-id" + assert list(sent.request.links) == [_inbound_nexus_link()] + assert len(sent.request.completion_callbacks) == 1 + callback = sent.request.completion_callbacks[0] + assert callback.nexus.url == "https://callback.example" + assert callback.nexus.header["callback-header"] == "value" + operation_token = temporalio.nexus._token.OperationToken.decode( + callback.nexus.header["nexus-operation-token"] + ) + assert ( + operation_token.type + is temporalio.nexus._token.OperationTokenType.UPDATE_WORKFLOW + ) + assert operation_token.namespace == NAMESPACE + assert operation_token.workflow_id == WORKFLOW_ID + assert operation_token.update_id == "update-id" + assert operation_token.run_id == "target-run" + assert list(callback.links) == [_inbound_nexus_link()] + + assert len(nexus_ctx.nexus_context.outbound_links) == 1 + assert WORKFLOW_ID in _outbound_link_urls(nexus_ctx)[0] + + +async def test_non_backing_workflow_update_does_not_get_nexus_request_fields( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + workflow_service = mock.MagicMock() + workflow_service.update_workflow_execution = mock.AsyncMock( + return_value=_workflow_update_response() + ) + impl = _make_client_impl(workflow_service) + + await impl.start_workflow_update(_start_workflow_update_input()) + + sent = workflow_service.update_workflow_execution.call_args.args[0] + assert not sent.request.request_id + assert len(sent.request.links) == 0 + assert len(sent.request.completion_callbacks) == 0 + assert nexus_ctx.nexus_context.outbound_links == [] + + +@pytest.mark.usefixtures("nexus_ctx") +async def test_update_with_start_does_not_get_nexus_request_fields() -> None: + impl = _make_client_impl(mock.MagicMock()) + + with temporalio.nexus._operation_context._nexus_backing_start_context(): + req = await impl._build_update_workflow_execution_request( + _update_with_start_update_input(), WORKFLOW_ID + ) + + assert not req.request.request_id + assert len(req.request.links) == 0 + assert len(req.request.completion_callbacks) == 0 + + +# ── activity start ───────────────────────────────────────────────────────────────────────── + + +@pytest.mark.usefixtures("nexus_ctx") +async def test_activity_start_forwards_inbound_links() -> None: + impl = _make_client_impl(mock.MagicMock()) + + req = await impl._build_start_activity_execution_request(_start_activity_input()) + + assert len(req.links) == 1 + assert req.links[0] == _inbound_nexus_link() + assert req.request_id == "req-id" + assert len(req.completion_callbacks) == 0 + + +async def test_activity_start_without_server_link_synthesizes_backlink( + nexus_ctx: _TemporalStartOperationContext, +) -> None: + workflow_service = mock.MagicMock() + workflow_service.start_activity_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.StartActivityExecutionResponse( + run_id="activity-run", + ) + ) + impl = _make_client_impl(workflow_service) + + await impl.start_activity(_start_activity_input()) + + assert len(nexus_ctx.nexus_context.outbound_links) == 1 + link = nexus_ctx.nexus_context.outbound_links[0] + assert link.url == ( + "temporal:///namespaces/test-namespace/" + "activities/activity-target/activity-run/details" + ) + assert link.type == temporalio.api.common.v1.Link.Activity.DESCRIPTOR.full_name + + +@pytest.mark.usefixtures("nexus_ctx") +async def test_backing_activity_start_gets_nexus_request_fields() -> None: + impl = _make_client_impl(mock.MagicMock()) + + with temporalio.nexus._operation_context._nexus_backing_start_context(): + req = await impl._build_start_activity_execution_request( + _start_activity_input() + ) + + assert len(req.links) == 0 + assert req.request_id == "req-id" + assert len(req.completion_callbacks) == 1 + operation_token = temporalio.nexus._token.OperationToken.decode( + req.completion_callbacks[0].nexus.header["nexus-operation-token"] + ) + assert operation_token.type is temporalio.nexus._token.OperationTokenType.ACTIVITY + assert operation_token.namespace == NAMESPACE + assert operation_token.activity_id == "activity-target" + assert list(req.completion_callbacks[0].links) == [_inbound_nexus_link()] + + +@pytest.mark.usefixtures("nexus_ctx_linkless") +async def test_activity_start_omits_on_conflict_options_when_linkless() -> None: + impl = _make_client_impl(mock.MagicMock()) + + req = await impl._build_start_activity_execution_request(_start_activity_input()) + + assert req.request_id == "req-id" + assert not req.HasField("on_conflict_options") + + +@pytest.mark.usefixtures("nexus_ctx_linkless") +async def test_backing_activity_start_omits_on_conflict_options_when_linkless() -> None: + impl = _make_client_impl(mock.MagicMock()) + + with temporalio.nexus._operation_context._nexus_backing_start_context(): + req = await impl._build_start_activity_execution_request( + _start_activity_input() + ) + + assert req.request_id == "req-id" + assert len(req.completion_callbacks) == 0 + assert not req.HasField("on_conflict_options") + + +# ── handler-level: backlinks land on the StartOperationResponse ────────────────────────────── + +# A response link that a handler stashes on ctx.outbound_links, mimicking what a signal RPC inside +# the handler would do via _add_response_link. +_BACKLINK = temporalio.nexus._link_conversion.workflow_event_to_nexus_link( + temporalio.api.common.v1.Link.WorkflowEvent( + namespace=NAMESPACE, + workflow_id="callee-wf", + run_id="callee-run-id", + event_ref=temporalio.api.common.v1.Link.WorkflowEvent.EventReference( + event_type=temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED, + ), + ) +) + + +class _AsyncBacklinkOperation(OperationHandler): + """Stashes a backlink then returns an async result, simulating a signaling handler.""" + + async def start( + self, ctx: StartOperationContext, input: str + ) -> StartOperationResultAsync: + ctx.outbound_links.append(_BACKLINK) + return StartOperationResultAsync(token=input) + + async def cancel(self, ctx: Any, token: str) -> None: ... + + +@service_handler +class _BacklinkStashingService: + @sync_operation + async def sync_op(self, ctx: StartOperationContext, _input: str) -> str: + # Stash a backlink and return a sync result. + ctx.outbound_links.append(_BACKLINK) + return "result" + + @operation_handler + def async_op(self) -> OperationHandler[str, str]: + return _AsyncBacklinkOperation() + + +def _make_nexus_worker() -> _NexusWorker: + return _NexusWorker( + bridge_worker=lambda: mock.MagicMock(), + client=mock.MagicMock(namespace=NAMESPACE), + namespace=NAMESPACE, + task_queue="tq", + service_handlers=[_BacklinkStashingService()], + data_converter=temporalio.converter.DataConverter.default, + interceptors=[], + metric_meter=mock.MagicMock(), + executor=None, + ) + + +def _start_request( + operation: str, input: str +) -> temporalio.api.nexus.v1.StartOperationRequest: + [payload] = ( + temporalio.converter.DataConverter.default.payload_converter.to_payloads( + [input] + ) + ) + return temporalio.api.nexus.v1.StartOperationRequest( + service="_BacklinkStashingService", + operation=operation, + payload=payload, + ) + + +async def test_sync_response_includes_signal_backlinks() -> None: + worker = _make_nexus_worker() + response = await worker._start_operation( + _start_request("sync_op", "input"), + headers={}, + cancellation=_NexusTaskCancellation(), + request_deadline=None, + endpoint="endpoint", + data_converter=worker._data_converter_for_nexus_task( + "endpoint", "_BacklinkStashingService", "sync_op" + ), + ) + assert response.HasField("sync_success") + assert len(response.sync_success.links) == 1 + assert "callee-wf" in response.sync_success.links[0].url + + +async def test_async_response_includes_signal_backlinks() -> None: + worker = _make_nexus_worker() + response = await worker._start_operation( + _start_request("async_op", "op-token"), + headers={}, + cancellation=_NexusTaskCancellation(), + request_deadline=None, + endpoint="endpoint", + data_converter=worker._data_converter_for_nexus_task( + "endpoint", "_BacklinkStashingService", "async_op" + ), + ) + assert response.HasField("async_success") + assert response.async_success.operation_token == "op-token" + assert len(response.async_success.links) == 1 + assert "callee-wf" in response.async_success.links[0].url diff --git a/tests/nexus/test_nexus_client_updates.py b/tests/nexus/test_nexus_client_updates.py new file mode 100644 index 0000000000..97dd251dac --- /dev/null +++ b/tests/nexus/test_nexus_client_updates.py @@ -0,0 +1,108 @@ +"""Tests for Nexus worker client updates.""" + +import uuid + +import nexusrpc +import pytest +from nexusrpc.handler import StartOperationContext, service_handler, sync_operation + +import temporalio.nexus +from temporalio import workflow +from temporalio.client import Client +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server + + +@nexusrpc.service +class ClientTestService: + capture_client: nexusrpc.Operation[None, str] + + +captured_clients: list[Client] = [] + + +@service_handler(service=ClientTestService) +class ClientTestServiceHandler: + @sync_operation + async def capture_client(self, _ctx: StartOperationContext, _input: None) -> str: + captured_clients.append(temporalio.nexus.client()) + return "done" + + +@workflow.defn +class ClientTestCallerWorkflow: + @workflow.run + async def run(self, endpoint_name: str) -> str: + nexus_client = workflow.create_nexus_client( + service=ClientTestService, + endpoint=endpoint_name, + ) + return await nexus_client.execute_operation( + ClientTestService.capture_client, + None, + ) + + +async def test_nexus_client_updates_when_worker_client_changes( + env: WorkflowEnvironment, +): + """Test that Nexus operations get the updated client when worker.client is changed.""" + # Create a second client (simulating a new client after cert rotation) + # Must use the same runtime + client2 = await env.connect_client( + data_converter=env.client.data_converter, + runtime=env.client.service_client.config.runtime, + ) + + # Clear any previous captures + captured_clients.clear() + + caller_task_queue = f"caller-{uuid.uuid4()}" + handler_task_queue = f"handler-{uuid.uuid4()}" + + # Create Nexus endpoint + endpoint_name = f"test-endpoint-{uuid.uuid4()}" + await env.create_nexus_endpoint(endpoint_name, handler_task_queue) + + # Caller worker + caller_worker = Worker( + env.client, + task_queue=caller_task_queue, + workflows=[ClientTestCallerWorkflow], + ) + + # Handler worker + handler_worker = Worker( + env.client, + task_queue=handler_task_queue, + nexus_service_handlers=[ClientTestServiceHandler()], + ) + + async with caller_worker, handler_worker: + # Execute operation with original client + await env.client.execute_workflow( + ClientTestCallerWorkflow.run, + endpoint_name, + id=f"wf-{uuid.uuid4()}", + task_queue=caller_task_queue, + ) + + # Update handler worker's client + handler_worker.client = client2 + + # Execute operation again - should get the new client + await client2.execute_workflow( + ClientTestCallerWorkflow.run, + endpoint_name, + id=f"wf-{uuid.uuid4()}", + task_queue=caller_task_queue, + ) + + # Should have captured both clients + assert len(captured_clients) == 2 + assert captured_clients[0] is env.client + assert captured_clients[1] is client2 # This will fail before the fix diff --git a/tests/nexus/test_nexus_handler_callbacks.py b/tests/nexus/test_nexus_handler_callbacks.py new file mode 100644 index 0000000000..a021f65d74 --- /dev/null +++ b/tests/nexus/test_nexus_handler_callbacks.py @@ -0,0 +1,1131 @@ +"""Tests for Nexus handler completion callbacks.""" + +from __future__ import annotations + +import asyncio +import dataclasses +import uuid +from collections.abc import AsyncIterator, Callable, Sequence +from contextlib import asynccontextmanager +from dataclasses import dataclass +from datetime import timedelta +from typing import Any + +import nexusrpc +import nexusrpc.handler +import pytest +from nexusrpc.handler import service_handler + +import temporalio.api.common.v1 +import temporalio.converter +import temporalio.nexus.notifications as notifications +from temporalio import activity, nexus, workflow +from temporalio.client import ( + Client, + NexusOperationFailureError, + WorkflowUpdateStage, +) +from temporalio.common import RawValue +from temporalio.converter import PayloadCodec +from temporalio.exceptions import ApplicationError, CancelledError, TerminatedError +from temporalio.nexus import WorkflowRunOperationContext, workflow_run_operation +from temporalio.nexus._notification import _OnCompleteCallback +from temporalio.nexus.notifications.models import ( + OnCompleteRequestResultFailure, + OnCompleteRequestResultSuccess, +) +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from tests.helpers import assert_eventually +from tests.helpers.nexus import make_nexus_endpoint_name +from tests.nexus.test_standalone_operations import ( + BlockingHandlerWorkflow, + EchoHandlerWorkflow, + EchoInput, + EchoOutput, + StandaloneTestService, + StandaloneTestServiceHandler, + _RecordingInterceptor, +) + + +@dataclasses.dataclass +class NotificationValue: + message: str + + +class PrefixCodec(PayloadCodec): + """Reversible codec that rejects payloads it did not encode.""" + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return [ + temporalio.api.common.v1.Payload( + metadata={"encoding": b"test/prefix"}, + data=b"prefix:" + payload.SerializeToString(), + ) + for payload in payloads + ] + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + decoded: list[temporalio.api.common.v1.Payload] = [] + for payload in payloads: + if payload.metadata.get("encoding") != b"test/prefix": + raise RuntimeError( + f"unexpected payload passed to codec: {dict(payload.metadata)}" + ) + decoded.append( + temporalio.api.common.v1.Payload.FromString( + payload.data.removeprefix(b"prefix:") + ) + ) + return decoded + + +# --------------------------------------------------------------------------- +# Creating completion callbacks +# --------------------------------------------------------------------------- + + +@nexusrpc.handler.service_handler(name="custom.notification.service") +class CustomNotificationHandler: + @nexusrpc.handler.sync_operation(name="CustomOnComplete") + async def on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: notifications.OnCompleteRequest[NotificationValue, NotificationValue], + ) -> notifications.OnCompleteResponse: + return notifications.OnCompleteResponse() + + +@nexusrpc.handler.service_handler(name="sub.notification.service") +class SubNotificationHandler(CustomNotificationHandler): + pass + + +@nexusrpc.service(name="renamed.notification.service") +class RenamedNotificationService: + on_complete: nexusrpc.Operation[ + notifications.OnCompleteRequest[NotificationValue, NotificationValue], + notifications.OnCompleteResponse, + ] = nexusrpc.Operation(name="RenamedOnComplete") + + +@nexusrpc.service(name="sub.renamed.notification.service") +class SubRenamedNotificationService(RenamedNotificationService): + pass + + +@nexusrpc.handler.service_handler(service=RenamedNotificationService) +class RenamedNotificationHandler: + @nexusrpc.handler.sync_operation + async def on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: notifications.OnCompleteRequest[NotificationValue, NotificationValue], + ) -> notifications.OnCompleteResponse: + return notifications.OnCompleteResponse() + + +@nexusrpc.handler.service_handler(name="shape.notification.service") +class NotificationShapeHandler: + @nexusrpc.handler.sync_operation(name="BareOnComplete") + async def bare_on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: notifications.OnCompleteRequest, + ) -> notifications.OnCompleteResponse: + return notifications.OnCompleteResponse() + + @nexusrpc.handler.sync_operation(name="WrongOutput") + async def wrong_output( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: notifications.OnCompleteRequest[NotificationValue, NotificationValue], + ) -> str: + return "" + + +@nexusrpc.handler.service_handler(name="kinds.notification.service") +class OperationKindsNotificationHandler: + @nexusrpc.handler.sync_operation(name="DefOnComplete") + def def_on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: notifications.OnCompleteRequest[NotificationValue, NotificationValue], + ) -> notifications.OnCompleteResponse: + return notifications.OnCompleteResponse() + + @workflow_run_operation(name="WorkflowRunOnComplete") + async def workflow_run_on_complete( + self, + _ctx: WorkflowRunOperationContext, + _input: notifications.OnCompleteRequest[NotificationValue, NotificationValue], + ) -> nexus.WorkflowHandle[notifications.OnCompleteResponse]: + raise NotImplementedError + + @nexus.temporal_operation(name="TemporalOnComplete") + async def temporal_on_complete( + self, + _ctx: nexus.TemporalStartOperationContext, + _client: nexus.TemporalNexusClient, + _input: notifications.OnCompleteRequest[NotificationValue, NotificationValue], + ) -> nexus.TemporalOperationResult[notifications.OnCompleteResponse]: + raise NotImplementedError + + +@nexusrpc.handler.service_handler(name="not-a-notification-service") +class OtherOperationHandler: + @nexusrpc.handler.sync_operation(name="OtherOperation") + async def other_operation( + self, + _ctx: nexusrpc.handler.StartOperationContext, + input: str, + ) -> str: + return input + + +def test_completion_callback_handler_method() -> None: + """A handler method resolves to its service and registered operation name.""" + callback = nexus.create_completion_callback( + operation=CustomNotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + assert callback == _OnCompleteCallback( + task_queue="notifications", + source_context=NotificationValue("context"), + service="custom.notification.service", + operation="CustomOnComplete", + ) + + +def test_completion_callback_operation_kinds() -> None: + """def sync_operation, workflow_run_operation, and temporal_operation methods are supported.""" + for operation, name in ( + (OperationKindsNotificationHandler.def_on_complete, "DefOnComplete"), + ( + OperationKindsNotificationHandler.workflow_run_on_complete, + "WorkflowRunOnComplete", + ), + (OperationKindsNotificationHandler.temporal_on_complete, "TemporalOnComplete"), + ): + callback = nexus.create_completion_callback( + operation=operation, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + assert callback == _OnCompleteCallback( + task_queue="notifications", + source_context=NotificationValue("context"), + service="kinds.notification.service", + operation=name, + ) + + +def test_completion_callback_renamed_by_service_definition() -> None: + """Definition operations and handler methods use the definition's operation name.""" + for operation in ( + RenamedNotificationService.on_complete, + RenamedNotificationHandler.on_complete, + ): + callback = nexus.create_completion_callback( + operation=operation, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + assert callback == _OnCompleteCallback( + task_queue="notifications", + source_context=NotificationValue("context"), + service="renamed.notification.service", + operation="RenamedOnComplete", + ) + + +def test_completion_callback_inherited_operations() -> None: + """Inherited operations resolve to the service they are accessed on.""" + handler_callback = nexus.create_completion_callback( + operation=SubNotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + assert handler_callback == _OnCompleteCallback( + task_queue="notifications", + source_context=NotificationValue("context"), + service="sub.notification.service", + operation="CustomOnComplete", + ) + definition_callback = nexus.create_completion_callback( + operation=SubRenamedNotificationService.on_complete, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + assert definition_callback == _OnCompleteCallback( + task_queue="notifications", + source_context=NotificationValue("context"), + service="sub.renamed.notification.service", + operation="RenamedOnComplete", + ) + + +def test_completion_callback_local_handler_class() -> None: + """Handler classes defined in a function are supported.""" + + @nexusrpc.handler.service_handler(name="local.notification.service") + class LocalNotificationHandler: + @nexusrpc.handler.sync_operation(name="OnComplete") + async def on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: notifications.OnCompleteRequest[ + NotificationValue, NotificationValue + ], + ) -> notifications.OnCompleteResponse: + return notifications.OnCompleteResponse() + + callback = nexus.create_completion_callback( + operation=LocalNotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + assert callback == _OnCompleteCallback( + task_queue="notifications", + source_context=NotificationValue("context"), + service="local.notification.service", + operation="OnComplete", + ) + + +def test_completion_callback_names() -> None: + """A service name is given with an operation name, and only with names.""" + assert nexus.create_completion_callback( + service="external.notification.service", + operation="ExternalOnComplete", + task_queue="notifications", + source_context=NotificationValue("context"), + ) == _OnCompleteCallback( + task_queue="notifications", + source_context=NotificationValue("context"), + service="external.notification.service", + operation="ExternalOnComplete", + ) + invalid_names = "^Give a service name with an operation name" + with pytest.raises(ValueError, match=invalid_names): + nexus.create_completion_callback( # type: ignore[call-overload] + operation="ExternalOnComplete", # pyright: ignore[reportArgumentType] + task_queue="notifications", + source_context=NotificationValue("context"), + ) + with pytest.raises(ValueError, match=invalid_names): + nexus.create_completion_callback( # type: ignore[call-overload] + service="custom.notification.service", + operation=CustomNotificationHandler.on_complete, # pyright: ignore[reportArgumentType] + task_queue="notifications", + source_context=NotificationValue("context"), + ) + for service, operation in (("", "ExternalOnComplete"), ("external", "")): + with pytest.raises( + ValueError, match="^Service and operation names must not be empty$" + ): + nexus.create_completion_callback( + service=service, + operation=operation, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + + +def test_completion_callback_rejects_invalid_operations() -> None: + """Operations that are not on-complete operations of a service are rejected.""" + + class UndecoratedHandler: + async def on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: notifications.OnCompleteRequest[ + NotificationValue, NotificationValue + ], + ) -> notifications.OnCompleteResponse: + return notifications.OnCompleteResponse() + + class UndecoratedOperationHandler: + @nexusrpc.handler.sync_operation(name="OnComplete") + async def on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: notifications.OnCompleteRequest[ + NotificationValue, NotificationValue + ], + ) -> notifications.OnCompleteResponse: + return notifications.OnCompleteResponse() + + with pytest.raises( + ValueError, match="^.*UndecoratedHandler.on_complete is not a Nexus operation$" + ): + nexus.create_completion_callback( + operation=UndecoratedHandler.on_complete, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + with pytest.raises( + ValueError, + match=( + "^.*UndecoratedOperationHandler.on_complete is not an operation of a " + "Nexus service" + ), + ): + nexus.create_completion_callback( + operation=UndecoratedOperationHandler.on_complete, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + with pytest.raises(ValueError, match="^operation 'Free' is not an operation"): + nexus.create_completion_callback( + operation=nexusrpc.Operation[ + notifications.OnCompleteRequest[NotificationValue, NotificationValue], + notifications.OnCompleteResponse, + ](name="Free"), + task_queue="notifications", + source_context=NotificationValue("context"), + ) + with pytest.raises( + ValueError, + match=( + "^Operation 'OtherOperation' of service 'not-a-notification-service' is " + "not an on-complete operation: expected input OnCompleteRequest and " + "output OnCompleteResponse, got input and output " + "$" + ), + ): + nexus.create_completion_callback( + operation=OtherOperationHandler.other_operation, # type: ignore[arg-type] + task_queue="notifications", + source_context=NotificationValue("context"), + ) + + +def test_completion_callback_checks_operation_shape() -> None: + """Operations need an OnCompleteRequest input and an OnCompleteResponse output.""" + assert nexus.create_completion_callback( + operation=NotificationShapeHandler.bare_on_complete, + task_queue="notifications", + source_context=NotificationValue("context"), + ) == _OnCompleteCallback( + task_queue="notifications", + source_context=NotificationValue("context"), + service="shape.notification.service", + operation="BareOnComplete", + ) + with pytest.raises( + ValueError, + match="'WrongOutput' .* is not an on-complete operation: .* output $", + ): + nexus.create_completion_callback( + operation=NotificationShapeHandler.wrong_output, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + + +async def test_on_complete_callback_to_proto() -> None: + """The callback proto targets the handler operation with an encoded context.""" + callback = nexus.create_completion_callback( + operation=CustomNotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + proto = await callback._to_proto(temporalio.converter.DataConverter.default) + + assert proto.nexus_handler.service == "custom.notification.service" + assert proto.nexus_handler.operation == "CustomOnComplete" + assert proto.nexus_handler.task_queue_name == "notifications" + assert await temporalio.converter.DataConverter.default.decode( + [proto.nexus_handler.source_context], [NotificationValue] + ) == [NotificationValue("context")] + + +async def test_on_complete_callback_to_proto_applies_codec() -> None: + """The source context is encoded with the full data converter, including codecs.""" + data_converter = dataclasses.replace( + temporalio.converter.default(), payload_codec=PrefixCodec() + ) + + callback = nexus.create_completion_callback( + operation=CustomNotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationValue("context"), + ) + proto = await callback._to_proto(data_converter) + + source_context = proto.nexus_handler.source_context + assert source_context.metadata["encoding"] == b"test/prefix" + assert await data_converter.decode([source_context], [NotificationValue]) == [ + NotificationValue("context") + ] + + +# --------------------------------------------------------------------------- +# Delivering completion callbacks +# --------------------------------------------------------------------------- + + +@dataclass(frozen=True) +class CallbackContext: + label: str + + +@workflow.defn +class FailingHandlerWorkflow: + @workflow.run + async def run(self, input: EchoInput) -> EchoOutput: + raise ApplicationError(input.value, "detail", non_retryable=True) + + +@nexusrpc.service +class CallbackTestService: + fail_async: nexusrpc.Operation[EchoInput, EchoOutput] + + +@service_handler(service=CallbackTestService) +class CallbackTestServiceHandler: + @workflow_run_operation + async def fail_async( + self, ctx: WorkflowRunOperationContext, input: EchoInput + ) -> nexus.WorkflowHandle[EchoOutput]: + return await ctx.start_workflow( + FailingHandlerWorkflow.run, + input, + id=str(uuid.uuid4()), + ) + + +@nexusrpc.handler.service_handler(name="callback.test.NotificationService") +class EchoOnCompleteHandler: + def __init__(self) -> None: + # Keyed by label so redelivered callbacks don't count twice + self.requests: dict[ + str, notifications.OnCompleteRequest[EchoOutput, CallbackContext] + ] = {} + + @nexusrpc.handler.sync_operation(name="OnComplete") + async def on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + input: notifications.OnCompleteRequest[EchoOutput, CallbackContext], + ) -> notifications.OnCompleteResponse: + self.requests[input.source_context.label] = input + return notifications.OnCompleteResponse() + + +@nexusrpc.handler.service_handler(name="callback.test.RawNotificationService") +class RawOnCompleteHandler: + def __init__(self) -> None: + self.requests: dict[ + str, notifications.OnCompleteRequest[RawValue, CallbackContext] + ] = {} + + @nexusrpc.handler.sync_operation(name="OnComplete") + async def on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + input: notifications.OnCompleteRequest[RawValue, CallbackContext], + ) -> notifications.OnCompleteResponse: + self.requests[input.source_context.label] = input + return notifications.OnCompleteResponse() + + +@dataclass(frozen=True) +class RecordCompletionInput: + label: str + output: EchoOutput + + +@nexusrpc.handler.service_handler(name="callback.test.ActivityNotificationService") +class ActivityOnCompleteHandler: + def __init__(self) -> None: + self.outputs: dict[str, EchoOutput] = {} + + @activity.defn + async def record_completion( + self, input: RecordCompletionInput + ) -> notifications.OnCompleteResponse: + self.outputs[input.label] = input.output + return notifications.OnCompleteResponse() + + @nexus.temporal_operation + async def on_complete( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: notifications.OnCompleteRequest[EchoOutput, CallbackContext], + ) -> nexus.TemporalOperationResult[notifications.OnCompleteResponse]: + assert isinstance(input.result, OnCompleteRequestResultSuccess) + return await client.start_activity( + self.record_completion, + RecordCompletionInput( + label=input.source_context.label, output=input.result.value + ), + id=f"on-complete-{input.source_context.label}", + start_to_close_timeout=timedelta(seconds=10), + ) + + +@workflow.defn +class RecordCompletionWorkflow: + @workflow.run + async def run( + self, input: RecordCompletionInput + ) -> notifications.OnCompleteResponse: + assert input.output == EchoOutput(value="hello") + return notifications.OnCompleteResponse() + + +@nexusrpc.handler.service_handler(name="callback.test.WorkflowNotificationService") +class WorkflowOnCompleteHandler: + def __init__(self) -> None: + self.outputs: dict[str, EchoOutput] = {} + + @nexus.temporal_operation + async def on_complete( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: notifications.OnCompleteRequest[EchoOutput, CallbackContext], + ) -> nexus.TemporalOperationResult[notifications.OnCompleteResponse]: + assert isinstance(input.result, OnCompleteRequestResultSuccess) + result = await client.start_workflow( + RecordCompletionWorkflow.run, + RecordCompletionInput( + label=input.source_context.label, output=input.result.value + ), + id=f"on-complete-{input.source_context.label}", + ) + self.outputs[input.source_context.label] = input.result.value + return result + + +@asynccontextmanager +async def _callback_workers( + client: Client, + env: WorkflowEnvironment, + completion_handler: object, + operation_handler: StandaloneTestServiceHandler | None = None, + completion_activities: Sequence[Callable[..., Any]] = (), + completion_workflows: Sequence[type] = (), +) -> AsyncIterator[tuple[str, str]]: + """Run operation and completion workers, yielding (endpoint, completion queue).""" + operation_task_queue = str(uuid.uuid4()) + completion_task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(operation_task_queue) + async with ( + Worker( + client, + task_queue=operation_task_queue, + nexus_service_handlers=[ + operation_handler or StandaloneTestServiceHandler(), + CallbackTestServiceHandler(), + ], + workflows=[ + EchoHandlerWorkflow, + BlockingHandlerWorkflow, + FailingHandlerWorkflow, + ], + ), + Worker( + client, + task_queue=completion_task_queue, + nexus_service_handlers=[completion_handler], + activities=completion_activities, + workflows=completion_workflows, + ), + ): + endpoint = await env.create_nexus_endpoint(endpoint_name, operation_task_queue) + try: + yield endpoint_name, completion_task_queue + finally: + await env.delete_nexus_endpoint(endpoint) + + +@pytest.mark.requires_local_server +async def test_completion_callback_delivers_success( + client: Client, env: WorkflowEnvironment +): + """A successful operation delivers its result and source context to the handler.""" + if env.supports_time_skipping: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + completion_handler = EchoOnCompleteHandler() + async with _callback_workers(client, env, completion_handler) as ( + endpoint_name, + completion_task_queue, + ): + handle = await client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ).start_operation( + StandaloneTestService.echo_async, + EchoInput(value="hello"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=[ + nexus.create_completion_callback( + operation=EchoOnCompleteHandler.on_complete, + task_queue=completion_task_queue, + source_context=CallbackContext(label="success"), + ) + ], + ) + + assert await handle.result() == EchoOutput(value="hello") + + async def received_callbacks() -> None: + assert set(completion_handler.requests) == {"success"} + + await assert_eventually(received_callbacks) + request = completion_handler.requests["success"] + assert request.source_context == CallbackContext(label="success") + assert request.result == OnCompleteRequestResultSuccess(EchoOutput("hello")) + + +@pytest.mark.requires_local_server +async def test_completion_callback_delivers_failure( + client: Client, env: WorkflowEnvironment +): + """A failed operation delivers the handler workflow's failure to the handler.""" + if env.supports_time_skipping: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + completion_handler = EchoOnCompleteHandler() + async with _callback_workers(client, env, completion_handler) as ( + endpoint_name, + completion_task_queue, + ): + handle = await client.create_nexus_client( + service=CallbackTestService, endpoint=endpoint_name + ).start_operation( + CallbackTestService.fail_async, + EchoInput(value="callback test failure"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=[ + nexus.create_completion_callback( + operation=EchoOnCompleteHandler.on_complete, + task_queue=completion_task_queue, + source_context=CallbackContext(label="failure"), + ) + ], + ) + + with pytest.raises(NexusOperationFailureError): + await handle.result() + + async def received_callbacks() -> None: + assert set(completion_handler.requests) == {"failure"} + + await assert_eventually(received_callbacks) + request = completion_handler.requests["failure"] + assert request.source_context == CallbackContext(label="failure") + assert isinstance(request.result, OnCompleteRequestResultFailure) + error = request.result.value + assert isinstance(error, ApplicationError) + assert error.message == "callback test failure" + assert error.non_retryable + + +@pytest.mark.requires_local_server +@pytest.mark.parametrize("outcome", ["cancel", "terminate"]) +async def test_completion_callback_delivers_cancellation_and_termination( + client: Client, env: WorkflowEnvironment, outcome: str +): + """Canceled and terminated operations deliver their failure to the handler.""" + if env.supports_time_skipping: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + operation_handler = StandaloneTestServiceHandler() + completion_handler = EchoOnCompleteHandler() + blocking_input = f"{outcome}-{uuid.uuid4()}" + async with _callback_workers( + client, env, completion_handler, operation_handler + ) as (endpoint_name, completion_task_queue): + handle = await client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ).start_operation( + StandaloneTestService.blocking_async, + EchoInput(value=blocking_input), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=[ + nexus.create_completion_callback( + operation=EchoOnCompleteHandler.on_complete, + task_queue=completion_task_queue, + source_context=CallbackContext(label=outcome), + ) + ], + ) + await asyncio.wait_for(operation_handler.started_blocking.wait(), timeout=10) + + if outcome == "cancel": + await handle.cancel(reason="callback test cancel") + else: + await handle.terminate(reason="callback test termination") + # Terminating the operation leaves its handler workflow running + await client.get_workflow_handle( + f"blocking_async-{blocking_input}" + ).terminate() + + with pytest.raises(NexusOperationFailureError): + await handle.result() + + async def received_callbacks() -> None: + assert set(completion_handler.requests) == {outcome} + + await assert_eventually(received_callbacks) + request = completion_handler.requests[outcome] + assert request.source_context == CallbackContext(label=outcome) + assert isinstance(request.result, OnCompleteRequestResultFailure) + if outcome == "cancel": + assert isinstance(request.result.value, CancelledError) + else: + assert isinstance(request.result.value, TerminatedError) + assert request.result.value.message == "callback test termination" + + +@pytest.mark.requires_local_server +async def test_multiple_completion_callbacks_on_operation( + client: Client, env: WorkflowEnvironment +): + """Every callback attached to an operation is passed to interceptors and delivered.""" + if env.supports_time_skipping: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + interceptor = _RecordingInterceptor() + config = client.config() + config["interceptors"] = [interceptor] + intercepted_client = Client(**config) + completion_handler = EchoOnCompleteHandler() + async with _callback_workers(client, env, completion_handler) as ( + endpoint_name, + completion_task_queue, + ): + completion_callbacks = [ + nexus.create_completion_callback( + operation=EchoOnCompleteHandler.on_complete, + task_queue=completion_task_queue, + source_context=CallbackContext(label=label), + ) + for label in ("first", "second") + ] + handle = await intercepted_client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ).start_operation( + StandaloneTestService.echo_async, + EchoInput(value="hello"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=completion_callbacks, + ) + + [start_input] = interceptor.start_calls + assert list(start_input.completion_callbacks) == completion_callbacks + assert await handle.result() == EchoOutput(value="hello") + + async def received_callbacks() -> None: + assert set(completion_handler.requests) == {"first", "second"} + + await assert_eventually(received_callbacks) + for request in completion_handler.requests.values(): + assert request.result == OnCompleteRequestResultSuccess(EchoOutput("hello")) + + +@pytest.mark.requires_local_server +async def test_raw_value_completion_handler_for_multiple_operations( + client: Client, env: WorkflowEnvironment +): + """A RawValue handler receives completions from operations with different results.""" + if env.supports_time_skipping: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + operation_handler = StandaloneTestServiceHandler() + completion_handler = RawOnCompleteHandler() + blocking_input = f"multiple-operations-{uuid.uuid4()}" + async with _callback_workers( + client, env, completion_handler, operation_handler + ) as (endpoint_name, completion_task_queue): + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + echo_handle = await nexus_client.start_operation( + StandaloneTestService.echo_async, + EchoInput(value="echo"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=[ + nexus.create_completion_callback( + operation=RawOnCompleteHandler.on_complete, + task_queue=completion_task_queue, + source_context=CallbackContext(label="echo_async"), + ) + ], + ) + blocking_handle = await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value=blocking_input), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=[ + nexus.create_completion_callback( + operation=RawOnCompleteHandler.on_complete, + task_queue=completion_task_queue, + source_context=CallbackContext(label="blocking_async"), + ) + ], + ) + + await asyncio.wait_for(operation_handler.started_blocking.wait(), timeout=10) + await client.get_workflow_handle( + f"blocking_async-{blocking_input}" + ).start_update( + BlockingHandlerWorkflow.unblock, + wait_for_stage=WorkflowUpdateStage.COMPLETED, + ) + + assert await echo_handle.result() == EchoOutput(value="echo") + assert await blocking_handle.result() == EchoOutput(value=blocking_input) + expected_results = { + "echo_async": EchoOutput(value="echo"), + "blocking_async": EchoOutput(value=blocking_input), + } + + async def received_callbacks() -> None: + assert set(completion_handler.requests) == set(expected_results) + + await assert_eventually(received_callbacks) + for label, request in completion_handler.requests.items(): + assert isinstance(request.result, OnCompleteRequestResultSuccess) + # A RawValue handler receives the payload, so convert it here + result = client.data_converter.payload_converter.from_payload( + request.result.value.payload, EchoOutput + ) + assert result == expected_results[label] + + +@pytest.mark.requires_local_server +async def test_temporal_operation_completion_handler_starts_activity( + client: Client, env: WorkflowEnvironment +): + """A temporal_operation completion handler can start a standalone activity.""" + if env.supports_time_skipping: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + completion_handler = ActivityOnCompleteHandler() + label = str(uuid.uuid4()) + async with _callback_workers( + client, + env, + completion_handler, + completion_activities=[completion_handler.record_completion], + ) as (endpoint_name, completion_task_queue): + result = await client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ).execute_operation( + StandaloneTestService.echo_async, + EchoInput(value="hello"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=[ + nexus.create_completion_callback( + operation=ActivityOnCompleteHandler.on_complete, + task_queue=completion_task_queue, + source_context=CallbackContext(label=label), + ) + ], + ) + + assert result == EchoOutput(value="hello") + + async def activity_recorded_output() -> None: + assert completion_handler.outputs == {label: EchoOutput(value="hello")} + + await assert_eventually(activity_recorded_output) + activity_handle = client.get_activity_handle( + f"on-complete-{label}", result_type=notifications.OnCompleteResponse + ) + assert await activity_handle.result() == notifications.OnCompleteResponse() + + +@pytest.mark.requires_local_server +async def test_temporal_operation_completion_handler_starts_workflow( + client: Client, env: WorkflowEnvironment +): + """A completion handler can start a workflow with the inbound callback link.""" + if env.supports_time_skipping: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + completion_handler = WorkflowOnCompleteHandler() + label = str(uuid.uuid4()) + async with _callback_workers( + client, + env, + completion_handler, + completion_workflows=[RecordCompletionWorkflow], + ) as (endpoint_name, completion_task_queue): + result = await client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ).execute_operation( + StandaloneTestService.echo_async, + EchoInput(value="hello"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=[ + nexus.create_completion_callback( + operation=WorkflowOnCompleteHandler.on_complete, + task_queue=completion_task_queue, + source_context=CallbackContext(label=label), + ) + ], + ) + assert result == EchoOutput(value="hello") + + async def workflow_started() -> None: + assert completion_handler.outputs == {label: EchoOutput(value="hello")} + + await assert_eventually(workflow_started) + handle = client.get_workflow_handle( + f"on-complete-{label}", result_type=notifications.OnCompleteResponse + ) + assert await handle.result() == notifications.OnCompleteResponse() + history = await handle.fetch_history() + assert any( + link.HasField("callback") + for event in history.events + for link in event.links + ) + + +@pytest.mark.requires_local_server +@pytest.mark.parametrize("success", [True, False]) +async def test_completion_callback_by_name_with_codec( + client: Client, env: WorkflowEnvironment, success: bool +): + """Name-based callbacks from execute_operation round-trip through a payload codec.""" + if env.supports_time_skipping: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + config = client.config() + config["data_converter"] = dataclasses.replace( + client.data_converter, payload_codec=PrefixCodec() + ) + codec_client = Client(**config) + completion_handler = RawOnCompleteHandler() + async with _callback_workers(codec_client, env, completion_handler) as ( + endpoint_name, + completion_task_queue, + ): + completion_callbacks = [ + nexus.create_completion_callback( + service="callback.test.RawNotificationService", + operation="OnComplete", + task_queue=completion_task_queue, + source_context=CallbackContext(label="codec"), + ) + ] + if success: + result = await codec_client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ).execute_operation( + StandaloneTestService.echo_async, + EchoInput(value="encoded"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=completion_callbacks, + ) + assert result == EchoOutput(value="encoded") + else: + with pytest.raises(NexusOperationFailureError): + await codec_client.create_nexus_client( + service=CallbackTestService, endpoint=endpoint_name + ).execute_operation( + CallbackTestService.fail_async, + EchoInput(value="encoded failure"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=completion_callbacks, + ) + + async def received_callbacks() -> None: + assert set(completion_handler.requests) == {"codec"} + + await assert_eventually(received_callbacks) + request = completion_handler.requests["codec"] + assert request.source_context == CallbackContext(label="codec") + if success: + assert isinstance(request.result, OnCompleteRequestResultSuccess) + # The worker decoded the codec before handing the handler the raw value + raw = request.result.value.payload + assert raw.metadata["encoding"] != b"test/prefix" + assert codec_client.data_converter.payload_converter.from_payload( + raw, EchoOutput + ) == EchoOutput(value="encoded") + else: + assert isinstance(request.result, OnCompleteRequestResultFailure) + error = request.result.value + assert isinstance(error, ApplicationError) + assert error.message == "encoded failure" + # Failure details can only be read if the worker decoded the codec + assert error.details == ("detail",) + + +@pytest.mark.requires_local_server +async def test_completion_callback_typed_handler_with_codec( + client: Client, env: WorkflowEnvironment +): + """A typed handler receives the result decoded through a payload codec.""" + if env.supports_time_skipping: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + config = client.config() + config["data_converter"] = dataclasses.replace( + client.data_converter, payload_codec=PrefixCodec() + ) + codec_client = Client(**config) + completion_handler = EchoOnCompleteHandler() + async with _callback_workers(codec_client, env, completion_handler) as ( + endpoint_name, + completion_task_queue, + ): + result = await codec_client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ).execute_operation( + StandaloneTestService.echo_async, + EchoInput(value="encoded"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + completion_callbacks=[ + nexus.create_completion_callback( + operation=EchoOnCompleteHandler.on_complete, + task_queue=completion_task_queue, + source_context=CallbackContext(label="typed-codec"), + ) + ], + ) + + assert result == EchoOutput(value="encoded") + + async def received_callbacks() -> None: + assert set(completion_handler.requests) == {"typed-codec"} + + await assert_eventually(received_callbacks) + request = completion_handler.requests["typed-codec"] + assert request.source_context == CallbackContext(label="typed-codec") + assert request.result == OnCompleteRequestResultSuccess(EchoOutput("encoded")) diff --git a/tests/nexus/test_nexus_type_errors.py b/tests/nexus/test_nexus_type_errors.py new file mode 100644 index 0000000000..727299d1fe --- /dev/null +++ b/tests/nexus/test_nexus_type_errors.py @@ -0,0 +1,1393 @@ +""" +This file exists to test for type-checker false positives and false negatives. +It doesn't contain any test functions. +""" + +from dataclasses import dataclass +from datetime import timedelta +from typing import Any, TypeAlias +from unittest.mock import Mock + +import nexusrpc + +import temporalio.common +import temporalio.nexus +import temporalio.nexus.notifications +from temporalio import activity, workflow +from temporalio.client import Client, NexusOperationHandle +from temporalio.nexus import TemporalOperationStartHandlerFunc +from temporalio.service import ServiceClient + + +@dataclass +class MyInput: + pass + + +@dataclass +class MyOutput: + pass + + +@dataclass +class NotificationSourceContext: + value: str + + +@nexusrpc.handler.service_handler( + name="temporal.notificationservice.v1.NotificationService" +) +class NotificationHandler: + @nexusrpc.handler.sync_operation(name="OnComplete") + async def on_complete( + self, + _context: nexusrpc.handler.StartOperationContext, + _input: temporalio.nexus.notifications.OnCompleteRequest[ + MyOutput, NotificationSourceContext + ], + ) -> temporalio.nexus.notifications.OnCompleteResponse: + return temporalio.nexus.notifications.OnCompleteResponse() + + +@nexusrpc.handler.service_handler(name="raw-value.notification.service") +class RawValueNotificationHandler: + @nexusrpc.handler.sync_operation(name="OnRawComplete") + async def on_raw_complete( + self, + _context: nexusrpc.handler.StartOperationContext, + _input: temporalio.nexus.notifications.OnCompleteRequest[ + temporalio.common.RawValue, NotificationSourceContext + ], + ) -> temporalio.nexus.notifications.OnCompleteResponse: + return temporalio.nexus.notifications.OnCompleteResponse() + + +@nexusrpc.handler.service_handler(name="kinds.notification.service") +class OperationKindsNotificationHandler: + @nexusrpc.handler.sync_operation + def def_on_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: temporalio.nexus.notifications.OnCompleteRequest[ + MyOutput, NotificationSourceContext + ], + ) -> temporalio.nexus.notifications.OnCompleteResponse: + return temporalio.nexus.notifications.OnCompleteResponse() + + @nexusrpc.handler.sync_operation + def def_on_raw_complete( + self, + _ctx: nexusrpc.handler.StartOperationContext, + _input: temporalio.nexus.notifications.OnCompleteRequest[ + temporalio.common.RawValue, NotificationSourceContext + ], + ) -> temporalio.nexus.notifications.OnCompleteResponse: + return temporalio.nexus.notifications.OnCompleteResponse() + + @temporalio.nexus.workflow_run_operation + async def workflow_run_on_complete( + self, + _ctx: temporalio.nexus.WorkflowRunOperationContext, + _input: temporalio.nexus.notifications.OnCompleteRequest[ + MyOutput, NotificationSourceContext + ], + ) -> temporalio.nexus.WorkflowHandle[ + temporalio.nexus.notifications.OnCompleteResponse + ]: + raise NotImplementedError + + @temporalio.nexus.workflow_run_operation + async def workflow_run_on_raw_complete( + self, + _ctx: temporalio.nexus.WorkflowRunOperationContext, + _input: temporalio.nexus.notifications.OnCompleteRequest[ + temporalio.common.RawValue, NotificationSourceContext + ], + ) -> temporalio.nexus.WorkflowHandle[ + temporalio.nexus.notifications.OnCompleteResponse + ]: + raise NotImplementedError + + @temporalio.nexus.temporal_operation + async def temporal_on_complete( + self, + _ctx: temporalio.nexus.TemporalStartOperationContext, + _client: temporalio.nexus.TemporalNexusClient, + _input: temporalio.nexus.notifications.OnCompleteRequest[ + MyOutput, NotificationSourceContext + ], + ) -> temporalio.nexus.TemporalOperationResult[ + temporalio.nexus.notifications.OnCompleteResponse + ]: + raise NotImplementedError + + @temporalio.nexus.temporal_operation + async def temporal_on_raw_complete( + self, + _ctx: temporalio.nexus.TemporalStartOperationContext, + _client: temporalio.nexus.TemporalNexusClient, + _input: temporalio.nexus.notifications.OnCompleteRequest[ + temporalio.common.RawValue, NotificationSourceContext + ], + ) -> temporalio.nexus.TemporalOperationResult[ + temporalio.nexus.notifications.OnCompleteResponse + ]: + raise NotImplementedError + + +@nexusrpc.service(name="definition.notification.service") +class NotificationDefinition: + on_complete: nexusrpc.Operation[ + temporalio.nexus.notifications.OnCompleteRequest[ + MyOutput, NotificationSourceContext + ], + temporalio.nexus.notifications.OnCompleteResponse, + ] + on_raw_complete: nexusrpc.Operation[ + temporalio.nexus.notifications.OnCompleteRequest[ + temporalio.common.RawValue, NotificationSourceContext + ], + temporalio.nexus.notifications.OnCompleteResponse, + ] + + +# The declared types are wrong, so each error message shows the inferred type. +def completion_callback_type_inference() -> None: + # overloads infer the handler's output type + # assert-type-error-pyright: 'Type "CompletionCallback\[MyOutput\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + # assert-type-error-pyright: 'Type "CompletionCallback\[MyOutput\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + operation=NotificationDefinition.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + # assert-type-error-pyright: 'Type "CompletionCallback\[Any\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + operation=RawValueNotificationHandler.on_raw_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + # assert-type-error-pyright: 'Type "CompletionCallback\[Any\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + service="named.notification.service", + operation="OnComplete", + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + # def sync_operation, workflow_run_operation, and temporal_operation handler + # methods are supported + # assert-type-error-pyright: 'Type "CompletionCallback\[MyOutput\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + operation=OperationKindsNotificationHandler.def_on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + # assert-type-error-pyright: 'Type "CompletionCallback\[Any\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + operation=OperationKindsNotificationHandler.def_on_raw_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + # assert-type-error-pyright: 'Type "CompletionCallback\[MyOutput\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + operation=OperationKindsNotificationHandler.workflow_run_on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + # assert-type-error-pyright: 'Type "CompletionCallback\[Any\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + operation=OperationKindsNotificationHandler.workflow_run_on_raw_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + # assert-type-error-pyright: 'Type "CompletionCallback\[MyOutput\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + operation=OperationKindsNotificationHandler.temporal_on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + # assert-type-error-pyright: 'Type "CompletionCallback\[Any\]" is not assignable to declared type "None"' + _: None = temporalio.nexus.create_completion_callback( # type: ignore + operation=OperationKindsNotificationHandler.temporal_on_raw_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + + +# These calls fail at runtime, so they are only type checked. +def invalid_completion_callbacks() -> None: + # source_context must match the handler's source context type + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=NotificationHandler.on_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=NotificationDefinition.on_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=NotificationDefinition.on_raw_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=RawValueNotificationHandler.on_raw_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=OperationKindsNotificationHandler.def_on_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=OperationKindsNotificationHandler.def_on_raw_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=OperationKindsNotificationHandler.workflow_run_on_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=OperationKindsNotificationHandler.workflow_run_on_raw_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=OperationKindsNotificationHandler.temporal_on_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( + operation=OperationKindsNotificationHandler.temporal_on_raw_complete, # type: ignore[arg-type] + task_queue="notifications", + # assert-type-error-pyright: 'Argument of type "MyInput" cannot be assigned to parameter "source_context"' + source_context=MyInput(), # type: ignore + ) + + # operation names require a service name + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( # type: ignore[call-overload] + # assert-type-error-pyright: 'Argument of type "Literal\['OnComplete'\]" cannot be assigned to parameter "operation"' + operation="OnComplete", # type: ignore + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + + # operations other than names already identify their service + temporalio.nexus.create_completion_callback( + service="named.notification.service", + # assert-type-error-pyright: 'cannot be assigned to parameter "operation" of type "str"' + operation=NotificationHandler.on_complete, # type: ignore + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + + # all arguments are keyword arguments + # assert-type-error-pyright: 'No overloads for "create_completion_callback" match' + temporalio.nexus.create_completion_callback( # type: ignore[call-overload] + NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ) + + +@workflow.defn +class MyNoArgProcWorkflow: + @workflow.run + async def run(self) -> None: + pass + + +@workflow.defn +class MyOneArgProcWorkflow: + @workflow.run + async def run(self, _input: MyInput) -> None: + pass + + +@workflow.defn +class MyTwoArgProcWorkflow: + @workflow.run + async def run(self, _input: MyInput, _arg2: int) -> None: + pass + + +@workflow.defn +class MyThreeArgProcWorkflow: + @workflow.run + async def run(self, _input: MyInput, _arg2: int, _arg3: int) -> None: + pass + + +@workflow.defn +class MyFourArgProcWorkflow: + @workflow.run + async def run(self, _input: MyInput, _arg2: int, _arg3: int, _arg4: int) -> None: + pass + + +@workflow.defn +class MyFiveArgProcWorkflow: + @workflow.run + async def run( + self, _input: MyInput, _arg2: int, _arg3: int, _arg4: int, _arg5: int + ) -> None: + pass + + +@activity.defn +async def my_no_arg_activity() -> None: + pass + + +@activity.defn +async def my_one_arg_activity(_input: MyInput) -> None: + pass + + +@activity.defn +async def my_two_arg_activity(_input: MyInput, _arg2: int) -> None: + pass + + +@activity.defn +async def my_three_arg_activity(_input: MyInput, _arg2: int, _arg3: int) -> None: + pass + + +@activity.defn +async def my_four_arg_activity( + _input: MyInput, _arg2: int, _arg3: int, _arg4: int +) -> None: + pass + + +@activity.defn +async def my_five_arg_activity( + _input: MyInput, _arg2: int, _arg3: int, _arg4: int, _arg5: int +) -> None: + pass + + +@activity.defn +def my_sync_no_arg_activity() -> None: + pass + + +@activity.defn +def my_sync_one_arg_activity(_input: MyInput) -> None: + pass + + +@activity.defn +def my_sync_two_arg_activity(_input: MyInput, _arg2: int) -> None: + pass + + +@activity.defn +def my_sync_three_arg_activity(_input: MyInput, _arg2: int, _arg3: int) -> None: + pass + + +@activity.defn +def my_sync_four_arg_activity( + _input: MyInput, _arg2: int, _arg3: int, _arg4: int +) -> None: + pass + + +@activity.defn +def my_sync_five_arg_activity( + _input: MyInput, _arg2: int, _arg3: int, _arg4: int, _arg5: int +) -> None: + pass + + +@nexusrpc.service +class MyService: + my_sync_operation: nexusrpc.Operation[MyInput, MyOutput] + my_workflow_run_operation: nexusrpc.Operation[MyInput, MyOutput] + my_temporal_operation: nexusrpc.Operation[int, None] + + +@nexusrpc.service +class MyNoInputService: + my_no_input_operation: nexusrpc.Operation[None, MyOutput] + + +@nexusrpc.handler.service_handler(service=MyService) +class MyServiceHandler: + @nexusrpc.handler.sync_operation + async def my_sync_operation( + self, _ctx: nexusrpc.handler.StartOperationContext, _input: MyInput + ) -> MyOutput: + raise NotImplementedError + + @temporalio.nexus.workflow_run_operation + async def my_workflow_run_operation( + self, _ctx: temporalio.nexus.WorkflowRunOperationContext, _input: MyInput + ) -> temporalio.nexus.WorkflowHandle[MyOutput]: + raise NotImplementedError + + @temporalio.nexus.temporal_operation + async def my_temporal_operation( + self, + _ctx: temporalio.nexus.TemporalStartOperationContext, + client: temporalio.nexus.TemporalNexusClient, + input: int, + ) -> temporalio.nexus.TemporalOperationResult[None]: + """ + Typed proc workflow and activity starts from a generic Temporal Nexus + operation handler infer TemporalOperationResult[None] for 0 to 5 + workflow or activity parameters. + """ + if input == 0: + result_0: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_workflow(MyNoArgProcWorkflow.run, id="proc-0") + return result_0 + if input == 1: + result_1: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_workflow( + MyOneArgProcWorkflow.run, MyInput(), id="proc-1" + ) + return result_1 + if input == 2: + result_2: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_workflow( + MyTwoArgProcWorkflow.run, args=[MyInput(), 2], id="proc-2" + ) + return result_2 + if input == 3: + result_3: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_workflow( + MyThreeArgProcWorkflow.run, + args=[MyInput(), 2, 3], + id="proc-3", + ) + return result_3 + if input == 4: + result_4: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_workflow( + MyFourArgProcWorkflow.run, + args=[MyInput(), 2, 3, 4], + id="proc-4", + ) + return result_4 + if input == 5: + result_5: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_workflow( + MyFiveArgProcWorkflow.run, + args=[MyInput(), 2, 3, 4, 5], + id="proc-5", + ) + return result_5 + + # Typed activity starts infer TemporalOperationResult[None] for 0 to 5 + # activity parameters. Activities require a start_to_close_timeout. + if input == 6: + activity_result_0: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_no_arg_activity, + id="activity-0", + start_to_close_timeout=timedelta(seconds=5), + ) + return activity_result_0 + if input == 7: + activity_result_1: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_one_arg_activity, + MyInput(), + id="activity-1", + start_to_close_timeout=timedelta(seconds=5), + ) + return activity_result_1 + if input == 8: + activity_result_2: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_two_arg_activity, + args=[MyInput(), 2], + id="activity-2", + start_to_close_timeout=timedelta(seconds=5), + ) + return activity_result_2 + if input == 9: + activity_result_3: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_three_arg_activity, + args=[MyInput(), 2, 3], + id="activity-3", + start_to_close_timeout=timedelta(seconds=5), + ) + return activity_result_3 + if input == 10: + activity_result_4: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_four_arg_activity, + args=[MyInput(), 2, 3, 4], + id="activity-4", + start_to_close_timeout=timedelta(seconds=5), + ) + return activity_result_4 + if input == 11: + activity_result_5: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_five_arg_activity, + args=[MyInput(), 2, 3, 4, 5], + id="activity-5", + start_to_close_timeout=timedelta(seconds=5), + ) + return activity_result_5 + if input == 12: + sync_activity_result_0: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_sync_no_arg_activity, + id="sync-activity-0", + start_to_close_timeout=timedelta(seconds=5), + ) + return sync_activity_result_0 + if input == 13: + sync_activity_result_1: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_sync_one_arg_activity, + MyInput(), + id="sync-activity-1", + start_to_close_timeout=timedelta(seconds=5), + ) + return sync_activity_result_1 + if input == 14: + sync_activity_result_2: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_sync_two_arg_activity, + args=[MyInput(), 2], + id="sync-activity-2", + start_to_close_timeout=timedelta(seconds=5), + ) + return sync_activity_result_2 + if input == 15: + sync_activity_result_3: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_sync_three_arg_activity, + args=[MyInput(), 2, 3], + id="sync-activity-3", + start_to_close_timeout=timedelta(seconds=5), + ) + return sync_activity_result_3 + if input == 16: + sync_activity_result_4: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_sync_four_arg_activity, + args=[MyInput(), 2, 3, 4], + id="sync-activity-4", + start_to_close_timeout=timedelta(seconds=5), + ) + return sync_activity_result_4 + if input == 17: + sync_activity_result_5: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + my_sync_five_arg_activity, + args=[MyInput(), 2, 3, 4, 5], + id="sync-activity-5", + start_to_close_timeout=timedelta(seconds=5), + ) + return sync_activity_result_5 + if input == 18: + string_activity_result: temporalio.nexus.TemporalOperationResult[ + None + ] = await client.start_activity( + "string-activity", + id="string-activity", + result_type=type(None), + start_to_close_timeout=timedelta(seconds=5), + ) + return string_activity_result + if input == 19: + # assert-type-error-pyright: 'No overloads for "start_activity" match' + return await client.start_activity( # type: ignore + my_one_arg_activity, + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter' + "wrong-input-type", # type: ignore + id="activity-wrong-input", + start_to_close_timeout=timedelta(seconds=5), + ) + + # assert-type-error-pyright: 'No overloads for "start_workflow" match' + return await client.start_workflow( # type: ignore + MyOneArgProcWorkflow.run, + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter' + "wrong-input-type", # type: ignore + id="proc-wrong-input", + ) + + +@nexusrpc.handler.service_handler(service=MyService) +class MyServiceHandler2: + @nexusrpc.handler.sync_operation + async def my_sync_operation( + self, _ctx: nexusrpc.handler.StartOperationContext, _input: MyInput + ) -> MyOutput: + raise NotImplementedError + + @temporalio.nexus.workflow_run_operation + async def my_workflow_run_operation( + self, _ctx: temporalio.nexus.WorkflowRunOperationContext, _input: MyInput + ) -> temporalio.nexus.WorkflowHandle[MyOutput]: + raise NotImplementedError + + @temporalio.nexus.temporal_operation + async def my_temporal_operation( + self, + _ctx: temporalio.nexus.TemporalStartOperationContext, + _client: temporalio.nexus.TemporalNexusClient, + _input: int, + ) -> temporalio.nexus.TemporalOperationResult[None]: + raise NotImplementedError + + +@nexusrpc.handler.service_handler +class MyServiceHandlerWithoutServiceDefinition: + @nexusrpc.handler.sync_operation + async def my_sync_operation( + self, _ctx: nexusrpc.handler.StartOperationContext, _input: MyInput + ) -> MyOutput: + raise NotImplementedError + + @temporalio.nexus.workflow_run_operation + async def my_workflow_run_operation( + self, _ctx: temporalio.nexus.WorkflowRunOperationContext, _input: MyInput + ) -> temporalio.nexus.WorkflowHandle[MyOutput]: + raise NotImplementedError + + @temporalio.nexus.temporal_operation + async def my_temporal_operation( + self, + _ctx: temporalio.nexus.TemporalStartOperationContext, + _client: temporalio.nexus.TemporalNexusClient, + _input: int, + ) -> temporalio.nexus.TemporalOperationResult[None]: + raise NotImplementedError + + +_handler: TemporalOperationStartHandlerFunc[ + MyServiceHandler, + int, + None, +] = MyServiceHandler.my_temporal_operation + +_BadHandler: TypeAlias = temporalio.nexus.TemporalOperationStartHandlerFunc[ + MyServiceHandler, + str, + None, +] + +_bad_handler: TemporalOperationStartHandlerFunc[ + MyServiceHandler, + str, + None, + # assert-type-error-pyright: 'is not assignable to declared type' +] = MyServiceHandler.my_temporal_operation # type: ignore + + +class MyUnsafeContextAnnotationServiceHandler: + # A temporal operation receives TemporalStartOperationContext at runtime, so + # requiring an arbitrary user subclass is not safe. + class MyCustomTemporalStartOperationContext( + temporalio.nexus.TemporalStartOperationContext + ): + def custom_state(self) -> str: + raise NotImplementedError + + # assert-type-error-pyright: 'cannot be assigned to parameter "start".+temporal_operation' + @temporalio.nexus.temporal_operation # type: ignore + async def my_temporal_operation_with_workflow_run_context( + self, + _ctx: MyCustomTemporalStartOperationContext, + _client: temporalio.nexus.TemporalNexusClient, + _input: int, + ) -> temporalio.nexus.TemporalOperationResult[None]: + raise NotImplementedError + + # A workflow run operation receives WorkflowRunOperationContext at runtime, + # so requiring an arbitrary user subclass is not safe. + class MyCustomWorkflowRunOperationContext( + temporalio.nexus.WorkflowRunOperationContext + ): + def custom_state(self) -> str: + raise NotImplementedError + + # assert-type-error-pyright: 'cannot be assigned to parameter "start".+workflow_run_operation' + @temporalio.nexus.workflow_run_operation # type: ignore + async def my_workflow_run_operation_with_custom_context( + self, + _ctx: MyCustomWorkflowRunOperationContext, + _input: MyInput, + ) -> temporalio.nexus.WorkflowHandle[MyOutput]: + raise NotImplementedError + + +@workflow.defn +class MyWorkflow1: + @workflow.run + async def test_invoke_by_operation_definition_happy_path(self) -> None: + """ + When a nexus client calls an operation by referencing an operation definition on + a service definition, the output type is inferred correctly. + """ + nexus_client = workflow.create_nexus_client( + service=MyService, + endpoint="fake-endpoint", + ) + input = MyInput() + + # sync operation + _output_1: MyOutput = await nexus_client.execute_operation( + MyService.my_sync_operation, input + ) + _handle_1: workflow.NexusOperationHandle[ + MyOutput + ] = await nexus_client.start_operation(MyService.my_sync_operation, input) + _output_1_1: MyOutput = await _handle_1 + + # workflow run operation + _output_2: MyOutput = await nexus_client.execute_operation( + MyService.my_workflow_run_operation, input + ) + _handle_2: workflow.NexusOperationHandle[ + MyOutput + ] = await nexus_client.start_operation( + MyService.my_workflow_run_operation, input + ) + _output_2_1: MyOutput = await _handle_2 + + # temporal operation + _output_3: None = await nexus_client.execute_operation( # type: ignore + MyService.my_temporal_operation, 0 + ) + _handle_3: workflow.NexusOperationHandle[ + None + ] = await nexus_client.start_operation(MyService.my_temporal_operation, 0) + _output_3_1: None = await _handle_3 # type: ignore + + +@workflow.defn +class MyWorkflow2: + @workflow.run + async def test_invoke_by_operation_handler_happy_path(self) -> None: + """ + When a nexus client calls an operation by referencing an operation handler on a + service handler, the output type is inferred correctly. + """ + nexus_client = workflow.create_nexus_client( + service=MyServiceHandler, # MyService would also work + endpoint="fake-endpoint", + ) + input = MyInput() + + # sync operation + _output_1: MyOutput = await nexus_client.execute_operation( + MyServiceHandler.my_sync_operation, input + ) + _handle_1: workflow.NexusOperationHandle[ + MyOutput + ] = await nexus_client.start_operation( + MyServiceHandler.my_sync_operation, input + ) + _output_1_1: MyOutput = await _handle_1 + + # workflow run operation + _output_2: MyOutput = await nexus_client.execute_operation( + MyServiceHandler.my_workflow_run_operation, input + ) + _handle_2: workflow.NexusOperationHandle[ + MyOutput + ] = await nexus_client.start_operation( + MyServiceHandler.my_workflow_run_operation, input + ) + _output_2_1: MyOutput = await _handle_2 + + # temporal operation + _output_3: None = await nexus_client.execute_operation( # type: ignore + MyServiceHandler.my_temporal_operation, 0 + ) + _handle_3: workflow.NexusOperationHandle[ + None + ] = await nexus_client.start_operation( + MyServiceHandler.my_temporal_operation, 0 + ) + _output_3_1: None = await _handle_3 # type: ignore + + +@workflow.defn +class MyWorkflow3: + @workflow.run + async def test_invoke_by_operation_definition_wrong_input_type(self) -> None: + """ + When a nexus client calls an operation by referencing an operation definition on + a service definition, there is a type error if the input type is wrong. + """ + nexus_client = workflow.create_nexus_client( + service=MyService, + endpoint="fake-endpoint", + ) + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + MyService.my_sync_operation, + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "input"' + "wrong-input-type", # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + MyService.my_temporal_operation, + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "input"' + "wrong-input-type", # type: ignore + ) + + +@workflow.defn +class MyWorkflow4: + @workflow.run + async def test_invoke_by_operation_handler_wrong_input_type(self) -> None: + """ + When a nexus client calls an operation by referencing an operation handler on a + service handler, there is a type error if the input type is wrong. + """ + nexus_client = workflow.create_nexus_client( + service=MyServiceHandler, + endpoint="fake-endpoint", + ) + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + MyServiceHandler.my_sync_operation, # type: ignore[arg-type] + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "input"' + "wrong-input-type", # type: ignore + ) + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + MyServiceHandler.my_temporal_operation, # type: ignore[arg-type] + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "input"' + "wrong-input-type", # type: ignore + ) + + +@workflow.defn +class MyWorkflow5: + @workflow.run + async def test_invoke_by_operation_handler_method_on_wrong_service(self) -> None: + """ + When a nexus client calls an operation by referencing an operation handler method + on a service handler, there is a type error if the method does not belong to the + service for which the client was created. + + (This form of type safety is not available when referencing an operation definition) + """ + nexus_client = workflow.create_nexus_client( + service=MyServiceHandler, + endpoint="fake-endpoint", + ) + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "operation"' + MyServiceHandler2.my_sync_operation, # type: ignore + MyInput(), + ) + + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "operation"' + MyServiceHandler2.my_temporal_operation, # type: ignore + 0, + ) + + +async def standalone_operation_type_tests(): + client = Client(service_client=Mock(spec=ServiceClient)) + nexus_client = client.create_nexus_client( + MyService, + endpoint="fake-endpoint", + ) + no_input_nexus_client = client.create_nexus_client( + MyNoInputService, + endpoint="fake-endpoint", + ) + handler_nexus_client = client.create_nexus_client( + MyServiceHandler, + endpoint="fake-endpoint", + ) + + # execute with an operation definition infers output type + _op_defn_output: MyOutput = await nexus_client.execute_operation( + MyService.my_sync_operation, + MyInput(), + id="op-1", + schedule_to_start_timeout=timedelta(seconds=1), + start_to_close_timeout=timedelta(seconds=2), + ) + + # result_type is not allowed when an operation is provided + await nexus_client.execute_operation( + # assert-type-error-pyright: 'cannot be assigned to parameter "operation" of type "str"' + MyService.my_sync_operation, # type: ignore + MyInput(), + id="op-1", + result_type=str, + ) + + # string operation name and result_type infers output type + _str_op_result_type_output: MyOutput = await nexus_client.execute_operation( + "my_sync_operation", MyInput(), id="op-1", result_type=MyOutput + ) + + # execute with workflow run handler infers output type + _workflow_run_output: MyOutput = await handler_nexus_client.execute_operation( + MyServiceHandler.my_workflow_run_operation, + MyInput(), + id="op-1", + ) + + # execute with temporal operation handler infers output type + _temporal_output: None = await handler_nexus_client.execute_operation( # type: ignore[func-returns-value] + MyServiceHandler.my_temporal_operation, + 0, + id="op-1", + ) + + # omitting arg for string operation names is not supported + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + "my_sync_operation", + id="op-1", + result_type=MyOutput, + ) + # assert-type-error-pyright: 'No overloads for "start_operation" match' + await nexus_client.start_operation( # type: ignore + "my_sync_operation", + id="op-1", + result_type=MyOutput, + ) + + # omitting arg for callable operations is not supported + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + MyServiceHandler.my_sync_operation, + id="op-1", + result_type=MyOutput, + ) + # assert-type-error-pyright: 'No overloads for "start_operation" match' + await nexus_client.start_operation( # type: ignore + MyServiceHandler.my_sync_operation, + id="op-1", + result_type=MyOutput, + ) + + # no-input operation definitions must still be called with explicit None + _no_input_op_defn_output: MyOutput = await no_input_nexus_client.execute_operation( + MyNoInputService.my_no_input_operation, + None, + id="op-1", + ) + _no_input_op_defn_handle: NexusOperationHandle[ + MyOutput + ] = await no_input_nexus_client.start_operation( + MyNoInputService.my_no_input_operation, + None, + id="op-1", + ) + _no_input_op_defn_handle_output: MyOutput = await _no_input_op_defn_handle.result() + + # omitting arg for no-input operation definitions is not supported + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await no_input_nexus_client.execute_operation( # type: ignore + MyNoInputService.my_no_input_operation, + id="op-1", + ) + # assert-type-error-pyright: 'No overloads for "start_operation" match' + await no_input_nexus_client.start_operation( # type: ignore + MyNoInputService.my_no_input_operation, + id="op-1", + ) + + # execute with an operation definition and a wrong input type produces a type error + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + MyService.my_sync_operation, + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "arg"' + "wrong-input-type", # type: ignore + id="op-1", + ) + + # start with an operation definition and a wrong input type produces a type error + # assert-type-error-pyright: 'No overloads for "start_operation" match' + await nexus_client.start_operation( # type: ignore + MyService.my_sync_operation, + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "arg"' + "wrong-input-type", # type: ignore + id="op-1", + ) + + # starting with an operation definition infers output type on the handle and + # result from handle + _defn_handle: NexusOperationHandle[MyOutput] = await nexus_client.start_operation( + MyService.my_sync_operation, + MyInput(), + id="op-1", + schedule_to_start_timeout=timedelta(seconds=1), + start_to_close_timeout=timedelta(seconds=2), + ) + _defn_handle_output: MyOutput = await _defn_handle.result() + + # completion callback output types must match the started operation + _callback_handle: NexusOperationHandle[ + MyOutput + ] = await nexus_client.start_operation( + MyService.my_sync_operation, + MyInput(), + id="op-with-callback", + completion_callbacks=[ + temporalio.nexus.create_completion_callback( + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + _mixed_callback_handle: NexusOperationHandle[ + MyOutput + ] = await nexus_client.start_operation( + MyService.my_sync_operation, + MyInput(), + id="op-with-mixed-callbacks", + completion_callbacks=[ + temporalio.nexus.create_completion_callback( + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + # RawValue handlers accept the output of any operation + temporalio.nexus.create_completion_callback( + operation=RawValueNotificationHandler.on_raw_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + # RawValue and by-name callbacks are compatible with any output type + await nexus_client.start_operation( + MyService.my_temporal_operation, + 0, + id="op-with-any-output-callbacks", + completion_callbacks=[ + temporalio.nexus.create_completion_callback( + operation=RawValueNotificationHandler.on_raw_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + # operation names have no handler signature, so they accept any output type + temporalio.nexus.create_completion_callback( + service="named.notification.service", + operation="OnComplete", + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + # assert-type-error-pyright: 'No overloads for "start_operation" match' + await nexus_client.start_operation( # type: ignore + MyService.my_temporal_operation, + 0, + id="op-with-wrong-callback", + completion_callbacks=[ # type: ignore[arg-type] + # assert-type-error-pyright: '"list\[CompletionCallback\[MyOutput\]\]" cannot be assigned to parameter "completion_callbacks"' + temporalio.nexus.create_completion_callback( # type: ignore + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + _callback_output: MyOutput = await nexus_client.execute_operation( + MyService.my_sync_operation, + MyInput(), + id="execute-with-callback", + completion_callbacks=[ + temporalio.nexus.create_completion_callback( + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + temporalio.nexus.create_completion_callback( + operation=RawValueNotificationHandler.on_raw_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + MyService.my_temporal_operation, + 0, + id="execute-with-wrong-callback", + completion_callbacks=[ # type: ignore[arg-type] + # assert-type-error-pyright: '"list\[CompletionCallback\[MyOutput\]\]" cannot be assigned to parameter "completion_callbacks"' + temporalio.nexus.create_completion_callback( # type: ignore + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + + # with a string operation name, callbacks must accept result_type + _str_callback_handle: NexusOperationHandle[ + MyOutput + ] = await nexus_client.start_operation( + "my_sync_operation", + MyInput(), + id="str-op-with-callbacks", + result_type=MyOutput, + completion_callbacks=[ + temporalio.nexus.create_completion_callback( + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + temporalio.nexus.create_completion_callback( + operation=RawValueNotificationHandler.on_raw_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + _str_callback_output: MyOutput = await nexus_client.execute_operation( + "my_sync_operation", + MyInput(), + id="str-execute-with-callbacks", + result_type=MyOutput, + completion_callbacks=[ + temporalio.nexus.create_completion_callback( + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + temporalio.nexus.create_completion_callback( + operation=RawValueNotificationHandler.on_raw_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + # without result_type, any callback is accepted + await nexus_client.start_operation( + "my_sync_operation", + MyInput(), + id="str-op-without-result-type", + completion_callbacks=[ + temporalio.nexus.create_completion_callback( + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + # assert-type-error-pyright: 'No overloads for "start_operation" match' + await nexus_client.start_operation( # type: ignore + "my_sync_operation", + MyInput(), + id="str-op-with-wrong-callback", + result_type=str, + completion_callbacks=[ # type: ignore[arg-type] + # assert-type-error-pyright: '"list\[CompletionCallback\[MyOutput\]\]" cannot be assigned to parameter "completion_callbacks"' + temporalio.nexus.create_completion_callback( # type: ignore + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await nexus_client.execute_operation( # type: ignore + "my_sync_operation", + MyInput(), + id="str-execute-with-wrong-callback", + result_type=str, + completion_callbacks=[ # type: ignore[arg-type] + # assert-type-error-pyright: '"list\[CompletionCallback\[MyOutput\]\]" cannot be assigned to parameter "completion_callbacks"' + temporalio.nexus.create_completion_callback( # type: ignore + operation=NotificationHandler.on_complete, + task_queue="notifications", + source_context=NotificationSourceContext(value="ok"), + ), + ], + ) + + # result_type is not allowed when an operation is provided + await nexus_client.start_operation( + # assert-type-error-pyright: 'cannot be assigned to parameter "operation" of type "str"' + MyServiceHandler.my_sync_operation, # type: ignore + MyInput(), + id="op-1", + result_type=str, + ) + + # starting with string operation name and result_type infers output type on the handle + # and result from the handle + _str_op_result_type_handle: NexusOperationHandle[ + MyOutput + ] = await nexus_client.start_operation( + "my_sync_operation", MyInput(), id="op-1", result_type=MyOutput + ) + _str_op_result_type_handle_output: MyOutput = ( + await _str_op_result_type_handle.result() + ) + + # starting with workflow run handler infers output type on the handle + # and result from the handle + _workflow_run_handle: NexusOperationHandle[ + MyOutput + ] = await handler_nexus_client.start_operation( + MyServiceHandler.my_workflow_run_operation, + MyInput(), + id="op-1", + ) + + # starting with temporal operation handler infers output type on the handle + # and result from the handle + _workflow_run_handle_output: MyOutput = await _workflow_run_handle.result() + _temporal_handle: NexusOperationHandle[ + None + ] = await handler_nexus_client.start_operation( + MyServiceHandler.my_temporal_operation, + 0, + id="op-1", + ) + _temporal_handle_output: None = await _temporal_handle.result() # type: ignore[func-returns-value] + + # workflow run and temporal operation handlers reject wrong input types + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await handler_nexus_client.execute_operation( # type: ignore + MyServiceHandler.my_workflow_run_operation, # type: ignore[arg-type] + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "arg"' + "wrong-input-type", # type: ignore + id="op-1", + ) + # assert-type-error-pyright: 'No overloads for "start_operation" match' + await handler_nexus_client.start_operation( # type: ignore + MyServiceHandler.my_workflow_run_operation, # type: ignore[arg-type] + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "arg"' + "wrong-input-type", # type: ignore + id="op-1", + ) + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + await handler_nexus_client.execute_operation( # type: ignore + MyServiceHandler.my_temporal_operation, # type: ignore[arg-type] + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "arg"' + "wrong-input-type", # type: ignore + id="op-1", + ) + # assert-type-error-pyright: 'No overloads for "start_operation" match' + await handler_nexus_client.start_operation( # type: ignore + MyServiceHandler.my_temporal_operation, # type: ignore[arg-type] + # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "arg"' + "wrong-input-type", # type: ignore + id="op-1", + ) + + # getting a handle with a string produces a handle to Any + _str_op_handle: NexusOperationHandle[Any] = client.get_nexus_operation_handle( + "op-1" + ) + + # getting a handle with an explicit type produces handle of that type + _result_type_get_handle: NexusOperationHandle[MyOutput] = ( + client.get_nexus_operation_handle("op-1", result_type=MyOutput) + ) + + # getting a handle with an operation definition produces a handle of the operation + # output type + _op_defn_get_handle: NexusOperationHandle[MyOutput] = ( + client.get_nexus_operation_handle("op-1", operation=MyService.my_sync_operation) + ) + + # providing both operation and result_type to get_nexus_operation_handle + # produces a no overload found error + # assert-type-error-pyright: 'No overloads for "get_nexus_operation_handle" match' + _result_type_op_defn_get_handle: NexusOperationHandle[MyOutput] = ( + client.get_nexus_operation_handle( # type: ignore + "op-1", + operation=MyService.my_sync_operation, + result_type=str, + ) + ) + + # mismatched types on get_nexus_operation_handle produce a type error + # assert-type-error-pyright: 'Type "NexusOperationHandle\[str\]" is not assignable to declared type "NexusOperationHandle\[MyOutput\]"' + _mismatch_handle: NexusOperationHandle[MyOutput] = ( + client.get_nexus_operation_handle( # type: ignore + "op-1", + result_type=str, # type: ignore + ) + ) + + # functions with invalid signatures produce a type error + class InvalidServiceHandler: + async def invalid(self, _ctx: str, _input: str) -> str: + raise NotImplementedError() + + # assert-type-error-pyright: 'No overloads for "start_operation" match' + _invalid_handle: NexusOperationHandle[str] = await nexus_client.start_operation( + InvalidServiceHandler.invalid, # type: ignore + "foo", + id="invalid", + ) + + # assert-type-error-pyright: 'No overloads for "execute_operation" match' + _invalid_result: str = await nexus_client.execute_operation( + InvalidServiceHandler.invalid, # type: ignore + "foo", + id="invalid", + ) diff --git a/tests/nexus/test_nexus_worker_shutdown.py b/tests/nexus/test_nexus_worker_shutdown.py new file mode 100644 index 0000000000..cabf4857a3 --- /dev/null +++ b/tests/nexus/test_nexus_worker_shutdown.py @@ -0,0 +1,551 @@ +"""Tests for Nexus worker shutdown support.""" + +import asyncio +import concurrent.futures +import threading +import uuid +from collections.abc import Sequence +from dataclasses import dataclass +from datetime import timedelta +from typing import Literal + +import nexusrpc +import pytest +from nexusrpc.handler import ( + CancelOperationContext, + OperationHandler, + StartOperationContext, + StartOperationResultAsync, + operation_handler, + service_handler, + sync_operation, +) + +from temporalio import nexus, workflow +from temporalio.api.common.v1 import Payload +from temporalio.client import Client +from temporalio.converter import DataConverter, PayloadCodec +from temporalio.exceptions import ApplicationError +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from tests.helpers.nexus import ( + make_nexus_endpoint_name, +) + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server + + +@nexusrpc.service +class ShutdownTestService: + wait_for_shutdown: nexusrpc.Operation[None, str] + hang_until_cancelled: nexusrpc.Operation[None, str] + wait_for_shutdown_sync: nexusrpc.Operation[None, str] + check_shutdown: nexusrpc.Operation[None, str] + fail_with_details: nexusrpc.Operation[None, str] + fail_cancel_with_details: nexusrpc.Operation[None, str] + fail_with_unserializable_details: nexusrpc.Operation[None, str] + + +class FailCancelWithDetailsHandler(OperationHandler[None, str]): + async def start( + self, ctx: StartOperationContext, input: None + ) -> StartOperationResultAsync: + return StartOperationResultAsync(token="token") + + async def cancel(self, ctx: CancelOperationContext, token: str) -> None: + raise ApplicationError("Cancel failed", "some details") + + +@service_handler(service=ShutdownTestService) +class ShutdownTestServiceHandler: + def __init__( + self, + operation_started: asyncio.Event | None = None, + sync_operation_started: threading.Event | None = None, + ) -> None: + self.operation_started = operation_started + self.sync_operation_started = sync_operation_started + self.shutdown_check_before: bool | None = None + self.shutdown_check_after: bool | None = None + + @sync_operation + async def wait_for_shutdown(self, _ctx: StartOperationContext, _input: None) -> str: + assert self.operation_started + self.operation_started.set() + await nexus.wait_for_worker_shutdown() + return "Worker graceful shutdown" + + @sync_operation + async def hang_until_cancelled( + self, _ctx: StartOperationContext, _input: None + ) -> str: + assert self.operation_started + self.operation_started.set() + try: + while True: + await asyncio.sleep(0.1) + except asyncio.CancelledError: + return "Properly cancelled" + + @sync_operation + def wait_for_shutdown_sync(self, _ctx: StartOperationContext, _input: None) -> str: + assert self.sync_operation_started + self.sync_operation_started.set() + nexus.wait_for_worker_shutdown_sync(30) + return "Worker graceful shutdown sync" + + @sync_operation + async def check_shutdown(self, _ctx: StartOperationContext, _input: None) -> str: + assert self.operation_started + self.shutdown_check_before = nexus.is_worker_shutdown() + self.operation_started.set() + await nexus.wait_for_worker_shutdown() + self.shutdown_check_after = nexus.is_worker_shutdown() + return "done" + + @sync_operation + async def fail_with_details(self, _ctx: StartOperationContext, _input: None) -> str: + # The details give the failure a payload for the codec to encode + raise ApplicationError("Operation failed", "some details") + + @operation_handler + def fail_cancel_with_details(self) -> OperationHandler[None, str]: + return FailCancelWithDetailsHandler() + + @sync_operation + async def fail_with_unserializable_details( + self, _ctx: StartOperationContext, _input: None + ) -> str: + assert self.operation_started + self.operation_started.set() + # The failure converter can't turn these details into a payload + raise ApplicationError("Operation failed", object()) + + +@dataclass +class ShutdownTestCallerInput: + operation: Literal[ + "wait_for_shutdown", + "hang_until_cancelled", + "wait_for_shutdown_sync", + "check_shutdown", + "fail_with_details", + "fail_cancel_with_details", + "fail_with_unserializable_details", + ] + task_queue: str + + +@workflow.defn +class ShutdownTestCallerWorkflow: + @workflow.run + async def run(self, input: ShutdownTestCallerInput) -> str: + nexus_client = workflow.create_nexus_client( + service=ShutdownTestService, + endpoint=make_nexus_endpoint_name(input.task_queue), + ) + match input.operation: + case "wait_for_shutdown": + return await nexus_client.execute_operation( + ShutdownTestService.wait_for_shutdown, None + ) + case "hang_until_cancelled": + return await nexus_client.execute_operation( + ShutdownTestService.hang_until_cancelled, None + ) + case "wait_for_shutdown_sync": + return await nexus_client.execute_operation( + ShutdownTestService.wait_for_shutdown_sync, None + ) + case "check_shutdown": + return await nexus_client.execute_operation( + ShutdownTestService.check_shutdown, None + ) + case "fail_with_details": + return await nexus_client.execute_operation( + ShutdownTestService.fail_with_details, None + ) + case "fail_cancel_with_details": + handle = await nexus_client.start_operation( + ShutdownTestService.fail_cancel_with_details, None + ) + handle.cancel() + return await handle + case "fail_with_unserializable_details": + return await nexus_client.execute_operation( + ShutdownTestService.fail_with_unserializable_details, None + ) + + +async def test_nexus_worker_shutdown(env: WorkflowEnvironment): + """Test that Nexus operations are cancelled when worker shuts down without graceful timeout.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + # Use separate task queues for caller and handler workers + handler_task_queue = str(uuid.uuid4()) + caller_task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(handler_task_queue), handler_task_queue + ) + + operation_started = asyncio.Event() + + with concurrent.futures.ThreadPoolExecutor() as executor: + async with Worker( + env.client, + task_queue=caller_task_queue, + workflows=[ShutdownTestCallerWorkflow], + ): + # Handler worker (will be shut down without graceful timeout) + handler_worker = Worker( + env.client, + task_queue=handler_task_queue, + nexus_service_handlers=[ShutdownTestServiceHandler(operation_started)], + nexus_task_executor=executor, + # No graceful shutdown timeout - operations should be cancelled immediately + ) + + handler_worker_task = asyncio.create_task(handler_worker.run()) + + # Start the operation that will hang via workflow + handle = await env.client.start_workflow( + ShutdownTestCallerWorkflow.run, + ShutdownTestCallerInput( + operation="hang_until_cancelled", + task_queue=handler_task_queue, + ), + id=str(uuid.uuid4()), + task_queue=caller_task_queue, + ) + + # Wait for operation to start + await operation_started.wait() + + # Shutdown the handler worker - this should cancel the operation + await handler_worker.shutdown() + + # The handler worker task should complete + await handler_worker_task + + result = await handle.result() + assert result == "Properly cancelled" + + +async def test_nexus_worker_shutdown_graceful(env: WorkflowEnvironment): + """Test that async Nexus operations complete gracefully during shutdown.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + # Use separate task queues for caller and handler workers + handler_task_queue = str(uuid.uuid4()) + caller_task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(handler_task_queue), handler_task_queue + ) + + operation_started = asyncio.Event() + + with concurrent.futures.ThreadPoolExecutor() as executor: + async with Worker( + env.client, + task_queue=caller_task_queue, + workflows=[ShutdownTestCallerWorkflow], + ): + # Handler worker (will be shut down) + handler_worker = Worker( + env.client, + task_queue=handler_task_queue, + nexus_service_handlers=[ShutdownTestServiceHandler(operation_started)], + nexus_task_executor=executor, + graceful_shutdown_timeout=timedelta(seconds=5), + ) + + handler_worker_task = asyncio.create_task(handler_worker.run()) + + # Start the operation that waits for shutdown via workflow + handle = await env.client.start_workflow( + ShutdownTestCallerWorkflow.run, + ShutdownTestCallerInput( + operation="wait_for_shutdown", + task_queue=handler_task_queue, + ), + id=str(uuid.uuid4()), + task_queue=caller_task_queue, + ) + + # Wait for operation to start + await operation_started.wait() + + # Shutdown the handler worker - this should signal the shutdown event + await handler_worker.shutdown() + + # The handler worker task should complete + await handler_worker_task + + # The operation should have completed successfully + result = await handle.result() + assert result == "Worker graceful shutdown" + + +async def test_sync_nexus_operation_worker_shutdown_graceful(env: WorkflowEnvironment): + """Test that sync (ThreadPoolExecutor) Nexus operations complete gracefully during shutdown.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + # Use separate task queues for caller and handler workers + handler_task_queue = str(uuid.uuid4()) + caller_task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(handler_task_queue), handler_task_queue + ) + + sync_operation_started = threading.Event() + + with concurrent.futures.ThreadPoolExecutor() as executor: + async with Worker( + env.client, + task_queue=caller_task_queue, + workflows=[ShutdownTestCallerWorkflow], + ): + # Handler worker (will be shut down) + handler_worker = Worker( + env.client, + task_queue=handler_task_queue, + nexus_service_handlers=[ + ShutdownTestServiceHandler( + sync_operation_started=sync_operation_started + ) + ], + nexus_task_executor=executor, + graceful_shutdown_timeout=timedelta(seconds=5), + ) + + handler_worker_task = asyncio.create_task(handler_worker.run()) + + # Start the operation that waits for shutdown synchronously via workflow + handle = await env.client.start_workflow( + ShutdownTestCallerWorkflow.run, + ShutdownTestCallerInput( + operation="wait_for_shutdown_sync", + task_queue=handler_task_queue, + ), + id=str(uuid.uuid4()), + task_queue=caller_task_queue, + ) + + # Wait for operation to start + await asyncio.to_thread(sync_operation_started.wait) + + # Shutdown the handler worker - this should signal the shutdown event + await handler_worker.shutdown() + + # The handler worker task should complete + await handler_worker_task + + # The operation should have completed successfully + result = await handle.result() + assert result == "Worker graceful shutdown sync" + + +async def test_is_worker_shutdown(env: WorkflowEnvironment): + """Test that is_worker_shutdown returns correct values.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + # Use separate task queues for caller and handler workers + handler_task_queue = str(uuid.uuid4()) + caller_task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(handler_task_queue), handler_task_queue + ) + + operation_started = asyncio.Event() + handler = ShutdownTestServiceHandler(operation_started) + + with concurrent.futures.ThreadPoolExecutor() as executor: + async with Worker( + env.client, + task_queue=caller_task_queue, + workflows=[ShutdownTestCallerWorkflow], + ): + # Handler worker (will be shut down) + handler_worker = Worker( + env.client, + task_queue=handler_task_queue, + nexus_service_handlers=[handler], + nexus_task_executor=executor, + graceful_shutdown_timeout=timedelta(seconds=5), + ) + + handler_worker_task = asyncio.create_task(handler_worker.run()) + + # Start the operation via workflow + handle = await env.client.start_workflow( + ShutdownTestCallerWorkflow.run, + ShutdownTestCallerInput( + operation="check_shutdown", + task_queue=handler_task_queue, + ), + id=str(uuid.uuid4()), + task_queue=caller_task_queue, + ) + + # Wait for operation to start + await operation_started.wait() + + # Shutdown the handler worker + await handler_worker.shutdown() + + await handler_worker_task + result = await handle.result() + + assert handler.shutdown_check_before is False + assert handler.shutdown_check_after is True + assert result == "done" + + +class SlowEncodePayloadCodec(PayloadCodec): + def __init__(self) -> None: + self.encode_started = asyncio.Event() + + async def encode(self, payloads: Sequence[Payload]) -> list[Payload]: + self.encode_started.set() + # Block until the worker shutdown cancels the task mid-encode + await asyncio.Future() + return list(payloads) + + async def decode(self, payloads: Sequence[Payload]) -> list[Payload]: + return list(payloads) + + +@pytest.mark.parametrize("operation", ["fail_with_details", "fail_cancel_with_details"]) +async def test_nexus_worker_shutdown_while_encoding_failure( + env: WorkflowEnvironment, + operation: Literal["fail_with_details", "fail_cancel_with_details"], +): + """Test that shutdown doesn't hang when it cancels a task mid-encode.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + handler_task_queue = str(uuid.uuid4()) + caller_task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(handler_task_queue), handler_task_queue + ) + + codec = SlowEncodePayloadCodec() + handler_client_config = env.client.config() + handler_client_config["data_converter"] = DataConverter(payload_codec=codec) + + with concurrent.futures.ThreadPoolExecutor() as executor: + async with Worker( + env.client, + task_queue=caller_task_queue, + workflows=[ShutdownTestCallerWorkflow], + ): + handler_worker = Worker( + Client(**handler_client_config), + task_queue=handler_task_queue, + nexus_service_handlers=[ShutdownTestServiceHandler()], + nexus_task_executor=executor, + ) + + handler_worker_task = asyncio.create_task(handler_worker.run()) + + await env.client.start_workflow( + ShutdownTestCallerWorkflow.run, + ShutdownTestCallerInput( + operation=operation, + task_queue=handler_task_queue, + ), + id=str(uuid.uuid4()), + task_queue=caller_task_queue, + ) + + await codec.encode_started.wait() + + await asyncio.wait_for(handler_worker.shutdown(), 10) + await handler_worker_task + + +class FailingEncodePayloadCodec(PayloadCodec): + def __init__(self) -> None: + self.encode_called = asyncio.Event() + + async def encode(self, payloads: Sequence[Payload]) -> list[Payload]: + self.encode_called.set() + raise RuntimeError("Codec failed") + + async def decode(self, payloads: Sequence[Payload]) -> list[Payload]: + return list(payloads) + + +@pytest.mark.parametrize( + "operation", + [ + "fail_with_details", + "fail_cancel_with_details", + "fail_with_unserializable_details", + ], +) +async def test_nexus_worker_shutdown_after_failure_build_error( + env: WorkflowEnvironment, + operation: Literal[ + "fail_with_details", + "fail_cancel_with_details", + "fail_with_unserializable_details", + ], +): + """Test that shutdown doesn't hang when a handler failure can't be converted or encoded.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + handler_task_queue = str(uuid.uuid4()) + caller_task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(handler_task_queue), handler_task_queue + ) + + # The unserializable details fail in the failure converter, the others in + # the codec + codec = FailingEncodePayloadCodec() + handler_client_config = env.client.config() + if operation != "fail_with_unserializable_details": + handler_client_config["data_converter"] = DataConverter(payload_codec=codec) + operation_started = asyncio.Event() + + with concurrent.futures.ThreadPoolExecutor() as executor: + async with Worker( + env.client, + task_queue=caller_task_queue, + workflows=[ShutdownTestCallerWorkflow], + ): + handler_worker = Worker( + Client(**handler_client_config), + task_queue=handler_task_queue, + nexus_service_handlers=[ShutdownTestServiceHandler(operation_started)], + nexus_task_executor=executor, + ) + + handler_worker_task = asyncio.create_task(handler_worker.run()) + + await env.client.start_workflow( + ShutdownTestCallerWorkflow.run, + ShutdownTestCallerInput( + operation=operation, + task_queue=handler_task_queue, + ), + id=str(uuid.uuid4()), + task_queue=caller_task_queue, + ) + + if operation == "fail_with_unserializable_details": + await operation_started.wait() + else: + await codec.encode_called.wait() + + await asyncio.wait_for(handler_worker.shutdown(), 10) + await handler_worker_task diff --git a/tests/nexus/test_notifications.py b/tests/nexus/test_notifications.py new file mode 100644 index 0000000000..6f1f5cea23 --- /dev/null +++ b/tests/nexus/test_notifications.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +import dataclasses + +import pytest + +import temporalio.converter +import temporalio.exceptions +import temporalio.nexus.notifications as notifications +import temporalio.nexus.notifications.models as models +import temporalio.nexus.system as nexus_system + + +@dataclasses.dataclass +class NotificationValue: + message: str + + +@pytest.mark.parametrize("success", [True, False]) +def test_notification_request_roundtrip(success: bool) -> None: + data_converter = temporalio.converter.default() + converter = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ) + result: models.OnCompleteRequestResult[NotificationValue] = ( + models.OnCompleteRequestResultSuccess(NotificationValue("result")) + if success + else models.OnCompleteRequestResultFailure(ValueError("failure")) + ) + request = notifications.OnCompleteRequest( + result=result, source_context=NotificationValue("context") + ) + payload = converter.to_payload(request) + decoded = converter.from_payload( + payload, + notifications.OnCompleteRequest[NotificationValue, NotificationValue], + ) + assert decoded.source_context == request.source_context + assert isinstance(decoded.source_context, NotificationValue) + if success: + assert isinstance(decoded.result, models.OnCompleteRequestResultSuccess) + assert decoded.result.value == NotificationValue("result") + assert isinstance(decoded.result.value, NotificationValue) + else: + assert isinstance(decoded.result, models.OnCompleteRequestResultFailure) + assert isinstance(decoded.result.value, temporalio.exceptions.ApplicationError) + assert decoded.result.value.message == "failure" + assert decoded.result.value.type == "ValueError" + + +def test_notification_response_roundtrip() -> None: + data_converter = temporalio.converter.default() + converter = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ) + response = notifications.OnCompleteResponse() + assert ( + converter.from_payload( + converter.to_payload(response), notifications.OnCompleteResponse + ) + == response + ) diff --git a/tests/nexus/test_operation_token.py b/tests/nexus/test_operation_token.py new file mode 100644 index 0000000000..58d4a78596 --- /dev/null +++ b/tests/nexus/test_operation_token.py @@ -0,0 +1,279 @@ +import base64 +import json +from typing import Any + +import pytest + +from temporalio.nexus._token import ( + OperationToken, + OperationTokenType, + WorkflowHandle, + _base64url_decode_no_padding, +) + + +def _encode_json_token(value: Any) -> str: + return _encode_bytes(json.dumps(value, separators=(",", ":")).encode("utf-8")) + + +def _encode_bytes(value: bytes) -> str: + return base64.urlsafe_b64encode(value).decode("utf-8").rstrip("=") + + +def test_operation_token_encode_decode_round_trip(): + token = OperationToken( + type=OperationTokenType.WORKFLOW, + namespace="default", + workflow_id="workflow-id", + version=0, + ).encode() + + assert "=" not in token + assert OperationToken.decode(token) == OperationToken( + type=OperationTokenType.WORKFLOW, + namespace="default", + workflow_id="workflow-id", + version=0, + ) + + +def test_operation_token_activity_encode_decode_round_trip(): + token = OperationToken( + type=OperationTokenType.ACTIVITY, + namespace="default", + activity_id="activity-id", + run_id="run-id", + version=0, + ).encode() + + assert "=" not in token + assert OperationToken.decode(token) == OperationToken( + type=OperationTokenType.ACTIVITY, + namespace="default", + activity_id="activity-id", + run_id="run-id", + version=0, + ) + + +def test_operation_token_activity_encode_uses_activity_id_and_omits_workflow_id(): + token = OperationToken( + type=OperationTokenType.ACTIVITY, + namespace="default", + activity_id="activity-id", + ).encode() + + assert json.loads(_base64url_decode_no_padding(token)) == { + "t": 2, + "ns": "default", + "aid": "activity-id", + } + + +def test_workflow_handle_to_from_token_round_trip(): + handle = WorkflowHandle[str](namespace="default", workflow_id="workflow-id") + + assert WorkflowHandle[str].from_token(handle.to_token()) == handle + + +@pytest.mark.parametrize( + ("token", "expected"), + [ + ( + _encode_json_token({"t": 1, "ns": "default", "wid": "workflow-id"}), + OperationToken( + type=OperationTokenType.WORKFLOW, + namespace="default", + workflow_id="workflow-id", + ), + ), + ( + _encode_json_token({"t": 1, "ns": "", "wid": "workflow-id"}), + OperationToken( + type=OperationTokenType.WORKFLOW, + namespace="", + workflow_id="workflow-id", + ), + ), + ( + _encode_json_token( + {"t": 1, "ns": "default", "wid": "workflow-id", "v": None} + ), + OperationToken( + type=OperationTokenType.WORKFLOW, + namespace="default", + workflow_id="workflow-id", + ), + ), + ( + _encode_json_token({"t": 1, "ns": "default", "wid": "workflow-id", "v": 0}), + OperationToken( + type=OperationTokenType.WORKFLOW, + namespace="default", + workflow_id="workflow-id", + version=0, + ), + ), + # Activity tokens + ( + _encode_json_token( + {"t": 2, "ns": "default", "aid": "activity-id", "rid": "run-id"} + ), + OperationToken( + type=OperationTokenType.ACTIVITY, + namespace="default", + activity_id="activity-id", + run_id="run-id", + ), + ), + ( + _encode_json_token( + {"t": 2, "ns": "", "aid": "activity-id", "rid": "run-id"} + ), + OperationToken( + type=OperationTokenType.ACTIVITY, + namespace="", + activity_id="activity-id", + run_id="run-id", + ), + ), + ( + _encode_json_token( + { + "t": 2, + "ns": "default", + "aid": "activity-id", + "rid": "run-id", + "v": None, + } + ), + OperationToken( + type=OperationTokenType.ACTIVITY, + namespace="default", + activity_id="activity-id", + run_id="run-id", + ), + ), + ( + _encode_json_token( + {"t": 2, "ns": "default", "aid": "activity-id", "rid": "run-id", "v": 0} + ), + OperationToken( + type=OperationTokenType.ACTIVITY, + namespace="default", + activity_id="activity-id", + run_id="run-id", + version=0, + ), + ), + ], +) +def test_operation_token_decode_accepts_valid_tokens( + token: str, + expected: OperationToken, +): + assert OperationToken.decode(token) == expected + + +@pytest.mark.parametrize( + ("token", "message"), + [ + ("", "invalid token: token is empty"), + ("not+a-base64url-token", "failed to decode token as base64url"), + (_encode_bytes(b"not json"), "failed to unmarshal operation token"), + (_encode_json_token(["not", "a", "dict"]), "expected dict"), + ( + _encode_json_token({"ns": "default", "wid": "workflow-id"}), + "expected token type to be an int", + ), + ( + _encode_json_token({"t": "1", "ns": "default", "wid": "workflow-id"}), + "expected token type to be an int", + ), + ( + _encode_json_token({"t": 999, "ns": "default", "wid": "workflow-id"}), + "unknown token type", + ), + ( + _encode_json_token({"t": 1, "ns": "default"}), + "expected non-empty workflow id for token type `WORKFLOW`", + ), + ( + _encode_json_token({"t": 1, "ns": "default", "wid": 123}), + "expected workflow id to be a string", + ), + ( + _encode_json_token({"t": 1, "ns": "default", "wid": ""}), + "expected non-empty workflow id", + ), + ( + _encode_json_token({"t": 1, "wid": "workflow-id"}), + "expected namespace to be a string", + ), + ( + _encode_json_token({"t": 1, "ns": 123, "wid": "workflow-id"}), + "expected namespace to be a string", + ), + ( + _encode_json_token( + {"t": 1, "ns": "default", "wid": "workflow-id", "v": "0"} + ), + "expected version to be an int or null", + ), + # Activity tokens + ( + _encode_json_token({"t": 2, "ns": "default"}), + "expected non-empty activity id for token type `ACTIVITY`", + ), + ( + _encode_json_token({"t": 2, "ns": "default", "aid": ""}), + "expected non-empty activity id for token type `ACTIVITY`", + ), + ( + _encode_json_token({"t": 2, "ns": "default", "aid": 123}), + "expected activity id to be a string", + ), + ( + _encode_json_token( + {"t": 2, "ns": "default", "aid": "activity-id", "rid": 123} + ), + "expected run_id to be a string", + ), + ( + _encode_json_token({"t": 2, "aid": "activity-id", "rid": "run-id"}), + "expected namespace to be a string", + ), + ( + _encode_json_token( + { + "t": 2, + "ns": "default", + "aid": "activity-id", + "rid": "run-id", + "v": "0", + } + ), + "expected version to be an int or null", + ), + ], +) +def test_operation_token_decode_rejects_invalid_tokens(token: str, message: str): + with pytest.raises(TypeError, match=message): + OperationToken.decode(token) + + +def test_workflow_handle_from_token_accepts_version_zero(): + token = _encode_json_token({"t": 1, "ns": "default", "wid": "workflow-id", "v": 0}) + + assert WorkflowHandle[str].from_token(token) == WorkflowHandle[str]( + namespace="default", + workflow_id="workflow-id", + version=0, + ) + + +def test_workflow_handle_from_token_rejects_unsupported_version(): + token = _encode_json_token({"t": 1, "ns": "default", "wid": "workflow-id", "v": 1}) + + with pytest.raises(TypeError, match="'v' field, if present, must be 0"): + WorkflowHandle[str].from_token(token) diff --git a/tests/nexus/test_signal_link_propagation_e2e.py b/tests/nexus/test_signal_link_propagation_e2e.py new file mode 100644 index 0000000000..9feb436e7e --- /dev/null +++ b/tests/nexus/test_signal_link_propagation_e2e.py @@ -0,0 +1,560 @@ +"""End-to-end (server-based) tests for Nexus signal-backlink propagation. + +These exercise, against a real server, the bidirectional +link propagation that occurs when a Nexus operation handler signals (or signal-with-starts) a +workflow: + +- Forward: the caller's ``NexusOperationScheduled`` event is referenced by the callee's + ``WorkflowExecutionSignaled`` event (attached to the signal RPC the handler issues). +- Backward: a backlink pointing at the callee's ``WorkflowExecutionSignaled`` event lands on + the caller's ``NexusOperationCompleted`` event (sync handler) or ``NexusOperationStarted`` + event (async handler). + +The backward direction is produced server-side (temporalio/temporal#9897) and is gated by +``history.enableCHASMSignalBacklinks=true`` (added to the local dev-server args in +``tests/conftest.py``). The server populates the backlink's reference via ``RequestIdReference`` +rather than ``EventReference``, so backlink assertions tolerate both oneof variants of +``common.v1.Link.WorkflowEvent.reference`` (see ``workflow_event_link_event_type``). When run +against a server that does not emit the backlink, the backward assertions are skipped. + +The forward/backward description above applies to operations scheduled by a caller workflow. The +file also covers the same handlers invoked as standalone (client-initiated) operations via +``client.create_nexus_client``; that case has no caller workflow, so the forward link is a +``NexusOperation`` link to the operation execution itself and only the forward direction is +asserted (see the standalone tests near the end of the file for details). +""" + +from __future__ import annotations + +import uuid +from dataclasses import dataclass +from datetime import timedelta + +import pytest +from nexusrpc import Operation, service +from nexusrpc.handler import ( + OperationHandler, + StartOperationContext, + StartOperationResultAsync, + service_handler, + sync_operation, +) +from nexusrpc.handler._decorators import operation_handler + +import temporalio.api.enums.v1 +import temporalio.api.history.v1 +import temporalio.common +from temporalio import nexus, workflow +from temporalio.client import Client, WorkflowHistory +from temporalio.service import RPCError, RPCStatusCode +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from tests.helpers import assert_eventually +from tests.helpers.nexus import ( + events_of_type, + make_nexus_endpoint_name, + workflow_event_link_event_type, +) + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server + +EventType = temporalio.api.enums.v1.EventType + + +# ── Service definition ────────────────────────────────────────────────────────────────────── + + +@dataclass +class OpInput: + mode: str + callee_id: str + + +@service +class SignalingService: + op: Operation[OpInput, str] + + +# ── Callee workflow ─────────────────────────────────────────────────────────────────────── + + +@workflow.defn +class CalleeWorkflow: + def __init__(self) -> None: + self._received: list[str] = [] + self._expected = 1 + + @workflow.run + async def run(self, expected_signals: int) -> str: + self._expected = expected_signals + await workflow.wait_condition(lambda: len(self._received) >= self._expected) + return ",".join(self._received) + + @workflow.signal + def ping(self, msg: str) -> None: + self._received.append(msg) + + +# ── Caller workflow ─────────────────────────────────────────────────────────────────────── + + +@workflow.defn +class CallerWorkflow: + @workflow.run + async def run(self, mode: str, callee_id: str, task_queue: str) -> str: + client = workflow.create_nexus_client( + service=SignalingService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + return await client.execute_operation( + SignalingService.op, OpInput(mode=mode, callee_id=callee_id) + ) + + +# ── Nexus service handler ───────────────────────────────────────────────────────────────── + +MODE_SYNC = "sync" +MODE_ASYNC = "async" + + +class _AsyncSignalingOperation(OperationHandler[OpInput, str]): + """Signal-with-starts the callee then returns an async result. + + The backlink stashed on ``ctx.outbound_links`` by the signal-with-start RPC is carried on + the start-operation response, landing on the caller's ``NexusOperationStarted`` event. + """ + + async def start( + self, ctx: StartOperationContext, input: OpInput + ) -> StartOperationResultAsync: + await _signal_with_start(input.callee_id, "async-signal") + return StartOperationResultAsync(token=f"async-op-{uuid.uuid4()}") + + async def cancel(self, ctx, token: str) -> None: # type: ignore[no-untyped-def] + raise NotImplementedError + + +@service_handler(service=SignalingService) +class SignalingServiceHandler: + @sync_operation + async def op(self, _ctx: StartOperationContext, input: OpInput) -> str: + # Synchronous path: signal-with-start the callee (first signal) then plain-signal it + # (second signal). Both backlinks are carried on the sync start-operation response and + # land on the caller's NexusOperationCompleted event. + await _signal_with_start(input.callee_id, "first") + await ( + nexus.client() + .get_workflow_handle(input.callee_id) + .signal(CalleeWorkflow.ping, "second") + ) + return "ok:sync" + + +# A separate service exposing only the async operation, so the caller can address it by name. +@service +class AsyncSignalingService: + op: Operation[OpInput, str] + + +@service_handler(service=AsyncSignalingService) +class AsyncSignalingServiceHandler: + @operation_handler + def op(self) -> OperationHandler[OpInput, str]: + return _AsyncSignalingOperation() + + +# A service whose handler issues a plain start_workflow (no signal, not the nexus-backing +# workflow) against an already-running callee under a USE_EXISTING conflict policy. +@service +class StartConflictService: + op: Operation[OpInput, str] + + +@service_handler(service=StartConflictService) +class StartConflictServiceHandler: + @sync_operation + async def op(self, _ctx: StartOperationContext, input: OpInput) -> str: + # Plain start_workflow from inside a Nexus operation handler, targeting the + # already-running callee with WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING. The build path + # enables on_conflict_options, so the detected conflict attaches this request's request + # id (and links) to the existing run. + await nexus.client().start_workflow( + CalleeWorkflow.run, + 1, + id=input.callee_id, + task_queue=nexus.info().task_queue, + id_conflict_policy=temporalio.common.WorkflowIDConflictPolicy.USE_EXISTING, + ) + return "ok:conflict" + + +async def _signal_with_start(callee_id: str, payload: str) -> None: + # signal-with-start exercises the SignalWithStartWorkflowExecutionResponse.signal_link + # backlink path in temporalio.client._impl. + await nexus.client().start_workflow( + CalleeWorkflow.run, + 2 if payload == "first" else 1, + id=callee_id, + task_queue=nexus.info().task_queue, + start_signal="ping", + start_signal_args=[payload], + ) + + +@workflow.defn +class AsyncSignalCallerWorkflow: + @workflow.run + async def run(self, callee_id: str, task_queue: str) -> str: + client = workflow.create_nexus_client( + service=AsyncSignalingService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + handle = await client.start_operation( + AsyncSignalingService.op, OpInput(mode=MODE_ASYNC, callee_id=callee_id) + ) + # Do not await the result: the async op never completes (no completion is delivered). + # Returning the token confirms the operation reached the Started state, whose history + # event carries the backlink. + return handle.operation_token or "async-started" + + +# ── Assertion helpers ─────────────────────────────────────────────────────────────────────── + + +def _assert_forward_link( + callee_history: WorkflowHistory, + caller_id: str, + expected_count: int, +) -> None: + signaled = events_of_type( + callee_history, EventType.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + ) + assert len(signaled) == expected_count, ( + f"expected {expected_count} WorkflowExecutionSignaled events, got {len(signaled)}" + ) + for event in signaled: + assert len(event.links) >= 1, ( + "expected at least one link on each WorkflowExecutionSignaled event" + ) + we = event.links[0].workflow_event + assert we.workflow_id == caller_id, ( + "forward link should reference the caller workflow" + ) + assert we.event_ref.event_type == EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED + + +def _assert_backlink( + event: temporalio.api.history.v1.HistoryEvent, callee_id: str +) -> bool: + """Assert the event carries a signal-event backlink to the callee. + + Returns False (and asserts nothing) if no backlink is present, so the test soft-passes + against a server that does not emit backlinks. + """ + if len(event.links) < 1: + return False + we = event.links[0].workflow_event + assert we.workflow_id == callee_id, "backlink should reference the callee workflow" + assert ( + workflow_event_link_event_type(we) + == EventType.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + ) + return True + + +# ── Tests ───────────────────────────────────────────────────────────────────────────────── + + +async def test_sync_signal_operation_links( + client: Client, + env: WorkflowEnvironment, +) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) + callee_id = f"callee-{uuid.uuid4()}" + caller_id = f"caller-{uuid.uuid4()}" + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[SignalingServiceHandler()], + workflows=[CallerWorkflow, CalleeWorkflow], + ): + caller_handle = await client.start_workflow( + CallerWorkflow.run, + args=[MODE_SYNC, callee_id, task_queue], + id=caller_id, + task_queue=task_queue, + ) + assert await caller_handle.result() == "ok:sync" + + callee_result = await client.get_workflow_handle(callee_id).result() + assert callee_result == "first,second" + + caller_history = await caller_handle.fetch_history() + callee_history = await client.get_workflow_handle(callee_id).fetch_history() + + # Forward: both signal events on the callee reference the caller's scheduled event. + _assert_forward_link(callee_history, caller_id, expected_count=2) + + # Backward: the single NexusOperationCompleted carries backlinks to the callee. + completed = events_of_type( + caller_history, EventType.EVENT_TYPE_NEXUS_OPERATION_COMPLETED + ) + assert len(completed) == 1, ( + f"expected exactly one NexusOperationCompleted event, got {len(completed)}" + ) + if not _assert_backlink(completed[0], callee_id): + pytest.skip( + "server did not emit a signal backlink " + "(history.enableCHASMSignalBacklinks not enabled)" + ) + + +async def test_async_signal_operation_links( + client: Client, + env: WorkflowEnvironment, +) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) + callee_id = f"async-callee-{uuid.uuid4()}" + caller_id = f"async-caller-{uuid.uuid4()}" + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[AsyncSignalingServiceHandler()], + workflows=[AsyncSignalCallerWorkflow, CalleeWorkflow], + ): + caller_handle = await client.start_workflow( + AsyncSignalCallerWorkflow.run, + args=[callee_id, task_queue], + id=caller_id, + task_queue=task_queue, + ) + # Caller returns once the async operation reaches Started; result is the op token. + assert await caller_handle.result() + + callee_result = await client.get_workflow_handle(callee_id).result() + assert callee_result == "async-signal" + + caller_history = await caller_handle.fetch_history() + callee_history = await client.get_workflow_handle(callee_id).fetch_history() + + # Forward: the single signal event on the callee references the caller's scheduled event. + _assert_forward_link(callee_history, caller_id, expected_count=1) + + # Backward: the backlink lands on NexusOperationStarted for the async response path. + started = events_of_type( + caller_history, EventType.EVENT_TYPE_NEXUS_OPERATION_STARTED + ) + assert len(started) == 1, ( + f"expected exactly one NexusOperationStarted event, got {len(started)}" + ) + if not _assert_backlink(started[0], callee_id): + pytest.skip( + "server did not emit a signal backlink " + "(history.enableCHASMSignalBacklinks not enabled)" + ) + + +# ── Standalone (client-initiated) operations ───────────────────────────────────────────────── +# +# The tests above drive the operation from a caller workflow. The tests below invoke the same +# handlers directly via ``client.create_nexus_client`` (a standalone Nexus operation, with no +# caller workflow). The forward link still propagates, but as a ``NexusOperation`` link +# referencing the operation execution itself rather than a ``WorkflowEvent`` link to a caller's +# ``NexusOperationScheduled`` event. The backward (response) link lands on the standalone +# operation's own execution, which is a CHASM ``nexusoperation.operation`` archetype and is not +# retrievable via the workflow history API, so only the forward direction is asserted here. + + +def _assert_standalone_forward_link( + callee_history: WorkflowHistory, + operation_id: str, + expected_count: int, +) -> None: + signaled = events_of_type( + callee_history, EventType.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + ) + assert len(signaled) == expected_count, ( + f"expected {expected_count} WorkflowExecutionSignaled events, got {len(signaled)}" + ) + for event in signaled: + assert len(event.links) >= 1, ( + "expected at least one link on each WorkflowExecutionSignaled event" + ) + link = event.links[0] + assert link.HasField("nexus_operation"), ( + "standalone forward link should be a NexusOperation link" + ) + assert link.nexus_operation.operation_id == operation_id, ( + "forward link should reference the standalone Nexus operation" + ) + + +async def test_standalone_sync_signal_operation_links( + client: Client, + env: WorkflowEnvironment, +) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) + callee_id = f"standalone-callee-{uuid.uuid4()}" + operation_id = f"standalone-op-{uuid.uuid4()}" + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[SignalingServiceHandler()], + workflows=[CalleeWorkflow], + ): + nexus_client = client.create_nexus_client( + service=SignalingService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + handle = await nexus_client.start_operation( + SignalingService.op, + OpInput(mode=MODE_SYNC, callee_id=callee_id), + id=operation_id, + schedule_to_close_timeout=timedelta(seconds=20), + ) + assert await handle.result() == "ok:sync" + + callee_result = await client.get_workflow_handle(callee_id).result() + assert callee_result == "first,second" + + callee_history = await client.get_workflow_handle(callee_id).fetch_history() + + # Forward: both signal events on the callee reference the standalone Nexus operation. + _assert_standalone_forward_link(callee_history, operation_id, expected_count=2) + + +async def test_standalone_async_signal_operation_links( + client: Client, + env: WorkflowEnvironment, +) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) + callee_id = f"standalone-async-callee-{uuid.uuid4()}" + operation_id = f"standalone-async-op-{uuid.uuid4()}" + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[AsyncSignalingServiceHandler()], + workflows=[CalleeWorkflow], + ): + nexus_client = client.create_nexus_client( + service=AsyncSignalingService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + # The async operation never completes (no completion is delivered), so we do not await + # its result; the handler signals the callee during start. + await nexus_client.start_operation( + AsyncSignalingService.op, + OpInput(mode=MODE_ASYNC, callee_id=callee_id), + id=operation_id, + schedule_to_close_timeout=timedelta(seconds=20), + ) + + async def _callee_result() -> str: + # The callee is signal-with-started from the handler; tolerate the brief window + # before it exists. + try: + return await client.get_workflow_handle(callee_id).result() + except RPCError as err: + if err.status == RPCStatusCode.NOT_FOUND: + raise AssertionError("callee not created yet") + raise + + assert await assert_eventually(_callee_result) == "async-signal" + + callee_history = await client.get_workflow_handle(callee_id).fetch_history() + + # Forward: the single signal event on the callee references the standalone operation. + _assert_standalone_forward_link(callee_history, operation_id, expected_count=1) + + +# ── on-conflict options for a plain start from a handler ────────────────────────────────────── +# +# When a Nexus operation handler issues a plain start_workflow (no signal, not the nexus-backing +# workflow) against an already-running workflow under a USE_EXISTING conflict policy, the SDK +# enables on_conflict_options so the server attaches this request's request id (and links) to the +# existing run. The attachment surfaces as a WorkflowExecutionOptionsUpdated event on the +# existing workflow's history. Older servers may not emit it, so the assertion soft-skips. + + +async def test_start_from_handler_attaches_on_conflict_options( + client: Client, + env: WorkflowEnvironment, +) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) + callee_id = f"conflict-callee-{uuid.uuid4()}" + operation_id = f"conflict-op-{uuid.uuid4()}" + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StartConflictServiceHandler()], + workflows=[CalleeWorkflow], + ): + # Start the callee first so the handler's start_workflow hits a conflict. + callee_handle = await client.start_workflow( + CalleeWorkflow.run, + 1, + id=callee_id, + task_queue=task_queue, + ) + + nexus_client = client.create_nexus_client( + service=StartConflictService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + handle = await nexus_client.start_operation( + StartConflictService.op, + OpInput(mode=MODE_SYNC, callee_id=callee_id), + id=operation_id, + schedule_to_close_timeout=timedelta(seconds=20), + ) + # USE_EXISTING resolves the conflict to the existing run; the operation succeeds. + assert await handle.result() == "ok:conflict" + + # Release the callee so it terminates cleanly, then read its history. + await callee_handle.signal(CalleeWorkflow.ping, "done") + assert await callee_handle.result() == "done" + callee_history = await callee_handle.fetch_history() + + updated = events_of_type( + callee_history, EventType.EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED + ) + if not updated: + pytest.skip( + "server did not emit a WorkflowExecutionOptionsUpdated event " + "(on_conflict_options not honored by this server version)" + ) + # The conflict resolution attached this start request's request id to the existing run, + # which only happens because on_conflict_options.attach_request_id was set on the request. + assert any( + e.workflow_execution_options_updated_event_attributes.attached_request_id + for e in updated + ), ( + "expected a WorkflowExecutionOptionsUpdated event carrying an attached request id" + ) diff --git a/tests/nexus/test_standalone_operations.py b/tests/nexus/test_standalone_operations.py new file mode 100644 index 0000000000..50f54bb8cf --- /dev/null +++ b/tests/nexus/test_standalone_operations.py @@ -0,0 +1,1088 @@ +"""Integration tests for standalone Nexus operations (client-side). + +Tests the client-side Nexus operation API: start, result, describe, cancel, +terminate, list, count, get_nexus_operation_handle, ID conflict policies, +and interceptor integration. +""" + +from __future__ import annotations + +import asyncio +import uuid +from dataclasses import dataclass +from datetime import timedelta +from typing import Any, Literal + +import nexusrpc +import pytest +from nexusrpc.handler import ( + StartOperationContext, + service_handler, + sync_operation, +) + +import temporalio.api.enums.v1 +from temporalio import nexus, workflow +from temporalio.client import ( + CancelNexusOperationInput, + Client, + CountNexusOperationsInput, + DescribeNexusOperationInput, + GetNexusOperationResultInput, + Interceptor, + ListNexusOperationsInput, + NexusOperationExecutionDescription, + NexusOperationFailureError, + NexusOperationHandle, + OutboundInterceptor, + StartNexusOperationInput, + TerminateNexusOperationInput, + WorkflowHistory, + WorkflowUpdateStage, +) +from temporalio.common import ( + NexusOperationExecutionStatus, + NexusOperationIDConflictPolicy, + NexusOperationIDReusePolicy, + PendingNexusOperationExecutionState, + WorkflowIDConflictPolicy, + WorkflowIDReusePolicy, +) +from temporalio.exceptions import ( + ApplicationError, + CancelledError, + NexusOperationAlreadyStartedError, + TerminatedError, +) +from temporalio.nexus import WorkflowRunOperationContext, workflow_run_operation +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from tests.helpers import assert_eventually +from tests.helpers.nexus import ( + assert_links_match, + expected_nexus_operation_link, + expected_workflow_event_link, + links_from_workflow_execution_started_event, + make_nexus_endpoint_name, +) + +# --------------------------------------------------------------------------- +# Data types +# --------------------------------------------------------------------------- + + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server + + +@dataclass +class EchoInput: + value: str + + +@dataclass +class EchoOutput: + value: str + + +@dataclass +class RaiseErrInput: + err_type: Literal["handler_err", "application_err"] + + +# --------------------------------------------------------------------------- +# Service definition +# --------------------------------------------------------------------------- + + +@nexusrpc.service +class StandaloneTestService: + echo_sync: nexusrpc.Operation[EchoInput, EchoOutput] + echo_async: nexusrpc.Operation[EchoInput, EchoOutput] + blocking_async: nexusrpc.Operation[EchoInput, EchoOutput] + raise_err: nexusrpc.Operation[RaiseErrInput, None] + + +@nexusrpc.service(name="StandaloneTestService") +class NamedService: + echo_sync: nexusrpc.Operation[EchoInput, EchoOutput] + + +# --------------------------------------------------------------------------- +# Handler workflows +# --------------------------------------------------------------------------- + + +@workflow.defn +class EchoHandlerWorkflow: + @workflow.run + async def run(self, input: EchoInput) -> EchoOutput: + return EchoOutput(value=input.value) + + +@workflow.defn +class BlockingHandlerWorkflow: + """A workflow that blocks until it receives a signal or is cancelled/terminated.""" + + def __init__(self) -> None: + self._proceed = False + + @workflow.run + async def run(self, input: EchoInput) -> EchoOutput: + await workflow.wait_condition(lambda: self._proceed) + return EchoOutput(value=input.value) + + @workflow.update + def unblock(self) -> None: + self._proceed = True + + +# --------------------------------------------------------------------------- +# Service handler +# --------------------------------------------------------------------------- + + +@service_handler(service=StandaloneTestService) +class StandaloneTestServiceHandler: + def __init__(self) -> None: + self.started_blocking = asyncio.Event() + + @sync_operation + async def echo_sync( + self, _ctx: StartOperationContext, input: EchoInput + ) -> EchoOutput: + return EchoOutput(value=input.value) + + @workflow_run_operation + async def echo_async( + self, ctx: WorkflowRunOperationContext, input: EchoInput + ) -> nexus.WorkflowHandle[EchoOutput]: + return await ctx.start_workflow( + EchoHandlerWorkflow.run, + input, + id=str(uuid.uuid4()), + ) + + @workflow_run_operation + async def blocking_async( + self, ctx: WorkflowRunOperationContext, input: EchoInput + ) -> nexus.WorkflowHandle[EchoOutput]: + handle = await ctx.start_workflow( + BlockingHandlerWorkflow.run, + input, + id=f"blocking_async-{input.value}", + id_reuse_policy=WorkflowIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy=WorkflowIDConflictPolicy.FAIL, + ) + self.started_blocking.set() + return handle + + @sync_operation + async def raise_err( + self, _ctx: StartOperationContext, input: RaiseErrInput + ) -> None: + match input.err_type: + case "handler_err": + raise nexusrpc.HandlerError( + "test handler error", + type=nexusrpc.HandlerErrorType.INTERNAL, + retryable_override=False, + ) + case "application_err": + raise ApplicationError("test application error", non_retryable=True) + + +# --------------------------------------------------------------------------- +# Tests +# --------------------------------------------------------------------------- + + +async def test_start_sync_operation_and_get_result( + client: Client, env: WorkflowEnvironment +): + """Start a sync nexus operation, call handle.result(), verify return value.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + # Use execute_with_retry to retry the full start+result cycle + # (endpoint propagation may cause the first attempt to time out) + handle = await nexus_client.start_operation( + StandaloneTestService.echo_sync, + EchoInput(value="hello"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=10), + ) + result = await handle.result() + assert isinstance(result, EchoOutput) + assert result.value == "hello" + + # test value is cached + second_result = await handle.result() + assert result is second_result + + +async def test_start_async_operation_and_poll_result( + client: Client, env: WorkflowEnvironment +): + """Start a workflow_run operation, poll result, verify.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + handle = await nexus_client.start_operation( + StandaloneTestService.echo_async, + EchoInput(value="async-hello"), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + ) + result = await handle.result() + assert isinstance(result, EchoOutput) + assert result.value == "async-hello" + + +async def test_started_workflow_has_link_to_standalone_nexus_operation( + client: Client, env: WorkflowEnvironment +): + """Start a workflow_run operation and verify its workflow links back to the Nexus op.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + service_handler = StandaloneTestServiceHandler() + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[service_handler], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + op_id = str(uuid.uuid4()) + input_value = f"link-test-{uuid.uuid4()}" + workflow_id = f"blocking_async-{input_value}" + + handle = await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value=input_value), + id=op_id, + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + await service_handler.started_blocking.wait() + workflow_history = await _assert_workflow_started_with_nexus_operation_link( + client, workflow_id, handle + ) + await assert_eventually( + lambda: _assert_nexus_operation_has_link_to_started_workflow( + client, workflow_history, handle + ) + ) + + workflow_handle = client.get_workflow_handle(workflow_id) + await workflow_handle.start_update( + BlockingHandlerWorkflow.unblock, + wait_for_stage=WorkflowUpdateStage.COMPLETED, + ) + result = await handle.result() + assert isinstance(result, EchoOutput) + assert result.value == input_value + + +async def test_execute_operation(client: Client, env: WorkflowEnvironment): + """Use execute_operation convenience method, verify it returns result directly.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + result = await nexus_client.execute_operation( + StandaloneTestService.echo_sync, + EchoInput(value="execute"), + id=str(uuid.uuid4()), + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=10), + ) + assert isinstance(result, EchoOutput) + assert result.value == "execute" + + +async def test_execute_operation_named_service( + client: Client, env: WorkflowEnvironment +): + """Verify that the name on the service decorator is respected by the standalone nexus client""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + # Register the standalone test service handler + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + # Create client using the service that is uses the name "StandaloneTestService" + nexus_client = client.create_nexus_client( + service=NamedService, endpoint=endpoint_name + ) + result = await nexus_client.execute_operation( + NamedService.echo_sync, + EchoInput(value="execute"), + id=str(uuid.uuid4()), + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=10), + ) + assert isinstance(result, EchoOutput) + assert result.value == "execute" + + +async def test_errors(client: Client, env: WorkflowEnvironment): + """Execute operations that raise errors""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + + handle = await nexus_client.start_operation( + StandaloneTestService.raise_err, + RaiseErrInput("handler_err"), + id=str(uuid.uuid4()), + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + with pytest.raises(NexusOperationFailureError) as err: + await handle.result() + + assert err.value.__cause__ + assert isinstance(err.value.__cause__, nexusrpc.HandlerError) + + # test that the error is cached + with pytest.raises(NexusOperationFailureError) as second_err: + await handle.result() + assert err.value is second_err.value + + handle = await nexus_client.start_operation( + StandaloneTestService.raise_err, + RaiseErrInput("application_err"), + id=str(uuid.uuid4()), + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + with pytest.raises(NexusOperationFailureError) as err: + await handle.result() + + assert err.value.__cause__ + assert isinstance(err.value.__cause__, nexusrpc.HandlerError) + assert err.value.__cause__.__cause__ + assert isinstance(err.value.__cause__.__cause__, ApplicationError) + + +async def test_describe_operation(client: Client, env: WorkflowEnvironment): + """Start op, get result first, then describe, verify fields populated.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + # Start an async operation and get its result first, then describe + handle = await nexus_client.start_operation( + StandaloneTestService.echo_async, + EchoInput(value="describe-me"), + id=str(uuid.uuid4()), + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + summary=StandaloneTestService.echo_async.name, + ) + await handle.result() + + desc = await handle.describe() + assert desc.operation_id == handle.operation_id + assert desc.endpoint == endpoint_name + assert desc.service == "StandaloneTestService" + assert desc.operation == "echo_async" + assert desc.status == NexusOperationExecutionStatus.COMPLETED + assert desc.state == PendingNexusOperationExecutionState.UNSPECIFIED + assert desc.attempt >= 1 + assert desc.blocked_reason is None + assert desc.last_attempt_failure is None + summary = await desc.static_summary() + assert summary == StandaloneTestService.echo_async.name + + +async def test_cancel_operation(client: Client, env: WorkflowEnvironment): + """Start blocking async op, cancel it, verify awaiting result raises NexusOperationFailureError + from a CancelledError. + """ + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + handle = await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value="cancel-me"), + id=str(uuid.uuid4()), + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + # Cancel the operation + await handle.cancel() + + with pytest.raises(NexusOperationFailureError) as err: + await handle.result() + + assert err.value.__cause__ + assert isinstance(err.value.__cause__, CancelledError) + + +async def test_terminate_operation(client: Client, env: WorkflowEnvironment): + """Start blocking async op, terminate it, verify awaiting the result raises NexusOperationFailureError + from a TerminatedError. + """ + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + handle = await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value="terminate-me"), + id=str(uuid.uuid4()), + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + # Terminate the operation + await handle.terminate(reason="test termination") + + with pytest.raises(NexusOperationFailureError) as err: + await handle.result() + + assert err.value.__cause__ + assert isinstance(err.value.__cause__, TerminatedError) + + +async def test_list_operations(client: Client, env: WorkflowEnvironment): + """Start multiple ops, list them, verify iteration yields correct results.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + + # Start several blocking operations so they remain visible + op_ids: list[str] = [] + for i in range(3): + op_id = str(uuid.uuid4()) + op_ids.append(op_id) + await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value=f"list-{i}"), + id=op_id, + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + # Poll until all 3 operations appear (visibility is eventually consistent) + query = f'Endpoint = "{endpoint_name}"' + + async def check_ids() -> None: + found_ids: set[str] = set() + async for op_exec in client.list_nexus_operations(query): + found_ids.add(op_exec.operation_id) + assert all(op_id in found_ids for op_id in op_ids) + + await assert_eventually(check_ids) + + +async def test_count_operations(client: Client, env: WorkflowEnvironment): + """Start ops, count, verify count.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + + # Start some blocking operations + for i in range(2): + await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value=f"count-{i}"), + id=str(uuid.uuid4()), + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + # Poll until count >= 2 (visibility is eventually consistent) + query = f'Endpoint = "{endpoint_name}"' + + async def check_count() -> None: + count_result = await client.count_nexus_operations(query) + assert count_result.count >= 2 + + await assert_eventually(check_count) + + +async def test_get_nexus_operation_handle(client: Client, env: WorkflowEnvironment): + """Start op, get result, then get handle by ID and get result again.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + + op_id = str(uuid.uuid4()) + original_handle = await nexus_client.start_operation( + StandaloneTestService.echo_async, + EchoInput(value="handle-test"), + id=op_id, + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + # Get result from the original handle first + original_result = await original_handle.result() + assert isinstance(original_result, EchoOutput) + assert original_result.value == "handle-test" + + # Get a fresh handle by ID and get result again + handle = client.get_nexus_operation_handle( + op_id, operation=StandaloneTestService.echo_async + ) + result = await handle.result() + assert isinstance(result, EchoOutput) + assert result.value == "handle-test" + + +async def test_id_conflict_policy_use_existing( + client: Client, env: WorkflowEnvironment +): + """Start op, re-start with USE_EXISTING, verify same op/run ID and expected result""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + service_handler = StandaloneTestServiceHandler() + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[service_handler], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + + op_id = str(uuid.uuid4()) + + # First start + handle = await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value=task_queue), + id=op_id, + id_reuse_policy=NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.USE_EXISTING, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + # Second start with same ID and USE_EXISTING + handle2 = await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value="second"), + id=op_id, + id_reuse_policy=NexusOperationIDReusePolicy.ALLOW_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.USE_EXISTING, + schedule_to_close_timeout=timedelta(seconds=30), + ) + assert handle.operation_id == handle2.operation_id + assert handle.run_id == handle2.run_id + + # Let the nexus operation run and start the blocking workflow + await service_handler.started_blocking.wait() + + expected_wf_id = f"blocking_async-{task_queue}" + wf_handle = env.client.get_workflow_handle(expected_wf_id) + + await wf_handle.start_update( + BlockingHandlerWorkflow.unblock, + wait_for_stage=WorkflowUpdateStage.COMPLETED, + ) + + first_result = await handle.result() + second_result = await handle2.result() + assert first_result.value == task_queue + assert first_result.value == second_result.value + + +async def test_id_conflict_policy_fail(client: Client, env: WorkflowEnvironment): + """Start op, re-start with FAIL, verify raises NexusOperationAlreadyStartedError.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + + op_id = str(uuid.uuid4()) + + # First start + await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value="first"), + id=op_id, + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + # Second start with same ID and FAIL should raise + with pytest.raises(NexusOperationAlreadyStartedError): + await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value="second"), + id=op_id, + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + +# --------------------------------------------------------------------------- +# Interceptor test +# --------------------------------------------------------------------------- + + +class _RecordingOutboundInterceptor(OutboundInterceptor): + """Outbound interceptor that records calls to nexus operation methods.""" + + def __init__( + self, next: OutboundInterceptor, parent: _RecordingInterceptor + ) -> None: + super().__init__(next) + self._parent = parent + + async def start_nexus_operation( + self, input: StartNexusOperationInput + ) -> NexusOperationHandle[Any]: + self._parent.start_calls.append(input) + return await super().start_nexus_operation(input) + + async def describe_nexus_operation( + self, input: DescribeNexusOperationInput + ) -> NexusOperationExecutionDescription: + self._parent.describe_calls.append(input) + return await super().describe_nexus_operation(input) + + async def get_nexus_operation_result( + self, input: GetNexusOperationResultInput + ) -> Any: + self._parent.result_calls.append(input) + result = await super().get_nexus_operation_result(input) + self._parent.result_outputs.append(result) + return result + + async def cancel_nexus_operation(self, input: CancelNexusOperationInput) -> None: + self._parent.cancel_calls.append(input) + return await super().cancel_nexus_operation(input) + + async def terminate_nexus_operation( + self, input: TerminateNexusOperationInput + ) -> None: + self._parent.terminate_calls.append(input) + return await super().terminate_nexus_operation(input) + + def list_nexus_operations(self, input: ListNexusOperationsInput): + self._parent.list_calls.append(input) + return super().list_nexus_operations(input) + + async def count_nexus_operations(self, input: CountNexusOperationsInput): + self._parent.count_calls.append(input) + return await super().count_nexus_operations(input) + + +class _RecordingInterceptor(Interceptor): + """Client interceptor that records nexus operation calls.""" + + def __init__(self) -> None: + super().__init__() + self.start_calls: list[StartNexusOperationInput] = [] + self.describe_calls: list[DescribeNexusOperationInput] = [] + self.result_calls: list[GetNexusOperationResultInput] = [] + self.result_outputs: list[Any] = [] + self.cancel_calls: list[CancelNexusOperationInput] = [] + self.terminate_calls: list[TerminateNexusOperationInput] = [] + self.list_calls: list[ListNexusOperationsInput] = [] + self.count_calls: list[CountNexusOperationsInput] = [] + + def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor: + return _RecordingOutboundInterceptor(next, self) + + +async def test_interceptor_receives_inputs(client: Client, env: WorkflowEnvironment): + """Custom OutboundInterceptor records calls, verify correct input types.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + + interceptor = _RecordingInterceptor() + intercepted_client = Client( + service_client=client.service_client, + namespace=client.namespace, + interceptors=[interceptor], + ) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[StandaloneTestServiceHandler()], + workflows=[EchoHandlerWorkflow, BlockingHandlerWorkflow], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + + nexus_client = intercepted_client.create_nexus_client( + service=StandaloneTestService, endpoint=endpoint_name + ) + + op_id = str(uuid.uuid4()) + + # Start operation -- should trigger start interceptor (with retry) + handle = await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value=f"interceptor-test-{op_id}"), + id=op_id, + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + schedule_to_start_timeout=timedelta(seconds=5), + start_to_close_timeout=timedelta(seconds=20), + ) + assert len(interceptor.start_calls) >= 1 + start_input = interceptor.start_calls[-1] + assert isinstance(start_input, StartNexusOperationInput) + assert start_input.id == op_id + assert start_input.operation == "blocking_async" + assert start_input.endpoint == endpoint_name + assert start_input.service == "StandaloneTestService" + assert start_input.schedule_to_start_timeout == timedelta(seconds=5) + assert start_input.start_to_close_timeout == timedelta(seconds=20) + + # Describe + await handle.describe() + assert len(interceptor.describe_calls) == 1 + desc_input = interceptor.describe_calls[0] + assert isinstance(desc_input, DescribeNexusOperationInput) + assert desc_input.operation_id == op_id + + # Cancel + await handle.cancel() + assert len(interceptor.cancel_calls) == 1 + cancel_input = interceptor.cancel_calls[0] + assert isinstance(cancel_input, CancelNexusOperationInput) + assert cancel_input.operation_id == op_id + + # GetResult + with pytest.raises(NexusOperationFailureError): + await handle.result() + assert len(interceptor.result_calls) == 1 + result_input = interceptor.result_calls[0] + assert isinstance(result_input, GetNexusOperationResultInput) + assert result_input.operation_id == op_id + assert result_input.result_type == EchoOutput + assert result_input.endpoint == endpoint_name + assert result_input.service == "StandaloneTestService" + assert result_input.operation == "blocking_async" + + # Interceptors receive successfully decoded results. + value = f"interceptor-success-{uuid.uuid4()}" + handle = await nexus_client.start_operation( + StandaloneTestService.echo_sync, + EchoInput(value=value), + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=30), + ) + result = await handle.result() + assert result == EchoOutput(value=value) + assert interceptor.result_outputs == [EchoOutput(value=value)] + + # Start another so we can terminate it + previous_start_count = len(interceptor.start_calls) + op_id = str(uuid.uuid4()) + handle = await nexus_client.start_operation( + StandaloneTestService.blocking_async, + EchoInput(value=f"interceptor-test-{op_id}"), + id=op_id, + id_reuse_policy=NexusOperationIDReusePolicy.REJECT_DUPLICATE, + id_conflict_policy=NexusOperationIDConflictPolicy.FAIL, + schedule_to_close_timeout=timedelta(seconds=30), + ) + assert len(interceptor.start_calls) > previous_start_count + + # Terminate + await handle.terminate() + assert len(interceptor.terminate_calls) == 1 + terminate_input = interceptor.terminate_calls[0] + assert isinstance(terminate_input, TerminateNexusOperationInput) + assert terminate_input.operation_id == op_id + + query = f'`OperationId`="{op_id}"' + + # List Operations + # Iterate over list to ensure call is made + async for _ in intercepted_client.list_nexus_operations(query): + pass + assert len(interceptor.list_calls) >= 1 + list_input = interceptor.list_calls[-1] + assert isinstance(list_input, ListNexusOperationsInput) + assert list_input.query == query + + # Count Operations + await intercepted_client.count_nexus_operations(query) + assert len(interceptor.count_calls) >= 1 + count_input = interceptor.count_calls[-1] + assert isinstance(count_input, CountNexusOperationsInput) + assert count_input.query == query + + +async def _assert_workflow_started_with_nexus_operation_link( + client: Client, + workflow_id: str, + operation_handle: NexusOperationHandle[Any], +) -> WorkflowHistory: + history = await client.get_workflow_handle(workflow_id).fetch_history() + started_event = next( + ( + e + for e in history.events + if ( + e.event_type + == temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED + ) + ), + None, + ) + assert started_event is not None + + assert operation_handle.run_id is not None + assert_links_match( + links_from_workflow_execution_started_event(started_event), + expected_nexus_operation_link( + namespace=client.namespace, + operation_id=operation_handle.operation_id, + run_id=operation_handle.run_id, + ), + ) + return history + + +async def _assert_nexus_operation_has_link_to_started_workflow( + client: Client, + workflow_history: WorkflowHistory, + operation_handle: NexusOperationHandle[Any], +) -> None: + desc = await operation_handle.describe() + assert_links_match( + desc.raw_description.links, + expected_workflow_event_link( + namespace=client.namespace, + workflow_id=workflow_history.workflow_id, + run_id=workflow_history.run_id, + event_type=temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED, + event_id=workflow_history.events[0].event_id, + ), + ) diff --git a/tests/nexus/test_temporal_extstore.py b/tests/nexus/test_temporal_extstore.py new file mode 100644 index 0000000000..9ec1ff9d13 --- /dev/null +++ b/tests/nexus/test_temporal_extstore.py @@ -0,0 +1,344 @@ +"""Integration tests for external storage with Nexus task processing. + +Mirrors sdk-typescript's test-integration-extstore-nexus. A caller workflow +invokes a Nexus operation whose input and/or result is large enough to be +offloaded to external storage. Verifies that the offloaded input is retrieved +before the handler runs, that a large synchronous result is offloaded when +completing the task (and retrieved by the caller), and that a transient +storage-driver failure fails the Nexus task retryably and then recovers. +""" + +from __future__ import annotations + +import dataclasses +import uuid +from collections.abc import Sequence +from datetime import timedelta +from typing import Any + +import nexusrpc +import pytest +from nexusrpc.handler import ( + StartOperationContext, + service_handler, + sync_operation, +) + +import temporalio.converter +from temporalio import workflow +from temporalio.api.common.v1 import Payload +from temporalio.client import Client, WorkflowFailureError +from temporalio.converter import ( + ExternalStorage, + PayloadCodec, + StorageDriverClaim, + StorageDriverRetrieveContext, + StorageDriverStoreContext, +) +from temporalio.exceptions import ApplicationError, NexusOperationError +from temporalio.testing import WorkflowEnvironment +from temporalio.types import MethodAsyncSingleParam +from temporalio.worker import UnsandboxedWorkflowRunner, Worker +from tests.helpers.nexus import make_nexus_endpoint_name +from tests.test_extstore import InMemoryTestDriver, RecordingPayloadCodec + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server + +PAYLOAD_SIZE = 4096 +PAYLOAD_SIZE_THRESHOLD = 1024 +_STORE_FAILURE_MESSAGE = "external storage store failed" + + +@nexusrpc.service +class ExtStoreNexusService: + size_op: nexusrpc.Operation[str, int] + big_result_op: nexusrpc.Operation[int, str] + + +@service_handler(service=ExtStoreNexusService) +class ExtStoreNexusServiceHandler: + @sync_operation + async def size_op(self, _ctx: StartOperationContext, data: str) -> int: + return len(data) + + @sync_operation + async def big_result_op(self, _ctx: StartOperationContext, size: int) -> str: + return "x" * size + + +@workflow.defn +class SizeOpCallerWorkflow: + """Calls ``size_op`` with a large input (offloaded) and returns its length.""" + + @workflow.run + async def run(self, task_queue: str) -> int: + nexus_client = workflow.create_nexus_client( + service=ExtStoreNexusService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + return await nexus_client.execute_operation( + ExtStoreNexusService.size_op, "x" * PAYLOAD_SIZE + ) + + +@workflow.defn +class BigResultOpCallerWorkflow: + """Calls ``big_result_op`` (whose result is offloaded) and returns its length.""" + + @workflow.run + async def run(self, task_queue: str) -> int: + nexus_client = workflow.create_nexus_client( + service=ExtStoreNexusService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + result = await nexus_client.execute_operation( + ExtStoreNexusService.big_result_op, PAYLOAD_SIZE + ) + return len(result) + + +class TransientFailureDriver(InMemoryTestDriver): + """In-memory driver that fails the first store and/or retrieve call, then + behaves normally. Simulates a transient storage-driver outage.""" + + def __init__( + self, + *, + fail_first_store: bool = False, + fail_first_retrieve: bool = False, + driver_name: str = "test-driver", + ): + super().__init__(driver_name=driver_name) + self._fail_first_store = fail_first_store + self._fail_first_retrieve = fail_first_retrieve + self.store_attempts = 0 + self.retrieve_attempts = 0 + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + self.store_attempts += 1 + if self._fail_first_store and self.store_attempts == 1: + raise RuntimeError("transient store failure") + return await super().store(context, payloads) + + async def retrieve( + self, + context: StorageDriverRetrieveContext, + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + self.retrieve_attempts += 1 + if self._fail_first_retrieve and self.retrieve_attempts == 1: + raise RuntimeError("transient retrieve failure") + return await super().retrieve(context, claims) + + +def _client_with_extstore( + env: WorkflowEnvironment, + driver: InMemoryTestDriver, + payload_codec: PayloadCodec | None = None, +) -> Client: + config = env.client.config() + config["data_converter"] = dataclasses.replace( + temporalio.converter.default(), + payload_codec=payload_codec, + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=PAYLOAD_SIZE_THRESHOLD, + ), + ) + return Client(**config) + + +async def _run_caller( + env: WorkflowEnvironment, + driver: InMemoryTestDriver, + workflow_run: MethodAsyncSingleParam[Any, str, int], + *, + payload_codec: PayloadCodec | None = None, + workflow_id: str | None = None, +) -> int: + client = _client_with_extstore(env, driver, payload_codec) + task_queue = str(uuid.uuid4()) + async with Worker( + client, + task_queue=task_queue, + workflows=[SizeOpCallerWorkflow, BigResultOpCallerWorkflow], + nexus_service_handlers=[ExtStoreNexusServiceHandler()], + workflow_runner=UnsandboxedWorkflowRunner(), + ): + await env.create_nexus_endpoint( + make_nexus_endpoint_name(task_queue), task_queue + ) + return await client.execute_workflow( + workflow_run, + task_queue, + id=workflow_id or str(uuid.uuid4()), + task_queue=task_queue, + execution_timeout=timedelta(seconds=30), + ) + + +def _cause_chain(err: BaseException) -> list[BaseException]: + chain: list[BaseException] = [] + e: BaseException | None = err + while e is not None: + chain.append(e) + e = e.__cause__ + return chain + + +async def test_nexus_operation_input_offloaded_and_retrieved(env: WorkflowEnvironment): + """The offloaded operation input is retrieved before the handler runs.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + driver = InMemoryTestDriver() + result = await _run_caller(env, driver, SizeOpCallerWorkflow.run) + + assert result == PAYLOAD_SIZE + assert driver._store_calls >= 1 + assert driver._retrieve_calls >= 1 + + +async def test_nexus_operation_sync_result_offloaded_and_retrieved( + env: WorkflowEnvironment, +): + """A large synchronous result is offloaded and retrieved by the caller.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + driver = InMemoryTestDriver() + result = await _run_caller(env, driver, BigResultOpCallerWorkflow.run) + + assert result == PAYLOAD_SIZE + assert driver._store_calls >= 1 + assert driver._retrieve_calls >= 1 + + +def _assert_encoded_reference(payload: Payload) -> None: + assert payload.metadata["encoding"] == b"binary/test-encoded" + assert payload.metadata["__temporal_external_storage_reference"] == b"true" + + +@pytest.mark.usefixtures("encode_storage_references") +async def test_nexus_operation_input_reference_encoded_with_codec( + env: WorkflowEnvironment, +): + """With a codec, the operation input reference is encoded, and the Nexus + worker decodes it before retrieving the input.""" + if env.supports_time_skipping: + pytest.skip("Nexus tests don't work with the Java test server") + + driver = InMemoryTestDriver() + workflow_id = str(uuid.uuid4()) + result = await _run_caller( + env, + driver, + SizeOpCallerWorkflow.run, + payload_codec=RecordingPayloadCodec("binary/test-encoded"), + workflow_id=workflow_id, + ) + + assert result == PAYLOAD_SIZE + history = await env.client.get_workflow_handle(workflow_id).fetch_history() + [scheduled] = [ + e.nexus_operation_scheduled_event_attributes + for e in history.events + if e.HasField("nexus_operation_scheduled_event_attributes") + ] + _assert_encoded_reference(scheduled.input) + + +@pytest.mark.usefixtures("encode_storage_references") +async def test_nexus_operation_result_reference_encoded_with_codec( + env: WorkflowEnvironment, +): + """With a codec, the Nexus worker encodes the reference to an offloaded + operation result, and the caller decodes it.""" + if env.supports_time_skipping: + pytest.skip("Nexus tests don't work with the Java test server") + + driver = InMemoryTestDriver() + workflow_id = str(uuid.uuid4()) + result = await _run_caller( + env, + driver, + BigResultOpCallerWorkflow.run, + payload_codec=RecordingPayloadCodec("binary/test-encoded"), + workflow_id=workflow_id, + ) + + assert result == PAYLOAD_SIZE + history = await env.client.get_workflow_handle(workflow_id).fetch_history() + [completed] = [ + e.nexus_operation_completed_event_attributes + for e in history.events + if e.HasField("nexus_operation_completed_event_attributes") + ] + _assert_encoded_reference(completed.result) + + +async def test_nexus_operation_transient_retrieve_failure_recovers( + env: WorkflowEnvironment, +): + """A transient retrieve failure fails the task retryably; it then recovers.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + driver = TransientFailureDriver(fail_first_retrieve=True) + result = await _run_caller(env, driver, SizeOpCallerWorkflow.run) + + assert result == PAYLOAD_SIZE + assert driver.retrieve_attempts >= 2 + + +async def test_nexus_operation_transient_store_failure_recovers( + env: WorkflowEnvironment, +): + """A transient store failure fails the task retryably; it then recovers.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + driver = TransientFailureDriver(fail_first_store=True) + result = await _run_caller(env, driver, BigResultOpCallerWorkflow.run) + + assert result == PAYLOAD_SIZE + assert driver.store_attempts >= 2 + + +class PermanentFailStoreDriver(InMemoryTestDriver): + """Store always fails non-retryably, so the Nexus operation fails permanently.""" + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + raise ApplicationError(_STORE_FAILURE_MESSAGE, non_retryable=True) + + +async def test_nexus_operation_store_failure_fails_operation( + env: WorkflowEnvironment, +): + """A non-retryable store failure fails the operation and surfaces the driver + error to the caller (deterministically, with no retries).""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + driver = PermanentFailStoreDriver() + with pytest.raises(WorkflowFailureError) as exc_info: + await _run_caller(env, driver, BigResultOpCallerWorkflow.run) + + causes = _cause_chain(exc_info.value) + assert [type(c) for c in causes] == [ + WorkflowFailureError, + NexusOperationError, + nexusrpc.HandlerError, + ApplicationError, + ] + assert _STORE_FAILURE_MESSAGE in str(causes[-1]) diff --git a/tests/nexus/test_temporal_operation.py b/tests/nexus/test_temporal_operation.py new file mode 100644 index 0000000000..030db6f6c9 --- /dev/null +++ b/tests/nexus/test_temporal_operation.py @@ -0,0 +1,2111 @@ +import asyncio +import uuid +from dataclasses import dataclass +from datetime import timedelta +from typing import Any, cast + +import nexusrpc +import pytest +from nexusrpc import HandlerErrorType, Operation, service +from nexusrpc.handler import ( + CancelOperationContext, + OperationTaskCancellation, + StartOperationContext, + operation_handler, + service_handler, + sync_operation, +) +from typing_extensions import override + +import temporalio.exceptions +import temporalio.service +from temporalio import activity, nexus, workflow +from temporalio.api.activity.v1 import ActivityExecutionInfo +from temporalio.api.common.v1 import Link +from temporalio.api.workflowservice.v1 import ( + SignalWorkflowExecutionRequest, + SignalWorkflowExecutionResponse, +) +from temporalio.client import ( + ActivityExecutionStatus, + Client, + NexusOperationFailureError, + WorkflowExecutionStatus, + WorkflowFailureError, + WorkflowUpdateStage, +) +from temporalio.common import ( + NexusOperationExecutionStatus, + RetryPolicy, + WorkflowIDConflictPolicy, +) +from temporalio.nexus._token import OperationToken, OperationTokenType +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from tests.helpers import EventType, assert_event_subsequence, assert_eventually +from tests.helpers.nexus import ( + assert_links_match, + expected_nexus_operation_link, + make_nexus_endpoint_name, +) + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server + + +@dataclass +class Input: + value: str + task_queue: str + update_value: str = "" + update_id: str = "" + expect_sync_response: bool = False + + +def test_temporal_operation_result_validates_single_result_kind() -> None: + assert nexus.TemporalOperationResult.sync(None).value is None + assert nexus.TemporalOperationResult.async_token("token").token == "token" + + with pytest.raises(ValueError, match="exactly one of value or token"): + nexus.TemporalOperationResult() + + with pytest.raises(ValueError, match="exactly one of value or token"): + nexus.TemporalOperationResult(value="value", token="token") + + +def test_temporal_operation_result_validates_token() -> None: + with pytest.raises(ValueError, match="non-empty string"): + nexus.TemporalOperationResult.async_token("") + + with pytest.raises(ValueError, match="non-empty string"): + nexus.TemporalOperationResult(token="") + + with pytest.raises(ValueError, match="non-empty string"): + nexus.TemporalOperationResult(token=123) # type: ignore + + +@workflow.defn +class EchoWorkflow: + @workflow.run + async def run(self, input: Input) -> str: + return input.value + + +@activity.defn +async def echo_activity(input: Input) -> str: + return input.value + + +@activity.defn +async def raise_error_activity() -> None: + raise temporalio.exceptions.ApplicationError( + "test-activity-error-message", + type="test-activity-error-type", + non_retryable=True, + ) + + +@activity.defn +async def wait_for_cancel_activity() -> None: + # Heartbeat in a loop so the activity receives cancellation. Letting the + # resulting CancelledError bubble out transitions the activity to CANCELED. + while True: + await asyncio.sleep(0.3) + activity.heartbeat() + + +@service +class TestService: + echo: Operation[Input, str] + blocking: Operation[None, None] + double_start: Operation[Input, None] + concurrent_start: Operation[Input, str] + retry_after_failed_start: Operation[Input, str] + sync_result: Operation[Input, str] + custom_cancel: Operation[str, None] + update_op: Operation[Input, str] + bad_update_stage_op: Operation[Input, str] + query_op: Operation[str, bool] + echo_activity: Operation[Input, str] + error_activity: Operation[Input, None] + blocking_activity: Operation[str, None] + custom_cancel_activity: Operation[str, None] + double_start_activity: Operation[Input, None] + mixed_start: Operation[Input, None] + double_signal: Operation[str, None] + concurrent_signal: Operation[str, None] + unlimited_signals: Operation[str, None] + signal_after_failed_signal: Operation[str, None] + signal_handler_retry: Operation[str, None] + + +@service_handler(service=TestService) +class TestServiceHandler: + # tell Pytest this is not a test class + __test__ = False + + def __init__(self) -> None: + self.started_custom_cancel_workflow = asyncio.Event() + self.started_custom_cancel_activity = asyncio.Event() + self.custom_cancel_activity_called = asyncio.Event() + self.bad_update_stage_error: ValueError | None = None + self.signal_handler_retry_request_ids: list[str] = [] + self.concurrent_signal_results: list[BaseException | None] = [] + + @nexus.temporal_operation + async def echo( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[str]: + return await client.start_workflow( + EchoWorkflow.run, input, id=f"echo-{input.value}" + ) + + @nexus.temporal_operation + async def blocking( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + _input: None, + ) -> nexus.TemporalOperationResult[None]: + return await client.start_workflow( + BlockingWorkflow.run, id=f"blocking-{uuid.uuid4()}" + ) + + @nexus.temporal_operation + async def double_start( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[None]: + await client.start_workflow( + EchoWorkflow.run, input, id=f"double-start-{uuid.uuid4()}" + ) + await client.start_workflow( + EchoWorkflow.run, input, id=f"double-start-{uuid.uuid4()}" + ) + return nexus.TemporalOperationResult.sync(None) + + @nexus.temporal_operation + async def concurrent_start( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[str]: + results = await asyncio.gather( + client.start_workflow( + EchoWorkflow.run, + input, + id=f"concurrent-start-1-{uuid.uuid4()}", + ), + client.start_workflow( + EchoWorkflow.run, + input, + id=f"concurrent-start-2-{uuid.uuid4()}", + ), + return_exceptions=True, + ) + + async_results: list[nexus.TemporalOperationResult[str]] = [] + handler_errors: list[nexusrpc.HandlerError] = [] + for result in results: + if isinstance(result, nexus.TemporalOperationResult): + async_results.append(result) + elif isinstance(result, nexusrpc.HandlerError): + handler_errors.append(result) + elif isinstance(result, BaseException): + raise result + else: + raise RuntimeError(f"Unexpected concurrent start result: {result}") + + if ( + len(async_results) == 1 + and len(handler_errors) == 1 + and handler_errors[0].type == HandlerErrorType.BAD_REQUEST + ): + return async_results[0] + + raise RuntimeError( + "Expected one async workflow start and one BAD_REQUEST HandlerError, " + f"got {len(async_results)} starts and {len(handler_errors)} handler errors" + ) + + @nexus.temporal_operation + async def retry_after_failed_start( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[str]: + try: + await client.start_workflow( + BlockingWorkflow.run, + id=input.value, + id_conflict_policy=WorkflowIDConflictPolicy.FAIL, + ) + except temporalio.exceptions.WorkflowAlreadyStartedError: + return await client.start_workflow( + EchoWorkflow.run, + input, + id=f"retry-after-failed-start-{uuid.uuid4()}", + ) + + raise RuntimeError("Expected first workflow start to fail") + + @nexus.temporal_operation + async def sync_result( + self, + _ctx: nexus.TemporalStartOperationContext, + _client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[str]: + return nexus.TemporalOperationResult.sync(input.value) + + @operation_handler + def custom_cancel(self) -> nexus.TemporalOperationHandler[str, None]: + event = self.started_custom_cancel_workflow + + class CustomCancelNexusOpHandler(nexus.TemporalOperationHandler[str, None]): + @override + async def start_operation( + self, + ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: str, + ) -> nexus.TemporalOperationResult[None]: + result = await client.start_workflow(BlockingWorkflow.run, id=input) + event.set() + return result + + @override + async def cancel_workflow_run( + self, + ctx: nexus.TemporalCancelOperationContext, + options: nexus.CancelWorkflowRunOptions, + ): + # get a handle to the workflow + handle = nexus.client().get_workflow_handle(options.workflow_id) + + # cancel the workflow + await handle.cancel() + + return CustomCancelNexusOpHandler() + + @nexus.temporal_operation + async def update_op( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[str]: + # input.value carries the target workflow_id, input.update_value has actual update + return await client.start_workflow_update( + input.value, + UpdatableWorkflow.do_update, + input.update_value, + wait_for_stage=WorkflowUpdateStage.ACCEPTED, + update_id=input.update_id, + ) + + @nexus.temporal_operation + async def bad_update_stage_op( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[str]: + try: + return await client.start_workflow_update( + input.value, + UpdatableWorkflow.do_update, + input.update_value, + # cast to bypass type checker + wait_for_stage=cast(Any, WorkflowUpdateStage.COMPLETED), + update_id=input.update_id, + ) + except ValueError as err: + self.bad_update_stage_error = err + return nexus.TemporalOperationResult.sync(str(err)) + + @nexus.temporal_operation + async def query_op( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: str, + ) -> nexus.TemporalOperationResult[bool]: + handle = client.client.get_workflow_handle(input) + result = await handle.query(BlockingWorkflow.query_done) + return nexus.TemporalOperationResult.sync(result) + + @nexus.temporal_operation + async def echo_activity( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[str]: + return await client.start_activity( + echo_activity, + input, + id=f"echo_activity-{uuid.uuid4()}", + start_to_close_timeout=timedelta(seconds=5), + ) + + @nexus.temporal_operation + async def error_activity( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + _input: Input, + ) -> nexus.TemporalOperationResult[None]: + # The activity raises immediately. With a single permitted attempt it + # fails the backing activity, which in turn fails the Nexus operation. + return await client.start_activity( + raise_error_activity, + id=f"error_activity-{uuid.uuid4()}", + start_to_close_timeout=timedelta(seconds=5), + retry_policy=RetryPolicy(maximum_attempts=1), + ) + + @nexus.temporal_operation + async def blocking_activity( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: str, + ) -> nexus.TemporalOperationResult[None]: + return await client.start_activity( + wait_for_cancel_activity, + id=input, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=1), + ) + + @nexus.temporal_operation + async def double_start_activity( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + _input: Input, + ) -> nexus.TemporalOperationResult[None]: + # Keep the first activity running so its callback cannot race the + # handler error raised by the second start. + await client.start_activity( + wait_for_cancel_activity, + id=f"double-start-activity-{uuid.uuid4()}", + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=1), + ) + await client.start_activity( + wait_for_cancel_activity, + id=f"double-start-activity-{uuid.uuid4()}", + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=1), + ) + return nexus.TemporalOperationResult.sync(None) + + @nexus.temporal_operation + async def mixed_start( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[None]: + # Starting a workflow reserves the single async start, so the subsequent + # start_activity must hit the same guard and raise a BAD_REQUEST error. + await client.start_workflow( + EchoWorkflow.run, input, id=f"mixed-start-{uuid.uuid4()}" + ) + await client.start_activity( + echo_activity, + input, + id=f"mixed-start-{uuid.uuid4()}", + start_to_close_timeout=timedelta(seconds=5), + ) + return nexus.TemporalOperationResult.sync(None) + + @nexus.temporal_operation + async def double_signal( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: str, + ) -> nexus.TemporalOperationResult[None]: + await client.client.start_workflow( + SignalCountWorkflow.run, + id=input, + task_queue=nexus.info().task_queue, + start_signal="my_signal", + ) + # Rejected even though it targets a different workflow. + await client.client.get_workflow_handle(f"{input}-other").signal( + SignalCountWorkflow.my_signal + ) + raise RuntimeError("Expected second signal to be rejected") + + @nexus.temporal_operation + async def concurrent_signal( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: str, + ) -> nexus.TemporalOperationResult[None]: + handle = client.client.get_workflow_handle(input) + self.concurrent_signal_results = list( + await asyncio.gather( + handle.signal(SignalCountWorkflow.my_signal), + handle.signal(SignalCountWorkflow.my_signal), + return_exceptions=True, + ) + ) + return nexus.TemporalOperationResult.sync(None) + + @sync_operation + async def unlimited_signals(self, _ctx: StartOperationContext, input: str) -> None: + handle = nexus.client().get_workflow_handle(input) + for _ in range(3): + await handle.signal(SignalCountWorkflow.my_signal) + + @nexus.temporal_operation + async def signal_after_failed_signal( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: str, + ) -> nexus.TemporalOperationResult[None]: + handle = client.client.get_workflow_handle(input) + try: + await handle.signal(SignalCountWorkflow.my_signal) + except temporalio.service.RPCError: + await handle.signal(SignalCountWorkflow.my_signal) + return nexus.TemporalOperationResult.sync(None) + raise RuntimeError("Expected first signal to fail") + + @nexus.temporal_operation + async def signal_handler_retry( + self, + ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: str, + ) -> nexus.TemporalOperationResult[None]: + await client.client.start_workflow( + SignalCountWorkflow.run, + id=input, + task_queue=nexus.info().task_queue, + start_signal="my_signal", + ) + self.signal_handler_retry_request_ids.append(ctx.request_id) + if len(self.signal_handler_retry_request_ids) == 1: + raise nexusrpc.HandlerError( + "force handler redelivery after signaling", + type=HandlerErrorType.INTERNAL, + retryable_override=True, + ) + return nexus.TemporalOperationResult.sync(None) + + @operation_handler + def custom_cancel_activity(self) -> nexus.TemporalOperationHandler[str, None]: + started = self.started_custom_cancel_activity + cancel_called = self.custom_cancel_activity_called + + class CustomCancelActivityNexusOpHandler( + nexus.TemporalOperationHandler[str, None] + ): + @override + async def start_operation( + self, + ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: str, + ) -> nexus.TemporalOperationResult[None]: + result = await client.start_activity( + wait_for_cancel_activity, + id=input, + start_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=1), + ) + started.set() + return result + + @override + async def cancel_activity( + self, + ctx: nexus.TemporalCancelOperationContext, + options: nexus.CancelActivityOptions, + ): + # record that the custom override ran + cancel_called.set() + + # get a handle to the activity and cancel it + handle = nexus.client().get_activity_handle(options.activity_id) + await handle.cancel() + + return CustomCancelActivityNexusOpHandler() + + +@workflow.defn +class EchoWorkflowCaller: + @workflow.run + async def run(self, input: Input) -> str: + client = workflow.create_nexus_client( + service=TestService, endpoint=make_nexus_endpoint_name(input.task_queue) + ) + return await client.execute_operation(TestService.echo, input) + + +async def test_temporal_operation_start_workflow( + client: Client, env: WorkflowEnvironment +): + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[EchoWorkflow, EchoWorkflowCaller], + ): + wf_handle = await client.start_workflow( + EchoWorkflowCaller.run, + Input(value="test", task_queue=task_queue), + task_queue=task_queue, + id=str(uuid.uuid4()), + ) + result = await wf_handle.result() + assert result == "test" + + await assert_event_subsequence( + wf_handle, + [ + EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED, + EventType.EVENT_TYPE_NEXUS_OPERATION_STARTED, + EventType.EVENT_TYPE_NEXUS_OPERATION_COMPLETED, + ], + ) + + +async def test_temporal_operation_update_workflow( + client: Client, env: WorkflowEnvironment +) -> None: + if ( + env.supports_time_skipping_v1 + ): # time skipping server uses different dynamic configs + pytest.skip("Update workflow tests don't work with time-skipping server") + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[UpdatableWorkflow, UpdateWorkflowCaller], + ): + update_workflow_id = f"updatable-workflow-{uuid.uuid4()}" + target_handle = await client.start_workflow( + UpdatableWorkflow.run, id=update_workflow_id, task_queue=task_queue + ) + + async def check_simple_update_and_links(): + """Run an update, check state changes from pending to created, verify forward and back links are correct""" + wf_handle = await client.start_workflow( + UpdateWorkflowCaller.run, + Input( + value=update_workflow_id, + task_queue=task_queue, + update_value="Created", + ), + task_queue=task_queue, + id=f"update-workflow-caller-created-{uuid.uuid4()}", + ) + result = await wf_handle.result() + assert result == "Updated workflow status from Pending to Created" + # assert expected events are in expected sequence in caller history + await assert_event_subsequence( + wf_handle, + [ + EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED, + EventType.EVENT_TYPE_NEXUS_OPERATION_STARTED, + EventType.EVENT_TYPE_NEXUS_OPERATION_COMPLETED, + ], + ) + # now, check the links + caller_history = await wf_handle.fetch_history() + handler_history = await target_handle.fetch_history() + scheduled_event = next( + e + for e in caller_history.events + if e.event_type == EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED + ) + caller_request_id = ( + scheduled_event.nexus_operation_scheduled_event_attributes.request_id + ) + assert target_handle.result_run_id is not None + # from caller ns to target ns + expected_forward_link = Link( + workflow_event=Link.WorkflowEvent( + namespace=client.namespace, + workflow_id=update_workflow_id, + run_id=target_handle.result_run_id, + request_id_ref=Link.WorkflowEvent.RequestIdReference( + request_id=caller_request_id, + event_type=EventType.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED, + ), + ) + ) + assert wf_handle.result_run_id is not None + # from target ns back to caller ns + expected_backward_link = Link( + workflow_event=Link.WorkflowEvent( + namespace=client.namespace, + workflow_id=wf_handle.id, + run_id=wf_handle.result_run_id, + event_ref=Link.WorkflowEvent.EventReference( + event_id=scheduled_event.event_id, + event_type=EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED, + ), + ) + ) + caller_links = [ + link + for e in caller_history.events + if e.event_type == EventType.EVENT_TYPE_NEXUS_OPERATION_STARTED + for link in e.links + ] + handler_links = [ + link + for e in handler_history.events + if e.event_type + == EventType.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED + for link in e.links + ] + assert expected_forward_link in caller_links + assert expected_backward_link in handler_links + + async def check_sequential_updates_consistent(): + """Run updates back-to-back, verify update isnt re-processed""" + stable_update_id = "sequential-update" + wf_handle = await client.start_workflow( + UpdateWorkflowCaller.run, + Input( + value=update_workflow_id, + task_queue=task_queue, + update_value="Processed", + update_id=stable_update_id, + ), + task_queue=task_queue, + id="sequential-update-workflow-caller-processed-0", + ) + result = await wf_handle.result() + assert result == "Updated workflow status from Created to Processed" + + # same update_id -> wont be processed again, receives a sync result + wf_handle = await client.start_workflow( + UpdateWorkflowCaller.run, + Input( + value=update_workflow_id, + task_queue=task_queue, + update_value="Processed", + update_id=stable_update_id, + expect_sync_response=True, + ), + task_queue=task_queue, + id="sequential-update-workflow-caller-processed-1", + ) + result = await wf_handle.result() + assert result == "Updated workflow status from Created to Processed" + + async def check_parallel_updates_idempotent_and_finish(): + """Run multiple updates in parallel, verify they are idempotent and finish with same result""" + stable_id = "parallel-updates-id" + # TODO: Assert truly parallel updates after https://github.com/temporalio/temporal/pull/11254. + num_parallel = 1 + gate = asyncio.Event() + + async def run_update(i: int) -> str: + await gate.wait() + wf_handle = await client.start_workflow( + UpdateWorkflowCaller.run, + Input( + value=update_workflow_id, + task_queue=task_queue, + update_value="Completed", + update_id=stable_id, + ), + task_queue=task_queue, + id=f"parallel-update-workflow-caller-completed-{i}", + ) + return await wf_handle.result() + + tasks = [asyncio.create_task(run_update(i)) for i in range(num_parallel)] + gate.set() + results = await asyncio.gather(*tasks) + + for result in results: + assert result == "Updated workflow status from Processed to Completed" + + async def check_updates_on_completed_workflows_fail(): + """The handler workflow already finished at this point, further updaes should just fail""" + # The last update's result does not mean the target has closed yet. + # An update that lands before the closure stays pending instead of + # failing. + await target_handle.result() + wf_handle = await client.start_workflow( + UpdateWorkflowCaller.run, + Input( + value=update_workflow_id, + task_queue=task_queue, + update_value="dummy, will fail anyway", + ), + task_queue=task_queue, + id=f"{uuid.uuid4()}", + ) + with pytest.raises(WorkflowFailureError): + await wf_handle.result() + + await check_simple_update_and_links() + await check_sequential_updates_consistent() + await check_parallel_updates_idempotent_and_finish() + await check_updates_on_completed_workflows_fail() + + +async def test_temporal_operation_update_workflow_delayed( + client: Client, env: WorkflowEnvironment +) -> None: + if ( + env.supports_time_skipping_v1 + ): # time skipping server uses different dynamic configs + pytest.skip("Update workflow tests don't work with time-skipping server") + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + update_workflow_id = f"another-updatable-workflow-{uuid.uuid4()}" + + # start both caller and handler without starting worker + wf_handle = await client.start_workflow( + UpdateWorkflowCaller.run, + Input( + value=update_workflow_id, + task_queue=task_queue, + update_value="Completed", + ), + task_queue=task_queue, + id=f"update-workflow-caller-created-{uuid.uuid4()}", + ) + target_handle = await client.start_workflow( + UpdatableWorkflow.run, id=update_workflow_id, task_queue=task_queue + ) + + # now, start the worker, it should process both the handler + # and the caller and finish the enqueued update + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[UpdatableWorkflow, UpdateWorkflowCaller], + ): + result = await wf_handle.result() + assert result == "Updated workflow status from Pending to Completed" + + await assert_event_subsequence( + wf_handle, + [ + EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED, + EventType.EVENT_TYPE_NEXUS_OPERATION_STARTED, + EventType.EVENT_TYPE_NEXUS_OPERATION_COMPLETED, + ], + ) + + caller_history = await wf_handle.fetch_history() + handler_history = await target_handle.fetch_history() + scheduled_event = next( + e + for e in caller_history.events + if e.event_type == EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED + ) + caller_request_id = ( + scheduled_event.nexus_operation_scheduled_event_attributes.request_id + ) + assert target_handle.result_run_id is not None + expected_forward_link = Link( + workflow_event=Link.WorkflowEvent( + namespace=client.namespace, + workflow_id=update_workflow_id, + run_id=target_handle.result_run_id, + request_id_ref=Link.WorkflowEvent.RequestIdReference( + request_id=caller_request_id, + event_type=EventType.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED, + ), + ) + ) + assert wf_handle.result_run_id is not None + expected_backward_link = Link( + workflow_event=Link.WorkflowEvent( + namespace=client.namespace, + workflow_id=wf_handle.id, + run_id=wf_handle.result_run_id, + event_ref=Link.WorkflowEvent.EventReference( + event_id=scheduled_event.event_id, + event_type=EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED, + ), + ) + ) + caller_links = [ + link + for e in caller_history.events + if e.event_type == EventType.EVENT_TYPE_NEXUS_OPERATION_STARTED + for link in e.links + ] + handler_links = [ + link + for e in handler_history.events + if e.event_type == EventType.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED + for link in e.links + ] + assert expected_forward_link in caller_links + assert expected_backward_link in handler_links + + +async def test_start_workflow_update_rejects_non_accepted_wait_for_stage( + client: Client, env: WorkflowEnvironment +) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Update workflow tests don't work with time-skipping server") + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + service_handler = TestServiceHandler() + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[service_handler], + workflows=[UpdatableWorkflow, BadUpdateStageCaller], + ): + update_workflow_id = f"updatable-workflow-{uuid.uuid4()}" + await client.start_workflow( + UpdatableWorkflow.run, id=update_workflow_id, task_queue=task_queue + ) + result = await client.execute_workflow( + BadUpdateStageCaller.run, + Input( + value=update_workflow_id, + task_queue=task_queue, + update_value="Created", + ), + task_queue=task_queue, + id=f"bad-update-stage-caller-{uuid.uuid4()}", + ) + + assert isinstance(service_handler.bad_update_stage_error, ValueError) + assert result == str(service_handler.bad_update_stage_error) + assert result == "Only ACCEPTED wait stage is supported" + + +async def test_temporal_operation_cancel_rejects_unknown_tokens(): + class FakeNexusTaskCancellation(OperationTaskCancellation): + def is_cancelled(self) -> bool: + return False + + def cancellation_reason(self) -> str | None: + return None + + def wait_until_cancelled_sync(self, timeout: float | None = None) -> bool: + return False + + async def wait_until_cancelled(self) -> None: + return None + + def cancel(self, _reason: str) -> bool: + return False + + cancel_ctx = CancelOperationContext( + service="TestService", + operation="echo", + headers={}, + task_cancellation=FakeNexusTaskCancellation(), + ) + + service_handler = TestServiceHandler() + + # Use a factory style operation form the handler to allow calling cancel directly + op_handler = service_handler.custom_cancel() + + # Invalid token type + token = OperationToken(type=30, namespace="default") # type: ignore + with pytest.raises(nexusrpc.HandlerError) as err: + await op_handler.cancel(cancel_ctx, token.encode()) + assert err.value.type == HandlerErrorType.INTERNAL + assert not err.value.retryable + underlying = err.value.__cause__ + assert isinstance(underlying, TypeError) + assert "unknown token type, got 30" in str(underlying) + + # Workflow ID missing from workflow type + token = OperationToken(type=OperationTokenType.WORKFLOW, namespace="default") + with pytest.raises(nexusrpc.HandlerError) as err: + await op_handler.cancel(cancel_ctx, token.encode()) + assert err.value.type == HandlerErrorType.INTERNAL + assert not err.value.retryable + underlying = err.value.__cause__ + assert isinstance(underlying, TypeError) + assert "expected non-empty workflow id for token type `WORKFLOW`" in str(underlying) + + # Activity ID missing from activity type + token = OperationToken(type=OperationTokenType.ACTIVITY, namespace="default") + with pytest.raises(nexusrpc.HandlerError) as err: + await op_handler.cancel(cancel_ctx, token.encode()) + assert err.value.type == HandlerErrorType.INTERNAL + assert not err.value.retryable + underlying = err.value.__cause__ + assert isinstance(underlying, TypeError) + assert "expected non-empty activity id for token type `ACTIVITY`" in str(underlying) + + activity_op_handler = service_handler.custom_cancel_activity() + for run_id in (None, ""): + token = OperationToken( + type=OperationTokenType.ACTIVITY, + namespace="default", + activity_id="activity-id", + run_id=run_id, + ) + with pytest.raises(nexusrpc.HandlerError) as err: + await activity_op_handler.cancel(cancel_ctx, token.encode()) + assert err.value.type == HandlerErrorType.INTERNAL + assert not err.value.retryable + assert not service_handler.custom_cancel_activity_called.is_set() + + +@workflow.defn +class BlockingWorkflow: + def __init__(self) -> None: + self.done: bool = False + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self.done) + + @workflow.update + async def unblock(self): + self.done = True + + @workflow.query + def query_done(self) -> bool: + return self.done + + +@workflow.defn +class QueryWorkflowCaller: + @workflow.run + async def run(self, input: Input) -> bool: + client = workflow.create_nexus_client( + service=TestService, endpoint=make_nexus_endpoint_name(input.task_queue) + ) + return await client.execute_operation(TestService.query_op, input.value) + + +async def test_temporal_operation_query_workflow( + client: Client, env: WorkflowEnvironment +) -> None: + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + target_workflow_id = f"query-target-{uuid.uuid4()}" + + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[BlockingWorkflow, QueryWorkflowCaller], + ): + target_handle = await client.start_workflow( + BlockingWorkflow.run, + id=target_workflow_id, + task_queue=task_queue, + ) + caller_handle = await client.start_workflow( + QueryWorkflowCaller.run, + Input(value=target_workflow_id, task_queue=task_queue), + id=f"query-caller-{uuid.uuid4()}", + task_queue=task_queue, + ) + + try: + assert not await caller_handle.result() + + caller_history = await caller_handle.fetch_history() + completed_event = next( + event + for event in caller_history.events + if event.event_type == EventType.EVENT_TYPE_NEXUS_OPERATION_COMPLETED + ) + + target_history = await target_handle.fetch_history() + assert not any(event.links for event in target_history.events) + + # The Java time-skipping test server does not return Nexus operation links. + if not env.supports_time_skipping_v1: + assert target_handle.result_run_id is not None + assert Link( + workflow=Link.Workflow( + namespace=client.namespace, + workflow_id=target_workflow_id, + run_id=target_handle.result_run_id, + reason="Query processed", + ) + ) in list(completed_event.links) + finally: + await target_handle.cancel() + + +@workflow.defn +class CancelBlockingWorkflowCaller: + op_started = False + + @workflow.run + async def run(self, input: Input) -> None: + client = workflow.create_nexus_client( + service=TestService, endpoint=make_nexus_endpoint_name(input.task_queue) + ) + op_handle = await client.start_operation(TestService.blocking, None) + self.op_started = True + return await op_handle + + @workflow.update + async def wait_operation_started(self): + await workflow.wait_condition(lambda: self.op_started) + + +async def test_temporal_operation_cancel_workflow( + client: Client, env: WorkflowEnvironment +): + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[BlockingWorkflow, CancelBlockingWorkflowCaller], + ): + wf_handle = await client.start_workflow( + CancelBlockingWorkflowCaller.run, + Input(value="test", task_queue=task_queue), + task_queue=task_queue, + id=f"blocking-{uuid.uuid4()}", + ) + + await wf_handle.execute_update( + CancelBlockingWorkflowCaller.wait_operation_started + ) + + await wf_handle.cancel() + + await assert_event_subsequence( + wf_handle, + [ + EventType.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED, + EventType.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED, + EventType.EVENT_TYPE_NEXUS_OPERATION_CANCELED, + ], + ) + + +async def test_customized_temporal_operation_cancel_workflow( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + service_handler = TestServiceHandler() + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[service_handler], + workflows=[BlockingWorkflow, CancelBlockingWorkflowCaller], + ): + nexus_client = client.create_nexus_client(TestService, endpoint_name) + + wf_id = f"custom-cancel-{uuid.uuid4()}" + op_handle = await nexus_client.start_operation( + TestService.custom_cancel, wf_id, id=str(uuid.uuid4()) + ) + + await service_handler.started_custom_cancel_workflow.wait() + + await op_handle.cancel() + + async def check_cancelled(): + wf_handle = client.get_workflow_handle(wf_id) + wf_desc = await wf_handle.describe() + assert wf_desc.status is WorkflowExecutionStatus.CANCELED + op_desc = await op_handle.describe() + assert op_desc.status is NexusOperationExecutionStatus.CANCELED + + await assert_eventually(check_cancelled) + + +@workflow.defn +class DoubleStartWorkflowCaller: + @workflow.run + async def run(self, input: Input) -> None: + client = workflow.create_nexus_client( + service=TestService, endpoint=make_nexus_endpoint_name(input.task_queue) + ) + op_handle = await client.start_operation(TestService.double_start, input) + return await op_handle + + +@workflow.defn +class ConcurrentStartWorkflowCaller: + @workflow.run + async def run(self, input: Input) -> str: + client = workflow.create_nexus_client( + service=TestService, endpoint=make_nexus_endpoint_name(input.task_queue) + ) + return await client.execute_operation(TestService.concurrent_start, input) + + +@workflow.defn +class FailedStartRollbackWorkflowCaller: + @workflow.run + async def run(self, input: Input) -> str: + client = workflow.create_nexus_client( + service=TestService, endpoint=make_nexus_endpoint_name(input.task_queue) + ) + return await client.execute_operation( + TestService.retry_after_failed_start, + input, + ) + + +async def test_temporal_operation_double_start_raises_handler_err( + client: Client, env: WorkflowEnvironment +): + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[EchoWorkflow, DoubleStartWorkflowCaller], + ): + with pytest.raises(WorkflowFailureError) as err: + await client.execute_workflow( + DoubleStartWorkflowCaller.run, + Input(value="test", task_queue=task_queue), + task_queue=task_queue, + id=f"double-start-{uuid.uuid4()}", + ) + + assert isinstance(err.value.cause, temporalio.exceptions.NexusOperationError) + assert isinstance(err.value.cause.cause, nexusrpc.HandlerError) + assert err.value.cause.cause.type == HandlerErrorType.BAD_REQUEST + assert ( + "Only one async operation can be started per operation handler invocation" + in err.value.cause.cause.message + ) + + +async def test_temporal_operation_concurrent_start_raises_handler_err( + client: Client, env: WorkflowEnvironment +): + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[EchoWorkflow, ConcurrentStartWorkflowCaller], + ): + result = await client.execute_workflow( + ConcurrentStartWorkflowCaller.run, + Input(value="test", task_queue=task_queue), + task_queue=task_queue, + id=f"concurrent-start-{uuid.uuid4()}", + ) + + assert result == "test" + + +async def test_temporal_operation_failed_start_allows_retry( + client: Client, env: WorkflowEnvironment +): + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + conflict_id = f"failed-start-rollback-{uuid.uuid4()}" + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[ + BlockingWorkflow, + EchoWorkflow, + FailedStartRollbackWorkflowCaller, + ], + ): + conflict_handle = await client.start_workflow( + BlockingWorkflow.run, + id=conflict_id, + task_queue=task_queue, + ) + + try: + result = await client.execute_workflow( + FailedStartRollbackWorkflowCaller.run, + Input(value=conflict_id, task_queue=task_queue), + task_queue=task_queue, + id=f"failed-start-rollback-caller-{uuid.uuid4()}", + ) + assert result == conflict_id + finally: + await conflict_handle.cancel() + + +async def test_temporal_operation_mixed_start_raises_handler_err( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[EchoWorkflow], + activities=[echo_activity], + ): + nexus_client = client.create_nexus_client(TestService, endpoint_name) + + with pytest.raises(NexusOperationFailureError) as err: + await nexus_client.execute_operation( + TestService.mixed_start, + Input(value="test", task_queue=task_queue), + id=str(uuid.uuid4()), + ) + + assert isinstance(err.value.cause, nexusrpc.HandlerError) + assert err.value.cause.type == HandlerErrorType.BAD_REQUEST + assert ( + "Only one async operation can be started per operation handler invocation" + in err.value.cause.message + ) + + +@workflow.defn +class SignalCountWorkflow: + def __init__(self) -> None: + self.count = 0 + self.done = False + + @workflow.run + async def run(self) -> int: + await workflow.wait_condition(lambda: self.done) + return self.count + + @workflow.signal + def my_signal(self) -> None: + self.count += 1 + + @workflow.signal + def finish(self) -> None: + self.done = True + + +async def test_temporal_operation_double_signal_raises_handler_err( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + target_id = f"double-signal-{uuid.uuid4()}" + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[SignalCountWorkflow], + ): + nexus_client = client.create_nexus_client(TestService, endpoint_name) + with pytest.raises(NexusOperationFailureError) as err: + await nexus_client.execute_operation( + TestService.double_signal, target_id, id=str(uuid.uuid4()) + ) + + assert isinstance(err.value.cause, nexusrpc.HandlerError) + assert err.value.cause.type == HandlerErrorType.BAD_REQUEST + assert ( + "Only one signal can be sent per Temporal operation handler invocation" + in err.value.cause.message + ) + + +async def test_temporal_operation_concurrent_signal_raises_handler_err( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + handler = TestServiceHandler() + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[handler], + workflows=[SignalCountWorkflow], + ): + handle = await client.start_workflow( + SignalCountWorkflow.run, + id=f"concurrent-signal-{uuid.uuid4()}", + task_queue=task_queue, + ) + nexus_client = client.create_nexus_client(TestService, endpoint_name) + await nexus_client.execute_operation( + TestService.concurrent_signal, handle.id, id=str(uuid.uuid4()) + ) + + [err] = [r for r in handler.concurrent_signal_results if r is not None] + assert isinstance(err, nexusrpc.HandlerError) + assert err.type == HandlerErrorType.BAD_REQUEST + + await handle.signal(SignalCountWorkflow.finish) + assert await handle.result() == 1 + + +async def test_sync_operation_signals_not_limited( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[SignalCountWorkflow], + ): + handle = await client.start_workflow( + SignalCountWorkflow.run, + id=f"unlimited-signals-{uuid.uuid4()}", + task_queue=task_queue, + ) + nexus_client = client.create_nexus_client(TestService, endpoint_name) + await nexus_client.execute_operation( + TestService.unlimited_signals, handle.id, id=str(uuid.uuid4()) + ) + + await handle.signal(SignalCountWorkflow.finish) + assert await handle.result() == 3 + + +async def test_temporal_operation_failed_signal_allows_retry( + client: Client, env: WorkflowEnvironment, monkeypatch: pytest.MonkeyPatch +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + workflow_service = env.client.workflow_service + signal_workflow_execution = workflow_service.signal_workflow_execution + lost = False + + async def lose_first_signal_response( + req: SignalWorkflowExecutionRequest, *args: Any, **kwargs: Any + ) -> SignalWorkflowExecutionResponse: + nonlocal lost + resp = await signal_workflow_execution(req, *args, **kwargs) + if not lost: + lost = True + raise temporalio.service.RPCError( + "lost response", temporalio.service.RPCStatusCode.DEADLINE_EXCEEDED, b"" + ) + return resp + + monkeypatch.setattr( + workflow_service, "signal_workflow_execution", lose_first_signal_response + ) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[SignalCountWorkflow], + ): + handle = await client.start_workflow( + SignalCountWorkflow.run, + id=f"failed-signal-{uuid.uuid4()}", + task_queue=task_queue, + ) + nexus_client = client.create_nexus_client(TestService, endpoint_name) + # The first signal was applied but reported as failed. The failure frees + # the limit, and the resend reuses the request ID so it is deduplicated. + await nexus_client.execute_operation( + TestService.signal_after_failed_signal, + handle.id, + id=str(uuid.uuid4()), + ) + + await handle.signal(SignalCountWorkflow.finish) + assert await handle.result() == 1 + + +async def test_temporal_operation_signal_deduped_across_handler_retry( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + target_id = f"signal-retry-{uuid.uuid4()}" + handler = TestServiceHandler() + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[handler], + workflows=[SignalCountWorkflow], + ): + nexus_client = client.create_nexus_client(TestService, endpoint_name) + await nexus_client.execute_operation( + TestService.signal_handler_retry, target_id, id=str(uuid.uuid4()) + ) + + request_ids = handler.signal_handler_retry_request_ids + assert len(request_ids) == 2 + assert request_ids[0] and request_ids[0] == request_ids[1] + + handle = client.get_workflow_handle(target_id) + await handle.signal(SignalCountWorkflow.finish) + assert await handle.result() == 1 + + +@workflow.defn +class SyncResultCaller: + @workflow.run + async def run(self, input: Input) -> str: + client = workflow.create_nexus_client( + service=TestService, endpoint=make_nexus_endpoint_name(input.task_queue) + ) + return await client.execute_operation(TestService.sync_result, input) + + +async def test_temporal_operation_sync_result(client: Client, env: WorkflowEnvironment): + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[SyncResultCaller], + ): + wf_handle = await client.start_workflow( + SyncResultCaller.run, + Input(value="test", task_queue=task_queue), + task_queue=task_queue, + id=str(uuid.uuid4()), + ) + result = await wf_handle.result() + assert result == "test" + + # Sync results do not produce a NEXUS_OPERATION_STARTED event, + await assert_event_subsequence( + wf_handle, + [ + EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED, + EventType.EVENT_TYPE_NEXUS_OPERATION_COMPLETED, + ], + ) + + +async def test_temporal_operation_start_activity( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + activities=[echo_activity], + ): + nexus_client = client.create_nexus_client(TestService, endpoint_name) + + result = await nexus_client.execute_operation( + TestService.echo_activity, + Input(value="test", task_queue=task_queue), + id=str(uuid.uuid4()), + ) + assert result == "test" + + +async def test_temporal_operation_backing_activity_does_not_duplicate_links( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + activity_id = f"link-activity-{uuid.uuid4()}" + + @service_handler + class LinkActivityHandler: + @nexus.temporal_operation + async def echo_activity( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[str]: + return await client.start_activity( + echo_activity, + input, + id=activity_id, + start_to_close_timeout=timedelta(seconds=5), + ) + + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[LinkActivityHandler()], + activities=[echo_activity], + ): + nexus_client = client.create_nexus_client(LinkActivityHandler, endpoint_name) + operation_handle = await nexus_client.start_operation( + LinkActivityHandler.echo_activity, + Input(value="test", task_queue=task_queue), + id=str(uuid.uuid4()), + ) + + assert await operation_handle.result() == "test" + activity_description = await client.get_activity_handle(activity_id).describe() + assert isinstance(activity_description.raw_info, ActivityExecutionInfo) + assert operation_handle.run_id is not None + callback_links = [ + link + for callback in activity_description.raw_callbacks + for link in callback.info.callback.links + ] + assert_links_match( + [*activity_description.raw_info.links, *callback_links], + expected_nexus_operation_link( + namespace=client.namespace, + operation_id=operation_handle.operation_id, + run_id=operation_handle.run_id, + ), + ) + + +async def test_temporal_operation_start_activity_raises_error( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + activities=[raise_error_activity], + ): + nexus_client = client.create_nexus_client(TestService, endpoint_name) + + with pytest.raises(NexusOperationFailureError) as err: + await nexus_client.execute_operation( + TestService.error_activity, + Input(value="test", task_queue=task_queue), + id=str(uuid.uuid4()), + ) + + application_err = err.value.__cause__ + assert isinstance(application_err, temporalio.exceptions.ApplicationError) + assert application_err.type == "test-activity-error-type" + assert "test-activity-error-message" in str(application_err) + assert application_err.__cause__ is None + + +async def test_temporal_operation_cancel_activity( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + activities=[wait_for_cancel_activity], + ): + nexus_client = client.create_nexus_client(TestService, endpoint_name) + + activity_id = f"blocking-activity-{uuid.uuid4()}" + op_handle = await nexus_client.start_operation( + TestService.blocking_activity, activity_id, id=str(uuid.uuid4()) + ) + + await op_handle.cancel() + + activity_handle = client.get_activity_handle(activity_id) + + async def check_cancelled(): + op_desc = await op_handle.describe() + assert op_desc.status is NexusOperationExecutionStatus.CANCELED + activity_desc = await activity_handle.describe() + assert activity_desc.status is ActivityExecutionStatus.CANCELED + + await assert_eventually(check_cancelled) + + +async def test_customized_temporal_operation_cancel_activity( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + service_handler = TestServiceHandler() + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[service_handler], + activities=[wait_for_cancel_activity], + ): + nexus_client = client.create_nexus_client(TestService, endpoint_name) + + activity_id = f"custom-cancel-activity-{uuid.uuid4()}" + op_handle = await nexus_client.start_operation( + TestService.custom_cancel_activity, activity_id, id=str(uuid.uuid4()) + ) + await service_handler.started_custom_cancel_activity.wait() + + await op_handle.cancel() + + activity_handle = client.get_activity_handle(activity_id) + + async def check_cancelled(): + assert service_handler.custom_cancel_activity_called.is_set() + op_desc = await op_handle.describe() + assert op_desc.status is NexusOperationExecutionStatus.CANCELED + activity_desc = await activity_handle.describe() + assert activity_desc.status is ActivityExecutionStatus.CANCELED + + await assert_eventually(check_cancelled) + + +async def test_temporal_operation_double_start_activity_raises_handler_err( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + activities=[wait_for_cancel_activity], + ): + nexus_client = client.create_nexus_client(TestService, endpoint_name) + + with pytest.raises(NexusOperationFailureError) as err: + await nexus_client.execute_operation( + TestService.double_start_activity, + Input(value="test", task_queue=task_queue), + id=str(uuid.uuid4()), + ) + + assert isinstance(err.value.cause, nexusrpc.HandlerError) + assert err.value.cause.type == HandlerErrorType.BAD_REQUEST + assert ( + "Only one async operation can be started per operation handler invocation" + in err.value.cause.message + ) + + +@dataclass +class TemporalOperationOverloadTestValue: + value: int + + +@workflow.defn +class TemporalOperationOverloadTestWorkflow: + @workflow.run + async def run( + self, input: TemporalOperationOverloadTestValue + ) -> TemporalOperationOverloadTestValue: + return TemporalOperationOverloadTestValue(value=input.value * 2) + + +@workflow.defn +class TemporalOperationOverloadTestWorkflowNoParam: + @workflow.run + async def run(self) -> TemporalOperationOverloadTestValue: + return TemporalOperationOverloadTestValue(value=0) + + +@service_handler +class TemporalOperationOverloadTestServiceHandler: + @nexus.temporal_operation + async def no_param( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + _input: TemporalOperationOverloadTestValue, + ) -> nexus.TemporalOperationResult[TemporalOperationOverloadTestValue]: + return await client.start_workflow( + TemporalOperationOverloadTestWorkflowNoParam.run, + id=str(uuid.uuid4()), + ) + + @nexus.temporal_operation + async def single_param( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: TemporalOperationOverloadTestValue, + ) -> nexus.TemporalOperationResult[TemporalOperationOverloadTestValue]: + return await client.start_workflow( + TemporalOperationOverloadTestWorkflow.run, + input, + id=str(uuid.uuid4()), + ) + + @nexus.temporal_operation + async def multi_param( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: TemporalOperationOverloadTestValue, + ) -> nexus.TemporalOperationResult[TemporalOperationOverloadTestValue]: + return await client.start_workflow( + TemporalOperationOverloadTestWorkflow.run, + args=[input], + id=str(uuid.uuid4()), + ) + + @nexus.temporal_operation + async def by_name( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: TemporalOperationOverloadTestValue, + ) -> nexus.TemporalOperationResult[TemporalOperationOverloadTestValue]: + return await client.start_workflow( + "TemporalOperationOverloadTestWorkflow", + input, + id=str(uuid.uuid4()), + result_type=TemporalOperationOverloadTestValue, + ) + + @nexus.temporal_operation + async def by_name_multi_param( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: TemporalOperationOverloadTestValue, + ) -> nexus.TemporalOperationResult[TemporalOperationOverloadTestValue]: + return await client.start_workflow( + "TemporalOperationOverloadTestWorkflow", + args=[input], + id=str(uuid.uuid4()), + result_type=TemporalOperationOverloadTestValue, + ) + + +@workflow.defn +class TemporalOperationOverloadTestCallerWorkflow: + @workflow.run + async def run( + self, op: str, input: TemporalOperationOverloadTestValue + ) -> TemporalOperationOverloadTestValue: + client = workflow.create_nexus_client( + service=TemporalOperationOverloadTestServiceHandler, + endpoint=make_nexus_endpoint_name(workflow.info().task_queue), + ) + + if op == "no_param": + return await client.execute_operation( + TemporalOperationOverloadTestServiceHandler.no_param, input + ) + elif op == "single_param": + return await client.execute_operation( + TemporalOperationOverloadTestServiceHandler.single_param, input + ) + elif op == "multi_param": + return await client.execute_operation( + TemporalOperationOverloadTestServiceHandler.multi_param, input + ) + elif op == "by_name": + return await client.execute_operation( + TemporalOperationOverloadTestServiceHandler.by_name, input + ) + elif op == "by_name_multi_param": + return await client.execute_operation( + TemporalOperationOverloadTestServiceHandler.by_name_multi_param, input + ) + else: + raise ValueError(f"Unknown op: {op}") + + +@pytest.mark.parametrize( + "op", + [ + "no_param", + "single_param", + "multi_param", + "by_name", + "by_name_multi_param", + ], +) +async def test_temporal_operation_overloads( + client: Client, env: WorkflowEnvironment, op: str +): + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + client, + task_queue=task_queue, + workflows=[ + TemporalOperationOverloadTestCallerWorkflow, + TemporalOperationOverloadTestWorkflow, + TemporalOperationOverloadTestWorkflowNoParam, + ], + nexus_service_handlers=[TemporalOperationOverloadTestServiceHandler()], + ): + result = await client.execute_workflow( + TemporalOperationOverloadTestCallerWorkflow.run, + args=[op, TemporalOperationOverloadTestValue(value=2)], + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + assert result == ( + TemporalOperationOverloadTestValue(value=0) + if op == "no_param" + else TemporalOperationOverloadTestValue(value=4) + ) + + +async def test_temporal_operation_includes_token_in_callback( + client: Client, env: WorkflowEnvironment +): + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[TestServiceHandler()], + workflows=[EchoWorkflow, EchoWorkflowCaller], + ): + input_value = f"test-{uuid.uuid4()}" + wf_handle = await client.start_workflow( + EchoWorkflowCaller.run, + Input(value=input_value, task_queue=task_queue), + task_queue=task_queue, + id=str(uuid.uuid4()), + ) + result = await wf_handle.result() + assert result == input_value + + target_handle = client.get_workflow_handle(f"echo-{input_value}") + + desc = await target_handle.describe() + token = desc.raw_description.callbacks[0].callback.nexus.header[ + "nexus-operation-token" + ] + + expected_token = OperationToken( + type=OperationTokenType.WORKFLOW, + namespace=client.namespace, + workflow_id=target_handle.id, + ).encode() + + assert token == expected_token + + +@workflow.defn +class UpdateWorkflowCaller: + """Simple caller workflow that triggers a workflow update via nexus op""" + + @workflow.run + async def run(self, input: Input) -> str: + client = workflow.create_nexus_client( + service=TestService, + endpoint=make_nexus_endpoint_name(input.task_queue), + ) + op_handle = await client.start_operation(TestService.update_op, input) + if input.expect_sync_response: + if op_handle.operation_token: + raise RuntimeError("unexpected operation token on a sync operation") + else: + if not op_handle.operation_token: + raise RuntimeError( + "unexpected empty operation token on an async operation" + ) + return await op_handle + + +@workflow.defn +class BadUpdateStageCaller: + """Caller workflow for an update op that requests an unsupported update stage.""" + + @workflow.run + async def run(self, input: Input) -> str: + client = workflow.create_nexus_client( + service=TestService, + endpoint=make_nexus_endpoint_name(input.task_queue), + ) + return await client.execute_operation(TestService.bad_update_stage_op, input) + + +@workflow.defn +class UpdatableWorkflow: + """Workflow that accepts updates and exits when it receives a specific status""" + + def __init__(self) -> None: + self.order_status = "Pending" + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self.order_status == "Completed") + # some more order processing etc + + @workflow.update + async def do_update(self, value: str) -> str: + status = self.order_status + await workflow.sleep( + timedelta(seconds=1) + ) # small sleep to ensure updates are async and backlinks are to STARTED events + self.order_status = value + update_result = f"Updated workflow status from {status} to {value}" + return update_result + + +async def test_temporal_operation_includes_activity_token_in_callback( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Standalone Nexus Operation tests don't work with time-skipping server" + ) + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + @service_handler + class ActivityTokenHandler: + @nexus.temporal_operation + async def echo_activity( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: Input, + ) -> nexus.TemporalOperationResult[str]: + return await client.start_activity( + echo_activity, + input, + id=input.value, + start_to_close_timeout=timedelta(seconds=10), + start_delay=timedelta(milliseconds=100), + ) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[ActivityTokenHandler()], + activities=[echo_activity], + ): + input_value = f"test-{uuid.uuid4()}" + + nexus_client = client.create_nexus_client(ActivityTokenHandler, endpoint_name) + + result = await nexus_client.execute_operation( + ActivityTokenHandler.echo_activity, + Input(value=input_value, task_queue=task_queue), + id=str(uuid.uuid4()), + ) + assert result == input_value + + activity_handle = client.get_activity_handle(input_value) + + desc = await activity_handle.describe() + token = desc.raw_callbacks[0].info.callback.nexus.header[ + "nexus-operation-token" + ] + + expected_token = OperationToken( + type=OperationTokenType.ACTIVITY, + namespace=client.namespace, + activity_id=input_value, + ).encode() + + assert token == expected_token diff --git a/tests/nexus/test_temporal_system_nexus.py b/tests/nexus/test_temporal_system_nexus.py new file mode 100644 index 0000000000..b54e6a9284 --- /dev/null +++ b/tests/nexus/test_temporal_system_nexus.py @@ -0,0 +1,996 @@ +from __future__ import annotations + +import dataclasses +import uuid +from collections.abc import Sequence +from datetime import timedelta +from typing import Any, cast + +import nexusrpc +import pytest +from google.protobuf.descriptor import FieldDescriptor +from google.protobuf.message import Message + +import temporalio.api.common.v1 +import temporalio.api.failure.v1 +import temporalio.api.workflowservice.v1.request_response_pb2 as workflowservice_pb2 +import temporalio.common +import temporalio.converter +import temporalio.exceptions +import temporalio.nexus.system as nexus_system +import temporalio.nexus.system.workflow_service as workflow_service +import temporalio.nexus.system.workflow_service.models as workflow_service_models +from temporalio import workflow +from temporalio.bridge._visitor import PayloadVisitor +from temporalio.bridge._visitor_functions import VisitorFunctions +from temporalio.bridge.proto.workflow_completion.workflow_completion_pb2 import ( + WorkflowActivationCompletion, +) +from temporalio.client import Client +from temporalio.converter import ( + CompositePayloadConverter, + DefaultFailureConverter, + DefaultPayloadConverter, + EncodingPayloadConverter, + ExternalStorage, + JSONPlainPayloadConverter, + PayloadCodec, + PayloadConverter, + SerializationContext, + WithSerializationContext, + WorkflowSerializationContext, +) +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import ( + Interceptor, + StartNexusOperationInput, + Worker, + WorkflowInboundInterceptor, + WorkflowInterceptorClassInput, + WorkflowOutboundInterceptor, +) +from temporalio.worker._nexus import _NexusPayloadSerializer +from temporalio.worker._workflow_instance import UnsandboxedWorkflowRunner +from tests.test_extstore import InMemoryTestDriver + +interceptor_traces: list[tuple[str, object]] = [] +SYSTEM_NEXUS_PAYLOAD_METADATA_KEY = "__temporal_system_payload" + + +@dataclasses.dataclass(frozen=True) +class _FailureTransferValue: + error: BaseException + + +class _FailureTransferValueConverter( + temporalio.converter.TransferTypeConverter[ + _FailureTransferValue, temporalio.api.failure.v1.Failure + ] +): + transfer_type = temporalio.api.failure.v1.Failure + + def to_transfer_type( + self, value: _FailureTransferValue + ) -> temporalio.api.failure.v1.Failure: + failure = temporalio.api.failure.v1.Failure() + nexus_system._current_user_failure_converter().to_failure( + value.error, + nexus_system._current_user_payload_converter(), + failure, + ) + return failure + + def from_transfer_type( + self, + value: temporalio.api.failure.v1.Failure, + type_hint: type[_FailureTransferValue], + ) -> _FailureTransferValue: + assert type_hint is _FailureTransferValue + return _FailureTransferValue( + nexus_system._current_user_failure_converter().from_failure( + value, + nexus_system._current_user_payload_converter(), + ) + ) + + +temporalio.converter.transfer_type_convertible(_FailureTransferValueConverter)( + _FailureTransferValue +) + + +class _TrackingFailureConverter(temporalio.converter.DefaultFailureConverter): + def __init__( + self, expected_payload_converter: temporalio.converter.PayloadConverter + ) -> None: + super().__init__() + self.expected_payload_converter = expected_payload_converter + self.to_failure_calls = 0 + self.from_failure_calls = 0 + + def to_failure( + self, + exception: BaseException, + payload_converter: temporalio.converter.PayloadConverter, + failure: temporalio.api.failure.v1.Failure, + ) -> None: + assert payload_converter is self.expected_payload_converter + self.to_failure_calls += 1 + super().to_failure(exception, payload_converter, failure) + + def from_failure( + self, + failure: temporalio.api.failure.v1.Failure, + payload_converter: temporalio.converter.PayloadConverter, + ) -> BaseException: + assert payload_converter is self.expected_payload_converter + self.from_failure_calls += 1 + return super().from_failure(failure, payload_converter) + + +@workflow.defn +class ExternalHandleSignalWithStartWorkflowCaller: + @workflow.run + async def run(self, task_queue: str) -> str: + started_handle = await workflow.signal_with_start_workflow( + "test-workflow", + "workflow-input", + id="system-nexus-workflow-id", + task_queue=task_queue, + signal="test-signal", + signal_args=["signal-input"], + memo={"memo-key": "memo-value"}, + static_summary="summary-value", + static_details="details-value", + ) + return started_handle.id + + +def test_signal_with_start_serialization_context() -> None: + request = workflow_service_models.SignalWithStartWorkflowRequest( + workflow="test-workflow", + id="target-workflow-id", + task_queue="target-task-queue", + signal="test-signal", + namespace="target-namespace", + ) + operation_info = workflow_service.__nexus_operation_registry__[ + ( + "temporal.api.workflowservice.v1.WorkflowService", + "SignalWithStartWorkflowExecution", + ) + ] + + assert operation_info.serialization_context is not None + context = nexus_system._get_serialization_context( + "temporal.api.workflowservice.v1.WorkflowService", + "SignalWithStartWorkflowExecution", + request, + ) + assert isinstance(context, WorkflowSerializationContext) + assert context.namespace == "target-namespace" + assert context.workflow_id == "target-workflow-id" + + +class RejectOuterSystemNexusCodec(PayloadCodec): + def __init__(self) -> None: + self.encode_count = 0 + self.decode_count = 0 + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + encoded: list[temporalio.api.common.v1.Payload] = [] + for payload in payloads: + if ( + payload.metadata.get("encoding") == b"binary/protobuf" + and payload.metadata.get("messageType") + == b"temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest" + ): + raise RuntimeError( + "outer system nexus envelope should not be codec encoded" + ) + self.encode_count += 1 + encoded.append( + temporalio.api.common.v1.Payload( + metadata={**payload.metadata, "test-codec": b"true"}, + data=payload.data, + ) + ) + return encoded + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + decoded: list[temporalio.api.common.v1.Payload] = [] + for payload in payloads: + if ( + payload.metadata.get("encoding") == b"binary/protobuf" + and payload.metadata.get("messageType") + == b"temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest" + ): + raise RuntimeError( + "outer system nexus envelope should not be codec decoded" + ) + self.decode_count += 1 + decoded.append(payload) + return decoded + + +class CaptureSystemNexusPayloadContextCodec(PayloadCodec, WithSerializationContext): + def __init__( + self, + captured_contexts: list[SerializationContext | None], + context: SerializationContext | None = None, + ) -> None: + self._captured_contexts = captured_contexts + self._context = context + + def with_context( + self, context: SerializationContext + ) -> CaptureSystemNexusPayloadContextCodec: + return CaptureSystemNexusPayloadContextCodec(self._captured_contexts, context) + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + for payload in payloads: + if payload.data in {b'"workflow-input"', b'"signal-input"'}: + self._captured_contexts.append(self._context) + return list(payloads) + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return list(payloads) + + +@dataclasses.dataclass +class ContextValue: + value: str + + +class ContextPayloadConverter(EncodingPayloadConverter, WithSerializationContext): + def __init__( + self, + contexts: list[SerializationContext | None], + context: SerializationContext | None = None, + ) -> None: + self.contexts = contexts + self.context = context + + @property + def encoding(self) -> str: + return "test-context" + + def with_context(self, context: SerializationContext) -> ContextPayloadConverter: + return ContextPayloadConverter(self.contexts, context) + + def to_payload(self, value: Any) -> temporalio.api.common.v1.Payload | None: + if not isinstance(value, ContextValue): + return None + self.contexts.append(self.context) + payload = JSONPlainPayloadConverter().to_payload(value) + assert payload is not None + payload.metadata["encoding"] = self.encoding.encode() + return payload + + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type | None = None, + ) -> Any: + return JSONPlainPayloadConverter().from_payload(payload, type_hint) + + +class ContextPayloadConverterSet(CompositePayloadConverter): + def __init__(self) -> None: + self.contexts: list[SerializationContext | None] = [] + super().__init__( + ContextPayloadConverter(self.contexts), + *DefaultPayloadConverter.default_encoding_payload_converters, + ) + + +class ContextFailureConverter(DefaultFailureConverter, WithSerializationContext): + def __init__(self, context: SerializationContext | None = None) -> None: + super().__init__() + self.context = context + + def with_context(self, context: SerializationContext) -> ContextFailureConverter: + return ContextFailureConverter(context) + + +class ContextPayloadCodec(PayloadCodec, WithSerializationContext): + def __init__( + self, + contexts: list[SerializationContext | None], + context: SerializationContext | None = None, + ) -> None: + self.contexts = contexts + self.context = context + + def with_context(self, context: SerializationContext) -> ContextPayloadCodec: + return ContextPayloadCodec(self.contexts, context) + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + for payload in payloads: + if payload.metadata.get("encoding") == b"test-context": + self.contexts.append(self.context) + return list(payloads) + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return list(payloads) + + +@workflow.defn +class ContextSignalWithStartWorkflowCaller: + @workflow.run + async def run(self, task_queue: str) -> str: + handle = await workflow.signal_with_start_workflow( + "test-workflow", + ContextValue("workflow-input"), + id="system-nexus-workflow-id", + task_queue=task_queue, + signal="test-signal", + signal_args=[ContextValue("signal-input")], + ) + return handle.id + + +class TracingWorkflowInterceptor(Interceptor): + def workflow_interceptor_class( + self, input: WorkflowInterceptorClassInput + ) -> type[WorkflowInboundInterceptor] | None: + return _TracingWorkflowInboundInterceptor + + +class _TracingWorkflowInboundInterceptor(WorkflowInboundInterceptor): + def init(self, outbound: WorkflowOutboundInterceptor) -> None: + super().init(_TracingWorkflowOutboundInterceptor(outbound)) + + +class _TracingWorkflowOutboundInterceptor(WorkflowOutboundInterceptor): + async def start_signal_with_start_workflow( + self, request: workflow_service_models.SignalWithStartWorkflowRequest + ) -> workflow.NexusOperationHandle[ + workflow_service_models.SignalWithStartWorkflowResponse + ]: + request.headers = {**(request.headers or {}), "interceptor-header": "value"} + interceptor_traces.append( + ("workflow.start_signal_with_start_workflow", request) + ) + return await super().start_signal_with_start_workflow(request) + + async def start_system_nexus_operation( + self, + input: StartNexusOperationInput[Any, Any], + ) -> workflow.NexusOperationHandle[Any]: + interceptor_traces.append(("workflow.start_system_nexus_operation", input)) + return await super().start_system_nexus_operation(input) + + +def _assert_stored_payloads_include( + driver: InMemoryTestDriver, expected_payload_data: set[bytes] +) -> None: + stored_payload_data: set[bytes] = set() + for stored_payload_bytes in driver._storage.values(): + stored_payload = temporalio.api.common.v1.Payload() + stored_payload.ParseFromString(stored_payload_bytes) + assert stored_payload.metadata["test-codec"] == b"true" + stored_payload_data.add(stored_payload.data) + assert expected_payload_data.issubset(stored_payload_data) + + +def _assert_signal_with_start_workflow_interceptor_trace() -> None: + assert len(interceptor_traces) == 2 + trace_name, trace_value = interceptor_traces.pop(0) + assert trace_name == "workflow.start_signal_with_start_workflow" + request = cast(workflow_service_models.SignalWithStartWorkflowRequest, trace_value) + assert request.id == "system-nexus-workflow-id" + assert request.signal == "test-signal" + assert request.workflow == "test-workflow" + assert request.headers == {"interceptor-header": "value"} + trace_name, trace_value = interceptor_traces.pop() + assert trace_name == "workflow.start_system_nexus_operation" + system_input = cast(StartNexusOperationInput[Any, Any], trace_value) + assert system_input.input is request + assert system_input.headers is None + + +class _MarkingPayloadVisitor(VisitorFunctions): + def __init__(self) -> None: + self.visited_payload_count = 0 + self.system_envelope_count = 0 + + async def visit_payload(self, payload: temporalio.api.common.v1.Payload) -> None: + self.visited_payload_count += 1 + payload.metadata["visited"] = b"true" + + async def visit_payloads( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> None: + for payload in payloads: + await self.visit_payload(payload) + + async def visit_system_nexus_envelope( + self, payload: temporalio.api.common.v1.Payload + ) -> None: + _ = payload + self.system_envelope_count += 1 + + +def _new_schedule_nexus_completion( + endpoint: str, payload: temporalio.api.common.v1.Payload +) -> WorkflowActivationCompletion: + completion = WorkflowActivationCompletion() + command = completion.successful.commands.add() + schedule = command.schedule_nexus_operation + schedule.seq = 1 + schedule.endpoint = endpoint + schedule.service = "not-a-registered-system-service" + schedule.operation = "NotARegisteredSystemOperation" + schedule.input.CopyFrom(payload) + return completion + + +def _new_system_nexus_request_payload() -> temporalio.api.common.v1.Payload: + data_converter = temporalio.converter.default() + nested_payload = data_converter.payload_converter.to_payload("workflow-input") + assert nested_payload is not None + request = workflowservice_pb2.SignalWithStartWorkflowExecutionRequest() + request.input.payloads.add().CopyFrom(nested_payload) + payload = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ).to_payload(request) + assert payload is not None + return payload + + +def _new_unmarked_system_nexus_request_payload() -> temporalio.api.common.v1.Payload: + payload = _new_system_nexus_request_payload() + del payload.metadata[SYSTEM_NEXUS_PAYLOAD_METADATA_KEY] + return payload + + +@pytest.mark.parametrize( + "versioning_override", + [ + None, + temporalio.common.PinnedVersioningOverride( + temporalio.common.WorkerDeploymentVersion("deployment", "build") + ), + temporalio.common.AutoUpgradeVersioningOverride(), + temporalio.common.OneTimeVersioningOverride( + temporalio.common.WorkerDeploymentVersion("deployment", "build") + ), + ], + ids=["absent", "pinned", "auto-upgrade", "one-time"], +) +async def test_nexus_payload_serializer_decodes_system_input( + versioning_override: temporalio.common.VersioningOverride | None, +) -> None: + """A marked system request is decoded into its generated Nexus model.""" + data_converter = temporalio.converter.default() + request = workflow_service_models.SignalWithStartWorkflowRequest( + workflow="test-workflow", + args=["workflow-input"], + id="target-workflow-id", + task_queue="target-task-queue", + signal="test-signal", + namespace="target-namespace", + headers={"test-header": "header-value"}, + versioning_override=versioning_override, + ) + payload = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ).to_payload(request) + assert payload is not None + assert payload.metadata[SYSTEM_NEXUS_PAYLOAD_METADATA_KEY] == b"true" + assert payload.metadata["encoding"] == b"binary/protobuf" + + decoded = await _NexusPayloadSerializer( + data_converter=data_converter, + payload=payload, + ).deserialize( + nexusrpc.Content(headers={}, data=b""), + as_type=workflow_service_models.SignalWithStartWorkflowRequest, + ) + + assert decoded == request + + +async def test_nexus_payload_serializer_codec_skips_outer_envelope() -> None: + """The codec decodes nested user payloads but not the outer system envelope.""" + codec = RejectOuterSystemNexusCodec() + data_converter = dataclasses.replace( + temporalio.converter.default(), + payload_codec=codec, + ) + request = workflow_service_models.SignalWithStartWorkflowRequest( + workflow="test-workflow", + args=["workflow-input"], + id="target-workflow-id", + task_queue="target-task-queue", + signal="test-signal", + namespace="target-namespace", + ) + payload = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ).to_payload(request) + assert payload is not None + + decoded = await _NexusPayloadSerializer( + data_converter=data_converter, + payload=payload, + ).deserialize( + nexusrpc.Content(headers={}, data=b""), + as_type=workflow_service_models.SignalWithStartWorkflowRequest, + ) + + assert codec.decode_count == 1 + assert codec.encode_count == 0 + assert decoded == request + + +async def test_nexus_payload_serializer_uses_user_converter() -> None: + """An unmarked Nexus input continues to use the configured user converter.""" + data_converter = temporalio.converter.default() + payload = data_converter.payload_converter.to_payload("ordinary-input") + assert payload is not None + assert SYSTEM_NEXUS_PAYLOAD_METADATA_KEY not in payload.metadata + + decoded = await _NexusPayloadSerializer( + data_converter=data_converter, + payload=payload, + ).deserialize( + nexusrpc.Content(headers={}, data=b""), + as_type=str, + ) + + assert decoded == "ordinary-input" + + +async def test_schedule_marked_system_nexus_payload_ignores_endpoint() -> None: + completion = _new_schedule_nexus_completion( + "not-the-system-endpoint", + _new_system_nexus_request_payload(), + ) + visitor = _MarkingPayloadVisitor() + + await PayloadVisitor().visit(visitor, completion) + + schedule = completion.successful.commands[0].schedule_nexus_operation + data_converter = temporalio.converter.default() + decoded = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ).from_payload(schedule.input) + assert isinstance( + decoded, workflowservice_pb2.SignalWithStartWorkflowExecutionRequest + ) + assert decoded.input.payloads[0].metadata["visited"] == b"true" + assert "visited" not in schedule.input.metadata + assert visitor.visited_payload_count == 1 + assert visitor.system_envelope_count == 1 + + +async def test_schedule_unmarked_system_nexus_payload_visits_input_as_regular_payload() -> ( + None +): + completion = _new_schedule_nexus_completion( + nexus_system.TEMPORAL_SYSTEM_ENDPOINT, + _new_unmarked_system_nexus_request_payload(), + ) + visitor = _MarkingPayloadVisitor() + + await PayloadVisitor().visit(visitor, completion) + + schedule = completion.successful.commands[0].schedule_nexus_operation + assert schedule.input.metadata["visited"] == b"true" + data_converter = temporalio.converter.default() + decoded = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ).from_payload(schedule.input) + assert isinstance( + decoded, workflowservice_pb2.SignalWithStartWorkflowExecutionRequest + ) + assert "visited" not in decoded.input.payloads[0].metadata + assert visitor.visited_payload_count == 1 + assert visitor.system_envelope_count == 0 + + +def _build_proto_sample(message_type: type[Message]) -> Message: + message = message_type() + _populate_proto_sample(message) + return message + + +def _populate_proto_sample(message: Message, *, path: str = "value") -> None: + seen_oneofs: set[str] = set() + for raw_field in message.DESCRIPTOR.fields: + field = cast(FieldDescriptor, raw_field) + if field.containing_oneof is not None: + if field.containing_oneof.name in seen_oneofs: + continue + seen_oneofs.add(field.containing_oneof.name) + if _field_is_repeated(field): + if ( + field.message_type is not None + and field.message_type.GetOptions().map_entry + ): + _populate_proto_map_entry(message, field, path=path) + elif field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE: + _populate_proto_sample( + getattr(message, field.name).add(), + path=f"{path}.{field.name}[0]", + ) + else: + getattr(message, field.name).append( + _proto_scalar_sample(field, path=f"{path}.{field.name}[0]") + ) + elif field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE: + _populate_proto_sample( + getattr(message, field.name), + path=f"{path}.{field.name}", + ) + else: + setattr( + message, + field.name, + _proto_scalar_sample(field, path=f"{path}.{field.name}"), + ) + + +def _populate_proto_map_entry( + message: Message, + field: FieldDescriptor, + *, + path: str, +) -> None: + message_type = field.message_type + assert message_type is not None + key_field = message_type.fields_by_name["key"] + value_field = message_type.fields_by_name["value"] + key = _proto_scalar_sample(key_field, path=f"{path}.{field.name}.key") + container = getattr(message, field.name) + if value_field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE: + _populate_proto_sample( + container[key], + path=f"{path}.{field.name}[{key!r}]", + ) + else: + container[key] = _proto_scalar_sample( + value_field, + path=f"{path}.{field.name}[{key!r}]", + ) + + +def _proto_scalar_sample(field: FieldDescriptor, *, path: str) -> Any: + if field.type == FieldDescriptor.TYPE_BYTES: + return b"test" + if field.cpp_type == FieldDescriptor.CPPTYPE_STRING: + return f"{path}-value" + if field.cpp_type == FieldDescriptor.CPPTYPE_BOOL: + return True + if field.cpp_type in ( + FieldDescriptor.CPPTYPE_INT32, + FieldDescriptor.CPPTYPE_INT64, + FieldDescriptor.CPPTYPE_UINT32, + FieldDescriptor.CPPTYPE_UINT64, + ): + return 1 + if field.cpp_type in ( + FieldDescriptor.CPPTYPE_FLOAT, + FieldDescriptor.CPPTYPE_DOUBLE, + ): + return 1.5 + if field.cpp_type == FieldDescriptor.CPPTYPE_ENUM: + enum_type = field.enum_type + assert enum_type is not None + for enum_value in enum_type.values: + if enum_value.number != 0: + return enum_value.number + return enum_type.values[0].number + raise TypeError(f"Unhandled proto scalar sample at {path}: {field!r}") + + +def _field_is_repeated(field: FieldDescriptor) -> bool: + is_repeated = getattr(field, "is_repeated", None) + if is_repeated is not None: + return bool(is_repeated) + return getattr(field, "label") == FieldDescriptor.LABEL_REPEATED + + +@pytest.mark.parametrize( + "message_type", + [ + workflowservice_pb2.SignalWithStartWorkflowExecutionRequest, + workflowservice_pb2.SignalWithStartWorkflowExecutionResponse, + ], +) +def test_system_nexus_proto_roundtrip(message_type: type[Message]) -> None: + data_converter = temporalio.converter.default() + payload_converter = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ) + proto_value = _build_proto_sample(message_type) + payload = payload_converter.to_payload(proto_value) + assert payload is not None + assert payload.metadata["encoding"] == b"binary/protobuf" + assert payload.metadata["messageType"] == message_type.DESCRIPTOR.full_name.encode() + assert payload.metadata[SYSTEM_NEXUS_PAYLOAD_METADATA_KEY] == b"true" + roundtripped = payload_converter.from_payload(payload, message_type) + assert isinstance(roundtripped, message_type) + assert roundtripped == proto_value + + +def test_system_nexus_uses_user_failure_converter() -> None: + payload_converter = temporalio.converter.default().payload_converter + failure_converter = _TrackingFailureConverter(payload_converter) + system_converter = nexus_system._get_payload_converter( + payload_converter, failure_converter + ) + + payload = system_converter.to_payload( + _FailureTransferValue(RuntimeError("test failure")) + ) + converted = system_converter.from_payload(payload, _FailureTransferValue) + + assert isinstance(converted, _FailureTransferValue) + assert isinstance(converted.error, temporalio.exceptions.ApplicationError) + assert converted.error.message == "test failure" + assert converted.error.type == "RuntimeError" + assert failure_converter.to_failure_calls == 1 + assert failure_converter.from_failure_calls == 1 + with pytest.raises(RuntimeError, match="converter context is not active"): + nexus_system._current_user_payload_converter() + with pytest.raises(RuntimeError, match="converter context is not active"): + nexus_system._current_user_failure_converter() + + +def test_system_nexus_payload_converter_restores_user_context_on_failure() -> None: + outer_data_converter = temporalio.converter.default() + outer_converters = nexus_system._SystemNexusUserConverters( + outer_data_converter.payload_converter, + outer_data_converter.failure_converter, + ) + inner_data_converter = temporalio.converter.DataConverter() + + class RaisingFailureConverter(temporalio.converter.DefaultFailureConverter): + def to_failure( + self, + exception: BaseException, + payload_converter: temporalio.converter.PayloadConverter, + failure: temporalio.api.failure.v1.Failure, + ) -> None: + assert payload_converter is inner_data_converter.payload_converter + raise ValueError("conversion failed") + + inner_system_converter = nexus_system._get_payload_converter( + inner_data_converter.payload_converter, + RaisingFailureConverter(), + ) + + with nexus_system._user_converter_context(outer_converters): + assert nexus_system._current_user_converters() is outer_converters + with pytest.raises(ValueError, match="conversion failed"): + inner_system_converter.to_payload( + _FailureTransferValue(RuntimeError("test failure")) + ) + assert nexus_system._current_user_converters() is outer_converters + + with pytest.raises(RuntimeError, match="converter context is not active"): + nexus_system._current_user_converters() + + +# Cloud namespaces created by CI do not have the System Nexus dynamic config. +@pytest.mark.requires_local_server +async def test_external_workflow_handle_signal_with_start_workflow_uses_system_nexus( + env: WorkflowEnvironment, +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + codec = RejectOuterSystemNexusCodec() + interceptor_traces.clear() + driver = InMemoryTestDriver() + caller_config = env.client.config() + caller_config["data_converter"] = dataclasses.replace( + temporalio.converter.default(), + payload_codec=codec, + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=1, + ), + ) + caller_client = Client(**caller_config) + caller_task_queue = str(uuid.uuid4()) + handler_task_queue = str(uuid.uuid4()) + + caller_worker = Worker( + caller_client, + task_queue=caller_task_queue, + workflows=[ExternalHandleSignalWithStartWorkflowCaller], + workflow_runner=UnsandboxedWorkflowRunner(), + interceptors=[TracingWorkflowInterceptor()], + ) + + async with caller_worker: + result = await caller_client.execute_workflow( + ExternalHandleSignalWithStartWorkflowCaller.run, + args=[handler_task_queue], + id=str(uuid.uuid4()), + task_queue=caller_task_queue, + execution_timeout=timedelta(seconds=5), + ) + + assert result == "system-nexus-workflow-id" + assert codec.encode_count >= 5 + _assert_stored_payloads_include( + driver, + { + b'"workflow-input"', + b'"signal-input"', + b'"memo-value"', + b'"summary-value"', + b'"details-value"', + }, + ) + _assert_signal_with_start_workflow_interceptor_trace() + + +# Cloud namespaces created by CI do not have the System Nexus dynamic config. +@pytest.mark.requires_local_server +async def test_signal_with_start_uses_target_workflow_serialization_context( + env: WorkflowEnvironment, + monkeypatch: pytest.MonkeyPatch, +) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + captured_contexts: list[SerializationContext | None] = [] + system_payload_converter_wrap_count = 0 + original_get_payload_converter = nexus_system._get_payload_converter + + def capture_get_payload_converter( + user_payload_converter: temporalio.converter.PayloadConverter, + user_failure_converter: temporalio.converter.FailureConverter, + ) -> temporalio.converter.PayloadConverter: + nonlocal system_payload_converter_wrap_count + system_payload_converter_wrap_count += 1 + return original_get_payload_converter( + user_payload_converter, user_failure_converter + ) + + monkeypatch.setattr( + nexus_system, "_get_payload_converter", capture_get_payload_converter + ) + caller_config = env.client.config() + caller_config["data_converter"] = dataclasses.replace( + temporalio.converter.default(), + payload_codec=CaptureSystemNexusPayloadContextCodec(captured_contexts), + ) + caller_client = Client(**caller_config) + caller_task_queue = str(uuid.uuid4()) + target_workflow_id = "system-nexus-workflow-id" + + async with Worker( + caller_client, + task_queue=caller_task_queue, + workflows=[ExternalHandleSignalWithStartWorkflowCaller], + workflow_runner=UnsandboxedWorkflowRunner(), + ): + result = await caller_client.execute_workflow( + ExternalHandleSignalWithStartWorkflowCaller.run, + args=[str(uuid.uuid4())], + id=str(uuid.uuid4()), + task_queue=caller_task_queue, + execution_timeout=timedelta(seconds=5), + ) + + assert result == target_workflow_id + assert system_payload_converter_wrap_count >= 2 + assert len(captured_contexts) >= 2 + assert all( + isinstance(context, WorkflowSerializationContext) + and context.workflow_id == target_workflow_id + for context in captured_contexts + ) + + +@pytest.mark.requires_local_server +@pytest.mark.parametrize("use_operation_context", [True, False]) +async def test_signal_with_start_uses_operation_context_for_converter_and_codec( + env: WorkflowEnvironment, + monkeypatch: pytest.MonkeyPatch, + use_operation_context: bool, +) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + failure_converter_contexts: list[SerializationContext | None] = [] + original_get_payload_converter = nexus_system._get_payload_converter + + def capture_failure_converter_context( + internal_payload_converter: temporalio.converter.PayloadConverter, + user_failure_converter: temporalio.converter.FailureConverter, + ) -> temporalio.converter.PayloadConverter: + assert isinstance(user_failure_converter, ContextFailureConverter) + failure_converter_contexts.append(user_failure_converter.context) + return original_get_payload_converter( + internal_payload_converter, user_failure_converter + ) + + monkeypatch.setattr( + nexus_system, + "_get_payload_converter", + capture_failure_converter_context, + ) + if not use_operation_context: + monkeypatch.setattr( + nexus_system, + "_get_serialization_context", + lambda _service, _operation, _request: None, + ) + + codec_contexts: list[SerializationContext | None] = [] + payload_converter = ContextPayloadConverterSet() + caller_config = env.client.config() + caller_config["data_converter"] = dataclasses.replace( + temporalio.converter.default(), + payload_converter_class=cast(type[PayloadConverter], lambda: payload_converter), + payload_codec=ContextPayloadCodec(codec_contexts), + failure_converter_class=ContextFailureConverter, + ) + caller_client = Client(**caller_config) + caller_task_queue = str(uuid.uuid4()) + target_workflow_id = "system-nexus-workflow-id" + + async with Worker( + caller_client, + task_queue=caller_task_queue, + workflows=[ContextSignalWithStartWorkflowCaller], + workflow_runner=UnsandboxedWorkflowRunner(), + ): + result = await caller_client.execute_workflow( + ContextSignalWithStartWorkflowCaller.run, + caller_task_queue, + id=str(uuid.uuid4()), + task_queue=caller_task_queue, + execution_timeout=timedelta(seconds=5), + ) + + assert result == target_workflow_id + assert len(payload_converter.contexts) >= 2 + assert len(codec_contexts) >= 2 + assert failure_converter_contexts + if use_operation_context: + assert all( + isinstance(context, WorkflowSerializationContext) + and context.workflow_id == target_workflow_id + for context in payload_converter.contexts + ), payload_converter.contexts + assert all( + isinstance(context, WorkflowSerializationContext) + and context.workflow_id == target_workflow_id + for context in codec_contexts + ), codec_contexts + assert all( + isinstance(context, WorkflowSerializationContext) + and context.workflow_id == target_workflow_id + for context in failure_converter_contexts + ), failure_converter_contexts + else: + assert all(context is None for context in payload_converter.contexts) + assert all(context is None for context in codec_contexts) + assert all(context is None for context in failure_converter_contexts) diff --git a/tests/nexus/test_type_errors.py b/tests/nexus/test_type_errors.py deleted file mode 100644 index 1f5d3e2a7b..0000000000 --- a/tests/nexus/test_type_errors.py +++ /dev/null @@ -1,207 +0,0 @@ -""" -This file exists to test for type-checker false positives and false negatives. -It doesn't contain any test functions. -""" - -from dataclasses import dataclass - -import nexusrpc - -import temporalio.nexus -from temporalio import workflow - - -@dataclass -class MyInput: - pass - - -@dataclass -class MyOutput: - pass - - -@nexusrpc.service -class MyService: - my_sync_operation: nexusrpc.Operation[MyInput, MyOutput] - my_workflow_run_operation: nexusrpc.Operation[MyInput, MyOutput] - - -@nexusrpc.handler.service_handler(service=MyService) -class MyServiceHandler: - @nexusrpc.handler.sync_operation - async def my_sync_operation( - self, _ctx: nexusrpc.handler.StartOperationContext, _input: MyInput - ) -> MyOutput: - raise NotImplementedError - - @temporalio.nexus.workflow_run_operation - async def my_workflow_run_operation( - self, _ctx: temporalio.nexus.WorkflowRunOperationContext, _input: MyInput - ) -> temporalio.nexus.WorkflowHandle[MyOutput]: - raise NotImplementedError - - -@nexusrpc.handler.service_handler(service=MyService) -class MyServiceHandler2: - @nexusrpc.handler.sync_operation - async def my_sync_operation( - self, _ctx: nexusrpc.handler.StartOperationContext, _input: MyInput - ) -> MyOutput: - raise NotImplementedError - - @temporalio.nexus.workflow_run_operation - async def my_workflow_run_operation( - self, _ctx: temporalio.nexus.WorkflowRunOperationContext, _input: MyInput - ) -> temporalio.nexus.WorkflowHandle[MyOutput]: - raise NotImplementedError - - -@nexusrpc.handler.service_handler -class MyServiceHandlerWithoutServiceDefinition: - @nexusrpc.handler.sync_operation - async def my_sync_operation( - self, _ctx: nexusrpc.handler.StartOperationContext, _input: MyInput - ) -> MyOutput: - raise NotImplementedError - - @temporalio.nexus.workflow_run_operation - async def my_workflow_run_operation( - self, _ctx: temporalio.nexus.WorkflowRunOperationContext, _input: MyInput - ) -> temporalio.nexus.WorkflowHandle[MyOutput]: - raise NotImplementedError - - -@workflow.defn -class MyWorkflow1: - @workflow.run - async def test_invoke_by_operation_definition_happy_path(self) -> None: - """ - When a nexus client calls an operation by referencing an operation definition on - a service definition, the output type is inferred correctly. - """ - nexus_client = workflow.create_nexus_client( - service=MyService, - endpoint="fake-endpoint", - ) - input = MyInput() - - # sync operation - _output_1: MyOutput = await nexus_client.execute_operation( - MyService.my_sync_operation, input - ) - _handle_1: workflow.NexusOperationHandle[ - MyOutput - ] = await nexus_client.start_operation(MyService.my_sync_operation, input) - _output_1_1: MyOutput = await _handle_1 - - # workflow run operation - _output_2: MyOutput = await nexus_client.execute_operation( - MyService.my_workflow_run_operation, input - ) - _handle_2: workflow.NexusOperationHandle[ - MyOutput - ] = await nexus_client.start_operation( - MyService.my_workflow_run_operation, input - ) - _output_2_1: MyOutput = await _handle_2 - - -@workflow.defn -class MyWorkflow2: - @workflow.run - async def test_invoke_by_operation_handler_happy_path(self) -> None: - """ - When a nexus client calls an operation by referencing an operation handler on a - service handler, the output type is inferred correctly. - """ - nexus_client = workflow.create_nexus_client( - service=MyServiceHandler, # MyService would also work - endpoint="fake-endpoint", - ) - input = MyInput() - - # sync operation - _output_1: MyOutput = await nexus_client.execute_operation( - MyServiceHandler.my_sync_operation, input - ) - _handle_1: workflow.NexusOperationHandle[ - MyOutput - ] = await nexus_client.start_operation( - MyServiceHandler.my_sync_operation, input - ) - _output_1_1: MyOutput = await _handle_1 - - # workflow run operation - _output_2: MyOutput = await nexus_client.execute_operation( - MyServiceHandler.my_workflow_run_operation, input - ) - _handle_2: workflow.NexusOperationHandle[ - MyOutput - ] = await nexus_client.start_operation( - MyServiceHandler.my_workflow_run_operation, input - ) - _output_2_1: MyOutput = await _handle_2 - - -@workflow.defn -class MyWorkflow3: - @workflow.run - async def test_invoke_by_operation_definition_wrong_input_type(self) -> None: - """ - When a nexus client calls an operation by referencing an operation definition on - a service definition, there is a type error if the input type is wrong. - """ - nexus_client = workflow.create_nexus_client( - service=MyService, - endpoint="fake-endpoint", - ) - # assert-type-error-pyright: 'No overloads for "execute_operation" match' - await nexus_client.execute_operation( # type: ignore - MyService.my_sync_operation, - # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "input"' - "wrong-input-type", # type: ignore - ) - - -@workflow.defn -class MyWorkflow4: - @workflow.run - async def test_invoke_by_operation_handler_wrong_input_type(self) -> None: - """ - When a nexus client calls an operation by referencing an operation handler on a - service handler, there is a type error if the input type is wrong. - """ - nexus_client = workflow.create_nexus_client( - service=MyServiceHandler, - endpoint="fake-endpoint", - ) - # assert-type-error-pyright: 'No overloads for "execute_operation" match' - await nexus_client.execute_operation( # type: ignore - MyServiceHandler.my_sync_operation, # type: ignore[arg-type] - # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "input"' - "wrong-input-type", # type: ignore - ) - - -@workflow.defn -class MyWorkflow5: - @workflow.run - async def test_invoke_by_operation_handler_method_on_wrong_service(self) -> None: - """ - When a nexus client calls an operation by referencing an operation handler method - on a service handler, there is a type error if the method does not belong to the - service for which the client was created. - - (This form of type safety is not available when referencing an operation definition) - """ - nexus_client = workflow.create_nexus_client( - service=MyServiceHandler, - endpoint="fake-endpoint", - ) - # assert-type-error-pyright: 'No overloads for "execute_operation" match' - await nexus_client.execute_operation( # type: ignore - # assert-type-error-pyright: 'Argument of type .+ cannot be assigned to parameter "operation"' - MyServiceHandler2.my_sync_operation, # type: ignore - MyInput(), - ) diff --git a/tests/nexus/test_use_existing_conflict_policy.py b/tests/nexus/test_use_existing_conflict_policy.py index 211ed4f5c1..8ffa9f8f82 100644 --- a/tests/nexus/test_use_existing_conflict_policy.py +++ b/tests/nexus/test_use_existing_conflict_policy.py @@ -3,7 +3,6 @@ import asyncio import uuid from dataclasses import dataclass -from typing import Optional import pytest from nexusrpc.handler import service_handler @@ -13,7 +12,11 @@ from temporalio.common import WorkflowIDConflictPolicy from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from tests.helpers.nexus import make_nexus_endpoint_name + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server @dataclass @@ -92,9 +95,6 @@ async def nexus_operations_have_started(self) -> None: async def test_multiple_operation_invocations_can_connect_to_same_handler_workflow( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - task_queue = str(uuid.uuid4()) workflow_id = str(uuid.uuid4()) @@ -104,7 +104,9 @@ async def test_multiple_operation_invocations_can_connect_to_same_handler_workfl workflows=[CallerWorkflow, HandlerWorkflow], task_queue=task_queue, ): - await create_nexus_endpoint(task_queue, client) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(task_queue), task_queue + ) caller_handle = await client.start_workflow( CallerWorkflow.run, args=[ diff --git a/tests/nexus/test_workflow_caller.py b/tests/nexus/test_workflow_caller.py index 29b2f03a35..deb303ccc7 100644 --- a/tests/nexus/test_workflow_caller.py +++ b/tests/nexus/test_workflow_caller.py @@ -2,9 +2,12 @@ import asyncio import concurrent.futures +import dataclasses +import threading import uuid from collections.abc import Awaitable, Callable from dataclasses import dataclass +from datetime import datetime, timezone from enum import IntEnum from typing import Any from urllib.request import urlopen @@ -24,9 +27,7 @@ from nexusrpc.handler._decorators import operation_handler import temporalio.api -import temporalio.api.common.v1 import temporalio.api.enums.v1 -import temporalio.api.history.v1 import temporalio.nexus._operation_handlers from temporalio import nexus, workflow from temporalio.client import ( @@ -38,7 +39,11 @@ ) from temporalio.common import WorkflowIDConflictPolicy from temporalio.converter import PayloadConverter -from temporalio.exceptions import ApplicationError, CancelledError, NexusOperationError +from temporalio.exceptions import ( + ApplicationError, + CancelledError, + NexusOperationError, +) from temporalio.nexus import WorkflowRunOperationContext, workflow_run_operation from temporalio.runtime import ( BUFFERED_METRIC_KIND_COUNTER, @@ -49,12 +54,24 @@ ) from temporalio.service import RPCError, RPCStatusCode from temporalio.testing import WorkflowEnvironment -from temporalio.worker import Worker +from temporalio.worker import ( + ExecuteNexusOperationCancelInput, + ExecuteNexusOperationStartInput, + Interceptor, + NexusOperationInboundInterceptor, + StartNexusOperationInput, + Worker, + WorkflowInboundInterceptor, + WorkflowInterceptorClassInput, + WorkflowOutboundInterceptor, +) from tests.helpers import find_free_port, new_worker from tests.helpers.metrics import PromMetricMatcher -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from tests.helpers.nexus import ( + links_from_workflow_execution_started_event, + make_nexus_endpoint_name, +) -# TODO(nexus-prerelease): test availability of Temporal client etc in async context set by worker # TODO(nexus-preview): test worker shutdown, wait_all_completed, drain etc # ----------------------------------------------------------------------------- @@ -73,6 +90,11 @@ class OpDefinitionType(IntEnum): LONGHAND = 1 +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server + + @dataclass class SyncResponse: op_definition_type: OpDefinitionType @@ -110,6 +132,30 @@ class OpOutput: value: str +@dataclass +class HeaderTestOutput: + received_headers: dict[str, str] + + +@dataclass +class HeaderTestCallerWfInput: + headers: dict[str, str] + task_queue: str + + +@dataclass +class CancelHeaderTestCallerWfInput: + workflow_id: str + headers: dict[str, str] + task_queue: str + + +@dataclass +class WorkflowRunHeaderTestCallerWfInput: + headers: dict[str, str] + task_queue: str + + @dataclass class HandlerWfInput: op_input: OpInput @@ -127,6 +173,18 @@ class ServiceInterface: async_operation: nexusrpc.Operation[OpInput, HandlerWfOutput] +@nexusrpc.service +class HeaderTestService: + header_echo_operation: nexusrpc.Operation[None, HeaderTestOutput] + workflow_run_header_operation: nexusrpc.Operation[None, HeaderTestOutput] + cancellable_operation: nexusrpc.Operation[None, str] + + +@nexusrpc.service +class RequestDeadlineService: + cancellable_op: nexusrpc.Operation[None, str] + + # ----------------------------------------------------------------------------- # Service implementation # @@ -190,7 +248,7 @@ def sync_or_async_operation( @sync_operation async def sync_operation( - self, ctx: StartOperationContext, input: OpInput + self, _ctx: StartOperationContext, input: OpInput ) -> OpOutput: assert isinstance(input.response_type, SyncResponse) if input.response_type.exception_in_operation_start: @@ -219,6 +277,116 @@ async def async_operation( ) +@workflow.defn +class HeaderEchoWorkflow: + """A workflow that returns the headers it receives as input.""" + + @workflow.run + async def run(self, headers: dict[str, str]) -> HeaderTestOutput: + return HeaderTestOutput(received_headers=headers) + + +class CancellableOperationHandler(OperationHandler[None, str]): + """Operation handler that captures cancel headers.""" + + def __init__(self, cancel_headers_received: list[dict[str, str]]) -> None: + self._cancel_headers_received = cancel_headers_received + + async def start( + self, ctx: StartOperationContext, input: None + ) -> StartOperationResultAsync: + return StartOperationResultAsync("test-token") + + async def cancel(self, ctx: CancelOperationContext, token: str) -> None: + # Capture cancel headers for test verification + self._cancel_headers_received.append( + { + k: v + for k, v in ctx.headers.items() + if k.startswith("x-custom-") or k.startswith("x-interceptor-") + } + ) + + +@service_handler(service=HeaderTestService) +class HeaderTestServiceImpl: + def __init__(self) -> None: + self.cancel_headers_received: list[dict[str, str]] = [] + + @sync_operation + async def header_echo_operation( + self, ctx: StartOperationContext, _input: None + ) -> HeaderTestOutput: + # Return headers with "x-custom-" or "x-interceptor-" prefix for verification + return HeaderTestOutput( + received_headers={ + k: v + for k, v in ctx.headers.items() + if k.startswith("x-custom-") or k.startswith("x-interceptor-") + } + ) + + @workflow_run_operation + async def workflow_run_header_operation( + self, ctx: WorkflowRunOperationContext, _input: None + ) -> nexus.WorkflowHandle[HeaderTestOutput]: + # Filter headers and pass to backing workflow + filtered_headers = { + k: v + for k, v in ctx.headers.items() + if k.startswith("x-custom-") or k.startswith("x-interceptor-") + } + return await ctx.start_workflow( + HeaderEchoWorkflow.run, + filtered_headers, + id=str(uuid.uuid4()), + ) + + @operation_handler + def cancellable_operation(self) -> OperationHandler[None, str]: + return CancellableOperationHandler(self.cancel_headers_received) + + +class CancellableDeadlineOperationHandler(OperationHandler[None, str]): + """Operation handler that captures request_deadline from start and cancel contexts.""" + + def __init__( + self, + start_deadlines_received: list[datetime | None], + cancel_deadlines_received: list[datetime | None], + cancel_received: asyncio.Event, + ) -> None: + self._start_deadlines_received = start_deadlines_received + self._cancel_deadlines_received = cancel_deadlines_received + self._cancel_received = cancel_received + + async def start( + self, ctx: StartOperationContext, input: None + ) -> StartOperationResultAsync: + self._start_deadlines_received.append(ctx.request_deadline) + return StartOperationResultAsync("test-token") + + async def cancel(self, ctx: CancelOperationContext, token: str) -> None: + self._cancel_deadlines_received.append(ctx.request_deadline) + self._cancel_received.set() + + +@service_handler(service=RequestDeadlineService) +class RequestDeadlineServiceImpl: + def __init__(self) -> None: + self.start_deadlines_received: list[datetime | None] = [] + self.cancel_deadlines_received: list[datetime | None] = [] + self.cancel_received = asyncio.Event() + + @operation_handler + def cancellable_op(self) -> OperationHandler[None, str]: + return CancellableDeadlineOperationHandler( + self.start_deadlines_received, + self.cancel_deadlines_received, + self.cancel_received, + ) + + # ----------------------------------------------------------------------------- # Caller workflow # @@ -245,10 +413,10 @@ class CallerWorkflow: def __init__( self, input: CallerWfInput, - request_cancel: bool, + _request_cancel: bool, task_queue: str, ) -> None: - self.nexus_client: workflow.NexusClient[ServiceInterface | ServiceImpl] = ( + self.nexus_client: workflow.NexusClient[ServiceInterface | ServiceImpl] = ( # type:ignore[reportAttributeAccessIssue] workflow.create_nexus_client( service={ CallerReference.IMPL_WITH_INTERFACE: ServiceImpl, @@ -265,7 +433,7 @@ async def run( self, input: CallerWfInput, request_cancel: bool, - task_queue: str, + _task_queue: str, ) -> CallerWfOutput: op_input = input.op_input try: @@ -278,13 +446,13 @@ async def run( self._nexus_operation_start_resolved = True if not input.op_input.response_type.exception_in_operation_start: if isinstance(input.op_input.response_type, SyncResponse): - assert ( - op_handle.operation_token is None - ), "operation_token should be absent after a sync response" + assert op_handle.operation_token is None, ( + "operation_token should be absent after a sync response" + ) else: - assert ( - op_handle.operation_token - ), "operation_token should be present after an async response" + assert op_handle.operation_token, ( + "operation_token should be present after an async response" + ) if request_cancel: # Even for SyncResponse, the op_handle future is not done at this point; that @@ -386,7 +554,7 @@ def __init__( @workflow.run async def run( - self, input: CallerWfInput, request_cancel: bool, task_queue: str + self, input: CallerWfInput, _request_cancel: bool, _task_queue: str ) -> CallerWfOutput: op_input = input.op_input if op_input.response_type.op_definition_type == OpDefinitionType.LONGHAND: @@ -418,14 +586,89 @@ async def run( return CallerWfOutput(op_output=OpOutput(value=op_output.value)) +@workflow.defn +class HeaderTestCallerWorkflow: + @workflow.run + async def run(self, input: HeaderTestCallerWfInput) -> HeaderTestOutput: + nexus_client = workflow.create_nexus_client( + service=HeaderTestService, + endpoint=make_nexus_endpoint_name(input.task_queue), + ) + return await nexus_client.execute_operation( + HeaderTestService.header_echo_operation, + None, + headers=input.headers, + ) + + +@workflow.defn +class CancelHeaderTestCallerWorkflow: + """Workflow that starts a cancellable operation and then cancels it.""" + + @workflow.run + async def run(self, input: CancelHeaderTestCallerWfInput) -> None: + nexus_client = workflow.create_nexus_client( + service=HeaderTestService, + endpoint=make_nexus_endpoint_name(input.task_queue), + ) + op_handle = await nexus_client.start_operation( + HeaderTestService.cancellable_operation, + None, + headers=input.headers, + ) + # Request cancellation - this sends cancel headers to the handler + op_handle.cancel() + # Wait briefly to allow cancel request to be processed + await asyncio.sleep(0.1) + + +@workflow.defn +class CancelDeadlineCallerWorkflow: + """Workflow that starts a cancellable operation and then cancels it, for deadline testing.""" + + @workflow.run + async def run(self, task_queue: str) -> None: + nexus_client = workflow.create_nexus_client( + service=RequestDeadlineService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + op_handle = await nexus_client.start_operation( + RequestDeadlineService.cancellable_op, + None, + cancellation_type=workflow.NexusOperationCancellationType.WAIT_REQUESTED, + ) + # Request cancellation - this sends a cancel operation to the handler + op_handle.cancel() + + try: + await op_handle + except NexusOperationError: + pass + + +@workflow.defn +class WorkflowRunHeaderTestCallerWorkflow: + """Workflow that calls a workflow_run_operation and verifies headers.""" + + @workflow.run + async def run(self, input: WorkflowRunHeaderTestCallerWfInput) -> HeaderTestOutput: + nexus_client = workflow.create_nexus_client( + service=HeaderTestService, + endpoint=make_nexus_endpoint_name(input.task_queue), + ) + return await nexus_client.execute_operation( + HeaderTestService.workflow_run_header_operation, + None, + headers=input.headers, + ) + + # ----------------------------------------------------------------------------- # Tests # async def test_sync_operation_happy_path(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) async with Worker( client, @@ -434,7 +677,8 @@ async def test_sync_operation_happy_path(client: Client, env: WorkflowEnvironmen task_queue=task_queue, workflow_failure_exception_types=[Exception], ): - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) wf_output = await client.execute_workflow( CallerWorkflow.run, args=[ @@ -458,11 +702,57 @@ async def test_sync_operation_happy_path(client: Client, env: WorkflowEnvironmen assert wf_output.op_output.value == "sync response" +@service_handler +class NexusInfoService: + @sync_operation + async def get_info( + self, _ctx: StartOperationContext, _input: None + ) -> dict[str, str]: + info = nexus.info() + return { + "endpoint": info.endpoint, + "namespace": info.namespace, + "task_queue": info.task_queue, + } + + +@workflow.defn +class NexusInfoCallerWorkflow: + @workflow.run + async def run(self, task_queue: str) -> dict[str, str]: + nexus_client = workflow.create_nexus_client( + service=NexusInfoService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + return await nexus_client.execute_operation(NexusInfoService.get_info, None) + + +async def test_nexus_info_includes_namespace(client: Client, env: WorkflowEnvironment): + task_queue = str(uuid.uuid4()) + async with Worker( + client, + nexus_service_handlers=[NexusInfoService()], + workflows=[NexusInfoCallerWorkflow], + task_queue=task_queue, + ): + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + result = await client.execute_workflow( + NexusInfoCallerWorkflow.run, + task_queue, + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + if not env.supports_time_skipping_v1: + # Time-skipping server doesn't send the endpoint yet. + assert result["endpoint"] == endpoint_name + assert result["namespace"] == client.namespace + assert result["task_queue"] == task_queue + + async def test_workflow_run_operation_happy_path( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) async with Worker( client, @@ -471,7 +761,8 @@ async def test_workflow_run_operation_happy_path( task_queue=task_queue, workflow_failure_exception_types=[Exception], ): - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) wf_output = await client.execute_workflow( CallerWorkflow.run, args=[ @@ -498,7 +789,242 @@ async def test_workflow_run_operation_happy_path( # TODO(nexus-preview): cross-namespace tests # TODO(nexus-preview): nexus endpoint pytest fixture? -# TODO(nexus-prerelease): test headers + + +# ----------------------------------------------------------------------------- +# Header tests +# + + +@dataclass +class HeaderModificationRecord: + original_headers: dict[str, str] + modified_headers: dict[str, str] + + +@dataclass +class CancelHeaderRecord: + original_headers: dict[str, str] + modified_headers: dict[str, str] + + +class HeaderModifyingNexusInterceptor(Interceptor): + def __init__(self) -> None: + self.header_records: list[HeaderModificationRecord] = [] + self.cancel_header_records: list[CancelHeaderRecord] = [] + + def intercept_nexus_operation( + self, next: NexusOperationInboundInterceptor + ) -> NexusOperationInboundInterceptor: + return _HeaderModifyingNexusInboundInterceptor(next, self) + + +class _HeaderModifyingNexusInboundInterceptor(NexusOperationInboundInterceptor): + def __init__( + self, + next: NexusOperationInboundInterceptor, + root: HeaderModifyingNexusInterceptor, + ): + super().__init__(next) + self._root = root + + async def execute_nexus_operation_start( + self, input: ExecuteNexusOperationStartInput + ) -> StartOperationResultSync[Any] | StartOperationResultAsync: + import dataclasses + + original_headers = dict(input.ctx.headers) + + # Modify headers: prefix values and add new header + modified_headers = { + k: f"interceptor-modified-{v}" if k.startswith("x-custom-") else v + for k, v in input.ctx.headers.items() + } + modified_headers["x-interceptor-added"] = "interceptor-value" + + self._root.header_records.append( + HeaderModificationRecord( + original_headers=original_headers, + modified_headers=modified_headers, + ) + ) + + input.ctx = dataclasses.replace(input.ctx, headers=modified_headers) + return await super().execute_nexus_operation_start(input) + + async def execute_nexus_operation_cancel( + self, input: ExecuteNexusOperationCancelInput + ) -> None: + import dataclasses + + original_headers = dict(input.ctx.headers) + + # Modify headers: prefix values and add new header + modified_headers = { + k: f"interceptor-modified-{v}" if k.startswith("x-custom-") else v + for k, v in input.ctx.headers.items() + } + modified_headers["x-interceptor-added"] = "cancel-interceptor-value" + + self._root.cancel_header_records.append( + CancelHeaderRecord( + original_headers=original_headers, + modified_headers=modified_headers, + ) + ) + + input.ctx = dataclasses.replace(input.ctx, headers=modified_headers) + return await super().execute_nexus_operation_cancel(input) + + +class HeaderAddingOutboundInterceptor(Interceptor): + """Outbound interceptor that adds a static header to Nexus operation requests.""" + + def workflow_interceptor_class( + self, input: WorkflowInterceptorClassInput + ) -> type[WorkflowInboundInterceptor] | None: + return _HeaderAddingWorkflowInboundInterceptor + + +class _HeaderAddingWorkflowInboundInterceptor(WorkflowInboundInterceptor): + def init(self, outbound: WorkflowOutboundInterceptor) -> None: + super().init(_HeaderAddingWorkflowOutboundInterceptor(outbound)) + + +class _HeaderAddingWorkflowOutboundInterceptor(WorkflowOutboundInterceptor): + async def start_nexus_operation( + self, input: StartNexusOperationInput + ) -> workflow.NexusOperationHandle: + existing_headers = dict(input.headers) if input.headers else {} + existing_headers["x-custom-outbound"] = "outbound-value" + input = dataclasses.replace(input, headers=existing_headers) + return await super().start_nexus_operation(input) + + +async def test_start_operation_headers( + client: Client, + env: WorkflowEnvironment, +): + """Test headers from workflow and interceptors are propagated to start operation handler.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + inbound_interceptor = HeaderModifyingNexusInterceptor() + + async with Worker( + client, + nexus_service_handlers=[HeaderTestServiceImpl()], + workflows=[HeaderTestCallerWorkflow], + task_queue=task_queue, + interceptors=[HeaderAddingOutboundInterceptor(), inbound_interceptor], + ): + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + workflow_headers = {"x-custom-from-workflow": "workflow-value"} + result = await client.execute_workflow( + HeaderTestCallerWorkflow.run, + HeaderTestCallerWfInput(headers=workflow_headers, task_queue=task_queue), + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + + # Verify inbound interceptor saw headers from workflow and outbound interceptor + assert len(inbound_interceptor.header_records) == 1 + record = inbound_interceptor.header_records[0] + assert record.original_headers.get("x-custom-from-workflow") == "workflow-value" + assert record.original_headers.get("x-custom-outbound") == "outbound-value" + + # Verify handler received headers modified by inbound interceptor + assert ( + result.received_headers.get("x-custom-from-workflow") + == "interceptor-modified-workflow-value" + ) + assert ( + result.received_headers.get("x-custom-outbound") + == "interceptor-modified-outbound-value" + ) + assert result.received_headers.get("x-interceptor-added") == "interceptor-value" + + +async def test_workflow_run_operation_headers( + client: Client, + env: WorkflowEnvironment, +): + """Test that headers are propagated to @workflow_run_operation handlers.""" + task_queue = str(uuid.uuid4()) + test_headers = {"x-custom-workflow-run": "workflow-run-value"} + + async with Worker( + client, + nexus_service_handlers=[HeaderTestServiceImpl()], + workflows=[WorkflowRunHeaderTestCallerWorkflow, HeaderEchoWorkflow], + task_queue=task_queue, + ): + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + result = await client.execute_workflow( + WorkflowRunHeaderTestCallerWorkflow.run, + WorkflowRunHeaderTestCallerWfInput( + headers=test_headers, task_queue=task_queue + ), + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + assert ( + result.received_headers.get("x-custom-workflow-run") == "workflow-run-value" + ) + + +async def test_cancel_operation_headers( + client: Client, + env: WorkflowEnvironment, +): + """Test headers from workflow and interceptor are propagated to cancel operation handler.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + workflow_id = str(uuid.uuid4()) + inbound_interceptor = HeaderModifyingNexusInterceptor() + service_handler = HeaderTestServiceImpl() + + async with Worker( + client, + nexus_service_handlers=[service_handler], + workflows=[CancelHeaderTestCallerWorkflow], + task_queue=task_queue, + interceptors=[inbound_interceptor], + ): + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + workflow_headers = {"x-custom-cancel": "cancel-value"} + await client.execute_workflow( + CancelHeaderTestCallerWorkflow.run, + CancelHeaderTestCallerWfInput( + workflow_id=workflow_id, + headers=workflow_headers, + task_queue=task_queue, + ), + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + + # Verify inbound interceptor saw cancel headers from workflow + assert len(inbound_interceptor.cancel_header_records) == 1 + record = inbound_interceptor.cancel_header_records[0] + assert record.original_headers.get("x-custom-cancel") == "cancel-value" + + # Verify handler received headers modified by inbound interceptor + assert len(service_handler.cancel_headers_received) == 1 + received = service_handler.cancel_headers_received[0] + assert received.get("x-custom-cancel") == "interceptor-modified-cancel-value" + assert received.get("x-interceptor-added") == "cancel-interceptor-value" + + @pytest.mark.parametrize("exception_in_operation_start", [False, True]) @pytest.mark.parametrize("request_cancel", [False, True]) @pytest.mark.parametrize( @@ -516,7 +1042,7 @@ async def test_sync_response( op_definition_type: OpDefinitionType, caller_reference: CallerReference, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) @@ -527,7 +1053,8 @@ async def test_sync_response( task_queue=task_queue, workflow_failure_exception_types=[Exception], ): - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) caller_wf_handle = await client.start_workflow( CallerWorkflow.run, args=[ @@ -549,10 +1076,6 @@ async def test_sync_response( task_queue=task_queue, ) - # TODO(nexus-prerelease): check bidi links for sync operation - - # The operation result is returned even when request_cancel=True, because the - # response was synchronous and it could not be cancelled. See explanation below. if exception_in_operation_start: with pytest.raises(WorkflowFailureError) as ei: await caller_wf_handle.result() @@ -570,6 +1093,8 @@ async def test_sync_response( else "sync_or_async_operation" ) else: + # Under the default legacy ordering, cancellation does not override + # an already-completed synchronous result. result = await caller_wf_handle.result() assert result.op_output.value == "sync response" @@ -591,7 +1116,7 @@ async def test_async_response( op_definition_type: OpDefinitionType, caller_reference: CallerReference, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) @@ -603,6 +1128,7 @@ async def test_async_response( workflow_failure_exception_types=[Exception], ): caller_wf_handle, handler_wf_handle = await _start_wf_and_nexus_op( + env, client, task_queue, exception_in_operation_start, @@ -628,12 +1154,14 @@ async def test_async_response( ) return - # TODO(nexus-prerelease): race here? How do we know it hasn't been canceled already? handler_wf_info = await handler_wf_handle.describe() - assert handler_wf_info.status in [ + expected_statuses = [ WorkflowExecutionStatus.RUNNING, WorkflowExecutionStatus.COMPLETED, ] + if request_cancel: + expected_statuses.append(WorkflowExecutionStatus.CANCELED) + assert handler_wf_info.status in expected_statuses await assert_handler_workflow_has_link_to_caller_workflow( caller_wf_handle, handler_wf_handle ) @@ -669,13 +1197,14 @@ async def test_async_response( handler_wf_info = await handler_wf_handle.describe() assert handler_wf_info.status == WorkflowExecutionStatus.CANCELED else: - handler_wf_info = await handler_wf_handle.describe() - assert handler_wf_info.status == WorkflowExecutionStatus.COMPLETED result = await caller_wf_handle.result() assert result.op_output.value == "workflow result" + handler_wf_info = await handler_wf_handle.describe() + assert handler_wf_info.status == WorkflowExecutionStatus.COMPLETED async def _start_wf_and_nexus_op( + env: WorkflowEnvironment, client: Client, task_queue: str, exception_in_operation_start: bool, @@ -689,7 +1218,8 @@ async def _start_wf_and_nexus_op( """ Start the caller workflow and wait until the Nexus operation has started. """ - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) operation_workflow_id = str(uuid.uuid4()) # Start the caller workflow and wait until it confirms the Nexus operation has started. @@ -750,7 +1280,7 @@ async def test_untyped_caller( caller_reference: CallerReference, response_type: ResponseType, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) @@ -761,7 +1291,7 @@ async def test_untyped_caller( task_queue=task_queue, workflow_failure_exception_types=[Exception], ): - if response_type == SyncResponse: + if type(response_type) is SyncResponse: response_type = SyncResponse( op_definition_type=op_definition_type, use_async_def=True, @@ -774,7 +1304,8 @@ async def test_untyped_caller( op_definition_type=op_definition_type, exception_in_operation_start=exception_in_operation_start, ) - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) caller_wf_handle = await client.start_workflow( UntypedCallerWorkflow.run, args=[ @@ -817,9 +1348,6 @@ class ServiceClassNameOutput: name: str -# TODO(nexus-prerelease): async and non-async cancel methods - - @nexusrpc.service class ServiceInterfaceWithoutNameOverride: op: nexusrpc.Operation[None, ServiceClassNameOutput] @@ -834,7 +1362,7 @@ class ServiceInterfaceWithNameOverride: class ServiceImplInterfaceWithNeitherInterfaceNorNameOverride: @sync_operation async def op( - self, ctx: StartOperationContext, input: None + self, _ctx: StartOperationContext, _input: None ) -> ServiceClassNameOutput: return ServiceClassNameOutput(self.__class__.__name__) @@ -843,7 +1371,7 @@ async def op( class ServiceImplInterfaceWithoutNameOverride: @sync_operation async def op( - self, ctx: StartOperationContext, input: None + self, _ctx: StartOperationContext, _input: None ) -> ServiceClassNameOutput: return ServiceClassNameOutput(self.__class__.__name__) @@ -852,7 +1380,7 @@ async def op( class ServiceImplInterfaceWithNameOverride: @sync_operation async def op( - self, ctx: StartOperationContext, input: None + self, _ctx: StartOperationContext, _input: None ) -> ServiceClassNameOutput: return ServiceClassNameOutput(self.__class__.__name__) @@ -861,7 +1389,7 @@ async def op( class ServiceImplWithNameOverride: @sync_operation async def op( - self, ctx: StartOperationContext, input: None + self, _ctx: StartOperationContext, _input: None ) -> ServiceClassNameOutput: return ServiceClassNameOutput(self.__class__.__name__) @@ -906,15 +1434,9 @@ async def run( return await nexus_client.execute_operation(service_cls.op, None) # type: ignore -# TODO(nexus-prerelease): check missing decorator behavior - - async def test_service_interface_and_implementation_names( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - # Note that: # - The caller can specify the service & operation via a reference to either the # interface or implementation class. @@ -941,7 +1463,8 @@ async def test_service_interface_and_implementation_names( task_queue=task_queue, workflow_failure_exception_types=[Exception], ): - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) assert await client.execute_workflow( ServiceInterfaceAndImplCallerWorkflow.run, args=(CallerReference.INTERFACE, NameOverride.YES, task_queue), @@ -1005,7 +1528,7 @@ async def run(self, input: str) -> str: class ServiceImplWithOperationsThatExecuteWorkflowBeforeStartingBackingWorkflow: @workflow_run_operation async def my_workflow_run_operation( - self, ctx: WorkflowRunOperationContext, input: None + self, ctx: WorkflowRunOperationContext, _input: None ) -> nexus.WorkflowHandle[str]: result_1 = await nexus.client().execute_workflow( EchoWorkflow.run, @@ -1026,7 +1549,7 @@ async def my_workflow_run_operation( @workflow.defn class WorkflowCallingNexusOperationThatExecutesWorkflowBeforeStartingBackingWorkflow: @workflow.run - async def run(self, input: str, task_queue: str) -> str: + async def run(self, _input: str, task_queue: str) -> str: nexus_client = workflow.create_nexus_client( service=ServiceImplWithOperationsThatExecuteWorkflowBeforeStartingBackingWorkflow, endpoint=make_nexus_endpoint_name(task_queue), @@ -1042,7 +1565,7 @@ async def test_workflow_run_operation_can_execute_workflow_before_starting_backi client: Client, env: WorkflowEnvironment, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) @@ -1057,7 +1580,8 @@ async def test_workflow_run_operation_can_execute_workflow_before_starting_backi ], task_queue=task_queue, ): - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) result = await client.execute_workflow( WorkflowCallingNexusOperationThatExecutesWorkflowBeforeStartingBackingWorkflow.run, args=("result-1", task_queue), @@ -1070,7 +1594,7 @@ async def test_workflow_run_operation_can_execute_workflow_before_starting_backi @service_handler class SimpleSyncService: @sync_operation - async def sync_op(self, ctx: StartOperationContext, input: str) -> str: + async def sync_op(self, _ctx: StartOperationContext, input: str) -> str: return input @@ -1097,9 +1621,6 @@ async def test_nexus_operation_summary( client: Client, env: WorkflowEnvironment, ): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - task_queue = f"task-queue-{uuid.uuid4()}" async with Worker( client, @@ -1109,7 +1630,8 @@ async def test_nexus_operation_summary( ], task_queue=task_queue, ): - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) wf_id = f"wf-{uuid.uuid4()}" handle = await client.start_workflow( ExecuteNexusOperationWithSummaryWorkflow.run, @@ -1180,7 +1702,7 @@ async def assert_handler_workflow_has_link_to_caller_workflow( == temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED ) ) - links = _get_links_from_workflow_execution_started_event(wf_started_event) + links = links_from_workflow_execution_started_event(wf_started_event) if not len(links) == 1: pytest.fail( f"Expected 1 link on WorkflowExecutionStarted event, got {len(links)}" @@ -1196,16 +1718,6 @@ async def assert_handler_workflow_has_link_to_caller_workflow( ) -def _get_links_from_workflow_execution_started_event( - event: temporalio.api.history.v1.HistoryEvent, -) -> list[temporalio.api.common.v1.Link]: - [callback] = event.workflow_execution_started_event_attributes.completion_callbacks - if links := callback.links: - return list(links) - else: - return list(event.links) - - # When request_cancel is True, the NexusOperationHandle in the workflow evolves # through the following states: # start_fut result_fut handle_task w/ fut_waiter (task._must_cancel) @@ -1241,6 +1753,10 @@ def _get_links_from_workflow_execution_started_event( # awaited, because both resolve_nexus_operation_start and resolve_nexus_operation jobs # were sent in the same activation and hence the task's fut_waiter was already finished. # +# With single-batch activations (workflow logic flag 2) the SDK re-raises +# the task cancellation even though the result future is already done, so awaiting the +# handle raises CancelledError in the sync case as well. +# # But in the async case, at the time that we cancel the NexusOperationHandle, only the # resolve_nexus_operation_start job had been sent; the result_fut was unresolved. Thus # when the handle was awaited, CancelledError was raised. @@ -1391,9 +1907,6 @@ async def run(self, op: str, input: OverloadTestValue) -> OverloadTestValue: async def test_workflow_run_operation_overloads( client: Client, env: WorkflowEnvironment, op: str ): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - task_queue = str(uuid.uuid4()) async with Worker( client, @@ -1405,7 +1918,8 @@ async def test_workflow_run_operation_overloads( ], nexus_service_handlers=[OverloadTestServiceHandler()], ): - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) res = await client.execute_workflow( OverloadTestCallerWorkflow.run, args=[op, OverloadTestValue(value=2)], @@ -1423,7 +1937,7 @@ async def test_workflow_run_operation_overloads( class CustomMetricsService: @nexusrpc.handler.sync_operation async def custom_metric_op( - self, ctx: nexusrpc.handler.StartOperationContext, input: None + self, _ctx: nexusrpc.handler.StartOperationContext, _input: None ) -> None: counter = nexus.metric_meter().create_counter( "my-operation-counter", "my-operation-description", "my-operation-unit" @@ -1433,7 +1947,7 @@ async def custom_metric_op( @nexusrpc.handler.sync_operation def custom_metric_op_executor( - self, ctx: nexusrpc.handler.StartOperationContext, input: None + self, _ctx: nexusrpc.handler.StartOperationContext, _input: None ) -> None: counter = nexus.metric_meter().create_counter( "my-executor-operation-counter", @@ -1461,11 +1975,9 @@ async def run(self, task_queue: str) -> None: async def test_workflow_caller_custom_metrics(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - task_queue = str(uuid.uuid4()) - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) # Create new runtime with Prom server prom_addr = f"127.0.0.1:{find_free_port()}" @@ -1476,9 +1988,7 @@ async def test_workflow_caller_custom_metrics(client: Client, env: WorkflowEnvir ) # New client with the runtime - client = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + client = await env.connect_client( runtime=runtime, ) @@ -1539,9 +2049,6 @@ async def test_workflow_caller_custom_metrics(client: Client, env: WorkflowEnvir async def test_workflow_caller_buffered_metrics( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - # Create runtime with metric buffer buffer = MetricBuffer(10000) runtime = Runtime( @@ -1552,13 +2059,12 @@ async def test_workflow_caller_buffered_metrics( assert not buffer.retrieve_updates() # Create a new client on the runtime and execute the custom metric workflow - client = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + client = await env.connect_client( runtime=runtime, ) task_queue = str(uuid.uuid4()) - await create_nexus_endpoint(task_queue, client) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) async with new_worker( client, CustomMetricsWorkflow, @@ -1612,3 +2118,196 @@ async def test_workflow_caller_buffered_metrics( and update.value == 30 for update in updates ) + + +@workflow.defn() +class CancelTestCallerWorkflow: + def __init__(self) -> None: + self.released = False + + @workflow.run + async def run(self, use_async_cancel: bool, task_queue: str) -> str: + nexus_client = workflow.create_nexus_client( + service=TestAsyncAndNonAsyncCancel.CancelTestService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + + op = ( + TestAsyncAndNonAsyncCancel.CancelTestService.async_cancel_op + if use_async_cancel + else TestAsyncAndNonAsyncCancel.CancelTestService.non_async_cancel_op + ) + + # Start the operation and immediately request cancellation + # Use WAIT_REQUESTED since we just need to verify the cancel handler was called + handle = await nexus_client.start_operation( + op, + None, + cancellation_type=workflow.NexusOperationCancellationType.WAIT_REQUESTED, + ) + + # Cancel the handle to trigger the cancel method on the handler + handle.cancel() + + try: + await handle + except NexusOperationError: + # Wait for release signal before completing + await workflow.wait_condition(lambda: self.released) + return "cancelled_successfully" + + return "unexpected_completion" + + @workflow.signal + def release(self) -> None: + self.released = True + + +@pytest.fixture(scope="class") +def cancel_test_events(request: pytest.FixtureRequest): + if request.cls: + request.cls.called_async = asyncio.Event() + request.cls.called_non_async = threading.Event() + yield + + +@pytest.mark.usefixtures("cancel_test_events") +class TestAsyncAndNonAsyncCancel: + called_async: asyncio.Event # pyright: ignore[reportUninitializedInstanceVariable] + called_non_async: threading.Event # pyright: ignore[reportUninitializedInstanceVariable] + + class OpWithAsyncCancel(OperationHandler[None, str]): + def __init__(self, evt: asyncio.Event) -> None: + self.evt = evt + + async def start( + self, ctx: StartOperationContext, input: None + ) -> StartOperationResultAsync: + return StartOperationResultAsync("test-token") + + async def cancel(self, ctx: CancelOperationContext, token: str) -> None: + self.evt.set() + + class OpWithNonAsyncCancel(OperationHandler[None, str]): + def __init__(self, evt: threading.Event) -> None: + self.evt = evt + + def start( + self, ctx: StartOperationContext, input: None + ) -> StartOperationResultAsync: + return StartOperationResultAsync("test-token") + + def cancel(self, ctx: CancelOperationContext, token: str) -> None: + self.evt.set() + + @nexusrpc.service + class CancelTestService: + async_cancel_op: nexusrpc.Operation[None, str] + non_async_cancel_op: nexusrpc.Operation[None, str] + + @service_handler(service=CancelTestService) + class CancelTestServiceHandler: + def __init__( + self, async_evt: asyncio.Event, non_async_evt: threading.Event + ) -> None: + self.async_evt = async_evt + self.non_async_evt = non_async_evt + + @operation_handler + def async_cancel_op(self) -> OperationHandler[None, str]: + return TestAsyncAndNonAsyncCancel.OpWithAsyncCancel(self.async_evt) + + @operation_handler + def non_async_cancel_op(self) -> OperationHandler[None, str]: + return TestAsyncAndNonAsyncCancel.OpWithNonAsyncCancel(self.non_async_evt) + + @pytest.mark.parametrize("use_async_cancel", [True, False]) + async def test_task_executor_operation_cancel_method( + self, client: Client, env: WorkflowEnvironment, use_async_cancel: bool + ): + """Test that both async and non-async cancel methods work for TaskExecutor-based operations.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + async with Worker( + client, + task_queue=task_queue, + workflows=[CancelTestCallerWorkflow], + nexus_service_handlers=[ + TestAsyncAndNonAsyncCancel.CancelTestServiceHandler( + self.called_async, self.called_non_async + ) + ], + nexus_task_executor=concurrent.futures.ThreadPoolExecutor(), + ): + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + caller_wf_handle = await client.start_workflow( + CancelTestCallerWorkflow.run, + args=[use_async_cancel, task_queue], + id=f"caller-wf-{uuid.uuid4()}", + task_queue=task_queue, + ) + + # Wait for the cancel method to be called + fut = ( + self.called_async.wait() + if use_async_cancel + else asyncio.get_running_loop().run_in_executor( + None, self.called_non_async.wait + ) + ) + await asyncio.wait_for(fut, timeout=30) + + # Release the workflow to complete + await caller_wf_handle.signal(CancelTestCallerWorkflow.release) + + # Verify the workflow completed successfully + result = await caller_wf_handle.result() + assert result == "cancelled_successfully" + + +async def test_request_deadline_is_accessible_in_operation( + client: Client, + env: WorkflowEnvironment, +): + """Test that request_deadline is accessible in StartOperationContext.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + service_handler = RequestDeadlineServiceImpl() + + async with Worker( + client, + nexus_service_handlers=[service_handler], + workflows=[CancelDeadlineCallerWorkflow], + task_queue=task_queue, + ): + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + + await client.execute_workflow( + CancelDeadlineCallerWorkflow.run, + task_queue, + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + + assert len(service_handler.start_deadlines_received) == 1 + deadline = service_handler.start_deadlines_received[0] + assert deadline is not None, ( + "request_deadline should be set in StartOperationContext" + ) + assert deadline.tzinfo is timezone.utc, "request_deadline should be in utc" + + await asyncio.wait_for(service_handler.cancel_received.wait(), 1) + + assert len(service_handler.cancel_deadlines_received) == 1 + deadline = service_handler.cancel_deadlines_received[0] + assert deadline is not None, ( + "request_deadline should be set in CancelOperationContext" + ) + assert deadline.tzinfo is timezone.utc, "request_deadline should be in utc" diff --git a/tests/nexus/test_workflow_caller_cancellation_types.py b/tests/nexus/test_workflow_caller_cancellation_types.py index 16cfb88051..eca2699844 100644 --- a/tests/nexus/test_workflow_caller_cancellation_types.py +++ b/tests/nexus/test_workflow_caller_cancellation_types.py @@ -1,14 +1,16 @@ import asyncio +import logging import uuid from dataclasses import dataclass, field from datetime import datetime, timezone -from typing import Any, Optional +from typing import Any import nexusrpc import nexusrpc.handler._decorators import pytest import temporalio.nexus._operation_handlers +import temporalio.worker._workflow_instance from temporalio import exceptions, nexus, workflow from temporalio.api.enums.v1 import EventType from temporalio.client import ( @@ -20,7 +22,12 @@ from temporalio.common import WorkflowIDConflictPolicy from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from tests.helpers import LogCapturer, assert_event_subsequence, assert_eventually +from tests.helpers.nexus import make_nexus_endpoint_name + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server @dataclass @@ -40,12 +47,15 @@ class TestContext: class HandlerWorkflow: def __init__(self): self.caller_op_future_resolved = asyncio.Event() + self.cancel_requested = False + self.release_cancellation = asyncio.Event() @workflow.run async def run(self) -> None: try: await asyncio.Future() except asyncio.CancelledError: + self.cancel_requested = True if test_context.cancellation_type in [ workflow.NexusOperationCancellationType.TRY_CANCEL, workflow.NexusOperationCancellationType.WAIT_REQUESTED, @@ -53,12 +63,25 @@ async def run(self) -> None: # We want to prove that the caller op future can be resolved before the operation # (i.e. its backing workflow) is cancelled. await self.caller_op_future_resolved.wait() + elif ( + test_context.cancellation_type + == workflow.NexusOperationCancellationType.WAIT_COMPLETED + ): + await self.release_cancellation.wait() raise @workflow.signal def set_caller_op_future_resolved(self) -> None: self.caller_op_future_resolved.set() + @workflow.signal + def set_release_cancellation(self) -> None: + self.release_cancellation.set() + + @workflow.query + def has_cancel_requested(self) -> bool: + return self.cancel_requested + @nexusrpc.service class Service: @@ -68,7 +91,7 @@ class Service: class WorkflowOpHandler( temporalio.nexus._operation_handlers.WorkflowRunOperationHandler ): - def __init__(self): + def __init__(self): # type:ignore[reportMissingSuperCall] pass async def start( @@ -151,6 +174,10 @@ async def get_operation_token(self) -> str: async def wait_caller_op_future_resolved(self) -> None: await self.caller_op_future_resolved + @workflow.query + def has_caller_op_future_resolved(self) -> bool: + return self.caller_op_future_resolved.done() + @workflow.run async def run(self, input: Input) -> CancellationResult: op_handle = await ( @@ -238,9 +265,6 @@ async def test_cancellation_type( env: WorkflowEnvironment, cancellation_type_name: str, ): - if env.supports_time_skipping: - pytest.skip("Nexus tests don't work with time-skipping server") - cancellation_type = workflow.NexusOperationCancellationType[cancellation_type_name] global test_context test_context = TestContext( @@ -250,52 +274,72 @@ async def test_cancellation_type( client = env.client - async with Worker( - client, - task_queue=str(uuid.uuid4()), - workflows=[CallerWorkflow, HandlerWorkflow], - nexus_service_handlers=[ServiceHandler()], - ) as worker: - await create_nexus_endpoint(worker.task_queue, client) - - # Start the caller workflow, wait for the nexus op to have started and retrieve the nexus op - # token - with_start_workflow = WithStartWorkflowOperation( - CallerWorkflow.run, - Input( - endpoint=make_nexus_endpoint_name(worker.task_queue), - cancellation_type=cancellation_type, - ), - id=test_context.caller_workflow_id, - task_queue=worker.task_queue, - id_conflict_policy=WorkflowIDConflictPolicy.FAIL, - ) + log_capturer = LogCapturer() + with log_capturer.logs_captured( + temporalio.worker._workflow_instance.logger, level=logging.WARNING + ): + async with Worker( + client, + task_queue=str(uuid.uuid4()), + workflows=[CallerWorkflow, HandlerWorkflow], + nexus_service_handlers=[ServiceHandler()], + ) as worker: + await env.create_nexus_endpoint( + make_nexus_endpoint_name(worker.task_queue), worker.task_queue + ) - operation_token = await client.execute_update_with_start_workflow( - CallerWorkflow.get_operation_token, - start_workflow_operation=with_start_workflow, - ) - handler_wf = ( - nexus.WorkflowHandle[None] - .from_token(operation_token) - ._to_client_workflow_handle(client) - ) - caller_wf = await with_start_workflow.workflow_handle() - - if cancellation_type == workflow.NexusOperationCancellationType.ABANDON: - await check_behavior_for_abandon(caller_wf, handler_wf) - elif cancellation_type == workflow.NexusOperationCancellationType.TRY_CANCEL: - await check_behavior_for_try_cancel(caller_wf, handler_wf) - elif ( - cancellation_type == workflow.NexusOperationCancellationType.WAIT_REQUESTED - ): - await check_behavior_for_wait_cancellation_requested(caller_wf, handler_wf) - elif ( - cancellation_type == workflow.NexusOperationCancellationType.WAIT_COMPLETED - ): - await check_behavior_for_wait_cancellation_completed(caller_wf, handler_wf) - else: - pytest.fail(f"Invalid cancellation type: {cancellation_type}") + # Start the caller workflow, wait for the nexus op to have started and retrieve the nexus op + # token + with_start_workflow = WithStartWorkflowOperation( + CallerWorkflow.run, + Input( + endpoint=make_nexus_endpoint_name(worker.task_queue), + cancellation_type=cancellation_type, + ), + id=test_context.caller_workflow_id, + task_queue=worker.task_queue, + id_conflict_policy=WorkflowIDConflictPolicy.FAIL, + ) + + operation_token = await client.execute_update_with_start_workflow( + CallerWorkflow.get_operation_token, + start_workflow_operation=with_start_workflow, + ) + handler_wf = ( + nexus.WorkflowHandle[None] + .from_token(operation_token) + ._to_client_workflow_handle(client) + ) + caller_wf = await with_start_workflow.workflow_handle() + + if cancellation_type == workflow.NexusOperationCancellationType.ABANDON: + await check_behavior_for_abandon(caller_wf, handler_wf) + elif ( + cancellation_type == workflow.NexusOperationCancellationType.TRY_CANCEL + ): + await check_behavior_for_try_cancel(caller_wf, handler_wf) + elif ( + cancellation_type + == workflow.NexusOperationCancellationType.WAIT_REQUESTED + ): + await check_behavior_for_wait_cancellation_requested( + caller_wf, handler_wf + ) + elif ( + cancellation_type + == workflow.NexusOperationCancellationType.WAIT_COMPLETED + ): + await check_behavior_for_wait_cancellation_completed( + caller_wf, handler_wf + ) + else: + pytest.fail(f"Invalid cancellation type: {cancellation_type}") + + # Verify no spurious "exception in shielded future" error logs + shielded_err = log_capturer.find_log("exception in shielded future") + assert shielded_err is None, ( + f"Unexpected 'exception in shielded future' log: {shielded_err}" + ) async def check_behavior_for_abandon( @@ -409,6 +453,17 @@ async def check_behavior_for_wait_cancellation_completed( Check that a cancellation request is sent and the caller workflow nexus operation future is unblocked after the operation is canceled. """ + + async def assert_handler_cancel_requested() -> None: + assert await handler_wf.query(HandlerWorkflow.has_cancel_requested) + + await assert_eventually(assert_handler_cancel_requested) + + handler_status = (await handler_wf.describe()).status + assert handler_status == WorkflowExecutionStatus.RUNNING + assert not await caller_wf.query(CallerWorkflow.has_caller_op_future_resolved) + + await handler_wf.signal(HandlerWorkflow.set_release_cancellation) try: await handler_wf.result() except WorkflowFailureError as err: @@ -419,8 +474,13 @@ async def check_behavior_for_wait_cancellation_completed( handler_status = (await handler_wf.describe()).status assert handler_status == WorkflowExecutionStatus.CANCELED + async def assert_caller_op_future_resolved() -> None: + assert await caller_wf.query(CallerWorkflow.has_caller_op_future_resolved) + + await assert_eventually(assert_caller_op_future_resolved) + await caller_wf.signal(CallerWorkflow.release) - result = await caller_wf.result() + await caller_wf.result() await assert_event_subsequence( caller_wf, @@ -431,14 +491,6 @@ async def check_behavior_for_wait_cancellation_completed( EventType.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED, ], ) - handler_wf_canceled_event = await get_event_time( - handler_wf, - EventType.EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED, - ) - assert handler_wf_canceled_event <= result.caller_op_future_resolved, ( - "expected caller op future resolved after handler workflow canceled, but got " - f"{result.caller_op_future_resolved} before {handler_wf_canceled_event}" - ) async def has_event(wf_handle: WorkflowHandle, event_type: EventType.ValueType): @@ -457,38 +509,3 @@ async def get_event_time( return event.event_time.ToDatetime().replace(tzinfo=timezone.utc) event_type_name = EventType.Name(event_type).removeprefix("EVENT_TYPE_") assert False, f"Event {event_type_name} not found in {wf_handle.id}" - - -async def assert_event_subsequence( - wf_handle: WorkflowHandle, - expected_events: list[EventType.ValueType], -) -> None: - """ - Given a workflow handle and a sequence of event types, assert that the workflow's history - contains that subsequence of events in the order specified. - """ - all_events = [] - async for e in wf_handle.fetch_history_events(): - all_events.append(e) - - _all_events = iter(all_events) - _expected_events = iter(expected_events) - - previous_expected_event_type_name = None - for expected_event_type in _expected_events: - expected_event_type_name = EventType.Name(expected_event_type).removeprefix( - "EVENT_TYPE_" - ) - has_expected = next( - (e for e in _all_events if e.event_type == expected_event_type), - None, - ) - if not has_expected: - if previous_expected_event_type_name is not None: - prefix = f"After {previous_expected_event_type_name}, " - else: - prefix = "" - pytest.fail( - f"{prefix}expected {expected_event_type_name} in workflow {wf_handle.id}" - ) - previous_expected_event_type_name = expected_event_type_name diff --git a/tests/nexus/test_workflow_caller_cancellation_types_when_cancel_handler_fails.py b/tests/nexus/test_workflow_caller_cancellation_types_when_cancel_handler_fails.py index c9cb718078..dbfef3738e 100644 --- a/tests/nexus/test_workflow_caller_cancellation_types_when_cancel_handler_fails.py +++ b/tests/nexus/test_workflow_caller_cancellation_types_when_cancel_handler_fails.py @@ -6,7 +6,7 @@ import uuid from dataclasses import dataclass, field from datetime import datetime, timezone -from typing import Any, Optional +from typing import Any import nexusrpc import nexusrpc.handler._decorators @@ -23,13 +23,17 @@ from temporalio.common import WorkflowIDConflictPolicy from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from tests.helpers import assert_event_subsequence, assert_eventually +from tests.helpers.nexus import make_nexus_endpoint_name from tests.nexus.test_workflow_caller_cancellation_types import ( - assert_event_subsequence, get_event_time, has_event, ) +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server + @dataclass class TestContext: @@ -48,6 +52,7 @@ class HandlerWorkflow: def __init__(self): self.cancel_handler_released = asyncio.Event() self.caller_op_future_resolved = asyncio.Event() + self.release_completion = asyncio.Event() @workflow.run async def run(self) -> None: @@ -61,6 +66,11 @@ async def run(self) -> None: # For WAIT_REQUESTED, we want to prove that the future can be unblocked before the # handler workflow completes. await self.caller_op_future_resolved.wait() + elif test_context.cancellation_type in ( + workflow.NexusOperationCancellationType.TRY_CANCEL, + workflow.NexusOperationCancellationType.WAIT_COMPLETED, + ): + await self.release_completion.wait() @workflow.signal def set_cancel_handler_released(self) -> None: @@ -70,6 +80,14 @@ def set_cancel_handler_released(self) -> None: def set_caller_op_future_resolved(self) -> None: self.caller_op_future_resolved.set() + @workflow.signal + def set_release_completion(self) -> None: + self.release_completion.set() + + @workflow.query + def has_cancel_handler_released(self) -> bool: + return self.cancel_handler_released.is_set() + @nexusrpc.service class Service: @@ -79,7 +97,7 @@ class Service: class WorkflowOpHandler( temporalio.nexus._operation_handlers.WorkflowRunOperationHandler ): - def __init__(self): + def __init__(self): # type:ignore[reportMissingSuperCall] pass async def start( @@ -153,6 +171,10 @@ async def get_operation_token(self) -> str: assert self.operation_token return self.operation_token + @workflow.query + def has_caller_op_future_resolved(self) -> bool: + return self.caller_op_future_resolved.done() + @workflow.run async def run(self, input: Input) -> CancellationResult: op_handle = await ( @@ -207,7 +229,7 @@ async def test_cancellation_type( env: WorkflowEnvironment, cancellation_type_name: str, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") cancellation_type = workflow.NexusOperationCancellationType[cancellation_type_name] @@ -222,7 +244,9 @@ async def test_cancellation_type( workflows=[CallerWorkflow, HandlerWorkflow], nexus_service_handlers=[ServiceHandler()], ) as worker: - await create_nexus_endpoint(worker.task_queue, client) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(worker.task_queue), worker.task_queue + ) # Start the caller workflow, wait for the nexus op to have started and retrieve the nexus op # token @@ -295,6 +319,14 @@ async def check_behavior_for_try_cancel( caller_wf: WorkflowHandle[Any, CancellationResult], handler_wf: WorkflowHandle[Any, None], ) -> None: + await test_context.cancel_handler_released + + cancel_request_failed = EventType.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED + async for event in caller_wf.fetch_history_events(wait_new_event=True): + if event.event_type == cancel_request_failed: + break + + await handler_wf.signal(HandlerWorkflow.set_release_completion) await handler_wf.result() await caller_wf.signal(CallerWorkflow.release) result = await caller_wf.result() @@ -362,7 +394,23 @@ async def check_behavior_for_wait_cancellation_completed( caller_wf: WorkflowHandle[Any, CancellationResult], handler_wf: WorkflowHandle, ) -> None: + async def assert_cancel_handler_released() -> None: + assert await handler_wf.query(HandlerWorkflow.has_cancel_handler_released) + + await assert_eventually(assert_cancel_handler_released) + + handler_status = (await handler_wf.describe()).status + assert handler_status == WorkflowExecutionStatus.RUNNING + assert not await caller_wf.query(CallerWorkflow.has_caller_op_future_resolved) + + await handler_wf.signal(HandlerWorkflow.set_release_completion) await handler_wf.result() + + async def assert_caller_op_future_resolved() -> None: + assert await caller_wf.query(CallerWorkflow.has_caller_op_future_resolved) + + await assert_eventually(assert_caller_op_future_resolved) + await caller_wf.signal(CallerWorkflow.release) result = await caller_wf.result() assert not result.error_type @@ -378,8 +426,3 @@ async def check_behavior_for_wait_cancellation_completed( EventType.EVENT_TYPE_NEXUS_OPERATION_COMPLETED, ], ) - handler_wf_completed = await get_event_time( - handler_wf, - EventType.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED, - ) - assert handler_wf_completed <= result.caller_op_future_resolved diff --git a/tests/nexus/test_workflow_caller_error_chains.py b/tests/nexus/test_workflow_caller_error_chains.py index 4ba9ca6d5e..5f8a92e32d 100644 --- a/tests/nexus/test_workflow_caller_error_chains.py +++ b/tests/nexus/test_workflow_caller_error_chains.py @@ -1,9 +1,8 @@ from __future__ import annotations import uuid -from collections.abc import Callable -from dataclasses import dataclass -from typing import Any +from collections.abc import Iterator +from dataclasses import dataclass, field import nexusrpc import nexusrpc.handler @@ -19,26 +18,196 @@ ) from temporalio.exceptions import ( ApplicationError, + CancelledError, NexusOperationError, ) from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from tests.helpers.nexus import make_nexus_endpoint_name -error_conversion_test_cases: dict[str, type[ErrorConversionTestCase]] = {} +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server @dataclass -class ErrorConversionTestCase: - action_in_nexus_operation: Callable[..., Any] - expected_exception_chain_in_workflow: list[tuple[type[Exception], dict[str, Any]]] +class ExpectedError: + message: str + optional: bool = field(kw_only=True, default=False) - def __init_subclass__(cls, **kwargs): - super().__init_subclass__(**kwargs) - assert cls.__name__ not in error_conversion_test_cases - error_conversion_test_cases[cls.__name__] = cls +@dataclass +class ExpectedNexusOperationError(ExpectedError): + service: str + + +@dataclass +class ExpectedHandlerError(ExpectedError): + type: str # HandlerErrorType name (e.g., "INTERNAL", "NOT_FOUND") + retryable: bool + + +@dataclass +class ExpectedApplicationError(ExpectedError): + non_retryable: bool + type: str | None = None + + +@dataclass +class ExpectedCancelledError(ExpectedError): + pass + + +class ExpectedErrorChain: + def __init__(self, *errs: ExpectedError) -> None: + self._errs = errs + + def required_len(self) -> int: + return sum(not e.optional for e in self._errs) + + def __len__(self) -> int: + return len(self._errs) + + def __iter__(self) -> Iterator[ExpectedError]: + return iter(self._errs) + + def __getitem__(self, i: int) -> ExpectedError: + return self._errs[i] + + +ExpectedExceptionInfo = ( + ExpectedNexusOperationError + | ExpectedHandlerError + | ExpectedApplicationError + | ExpectedCancelledError +) + + +@dataclass +class ErrorTestCase: + name: str + operation_name: str + expected_exception_chain: ExpectedErrorChain + + +class CustomError(Exception): + pass + + +@dataclass +class ErrorTestInput: + task_queue: str + operation_name: str + + +# Handler service with one operation per test case + + +@nexusrpc.handler.service_handler +class ErrorTestService: + @sync_operation + async def raise_application_error_non_retryable( + self, _ctx: StartOperationContext, _input: ErrorTestInput + ) -> None: + raise ApplicationError( + "application-error-message", + type="application-error-type", + non_retryable=True, + ) + + @sync_operation + async def raise_application_error_non_retryable_from_custom_error( + self, _ctx: StartOperationContext, _input: ErrorTestInput + ) -> None: + try: + raise CustomError("custom-error-message") + except CustomError as err: + raise ApplicationError( + "application-error-message", + type="application-error-type", + non_retryable=True, + ) from err + + @sync_operation + async def raise_nexus_handler_error_not_found( + self, _ctx: StartOperationContext, _input: ErrorTestInput + ) -> None: + try: + raise RuntimeError("runtime-error-message") + except RuntimeError as err: + raise nexusrpc.HandlerError( + "handler-error-message", + type=nexusrpc.HandlerErrorType.NOT_FOUND, + ) from err + + @sync_operation + async def raise_nexus_handler_error_not_found_from_custom_error( + self, _ctx: StartOperationContext, _input: ErrorTestInput + ) -> None: + try: + raise CustomError("custom-error-message") + except CustomError as err: + raise nexusrpc.HandlerError( + "handler-error-message", + type=nexusrpc.HandlerErrorType.NOT_FOUND, + ) from err + @sync_operation + async def raise_nexus_handler_error_not_found_from_handler_error_unavailable( + self, _ctx: StartOperationContext, _input: ErrorTestInput + ) -> None: + try: + raise nexusrpc.HandlerError( + "handler-error-message-2", + type=nexusrpc.HandlerErrorType.UNAVAILABLE, + ) + except nexusrpc.HandlerError as err: + raise nexusrpc.HandlerError( + "handler-error-message", + type=nexusrpc.HandlerErrorType.NOT_FOUND, + ) from err + + @sync_operation + async def raise_nexus_operation_error_from_application_error_non_retryable_from_custom_error( + self, _ctx: StartOperationContext, _input: ErrorTestInput + ) -> None: + try: + try: + raise CustomError("custom-error-message") + except CustomError as err: + raise ApplicationError( + "application-error-message", + type="application-error-type", + non_retryable=True, + ) from err + except ApplicationError as err: + raise nexusrpc.OperationError( + "operation-error-message", + state=nexusrpc.OperationErrorState.FAILED, + ) from err + + @sync_operation + async def raise_nexus_operation_canceled_error_from_application_error_non_retryable_from_custom_error( + self, _ctx: StartOperationContext, _input: ErrorTestInput + ) -> None: + try: + try: + raise CustomError("custom-error-message") + except CustomError as err: + raise ApplicationError( + "application-error-message", + type="application-error-type", + non_retryable=True, + ) from err + except ApplicationError as err: + raise nexusrpc.OperationError( + "operation-error-message", + state=nexusrpc.OperationErrorState.CANCELED, + ) from err + + +# Test cases +# # If a nexus handler raises a non-retryable ApplicationError, the calling workflow # should see a non-retryable exception. # @@ -70,185 +239,149 @@ def __init_subclass__(cls, **kwargs): # ] # } # ) - - -class RaiseApplicationErrorNonRetryable(ErrorConversionTestCase): - @staticmethod - def action_in_nexus_operation(): - raise ApplicationError( - "application-error-message", +RaiseApplicationErrorNonRetryable = ErrorTestCase( + name="RaiseApplicationErrorNonRetryable", + operation_name=ErrorTestService.raise_application_error_non_retryable.__name__, + expected_exception_chain=ExpectedErrorChain( + ExpectedNexusOperationError( + message="nexus operation completed unsuccessfully", + service="ErrorTestService", + ), + ExpectedHandlerError( + message="Handler failed with non-retryable application error", + type="INTERNAL", + retryable=False, + ), + ExpectedHandlerError( + message="Handler failed with non-retryable application error", + type="INTERNAL", + retryable=False, + optional=True, + ), + ExpectedApplicationError( + message="application-error-message", type="application-error-type", non_retryable=True, - ) + ), + ), +) - expected_exception_chain_in_workflow = [ - ( - NexusOperationError, - { - "service": "ErrorTestService", - "message": "nexus operation completed unsuccessfully", - }, + +RaiseApplicationErrorNonRetryableFromCustomError = ErrorTestCase( + name="RaiseApplicationErrorNonRetryableFromCustomError", + operation_name=ErrorTestService.raise_application_error_non_retryable_from_custom_error.__name__, + expected_exception_chain=ExpectedErrorChain( + ExpectedNexusOperationError( + message="nexus operation completed unsuccessfully", + service="ErrorTestService", ), - ( - nexusrpc.HandlerError, - { - # In this test case the user code raised ApplicationError directly, and - # a wrapping HandlerError was synthesized with the same error message as - # that of the ApplicationError. The server prepends 'handler error - # (INTERNAL):' - "message": "handler error (INTERNAL): application-error-message", - "type": nexusrpc.HandlerErrorType.INTERNAL, - "retryable": False, - }, + ExpectedHandlerError( + message="Handler failed with non-retryable application error", + type="INTERNAL", + retryable=False, ), - ( - ApplicationError, - { - "message": "application-error-message", - "type": "application-error-type", - "non_retryable": True, - }, + ExpectedHandlerError( + message="Handler failed with non-retryable application error", + type="INTERNAL", + retryable=False, + optional=True, ), - ] - - -class RaiseApplicationErrorNonRetryableFromCustomError(ErrorConversionTestCase): - @staticmethod - def action_in_nexus_operation(): - try: - raise CustomError("custom-error-message") - except CustomError as err: - raise ApplicationError( - "application-error-message", - type="application-error-type", - non_retryable=True, - ) from err - - expected_exception_chain_in_workflow = ( - RaiseApplicationErrorNonRetryable.expected_exception_chain_in_workflow - + [ - ( - ApplicationError, - { - "message": "custom-error-message", - "type": "CustomError", - "non_retryable": False, - }, - ), - ] - ) + ExpectedApplicationError( + message="application-error-message", + type="application-error-type", + non_retryable=True, + ), + ExpectedApplicationError( + message="custom-error-message", + type="CustomError", + non_retryable=False, + ), + ), +) -class RaiseNexusHandlerErrorNotFound(ErrorConversionTestCase): - @staticmethod - def action_in_nexus_operation(): - try: - raise RuntimeError("runtime-error-message") - except RuntimeError as err: - raise nexusrpc.HandlerError( - "handler-error-message", - type=nexusrpc.HandlerErrorType.NOT_FOUND, - ) from err - - expected_exception_chain_in_workflow = [ - ( - NexusOperationError, - { - "service": "ErrorTestService", - "message": "nexus operation completed unsuccessfully", - }, +RaiseNexusHandlerErrorNotFound = ErrorTestCase( + name="RaiseNexusHandlerErrorNotFound", + operation_name=ErrorTestService.raise_nexus_handler_error_not_found.__name__, + expected_exception_chain=ExpectedErrorChain( + ExpectedNexusOperationError( + message="nexus operation completed unsuccessfully", + service="ErrorTestService", ), - ( - nexusrpc.HandlerError, - { - # In this test case the user code raised HandlerError directly, so there - # was no need to synthesize a wrapping HandlerError The server prepends - # 'handler error (INTERNAL):' - "message": "handler error (NOT_FOUND): handler-error-message", - "type": nexusrpc.HandlerErrorType.NOT_FOUND, - # The following HandlerError types should be considered non-retryable: - # BAD_REQUEST, UNAUTHENTICATED, UNAUTHORIZED, NOT_FOUND, and - # RESOURCE_EXHAUSTED. In this test case, the handler does not set the - # retryable flag in the HandlerError sent to the server. This value is - # computed by the retryable property on HandlerError. - "retryable": False, - }, + ExpectedHandlerError( + message="handler-error-message", + type="NOT_FOUND", + retryable=False, ), - ( - ApplicationError, - { - "message": "handler-error-message", - "non_retryable": True, - }, + ExpectedHandlerError( + message="handler-error-message", + type="NOT_FOUND", + retryable=False, + optional=True, ), - ( - ApplicationError, - { - "message": "runtime-error-message", - "type": "RuntimeError", - "non_retryable": False, - }, + ExpectedApplicationError( + message="runtime-error-message", + type="RuntimeError", + non_retryable=False, ), - ] - - -class RaiseNexusHandlerErrorNotFoundFromCustomError(ErrorConversionTestCase): - @staticmethod - def action_in_nexus_operation(): - try: - raise CustomError("custom-error-message") - except CustomError as err: - raise nexusrpc.HandlerError( - "handler-error-message", - type=nexusrpc.HandlerErrorType.NOT_FOUND, - ) from err + ), +) - expected_exception_chain_in_workflow = ( - RaiseNexusHandlerErrorNotFound.expected_exception_chain_in_workflow[:-1] - + [ - ( - ApplicationError, - { - # TODO(nexus-preview): empirically, this is "handler-error-message", - # but it should be "runtime-error-message" - # "message": "runtime-error-message", - "type": "CustomError", - "non_retryable": False, - }, - ) - ] - ) +RaiseNexusHandlerErrorNotFoundFromCustomError = ErrorTestCase( + name="RaiseNexusHandlerErrorNotFoundFromCustomError", + operation_name=ErrorTestService.raise_nexus_handler_error_not_found_from_custom_error.__name__, + expected_exception_chain=ExpectedErrorChain( + ExpectedNexusOperationError( + message="nexus operation completed unsuccessfully", + service="ErrorTestService", + ), + ExpectedHandlerError( + message="handler-error-message", + type="NOT_FOUND", + retryable=False, + ), + ExpectedHandlerError( + message="handler-error-message", + type="NOT_FOUND", + retryable=False, + optional=True, + ), + ExpectedApplicationError( + message="custom-error-message", + type="CustomError", + non_retryable=False, + ), + ), +) -class RaiseNexusHandlerErrorNotFoundFromHandlerErrorUnavailable( - ErrorConversionTestCase -): - @staticmethod - def action_in_nexus_operation(): - try: - raise nexusrpc.HandlerError( - "handler-error-message-2", - type=nexusrpc.HandlerErrorType.UNAVAILABLE, - ) - except nexusrpc.HandlerError as err: - raise nexusrpc.HandlerError( - "handler-error-message", - type=nexusrpc.HandlerErrorType.NOT_FOUND, - ) from err - expected_exception_chain_in_workflow = ( - RaiseNexusHandlerErrorNotFound.expected_exception_chain_in_workflow[:-1] - + [ - ( - nexusrpc.HandlerError, - { - "message": "handler-error-message-2", - "type": nexusrpc.HandlerErrorType.UNAVAILABLE, - "retryable": True, - }, - ) - ] - ) +RaiseNexusHandlerErrorNotFoundFromHandlerErrorUnavailable = ErrorTestCase( + name="RaiseNexusHandlerErrorNotFoundFromHandlerErrorUnavailable", + operation_name=ErrorTestService.raise_nexus_handler_error_not_found_from_handler_error_unavailable.__name__, + expected_exception_chain=ExpectedErrorChain( + ExpectedNexusOperationError( + message="nexus operation completed unsuccessfully", + service="ErrorTestService", + ), + ExpectedHandlerError( + message="handler-error-message", + type="NOT_FOUND", + retryable=False, + ), + ExpectedHandlerError( + message="handler-error-message", + type="NOT_FOUND", + retryable=False, + optional=True, + ), + ExpectedHandlerError( + message="handler-error-message-2", + type="UNAVAILABLE", + retryable=True, + ), + ), +) # If a nexus handler raises an OperationError, the calling workflow @@ -292,72 +425,168 @@ def action_in_nexus_operation(): # ] # } # ) -# -class RaiseNexusOperationErrorFromApplicationErrorNonRetryableFromCustomError( - ErrorConversionTestCase -): - @staticmethod - def action_in_nexus_operation(): - try: - try: - raise CustomError("custom-error-message") - except CustomError as err: - raise ApplicationError( - "application-error-message", - type="application-error-type", - non_retryable=True, - ) from err - except ApplicationError as err: - raise nexusrpc.OperationError( - "operation-error-message", - state=nexusrpc.OperationErrorState.FAILED, - ) from err - - expected_exception_chain_in_workflow = [ - ( - NexusOperationError, - { - "message": "nexus operation completed unsuccessfully", - "service": "ErrorTestService", - }, +RaiseNexusOperationErrorFromApplicationErrorNonRetryableFromCustomError = ErrorTestCase( + name="RaiseNexusOperationErrorFromApplicationErrorNonRetryableFromCustomError", + operation_name=ErrorTestService.raise_nexus_operation_error_from_application_error_non_retryable_from_custom_error.__name__, + expected_exception_chain=ExpectedErrorChain( + ExpectedNexusOperationError( + message="nexus operation completed unsuccessfully", + service="ErrorTestService", ), - ( - ApplicationError, - { - "message": "application-error-message", - "type": "application-error-type", - "non_retryable": True, - }, + ExpectedApplicationError( + message="operation-error-message", type="OperationError", non_retryable=True ), - ( - ApplicationError, - { - "message": "custom-error-message", - "type": "CustomError", - "non_retryable": False, - }, + ExpectedApplicationError( + message="application-error-message", + type="application-error-type", + non_retryable=True, ), - ] - - -class CustomError(Exception): - pass - - -@dataclass -class ErrorTestInput: - task_queue: str - name: str + ExpectedApplicationError( + message="custom-error-message", + type="CustomError", + non_retryable=False, + ), + ), +) +RaiseNexusOperationCanceledErrorFromApplicationErrorNonRetryableFromCustomError = ErrorTestCase( + name="RaiseNexusOperationCanceledErrorFromApplicationErrorNonRetryableFromCustomError", + operation_name=ErrorTestService.raise_nexus_operation_canceled_error_from_application_error_non_retryable_from_custom_error.__name__, + expected_exception_chain=ExpectedErrorChain( + ExpectedNexusOperationError( + message="nexus operation completed unsuccessfully", + service="ErrorTestService", + ), + ExpectedCancelledError( + message="operation-error-message", + ), + ExpectedApplicationError( + message="application-error-message", + type="application-error-type", + non_retryable=True, + ), + ExpectedApplicationError( + message="custom-error-message", + type="CustomError", + non_retryable=False, + ), + ), +) -@nexusrpc.handler.service_handler -class ErrorTestService: - @sync_operation - async def op(self, ctx: StartOperationContext, input: ErrorTestInput) -> None: - error_conversion_test_cases[input.name].action_in_nexus_operation() +_EXPECTED_CHAINS: dict[str, ExpectedErrorChain] = { + tc.operation_name: tc.expected_exception_chain + for tc in [ + RaiseApplicationErrorNonRetryable, + RaiseApplicationErrorNonRetryableFromCustomError, + RaiseNexusHandlerErrorNotFound, + RaiseNexusHandlerErrorNotFoundFromCustomError, + RaiseNexusHandlerErrorNotFoundFromHandlerErrorUnavailable, + RaiseNexusOperationErrorFromApplicationErrorNonRetryableFromCustomError, + RaiseNexusOperationCanceledErrorFromApplicationErrorNonRetryableFromCustomError, + ] +} + + +# Caller workflow + + +def _matches_expected(actual: BaseException, expected: ExpectedError) -> bool: + """Check if an actual exception matches the expected error specification.""" + if isinstance(expected, ExpectedNexusOperationError): + if not isinstance(actual, NexusOperationError): + return False + if actual.message != expected.message: + return False + if actual.service != expected.service: + return False + return True + + elif isinstance(expected, ExpectedHandlerError): + if not isinstance(actual, nexusrpc.HandlerError): + return False + if expected.message not in str(actual): + return False + if actual.type.name != expected.type: + return False + if actual.retryable != expected.retryable: + return False + return True + + elif isinstance(expected, ExpectedApplicationError): + if not isinstance(actual, ApplicationError): + return False + if actual.message != expected.message: + return False + if actual.non_retryable != expected.non_retryable: + return False + if expected.type is not None and actual.type != expected.type: + return False + return True + + elif isinstance(expected, ExpectedCancelledError): + if not isinstance(actual, CancelledError): + return False + if actual.message != expected.message: + return False + return True + + return False + + +def _format_mismatch(actual: BaseException, expected: ExpectedError) -> str: + """Format a detailed mismatch message for debugging.""" + lines = ["Mismatch between actual and expected error:"] + lines.append(f" Actual: {type(actual).__name__}: {actual}") + lines.append(f" Expected: {expected}") + return "\n".join(lines) + + +def _validate_exception_chain( + err: BaseException, + expected_chain: ExpectedErrorChain, +) -> None: + """Walk the exception chain and validate each exception against expected. + + Optional expected errors can be skipped if they don't match the current actual error. + """ + actual_chain: list[BaseException] = [] + current: BaseException | None = err + while current is not None: + actual_chain.append(current) + current = current.__cause__ + + actual_idx = 0 + expected_idx = 0 + + while actual_idx < len(actual_chain) and expected_idx < len(expected_chain): + actual = actual_chain[actual_idx] + expected = expected_chain[expected_idx] + + if _matches_expected(actual, expected): + # Match found, advance both + actual_idx += 1 + expected_idx += 1 + elif expected.optional: + # Optional expected error didn't match, skip it + print(f"Skipping optional expected error: {expected}") + expected_idx += 1 + else: + # Required expected error didn't match + assert False, _format_mismatch(actual, expected) + + # Check remaining expected errors are all optional + while expected_idx < len(expected_chain): + expected = expected_chain[expected_idx] + assert expected.optional, ( + f"Required expected error not found in chain: {expected}" + ) + expected_idx += 1 -# Caller + # Check no remaining actual errors + assert actual_idx == len(actual_chain), ( + f"Unexpected errors in chain: {actual_chain[actual_idx:]}" + ) @workflow.defn(sandboxed=False) @@ -370,40 +599,37 @@ def __init__(self, input: ErrorTestInput): ) @workflow.run - async def invoke_nexus_op_and_assert_error(self, input: ErrorTestInput) -> None: + async def run(self, input: ErrorTestInput) -> None: try: await self.nexus_client.execute_operation( - ErrorTestService.op, # type: ignore[arg-type] # mypy can't infer OutputT=None in Union type + input.operation_name, input, output_type=None, ) except BaseException as err: - errs = [err] - while err.__cause__: - errs.append(err.__cause__) - err = err.__cause__ - - test_case = error_conversion_test_cases[input.name] - assert len(errs) == len(test_case.expected_exception_chain_in_workflow) - for err, (expected_cls, expected_fields) in zip( - errs, test_case.expected_exception_chain_in_workflow - ): - assert isinstance(err, expected_cls) - for k, v in expected_fields.items(): - if k == "message" and isinstance(err, nexusrpc.HandlerError): - assert str(err) == v - else: - assert getattr(err, k) == v - - else: - assert False, "Unreachable" - - -@pytest.mark.parametrize("test_case", list(error_conversion_test_cases.values())) + _validate_exception_chain(err, _EXPECTED_CHAINS[input.operation_name]) + return + + raise AssertionError("Expected exception was not raised") + + +@pytest.mark.parametrize( + "test_case", + [ + RaiseApplicationErrorNonRetryable, + RaiseApplicationErrorNonRetryableFromCustomError, + RaiseNexusHandlerErrorNotFound, + RaiseNexusHandlerErrorNotFoundFromCustomError, + RaiseNexusHandlerErrorNotFoundFromHandlerErrorUnavailable, + RaiseNexusOperationErrorFromApplicationErrorNonRetryableFromCustomError, + RaiseNexusOperationCanceledErrorFromApplicationErrorNonRetryableFromCustomError, + ], + ids=lambda tc: tc.name, +) async def test_errors_raised_by_nexus_operation( - client: Client, env: WorkflowEnvironment, test_case: type[ErrorConversionTestCase] + client: Client, env: WorkflowEnvironment, test_case: ErrorTestCase ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) @@ -413,12 +639,14 @@ async def test_errors_raised_by_nexus_operation( workflows=[ErrorTestCallerWorkflow], task_queue=task_queue, ): - await create_nexus_endpoint(task_queue, client) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(task_queue), task_queue + ) await client.execute_workflow( - ErrorTestCallerWorkflow.invoke_nexus_op_and_assert_error, + ErrorTestCallerWorkflow.run, ErrorTestInput( task_queue=task_queue, - name=test_case.__name__, + operation_name=test_case.operation_name, ), id=str(uuid.uuid4()), task_queue=task_queue, diff --git a/tests/nexus/test_workflow_caller_errors.py b/tests/nexus/test_workflow_caller_errors.py index 0fc32ba5bf..1f11298518 100644 --- a/tests/nexus/test_workflow_caller_errors.py +++ b/tests/nexus/test_workflow_caller_errors.py @@ -2,12 +2,13 @@ import asyncio import concurrent.futures -import threading import uuid from collections import Counter +from collections.abc import Sequence from dataclasses import dataclass from datetime import timedelta from logging import getLogger +from typing import Any import nexusrpc import nexusrpc.handler @@ -22,20 +23,34 @@ sync_operation, ) +import temporalio.api.common.v1 from temporalio import nexus, workflow from temporalio.client import ( Client, WorkflowFailureError, ) +from temporalio.converter import ( + DataConverter, + DefaultPayloadConverter, + PayloadCodec, + create_payload_validation_error, +) from temporalio.exceptions import ( ApplicationError, NexusOperationError, TimeoutError, + TimeoutType, ) +from temporalio.service import RPCError, RPCStatusCode from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker +from temporalio.worker._nexus import _NexusPayloadSerializer from tests.helpers import LogCapturer, assert_eq_eventually -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from tests.helpers.nexus import make_nexus_endpoint_name + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server operation_invocation_counts = Counter[str]() @@ -50,6 +65,13 @@ class ErrorTestInput: id: str +@dataclass +class RPCErrorInput: + status_code_value: int # RPCStatusCode int value + task_queue: str + id: str + + @workflow.defn class NonTerminatingWorkflow: @workflow.run @@ -61,14 +83,14 @@ async def run(self) -> None: class ErrorTestService: @nexusrpc.handler.sync_operation def retried_due_to_exception( - self, ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput + self, _ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput ) -> None: operation_invocation_counts[input.id] += 1 raise Exception @nexusrpc.handler.sync_operation def retried_due_to_retryable_application_error( - self, ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput + self, _ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput ) -> None: operation_invocation_counts[input.id] += 1 raise ApplicationError( @@ -79,7 +101,7 @@ def retried_due_to_retryable_application_error( @nexusrpc.handler.sync_operation def retried_due_to_resource_exhausted_handler_error( - self, ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput + self, _ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput ) -> None: operation_invocation_counts[input.id] += 1 raise nexusrpc.HandlerError( @@ -89,7 +111,7 @@ def retried_due_to_resource_exhausted_handler_error( @nexusrpc.handler.sync_operation def retried_due_to_internal_handler_error( - self, ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput + self, _ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput ) -> None: operation_invocation_counts[input.id] += 1 raise nexusrpc.HandlerError( @@ -99,7 +121,7 @@ def retried_due_to_internal_handler_error( @nexusrpc.handler.sync_operation async def fails_due_to_workflow_already_started( - self, ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput + self, _ctx: nexusrpc.handler.StartOperationContext, input: ErrorTestInput ) -> None: operation_invocation_counts[input.id] += 1 for _ in range(2): @@ -109,6 +131,18 @@ async def fails_due_to_workflow_already_started( task_queue=nexus.info().task_queue, ) + @nexusrpc.handler.sync_operation + def raise_rpc_error( + self, _ctx: nexusrpc.handler.StartOperationContext, input: RPCErrorInput + ) -> None: + operation_invocation_counts[input.id] += 1 + status_code = RPCStatusCode(input.status_code_value) + raise RPCError( + f"Test error for {status_code.name}", + status_code, + b"", + ) + @workflow.defn(sandboxed=False) class CallerWorkflow: @@ -121,6 +155,20 @@ async def run(self, input: ErrorTestInput) -> None: await nexus_client.execute_operation(input.operation_name, input) +@workflow.defn(sandboxed=False) +class RPCErrorCallerWorkflow: + @workflow.run + async def run(self, input: RPCErrorInput) -> None: + nexus_client = workflow.create_nexus_client( + service="ErrorTestService", + endpoint=make_nexus_endpoint_name(input.task_queue), + ) + await nexus_client.execute_operation( + ErrorTestService.raise_rpc_error, + input, + ) + + @pytest.mark.parametrize( "operation_name", [ @@ -133,7 +181,7 @@ async def run(self, input: ErrorTestInput) -> None: async def test_nexus_operation_is_retried( client: Client, env: WorkflowEnvironment, operation_name: str ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") input = ErrorTestInput( @@ -149,7 +197,9 @@ async def test_nexus_operation_is_retried( workflows=[CallerWorkflow], task_queue=input.task_queue, ): - await create_nexus_endpoint(input.task_queue, client) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(input.task_queue), input.task_queue + ) asyncio.create_task( client.execute_workflow( CallerWorkflow.run, @@ -192,7 +242,7 @@ async def test_nexus_operation_fails_without_retry_as_handler_error( handler_error_type: nexusrpc.HandlerErrorType, handler_error_message: str, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") input = ErrorTestInput( @@ -212,7 +262,9 @@ async def test_nexus_operation_fails_without_retry_as_handler_error( workflows=[CallerWorkflow], task_queue=input.task_queue, ): - await create_nexus_endpoint(input.task_queue, client) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(input.task_queue), input.task_queue + ) try: await client.execute_workflow( CallerWorkflow.run, @@ -232,33 +284,23 @@ async def test_nexus_operation_fails_without_retry_as_handler_error( pytest.fail("Unreachable") -_start_operation_sync_complete = threading.Event() - - # Start timeout test @service_handler class StartTimeoutTestService: @sync_operation async def expect_timeout_cancellation_async( - self, ctx: StartOperationContext, input: None + self, ctx: StartOperationContext, _input: None ) -> None: try: - await asyncio.wait_for(ctx.task_cancellation.wait_until_cancelled(), 1) + await asyncio.wait_for(ctx.task_cancellation.wait_until_cancelled(), 3) except asyncio.TimeoutError: raise ApplicationError("expected cancel", non_retryable=True) @sync_operation def expect_timeout_cancellation_sync( - self, ctx: StartOperationContext, input: None + self, ctx: StartOperationContext, _input: None ) -> None: - global _start_operation_sync_complete - cancelled = ctx.task_cancellation.wait_until_cancelled_sync(1) - if not cancelled: - raise ApplicationError("expected cancel", non_retryable=True) - reason = ctx.task_cancellation.cancellation_reason() - if reason != "TIMED_OUT": - logger.error("unexpected cancellation reason: %s", reason) - _start_operation_sync_complete.set() + ctx.task_cancellation.wait_until_cancelled_sync(5) @workflow.defn @@ -276,16 +318,15 @@ async def run(self, operation: str) -> None: operation, None, output_type=None, - schedule_to_close_timeout=timedelta(seconds=0.1), + schedule_to_close_timeout=timedelta(seconds=2), ) async def test_error_raised_by_timeout_of_nexus_start_operation( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") - global _start_operation_sync_complete task_queue = str(uuid.uuid4()) async with Worker( @@ -295,7 +336,9 @@ async def test_error_raised_by_timeout_of_nexus_start_operation( task_queue=task_queue, nexus_task_executor=concurrent.futures.ThreadPoolExecutor(), ): - await create_nexus_endpoint(task_queue, client) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(task_queue), task_queue + ) try: await client.execute_workflow( StartTimeoutTestCallerWorkflow.run, @@ -326,11 +369,152 @@ async def test_error_raised_by_timeout_of_nexus_start_operation( pytest.fail( "Expected exception due to timeout of nexus start operation" ) - - _start_operation_sync_complete.wait() assert capturer.find_log("unexpected cancellation reason") is None +# Schedule to start timeout test +@service_handler +class ScheduleToStartTimeoutTestService: + @sync_operation + async def expect_schedule_to_start_timeout( + self, ctx: StartOperationContext, _input: None + ) -> None: + try: + await asyncio.wait_for(ctx.task_cancellation.wait_until_cancelled(), 1) + except asyncio.TimeoutError: + raise ApplicationError("expected cancel", non_retryable=True) + + +@workflow.defn +class ScheduleToStartTimeoutTestCallerWorkflow: + @workflow.init + def __init__(self): + self.nexus_client = workflow.create_nexus_client( + service=ScheduleToStartTimeoutTestService, + endpoint=make_nexus_endpoint_name(workflow.info().task_queue), + ) + + @workflow.run + async def run(self) -> None: + await self.nexus_client.execute_operation( + ScheduleToStartTimeoutTestService.expect_schedule_to_start_timeout, + None, + output_type=None, + schedule_to_start_timeout=timedelta(seconds=0.1), + ) + + +async def test_error_raised_by_schedule_to_start_timeout_of_nexus_operation( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + async with Worker( + client, + nexus_service_handlers=[ScheduleToStartTimeoutTestService()], + workflows=[ScheduleToStartTimeoutTestCallerWorkflow], + task_queue=task_queue, + nexus_task_executor=concurrent.futures.ThreadPoolExecutor(), + ): + await env.create_nexus_endpoint( + make_nexus_endpoint_name(task_queue), task_queue + ) + try: + await client.execute_workflow( + ScheduleToStartTimeoutTestCallerWorkflow.run, + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + except Exception as err: + assert isinstance(err, WorkflowFailureError) + assert isinstance(err.__cause__, NexusOperationError) + assert isinstance(err.__cause__.__cause__, TimeoutError) + timeout_err = err.__cause__.__cause__ + assert timeout_err.type == TimeoutType.SCHEDULE_TO_START + else: + pytest.fail( + "Expected exception due to schedule to start timeout of nexus operation" + ) + + +# Start to close timeout test + + +class OperationThatExpectsStartToCloseTimeoutAsync(OperationHandler[None, None]): + async def start( + self, ctx: StartOperationContext, input: None + ) -> StartOperationResultAsync: + return StartOperationResultAsync("fake-token") + + async def cancel(self, ctx: CancelOperationContext, token: str) -> None: + pass + + +@service_handler +class StartToCloseTimeoutTestService: + @operation_handler + def expect_start_to_close_timeout(self) -> OperationHandler[None, None]: + return OperationThatExpectsStartToCloseTimeoutAsync() + + +@workflow.defn +class StartToCloseTimeoutTestCallerWorkflow: + @workflow.init + def __init__( + self, + ): + self.nexus_client = workflow.create_nexus_client( + service=StartToCloseTimeoutTestService, + endpoint=make_nexus_endpoint_name(workflow.info().task_queue), + ) + + @workflow.run + async def run(self) -> None: + op_handle = await self.nexus_client.start_operation( + StartToCloseTimeoutTestService.expect_start_to_close_timeout, + None, + start_to_close_timeout=timedelta(seconds=0.1), + ) + await op_handle + + +async def test_error_raised_by_start_to_close_timeout_of_nexus_operation( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + async with Worker( + client, + nexus_service_handlers=[StartToCloseTimeoutTestService()], + workflows=[StartToCloseTimeoutTestCallerWorkflow], + task_queue=task_queue, + nexus_task_executor=concurrent.futures.ThreadPoolExecutor(), + ): + await env.create_nexus_endpoint( + make_nexus_endpoint_name(task_queue), task_queue + ) + try: + await client.execute_workflow( + StartToCloseTimeoutTestCallerWorkflow.run, + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + except Exception as err: + assert isinstance(err, WorkflowFailureError) + assert isinstance(err.__cause__, NexusOperationError) + timeout_err = err.__cause__.__cause__ + assert isinstance(timeout_err, TimeoutError) + assert timeout_err.type == TimeoutType.START_TO_CLOSE + else: + pytest.fail( + "Expected exception due to start to close timeout of nexus operation" + ) + + # Cancellation timeout test @@ -380,7 +564,7 @@ async def run(self) -> None: async def test_error_raised_by_timeout_of_nexus_cancel_operation( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) @@ -391,7 +575,9 @@ async def test_error_raised_by_timeout_of_nexus_cancel_operation( task_queue=task_queue, ): with LogCapturer().logs_captured(logger) as capturer: - await create_nexus_endpoint(task_queue, client) + await env.create_nexus_endpoint( + make_nexus_endpoint_name(task_queue), task_queue + ) try: await client.execute_workflow( CancellationTimeoutTestCallerWorkflow.run, @@ -408,3 +594,525 @@ async def test_error_raised_by_timeout_of_nexus_cancel_operation( ) assert capturer.find_log("expected cancellation") is None + + +# RPCError tests + + +@pytest.mark.parametrize( + ["status_code", "expected_handler_error_type"], + [ + (RPCStatusCode.INVALID_ARGUMENT, nexusrpc.HandlerErrorType.BAD_REQUEST), + (RPCStatusCode.ALREADY_EXISTS, nexusrpc.HandlerErrorType.INTERNAL), + (RPCStatusCode.FAILED_PRECONDITION, nexusrpc.HandlerErrorType.INTERNAL), + (RPCStatusCode.OUT_OF_RANGE, nexusrpc.HandlerErrorType.INTERNAL), + (RPCStatusCode.NOT_FOUND, nexusrpc.HandlerErrorType.NOT_FOUND), + (RPCStatusCode.UNIMPLEMENTED, nexusrpc.HandlerErrorType.NOT_IMPLEMENTED), + ], +) +async def test_rpc_error_fails_without_retry( + client: Client, + env: WorkflowEnvironment, + status_code: RPCStatusCode, + expected_handler_error_type: nexusrpc.HandlerErrorType, +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + input = RPCErrorInput( + status_code_value=status_code.value, + task_queue=str(uuid.uuid4()), + id=str(uuid.uuid4()), + ) + async with Worker( + client, + nexus_service_handlers=[ErrorTestService()], + nexus_task_executor=concurrent.futures.ThreadPoolExecutor(max_workers=1), + workflows=[RPCErrorCallerWorkflow], + task_queue=input.task_queue, + ): + await env.create_nexus_endpoint( + make_nexus_endpoint_name(input.task_queue), input.task_queue + ) + try: + await client.execute_workflow( + RPCErrorCallerWorkflow.run, + input, + id=str(uuid.uuid4()), + task_queue=input.task_queue, + ) + except Exception as err: + assert isinstance(err, WorkflowFailureError) + assert isinstance(err.__cause__, NexusOperationError) + handler_error = err.__cause__.__cause__ + assert isinstance(handler_error, nexusrpc.HandlerError) + assert not handler_error.retryable + assert handler_error.type == expected_handler_error_type + # Verify no retry occurred + assert operation_invocation_counts[input.id] == 1 + else: + pytest.fail("Expected WorkflowFailureError") + + +@pytest.mark.parametrize( + "status_code", + [ + RPCStatusCode.ABORTED, + RPCStatusCode.UNAVAILABLE, + RPCStatusCode.CANCELLED, + RPCStatusCode.DATA_LOSS, + RPCStatusCode.INTERNAL, + RPCStatusCode.UNKNOWN, + RPCStatusCode.UNAUTHENTICATED, + RPCStatusCode.PERMISSION_DENIED, + RPCStatusCode.RESOURCE_EXHAUSTED, + RPCStatusCode.DEADLINE_EXCEEDED, + RPCStatusCode.OK, # fallback case + ], +) +async def test_rpc_error_is_retried( + client: Client, + env: WorkflowEnvironment, + status_code: RPCStatusCode, +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + input = RPCErrorInput( + status_code_value=status_code.value, + task_queue=str(uuid.uuid4()), + id=str(uuid.uuid4()), + ) + async with Worker( + client, + nexus_service_handlers=[ErrorTestService()], + nexus_task_executor=concurrent.futures.ThreadPoolExecutor(max_workers=1), + workflows=[RPCErrorCallerWorkflow], + task_queue=input.task_queue, + ): + await env.create_nexus_endpoint( + make_nexus_endpoint_name(input.task_queue), input.task_queue + ) + + handle = await client.start_workflow( + RPCErrorCallerWorkflow.run, + input, + id=str(uuid.uuid4()), + task_queue=input.task_queue, + ) + + async def times_called() -> int: + return operation_invocation_counts[input.id] + + await assert_eq_eventually(2, times_called) + + await handle.cancel() + + +# DataConverter codec/converter error tests + + +@nexusrpc.handler.service_handler +class DataConverterTestService: + @nexusrpc.handler.sync_operation + def succeed( + self, _ctx: nexusrpc.handler.StartOperationContext, _input: ErrorTestInput + ) -> None: + pass + + +class FailOnFirstDecodeCodec(PayloadCodec): + def __init__(self) -> None: + self.decode_count = 0 + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return list(payloads) + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + self.decode_count += 1 + if self.decode_count == 1: + raise RuntimeError("Intentional codec decode failure") + return list(payloads) + + +class FailingFromPayloadsConverter(DefaultPayloadConverter): + def from_payloads( + self, + payloads: Sequence[temporalio.api.common.v1.Payload], + type_hints: list[type] | None = None, + ) -> list[Any]: + raise RuntimeError("Intentional payload converter failure") + + +async def test_nexus_operation_retried_on_codec_decode_failure( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + codec = FailOnFirstDecodeCodec() + handler_client = Client( + client.service_client, + namespace=client.namespace, + data_converter=DataConverter(payload_codec=codec), + ) + input = ErrorTestInput( + service_name="DataConverterTestService", + operation_name="succeed", + task_queue=task_queue, + id=str(uuid.uuid4()), + ) + async with ( + Worker( + client, + workflows=[CallerWorkflow], + task_queue=task_queue, + ), + Worker( + handler_client, + nexus_service_handlers=[DataConverterTestService()], + nexus_task_executor=concurrent.futures.ThreadPoolExecutor(max_workers=1), + task_queue=task_queue, + ), + ): + await env.create_nexus_endpoint( + make_nexus_endpoint_name(input.task_queue), input.task_queue + ) + await client.execute_workflow( + CallerWorkflow.run, + input, + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + assert codec.decode_count == 2 + + +async def test_nexus_operation_fails_without_retry_on_converter_failure( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + handler_client = Client( + client.service_client, + namespace=client.namespace, + data_converter=DataConverter( + payload_converter_class=FailingFromPayloadsConverter + ), + ) + input = ErrorTestInput( + service_name="DataConverterTestService", + operation_name="succeed", + task_queue=task_queue, + id=str(uuid.uuid4()), + ) + async with ( + Worker( + client, + workflows=[CallerWorkflow], + task_queue=task_queue, + ), + Worker( + handler_client, + nexus_service_handlers=[DataConverterTestService()], + nexus_task_executor=concurrent.futures.ThreadPoolExecutor(max_workers=1), + task_queue=task_queue, + ), + ): + await env.create_nexus_endpoint( + make_nexus_endpoint_name(input.task_queue), input.task_queue + ) + try: + await client.execute_workflow( + CallerWorkflow.run, + input, + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + except Exception as err: + assert isinstance(err, WorkflowFailureError) + assert isinstance(err.__cause__, NexusOperationError) + handler_error = err.__cause__.__cause__ + assert isinstance(handler_error, nexusrpc.HandlerError) + assert handler_error.type == nexusrpc.HandlerErrorType.BAD_REQUEST + assert not handler_error.retryable + assert "Payload converter failed to decode Nexus operation input" in str( + handler_error + ) + else: + pytest.fail("Expected WorkflowFailureError") + + +_PAYLOAD_VALIDATION_FAILURE_MESSAGE = "Payload validation failed" +_PAYLOAD_VALIDATION_FAILURE_DETAILS = { + "violations": [{"path": "some.path", "reason": "must be an int"}] +} + + +class RaiseOnDecodeCodec(PayloadCodec): + def __init__(self, error: Exception) -> None: + self.error = error + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return list(payloads) + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + raise self.error + + +def _converter_class_raising(error: Exception) -> type[DefaultPayloadConverter]: + class RaiseOnFromPayloadsConverter(DefaultPayloadConverter): + def from_payloads( + self, + payloads: Sequence[temporalio.api.common.v1.Payload], + type_hints: list[type] | None = None, + ) -> list[Any]: + raise error + + return RaiseOnFromPayloadsConverter + + +async def _deserialize_input(data_converter: DataConverter) -> Any: + [payload] = DataConverter.default.payload_converter.to_payloads(["input"]) + serializer = _NexusPayloadSerializer(data_converter=data_converter, payload=payload) + return await serializer.deserialize(nexusrpc.Content(headers={}, data=b"")) + + +async def _deserialize_input_with_codec_error(error: Exception) -> Any: + return await _deserialize_input( + DataConverter(payload_codec=RaiseOnDecodeCodec(error)) + ) + + +async def _deserialize_input_with_converter_error(error: Exception) -> Any: + return await _deserialize_input( + DataConverter(payload_converter_class=_converter_class_raising(error)) + ) + + +async def test_codec_input_payload_validation_failure_is_bad_request(): + validation_error = create_payload_validation_error( + _PAYLOAD_VALIDATION_FAILURE_DETAILS + ) + with pytest.raises(nexusrpc.HandlerError) as err: + await _deserialize_input_with_codec_error(validation_error) + assert err.value.type == nexusrpc.HandlerErrorType.BAD_REQUEST + assert not err.value.retryable + assert err.value.message == "Invalid operation input" + cause = err.value.__cause__ + assert isinstance(cause, ApplicationError) + assert cause is validation_error + assert cause.message == _PAYLOAD_VALIDATION_FAILURE_MESSAGE + + +async def test_codec_input_decode_failure_of_other_error_type_is_internal(): + decode_error = ApplicationError( + _PAYLOAD_VALIDATION_FAILURE_MESSAGE, + type="SomeOtherErrorType", + non_retryable=True, + ) + with pytest.raises(nexusrpc.HandlerError) as err: + await _deserialize_input_with_codec_error(decode_error) + assert err.value.type == nexusrpc.HandlerErrorType.INTERNAL + assert "Payload codec failed to decode Nexus operation input" in str(err.value) + cause = err.value.__cause__ + assert isinstance(cause, ApplicationError) + assert cause is decode_error + assert cause.message == _PAYLOAD_VALIDATION_FAILURE_MESSAGE + + +async def test_retryable_codec_input_payload_validation_failure_is_internal(): + validation_error = ApplicationError( + _PAYLOAD_VALIDATION_FAILURE_MESSAGE, + type="PayloadValidationError", + ) + with pytest.raises(nexusrpc.HandlerError) as err: + await _deserialize_input_with_codec_error(validation_error) + assert err.value.type == nexusrpc.HandlerErrorType.INTERNAL + assert err.value.retryable + assert "Payload codec failed to decode Nexus operation input" in str(err.value) + cause = err.value.__cause__ + assert isinstance(cause, ApplicationError) + assert cause is validation_error + assert cause.message == _PAYLOAD_VALIDATION_FAILURE_MESSAGE + + +async def test_converter_input_payload_validation_failure_is_bad_request(): + validation_error = create_payload_validation_error( + _PAYLOAD_VALIDATION_FAILURE_DETAILS + ) + with pytest.raises(nexusrpc.HandlerError) as err: + await _deserialize_input_with_converter_error(validation_error) + assert err.value.type == nexusrpc.HandlerErrorType.BAD_REQUEST + assert not err.value.retryable + assert err.value.message == "Invalid operation input" + cause = err.value.__cause__ + assert isinstance(cause, ApplicationError) + assert cause is validation_error + assert cause.message == _PAYLOAD_VALIDATION_FAILURE_MESSAGE + + +async def test_converter_input_failure_of_other_error_type_keeps_generic_message(): + convert_error = ApplicationError( + _PAYLOAD_VALIDATION_FAILURE_MESSAGE, + type="SomeOtherErrorType", + non_retryable=True, + ) + with pytest.raises(nexusrpc.HandlerError) as err: + await _deserialize_input_with_converter_error(convert_error) + assert err.value.type == nexusrpc.HandlerErrorType.BAD_REQUEST + assert not err.value.retryable + assert ( + err.value.message == "Payload converter failed to decode Nexus operation input" + ) + cause = err.value.__cause__ + assert isinstance(cause, ApplicationError) + assert cause is convert_error + assert cause.message == _PAYLOAD_VALIDATION_FAILURE_MESSAGE + + +async def test_retryable_converter_input_payload_validation_failure_keeps_generic_message(): + validation_error = ApplicationError( + _PAYLOAD_VALIDATION_FAILURE_MESSAGE, + type="PayloadValidationError", + ) + with pytest.raises(nexusrpc.HandlerError) as err: + await _deserialize_input_with_converter_error(validation_error) + assert err.value.type == nexusrpc.HandlerErrorType.BAD_REQUEST + assert not err.value.retryable + assert ( + err.value.message == "Payload converter failed to decode Nexus operation input" + ) + cause = err.value.__cause__ + assert isinstance(cause, ApplicationError) + assert cause is validation_error + assert cause.message == _PAYLOAD_VALIDATION_FAILURE_MESSAGE + + +async def test_nexus_operation_fails_without_retry_on_codec_input_validation_failure( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + validation_error = create_payload_validation_error( + _PAYLOAD_VALIDATION_FAILURE_DETAILS + ) + handler_client = Client( + client.service_client, + namespace=client.namespace, + data_converter=DataConverter( + payload_codec=RaiseOnDecodeCodec(validation_error) + ), + ) + input = ErrorTestInput( + service_name="DataConverterTestService", + operation_name="succeed", + task_queue=task_queue, + id=str(uuid.uuid4()), + ) + async with ( + Worker( + client, + workflows=[CallerWorkflow], + task_queue=task_queue, + ), + Worker( + handler_client, + nexus_service_handlers=[DataConverterTestService()], + nexus_task_executor=concurrent.futures.ThreadPoolExecutor(max_workers=1), + task_queue=task_queue, + ), + ): + await env.create_nexus_endpoint( + make_nexus_endpoint_name(input.task_queue), input.task_queue + ) + with pytest.raises(WorkflowFailureError) as err: + await client.execute_workflow( + CallerWorkflow.run, + input, + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + assert isinstance(err.value.__cause__, NexusOperationError) + handler_error = err.value.__cause__.__cause__ + assert isinstance(handler_error, nexusrpc.HandlerError) + assert handler_error.type == nexusrpc.HandlerErrorType.BAD_REQUEST + assert not handler_error.retryable + assert handler_error.message == "Invalid operation input" + cause = handler_error.__cause__ + assert isinstance(cause, ApplicationError) + assert cause.type == "PayloadValidationError" + assert cause.message == _PAYLOAD_VALIDATION_FAILURE_MESSAGE + assert cause.details == (_PAYLOAD_VALIDATION_FAILURE_DETAILS,) + + +async def test_nexus_operation_fails_without_retry_on_converter_input_validation_failure( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + validation_error = create_payload_validation_error( + _PAYLOAD_VALIDATION_FAILURE_DETAILS + ) + handler_client = Client( + client.service_client, + namespace=client.namespace, + data_converter=DataConverter( + payload_converter_class=_converter_class_raising(validation_error) + ), + ) + input = ErrorTestInput( + service_name="DataConverterTestService", + operation_name="succeed", + task_queue=task_queue, + id=str(uuid.uuid4()), + ) + async with ( + Worker( + client, + workflows=[CallerWorkflow], + task_queue=task_queue, + ), + Worker( + handler_client, + nexus_service_handlers=[DataConverterTestService()], + nexus_task_executor=concurrent.futures.ThreadPoolExecutor(max_workers=1), + task_queue=task_queue, + ), + ): + await env.create_nexus_endpoint( + make_nexus_endpoint_name(input.task_queue), input.task_queue + ) + with pytest.raises(WorkflowFailureError) as err: + await client.execute_workflow( + CallerWorkflow.run, + input, + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + assert isinstance(err.value.__cause__, NexusOperationError) + handler_error = err.value.__cause__.__cause__ + assert isinstance(handler_error, nexusrpc.HandlerError) + assert handler_error.type == nexusrpc.HandlerErrorType.BAD_REQUEST + assert not handler_error.retryable + # A validation failure gets its own message, distinct from the generic decode failure. + assert handler_error.message == "Invalid operation input" + cause = handler_error.__cause__ + assert isinstance(cause, ApplicationError) + assert cause.type == "PayloadValidationError" + assert cause.message == _PAYLOAD_VALIDATION_FAILURE_MESSAGE + assert cause.details == (_PAYLOAD_VALIDATION_FAILURE_DETAILS,) diff --git a/tests/nexus/test_workflow_caller_eviction.py b/tests/nexus/test_workflow_caller_eviction.py new file mode 100644 index 0000000000..c3081306a8 --- /dev/null +++ b/tests/nexus/test_workflow_caller_eviction.py @@ -0,0 +1,162 @@ +import gc +import uuid +from contextlib import AsyncExitStack +from dataclasses import dataclass +from datetime import timedelta +from typing import Literal + +import nexusrpc +import nexusrpc.handler +import pytest + +import temporalio.api.enums.v1 +import temporalio.nexus as nexus +import temporalio.workflow as workflow +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from tests.helpers import assert_event_subsequence +from tests.helpers.nexus import make_nexus_endpoint_name + +pytestmark = pytest.mark.requires_local_server + + +@nexusrpc.service +class EvictionTestService: + wait: nexusrpc.Operation[str, str] + + +@workflow.defn +class EvictionTestOperationWorkflow: + def __init__(self) -> None: + self.released = False + + @workflow.run + async def run(self) -> str: + await workflow.wait_condition(lambda: self.released) + return "completed" + + @workflow.signal + def release(self) -> None: + self.released = True + + +@nexusrpc.handler.service_handler(service=EvictionTestService) +class EvictionTestServiceHandler: + @nexus.temporal_operation + async def wait( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + workflow_id: str, + ) -> nexus.TemporalOperationResult[str]: + return await client.start_workflow( + EvictionTestOperationWorkflow.run, id=workflow_id + ) + + +@dataclass +class EvictionTestCallerInput: + endpoint: str + operation_workflow_id: str + + +@workflow.defn +class EvictionTestCallerWorkflow: + @workflow.run + async def run(self, input: EvictionTestCallerInput) -> str: + client = workflow.create_nexus_client( + service=EvictionTestService, endpoint=input.endpoint + ) + return await client.execute_operation( + EvictionTestService.wait, + input.operation_workflow_id, + schedule_to_close_timeout=timedelta(minutes=5), + ) + + +@pytest.mark.parametrize("operation_state", ["starting", "started"]) +@pytest.mark.parametrize("eviction_reason", ["cache-eviction", "shutdown"]) +async def test_nexus_caller_eviction( + env: WorkflowEnvironment, + operation_state: Literal["starting", "started"], + eviction_reason: Literal["cache-eviction", "shutdown"], + caplog: pytest.LogCaptureFixture, +) -> None: + if env.supports_time_skipping: + pytest.skip("Nexus tests don't work with time-skipping server") + + caller_id = str(uuid.uuid4()) + caller_queue = str(uuid.uuid4()) + handler_queue = str(uuid.uuid4()) + operation_id = str(uuid.uuid4()) + endpoint = make_nexus_endpoint_name(handler_queue) + await env.create_nexus_endpoint(endpoint, handler_queue) + + async with AsyncExitStack() as stack: + handler_worker = Worker( + env.client, + task_queue=handler_queue, + workflows=[EvictionTestOperationWorkflow], + nexus_service_handlers=[EvictionTestServiceHandler()], + ) + if operation_state == "started": + await stack.enter_async_context(handler_worker) + + async with Worker( + env.client, + task_queue=caller_queue, + workflows=[EvictionTestCallerWorkflow], + max_cached_workflows=1000 if eviction_reason == "shutdown" else 0, + ): + handle = await env.client.start_workflow( + EvictionTestCallerWorkflow.run, + EvictionTestCallerInput(endpoint, operation_id), + id=caller_id, + task_queue=caller_queue, + ) + + expected_events = [ + temporalio.api.enums.v1.EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED + ] + if operation_state == "started": + # The following workflow task must complete so the caller is + # waiting for the operation's result, not its start response. + expected_events.extend( + [ + temporalio.api.enums.v1.EventType.EVENT_TYPE_NEXUS_OPERATION_STARTED, + temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_TASK_COMPLETED, + ] + ) + await assert_event_subsequence(handle, expected_events) + + gc.collect() + assert "Task was destroyed but it is pending!" not in caplog.text + + if operation_state == "starting": + # Keep start pending until the original caller worker stops. + await stack.enter_async_context(handler_worker) + + # A different worker must still receive the original operation's result. + async with Worker( + env.client, + task_queue=caller_queue, + workflows=[EvictionTestCallerWorkflow], + ): + await assert_event_subsequence( + handle, + [temporalio.api.enums.v1.EventType.EVENT_TYPE_NEXUS_OPERATION_STARTED], + ) + operation_handle = env.client.get_workflow_handle( + operation_id, result_type=str + ) + await operation_handle.signal(EvictionTestOperationWorkflow.release) + assert await handle.result() == "completed" + + history = await handle.fetch_history() + assert not any( + event.event_type + == temporalio.api.enums.v1.EventType.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED + for event in history.events + ) + gc.collect() + assert "Task was destroyed but it is pending!" not in caplog.text diff --git a/tests/nexus/test_workflow_run_operation.py b/tests/nexus/test_workflow_run_operation.py index cfbaa91ef5..69d4a6e0f9 100644 --- a/tests/nexus/test_workflow_run_operation.py +++ b/tests/nexus/test_workflow_run_operation.py @@ -1,7 +1,7 @@ -import re import uuid from dataclasses import dataclass -from typing import Any, Type +from datetime import datetime, timezone +from typing import Any import nexusrpc import pytest @@ -14,17 +14,18 @@ ) from nexusrpc.handler._decorators import operation_handler -from temporalio import workflow -from temporalio.nexus import WorkflowRunOperationContext +from temporalio import nexus, workflow +from temporalio.client import Client +from temporalio.nexus import WorkflowRunOperationContext, workflow_run_operation from temporalio.nexus._operation_handlers import WorkflowRunOperationHandler +from temporalio.nexus._token import OperationToken, OperationTokenType from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker -from tests.helpers.nexus import ( - Failure, - ServiceClient, - create_nexus_endpoint, - dataclass_as_dict, -) +from tests.helpers.nexus import make_nexus_endpoint_name + +# Cloud CI's namespace credentials cannot manage Nexus endpoints. +# See https://github.com/temporalio/sdk-python/issues/1704. +pytestmark = pytest.mark.requires_local_server @dataclass @@ -52,7 +53,7 @@ async def start( handle = await tctx.start_workflow( EchoWorkflow.run, input.value, - id=str(uuid.uuid4()), + id=input.value, ) return StartOperationResultAsync(handle.to_token()) @@ -64,6 +65,42 @@ def op(self) -> OperationHandler[Input, str]: return MyOperation() +@service +class RequestDeadlineService: + op: Operation[Input, str] + + +@service_handler(service=RequestDeadlineService) +class RequestDeadlineHandler: + def __init__(self) -> None: + self.start_deadlines_received: list[datetime | None] = [] + + @workflow_run_operation + async def op( + self, ctx: WorkflowRunOperationContext, input: Input + ) -> nexus.WorkflowHandle[str]: + self.start_deadlines_received.append(ctx.request_deadline) + return await ctx.start_workflow( + EchoWorkflow.run, + input.value, + id=input.value, + ) + + +@workflow.defn +class RequestDeadlineWorkflow: + @workflow.run + async def run(self, input: Input, task_queue: str) -> str: + client = workflow.create_nexus_client( + service=RequestDeadlineService, + endpoint=make_nexus_endpoint_name(task_queue), + ) + return await client.execute_operation( + RequestDeadlineService.op, + input, + ) + + @service class Service: op: Operation[Input, str] @@ -79,6 +116,17 @@ def op(self) -> OperationHandler: return MyOperation() +@workflow.defn +class CallerWorkflow: + @workflow.run + async def run(self, input: Input, service_name: str, task_queue: str) -> str: + client = workflow.create_nexus_client( + service=service_name, + endpoint=make_nexus_endpoint_name(task_queue), + ) + return await client.execute_operation("op", input, output_type=str) + + @pytest.mark.parametrize( "service_handler_cls", [ @@ -87,33 +135,101 @@ def op(self) -> OperationHandler: ], ) async def test_workflow_run_operation( + client: Client, env: WorkflowEnvironment, service_handler_cls: type[Any], ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with time-skipping server") task_queue = str(uuid.uuid4()) - endpoint = (await create_nexus_endpoint(task_queue, env.client)).endpoint.id + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) assert (service_defn := nexusrpc.get_service_definition(service_handler_cls)) - service_client = ServiceClient( - server_address=ServiceClient.default_server_address(env), - endpoint=endpoint, - service=service_defn.name, - ) async with Worker( - env.client, + client, task_queue=task_queue, nexus_service_handlers=[service_handler_cls()], + workflows=[CallerWorkflow, EchoWorkflow], ): - resp = await service_client.start_operation( - "op", - dataclass_as_dict(Input(value="test")), + input_value = str(uuid.uuid4()) + result = await client.execute_workflow( + CallerWorkflow.run, + args=[Input(value=input_value), service_defn.name, task_queue], + id=str(uuid.uuid4()), + task_queue=task_queue, ) - if hasattr(service_handler_cls, "__expected__error__"): - status_code, message = service_handler_cls.__expected__error__ - assert resp.status_code == status_code - failure = Failure(**resp.json()) - assert re.search(message, failure.message) - else: - assert resp.status_code == 201 + assert result == input_value + + +async def test_request_deadline_is_accessible_in_workflow_run_operation( + client: Client, + env: WorkflowEnvironment, +): + """Test that request_deadline is accessible in WorkflowRunOperationContext.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint_name, task_queue) + service_handler = RequestDeadlineHandler() + async with Worker( + env.client, + task_queue=task_queue, + nexus_service_handlers=[service_handler], + workflows=[RequestDeadlineWorkflow, EchoWorkflow], + ): + input_value = str(uuid.uuid4()) + await client.execute_workflow( + RequestDeadlineWorkflow.run, + args=[Input(value=input_value), task_queue], + task_queue=task_queue, + id=str(uuid.uuid4()), + ) + + assert len(service_handler.start_deadlines_received) == 1 + deadline = service_handler.start_deadlines_received[0] + assert deadline is not None, ( + "request_deadline should be set in WorkflowRunOperationContext" + ) + assert deadline.tzinfo is timezone.utc, "request_deadline should be in utc" + + +async def test_workflow_run_operation_includes_token_in_callback( + client: Client, + env: WorkflowEnvironment, +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with time-skipping server") + + task_queue = str(uuid.uuid4()) + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[SubclassingHappyPath()], + workflows=[CallerWorkflow, EchoWorkflow], + ): + input_value = str(uuid.uuid4()) + result = await client.execute_workflow( + CallerWorkflow.run, + args=[Input(value=input_value), "SubclassingHappyPath", task_queue], + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + assert result == input_value + + target_handle = client.get_workflow_handle(input_value) + + desc = await target_handle.describe() + token = desc.raw_description.callbacks[0].callback.nexus.header[ + "nexus-operation-token" + ] + + expected_token = OperationToken( + type=OperationTokenType.WORKFLOW, + namespace=client.namespace, + workflow_id=target_handle.id, + ).encode() + + assert token == expected_token diff --git a/tests/test_activity.py b/tests/test_activity.py new file mode 100644 index 0000000000..073c125f39 --- /dev/null +++ b/tests/test_activity.py @@ -0,0 +1,1476 @@ +import asyncio +import uuid +from dataclasses import dataclass +from datetime import timedelta +from unittest import mock + +import pytest + +import temporalio.api.workflowservice.v1 +from temporalio import activity, workflow +from temporalio.client import ( + ActivityExecutionCount, + ActivityExecutionCountAggregationGroup, + ActivityExecutionDescription, + ActivityExecutionStatus, + ActivityFailureError, + ActivityHandle, + CancelActivityInput, + Client, + CountActivitiesInput, + DescribeActivityInput, + Interceptor, + ListActivitiesInput, + OutboundInterceptor, + PendingActivityState, + StartActivityInput, + TerminateActivityInput, +) +from temporalio.common import RetryPolicy +from temporalio.exceptions import ApplicationError, CancelledError +from temporalio.service import RPCError, RPCStatusCode +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from tests.helpers import ( + assert_eq_eventually, + assert_eventually, + ensure_search_attributes_present, +) + + +@activity.defn +async def increment(input: int) -> int: + return input + 1 + + +# Activity for testing describe, stores last failure and heartbeat details +@activity.defn +async def heartbeat_fail_increment(x: int) -> int: + if activity.info().heartbeat_details: + return x + 1 + else: + activity.heartbeat("heartbeat details") + raise ApplicationError("first attempt failed") + + +# Activity classes for testing start_activity_class / execute_activity_class +@activity.defn +class IncrementClass: + """Async callable class activity with a parameter.""" + + async def __call__(self, x: int) -> int: + return x + 1 + + +@activity.defn +class NoParamClass: + """Async callable class activity with no parameters.""" + + async def __call__(self) -> str: + return "no-param-result" + + +@activity.defn +class SyncIncrementClass: + """Sync callable class activity with a parameter.""" + + def __call__(self, x: int) -> int: + return x + 1 + + +# Activity holder for testing start_activity_method / execute_activity_method +class ActivityHolder: + """Class holding activity methods.""" + + @activity.defn + async def async_increment(self, x: int) -> int: + return x + 1 + + @activity.defn + async def async_no_param(self) -> str: + return "async-method-result" + + +async def test_start_activity_generates_request_id() -> None: + start_activity_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.StartActivityExecutionResponse( + run_id="activity-run-id" + ) + ) + service_client = mock.MagicMock() + service_client.config.identity = "test-identity" + service_client.workflow_service.start_activity_execution = start_activity_execution + client = Client(service_client) + + for activity_id in ("activity-id-1", "activity-id-2"): + await client.start_activity( + increment, + 1, + id=activity_id, + task_queue="task-queue", + start_to_close_timeout=timedelta(seconds=1), + ) + + requests = [call.args[0] for call in start_activity_execution.call_args_list] + assert all(uuid.UUID(request.request_id).version == 4 for request in requests) + assert requests[0].request_id != requests[1].request_id + + +async def test_terminate_activity_generates_request_id() -> None: + terminate_activity_execution = mock.AsyncMock( + return_value=temporalio.api.workflowservice.v1.TerminateActivityExecutionResponse() + ) + service_client = mock.MagicMock() + service_client.config.identity = "test-identity" + service_client.workflow_service.terminate_activity_execution = ( + terminate_activity_execution + ) + client = Client(service_client) + + for activity_id in ("activity-id-1", "activity-id-2"): + await client.get_activity_handle(activity_id).terminate(reason="done") + + requests = [call.args[0] for call in terminate_activity_execution.call_args_list] + assert all(uuid.UUID(request.request_id).version == 4 for request in requests) + assert requests[0].request_id != requests[1].request_id + + +class TestDescribe: + @pytest.fixture + def task_queue(self): + return str(uuid.uuid4()) + + async def make_activity_handle( + self, client: Client, task_queue: str, max_attempts: int = 2 + ): + id = str(uuid.uuid4()) + return await client.start_activity( + heartbeat_fail_increment, + args=(1,), + id=id, + task_queue=task_queue, + schedule_to_close_timeout=timedelta(minutes=1), + retry_policy=RetryPolicy(maximum_attempts=max_attempts), + ) + + @pytest.fixture + async def activity_handle( + self, client: Client, env: WorkflowEnvironment, task_queue: str + ): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + return await self.make_activity_handle(client, task_queue) + + async def test_describe(self, client: Client, activity_handle: ActivityHandle): + desc = await activity_handle.describe() + # From ActivityExecution (base class) + assert desc.activity_id == activity_handle.id + assert desc.activity_run_id == activity_handle.run_id + assert desc.activity_type == "heartbeat_fail_increment" + assert desc.close_time is None # not closed yet + assert desc.execution_duration is None # not closed yet + assert desc.namespace == client.namespace + assert desc.raw_info is not None + assert desc.schedule_time is not None + assert len(desc.typed_search_attributes) == 0 + assert desc.status == ActivityExecutionStatus.RUNNING + assert desc.task_queue + # From ActivityExecutionDescription + assert desc.attempt == 1 + assert desc.canceled_reason is None + assert desc.current_retry_interval is None + assert desc.expiration_time is not None + assert desc.run_state == PendingActivityState.SCHEDULED + assert desc.last_attempt_complete_time is None + assert desc.last_heartbeat_time is None + assert desc.last_started_time is None + assert desc.last_worker_identity is None + assert desc.next_attempt_schedule_time is None + assert desc.retry_policy is not None + + async def test_describe_without_schedule_to_close_timeout( + self, client: Client, env: WorkflowEnvironment, task_queue: str + ): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + activity_handle = await client.start_activity( + heartbeat_fail_increment, + args=(1,), + id=str(uuid.uuid4()), + task_queue=task_queue, + start_to_close_timeout=timedelta(minutes=1), + ) + desc = await activity_handle.describe() + assert desc.expiration_time is None # no schedule-to-close timeout + + async def test_describe_payloads( + self, client: Client, activity_handle: ActivityHandle, task_queue: str + ): + async with Worker( + client, + task_queue=task_queue, + activities=[heartbeat_fail_increment], + ): + assert await activity_handle.result() == 2 + + desc_default = await activity_handle.describe() + assert not desc_default.has_input() + assert not desc_default.has_result() + assert not desc_default.has_outcome_failure() + assert not desc_default.has_heartbeat_details() + assert not desc_default.has_last_failure() + assert await desc_default.input([int]) is None + assert await desc_default.result(int) is None + assert await desc_default.outcome_failure() is None + assert await desc_default.heartbeat_details([str]) is None + assert await desc_default.last_failure() is None + + desc_payloads = await activity_handle.describe( + include_input=True, + include_outcome=True, + include_heartbeat_details=True, + include_last_failure=True, + ) + assert desc_payloads.has_input() + assert desc_payloads.has_result() + assert not desc_payloads.has_outcome_failure() + assert desc_payloads.has_heartbeat_details() + assert desc_payloads.has_last_failure() + assert await desc_payloads.input([int]) == [1] + assert await desc_payloads.result(int) == 2 + assert await desc_payloads.outcome_failure() is None + assert await desc_payloads.heartbeat_details([str]) == ["heartbeat details"] + assert isinstance(await desc_payloads.last_failure(), ApplicationError) + + failed_activity_handle = await self.make_activity_handle( + client, task_queue, max_attempts=1 + ) + with pytest.raises(ActivityFailureError) as err: + await failed_activity_handle.result() + assert isinstance(err.value.cause, ApplicationError) + + desc_failure = await failed_activity_handle.describe( + include_outcome=True, include_last_failure=True + ) + assert not desc_failure.has_input() + assert not desc_failure.has_result() + assert desc_failure.has_outcome_failure() + assert not desc_failure.has_heartbeat_details() + assert desc_failure.has_last_failure() + assert await desc_failure.input([int]) is None + assert await desc_failure.result(int) is None + assert isinstance(await desc_failure.outcome_failure(), ApplicationError) + assert await desc_failure.heartbeat_details([str]) is None + assert isinstance(await desc_failure.last_failure(), ApplicationError) + + +class ActivityTracingInterceptor(Interceptor): + """Test interceptor that tracks all activity interceptor calls.""" + + def __init__(self) -> None: + super().__init__() + self.start_activity_calls: list[StartActivityInput] = [] + self.describe_activity_calls: list[DescribeActivityInput] = [] + self.cancel_activity_calls: list[CancelActivityInput] = [] + self.terminate_activity_calls: list[TerminateActivityInput] = [] + self.list_activities_calls: list[ListActivitiesInput] = [] + self.count_activities_calls: list[CountActivitiesInput] = [] + + def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor: + return ActivityTracingOutboundInterceptor(self, next) + + +class ActivityTracingOutboundInterceptor(OutboundInterceptor): + def __init__( + self, + parent: ActivityTracingInterceptor, + next: OutboundInterceptor, + ) -> None: + super().__init__(next) + self._parent = parent + + async def start_activity(self, input: StartActivityInput): + assert isinstance(input, StartActivityInput) + self._parent.start_activity_calls.append(input) + return await super().start_activity(input) + + async def describe_activity(self, input: DescribeActivityInput): + assert isinstance(input, DescribeActivityInput) + self._parent.describe_activity_calls.append(input) + return await super().describe_activity(input) + + async def cancel_activity(self, input: CancelActivityInput): + assert isinstance(input, CancelActivityInput) + self._parent.cancel_activity_calls.append(input) + return await super().cancel_activity(input) + + async def terminate_activity(self, input: TerminateActivityInput): + assert isinstance(input, TerminateActivityInput) + self._parent.terminate_activity_calls.append(input) + return await super().terminate_activity(input) + + def list_activities(self, input: ListActivitiesInput): + assert isinstance(input, ListActivitiesInput) + self._parent.list_activities_calls.append(input) + return super().list_activities(input) + + async def count_activities(self, input: CountActivitiesInput): + assert isinstance(input, CountActivitiesInput) + self._parent.count_activities_calls.append(input) + return await super().count_activities(input) + + +# Cloud namespaces created by CI do not have the activity start-delay dynamic config. +@pytest.mark.requires_local_server +async def test_start_activity_calls_interceptor( + client: Client, env: WorkflowEnvironment +): + """Client.start_activity() should call the start_activity interceptor.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + interceptor = ActivityTracingInterceptor() + intercepted_client = Client( + service_client=client.service_client, + namespace=client.namespace, + interceptors=[interceptor], + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + start_delay = timedelta(seconds=3) + + await intercepted_client.start_activity( + increment, + args=(1,), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + start_delay=start_delay, + ) + + assert len(interceptor.start_activity_calls) == 1 + call = interceptor.start_activity_calls[0] + assert call.id == activity_id + assert call.task_queue == task_queue + assert call.activity_type == "increment" + assert call.start_delay == start_delay + + +async def test_describe_activity_calls_interceptor( + client: Client, env: WorkflowEnvironment +): + """ActivityHandle.describe() should call the describe_activity interceptor.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + interceptor = ActivityTracingInterceptor() + intercepted_client = Client( + service_client=client.service_client, + namespace=client.namespace, + interceptors=[interceptor], + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + activity_handle = await intercepted_client.start_activity( + increment, + args=(1,), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + desc = await activity_handle.describe() + assert isinstance(desc, ActivityExecutionDescription) + + assert len(interceptor.describe_activity_calls) == 1 + call = interceptor.describe_activity_calls[0] + assert call.activity_id == activity_id + + +async def test_cancel_activity_calls_interceptor( + client: Client, env: WorkflowEnvironment +): + """ActivityHandle.cancel() should call the cancel_activity interceptor.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + interceptor = ActivityTracingInterceptor() + intercepted_client = Client( + service_client=client.service_client, + namespace=client.namespace, + interceptors=[interceptor], + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + activity_handle = await intercepted_client.start_activity( + increment, + args=(1,), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + await activity_handle.cancel(reason="test cancellation") + + assert len(interceptor.cancel_activity_calls) == 1 + call = interceptor.cancel_activity_calls[0] + assert call.activity_id == activity_id + assert call.reason == "test cancellation" + + +async def test_terminate_activity_calls_interceptor( + client: Client, env: WorkflowEnvironment +): + """ActivityHandle.terminate() should call the terminate_activity interceptor.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + interceptor = ActivityTracingInterceptor() + intercepted_client = Client( + service_client=client.service_client, + namespace=client.namespace, + interceptors=[interceptor], + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + activity_handle = await intercepted_client.start_activity( + increment, + args=(1,), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + await activity_handle.terminate(reason="test termination") + + assert len(interceptor.terminate_activity_calls) == 1 + call = interceptor.terminate_activity_calls[0] + assert call.activity_id == activity_id + assert call.reason == "test termination" + + +async def test_list_activities_calls_interceptor( + client: Client, env: WorkflowEnvironment +): + """Client.list_activities() should call the list_activities interceptor.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + interceptor = ActivityTracingInterceptor() + intercepted_client = Client( + service_client=client.service_client, + namespace=client.namespace, + interceptors=[interceptor], + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + await intercepted_client.start_activity( + increment, + args=(1,), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + query = f'ActivityId = "{activity_id}"' + async for _ in intercepted_client.list_activities(query): + pass + + assert len(interceptor.list_activities_calls) >= 1 + call = interceptor.list_activities_calls[0] + assert call.query == query + + +async def test_count_activities_calls_interceptor( + client: Client, env: WorkflowEnvironment +): + """Client.count_activities() should call the count_activities interceptor.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + interceptor = ActivityTracingInterceptor() + intercepted_client = Client( + service_client=client.service_client, + namespace=client.namespace, + interceptors=[interceptor], + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + await intercepted_client.start_activity( + increment, + args=(1,), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + query = f'ActivityId = "{activity_id}"' + count = await intercepted_client.count_activities(query) + assert isinstance(count, ActivityExecutionCount) + + assert len(interceptor.count_activities_calls) == 1 + call = interceptor.count_activities_calls[0] + assert call.query == query + + +async def test_start_activity_rejects_negative_start_delay(client: Client): + with pytest.raises(ValueError, match="start_delay must be non-negative"): + await client.start_activity( + increment, + args=(1,), + id=str(uuid.uuid4()), + task_queue=str(uuid.uuid4()), + start_to_close_timeout=timedelta(seconds=5), + start_delay=timedelta(seconds=-1), + ) + + +async def test_get_result(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + activity_handle = await client.start_activity( + increment, + args=(1,), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + result_via_execute_activity = client.execute_activity( + increment, + args=(1,), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[increment], + ): + assert await activity_handle.result() == 2 + assert await result_via_execute_activity == 2 + + +# Cloud namespaces created by CI do not have the activity start-delay dynamic config. +@pytest.mark.requires_local_server +async def test_start_activity_start_delay(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + start_delay = timedelta(seconds=2) + + async with Worker( + client, + task_queue=task_queue, + activities=[increment], + ): + activity_handle = await client.start_activity( + increment, + args=(1,), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + start_delay=start_delay, + ) + + assert await activity_handle.result() == 2 + desc = await activity_handle.describe() + assert desc.last_started_time is not None + assert ( + desc.last_started_time - desc.schedule_time + ).total_seconds() >= start_delay.total_seconds() - 0.5 + + +async def test_get_activity_handle(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + activity_handle = await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + handle_by_id = client.get_activity_handle(activity_id) + assert handle_by_id.id == activity_id + assert handle_by_id.run_id is None + + handle_by_id_and_run_id = client.get_activity_handle( + activity_id, + run_id=activity_handle.run_id, + ) + assert handle_by_id_and_run_id.id == activity_id + assert handle_by_id_and_run_id.run_id == activity_handle.run_id + + handle_with_result_type = client.get_activity_handle( + activity_id, + run_id=activity_handle.run_id, + result_type=int, + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[increment], + ): + assert await handle_by_id.result() == 2 + assert await handle_by_id_and_run_id.result() == 2 + assert await handle_with_result_type.result() == 2 + + +async def test_list_activities(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + async def check_executions(): + executions = [ + e async for e in client.list_activities(f'ActivityId = "{activity_id}"') + ] + assert len(executions) == 1 + execution = executions[0] + assert execution.activity_id == activity_id + assert execution.activity_type == "increment" + assert execution.task_queue == task_queue + assert execution.status == ActivityExecutionStatus.RUNNING + + await assert_eventually(check_executions) + + +async def test_count_activities(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + async def fetch_count(): + return await client.count_activities(f'ActivityId = "{activity_id}"') + + await assert_eq_eventually( + ActivityExecutionCount(count=1, groups=[]), + fetch_count, + ) + + +async def test_count_activities_group_by(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + from temporalio.client import ActivityExecutionCount + + task_queue = str(uuid.uuid4()) + activity_ids = [] + + for _ in range(3): + activity_id = str(uuid.uuid4()) + activity_ids.append(activity_id) + await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + schedule_to_close_timeout=timedelta(seconds=60), + ) + + ids_filter = " OR ".join([f'ActivityId = "{aid}"' for aid in activity_ids]) + + async def fetch_count() -> ActivityExecutionCount: + return await client.count_activities(f"({ids_filter}) GROUP BY ExecutionStatus") + + await assert_eq_eventually( + ActivityExecutionCount( + count=3, + groups=[ + ActivityExecutionCountAggregationGroup( + count=3, group_values=["Running"] + ), + ], + ), + fetch_count, + ) + + +@dataclass +class ActivityInput: + event_workflow_id: str + wait_for_activity_start_workflow_id: str | None = None + + +@activity.defn +async def async_activity(input: ActivityInput) -> int: + # Notify test that the activity has started and is ready to be completed manually + await ( + activity.client() + .get_workflow_handle(input.event_workflow_id) + .signal(EventWorkflow.set) + ) + activity.raise_complete_async() + + +async def test_manual_completion(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + event_workflow_id = str(uuid.uuid4()) + + activity_handle = await client.start_activity( + async_activity, + ActivityInput(event_workflow_id=event_workflow_id), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(minutes=1), + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[async_activity], + workflows=[EventWorkflow], + ): + # Wait for activity to start + await client.execute_workflow( + EventWorkflow.wait, + id=event_workflow_id, + task_queue=task_queue, + ) + # Complete activity manually + async_activity_handle = client.get_async_activity_handle( + activity_id=activity_id, + run_id=activity_handle.run_id, + ) + await async_activity_handle.complete(7) + assert await activity_handle.result() == 7 + + desc = await activity_handle.describe() + assert desc.status == ActivityExecutionStatus.COMPLETED + + +async def test_manual_cancellation(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + event_workflow_id = str(uuid.uuid4()) + + activity_handle = await client.start_activity( + async_activity, + ActivityInput(event_workflow_id=event_workflow_id), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(minutes=1), + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[async_activity], + workflows=[EventWorkflow], + ): + # Wait for activity to start + await client.execute_workflow( + EventWorkflow.wait, + id=event_workflow_id, + task_queue=task_queue, + ) + async_activity_handle = client.get_async_activity_handle( + activity_id=activity_id, + run_id=activity_handle.run_id, + ) + + # report_cancellation fails if activity is not in CANCELLATION_REQUESTED state + with pytest.raises(RPCError) as err: + await async_activity_handle.report_cancellation("Test cancellation") + assert err.value.status in { + RPCStatusCode.FAILED_PRECONDITION, + RPCStatusCode.INVALID_ARGUMENT, + } + assert "invalid transition from Started" in str( + err.value + ) or "unable to mark activity as canceled" in str(err.value) + + # Request cancellation to transition activity to CANCELLATION_REQUESTED state + await activity_handle.cancel() + + # Now report_cancellation succeeds + await async_activity_handle.report_cancellation("Test cancellation") + + with pytest.raises(ActivityFailureError) as exc_info: + await activity_handle.result() + assert isinstance(exc_info.value.cause, CancelledError) + assert list(exc_info.value.cause.details) == ["Test cancellation"] + + desc = await activity_handle.describe() + assert desc.status == ActivityExecutionStatus.CANCELED + + +async def test_manual_failure(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + event_workflow_id = str(uuid.uuid4()) + + activity_handle = await client.start_activity( + async_activity, + ActivityInput(event_workflow_id=event_workflow_id), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(minutes=1), + ) + async with Worker( + client, + task_queue=task_queue, + activities=[async_activity], + workflows=[EventWorkflow], + ): + await client.execute_workflow( + EventWorkflow.wait, + id=event_workflow_id, + task_queue=task_queue, + ) + async_activity_handle = client.get_async_activity_handle( + activity_id=activity_id, + run_id=activity_handle.run_id, + ) + await async_activity_handle.fail( + ApplicationError("Test failure", non_retryable=True) + ) + with pytest.raises(ActivityFailureError) as err: + await activity_handle.result() + assert isinstance(err.value.cause, ApplicationError) + assert str(err.value.cause) == "Test failure" + + desc = await activity_handle.describe() + assert desc.status == ActivityExecutionStatus.FAILED + + +@activity.defn +async def activity_for_testing_heartbeat(input: ActivityInput) -> str: + info = activity.info() + if info.attempt == 1: + # Signal that activity has started (only on first attempt) + if input.wait_for_activity_start_workflow_id: + await ( + activity.client() + .get_workflow_handle( + workflow_id=input.wait_for_activity_start_workflow_id, + ) + .signal(EventWorkflow.set) + ) + wait_for_heartbeat_wf_handle = await activity.client().start_workflow( + EventWorkflow.wait, + id=input.event_workflow_id, + task_queue=activity.info().task_queue, + ) + # Wait for test to notify that it has sent heartbeat + await wait_for_heartbeat_wf_handle.result() + raise Exception("Intentional error to force retry") + elif info.attempt == 2: + [heartbeat_data] = info.heartbeat_details + assert isinstance(heartbeat_data, str) + return heartbeat_data + else: + raise AssertionError(f"Unexpected attempt number: {info.attempt}") + + +async def test_manual_heartbeat(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + event_workflow_id = str(uuid.uuid4()) + wait_for_activity_start_workflow_id = str(uuid.uuid4()) + + activity_handle = await client.start_activity( + activity_for_testing_heartbeat, + ActivityInput( + event_workflow_id=event_workflow_id, + wait_for_activity_start_workflow_id=wait_for_activity_start_workflow_id, + ), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(minutes=1), + ) + wait_for_activity_start_wf_handle = await client.start_workflow( + EventWorkflow.wait, + id=wait_for_activity_start_workflow_id, + task_queue=task_queue, + ) + async with Worker( + client, + task_queue=task_queue, + activities=[activity_for_testing_heartbeat], + workflows=[EventWorkflow], + ): + async_activity_handle = client.get_async_activity_handle( + activity_id=activity_id, + run_id=activity_handle.run_id, + ) + await wait_for_activity_start_wf_handle.result() + await async_activity_handle.heartbeat("Test heartbeat details") + await client.get_workflow_handle( + workflow_id=event_workflow_id, + ).signal(EventWorkflow.set) + assert await activity_handle.result() == "Test heartbeat details" + + +async def test_id_conflict_policy_fail(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + from temporalio.common import ActivityIDConflictPolicy + from temporalio.exceptions import ActivityAlreadyStartedError + + await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + schedule_to_close_timeout=timedelta(seconds=60), + id_conflict_policy=ActivityIDConflictPolicy.FAIL, + ) + + with pytest.raises(ActivityAlreadyStartedError) as err: + await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + schedule_to_close_timeout=timedelta(seconds=60), + id_conflict_policy=ActivityIDConflictPolicy.FAIL, + ) + assert err.value.activity_id == activity_id + assert "Activity" in str(err.value), ( + f"Expected 'Activity' in error message, got: {err.value}" + ) + + +async def test_id_conflict_policy_use_existing( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + from temporalio.common import ActivityIDConflictPolicy + + handle1 = await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + schedule_to_close_timeout=timedelta(seconds=60), + id_conflict_policy=ActivityIDConflictPolicy.USE_EXISTING, + ) + + handle2 = await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + schedule_to_close_timeout=timedelta(seconds=60), + id_conflict_policy=ActivityIDConflictPolicy.USE_EXISTING, + ) + + assert handle1.id == handle2.id + assert handle1.run_id == handle2.run_id + + +async def test_id_reuse_policy_reject_duplicate( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + from temporalio.common import ActivityIDReusePolicy + from temporalio.exceptions import ActivityAlreadyStartedError + + handle = await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + id_reuse_policy=ActivityIDReusePolicy.REJECT_DUPLICATE, + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[increment], + ): + await handle.result() + + with pytest.raises(ActivityAlreadyStartedError) as err: + await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + id_reuse_policy=ActivityIDReusePolicy.REJECT_DUPLICATE, + ) + assert err.value.activity_id == activity_id + + +async def test_id_reuse_policy_allow_duplicate( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + from temporalio.common import ActivityIDReusePolicy + + handle1 = await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + id_reuse_policy=ActivityIDReusePolicy.ALLOW_DUPLICATE, + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[increment], + ): + await handle1.result() + + handle2 = await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + id_reuse_policy=ActivityIDReusePolicy.ALLOW_DUPLICATE, + ) + + assert handle1.id == handle2.id + assert handle1.run_id != handle2.run_id + + +async def test_search_attributes( + client: Client, env: WorkflowEnvironment, env_type: str +): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + from temporalio.common import ( + SearchAttributeKey, + SearchAttributePair, + TypedSearchAttributes, + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + keyword_list_key = SearchAttributeKey.for_keyword_list("python_test_keyword_list") + # Externally managed servers must provision this attribute before running tests. + if env_type in ("local", "time-skipping-v2"): + await ensure_search_attributes_present(client, keyword_list_key) + + handle = await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + schedule_to_close_timeout=timedelta(seconds=60), + search_attributes=TypedSearchAttributes( + [SearchAttributePair(keyword_list_key, ["test-1", "test-2"])] + ), + ) + + desc = await handle.describe() + assert desc.typed_search_attributes[keyword_list_key] == [ + "test-1", + "test-2", + ] + + +async def test_retry_policy(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + from temporalio.common import RetryPolicy + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + handle = await client.start_activity( + increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + retry_policy=RetryPolicy( + initial_interval=timedelta(seconds=1), + maximum_interval=timedelta(seconds=10), + backoff_coefficient=2.0, + maximum_attempts=3, + ), + ) + + desc = await handle.describe() + assert desc.retry_policy is not None + assert desc.retry_policy.initial_interval == timedelta(seconds=1) + assert desc.retry_policy.maximum_interval == timedelta(seconds=10) + assert desc.retry_policy.backoff_coefficient == 2.0 + assert desc.retry_policy.maximum_attempts == 3 + + +async def test_terminate(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + event_workflow_id = str(uuid.uuid4()) + + activity_handle = await client.start_activity( + async_activity, + args=(ActivityInput(event_workflow_id=event_workflow_id),), + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[async_activity], + workflows=[EventWorkflow], + ): + await client.execute_workflow( + EventWorkflow.wait, + id=event_workflow_id, + task_queue=task_queue, + ) + + await activity_handle.terminate(reason="Test termination") + + with pytest.raises(ActivityFailureError): + await activity_handle.result() + + desc = await activity_handle.describe() + assert desc.status == ActivityExecutionStatus.TERMINATED + + +# Tests for start_activity_class / execute_activity_class + + +async def test_start_activity_class_async(client: Client, env: WorkflowEnvironment): + """Test start_activity_class with an async callable class.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + handle = await client.start_activity_class( + IncrementClass, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[IncrementClass()], + ): + result = await handle.result() + assert result == 2 + + +async def test_execute_activity_class_async(client: Client, env: WorkflowEnvironment): + """Test execute_activity_class with an async callable class.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + async with Worker( + client, + task_queue=task_queue, + activities=[IncrementClass()], + ): + result = await client.execute_activity_class( + IncrementClass, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + assert result == 2 + + +async def test_start_activity_class_no_param(client: Client, env: WorkflowEnvironment): + """Test start_activity_class with a no-param callable class.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + handle = await client.start_activity_class( + NoParamClass, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[NoParamClass()], + ): + result = await handle.result() + assert result == "no-param-result" + + +async def test_start_activity_class_sync(client: Client, env: WorkflowEnvironment): + """Test start_activity_class with a sync callable class.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + import concurrent.futures + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + handle = await client.start_activity_class( + SyncIncrementClass, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + with concurrent.futures.ThreadPoolExecutor() as executor: + async with Worker( + client, + task_queue=task_queue, + activities=[SyncIncrementClass()], + activity_executor=executor, + ): + result = await handle.result() + assert result == 2 + + +# Tests for start_activity_method / execute_activity_method + + +async def test_start_activity_method_async(client: Client, env: WorkflowEnvironment): + """Test start_activity_method with an async method.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + holder = ActivityHolder() + handle = await client.start_activity_method( + ActivityHolder.async_increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[holder.async_increment], + ): + result = await handle.result() + assert result == 2 + + +async def test_execute_activity_method_async(client: Client, env: WorkflowEnvironment): + """Test execute_activity_method with an async method.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + holder = ActivityHolder() + async with Worker( + client, + task_queue=task_queue, + activities=[holder.async_increment], + ): + result = await client.execute_activity_method( + ActivityHolder.async_increment, + 1, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + assert result == 2 + + +async def test_start_activity_method_no_param(client: Client, env: WorkflowEnvironment): + """Test start_activity_method with a no-param method.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + + activity_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + + holder = ActivityHolder() + handle = await client.start_activity_method( + ActivityHolder.async_no_param, + id=activity_id, + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=5), + ) + + async with Worker( + client, + task_queue=task_queue, + activities=[holder.async_no_param], + ): + result = await handle.result() + assert result == "async-method-result" + + +# Utilities + + +@workflow.defn +class EventWorkflow: + """ + A workflow version of asyncio.Event() + """ + + def __init__(self) -> None: + self.signal_received = asyncio.Event() + + @workflow.run + async def wait(self) -> None: + await self.signal_received.wait() + + @workflow.signal + def set(self) -> None: + self.signal_received.set() diff --git a/tests/test_activity_operator_commands.py b/tests/test_activity_operator_commands.py new file mode 100644 index 0000000000..ec53e20cef --- /dev/null +++ b/tests/test_activity_operator_commands.py @@ -0,0 +1,384 @@ +"""Tests for the standalone-activity operator commands: pause, unpause and +update_options. +""" + +from __future__ import annotations + +import asyncio +import uuid +from datetime import timedelta +from typing import Any + +import pytest + +import temporalio.api.workflowservice.v1 +from temporalio import activity +from temporalio.client import ( + ActivityExecutionStatus, + ActivityHandle, + ActivityOptionsKeys, + Client, + PendingActivityState, +) +from temporalio.common import Priority, RetryPolicy +from temporalio.exceptions import ApplicationError +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from tests.helpers import assert_eventually + +PAUSED_STATES = (PendingActivityState.PAUSED, PendingActivityState.PAUSE_REQUESTED) + + +@activity.defn +async def slow_activity() -> None: + """Long-running activity that heartbeats and runs until cancellation.""" + while True: + activity.heartbeat() + await asyncio.sleep(0.1) + + +@activity.defn +async def quick_activity() -> str: + """Returns immediately. Used with a start delay so it can be paused while scheduled.""" + return "resumed" + + +@activity.defn +async def echo_activity(word: str) -> str: + """Takes an argument and returns a value derived from it, so a completed execution + has both an input and a successful outcome to read back off describe.""" + return f"{word}-echoed" + + +@activity.defn +async def always_fail_activity() -> None: + """Always fails. Paired with a single-attempt retry policy so the activity reaches a + terminal failure outcome rather than retrying.""" + raise ApplicationError("deliberate failure") + + +@activity.defn +async def heartbeat_fail_increment(value: int) -> int: + """Heartbeats, fails the first attempt, then succeeds. + + The description will have input, a result, heartbeat details and a last failure. + """ + activity.heartbeat("heartbeat details") + if activity.info().attempt == 1: + raise ApplicationError("deliberate first-attempt failure") + return value + 1 + + +@activity.defn +async def heartbeat_once_activity() -> None: + """Records heartbeat details on attempt 1, then blocks waiting for cancellation.""" + if activity.info().attempt == 1: + activity.heartbeat("hb-details") + while True: + await asyncio.sleep(0.1) + + +def _skip_if_unsupported(env: WorkflowEnvironment) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Java test server does not support standalone activities") + + +async def _assert_eventually_paused(handle: ActivityHandle) -> None: + async def check() -> None: + desc = await handle.describe() + assert desc.run_state in PAUSED_STATES + + await assert_eventually(check) + + +async def _start_running_slow_activity( + client: Client, task_queue: str, **kwargs: Any +) -> ActivityHandle: + """Start a slow activity and wait until it is actually running on the worker.""" + kwargs.setdefault("start_to_close_timeout", timedelta(seconds=60)) + kwargs.setdefault("heartbeat_timeout", timedelta(seconds=30)) + handle = await client.start_activity( + slow_activity, + id=f"act-{uuid.uuid4()}", + task_queue=task_queue, + **kwargs, + ) + + async def check() -> None: + desc = await handle.describe() + assert desc.run_state == PendingActivityState.STARTED + + await assert_eventually(check) + return handle + + +async def test_unpause_resumes(client: Client, env: WorkflowEnvironment): + _skip_if_unsupported(env) + task_queue = str(uuid.uuid4()) + async with Worker(client, task_queue=task_queue, activities=[quick_activity]): + # Start delayed so the activity sits scheduled and can be paused before it runs. + handle = await client.start_activity( + quick_activity, + id=f"act-{uuid.uuid4()}", + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=60), + start_delay=timedelta(seconds=30), + ) + await handle.pause(reason="pause-before-unpause") + + # A not-yet-started (scheduled) activity transitions fully to PAUSED. + async def check() -> None: + desc = await handle.describe() + assert desc.run_state == PendingActivityState.PAUSED + + await assert_eventually(check) + + await handle.unpause() + + async def resumed() -> None: + desc = await handle.describe() + assert desc.run_state not in PAUSED_STATES + + await assert_eventually(resumed) + await handle.terminate(reason="cleanup") + + +async def test_describe_paused_activity_reports_paused_status( + client: Client, env: WorkflowEnvironment +): + _skip_if_unsupported(env) + task_queue = str(uuid.uuid4()) + async with Worker(client, task_queue=task_queue, activities=[quick_activity]): + # Start delayed so the activity sits scheduled; pausing from there reaches a true + # PAUSED state rather than the PAUSE_REQUESTED of a running activity. + handle = await client.start_activity( + quick_activity, + id=f"act-{uuid.uuid4()}", + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=60), + start_delay=timedelta(seconds=30), + ) + assert (await handle.describe()).status == ActivityExecutionStatus.RUNNING + + await handle.pause(reason="hold") + + async def check() -> None: + desc = await handle.describe() + assert desc.status == ActivityExecutionStatus.PAUSED + assert desc.run_state == PendingActivityState.PAUSED + + await assert_eventually(check) + await handle.terminate(reason="cleanup") + + +async def test_update_options_respects_mask(client: Client, env: WorkflowEnvironment): + _skip_if_unsupported(env) + task_queue = str(uuid.uuid4()) + async with Worker(client, task_queue=task_queue, activities=[slow_activity]): + handle = await _start_running_slow_activity( + client, + task_queue, + schedule_to_close_timeout=timedelta(seconds=120), + ) + + updated = await handle.update_options( + [ + ActivityOptionsKeys.start_to_close_timeout.value_set( + timedelta(seconds=90) + ) + ] + ) + + # Only start_to_close changed; schedule_to_close kept its original value. + assert updated.start_to_close_timeout == timedelta(seconds=90) + assert updated.schedule_to_close_timeout == timedelta(seconds=120) + + await handle.terminate(reason="cleanup") + + +async def test_update_options_all_fields(client: Client, env: WorkflowEnvironment): + _skip_if_unsupported(env) + task_queue = str(uuid.uuid4()) + async with Worker(client, task_queue=task_queue, activities=[quick_activity]): + # Start delayed so the activity stays scheduled while every option is updated. + handle = await client.start_activity( + quick_activity, + id=f"act-{uuid.uuid4()}", + task_queue=task_queue, + schedule_to_close_timeout=timedelta(seconds=100), + start_to_close_timeout=timedelta(seconds=30), + start_delay=timedelta(seconds=300), + ) + + updated = await handle.update_options( + [ + ActivityOptionsKeys.task_queue.value_set("updated-tq"), + ActivityOptionsKeys.schedule_to_close_timeout.value_set( + timedelta(seconds=200) + ), + ActivityOptionsKeys.schedule_to_start_timeout.value_set( + timedelta(seconds=15) + ), + ActivityOptionsKeys.start_to_close_timeout.value_set( + timedelta(seconds=90) + ), + ActivityOptionsKeys.heartbeat_timeout.value_set(timedelta(seconds=25)), + ActivityOptionsKeys.retry_policy.value_set( + RetryPolicy( + initial_interval=timedelta(seconds=1), + backoff_coefficient=2.0, + maximum_attempts=7, + ) + ), + ActivityOptionsKeys.priority.value_set(Priority(priority_key=3)), + ActivityOptionsKeys.start_delay.value_set(timedelta(seconds=500)), + ] + ) + + assert updated.task_queue == "updated-tq" + assert updated.schedule_to_close_timeout == timedelta(seconds=200) + assert updated.schedule_to_start_timeout == timedelta(seconds=15) + assert updated.start_to_close_timeout == timedelta(seconds=90) + assert updated.heartbeat_timeout == timedelta(seconds=25) + assert updated.retry_policy is not None + assert updated.retry_policy.maximum_attempts == 7 + assert updated.priority is not None + assert updated.priority.priority_key == 3 + assert updated.start_delay == timedelta(seconds=500) + + desc = await handle.describe() + assert desc.task_queue == "updated-tq" + await handle.terminate(reason="cleanup") + + +async def test_update_options_restore_original( + client: Client, env: WorkflowEnvironment +): + _skip_if_unsupported(env) + task_queue = str(uuid.uuid4()) + async with Worker(client, task_queue=task_queue, activities=[slow_activity]): + handle = await _start_running_slow_activity( + client, task_queue, start_to_close_timeout=timedelta(seconds=45) + ) + + changed = await handle.update_options( + [ + ActivityOptionsKeys.start_to_close_timeout.value_set( + timedelta(seconds=90) + ) + ] + ) + assert changed.start_to_close_timeout == timedelta(seconds=90) + + # Restore alone reverts to the value the activity was created with. + restored = await handle.restore_original_options() + assert restored.start_to_close_timeout == timedelta(seconds=45) + await handle.terminate(reason="cleanup") + + +async def test_update_options_on_paused_activity( + client: Client, env: WorkflowEnvironment +): + _skip_if_unsupported(env) + task_queue = str(uuid.uuid4()) + async with Worker(client, task_queue=task_queue, activities=[slow_activity]): + handle = await _start_running_slow_activity(client, task_queue) + await handle.pause(reason="hold") + await _assert_eventually_paused(handle) + + # Updating options while paused applies, and leaves the activity paused. + updated = await handle.update_options( + [ + ActivityOptionsKeys.start_to_close_timeout.value_set( + timedelta(seconds=99) + ) + ] + ) + assert updated.start_to_close_timeout == timedelta(seconds=99) + + desc = await handle.describe() + assert desc.run_state in PAUSED_STATES + await handle.terminate(reason="cleanup") + + +async def _heartbeat_detail_count(client: Client, handle: ActivityHandle) -> int: + """Count heartbeat payloads the server holds for an activity.""" + resp = await client.workflow_service.describe_activity_execution( + temporalio.api.workflowservice.v1.DescribeActivityExecutionRequest( + namespace=client.namespace, + activity_id=handle.id, + run_id=handle.run_id or "", + include_heartbeat_details=True, + ) + ) + return len(resp.info.heartbeat_details.payloads) + + +async def _start_heartbeat_ready_activity( + client: Client, task_queue: str +) -> ActivityHandle: + """Start a heartbeat-once activity and wait until it has recorded heartbeat details.""" + handle = await client.start_activity( + heartbeat_once_activity, + id=f"act-{uuid.uuid4()}", + task_queue=task_queue, + start_to_close_timeout=timedelta(seconds=60), + heartbeat_timeout=timedelta(seconds=30), + ) + + async def check() -> None: + assert await _heartbeat_detail_count(client, handle) > 0 + + await assert_eventually(check) + return handle + + +async def test_pause_preserves_heartbeat(client: Client, env: WorkflowEnvironment): + _skip_if_unsupported(env) + task_queue = str(uuid.uuid4()) + async with Worker( + client, task_queue=task_queue, activities=[heartbeat_once_activity] + ): + handle = await _start_heartbeat_ready_activity(client, task_queue) + await handle.pause(reason="hold") + await _assert_eventually_paused(handle) + + # Pause never touches heartbeat details. + assert await _heartbeat_detail_count(client, handle) == 1 + await handle.terminate(reason="cleanup") + + +async def test_unpause_preserves_heartbeat(client: Client, env: WorkflowEnvironment): + _skip_if_unsupported(env) + task_queue = str(uuid.uuid4()) + async with Worker( + client, task_queue=task_queue, activities=[heartbeat_once_activity] + ): + handle = await _start_heartbeat_ready_activity(client, task_queue) + await handle.pause(reason="hold") + await _assert_eventually_paused(handle) + await handle.unpause() + + assert await _heartbeat_detail_count(client, handle) == 1 + await handle.terminate(reason="cleanup") + + +async def test_update_options_preserves_heartbeat( + client: Client, env: WorkflowEnvironment +): + _skip_if_unsupported(env) + task_queue = str(uuid.uuid4()) + async with Worker( + client, task_queue=task_queue, activities=[heartbeat_once_activity] + ): + handle = await _start_heartbeat_ready_activity(client, task_queue) + await handle.update_options( + [ + ActivityOptionsKeys.start_to_close_timeout.value_set( + timedelta(seconds=90) + ) + ] + ) + + assert await _heartbeat_detail_count(client, handle) == 1 + await handle.terminate(reason="cleanup") diff --git a/tests/test_activity_operator_commands_interceptor.py b/tests/test_activity_operator_commands_interceptor.py new file mode 100644 index 0000000000..3f2cc48f07 --- /dev/null +++ b/tests/test_activity_operator_commands_interceptor.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from datetime import timedelta +from typing import Any +from unittest.mock import AsyncMock, Mock + +import pytest + +import temporalio.api.activity.v1 +import temporalio.api.workflowservice.v1 +from temporalio.client import ( + ActivityOptionsKeys, + Client, + Interceptor, + OutboundInterceptor, + PauseActivityInput, + UnpauseActivityInput, + UpdateActivityOptionsInput, +) +from temporalio.service import ServiceClient + + +class TracingClientInterceptor(Interceptor): + def __init__(self) -> None: + super().__init__() + self.traces: list[tuple[str, Any]] = [] + + def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor: + return TracingClientOutboundInterceptor(self, next) + + +class TracingClientOutboundInterceptor(OutboundInterceptor): + def __init__(self, parent: TracingClientInterceptor, next: OutboundInterceptor): + super().__init__(next) + self._parent = parent + + async def pause_activity(self, input: PauseActivityInput) -> None: + self._parent.traces.append(("pause_activity", input)) + return await super().pause_activity(input) + + async def unpause_activity(self, input: UnpauseActivityInput) -> None: + self._parent.traces.append(("unpause_activity", input)) + return await super().unpause_activity(input) + + async def update_activity_options(self, input: UpdateActivityOptionsInput) -> Any: + self._parent.traces.append(("update_activity_options", input)) + return await super().update_activity_options(input) + + +def _stub_service() -> Any: + service = Mock() + service.pause_activity_execution = AsyncMock( + return_value=temporalio.api.workflowservice.v1.PauseActivityExecutionResponse() + ) + service.unpause_activity_execution = AsyncMock( + return_value=temporalio.api.workflowservice.v1.UnpauseActivityExecutionResponse() + ) + service.update_activity_execution_options = AsyncMock( + return_value=temporalio.api.workflowservice.v1.UpdateActivityExecutionOptionsResponse( + activity_options=temporalio.api.activity.v1.ActivityOptions() + ) + ) + return service + + +@pytest.fixture +def interceptor() -> TracingClientInterceptor: + return TracingClientInterceptor() + + +@pytest.fixture +def client(interceptor: TracingClientInterceptor) -> Client: + service_client = Mock(spec=ServiceClient) + service_client.workflow_service = _stub_service() + service_client.config = Mock(identity="test-identity") + return Client( + service_client=service_client, + namespace="test-namespace", + interceptors=[interceptor], + ) + + +async def test_interceptor_invokes_each_operator_command( + client: Client, interceptor: TracingClientInterceptor +): + handle = client.get_activity_handle("act-1", run_id="run-1") + await handle.pause(reason="pause-reason") + await handle.unpause(reason="unpause-reason", jitter=timedelta(seconds=5)) + await handle.update_options( + [ActivityOptionsKeys.start_to_close_timeout.value_set(timedelta(seconds=90))] + ) + await handle.restore_original_options() + + assert [name for name, _ in interceptor.traces] == [ + "pause_activity", + "unpause_activity", + "update_activity_options", + "update_activity_options", + ] + + for name, input in interceptor.traces: + assert input.activity_id == "act-1", name + assert input.activity_run_id == "run-1", name + + +async def test_interceptor_receives_command_arguments( + client: Client, interceptor: TracingClientInterceptor +): + handle = client.get_activity_handle("act-1") + await handle.pause(reason="pause-reason") + await handle.unpause(reason="unpause-reason", jitter=timedelta(seconds=5)) + + traces = dict(interceptor.traces) + assert traces["pause_activity"].reason == "pause-reason" + assert traces["unpause_activity"].reason == "unpause-reason" + assert traces["unpause_activity"].jitter == timedelta(seconds=5) diff --git a/tests/test_activity_operator_commands_requests.py b/tests/test_activity_operator_commands_requests.py new file mode 100644 index 0000000000..f71f5566b9 --- /dev/null +++ b/tests/test_activity_operator_commands_requests.py @@ -0,0 +1,203 @@ +"""Unit tests for the operator-command request fields the server does not surface back.""" + +from __future__ import annotations + +from datetime import timedelta +from typing import Any +from unittest.mock import AsyncMock, Mock + +import pytest + +import temporalio.api.activity.v1 +import temporalio.api.workflowservice.v1 +from temporalio.client import ActivityOptionsKeys, Client +from temporalio.service import ServiceClient + + +class _CapturedService: + """Capture operator command requests.""" + + def __init__(self) -> None: + self.requests: dict[str, Any] = {} + self.pause_activity_execution = self._recorder( + "pause", + temporalio.api.workflowservice.v1.PauseActivityExecutionResponse(), + ) + self.unpause_activity_execution = self._recorder( + "unpause", + temporalio.api.workflowservice.v1.UnpauseActivityExecutionResponse(), + ) + self.update_activity_execution_options = self._recorder( + "update", + temporalio.api.workflowservice.v1.UpdateActivityExecutionOptionsResponse( + activity_options=temporalio.api.activity.v1.ActivityOptions() + ), + ) + + def _recorder(self, name: str, response: Any) -> AsyncMock: + async def record(req: Any, **_kwargs: Any) -> Any: + self.requests[name] = req + return response + + return AsyncMock(side_effect=record) + + +@pytest.fixture +def captured() -> _CapturedService: + return _CapturedService() + + +@pytest.fixture +def client(captured: _CapturedService) -> Client: + service_client = Mock(spec=ServiceClient) + service_client.workflow_service = captured + service_client.config = Mock(identity="test-identity") + return Client(service_client=service_client, namespace="test-namespace") + + +async def test_operator_commands_send_reason_and_jitter( + client: Client, captured: _CapturedService +): + handle = client.get_activity_handle("act-1") + await handle.pause(reason="pause-reason") + await handle.unpause(reason="unpause-reason", jitter=timedelta(seconds=5)) + + assert captured.requests["pause"].reason == "pause-reason" + assert captured.requests["unpause"].reason == "unpause-reason" + assert captured.requests["unpause"].jitter.ToTimedelta() == timedelta(seconds=5) + + +async def test_omitted_jitter_is_left_off_the_wire( + client: Client, captured: _CapturedService +): + # An unset jitter must not be sent as an explicit zero duration, or the server would + # apply "no jitter" instead of its own default. + handle = client.get_activity_handle("act-1") + await handle.unpause() + + assert not captured.requests["unpause"].HasField("jitter") + + +async def test_restore_original_options_is_exclusive( + client: Client, captured: _CapturedService +): + handle = client.get_activity_handle("act-1") + await handle.restore_original_options() + + update = captured.requests["update"] + assert update.restore_original + assert list(update.update_mask.paths) == [] + + +async def test_value_set_of_zero_sends_an_explicit_zero( + client: Client, captured: _CapturedService +): + handle = client.get_activity_handle("act-1") + await handle.update_options( + [ActivityOptionsKeys.heartbeat_timeout.value_set(timedelta(0))] + ) + + update = captured.requests["update"] + assert update.update_mask.paths == ["heartbeat_timeout"] + # Present and zero, which is distinct from absent: the caller asked for zero. + assert update.activity_options.HasField("heartbeat_timeout") + assert update.activity_options.heartbeat_timeout.ToTimedelta() == timedelta(0) + + +async def test_value_unset_names_the_path_but_leaves_the_field_absent( + client: Client, captured: _CapturedService +): + handle = client.get_activity_handle("act-1") + await handle.update_options([ActivityOptionsKeys.heartbeat_timeout.value_unset()]) + + update = captured.requests["update"] + assert update.update_mask.paths == ["heartbeat_timeout"] + assert not update.activity_options.HasField("heartbeat_timeout") + + +async def test_a_repeated_key_is_rejected(client: Client, captured: _CapturedService): + handle = client.get_activity_handle("act-1") + with pytest.raises(ValueError) as err: + await handle.update_options( + [ + ActivityOptionsKeys.heartbeat_timeout.value_set(timedelta(seconds=5)), + ActivityOptionsKeys.heartbeat_timeout.value_unset(), + ] + ) + assert "more than one update for heartbeat_timeout" in str(err.value) + # Rejected before any request is sent. + assert "update" not in captured.requests + + +async def test_update_options_requires_at_least_one_update(client: Client): + handle = client.get_activity_handle("act-1") + with pytest.raises(ValueError) as err: + await handle.update_options([]) + assert "at least one update" in str(err.value) + + +async def test_a_repeated_key_from_an_interceptor_is_rejected(client: Client): + """The handle rejects repeats, so only a hand-built input can carry one.""" + from temporalio.client import UpdateActivityOptionsInput + + with pytest.raises(ValueError) as err: + await client._impl.update_activity_options( + UpdateActivityOptionsInput( + activity_id="act-1", + activity_run_id=None, + updates=[ + ActivityOptionsKeys.heartbeat_timeout.value_set( + timedelta(seconds=5) + ), + ActivityOptionsKeys.heartbeat_timeout.value_unset(), + ], + restore_original=False, + rpc_metadata={}, + rpc_timeout=None, + ) + ) + assert "more than one update for heartbeat_timeout" in str(err.value) + + +async def test_restore_original_cannot_be_combined_with_updates(client: Client): + from temporalio.client import UpdateActivityOptionsInput + + with pytest.raises(ValueError) as err: + await client._impl.update_activity_options( + UpdateActivityOptionsInput( + activity_id="act-1", + activity_run_id=None, + updates=[ + ActivityOptionsKeys.heartbeat_timeout.value_set( + timedelta(seconds=25) + ) + ], + restore_original=True, + rpc_metadata={}, + rpc_timeout=None, + ) + ) + assert "cannot be combined" in str(err.value) + + +async def test_update_options_masks_only_changed_options( + client: Client, captured: _CapturedService +): + handle = client.get_activity_handle("act-1") + await handle.update_options( + [ + ActivityOptionsKeys.task_queue.value_set("tq"), + ActivityOptionsKeys.start_to_close_timeout.value_set(timedelta(seconds=90)), + ] + ) + + update = captured.requests["update"] + assert not update.restore_original + assert sorted(update.update_mask.paths) == [ + "start_to_close_timeout", + "task_queue.name", + ] + assert update.activity_options.task_queue.name == "tq" + assert update.activity_options.start_to_close_timeout.ToTimedelta() == timedelta( + seconds=90 + ) diff --git a/tests/test_activity_type_errors.py b/tests/test_activity_type_errors.py new file mode 100644 index 0000000000..fadf7d14b9 --- /dev/null +++ b/tests/test_activity_type_errors.py @@ -0,0 +1,491 @@ +""" +This file exists to test for type-checker false positives and false negatives +for the activity client API. + +It doesn't contain any test functions - it uses the machinery in test_type_errors.py +to verify that pyright produces the expected errors. +""" + +from datetime import timedelta +from unittest.mock import Mock + +from temporalio import activity +from temporalio.client import ActivityHandle, Client +from temporalio.service import ServiceClient + + +@activity.defn +async def increment(x: int) -> int: + return x + 1 + + +@activity.defn +async def greet(name: str) -> str: + return f"Hello, {name}" + + +@activity.defn +async def no_return(_: int) -> None: + pass + + +@activity.defn +async def no_param_async() -> str: + return "done" + + +@activity.defn +def increment_sync(x: int) -> int: + return x + 1 + + +@activity.defn +def no_param_sync() -> str: + return "done" + + +@activity.defn +class IncrementClass: + """Async activity defined as a callable class.""" + + async def __call__(self, x: int) -> int: + return x + 1 + + +@activity.defn +class NoParamClass: + """Async activity class with no parameters.""" + + async def __call__(self) -> str: + return "done" + + +@activity.defn +class SyncIncrementClass: + """Sync activity defined as a callable class.""" + + def __call__(self, x: int) -> int: + return x + 1 + + +@activity.defn +class SyncNoParamClass: + """Sync activity class with no parameters.""" + + def __call__(self) -> str: + return "done" + + +class ActivityHolder: + """Class holding activity methods.""" + + @activity.defn + async def increment_method(self, x: int) -> int: + return x + 1 + + @activity.defn + async def no_param_method(self) -> str: + return "done" + + +async def _test_start_activity_typed_callable_happy_path() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[int] = await client.start_activity( + increment, + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + _result: int = await _handle.result() + + +async def _test_execute_activity_typed_callable_happy_path() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _result: int = await client.execute_activity( + increment, + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_positional_arg_happy_path() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[int] = await client.start_activity( + increment, + 1, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_positional_arg_happy_path() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _result: int = await client.execute_activity( + increment, + 1, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_string_name_with_result_type() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle = await client.start_activity( + "increment", + args=[1], + id="activity-id", + task_queue="tq", + result_type=int, + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_no_param_async_happy_path() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[str] = await client.start_activity( + no_param_async, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_no_param_async_happy_path() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _result: str = await client.execute_activity( + no_param_async, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_no_param_sync_happy_path() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[str] = await client.start_activity( + no_param_sync, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_no_param_sync_happy_path() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _result: str = await client.execute_activity( + no_param_sync, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_wrong_arg_type() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[int] = await client.start_activity( + increment, + # assert-type-error-pyright: 'cannot be assigned to parameter' + "wrong type", # type: ignore + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_wrong_arg_type() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _result: int = await client.execute_activity( + increment, + # assert-type-error-pyright: 'cannot be assigned to parameter' + "wrong type", # type: ignore + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_wrong_result_type_assignment() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + handle = await client.start_activity( + increment, + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + # assert-type-error-pyright: 'Type "int" is not assignable to declared type "str"' + _wrong: str = await handle.result() # type: ignore + + +async def _test_execute_activity_wrong_result_type_assignment() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + # assert-type-error-pyright: 'Type "int" is not assignable to declared type "str"' + _wrong: str = await client.execute_activity( # type: ignore + increment, # type: ignore[arg-type] + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_missing_required_params() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + # assert-type-error-pyright: 'No overloads for "start_activity" match' + await client.start_activity( # type: ignore + increment, + args=[1], + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + # assert-type-error-pyright: 'No overloads for "start_activity" match' + await client.start_activity( # type: ignore + increment, + args=[1], + id="activity-id", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_activity_handle_typed_correctly() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + handle_int: ActivityHandle[int] = await client.start_activity( + increment, + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + _int_result: int = await handle_int.result() + + handle_str: ActivityHandle[str] = await client.start_activity( + greet, + args=["world"], + id="activity-id-2", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + _str_result: str = await handle_str.result() + + handle_none: ActivityHandle[None] = await client.start_activity( + no_return, + args=[1], + id="activity-id-3", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + _none_result: None = await handle_none.result() # type: ignore[func-returns-value] + + +async def _test_activity_handle_wrong_type_parameter() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + # assert-type-error-pyright: 'Type "ActivityHandle\[int\]" is not assignable to declared type "ActivityHandle\[str\]"' + _handle: ActivityHandle[str] = await client.start_activity( # type: ignore + increment, # type: ignore[arg-type] + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_sync_activity() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[int] = await client.start_activity( + increment_sync, + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_sync_activity() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _result: int = await client.execute_activity( + increment_sync, + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_sync_no_param() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[str] = await client.start_activity( + no_param_sync, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +# Tests for start_activity_class and execute_activity_class +# Note: Type inference for callable classes is limited; use args= form + + +async def _test_start_activity_class_single_param() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[int] = await client.start_activity_class( + IncrementClass, + 1, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_class_single_param() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _result: int = await client.execute_activity_class( + IncrementClass, + 1, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_class_no_param() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[str] = await client.start_activity_class( + NoParamClass, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_class_no_param() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _result: str = await client.execute_activity_class( + NoParamClass, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +# Tests for sync callable classes + + +async def _test_start_activity_class_sync_single_param() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[int] = await client.start_activity_class( + SyncIncrementClass, + 1, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_class_sync_single_param() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _result: int = await client.execute_activity_class( + SyncIncrementClass, + 1, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_class_sync_no_param() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + _handle: ActivityHandle[str] = await client.start_activity_class( + SyncNoParamClass, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +# Tests for start_activity_method and execute_activity_method +# Note: The _method variants work best with unbound methods (class references). +# For bound methods accessed via instance, use start_activity directly. + + +async def _test_start_activity_method_unbound() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + # Using unbound method reference + _handle: ActivityHandle[int] = await client.start_activity_method( + ActivityHolder.increment_method, + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_method_unbound() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + # Using unbound method reference + _result: int = await client.execute_activity_method( + ActivityHolder.increment_method, + args=[1], + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_start_activity_method_no_param_unbound() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + # Using unbound method reference + _handle: ActivityHandle[str] = await client.start_activity_method( + ActivityHolder.no_param_method, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) + + +async def _test_execute_activity_method_no_param_unbound() -> None: # type:ignore[reportUnusedFunction] + client = Client(service_client=Mock(spec=ServiceClient)) + + # Using unbound method reference + _result: str = await client.execute_activity_method( + ActivityHolder.no_param_method, + id="activity-id", + task_queue="tq", + start_to_close_timeout=timedelta(seconds=5), + ) diff --git a/tests/test_client.py b/tests/test_client.py index 791c59b2d9..7cc5377514 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,12 +1,13 @@ +import asyncio import dataclasses import json import multiprocessing import multiprocessing.context -import os +import threading import uuid from collections.abc import Mapping from datetime import datetime, timedelta, timezone -from typing import Any, List, Optional, Tuple, Union, cast +from typing import Any, Literal, cast from unittest import mock import google.protobuf.any_pb2 @@ -18,7 +19,6 @@ import temporalio.common import temporalio.exceptions from temporalio import workflow -from temporalio.api.cloud.cloudservice.v1 import GetNamespaceRequest from temporalio.api.enums.v1 import ( CancelExternalWorkflowExecutionFailedCause, ContinueAsNewInitiator, @@ -42,12 +42,9 @@ BuildIdOpPromoteSetByBuildId, CancelWorkflowInput, Client, - CloudOperationsClient, Interceptor, OutboundInterceptor, QueryWorkflowInput, - RPCError, - RPCStatusCode, Schedule, ScheduleActionExecutionStartWorkflow, ScheduleActionStartWorkflow, @@ -86,6 +83,10 @@ ) from temporalio.converter import DataConverter from temporalio.exceptions import WorkflowAlreadyStartedError +from temporalio.service import ( + RPCError, + RPCStatusCode, +) from temporalio.testing import WorkflowEnvironment from tests.helpers import ( assert_eq_eventually, @@ -111,7 +112,7 @@ async def test_start_id_reuse( client: Client, worker: ExternalWorker, env: WorkflowEnvironment ): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1220" ) @@ -139,6 +140,7 @@ async def test_start_id_reuse( ) await handle.result() assert err.value.run_id == handle.result_run_id + assert err.value.first_run_id == handle.first_execution_run_id # Run again allowing duplicate (the default) handle = await client.start_workflow( @@ -167,7 +169,7 @@ async def test_start_with_signal(client: Client, worker: ExternalWorker): async def test_start_delay( client: Client, worker: ExternalWorker, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server does not support start delay") start_delay = timedelta(hours=1, minutes=20, seconds=30) handle = await client.start_workflow( @@ -190,7 +192,7 @@ async def test_start_delay( async def test_signal_with_start_delay( client: Client, worker: ExternalWorker, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server does not support start delay") start_delay = timedelta(hours=1, minutes=20, seconds=30) handle = await client.start_workflow( @@ -215,7 +217,7 @@ async def test_result_follow_continue_as_new( client: Client, worker: ExternalWorker, env: WorkflowEnvironment ): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1424" ) @@ -334,7 +336,7 @@ async def test_describe( client: Client, worker: ExternalWorker, env: WorkflowEnvironment ): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1425" ) @@ -378,7 +380,7 @@ async def test_query(client: Client, worker: ExternalWorker): await handle.result() assert "some query arg" == await handle.query("some query", "some query arg") # Try a query not on the workflow - with pytest.raises(WorkflowQueryFailedError) as err: + with pytest.raises(WorkflowQueryFailedError): await handle.query("does not exist") @@ -554,24 +556,80 @@ async def test_interceptor(client: Client, worker: ExternalWorker): assert interceptor.traces[4][1].id == handle.id -async def test_lazy_client(client: Client, env: WorkflowEnvironment): +async def test_lazy_client(env: WorkflowEnvironment): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1094" ) # Create another client that is lazy. This test just makes sure the # functionality continues to work. - lazy_client = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, - lazy=True, - ) + lazy_client = await env.connect_client(lazy=True) assert not lazy_client.service_client.worker_service_client._bridge_client await lazy_client.workflow_service.get_system_info(GetSystemInfoRequest()) assert lazy_client.service_client.worker_service_client._bridge_client +async def test_client_connected_skips_connect_lock(env: WorkflowEnvironment): + # Once connected, RPCs must not touch the lazy-connect lock. Acquiring it + # per-RPC put an event-loop-bound primitive on the hot path, pinning a + # connected client to the loop it connected on. + other = await env.connect_client() + svc = other.service_client.worker_service_client + assert svc._bridge_client + + class CountingLock(asyncio.Lock): + def __init__(self) -> None: + super().__init__() + self.acquire_count = 0 + + async def acquire(self) -> Literal[True]: + self.acquire_count += 1 + return await super().acquire() + + counting = CountingLock() + svc._bridge_client_connect_lock = counting + await other.workflow_service.get_system_info(GetSystemInfoRequest()) + assert counting.acquire_count == 0 + + +def test_client_reuse_across_event_loops(env: WorkflowEnvironment): + # A connected client must not be pinned to the loop (or thread) it + # connected on. This mirrors the long-lived-loop reuse pattern used by + # gevent/gunicorn and synchronous services. + connect_loop = asyncio.new_event_loop() + try: + reused_client = connect_loop.run_until_complete(env.connect_client()) + finally: + connect_loop.close() + + errors: list[BaseException] = [] + + async def hammer() -> None: + await asyncio.gather( + *( + reused_client.workflow_service.get_system_info(GetSystemInfoRequest()) + for _ in range(10) + ) + ) + + def reuse_on_new_loop() -> None: + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + try: + loop.run_until_complete(hammer()) + except BaseException as err: + errors.append(err) + finally: + asyncio.set_event_loop(None) + loop.close() + + thread = threading.Thread(target=reuse_on_new_loop) + thread.start() + thread.join() + assert not errors, f"cross-loop reuse failed: {errors[0]!r}" + + @workflow.defn class ListableWorkflow: @workflow.run @@ -582,7 +640,7 @@ async def run(self, name: str) -> str: async def test_list_workflows_and_fetch_history( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support newer workflow listing") # Run 5 workflows. Use the same workflow ID over and over to make sure we @@ -599,21 +657,24 @@ async def test_list_workflows_and_fetch_history( ) expected_id_and_input.append((workflow_id, f'"user{i}"')) - # List them and get their history - actual_id_and_input = sorted( - [ - ( - hist.workflow_id, - hist.events[0] - .workflow_execution_started_event_attributes.input.payloads[0] - .data.decode(), - ) - async for hist in client.list_workflows( - f"WorkflowId = '{workflow_id}'" - ).map_histories() - ] - ) - assert actual_id_and_input == expected_id_and_input + # Visibility is eventually consistent, so wait for all runs before fetching + # their histories. + async def list_id_and_input() -> list[tuple[str, str]]: + return sorted( + [ + ( + hist.workflow_id, + hist.events[0] + .workflow_execution_started_event_attributes.input.payloads[0] + .data.decode(), + ) + async for hist in client.list_workflows( + f"WorkflowId = '{workflow_id}'" + ).map_histories() + ] + ) + + await assert_eq_eventually(expected_id_and_input, list_id_and_input) # Verify listing can limit results limited = [ @@ -638,7 +699,7 @@ async def run(self, wait_forever: bool) -> None: async def test_count_workflows(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support newer workflow listing") # 3 workflows that complete, 2 that don't @@ -768,15 +829,23 @@ def test_history_from_json(): ) +def test_schedule_policy_proto() -> None: + default_policy = SchedulePolicy() + assert default_policy.catchup_window is None + assert not default_policy._to_proto().HasField("catchup_window") + assert SchedulePolicy._from_proto(default_policy._to_proto()).catchup_window is None + + zero_policy = SchedulePolicy(catchup_window=timedelta()) + assert zero_policy._to_proto().HasField("catchup_window") + assert zero_policy._to_proto().catchup_window.ToTimedelta() == timedelta() + + +@pytest.mark.requires_local_server async def test_schedule_basics( client: Client, worker: ExternalWorker, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support schedules") - elif os.getenv("TEMPORAL_TEST_PROTO3"): - pytest.skip("Older proto library cannot compare repeated fields") - await assert_no_schedules(client) - # Create a schedule with a lot of stuff schedule = Schedule( action=ScheduleActionStartWorkflow( @@ -899,7 +968,7 @@ def update_schedule_simple(input: ScheduleUpdateInput) -> ScheduleUpdate: # Update but error with pytest.raises(RuntimeError) as err: - def update_fail(input: ScheduleUpdateInput) -> ScheduleUpdate: + def update_fail(_input: ScheduleUpdateInput) -> ScheduleUpdate: raise RuntimeError("Oh no") await handle.update(update_fail) @@ -919,7 +988,7 @@ def update_fail(input: ScheduleUpdateInput) -> ScheduleUpdate: ) assert isinstance(new_schedule.action, ScheduleActionStartWorkflow) - async def update_schedule_basic(input: ScheduleUpdateInput) -> ScheduleUpdate: + async def update_schedule_basic(_input: ScheduleUpdateInput) -> ScheduleUpdate: return ScheduleUpdate(new_schedule) await handle.update(update_schedule_basic) @@ -927,6 +996,7 @@ async def update_schedule_basic(input: ScheduleUpdateInput) -> ScheduleUpdate: new_schedule.action.args = await DataConverter.default.encode( new_schedule.action.args ) + new_schedule.policy.catchup_window = desc.schedule.policy.catchup_window assert desc.schedule == new_schedule # Attempt to create duplicate @@ -1014,19 +1084,16 @@ async def list_ids() -> list[str]: assert list_descs[0].id in [f"{handle.id}-3", f"{handle.id}-4"] assert list_descs[1].id in [f"{handle.id}-3", f"{handle.id}-4"] - # Delete all of the schedules - for id in await list_ids(): + # Delete the schedules created by this test. + for id in expected_ids: await client.get_schedule_handle(id).delete() - await assert_no_schedules(client) async def test_schedule_calendar_spec_defaults( client: Client, worker: ExternalWorker, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support schedules") - await assert_no_schedules(client) - handle = await client.create_schedule( f"schedule-{uuid.uuid4()}", Schedule( @@ -1055,16 +1122,13 @@ async def test_schedule_calendar_spec_defaults( assert time == desc.info.next_action_times[i - 1] + timedelta(days=1) await handle.delete() - await assert_no_schedules(client) async def test_schedule_trigger_immediately( client: Client, worker: ExternalWorker, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support schedules") - await assert_no_schedules(client) - # Create paused schedule that triggers immediately handle = await client.create_schedule( f"schedule-{uuid.uuid4()}", @@ -1085,8 +1149,14 @@ async def test_schedule_trigger_immediately( # Confirm workflow result desc = await handle.describe() - assert desc.info.num_actions == 1 - action_exec = (await handle.describe()).info.recent_actions[0].action + + async def update_desc_get_action_count() -> int: + nonlocal desc + desc = await handle.describe() + return desc.info.num_actions + + await assert_eq_eventually(1, update_desc_get_action_count) + action_exec = desc.info.recent_actions[0].action assert isinstance(action_exec, ScheduleActionExecutionStartWorkflow) assert ( "some result" @@ -1096,16 +1166,13 @@ async def test_schedule_trigger_immediately( ) await handle.delete() - await assert_no_schedules(client) async def test_schedule_backfill( client: Client, worker: ExternalWorker, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support schedules") - await assert_no_schedules(client) - begin = datetime(year=2020, month=1, day=20, hour=5) # Create paused schedule that runs every minute and has two backfills @@ -1136,34 +1203,30 @@ async def test_schedule_backfill( ) ], ) - # We accept both 1.24 and pre-1.24 action counts - assert (await handle.describe()).info.num_actions in [1, 2] - - # Add two more backfills and and -2m will be deduped - await handle.backfill( - # 3 actions on Server >= 1.24, 2 actions on Server < 1.24 - ScheduleBackfill( - start_at=begin - timedelta(minutes=4), - end_at=begin - timedelta(minutes=2), - overlap=ScheduleOverlapPolicy.ALLOW_ALL, - ), - # 3 actions on Server >= 1.24, 2 actions on Server < 1.24, except on - # Server >= 1.24, there is overlap with the prior backfill, so this is - # only net +2 actions, regardless of Server version. - ScheduleBackfill( - start_at=begin - timedelta(minutes=2), - end_at=begin, - overlap=ScheduleOverlapPolicy.ALLOW_ALL, - ), - ) - assert (await handle.describe()).info.num_actions in [5, 7] - - await handle.delete() - await assert_no_schedules(client) + try: + # Add two more backfills. Older servers treat the end time as + # exclusive, 1.24+ servers treat it as inclusive, and 1.31+ servers no + # longer dedupe the overlapping ALLOW_ALL backfills below. + await handle.backfill( + # 3 actions on Server >= 1.24, 2 actions on Server < 1.24 + ScheduleBackfill( + start_at=begin - timedelta(minutes=4), + end_at=begin - timedelta(minutes=2), + overlap=ScheduleOverlapPolicy.ALLOW_ALL, + ), + # 3 actions on Server >= 1.24, 2 actions on Server < 1.24. + ScheduleBackfill( + start_at=begin - timedelta(minutes=2), + end_at=begin, + overlap=ScheduleOverlapPolicy.ALLOW_ALL, + ), + ) + finally: + await handle.delete() async def test_schedule_create_limited_actions_validation( - client: Client, worker: ExternalWorker, env: WorkflowEnvironment + client: Client, worker: ExternalWorker ): sched = Schedule( action=ScheduleActionStartWorkflow( @@ -1185,13 +1248,12 @@ async def test_schedule_create_limited_actions_validation( assert "are remaining actions set" in str(err.value) +@pytest.mark.requires_local_server async def test_schedule_workflow_search_attribute_update( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support schedules") - await assert_no_schedules(client) - # Put search attribute on server text_attr_key = SearchAttributeKey.for_text("python-test-schedule-text") untyped_keyword_key = SearchAttributeKey.for_keyword("python-test-schedule-keyword") @@ -1284,7 +1346,6 @@ def update_schedule_typed_attrs( assert desc.typed_search_attributes[text_attr_key] == "some-schedule-attr1" await handle.delete() - await assert_no_schedules(client) @pytest.mark.parametrize( @@ -1296,13 +1357,12 @@ def update_schedule_typed_attrs( "partial-new-values-overwrites-and-drops", ], ) +@pytest.mark.requires_local_server async def test_schedule_search_attribute_update( client: Client, env: WorkflowEnvironment, test_case: str ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support schedules") - await assert_no_schedules(client) - # Put search attributes on server key_1 = SearchAttributeKey.for_text("python-test-schedule-sa-update-key-1") key_2 = SearchAttributeKey.for_keyword("python-test-schedule-sa-update-key-2") @@ -1420,19 +1480,10 @@ async def expectation() -> bool: raise ValueError(f"Invalid test case: {test_case}") await handle.delete() - await assert_no_schedules(client) - - -async def assert_no_schedules(client: Client) -> None: - # Listing appears eventually consistent - async def schedule_count() -> int: - return len([d async for d in await client.list_schedules()]) - - await assert_eq_eventually(0, schedule_count) async def test_build_id_interactions(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server does not support worker versioning") if not await worker_versioning_enabled(client): pytest.skip("This server does not have worker versioning enabled") @@ -1479,19 +1530,6 @@ async def test_build_id_interactions(client: Client, env: WorkflowEnvironment): assert reachability.build_id_reachability["1.1"].task_queue_reachability[tq] == [] -async def test_cloud_client_simple(): - if "TEMPORAL_CLIENT_CLOUD_API_KEY" not in os.environ: - pytest.skip("No cloud API key") - client = await CloudOperationsClient.connect( - api_key=os.environ["TEMPORAL_CLIENT_CLOUD_API_KEY"], - version=os.environ["TEMPORAL_CLIENT_CLOUD_API_VERSION"], - ) - result = await client.cloud_service.get_namespace( - GetNamespaceRequest(namespace=os.environ["TEMPORAL_CLIENT_CLOUD_NAMESPACE"]) - ) - assert os.environ["TEMPORAL_CLIENT_CLOUD_NAMESPACE"] == result.namespace.namespace - - @workflow.defn class LastCompletionResultWorkflow: @workflow.run @@ -1503,10 +1541,13 @@ async def run(self) -> str: return "My First Result" +# Cloud does not reliably provide a prior completion result to manually +# triggered schedule actions. +@pytest.mark.requires_local_server async def test_schedule_last_completion_result( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support schedules") async with new_worker(client, LastCompletionResultWorkflow) as worker: @@ -1537,12 +1578,14 @@ async def get_schedule_result() -> tuple[int, str | None]: result = await workflow_handle.result() return length, result - assert await get_schedule_result() == (1, "My First Result") + expected_first_result: tuple[int, str | None] = (1, "My First Result") + await assert_eq_eventually(expected_first_result, get_schedule_result) await handle.trigger() - assert await get_schedule_result() == ( + expected_second_result: tuple[int, str | None] = ( 2, "From last completion: My First Result", ) + await assert_eq_eventually(expected_second_result, get_schedule_result) await handle.delete() @@ -1561,10 +1604,25 @@ def test_fork_create_client( self._expected = _ForkTestResult.assertion_error( "Cannot create client across forks" ) - self._env = env + self._env = env # type:ignore[reportUninitializedInstanceVariable] self.run(mp_fork_ctx) +def test_client_connect_config_matches_connect_params(): + """ClientConnectConfig TypedDict keys must match Client.connect kwargs.""" + import inspect + + from temporalio.client import Client, ClientConnectConfig + + connect_params = set(inspect.signature(Client.connect).parameters.keys()) - {"cls"} + config_keys = set(ClientConnectConfig.__annotations__.keys()) + assert config_keys == connect_params, ( + f"ClientConnectConfig is out of sync with Client.connect. " + f"Missing from config: {connect_params - config_keys}. " + f"Extra in config: {config_keys - connect_params}." + ) + + class TestForkUseClient(_TestFork): async def coro(self): await self._client.start_workflow( @@ -1579,5 +1637,5 @@ def test_fork_use_client( self._expected = _ForkTestResult.assertion_error( "Cannot use client across forks" ) - self._client = client + self._client = client # type:ignore[reportUninitializedInstanceVariable] self.run(mp_fork_ctx) diff --git a/tests/test_client_exports.py b/tests/test_client_exports.py new file mode 100644 index 0000000000..08e0bd3da1 --- /dev/null +++ b/tests/test_client_exports.py @@ -0,0 +1,218 @@ +import temporalio.client + +# Generated from temporalio.client on main +EXPECTED_CLIENT_EXPORTS = [ + "ActivityCancellationDetails", + "ActivityExecution", + "ActivityExecutionAsyncIterator", + "ActivityExecutionCount", + "ActivityExecutionCountAggregationGroup", + "ActivityExecutionDescription", + "ActivityExecutionStatus", + "ActivityFailureError", + "ActivityHandle", + "ActivitySerializationContext", + "AnyType", + "AsyncActivityCancelledError", + "AsyncActivityHandle", + "AsyncActivityIDReference", + "BackfillScheduleInput", + "BuildIdOp", + "BuildIdOpAddNewCompatible", + "BuildIdOpAddNewDefault", + "BuildIdOpMergeSets", + "BuildIdOpPromoteBuildIdWithinSet", + "BuildIdOpPromoteSetByBuildId", + "BuildIdReachability", + "BuildIdVersionSet", + "CallableAsyncNoParam", + "CallableAsyncSingleParam", + "CallableSyncNoParam", + "CallableSyncSingleParam", + "Callback", + "CancelActivityInput", + "CancelWorkflowInput", + "Client", + "ClientConfig", + "ClientConnectConfig", + "CloudOperationsClient", + "CompleteAsyncActivityInput", + "ConnectConfig", + "CountActivitiesInput", + "CountWorkflowsInput", + "CreateScheduleInput", + "DataConverter", + "DeleteScheduleInput", + "DescribeActivityInput", + "DescribeScheduleInput", + "DescribeWorkflowInput", + "DnsLoadBalancingConfig", + "FailAsyncActivityInput", + "FetchWorkflowHistoryEventsInput", + "GetWorkerBuildIdCompatibilityInput", + "GetWorkerTaskReachabilityInput", + "GrpcCompression", + "HeaderCodecBehavior", + "HeartbeatAsyncActivityInput", + "HttpConnectProxyConfig", + "Interceptor", + "KeepAliveConfig", + "ListActivitiesInput", + "ListSchedulesInput", + "ListWorkflowsInput", + "LocalReturnType", + "MethodAsyncNoParam", + "MethodAsyncSingleParam", + "MethodSyncOrAsyncNoParam", + "MethodSyncOrAsyncSingleParam", + "MultiParamSpec", + "OutboundInterceptor", + "ParamType", + "PauseScheduleInput", + "PendingActivityState", + "Plugin", + "QueryWorkflowInput", + "RPCError", + "RPCStatusCode", + "RPCTimeoutOrCancelledError", + "ReportCancellationAsyncActivityInput", + "RetryConfig", + "ReturnType", + "Schedule", + "ScheduleAction", + "ScheduleActionExecution", + "ScheduleActionExecutionStartWorkflow", + "ScheduleActionResult", + "ScheduleActionStartWorkflow", + "ScheduleAlreadyRunningError", + "ScheduleAsyncIterator", + "ScheduleBackfill", + "ScheduleCalendarSpec", + "ScheduleDescription", + "ScheduleHandle", + "ScheduleInfo", + "ScheduleIntervalSpec", + "ScheduleListAction", + "ScheduleListActionStartWorkflow", + "ScheduleListDescription", + "ScheduleListInfo", + "ScheduleListSchedule", + "ScheduleListState", + "ScheduleOverlapPolicy", + "SchedulePolicy", + "ScheduleRange", + "ScheduleSpec", + "ScheduleState", + "ScheduleUpdate", + "ScheduleUpdateInput", + "SelfType", + "SerializationContext", + "ServiceClient", + "SignalWorkflowInput", + "StartActivityInput", + "StartWorkflowInput", + "StartWorkflowUpdateInput", + "StartWorkflowUpdateWithStartInput", + "StorageDriverActivityInfo", + "StorageDriverSelectContext", + "StorageDriverStoreContext", + "StorageDriverWorkflowInfo", + "TLSConfig", + "TaskReachabilityType", + "TerminateActivityInput", + "TerminateWorkflowInput", + "TriggerScheduleInput", + "UnpauseScheduleInput", + "UpdateScheduleInput", + "UpdateWithStartStartWorkflowInput", + "UpdateWithStartUpdateWorkflowInput", + "UpdateWorkerBuildIdCompatibilityInput", + "WithSerializationContext", + "WithStartWorkflowOperation", + "WorkerBuildIdVersionSets", + "WorkerTaskReachability", + "WorkflowContinuedAsNewError", + "WorkflowExecution", + "WorkflowExecutionAsyncIterator", + "WorkflowExecutionCount", + "WorkflowExecutionCountAggregationGroup", + "WorkflowExecutionDescription", + "WorkflowExecutionStatus", + "WorkflowFailureError", + "WorkflowHandle", + "WorkflowHistory", + "WorkflowHistoryEventAsyncIterator", + "WorkflowHistoryEventFilterType", + "WorkflowQueryFailedError", + "WorkflowQueryRejectedError", + "WorkflowSerializationContext", + "WorkflowUpdateFailedError", + "WorkflowUpdateHandle", + "WorkflowUpdateRPCTimeoutOrCancelledError", + "WorkflowUpdateStage", + "_ClientImpl", + "_apply_headers", + "_decode_user_metadata", + "_encode_user_metadata", + "_fix_history_enum", + "_fix_history_failure", + "_history_from_json", + "_pascal_case_match", + "annotations", +] + + +EXPECTED_INTENTIONALLY_REMOVED_CLIENT_EXPORTS = [ + "ABC", + "Any", + "AsyncIterator", + "Awaitable", + "Callable", + "Concatenate", + "Enum", + "Future", + "Generic", + "IntEnum", + "Iterable", + "Mapping", + "MessageMap", + "Required", + "Self", + "Sequence", + "TypedDict", + "abc", + "abstractmethod", + "asyncio", + "cast", + "copy", + "dataclass", + "dataclasses", + "datetime", + "functools", + "google", + "inspect", + "json", + "overload", + "re", + "temporalio", + "timedelta", + "timezone", + "uuid", + "warnings", +] + + +def test_client_module_exports_match_main() -> None: + missing = [ + name for name in EXPECTED_CLIENT_EXPORTS if not hasattr(temporalio.client, name) + ] + assert not missing + + +def test_client_module_drops_intentionally_removed_import_exports() -> None: + exported = [ + name + for name in EXPECTED_INTENTIONALLY_REMOVED_CLIENT_EXPORTS + if hasattr(temporalio.client, name) + ] + assert not exported diff --git a/tests/test_client_type_errors.py b/tests/test_client_type_errors.py index d0f3b6de5b..adf3fcd3cf 100644 --- a/tests/test_client_type_errors.py +++ b/tests/test_client_type_errors.py @@ -79,7 +79,7 @@ async def run(self, _: WorkflowInput) -> WorkflowOutput: return WorkflowOutput() -async def _start_and_execute_workflow_code_for_type_checking_test(): +async def _start_and_execute_workflow_code_for_type_checking_test(): # type:ignore[reportUnusedFunction] client = Client(service_client=Mock(spec=ServiceClient)) # Good @@ -117,7 +117,7 @@ async def _start_and_execute_workflow_code_for_type_checking_test(): ) -async def _signal_workflow_code_for_type_checking_test(): +async def _signal_workflow_code_for_type_checking_test(): # type:ignore[reportUnusedFunction] client = Client(service_client=Mock(spec=ServiceClient)) handle: WorkflowHandle[TestWorkflow, WorkflowOutput] = await client.start_workflow( TestWorkflow.run, WorkflowInput(), id="wid", task_queue="tq" @@ -134,7 +134,7 @@ async def _signal_workflow_code_for_type_checking_test(): await handle.signal(TestWorkflow2.signal, SignalInput()) # type: ignore -async def _query_workflow_code_for_type_checking_test(): +async def _query_workflow_code_for_type_checking_test(): # type:ignore[reportUnusedFunction] client = Client(service_client=Mock(spec=ServiceClient)) handle: WorkflowHandle[TestWorkflow, WorkflowOutput] = await client.start_workflow( TestWorkflow.run, WorkflowInput(), id="wid", task_queue="tq" @@ -152,7 +152,7 @@ async def _query_workflow_code_for_type_checking_test(): await handle.query(TestWorkflow2.query, QueryInput()) # type: ignore -async def _update_workflow_code_for_type_checking_test(): +async def _update_workflow_code_for_type_checking_test(): # type:ignore[reportUnusedFunction] client = Client(service_client=Mock(spec=ServiceClient)) handle: WorkflowHandle[TestWorkflow, WorkflowOutput] = await client.start_workflow( TestWorkflow.run, WorkflowInput(), id="wid", task_queue="tq" @@ -186,7 +186,7 @@ async def _update_workflow_code_for_type_checking_test(): await handle.execute_update(TestWorkflow2.update, UpdateInput()) # type: ignore -async def _update_with_start_workflow_code_for_type_checking_test(): +async def _update_with_start_workflow_code_for_type_checking_test(): # type:ignore[reportUnusedFunction] client = Client(service_client=Mock(spec=ServiceClient)) # Good diff --git a/tests/test_cloud.py b/tests/test_cloud.py new file mode 100644 index 0000000000..d7fefb4da2 --- /dev/null +++ b/tests/test_cloud.py @@ -0,0 +1,25 @@ +"""Tests that run against the Temporal Cloud Operations API.""" + +import os + +import pytest + +from temporalio.api.cloud.cloudservice.v1 import GetNamespaceRequest +from temporalio.client import CloudOperationsClient + +# Skip entire module unless explicitly enabled +pytestmark = pytest.mark.skipif( + "TEMPORAL_IS_CLOUD_TESTS" not in os.environ, + reason="Cloud tests not enabled", +) + + +async def test_cloud_client_simple(): + client = await CloudOperationsClient.connect( + api_key=os.environ["TEMPORAL_CLIENT_CLOUD_API_KEY"], + version=os.environ["TEMPORAL_CLIENT_CLOUD_API_VERSION"], + ) + result = await client.cloud_service.get_namespace( + GetNamespaceRequest(namespace=os.environ["TEMPORAL_CLIENT_CLOUD_NAMESPACE"]) + ) + assert os.environ["TEMPORAL_CLIENT_CLOUD_NAMESPACE"] == result.namespace.namespace diff --git a/tests/test_common.py b/tests/test_common.py index 5df4767c4f..d01578a7dc 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -1,13 +1,17 @@ from __future__ import annotations import pickle +import typing from dataclasses import dataclass from datetime import timedelta from typing import Any import pytest +from typing_extensions import Self +from typing_extensions import Self as SelfAliasForTest from temporalio.api.common.v1 import Payload +from temporalio.api.common.v1 import RetryPolicy as RetryPolicyProto from temporalio.common import ( Priority, RawValue, @@ -38,19 +42,25 @@ def test_retry_policy_validate(): RetryPolicy(maximum_attempts=-1)._validate() -def some_hinted_func(foo: str) -> DefinedLater: +def some_hinted_func(_foo: str) -> DefinedLater: return DefinedLater() -async def some_hinted_func_async(foo: str) -> DefinedLater: +async def some_hinted_func_async(_foo: str) -> DefinedLater: return DefinedLater() class MyCallableClass: - def __call__(self, foo: str) -> DefinedLater: + def __call__(self, _foo: str) -> DefinedLater: raise NotImplementedError - def some_method(self, foo: str) -> DefinedLater: + def some_method(self, _foo: str) -> DefinedLater: + raise NotImplementedError + + def annotated_method(self: Self, _foo: str) -> DefinedLater: + raise NotImplementedError + + def aliased_self_method(self: SelfAliasForTest, _foo: str) -> DefinedLater: raise NotImplementedError @@ -71,6 +81,28 @@ def assert_hints(func: Any): assert_hints(MyCallableClass) assert_hints(MyCallableClass.some_method) assert_hints(MyCallableClass().some_method) + assert_hints(MyCallableClass.annotated_method) + assert_hints(MyCallableClass().annotated_method) + assert_hints(MyCallableClass.aliased_self_method) + assert_hints(MyCallableClass().aliased_self_method) + + +def test_type_hints_from_func_typing_self(): + class Service: + def method(self: typing.Self, value: str) -> str: + return value + + assert _type_hints_from_func(Service.method) == ([str], str) + assert _type_hints_from_func(Service().method) == ([str], str) + + +def test_type_hints_from_func_preserves_annotated_self_argument(): + def func(self: int) -> int: # pyright: ignore[reportUnusedParameter] + raise NotImplementedError + + args, return_hint = _type_hints_from_func(func) + assert args == [int] + assert return_hint is int def test_raw_value_pickle(): @@ -123,3 +155,26 @@ def test_cant_construct_bad_priority(): Priority(priority_key=1.1) # type: ignore with pytest.raises(ValueError): Priority(priority_key=-1) + + +def test_retry_policy_from_proto_pickle(): + """Test that RetryPolicy.from_proto() creates a picklable object when non_retryable_error_types is set.""" + # Create a protobuf with non_retryable_error_types + proto = RetryPolicyProto() + proto.initial_interval.seconds = 1 + proto.backoff_coefficient = 2.0 + proto.maximum_attempts = 3 + proto.non_retryable_error_types.extend(["SomeError", "AnotherError"]) + + # Convert from proto + retry_policy = RetryPolicy.from_proto(proto) + + # This should not raise a PickleError + pickled = pickle.dumps(retry_policy) + unpickled = pickle.loads(pickled) + + # Verify the data is intact + assert unpickled.initial_interval == timedelta(seconds=1) + assert unpickled.backoff_coefficient == 2.0 + assert unpickled.maximum_attempts == 3 + assert unpickled.non_retryable_error_types == ["SomeError", "AnotherError"] diff --git a/tests/test_contrib.py b/tests/test_contrib.py new file mode 100644 index 0000000000..a49542fcb9 --- /dev/null +++ b/tests/test_contrib.py @@ -0,0 +1,74 @@ +import importlib +import sys +import warnings +from types import ModuleType + +import pytest + + +@pytest.mark.parametrize( + "legacy,canonical,submodules", + [ + ("deepagents", "deepagents", ("testing", "workflow")), + ("google_adk_agents", "google_adk", ("workflow",)), + ("google_genai", "google_genai", ("testing", "workflow")), + ("langgraph", "langgraph", ()), + ("langsmith", "langsmith", ()), + ("openai_agents", "openai_agents", ("testing", "workflow")), + ("strands", "strands_agents", ("workflow",)), + ], +) +def test_ai_integration_compatibility_imports( + legacy: str, + canonical: str, + submodules: tuple[str, ...], + monkeypatch: pytest.MonkeyPatch, +) -> None: + for suffix in ("", *(f".{name}" for name in submodules)): + # Load lazy exports too so dependency warnings do not fail the shim check. + module = importlib.import_module(f"temporalio.{canonical}{suffix}") + exported = { + name: getattr(module, name) + for name in getattr( + module, + "__all__", + [name for name in vars(module) if not name.startswith("_")], + ) + } + name = f"temporalio.contrib.{legacy}{suffix}" + with warnings.catch_warnings(): + warnings.simplefilter("error", DeprecationWarning) + forwarded = importlib.import_module(name) + importlib.reload(forwarded) + assert importlib.import_module(name) is forwarded + assert forwarded.__name__ == name + assert set(exported) == { + name for name in vars(forwarded) if not name.startswith("_") + } + for exported_name, value in exported.items(): + assert getattr(forwarded, exported_name) is value + if hasattr(module, "__all__"): + assert getattr(forwarded, "__all__") is getattr(module, "__all__") + + standalone = importlib.import_module(f"temporalio.{canonical}") + compatibility = importlib.import_module(f"temporalio.contrib.{legacy}") + name = "future_helpers" + module = ModuleType(f"{standalone.__name__}.{name}") + exported_value = object() + alias = f"{compatibility.__name__}.{name}" + with monkeypatch.context() as patch: + patch.setattr( + standalone, "__all__", [*standalone.__all__, name, "future_value"] + ) + patch.setattr(standalone, name, module, raising=False) + patch.setattr(standalone, "future_value", exported_value, raising=False) + patch.delitem(sys.modules, alias, raising=False) + # Reload adds exports that must be removed when the patched API is restored. + patch.setattr(compatibility, name, None, raising=False) + patch.setattr(compatibility, "future_value", None, raising=False) + importlib.reload(compatibility) + assert compatibility.__all__ is standalone.__all__ + assert getattr(compatibility, name) is module + assert getattr(compatibility, "future_value") is exported_value + assert alias not in sys.modules + importlib.reload(compatibility) diff --git a/tests/test_converter.py b/tests/test_converter.py index 138ea65b50..b47cadbdd0 100644 --- a/tests/test_converter.py +++ b/tests/test_converter.py @@ -6,27 +6,26 @@ import logging import sys import traceback +import typing from collections import deque from collections.abc import Iterable, Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import datetime, timedelta, timezone -from enum import Enum, IntEnum +from enum import Enum, IntEnum, StrEnum from typing import ( Any, - Deque, - Dict, - List, + Dict, # type:ignore[reportDeprecated] + Generic, Literal, NewType, - Optional, - Set, - Text, - Tuple, - Type, - Union, + TypeVar, + cast, + get_args, + get_type_hints, ) from uuid import UUID, uuid4 +import nexusrpc import pydantic import pytest import typing_extensions @@ -35,6 +34,7 @@ import temporalio.api.common.v1 import temporalio.common from temporalio.api.common.v1 import Payload, Payloads +from temporalio.api.enums.v1 import NexusHandlerErrorRetryBehavior from temporalio.api.failure.v1 import Failure from temporalio.common import RawValue from temporalio.converter import ( @@ -46,17 +46,25 @@ DefaultPayloadConverter, JSONPlainPayloadConverter, JSONTypeConverter, + JSONTypeConverterUnhandled, PayloadCodec, - _JSONTypeConverterUnhandled, + TransferTypeConverter, + create_payload_validation_error, decode_search_attributes, + decode_typed_search_attributes, encode_search_attribute_values, + encode_typed_search_attribute_value, + transfer_type_convertible, value_to_type, ) -from temporalio.exceptions import ApplicationError, FailureError - -# StrEnum is available in 3.11+ -if sys.version_info >= (3, 11): - from enum import StrEnum +from temporalio.converter._payload_converter import ( + _TemporalTransferTypePayloadConverter, +) +from temporalio.exceptions import ( + ApplicationError, + FailureError, + NexusOperationError, +) class NonSerializableClass: @@ -71,10 +79,16 @@ class SerializableEnum(IntEnum): FOO = 1 -if sys.version_info >= (3, 11): +class SerializableMixinStrEnum(str, Enum): + FOO = "foo" + + +class SerializableMixinIntEnum(int, Enum): + FOO = 1 - class SerializableStrEnum(StrEnum): - FOO = "foo" + +class SerializableStrEnum(StrEnum): + FOO = "foo" @dataclass @@ -97,14 +111,35 @@ class NewTypeMessage: data: dict[MyNewTypeStr, str] +@pytest.mark.parametrize( + "details", + [None, {"violations": [{"path": "some.path", "reason": "must be an int"}]}], +) +def test_create_payload_validation_error(details: Any) -> None: + err = create_payload_validation_error(details) + + assert err.message == "Payload validation failed" + assert err.type == "PayloadValidationError" + assert err.non_retryable + assert err.details == (() if details is None else (details,)) + + failure = Failure() + DataConverter.default.failure_converter.to_failure( + err, DataConverter.default.payload_converter, failure + ) + assert DataConverter.default.payload_converter.from_payloads( + failure.application_failure_info.details.payloads + ) == ([] if details is None else [details]) + + async def test_converter_default(): async def assert_payload( - input, - expected_encoding, - expected_data, + input, # type:ignore[reportMissingParameterType] + expected_encoding, # type:ignore[reportMissingParameterType] + expected_data, # type:ignore[reportMissingParameterType] *, - expected_decoded_input=None, - type_hint=None, + expected_decoded_input=None, # type:ignore[reportMissingParameterType] + type_hint=None, # type:ignore[reportMissingParameterType] ): payloads = await DataConverter().encode([input]) # Check encoding and data @@ -254,19 +289,220 @@ def test_binary_proto(): assert decoded == proto +class TemporalTransferTypeValueConverter( + TransferTypeConverter[ + "TemporalTransferTypeValue", + temporalio.api.common.v1.WorkflowExecution, + ] +): + transfer_type = temporalio.api.common.v1.WorkflowExecution + + def to_transfer_type( + self, value: TemporalTransferTypeValue + ) -> temporalio.api.common.v1.WorkflowExecution: + return temporalio.api.common.v1.WorkflowExecution( + workflow_id=value.value, + run_id="run-id", + ) + + def from_transfer_type( + self, + value: temporalio.api.common.v1.WorkflowExecution, + type_hint: type[TemporalTransferTypeValue], + ) -> TemporalTransferTypeValue: + return TemporalTransferTypeValue(value=value.workflow_id) + + +@transfer_type_convertible(TemporalTransferTypeValueConverter) +@dataclass +class TemporalTransferTypeValue: + value: str + + +class TemporalTransferTypeValueWithoutHintConverter( + TransferTypeConverter[ + "TemporalTransferTypeValueWithoutHint", + temporalio.api.common.v1.WorkflowExecution, + ] +): + def to_transfer_type( + self, value: TemporalTransferTypeValueWithoutHint + ) -> temporalio.api.common.v1.WorkflowExecution: + return temporalio.api.common.v1.WorkflowExecution( + workflow_id=value.value, + run_id="run-id", + ) + + def from_transfer_type( + self, + value: temporalio.api.common.v1.WorkflowExecution, + type_hint: type[TemporalTransferTypeValueWithoutHint], + ) -> TemporalTransferTypeValueWithoutHint: + return TemporalTransferTypeValueWithoutHint(value=value.workflow_id) + + +@transfer_type_convertible(TemporalTransferTypeValueWithoutHintConverter) +@dataclass +class TemporalTransferTypeValueWithoutHint: + value: str + + +T = TypeVar("T") + + +@dataclass +class TemporalTransferTypeGenericValue(Generic[T]): + value: T + + +class TemporalTransferTypeGenericValueConverter( + TransferTypeConverter[ + TemporalTransferTypeGenericValue[T], + temporalio.api.common.v1.WorkflowExecution, + ] +): + transfer_type = temporalio.api.common.v1.WorkflowExecution + + def to_transfer_type( + self, value: TemporalTransferTypeGenericValue[T] + ) -> temporalio.api.common.v1.WorkflowExecution: + return temporalio.api.common.v1.WorkflowExecution( + workflow_id=str(value.value), + run_id="run-id", + ) + + def from_transfer_type( + self, + value: temporalio.api.common.v1.WorkflowExecution, + type_hint: type[TemporalTransferTypeGenericValue[T]], + ) -> TemporalTransferTypeGenericValue[T]: + converted_value: str | int = value.workflow_id + if typing.get_args(type_hint)[0] is int: + converted_value = int(converted_value) + return TemporalTransferTypeGenericValue(value=cast(T, converted_value)) + + +# Register after both classes are defined so the generic type can be resolved. +transfer_type_convertible(TemporalTransferTypeGenericValueConverter)( + TemporalTransferTypeGenericValue +) + + +class CustomDefaultPayloadConverter(DefaultPayloadConverter): + pass + + +def test_temporal_transfer_type_payload_converter_wraps_user_converter(): + data_converter = DataConverter( + payload_converter_class=CustomDefaultPayloadConverter + ) + converter = data_converter.payload_converter + assert isinstance(converter, _TemporalTransferTypePayloadConverter) + value = TemporalTransferTypeValue("workflow-id") + + payload = converter.to_payload(value) + + assert payload.metadata["encoding"] == b"json/protobuf" + assert ( + payload.metadata["messageType"] == b"temporal.api.common.v1.WorkflowExecution" + ) + assert all("temporal-wire" not in key for key in payload.metadata) + assert all(b"temporal-wire" not in value for value in payload.metadata.values()) + assert converter.from_payload(payload, TemporalTransferTypeValue) == value + + plain_proto_payload = converter.to_payload( + temporalio.api.common.v1.WorkflowExecution(workflow_id="id1", run_id="id2") + ) + assert plain_proto_payload.metadata["encoding"] == b"json/protobuf" + + +def test_temporal_transfer_type_payload_converter_without_transfer_type_hint(): + converter = DataConverter.default.payload_converter + value = TemporalTransferTypeValueWithoutHint("workflow-id") + + payload = converter.to_payload(value) + + assert payload.metadata["encoding"] == b"json/protobuf" + assert ( + payload.metadata["messageType"] == b"temporal.api.common.v1.WorkflowExecution" + ) + assert ( + converter.from_payload(payload, TemporalTransferTypeValueWithoutHint) == value + ) + + +@pytest.mark.parametrize( + ("value", "type_hint"), + [ + ( + TemporalTransferTypeGenericValue("workflow-id"), + TemporalTransferTypeGenericValue[str], + ), + ( + TemporalTransferTypeGenericValue(123), + TemporalTransferTypeGenericValue[int], + ), + ], +) +def test_temporal_transfer_type_payload_converter_with_generic_value( + value: TemporalTransferTypeGenericValue[T], + type_hint: type[TemporalTransferTypeGenericValue[T]], +): + converter = DataConverter.default.payload_converter + + payload = converter.to_payload(value) + + assert converter.from_payload(payload, type_hint) == value + + +def test_transfer_type_convertible_rejects_existing_converter(): + with pytest.raises(TypeError, match="already has a transfer type converter"): + transfer_type_convertible(TemporalTransferTypeValueConverter)( + TemporalTransferTypeValue + ) + + def test_encode_search_attribute_values(): with pytest.raises(TypeError, match="of type tuple not one of"): encode_search_attribute_values([("bad type",)]) # type: ignore[arg-type] with pytest.raises(ValueError, match="Timezone must be present"): - encode_search_attribute_values([datetime.utcnow()]) + encode_search_attribute_values([datetime.utcnow()]) # type: ignore[reportDeprecated] with pytest.raises(TypeError, match="must have the same type"): encode_search_attribute_values(["foo", 123]) # type: ignore[arg-type] +def test_encode_typed_search_attribute_value_datetime_requires_timezone(): + key = temporalio.common.SearchAttributeKey.for_datetime("checkout_time") + with pytest.raises(ValueError, match="Timezone must be present"): + encode_typed_search_attribute_value( + key, datetime(2024, 7, 5, 15, 43, 7, 875302) + ) + payload = encode_typed_search_attribute_value( + key, datetime(2024, 7, 5, 15, 43, 7, 875302, tzinfo=timezone.utc) + ) + assert payload.metadata["type"] == b"Datetime" + + +def test_decode_typed_search_attributes_whole_number_double(): + # Visibility returns a whole-number Double as a JSON integer + key = temporalio.common.SearchAttributeKey.for_float("score") + api = temporalio.api.common.v1.SearchAttributes( + indexed_fields={ + "score": temporalio.api.common.v1.Payload( + data=b"5", + metadata={"type": b"Double", "encoding": b"json/plain"}, + ) + } + ) + val = decode_typed_search_attributes(api).get(key) + assert val == 5.0 + assert type(val) is float + + def test_decode_search_attributes(): """Tests decode from protobuf for python types""" - def payload(key, dtype, data, encoding=None): + def payload(key, dtype, data, encoding=None): # type:ignore[reportMissingParameterType] if encoding is None: encoding = {"encoding": b"json/plain"} check = temporalio.api.common.v1.Payload( @@ -310,6 +546,24 @@ class NestedDataClass: qux: UUID | None = None +@dataclass +class InitFalseDataClass: + foo: str + bar: str = dataclasses.field(default="default-bar", init=False) + + +@dataclass(frozen=True) +class FrozenInitFalseDataClass: + foo: str + bar: str = dataclasses.field(default="default-bar", init=False) + + +@dataclass +class InitFalseIntDataClass: + foo: str + bar: int = dataclasses.field(default=0, init=False) + + class MyTypedDict(TypedDict): foo: str bar: MyDataClass @@ -323,12 +577,34 @@ class MyTypedDictNotTotal(TypedDict, total=False): # TODO(cretz): Fix when https://github.com/pydantic/pydantic/pull/9612 tagged if sys.version_info <= (3, 12, 3): - class MyPydanticClass(pydantic.BaseModel): + class MyPydanticClass(pydantic.BaseModel): # type: ignore[reportUnreachable] foo: str bar: list[MyPydanticClass] baz: UUID | None = None +@pytest.mark.parametrize( + "hint", + [frozenset, frozenset[int], typing_extensions.FrozenSet[int]], # type:ignore[reportDeprecated] +) +@pytest.mark.parametrize("value", [frozenset(), frozenset({1, 2})]) +def test_json_frozenset_round_trip(hint: Any, value: frozenset[int]): + converter = JSONPlainPayloadConverter() + payload = converter.to_payload(value) + assert payload is not None + converted = converter.from_payload(payload, hint) + assert isinstance(converted, frozenset) + assert converted == value + + +def test_json_nested_frozenset_round_trip(): + converter = JSONPlainPayloadConverter() + value = {frozenset({1, 2}), frozenset({3})} + payload = converter.to_payload(value) + assert payload is not None + assert converter.from_payload(payload, set[frozenset[int]]) == value + + def test_json_type_hints(): converter = JSONPlainPayloadConverter() @@ -386,15 +662,25 @@ def fail(hint: Any, value: Any) -> None: fail(NestedDataClass, {}) # Additional dataclass fields is ok ok(NestedDataClass, {"foo": "bar", "unknownfield": "baz"}, NestedDataClass("bar")) + # Dataclass with init=False fields restores their values + ok(InitFalseDataClass, InitFalseDataClass("hello")) + init_false = InitFalseDataClass("hello") + init_false.bar = "custom-bar" + ok(InitFalseDataClass, init_false) + frozen_init_false = FrozenInitFalseDataClass("hello") + object.__setattr__(frozen_init_false, "bar", "custom-bar") + ok(FrozenInitFalseDataClass, frozen_init_false) + # init=False field types still decide which union member matches + ok(InitFalseIntDataClass | InitFalseDataClass, init_false) # Optional/Union - ok(Optional[int], 5) - ok(Optional[int], None) - ok(Optional[MyDataClass], MyDataClass("foo", 5, SerializableEnum.FOO)) - ok(Union[int, str], 5) - ok(Union[int, str], "foo") - ok(Union[MyDataClass, NestedDataClass], MyDataClass("foo", 5, SerializableEnum.FOO)) - ok(Union[MyDataClass, NestedDataClass], NestedDataClass("foo")) + ok(int | None, 5) + ok(int | None, None) + ok(MyDataClass | None, MyDataClass("foo", 5, SerializableEnum.FOO)) + ok(int | str, 5) + ok(int | str, "foo") + ok(MyDataClass | NestedDataClass, MyDataClass("foo", 5, SerializableEnum.FOO)) + ok(MyDataClass | NestedDataClass, NestedDataClass("foo")) ok(int | None, None) ok(int | None, 5) fail(int | None, "1") @@ -414,9 +700,10 @@ def fail(hint: Any, value: Any) -> None: ok(set[int], {5, 6}) ok(set, {5, 6}) ok(list, ["foo"]) - ok(Deque[int], deque([5, 6])) + ok(deque[int], deque([5, 6])) ok(Sequence[int], [5, 6]) fail(list[int], [1, 2, "3"]) + fail(frozenset[int], [1, 2, "3"]) # Dict-like ok(dict[str, MyDataClass], {"foo": MyDataClass("foo", 5, SerializableEnum.FOO)}) @@ -445,7 +732,7 @@ def fail(hint: Any, value: Any) -> None: ok(dict[None, str], {"null": "1"}) # Dict has a different value for None keys - ok(Dict[None, str], {None: "1"}) + ok(Dict[None, str], {None: "1"}) # type:ignore[reportDeprecated] # Alias ok(MyDataClassAlias, MyDataClass("foo", 5, SerializableEnum.FOO)) @@ -453,24 +740,34 @@ def fail(hint: Any, value: Any) -> None: # IntEnum ok(SerializableEnum, SerializableEnum.FOO) ok(list[SerializableEnum], [SerializableEnum.FOO, SerializableEnum.FOO]) + ok(dict[SerializableEnum, str], {SerializableEnum.FOO: "foo"}) + + # Enums that mix in int or str + ok(SerializableMixinIntEnum, SerializableMixinIntEnum.FOO) + ok(dict[SerializableMixinIntEnum, str], {SerializableMixinIntEnum.FOO: "foo"}) + ok(SerializableMixinStrEnum, SerializableMixinStrEnum.FOO) + ok( + list[SerializableMixinStrEnum], + [SerializableMixinStrEnum.FOO, SerializableMixinStrEnum.FOO], + ) + ok(dict[SerializableMixinStrEnum, int], {SerializableMixinStrEnum.FOO: 1}) + fail(SerializableMixinStrEnum, 5) # UUID ok(UUID, uuid4()) ok(list[UUID], [uuid4(), uuid4()]) - # StrEnum is available in 3.11+ - if sys.version_info >= (3, 11): - # StrEnum - ok(SerializableStrEnum, SerializableStrEnum.FOO) - ok( - list[SerializableStrEnum], - [SerializableStrEnum.FOO, SerializableStrEnum.FOO], - ) + # StrEnum + ok(SerializableStrEnum, SerializableStrEnum.FOO) + ok( + list[SerializableStrEnum], + [SerializableStrEnum.FOO, SerializableStrEnum.FOO], + ) # Pydantic # TODO(cretz): Fix when https://github.com/pydantic/pydantic/pull/9612 tagged if sys.version_info <= (3, 12, 3): - ok( + ok( # type: ignore[reportUnreachable] MyPydanticClass, MyPydanticClass( foo="foo", bar=[MyPydanticClass(foo="baz", bar=[])], baz=uuid4() @@ -604,6 +901,264 @@ async def test_failure_encoded_attributes(): assert failure == orig_failure +def test_application_error_next_retry_delay_round_trip(): + converter = DataConverter.default + for next_retry_delay in [None, timedelta(seconds=3)]: + failure = Failure() + converter.failure_converter.to_failure( + ApplicationError("boom", next_retry_delay=next_retry_delay), + converter.payload_converter, + failure, + ) + err = converter.failure_converter.from_failure( + failure, converter.payload_converter + ) + assert isinstance(err, ApplicationError) + assert err.next_retry_delay == next_retry_delay + + +@pytest.mark.parametrize( + "handler_type,retryable_override,expected_retryable", + [ + (nexusrpc.HandlerErrorType.BAD_REQUEST, None, None), + (nexusrpc.HandlerErrorType.BAD_REQUEST, True, True), + (nexusrpc.HandlerErrorType.BAD_REQUEST, False, False), + (nexusrpc.HandlerErrorType.INTERNAL, None, None), + (nexusrpc.HandlerErrorType.INTERNAL, True, True), + (nexusrpc.HandlerErrorType.NOT_FOUND, False, False), + (nexusrpc.HandlerErrorType.RESOURCE_EXHAUSTED, None, None), + (nexusrpc.HandlerErrorType.UNAVAILABLE, True, True), + (nexusrpc.HandlerErrorType.UPSTREAM_TIMEOUT, None, None), + (nexusrpc.HandlerErrorType.UNAUTHENTICATED, None, None), + (nexusrpc.HandlerErrorType.UNAUTHORIZED, None, None), + ], +) +async def test_nexus_handler_error_round_trip( + handler_type: nexusrpc.HandlerErrorType, + retryable_override: bool | None, + expected_retryable: bool | None, +): + """Test round-trip conversion of nexusrpc.HandlerError through failure converter.""" + message = f"test message for {handler_type.name}" + original_error = nexusrpc.HandlerError( + message, + type=handler_type, + retryable_override=retryable_override, + ) + + # Convert to failure + failure = Failure() + await DataConverter.default.encode_failure(original_error, failure) + + # Verify failure structure + assert failure.HasField("nexus_handler_failure_info") + assert failure.nexus_handler_failure_info.type == handler_type.name + assert failure.message == message + + # Verify retryable behavior mapping + if retryable_override is True: + assert ( + failure.nexus_handler_failure_info.retry_behavior + == NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE + ) + elif retryable_override is False: + assert ( + failure.nexus_handler_failure_info.retry_behavior + == NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE + ) + else: + assert ( + failure.nexus_handler_failure_info.retry_behavior + == NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED + ) + + # Convert back to error + result_error = await DataConverter.default.decode_failure(failure) + + # Verify result + assert isinstance(result_error, nexusrpc.HandlerError) + assert result_error.type == handler_type + assert result_error.retryable_override == expected_retryable + assert result_error.message == message + assert result_error.original_failure + assert result_error.original_failure.details + + # modify result_error.original_failure as a way of confirming that it is used + # when encoding the resulting failure + result_error.original_failure.details = { + "nexusHandlerFailureInfo": { + **result_error.original_failure.details["nexusHandlerFailureInfo"], + "type": "TEST TYPE", + } + } + + result_failure = Failure() + await DataConverter.default.encode_failure(result_error, result_failure) + assert result_failure.HasField("nexus_handler_failure_info") + assert result_failure.nexus_handler_failure_info.type == "TEST TYPE" + assert result_failure.message == message + + # Verify retryable behavior mapping + if retryable_override is True: + assert ( + result_failure.nexus_handler_failure_info.retry_behavior + == NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE + ) + elif retryable_override is False: + assert ( + result_failure.nexus_handler_failure_info.retry_behavior + == NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE + ) + else: + assert ( + result_failure.nexus_handler_failure_info.retry_behavior + == NexusHandlerErrorRetryBehavior.NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED + ) + + +async def test_nexus_handler_error_with_cause(): + """Test HandlerError with a cause chain is properly converted.""" + # Create a cause chain + root_cause = ValueError("root cause") + middle_cause = RuntimeError("middle cause") + middle_cause.__cause__ = root_cause + + handler_error = nexusrpc.HandlerError( + "handler error message", + type=nexusrpc.HandlerErrorType.INTERNAL, + ) + handler_error.__cause__ = middle_cause + + # Convert to failure + failure = Failure() + await DataConverter.default.encode_failure(handler_error, failure) + + # Verify message and cause chain in failure + assert failure.message == "handler error message" + assert failure.HasField("cause") + assert failure.cause.message == "middle cause" + assert failure.cause.application_failure_info.type == "RuntimeError" + assert failure.cause.HasField("cause") + assert failure.cause.cause.message == "root cause" + assert failure.cause.cause.application_failure_info.type == "ValueError" + + # Convert back + result_error = await DataConverter.default.decode_failure(failure) + + # Verify cause chain with messages (ApplicationError prepends type to message in str()) + assert isinstance(result_error, nexusrpc.HandlerError) + assert str(result_error) == "handler error message" + assert result_error.__cause__ is not None + assert isinstance(result_error.__cause__, ApplicationError) + assert str(result_error.__cause__) == "RuntimeError: middle cause" + assert result_error.__cause__.__cause__ is not None + assert str(result_error.__cause__.__cause__) == "ValueError: root cause" + + +async def test_nexus_handler_error_unknown_type_fallback(): + """Test that unknown HandlerErrorType falls back to INTERNAL during from_failure.""" + # Create a failure with an unknown type + failure = Failure() + failure.message = "unknown type error" + failure.nexus_handler_failure_info.type = "UNKNOWN_TYPE_XYZ" + + # Convert to error + result_error = await DataConverter.default.decode_failure(failure) + + # Should fall back to INTERNAL with message preserved + assert isinstance(result_error, nexusrpc.HandlerError) + assert result_error.type == nexusrpc.HandlerErrorType.INTERNAL + assert str(result_error) == "unknown type error" + + +async def test_nexus_operation_error_round_trip(): + """Test round-trip conversion of NexusOperationError.""" + test_cases = [ + # (scheduled_event_id, endpoint, service, operation, operation_token) + (123, "my-endpoint", "MyService", "myOperation", "token-abc"), + (0, "", "", "", ""), # Empty values + (999, "endpoint-2", "ServiceB", "op2", ""), # Empty token + (1, "e", "s", "o", "very-long-token-" + "x" * 100), + ] + + for scheduled_event_id, endpoint, service, operation, operation_token in test_cases: + message = "nexus operation failed" + original_error = NexusOperationError( + message, + scheduled_event_id=scheduled_event_id, + endpoint=endpoint, + service=service, + operation=operation, + operation_token=operation_token, + ) + + # Convert to failure + failure = Failure() + await DataConverter.default.encode_failure(original_error, failure) + + # Verify failure structure and message + assert failure.message == message + assert failure.HasField("nexus_operation_execution_failure_info") + info = failure.nexus_operation_execution_failure_info + assert info.scheduled_event_id == scheduled_event_id + assert info.endpoint == endpoint + assert info.service == service + assert info.operation == operation + assert info.operation_token == operation_token + + # Convert back + result_error = await DataConverter.default.decode_failure(failure) + + # Verify result including message + assert isinstance(result_error, NexusOperationError) + assert result_error.message == message + assert result_error.scheduled_event_id == scheduled_event_id + assert result_error.endpoint == endpoint + assert result_error.service == service + assert result_error.operation == operation + assert result_error.operation_token == operation_token + + +async def test_nexus_operation_error_with_cause(): + """Test NexusOperationError with a HandlerError as cause.""" + # Create NexusOperationError with HandlerError as cause + cause_error = nexusrpc.HandlerError( + "handler failed", + type=nexusrpc.HandlerErrorType.NOT_FOUND, + ) + + original_error = NexusOperationError( + "nexus operation failed", + scheduled_event_id=42, + endpoint="test-endpoint", + service="TestService", + operation="testOp", + operation_token="token123", + ) + original_error.__cause__ = cause_error + + # Convert to failure + failure = Failure() + await DataConverter.default.encode_failure(original_error, failure) + + # Verify message and cause is present + assert failure.message == "nexus operation failed" + assert failure.HasField("cause") + assert failure.cause.HasField("nexus_handler_failure_info") + assert failure.cause.message == "handler failed" + + # Convert back + result_error = await DataConverter.default.decode_failure(failure) + + # Verify messages preserved + assert isinstance(result_error, NexusOperationError) + assert result_error.message == "nexus operation failed" + assert result_error.__cause__ is not None + assert isinstance(result_error.__cause__, nexusrpc.HandlerError) + assert result_error.__cause__.type == nexusrpc.HandlerErrorType.NOT_FOUND + assert str(result_error.__cause__) == "handler failed" + + class IPv4AddressPayloadConverter(CompositePayloadConverter): def __init__(self) -> None: # Replace default JSON plain with our own that has our type converter @@ -629,12 +1184,22 @@ def default(self, o: Any) -> Any: class IPv4AddressJSONTypeConverter(JSONTypeConverter): def to_typed_value( self, hint: type, value: Any - ) -> Any | None | _JSONTypeConverterUnhandled: + ) -> Any | None | JSONTypeConverterUnhandled: if inspect.isclass(hint) and issubclass(hint, ipaddress.IPv4Address): return ipaddress.IPv4Address(value) return JSONTypeConverter.Unhandled +def test_json_type_converter_unhandled_type_public(): + return_type = get_type_hints(JSONTypeConverter.to_typed_value)["return"] + + assert JSONTypeConverterUnhandled.__name__ == "JSONTypeConverterUnhandled" + assert JSONTypeConverterUnhandled in get_args(return_type) + assert JSONTypeConverterUnhandled(JSONTypeConverter.Unhandled) is ( + JSONTypeConverter.Unhandled + ) + + async def test_json_type_converter(): addr = ipaddress.IPv4Address("1.2.3.4") custom_conv = dataclasses.replace( diff --git a/tests/test_envconfig.py b/tests/test_envconfig.py index 9bd385fcef..ef225a5718 100644 --- a/tests/test_envconfig.py +++ b/tests/test_envconfig.py @@ -1,12 +1,21 @@ import os import textwrap from pathlib import Path +from types import SimpleNamespace +from typing import Any +from unittest.mock import AsyncMock import pytest +import temporalio.runtime +import temporalio.service from temporalio.client import Client from temporalio.envconfig import ClientConfig, ClientConfigProfile, ClientConfigTLS from temporalio.service import TLSConfig +from temporalio.testing import WorkflowEnvironment +from tests import conftest + +pytestmark = pytest.mark.requires_local_server # A base TOML config with a default and a custom profile TOML_CONFIG_BASE = textwrap.dedent( @@ -147,6 +156,83 @@ def test_load_profile_from_data_env_overrides(): assert config.get("target_host") == "env-address" +@pytest.mark.parametrize( + ("env_type", "expected"), + [ + ("envconfig", True), + ("local", False), + ("time-skipping", False), + (None, False), + ], +) +def test_envconfig_server_selection( + env_type: str | None, + expected: bool, +): + assert conftest._uses_envconfig_server(env_type) is expected + + +async def test_envconfig_workflow_environment_uses_client_connect_config( + monkeypatch: pytest.MonkeyPatch, +): + monkeypatch.setenv("TEMPORAL_ADDRESS", "env-address") + monkeypatch.setenv("TEMPORAL_NAMESPACE", "env-namespace") + monkeypatch.setenv("TEMPORAL_API_KEY", "env-api-key") + monkeypatch.setenv("TEMPORAL_TLS", "false") + monkeypatch.setenv("TEMPORAL_GRPC_META_TEST_HEADER", "env-value") + client = object() + environment = object() + connect = AsyncMock(return_value=client) + monkeypatch.setattr(Client, "connect", connect) + monkeypatch.setattr( + WorkflowEnvironment, + "from_client", + lambda actual_client: environment, + ) + + assert await conftest._create_env_from_envconfig() is environment + connect.assert_awaited_once_with( + target_host="env-address", + namespace="env-namespace", + api_key="env-api-key", + tls=False, + rpc_metadata={"test-header": "env-value"}, + ) + + +async def test_workflow_environment_connect_client_inherits_connection_options( + monkeypatch: pytest.MonkeyPatch, +): + runtime = temporalio.runtime.Runtime.default() + source_client = SimpleNamespace( + namespace="env-namespace", + service_client=SimpleNamespace( + config=temporalio.service.ConnectConfig( + target_host="env-address", + api_key="env-api-key", + tls=False, + rpc_metadata={"test-header": "env-value"}, + runtime=runtime, + ) + ), + ) + environment = WorkflowEnvironment(source_client) # type: ignore[arg-type] + connect = AsyncMock(return_value=object()) + monkeypatch.setattr(Client, "connect", connect) + + await environment.connect_client(lazy=True) + + connect.assert_awaited_once_with( + "env-address", + namespace="env-namespace", + api_key="env-api-key", + tls=False, + rpc_metadata={"test-header": "env-value"}, + runtime=runtime, + lazy=True, + ) + + def test_load_profile_env_overrides(base_config_file: Path): """Test that environment variables correctly override file settings.""" env = { @@ -258,7 +344,7 @@ def test_load_profiles_from_data_all(): assert connect_config.get("target_host") == "custom-address" -def test_load_profiles_no_env_override(tmp_path: Path, monkeypatch): +def test_load_profiles_no_env_override(tmp_path: Path, monkeypatch): # type: ignore[reportMissingParameterType] """Confirm that load_profiles does not apply env overrides.""" config_file = tmp_path / "config.toml" config_file.write_text(TOML_CONFIG_BASE) @@ -610,6 +696,60 @@ def test_client_config_to_from_dict(): assert empty_config == new_empty_config +def test_client_config_tls_empty_dict_is_not_missing(): + """Test that an empty TLS table is distinct from no TLS table in both directions.""" + empty_tls_profile = ClientConfigProfile(tls=ClientConfigTLS()) + assert empty_tls_profile.to_dict() == {"tls": {}} + assert ClientConfigProfile.from_dict({"tls": {}}) == empty_tls_profile + assert ClientConfigTLS.from_dict({}) == ClientConfigTLS() + assert ClientConfigTLS.from_dict(None) is None + + +@pytest.mark.parametrize( + ("toml_tls", "tls_dict", "connect_tls"), + [ + pytest.param("", None, None, id="no-tls-table"), + pytest.param("[profile.default.tls]", {}, TLSConfig(), id="empty-tls-table"), + pytest.param( + "[profile.default.tls]\ndisabled = false", + {"disabled": False}, + TLSConfig(), + id="disabled-false", + ), + pytest.param( + "[profile.default.tls]\ndisabled = true", + {"disabled": True}, + False, + id="disabled-true", + ), + ], +) +def test_client_config_dict_round_trip_keeps_tls( + toml_tls: str, + tls_dict: dict[str, bool] | None, + connect_tls: bool | TLSConfig | None, +): + """Test that dictionary round trips preserve TLS and the connect config.""" + config = ClientConfig.load( + config_source=f"[profile.default]\naddress = 'some-address'\n{toml_tls}" + ) + expected_profile: dict[str, Any] = {"address": "some-address"} + if tls_dict is not None: + expected_profile["tls"] = tls_dict + + config_dict = config.to_dict() + assert config_dict == {"default": expected_profile} + + new_config = ClientConfig.from_dict(config_dict) + assert new_config == config + connect_config = new_config.profiles["default"].to_client_connect_config() + assert connect_config == config.profiles["default"].to_client_connect_config() + if connect_tls is None: + assert "tls" not in connect_config + else: + assert connect_config.get("tls") == connect_tls + + def test_grpc_metadata_normalization_from_toml(): """Test that gRPC metadata keys get normalized from TOML.""" toml_config = textwrap.dedent( diff --git a/tests/test_envconfig_extensions.py b/tests/test_envconfig_extensions.py new file mode 100644 index 0000000000..5d376433eb --- /dev/null +++ b/tests/test_envconfig_extensions.py @@ -0,0 +1,417 @@ +import dataclasses +import math +import os +import textwrap +from collections.abc import Awaitable, Callable +from datetime import date, datetime, time, timedelta, timezone +from pathlib import Path +from unittest.mock import AsyncMock + +import pytest + +import temporalio.client +from temporalio.envconfig import ( + ClientConfig, + ClientConfigExtension, + ClientConfigExtensionRequest, + ClientConfigProfile, +) +from temporalio.service import ConnectConfig, ServiceClient + + +class _TestPlugin(temporalio.client.Plugin): + def __init__(self, name: str) -> None: + self._name = name + + def name(self) -> str: + return self._name + + def configure_client( + self, config: temporalio.client.ClientConfig + ) -> temporalio.client.ClientConfig: + return config + + async def connect_service_client( + self, + config: ConnectConfig, + next: Callable[[ConnectConfig], Awaitable[ServiceClient]], + ) -> ServiceClient: + return await next(config) + + +class _TestExtension(ClientConfigExtension): + def __init__( + self, + name: str, + client_plugin: Callable[ + [ClientConfigExtensionRequest], temporalio.client.Plugin | None + ], + ) -> None: + self._name = name + self._client_plugin = client_plugin + + def name(self) -> str: + return self._name + + def client_plugin( + self, req: ClientConfigExtensionRequest + ) -> temporalio.client.Plugin | None: + return self._client_plugin(req) + + +def _write_config(tmp_path: Path, content: str) -> str: + config_file = tmp_path / "config.toml" + config_file.write_text(textwrap.dedent(content)) + return str(config_file) + + +TOML_CONFIG_EXT = textwrap.dedent( + """ + [profile.default] + address = "default-address" + [profile.default.ext.first] + value = "first-value" + nested = { list = [1, 2], flag = true } + [profile.default.ext.second] + [profile.default.ext.second.deeper] + value = 5 + + [profile.other] + address = "other-address" + """ +) + + +@pytest.mark.parametrize("strict", [False, True]) +def test_load_profile_with_ext(strict: bool): + profile = ClientConfigProfile.load( + config_source=TOML_CONFIG_EXT, + config_file_strict=strict, + override_env_vars={}, + ) + assert profile.address == "default-address" + assert profile.ext == { + "first": {"value": "first-value", "nested": {"list": [1, 2], "flag": True}}, + "second": {"deeper": {"value": 5}}, + } + + config = ClientConfig.load(config_source=TOML_CONFIG_EXT, config_file_strict=strict) + assert config.profiles["default"].ext == profile.ext + assert config.profiles["other"].ext == {} + + +def test_load_profile_ext_value_conversion(): + profile = ClientConfigProfile.load( + config_source=textwrap.dedent( + """ + [profile.default.ext.my_ext] + str = "value" + int = 5 + float = 1.5 + nan = nan + inf = -inf + bool = true + datetime = 1979-05-27T07:32:00Z + offset_datetime = 1979-05-27T00:32:00.999999999-07:00 + local_datetime = 1979-05-27T07:32:00 + local_date = 1979-05-27 + local_time = 07:32:00.5 + array = [1, "two", 1979-05-27] + nested = { key = "nested_value" } + """ + ), + disable_env=True, + ) + ext = dict(profile.ext["my_ext"]) + assert math.isnan(ext.pop("nan")) + assert ext == { + "str": "value", + "int": 5, + "float": 1.5, + "inf": -math.inf, + "bool": True, + "datetime": datetime(1979, 5, 27, 7, 32, tzinfo=timezone.utc), + "offset_datetime": datetime( + 1979, 5, 27, 0, 32, 0, 999999, tzinfo=timezone(timedelta(hours=-7)) + ), + "local_datetime": datetime(1979, 5, 27, 7, 32), + "local_date": date(1979, 5, 27), + "local_time": time(7, 32, 0, 500000), + "array": [1, "two", date(1979, 5, 27)], + "nested": {"key": "nested_value"}, + } + + +def test_strict_mode_still_rejects_unknown_non_ext_keys(): + with pytest.raises(RuntimeError, match="unrecognized_field"): + ClientConfigProfile.load( + config_source=textwrap.dedent( + """ + [profile.default] + unrecognized_field = "should-fail" + [profile.default.ext.first] + value = "first-value" + """ + ), + config_file_strict=True, + ) + + +def test_ext_not_modified_by_env(): + profile = ClientConfigProfile.load( + config_source='[profile.default.ext.foo]\nsome_field = "value"', + override_env_vars={"TEMPORAL_EXT_FOO_SOME_FIELD": "env-value"}, + ) + assert profile.ext == {"foo": {"some_field": "value"}} + + +def test_profile_ext_to_from_dict(): + profile = ClientConfigProfile( + address="some-address", ext={"foo": {"some_field": "value"}} + ) + profile_dict = profile.to_dict() + assert profile_dict == { + "address": "some-address", + "ext": {"foo": {"some_field": "value"}}, + } + assert ClientConfigProfile.from_dict(profile_dict) == profile + + +def test_load_client_connect_config_calls_extensions_in_order(tmp_path: Path): + env = {"TEMPORAL_ADDRESS": "env-address", "TEMPORAL_EXT_FIRST_VALUE": "env-value"} + calls: list[str] = [] + + def first_plugin(req: ClientConfigExtensionRequest) -> temporalio.client.Plugin: + calls.append("first") + # Env vars have already been applied to the profile + assert req.profile.address == "env-address" + assert req.profile.ext.get("first") == {"value": "file-value"} + assert req.env is env + assert req.env is not None + return _TestPlugin(f"first-{req.env['TEMPORAL_EXT_FIRST_VALUE']}") + + def noop_plugin(req: ClientConfigExtensionRequest) -> None: + calls.append("noop") + assert "noop" not in req.profile.ext + return None + + def second_plugin(_: ClientConfigExtensionRequest) -> temporalio.client.Plugin: + calls.append("second") + return _TestPlugin("second") + + config = ClientConfig.load_client_connect_config( + config_file=_write_config( + tmp_path, + """ + [profile.default] + address = "file-address" + [profile.default.ext.first] + value = "file-value" + """, + ), + config_file_strict=True, + override_env_vars=env, + extensions=[ + _TestExtension("second", second_plugin), + _TestExtension("first", first_plugin), + _TestExtension("noop", noop_plugin), + ], + ) + # Extension order is respected + assert calls == ["second", "first", "noop"] + assert [p.name() for p in config.get("plugins", [])] == [ + "second", + "first-env-value", + ] + assert config.get("target_host") == "env-address" + + +def test_load_client_connect_config_no_plugins_without_extensions(tmp_path: Path): + config_file = _write_config(tmp_path, TOML_CONFIG_EXT) + config = ClientConfig.load_client_connect_config( + config_file=config_file, override_env_vars={} + ) + assert "plugins" not in config + config = ClientConfig.load_client_connect_config( + config_file=config_file, + override_env_vars={}, + extensions=[_TestExtension("first", lambda _: None)], + ) + assert "plugins" not in config + + +def test_load_client_connect_config_passes_env_to_extensions(tmp_path: Path): + config_file = _write_config(tmp_path, "[profile.default]") + got_envs: list[object] = [] + + def record_env(req: ClientConfigExtensionRequest) -> None: + got_envs.append(req.env) + return None + + extensions = [_TestExtension("ext", record_env)] + env = {"TEMPORAL_EXT_EXT_VALUE": "value"} + + # Defaults to process env + ClientConfig.load_client_connect_config( + config_file=config_file, extensions=extensions + ) + # Uses override env when given + ClientConfig.load_client_connect_config( + config_file=config_file, override_env_vars=env, extensions=extensions + ) + # None when env is disabled + ClientConfig.load_client_connect_config( + config_file=config_file, + disable_env=True, + override_env_vars=env, + extensions=extensions, + ) + + assert len(got_envs) == 3 + assert got_envs[0] is os.environ + assert got_envs[1] is env + assert got_envs[2] is None + + +@pytest.mark.parametrize( + "names,expected_message", + [ + (["a", "b", "a"], 'duplicate client config extension name "a"'), + (["a", ""], "client config extension at index 1 has empty name"), + ([None], "client config extension at index 0 is None"), + ], +) +def test_load_client_connect_config_rejects_invalid_extensions( + tmp_path: Path, names: list[str | None], expected_message: str +): + def fail(_: ClientConfigExtensionRequest) -> None: + pytest.fail("extension should not be called") + + extensions = [ + None if name is None else _TestExtension(name, fail) for name in names + ] + with pytest.raises(ValueError) as err: + ClientConfig.load_client_connect_config( + config_file=_write_config(tmp_path, "[profile.default]"), + override_env_vars={}, + extensions=extensions, # type: ignore[arg-type] + ) + assert str(err.value) == expected_message + + +def test_load_client_connect_config_wraps_extension_errors(tmp_path: Path): + ext_err = ValueError("bad config") + + def raise_err(_: ClientConfigExtensionRequest) -> None: + raise ext_err + + with pytest.raises(RuntimeError) as err: + ClientConfig.load_client_connect_config( + config_file=_write_config(tmp_path, "[profile.default]"), + override_env_vars={}, + extensions=[_TestExtension("bad", raise_err)], + ) + assert str(err.value) == 'client config extension "bad": bad config' + assert err.value.__cause__ is ext_err + + +class ApiKeyFileExtension(ClientConfigExtension): + """Example extension that reads an API key from a file, configured like: + + .. code-block:: toml + + [profile.default.ext.api_key_file] + path = "/path/to/api-key" + + or with the ``TEMPORAL_EXT_API_KEY_FILE_PATH`` env var, which takes + precedence. + """ + + def name(self) -> str: + return "api_key_file" + + def client_plugin( + self, req: ClientConfigExtensionRequest + ) -> temporalio.client.Plugin | None: + key_path = req.profile.ext.get(self.name(), {}).get("path") + if key_path is not None and not isinstance(key_path, str): + raise TypeError(f"path must be a string, got {type(key_path).__name__}") + if req.env is not None: + key_path = req.env.get("TEMPORAL_EXT_API_KEY_FILE_PATH", key_path) + if key_path is None: + return None + return _ApiKeyPlugin(Path(key_path).read_text().strip()) + + +class _ApiKeyPlugin(temporalio.client.Plugin): + def __init__(self, api_key: str) -> None: + self._api_key = api_key + + def configure_client( + self, config: temporalio.client.ClientConfig + ) -> temporalio.client.ClientConfig: + return config + + async def connect_service_client( + self, + config: ConnectConfig, + next: Callable[[ConnectConfig], Awaitable[ServiceClient]], + ) -> ServiceClient: + return await next( + dataclasses.replace( + config, + api_key=self._api_key, + tls=True if config.tls is None else config.tls, + ) + ) + + +async def test_example_extension(tmp_path: Path): + key_file = tmp_path / "api-key" + key_file.write_text("my-api-key\n") + config = ClientConfig.load_client_connect_config( + config_file=_write_config( + tmp_path, + f""" + [profile.default] + address = "my-address" + [profile.default.ext.api_key_file] + path = {str(key_file)!r} + """, + ), + config_file_strict=True, + override_env_vars={}, + extensions=[ApiKeyFileExtension()], + ) + plugins = config.get("plugins", []) + assert len(plugins) == 1 + next = AsyncMock() + await plugins[0].connect_service_client( + ConnectConfig(target_host="my-address"), next + ) + connect_config = next.call_args.args[0] + assert connect_config.target_host == "my-address" + assert connect_config.api_key == "my-api-key" + assert connect_config.tls is True + + # Nothing configured + unconfigured = ClientConfig.load_client_connect_config( + config_file=_write_config(tmp_path, "[profile.default]"), + override_env_vars={}, + extensions=[ApiKeyFileExtension()], + ) + assert "plugins" not in unconfigured + + # Invalid config + with pytest.raises(RuntimeError) as err: + ClientConfig.load_client_connect_config( + config_file=_write_config( + tmp_path, "[profile.default.ext.api_key_file]\npath = 5" + ), + override_env_vars={}, + extensions=[ApiKeyFileExtension()], + ) + assert ( + str(err.value) + == 'client config extension "api_key_file": path must be a string, got int' + ) diff --git a/tests/test_extstore.py b/tests/test_extstore.py new file mode 100644 index 0000000000..0d763ef616 --- /dev/null +++ b/tests/test_extstore.py @@ -0,0 +1,1083 @@ +"""Tests for external storage functionality.""" + +import asyncio +from collections.abc import Sequence +from datetime import timedelta + +import pytest + +import temporalio.converter._extstore +from temporalio.api.common.v1 import Payload +from temporalio.api.failure.v1 import Failure +from temporalio.api.sdk.v1.external_storage_pb2 import ExternalStorageReference +from temporalio.converter import ( + DataConverter, + ExternalStorage, + JSONPlainPayloadConverter, + PayloadCodec, + StorageDriver, + StorageDriverClaim, + StorageDriverRetrieveContext, + StorageDriverSelectContext, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, +) +from temporalio.converter._extstore import ( + _REFERENCE_ENCODING, + StorageOperationMetrics, + _StorageReference, +) +from temporalio.converter._payload_converter import JSONProtoPayloadConverter +from temporalio.exceptions import ApplicationError + +_legacy_ref_converter = JSONPlainPayloadConverter(encoding=_REFERENCE_ENCODING.decode()) + + +def _make_legacy_payload( + driver_name: str, claim_data: dict[str, str], size_bytes: int +) -> Payload: + """Build a reference payload in the legacy ``json/external-storage-reference`` format.""" + ref = _StorageReference( + driver_name=driver_name, + driver_claim=StorageDriverClaim(claim_data=claim_data), + ) + payload = _legacy_ref_converter.to_payload(ref) + assert payload is not None + payload.external_payloads.add().size_bytes = size_bytes + return payload + + +class InMemoryTestDriver(StorageDriver): + """In-memory storage driver for testing.""" + + def __init__( + self, + driver_name: str = "test-driver", + ): + self._driver_name = driver_name + self._storage: dict[str, bytes] = {} + self._store_calls = 0 + self._retrieve_calls = 0 + self._store_contexts: list[StorageDriverStoreContext] = [] + + def name(self) -> str: + return self._driver_name + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + self._store_calls += 1 + self._store_contexts.append(context) + start_index = len(self._storage) + + entries = [ + (f"payload-{start_index + i}", payload.SerializeToString()) + for i, payload in enumerate(payloads) + ] + self._storage.update(entries) + + # Small delay to ensure measurable duration even on low-resolution timers. + await asyncio.sleep(0.02) + + return [StorageDriverClaim(claim_data={"key": key}) for key, _ in entries] + + async def retrieve( + self, + context: StorageDriverRetrieveContext, + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + self._retrieve_calls += 1 + + def parse_claim( + claim: StorageDriverClaim, + ) -> Payload: + key = claim.claim_data["key"] + if key not in self._storage: + raise ApplicationError( + f"Payload not found for key '{key}'", non_retryable=True + ) + payload = Payload() + payload.ParseFromString(self._storage[key]) + return payload + + # Small delay to ensure measurable duration even on low-resolution timers. + await asyncio.sleep(0.02) + + return [parse_claim(claim) for claim in claims] + + +class TestDataConverterExternalStorage: + """Tests for DataConverter with external storage.""" + + async def test_extstore_encode_decode(self): + """Test that large payloads are stored externally.""" + driver = InMemoryTestDriver() + + # Configure with 100-byte threshold + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=100, + ) + ) + + # Small value should not be externalized + small_value = "small" + encoded_small = await converter.encode([small_value]) + assert len(encoded_small) == 1 + assert not encoded_small[0].external_payloads # Not externalized + assert driver._store_calls == 0 + + # Large value should be externalized + large_value = "x" * 200 + encoded_large = await converter.encode([large_value]) + assert len(encoded_large) == 1 + assert len(encoded_large[0].external_payloads) > 0 # Externalized + assert driver._store_calls == 1 + + # Decode large value + decoded = await converter.decode(encoded_large, [str]) + assert len(decoded) == 1 + assert decoded[0] == large_value + assert driver._retrieve_calls == 1 + + async def test_extstore_reference_structure(self): + """Externalized payloads are written as ExternalStorageReference proto (json/protobuf encoding).""" + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[InMemoryTestDriver("test-driver")], + payload_size_threshold=50, + ) + ) + + large_value = "x" * 100 + encoded = await converter.encode([large_value]) + + reference_payload = encoded[0] + assert len(reference_payload.external_payloads) > 0 + assert reference_payload.metadata.get("encoding") == b"json/protobuf" + + reference = JSONProtoPayloadConverter().from_payload( + reference_payload, ExternalStorageReference + ) + assert isinstance(reference, ExternalStorageReference) + assert reference.driver_name == "test-driver" + assert "key" in reference.claim_data + + async def test_extstore_composite_conditional(self): + """Test using multiple drivers based on size.""" + hot_driver = InMemoryTestDriver("hot-storage") + cold_driver = InMemoryTestDriver("cold-storage") + + options = ExternalStorage( + drivers=[hot_driver, cold_driver], + driver_selector=lambda context, payload: ( + hot_driver if payload.ByteSize() < 500 else cold_driver + ), + payload_size_threshold=100, + ) + converter = DataConverter(external_storage=options) + + # Small payload (not externalized) + small = "x" * 50 + encoded_small = await converter.encode([small]) + assert not encoded_small[0].external_payloads + assert hot_driver._store_calls == 0 + assert cold_driver._store_calls == 0 + + # Medium payload (hot storage) + medium = "x" * 200 + encoded_medium = await converter.encode([medium]) + assert len(encoded_medium[0].external_payloads) > 0 + assert hot_driver._store_calls == 1 + assert cold_driver._store_calls == 0 + + # Large payload (cold storage) + large = "x" * 2000 + encoded_large = await converter.encode([large]) + assert len(encoded_large[0].external_payloads) > 0 + assert hot_driver._store_calls == 1 # Unchanged + assert cold_driver._store_calls == 1 + + # Verify retrieval from correct drivers + decoded_medium = await converter.decode(encoded_medium, [str]) + assert decoded_medium[0] == medium + assert hot_driver._retrieve_calls == 1 + + decoded_large = await converter.decode(encoded_large, [str]) + assert decoded_large[0] == large + assert cold_driver._retrieve_calls == 1 + + +class TestDriverError: + """Tests for ValueError raised when a driver violates its contract.""" + + async def test_encode_wrong_claim_count_raises_runtime_error(self): + """store() returning fewer claims than payloads must raise ValueError.""" + + class _NoClaimsDriver(InMemoryTestDriver): + async def store( + self, context: StorageDriverStoreContext, payloads: Sequence[Payload] + ) -> list[StorageDriverClaim]: + return [] + + driver = _NoClaimsDriver() + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=10, + ) + ) + with pytest.raises( + ValueError, + match=f"Driver '{driver.name()}' returned 0 claims, expected 1", + ): + await converter.encode(["x" * 200]) + + async def test_decode_wrong_payload_count_raises_runtime_error(self): + """retrieve() returning fewer payloads than claims must raise ValueError.""" + good_converter = DataConverter( + external_storage=ExternalStorage( + drivers=[InMemoryTestDriver()], + payload_size_threshold=10, + ) + ) + encoded = await good_converter.encode(["x" * 200]) + + class _NoPayloadsDriver(InMemoryTestDriver): + async def retrieve( + self, + context: StorageDriverRetrieveContext, + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + return [] + + driver = _NoPayloadsDriver() + bad_converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=10, + ) + ) + with pytest.raises( + ValueError, + match=f"Driver '{driver.name()}' returned 0 payloads, expected 1", + ): + await bad_converter.decode(encoded, [str]) + + async def test_store_cancels_in_flight_driver_on_error(self): + """When one driver raises during concurrent store, other in-flight drivers are cancelled.""" + store_cancelled = asyncio.Event() + + class _SleepingStoreDriver(InMemoryTestDriver): + def __init__(self): + super().__init__("sleeping") + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + try: + await asyncio.sleep(float("inf")) + except asyncio.CancelledError: + store_cancelled.set() + raise + return [] # unreachable + + class _FailingStoreDriver(InMemoryTestDriver): + def __init__(self): + super().__init__("failing") + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + raise ValueError( + "failed to store payloads because remote service is unavailable" + ) + + drivers = [_SleepingStoreDriver(), _FailingStoreDriver()] + drivers_iter = iter(drivers) + converter = DataConverter( + external_storage=ExternalStorage( + drivers=drivers, + driver_selector=lambda ctx, p: next(drivers_iter), + payload_size_threshold=0, + ) + ) + + with pytest.raises( + ValueError, + match="^failed to store payloads because remote service is unavailable$", + ): + await converter.encode(["payload_a", "payload_b"]) + + assert store_cancelled.is_set() + + async def test_retrieve_cancels_in_flight_driver_on_error(self): + """When one driver raises during concurrent retrieve, other in-flight drivers are cancelled.""" + retrieve_cancelled = asyncio.Event() + + class _SleepingRetrieveDriver(InMemoryTestDriver): + def __init__(self): + super().__init__("sleeping") + + async def retrieve( + self, + context: StorageDriverRetrieveContext, + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + try: + await asyncio.sleep(float("inf")) + except asyncio.CancelledError: + retrieve_cancelled.set() + raise + return [] # unreachable + + class _FailingRetrieveDriver(InMemoryTestDriver): + def __init__(self): + super().__init__("failing") + + async def retrieve( + self, + context: StorageDriverRetrieveContext, + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + raise ValueError( + "failed to retrieve a payload because the object key does not exist" + ) + + drivers: list[StorageDriver] = [ + _SleepingRetrieveDriver(), + _FailingRetrieveDriver(), + ] + drivers_iter = iter(drivers) + converter = DataConverter( + external_storage=ExternalStorage( + drivers=drivers, + driver_selector=lambda ctx, p: next(drivers_iter), + payload_size_threshold=0, + ) + ) + encoded = await converter.encode(["payload_a", "payload_b"]) + + with pytest.raises( + ValueError, + match="^failed to retrieve a payload because the object key does not exist$", + ): + await converter.decode(encoded, [str, str]) + + assert retrieve_cancelled.is_set() + + +class RecordingPayloadCodec(PayloadCodec): + """Codec that wraps each payload under a recognisable ``encoding`` label. + + Encode sets ``metadata["encoding"]`` to ``encoding_label`` and stores the + serialised inner payload as ``data``. Decode reverses that. The call + counters let tests assert exactly how many payloads each codec processed. + """ + + def __init__(self, encoding_label: str) -> None: + self._encoding_label = encoding_label.encode() + self.encoded_count = 0 + self.decoded_count = 0 + + async def encode(self, payloads: Sequence[Payload]) -> list[Payload]: + self.encoded_count += len(payloads) + results = [] + for p in payloads: + wrapped = Payload() + wrapped.metadata["encoding"] = self._encoding_label + wrapped.data = p.SerializeToString() + results.append(wrapped) + return results + + async def decode(self, payloads: Sequence[Payload]) -> list[Payload]: + self.decoded_count += len(payloads) + results = [] + for p in payloads: + inner = Payload() + inner.ParseFromString(p.data) + results.append(inner) + return results + + +@pytest.mark.usefixtures("encode_storage_references") +class TestPayloadCodecWithExternalStorage: + """Tests for interaction between DataConverter.payload_codec and external storage.""" + + async def test_dc_payload_codec_encodes_stored_bytes(self): + """DataConverter.payload_codec encodes the bytes handed to the driver + for storage.""" + driver = InMemoryTestDriver() + dc_codec = RecordingPayloadCodec("binary/dc-encoded") + + converter = DataConverter( + payload_codec=dc_codec, + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=50, + ), + ) + + large_value = "x" * 200 + encoded = await converter.encode([large_value]) + assert len(encoded) == 1 + assert driver._store_calls == 1 + + # The bytes given to the driver must carry the dc_codec label. + stored_payload = Payload() + stored_payload.ParseFromString(next(iter(driver._storage.values()))) + assert stored_payload.metadata.get("encoding") == b"binary/dc-encoded" + + # Round-trip must recover the original value. + decoded = await converter.decode(encoded, [str]) + assert decoded[0] == large_value + assert driver._retrieve_calls == 1 + + async def test_dc_payload_codec_encodes_reference_payload(self): + """The reference payload written to workflow history is encoded by + DataConverter.payload_codec and marked, keeping its size details.""" + driver = InMemoryTestDriver() + dc_codec = RecordingPayloadCodec("binary/dc-encoded") + + converter = DataConverter( + payload_codec=dc_codec, + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=50, + ), + ) + + large_value = "x" * 200 + encoded = await converter.encode([large_value]) + assert len(encoded) == 1 + + # Once for the stored payload, once for the reference payload. + assert dc_codec.encoded_count == 2 + assert encoded[0].metadata.get("encoding") == b"binary/dc-encoded" + assert ( + encoded[0].metadata.get("__temporal_external_storage_reference") == b"true" + ) + stored_size = len(next(iter(driver._storage.values()))) + assert [d.size_bytes for d in encoded[0].external_payloads] == [stored_size] + + decoded = await converter.decode(encoded, [str]) + assert decoded[0] == large_value + assert dc_codec.decoded_count == 2 + assert driver._retrieve_calls == 1 + + async def test_inline_payload_not_marked(self): + """Payloads that stay inline are encoded once and never marked.""" + dc_codec = RecordingPayloadCodec("binary/dc-encoded") + converter = DataConverter( + payload_codec=dc_codec, + external_storage=ExternalStorage( + drivers=[InMemoryTestDriver()], + payload_size_threshold=1000, + ), + ) + + encoded = await converter.encode(["small"]) + + assert dc_codec.encoded_count == 1 + assert "__temporal_external_storage_reference" not in encoded[0].metadata + assert await converter.decode(encoded, [str]) == ["small"] + + async def test_reference_payload_marked_without_codec(self): + """Without a codec, the reference payload is left unencoded but still + marked, and round-trips.""" + driver = InMemoryTestDriver() + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver], payload_size_threshold=50 + ) + ) + + encoded = await converter.encode(["x" * 200]) + + assert encoded[0].metadata.get("encoding") == b"json/protobuf" + assert ( + encoded[0].metadata.get("__temporal_external_storage_reference") == b"true" + ) + assert await converter.decode(encoded, [str]) == ["x" * 200] + + async def test_unmarked_reference_payload_still_decodes(self): + """A reference payload written before references were marked and + encoded still decodes when a codec is configured.""" + driver = InMemoryTestDriver() + dc_codec = RecordingPayloadCodec("binary/dc-encoded") + external_storage = ExternalStorage(drivers=[driver], payload_size_threshold=50) + + # Produce an unencoded, unmarked reference that points at codec-encoded + # bytes, as older SDK versions did. + encoded_value = await DataConverter(payload_codec=dc_codec).encode(["x" * 200]) + old_reference = await external_storage._store_payload(encoded_value[0]) + del old_reference.metadata["__temporal_external_storage_reference"] + + converter = DataConverter( + payload_codec=dc_codec, external_storage=external_storage + ) + decoded = await converter.decode([old_reference], [str]) + assert decoded[0] == "x" * 200 + + async def test_encoded_reference_payload_without_codec_fails(self): + """An encoded reference payload cannot be read without a codec.""" + driver = InMemoryTestDriver() + external_storage = ExternalStorage(drivers=[driver], payload_size_threshold=50) + encoded = await DataConverter( + payload_codec=RecordingPayloadCodec("binary/dc-encoded"), + external_storage=external_storage, + ).encode(["x" * 200]) + + with pytest.raises( + RuntimeError, + match=r"\[TMPRL1106\] Encountered an encoded external storage reference that could not be decoded", + ): + await DataConverter(external_storage=external_storage).decode( + encoded, [str] + ) + + async def test_marked_payload_that_is_not_a_reference_fails(self): + """A marked payload that does not decode to a reference fails before + external storage retrieval.""" + driver = InMemoryTestDriver() + converter = DataConverter( + payload_codec=RecordingPayloadCodec("binary/dc-encoded"), + external_storage=ExternalStorage(drivers=[driver]), + ) + encoded = await converter.encode(["value"]) + encoded[0].metadata["__temporal_external_storage_reference"] = b"true" + + with pytest.raises( + RuntimeError, + match=r"\[TMPRL1106\] Encountered an encoded external storage reference that could not be decoded", + ): + await converter.decode(encoded, [str]) + assert driver._retrieve_calls == 0 + + async def test_failure_reference_payload_encoded(self): + """Reference payloads inside failures are encoded and marked too.""" + driver = InMemoryTestDriver() + converter = DataConverter( + payload_codec=RecordingPayloadCodec("binary/dc-encoded"), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=50, + ), + ) + failure = Failure() + await converter.encode_failure(ApplicationError("boom", "x" * 200), failure) + + details = failure.application_failure_info.details.payloads + assert ( + details[0].metadata.get("__temporal_external_storage_reference") == b"true" + ) + + error = await converter.decode_failure(failure) + assert isinstance(error, ApplicationError) + assert error.details == ("x" * 200,) + + async def test_multiple_stored_payloads_encode_each_reference(self): + """When several payloads are stored together, every reference payload + is encoded and marked, an inline payload between them is not marked, + and all round-trip.""" + driver = InMemoryTestDriver() + converter = DataConverter( + payload_codec=RecordingPayloadCodec("binary/dc-encoded"), + external_storage=ExternalStorage( + drivers=[driver], + # The codec-encoded "inline" value is ~67 bytes, below this. + payload_size_threshold=100, + ), + ) + values = ["a" * 200, "inline", "c" * 200] + + encoded = await converter.encode(values) + + assert driver._store_calls == 1 + for payload in encoded: + assert payload.metadata.get("encoding") == b"binary/dc-encoded" + for reference in (encoded[0], encoded[2]): + assert ( + reference.metadata.get("__temporal_external_storage_reference") + == b"true" + ) + assert reference.external_payloads + inline = encoded[1] + assert "__temporal_external_storage_reference" not in inline.metadata + assert not inline.external_payloads + assert await converter.decode(encoded, [str, str, str]) == values + + async def test_marked_reference_without_external_storage_fails(self): + """A marked reference read by a converter without external storage + reports that external storage is not configured.""" + encoded = await DataConverter( + payload_codec=RecordingPayloadCodec("binary/dc-encoded"), + external_storage=ExternalStorage( + drivers=[InMemoryTestDriver()], payload_size_threshold=50 + ), + ).encode(["x" * 200]) + + with pytest.raises(RuntimeError, match=r"\[TMPRL1105\]"): + await DataConverter().decode(encoded, [str]) + + +async def test_references_written_unencoded_and_unmarked_by_default(): + """Until writing encoded references is turned on, references are written as + in earlier releases: unencoded and unmarked, even with a codec configured.""" + driver = InMemoryTestDriver() + converter = DataConverter( + payload_codec=RecordingPayloadCodec("binary/dc-encoded"), + external_storage=ExternalStorage(drivers=[driver], payload_size_threshold=50), + ) + + encoded = await converter.encode(["x" * 200]) + + assert encoded[0].metadata.get("encoding") == b"json/protobuf" + assert "__temporal_external_storage_reference" not in encoded[0].metadata + assert await converter.decode(encoded, [str]) == ["x" * 200] + + +async def test_encoded_references_read_while_writing_them_is_off( + monkeypatch: pytest.MonkeyPatch, +): + """Encoded references written by a later release can be read before writing + them is turned on.""" + converter = DataConverter( + payload_codec=RecordingPayloadCodec("binary/dc-encoded"), + external_storage=ExternalStorage( + drivers=[InMemoryTestDriver()], payload_size_threshold=50 + ), + ) + monkeypatch.setattr( + temporalio.converter._extstore, "_ENCODE_STORAGE_REFERENCES", True + ) + encoded = await converter.encode(["x" * 200]) + assert encoded[0].metadata.get("encoding") == b"binary/dc-encoded" + assert encoded[0].metadata["__temporal_external_storage_reference"] == b"true" + + monkeypatch.setattr( + temporalio.converter._extstore, "_ENCODE_STORAGE_REFERENCES", False + ) + + assert await converter.decode(encoded, [str]) == ["x" * 200] + + +class TestMultiDriver: + """Tests for ExternalStorage with multiple drivers.""" + + async def test_selector_always_first_driver_handles_all_stores(self): + """A selector that always picks the first driver routes all store + operations there. The second driver is never called for store.""" + first = InMemoryTestDriver("driver-first") + second = InMemoryTestDriver("driver-second") + + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[first, second], + driver_selector=lambda _ctx, _p: first, + payload_size_threshold=50, + ) + ) + + large = "x" * 200 + encoded = await converter.encode([large]) + + assert first._store_calls == 1 + assert second._store_calls == 0 + + # The reference in history names the first driver. + ref = JSONProtoPayloadConverter().from_payload( + encoded[0], ExternalStorageReference + ) + assert isinstance(ref, ExternalStorageReference) + assert ref.driver_name == "driver-first" + + # Retrieval also goes to the first driver. + decoded = await converter.decode(encoded, [str]) + assert decoded[0] == large + assert first._retrieve_calls == 1 + assert second._retrieve_calls == 0 + + async def test_no_selector_second_driver_is_retrieve_only(self): + """A driver that is second in the list acts as a retrieve-only driver. + References are resolved by name, not by position, so a payload stored + by driver-b is retrieved correctly even when driver-a is listed first.""" + driver_a = InMemoryTestDriver("driver-a") + driver_b = InMemoryTestDriver("driver-b") + + # Store with driver-b as the sole driver. + store_converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver_b], + payload_size_threshold=50, + ) + ) + large = "y" * 200 + encoded = await store_converter.encode([large]) + + # Retrieve with driver-a listed first, driver-b second. + # The "driver-b" name in the reference must route to driver-b. + retrieve_converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver_a, driver_b], + driver_selector=lambda _ctx, _p: driver_a, + payload_size_threshold=50, + ) + ) + decoded = await retrieve_converter.decode(encoded, [str]) + assert decoded[0] == large + assert driver_a._retrieve_calls == 0 # never consulted + assert driver_b._retrieve_calls == 1 + + async def test_selector_receives_select_context_with_target(self): + """The selector is handed a StorageDriverSelectContext -- not the + StorageDriverStoreContext the driver receives -- carrying the same + target.""" + driver = InMemoryTestDriver("test-driver") + seen: list[object] = [] + + def selector(context: object, _payload: Payload) -> StorageDriver: + seen.append(context) + return driver + + target = StorageDriverWorkflowInfo( + namespace="ns", id="wf-id", type="MyWorkflow", run_id="run-id" + ) + storage = ExternalStorage( + drivers=[driver], + driver_selector=selector, + payload_size_threshold=50, + )._with_store_context(StorageDriverStoreContext(target=target)) + + converter = DataConverter(external_storage=storage) + await converter.encode(["x" * 200]) + + assert len(seen) == 1 + assert isinstance(seen[0], StorageDriverSelectContext) + assert seen[0].target == target + assert isinstance(driver._store_contexts[0], StorageDriverStoreContext) + assert driver._store_contexts[0].target == target + + async def test_contexts_carry_namespace_without_target(self): + driver = InMemoryTestDriver("test-driver") + seen: list[StorageDriverSelectContext] = [] + + def selector( + context: StorageDriverSelectContext, _payload: Payload + ) -> StorageDriver: + seen.append(context) + return driver + + storage = ExternalStorage( + drivers=[driver], + driver_selector=selector, + payload_size_threshold=50, + )._with_store_context(StorageDriverStoreContext(namespace="ns")) + + await DataConverter(external_storage=storage).encode(["x" * 200]) + + assert seen == [StorageDriverSelectContext(namespace="ns")] + assert driver._store_contexts == [StorageDriverStoreContext(namespace="ns")] + + async def test_selector_routes_payloads_to_different_drivers_in_single_batch(self): + """When a selector routes different payloads to different drivers, a + single encode([v1, v2, ...]) call batches payloads per driver so each + driver receives exactly one store() call regardless of how many + payloads are routed to it.""" + driver_a = InMemoryTestDriver("driver-a") + driver_b = InMemoryTestDriver("driver-b") + + # Route payloads that serialise to < 500 bytes to driver_a, larger ones + # to driver_b. + def selector(_ctx: object, payload: Payload) -> StorageDriver: + return driver_a if payload.ByteSize() < 500 else driver_b + + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver_a, driver_b], + driver_selector=selector, + payload_size_threshold=50, + ) + ) + + small_ext = "a" * 100 # above threshold, serialises well below 500 B + large_ext = "b" * 1000 # serialises above 500 B + + # Encode both values in a single call — they should be batched per driver. + encoded = await converter.encode([small_ext, large_ext]) + assert driver_a._store_calls == 1 # one batched call, not two individual ones + assert driver_b._store_calls == 1 + + # Full round-trip. + decoded = await converter.decode(encoded, [str, str]) + assert decoded == [small_ext, large_ext] + assert driver_a._retrieve_calls == 1 + assert driver_b._retrieve_calls == 1 + + async def test_selector_returning_none_keeps_payload_inline(self): + """A selector that returns None for a payload leaves it stored inline + in workflow history rather than offloading it to any driver, even when + the payload exceeds the size threshold.""" + driver = InMemoryTestDriver("driver-a") + + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver], + driver_selector=lambda _ctx, _payload: None, + payload_size_threshold=50, + ) + ) + + large = "x" * 200 + encoded = await converter.encode([large]) + + assert driver._store_calls == 0 + assert len(encoded[0].external_payloads) == 0 # payload is inline + + decoded = await converter.decode(encoded, [str]) + assert decoded[0] == large + assert driver._retrieve_calls == 0 + + async def test_selector_returns_unregistered_driver_raises(self): + """A selector that returns a driver instance not present in + ExternalStorage.drivers raises ValueError during encode.""" + registered = InMemoryTestDriver("registered") + unregistered = InMemoryTestDriver("unregistered") + + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[registered], + driver_selector=lambda _ctx, _payload: unregistered, + payload_size_threshold=50, + ) + ) + + with pytest.raises(ValueError): + await converter.encode(["x" * 200]) + + async def test_selector_dispatches_drivers_concurrently(self): + started_a = asyncio.Event() + started_b = asyncio.Event() + + class BarrierDriver(InMemoryTestDriver): + def __init__( + self, name: str, my_event: asyncio.Event, their_event: asyncio.Event + ): + super().__init__(name) + self._my_event = my_event + self._their_event = their_event + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + self._my_event.set() + await asyncio.wait_for(self._their_event.wait(), timeout=2.0) + return await super().store(context, payloads) + + driver_a = BarrierDriver("driver-a", started_a, started_b) + driver_b = BarrierDriver("driver-b", started_b, started_a) + + def selector(_ctx: object, payload: Payload) -> StorageDriver: + return driver_a if payload.ByteSize() < 500 else driver_b + + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver_a, driver_b], + driver_selector=selector, + payload_size_threshold=0, + ) + ) + + small_ext = "a" * 100 # routes to driver-a + large_ext = "b" * 1000 # routes to driver-b + + # This will deadlock (and timeout) if the two store() calls are not + # dispatched concurrently. + encoded = await asyncio.wait_for( + converter.encode([small_ext, large_ext]), timeout=5.0 + ) + + decoded = await converter.decode(encoded, [str, str]) + assert decoded == [small_ext, large_ext] + + def test_multiple_drivers_without_selector_raises(self): + """Registering more than one driver without a driver_selector raises + ValueError immediately when constructing ExternalStorage.""" + first = InMemoryTestDriver("driver-a") + second = InMemoryTestDriver("driver-b") + + with pytest.raises( + ValueError, + match=r"^ExternalStorage\.driver_selector must be specified if multiple drivers are registered\.$", + ): + ExternalStorage( + drivers=[first, second], + payload_size_threshold=50, + ) + + def test_duplicate_driver_names_raises(self): + """Registering two drivers with identical names raises ValueError immediately + when constructing ExternalStorage.""" + first = InMemoryTestDriver("dup-name") + duplicate = InMemoryTestDriver("dup-name") + + with pytest.raises( + ValueError, + match=r"^ExternalStorage\.drivers contains multiple drivers with name 'dup-name'\. Each driver must have a unique name\.$", + ): + ExternalStorage( + drivers=[first, duplicate], + driver_selector=lambda _ctx, _p: first, + payload_size_threshold=50, + ) + + @pytest.mark.parametrize("threshold", [-1, -1000]) + def test_negative_payload_size_threshold_raises(self, threshold: int): + """A negative payload_size_threshold raises ValueError immediately + when constructing ExternalStorage.""" + driver = InMemoryTestDriver() + + with pytest.raises( + ValueError, + match=r"^ExternalStorage\.payload_size_threshold must be greater than or equal to zero\.$", + ): + ExternalStorage( + drivers=[driver], + payload_size_threshold=threshold, + ) + + +class TestBackwardCompat: + """Tests that the retrieval path handles the legacy ``json/external-storage-reference`` + format for in-flight workflows written before the ExternalStorageReference proto.""" + + async def test_legacy_format_single_payload_decode(self): + """A single payload in the legacy reference format is retrieved correctly.""" + driver = InMemoryTestDriver() + + inner_payload = (await DataConverter().encode(["x" * 200]))[0] + stored_key = "payload-0" + driver._storage[stored_key] = inner_payload.SerializeToString() + + legacy_payload = _make_legacy_payload( + driver_name=driver.name(), + claim_data={"key": stored_key}, + size_bytes=inner_payload.ByteSize(), + ) + + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=100, + ) + ) + decoded = await converter.decode([legacy_payload], [str]) + assert decoded[0] == "x" * 200 + assert driver._retrieve_calls == 1 + + async def test_legacy_and_new_format_mixed_batch_decode(self): + """A batch containing legacy-format, new proto-format, and inline payloads + all decode correctly in a single call.""" + driver = InMemoryTestDriver() + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=50, + ) + ) + + new_value = "new-format-value" * 20 + inline_value = "small" + encoded = await converter.encode([new_value, inline_value]) + new_format_payload = encoded[0] + inline_payload = encoded[1] + assert driver._store_calls == 1 + + legacy_value = "legacy-format-value" * 20 + legacy_inner = (await DataConverter().encode([legacy_value]))[0] + stored_key = f"payload-{len(driver._storage)}" + driver._storage[stored_key] = legacy_inner.SerializeToString() + legacy_payload = _make_legacy_payload( + driver_name=driver.name(), + claim_data={"key": stored_key}, + size_bytes=legacy_inner.ByteSize(), + ) + + decoded = await converter.decode( + [legacy_payload, new_format_payload, inline_payload], [str, str, str] + ) + assert decoded[0] == legacy_value + assert decoded[1] == new_value + assert decoded[2] == inline_value + # Both external payloads share the same driver and are batched into one retrieve call. + assert driver._retrieve_calls == 1 + + async def test_new_format_encode_round_trips(self): + """Payloads written with the new ExternalStorageReference format round-trip + correctly and carry the expected proto encoding.""" + driver = InMemoryTestDriver() + converter = DataConverter( + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=50, + ) + ) + + value = "round-trip-value" * 20 + encoded = await converter.encode([value]) + ref_payload = encoded[0] + + assert ref_payload.metadata.get("encoding") == b"json/protobuf" + assert len(ref_payload.external_payloads) > 0 + + ref = JSONProtoPayloadConverter().from_payload( + ref_payload, ExternalStorageReference + ) + assert isinstance(ref, ExternalStorageReference) + assert ref.driver_name == driver.name() + assert "key" in ref.claim_data + + decoded = await converter.decode(encoded, [str]) + assert decoded[0] == value + + +def test_storage_metrics_aggregates_batches() -> None: + metrics = StorageOperationMetrics() + assert metrics.total_duration == timedelta(0) + + metrics.record_batch(2, 1024, 0.0, 10.0, {"s3"}) + metrics.record_batch(3, 2048, 5.0, 15.0, {"gcs"}) + + assert metrics.payload_count == 5 + assert metrics.total_size == 3072 + assert metrics.driver_names == {"gcs", "s3"} + # Concurrent batches: summing their durations would report 20 seconds. + assert metrics.total_duration == timedelta(seconds=15) + + +def test_storage_metrics_duration_sums_disjoint_batches() -> None: + metrics = StorageOperationMetrics() + metrics.record_batch(1, 1, 0.0, 10.0, {"s3"}) + metrics.record_batch(1, 1, 20.0, 30.0, {"s3"}) + assert metrics.total_duration == timedelta(seconds=20) + + +def test_storage_metrics_duration_merges_adjacent_and_nested_batches() -> None: + metrics = StorageOperationMetrics() + metrics.record_batch(1, 1, 0.0, 10.0, {"s3"}) + metrics.record_batch(1, 1, 10.0, 20.0, {"s3"}) + metrics.record_batch(1, 1, 12.0, 18.0, {"s3"}) + assert metrics.total_duration == timedelta(seconds=20) + + +if __name__ == "__main__": + pytest.main([__file__, "-v"]) diff --git a/tests/test_extstore_client.py b/tests/test_extstore_client.py new file mode 100644 index 0000000000..d17563e547 --- /dev/null +++ b/tests/test_extstore_client.py @@ -0,0 +1,393 @@ +"""Client paths encode and decode external storage reference payloads. + +These use a fake workflow service, so they check exactly what the client sends +and how it reads responses without depending on a server. +""" + +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any +from unittest.mock import AsyncMock, Mock + +import pytest + +import temporalio.api.common.v1 +import temporalio.api.enums.v1 +import temporalio.api.failure.v1 +import temporalio.api.history.v1 +import temporalio.api.update.v1 +import temporalio.api.workflowservice.v1 +import temporalio.client +import temporalio.converter +from temporalio.api.common.v1 import Payload +from temporalio.api.sdk.v1.external_storage_pb2 import ExternalStorageReference +from temporalio.client import ( + Client, + Schedule, + ScheduleActionStartWorkflow, + ScheduleSpec, + WorkflowFailureError, +) +from temporalio.common import HeaderCodecBehavior +from temporalio.converter import ( + DataConverter, + ExternalStorage, + JSONProtoPayloadConverter, + StorageDriverStoreContext, +) +from temporalio.exceptions import ApplicationError +from temporalio.service import ServiceClient +from tests.test_extstore import InMemoryTestDriver, RecordingPayloadCodec + +pytestmark = pytest.mark.usefixtures("encode_storage_references") + +# Larger than the storage threshold below, so it is always stored externally. +LARGE = "x" * 200 +CODEC_ENCODING = b"binary/test-encoded" + + +class _FakeWorkflowService: + """Records each request and returns the configured response.""" + + def __init__(self, responses: Mapping[str, Any]) -> None: + self.requests: dict[str, Any] = {} + for name, response in responses.items(): + setattr(self, name, self._recorder(name, response)) + + def _recorder(self, name: str, response: Any) -> AsyncMock: + async def record(req: Any, **_kwargs: Any) -> Any: + self.requests[name] = req + return response + + return AsyncMock(side_effect=record) + + +def _data_converter() -> DataConverter: + return DataConverter( + payload_codec=RecordingPayloadCodec(CODEC_ENCODING.decode()), + external_storage=ExternalStorage( + drivers=[InMemoryTestDriver()], payload_size_threshold=50 + ), + ) + + +def _client( + service: _FakeWorkflowService, + data_converter: DataConverter, + **kwargs: Any, +) -> Client: + service_client = Mock(spec=ServiceClient) + service_client.workflow_service = service + service_client.config = Mock(identity="test-identity") + return Client( + service_client=service_client, + namespace="test-namespace", + data_converter=data_converter, + **kwargs, + ) + + +async def _assert_encoded_reference( + data_converter: DataConverter, payload: Payload +) -> None: + assert payload.metadata["encoding"] == CODEC_ENCODING + assert payload.metadata["__temporal_external_storage_reference"] == b"true" + assert payload.external_payloads + [reference] = await data_converter._decode_reference_payload_sequence([payload]) + assert isinstance( + JSONProtoPayloadConverter().from_payload(reference, ExternalStorageReference), + ExternalStorageReference, + ) + + +async def _encoded_reference(data_converter: DataConverter, value: Any) -> Payload: + [payload] = await data_converter.encode([value]) + await _assert_encoded_reference(data_converter, payload) + return payload + + +def _history_response( + event: temporalio.api.history.v1.HistoryEvent, +) -> temporalio.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse: + return temporalio.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse( + history=temporalio.api.history.v1.History(events=[event]) + ) + + +async def test_start_workflow_encodes_input_and_memo_references() -> None: + service = _FakeWorkflowService( + { + "start_workflow_execution": temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse( + run_id="run" + ) + } + ) + client = _client(service, _data_converter()) + + await client.start_workflow( + "Workflow", LARGE, id="wf", task_queue="tq", memo={"key": LARGE} + ) + + req = service.requests["start_workflow_execution"] + await _assert_encoded_reference(client.data_converter, req.input.payloads[0]) + await _assert_encoded_reference(client.data_converter, req.memo.fields["key"]) + + +async def test_signal_encodes_input_reference() -> None: + service = _FakeWorkflowService( + { + "signal_workflow_execution": temporalio.api.workflowservice.v1.SignalWorkflowExecutionResponse() + } + ) + client = _client(service, _data_converter()) + + await client.get_workflow_handle("wf").signal("signal", LARGE) + + await _assert_encoded_reference( + client.data_converter, + service.requests["signal_workflow_execution"].input.payloads[0], + ) + + +async def test_signal_with_start_encodes_input_references() -> None: + service = _FakeWorkflowService( + { + "signal_with_start_workflow_execution": temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse( + run_id="run" + ) + } + ) + client = _client(service, _data_converter()) + + await client.start_workflow( + "Workflow", + LARGE, + id="wf", + task_queue="tq", + start_signal="signal", + start_signal_args=[LARGE], + ) + + req = service.requests["signal_with_start_workflow_execution"] + await _assert_encoded_reference(client.data_converter, req.input.payloads[0]) + await _assert_encoded_reference(client.data_converter, req.signal_input.payloads[0]) + + +async def test_update_encodes_args_and_decodes_result_references() -> None: + data_converter = _data_converter() + result = await _encoded_reference(data_converter, "update-result" * 20) + service = _FakeWorkflowService( + { + "update_workflow_execution": temporalio.api.workflowservice.v1.UpdateWorkflowExecutionResponse( + stage=temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED, + outcome=temporalio.api.update.v1.Outcome( + success=temporalio.api.common.v1.Payloads(payloads=[result]) + ), + ) + } + ) + client = _client(service, data_converter) + + value = await client.get_workflow_handle("wf").execute_update( + "update", LARGE, result_type=str + ) + + assert value == "update-result" * 20 + req = service.requests["update_workflow_execution"] + await _assert_encoded_reference( + client.data_converter, req.request.input.args.payloads[0] + ) + + +async def test_query_encodes_args_and_decodes_result_references() -> None: + data_converter = _data_converter() + result = await _encoded_reference(data_converter, "query-result" * 20) + service = _FakeWorkflowService( + { + "query_workflow": temporalio.api.workflowservice.v1.QueryWorkflowResponse( + query_result=temporalio.api.common.v1.Payloads(payloads=[result]) + ) + } + ) + client = _client(service, data_converter) + + value = await client.get_workflow_handle("wf").query( + "query", LARGE, result_type=str + ) + + assert value == "query-result" * 20 + await _assert_encoded_reference( + client.data_converter, + service.requests["query_workflow"].query.query_args.payloads[0], + ) + + +async def test_create_schedule_encodes_action_input_reference() -> None: + service = _FakeWorkflowService( + {"create_schedule": temporalio.api.workflowservice.v1.CreateScheduleResponse()} + ) + client = _client(service, _data_converter()) + + await client.create_schedule( + "schedule", + Schedule( + action=ScheduleActionStartWorkflow( + "Workflow", LARGE, id="wf", task_queue="tq" + ), + spec=ScheduleSpec(), + ), + ) + + req = service.requests["create_schedule"] + await _assert_encoded_reference( + client.data_converter, req.schedule.action.start_workflow.input.payloads[0] + ) + + +async def test_create_schedule_stores_header_with_client_namespace() -> None: + service = _FakeWorkflowService( + {"create_schedule": temporalio.api.workflowservice.v1.CreateScheduleResponse()} + ) + driver = InMemoryTestDriver() + data_converter = DataConverter( + payload_codec=RecordingPayloadCodec(CODEC_ENCODING.decode()), + external_storage=ExternalStorage(drivers=[driver], payload_size_threshold=50), + ) + client = _client( + service, data_converter, header_codec_behavior=HeaderCodecBehavior.CODEC + ) + action = ScheduleActionStartWorkflow("Workflow", id="wf", task_queue="tq") + [header] = temporalio.converter.default().payload_converter.to_payloads([LARGE]) + action.headers = {"large": header} + + await client.create_schedule( + "schedule", Schedule(action=action, spec=ScheduleSpec()) + ) + + req = service.requests["create_schedule"] + await _assert_encoded_reference( + client.data_converter, + req.schedule.action.start_workflow.header.fields["large"], + ) + assert driver._store_contexts == [ + StorageDriverStoreContext(namespace="test-namespace") + ] + + +async def test_async_activity_completion_encodes_references() -> None: + service = _FakeWorkflowService( + { + "respond_activity_task_completed_by_id": temporalio.api.workflowservice.v1.RespondActivityTaskCompletedByIdResponse(), + "respond_activity_task_failed_by_id": temporalio.api.workflowservice.v1.RespondActivityTaskFailedByIdResponse(), + "record_activity_task_heartbeat_by_id": temporalio.api.workflowservice.v1.RecordActivityTaskHeartbeatByIdResponse(), + } + ) + client = _client(service, _data_converter()) + handle = client.get_async_activity_handle( + workflow_id="wf", run_id=None, activity_id="activity" + ) + + await handle.heartbeat(LARGE) + await handle.complete(LARGE) + await handle.fail(ApplicationError("failed", LARGE)) + + await _assert_encoded_reference( + client.data_converter, + service.requests["record_activity_task_heartbeat_by_id"].details.payloads[0], + ) + await _assert_encoded_reference( + client.data_converter, + service.requests["respond_activity_task_completed_by_id"].result.payloads[0], + ) + failure = service.requests["respond_activity_task_failed_by_id"].failure + await _assert_encoded_reference( + client.data_converter, failure.application_failure_info.details.payloads[0] + ) + + +class _LargeHeaderInterceptor(temporalio.client.Interceptor): + def intercept_client( + self, next: temporalio.client.OutboundInterceptor + ) -> temporalio.client.OutboundInterceptor: + return _LargeHeaderOutbound(next) + + +class _LargeHeaderOutbound(temporalio.client.OutboundInterceptor): + async def start_workflow( + self, input: temporalio.client.StartWorkflowInput + ) -> temporalio.client.WorkflowHandle[Any, Any]: + [header] = temporalio.converter.default().payload_converter.to_payloads([LARGE]) + input.headers = {**input.headers, "large": header} + return await super().start_workflow(input) + + +async def test_start_workflow_encodes_header_reference_when_headers_use_codec() -> None: + service = _FakeWorkflowService( + { + "start_workflow_execution": temporalio.api.workflowservice.v1.StartWorkflowExecutionResponse( + run_id="run" + ) + } + ) + client = _client( + service, + _data_converter(), + interceptors=[_LargeHeaderInterceptor()], + header_codec_behavior=HeaderCodecBehavior.CODEC, + ) + + await client.start_workflow("Workflow", id="wf", task_queue="tq") + + req = service.requests["start_workflow_execution"] + await _assert_encoded_reference(client.data_converter, req.header.fields["large"]) + + +async def test_workflow_result_decodes_reference() -> None: + data_converter = _data_converter() + result = await _encoded_reference(data_converter, "workflow-result" * 20) + service = _FakeWorkflowService( + { + "get_workflow_execution_history": _history_response( + temporalio.api.history.v1.HistoryEvent( + event_type=temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED, + workflow_execution_completed_event_attributes=temporalio.api.history.v1.WorkflowExecutionCompletedEventAttributes( + result=temporalio.api.common.v1.Payloads(payloads=[result]) + ), + ) + ) + } + ) + client = _client(service, data_converter) + + value = await client.get_workflow_handle("wf", result_type=str).result() + + assert value == "workflow-result" * 20 + + +async def test_workflow_failure_decodes_detail_reference() -> None: + data_converter = _data_converter() + failure = temporalio.api.failure.v1.Failure() + await data_converter.encode_failure(ApplicationError("failed", LARGE), failure) + await _assert_encoded_reference( + data_converter, failure.application_failure_info.details.payloads[0] + ) + service = _FakeWorkflowService( + { + "get_workflow_execution_history": _history_response( + temporalio.api.history.v1.HistoryEvent( + event_type=temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_FAILED, + workflow_execution_failed_event_attributes=temporalio.api.history.v1.WorkflowExecutionFailedEventAttributes( + failure=failure + ), + ) + ) + } + ) + client = _client(service, data_converter) + + with pytest.raises(WorkflowFailureError) as err: + await client.get_workflow_handle("wf").result() + + assert isinstance(err.value.cause, ApplicationError) + assert err.value.cause.details == (LARGE,) diff --git a/tests/test_gen_docs.py b/tests/test_gen_docs.py new file mode 100644 index 0000000000..b2b2c210b6 --- /dev/null +++ b/tests/test_gen_docs.py @@ -0,0 +1,71 @@ +from pathlib import Path + +from pydoctor import model # type: ignore[reportMissingTypeStubs] +from pydoctor.options import Options # type: ignore[reportMissingTypeStubs] + +from scripts.gen_docs import ProtobufSystem + + +def test_protobuf_docs_expose_names_without_class_details(tmp_path: Path) -> None: + package = tmp_path / "example" + package.mkdir() + (package / "__init__.py").write_text( + 'from .message_pb2 import Payload, Status\n__all__ = ["Payload", "Status"]\n' + ) + (package / "message_pb2.py").write_text( + 'raise RuntimeError("Documentation must not import generated modules")\n' + ) + stub = package / "message_pb2.pyi" + stub.write_text( + "class Payload:\n" + ' """An upstream proto comment with `non-Python link text`."""\n' + " data: bytes\n" + "class _Status:\n" + " ValueType = int\n" + "class Status(_Status):\n" + " ACTIVE: int\n" + ) + options = Options.from_args( + [ + "--docformat=google", + "--html-viewsource-base=https://example.com/source", + f"--project-base-dir={tmp_path}", + ] + ) + system = ProtobufSystem(options) + builder = system.systemBuilder(system) + builder.addModule(package) + builder.buildModules() + + for name, lineno in (("Payload", 1), ("Status", 6)): + attribute = system.find_object(f"example.{name}") + assert isinstance(attribute, model.Attribute) + assert attribute.kind == model.DocumentableKind.VARIABLE + assert attribute.source_path == stub + assert attribute.linenumber == lineno + assert attribute.source_href == ( + f"https://example.com/source/example/message_pb2.pyi#L{lineno}" + ) + assert attribute.docstring is None + assert not attribute.contents + assert attribute.isVisible + module = system.allobjects["example.message_pb2"] + assert isinstance(module, model.Module) + assert module.source_path == package / "message_pb2.py" + assert module.docformat is None + assert module.source_href == "https://example.com/source/example/message_pb2.py" + assert system.objForFullName("example.message_pb2._Status") is None + assert system.violations == 0 + + +def test_docs_keep_normal_python_sources(tmp_path: Path) -> None: + source = tmp_path / "module.py" + source.write_text("class Actual:\n pass\n") + source.with_suffix(".pyi").write_text("class StubOnly:\n pass\n") + system = ProtobufSystem() + builder = system.systemBuilder(system) + builder.addModule(source) + builder.buildModules() + + assert system.find_object("module.Actual") is not None + assert system.objForFullName("module.StubOnly") is None diff --git a/tests/test_plugins.py b/tests/test_plugins.py index ea2cf3a1a9..ceba14c3b2 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -1,14 +1,13 @@ import dataclasses import uuid import warnings -from collections import Counter from collections.abc import AsyncIterator, Awaitable, Callable from contextlib import AbstractAsyncContextManager, asynccontextmanager -from typing import Optional, cast +from typing import cast import pytest - import temporalio.bridge.temporal_sdk_bridge + import temporalio.client import temporalio.converter import temporalio.worker @@ -61,8 +60,9 @@ async def connect_service_client( return await next(config) +@pytest.mark.requires_local_server async def test_client_plugin(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Client connect is only designed for local") plugin = MyClientPlugin() @@ -182,7 +182,7 @@ async def test_worker_duplicated_plugin(client: Client) -> None: client = Client(**new_config) with warnings.catch_warnings(record=True) as warning_list: - worker = Worker( + Worker( client, task_queue="queue" + str(uuid.uuid4()), activities=[never_run_activity], @@ -194,7 +194,7 @@ async def test_worker_duplicated_plugin(client: Client) -> None: async def test_worker_sandbox_restrictions(client: Client) -> None: - with warnings.catch_warnings(record=True) as warning_list: + with warnings.catch_warnings(record=True): worker = Worker( client, task_queue="queue" + str(uuid.uuid4()), @@ -388,3 +388,231 @@ async def test_medium_plugin(client: Client) -> None: ) task_queue = worker.config(active_config=True).get("task_queue") assert task_queue is not None and task_queue.startswith("override") + + +class CombinedClientWorkerInterceptor( + temporalio.client.Interceptor, temporalio.worker.Interceptor +): + """Test interceptor that can be used as both client and worker interceptor with execution counting.""" + + def __init__(self): + super().__init__() + self.client_intercepted = False + self.worker_intercepted = False + self.call_count = {"execute_workflow": 0} + + def intercept_client( + self, next: temporalio.client.OutboundInterceptor + ) -> temporalio.client.OutboundInterceptor: + self.client_intercepted = True + return super().intercept_client(next) + + def intercept_activity( + self, next: temporalio.worker.ActivityInboundInterceptor + ) -> temporalio.worker.ActivityInboundInterceptor: + self.worker_intercepted = True + return super().intercept_activity(next) + + def workflow_interceptor_class( + self, input: temporalio.worker.WorkflowInterceptorClassInput + ) -> type[temporalio.worker.WorkflowInboundInterceptor] | None: + # This method gets called when the worker is configured with workflows + # Mark that worker interceptor was used + self.worker_intercepted = True + + # Return counting interceptor class + call_count = self.call_count + + class CountingWorkflowInterceptor(temporalio.worker.WorkflowInboundInterceptor): + async def execute_workflow( + self, input: temporalio.worker.ExecuteWorkflowInput + ): + call_count["execute_workflow"] += 1 + return await super().execute_workflow(input) + + return CountingWorkflowInterceptor + + +async def test_simple_plugin_worker_interceptor_only_used_on_worker( + client: Client, +) -> None: + """Test that when a combined client/worker interceptor is provided by SimplePlugin + to interceptors, and the plugin is only used on a worker (not on the client + used to create that worker), the worker interceptor functionality is still provided.""" + + interceptor = CombinedClientWorkerInterceptor() + + # Create SimplePlugin that provides the combined interceptor + plugin = SimplePlugin( + "TestCombinedPlugin", + interceptors=[interceptor], + ) + + # Create worker with the plugin (but don't add plugin to client) + worker = Worker( + client, + task_queue="queue" + str(uuid.uuid4()), + activities=[never_run_activity], + workflows=[ + HelloWorkflow + ], # Add workflows to trigger workflow_interceptor_class + plugins=[plugin], + ) + + # Worker creation triggers plugin configuration + assert worker is not None + + # The interceptor should NOT have been used for client interception + # since the plugin was not added to the client + assert not interceptor.client_intercepted, ( + "Client interceptor should not have been used" + ) + + # The interceptor SHOULD have been used for worker interception + # even though it was specified in interceptors + assert interceptor.worker_intercepted, "Worker interceptor should have been used" + + +async def test_simple_plugin_interceptor_duplication_when_used_on_client_and_worker( + client: Client, +) -> None: + """Test that when a combined client/worker interceptor is provided by SimplePlugin + to interceptors, and the plugin is used on both client and worker, + the interceptor is not duplicated in the worker.""" + + interceptor = CombinedClientWorkerInterceptor() + + # Create SimplePlugin that provides the combined interceptor + plugin = SimplePlugin( + "TestCombinedPlugin", + interceptors=[interceptor], + ) + + # Add plugin to client first + config = client.config() + config["plugins"] = [plugin] + new_client = Client(**config) + + # Verify client interceptor was used + assert interceptor.client_intercepted, "Client interceptor should have been used" + + # Reset the worker intercepted flag to test worker behavior + interceptor.worker_intercepted = False + + # Create worker with the same plugin-enabled client + worker = Worker( + new_client, + task_queue="queue" + str(uuid.uuid4()), + activities=[never_run_activity], + workflows=[HelloWorkflow], + ) + + # The worker interceptor functionality should still work + # (regardless of whether it comes from client propagation or worker config) + assert interceptor.worker_intercepted, "Worker interceptor should have been used" + + # Test execution-level duplication by running a workflow + async with new_worker( + new_client, + HelloWorkflow, + max_cached_workflows=0, + ) as worker: + # Start and complete a workflow + handle = await new_client.start_workflow( + HelloWorkflow.run, + "test", + id=f"counting-workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + result = await handle.result() + assert result == "Hello, test!" + + # The workflow interceptor should only be called ONCE, not twice + assert interceptor.call_count["execute_workflow"] == 1, ( + f"Expected execute_workflow to be called once, but was called {interceptor.call_count['execute_workflow']} times. This indicates interceptor duplication in execution." + ) + + +async def test_simple_plugin_no_duplication_when_interceptor_in_both_client_and_worker_params( + client: Client, +) -> None: + """Test that when the same interceptor is provided to the unified interceptors + parameter in a SimplePlugin, it doesn't get duplicated.""" + + interceptor = CombinedClientWorkerInterceptor() + + # Create SimplePlugin that provides the interceptor once to the unified parameter + plugin = SimplePlugin( + "TestCombinedPlugin", + interceptors=[interceptor], # Single unified parameter + ) + + # Create worker with plugin (not on client) + worker = Worker( + client, + task_queue="queue" + str(uuid.uuid4()), + activities=[never_run_activity], + workflows=[HelloWorkflow], + plugins=[plugin], + ) + + # The worker interceptor functionality should work + assert interceptor.worker_intercepted, "Worker interceptor should have been used" + + # Test execution-level duplication by running a workflow + async with worker: + # Start and complete a workflow + handle = await client.start_workflow( + HelloWorkflow.run, + "test", + id=f"counting-workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + result = await handle.result() + assert result == "Hello, test!" + + # The workflow interceptor should only be called ONCE, not twice + assert interceptor.call_count["execute_workflow"] == 1, ( + f"Expected execute_workflow to be called once, but was called {interceptor.call_count['execute_workflow']} times. This indicates interceptor duplication in execution." + ) + + +async def test_simple_plugin_no_duplication_in_interceptor_chain( + client: Client, +) -> None: + """Test that interceptors don't get duplicated in the actual interceptor chain execution. + This catches the specific OpenTelemetry issue where the same interceptor method gets called twice.""" + + interceptor = CombinedClientWorkerInterceptor() + + # Create SimplePlugin that provides the combined interceptor + plugin = SimplePlugin( + "CountingPlugin", + interceptors=[interceptor], + ) + + # Add plugin to client (like OpenTelemetryPlugin does) + config = client.config() + config["plugins"] = [plugin] + new_client = Client(**config) + + # Create worker with the plugin-enabled client (plugin propagates from client) + async with new_worker( + new_client, + HelloWorkflow, + max_cached_workflows=0, + ) as worker: + # Start and complete a workflow + handle = await new_client.start_workflow( + HelloWorkflow.run, + "test", + id=f"counting-workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + result = await handle.result() + assert result == "Hello, test!" + + # The workflow interceptor should only be called ONCE, not twice + assert interceptor.call_count["execute_workflow"] == 1, ( + f"Expected execute_workflow to be called once, but was called {interceptor.call_count['execute_workflow']} times. This indicates interceptor duplication in the chain." + ) diff --git a/tests/test_prepare_release.py b/tests/test_prepare_release.py new file mode 100644 index 0000000000..6d65c68c0f --- /dev/null +++ b/tests/test_prepare_release.py @@ -0,0 +1,495 @@ +from __future__ import annotations + +import argparse +import datetime +import importlib.util +import pathlib +import subprocess +import sys +from types import ModuleType + +import pytest + +import scripts.changelog +import scripts.prepare_release +from scripts.prepare_release import ( + commit_release_changes, + create_release_branch, + create_release_pr, + ensure_clean_worktree, + ensure_only_release_changes, + prepare_release_files, + push_release_branch, + replace_project_version, + replace_service_version, +) + + +def _release_verify_module() -> ModuleType: + path = pathlib.Path(__file__).parents[1] / ".github/scripts/release_verify.py" + spec = importlib.util.spec_from_file_location("release_verify", path) + assert spec and spec.loader + module = importlib.util.module_from_spec(spec) + sys.modules[spec.name] = module + spec.loader.exec_module(module) + return module + + +def test_published_notes_use_shared_file_output( + monkeypatch: pytest.MonkeyPatch, tmp_path: pathlib.Path +) -> None: + release_verify = _release_verify_module() + + def run_tool(_root: pathlib.Path, args: list[str]) -> str: + assert args == [ + "release-notes", + "--version", + "1.35.0", + "--changelog", + "CHANGELOG.md", + "--submodule", + "core", + "--output", + str(output), + ] + output.write_text("Shared release notes.\n") + return "" + + monkeypatch.setattr(release_verify, "run_tool", run_tool) + output = tmp_path / "notes.md" + release_verify.changelog_notes( + argparse.Namespace( + version="1.35.0", + changelog="CHANGELOG.md", + sdk_core_path="core", + output=str(output), + ) + ) + assert output.read_text() == "Shared release notes.\n" + + +def test_shared_notes_failure_preserves_existing_output( + monkeypatch: pytest.MonkeyPatch, tmp_path: pathlib.Path +) -> None: + release_verify = _release_verify_module() + + def run_tool(_root: pathlib.Path, _args: list[str]) -> str: + raise RuntimeError("Missing release section") + + monkeypatch.setattr(release_verify, "run_tool", run_tool) + output = tmp_path / "notes.md" + output.write_text("Existing notes.\n") + with pytest.raises(RuntimeError, match="Missing release section"): + release_verify.changelog_notes( + argparse.Namespace( + version="1.35.0", + changelog="CHANGELOG.md", + sdk_core_path="core", + output=str(output), + ) + ) + assert output.read_text() == "Existing notes.\n" + + +def test_shared_tool_preserves_failure_diagnostics( + monkeypatch: pytest.MonkeyPatch, tmp_path: pathlib.Path +) -> None: + (tmp_path / "temporalio/bridge/sdk-core/.git").mkdir(parents=True) + + def fail(*_args: object, **_kwargs: object) -> None: + raise subprocess.CalledProcessError(1, ["cargo"], stderr="invalid fragment") + + monkeypatch.setattr(subprocess, "run", fail) + with pytest.raises(RuntimeError, match="invalid fragment"): + scripts.changelog.run_tool(tmp_path, ["check"]) + + +@pytest.fixture +def release_repo(tmp_path: pathlib.Path) -> pathlib.Path: + for name, text in { + "CHANGELOG.md": "# Changelog\n\n## [1.34.0] - 2026-09-30\nOld notes.\n", + "pyproject.toml": 'version = "1.34.0"\n', + "temporalio/service.py": '__version__ = "1.34.0"\n', + "uv.lock": "lock\n", + "changelog/fixed/giggling-teapot.md": "A fix.\n", + }.items(): + path = tmp_path / name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(text) + subprocess.run(["git", "init", "-q"], cwd=tmp_path, check=True) + subprocess.run(["git", "add", "."], cwd=tmp_path, check=True) + subprocess.run( + [ + "git", + "-c", + "user.name=Test", + "-c", + "user.email=test@example.com", + "commit", + "-qm", + "Initial", + ], + cwd=tmp_path, + check=True, + ) + return tmp_path + + +def mock_preparation(monkeypatch: pytest.MonkeyPatch) -> str: + changelog = "# Changelog\n\n## [1.35.0] - 2026-10-02\n\n### Fixed\n\n- A fix.\n" + + def prepare(repo: pathlib.Path, version: str, _date: datetime.date) -> None: + assert version in (repo / "pyproject.toml").read_text() + assert version in (repo / "temporalio/service.py").read_text() + (repo / "CHANGELOG.md").write_text(changelog) + (repo / "changelog/fixed/giggling-teapot.md").unlink() + + monkeypatch.setattr(scripts.prepare_release, "prepare_changelog", prepare) + return changelog + + +def test_release_commits_consumed_fragments( + monkeypatch: pytest.MonkeyPatch, release_repo: pathlib.Path +) -> None: + changelog = mock_preparation(monkeypatch) + consumed = prepare_release_files( + release_repo, "1.35.0", datetime.date(2026, 10, 2), skip_lock=True + ) + assert consumed == ("changelog/fixed/giggling-teapot.md",) + assert not (release_repo / consumed[0]).exists() + ensure_only_release_changes(release_repo, consumed) + subprocess.run(["git", "config", "user.name", "Test"], cwd=release_repo, check=True) + subprocess.run( + ["git", "config", "user.email", "test@example.com"], + cwd=release_repo, + check=True, + ) + commit_release_changes(release_repo, "1.35.0", consumed) + deleted = subprocess.check_output( + ["git", "diff", "--name-only", "--diff-filter=D", "HEAD~", "HEAD"], + cwd=release_repo, + text=True, + ).splitlines() + assert deleted == list(consumed) + assert (release_repo / "CHANGELOG.md").read_text() == changelog + assert "1.35.0" in (release_repo / "temporalio/service.py").read_text() + + +def test_lock_failure_retains_fragments( + monkeypatch: pytest.MonkeyPatch, release_repo: pathlib.Path +) -> None: + mock_preparation(monkeypatch) + + def fail(*_args: object, **_kwargs: object) -> None: + raise subprocess.CalledProcessError(1, ["uv", "lock"]) + + monkeypatch.setattr(subprocess, "run", fail) + with pytest.raises(subprocess.CalledProcessError): + prepare_release_files(release_repo, "1.35.0", datetime.date(2026, 10, 2)) + assert (release_repo / "changelog/fixed/giggling-teapot.md").exists() + + +def test_invalid_version_files_do_not_write_notes_or_consume_fragments( + monkeypatch: pytest.MonkeyPatch, release_repo: pathlib.Path +) -> None: + mock_preparation(monkeypatch) + original = (release_repo / "CHANGELOG.md").read_text() + (release_repo / "temporalio/service.py").write_text("missing version\n") + with pytest.raises(RuntimeError, match="service version"): + prepare_release_files( + release_repo, "1.35.0", datetime.date(2026, 10, 2), skip_lock=True + ) + assert (release_repo / "CHANGELOG.md").read_text() == original + assert (release_repo / "changelog/fixed/giggling-teapot.md").exists() + + +def test_unexpected_changes_rejected_before_consuming( + monkeypatch: pytest.MonkeyPatch, release_repo: pathlib.Path +) -> None: + mock_preparation(monkeypatch) + (release_repo / "changelog/fixed/late-llama.md").write_text("Late change.\n") + with pytest.raises(RuntimeError, match="unexpected files"): + prepare_release_files( + release_repo, "1.35.0", datetime.date(2026, 10, 2), skip_lock=True + ) + assert (release_repo / "changelog/fixed/giggling-teapot.md").exists() + assert (release_repo / "changelog/fixed/late-llama.md").exists() + + +def test_lock_update_precedes_changelog_preparation( + monkeypatch: pytest.MonkeyPatch, release_repo: pathlib.Path +) -> None: + calls: list[str] = [] + + def run(command: list[str], **_kwargs: object) -> subprocess.CompletedProcess[str]: + if command == ["uv", "lock"]: + calls.append("lock") + return subprocess.CompletedProcess(command, 0, "") + + def prepare(*_args: object) -> None: + assert calls == ["lock"] + calls.append("changelog") + + monkeypatch.setattr(subprocess, "run", run) + monkeypatch.setattr(scripts.prepare_release, "prepare_changelog", prepare) + prepare_release_files(release_repo, "1.35.0", datetime.date(2026, 10, 2)) + assert calls == ["lock", "changelog"] + + +def test_changelog_rejection_retains_notes_and_version_updates( + monkeypatch: pytest.MonkeyPatch, release_repo: pathlib.Path +) -> None: + original = (release_repo / "CHANGELOG.md").read_text() + + def reject(*_args: object) -> None: + raise RuntimeError("invalid fragment") + + monkeypatch.setattr(scripts.prepare_release, "prepare_changelog", reject) + with pytest.raises(RuntimeError, match="invalid fragment"): + prepare_release_files( + release_repo, "1.35.0", datetime.date(2026, 10, 2), skip_lock=True + ) + assert (release_repo / "CHANGELOG.md").read_text() == original + assert (release_repo / "changelog/fixed/giggling-teapot.md").exists() + assert "1.35.0" in (release_repo / "pyproject.toml").read_text() + + +def test_replace_versions() -> None: + assert 'version = "1.30.0"' in replace_project_version( + 'version = "1.29.0"\n', "1.30.0" + ) + assert '__version__ = "1.30.0"' in replace_service_version( + '__version__ = "1.29.0"\n', "1.30.0" + ) + + +def test_release_with_core_update_commits_generated_files( + monkeypatch: pytest.MonkeyPatch, release_repo: pathlib.Path +) -> None: + mock_preparation(monkeypatch) + calls: list[str] = [] + core_fragment = release_repo / "changelog/fixed/core-llama.md" + generated = release_repo / "temporalio/api/generated.py" + manifest = release_repo / "temporalio/bridge/Cargo.toml" + + def branch(_root: pathlib.Path, _version: str) -> str: + calls.append("branch") + return "" + + def update(root: pathlib.Path, args: list[str]) -> None: + assert root == release_repo + assert args == ["--latest-tag"] + assert calls == ["branch"] + calls.append("core") + generated.parent.mkdir(parents=True) + generated.write_text("# Generated\n") + manifest.parent.mkdir(parents=True) + manifest.write_text("# Updated manifest\n") + core_fragment.write_text("Core: A fix.\n") + + def prepare(root: pathlib.Path, _version: str, _date: datetime.date) -> None: + assert calls == ["branch", "core"] + calls.append("release") + (root / "CHANGELOG.md").write_text("Release notes including Core.\n") + (root / "changelog/fixed/giggling-teapot.md").unlink() + core_fragment.unlink() + + monkeypatch.setattr( + scripts.prepare_release, + "__file__", + str(release_repo / "scripts/prepare_release.py"), + ) + monkeypatch.setattr(scripts.prepare_release, "create_release_branch", branch) + monkeypatch.setattr(scripts.prepare_release, "update_core", update) + monkeypatch.setattr(scripts.prepare_release, "prepare_changelog", prepare) + monkeypatch.setattr( + scripts.prepare_release, + "push_release_branch", + lambda *_args: calls.append("push"), + ) + monkeypatch.setattr( + scripts.prepare_release, "create_release_pr", lambda *_args: calls.append("pr") + ) + subprocess.run(["git", "config", "user.name", "Test"], cwd=release_repo, check=True) + subprocess.run( + ["git", "config", "user.email", "test@example.com"], + cwd=release_repo, + check=True, + ) + scripts.prepare_release.main(["1.35.0", "--update-core", "--skip-lock"]) + assert calls == ["branch", "core", "release", "push", "pr"] + ensure_clean_worktree(release_repo) + assert generated.exists() + assert manifest.exists() + assert not core_fragment.exists() + assert ( + subprocess.check_output( + ["git", "show", "HEAD:temporalio/api/generated.py"], + cwd=release_repo, + text=True, + ) + == "# Generated\n" + ) + + +def test_core_update_failure_stops_release( + monkeypatch: pytest.MonkeyPatch, release_repo: pathlib.Path +) -> None: + monkeypatch.setattr( + scripts.prepare_release, + "__file__", + str(release_repo / "scripts/prepare_release.py"), + ) + monkeypatch.setattr( + scripts.prepare_release, "create_release_branch", lambda *_args: None + ) + + def fail(*_args: object) -> None: + raise RuntimeError("proto generation failed") + + monkeypatch.setattr(scripts.prepare_release, "update_core", fail) + with pytest.raises(RuntimeError, match="proto generation failed"): + scripts.prepare_release.main(["1.35.0", "--update-core", "--skip-lock"]) + ensure_clean_worktree(release_repo) + assert "1.34.0" in (release_repo / "pyproject.toml").read_text() + assert (release_repo / "changelog/fixed/giggling-teapot.md").exists() + + +@pytest.fixture +def release_remote( + release_repo: pathlib.Path, tmp_path_factory: pytest.TempPathFactory +) -> pathlib.Path: + remote = tmp_path_factory.mktemp("release-remote") / "remote.git" + subprocess.run(["git", "init", "--bare", "-q", str(remote)], check=True) + for command in [ + ["git", "config", "user.name", "Test"], + ["git", "config", "user.email", "test@example.com"], + ["git", "branch", "-M", "main"], + ["git", "remote", "add", "origin", str(remote)], + ["git", "push", "-u", "origin", "main"], + ]: + subprocess.run(command, cwd=release_repo, check=True) + return remote + + +@pytest.mark.parametrize("local_exists", [False, True]) +@pytest.mark.parametrize("remote_exists", [False, True]) +def test_upsert_release_branch( + release_repo: pathlib.Path, + release_remote: pathlib.Path, + local_exists: bool, + remote_exists: bool, +) -> None: + branch = "chore/release-1.35.0" + subprocess.run(["git", "switch", "-c", branch], cwd=release_repo, check=True) + subprocess.run( + ["git", "commit", "--allow-empty", "-m", "Previous release"], + cwd=release_repo, + check=True, + ) + previous = subprocess.check_output( + ["git", "rev-parse", "HEAD"], cwd=release_repo, text=True + ).strip() + if remote_exists: + subprocess.run(["git", "push", "origin", branch], cwd=release_repo, check=True) + subprocess.run(["git", "switch", "main"], cwd=release_repo, check=True) + if not local_exists: + subprocess.run(["git", "branch", "-D", branch], cwd=release_repo, check=True) + + expected = create_release_branch(release_repo, "1.35.0") + assert expected == (previous if remote_exists else "") + assert subprocess.check_output( + ["git", "rev-parse", "HEAD"], cwd=release_repo + ) == subprocess.check_output(["git", "rev-parse", "main"], cwd=release_repo) + subprocess.run( + ["git", "commit", "--allow-empty", "-m", "Regenerated release"], + cwd=release_repo, + check=True, + ) + push_release_branch(release_repo, "1.35.0", expected) + assert subprocess.check_output( + ["git", "rev-parse", f"refs/heads/{branch}"], cwd=release_remote + ) == subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=release_repo) + + +@pytest.mark.parametrize("remote_exists", [False, True]) +def test_release_push_rejects_concurrent_remote_change( + release_repo: pathlib.Path, release_remote: pathlib.Path, remote_exists: bool +) -> None: + branch = "chore/release-1.35.0" + if remote_exists: + subprocess.run( + ["git", "push", "origin", f"main:refs/heads/{branch}"], + cwd=release_repo, + check=True, + ) + expected = create_release_branch(release_repo, "1.35.0") + subprocess.run( + ["git", "commit", "--allow-empty", "-m", "Concurrent update"], + cwd=release_repo, + check=True, + ) + subprocess.run(["git", "push", "origin", branch], cwd=release_repo, check=True) + concurrent_commit = subprocess.check_output( + ["git", "rev-parse", "HEAD"], cwd=release_repo + ) + create_release_branch(release_repo, "1.35.0") + with pytest.raises(subprocess.CalledProcessError): + push_release_branch(release_repo, "1.35.0", expected) + assert ( + subprocess.check_output( + ["git", "rev-parse", f"refs/heads/{branch}"], cwd=release_remote + ) + == concurrent_commit + ) + + +def test_clean_worktree_rejected(monkeypatch: pytest.MonkeyPatch) -> None: + monkeypatch.setattr( + subprocess, + "run", + lambda *_args, **_kwargs: subprocess.CompletedProcess([], 0, " M file\0"), + ) + with pytest.raises(RuntimeError, match="clean worktree"): + ensure_clean_worktree(pathlib.Path("/repo")) + with pytest.raises(RuntimeError, match="unexpected files"): + ensure_only_release_changes(pathlib.Path("/repo")) + + +@pytest.mark.parametrize( + "existing_url", ["", "https://github.com/example/repo/pull/123\n"] +) +def test_create_release_pr(monkeypatch: pytest.MonkeyPatch, existing_url: str) -> None: + calls: list[list[str]] = [] + + def run(command: list[str], **_kwargs: object) -> subprocess.CompletedProcess[str]: + calls.append(command) + return subprocess.CompletedProcess(command, 0, existing_url) + + monkeypatch.setattr(subprocess, "run", run) + create_release_pr(pathlib.Path("/repo"), "1.30.0") + assert calls[0][:3] == ["gh", "pr", "list"] + assert "chore/release-1.30.0" in calls[0] + if existing_url: + assert len(calls) == 1 + else: + assert calls[1][:3] == ["gh", "pr", "create"] + assert calls[1][-2:] == ["--label", "skip-changelog"] + + +def test_push_release_branch(monkeypatch: pytest.MonkeyPatch) -> None: + calls: list[list[str]] = [] + monkeypatch.setattr( + subprocess, "run", lambda command, **_kwargs: calls.append(command) + ) + push_release_branch(pathlib.Path("/repo"), "1.30.0") + assert calls == [ + [ + "git", + "push", + "--force-with-lease=refs/heads/chore/release-1.30.0:", + "--set-upstream", + "origin", + "chore/release-1.30.0", + ] + ] diff --git a/tests/test_runtime.py b/tests/test_runtime.py index c2829f03df..8705f4de09 100644 --- a/tests/test_runtime.py +++ b/tests/test_runtime.py @@ -1,31 +1,43 @@ +import asyncio +import dataclasses +import gc import logging import logging.handlers +import pickle import queue import re +import subprocess +import sys import uuid from datetime import timedelta -from typing import List, cast +from pathlib import Path +from typing import Any, cast from urllib.request import urlopen import pytest +import temporalio.bridge.metric +import temporalio.bridge.runtime from temporalio import workflow from temporalio.client import Client from temporalio.runtime import ( LogForwardingConfig, LoggingConfig, + LoggingFormat, + OpenTelemetryConfig, PrometheusConfig, Runtime, TelemetryConfig, TelemetryFilter, _RuntimeRef, ) +from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker from tests.helpers import ( + LogHandler, assert_eq_eventually, assert_eventually, find_free_port, - worker_versioning_enabled, ) @@ -36,22 +48,18 @@ async def run(self, name: str) -> str: return f"Hello, {name}!" -async def test_different_runtimes(client: Client): +async def test_different_runtimes(env: WorkflowEnvironment): # Create two workers in separate runtimes and run workflows on them. # Confirm they each have different Prometheus addresses. prom_addr1 = f"127.0.0.1:{find_free_port()}" - client1 = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + client1 = await env.connect_client( runtime=Runtime( telemetry=TelemetryConfig(metrics=PrometheusConfig(bind_address=prom_addr1)) ), ) prom_addr2 = f"127.0.0.1:{find_free_port()}" - client2 = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + client2 = await env.connect_client( runtime=Runtime( telemetry=TelemetryConfig(metrics=PrometheusConfig(bind_address=prom_addr2)) ), @@ -77,12 +85,37 @@ async def run_workflow(client: Client): assert "long_request" in f.read().decode("utf-8") +async def test_runtime_shutdown_after_completed_rpc(env: WorkflowEnvironment): + # Preserve connection credentials, but let the child create its own native runtime. + result = await asyncio.to_thread( + subprocess.run, + [ + sys.executable, + "-X", + "faulthandler", + str(Path(__file__).with_name("bridge") / "runtime_shutdown.py"), + "client", + ], + input=pickle.dumps( + ( + dataclasses.replace(env.client.service_client.config, runtime=None), + env.client.namespace, + ) + ), + capture_output=True, + timeout=30, + ) + assert result.returncode == 0, result.stderr.decode() + assert result.stdout.strip() == b"completed callbacks: 1" + assert result.stderr == b"" + + async def test_runtime_log_forwarding(): # Create logger with record capture log_queue: queue.Queue[logging.LogRecord] = queue.Queue() log_queue_list = cast(list[logging.LogRecord], log_queue.queue) + handler = logging.handlers.QueueHandler(log_queue) logger = logging.getLogger(f"log-{uuid.uuid4()}") - logger.addHandler(logging.handlers.QueueHandler(log_queue)) async def log_queue_len() -> int: return len(log_queue_list) @@ -97,50 +130,89 @@ async def log_queue_len() -> int: ) ) - # Set capture only info logs + with LogHandler.apply(logger, handler): + # Set capture only info logs + logger.setLevel(logging.INFO) + # Write some logs + runtime._core_runtime.write_test_info_log("info1", "extra1") + runtime._core_runtime.write_test_debug_log("debug2", "extra2") + runtime._core_runtime.write_test_info_log("info3", "extra3") + + # Check the expected records + await assert_eq_eventually(2, log_queue_len) + assert log_queue_list[0].levelno == logging.INFO + assert log_queue_list[0].message.startswith( + "[sdk_core::temporal_sdk_bridge::runtime] info1" + ) + assert ( + log_queue_list[0].name + == f"{logger.name}-sdk_core::temporal_sdk_bridge::runtime" + ) + assert log_queue_list[0].created == log_queue_list[0].temporal_log.time # type: ignore + assert log_queue_list[0].temporal_log.fields == {"extra_data": "extra1"} # type: ignore + assert log_queue_list[1].levelno == logging.INFO + assert log_queue_list[1].message.startswith( + "[sdk_core::temporal_sdk_bridge::runtime] info3" + ) + + # Clear logs and enable debug and try again + log_queue_list.clear() + logger.setLevel(logging.DEBUG) + runtime._core_runtime.write_test_info_log("info4", "extra4") + runtime._core_runtime.write_test_debug_log("debug5", "extra5") + runtime._core_runtime.write_test_info_log("info6", "extra6") + await assert_eq_eventually(3, log_queue_len) + assert log_queue_list[0].levelno == logging.INFO + assert log_queue_list[0].message.startswith( + "[sdk_core::temporal_sdk_bridge::runtime] info4" + ) + assert log_queue_list[1].levelno == logging.DEBUG + assert log_queue_list[1].message.startswith( + "[sdk_core::temporal_sdk_bridge::runtime] debug5" + ) + assert log_queue_list[2].levelno == logging.INFO + assert log_queue_list[2].message.startswith( + "[sdk_core::temporal_sdk_bridge::runtime] info6" + ) + + +async def test_runtime_log_forwarding_after_client_dropped(env: WorkflowEnvironment): + log_queue: queue.Queue[logging.LogRecord] = queue.Queue() + log_queue_list = cast(list[logging.LogRecord], log_queue.queue) + handler = logging.handlers.QueueHandler(log_queue) + logger = logging.getLogger(f"log-{uuid.uuid4()}") logger.setLevel(logging.INFO) - # Write some logs - runtime._core_runtime.write_test_info_log("info1", "extra1") - runtime._core_runtime.write_test_debug_log("debug2", "extra2") - runtime._core_runtime.write_test_info_log("info3", "extra3") - - # Check the expected records - await assert_eq_eventually(2, log_queue_len) - assert log_queue_list[0].levelno == logging.INFO - assert log_queue_list[0].message.startswith( - "[sdk_core::temporal_sdk_bridge::runtime] info1" - ) - assert ( - log_queue_list[0].name - == f"{logger.name}-sdk_core::temporal_sdk_bridge::runtime" - ) - assert log_queue_list[0].created == log_queue_list[0].temporal_log.time # type: ignore - assert log_queue_list[0].temporal_log.fields == {"extra_data": "extra1"} # type: ignore - assert log_queue_list[1].levelno == logging.INFO - assert log_queue_list[1].message.startswith( - "[sdk_core::temporal_sdk_bridge::runtime] info3" - ) - # Clear logs and enable debug and try again - log_queue_list.clear() - logger.setLevel(logging.DEBUG) - runtime._core_runtime.write_test_info_log("info4", "extra4") - runtime._core_runtime.write_test_debug_log("debug5", "extra5") - runtime._core_runtime.write_test_info_log("info6", "extra6") - await assert_eq_eventually(3, log_queue_len) - assert log_queue_list[0].levelno == logging.INFO - assert log_queue_list[0].message.startswith( - "[sdk_core::temporal_sdk_bridge::runtime] info4" - ) - assert log_queue_list[1].levelno == logging.DEBUG - assert log_queue_list[1].message.startswith( - "[sdk_core::temporal_sdk_bridge::runtime] debug5" - ) - assert log_queue_list[2].levelno == logging.INFO - assert log_queue_list[2].message.startswith( - "[sdk_core::temporal_sdk_bridge::runtime] info6" + async def log_queue_len() -> int: + return len(log_queue_list) + + runtime = Runtime( + telemetry=TelemetryConfig( + logging=LoggingConfig( + filter=TelemetryFilter(core_level="INFO", other_level="ERROR"), + forwarding=LogForwardingConfig(logger=logger), + ) + ) ) + # Every client holds its own handle to the runtime, so dropping one client + # must not stop log forwarding for everything else on the runtime + client = await env.connect_client(runtime=runtime) + del client + gc.collect() + + with LogHandler.apply(logger, handler): + runtime._core_runtime.write_test_info_log("info1", "extra1") + await assert_eq_eventually(1, log_queue_len) + assert log_queue_list[0].message.startswith( + "[sdk_core::temporal_sdk_bridge::runtime] info1" + ) + + +def test_runtime_console_logging_format(): + config = LoggingConfig(filter="INFO", format=LoggingFormat.JSON)._to_bridge_config() + assert config.format == "json" + @workflow.defn class TaskFailWorkflow: @@ -149,16 +221,14 @@ async def run(self) -> None: raise RuntimeError("Intentional error") -async def test_runtime_task_fail_log_forwarding(client: Client): +async def test_runtime_task_fail_log_forwarding(env: WorkflowEnvironment): # Client with lo capturing runtime log_queue: queue.Queue[logging.LogRecord] = queue.Queue() log_queue_list = cast(list[logging.LogRecord], log_queue.queue) + handler = logging.handlers.QueueHandler(log_queue) logger = logging.getLogger(f"log-{uuid.uuid4()}") - logger.addHandler(logging.handlers.QueueHandler(log_queue)) logger.setLevel(logging.WARN) - client = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + client = await env.connect_client( runtime=Runtime( telemetry=TelemetryConfig( logging=LoggingConfig( @@ -169,33 +239,35 @@ async def test_runtime_task_fail_log_forwarding(client: Client): ), ) - # Start workflow - task_queue = f"task-queue-{uuid.uuid4()}" - async with Worker(client, task_queue=task_queue, workflows=[TaskFailWorkflow]): - handle = await client.start_workflow( - TaskFailWorkflow.run, - id=f"workflow-{uuid.uuid4()}", - task_queue=task_queue, - ) - - # Wait for log to appear - async def has_log() -> bool: - return any( - l for l in log_queue_list if "Failing workflow task" in l.message + with LogHandler.apply(logger, handler): + # Start workflow + task_queue = f"task-queue-{uuid.uuid4()}" + async with Worker(client, task_queue=task_queue, workflows=[TaskFailWorkflow]): + handle = await client.start_workflow( + TaskFailWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, ) - await assert_eq_eventually(True, has_log) + # Wait for log to appear + async def has_log() -> bool: + return any( + l for l in log_queue_list if "Failing workflow task" in l.message + ) - # Check record - record = next(l for l in log_queue_list if "Failing workflow task" in l.message) - assert record.levelno == logging.WARNING - assert ( - record.name == f"{logger.name}-sdk_core::temporalio_sdk_core::worker::workflow" - ) - assert record.temporal_log.fields["run_id"] == handle.result_run_id # type: ignore + await assert_eq_eventually(True, has_log) + + # Check record + record = next(l for l in log_queue_list if "Failing workflow task" in l.message) + assert record.levelno == logging.WARNING + assert ( + record.name + == f"{logger.name}-sdk_core::temporalio_sdk_core::worker::workflow" + ) + assert record.temporal_log.fields["run_id"] == handle.result_run_id # type: ignore -async def test_prometheus_histogram_bucket_overrides(client: Client): +async def test_prometheus_histogram_bucket_overrides(env: WorkflowEnvironment): # Set up a Prometheus configuration with custom histogram bucket overrides prom_addr = f"127.0.0.1:{find_free_port()}" special_value = float(1234.5678) @@ -225,9 +297,7 @@ async def test_prometheus_histogram_bucket_overrides(client: Client): custom_histogram.record(600) # Create client with overrides - client_with_overrides = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + client_with_overrides = await env.connect_client( runtime=runtime, ) @@ -252,20 +322,119 @@ async def check_metrics() -> None: metrics_output = f.read().decode("utf-8") for key, buckets in histogram_overrides.items(): - assert ( - key in metrics_output - ), f"Missing {key} in full output: {metrics_output}" + assert key in metrics_output, ( + f"Missing {key} in full output: {metrics_output}" + ) for bucket in buckets: # expect to have {key}_bucket and le={bucket} in the same line with arbitrary strings between them regex = re.compile(f'{key}_bucket.*le="{bucket}"') - assert regex.search( - metrics_output - ), f"Missing bucket for {key} in full output: {metrics_output}" + assert regex.search(metrics_output), ( + f"Missing bucket for {key} in full output: {metrics_output}" + ) # Wait for metrics to appear and match the expected buckets await assert_eventually(check_metrics) +async def test_opentelemetry_histogram_bucket_overrides(env: WorkflowEnvironment): + # Set up an OpenTelemetry configuration with custom histogram bucket overrides + import threading + from http.server import BaseHTTPRequestHandler, HTTPServer + + from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import ( + ExportMetricsServiceRequest, + ExportMetricsServiceResponse, + ) + + special_value = float(1234.5678) + histogram_overrides = { + "temporal_long_request_latency": [special_value / 2, special_value], + "custom_histogram": [special_value / 2, special_value], + } + + captured: dict[str, list[float]] = {} + lock = threading.Lock() + + class Handler(BaseHTTPRequestHandler): + def log_message(self, format: str, *args: Any): + pass # silence default stderr logging + + def do_POST(self): + length = int(self.headers.get("Content-Length", "0")) + req = ExportMetricsServiceRequest() + req.ParseFromString(self.rfile.read(length)) + with lock: + for rm in req.resource_metrics: + for sm in rm.scope_metrics: + for m in sm.metrics: + if m.HasField("histogram"): + for dp in m.histogram.data_points: + captured[m.name] = list(dp.explicit_bounds) + body = ExportMetricsServiceResponse().SerializeToString() + self.send_response(200) + self.send_header("Content-Type", "application/x-protobuf") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + otel_port = find_free_port() + server = HTTPServer(("127.0.0.1", otel_port), Handler) + thread = threading.Thread(target=server.serve_forever, daemon=True) + thread.start() + try: + runtime = Runtime( + telemetry=TelemetryConfig( + metrics=OpenTelemetryConfig( + url=f"http://127.0.0.1:{otel_port}/v1/metrics", + http=True, + metric_periodicity=timedelta(milliseconds=100), + durations_as_seconds=False, + histogram_bucket_overrides=histogram_overrides, + ), + ), + ) + + # Create and record to a custom histogram + custom_histogram = runtime.metric_meter.create_histogram( + "custom_histogram", "Custom histogram", "ms" + ) + custom_histogram.record(600) + + # Run a workflow so built-in histograms (e.g. temporal_long_request_latency) + # are recorded and exported. + client_with_overrides = await env.connect_client( + runtime=runtime, + ) + task_queue = f"task-queue-{uuid.uuid4()}" + async with Worker( + client_with_overrides, + task_queue=task_queue, + workflows=[HelloWorkflow], + ): + assert "Hello, World!" == await client_with_overrides.execute_workflow( + HelloWorkflow.run, + "World", + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + + async def check_metrics() -> None: + with lock: + snapshot = dict(captured) + for key, buckets in histogram_overrides.items(): + assert key in snapshot, ( + f"Missing {key} in captured metrics: {list(snapshot)}" + ) + assert snapshot[key] == pytest.approx(buckets), ( + f"Bucket mismatch for {key}: got {snapshot[key]} expected {buckets}" + ) + + await assert_eventually(check_metrics) + finally: + server.shutdown() + server.server_close() + + def test_runtime_options_invalid_heartbeat() -> None: with pytest.raises(ValueError): Runtime( @@ -273,6 +442,31 @@ def test_runtime_options_invalid_heartbeat() -> None: ) +def test_runtime_environment_info_option(monkeypatch: pytest.MonkeyPatch) -> None: + captured_options = [] + + class MockRuntime: + def __init__(self, *, options: Any) -> None: + captured_options.append(options) + + monkeypatch.setattr(temporalio.bridge.runtime, "Runtime", MockRuntime) + monkeypatch.setattr( + temporalio.bridge.metric.MetricMeter, "create", staticmethod(lambda _: None) + ) + + Runtime(telemetry=TelemetryConfig()) + Runtime(telemetry=TelemetryConfig(), disable_environment_info=True) + + assert [option.disable_environment_info for option in captured_options] == [ + False, + True, + ] + + +def test_runtime_environment_info_can_be_enabled() -> None: + Runtime(telemetry=TelemetryConfig(), disable_environment_info=False) + + def test_runtime_ref_creates_default(): ref = _RuntimeRef() assert not ref._default_runtime diff --git a/tests/test_serialization_context.py b/tests/test_serialization_context.py index 07d48bdd31..fb7db6e6e7 100644 --- a/tests/test_serialization_context.py +++ b/tests/test_serialization_context.py @@ -15,7 +15,7 @@ from collections.abc import Sequence from dataclasses import dataclass, field from datetime import timedelta -from typing import Any, List, Literal, Optional, Type +from typing import Any, Literal import nexusrpc import pytest @@ -23,13 +23,28 @@ from typing_extensions import Never import temporalio.api.common.v1 +import temporalio.api.enums.v1 import temporalio.api.failure.v1 -from temporalio import activity, workflow +import temporalio.api.history.v1 +import temporalio.api.nexus.v1 +import temporalio.api.taskqueue.v1 +import temporalio.api.update.v1 +import temporalio.api.workflowservice.v1 +from temporalio import activity, nexus, workflow from temporalio.client import ( + ActivityFailureError, AsyncActivityHandle, Client, + GetNexusOperationResultInput, + Interceptor, + NexusOperationFailureError, + OutboundInterceptor, + StartWorkflowUpdateInput, WorkflowFailureError, + WorkflowHistory, WorkflowUpdateFailedError, + WorkflowUpdateHandle, + WorkflowUpdateStage, ) from temporalio.common import RetryPolicy from temporalio.contrib.pydantic import PydanticJSONPlainPayloadConverter @@ -40,18 +55,25 @@ DefaultFailureConverter, DefaultPayloadConverter, EncodingPayloadConverter, + ExternalStorage, JSONPlainPayloadConverter, + NexusSerializationContext, PayloadCodec, PayloadConverter, SerializationContext, WithSerializationContext, WorkflowSerializationContext, ) -from temporalio.exceptions import ApplicationError +from temporalio.exceptions import ApplicationError, NexusOperationError from temporalio.testing import WorkflowEnvironment -from temporalio.worker import Worker -from temporalio.worker._workflow_instance import UnsandboxedWorkflowRunner -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from temporalio.worker import Replayer, Worker +from temporalio.worker._workflow_instance import ( + UnsandboxedWorkflowRunner, + _WorkflowInstanceImpl, +) +from tests.helpers import assert_eq_eventually +from tests.helpers.nexus import make_nexus_endpoint_name +from tests.test_extstore import InMemoryTestDriver @dataclass @@ -180,6 +202,7 @@ async def run(self, data: TraceData) -> TraceData: data, start_to_close_timeout=timedelta(seconds=10), heartbeat_timeout=timedelta(seconds=2), + activity_id="activity-id", ) data = await workflow.execute_child_workflow( EchoWorkflow.run, data, id=f"{workflow.info().workflow_id}_child" @@ -187,8 +210,10 @@ async def run(self, data: TraceData) -> TraceData: return data +@pytest.mark.parametrize("use_external_storage", [False, True]) async def test_payload_conversion_calls_follow_expected_sequence_and_contexts( client: Client, + use_external_storage: bool, ): workflow_id = str(uuid.uuid4()) task_queue = str(uuid.uuid4()) @@ -197,6 +222,12 @@ async def test_payload_conversion_calls_follow_expected_sequence_and_contexts( config["data_converter"] = dataclasses.replace( DataConverter.default, payload_converter_class=SerializationContextCompositePayloadConverter, + # External storage must not drop the context + external_storage=( + ExternalStorage(drivers=[InMemoryTestDriver()]) + if use_external_storage + else None + ), ) client = Client(**config) @@ -216,22 +247,23 @@ async def test_payload_conversion_calls_follow_expected_sequence_and_contexts( workflow_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, ) ) child_workflow_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=f"{workflow_id}_child", ) ) activity_context = dataclasses.asdict( ActivitySerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, workflow_type=PayloadConversionWorkflow.__name__, activity_type=passthrough_activity.__name__, + activity_id="activity-id", activity_task_queue=task_queue, is_local=False, ) @@ -329,6 +361,7 @@ async def run(self) -> TraceData: initial_interval=timedelta(milliseconds=100), maximum_attempts=2, ), + activity_id="activity-id", ) @@ -360,17 +393,18 @@ async def test_heartbeat_details_payload_conversion(client: Client): workflow_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, ) ) activity_context = dataclasses.asdict( ActivitySerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, workflow_type=HeartbeatDetailsSerializationContextTestWorkflow.__name__, activity_type=activity_with_heartbeat_details.__name__, + activity_id="activity-id", activity_task_queue=task_queue, is_local=False, ) @@ -420,6 +454,7 @@ async def run(self, data: TraceData) -> TraceData: local_activity, data, start_to_close_timeout=timedelta(seconds=10), + activity_id="activity-id", ) @@ -450,16 +485,17 @@ async def test_local_activity_payload_conversion(client: Client): workflow_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, ) ) local_activity_context = dataclasses.asdict( ActivitySerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, workflow_type=LocalActivityWorkflow.__name__, activity_type=local_activity.__name__, + activity_id="activity-id", activity_task_queue=task_queue, is_local=True, ) @@ -505,7 +541,7 @@ async def test_local_activity_payload_conversion(client: Client): @workflow.defn -class EventWorkflow: +class WaitForSignalWorkflow: # Like a global asyncio.Event() def __init__(self) -> None: @@ -522,10 +558,11 @@ def signal(self) -> None: @activity.defn async def async_activity() -> TraceData: + # Notify test that the activity has started and is ready to be completed manually await ( activity.client() .get_workflow_handle("activity-started-wf-id") - .signal(EventWorkflow.signal) + .signal(WaitForSignalWorkflow.signal) ) activity.raise_complete_async() @@ -559,26 +596,27 @@ async def test_async_activity_completion_payload_conversion( task_queue=task_queue, workflows=[ AsyncActivityCompletionSerializationContextTestWorkflow, - EventWorkflow, + WaitForSignalWorkflow, ], activities=[async_activity], workflow_runner=UnsandboxedWorkflowRunner(), # so that we can use isinstance ): workflow_context = WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, ) activity_context = ActivitySerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, workflow_type=AsyncActivityCompletionSerializationContextTestWorkflow.__name__, activity_type=async_activity.__name__, + activity_id="async-activity-id", activity_task_queue=task_queue, is_local=False, ) act_started_wf_handle = await client.start_workflow( - EventWorkflow.run, + WaitForSignalWorkflow.run, id="activity-started-wf-id", task_queue=task_queue, ) @@ -641,10 +679,11 @@ def my_method(self) -> None: def test_subclassed_async_activity_handle(client: Client): activity_context = ActivitySerializationContext( - namespace="default", + namespace=client.namespace, workflow_id="workflow-id", workflow_type="workflow-type", activity_type="activity-type", + activity_id="activity-id", activity_task_queue="activity-task-queue", is_local=False, ) @@ -733,7 +772,7 @@ async def test_signal_payload_conversion( workflow_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, ) ) @@ -802,7 +841,7 @@ async def test_query_payload_conversion( workflow_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, ) ) @@ -837,20 +876,20 @@ def __init__(self, pass_validation: bool) -> None: self.input: TraceData | None = None @workflow.run - async def run(self, pass_validation: bool) -> TraceData: + async def run(self, _pass_validation: bool) -> TraceData: await workflow.wait_condition(lambda: self.input is not None) assert self.input return self.input @workflow.update def my_update(self, input: TraceData) -> TraceData: + self.input = input return input @my_update.validator def my_update_validator(self, input: TraceData) -> None: - self.input = input # for test purposes; update validators should not mutate workflow state if not self.pass_validation: - raise ValueError("Rejected") + raise ApplicationError("Rejected", input) @pytest.mark.parametrize("pass_validation", [True, False]) @@ -891,14 +930,16 @@ async def test_update_payload_conversion( UpdateSerializationContextTestWorkflow.my_update, TraceData() ) raise AssertionError("Expected WorkflowUpdateFailedError") - except WorkflowUpdateFailedError: - pass - - result = await wf_handle.result() + except WorkflowUpdateFailedError as e: + assert isinstance(e.cause, ApplicationError) + assert len(e.cause.details) == 1 + result = e.cause.details[0] + assert isinstance(result, TraceData) + await wf_handle.terminate() workflow_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, ) ) @@ -913,11 +954,11 @@ async def test_update_payload_conversion( ), TraceItem( method="to_payload", - context=workflow_context, # Outbound update/workflow result + context=workflow_context, # Outbound update result or error detail ), TraceItem( method="from_payload", - context=workflow_context, # Inbound update/workflow result + context=workflow_context, # Inbound update result or error detail ), ] @@ -1005,13 +1046,13 @@ async def test_external_workflow_signal_and_cancel_payload_conversion( signaler_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=signaler_workflow_id, ) ) target_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=target_workflow_id, ) ) @@ -1059,11 +1100,12 @@ async def run(self) -> Never: failing_activity, start_to_close_timeout=timedelta(seconds=10), retry_policy=RetryPolicy(maximum_attempts=1), + activity_id="activity-id", ) raise Exception("Unreachable") -test_traces: dict[str, list[TraceItem]] = defaultdict(list) +test_traces: dict[str | None, list[TraceItem]] = defaultdict(list) class FailureConverterWithContext(DefaultFailureConverter, WithSerializationContext): @@ -1145,16 +1187,17 @@ async def test_failure_converter_with_context(client: Client): workflow_context = dataclasses.asdict( WorkflowSerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, ) ) activity_context = dataclasses.asdict( ActivitySerializationContext( - namespace="default", + namespace=client.namespace, workflow_id=workflow_id, workflow_type=FailureConverterTestWorkflow.__name__, activity_type=failing_activity.__name__, + activity_id="activity-id", activity_task_queue=task_queue, is_local=False, ) @@ -1307,6 +1350,71 @@ async def test_codec_with_context(client: Client): del test_traces[workflow_id] +async def test_command_context_resolved_only_with_codec_or_external_storage( + client: Client, monkeypatch: pytest.MonkeyPatch +): + """Context resolution calls into the workflow instance, which is costly in the + sandbox, so workers skip it when no codec or external storage can use it.""" + lookups: defaultdict[str, int] = defaultdict(int) + + def count_lookups(name: str) -> None: + lookup = getattr(_WorkflowInstanceImpl, name) + + def counting_lookup(self, command_info): # type: ignore[reportMissingParameterType] + lookups[name] += 1 + return lookup(self, command_info) + + monkeypatch.setattr(_WorkflowInstanceImpl, name, counting_lookup) + + count_lookups("get_serialization_context") + count_lookups("get_external_store_context") + + async def run_workflow(data_converter: DataConverter) -> tuple[int, int]: + """Returns the serialization and external store context lookup counts.""" + lookups.clear() + workflow_id = str(uuid.uuid4()) + task_queue = str(uuid.uuid4()) + client_config = client.config() + client_config["data_converter"] = data_converter + converter_client = Client(**client_config) + async with Worker( + converter_client, + task_queue=task_queue, + workflows=[CodecTestWorkflow], + workflow_runner=UnsandboxedWorkflowRunner(), + ): + await converter_client.execute_workflow( + CodecTestWorkflow.run, + "data", + id=workflow_id, + task_queue=task_queue, + ) + test_traces.pop(workflow_id, None) + return ( + lookups["get_serialization_context"], + lookups["get_external_store_context"], + ) + + assert await run_workflow(DataConverter.default) == (0, 0) + + serialization_lookups, store_lookups = await run_workflow( + dataclasses.replace( + DataConverter.default, payload_codec=PayloadCodecWithContext() + ) + ) + assert serialization_lookups > 0 + assert store_lookups == 0 + + serialization_lookups, store_lookups = await run_workflow( + dataclasses.replace( + DataConverter.default, + external_storage=ExternalStorage(drivers=[InMemoryTestDriver()]), + ) + ) + assert serialization_lookups > 0 + assert store_lookups > 0 + + # Local activity codec test @@ -1323,6 +1431,7 @@ async def run(self, data: str) -> str: codec_test_local_activity, data, start_to_close_timeout=timedelta(seconds=10), + activity_id="activity-id", ) @@ -1361,6 +1470,7 @@ async def test_local_activity_codec_with_context(client: Client): workflow_id=workflow_id, workflow_type=LocalActivityCodecTestWorkflow.__name__, activity_type=codec_test_local_activity.__name__, + activity_id="activity-id", activity_task_queue=task_queue, is_local=True, ) @@ -1583,9 +1693,9 @@ def __init__(self): self.received_update = False @workflow.run - async def run(self, data: str) -> str: + async def run(self, _data: str) -> str: await workflow.wait_condition( - lambda: (self.received_signal and self.received_update) + lambda: self.received_signal and self.received_update ) # Run them in parallel to check that data converter operations do not mix up contexts when # there are multiple concurrent payload types. @@ -1594,6 +1704,7 @@ async def run(self, data: str) -> str: payload_encryption_activity, "outbound", start_to_close_timeout=timedelta(seconds=10), + activity_id="activity-id", ), workflow.execute_child_workflow( PayloadEncryptionChildWorkflow.run, @@ -1672,25 +1783,94 @@ async def test_decode_context_matches_encode_context( # Test nexus payload codec -class AssertNexusLacksContextPayloadCodec(PayloadCodec, WithSerializationContext): - def __init__(self): - self.context = None +class _NexusResultDecodingInterceptor(Interceptor): + def __init__(self) -> None: + super().__init__() + self.decoded_results: list[Any] = [] + + def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor: + return _NexusResultDecodingOutboundInterceptor(next, self) + + +class _NexusResultDecodingOutboundInterceptor(OutboundInterceptor): + def __init__( + self, next: OutboundInterceptor, parent: _NexusResultDecodingInterceptor + ) -> None: + super().__init__(next) + self._parent = parent + + async def get_nexus_operation_result( + self, input: GetNexusOperationResultInput + ) -> Any: + result = await super().get_nexus_operation_result(input) + self._parent.decoded_results.append(result) + return result + + +class NexusContextMarkerPayloadCodec(PayloadCodec, WithSerializationContext): + MARKER_KEY = "nexus-context-marker" + + def __init__( + self, + markers: dict[NexusSerializationContext, bytes], + context: SerializationContext | None = None, + ): + self.markers = markers + self.context = context def with_context( self, context: SerializationContext - ) -> AssertNexusLacksContextPayloadCodec: - codec = AssertNexusLacksContextPayloadCodec() - codec.context = context - return codec + ) -> NexusContextMarkerPayloadCodec: + return NexusContextMarkerPayloadCodec(self.markers, context) + + def _marker(self) -> bytes | None: + if not isinstance(self.context, NexusSerializationContext): + return None + try: + return self.markers[self.context] + except KeyError: + raise AssertionError( + f"No Nexus payload codec configured for {self.context!r}" + ) from None - async def _assert_context_iff_not_nexus( + async def encode( self, payloads: Sequence[temporalio.api.common.v1.Payload] ) -> list[temporalio.api.common.v1.Payload]: - [payload] = payloads - assert bool(self.context) == (payload.data.decode() != '"nexus-data"') - return list(payloads) + marker = self._marker() + if marker is None: + return list(payloads) + encoded = [] + for payload in payloads: + marked_payload = temporalio.api.common.v1.Payload() + marked_payload.CopyFrom(payload) + marked_payload.metadata[self.MARKER_KEY] = marker + encoded.append(marked_payload) + return encoded - encode = decode = _assert_context_iff_not_nexus + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + marker = self._marker() + if marker is None: + # Every reader must decode under the same Nexus context the payload was encoded with + for payload in payloads: + assert self.MARKER_KEY not in payload.metadata, ( + f"payload encoded under a Nexus context was decoded under " + f"{self.context!r}" + ) + return list(payloads) + decoded = [] + for payload in payloads: + actual_marker = payload.metadata.get(self.MARKER_KEY) + if actual_marker is None: + decoded.append(payload) + continue + assert actual_marker == marker + decoded_payload = temporalio.api.common.v1.Payload() + decoded_payload.CopyFrom(payload) + del decoded_payload.metadata[self.MARKER_KEY] + decoded.append(decoded_payload) + return decoded @nexusrpc.handler.service_handler @@ -1701,50 +1881,523 @@ async def operation( ) -> str: return data + @nexusrpc.handler.sync_operation + async def fail(self, _: nexusrpc.handler.StartOperationContext, data: str) -> str: + raise ApplicationError(data, non_retryable=True) + @workflow.defn class NexusOperationTestWorkflow: @workflow.run - async def run(self, data: str) -> None: + async def run(self, red_endpoint_name: str, blue_endpoint_name: str) -> list[str]: + red_handle, blue_handle = await asyncio.gather( + workflow.create_nexus_client( + service=NexusOperationTestServiceHandler, + endpoint=red_endpoint_name, + ).start_operation( + NexusOperationTestServiceHandler.operation, + input="nexus-data", + summary="nexus-summary", + ), + workflow.create_nexus_client( + service=NexusOperationTestServiceHandler, + endpoint=blue_endpoint_name, + ).start_operation( + NexusOperationTestServiceHandler.operation, + input="nexus-data", + summary="nexus-summary", + ), + ) + return list(await asyncio.gather(red_handle, blue_handle)) + + +@workflow.defn +class NexusOperationFailureTestWorkflow: + @workflow.run + async def run(self, endpoint_name: str) -> None: nexus_client = workflow.create_nexus_client( service=NexusOperationTestServiceHandler, - endpoint=make_nexus_endpoint_name(workflow.info().task_queue), + endpoint=endpoint_name, ) - await nexus_client.start_operation( - NexusOperationTestServiceHandler.operation, input="nexus-data" + try: + await nexus_client.start_operation( + NexusOperationTestServiceHandler.fail, input="nexus-failure" + ) + except NexusOperationError: + return + raise AssertionError("Nexus operation should have failed") + + +nexus_failure_context_traces: list[tuple[str, NexusSerializationContext]] = [] + + +class NexusFailureConverterWithContext( + DefaultFailureConverter, WithSerializationContext +): + def __init__(self, context: SerializationContext | None = None): + super().__init__() + self.context = context + + def with_context( + self, context: SerializationContext + ) -> NexusFailureConverterWithContext: + return NexusFailureConverterWithContext(context) + + def to_failure( + self, + exception: BaseException, + payload_converter: PayloadConverter, + failure: temporalio.api.failure.v1.Failure, + ) -> None: + if isinstance(self.context, NexusSerializationContext): + nexus_failure_context_traces.append(("to_failure", self.context)) + super().to_failure(exception, payload_converter, failure) + + def from_failure( + self, + failure: temporalio.api.failure.v1.Failure, + payload_converter: PayloadConverter, + ) -> BaseException: + if isinstance(self.context, NexusSerializationContext): + nexus_failure_context_traces.append(("from_failure", self.context)) + return super().from_failure(failure, payload_converter) + + +@pytest.mark.requires_local_server +async def test_workflow_nexus_payload_codec_receives_context( + env: WorkflowEnvironment, +): + """Nexus payload codecs get context for workflow inputs, summaries, and results.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + task_queue = "workflow-nexus-context-codec-task-queue" + red_endpoint_name = "workflow-red-nexus-endpoint" + blue_endpoint_name = "workflow-blue-nexus-endpoint" + red_context = NexusSerializationContext( + endpoint=red_endpoint_name, + service="NexusOperationTestServiceHandler", + operation="operation", + ) + blue_context = NexusSerializationContext( + endpoint=blue_endpoint_name, + service="NexusOperationTestServiceHandler", + operation="operation", + ) + payload_codec = NexusContextMarkerPayloadCodec( + {red_context: b"red", blue_context: b"blue"} + ) + config = env.client.config() + config["data_converter"] = dataclasses.replace( + DataConverter.default, + payload_codec=payload_codec, + ) + client = Client(**config) + + async with Worker( + client, + task_queue=task_queue, + workflows=[NexusOperationTestWorkflow], + nexus_service_handlers=[NexusOperationTestServiceHandler()], + ) as worker: + await env.create_nexus_endpoint(red_endpoint_name, worker.task_queue) + await env.create_nexus_endpoint(blue_endpoint_name, worker.task_queue) + handle = await client.start_workflow( + NexusOperationTestWorkflow.run, + args=[red_endpoint_name, blue_endpoint_name], + id=str(uuid.uuid4()), + task_queue=worker.task_queue, ) + assert await handle.result() == ["nexus-data", "nexus-data"] + + history = await handle.fetch_history() + scheduled_endpoints: dict[int, str] = {} + encoded_summaries: dict[str, temporalio.api.common.v1.Payload] = {} + encoded_results: dict[str, temporalio.api.common.v1.Payload] = {} + for event in history.events: + if event.HasField("nexus_operation_scheduled_event_attributes"): + scheduled_attrs = event.nexus_operation_scheduled_event_attributes + assert scheduled_attrs.service == "NexusOperationTestServiceHandler" + assert scheduled_attrs.operation == "operation" + scheduled_endpoints[event.event_id] = scheduled_attrs.endpoint + assert event.HasField("user_metadata") + assert event.user_metadata.HasField("summary") + encoded_summaries[scheduled_attrs.endpoint] = ( + event.user_metadata.summary + ) + elif event.HasField("nexus_operation_completed_event_attributes"): + completed_attrs = event.nexus_operation_completed_event_attributes + endpoint = scheduled_endpoints[completed_attrs.scheduled_event_id] + encoded_results[endpoint] = completed_attrs.result + assert set(scheduled_endpoints.values()) == { + red_endpoint_name, + blue_endpoint_name, + } + assert { + endpoint: payload.metadata[NexusContextMarkerPayloadCodec.MARKER_KEY] + for endpoint, payload in encoded_summaries.items() + } == { + red_endpoint_name: b"red", + blue_endpoint_name: b"blue", + } + assert { + endpoint: payload.metadata[NexusContextMarkerPayloadCodec.MARKER_KEY] + for endpoint, payload in encoded_results.items() + } == { + red_endpoint_name: b"red", + blue_endpoint_name: b"blue", + } + + scheduled_contexts: dict[int, NexusSerializationContext] = {} + for event in history.events: + if event.HasField("nexus_operation_scheduled_event_attributes"): + scheduled_attrs = event.nexus_operation_scheduled_event_attributes + context = NexusSerializationContext( + endpoint=scheduled_attrs.endpoint, + service=scheduled_attrs.service, + operation=scheduled_attrs.operation, + ) + scheduled_contexts[event.event_id] = context + [decoded] = await payload_codec.with_context(context).decode( + [scheduled_attrs.input] + ) + scheduled_attrs.input.CopyFrom(decoded) + [decoded] = await payload_codec.with_context(context).decode( + [event.user_metadata.summary] + ) + event.user_metadata.summary.CopyFrom(decoded) + elif event.HasField("nexus_operation_completed_event_attributes"): + completed_attrs = event.nexus_operation_completed_event_attributes + context = scheduled_contexts[completed_attrs.scheduled_event_id] + [decoded] = await payload_codec.with_context(context).decode( + [completed_attrs.result] + ) + completed_attrs.result.CopyFrom(decoded) + await Replayer( + workflows=[NexusOperationTestWorkflow], + data_converter=config["data_converter"], + ).replay_workflow(history) -async def test_nexus_payload_codec_operations_lack_context( +@pytest.mark.requires_local_server +async def test_standalone_nexus_handle_obtained_by_id_uses_server_context( env: WorkflowEnvironment, ): + """A handle obtained by operation ID alone decodes its result with the context the server + returns, since it never issued a start request to build a context from. """ - encode() and decode() on nexus payloads should not have any context set. - """ - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work with the Java test server") + task_queue = "standalone-nexus-detached-handle-task-queue" + endpoint_name = f"standalone-detached-nexus-endpoint-{uuid.uuid4()}" + context = NexusSerializationContext( + endpoint=endpoint_name, + service="NexusOperationTestServiceHandler", + operation="operation", + ) config = env.client.config() config["data_converter"] = dataclasses.replace( DataConverter.default, - payload_codec=AssertNexusLacksContextPayloadCodec(), + payload_codec=NexusContextMarkerPayloadCodec({context: b"detached"}), ) client = Client(**config) async with Worker( client, - task_queue=str(uuid.uuid4()), - workflows=[NexusOperationTestWorkflow], + task_queue=task_queue, + nexus_service_handlers=[NexusOperationTestServiceHandler()], + ) as worker: + await env.create_nexus_endpoint(endpoint_name, worker.task_queue) + operation_id = str(uuid.uuid4()) + started = await client.create_nexus_client( + service=NexusOperationTestServiceHandler, + endpoint=endpoint_name, + ).start_operation( + NexusOperationTestServiceHandler.operation, + "detached", + id=operation_id, + schedule_to_close_timeout=timedelta(seconds=10), + ) + assert await started.result() == "detached" + + # The strict codec rejects a marked result decoded without the operation's context + detached = client.get_nexus_operation_handle(operation_id, result_type=str) + assert await detached.result() == "detached" + + +@pytest.mark.requires_local_server +async def test_standalone_nexus_payload_codec_receives_context( + env: WorkflowEnvironment, +): + """Nexus payload codecs get context for standalone inputs and results.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + task_queue = "standalone-nexus-context-codec-task-queue" + red_endpoint_name = "standalone-red-nexus-endpoint" + blue_endpoint_name = "standalone-blue-nexus-endpoint" + red_context = NexusSerializationContext( + endpoint=red_endpoint_name, + service="NexusOperationTestServiceHandler", + operation="operation", + ) + blue_context = NexusSerializationContext( + endpoint=blue_endpoint_name, + service="NexusOperationTestServiceHandler", + operation="operation", + ) + config = env.client.config() + config["data_converter"] = dataclasses.replace( + DataConverter.default, + payload_codec=NexusContextMarkerPayloadCodec( + {red_context: b"red", blue_context: b"blue"} + ), + ) + result_interceptor = _NexusResultDecodingInterceptor() + config["interceptors"] = list(config.get("interceptors") or []) + [ + result_interceptor + ] + client = Client(**config) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[NexusOperationTestServiceHandler()], + ) as worker: + await env.create_nexus_endpoint(red_endpoint_name, worker.task_queue) + await env.create_nexus_endpoint(blue_endpoint_name, worker.task_queue) + red_standalone_result, blue_standalone_result = await asyncio.gather( + client.create_nexus_client( + service=NexusOperationTestServiceHandler, + endpoint=red_endpoint_name, + ).execute_operation( + NexusOperationTestServiceHandler.operation, + "standalone-red", + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=10), + ), + client.create_nexus_client( + service=NexusOperationTestServiceHandler, + endpoint=blue_endpoint_name, + ).execute_operation( + NexusOperationTestServiceHandler.operation, + "standalone-blue", + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=10), + ), + ) + assert red_standalone_result == "standalone-red" + assert blue_standalone_result == "standalone-blue" + assert set(result_interceptor.decoded_results) == { + "standalone-red", + "standalone-blue", + } + + +@pytest.mark.requires_local_server +async def test_workflow_nexus_failure_converter_has_context( + env: WorkflowEnvironment, +): + """Workflow Nexus callers and handlers use context for failures.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + nexus_failure_context_traces.clear() + task_queue = "workflow-nexus-failure-context-task-queue" + endpoint_name = "workflow-failure-nexus-endpoint" + expected_context = NexusSerializationContext( + endpoint=endpoint_name, + service="NexusOperationTestServiceHandler", + operation="fail", + ) + config = env.client.config() + config["data_converter"] = dataclasses.replace( + DataConverter.default, + failure_converter_class=NexusFailureConverterWithContext, + ) + client = Client(**config) + + async with Worker( + client, + task_queue=task_queue, + workflows=[NexusOperationFailureTestWorkflow], nexus_service_handlers=[NexusOperationTestServiceHandler()], + workflow_runner=UnsandboxedWorkflowRunner(), ) as worker: - await create_nexus_endpoint(worker.task_queue, client) + await env.create_nexus_endpoint(endpoint_name, worker.task_queue) await client.execute_workflow( - NexusOperationTestWorkflow.run, - "workflow-data", + NexusOperationFailureTestWorkflow.run, + endpoint_name, id=str(uuid.uuid4()), task_queue=worker.task_queue, ) + assert ("to_failure", expected_context) in nexus_failure_context_traces + assert ("from_failure", expected_context) in nexus_failure_context_traces + + +class NexusContextRequiringPayloadCodec(PayloadCodec, WithSerializationContext): + """Marks payloads it encodes under a Nexus context and requires that mark back on decode. + + Stands in for a codec keyed on the context, such as one deriving an encryption key from it: + such a codec cannot recover a payload whose two halves were converted under different + contexts. Raising in both directions catches a mismatch either way round. The leniency in + :py:class:`NexusContextMarkerPayloadCodec` deliberately tolerates such a mismatch, so it + cannot detect this. + """ + + MARKER_KEY = "nexus-context-required-marker" + + def __init__(self, context: SerializationContext | None = None): + self.context = context + + def with_context( + self, context: SerializationContext + ) -> NexusContextRequiringPayloadCodec: + return NexusContextRequiringPayloadCodec(context) + + def _nexus_context(self) -> NexusSerializationContext | None: + return ( + self.context + if isinstance(self.context, NexusSerializationContext) + else None + ) + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + context = self._nexus_context() + if context is None: + return list(payloads) + encoded = [] + for payload in payloads: + marked = temporalio.api.common.v1.Payload() + marked.CopyFrom(payload) + marked.metadata[self.MARKER_KEY] = b"1" + encoded.append(marked) + return encoded + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + context = self._nexus_context() + decoded = [] + for payload in payloads: + marked = self.MARKER_KEY in payload.metadata + if context is None: + if marked: + raise RuntimeError( + "payload encoded under a Nexus context was decoded without one" + ) + decoded.append(payload) + continue + if not marked: + raise RuntimeError( + f"payload encoded without a Nexus context was decoded under {context!r}" + ) + stripped = temporalio.api.common.v1.Payload() + stripped.CopyFrom(payload) + del stripped.metadata[self.MARKER_KEY] + decoded.append(stripped) + return decoded + + +@pytest.mark.requires_local_server +async def test_standalone_nexus_describe_reads_metadata_with_context( + env: WorkflowEnvironment, +): + """A description reads back the summary the start request attached. + + A Nexus operation's user metadata is serialized with the operation's context, the same way + workflow and activity user metadata is serialized with theirs. Encoding and decoding it under + different contexts does not round-trip for a converter that varies by context. + """ + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + task_queue = "standalone-nexus-describe-metadata-task-queue" + endpoint_name = "standalone-describe-metadata-nexus-endpoint" + config = env.client.config() + config["data_converter"] = dataclasses.replace( + DataConverter.default, + payload_codec=NexusContextRequiringPayloadCodec(), + ) + client = Client(**config) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[NexusOperationTestServiceHandler()], + ) as worker: + await env.create_nexus_endpoint(endpoint_name, worker.task_queue) + nexus_client = client.create_nexus_client( + service=NexusOperationTestServiceHandler, + endpoint=endpoint_name, + ) + operation_handle = await nexus_client.start_operation( + NexusOperationTestServiceHandler.operation, + "describe-metadata", + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=10), + summary="the-summary", + ) + assert await operation_handle.result() == "describe-metadata" + + description = await operation_handle.describe() + assert await description.static_summary() == "the-summary" + + +@pytest.mark.requires_local_server +async def test_standalone_nexus_failure_converter_has_context( + env: WorkflowEnvironment, +): + """Standalone Nexus callers and handlers use context for failures.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + nexus_failure_context_traces.clear() + task_queue = "standalone-nexus-failure-context-task-queue" + endpoint_name = "standalone-failure-nexus-endpoint" + expected_context = NexusSerializationContext( + endpoint=endpoint_name, + service="NexusOperationTestServiceHandler", + operation="fail", + ) + config = env.client.config() + config["data_converter"] = dataclasses.replace( + DataConverter.default, + failure_converter_class=NexusFailureConverterWithContext, + ) + client = Client(**config) + + async with Worker( + client, + task_queue=task_queue, + nexus_service_handlers=[NexusOperationTestServiceHandler()], + ) as worker: + await env.create_nexus_endpoint(endpoint_name, worker.task_queue) + nexus_client = client.create_nexus_client( + service=NexusOperationTestServiceHandler, + endpoint=endpoint_name, + ) + operation_handle = await nexus_client.start_operation( + NexusOperationTestServiceHandler.fail, + "nexus-failure", + id=str(uuid.uuid4()), + schedule_to_close_timeout=timedelta(seconds=10), + ) + with pytest.raises(NexusOperationFailureError): + await operation_handle.result() + + assert ("to_failure", expected_context) in nexus_failure_context_traces + assert ("from_failure", expected_context) in nexus_failure_context_traces + + nexus_failure_context_traces.clear() + description = await operation_handle.describe() + assert description.last_attempt_failure is not None + assert ("from_failure", expected_context) in nexus_failure_context_traces + # Test pydantic converter with context @@ -1899,3 +2552,884 @@ async def test_user_customization_of_default_payload_converter( id=wf_id, task_queue=task_queue, ) + + +class _ContextRecordingCodec(PayloadCodec, WithSerializationContext): + """Records the serialization context it is handed, so a test can assert which one was used.""" + + def __init__( + self, + seen: list[SerializationContext | None], + context: SerializationContext | None = None, + ): + self.seen = seen + self.context = context + + def with_context(self, context: SerializationContext) -> _ContextRecordingCodec: + return _ContextRecordingCodec(self.seen, context) + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + self.seen.append(self.context) + return list(payloads) + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + self.seen.append(self.context) + return list(payloads) + + +def _nexus_worker_with_recording_codec(seen: list[SerializationContext | None]): + """A _NexusWorker with just enough wired up to call _data_converter_for_nexus_task.""" + from unittest import mock + + from temporalio.worker._nexus import _NexusWorker + + return _NexusWorker( + bridge_worker=lambda: mock.MagicMock(), + client=mock.MagicMock(namespace="ns"), + namespace="ns", + task_queue="tq", + service_handlers=[NexusOperationTestServiceHandler()], + data_converter=dataclasses.replace( + DataConverter.default, payload_codec=_ContextRecordingCodec(seen) + ), + interceptors=[], + metric_meter=mock.MagicMock(), + executor=None, + ) + + +async def _encode_through_codec(data_converter: DataConverter) -> None: + """Drive the converter's codec so it records the context it was scoped to.""" + assert data_converter.payload_codec is not None + await data_converter.payload_codec.encode([]) + + +async def test_nexus_worker_task_without_endpoint_is_scoped_by_an_empty_endpoint(): + """Servers before 1.30.0 do not report the endpoint a task was addressed to. + + The task is still scoped by service and operation, with an empty endpoint. It will not agree + with the caller, which scoped by the real endpoint, but it is a Nexus context rather than an + absent one. + """ + seen: list[SerializationContext | None] = [] + worker = _nexus_worker_with_recording_codec(seen) + + await _encode_through_codec( + worker._data_converter_for_nexus_task("", "Service", "operation") + ) + assert seen == [ + NexusSerializationContext(endpoint="", service="Service", operation="operation") + ] + + other_seen: list[SerializationContext | None] = [] + other = _nexus_worker_with_recording_codec(other_seen) + await _encode_through_codec( + other._data_converter_for_nexus_task("endpoint", "Service", "operation") + ) + assert other_seen == [ + NexusSerializationContext( + endpoint="endpoint", service="Service", operation="operation" + ) + ] + + +@dataclass +class NexusStartedInput: + id: str + value: str + outcome: Literal["result", "failure", "continue_as_new", "async"] = "result" + + +@workflow.defn +class NexusStartedWorkflow: + @workflow.run + async def run(self, input: NexusStartedInput) -> str: + if input.outcome == "continue_as_new": + workflow.continue_as_new(dataclasses.replace(input, outcome="result")) + if input.outcome == "failure": + raise ApplicationError( + "nexus-started-failure", "failure-detail", non_retryable=True + ) + return input.value + + +@workflow.defn +class NexusRetriedWorkflow: + @workflow.run + async def run(self, input: NexusStartedInput) -> str: + if workflow.info().attempt == 1: + raise ApplicationError("retry", "retry-detail") + last_failure = workflow.get_last_failure() + assert isinstance(last_failure, ApplicationError) + return f"{input.value}:{last_failure.details[0]}" + + +nexus_started_activity_contexts: list[NexusSerializationContext | None] = [] +nexus_started_async_completions: list[ + tuple[bytes, NexusSerializationContext | None] +] = [] + + +@activity.defn +async def nexus_started_activity(input: NexusStartedInput) -> str: + info = activity.info() + nexus_started_activity_contexts.append(info.nexus_serialization_context) + if input.outcome == "failure": + raise ApplicationError( + "nexus-started-failure", "failure-detail", non_retryable=True + ) + if input.outcome == "async": + nexus_started_async_completions.append( + (info.task_token, info.nexus_serialization_context) + ) + activity.raise_complete_async() + if info.attempt == 1: + # The next attempt decodes these details with the same context + activity.heartbeat("heartbeat-detail") + raise ApplicationError("retry") + assert list(info.heartbeat_details) == ["heartbeat-detail"] + return input.value + + +@dataclass +class NexusUpdateInput: + workflow_id: str + update_id: str + value: Literal["result", "failure", "rejection"] + + +@workflow.defn +class NexusUpdatedWorkflow: + def __init__(self) -> None: + self.finished = False + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self.finished) + + @workflow.update + async def update(self, value: str) -> str: + if value == "failure": + raise ApplicationError( + "nexus-update-failure", "failure-detail", non_retryable=True + ) + return value + + @update.validator + def validate_update(self, value: str) -> None: + if value == "rejection": + raise ApplicationError("nexus-update-rejection", "rejection-detail") + + @workflow.signal + def finish(self) -> None: + self.finished = True + + +@nexusrpc.handler.service_handler +class NexusStartedExecutionHandler: + @nexus.temporal_operation + async def update_workflow( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: NexusUpdateInput, + ) -> nexus.TemporalOperationResult[str]: + return await client.start_workflow_update( + input.workflow_id, + NexusUpdatedWorkflow.update, + input.value, + wait_for_stage=WorkflowUpdateStage.ACCEPTED, + update_id=input.update_id, + ) + + @nexus.temporal_operation + async def start_workflow( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: NexusStartedInput, + ) -> nexus.TemporalOperationResult[str]: + return await client.start_workflow(NexusStartedWorkflow.run, input, id=input.id) + + @nexus.temporal_operation + async def start_retried_workflow( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: NexusStartedInput, + ) -> nexus.TemporalOperationResult[str]: + return await client.start_workflow( + NexusRetriedWorkflow.run, + input, + id=input.id, + retry_policy=RetryPolicy( + initial_interval=timedelta(milliseconds=100), maximum_attempts=2 + ), + ) + + @nexus.temporal_operation + async def start_activity( + self, + _ctx: nexus.TemporalStartOperationContext, + client: nexus.TemporalNexusClient, + input: NexusStartedInput, + ) -> nexus.TemporalOperationResult[str]: + return await client.start_activity( + nexus_started_activity, + input, + id=input.id, + start_to_close_timeout=timedelta(seconds=10), + retry_policy=RetryPolicy( + initial_interval=timedelta(milliseconds=100), maximum_attempts=2 + ), + ) + + +def _nexus_started_context( + endpoint_name: str, operation: str +) -> NexusSerializationContext: + return NexusSerializationContext( + endpoint=endpoint_name, + service="NexusStartedExecutionHandler", + operation=operation, + ) + + +def _nexus_started_client( + env: WorkflowEnvironment, context: NexusSerializationContext +) -> Client: + config = env.client.config() + config["data_converter"] = dataclasses.replace( + DataConverter.default, + payload_codec=NexusContextMarkerPayloadCodec({context: b"nexus"}), + ) + return Client(**config) + + +def _marker(payload: temporalio.api.common.v1.Payload) -> bytes | None: + return payload.metadata.get(NexusContextMarkerPayloadCodec.MARKER_KEY) + + +async def test_workflow_result_keeps_nexus_context_across_history_pages(): + """The server may omit the context on later history pages, such as the page holding the + close event after a long poll times out with no events.""" + from unittest import mock + + context = NexusSerializationContext( + endpoint="endpoint", service="service", operation="operation" + ) + result = temporalio.api.common.v1.Payload( + metadata={ + "encoding": b"json/plain", + NexusContextMarkerPayloadCodec.MARKER_KEY: b"nexus", + }, + data=b'"nexus-value"', + ) + first_page = temporalio.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse( + next_page_token=b"next-page", + propagated_nexus_serialization_context=temporalio.api.nexus.v1.PropagatedSerializationContext( + endpoint=context.endpoint, + service=context.service, + operation=context.operation, + ), + ) + close_page = temporalio.api.workflowservice.v1.GetWorkflowExecutionHistoryResponse( + history=temporalio.api.history.v1.History( + events=[ + temporalio.api.history.v1.HistoryEvent( + workflow_execution_completed_event_attributes=temporalio.api.history.v1.WorkflowExecutionCompletedEventAttributes( + result=temporalio.api.common.v1.Payloads(payloads=[result]) + ) + ) + ] + ) + ) + service_client = mock.MagicMock() + service_client.workflow_service.get_workflow_execution_history = mock.AsyncMock( + side_effect=[first_page, close_page] + ) + client = Client( + service_client, + data_converter=dataclasses.replace( + DataConverter.default, + payload_codec=NexusContextMarkerPayloadCodec({context: b"nexus"}), + ), + ) + + assert ( + await client.get_workflow_handle("workflow-id", result_type=str).result() + == "nexus-value" + ) + + +@pytest.mark.requires_local_server +@pytest.mark.parametrize("outcome", ["result", "failure", "continue_as_new"]) +async def test_nexus_started_workflow_uses_nexus_context( + env: WorkflowEnvironment, + outcome: Literal["result", "failure", "continue_as_new"], +): + """A workflow started by a Nexus handler encodes its result and closing failure with the + handler's context, and clients decode them with the context the server returns.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + context = _nexus_started_context(endpoint_name, "start_workflow") + client = _nexus_started_client(env, context) + workflow_id = f"nexus-started-workflow-{uuid.uuid4()}" + + async with Worker( + client, + task_queue=task_queue, + workflows=[NexusStartedWorkflow], + nexus_service_handlers=[NexusStartedExecutionHandler()], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + nexus_client = client.create_nexus_client( + NexusStartedExecutionHandler, endpoint_name + ) + input = NexusStartedInput(id=workflow_id, value="nexus-value", outcome=outcome) + # This handle never started the workflow, so it relies on the context the server + # returns, including for the run after continue-as-new + handle = client.get_workflow_handle(workflow_id, result_type=str) + if outcome == "failure": + with pytest.raises(NexusOperationFailureError): + await nexus_client.execute_operation( + NexusStartedExecutionHandler.start_workflow, + input, + id=str(uuid.uuid4()), + ) + with pytest.raises(WorkflowFailureError) as err: + await handle.result() + assert isinstance(err.value.cause, ApplicationError) + assert err.value.cause.details == ("failure-detail",) + else: + assert ( + await nexus_client.execute_operation( + NexusStartedExecutionHandler.start_workflow, + input, + id=str(uuid.uuid4()), + ) + == "nexus-value" + ) + assert await handle.result() == "nexus-value" + + history = await handle.fetch_history() + started = history.events[0].workflow_execution_started_event_attributes + assert ( + started.propagated_nexus_serialization_context + == temporalio.api.nexus.v1.PropagatedSerializationContext( + endpoint=context.endpoint, + service=context.service, + operation=context.operation, + ) + ) + # The input keeps the workflow context + assert all(_marker(p) is None for p in started.input.payloads) + close_event = history.events[-1] + if outcome == "failure": + failure = close_event.workflow_execution_failed_event_attributes.failure + [detail] = failure.application_failure_info.details.payloads + assert _marker(detail) == b"nexus" + else: + [result] = ( + close_event.workflow_execution_completed_event_attributes.result.payloads + ) + assert _marker(result) == b"nexus" + + +@pytest.mark.requires_local_server +async def test_nexus_started_workflow_retry_reads_last_failure_with_nexus_context( + env: WorkflowEnvironment, +): + """The retried run decodes the failure the previous run encoded with the Nexus context.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + client = _nexus_started_client( + env, _nexus_started_context(endpoint_name, "start_retried_workflow") + ) + + async with Worker( + client, + task_queue=task_queue, + workflows=[NexusRetriedWorkflow], + nexus_service_handlers=[NexusStartedExecutionHandler()], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + nexus_client = client.create_nexus_client( + NexusStartedExecutionHandler, endpoint_name + ) + # Decoding with the wrong context fails every workflow task of the retried run, which + # never completes + result = await asyncio.wait_for( + nexus_client.execute_operation( + NexusStartedExecutionHandler.start_retried_workflow, + NexusStartedInput( + id=f"nexus-retried-workflow-{uuid.uuid4()}", value="nexus-value" + ), + id=str(uuid.uuid4()), + ), + timeout=30, + ) + assert result == "nexus-value:retry-detail" + + +class _DecodeRecordingPayloadCodec(PayloadCodec, WithSerializationContext): + """Records the context each payload's data is decoded with.""" + + def __init__( + self, + seen: dict[bytes, SerializationContext | None], + context: SerializationContext | None = None, + ): + self.seen = seen + self.context = context + + def with_context( + self, context: SerializationContext + ) -> _DecodeRecordingPayloadCodec: + return _DecodeRecordingPayloadCodec(self.seen, context) + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return list(payloads) + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + for payload in payloads: + self.seen[payload.data] = self.context + return list(payloads) + + +previous_run_converter_contexts: dict[Any, SerializationContext | None] = {} + + +class _FromPayloadRecordingJSONConverter( + JSONPlainPayloadConverter, WithSerializationContext +): + """Records the context each JSON value is converted with.""" + + def __init__(self, context: SerializationContext | None = None): + super().__init__() + self.context = context + + def with_context( + self, context: SerializationContext + ) -> _FromPayloadRecordingJSONConverter: + return _FromPayloadRecordingJSONConverter(context) + + def from_payload( + self, + payload: temporalio.api.common.v1.Payload, + type_hint: type | None = None, + ) -> Any: + value = super().from_payload(payload, type_hint) + previous_run_converter_contexts[value] = self.context + return value + + +class _FromPayloadRecordingPayloadConverter( + CompositePayloadConverter, WithSerializationContext +): + def __init__(self): + super().__init__(_FromPayloadRecordingJSONConverter()) + + +@workflow.defn +class PreviousRunOutcomeWorkflow: + @workflow.run + async def run(self, _input: str) -> None: + workflow.get_last_completion_result() + workflow.get_last_failure() + + +def _json_payload(value: str) -> temporalio.api.common.v1.Payload: + return temporalio.api.common.v1.Payload( + metadata={"encoding": b"json/plain"}, data=json.dumps(value).encode() + ) + + +@pytest.mark.parametrize("with_nexus_context", [True, False]) +async def test_previous_run_outcome_decodes_with_nexus_context( + with_nexus_context: bool, +): + """A retried or cron run decodes the previous run's failure and result with the Nexus context + when the workflow was started by a Nexus handler, and its input and memo with the workflow + context.""" + nexus_context = NexusSerializationContext( + endpoint="endpoint", service="service", operation="operation" + ) + started = temporalio.api.history.v1.WorkflowExecutionStartedEventAttributes( + workflow_type=temporalio.api.common.v1.WorkflowType( + name="PreviousRunOutcomeWorkflow" + ), + task_queue=temporalio.api.taskqueue.v1.TaskQueue(name="task-queue"), + input=temporalio.api.common.v1.Payloads(payloads=[_json_payload("input")]), + memo=temporalio.api.common.v1.Memo( + fields={"memo-key": _json_payload("memo-value")} + ), + continued_failure=temporalio.api.failure.v1.Failure( + message="previous-failure", + application_failure_info=temporalio.api.failure.v1.ApplicationFailureInfo( + details=temporalio.api.common.v1.Payloads( + payloads=[_json_payload("previous-failure-detail")] + ) + ), + ), + last_completion_result=temporalio.api.common.v1.Payloads( + payloads=[_json_payload("previous-result")] + ), + attempt=2, + ) + if with_nexus_context: + started.propagated_nexus_serialization_context.CopyFrom( + temporalio.api.nexus.v1.PropagatedSerializationContext( + endpoint=nexus_context.endpoint, + service=nexus_context.service, + operation=nexus_context.operation, + ) + ) + history = WorkflowHistory( + workflow_id="workflow-id", + events=[ + temporalio.api.history.v1.HistoryEvent( + event_id=1, + event_type=temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED, + workflow_execution_started_event_attributes=started, + ), + temporalio.api.history.v1.HistoryEvent( + event_id=2, + event_type=temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_TASK_SCHEDULED, + workflow_task_scheduled_event_attributes=temporalio.api.history.v1.WorkflowTaskScheduledEventAttributes(), + ), + temporalio.api.history.v1.HistoryEvent( + event_id=3, + event_type=temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_TASK_STARTED, + workflow_task_started_event_attributes=temporalio.api.history.v1.WorkflowTaskStartedEventAttributes( + scheduled_event_id=2 + ), + ), + ], + ) + for event in history.events: + event.event_time.FromSeconds(1_700_000_000) + codec_contexts: dict[bytes, SerializationContext | None] = {} + previous_run_converter_contexts.clear() + + await Replayer( + workflows=[PreviousRunOutcomeWorkflow], + data_converter=DataConverter( + payload_converter_class=_FromPayloadRecordingPayloadConverter, + payload_codec=_DecodeRecordingPayloadCodec(codec_contexts), + ), + workflow_runner=UnsandboxedWorkflowRunner(), + ).replay_workflow(history) + + previous_run_context_type = ( + NexusSerializationContext + if with_nexus_context + else WorkflowSerializationContext + ) + for value in ["previous-failure-detail", "previous-result"]: + assert isinstance( + codec_contexts[json.dumps(value).encode()], previous_run_context_type + ) + assert isinstance( + previous_run_converter_contexts[value], previous_run_context_type + ) + if with_nexus_context: + assert codec_contexts[b'"previous-result"'] == nexus_context + assert previous_run_converter_contexts["previous-result"] == nexus_context + for value in ["input", "memo-value"]: + assert isinstance( + codec_contexts[json.dumps(value).encode()], WorkflowSerializationContext + ) + assert isinstance( + previous_run_converter_contexts["input"], WorkflowSerializationContext + ) + + +@pytest.mark.requires_local_server +async def test_nexus_started_activity_uses_nexus_context(env: WorkflowEnvironment): + """A standalone activity started by a Nexus handler encodes its result, failures and + heartbeat details with the handler's context, and clients decode them with the context the + server returns.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + context = _nexus_started_context(endpoint_name, "start_activity") + client = _nexus_started_client(env, context) + activity_id = f"nexus-started-activity-{uuid.uuid4()}" + nexus_started_activity_contexts.clear() + + async with Worker( + client, + task_queue=task_queue, + activities=[nexus_started_activity], + nexus_service_handlers=[NexusStartedExecutionHandler()], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + result = await client.create_nexus_client( + NexusStartedExecutionHandler, endpoint_name + ).execute_operation( + NexusStartedExecutionHandler.start_activity, + NexusStartedInput(id=activity_id, value="nexus-value"), + id=str(uuid.uuid4()), + ) + assert result == "nexus-value" + # Both attempts saw the context, and the second decoded the first's heartbeat details + assert nexus_started_activity_contexts == [context, context] + + handle = client.get_activity_handle(activity_id, result_type=str) + assert await handle.result() == "nexus-value" + desc = await handle.describe( + include_outcome=True, + include_heartbeat_details=True, + include_last_failure=True, + ) + assert await desc.result(str) == "nexus-value" + assert await desc.heartbeat_details() == ["heartbeat-detail"] + assert isinstance(await desc.last_failure(), ApplicationError) + assert desc.raw_outcome is not None + assert _marker(desc.raw_outcome.result.payloads[0]) == b"nexus" + assert _marker(desc.raw_info.heartbeat_details.payloads[0]) == b"nexus" + + +@pytest.mark.requires_local_server +async def test_nexus_started_activity_failure_uses_nexus_context( + env: WorkflowEnvironment, +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + client = _nexus_started_client( + env, _nexus_started_context(endpoint_name, "start_activity") + ) + activity_id = f"nexus-started-activity-{uuid.uuid4()}" + + async with Worker( + client, + task_queue=task_queue, + activities=[nexus_started_activity], + nexus_service_handlers=[NexusStartedExecutionHandler()], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + with pytest.raises(NexusOperationFailureError): + await client.create_nexus_client( + NexusStartedExecutionHandler, endpoint_name + ).execute_operation( + NexusStartedExecutionHandler.start_activity, + NexusStartedInput(id=activity_id, value="", outcome="failure"), + id=str(uuid.uuid4()), + ) + + handle = client.get_activity_handle(activity_id, result_type=str) + with pytest.raises(ActivityFailureError) as err: + await handle.result() + assert isinstance(err.value.cause, ApplicationError) + assert err.value.cause.details == ("failure-detail",) + desc = await handle.describe(include_outcome=True) + outcome_failure = await desc.outcome_failure() + assert isinstance(outcome_failure, ApplicationError) + assert outcome_failure.details == ("failure-detail",) + + +@pytest.mark.requires_local_server +async def test_nexus_started_activity_async_completion_with_context( + env: WorkflowEnvironment, +): + """An activity started by a Nexus handler and completed asynchronously uses the context the + completing client passes in from the activity info.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + context = _nexus_started_context(endpoint_name, "start_activity") + client = _nexus_started_client(env, context) + activity_id = f"nexus-started-activity-{uuid.uuid4()}" + nexus_started_async_completions.clear() + + async with Worker( + client, + task_queue=task_queue, + activities=[nexus_started_activity], + nexus_service_handlers=[NexusStartedExecutionHandler()], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + operation = await client.create_nexus_client( + NexusStartedExecutionHandler, endpoint_name + ).start_operation( + NexusStartedExecutionHandler.start_activity, + NexusStartedInput(id=activity_id, value="", outcome="async"), + id=str(uuid.uuid4()), + ) + + async def activity_started() -> bool: + return bool(nexus_started_async_completions) + + await assert_eq_eventually(True, activity_started) + [(task_token, info_context)] = nexus_started_async_completions + assert info_context is not None + assert info_context == context + async_handle = client.get_async_activity_handle( + task_token=task_token + ).with_context(info_context) + await async_handle.heartbeat("client-heartbeat") + desc = await client.get_activity_handle(activity_id).describe( + include_heartbeat_details=True + ) + assert await desc.heartbeat_details() == ["client-heartbeat"] + assert _marker(desc.raw_info.heartbeat_details.payloads[0]) == b"nexus" + await async_handle.complete("async-value") + assert await operation.result() == "async-value" + assert ( + await client.get_activity_handle(activity_id, result_type=str).result() + == "async-value" + ) + + +class _UpdateOutcomeCapturingInterceptor(Interceptor): + def __init__(self) -> None: + super().__init__() + self.outcomes: list[temporalio.api.update.v1.Outcome] = [] + + def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor: + return _UpdateOutcomeCapturingOutboundInterceptor(next, self) + + +class _UpdateOutcomeCapturingOutboundInterceptor(OutboundInterceptor): + def __init__( + self, next: OutboundInterceptor, parent: _UpdateOutcomeCapturingInterceptor + ) -> None: + super().__init__(next) + self._parent = parent + + async def start_workflow_update( + self, input: StartWorkflowUpdateInput + ) -> WorkflowUpdateHandle[Any]: + handle = await super().start_workflow_update(input) + if handle._known_outcome: + # Copy, since decoding the outcome's failure later modifies it in place + outcome = temporalio.api.update.v1.Outcome() + outcome.CopyFrom(handle._known_outcome) + self._parent.outcomes.append(outcome) + return handle + + +@pytest.mark.requires_local_server +@pytest.mark.parametrize("value", ["result", "failure", "rejection"]) +async def test_nexus_sent_update_uses_nexus_context( + env: WorkflowEnvironment, + value: Literal["result", "failure", "rejection"], +): + """An update sent by a Nexus handler encodes its result, failure and rejection with the + handler's context, and clients decode them with the context the server returns.""" + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the Java test server") + + task_queue = str(uuid.uuid4()) + endpoint_name = make_nexus_endpoint_name(task_queue) + context = _nexus_started_context(endpoint_name, "update_workflow") + # Rejected updates aren't stored in history, so the test reads the rejection from the + # update response the handler receives + outcome_capture = _UpdateOutcomeCapturingInterceptor() + config = _nexus_started_client(env, context).config() + config["interceptors"] = [outcome_capture] + client = Client(**config) + update_id = str(uuid.uuid4()) + + async with Worker( + client, + task_queue=task_queue, + workflows=[NexusUpdatedWorkflow], + nexus_service_handlers=[NexusStartedExecutionHandler()], + ): + await env.create_nexus_endpoint(endpoint_name, task_queue) + handle = await client.start_workflow( + NexusUpdatedWorkflow.run, + id=f"nexus-updated-workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + operation = client.create_nexus_client( + NexusStartedExecutionHandler, endpoint_name + ).execute_operation( + NexusStartedExecutionHandler.update_workflow, + NexusUpdateInput(workflow_id=handle.id, update_id=update_id, value=value), + id=str(uuid.uuid4()), + ) + if value == "result": + assert await operation == "result" + else: + with pytest.raises(NexusOperationFailureError): + await operation + + if value == "rejection": + [outcome] = outcome_capture.outcomes + [detail] = outcome.failure.application_failure_info.details.payloads + assert _marker(detail) == b"nexus" + else: + # This handle never sent the update, so it relies on the context the server returns + update_handle = handle.get_update_handle(update_id, result_type=str) + if value == "result": + assert await update_handle.result() == "result" + else: + with pytest.raises(WorkflowUpdateFailedError) as err: + await update_handle.result() + assert isinstance(err.value.cause, ApplicationError) + assert err.value.cause.details == ("failure-detail",) + + await handle.signal(NexusUpdatedWorkflow.finish) + await handle.result() + + history = await handle.fetch_history() + if value != "rejection": + [accepted] = [ + e.workflow_execution_update_accepted_event_attributes + for e in history.events + if e.HasField("workflow_execution_update_accepted_event_attributes") + ] + assert ( + accepted.accepted_request.propagated_nexus_serialization_context + == temporalio.api.nexus.v1.PropagatedSerializationContext( + endpoint=context.endpoint, + service=context.service, + operation=context.operation, + ) + ) + # The input keeps the workflow context + assert all( + _marker(p) is None + for p in accepted.accepted_request.input.args.payloads + ) + [completed] = [ + e.workflow_execution_update_completed_event_attributes + for e in history.events + if e.HasField("workflow_execution_update_completed_event_attributes") + ] + if value == "result": + [result] = completed.outcome.success.payloads + assert _marker(result) == b"nexus" + else: + failure = completed.outcome.failure + [detail] = failure.application_failure_info.details.payloads + assert _marker(detail) == b"nexus" + + # Replaying re-runs the update handler with the context from history + await Replayer( + workflows=[NexusUpdatedWorkflow], data_converter=client.data_converter + ).replay_workflow(history) diff --git a/tests/test_service.py b/tests/test_service.py index 61acf7dedc..1fa5ff8a70 100644 --- a/tests/test_service.py +++ b/tests/test_service.py @@ -1,10 +1,13 @@ +import asyncio import inspect import os import re +import socket from collections.abc import Callable, Mapping from datetime import timedelta -from typing import Any, Dict, Tuple, Type +from typing import Any +import google.protobuf.descriptor_pb2 import google.protobuf.empty_pb2 import google.protobuf.message import google.protobuf.symbol_database @@ -47,7 +50,7 @@ def assert_all_calls_present( ) -> None: # Collect service calls service_calls = set() - for name, call in inspect.getmembers(service): + for name, _call in inspect.getmembers(service): # ignore private methods and non-rpc members "client" and "service" if name[0] != "_" and name != "client" and name != "service": service_calls.add(name) @@ -149,8 +152,9 @@ async def test_check_health(client: Client): assert err.value.status == temporalio.service.RPCStatusCode.NOT_FOUND +@pytest.mark.requires_local_server async def test_grpc_status(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1557" ) @@ -219,6 +223,47 @@ def test_connect_config_tls_explicit_config_preserved(): assert config.tls == tls_config +def test_connect_config_dns_load_balancing_custom(): + """Custom DnsLoadBalancingConfig is forwarded to the bridge unchanged.""" + config = temporalio.service.ConnectConfig( + target_host="localhost:7233", + dns_load_balancing_config=temporalio.service.DnsLoadBalancingConfig( + resolution_interval_millis=5000, + ), + ) + bridge_config = config._to_bridge_config() + assert bridge_config.dns_load_balancing_config is not None + assert bridge_config.dns_load_balancing_config.resolution_interval_millis == 5000 + + +def test_connect_config_dns_load_balancing_disabled(): + """Setting dns_load_balancing_config=None forwards None to the bridge.""" + config = temporalio.service.ConnectConfig( + target_host="localhost:7233", + dns_load_balancing_config=None, + ) + bridge_config = config._to_bridge_config() + assert bridge_config.dns_load_balancing_config is None + + +def test_connect_config_grpc_compression_default(): + """gRPC compression defaults to gzip and is forwarded to the bridge.""" + config = temporalio.service.ConnectConfig(target_host="localhost:7233") + bridge_config = config._to_bridge_config() + assert config.grpc_compression == temporalio.service.GrpcCompression.GZIP + assert bridge_config.grpc_compression == "gzip" + + +def test_connect_config_grpc_compression_none(): + """gRPC compression can be disabled and is forwarded to the bridge.""" + config = temporalio.service.ConnectConfig( + target_host="localhost:7233", + grpc_compression=temporalio.service.GrpcCompression.NONE, + ) + bridge_config = config._to_bridge_config() + assert bridge_config.grpc_compression == "none" + + async def test_rpc_execution_not_unknown(client: Client): """ Execute each rpc method and expect a failure, but ensure the failure is not that the rpc method is unknown @@ -229,7 +274,9 @@ async def test_rpc_execution_not_unknown(client: Client): async def test_method( target_service_name: str, method_descriptor: MethodDescriptor ): - if method_descriptor.client_streaming or method_descriptor.server_streaming: + method_proto = google.protobuf.descriptor_pb2.MethodDescriptorProto() + method_descriptor.CopyToProto(method_proto) + if method_proto.client_streaming or method_proto.server_streaming: # skip streaming calls return @@ -249,9 +296,9 @@ async def test_method( try: await rpc_call(request, timeout=timedelta(milliseconds=1)) except ValueError as err: - assert ( - "Unknown RPC call" not in str(err) - ), f"Unexpected unknown-RPC error for {target_service_name}.{method_name}: {err}" + assert "Unknown RPC call" not in str(err), ( + f"Unexpected unknown-RPC error for {target_service_name}.{method_name}: {err}" + ) except temporalio.service.RPCError: pass @@ -289,3 +336,58 @@ async def test_service( proto_service="Health", target_service_name="health_service", ) + + +@pytest.mark.parametrize("timeout", [None, timedelta(0), timedelta(milliseconds=1250)]) +def test_connect_config_connect_timeout(timeout: timedelta | None): + config = temporalio.service.ConnectConfig( + target_host="localhost:7233", connect_timeout=timeout + ) + assert config._to_bridge_config().connect_timeout_millis == ( + None if timeout is None else int(timeout.total_seconds() * 1000) + ) + + +async def test_connect_timeout_bounds_tcp_connection(): + listener = socket.socket() + connections: list[socket.socket] = [] + try: + listener.bind(("127.0.0.1", 0)) + listener.listen(1) + address = listener.getsockname() + loop = asyncio.get_running_loop() + # Fill the accept queue without accepting connections, so subsequent TCP + # attempts stall locally instead of depending on an unreachable remote IP. + for _ in range(128): + connection = socket.socket() + connections.append(connection) + connection.setblocking(False) + try: + await asyncio.wait_for(loop.sock_connect(connection, address), 0.1) + except asyncio.TimeoutError: + break + else: + pytest.fail("Could not fill the listener's accept queue") + + with pytest.raises(RuntimeError, match="tcp connect error.*TimedOut"): + await asyncio.wait_for( + Client.connect( + f"127.0.0.1:{address[1]}", + connect_timeout=timedelta(milliseconds=100), + ), + timeout=5, + ) + finally: + for connection in connections: + connection.close() + listener.close() + + +async def test_connect_timeout_allows_healthy_connection(client: Client): + connect_args = vars(client.service_client.config).copy() + connect_args["connect_timeout"] = timedelta(seconds=5) + connect_args["lazy"] = False + connected = await Client.connect(**connect_args) + await connected.workflow_service.get_system_info( + temporalio.api.workflowservice.v1.GetSystemInfoRequest() + ) diff --git a/tests/test_tls.py b/tests/test_tls.py new file mode 100644 index 0000000000..cc0eddde94 --- /dev/null +++ b/tests/test_tls.py @@ -0,0 +1,227 @@ +"""Tests for :py:attr:`temporalio.service.TLSConfig.verification_server_name`. + +Each test runs an in-process TLS server whose certificate is valid only for +``pinned.test`` while the client always dials ``localhost``, so no Temporal +server is needed. The server records each handshake's outcome and the SNI it +received. +""" + +from __future__ import annotations + +import asyncio +import datetime +import socket +import ssl +import threading +from collections.abc import AsyncIterator +from dataclasses import dataclass +from pathlib import Path + +import pytest +import pytest_asyncio +from cryptography import x509 +from cryptography.hazmat.primitives import hashes, serialization +from cryptography.hazmat.primitives.asymmetric import ec +from cryptography.x509.oid import NameOID + +import temporalio.service + +PINNED_NAME = "pinned.test" + + +def test_tls_config_verification_server_name_reaches_bridge(): + config = temporalio.service.TLSConfig(verification_server_name=PINNED_NAME) + assert config._to_bridge_config().verification_server_name == PINNED_NAME + default = temporalio.service.TLSConfig() + assert default._to_bridge_config().verification_server_name is None + + +async def test_tls_verification_server_name_requires_root_ca(): + # The check is enforced when building connection options, before any dial. + with pytest.raises(ValueError, match="server root CA cert"): + await temporalio.service.ServiceClient.connect( + temporalio.service.ConnectConfig( + target_host="localhost:1", + tls=temporalio.service.TLSConfig(verification_server_name=PINNED_NAME), + ) + ) + + +async def test_tls_default_verification_rejects_unmatched_name(tls_server: _TlsServer): + # Baseline for the tests below: the certificate is only valid for the + # pinned name, so verifying against the dialed host rejects it. + handshake = await _handshake( + tls_server, temporalio.service.TLSConfig(server_root_ca_cert=tls_server.ca_pem) + ) + assert not handshake.ok + + +async def test_tls_verification_server_name_decouples_verification_from_sni( + tls_server: _TlsServer, +): + # Verification against the pinned name succeeds, while the SNI the server + # sees is still the dialed host rather than the pinned name. + handshake = await _handshake( + tls_server, + temporalio.service.TLSConfig( + server_root_ca_cert=tls_server.ca_pem, + verification_server_name=PINNED_NAME, + ), + ) + assert handshake.ok + assert handshake.sni == "localhost" + + +async def test_tls_verification_server_name_is_enforced(tls_server: _TlsServer): + # A pinned name the certificate does not carry is still rejected; the + # option redirects verification rather than disabling it. + handshake = await _handshake( + tls_server, + temporalio.service.TLSConfig( + server_root_ca_cert=tls_server.ca_pem, + verification_server_name="wrong.test", + ), + ) + assert not handshake.ok + + +@dataclass +class _Handshake: + ok: bool + sni: str | None + + +async def _handshake( + server: _TlsServer, tls: temporalio.service.TLSConfig +) -> _Handshake: + """Attempt a connection and return the server's view of the handshake.""" + config = temporalio.service.ConnectConfig( + target_host=f"localhost:{server.port}", tls=tls + ) + # The connect always fails since this server speaks no gRPC; only whether + # the TLS handshake completed matters. + try: + await asyncio.wait_for(temporalio.service.ServiceClient.connect(config), 20) + except asyncio.TimeoutError: + raise + except Exception: + pass + else: + pytest.fail("connect unexpectedly succeeded") + return await server.next_handshake() + + +class _TlsServer: + """TLS server that records handshake outcomes and the SNI it receives.""" + + def __init__(self, certs: Path) -> None: + self.ca_pem = (certs / "ca.pem").read_bytes() + self._ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) + self._ctx.load_cert_chain(certs / "srv.pem", certs / "srv.key") + self._ctx.set_alpn_protocols(["h2"]) + # Populated by the SNI callback for the connection currently + # handshaking; the accept loop is single-threaded. + self._sni: str | None = None + + def on_sni( + _sock: ssl.SSLObject, name: str | None, _ctx: ssl.SSLContext + ) -> None: + self._sni = name + + self._ctx.sni_callback = on_sni + self._handshakes: list[_Handshake] = [] + self._lock = threading.Lock() + self._stop = threading.Event() + self._sock = socket.create_server(("127.0.0.1", 0)) + self._sock.settimeout(0.1) + self.port: int = self._sock.getsockname()[1] + self._thread = threading.Thread(target=self._serve, daemon=True) + self._thread.start() + + def _serve(self) -> None: + while not self._stop.is_set(): + try: + conn, _ = self._sock.accept() + except TimeoutError: + continue + conn.settimeout(10) # A stalled handshake must not wedge this loop. + self._sni = None + try: + tls = self._ctx.wrap_socket(conn, server_side=True) + except (ssl.SSLError, OSError): + conn.close() + self._record(_Handshake(ok=False, sni=self._sni)) + continue + self._record(_Handshake(ok=True, sni=self._sni)) + tls.close() + self._sock.close() + + def _record(self, handshake: _Handshake) -> None: + with self._lock: + self._handshakes.append(handshake) + + async def next_handshake(self) -> _Handshake: + """Wait for and consume the next recorded handshake.""" + # The client can report its result before this thread has recorded + # the outcome, so wait for the observation to land. + for _ in range(200): + with self._lock: + if self._handshakes: + return self._handshakes.pop(0) + await asyncio.sleep(0.05) + raise AssertionError("server observed no TLS handshake") + + def close(self) -> None: + self._stop.set() + self._thread.join(timeout=2) + + +@pytest_asyncio.fixture # type: ignore[reportUntypedFunctionDecorator] +async def tls_server(tmp_path: Path) -> AsyncIterator[_TlsServer]: + _write_pinned_certs(tmp_path) + server = _TlsServer(tmp_path) + try: + yield server + finally: + server.close() + + +def _write_pinned_certs(path: Path) -> None: + """Write a CA and a server cert (chained to it) valid only for ``pinned.test``.""" + now = datetime.datetime.now(datetime.timezone.utc) + ca_key = ec.generate_private_key(ec.SECP256R1()) + ca_name = x509.Name([x509.NameAttribute(NameOID.COMMON_NAME, "test-ca")]) + ca_cert = ( + x509.CertificateBuilder() + .subject_name(ca_name) + .issuer_name(ca_name) + .public_key(ca_key.public_key()) + .serial_number(x509.random_serial_number()) + .not_valid_before(now - datetime.timedelta(days=1)) + .not_valid_after(now + datetime.timedelta(days=7)) + .add_extension(x509.BasicConstraints(ca=True, path_length=None), critical=True) + .sign(ca_key, hashes.SHA256()) + ) + server_key = ec.generate_private_key(ec.SECP256R1()) + server_cert = ( + x509.CertificateBuilder() + .subject_name(x509.Name([x509.NameAttribute(NameOID.COMMON_NAME, PINNED_NAME)])) + .issuer_name(ca_name) + .public_key(server_key.public_key()) + .serial_number(x509.random_serial_number()) + .not_valid_before(now - datetime.timedelta(days=1)) + .not_valid_after(now + datetime.timedelta(days=7)) + .add_extension( + x509.SubjectAlternativeName([x509.DNSName(PINNED_NAME)]), critical=False + ) + .sign(ca_key, hashes.SHA256()) + ) + (path / "ca.pem").write_bytes(ca_cert.public_bytes(serialization.Encoding.PEM)) + (path / "srv.pem").write_bytes(server_cert.public_bytes(serialization.Encoding.PEM)) + (path / "srv.key").write_bytes( + server_key.private_bytes( + serialization.Encoding.PEM, + serialization.PrivateFormat.PKCS8, + serialization.NoEncryption(), + ) + ) diff --git a/tests/test_type_errors.py b/tests/test_type_errors.py index d8e6e2afbc..2b70d7f63c 100644 --- a/tests/test_type_errors.py +++ b/tests/test_type_errors.py @@ -86,7 +86,7 @@ def _test_type_errors( def _has_type_error_assertions(test_file: Path) -> bool: """Check if a file contains any type error assertions.""" - with open(test_file) as f: + with open(test_file, encoding="utf-8") as f: return any(re.search(r"# assert-type-error-\w+:", line) for line in f) @@ -94,7 +94,7 @@ def _get_expected_errors(test_file: Path, type_checker: str) -> dict[int, str]: """Parse expected type errors from comments in a file for the specified type checker.""" expected_errors = {} - with open(test_file) as f: + with open(test_file, encoding="utf-8") as f: lines = zip(itertools.count(1), f) for line_num, line in lines: if match := re.search( diff --git a/tests/test_update_core.py b/tests/test_update_core.py new file mode 100644 index 0000000000..6d1edd44a4 --- /dev/null +++ b/tests/test_update_core.py @@ -0,0 +1,207 @@ +from __future__ import annotations + +import pathlib +import subprocess + +import pytest +import tomlkit + +import scripts.update_core + + +@pytest.mark.parametrize( + "tags, expected", + [ + ( + "core-v0.9.0\ncore-v0.11.0\ncore-v0.10.2\ncore-v0.12.0-rc.1\n" + "sdk-v99.0.0\ncore-v0.11.1\n", + "core-v0.11.1", + ), + ("core-v1.0.0\ncore-v0.99.0\n", "core-v1.0.0"), + ], +) +def test_latest_core_tag( + tmp_path: pathlib.Path, + monkeypatch: pytest.MonkeyPatch, + tags: str, + expected: str, +) -> None: + (tmp_path / "temporalio/bridge/sdk-core/.git").mkdir(parents=True) + calls: list[list[str]] = [] + + def run(command: list[str], **kwargs: object) -> subprocess.CompletedProcess[str]: + assert kwargs["cwd"] == tmp_path / "temporalio/bridge/sdk-core" + assert kwargs["check"] is True + calls.append(command) + return subprocess.CompletedProcess(command, 0, tags) + + monkeypatch.setattr(subprocess, "run", run) + assert scripts.update_core.latest_core_tag(tmp_path) == expected + assert calls == [ + ["git", "fetch", "origin", "--tags"], + ["git", "tag", "--list", "core-v*"], + ] + + +def test_latest_core_tag_requires_stable_release( + tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch +) -> None: + (tmp_path / "temporalio/bridge/sdk-core/.git").mkdir(parents=True) + monkeypatch.setattr( + subprocess, + "run", + lambda *args, **kwargs: subprocess.CompletedProcess( + [], 0, "core-v1.0.0-rc.1\n" + ), + ) + with pytest.raises(RuntimeError, match="No stable"): + scripts.update_core.latest_core_tag(tmp_path) + + +def test_latest_core_tag_requires_initialized_submodule(tmp_path: pathlib.Path) -> None: + with pytest.raises(RuntimeError, match="git submodule update --init"): + scripts.update_core.latest_core_tag(tmp_path) + + +@pytest.mark.parametrize( + "args, expected", + [ + ([], []), + (["--latest-tag"], ["--revision", "core-v0.11.0"]), + (["--revision", "main"], ["--revision", "main"]), + (["--revision=main"], ["--revision", "main"]), + ], +) +def test_update_core_orders_import_lock_and_protos( + tmp_path: pathlib.Path, + monkeypatch: pytest.MonkeyPatch, + args: list[str], + expected: list[str], +) -> None: + calls: list[str] = [] + + def latest(_root: pathlib.Path) -> str: + calls.append("tag") + return "core-v0.11.0" + + def import_core(_root: pathlib.Path, tool_args: list[str]) -> str: + assert tool_args == [ + "update-core", + "--submodule", + "temporalio/bridge/sdk-core", + *expected, + ] + calls.append("import") + return "" + + def generate(command: list[str], **kwargs: object) -> None: + assert command == ["poe", "gen-protos"] + assert kwargs == {"cwd": tmp_path, "check": True} + calls.append("protos") + + monkeypatch.setattr(scripts.update_core, "latest_core_tag", latest) + monkeypatch.setattr(scripts.update_core, "run_tool", import_core) + monkeypatch.setattr( + scripts.update_core, + "update_bridge_dependencies", + lambda _root: calls.append("lock"), + ) + monkeypatch.setattr(subprocess, "run", generate) + scripts.update_core.update_core(tmp_path, args) + assert calls == (["tag"] if args == ["--latest-tag"] else []) + [ + "import", + "lock", + "protos", + ] + + +@pytest.mark.parametrize("revision", [["--revision", "main"], ["--revision=main"]]) +def test_latest_tag_and_revision_are_mutually_exclusive( + tmp_path: pathlib.Path, revision: list[str] +) -> None: + with pytest.raises(SystemExit) as err: + scripts.update_core.update_core(tmp_path, ["--latest-tag", *revision]) + assert err.value.code == 2 + + +def write_crate(path: pathlib.Path, name: str, version: str) -> None: + path.mkdir(parents=True, exist_ok=True) + (path / "Cargo.toml").write_text( + f'[package]\nname = "{name}"\nversion = "{version}"\nedition = "2021"\n' + ) + (path / "src").mkdir(exist_ok=True) + (path / "src/lib.rs").write_text("") + + +def bridge_fixture(tmp_path: pathlib.Path) -> pathlib.Path: + bridge = tmp_path / "temporalio/bridge" + write_crate(bridge, "bridge-fixture", "0.1.0") + write_crate(bridge / "sdk-core/core", "core-fixture", "0.10.0") + write_crate(bridge / "sdk-core/client", "client-fixture", "1.1.0") + write_crate(bridge / "other", "other-fixture", "1.2.0") + (bridge / "Cargo.toml").write_text( + (bridge / "Cargo.toml").read_text() + + "\n[dependencies]\n" + + "# Keep this comment and formatting.\n" + + 'core = { package = "core-fixture", version = "0.9", path = "sdk-core/core" }\n' + + 'client = { package = "client-fixture", version = "1.0", path = "sdk-core/client" }\n' + + 'other = { package = "other-fixture", version = "1.0", path = "other" }\n' + ) + return bridge + + +def test_update_repairs_manifest_preserves_format_and_refreshes_real_lockfile( + tmp_path: pathlib.Path, +) -> None: + bridge = bridge_fixture(tmp_path) + manifest = bridge / "Cargo.toml" + original = manifest.read_text() + scripts.update_core.update_bridge_dependencies(tmp_path) + assert manifest.read_text() == original.replace( + 'version = "0.9"', 'version = "0.10.0"' + ).replace( + 'package = "client-fixture", version = "1.0"', + 'package = "client-fixture", version = "1.1.0"', + ) + lock_path = bridge / "Cargo.lock" + lock = tomlkit.parse(lock_path.read_text()).unwrap() + assert any( + package["name"] == "core-fixture" and package["version"] == "0.10.0" + for package in lock["package"] + ) + before = manifest.read_bytes(), lock_path.read_bytes() + scripts.update_core.update_bridge_dependencies(tmp_path) + assert before == (manifest.read_bytes(), lock_path.read_bytes()) + + +def test_failed_core_update_does_not_change_bridge_files( + tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch +) -> None: + bridge = bridge_fixture(tmp_path) + manifest = bridge / "Cargo.toml" + original = manifest.read_bytes() + + def fail(_root: pathlib.Path, _args: list[str]) -> str: + raise RuntimeError("Core import failed") + + monkeypatch.setattr(scripts.update_core, "run_tool", fail) + with pytest.raises(RuntimeError, match="Core import failed"): + scripts.update_core.update_core(tmp_path, ["--revision", "main"]) + assert manifest.read_bytes() == original + assert not (bridge / "Cargo.lock").exists() + + +def test_refresh_failure_leaves_manifest_for_review( + tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch +) -> None: + bridge = bridge_fixture(tmp_path) + + def fail(command: list[str], **kwargs: object) -> None: + assert command == ["cargo", "update"] + assert kwargs == {"cwd": bridge, "check": True} + raise subprocess.CalledProcessError(1, command) + + monkeypatch.setattr(subprocess, "run", fail) + with pytest.raises(subprocess.CalledProcessError): + scripts.update_core.update_bridge_dependencies(tmp_path) + assert 'version = "0.10.0"' in (bridge / "Cargo.toml").read_text() diff --git a/tests/test_workflow.py b/tests/test_workflow.py index f467759750..5221395715 100644 --- a/tests/test_workflow.py +++ b/tests/test_workflow.py @@ -2,7 +2,7 @@ import itertools import typing from collections.abc import Callable, Sequence -from typing import Any, Set, Type, get_type_hints +from typing import Any, get_type_hints import pytest @@ -12,7 +12,7 @@ class GoodDefnBase: @workflow.run - async def run(self, name: str) -> str: + async def run(self, _name: str) -> str: raise NotImplementedError @workflow.signal @@ -31,7 +31,7 @@ def base_update(self): @workflow.defn(name="workflow-custom") class GoodDefn(GoodDefnBase): @workflow.run - async def run(self, name: str) -> str: + async def run(self, _name: str) -> str: raise NotImplementedError @workflow.signal @@ -43,7 +43,7 @@ def signal2(self): pass @workflow.signal(dynamic=True, description="boo") - def signal3(self, name: str, args: Sequence[RawValue]): + def signal3(self, _name: str, _args: Sequence[RawValue]): pass @workflow.query @@ -55,7 +55,7 @@ def query2(self): pass @workflow.query(dynamic=True, description="dqd") - def query3(self, name: str, args: Sequence[RawValue]): + def query3(self, _name: str, _args: Sequence[RawValue]): pass @workflow.update @@ -67,7 +67,7 @@ def update2(self): pass @workflow.update(dynamic=True, description="dud") - def update3(self, name: str, args: Sequence[RawValue]): + def update3(self, _name: str, _args: Sequence[RawValue]): pass @@ -76,19 +76,19 @@ class GoodDefnDeprecatedTypes(GoodDefnBase): # Just having the definition here is enough to confirm the signatures # do not trigger a RuntimeError @workflow.run - async def run(self, name: str) -> str: + async def run(self, _name: str) -> str: raise NotImplementedError @workflow.signal(dynamic=True) - def signal(self, name: str, args: typing.Sequence[RawValue]): + def signal(self, _name: str, _args: typing.Sequence[RawValue]): # type: ignore[reportDeprecated] pass @workflow.query(dynamic=True) - def query(self, name: str, args: typing.Sequence[RawValue]): + def query(self, _name: str, _args: typing.Sequence[RawValue]): # type: ignore[reportDeprecated] pass @workflow.update(dynamic=True) - def update(self, name: str, args: typing.Sequence[RawValue]): + def update(self, _name: str, _args: typing.Sequence[RawValue]): # type: ignore[reportDeprecated] pass @@ -160,7 +160,7 @@ def test_workflow_defn_good(): @workflow.defn(versioning_behavior=VersioningBehavior.PINNED) class VersioningBehaviorDefn: @workflow.run - async def run(self, name: str) -> str: + async def run(self, _name: str) -> str: raise NotImplementedError @@ -205,11 +205,11 @@ def signal2(self): pass @workflow.signal(dynamic=True) - def signal3(self, name: str, args: Sequence[RawValue]): + def signal3(self, _name: str, _args: Sequence[RawValue]): pass @workflow.signal(dynamic=True) - def signal4(self, name: str, args: Sequence[RawValue]): + def signal4(self, _name: str, _args: Sequence[RawValue]): pass # Intentionally missing decorator @@ -225,11 +225,11 @@ def query2(self): pass @workflow.query(dynamic=True) - def query3(self, name: str, args: Sequence[RawValue]): + def query3(self, _name: str, _args: Sequence[RawValue]): pass @workflow.query(dynamic=True) - def query4(self, name: str, args: Sequence[RawValue]): + def query4(self, _name: str, _args: Sequence[RawValue]): pass # Intentionally missing decorator @@ -237,11 +237,11 @@ def base_query(self): pass @workflow.update - def update1(self, arg1: str): + def update1(self, _arg1: str): pass @workflow.update(name="update1") - def update2(self, arg1: str): + def update2(self, _arg1: str): pass # Intentionally missing decorator @@ -293,7 +293,7 @@ def test_workflow_defn_local_class(): with pytest.raises(ValueError) as err: @workflow.defn - class LocalClass: + class LocalClass: # type:ignore[reportUnusedClass] @workflow.run async def run(self): pass @@ -409,31 +409,31 @@ def a1(self, a): # type: ignore[reportMissingParameterType] def a2(self, b): # type: ignore[reportMissingParameterType] pass - def b1(self, a: int): + def b1(self, _a: int): pass - def b2(self, b: int) -> str: + def b2(self, _b: int) -> str: return "" - def c1(self, a1: int, a2: str) -> str: + def c1(self, _a1: int, _a2: str) -> str: return "" - def c2(self, b1: int, b2: str) -> int: + def c2(self, _b1: int, _b2: str) -> int: return 0 - def d1(self, a1, a2: str) -> None: # type: ignore[reportMissingParameterType] + def d1(self, _a1, _a2: str) -> None: # type: ignore[reportMissingParameterType] pass - def d2(self, b1, b2: str) -> str: # type: ignore[reportMissingParameterType] + def d2(self, _b1, _b2: str) -> str: # type: ignore[reportMissingParameterType] return "" - def e1(self, a1, a2: str = "") -> None: # type: ignore[reportMissingParameterType] + def e1(self, _a1, _a2: str = "") -> None: # type: ignore[reportMissingParameterType] return None - def e2(self, b1, b2: str = "") -> str: # type: ignore[reportMissingParameterType] + def e2(self, _b1, _b2: str = "") -> str: # type: ignore[reportMissingParameterType] return "" - def f1(self, a1, a2: str = "a") -> None: # type: ignore[reportMissingParameterType] + def f1(self, _a1, _a2: str = "a") -> None: # type: ignore[reportMissingParameterType] return None @@ -446,9 +446,9 @@ def test_parameters_identical_up_to_naming(): for f1, f2 in itertools.combinations(fns, 2): name1, name2 = f1.__name__, f2.__name__ expect_equal = name1[0] == name2[0] - assert ( - workflow._parameters_identical_up_to_naming(f1, f2) == (expect_equal) - ), f"expected {name1} and {name2} parameters{' ' if expect_equal else ' not '}to compare equal" + assert workflow._parameters_identical_up_to_naming(f1, f2) == (expect_equal), ( + f"expected {name1} and {name2} parameters{' ' if expect_equal else ' not '}to compare equal" + ) @workflow.defn @@ -469,12 +469,12 @@ def test_workflow_init_not__init__(): class BadUpdateValidator: @workflow.update - def my_update(self, a: str): + def my_update(self, _a: str): pass # assert-type-error-pyright: "Argument of type .+ cannot be assigned to parameter" @my_update.validator # type: ignore - def my_validator(self, a: int): + def my_validator(self, _a: int): pass @workflow.run @@ -491,12 +491,47 @@ def test_workflow_update_validator_not_update(): ) +def test_workflow_update_validator_async(): + # The validator decorator itself raises, so the class body fails to execute + with pytest.raises(ValueError) as err: + + class AsyncUpdateValidator: # type:ignore[reportUnusedClass] + @workflow.update + async def my_update(self, _a: str): + pass + + # assert-type-error-pyright: "Argument of type .+ cannot be assigned to parameter" + @my_update.validator # type: ignore + async def my_validator(self, _a: str): + pass + + assert "Update validator must not be an async function" in str(err.value) + + +class SyncUpdateValidator: + @workflow.update + async def my_update(self, _a: str): + pass + + @my_update.validator + def my_validator(self, _a: str) -> None: + pass + + @workflow.run + async def run(self): + pass + + +def test_workflow_update_validator_sync(): + defn = workflow._Definition.must_from_class(workflow.defn(SyncUpdateValidator)) + assert defn.updates["my_update"].validator is SyncUpdateValidator.my_validator + + def _assert_config_function_parity( function_obj: Callable[..., Any], config_class: type[Any], excluded_params: set[str], ) -> None: - function_name = function_obj.__name__ config_name = config_class.__name__ # Get the signature and type hints diff --git a/tests/test_workflow_exports.py b/tests/test_workflow_exports.py new file mode 100644 index 0000000000..1b40149fce --- /dev/null +++ b/tests/test_workflow_exports.py @@ -0,0 +1,219 @@ +import temporalio.workflow + +# Generated from temporalio.workflow on main +EXPECTED_WORKFLOW_EXPORTS = [ + "ActivityCancellationType", + "ActivityConfig", + "ActivityHandle", + "AnyType", + "CallableAsyncNoParam", + "CallableAsyncSingleParam", + "CallableAsyncType", + "CallableSyncNoParam", + "CallableSyncOrAsyncReturnNoneType", + "CallableSyncOrAsyncType", + "CallableSyncSingleParam", + "CallableType", + "ChildWorkflowCancellationType", + "ChildWorkflowConfig", + "ChildWorkflowHandle", + "ClassType", + "ContinueAsNewError", + "ContinueAsNewVersioningBehavior", + "DynamicWorkflowConfig", + "EventGroup", + "ExternalWorkflowHandle", + "HandlerUnfinishedPolicy", + "Info", + "LocalActivityConfig", + "LoggerAdapter", + "MethodAsyncNoParam", + "MethodAsyncSingleParam", + "MethodSyncNoParam", + "MethodSyncOrAsyncNoParam", + "MethodSyncOrAsyncSingleParam", + "MethodSyncSingleParam", + "MultiParamSpec", + "NexusClient", + "NexusOperationCancellationType", + "NexusOperationHandle", + "NondeterminismError", + "ParamType", + "ParentClosePolicy", + "ParentInfo", + "ProtocolReturnType", + "ReadOnlyContextError", + "ReturnType", + "RootInfo", + "SandboxImportNotificationPolicy", + "SelfType", + "UnfinishedSignalHandlersWarning", + "UnfinishedUpdateHandlersWarning", + "UpdateInfo", + "UpdateMethodMultiParam", + "VersioningIntent", + "_AsyncioTask", + "_Definition", + "_FT", + "_NexusClient", + "_NotInWorkflowEventLoopError", + "_QueryDefinition", + "_Runtime", + "_SignalDefinition", + "_UpdateDefinition", + "_assert_dynamic_handler_args", + "_bind_method", + "_build_log_context", + "_current_update_info", + "_imports_passed_through", + "_in_sandbox", + "_is_unbound_method_on_cls", + "_parameters_identical_up_to_naming", + "_release_waiter", + "_sandbox_import_notification_policy_override", + "_sandbox_unrestricted", + "_set_current_update_info", + "_update_validator", + "_wait", + "all_handlers_finished", + "annotations", + "as_completed", + "continue_as_new", + "create_event_group", + "create_nexus_client", + "current_update_info", + "defn", + "deprecate_patch", + "dynamic_config", + "execute_activity", + "execute_activity_class", + "execute_activity_method", + "execute_child_workflow", + "execute_local_activity", + "execute_local_activity_class", + "execute_local_activity_method", + "extern_functions", + "get_current_details", + "get_dynamic_query_handler", + "get_dynamic_signal_handler", + "get_dynamic_update_handler", + "get_external_workflow_handle", + "get_external_workflow_handle_for", + "get_last_completion_result", + "get_last_failure", + "get_query_handler", + "get_signal_handler", + "get_update_handler", + "has_last_completion_result", + "in_workflow", + "info", + "init", + "instance", + "is_failure_exception", + "logger", + "memo", + "memo_value", + "metric_meter", + "new_random", + "now", + "patched", + "payload_converter", + "query", + "random", + "random_seed", + "register_random_seed_callback", + "run", + "set_current_details", + "set_dynamic_query_handler", + "set_dynamic_signal_handler", + "set_dynamic_update_handler", + "set_query_handler", + "set_signal_handler", + "set_update_handler", + "signal", + "sleep", + "start_activity", + "start_activity_class", + "start_activity_method", + "start_child_workflow", + "start_local_activity", + "start_local_activity_class", + "start_local_activity_method", + "time", + "time_ns", + "unsafe", + "update", + "upsert_memo", + "upsert_search_attributes", + "uuid4", + "wait", + "wait_condition", +] + + +EXPECTED_INTENTIONALLY_REMOVED_WORKFLOW_EXPORTS = [ + "ABC", + "Any", + "Awaitable", + "Callable", + "Concatenate", + "Enum", + "Flag", + "Generator", + "Generic", + "InputT", + "IntEnum", + "Iterable", + "Iterator", + "Literal", + "Mapping", + "MutableMapping", + "NoReturn", + "OutputT", + "Protocol", + "Random", + "Sequence", + "TYPE_CHECKING", + "TypeVar", + "TypedDict", + "abstractmethod", + "asyncio", + "auto", + "cast", + "contextmanager", + "contextvars", + "dataclass", + "datetime", + "inspect", + "logging", + "nexusrpc", + "overload", + "partial", + "runtime_checkable", + "sys", + "temporalio", + "threading", + "timedelta", + "timezone", + "typing", + "uuid", + "warnings", +] + + +def test_workflow_module_exports_match_main() -> None: + missing = [ + name + for name in EXPECTED_WORKFLOW_EXPORTS + if not hasattr(temporalio.workflow, name) + ] + assert not missing + + +def test_workflow_module_drops_intentionally_removed_import_exports() -> None: + exported = [ + name + for name in EXPECTED_INTENTIONALLY_REMOVED_WORKFLOW_EXPORTS + if hasattr(temporalio.workflow, name) + ] + assert not exported diff --git a/tests/testing/conftest.py b/tests/testing/conftest.py new file mode 100644 index 0000000000..8d8253c1bc --- /dev/null +++ b/tests/testing/conftest.py @@ -0,0 +1,21 @@ +"""Fixtures for ``tests/testing/`` test files.""" + +from collections.abc import AsyncGenerator + +import pytest_asyncio + +from temporalio.testing import WorkflowEnvironment +from tests import DEV_SERVER_DOWNLOAD_VERSION + + +@pytest_asyncio.fixture(scope="module") # type: ignore[reportUntypedFunctionDecorator] +async def ts_env() -> AsyncGenerator[WorkflowEnvironment, None]: + """Module-scoped time-skipping V2 dev server, shared across tests in a file.""" + async with await WorkflowEnvironment.start_time_skipping_v2( + dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, + dev_server_extra_args=[ + "--dynamic-config-value", + "frontend.WorkflowTimeSkippingEnabled=true", + ], + ) as workflow_env: + yield workflow_env diff --git a/tests/testing/test_activity.py b/tests/testing/test_activity.py index 2acf936398..71ba7f5907 100644 --- a/tests/testing/test_activity.py +++ b/tests/testing/test_activity.py @@ -167,3 +167,47 @@ def my_activity() -> None: env = ActivityEnvironment(client=Mock(spec=Client)) env.run(my_activity) assert saw_error + + +async def test_activity_logger_does_not_mutate_caller_extra(): + """Regression test for https://github.com/temporalio/sdk-python/issues/503. + + The activity LoggerAdapter must not mutate the ``extra`` dict provided by + the caller; it should merge its temporal context into a fresh dict. + """ + import logging + import logging.handlers + import queue + + handler = logging.handlers.QueueHandler(queue.Queue()) + activity.logger.base_logger.addHandler(handler) + previous_level = activity.logger.base_logger.level + activity.logger.base_logger.setLevel(logging.INFO) + previous_full = activity.logger.full_activity_info_on_extra + activity.logger.full_activity_info_on_extra = True + + try: + + def log_with_extra() -> dict: + caller_extra = {"request_id": "req-1"} + activity.logger.info("hi", extra=caller_extra) + return caller_extra + + env = ActivityEnvironment() + caller_extra = env.run(log_with_extra) + finally: + activity.logger.base_logger.removeHandler(handler) + activity.logger.base_logger.setLevel(previous_level) + activity.logger.full_activity_info_on_extra = previous_full + + # The caller's dict must be untouched. + assert caller_extra == {"request_id": "req-1"} + + # But the emitted record should still carry the temporal-injected fields + # alongside the caller-provided one. + records: list[logging.LogRecord] = list(handler.queue.queue) # type: ignore[attr-defined] + assert records, "expected one log record" + record = records[-1] + assert record.__dict__["request_id"] == "req-1" + assert record.__dict__["temporal_activity"]["activity_type"] == "unknown" + assert "activity_info" in record.__dict__ diff --git a/tests/testing/test_timeskipping_v2.py b/tests/testing/test_timeskipping_v2.py new file mode 100644 index 0000000000..047a501474 --- /dev/null +++ b/tests/testing/test_timeskipping_v2.py @@ -0,0 +1,801 @@ +"""Tests for per-workflow time skipping via the V2 test env.""" + +import asyncio +import uuid +from datetime import datetime, timedelta, timezone +from time import monotonic +from typing import Any + +import pytest + +from temporalio import workflow +from temporalio.api.enums.v1 import event_type_pb2 as _event_type +from temporalio.client import WithStartWorkflowOperation +from temporalio.common import RetryPolicy, WorkflowIDConflictPolicy +from temporalio.exceptions import ApplicationError +from temporalio.testing import TimeSkipper, TimeSkippingConfig, WorkflowEnvironment +from tests import DEV_SERVER_DOWNLOAD_VERSION +from tests.helpers import ( + assert_duration_same, + assert_eventually, + find_history_event, + new_worker, +) +from tests.helpers.time_skipping import ( + assert_time_was_not_skipped, + assert_time_was_skipped, +) +from tests.testing.test_workflow import SleepWorkflow + + +@workflow.defn +class InteractionWorkflow: + """Completes after receiving ``required_signals`` ``proceed`` signals; otherwise waits up to 10h.""" + + def __init__(self) -> None: + self.signals_received = 0 + + @workflow.run + async def run(self, required_signals: int) -> str: + await workflow.wait_condition( + lambda: self.signals_received >= required_signals, + timeout=timedelta(hours=10), + ) + return "done" + + @workflow.signal + def proceed(self) -> None: + self.signals_received += 1 + + @workflow.query + def get_signal_count(self) -> int: + return self.signals_received + + +async def test_skip_full_run(ts_env: WorkflowEnvironment) -> None: + """Enable time skipping, let workflow run to completion.""" + async with new_worker(ts_env.client, SleepWorkflow) as worker: + wall_start = monotonic() + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 3600.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + result = await handle.result() + wall_elapsed = monotonic() - wall_start + + assert result["message"] == "all done" + virtual_elapsed = result["end"] - result["start"] + assert virtual_elapsed >= 3600, ( + f"virtual elapsed was {virtual_elapsed}s; expected >= 3600s (timer did not fire fully)" + ) + assert wall_elapsed < 3, ( + f"workflow took {wall_elapsed:.3f}s wall time; time skipping did not engage" + ) + await assert_time_was_skipped(handle) + + +async def test_with_time_skipping_disabled( + ts_env: WorkflowEnvironment, +) -> None: + """Without time skipping, the 1h timer does not complete in 3s.""" + async with new_worker(ts_env.client, SleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 3600.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + with pytest.raises(asyncio.TimeoutError): + await asyncio.wait_for(handle.result(), timeout=3) + + +async def test_fast_forward_with_resume(ts_env: WorkflowEnvironment) -> None: + """Fast-forward 1h, signal, resume +1h, signal, workflow completes.""" + async with new_worker(ts_env.client, InteractionWorkflow) as worker: + wall_start = monotonic() + # Start the workflow with time-skipping stamping suspended, then issue an + # explicit fast-forward. Uses signals to move the workflow along. + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + InteractionWorkflow.run, + 2, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + t0 = await ts_env.get_current_time(handle) + + assert await ts_env.fast_forward(handle, timedelta(hours=1)), ( + "expected first fast-forward to complete at 1h" + ) + await handle.signal(InteractionWorkflow.proceed) + assert await handle.query(InteractionWorkflow.get_signal_count) == 1 + t1 = await ts_env.get_current_time(handle) + assert_duration_same(3600, (t1 - t0).total_seconds(), tolerance=10) + + assert await ts_env.fast_forward(handle, timedelta(hours=1)), ( + "expected second fast-forward to complete at 2h total" + ) + await handle.signal(InteractionWorkflow.proceed) + t2 = await ts_env.get_current_time(handle) + assert_duration_same(7200, (t2 - t0).total_seconds(), tolerance=10) + + result = await handle.result() + wall_elapsed = monotonic() - wall_start + + assert result == "done" + assert wall_elapsed < 60, ( + f"workflow took {wall_elapsed:.1f}s wall time; expected fast finish" + ) + await assert_time_was_skipped(handle) + + +async def test_partial_fast_forward_then_unbounded( + ts_env: WorkflowEnvironment, +) -> None: + """30m fast-forward, verify +30m, then unbounded resume to completion at +1h.""" + async with new_worker(ts_env.client, SleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 3600.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + t0 = await ts_env.get_current_time(handle) + + assert await ts_env.fast_forward(handle, timedelta(minutes=30)) + t1 = await ts_env.get_current_time(handle) + assert_duration_same(30 * 60, (t1 - t0).total_seconds(), tolerance=10) + + assert not await ts_env.fast_forward(handle, None) + result = await handle.result() + assert result["message"] == "all done" + + t_end = await ts_env.get_current_time(handle) + assert_duration_same(3600, (t_end - t0).total_seconds(), tolerance=10) + + await assert_time_was_skipped(handle) + + +@workflow.defn +class ParentTimeSkippingWorkflow: + """Parent 1h + child 1h + parent 1h all auto-skip; child inherits time skipping from parent.""" + + @workflow.run + async def run( + self, child_id: str, task_queue: str, child_sleep_seconds: float + ) -> dict[str, Any]: + parent_start = workflow.now().timestamp() + await workflow.sleep(timedelta(hours=1)) + parent_after_wait_1 = workflow.now().timestamp() + + child_result = await workflow.execute_child_workflow( + SleepWorkflow.run, + child_sleep_seconds, + id=child_id, + task_queue=task_queue, + ) + parent_after_child_start = workflow.now().timestamp() + + await workflow.sleep(timedelta(hours=1)) + parent_end = workflow.now().timestamp() + + return { + "parent_start": parent_start, + "parent_after_wait_1": parent_after_wait_1, + "parent_after_child_start": parent_after_child_start, + "parent_end": parent_end, + "child_start": child_result["start"], + "child_end": child_result["end"], + "child_message": child_result["message"], + "message": "all done", + } + + +async def test_child_workflow_propagates_time_skipping( + ts_env: WorkflowEnvironment, +) -> None: + """Parent 1h + child 1h + parent 1h all auto-skip; child inherits time skipping from parent.""" + async with new_worker( + ts_env.client, ParentTimeSkippingWorkflow, SleepWorkflow + ) as worker: + child_id = f"child-{uuid.uuid4()}" + parent_id = f"parent-{uuid.uuid4()}" + + wall_start = monotonic() + parent_handle = await ts_env.client.start_workflow( + ParentTimeSkippingWorkflow.run, + args=[child_id, worker.task_queue, 3600.0], + id=parent_id, + task_queue=worker.task_queue, + ) + result = await parent_handle.result() + wall_elapsed = monotonic() - wall_start + + assert result["message"] == "all done" + assert result["child_message"] == "all done" + + assert wall_elapsed < 10, ( + f"parent+child took {wall_elapsed:.1f}s wall time; expected < 10s" + ) + assert_duration_same( + 3600, result["parent_after_wait_1"] - result["parent_start"], tolerance=10 + ) + assert_duration_same( + 3600, result["child_end"] - result["child_start"], tolerance=10 + ) + assert_duration_same( + 3600, result["parent_end"] - result["parent_after_child_start"], tolerance=10 + ) + assert_duration_same( + 0, result["child_start"] - result["parent_after_wait_1"], tolerance=10 + ) + assert_duration_same( + 0, + result["parent_after_child_start"] - result["parent_after_wait_1"], + tolerance=5, + ) + + # Time skipping engaged on both workflows. + await assert_time_was_skipped(parent_handle) + child_handle = ts_env.client.get_workflow_handle(child_id) + await assert_time_was_skipped(child_handle) + + +async def test_child_workflow_with_propagation_disabled() -> None: + """With ``disable_propagation=True`` on the env, child does NOT inherit time skipping + and runs in real time.""" + + async with await WorkflowEnvironment.start_time_skipping_v2( + dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, + dev_server_extra_args=[ + "--dynamic-config-value", + "frontend.WorkflowTimeSkippingEnabled=true", + ], + ts_config=TimeSkippingConfig(disable_propagation=True), + ) as env: + async with new_worker( + env.client, ParentTimeSkippingWorkflow, SleepWorkflow + ) as worker: + child_id = f"child-{uuid.uuid4()}" + parent_id = f"parent-{uuid.uuid4()}" + + wall_start = monotonic() + parent_handle = await env.client.start_workflow( + ParentTimeSkippingWorkflow.run, + args=[child_id, worker.task_queue, 5.0], + id=parent_id, + task_queue=worker.task_queue, + ) + result = await parent_handle.result() + wall_elapsed = monotonic() - wall_start + + assert result["message"] == "all done" + assert result["child_message"] == "all done" + # Child runs in real time; parent's two 1h waits are skipped. + assert 4 < wall_elapsed < 15, ( + f"expected ~5s wall time (child didn't skip), got {wall_elapsed:.1f}s" + ) + + await assert_time_was_skipped(parent_handle) + child_handle = env.client.get_workflow_handle(child_id) + await assert_time_was_not_skipped(child_handle) + + +async def test_timeskipper_wrapping_local_env_client() -> None: + """Test timeskipping through direct use of a TimeSkipper, instead of + indirectly through the time skipping V2 test env. + """ + + async with await WorkflowEnvironment.start_local( + dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, + dev_server_extra_args=[ + "--dynamic-config-value", + "frontend.WorkflowTimeSkippingEnabled=true", + ], + ) as env: + assert not env.supports_time_skipping_v1 + + skipper = TimeSkipper(env.client) + async with new_worker(skipper.client, SleepWorkflow) as worker: + wall_start = monotonic() + handle = await skipper.client.start_workflow( + SleepWorkflow.run, + 3600.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + result = await handle.result() + wall_elapsed = monotonic() - wall_start + + assert result["message"] == "all done" + assert_duration_same(3600, result["end"] - result["start"], tolerance=10) + assert wall_elapsed < 10, ( + f"expected fast wall finish under time skipping, got {wall_elapsed:.1f}s" + ) + await assert_time_was_skipped(handle) + + +async def test_fast_forward_returns_false_when_workflow_terminates_first( + ts_env: WorkflowEnvironment, +) -> None: + """Workflow's own 1h timer fires before FF's 2h target → FF returns False.""" + + async with new_worker(ts_env.client, SleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 3600.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert (await ts_env.fast_forward(handle, timedelta(hours=2))) is False + + +async def test_fast_forward_accepts_float_duration( + ts_env: WorkflowEnvironment, +) -> None: + async with new_worker(ts_env.client, SleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 3600.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + t0 = await ts_env.get_current_time(handle) + assert await ts_env.fast_forward(handle, 1800.0) + t1 = await ts_env.get_current_time(handle) + assert_duration_same(1800, (t1 - t0).total_seconds(), tolerance=10) + await handle.cancel() + await assert_time_was_skipped(handle) + + +@workflow.defn +class FailOnceThenSleepWorkflow: + """Sleeps ``sleep_seconds``; fails on the first attempt, succeeds on later ones.""" + + @workflow.run + async def run(self, sleep_seconds: float) -> str: + await workflow.sleep(timedelta(seconds=sleep_seconds)) + if workflow.info().attempt < 2: + raise ApplicationError("first attempt fails on purpose") + return "done" + + @workflow.query + def attempt(self) -> int: + return workflow.info().attempt + + +async def test_fast_forward_spans_retries(ts_env: WorkflowEnvironment) -> None: + """FF spans across retry: attempt 1 fails, backoff elapses, attempt 2 runs.""" + async with new_worker(ts_env.client, FailOnceThenSleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + FailOnceThenSleepWorkflow.run, + 3600.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + retry_policy=RetryPolicy( + initial_interval=timedelta(hours=1), + backoff_coefficient=1.0, + maximum_attempts=2, + ), + ) + + # Fast forward into the second sleep. + assert await ts_env.fast_forward(handle, timedelta(hours=2, minutes=30)) + + async def _in_attempt_2() -> None: + assert (await handle.query(FailOnceThenSleepWorkflow.attempt)) == 2 + + await assert_eventually(_in_attempt_2) + + await ts_env.fast_forward(handle) + assert (await handle.result()) == "done" + assert (await handle.query(FailOnceThenSleepWorkflow.attempt)) == 2 + await assert_time_was_skipped(handle) + + +@workflow.defn +class ContinueAsNewSleepWorkflow: + """Sleep and CAN until ``runs_remaining`` is 1.""" + + def __init__(self) -> None: + self._current_run = 1 + + @workflow.run + async def run( + self, sleep_seconds: float, runs_remaining: int, current_run: int = 1 + ) -> str: + self._current_run = current_run + await workflow.sleep(timedelta(seconds=sleep_seconds)) + if runs_remaining > 1: + workflow.continue_as_new( + args=[sleep_seconds, runs_remaining - 1, current_run + 1] + ) + return "done" + + @workflow.query + def current_run(self) -> int: + return self._current_run + + +async def test_fast_forward_spans_continue_as_new(ts_env: WorkflowEnvironment) -> None: + """Fast forward spans multiple continue-as-new runs.""" + async with new_worker(ts_env.client, ContinueAsNewSleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + ContinueAsNewSleepWorkflow.run, + args=[3600.0, 3, 1], + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert await ts_env.fast_forward(handle, timedelta(hours=2)) + + async def _in_run_3() -> None: + assert (await handle.query(ContinueAsNewSleepWorkflow.current_run)) == 3 + + await assert_eventually(_in_run_3) + + await ts_env.fast_forward(handle) + assert (await handle.result()) == "done" + assert (await handle.query(ContinueAsNewSleepWorkflow.current_run)) == 3 + await assert_time_was_skipped(handle) + + +async def test_fast_forward_spans_cron_restarts( + ts_env: WorkflowEnvironment, +) -> None: + """Fast forward over multiple cron firings.""" + workflow_id = f"wf-{uuid.uuid4()}" + async with new_worker(ts_env.client, SleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 60.0, + id=workflow_id, + task_queue=worker.task_queue, + cron_schedule="@every 1h", + ) + try: + assert await ts_env.fast_forward(handle, timedelta(hours=3)) + + async def _at_least_three_cron_runs() -> None: + run_count = 0 + async for _ in ts_env.client.list_workflows( + query=f"WorkflowId = '{workflow_id}'" + ): + run_count += 1 + assert run_count >= 3, ( + f"expected >= 3 cron runs after 3h FF, got {run_count}" + ) + + await assert_eventually(_at_least_three_cron_runs) + finally: + await handle.cancel() + + +@workflow.defn +class SignalWithStartTargetWorkflow: + """Waits for at least one ``go`` signal, then does a long sleep.""" + + def __init__(self) -> None: + self._got_signal = False + + @workflow.run + async def run(self, sleep_seconds: float) -> dict[str, float]: + await workflow.wait_condition(lambda: self._got_signal) + t_after_signal = workflow.now().timestamp() + await workflow.sleep(timedelta(seconds=sleep_seconds)) + t_end = workflow.now().timestamp() + return {"after_signal": t_after_signal, "end": t_end} + + @workflow.signal + def go(self) -> None: + self._got_signal = True + + +async def test_signal_with_start_stamps_time_skipping_config( + ts_env: WorkflowEnvironment, +) -> None: + """Timeskip a signal-with-start workflow.""" + async with new_worker(ts_env.client, SignalWithStartTargetWorkflow) as worker: + wall_start = monotonic() + handle = await ts_env.client.start_workflow( + SignalWithStartTargetWorkflow.run, + 3600.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + start_signal="go", + ) + result = await handle.result() + wall_elapsed = monotonic() - wall_start + + assert wall_elapsed < 10 + virtual_elapsed = result["end"] - result["after_signal"] + assert_duration_same(3600, virtual_elapsed, tolerance=50) + await assert_time_was_skipped(handle) + + +@workflow.defn +class UpdateWithStartTargetWorkflow: + """Accepts a ``ping`` update, then does a long sleep.""" + + @workflow.run + async def run(self, sleep_seconds: float) -> dict[str, float]: + t_start = workflow.now().timestamp() + await workflow.sleep(timedelta(seconds=sleep_seconds)) + t_end = workflow.now().timestamp() + return {"start": t_start, "end": t_end} + + @workflow.update + def ping(self) -> str: + return "pong" + + +async def test_update_with_start_stamps_time_skipping_config( + ts_env: WorkflowEnvironment, +) -> None: + """Timeskip an update-with-start workflow.""" + async with new_worker(ts_env.client, UpdateWithStartTargetWorkflow) as worker: + wall_start = monotonic() + start_op = WithStartWorkflowOperation( + UpdateWithStartTargetWorkflow.run, + 3600.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + id_conflict_policy=WorkflowIDConflictPolicy.FAIL, + ) + update_result = await ts_env.client.execute_update_with_start_workflow( + UpdateWithStartTargetWorkflow.ping, start_workflow_operation=start_op + ) + assert update_result == "pong" + handle = await start_op.workflow_handle() + # Fail here rather than wait for the timer in real time + tsi = await ts_env.get_time_skipping_info(handle) + assert tsi is not None + assert tsi.effective_config.enabled, ( + "expected time skipping to be enabled (env-stamped)" + ) + result = await handle.result() + wall_elapsed = monotonic() - wall_start + + assert wall_elapsed < 10 + virtual_elapsed = result["end"] - result["start"] + assert_duration_same(3600, virtual_elapsed, tolerance=50) + await assert_time_was_skipped(handle) + + +async def test_get_time_skipping_info_during_workflow( + ts_env: WorkflowEnvironment, +) -> None: + async with new_worker(ts_env.client, InteractionWorkflow) as worker: + handle = await ts_env.client.start_workflow( + InteractionWorkflow.run, + 1, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + try: + tsi = await ts_env.get_time_skipping_info(handle) + assert tsi is not None + assert tsi.effective_config.enabled, ( + "expected time skipping to be enabled (env-stamped)" + ) + assert tsi.HasField("current_time"), ( + "TimeSkippingInfo.current_time is not populated" + ) + assert not tsi.HasField("fast_forward_info"), ( + "no fast-forward was issued; expected fast_forward_info unset" + ) + finally: + await handle.signal(InteractionWorkflow.proceed) + await handle.result() + + +async def test_get_time_skipping_info_returns_none_when_ts_never_enabled( + ts_env: WorkflowEnvironment, +) -> None: + async with new_worker(ts_env.client, InteractionWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + InteractionWorkflow.run, + 1, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + try: + assert await ts_env.get_time_skipping_info(handle) is None + finally: + await handle.signal(InteractionWorkflow.proceed) + await handle.result() + + +async def test_max_session_skip_count_stamped_by_env() -> None: + """Set ``max_session_skip_count`` and confirm it in the + WorkflowExecutionStarted event.""" + async with await WorkflowEnvironment.start_time_skipping_v2( + dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, + dev_server_extra_args=[ + "--dynamic-config-value", + "frontend.WorkflowTimeSkippingEnabled=true", + ], + ts_config=TimeSkippingConfig(enabled=True, max_session_skip_count=5), + ) as env: + async with new_worker(env.client, InteractionWorkflow) as worker: + handle = await env.client.start_workflow( + InteractionWorkflow.run, + 1, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + try: + started = await find_history_event( + handle, + lambda e: ( + e.event_type + == _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED + ), + ) + assert started is not None + started_tsc = started.workflow_execution_started_event_attributes.time_skipping_config + assert started_tsc.max_session_skip_count == 5, ( + f"expected max_session_skip_count=5, got {started_tsc.max_session_skip_count}" + ) + finally: + await handle.signal(InteractionWorkflow.proceed) + await handle.result() + + +async def test_transition_event_payload(ts_env: WorkflowEnvironment) -> None: + """The disabled-after-fast-forward transition event's payload is populated, + specifically ``target_time`` and ``wall_clock_time``.""" + async with new_worker(ts_env.client, SleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 100000.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + wall_before_ff = datetime.now(tz=timezone.utc) + assert await ts_env.fast_forward(handle, timedelta(minutes=30)) + wall_after_ff = datetime.now(tz=timezone.utc) + + event = await find_history_event( + handle, + lambda e: ( + e.event_type + == _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED + and e.workflow_execution_time_skipping_transitioned_event_attributes.disabled_after_fast_forward + ), + ) + assert event is not None, "no disabled_after_fast_forward transition found" + transition = ( + event.workflow_execution_time_skipping_transitioned_event_attributes + ) + + target = transition.target_time.ToDatetime().replace(tzinfo=timezone.utc) + target_offset = (target - wall_before_ff).total_seconds() + assert_duration_same(1800, target_offset, tolerance=20) + + # wall_clock_time should be around wall clock time when fast forward started. + wct = transition.wall_clock_time.ToDatetime().replace(tzinfo=timezone.utc) + assert wall_before_ff <= wct <= wall_after_ff + timedelta(seconds=5), ( + f"wall_clock_time {wct} not in expected wall-time window " + f"[{wall_before_ff}, {wall_after_ff}]" + ) + + await handle.cancel() + + +async def test_child_workflow_started_event_has_state_propagation( + ts_env: WorkflowEnvironment, +) -> None: + """A child workflow spawned under time skipping carries TimeSkippingStatePropagation.""" + async with new_worker( + ts_env.client, ParentTimeSkippingWorkflow, SleepWorkflow + ) as worker: + child_id = f"child-{uuid.uuid4()}" + parent_id = f"parent-{uuid.uuid4()}" + parent_handle = await ts_env.client.start_workflow( + ParentTimeSkippingWorkflow.run, + args=[child_id, worker.task_queue, 60.0], + id=parent_id, + task_queue=worker.task_queue, + ) + await parent_handle.result() + + child_handle = ts_env.client.get_workflow_handle(child_id) + event = await find_history_event( + child_handle, + lambda e: e.event_type == _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED, + ) + assert event is not None + started = event.workflow_execution_started_event_attributes + assert started.HasField("time_skipping_state_propagation"), ( + "child's WorkflowExecutionStarted event has no time_skipping_state_propagation" + ) + + +async def test_fast_forward_exceeds_execution_timeout( + ts_env: WorkflowEnvironment, +) -> None: + async with new_worker(ts_env.client, SleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 100000.0, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(minutes=30), + ) + assert (await ts_env.fast_forward(handle, timedelta(hours=1))) is False + + timed_out = await find_history_event( + handle, + lambda e: ( + e.event_type == _event_type.EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT + ), + ) + assert timed_out is not None, "expected WORKFLOW_EXECUTION_TIMED_OUT in history" + + +async def test_overriding_fast_forward_raises_on_original( + ts_env: WorkflowEnvironment, +) -> None: + task_queue = f"tq-{uuid.uuid4()}" + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 100000.0, + id=f"wf-{uuid.uuid4()}", + task_queue=task_queue, + ) + # No worker yet, to keep fast forwards from finishing. + + original = asyncio.create_task(ts_env.fast_forward(handle, timedelta(hours=2))) + + async def _wait_for_ff_id( + expect_change_from: str | None, + ) -> str: + """Poll the workflow's TimeSkippingInfo until fast_forward_info. + fast_forward_id is set and, if given, differs from the previous id.""" + deadline = monotonic() + 10 + while monotonic() < deadline: + if original.done() and expect_change_from is None: + val = original.result() # re-raise if it already errored + raise AssertionError( + f"first completed before second ran (returned {val!r})" + ) + tsi = await ts_env.get_time_skipping_info(handle) + ffi = tsi.fast_forward_info if tsi is not None else None + if ( + ffi + and ffi.fast_forward_id + and ffi.fast_forward_id != expect_change_from + ): + return ffi.fast_forward_id + await asyncio.sleep(0.05) + raise AssertionError("timed out waiting for expected fast_forward_id") + + first_ff = await _wait_for_ff_id(expect_change_from=None) + + second_ff = asyncio.create_task(ts_env.fast_forward(handle, timedelta(minutes=30))) + await _wait_for_ff_id(expect_change_from=first_ff) + + with pytest.raises(RuntimeError, match=r"does not match"): + await original + + # Attach a worker so the workflow can complete and the second fast-forward can happen. + async with new_worker(ts_env.client, SleepWorkflow, task_queue=task_queue): + assert await second_ff + await ts_env.fast_forward(handle) + await handle.result() + await assert_time_was_skipped(handle) diff --git a/tests/testing/test_workflow.py b/tests/testing/test_workflow.py index 1a857a55db..d21bffea8f 100644 --- a/tests/testing/test_workflow.py +++ b/tests/testing/test_workflow.py @@ -1,10 +1,8 @@ import asyncio -import platform -import sys import uuid from datetime import datetime, timedelta, timezone from time import monotonic -from typing import Any, Optional, Union +from typing import Any import pytest @@ -13,7 +11,6 @@ Client, Interceptor, OutboundInterceptor, - RPCError, StartWorkflowInput, WorkflowFailureError, WorkflowHandle, @@ -30,55 +27,63 @@ TimeoutError, TimeoutType, ) +from temporalio.service import RPCError from temporalio.testing import WorkflowEnvironment from tests import DEV_SERVER_DOWNLOAD_VERSION from tests.helpers import new_worker +from tests.helpers.time_skipping import skip_if_time_skipping_v1_unsupported @workflow.defn -class ReallySlowWorkflow: - @workflow.run - async def run(self) -> str: - await asyncio.sleep(100000) - return "all done" +class SleepWorkflow: + """Sleeps a parameterized duration. Returns the virtual clock at start and end. - @workflow.query - def current_time(self) -> float: - return workflow.now().timestamp() + The ``tick`` signal is a non-query WFT that is causes ``workflow.now`` to have the + correct value. + """ + + @workflow.run + async def run(self, sleep_seconds: float) -> dict[str, Any]: + t_start = workflow.now().timestamp() + await workflow.sleep(timedelta(seconds=sleep_seconds)) + t_end = workflow.now().timestamp() + return {"start": t_start, "end": t_end, "message": "all done"} @workflow.signal - async def some_signal(self) -> None: + def tick(self) -> None: pass - -def skip_if_not_x86() -> None: - if platform.machine() not in ("i386", "AMD64", "x86_64"): - pytest.skip("Time skipping server does not run outside x86") + @workflow.query + def now(self) -> float: + return workflow.now().timestamp() async def test_workflow_env_time_skipping_basic(): - skip_if_not_x86() + skip_if_time_skipping_v1_unsupported() async with await WorkflowEnvironment.start_time_skipping() as env: - async with new_worker(env.client, ReallySlowWorkflow) as worker: + async with new_worker(env.client, SleepWorkflow) as worker: # Check that time is around now assert_timestamp_from_now(await env.get_current_time(), 0) # Run workflow - assert "all done" == await env.client.execute_workflow( - ReallySlowWorkflow.run, + result = await env.client.execute_workflow( + SleepWorkflow.run, + 100000.0, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, ) + assert result["message"] == "all done" # Check that the time is around 100000 seconds after now assert_timestamp_from_now(await env.get_current_time(), 100000) async def test_workflow_env_time_skipping_manual(): - skip_if_not_x86() + skip_if_time_skipping_v1_unsupported() async with await WorkflowEnvironment.start_time_skipping() as env: - async with new_worker(env.client, ReallySlowWorkflow) as worker: + async with new_worker(env.client, SleepWorkflow) as worker: # Start workflow handle = await env.client.start_workflow( - ReallySlowWorkflow.run, + SleepWorkflow.run, + 100000.0, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, ) @@ -86,8 +91,8 @@ async def test_workflow_env_time_skipping_manual(): async def workflow_current_time() -> float: # We send signal first since query timestamp is based on last # non-query-only workflow task - await handle.signal(ReallySlowWorkflow.some_signal) - return await handle.query(ReallySlowWorkflow.current_time) + await handle.signal(SleepWorkflow.tick) + return await handle.query(SleepWorkflow.now) # Confirm query will say we're near current time assert_timestamp_from_now(await workflow_current_time(), 0) @@ -124,7 +129,7 @@ async def run(self) -> str: async def test_workflow_env_time_skipping_heartbeat_timeout(): - skip_if_not_x86() + skip_if_time_skipping_v1_unsupported() async with await WorkflowEnvironment.start_time_skipping() as env: async with new_worker( env.client, @@ -143,35 +148,31 @@ async def test_workflow_env_time_skipping_heartbeat_timeout(): assert err.value.cause.cause.type == TimeoutType.HEARTBEAT -@workflow.defn -class ShortSleepWorkflow: - @workflow.run - async def run(self) -> str: - await asyncio.sleep(3) - return "all done" - - async def test_workflow_env_time_skipping_disabled(): - skip_if_not_x86() + skip_if_time_skipping_v1_unsupported() async with await WorkflowEnvironment.start_time_skipping() as env: - async with new_worker(env.client, ShortSleepWorkflow) as worker: + async with new_worker(env.client, SleepWorkflow) as worker: # Confirm when executing normally it does not sleep for a full 3s start = monotonic() - assert "all done" == await env.client.execute_workflow( - ShortSleepWorkflow.run, + result = await env.client.execute_workflow( + SleepWorkflow.run, + 3.0, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, ) + assert result["message"] == "all done" assert monotonic() - start < 2.5 # Confirm when skipping is disabled, it does sleep for a full 3s with env.auto_time_skipping_disabled(): start = monotonic() - assert "all done" == await env.client.execute_workflow( - ShortSleepWorkflow.run, + result = await env.client.execute_workflow( + SleepWorkflow.run, + 3.0, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, ) + assert result["message"] == "all done" assert monotonic() - start > 2.5 @@ -253,10 +254,11 @@ def assert_proper_error(err: BaseException | None) -> None: assert_proper_error(err.value.cause) +@pytest.mark.requires_local_server async def test_search_attributes_on_dev_server( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Only testing for local dev server") # Search attributes @@ -318,6 +320,24 @@ async def test_search_attributes_on_dev_server( assert attrs == desc.typed_search_attributes +async def test_ui_port(): + """Test that ui_port parameter works correctly.""" + async with await WorkflowEnvironment.start_local( + ui=True, + ui_port=18080, + dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, + ) as env: + # Just verify it starts without error + assert env.client is not None + + +async def test_get_time_skipping_info_raises_on_non_ts_v2_env(client: Client): + async with WorkflowEnvironment.from_client(client) as env: + handle = client.get_workflow_handle(f"wf-{uuid.uuid4()}") + with pytest.raises(RuntimeError, match=r"V2 time-skipping"): + await env.get_time_skipping_info(handle) + + def assert_timestamp_from_now( ts: datetime | float, expected_from_now: float, max_delta: float = 30 ) -> None: diff --git a/tests/testing/test_workflow_ts_v2.py b/tests/testing/test_workflow_ts_v2.py new file mode 100644 index 0000000000..7491ee7f59 --- /dev/null +++ b/tests/testing/test_workflow_ts_v2.py @@ -0,0 +1,103 @@ +"""V2 equivalents of testing/test_workflow.py""" + +import uuid +from datetime import timedelta +from time import monotonic + +from temporalio.testing import WorkflowEnvironment +from tests.helpers import new_worker +from tests.helpers.time_skipping import ( + assert_time_was_not_skipped, + assert_time_was_skipped, +) +from tests.testing.test_workflow import ( + SleepWorkflow, + assert_timestamp_from_now, +) + + +async def test_workflow_env_time_skipping_basic_v2(ts_env: WorkflowEnvironment): + """Time-skip a very long sleep.""" + async with new_worker(ts_env.client, SleepWorkflow) as worker: + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 100000.0, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + result = await handle.result() + assert result["message"] == "all done" + assert_timestamp_from_now(await ts_env.get_current_time(handle), 100000) + await assert_time_was_skipped(handle) + + +async def test_workflow_env_time_skipping_manual_v2(ts_env: WorkflowEnvironment): + """Start a very long sleep, then fast forward the first 1000s.""" + async with new_worker(ts_env.client, SleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 100000.0, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + assert_timestamp_from_now(await ts_env.get_current_time(handle), 0, max_delta=1) + + assert await ts_env.fast_forward(handle, timedelta(seconds=1000)) + assert_timestamp_from_now(await ts_env.get_current_time(handle), 1000) + await assert_time_was_skipped(handle) + + await handle.cancel() + + +async def test_workflow_env_time_skipping_disabled_v2(ts_env: WorkflowEnvironment): + """With and without per-workflow auto-skip.""" + async with new_worker(ts_env.client, SleepWorkflow) as worker: + # With time-skipping. + start = monotonic() + ts_on_handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 3.0, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + ts_on_result = await ts_on_handle.result() + assert ts_on_result["message"] == "all done" + assert monotonic() - start < 2.5 + await assert_time_was_skipped(ts_on_handle) + + # Without time-skipping. + start = monotonic() + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 3.0, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + ts_off_result = await handle.result() + assert ts_off_result["message"] == "all done" + assert monotonic() - start > 2.5 + await assert_time_was_not_skipped(handle) + + +async def test_workflow_env_time_skipping_basic_via_update_v2( + ts_env: WorkflowEnvironment, +): + """Start a very long sleep with time skipping off, then enable it + and run to completion.""" + async with new_worker(ts_env.client, SleepWorkflow) as worker: + with ts_env.with_time_skipping_disabled(): + handle = await ts_env.client.start_workflow( + SleepWorkflow.run, + 100000.0, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + assert not await ts_env.fast_forward(handle, None) + result = await handle.result() + assert result["message"] == "all done" + assert_timestamp_from_now(await ts_env.get_current_time(handle), 100000) + await assert_time_was_skipped(handle) diff --git a/tests/worker/test_activity.py b/tests/worker/test_activity.py index 7a9e27f849..5b21c3d0ad 100644 --- a/tests/worker/test_activity.py +++ b/tests/worker/test_activity.py @@ -1,5 +1,6 @@ import asyncio import concurrent.futures +import dataclasses import logging import logging.handlers import os @@ -15,7 +16,7 @@ from dataclasses import dataclass from datetime import datetime, timedelta, timezone from time import sleep -from typing import Any, List, NoReturn, Optional, Type +from typing import Any, NoReturn import pytest @@ -24,12 +25,14 @@ import temporalio.exceptions from temporalio import activity, workflow from temporalio.client import ( + AsyncActivityCancelledError, AsyncActivityHandle, Client, WorkflowFailureError, WorkflowHandle, ) from temporalio.common import RawValue, RetryPolicy +from temporalio.converter import DataConverter, PayloadCodec from temporalio.exceptions import ( ActivityError, ApplicationError, @@ -46,6 +49,7 @@ Worker, WorkerConfig, ) +from tests.helpers import LogHandler from tests.helpers.worker import ( ExternalWorker, KSAction, @@ -101,7 +105,7 @@ async def test_activity_custom_name( shared_state_manager: SharedStateManager, ): @activity.defn(name="my custom activity name!") - async def get_name(name: str) -> str: + async def get_name(_name: str) -> str: return f"Name: {activity.info().activity_type}" result = await _execute_workflow_with_activity( @@ -175,7 +179,7 @@ async def test_activity_info( shared_state_manager: SharedStateManager, ): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1426" ) @@ -202,7 +206,7 @@ async def capture_info() -> None: ) assert info - assert info.activity_id + assert info.activity_id # type:ignore[reportUnreachable] assert info.activity_type == "capture_info" assert info.attempt == 1 assert abs( @@ -364,7 +368,7 @@ async def test_activity_kwonly_params(): with pytest.raises(TypeError) as err: @activity.defn - async def say_hello(*, name: str) -> str: + async def say_hello(*, name: str) -> str: # type:ignore[reportUnusedFunction] return f"Hello, {name}!" assert str(err.value).endswith("cannot have keyword-only arguments") @@ -381,8 +385,13 @@ async def wait_cancel() -> str: while True: await asyncio.sleep(0.3) activity.heartbeat() - except asyncio.CancelledError: - return "Got cancelled error, cancelled? " + str(activity.is_cancelled()) + except asyncio.CancelledError as err: + return ( + "Got cancelled error, cancelled? " + + str(activity.is_cancelled()) + + ", reason: " + + str(err) + ) result = await _execute_workflow_with_activity( client, @@ -393,7 +402,10 @@ async def wait_cancel() -> str: heartbeat_timeout_ms=2000, shared_state_manager=shared_state_manager, ) - assert result.result == "Got cancelled error, cancelled? True" + assert ( + result.result + == "Got cancelled error, cancelled? True, reason: Activity cancelled" + ) async def test_activity_cancel_throw( @@ -638,7 +650,7 @@ async def test_sync_activity_process_cancel( picklable_activity_wait_cancel, cancel_after_ms=100, wait_for_cancellation=True, - heartbeat_timeout_ms=3000, + heartbeat_timeout_ms=5000, worker_config={"activity_executor": executor}, shared_state_manager=shared_state_manager, ) @@ -779,7 +791,7 @@ async def test_activity_heartbeat_details( env: WorkflowEnvironment, shared_state_manager: SharedStateManager, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("https://github.com/temporalio/sdk-java/issues/2459") @activity.defn @@ -840,7 +852,7 @@ async def test_activity_heartbeat_details_timeout( shared_state_manager: SharedStateManager, ): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1427" ) @@ -868,6 +880,67 @@ async def some_activity() -> str: assert list(timeout.last_heartbeat_details) == ["some details!"] +class _GatedFirstHeartbeatCodec(PayloadCodec): + """Holds the first heartbeat in encode until released, like a codec waiting on a remote KMS.""" + + def __init__(self) -> None: + self.first_started = asyncio.Event() + self.release_first = asyncio.Event() + self.first_done = asyncio.Event() + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + if any(p.data == b'"first"' for p in payloads): + self.first_started.set() + await self.release_first.wait() + self.first_done.set() + return list(payloads) + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return list(payloads) + + +async def test_activity_heartbeat_details_keep_order_with_slow_codec( + client: Client, + worker: ExternalWorker, + env: WorkflowEnvironment, + shared_state_manager: SharedStateManager, +): + if env.supports_time_skipping: + pytest.skip("https://github.com/temporalio/sdk-java/issues/2459") + + codec = _GatedFirstHeartbeatCodec() + + @activity.defn + async def some_activity() -> str: + info = activity.info() + if info.heartbeat_details: + return f"resumed from: {next(iter(info.heartbeat_details))}" + activity.heartbeat("first") + # Send the second heartbeat while the first one is still encoding + await codec.first_started.wait() + activity.heartbeat("second") + codec.release_first.set() + await codec.first_done.wait() + raise RuntimeError("Try again!") + + config = client.config() + config["data_converter"] = dataclasses.replace( + client.data_converter, payload_codec=codec + ) + result = await _execute_workflow_with_activity( + Client(**config), + worker, + some_activity, + retry_max_attempts=2, + shared_state_manager=shared_state_manager, + ) + assert result.result == "resumed from: second" + + @activity.defn def picklable_heartbeat_details_activity() -> str: info = activity.info() @@ -888,7 +961,7 @@ async def test_sync_activity_thread_heartbeat_details( env: WorkflowEnvironment, shared_state_manager: SharedStateManager, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("https://github.com/temporalio/sdk-java/issues/2459") with concurrent.futures.ThreadPoolExecutor( @@ -911,7 +984,7 @@ async def test_sync_activity_process_heartbeat_details( env: WorkflowEnvironment, shared_state_manager: SharedStateManager, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("https://github.com/temporalio/sdk-java/issues/2459") with concurrent.futures.ProcessPoolExecutor() as executor: @@ -1019,10 +1092,8 @@ async def say_hello(name: str) -> str: # Create a queue, add handler to logger, call normal activity, then check handler = logging.handlers.QueueHandler(queue.Queue()) - activity.logger.base_logger.addHandler(handler) - prev_level = activity.logger.base_logger.level - activity.logger.base_logger.setLevel(logging.INFO) - try: + with LogHandler.apply(activity.logger.base_logger, handler): + activity.logger.base_logger.setLevel(logging.INFO) result = await _execute_workflow_with_activity( client, worker, @@ -1030,9 +1101,6 @@ async def say_hello(name: str) -> str: "Temporal", shared_state_manager=shared_state_manager, ) - finally: - activity.logger.base_logger.removeHandler(handler) - activity.logger.base_logger.setLevel(prev_level) assert result.result == "Hello, Temporal!" records: list[logging.LogRecord] = list(handler.queue.queue) # type: ignore assert len(records) > 0 @@ -1045,7 +1113,6 @@ async def say_hello(name: str) -> str: async def test_activity_worker_shutdown( client: Client, worker: ExternalWorker, - shared_state_manager: SharedStateManager, ): activity_started = asyncio.Event() @@ -1127,6 +1194,87 @@ async def wait_on_event() -> str: assert "Worker graceful shutdown" == await handle.result() +class _BlockingEncodeCodec(PayloadCodec): + """Blocks in encode until released, like a codec waiting on a remote KMS.""" + + def __init__(self) -> None: + self.encoding_started = asyncio.Event() + self.release = asyncio.Event() + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + self.encoding_started.set() + await self.release.wait() + return list(payloads) + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + return list(payloads) + + +async def test_activity_cancel_during_result_encode_still_completes( + client: Client, worker: ExternalWorker, caplog: pytest.LogCaptureFixture +): + @activity.defn + async def fail_with_details() -> NoReturn: + # Details send the failure through the codec + raise ApplicationError("boom", {"detail": "x"}) + + codec = _BlockingEncodeCodec() + config = client.config() + config["data_converter"] = dataclasses.replace( + DataConverter.default, payload_codec=codec + ) + act_task_queue = str(uuid.uuid4()) + act_worker = Worker( + Client(**config), task_queue=act_task_queue, activities=[fail_with_details] + ) + run_task = asyncio.create_task(act_worker.run()) + handle = await client.start_workflow( + "kitchen_sink", + KSWorkflowParams( + actions=[ + KSAction( + execute_activity=KSExecuteActivityAction( + name="fail_with_details", + task_queue=act_task_queue, + retry_max_attempts=1, + ) + ) + ] + ), + id=str(uuid.uuid4()), + task_queue=worker.task_queue, + ) + # Shut down while the failure is still being encoded. With no grace period + # the worker cancels the activity at once, which must not keep its outcome + # from being reported, or shutdown would wait on it forever. + await codec.encoding_started.wait() + with caplog.at_level(logging.DEBUG, logger="temporalio.worker._activity"): + shutdown_task = asyncio.create_task(act_worker.shutdown()) + + # Only let encoding finish once the cancel has reached the activity, + # so it cannot complete first and let an unfixed worker pass + async def cancel_logged() -> None: + while not any( + rec.getMessage().startswith("Cancelling activity") + for rec in caplog.records + ): + await asyncio.sleep(0.01) + + await asyncio.wait_for(cancel_logged(), 20) + codec.release.set() + await asyncio.wait_for(shutdown_task, 20) + await run_task + with pytest.raises(WorkflowFailureError) as err: + await handle.result() + assert isinstance(err.value.cause, ActivityError) + assert isinstance(err.value.cause.cause, ApplicationError) + assert err.value.cause.cause.message == "boom" + + @activity.defn def picklable_wait_on_event() -> str: activity.wait_for_worker_shutdown_sync(20) @@ -1260,6 +1408,9 @@ def async_handle(self, client: Client, use_task_token: bool) -> AsyncActivityHan assert self._info if use_task_token: return client.get_async_activity_handle(task_token=self._info.task_token) + assert ( + self._info.workflow_id + ) # These tests are for workflow-triggered activities return client.get_async_activity_handle( workflow_id=self._info.workflow_id, run_id=self._info.workflow_run_id, @@ -1311,7 +1462,7 @@ async def test_activity_async_heartbeat_and_fail( use_task_token: bool, shared_state_manager: SharedStateManager, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("https://github.com/temporalio/sdk-java/issues/2459") wrapper = AsyncActivityWrapper() @@ -1348,6 +1499,47 @@ async def test_activity_async_heartbeat_and_fail( assert list(err.value.cause.cause.details) == ["err details 2"] +@pytest.mark.parametrize("use_task_token", [True, False]) +async def test_activity_async_heartbeat_reset( + client: Client, + worker: ExternalWorker, + env: WorkflowEnvironment, + use_task_token: bool, + shared_state_manager: SharedStateManager, +): + if env.supports_time_skipping_v1: + pytest.skip("Time skipping server doesn't support activity reset") + + wrapper = AsyncActivityWrapper() + task = asyncio.create_task( + _execute_workflow_with_activity( + client, + worker, + wrapper.run, + shared_state_manager=shared_state_manager, + ) + ) + info = await wrapper.wait_info() + await client.workflow_service.reset_activity( + temporalio.api.workflowservice.v1.ResetActivityRequest( + namespace=client.namespace, + execution=temporalio.api.common.v1.WorkflowExecution( + workflow_id=info.workflow_id or "", + run_id=info.workflow_run_id or "", + ), + id=info.activity_id, + ) + ) + with pytest.raises(AsyncActivityCancelledError) as err: + await wrapper.async_handle(client, use_task_token).heartbeat() + assert err.value.details == activity.ActivityCancellationDetails(reset=True) + + assert info.workflow_id + await client.get_workflow_handle(info.workflow_id).terminate() + with pytest.raises(WorkflowFailureError): + await task + + @pytest.mark.parametrize("use_task_token", [True, False]) async def test_activity_async_cancel( client: Client, @@ -1421,6 +1613,154 @@ def some_activity() -> str: assert result.result == "context var: some value!" +@activity.defn +def post_return_cancel_activity() -> str: + return "done" + + +@activity.defn +def post_return_cancel_probe_activity() -> str: + return "probe" + + +class PostReturnCancelInterceptor(Interceptor): + def __init__( + self, after_return_started: asyncio.Event, allow_completion: asyncio.Event + ) -> None: + super().__init__() + self.after_return_started = after_return_started + self.allow_completion = allow_completion + + def intercept_activity( + self, next: ActivityInboundInterceptor + ) -> ActivityInboundInterceptor: + return PostReturnCancelActivityInbound( + next, self.after_return_started, self.allow_completion + ) + + +class PostReturnCancelActivityInbound(ActivityInboundInterceptor): + def __init__( + self, + next: ActivityInboundInterceptor, + after_return_started: asyncio.Event, + allow_completion: asyncio.Event, + ) -> None: + super().__init__(next) + self.after_return_started = after_return_started + self.allow_completion = allow_completion + + async def execute_activity(self, input: ExecuteActivityInput) -> Any: + result = await super().execute_activity(input) + if activity.info().activity_type == "post_return_cancel_activity": + self.after_return_started.set() + await self.allow_completion.wait() + return result + + +async def test_sync_activity_cancel_after_return_does_not_kill_thread_pool_worker( + client: Client, + worker: ExternalWorker, + env: WorkflowEnvironment, + shared_state_manager: SharedStateManager, +): + if env.supports_time_skipping_v1: + pytest.skip("Test requires real worker-side timeout cancellation delivery") + + def alive_thread_count(executor: ThreadPoolExecutor) -> int: + return sum(1 for thread in list(executor._threads) if thread.is_alive()) + + after_return_started = asyncio.Event() + allow_completion = asyncio.Event() + act_task_queue = str(uuid.uuid4()) + + with ThreadPoolExecutor(max_workers=1) as executor: + with pytest.warns( + UserWarning, + match="Worker max_concurrent_activities is 2 but activity_executor's max_workers is only", + ): + act_worker = Worker( + client, + task_queue=act_task_queue, + activities=[ + post_return_cancel_activity, + post_return_cancel_probe_activity, + ], + activity_executor=executor, + interceptors=[ + PostReturnCancelInterceptor(after_return_started, allow_completion) + ], + max_concurrent_activities=2, + shared_state_manager=shared_state_manager, + ) + + async with act_worker: + try: + timed_out_workflow = asyncio.create_task( + client.execute_workflow( + "kitchen_sink", + KSWorkflowParams( + actions=[ + KSAction( + execute_activity=KSExecuteActivityAction( + name="post_return_cancel_activity", + task_queue=act_task_queue, + start_to_close_timeout_ms=200, + retry_max_attempts=1, + ) + ) + ] + ), + id=str(uuid.uuid4()), + task_queue=worker.task_queue, + ) + ) + await asyncio.wait_for(after_return_started.wait(), timeout=5) + + with pytest.raises(WorkflowFailureError) as err: + await timed_out_workflow + timeout = assert_activity_error(err.value) + assert isinstance(timeout, TimeoutError) + assert timeout.type == TimeoutType.START_TO_CLOSE + + activity_worker = act_worker._activity_worker + assert activity_worker + for _ in range(50): + if any( + running.cancelled_event and running.cancelled_event.is_set() + for running in activity_worker._running_activities.values() + ): + break + await asyncio.sleep(0.1) + else: + pytest.fail("Timed out waiting for activity cancellation") + + probe_result = await asyncio.wait_for( + client.execute_workflow( + "kitchen_sink", + KSWorkflowParams( + actions=[ + KSAction( + execute_activity=KSExecuteActivityAction( + name="post_return_cancel_probe_activity", + task_queue=act_task_queue, + start_to_close_timeout_ms=30000, + retry_max_attempts=1, + ) + ) + ] + ), + id=str(uuid.uuid4()), + task_queue=worker.task_queue, + ), + timeout=5, + ) + assert probe_result == "probe" + assert alive_thread_count(executor) == 1 + finally: + allow_completion.set() + + @activity.defn async def local_without_schedule_to_close_activity() -> str: return "some-activity" @@ -1541,11 +1881,11 @@ async def test_activity_dynamic_duplicate( shared_state_manager: SharedStateManager, ): @activity.defn(dynamic=True) - async def dyn_activity_1(args: Sequence[RawValue]) -> None: + async def dyn_activity_1(_args: Sequence[RawValue]) -> None: pass @activity.defn(dynamic=True) - async def dyn_activity_2(args: Sequence[RawValue]) -> None: + async def dyn_activity_2(_args: Sequence[RawValue]) -> None: pass with pytest.raises(TypeError) as err: @@ -1672,9 +2012,8 @@ async def raise_error(): raise RuntimeError("oh no!") handler = CustomLogHandler() - activity.logger.base_logger.addHandler(handler) - try: + with LogHandler.apply(activity.logger.base_logger, handler): with pytest.raises(WorkflowFailureError) as err: await _execute_workflow_with_activity( client, @@ -1687,9 +2026,6 @@ async def raise_error(): ) assert handler._trace_identifiers == 1 - finally: - activity.logger.base_logger.removeHandler(CustomLogHandler()) - async def test_activity_heartbeat_context( client: Client, @@ -1732,7 +2068,7 @@ async def test_activity_reset_catch( env: WorkflowEnvironment, shared_state_manager: SharedStateManager, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Time skipping server doesn't support activity reset") @activity.defn @@ -1740,8 +2076,8 @@ async def wait_cancel() -> str: req = temporalio.api.workflowservice.v1.ResetActivityRequest( namespace=client.namespace, execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=activity.info().workflow_id, - run_id=activity.info().workflow_run_id, + workflow_id=activity.info().workflow_id or "", + run_id=activity.info().workflow_run_id or "", ), id=activity.info().activity_id, ) @@ -1760,8 +2096,8 @@ def sync_wait_cancel() -> str: req = temporalio.api.workflowservice.v1.ResetActivityRequest( namespace=client.namespace, execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=activity.info().workflow_id, - run_id=activity.info().workflow_run_id, + workflow_id=activity.info().workflow_id or "", + run_id=activity.info().workflow_run_id or "", ), id=activity.info().activity_id, ) @@ -1804,7 +2140,7 @@ async def test_activity_reset_history( env: WorkflowEnvironment, shared_state_manager: SharedStateManager, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Time skipping server doesn't support activity reset") @activity.defn @@ -1812,8 +2148,8 @@ async def wait_cancel() -> str: req = temporalio.api.workflowservice.v1.ResetActivityRequest( namespace=client.namespace, execution=temporalio.api.common.v1.WorkflowExecution( - workflow_id=activity.info().workflow_id, - run_id=activity.info().workflow_run_id, + workflow_id=activity.info().workflow_id or "", + run_id=activity.info().workflow_run_id or "", ), id=activity.info().activity_id, ) @@ -1823,7 +2159,7 @@ async def wait_cancel() -> str: activity.heartbeat() with pytest.raises(WorkflowFailureError) as e: - result = await _execute_workflow_with_activity( + await _execute_workflow_with_activity( client, worker, wait_cancel, diff --git a/tests/worker/test_activity_method_annotations.py b/tests/worker/test_activity_method_annotations.py new file mode 100644 index 0000000000..8b79c6b44c --- /dev/null +++ b/tests/worker/test_activity_method_annotations.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +import uuid +from dataclasses import dataclass +from datetime import timedelta + +from typing_extensions import Self + +from temporalio import activity, workflow +from temporalio.client import Client +from temporalio.worker import Worker + + +@dataclass +class Location: + city: str + + +class LocationActivities: + @activity.defn + async def plain(self, loc: Location) -> str: + return type(loc).__name__ + + @activity.defn + async def annotated(self: Self, loc: Location) -> str: + return type(loc).__name__ + + +@workflow.defn +class ActivityMethodAnnotationsWorkflow: + @workflow.run + async def run(self) -> list[str]: + return [ + await workflow.execute_activity_method( + LocationActivities.plain, + Location("Rome"), + start_to_close_timeout=timedelta(seconds=10), + ), + await workflow.execute_activity_method( + LocationActivities.annotated, + Location("Rome"), + start_to_close_timeout=timedelta(seconds=10), + ), + ] + + +async def test_activity_method_with_annotated_self(client: Client): + activities = LocationActivities() + task_queue = str(uuid.uuid4()) + async with Worker( + client, + task_queue=task_queue, + workflows=[ActivityMethodAnnotationsWorkflow], + activities=[activities.plain, activities.annotated], + ): + plain, annotated = await client.execute_workflow( + ActivityMethodAnnotationsWorkflow.run, + id=str(uuid.uuid4()), + task_queue=task_queue, + ) + + assert plain == "Location" + assert annotated == "Location" diff --git a/tests/worker/test_breakpoint_hang.py b/tests/worker/test_breakpoint_hang.py new file mode 100644 index 0000000000..29f3cb3f70 --- /dev/null +++ b/tests/worker/test_breakpoint_hang.py @@ -0,0 +1,223 @@ +from __future__ import annotations + +import pdb +import threading +import uuid +from types import FrameType +from typing import Any +from unittest.mock import patch + +import pytest + +from temporalio import workflow +from temporalio.client import Client, WorkflowFailureError +from temporalio.worker import Worker +from temporalio.worker.workflow_sandbox._restrictions import ( + RestrictedWorkflowAccessError, +) + + +@workflow.defn(sandboxed=False) +class ThreadCaptureWorkflow: + """Returns the name of the thread the workflow runs on. + + `sandboxed=False` so `threading.current_thread()` isn't intercepted — + these tests are about thread placement, not sandbox behavior. + """ + + @workflow.run + async def run(self) -> str: + return threading.current_thread().name + + +async def test_workflow_runs_on_pool_thread_without_debug_mode(client: Client): + """Production behavior unchanged: workflows run on `temporal_workflow_*`.""" + task_queue = f"tq-{uuid.uuid4()}" + async with Worker( + client, + task_queue=task_queue, + workflows=[ThreadCaptureWorkflow], + ): + thread_name = await client.execute_workflow( + ThreadCaptureWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=task_queue, + ) + + main_name = threading.main_thread().name + assert thread_name != main_name, ( + f"workflow ran on the main thread ({main_name!r}) — production behavior changed" + ) + assert thread_name.startswith("temporal_workflow_"), ( + f"expected pool thread, got {thread_name!r}" + ) + + +async def test_workflow_runs_on_main_thread_in_debug_mode(client: Client): + """debug_mode=True moves workflow activation to the asyncio main thread + so pdb's input() reaches the controlling TTY.""" + task_queue = f"tq-{uuid.uuid4()}" + async with Worker( + client, + task_queue=task_queue, + workflows=[ThreadCaptureWorkflow], + debug_mode=True, + ): + thread_name = await client.execute_workflow( + ThreadCaptureWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=task_queue, + ) + + main_name = threading.main_thread().name + assert thread_name == main_name, ( + f"expected workflow on main thread ({main_name!r}) in debug mode; " + f"got {thread_name!r}" + ) + + +@workflow.defn +class SandboxedBreakpointWorkflow: + """Sandboxed workflow that calls breakpoint() — verifies the fix works + without requiring users to switch to UnsandboxedWorkflowRunner.""" + + @workflow.run + async def run(self) -> str: + bird = "chicken" + breakpoint() + return f"bird was {bird}" + + +async def test_breakpoint_works_in_sandboxed_workflow_in_debug_mode(client: Client): + """breakpoint() inside a sandboxed workflow reaches the debugger when + debug_mode=True — no need to switch to UnsandboxedWorkflowRunner. + + Patches `pdb.Pdb.set_trace` with a stub so CI doesn't hang on an + interactive prompt. Reaching the stub on `MainThread` with the + workflow's `run` frame proves the full path (sandbox relaxation -> + our hook -> pdb) works through the sandbox. Also verifies workflow + locals (`bird`) are visible in the captured frame. + """ + captured: dict[str, object] = {} + + def stub_set_trace(_self: pdb.Pdb, frame: FrameType | None = None) -> None: + captured["thread"] = threading.current_thread().name + captured["frame_name"] = frame.f_code.co_name if frame else None + captured["bird"] = frame.f_locals.get("bird") if frame else None + captured["called"] = True + + task_queue = f"tq-{uuid.uuid4()}" + with patch.object(pdb.Pdb, "set_trace", stub_set_trace): + async with Worker( + client, + task_queue=task_queue, + workflows=[SandboxedBreakpointWorkflow], + debug_mode=True, + ): + result = await client.execute_workflow( + SandboxedBreakpointWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=task_queue, + ) + + assert result == "bird was chicken", ( + f"workflow did not complete; breakpoint() likely raised inside the sandbox: " + f"result={result!r}" + ) + assert captured.get("called"), "pdb.Pdb.set_trace was never reached" + assert captured["thread"] == threading.main_thread().name, ( + f"breakpoint landed on {captured['thread']!r}, not the main thread" + ) + assert captured["frame_name"] == "run", ( + f"breakpoint stopped at frame {captured['frame_name']!r}, " + f"expected the workflow's `run` method" + ) + assert captured["bird"] == "chicken", ( + f"workflow local `bird` not visible in pdb frame: got {captured['bird']!r}" + ) + + +async def test_breakpoint_quit_continues_workflow_in_debug_mode(client: Client): + """Typing `q` (or hitting Ctrl-D) in a workflow pdb session should + continue the workflow rather than failing the workflow task with + BdbQuit. The hook overrides `do_quit`/`do_EOF` to call `do_continue` + instead, so a debug session ends cleanly. + + Drives pdb via `cmdqueue` so no real stdin is needed. The first + iteration of cmdloop sees `q`, which dispatches to our overridden + `do_quit` -> `do_continue`. The workflow then completes normally. + """ + captured: dict[str, object] = {} + + class _AutoQuitPdb(pdb.Pdb): + """Pdb subclass that pre-queues `q` and captures frame state on + entry to `interaction`.""" + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.cmdqueue = ["q"] + + def interaction( # type: ignore[override] + self, frame: FrameType | None, traceback: Any + ) -> Any: + if frame is not None: + captured["frame_name"] = frame.f_code.co_name + captured["bird"] = frame.f_locals.get("bird") + return super().interaction(frame, traceback) + + task_queue = f"tq-{uuid.uuid4()}" + with patch("pdb.Pdb", _AutoQuitPdb): + async with Worker( + client, + task_queue=task_queue, + workflows=[SandboxedBreakpointWorkflow], + debug_mode=True, + ): + result = await client.execute_workflow( + SandboxedBreakpointWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=task_queue, + ) + + assert result == "bird was chicken", ( + f"workflow did not complete after `q`; `BdbQuit` likely propagated: " + f"result={result!r}" + ) + assert captured.get("frame_name") == "run", ( + f"pdb didn't stop in workflow.run frame: got {captured.get('frame_name')!r}" + ) + assert captured.get("bird") == "chicken", ( + f"workflow local `bird` not visible at pdb breakpoint: " + f"got {captured.get('bird')!r}" + ) + + +async def test_sandboxed_breakpoint_points_at_debug_mode(client: Client): + """Without `debug_mode`, calling `breakpoint()` in a sandboxed workflow + should raise the sandbox's restricted-access error with a message that + directs the user at `debug_mode=True` (rather than the generic + pass-through advice that doesn't apply here). + + `workflow_failure_exception_types=[RestrictedWorkflowAccessError]` makes + the sandbox error terminal for the workflow execution instead of + triggering Temporal's normal task-retry loop, so the test gets the + failure surfaced promptly without waiting on a timeout. + """ + task_queue = f"tq-{uuid.uuid4()}" + with pytest.raises(WorkflowFailureError) as exc_info: + async with Worker( + client, + task_queue=task_queue, + workflows=[SandboxedBreakpointWorkflow], + workflow_failure_exception_types=[RestrictedWorkflowAccessError], + ): + await client.execute_workflow( + SandboxedBreakpointWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=task_queue, + ) + + cause_msg = str(exc_info.value.cause) + assert "debug_mode=True" in cause_msg, ( + f"sandbox error didn't point at debug_mode: {cause_msg!r}" + ) diff --git a/tests/worker/test_child_workflow_versioning.py b/tests/worker/test_child_workflow_versioning.py new file mode 100644 index 0000000000..3225d6d254 --- /dev/null +++ b/tests/worker/test_child_workflow_versioning.py @@ -0,0 +1,240 @@ +"""Serverless tests of child workflow versioning commands and start failures.""" + +import asyncio +from datetime import datetime, timedelta, timezone + +import pytest + +import temporalio.api.common.v1 +import temporalio.api.deployment.v1 +import temporalio.api.enums.v1 +import temporalio.api.workflow.v1 +import temporalio.bridge.proto.child_workflow as child_workflow +import temporalio.bridge.proto.workflow_activation as workflow_activation +import temporalio.common as common +import temporalio.converter as converter +import temporalio.exceptions as exceptions +import temporalio.worker +import temporalio.workflow as workflow + + +@workflow.defn +class ParentWorkflow: + @workflow.run + async def run(self, execute: bool, override_kind: str, error_name: str) -> str: + version = common.WorkerDeploymentVersion("deployment", "build") + override = { + "absent": None, + "PinnedVersioningOverride": common.PinnedVersioningOverride(version), + "AutoUpgradeVersioningOverride": common.AutoUpgradeVersioningOverride(), + "OneTimeVersioningOverride": common.OneTimeVersioningOverride(version), + }[override_kind] + try: + if execute: + await workflow.execute_child_workflow( + "ChildWorkflow", id="child-id", versioning_override=override + ) + else: + await workflow.start_child_workflow( + "ChildWorkflow", id="child-id", versioning_override=override + ) + except ( + exceptions.InvalidVersioningOverrideError, + exceptions.WorkflowAlreadyStartedError, + ) as err: + assert type(err).__name__ == error_name + assert isinstance(err, exceptions.FailureError) + if isinstance(err, exceptions.WorkflowAlreadyStartedError): + assert err.workflow_id == "child-id" + assert err.workflow_type == "ChildWorkflow" + return type(err).__name__ + raise AssertionError("Child start should have failed") + + +def _create_instance(workflow_class: type) -> temporalio.worker.WorkflowInstance: + defn = workflow._Definition.must_from_class(workflow_class) + start_time = datetime(2026, 1, 1, tzinfo=timezone.utc) + return temporalio.worker.UnsandboxedWorkflowRunner().create_instance( + temporalio.worker.WorkflowInstanceDetails( + payload_converter_factory=converter.DefaultPayloadConverter, + failure_converter_class=converter.DefaultFailureConverter, + interceptor_classes=[], + defn=defn, + info=workflow.Info( + attempt=1, + continued_run_id=None, + cron_schedule=None, + execution_timeout=None, + first_execution_run_id="parent-run", + headers={}, + namespace="test-namespace", + original_execution_run_id="parent-run", + parent=None, + root=None, + priority=common.Priority(), + raw_memo={}, + retry_policy=None, + run_id="parent-run", + run_timeout=None, + search_attributes={}, + start_time=start_time, + task_queue="test-task-queue", + task_timeout=timedelta(seconds=10), + typed_search_attributes=common.TypedSearchAttributes.empty, + workflow_id="parent-id", + workflow_start_time=start_time, + workflow_type=defn.name or "", + ), + randomness_seed=1, + extern_functions={}, + disable_eager_activity_execution=False, + worker_level_failure_exception_types=[], + patch_activation_callback=None, + last_completion_result=temporalio.api.common.v1.Payloads(), + last_failure=None, + ) + ) + + +@pytest.mark.parametrize("execute", [False, True], ids=["start", "execute"]) +@pytest.mark.parametrize( + "override,expected_override", + [ + pytest.param(None, None, id="absent"), + pytest.param( + common.PinnedVersioningOverride( + common.WorkerDeploymentVersion("deployment", "build") + ), + temporalio.api.workflow.v1.VersioningOverride( + behavior=temporalio.api.enums.v1.VersioningBehavior.VERSIONING_BEHAVIOR_PINNED, + pinned_version="deployment.build", + pinned=temporalio.api.workflow.v1.VersioningOverride.PinnedOverride( + version=temporalio.api.deployment.v1.WorkerDeploymentVersion( + deployment_name="deployment", build_id="build" + ), + behavior=temporalio.api.workflow.v1.VersioningOverride.PinnedOverrideBehavior.PINNED_OVERRIDE_BEHAVIOR_PINNED, + ), + ), + id="pinned", + ), + pytest.param( + common.AutoUpgradeVersioningOverride(), + temporalio.api.workflow.v1.VersioningOverride( + behavior=temporalio.api.enums.v1.VersioningBehavior.VERSIONING_BEHAVIOR_AUTO_UPGRADE, + auto_upgrade=True, + ), + id="auto-upgrade", + ), + pytest.param( + common.OneTimeVersioningOverride( + common.WorkerDeploymentVersion("deployment", "build") + ), + temporalio.api.workflow.v1.VersioningOverride( + one_time=temporalio.api.workflow.v1.VersioningOverride.OneTimeOverride( + target_deployment_version=temporalio.api.deployment.v1.WorkerDeploymentVersion( + deployment_name="deployment", build_id="build" + ) + ) + ), + id="one-time", + ), + ], +) +@pytest.mark.parametrize( + "cause,error_type", + [ + pytest.param( + child_workflow.StartChildWorkflowExecutionFailedCause.START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID_VERSIONING_OVERRIDE, + exceptions.InvalidVersioningOverrideError, + id="invalid-versioning-override", + ), + pytest.param( + child_workflow.StartChildWorkflowExecutionFailedCause.START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS, + exceptions.WorkflowAlreadyStartedError, + id="already-started", + ), + ], +) +async def test_child_workflow_versioning( + execute: bool, + override: common.VersioningOverride | None, + expected_override: temporalio.api.workflow.v1.VersioningOverride | None, + cause: child_workflow.StartChildWorkflowExecutionFailedCause.ValueType, + error_type: type[exceptions.FailureError], +) -> None: + instance = _create_instance(ParentWorkflow) + try: + # Workers run activations off-loop so workflow tasks do not nest inside + # the caller's asyncio task. + completion = await asyncio.to_thread( + instance.activate, + workflow_activation.WorkflowActivation( + run_id="parent-run", + jobs=[ + workflow_activation.WorkflowActivationJob( + initialize_workflow=workflow_activation.InitializeWorkflow( + workflow_type="ParentWorkflow", + workflow_id="parent-id", + randomness_seed=1, + arguments=converter.DefaultPayloadConverter().to_payloads( + [ + execute, + type(override).__name__ if override else "absent", + error_type.__name__, + ] + ), + ) + ) + ], + ), + ) + assert completion.HasField("successful") + assert len(completion.successful.commands) == 1 + command = completion.successful.commands[0] + assert command.HasField("start_child_workflow_execution") + start = command.start_child_workflow_execution + assert start.workflow_id == "child-id" + assert start.workflow_type == "ChildWorkflow" + if expected_override is None: + assert not start.HasField("versioning_override") + else: + assert start.HasField("versioning_override") + assert start.versioning_override == expected_override + + completion = await asyncio.to_thread( + instance.activate, + workflow_activation.WorkflowActivation( + run_id="parent-run", + jobs=[ + workflow_activation.WorkflowActivationJob( + resolve_child_workflow_execution_start=workflow_activation.ResolveChildWorkflowExecutionStart( + seq=start.seq, + failed=workflow_activation.ResolveChildWorkflowExecutionStartFailure( + workflow_id=start.workflow_id, + workflow_type=start.workflow_type, + cause=cause, + ), + ) + ) + ], + ), + ) + assert completion.HasField("successful") + assert len(completion.successful.commands) == 1 + command = completion.successful.commands[0] + assert command.HasField("complete_workflow_execution") + assert converter.DefaultPayloadConverter().from_payloads( + [command.complete_workflow_execution.result] + ) == [error_type.__name__] + finally: + await asyncio.to_thread( + instance.activate, + workflow_activation.WorkflowActivation( + run_id="parent-run", + jobs=[ + workflow_activation.WorkflowActivationJob( + remove_from_cache=workflow_activation.RemoveFromCache() + ) + ], + ), + ) diff --git a/tests/worker/test_command_aware_visitor.py b/tests/worker/test_command_aware_visitor.py index 9e4b7a39b1..6e7da79637 100644 --- a/tests/worker/test_command_aware_visitor.py +++ b/tests/worker/test_command_aware_visitor.py @@ -1,7 +1,7 @@ """Test that CommandAwarePayloadVisitor handles all commands with seq fields that have payloads.""" from collections.abc import Iterator -from typing import Any, Type +from typing import Any from temporalio.bridge._visitor import PayloadVisitor from temporalio.bridge.proto.workflow_activation import workflow_activation_pb2 @@ -15,8 +15,6 @@ def test_command_aware_visitor_has_methods_for_all_seq_protos_with_payloads(): We only override methods when the base class has a visitor method (i.e., there are payloads to visit). Commands without payloads don't need overrides since there's nothing to visit. """ - visitor = CommandAwarePayloadVisitor() - # Find all protos with seq command_protos = list(_get_workflow_command_protos_with_seq()) job_protos = list(_get_workflow_activation_job_protos_with_seq()) @@ -67,24 +65,24 @@ def test_command_aware_visitor_has_methods_for_all_seq_protos_with_payloads(): # Sanity check: we should have fewer overrides than total protos with seq # (because some don't have payloads) - assert len(commands_with_payloads) < len( - command_protos - ), "Should have some commands without payloads" + assert len(commands_with_payloads) < len(command_protos), ( + "Should have some commands without payloads" + ) # All activation jobs except FireTimer have payloads - assert ( - len(jobs_with_payloads) == len(job_protos) - 1 - ), "Should have exactly one activation job without payloads (FireTimer)" + assert len(jobs_with_payloads) == len(job_protos) - 1, ( + "Should have exactly one activation job without payloads (FireTimer)" + ) def _get_workflow_command_protos_with_seq() -> Iterator[type[Any]]: """Get concrete classes of all workflow command protos with a seq field.""" for descriptor in workflow_commands_pb2.DESCRIPTOR.message_types_by_name.values(): if "seq" in descriptor.fields_by_name: - yield descriptor._concrete_class + yield getattr(descriptor, "_concrete_class") def _get_workflow_activation_job_protos_with_seq() -> Iterator[type[Any]]: """Get concrete classes of all workflow activation job protos with a seq field.""" for descriptor in workflow_activation_pb2.DESCRIPTOR.message_types_by_name.values(): if "seq" in descriptor.fields_by_name: - yield descriptor._concrete_class + yield getattr(descriptor, "_concrete_class") diff --git a/tests/worker/test_event_groups.py b/tests/worker/test_event_groups.py new file mode 100644 index 0000000000..a71de6543a --- /dev/null +++ b/tests/worker/test_event_groups.py @@ -0,0 +1,1973 @@ +from __future__ import annotations + +import asyncio +import uuid +from collections.abc import Sequence +from datetime import timedelta + +import nexusrpc +import pytest + +from temporalio import activity, workflow +from temporalio.api.common.v1 import Payload +from temporalio.api.enums.v1 import EventType +from temporalio.api.history.v1 import HistoryEvent +from temporalio.api.sdk.v1 import EventGroupMarker +from temporalio.client import Client, WorkflowHandle +from temporalio.common import RawValue, RetryPolicy, SearchAttributeKey +from temporalio.converter import ( + CompositePayloadConverter, + DataConverter, + DefaultPayloadConverter, + EncodingPayloadConverter, + PayloadCodec, + PayloadConverter, +) +from temporalio.exceptions import ( + ActivityError, + ApplicationError, + ChildWorkflowError, + NexusOperationError, + TemporalError, +) +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import Worker +from temporalio.workflow._event_groups import ( + _active_event_groups, + _ActiveEventGroups, + _capture_event_group_markers, + _inbound_event_group, + _LabelEventGroup, + _StubImplicitEventGroup, +) +from tests.helpers import ( + assert_eventually, + ensure_search_attributes_present, + new_worker, +) +from tests.helpers.nexus import make_nexus_endpoint_name + +_ACT_TIMEOUT = timedelta(seconds=10) + + +# These tests need a server that transcribes Event Group markers onto history. +# Time-skipping (the Java test server) does not. +def _require_event_groups_server(env: WorkflowEnvironment) -> None: + if env.supports_time_skipping_v1: + pytest.skip("Event Groups require a server that transcribes markers") + + +#################################################################################################### +# 1. Explicit Event Groups Marker Label IDs (`EG-LABEL-ID`) +# +# EG-LABEL-ID-00..04 (derived IDs) are retracted: IDs are always caller-provided. +#################################################################################################### + + +@workflow.defn +class UserProvidedIdsWorkflow: + @workflow.run + async def run(self) -> None: + c = workflow.create_event_group("c-id", label="ccc") + d1 = workflow.create_event_group("d-id", label="ddd1") + d2 = workflow.create_event_group("d-id", label="ddd2") + not_c = workflow.create_event_group("not-c-id", label="ccc") + await _activity("activity-c", [c]) + await _activity("activity-d1", [d1]) + await _activity("activity-d2", [d2]) + await _activity("activity-not-c", [not_c]) + + +async def test_user_provided_label_ids(client: Client, env: WorkflowEnvironment): + _require_event_groups_server(env) + + async with new_worker( + client, UserProvidedIdsWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + UserProvidedIdsWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + assert ( + len(_events_of_type(events, EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED)) + == 4 + ) + + # EG-LABEL-ID-20: IDs are used verbatim + _assert_marker_ids( + _activity_event(events, "activity-c"), _label_marker_id("c-id") + ) + + # EG-LABEL-ID-21: different labels + same ID => same group + assert _marker_ids(_activity_event(events, "activity-d1")) == _marker_ids( + _activity_event(events, "activity-d2") + ) + + # EG-LABEL-ID-22: same label + different IDs => distinct groups + assert _marker_ids(_activity_event(events, "activity-c")) != _marker_ids( + _activity_event(events, "activity-not-c") + ) + + +#################################################################################################### +# 2. Explicit Event Groups Marker Label Payload (`EG-LABEL-PAYLOAD`) +#################################################################################################### + + +@workflow.defn +class LabelPayloadWorkflow: + @workflow.run + async def run(self) -> None: + a = workflow.create_event_group("aaa") + b = workflow.create_event_group("bbb", label="Label B") + # Control: activity arguments go through the worker's payload converter, so this is how the + # custom-converter test proves that converter is actually installed. + await workflow.execute_activity( + control_activity, + "control", + start_to_close_timeout=_ACT_TIMEOUT, + activity_id="control", + ) + await _activity("activity-a", [a]) + await _activity("activity-b", [b]) + + +class _CustomStringConverter(EncodingPayloadConverter): + @property + def encoding(self) -> str: + return "custom" + + def to_payload(self, value: object) -> Payload | None: + if isinstance(value, str): + return Payload( + metadata={"encoding": b"custom"}, + data=f"custom-converter-{value}".encode(), + ) + return None + + def from_payload(self, payload: Payload, type_hint: type | None = None) -> str: + text = payload.data.decode() + prefix = "custom-converter-" + return text[len(prefix) :] if text.startswith(prefix) else text + + +class _CustomPayloadConverter(CompositePayloadConverter): + def __init__(self) -> None: + super().__init__( + _CustomStringConverter(), + *DefaultPayloadConverter.default_encoding_payload_converters, + ) + + +class _WrappingPayloadCodec(PayloadCodec): + async def encode(self, payloads: Sequence[Payload]) -> list[Payload]: + return [ + Payload( + metadata={"encoding": b"binary/wrapped"}, data=p.SerializeToString() + ) + for p in payloads + ] + + async def decode(self, payloads: Sequence[Payload]) -> list[Payload]: + decoded: list[Payload] = [] + for payload in payloads: + inner = Payload() + inner.ParseFromString(payload.data) + decoded.append(inner) + return decoded + + +async def test_label_payload_is_json_plain(client: Client, env: WorkflowEnvironment): + _require_event_groups_server(env) + + async with new_worker( + client, + LabelPayloadWorkflow, + activities=[noop_activity, control_activity], + ) as worker: + handle = await client.start_workflow( + LabelPayloadWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + + activity_a = _activity_event(events, "activity-a") + activity_b = _activity_event(events, "activity-b") + _assert_markers(activity_a, _label_marker_id("aaa")) + _assert_markers(activity_b, _label_marker("bbb", "Label B")) + + # EG-LABEL-PAYLOAD-00: label payload is a json/plain JSON string + assert _label_payload_of(activity_b, "bbb") == ("json/plain", '"Label B"') + + # EG-LABEL-PAYLOAD-02: an omitted label produces no payload + assert not _label_payload_set(activity_a, "aaa") + + +async def test_label_payload_uses_default_converter_not_worker_converter( + env: WorkflowEnvironment, +): + _require_event_groups_server(env) + + custom_client = await env.connect_client( + data_converter=DataConverter(payload_converter_class=_CustomPayloadConverter) + ) + async with new_worker( + custom_client, + LabelPayloadWorkflow, + activities=[noop_activity, control_activity], + ) as worker: + handle = await custom_client.start_workflow( + LabelPayloadWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + + control = _activity_event(events, "control") + control_payload = ( + control.activity_task_scheduled_event_attributes.input.payloads[0] + ) + assert control_payload.metadata["encoding"] == b"custom" + assert control_payload.data == b"custom-converter-control" + + activity_a = _activity_event(events, "activity-a") + activity_b = _activity_event(events, "activity-b") + + # EG-LABEL-PAYLOAD-01: labels still go through the SDK default converter + assert _label_payload_of(activity_b, "bbb") == ("json/plain", '"Label B"') + assert not _label_payload_set(activity_a, "aaa") + + +async def test_label_payload_is_codec_encoded_but_ids_are_not( + env: WorkflowEnvironment, +): + _require_event_groups_server(env) + + codec = _WrappingPayloadCodec() + codec_client = await env.connect_client( + data_converter=DataConverter(payload_codec=codec) + ) + async with new_worker( + codec_client, + LabelPayloadWorkflow, + activities=[noop_activity, control_activity], + ) as worker: + handle = await codec_client.start_workflow( + LabelPayloadWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + + activity_a = _activity_event(events, "activity-a") + activity_b = _activity_event(events, "activity-b") + + # EG-LABEL-PAYLOAD-21: IDs are not codec-encoded + _assert_marker_ids(activity_a, _label_marker_id("aaa")) + _assert_marker_ids(activity_b, _label_marker_id("bbb")) + + # EG-LABEL-PAYLOAD-20: label payloads are processed by payload codecs + assert _label_payload_of(activity_b, "bbb")[0] == "binary/wrapped" + decoded_b = (await codec.decode([_raw_label_payload(activity_b, "bbb")]))[0] + assert PayloadConverter.default.from_payload(decoded_b) == "Label B" + assert not _label_payload_set(activity_a, "aaa") + + +#################################################################################################### +# 3. Explicit Event Group Scopes (`EG-SCOPE`) +#################################################################################################### + + +@workflow.defn +class ScopeBaselineWorkflow: + @workflow.run + async def run(self) -> None: + a = workflow.create_event_group("aaa") + with a.scope(): + await _activity("activity") + await workflow.sleep(0.001) + await workflow.start_child_workflow( + NoopChildWorkflow.run, + id=f"{workflow.info().workflow_id}_child", + ) + + +async def test_commands_in_a_scope_carry_its_marker( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, + ScopeBaselineWorkflow, + NoopChildWorkflow, + activities=[noop_activity], + ) as worker: + handle = await client.start_workflow( + ScopeBaselineWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + a = _label_marker_id("aaa") + + # EG-SCOPE-00: baseline only; per-command coverage lives in EG-COMMANDS + _assert_markers(_activity_event(events, "activity"), a) + _assert_markers(_single_event(events, EventType.EVENT_TYPE_TIMER_STARTED), a) + _assert_markers( + _single_event( + events, EventType.EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED + ), + a, + ) + + +@workflow.defn +class NestedScopesWorkflow: + @workflow.run + async def run(self) -> None: + a = workflow.create_event_group("aaa") + b = workflow.create_event_group("bbb") + with a.scope(): + await _activity("a-before") + with b.scope(): + await _activity("a-b") + await _activity("a-after") + await _activity("outside") + + +async def test_nesting_scopes_composes(client: Client, env: WorkflowEnvironment): + _require_event_groups_server(env) + + async with new_worker( + client, NestedScopesWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + NestedScopesWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + a = _label_marker_id("aaa") + b = _label_marker_id("bbb") + + assert ( + len(_events_of_type(events, EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED)) + == 4 + ) + + # EG-SCOPE-01 + _assert_markers(_activity_event(events, "a-before"), a) + _assert_markers(_activity_event(events, "a-b"), a, b) + _assert_markers(_activity_event(events, "a-after"), a) + _assert_markers(_activity_event(events, "outside")) + + +@workflow.defn +class ReenteredScopeWorkflow: + @workflow.run + async def run(self) -> None: + a = workflow.create_event_group("aaa") + with a.scope(): + await _activity("a-before") + with a.scope(): + await _activity("a-inner") + await _activity("a-after") + await _activity("outside") + + +async def test_reentering_a_group_nests_correctly( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, ReenteredScopeWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + ReenteredScopeWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + a = _label_marker_id("aaa") + + assert ( + len(_events_of_type(events, EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED)) + == 4 + ) + + # EG-SCOPE-02: inner re-entry still serializes the marker once + _assert_markers(_activity_event(events, "a-before"), a) + _assert_markers(_activity_event(events, "a-inner"), a) + _assert_markers(_activity_event(events, "a-after"), a) + _assert_markers(_activity_event(events, "outside")) + + +@workflow.defn +class ConcurrentScopesWorkflow: + @workflow.run + async def run(self) -> None: + a = workflow.create_event_group("aaa") + b = workflow.create_event_group("bbb") + c = workflow.create_event_group("ccc") + d = workflow.create_event_group("ddd") + e = workflow.create_event_group("eee") + + async def left() -> None: + with b.scope(): + with a.scope(): + with c.scope(): + await _activity("b-a-c") + await _activity("b-a") + await _activity("b-after-a") + + async def right() -> None: + with d.scope(): + with a.scope(): + with e.scope(): + await _activity("d-a-e") + await _activity("d-a") + await _activity("d-after-a") + + await asyncio.gather(left(), right()) + await _activity("outside") + + +async def test_a_group_can_be_scoped_from_two_concurrent_branches( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, ConcurrentScopesWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + ConcurrentScopesWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + a = _label_marker_id("aaa") + b = _label_marker_id("bbb") + c = _label_marker_id("ccc") + d = _label_marker_id("ddd") + e = _label_marker_id("eee") + + assert ( + len(_events_of_type(events, EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED)) + == 7 + ) + + # EG-SCOPE-03: a mutable "currently active groups" stack would cross-contaminate here + _assert_markers(_activity_event(events, "b-a-c"), b, a, c) + _assert_markers(_activity_event(events, "b-a"), b, a) + _assert_markers(_activity_event(events, "b-after-a"), b) + _assert_markers(_activity_event(events, "d-a-e"), d, a, e) + _assert_markers(_activity_event(events, "d-a"), d, a) + _assert_markers(_activity_event(events, "d-after-a"), d) + _assert_markers(_activity_event(events, "outside")) + + +@workflow.defn +class DetachedTaskScopeWorkflow: + @workflow.run + async def run(self) -> None: + a = workflow.create_event_group("aaa") + released = False + started = False + + async def task() -> None: + nonlocal started + await _activity("inside-before") + started = True + await workflow.wait_condition(lambda: released) + await _activity("inside-after") + + with a.scope(): + running = asyncio.create_task(task()) + await workflow.wait_condition(lambda: started) + released = True + await running + await _activity("outside") + + +async def test_a_task_started_inside_a_scope_keeps_it_after_exit( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, DetachedTaskScopeWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + DetachedTaskScopeWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + a = _label_marker_id("aaa") + + assert ( + len(_events_of_type(events, EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED)) + == 3 + ) + + # EG-SCOPE-04: membership is captured when the task is started + _assert_markers(_activity_event(events, "inside-before"), a) + _assert_markers(_activity_event(events, "inside-after"), a) + _assert_markers(_activity_event(events, "outside")) + + +@workflow.defn +class OutsiderTaskScopeWorkflow: + @workflow.run + async def run(self) -> None: + a = workflow.create_event_group("aaa") + release = False + + async def outsider() -> None: + await workflow.wait_condition(lambda: release) + await _activity("outside-task") + + running = asyncio.create_task(outsider()) + with a.scope(): + await _activity("in-a") + release = True + await running + + +async def test_a_task_created_outside_a_scope_does_not_inherit_it( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, OutsiderTaskScopeWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + OutsiderTaskScopeWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + a = _label_marker_id("aaa") + + assert ( + len(_events_of_type(events, EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED)) + == 2 + ) + + # EG-SCOPE-05: membership follows the context the code was started in + _assert_markers(_activity_event(events, "in-a"), a) + _assert_markers(_activity_event(events, "outside-task")) + + +@workflow.defn +class ThrowingScopeWorkflow: + @workflow.run + async def run(self) -> None: + a = workflow.create_event_group("aaa") + b = workflow.create_event_group("bbb") + with a.scope(): + try: + with b.scope(): + await _activity("a-b") + raise RuntimeError("boom") + except RuntimeError: + pass + await _activity("a-after") + + +async def test_a_scope_unwinds_cleanly_when_its_body_throws( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, ThrowingScopeWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + ThrowingScopeWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + a = _label_marker_id("aaa") + b = _label_marker_id("bbb") + + assert ( + len(_events_of_type(events, EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED)) + == 2 + ) + + # EG-SCOPE-06 + _assert_markers(_activity_event(events, "a-b"), a, b) + _assert_markers(_activity_event(events, "a-after"), a) + + +#################################################################################################### +# 4. Implicit Event Groups (`EG-IMPLICIT`) +#################################################################################################### + + +def test_invalid_inbound_event_id_is_noop_stub( + monkeypatch: pytest.MonkeyPatch, +) -> None: + monkeypatch.setattr(workflow.logger, "warning", lambda *args, **kwargs: None) + + stub = _inbound_event_group(0) + assert isinstance(stub, _StubImplicitEventGroup) + assert isinstance(_inbound_event_group(-1), _StubImplicitEventGroup) + + enclosing = _ActiveEventGroups(explicit={"id": _LabelEventGroup("id", "label")}) + applied = stub._applied_over(enclosing) + assert applied.implicit is None + assert applied.explicit == {} + + token = _active_event_groups.set(applied) + try: + assert _capture_event_group_markers(None) == [] + finally: + _active_event_groups.reset(token) + + +@workflow.defn +class StaticSignalHandlerWorkflow: + def __init__(self) -> None: + self._done = False + + @workflow.run + async def run(self) -> None: + await _activity("from-main-before-signal") + await workflow.wait_condition(lambda: self._done) + await _activity("from-main-after-signal") + + @workflow.signal + async def my_signal(self) -> None: + await _activity("from-static-signal") + a = workflow.create_event_group("aaa") + with a.scope(): + await _activity("from-static-signal-scoped") + self._done = True + + +async def test_static_signal_handler_implicit_group( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, StaticSignalHandlerWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + StaticSignalHandlerWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal(StaticSignalHandlerWorkflow.my_signal) + await handle.result() + events = await _fetch_events(handle) + signal = _event_marker(_signaled_event_ids(events)[0]) + a = _label_marker_id("aaa") + + # EG-IMPLICIT-00 + _assert_markers(_activity_event(events, "from-static-signal"), signal) + # EG-IMPLICIT-01 + _assert_markers(_activity_event(events, "from-static-signal-scoped"), signal, a) + # EG-IMPLICIT-30 + _assert_markers(_activity_event(events, "from-main-before-signal")) + _assert_markers(_activity_event(events, "from-main-after-signal")) + + +@workflow.defn +class RuntimeSignalHandlerWorkflow: + def __init__(self) -> None: + self._done = False + + @workflow.run + async def run(self) -> None: + outside = workflow.create_event_group("outside") + inside = workflow.create_event_group("inside") + + async def on_signal() -> None: + await _activity("from-runtime-signal") + with inside.scope(): + await _activity("from-runtime-signal-scoped") + self._done = True + + with outside.scope(): + workflow.set_signal_handler("mySignal", on_signal) + await _activity("in-outside") + + await _activity("from-main-before-signal") + await workflow.wait_condition(lambda: self._done) + await _activity("from-main-after-signal") + + +async def test_runtime_signal_handler_implicit_group( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, RuntimeSignalHandlerWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + RuntimeSignalHandlerWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal("mySignal") + await handle.result() + events = await _fetch_events(handle) + signal_ids = _signaled_event_ids(events) + assert len(signal_ids) == 1 + signal = _event_marker(signal_ids[0]) + outside = _label_marker_id("outside") + inside = _label_marker_id("inside") + + # EG-IMPLICIT-10: handler carries the signaled event, not the registration scope + _assert_markers(_activity_event(events, "from-runtime-signal"), signal) + _assert_markers(_activity_event(events, "in-outside"), outside) + # EG-IMPLICIT-11 + _assert_markers( + _activity_event(events, "from-runtime-signal-scoped"), signal, inside + ) + # EG-IMPLICIT-30 + _assert_markers(_activity_event(events, "from-main-before-signal")) + _assert_markers(_activity_event(events, "from-main-after-signal")) + + +@workflow.defn +class BufferedSignalWorkflow: + def __init__(self) -> None: + self._unblocked = False + self._handled = False + + @workflow.run + async def run(self) -> None: + workflow.set_signal_handler("unblock", self._unblock) + await workflow.wait_condition(lambda: self._unblocked) + + async def on_signal() -> None: + await _activity("from-runtime-signal") + self._handled = True + + workflow.set_signal_handler("mySignal", on_signal) + await workflow.wait_condition(lambda: self._handled) + + def _unblock(self) -> None: + self._unblocked = True + + +async def test_buffered_signal_keeps_its_original_implicit_marker( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, BufferedSignalWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + BufferedSignalWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal("mySignal") + await handle.signal("unblock") + await handle.result() + events = await _fetch_events(handle) + signal_ids = _signaled_event_ids(events) + assert len(signal_ids) == 2 + # mySignal is sent first, so it is the first signaled event + signal = _event_marker(signal_ids[0]) + + # EG-IMPLICIT-12 + _assert_markers(_activity_event(events, "from-runtime-signal"), signal) + + +@workflow.defn +class CatchAllSignalWorkflow: + def __init__(self) -> None: + self._done = False + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._done) + + @workflow.signal(dynamic=True) + async def on_any_signal(self, _name: str, _args: Sequence[RawValue]) -> None: + await _activity("from-catch-all-signal") + self._done = True + + +async def test_catch_all_signal_handler_implicit_group( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, CatchAllSignalWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + CatchAllSignalWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal("non-existent-signal") + await handle.result() + events = await _fetch_events(handle) + signal = _event_marker(_signaled_event_ids(events)[0]) + + # EG-IMPLICIT-20 + _assert_markers(_activity_event(events, "from-catch-all-signal"), signal) + + +@workflow.defn +class StaticUpdateHandlerWorkflow: + def __init__(self) -> None: + self._done = False + + @workflow.run + async def run(self) -> None: + await _activity("from-main-before-update") + await workflow.wait_condition(lambda: self._done) + await _activity("from-main-after-update") + + @workflow.update + async def my_update(self) -> None: + await _activity("from-static-update") + inside = workflow.create_event_group("inside") + with inside.scope(): + await _activity("from-static-update-scoped") + self._done = True + + +async def test_static_update_handler_implicit_group( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + update_id = "static-update-1" + async with new_worker( + client, StaticUpdateHandlerWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + StaticUpdateHandlerWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.execute_update(StaticUpdateHandlerWorkflow.my_update, id=update_id) + await handle.result() + events = await _fetch_events(handle) + update = _update_marker(update_id) + inside = _label_marker_id("inside") + + # EG-IMPLICIT-50 + _assert_markers(_activity_event(events, "from-static-update"), update) + # EG-IMPLICIT-51 + _assert_markers( + _activity_event(events, "from-static-update-scoped"), update, inside + ) + # EG-IMPLICIT-80 + _assert_markers(_activity_event(events, "from-main-before-update")) + _assert_markers(_activity_event(events, "from-main-after-update")) + + +@workflow.defn +class RuntimeUpdateHandlerWorkflow: + def __init__(self) -> None: + self._done = False + + @workflow.run + async def run(self) -> None: + outside = workflow.create_event_group("outside") + inside = workflow.create_event_group("inside") + + async def on_update() -> None: + await _activity("from-runtime-update") + with inside.scope(): + await _activity("from-runtime-update-scoped") + self._done = True + + with outside.scope(): + workflow.set_update_handler("myUpdate", on_update) + await _activity("in-outside") + + await _activity("from-main-before-update") + await workflow.wait_condition(lambda: self._done) + await _activity("from-main-after-update") + + +async def test_runtime_update_handler_implicit_group( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + update_id = "runtime-update-1" + async with new_worker( + client, RuntimeUpdateHandlerWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + RuntimeUpdateHandlerWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Updates that arrive before registration are rejected, not buffered. + async def handler_registered() -> None: + events = await _fetch_events(handle) + assert any( + e.event_type == EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED + and e.activity_task_scheduled_event_attributes.activity_id + == "in-outside" + for e in events + ) + + await assert_eventually(handler_registered) + await handle.execute_update("myUpdate", id=update_id) + await handle.result() + events = await _fetch_events(handle) + update = _update_marker(update_id) + outside = _label_marker_id("outside") + inside = _label_marker_id("inside") + + # EG-IMPLICIT-60 + _assert_markers(_activity_event(events, "from-runtime-update"), update) + _assert_markers(_activity_event(events, "in-outside"), outside) + # EG-IMPLICIT-61 + _assert_markers( + _activity_event(events, "from-runtime-update-scoped"), update, inside + ) + # EG-IMPLICIT-80 + _assert_markers(_activity_event(events, "from-main-before-update")) + _assert_markers(_activity_event(events, "from-main-after-update")) + + +@workflow.defn +class CatchAllUpdateWorkflow: + def __init__(self) -> None: + self._done = False + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._done) + + @workflow.update(dynamic=True) + async def on_any_update(self, _name: str, _args: Sequence[RawValue]) -> None: + await _activity("from-catch-all-update") + self._done = True + + +async def test_catch_all_update_handler_implicit_group( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + update_id = "catch-all-update-1" + async with new_worker( + client, CatchAllUpdateWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + CatchAllUpdateWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.execute_update("non-existent-update", id=update_id) + await handle.result() + events = await _fetch_events(handle) + + # EG-IMPLICIT-70 + _assert_markers( + _activity_event(events, "from-catch-all-update"), _update_marker(update_id) + ) + + +#################################################################################################### +# 5. Event Group Marker Aggregation (`EG-AGGREGATION`) +#################################################################################################### + + +@workflow.defn +class AggregationWorkflow: + @workflow.run + async def run(self) -> None: + a1 = workflow.create_event_group("aaa") + a2 = workflow.create_event_group("aaa") + b1 = workflow.create_event_group("b-id", label="bbb1") + b2 = workflow.create_event_group("b-id", label="bbb2") + + await _activity("direct-duplicates", [a2, b1, a1, b1, a2, a1]) + + with a1.scope(): + with a2.scope(): + with b1.scope(): + await _activity("nested-scopes") + + with a1.scope(): + with b1.scope(): + await _activity("scope-and-direct-b", [b1]) + await _activity("scope-and-direct-a-b", [b1, a1]) + + await _activity("same-instance-twice", [a1, a1]) + await _activity("same-id-direct", [b1, b2]) + with b1.scope(): + await _activity("same-id-scope-and-direct", [b2]) + + +async def test_markers_dedupe_by_id(client: Client, env: WorkflowEnvironment): + _require_event_groups_server(env) + + async with new_worker( + client, AggregationWorkflow, activities=[noop_activity] + ) as worker: + handle = await client.start_workflow( + AggregationWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + a = _label_marker_id("aaa") + b = _label_marker("b-id", "bbb1") + both = (a, b) + + # EG-AGGREGATION-00 + _assert_markers(_activity_event(events, "direct-duplicates"), *both) + # EG-AGGREGATION-01 + _assert_markers(_activity_event(events, "nested-scopes"), *both) + # EG-AGGREGATION-02 + _assert_markers(_activity_event(events, "scope-and-direct-b"), *both) + _assert_markers(_activity_event(events, "scope-and-direct-a-b"), *both) + # EG-AGGREGATION-03 + _assert_markers(_activity_event(events, "same-instance-twice"), a) + # EG-AGGREGATION-04: compare IDs only; which label is emitted is unspecified + _assert_marker_ids( + _activity_event(events, "same-id-direct"), _label_marker_id("b-id") + ) + _assert_marker_ids( + _activity_event(events, "same-id-scope-and-direct"), + _label_marker_id("b-id"), + ) + + +#################################################################################################### +# 6. Command Type Coverage (`EG-COMMANDS`) +# +# EG-COMMANDS-07-CHILD does not apply: the child handle is an asyncio.Task, so Task.cancel() +# is the inherited-from-start path already covered by EG-COMMANDS-04-CANCEL. +# EG-COMMANDS-23 and EG-COMMANDS-24 do not apply: Core-based SDKs have no version/sideEffect API. +# Python continue_as_new always takes options, so there is no short-form counterpart of EG-COMMANDS-40. +#################################################################################################### + + +@workflow.defn +class TimerCommandsWorkflow: + @workflow.run + async def run(self) -> None: + direct = workflow.create_event_group("direct") + scope = workflow.create_event_group("scope") + with scope.scope(): + await workflow.sleep(0.001, event_groups=[direct]) + try: + await workflow.wait_condition( + lambda: False, timeout=0.001, event_groups=[direct] + ) + except asyncio.TimeoutError: + pass + # A 1ms sleep is the timeout; cancelling the 60s task is the cancel + # command. Avoid asyncio.wait_for so the timeout timer is a normal + # sleep and only carries the ambient scope. + long = asyncio.create_task(workflow.sleep(60, event_groups=[direct])) + await workflow.sleep(0.001) + long.cancel() + await _swallow(long) + + +async def test_timer_commands_carry_markers(client: Client, env: WorkflowEnvironment): + _require_event_groups_server(env) + + async with new_worker(client, TimerCommandsWorkflow) as worker: + handle = await client.start_workflow( + TimerCommandsWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + both = ( + _label_marker_id("direct"), + _label_marker_id("scope"), + ) + ambient = (_label_marker_id("scope"),) + + timers = _events_of_type(events, EventType.EVENT_TYPE_TIMER_STARTED) + # sleep, wait_condition timeout, wait_for's 1ms timeout, the cancelled 60s sleep + assert len(timers) == 4 + cancels = _events_of_type(events, EventType.EVENT_TYPE_TIMER_CANCELED) + assert len(cancels) == 1 + + # EG-COMMANDS-00 and EG-COMMANDS-01 run sequentially, so they are the first two timers + _assert_markers(timers[0], *both) + _assert_markers(timers[1], *both) + # EG-COMMANDS-00-CANCEL: wait_for starts both remaining timers in one task, so select by set + rest = timers[2:] + ambient_timers = [t for t in rest if _markers(t) == sorted(ambient)] + both_timers = [t for t in rest if _markers(t) == sorted(both)] + assert len(ambient_timers) == 1 + assert len(both_timers) == 1 + _assert_markers(cancels[0], *both) + + +@workflow.defn +class AsyncioTimerCommandsWorkflow: + @workflow.run + async def run(self) -> None: + scope = workflow.create_event_group("scope") + sleep_task: asyncio.Task[None] | None = None + later: asyncio.TimerHandle | None = None + with scope.scope(): + # asyncio.sleep / call_later expose no event_groups argument, so the + # ambient scope is all they can carry. + sleep_task = asyncio.create_task(asyncio.sleep(60)) + later = asyncio.get_running_loop().call_later(60, lambda: None) + # Force a Workflow Task boundary so the timer commands reach the server + # before they are cancelled. + await workflow.sleep(0.001) + assert sleep_task is not None and later is not None + sleep_task.cancel() + later.cancel() + await _swallow(sleep_task) + + +async def test_asyncio_sleep_and_call_later_carry_ambient_markers( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker(client, AsyncioTimerCommandsWorkflow) as worker: + handle = await client.start_workflow( + AsyncioTimerCommandsWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + ambient = (_label_marker_id("scope"),) + + timers = _events_of_type(events, EventType.EVENT_TYPE_TIMER_STARTED) + assert len(timers) == 3 + cancels = _events_of_type(events, EventType.EVENT_TYPE_TIMER_CANCELED) + assert len(cancels) == 2 + + ambient_timers = [t for t in timers if _markers(t) == sorted(ambient)] + unscoped_timers = [t for t in timers if _markers(t) == []] + assert len(ambient_timers) == 2 + assert len(unscoped_timers) == 1 + for cancel in cancels: + _assert_markers(cancel, *ambient) + + +@workflow.defn +class ActivityCommandsWorkflow: + @workflow.run + async def run(self) -> None: + direct = workflow.create_event_group("direct") + scope = workflow.create_event_group("scope") + with scope.scope(): + await workflow.execute_activity( + noop_activity, + start_to_close_timeout=_ACT_TIMEOUT, + schedule_to_start_timeout=timedelta(seconds=10), + event_groups=[direct], + activity_id="activity", + ) + await _swallow( + asyncio.wait_for( + workflow.execute_activity( + sleep_activity, + start_to_close_timeout=_ACT_TIMEOUT, + schedule_to_start_timeout=timedelta(seconds=10), + cancellation_type=workflow.ActivityCancellationType.TRY_CANCEL, + event_groups=[direct], + activity_id="activity-cancelled-sleep-5s", + ), + timeout=0.001, + ) + ) + + +async def test_activity_commands_carry_markers( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, + ActivityCommandsWorkflow, + activities=[noop_activity, sleep_activity], + ) as worker: + handle = await client.start_workflow( + ActivityCommandsWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + both = ( + _label_marker_id("direct"), + _label_marker_id("scope"), + ) + + # EG-COMMANDS-02 + _assert_markers(_activity_event(events, "activity"), *both) + # EG-COMMANDS-02-CANCEL + _assert_markers(_activity_event(events, "activity-cancelled-sleep-5s"), *both) + _assert_markers( + _single_event(events, EventType.EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED), + *both, + ) + + +@workflow.defn +class LocalActivityCommandsWorkflow: + @workflow.run + async def run(self) -> None: + direct = workflow.create_event_group("direct") + scope = workflow.create_event_group("scope") + with scope.scope(): + await workflow.execute_local_activity( + noop_activity, + start_to_close_timeout=_ACT_TIMEOUT, + event_groups=[direct], + activity_id="local-activity", + ) + + cancel_trigger = workflow.create_event_group("cancel-trigger") + cancelled_la = workflow.create_event_group("cancelled-la") + sleeping = asyncio.create_task( + workflow.execute_local_activity( + sleep_activity, + start_to_close_timeout=_ACT_TIMEOUT, + cancellation_type=workflow.ActivityCancellationType.TRY_CANCEL, + event_groups=[direct, cancelled_la], + activity_id="cancelled-local-activity-sleep-5s", + ) + ) + + async def trigger() -> None: + await workflow.execute_local_activity( + noop_activity, + start_to_close_timeout=_ACT_TIMEOUT, + event_groups=[direct, cancel_trigger], + activity_id="cancel-trigger", + ) + sleeping.cancel() + + await asyncio.gather(trigger(), _swallow(sleeping)) + + await workflow.execute_local_activity( + fail_first_activity, + start_to_close_timeout=_ACT_TIMEOUT, + local_retry_threshold=timedelta(milliseconds=1), + retry_policy=RetryPolicy( + initial_interval=timedelta(seconds=1), + backoff_coefficient=1, + maximum_attempts=2, + ), + event_groups=[direct], + activity_id="backoff-local-activity-fail-first-attempt", + ) + + +async def test_local_activity_commands_carry_markers( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, + LocalActivityCommandsWorkflow, + activities=[noop_activity, sleep_activity, fail_first_activity], + ) as worker: + handle = await client.start_workflow( + LocalActivityCommandsWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + task_timeout=timedelta(seconds=5), + ) + await handle.result() + events = await _fetch_events(handle) + both = ( + _label_marker_id("direct"), + _label_marker_id("scope"), + ) + cancel_trigger = ( + *both, + _label_marker_id("cancel-trigger"), + ) + cancelled_la = ( + *both, + _label_marker_id("cancelled-la"), + ) + + local_acts = _markers_named(events, "core_local_activity") + # plain complete, cancel-trigger complete, cancelled LA, backoff fail, backoff success + assert len(local_acts) == 5 + + # EG-COMMANDS-03 + _assert_markers(local_acts[0], *both) + # EG-COMMANDS-03-CANCEL + _assert_markers(local_acts[1], *cancel_trigger) + _assert_markers(local_acts[2], *cancelled_la) + # EG-COMMANDS-03-BACKOFF: plan's 10s interval vs 5s WFT timeout is the same Core branch; + # local_retry_threshold of 1ms reaches it without waiting 10s. + backoff_timer = _events_of_type(events, EventType.EVENT_TYPE_TIMER_STARTED) + assert len(backoff_timer) == 1 + _assert_markers(backoff_timer[0], *both) + _assert_markers(local_acts[3], *both) + _assert_markers(local_acts[4], *both) + + +@workflow.defn +class ChildWorkflowCommandsWorkflow: + @workflow.run + async def run(self) -> None: + direct = workflow.create_event_group("direct") + scope = workflow.create_event_group("scope") + with scope.scope(): + await workflow.start_child_workflow( + NoopChildWorkflow.run, + id=f"{workflow.info().workflow_id}_child", + event_groups=[direct], + ) + await _swallow( + asyncio.wait_for( + workflow.execute_child_workflow( + SleepChildWorkflow.run, + id=f"{workflow.info().workflow_id}_child_cancel", + cancellation_type=workflow.ChildWorkflowCancellationType.WAIT_CANCELLATION_REQUESTED, + event_groups=[direct], + ), + timeout=0.001, + ) + ) + + +async def test_child_workflow_commands_carry_markers( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, + ChildWorkflowCommandsWorkflow, + NoopChildWorkflow, + SleepChildWorkflow, + ) as worker: + handle = await client.start_workflow( + ChildWorkflowCommandsWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + both = ( + _label_marker_id("direct"), + _label_marker_id("scope"), + ) + + initiated = _events_of_type( + events, EventType.EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED + ) + assert len(initiated) == 2 + # EG-COMMANDS-04 + _assert_markers(initiated[0], *both) + # EG-COMMANDS-04-CANCEL + _assert_markers(initiated[1], *both) + _assert_markers( + _single_event( + events, + EventType.EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED, + ), + *both, + ) + + +@nexusrpc.handler.service_handler +class EventGroupsNexusService: + @nexusrpc.handler.sync_operation + async def nexus_operation( + self, _ctx: nexusrpc.handler.StartOperationContext, _input: None + ) -> None: + return None + + @nexusrpc.handler.sync_operation + async def nexus_operation_sleep_5s( + self, _ctx: nexusrpc.handler.StartOperationContext, _input: None + ) -> None: + await asyncio.sleep(5) + + +@workflow.defn +class NexusCommandsWorkflow: + @workflow.run + async def run(self, endpoint: str) -> None: + direct = workflow.create_event_group("direct") + scope = workflow.create_event_group("scope") + nexus_client = workflow.create_nexus_client( + service=EventGroupsNexusService, endpoint=endpoint + ) + with scope.scope(): + await nexus_client.execute_operation( + EventGroupsNexusService.nexus_operation, + None, + event_groups=[direct], + ) + # Don't await start/execute to completion: a sync sleeper would finish + # before cancel, and Core drops a cancel issued in the same WFT as + # schedule. The 1ms sleep forces a WFT boundary after schedule. + running = asyncio.create_task( + nexus_client.execute_operation( + EventGroupsNexusService.nexus_operation_sleep_5s, + None, + cancellation_type=workflow.NexusOperationCancellationType.TRY_CANCEL, + event_groups=[direct], + ) + ) + await workflow.sleep(0.001) + running.cancel() + await _swallow(running) + + +@pytest.mark.requires_local_server +async def test_nexus_operation_commands_carry_markers( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Nexus tests don't work with the time-skipping server") + + task_queue = str(uuid.uuid4()) + endpoint = make_nexus_endpoint_name(task_queue) + await env.create_nexus_endpoint(endpoint, task_queue) + async with Worker( + client, + task_queue=task_queue, + workflows=[NexusCommandsWorkflow], + nexus_service_handlers=[EventGroupsNexusService()], + ): + handle = await client.start_workflow( + NexusCommandsWorkflow.run, + endpoint, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + both = ( + _label_marker_id("direct"), + _label_marker_id("scope"), + ) + + scheduled = _events_of_type( + events, EventType.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED + ) + assert len(scheduled) == 2 + # EG-COMMANDS-05 + _assert_markers(scheduled[0], *both) + # EG-COMMANDS-05-CANCEL + _assert_markers(scheduled[1], *both) + _assert_markers( + _single_event( + events, EventType.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED + ), + *both, + ) + + +@workflow.defn +class ExternalWorkflowCommandsWorkflow: + @workflow.run + async def run(self) -> None: + direct = workflow.create_event_group("direct") + scope = workflow.create_event_group("scope") + missing = workflow.get_external_workflow_handle("event-groups-no-such-workflow") + with scope.scope(): + try: + await missing.signal("signal", event_groups=[direct]) + except ApplicationError: + pass + try: + await missing.cancel(event_groups=[direct]) + except ApplicationError: + pass + + +async def test_external_workflow_commands_carry_markers( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker(client, ExternalWorkflowCommandsWorkflow) as worker: + handle = await client.start_workflow( + ExternalWorkflowCommandsWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + both = ( + _label_marker_id("direct"), + _label_marker_id("scope"), + ) + # EG-COMMANDS-06 + _assert_markers( + _single_event( + events, + EventType.EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED, + ), + *both, + ) + # EG-COMMANDS-07 + _assert_markers( + _single_event( + events, + EventType.EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED, + ), + *both, + ) + + +@workflow.defn +class ChildWorkflowSignalCommandsWorkflow: + @workflow.run + async def run(self) -> None: + direct = workflow.create_event_group("direct") + scope = workflow.create_event_group("scope") + child = await workflow.start_child_workflow( + WaitForSignalChildWorkflow.run, + id=f"{workflow.info().workflow_id}_child", + ) + with scope.scope(): + await child.signal("noop", event_groups=[direct]) + await child + + +async def test_child_workflow_signal_commands_carry_markers( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker( + client, + ChildWorkflowSignalCommandsWorkflow, + WaitForSignalChildWorkflow, + ) as worker: + handle = await client.start_workflow( + ChildWorkflowSignalCommandsWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + both = ( + _label_marker_id("direct"), + _label_marker_id("scope"), + ) + + # Start is outside the ambient scope so 06-CHILD is not inheriting start-child markers. + _assert_markers( + _single_event( + events, EventType.EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED + ) + ) + # EG-COMMANDS-06-CHILD + _assert_markers( + _single_event( + events, + EventType.EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED, + ), + *both, + ) + + +@workflow.defn +class MetadataCommandsWorkflow: + @workflow.run + async def run(self) -> None: + direct = workflow.create_event_group("direct") + scope = workflow.create_event_group("scope") + with scope.scope(): + workflow.upsert_memo({"some-key": "some-value"}, event_groups=[direct]) + workflow.upsert_search_attributes( + [SearchAttributeKey.for_bool("CustomBoolField").value_set(False)], + event_groups=[direct], + ) + workflow.patched("my-patch-1", event_groups=[direct]) + workflow.deprecate_patch("my-patch-2", event_groups=[direct]) + + +@pytest.mark.requires_local_server +async def test_metadata_commands_carry_markers( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + await ensure_search_attributes_present( + client, SearchAttributeKey.for_bool("CustomBoolField") + ) + + async with new_worker(client, MetadataCommandsWorkflow) as worker: + handle = await client.start_workflow( + MetadataCommandsWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + events = await _fetch_events(handle) + both = ( + _label_marker_id("direct"), + _label_marker_id("scope"), + ) + + # EG-COMMANDS-20 + _assert_markers( + _single_event(events, EventType.EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED), + *both, + ) + # EG-COMMANDS-22 + patches = _markers_named(events, "core_patch") + assert len(patches) == 2 + for patch in patches: + _assert_markers(patch, *both) + # EG-COMMANDS-21 plus the two TemporalChangeVersion upserts beside the patches + upserts = _events_of_type( + events, EventType.EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES + ) + assert len(upserts) == 3 + for upsert in upserts: + _assert_markers(upsert, *both) + + +@workflow.defn +class ContinueAsNewCommandsWorkflow: + @workflow.run + async def run(self, second_run: bool = False) -> None: + if second_run: + return + direct = workflow.create_event_group("direct") + scope = workflow.create_event_group("scope") + with scope.scope(): + workflow.continue_as_new(True, event_groups=[direct]) + + +async def test_continue_as_new_carries_markers( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker(client, ContinueAsNewCommandsWorkflow) as worker: + handle = await client.start_workflow( + ContinueAsNewCommandsWorkflow.run, + False, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + # ContinuedAsNew lives on the first run + first_run = client.get_workflow_handle(handle.id, run_id=_run_id(handle)) + events = await _fetch_events(first_run) + both = ( + _label_marker_id("direct"), + _label_marker_id("scope"), + ) + + # EG-COMMANDS-40 + _assert_markers( + _single_event( + events, EventType.EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW + ), + *both, + ) + + +#################################################################################################### +# Language-specific +#################################################################################################### + + +@workflow.defn +class EmptyIdAndLabelWorkflow: + @workflow.run + async def run(self) -> list[str]: + errors: list[str] = [] + try: + workflow.create_event_group("") + except ValueError as err: + errors.append(str(err)) + try: + workflow.create_event_group("id", label="") + except ValueError as err: + errors.append(str(err)) + return errors + + +async def test_event_group_rejects_empty_id_and_label( + client: Client, env: WorkflowEnvironment +): + _require_event_groups_server(env) + + async with new_worker(client, EmptyIdAndLabelWorkflow) as worker: + assert [ + "Event group id cannot be empty", + "Event group label cannot be empty", + ] == await client.execute_workflow( + EmptyIdAndLabelWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + +def test_create_event_group_requires_workflow_context(): + with pytest.raises(TemporalError): + workflow.create_event_group("outside-workflow") + + +#################################################################################################### +# History helpers +# +# Markers are rendered as strings so failures print readably and collections can be compared as +# unordered sets (by sorting). ``_render_marker`` includes the label; ``_render_marker_id`` does +# not, for the cases where two groups share an id but not a label and the emitted label is +# unspecified. +#################################################################################################### + + +def _run_id(handle: WorkflowHandle) -> str: + assert handle.first_execution_run_id is not None + return handle.first_execution_run_id + + +def _events_of_type( + events: Sequence[HistoryEvent], event_type: EventType.ValueType +) -> list[HistoryEvent]: + return [e for e in events if e.event_type == event_type] + + +def _single_event( + events: Sequence[HistoryEvent], event_type: EventType.ValueType +) -> HistoryEvent: + matches = _events_of_type(events, event_type) + assert len(matches) == 1, ( + f"expected 1 {EventType.Name(event_type)}, got {len(matches)}" + ) + return matches[0] + + +def _activity_event(events: Sequence[HistoryEvent], activity_id: str) -> HistoryEvent: + matches = [ + e + for e in events + if e.event_type == EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED + and e.activity_task_scheduled_event_attributes.activity_id == activity_id + ] + assert len(matches) == 1, f"expected 1 activity {activity_id!r}, got {len(matches)}" + return matches[0] + + +def _markers_named( + events: Sequence[HistoryEvent], marker_name: str +) -> list[HistoryEvent]: + return [ + e + for e in events + if e.event_type == EventType.EVENT_TYPE_MARKER_RECORDED + and e.marker_recorded_event_attributes.marker_name == marker_name + ] + + +def _signaled_event_ids(events: Sequence[HistoryEvent]) -> list[int]: + return [ + e.event_id + for e in events + if e.event_type == EventType.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + ] + + +def _render_marker(marker: EventGroupMarker) -> str: + if marker.HasField("inbound_event"): + return f"event:{marker.inbound_event.inbound_event_id}" + if marker.HasField("inbound_update"): + return f"update:{marker.inbound_update.inbound_update_id}" + if marker.label.HasField("label"): + try: + label = PayloadConverter.default.from_payload(marker.label.label) + return f"label:{marker.label.id}:{label}" + except Exception: + return f"label:{marker.label.id}" + return f"label:{marker.label.id}" + + +def _render_marker_id(marker: EventGroupMarker) -> str: + if marker.HasField("inbound_event"): + return f"event:{marker.inbound_event.inbound_event_id}" + if marker.HasField("inbound_update"): + return f"update:{marker.inbound_update.inbound_update_id}" + return f"label:{marker.label.id}" + + +def _markers(event: HistoryEvent) -> list[str]: + return sorted(_render_marker(m) for m in event.event_group_markers) + + +def _marker_ids(event: HistoryEvent) -> list[str]: + return sorted(_render_marker_id(m) for m in event.event_group_markers) + + +def _assert_markers(event: HistoryEvent, *expected: str) -> None: + actual = [_render_marker(m) for m in event.event_group_markers] + assert len(actual) == len(expected), ( + f"marker count {len(actual)} != {len(expected)}: {actual}" + ) + assert sorted(actual) == sorted(expected) + + +def _assert_marker_ids(event: HistoryEvent, *expected: str) -> None: + actual = [_render_marker_id(m) for m in event.event_group_markers] + assert len(actual) == len(expected), ( + f"marker count {len(actual)} != {len(expected)}: {actual}" + ) + assert sorted(actual) == sorted(expected) + + +def _label_marker(group_id: str, label: str) -> str: + return f"label:{group_id}:{label}" + + +def _label_marker_id(group_id: str) -> str: + return f"label:{group_id}" + + +def _event_marker(event_id: int) -> str: + return f"event:{event_id}" + + +def _update_marker(update_id: str) -> str: + return f"update:{update_id}" + + +def _label_payload_of(event: HistoryEvent, marker_id: str) -> tuple[str, str]: + for marker in event.event_group_markers: + if marker.HasField("label") and marker.label.id == marker_id: + if not marker.label.HasField("label"): + raise AssertionError(f"label marker {marker_id!r} has no payload") + encoding = marker.label.label.metadata["encoding"].decode() + return encoding, marker.label.label.data.decode() + raise AssertionError(f"no label marker {marker_id!r} on event") + + +def _label_payload_set(event: HistoryEvent, marker_id: str) -> bool: + for marker in event.event_group_markers: + if marker.HasField("label") and marker.label.id == marker_id: + return marker.label.HasField("label") + raise AssertionError(f"no label marker {marker_id!r} on event") + + +def _raw_label_payload(event: HistoryEvent, marker_id: str) -> Payload: + for marker in event.event_group_markers: + if marker.HasField("label") and marker.label.id == marker_id: + return marker.label.label + raise AssertionError(f"no label marker {marker_id!r} on event") + + +async def _fetch_events(handle: WorkflowHandle) -> list[HistoryEvent]: + return list((await handle.fetch_history()).events) + + +# Module-level so every workflow can issue a uniquely keyed activity without repeating options. +async def _activity( + activity_id: str, + event_groups: Sequence[workflow.EventGroup] | None = None, +) -> None: + await workflow.execute_activity( + noop_activity, + start_to_close_timeout=_ACT_TIMEOUT, + activity_id=activity_id, + event_groups=event_groups, + ) + + +async def _swallow(aw: object) -> None: + try: + await aw # type: ignore[misc] + except ( + asyncio.CancelledError, + asyncio.TimeoutError, + ActivityError, + ChildWorkflowError, + NexusOperationError, + ): + pass + + +@activity.defn +async def noop_activity() -> None: + return None + + +@activity.defn +async def control_activity(value: str) -> str: + return value + + +@activity.defn +async def sleep_activity() -> None: + await asyncio.sleep(5) + + +@activity.defn +async def fail_first_activity() -> None: + if activity.info().attempt == 1: + raise ApplicationError("retry me") + + +@workflow.defn +class WaitForSignalChildWorkflow: + def __init__(self) -> None: + self._done = False + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._done) + + @workflow.signal + def noop(self) -> None: + self._done = True + + +@workflow.defn +class NoopChildWorkflow: + @workflow.run + async def run(self) -> None: + return None + + +@workflow.defn +class SleepChildWorkflow: + @workflow.run + async def run(self) -> None: + await workflow.sleep(5) diff --git a/tests/worker/test_extstore.py b/tests/worker/test_extstore.py new file mode 100644 index 0000000000..dd4b8b0a8b --- /dev/null +++ b/tests/worker/test_extstore.py @@ -0,0 +1,1672 @@ +import asyncio +import contextlib +import dataclasses +import json +import uuid +from collections.abc import Iterator, Sequence +from dataclasses import dataclass +from datetime import timedelta +from pathlib import Path +from unittest import mock + +import pytest +from google.protobuf import json_format + +import temporalio +import temporalio.bridge.client +import temporalio.bridge.proto.workflow_completion +import temporalio.bridge.worker +import temporalio.client +import temporalio.converter +from temporalio import activity, workflow +from temporalio.api.common.v1 import Payload +from temporalio.client import ( + Client, + WorkflowFailureError, + WorkflowHandle, + WorkflowHistory, +) +from temporalio.common import RetryPolicy +from temporalio.converter import ( + ActivitySerializationContext, + ExternalStorage, + PayloadCodec, + SerializationContext, + StorageDriver, + StorageDriverActivityInfo, + StorageDriverClaim, + StorageDriverRetrieveContext, + StorageDriverSelectContext, + StorageDriverStoreContext, + StorageDriverWorkflowInfo, + WithSerializationContext, + WorkflowSerializationContext, +) +from temporalio.exceptions import ActivityError, ApplicationError +from temporalio.testing._workflow import WorkflowEnvironment +from temporalio.worker import Replayer +from tests.helpers import assert_task_fail_eventually, new_worker +from tests.test_extstore import InMemoryTestDriver, RecordingPayloadCodec + + +@dataclass(frozen=True) +class ExtStoreActivityInput: + input_data: str + output_size: int + pass + + +# --------------------------------------------------------------------------- +# Chained-activity scenario +# --------------------------------------------------------------------------- + + +@dataclass(frozen=True) +class ProcessDataInput: + """Input for the first activity: generate a large result.""" + + size: int + + +@dataclass(frozen=True) +class SummarizeInput: + """Input for the second activity: receives the large result from the first.""" + + data: str + + +@activity.defn +async def process_data(input: ProcessDataInput) -> str: + """Produces a large string result that will be stored externally.""" + return "x" * input.size + + +@activity.defn +async def summarize(input: SummarizeInput) -> str: + """Receives the large result and returns a short summary.""" + return f"received {len(input.data)} bytes" + + +@workflow.defn +class ChainedExtStoreWorkflow: + """Workflow that passes a large activity result directly into a second activity. + + This mirrors a common customer pattern: activity A produces a large payload + (e.g. a fetched document or ML inference result) which is too big to store + inline in workflow history, and is then consumed by activity B. External + storage should transparently offload the payload between the two steps + without any special handling in the workflow code. + """ + + @workflow.run + async def run(self, payload_size: int) -> str: + large_result = await workflow.execute_activity( + process_data, + ProcessDataInput(size=payload_size), + schedule_to_close_timeout=timedelta(seconds=10), + ) + return await workflow.execute_activity( + summarize, + SummarizeInput(data=large_result), + schedule_to_close_timeout=timedelta(seconds=10), + ) + + +@activity.defn +async def ext_store_activity( + input: ExtStoreActivityInput, +) -> str: + return "ao" * int(input.output_size / 2) + + +@dataclass(frozen=True) +class ExtStoreWorkflowInput: + input_data: str + activity_input_size: int + activity_output_size: int + output_size: int + max_activity_attempts: int | None = None + + +@workflow.defn +class ExtStoreWorkflow: + @workflow.run + async def run(self, input: ExtStoreWorkflowInput) -> str: + retry_policy = ( + RetryPolicy(maximum_attempts=input.max_activity_attempts) + if input.max_activity_attempts is not None + else None + ) + await workflow.execute_activity( + ext_store_activity, + ExtStoreActivityInput( + input_data="ai" * int(input.activity_input_size / 2), + output_size=input.activity_output_size, + ), + schedule_to_close_timeout=timedelta(seconds=3), + retry_policy=retry_policy, + ) + return "wo" * int(input.output_size / 2) + + +class BadTestDriver(InMemoryTestDriver): + def __init__( + self, + driver_name: str = "bad-driver", + no_store: bool = False, + no_retrieve: bool = False, + raise_payload_not_found: bool = False, + ): + super().__init__(driver_name) + self._no_store = no_store + self._no_retrieve = no_retrieve + self._raise_payload_not_found = raise_payload_not_found + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + if self._no_store: + return [] + return await super().store(context, payloads) + + async def retrieve( + self, + context: StorageDriverRetrieveContext, + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + if self._no_retrieve: + return [] + if self._raise_payload_not_found: + raise ApplicationError( + "Payload not found because the bucket does not exist.", + type="BucketNotFoundError", + non_retryable=True, + ) + return await super().retrieve(context, claims) + + +async def test_extstore_activity_input_no_retrieve( + env: WorkflowEnvironment, +): + """When the driver's retrieve returns no payloads for an externalized + activity input, the activity fails and the workflow terminates with a + WorkflowFailureError wrapping an ActivityError.""" + driver = BadTestDriver(no_retrieve=True) + + client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=1024, + ), + ), + ) + + async with new_worker( + client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + handle = await client.start_workflow( + ExtStoreWorkflow.run, + ExtStoreWorkflowInput( + input_data="workflow input", + activity_input_size=1000, + activity_output_size=10, + output_size=10, + max_activity_attempts=1, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + with pytest.raises(WorkflowFailureError) as err: + await handle.result() + + assert isinstance(err.value.cause, ActivityError) + assert isinstance(err.value.cause.cause, ApplicationError) + assert err.value.cause.cause.message == "Failed decoding arguments" + + +async def test_extstore_activity_result_no_store( + env: WorkflowEnvironment, +): + """When the driver's store returns no claims for an activity result that + exceeds the size threshold, the activity fails to complete and the workflow + terminates with a WorkflowFailureError wrapping an ActivityError.""" + driver = BadTestDriver(no_store=True) + + client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=1024, + ), + ), + ) + + async with new_worker( + client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + handle = await client.start_workflow( + ExtStoreWorkflow.run, + ExtStoreWorkflowInput( + input_data="workflow input", + activity_input_size=10, + activity_output_size=1000, + output_size=10, + max_activity_attempts=1, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + with pytest.raises(WorkflowFailureError) as err: + await handle.result() + + assert isinstance(err.value.cause, ActivityError) + assert isinstance(err.value.cause.cause, ApplicationError) + assert ( + err.value.cause.cause.message + == "Driver 'bad-driver' returned 0 claims, expected 1" + ) + assert err.value.cause.cause.type == "ValueError" + + +async def test_extstore_worker_missing_driver( + env: WorkflowEnvironment, +): + """Validate that when a worker is provided a workflow history with + external storage references and the worker is not configured for external + storage, it will cause a workflow task failure. + """ + driver = InMemoryTestDriver() + + far_client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=1024, + ), + ), + ) + + worker_client = await env.connect_client() + + async with new_worker( + worker_client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + handle = await far_client.start_workflow( + ExtStoreWorkflow.run, + ExtStoreWorkflowInput( + input_data="wi" * 1024, + activity_input_size=10, + activity_output_size=10, + output_size=10, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + await assert_task_fail_eventually(handle) + + +async def test_extstore_payload_not_found_fails_workflow( + env: WorkflowEnvironment, +): + """When a non-retryable ApplicationError is raised while retrieving workflow input, + the workflow must fail terminally (not retry as a task failure). + """ + client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[BadTestDriver(raise_payload_not_found=True)], + payload_size_threshold=1024, + ), + ), + ) + + async with new_worker( + client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + handle = await client.start_workflow( + ExtStoreWorkflow.run, + ExtStoreWorkflowInput( + input_data="wi" * 512, # exceeds 1024-byte threshold + activity_input_size=10, + activity_output_size=10, + output_size=10, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=10), + ) + + with pytest.raises(WorkflowFailureError) as exc_info: + await handle.result() + + assert isinstance(exc_info.value.cause, ApplicationError) + assert ( + exc_info.value.cause.message + == "Payload not found because the bucket does not exist." + ) + assert exc_info.value.cause.type == "BucketNotFoundError" + assert exc_info.value.cause.non_retryable is True + + +async def _run_extstore_workflow_and_fetch_history( + env: WorkflowEnvironment, + driver: InMemoryTestDriver, + *, + input_data: str, + activity_output_size: int = 10, +) -> WorkflowHandle: + """Helper: run ExtStoreWorkflow with the given driver and return its history handle.""" + extstore_client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=512, + ), + ), + ) + async with new_worker( + extstore_client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + handle = await extstore_client.start_workflow( + ExtStoreWorkflow.run, + ExtStoreWorkflowInput( + input_data=input_data, + activity_input_size=10, + activity_output_size=activity_output_size, + output_size=10, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + return handle + + +async def test_replay_extstore_history_fails_without_extstore( + env: WorkflowEnvironment, +) -> None: + """A history with externalized workflow input fails to replay when the + Replayer has no external storage configured.""" + driver = InMemoryTestDriver() + handle = await _run_extstore_workflow_and_fetch_history( + env, + driver, + input_data="wi" * 512, # exceeds 512-byte threshold + ) + history = await handle.fetch_history() + + # Replay without external storage: decode_activation raises when it + # encounters a reference payload with no driver configured, producing a + # task failure (not a NondeterminismError). + result = await Replayer(workflows=[ExtStoreWorkflow]).replay_workflow( + history, raise_on_replay_failure=False + ) + assert isinstance(result.replay_failure, RuntimeError) + assert not isinstance(result.replay_failure, workflow.NondeterminismError) + assert ( + "[TMPRL1105] Detected externally stored payload(s) but external storage is not configured." + in result.replay_failure.args[0] + ) + + +async def test_replay_extstore_history_succeeds_with_correct_extstore( + env: WorkflowEnvironment, +) -> None: + """A history with externalized workflow input replays successfully when the + Replayer is configured with the same storage driver that holds the data.""" + driver = InMemoryTestDriver() + handle = await _run_extstore_workflow_and_fetch_history( + env, driver, input_data="wi" * 512 + ) + history = await handle.fetch_history() + + # Replay with the same populated driver — must succeed. + await Replayer( + workflows=[ExtStoreWorkflow], + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=512, + ), + ), + ).replay_workflow(history) + + +@pytest.mark.usefixtures("encode_storage_references") +async def test_extstore_reference_payloads_codec_encoded_in_history( + env: WorkflowEnvironment, +) -> None: + """Every reference payload written to history by the client, workflow + worker, and activity worker is codec-encoded and marked, and the history + replays.""" + data_converter = dataclasses.replace( + temporalio.converter.default(), + payload_codec=RecordingPayloadCodec("binary/test-encoded"), + external_storage=ExternalStorage( + drivers=[InMemoryTestDriver()], + payload_size_threshold=512, + ), + ) + client = await env.connect_client(data_converter=data_converter) + async with new_worker( + client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + handle = await client.start_workflow( + ExtStoreWorkflow.run, + ExtStoreWorkflowInput( + input_data="wi" * 512, + activity_input_size=1024, + activity_output_size=1024, + output_size=1024, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert await handle.result() == "wo" * 512 + + history = await handle.fetch_history() + reference_payloads = [] + for event in history.events: + if event.HasField("workflow_execution_started_event_attributes"): + reference_payloads.append( + event.workflow_execution_started_event_attributes.input.payloads[0] + ) + elif event.HasField("activity_task_scheduled_event_attributes"): + reference_payloads.append( + event.activity_task_scheduled_event_attributes.input.payloads[0] + ) + elif event.HasField("activity_task_completed_event_attributes"): + reference_payloads.append( + event.activity_task_completed_event_attributes.result.payloads[0] + ) + elif event.HasField("workflow_execution_completed_event_attributes"): + reference_payloads.append( + event.workflow_execution_completed_event_attributes.result.payloads[0] + ) + assert len(reference_payloads) == 4 + for payload in reference_payloads: + assert payload.metadata["encoding"] == b"binary/test-encoded" + assert payload.metadata["__temporal_external_storage_reference"] == b"true" + assert payload.external_payloads[0].size_bytes > 0 + + await Replayer( + workflows=[ExtStoreWorkflow], data_converter=data_converter + ).replay_workflow(history) + + +class ReferenceContextRecordingCodec(PayloadCodec, WithSerializationContext): + """Encodes like RecordingPayloadCodec and records the serialization context + each storage reference payload is encoded with.""" + + def __init__( + self, + reference_contexts: list[SerializationContext | None], + context: SerializationContext | None = None, + ) -> None: + self._reference_contexts = reference_contexts + self._context = context + self._codec = RecordingPayloadCodec("binary/test-encoded") + + def with_context( + self, context: SerializationContext + ) -> "ReferenceContextRecordingCodec": + return ReferenceContextRecordingCodec(self._reference_contexts, context) + + async def encode(self, payloads: Sequence[Payload]) -> list[Payload]: + for p in payloads: + if ( + p.metadata.get("messageType") + == b"temporal.api.sdk.v1.ExternalStorageReference" + ): + self._reference_contexts.append(self._context) + return await self._codec.encode(payloads) + + async def decode(self, payloads: Sequence[Payload]) -> list[Payload]: + return await self._codec.decode(payloads) + + +@pytest.mark.usefixtures("encode_storage_references") +async def test_extstore_reference_payloads_use_payload_serialization_context( + env: WorkflowEnvironment, +) -> None: + """Each reference payload is encoded with the serialization context of the + value it replaces: workflow context for workflow input and result, activity + context for activity input and result.""" + reference_contexts: list[SerializationContext | None] = [] + data_converter = dataclasses.replace( + temporalio.converter.default(), + payload_codec=ReferenceContextRecordingCodec(reference_contexts), + external_storage=ExternalStorage( + drivers=[InMemoryTestDriver()], + payload_size_threshold=512, + ), + ) + client = await env.connect_client(data_converter=data_converter) + workflow_id = f"workflow-{uuid.uuid4()}" + async with new_worker( + client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + await client.execute_workflow( + ExtStoreWorkflow.run, + ExtStoreWorkflowInput( + input_data="wi" * 512, + activity_input_size=1024, + activity_output_size=1024, + output_size=1024, + ), + id=workflow_id, + task_queue=worker.task_queue, + ) + + workflow_contexts = [ + c for c in reference_contexts if isinstance(c, WorkflowSerializationContext) + ] + activity_contexts = [ + c for c in reference_contexts if isinstance(c, ActivitySerializationContext) + ] + # Workflow input (client) and workflow result (workflow worker). + assert len(workflow_contexts) == 2 + assert all(c.workflow_id == workflow_id for c in workflow_contexts) + # Activity input (workflow worker) and activity result (activity worker). + assert len(activity_contexts) == 2 + assert all( + c.workflow_id == workflow_id and not c.is_local for c in activity_contexts + ) + assert len(reference_contexts) == 4 + + +# The committed histories record these workflow and activity names, so they +# must not change. +@workflow.defn(name="ReferencesBeforeEncodingWorkflow") +class ExtstoreReplayWorkflow: + """Replays the committed histories loaded by _load_recorded_history.""" + + @workflow.run + async def run(self, _input: str) -> str: + await workflow.execute_activity( + "references_before_encoding_activity", + "ai" * 512, + start_to_close_timeout=timedelta(seconds=30), + ) + return "wo" * 512 + + +def _load_recorded_history( + name: str, +) -> tuple[WorkflowHistory, InMemoryTestDriver, list[Payload]]: + """Load a committed history, a driver holding the payloads its references + point to, and its four reference payloads. + + Each history was recorded with ExtstoreReplayWorkflow, a payload codec + matching RecordingPayloadCodec("binary/test-encoded"), and a driver storing + claims the same way as InMemoryTestDriver, with a 512-byte storage threshold. + The codec always encoded the stored payloads. Whether it also encoded the + references depends on the recording. + """ + fixtures = Path(__file__).parent + history = WorkflowHistory.from_json( + name, (fixtures / f"test_extstore_{name}_history.json").read_text() + ) + stored_payloads = json.loads( + (fixtures / f"test_extstore_{name}_stored_payloads.json").read_text() + ) + driver = InMemoryTestDriver() + for key, payload_json in stored_payloads.items(): + driver._storage[key] = json_format.ParseDict( + payload_json, Payload() + ).SerializeToString() + + references = [ + payload + for event in history.events + for payload in ( + *event.workflow_execution_started_event_attributes.input.payloads, + *event.activity_task_scheduled_event_attributes.input.payloads, + *event.activity_task_completed_event_attributes.result.payloads, + *event.workflow_execution_completed_event_attributes.result.payloads, + ) + ] + assert len(references) == 4 + return history, driver, references + + +async def _replay_recorded_history( + history: WorkflowHistory, driver: InMemoryTestDriver +) -> None: + await Replayer( + workflows=[ExtstoreReplayWorkflow], + data_converter=dataclasses.replace( + temporalio.converter.default(), + payload_codec=RecordingPayloadCodec("binary/test-encoded"), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=512, + ), + ), + ).replay_workflow(history) + assert driver._retrieve_calls > 0 + + +async def test_replay_decodes_unencoded_references() -> None: + """A history recorded with temporalio 1.34.0 replays. That release wrote + references unencoded and unmarked, even with a codec configured.""" + history, driver, references = _load_recorded_history("unencoded_references") + for reference in references: + assert reference.metadata["encoding"] == b"json/protobuf" + assert "__temporal_external_storage_reference" not in reference.metadata + + await _replay_recorded_history(history, driver) + + +async def test_replay_decodes_encoded_references_while_writing_them_is_off() -> None: + """A history whose references were codec-encoded and marked replays while + writing encoded references is off. It was recorded from this branch with + writing turned on, as a later release will write them.""" + history, driver, references = _load_recorded_history("encoded_references") + for reference in references: + assert reference.metadata["encoding"] == b"binary/test-encoded" + assert reference.metadata["__temporal_external_storage_reference"] == b"true" + + await _replay_recorded_history(history, driver) + + +async def test_replay_extstore_history_fails_with_empty_driver( + env: WorkflowEnvironment, +) -> None: + """A history with external storage references fails to replay when the + Replayer has external storage configured but the driver holds no data + (simulates pointing at the wrong backend or a purged store).""" + driver = InMemoryTestDriver() + handle = await _run_extstore_workflow_and_fetch_history( + env, driver, input_data="wi" * 512 + ) + history = await handle.fetch_history() + + # Replay with a fresh empty driver — retrieval will fail. + result = await Replayer( + workflows=[ExtStoreWorkflow], + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[InMemoryTestDriver()], + payload_size_threshold=512, + ), + ), + ).replay_workflow(history, raise_on_replay_failure=False) + # InMemoryTestDriver raises ApplicationError for absent keys. + # ApplicationError is re-raised without wrapping, so it propagates + # through decode_activation (before the workflow task runs). The core SDK + # receives an activation failure, issues a FailWorkflow command, but the + # next history event is ActivityTaskScheduled — causing a NondeterminismError. + assert isinstance(result.replay_failure, workflow.NondeterminismError) + + +async def test_replay_extstore_activity_result_fails_without_extstore( + env: WorkflowEnvironment, +) -> None: + """A history where only the activity result was stored externally also fails + to replay without external storage, verifying that mid-workflow reference + payloads are caught regardless of whether the workflow uses the result.""" + driver = InMemoryTestDriver() + handle = await _run_extstore_workflow_and_fetch_history( + env, + driver, + input_data="small", # well under 512 bytes — stays inline + activity_output_size=2048, # 2 KB result — stored externally + ) + history = await handle.fetch_history() + + # Replay without external storage. The workflow input decodes fine, but + # decode_activation raises when the ActivityTaskCompleted reference payload + # is encountered, producing a task failure (not a NondeterminismError). + result = await Replayer(workflows=[ExtStoreWorkflow]).replay_workflow( + history, raise_on_replay_failure=False + ) + assert isinstance(result.replay_failure, RuntimeError) + assert not isinstance(result.replay_failure, workflow.NondeterminismError) + assert ( + "[TMPRL1105] Detected externally stored payload(s) but external storage is not configured." + in result.replay_failure.args[0] + ) + + +async def test_extstore_chained_activities( + env: WorkflowEnvironment, +) -> None: + """Large activity output is transparently offloaded and passed to a second activity. + + This is a representative customer scenario: activity A returns a payload that + exceeds the size threshold (e.g. a fetched document), external storage offloads + it so it never bloats workflow history, and activity B receives it as its input + without any special handling in the workflow code. + """ + driver = InMemoryTestDriver() + + client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=1024, # 1 KB threshold + ), + ), + ) + + # process_data returns 10 KB — well above the 1 KB threshold. + payload_size = 10_000 + + async with new_worker( + client, + ChainedExtStoreWorkflow, + activities=[process_data, summarize], + ) as worker: + result = await client.execute_workflow( + ChainedExtStoreWorkflow.run, + payload_size, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=30), + ) + + # The second activity received the full payload and summarized it correctly. + assert result == f"received {payload_size} bytes" + + # External storage was actually used: the large activity result and its + # re-use as the second activity's input should have triggered at least two + # round-trips (one store on completion, one retrieve on the next WFT). + assert driver._store_calls == 2 + assert driver._retrieve_calls == 2 + + +async def test_worker_storage_drivers_populated_from_client( + env: WorkflowEnvironment, +): + """Worker._storage_drivers is populated from the client's ExternalStorage and + passed to the bridge config as a set of driver type strings.""" + + class DifferentTestDriver(InMemoryTestDriver): + def __init__(self, driver_name: str): + super().__init__(driver_name=driver_name) + + driver1 = InMemoryTestDriver(driver_name="driver1") + driver2 = InMemoryTestDriver(driver_name="driver2") + driver3 = DifferentTestDriver(driver_name="driver3") + + client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver1, driver2, driver3], + driver_selector=lambda _context, _payload: driver1, + payload_size_threshold=0, + ), + ), + ) + + captured_config: list[temporalio.bridge.worker.WorkerConfig] = [] + original_create = temporalio.bridge.worker.Worker.create + + def capture_config( + bridge_client: temporalio.bridge.client.Client, + config: temporalio.bridge.worker.WorkerConfig, + ): + captured_config.append(config) + return original_create(bridge_client, config) + + with mock.patch.object( + temporalio.bridge.worker.Worker, "create", side_effect=capture_config + ): + async with new_worker( + client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + assert worker._storage_drivers == [driver1, driver2, driver3] + + assert len(captured_config) == 1 + assert captured_config[0].storage_drivers == {driver1.type(), driver3.type()} + + +async def test_worker_storage_drivers_empty_without_external_storage( + env: WorkflowEnvironment, +): + """Worker._storage_drivers is empty when the client has no ExternalStorage.""" + async with new_worker( + env.client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + assert worker._storage_drivers == [] + + +# --------------------------------------------------------------------------- +# TMPRL1104 workflow task duration logging +# --------------------------------------------------------------------------- + +# The duration log itself is emitted (and tested) in sdk-core. The Python worker's part is +# attaching the external-storage metrics to the completion, so these tests capture the +# completion and assert on its fields directly rather than on core's asynchronously +# forwarded log, which would be nondeterministic to observe here. + + +@contextlib.contextmanager +def _capture_completions() -> Iterator[ + list[temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion] +]: + """Capture every WorkflowActivationCompletion the worker hands to core.""" + completions: list[ + temporalio.bridge.proto.workflow_completion.WorkflowActivationCompletion + ] = [] + original = temporalio.bridge.worker.Worker.complete_workflow_activation + + async def capturing(self, completion): # type: ignore[no-untyped-def] + completions.append(completion) + return await original(self, completion) + + with mock.patch.object( + temporalio.bridge.worker.Worker, + "complete_workflow_activation", + capturing, + ): + yield completions + + +async def _expected_payload_size( + converter: temporalio.converter.DataConverter, value: object +) -> int: + """Encode a value and return the protobuf ByteSize of the resulting payload.""" + payloads = converter.payload_converter.to_payloads([value]) + return payloads[0].ByteSize() + + +async def test_tmprl1104_no_extstore(env: WorkflowEnvironment) -> None: + """Without external storage configured, completions carry no storage metrics.""" + with _capture_completions() as completions: + async with new_worker( + env.client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + await env.client.execute_workflow( + ExtStoreWorkflow.run, + ExtStoreWorkflowInput( + input_data="small", + activity_input_size=10, + activity_output_size=10, + output_size=10, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + assert completions, "expected the worker to complete at least one activation" + for c in completions: + assert not c.HasField("payload_download_metrics") + assert not c.HasField("payload_upload_metrics") + + +async def test_tmprl1104_with_extstore_download(env: WorkflowEnvironment) -> None: + """When external storage retrieves payloads, the completion for the WFT that + retrieved them carries download metrics.""" + driver = InMemoryTestDriver() + data_converter = dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=512, + ), + ) + client = await env.connect_client( + data_converter=data_converter, + ) + + wf_input = ExtStoreWorkflowInput( + input_data="wi" * 512, # exceeds 512-byte threshold → stored externally + activity_input_size=10, + activity_output_size=10, + output_size=10, + ) + expected_input_size = await _expected_payload_size(data_converter, wf_input) + + with _capture_completions() as completions: + async with new_worker( + client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + await client.execute_workflow( + ExtStoreWorkflow.run, + wf_input, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + downloads = [c for c in completions if c.HasField("payload_download_metrics")] + assert len(downloads) == 1 + m = downloads[0].payload_download_metrics + assert m.payload_count == 1 + assert m.total_size_bytes == expected_input_size + assert m.total_duration.ToTimedelta() > timedelta(0) + assert list(m.driver_names) == [driver.name()] + assert not any(c.HasField("payload_upload_metrics") for c in completions) + + +async def test_tmprl1104_with_extstore_upload(env: WorkflowEnvironment) -> None: + """When external storage stores payloads, the completion for the WFT that + produced them carries upload metrics.""" + driver = InMemoryTestDriver() + data_converter = dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=512, + ), + ) + client = await env.connect_client( + data_converter=data_converter, + ) + + wf_output = "wo" * 1024 # 2048 bytes → stored externally + expected_output_size = await _expected_payload_size(data_converter, wf_output) + + with _capture_completions() as completions: + async with new_worker( + client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + await client.execute_workflow( + ExtStoreWorkflow.run, + ExtStoreWorkflowInput( + input_data="small", + activity_input_size=10, + activity_output_size=10, + output_size=2048, # large output → stored externally on completion + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + uploads = [c for c in completions if c.HasField("payload_upload_metrics")] + assert len(uploads) == 1 + m = uploads[0].payload_upload_metrics + assert m.payload_count == 1 + assert m.total_size_bytes == expected_output_size + assert m.total_duration.ToTimedelta() > timedelta(0) + assert list(m.driver_names) == [driver.name()] + assert not any(c.HasField("payload_download_metrics") for c in completions) + + +async def test_tmprl1104_with_extstore_download_and_upload( + env: WorkflowEnvironment, +) -> None: + """When both download and upload happen across WFTs, the respective completions + carry the matching metrics.""" + driver = InMemoryTestDriver() + data_converter = dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=512, + ), + ) + client = await env.connect_client( + data_converter=data_converter, + ) + + wf_input = ExtStoreWorkflowInput( + input_data="wi" * 512, # large input → download on first WFT + activity_input_size=10, + activity_output_size=10, + output_size=2048, # large output → upload on final WFT + ) + expected_input_size = await _expected_payload_size(data_converter, wf_input) + wf_output = "wo" * 1024 + expected_output_size = await _expected_payload_size(data_converter, wf_output) + + with _capture_completions() as completions: + async with new_worker( + client, ExtStoreWorkflow, activities=[ext_store_activity] + ) as worker: + await client.execute_workflow( + ExtStoreWorkflow.run, + wf_input, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + downloads = [c for c in completions if c.HasField("payload_download_metrics")] + assert len(downloads) == 1 + dm = downloads[0].payload_download_metrics + assert dm.payload_count == 1 + assert dm.total_size_bytes == expected_input_size + assert dm.total_duration.ToTimedelta() > timedelta(0) + + uploads = [c for c in completions if c.HasField("payload_upload_metrics")] + assert len(uploads) == 1 + um = uploads[0].payload_upload_metrics + assert um.payload_count == 1 + assert um.total_size_bytes == expected_output_size + assert um.total_duration.ToTimedelta() > timedelta(0) + + +# --------------------------------------------------------------------------- +# Store-metadata context tests +# --------------------------------------------------------------------------- + + +class ContextTrackingStorageDriver(StorageDriver): + """In-memory driver that records the store context on each store/retrieve.""" + + def __init__(self) -> None: + self._storage: dict[str, bytes] = {} + self.store_contexts: list[StorageDriverStoreContext] = [] + + def name(self) -> str: + return "context-tracking" + + async def store( + self, + context: StorageDriverStoreContext, + payloads: Sequence[Payload], + ) -> list[StorageDriverClaim]: + self.store_contexts.append(context) + claims: list[StorageDriverClaim] = [] + for payload in payloads: + key = f"payload-{len(self._storage)}" + self._storage[key] = payload.SerializeToString() + claims.append(StorageDriverClaim(claim_data={"key": key})) + return claims + + async def retrieve( + self, + context: StorageDriverRetrieveContext, + claims: Sequence[StorageDriverClaim], + ) -> list[Payload]: + results: list[Payload] = [] + for claim in claims: + payload = Payload() + payload.ParseFromString(self._storage[claim.claim_data["key"]]) + results.append(payload) + return results + + +@workflow.defn +class SignalWaitWorkflow: + def __init__(self) -> None: + self._signal_data: str | None = None + + @workflow.run + async def run(self, _arg: str) -> str: + await workflow.wait_condition(lambda: self._signal_data is not None) + return self._signal_data # type: ignore + + @workflow.signal + async def my_signal(self, data: str) -> None: + self._signal_data = data + + +@workflow.defn +class EchoWorkflow: + @workflow.run + async def run(self, data: str) -> str: + return data + + +@workflow.defn +class ChildWorkflowStoreMetadataTestWorkflow: + @workflow.run + async def run(self, data: str) -> str: + return await workflow.execute_child_workflow( + EchoWorkflow.run, + data, + id=f"{workflow.info().workflow_id}-child", + ) + + +async def _make_tracking_client( + env: WorkflowEnvironment, +) -> tuple[Client, ContextTrackingStorageDriver]: + driver = ContextTrackingStorageDriver() + client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + payload_size_threshold=0, + ), + ), + ) + return client, driver + + +async def test_store_metadata_start_workflow(env: WorkflowEnvironment) -> None: + """start_workflow should set workflow id and type on store context.""" + client, driver = await _make_tracking_client(env) + workflow_id = str(uuid.uuid4()) + + async with new_worker(client, EchoWorkflow) as worker: + await client.execute_workflow( + EchoWorkflow.run, + "hello", + id=workflow_id, + task_queue=worker.task_queue, + ) + + assert len(driver.store_contexts) == 2 + + # [0] Workflow input arg + client_ctx = driver.store_contexts[0] + assert isinstance(client_ctx.target, StorageDriverWorkflowInfo) + assert client_ctx.target.namespace == client.namespace + assert client_ctx.target.id == workflow_id + assert client_ctx.target.type == "EchoWorkflow" + assert client_ctx.target.run_id is None + + # [1] Workflow result + worker_ctx = driver.store_contexts[1] + assert isinstance(worker_ctx.target, StorageDriverWorkflowInfo) + assert worker_ctx.target.namespace == client.namespace + assert worker_ctx.target.id == workflow_id + assert worker_ctx.target.type == "EchoWorkflow" + assert worker_ctx.target.run_id is not None + + +async def test_store_metadata_signal_with_start(env: WorkflowEnvironment) -> None: + """signal_with_start should set workflow metadata for signal arg encoding.""" + client, driver = await _make_tracking_client(env) + workflow_id = str(uuid.uuid4()) + + async with new_worker(client, SignalWaitWorkflow) as worker: + handle = await client.start_workflow( + SignalWaitWorkflow.run, + "hello", + id=workflow_id, + task_queue=worker.task_queue, + start_signal="my_signal", + start_signal_args=["signal-data"], + ) + await handle.result() + + assert len(driver.store_contexts) == 3 + + # [0] Workflow input arg + input_ctx = driver.store_contexts[0] + assert isinstance(input_ctx.target, StorageDriverWorkflowInfo) + assert input_ctx.target.id == workflow_id + assert input_ctx.target.type == "SignalWaitWorkflow" + assert input_ctx.target.run_id is None + + # [1] Signal arg + signal_ctx = driver.store_contexts[1] + assert isinstance(signal_ctx.target, StorageDriverWorkflowInfo) + assert signal_ctx.target.id == workflow_id + assert signal_ctx.target.type == "SignalWaitWorkflow" + assert signal_ctx.target.run_id is None + + # [2] Workflow result + result_ctx = driver.store_contexts[2] + assert isinstance(result_ctx.target, StorageDriverWorkflowInfo) + assert result_ctx.target.id == workflow_id + assert result_ctx.target.type == "SignalWaitWorkflow" + assert result_ctx.target.run_id is not None + + +async def test_store_metadata_signal_workflow(env: WorkflowEnvironment) -> None: + """signal_workflow should set workflow id on store context.""" + client, driver = await _make_tracking_client(env) + workflow_id = str(uuid.uuid4()) + + async with new_worker(client, SignalWaitWorkflow) as worker: + handle = await client.start_workflow( + SignalWaitWorkflow.run, + "hello", + id=workflow_id, + task_queue=worker.task_queue, + ) + # Signal separately (not signal-with-start) + await handle.signal(SignalWaitWorkflow.my_signal, "signal-data") + await handle.result() + + assert len(driver.store_contexts) == 3 + + # [0] Client starts workflow + start_ctx = driver.store_contexts[0] + assert isinstance(start_ctx.target, StorageDriverWorkflowInfo) + assert start_ctx.target.id == workflow_id + assert start_ctx.target.type == "SignalWaitWorkflow" + assert start_ctx.target.run_id is None + + # [1] Client sends signal: type and run_id are unknown at signal time + signal_ctx = driver.store_contexts[1] + assert isinstance(signal_ctx.target, StorageDriverWorkflowInfo) + assert signal_ctx.target.id == workflow_id + assert signal_ctx.target.type is None + assert signal_ctx.target.run_id is None + + # [2] Workflow worker returns result + result_ctx = driver.store_contexts[2] + assert isinstance(result_ctx.target, StorageDriverWorkflowInfo) + assert result_ctx.target.id == workflow_id + assert result_ctx.target.type == "SignalWaitWorkflow" + assert result_ctx.target.run_id is not None + + +async def test_store_metadata_schedule_action(env: WorkflowEnvironment) -> None: + """Schedule action _to_proto should set workflow metadata.""" + if env.supports_time_skipping_v1: + pytest.skip("Java test server doesn't support schedules") + client, driver = await _make_tracking_client(env) + task_queue = str(uuid.uuid4()) + schedule_id = f"sched-{uuid.uuid4()}" + + try: + await client.create_schedule( + schedule_id, + temporalio.client.Schedule( + action=temporalio.client.ScheduleActionStartWorkflow( + EchoWorkflow.run, + "hello", + id=f"wf-{schedule_id}", + task_queue=task_queue, + ), + spec=temporalio.client.ScheduleSpec(), + ), + ) + + assert len(driver.store_contexts) == 1 + + # [0] Client encodes workflow args when creating the schedule action + ctx = driver.store_contexts[0] + assert isinstance(ctx.target, StorageDriverWorkflowInfo) + assert ctx.target.namespace == client.namespace + assert ctx.target.id == f"wf-{schedule_id}" + assert ctx.target.type == "EchoWorkflow" + assert ctx.target.run_id is None + finally: + try: + handle = client.get_schedule_handle(schedule_id) + await handle.delete() + except Exception: + pass + + +async def test_store_metadata_child_workflow(env: WorkflowEnvironment) -> None: + """External storage should receive the child workflow as the target when scheduling.""" + client, driver = await _make_tracking_client(env) + workflow_id = f"workflow-{uuid.uuid4()}" + child_workflow_id = f"{workflow_id}-child" + + async with new_worker( + client, + ChildWorkflowStoreMetadataTestWorkflow, + EchoWorkflow, + ) as worker: + await client.execute_workflow( + ChildWorkflowStoreMetadataTestWorkflow.run, + "hello", + id=workflow_id, + task_queue=worker.task_queue, + ) + + assert len(driver.store_contexts) == 4 + + # [0] Client starts parent workflow + client_ctx = driver.store_contexts[0] + assert isinstance(client_ctx.target, StorageDriverWorkflowInfo) + assert client_ctx.target.id == workflow_id + assert client_ctx.target.type == "ChildWorkflowStoreMetadataTestWorkflow" + assert client_ctx.target.run_id is None + + # [1] Parent schedules child: target = child workflow + start_child_ctx = driver.store_contexts[1] + assert isinstance(start_child_ctx.target, StorageDriverWorkflowInfo) + assert start_child_ctx.target.id == child_workflow_id + assert start_child_ctx.target.type == "EchoWorkflow" + assert start_child_ctx.target.run_id is None + + # [2] Child returns result: target = parent workflow (child results are + # stored in the parent's key space so they remain accessible during replay) + child_result_ctx = driver.store_contexts[2] + assert isinstance(child_result_ctx.target, StorageDriverWorkflowInfo) + assert child_result_ctx.target.id == workflow_id + # ParentInfo does not carry workflow type + assert child_result_ctx.target.type is None + assert child_result_ctx.target.run_id is not None + + # [3] Parent returns result: target = parent (current execution) + parent_result_ctx = driver.store_contexts[3] + assert isinstance(parent_result_ctx.target, StorageDriverWorkflowInfo) + assert parent_result_ctx.target.id == workflow_id + assert parent_result_ctx.target.type == "ChildWorkflowStoreMetadataTestWorkflow" + assert parent_result_ctx.target.run_id is not None + + +# Workflow definitions for gap tests + + +@activity.defn +async def echo_activity(input: str) -> str: + """Simple activity that returns its input.""" + return input + + +@workflow.defn +class ActivityScheduleMetadataWorkflow: + """Workflow that schedules an activity to test activity metadata on the store context.""" + + @workflow.run + async def run(self, data: str) -> str: + return await workflow.execute_activity( + echo_activity, + data, + activity_id="my-activity-id", + schedule_to_close_timeout=timedelta(seconds=10), + ) + + +@workflow.defn +class SignalExternalMetadataWorkflow: + """Workflow that signals another workflow.""" + + @workflow.run + async def run(self, target_workflow_id: str) -> None: + await workflow.get_external_workflow_handle(target_workflow_id).signal( + SignalWaitWorkflow.my_signal, "signal-from-workflow" + ) + + +async def test_store_metadata_activity_scheduling(env: WorkflowEnvironment) -> None: + """When a workflow schedules an activity, context.activity should be populated.""" + client, driver = await _make_tracking_client(env) + workflow_id = f"workflow-{uuid.uuid4()}" + + async with new_worker( + client, + ActivityScheduleMetadataWorkflow, + activities=[echo_activity], + ) as worker: + await client.execute_workflow( + ActivityScheduleMetadataWorkflow.run, + "hello", + id=workflow_id, + task_queue=worker.task_queue, + ) + + assert len(driver.store_contexts) == 4 + + # [0] Client starts workflow + client_ctx = driver.store_contexts[0] + assert isinstance(client_ctx.target, StorageDriverWorkflowInfo) + assert client_ctx.target.id == workflow_id + assert client_ctx.target.type == "ActivityScheduleMetadataWorkflow" + assert client_ctx.target.run_id is None + + # [1] Workflow worker schedules activity + schedule_ctx = driver.store_contexts[1] + assert isinstance(schedule_ctx.target, StorageDriverWorkflowInfo) + assert schedule_ctx.target.namespace == client.namespace + assert schedule_ctx.target.id == workflow_id + assert schedule_ctx.target.type == "ActivityScheduleMetadataWorkflow" + assert schedule_ctx.target.run_id is not None + + # [2] Activity worker completes + execute_ctx = driver.store_contexts[2] + assert isinstance(execute_ctx.target, StorageDriverWorkflowInfo) + assert execute_ctx.target.namespace == client.namespace + assert execute_ctx.target.id == workflow_id + assert execute_ctx.target.type == "ActivityScheduleMetadataWorkflow" + assert execute_ctx.target.run_id is not None + + # [3] Workflow returns result + result_ctx = driver.store_contexts[3] + assert isinstance(result_ctx.target, StorageDriverWorkflowInfo) + assert result_ctx.target.id == workflow_id + assert result_ctx.target.type == "ActivityScheduleMetadataWorkflow" + assert result_ctx.target.run_id is not None + + +async def test_store_metadata_signal_external_workflow( + env: WorkflowEnvironment, +) -> None: + """Signaling an external workflow should set workflow.id to the target.""" + client, driver = await _make_tracking_client(env) + target_workflow_id = f"target-{uuid.uuid4()}" + sender_workflow_id = f"sender-{uuid.uuid4()}" + + async with new_worker( + client, + SignalExternalMetadataWorkflow, + SignalWaitWorkflow, + ) as worker: + # Start the target workflow first + target_handle = await client.start_workflow( + SignalWaitWorkflow.run, + "waiting", + id=target_workflow_id, + task_queue=worker.task_queue, + ) + # Start the sender which will signal the target + await client.execute_workflow( + SignalExternalMetadataWorkflow.run, + target_workflow_id, + id=sender_workflow_id, + task_queue=worker.task_queue, + ) + await target_handle.result() + + assert len(driver.store_contexts) == 5 + + # [0] Client starts target workflow (SignalWaitWorkflow) + target_start_ctx = driver.store_contexts[0] + assert isinstance(target_start_ctx.target, StorageDriverWorkflowInfo) + assert target_start_ctx.target.id == target_workflow_id + assert target_start_ctx.target.type == "SignalWaitWorkflow" + assert target_start_ctx.target.run_id is None + + # [1] Client starts sender workflow (SignalExternalMetadataWorkflow) + sender_start_ctx = driver.store_contexts[1] + assert isinstance(sender_start_ctx.target, StorageDriverWorkflowInfo) + assert sender_start_ctx.target.id == sender_workflow_id + assert sender_start_ctx.target.type == "SignalExternalMetadataWorkflow" + assert sender_start_ctx.target.run_id is None + + # [2] Sender signals target: target = the workflow being signaled + signal_ctx = driver.store_contexts[2] + assert isinstance(signal_ctx.target, StorageDriverWorkflowInfo) + assert signal_ctx.target.id == target_workflow_id + assert signal_ctx.target.type is None + assert signal_ctx.target.run_id is None + + # [3] and [4] are the sender and target workflow completions in some order. + # The sender's WFT 2 (after signal resolution) and the target's WFT (after + # receiving the signal) are both scheduled by the server at nearly the same + # time, so the order of their completions is non-deterministic. + completion_ctxs = { + ctx.target.id: ctx + for ctx in driver.store_contexts[3:5] + if isinstance(ctx.target, StorageDriverWorkflowInfo) and ctx.target.id + } + assert sender_workflow_id in completion_ctxs + assert target_workflow_id in completion_ctxs + + sender_result_ctx = completion_ctxs[sender_workflow_id] + assert isinstance(sender_result_ctx.target, StorageDriverWorkflowInfo) + assert sender_result_ctx.target.run_id is not None + + target_result_ctx = completion_ctxs[target_workflow_id] + assert isinstance(target_result_ctx.target, StorageDriverWorkflowInfo) + assert target_result_ctx.target.run_id is not None + + +async def test_store_metadata_standalone_activity(env: WorkflowEnvironment) -> None: + """Standalone activity worker should use StorageDriverActivityInfo as target.""" + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2741" + ) + client, driver = await _make_tracking_client(env) + activity_id = f"activity-{uuid.uuid4()}" + + async with new_worker(client, activities=[echo_activity]) as worker: + await client.execute_activity( + echo_activity, + "hello", + id=activity_id, + task_queue=worker.task_queue, + schedule_to_close_timeout=timedelta(seconds=30), + ) + + assert len(driver.store_contexts) == 2 + + client_ctx = driver.store_contexts[0] + # [0] Client schedules standalone activity + assert isinstance(client_ctx.target, StorageDriverActivityInfo) + assert client_ctx.target.namespace == client.namespace + assert client_ctx.target.id == activity_id + assert client_ctx.target.type == "echo_activity" + assert client_ctx.target.run_id is None + + # [1] Activity worker completes: target = activity (no parent workflow) + execute_ctx = driver.store_contexts[1] + assert isinstance(execute_ctx.target, StorageDriverActivityInfo) + assert execute_ctx.target.namespace == client.namespace + assert execute_ctx.target.id == activity_id + assert execute_ctx.target.type == "echo_activity" + assert execute_ctx.target.run_id is not None + + +class AsyncCompletedActivity: + def __init__(self) -> None: + self.task_token: asyncio.Future[bytes] = asyncio.Future() + + @activity.defn + async def run(self, _arg: str) -> str: + self.task_token.set_result(activity.info().task_token) + activity.raise_complete_async() + + +@workflow.defn +class AsyncCompletedActivityWorkflow: + @workflow.run + async def run(self, arg: str) -> str: + return await workflow.execute_activity( + "run", arg, start_to_close_timeout=timedelta(seconds=30) + ) + + +async def test_store_and_select_contexts_carry_ambient_namespace( + env: WorkflowEnvironment, +) -> None: + driver = ContextTrackingStorageDriver() + select_contexts: list[StorageDriverSelectContext] = [] + + def selector(context: StorageDriverSelectContext, _: Payload) -> StorageDriver: + select_contexts.append(context) + return driver + + client = await env.connect_client( + data_converter=dataclasses.replace( + temporalio.converter.default(), + external_storage=ExternalStorage( + drivers=[driver], + driver_selector=selector, + payload_size_threshold=0, + ), + ), + ) + async_activity = AsyncCompletedActivity() + + async with new_worker( + client, AsyncCompletedActivityWorkflow, activities=[async_activity.run] + ) as worker: + handle = await client.start_workflow( + AsyncCompletedActivityWorkflow.run, + "input", + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + task_token = await asyncio.wait_for(async_activity.task_token, timeout=10) + await client.get_async_activity_handle(task_token=task_token).complete( + "async result" + ) + assert await handle.result() == "async result" + + assert len(driver.store_contexts) == 4 + assert len(select_contexts) == len(driver.store_contexts) + for store_ctx, select_ctx in zip(driver.store_contexts, select_contexts): + assert store_ctx.namespace == client.namespace + assert select_ctx.namespace == client.namespace + assert select_ctx.target == store_ctx.target + + client_start, worker_schedule, token_completion, worker_complete = ( + driver.store_contexts + ) + assert isinstance(client_start.target, StorageDriverWorkflowInfo) + assert isinstance(worker_schedule.target, StorageDriverWorkflowInfo) + assert token_completion.target is None + assert isinstance(worker_complete.target, StorageDriverWorkflowInfo) + + +@workflow.defn +class ContinueAsNewExtStoreWorkflow: + """Workflow that continues-as-new once with a large payload. + + Run 1: called with large_payload, waits for signal, calls continue_as_new with same payload. + Run 2: called with large_payload again (from CaN), returns immediately. + """ + + def __init__(self) -> None: + self._proceed = False + + @workflow.run + async def run(self, large_payload: str) -> str: + if workflow.info().continued_run_id is None: + await workflow.wait_condition(lambda: self._proceed) + workflow.continue_as_new(large_payload) + return "done" + + @workflow.signal + def proceed(self) -> None: + self._proceed = True + + +async def test_extstore_continue_as_new_result_stored_under_current_run( + env: WorkflowEnvironment, +) -> None: + """A CaN continuation's result payloads are stored under the continuation's + own run_id, not under the originating run's run_id. + """ + client, driver = await _make_tracking_client(env) + + async with new_worker(client, ContinueAsNewExtStoreWorkflow) as worker: + handle = await client.start_workflow( + ContinueAsNewExtStoreWorkflow.run, + "x" * 1024, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + # Capture the first run_id before signalling the workflow to proceed. + first_run_id = (await handle.describe()).run_id + await handle.signal(ContinueAsNewExtStoreWorkflow.proceed) + await handle.result() + last_run_id = (await handle.describe()).run_id + assert len(driver.store_contexts) == 3 + + # [0] Client starts workflow + client_ctx = driver.store_contexts[0] + assert isinstance(client_ctx.target, StorageDriverWorkflowInfo) + assert client_ctx.target.run_id is None + + # [1] Workflow 1 encodes CaN args + can_args_ctx = driver.store_contexts[1] + assert isinstance(can_args_ctx.target, StorageDriverWorkflowInfo) + assert can_args_ctx.target.run_id == first_run_id + + # [2] Workflow 2 encodes result in its own context + result_ctx = driver.store_contexts[2] + assert isinstance(result_ctx.target, StorageDriverWorkflowInfo) + assert result_ctx.target.run_id is not None + assert result_ctx.target.run_id == last_run_id diff --git a/tests/worker/test_extstore_encoded_references_history.json b/tests/worker/test_extstore_encoded_references_history.json new file mode 100644 index 0000000000..1d566e54d5 --- /dev/null +++ b/tests/worker/test_extstore_encoded_references_history.json @@ -0,0 +1,254 @@ +{ + "events": [ + { + "eventId": "1", + "eventTime": "2026-10-16T22:21:24.234668Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", + "taskId": "1048587", + "workflowExecutionStartedEventAttributes": { + "workflowType": { + "name": "ReferencesBeforeEncodingWorkflow" + }, + "taskQueue": { + "name": "references-before-encoding", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "input": { + "payloads": [ + { + "metadata": { + "__temporal_external_storage_reference": "dHJ1ZQ==", + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChkKCGVuY29kaW5nEg1qc29uL3Byb3RvYnVmCi0KJV9fdGVtcG9yYWxfZXh0ZXJuYWxfc3RvcmFnZV9yZWZlcmVuY2USBHRydWUKOwoLbWVzc2FnZVR5cGUSLHRlbXBvcmFsLmFwaS5zZGsudjEuRXh0ZXJuYWxTdG9yYWdlUmVmZXJlbmNlEjx7ImNsYWltRGF0YSI6eyJrZXkiOiJwYXlsb2FkLTAifSwiZHJpdmVyTmFtZSI6InRlc3QtZHJpdmVyIn0aAwjBCA==", + "externalPayloads": [ + { + "sizeBytes": "1089" + } + ] + } + ] + }, + "workflowTaskTimeout": "10s", + "originalExecutionRunId": "01a146ce-3f8a-7a31-9ace-21c7f1037392", + "identity": "test-identity", + "firstExecutionRunId": "01a146ce-3f8a-7a31-9ace-21c7f1037392", + "attempt": 1, + "firstWorkflowTaskBackoff": "0s", + "workflowId": "encoded-references", + "priority": {} + } + }, + { + "eventId": "2", + "eventTime": "2026-10-16T22:21:24.234703Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048588", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "references-before-encoding", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "3", + "eventTime": "2026-10-16T22:21:24.239003Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048593", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "2", + "identity": "test-identity", + "requestId": "cd517ff8-a3e7-42d4-99b3-28ee8f1851bd", + "historySizeBytes": "598", + "workerVersion": { + "buildId": "8c2a779eb0ea4f39243fe56c372758b2" + } + } + }, + { + "eventId": "4", + "eventTime": "2026-10-16T22:21:24.249060Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048598", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "2", + "startedEventId": "3", + "identity": "test-identity", + "workerVersion": { + "buildId": "8c2a779eb0ea4f39243fe56c372758b2" + }, + "sdkMetadata": { + "coreUsedFlags": [ + 3, + 2, + 1 + ], + "sdkName": "temporal-python", + "sdkVersion": "1.34.0" + }, + "meteringMetadata": {} + } + }, + { + "eventId": "5", + "eventTime": "2026-10-16T22:21:24.249226Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", + "taskId": "1048599", + "activityTaskScheduledEventAttributes": { + "activityId": "1", + "activityType": { + "name": "references_before_encoding_activity" + }, + "taskQueue": { + "name": "references-before-encoding", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "header": {}, + "input": { + "payloads": [ + { + "metadata": { + "__temporal_external_storage_reference": "dHJ1ZQ==", + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChkKCGVuY29kaW5nEg1qc29uL3Byb3RvYnVmCi0KJV9fdGVtcG9yYWxfZXh0ZXJuYWxfc3RvcmFnZV9yZWZlcmVuY2USBHRydWUKOwoLbWVzc2FnZVR5cGUSLHRlbXBvcmFsLmFwaS5zZGsudjEuRXh0ZXJuYWxTdG9yYWdlUmVmZXJlbmNlEjx7ImNsYWltRGF0YSI6eyJrZXkiOiJwYXlsb2FkLTEifSwiZHJpdmVyTmFtZSI6InRlc3QtZHJpdmVyIn0aAwjBCA==", + "externalPayloads": [ + { + "sizeBytes": "1089" + } + ] + } + ] + }, + "scheduleToCloseTimeout": "0s", + "scheduleToStartTimeout": "0s", + "startToCloseTimeout": "30s", + "heartbeatTimeout": "0s", + "workflowTaskCompletedEventId": "4", + "retryPolicy": { + "initialInterval": "1s", + "backoffCoefficient": 2.0, + "maximumInterval": "100s" + }, + "useWorkflowBuildId": true, + "priority": {} + } + }, + { + "eventId": "6", + "eventTime": "2026-10-16T22:21:24.249342Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", + "taskId": "1048603", + "activityTaskStartedEventAttributes": { + "scheduledEventId": "5", + "identity": "test-identity", + "requestId": "52ee8ebc-8674-4a3c-b948-485c0b4728ac", + "attempt": 1, + "workerVersion": { + "buildId": "8c2a779eb0ea4f39243fe56c372758b2" + } + } + }, + { + "eventId": "7", + "eventTime": "2026-10-16T22:21:24.252491Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", + "taskId": "1048604", + "activityTaskCompletedEventAttributes": { + "result": { + "payloads": [ + { + "metadata": { + "__temporal_external_storage_reference": "dHJ1ZQ==", + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChkKCGVuY29kaW5nEg1qc29uL3Byb3RvYnVmCi0KJV9fdGVtcG9yYWxfZXh0ZXJuYWxfc3RvcmFnZV9yZWZlcmVuY2USBHRydWUKOwoLbWVzc2FnZVR5cGUSLHRlbXBvcmFsLmFwaS5zZGsudjEuRXh0ZXJuYWxTdG9yYWdlUmVmZXJlbmNlEjx7ImNsYWltRGF0YSI6eyJrZXkiOiJwYXlsb2FkLTIifSwiZHJpdmVyTmFtZSI6InRlc3QtZHJpdmVyIn0aAwjBCA==", + "externalPayloads": [ + { + "sizeBytes": "1089" + } + ] + } + ] + }, + "scheduledEventId": "5", + "startedEventId": "6", + "identity": "test-identity" + } + }, + { + "eventId": "8", + "eventTime": "2026-10-16T22:21:24.252513Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048605", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "test-identity-sticky", + "kind": "TASK_QUEUE_KIND_STICKY", + "normalName": "references-before-encoding" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "9", + "eventTime": "2026-10-16T22:21:24.253136Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048609", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "8", + "identity": "test-identity", + "requestId": "78b8b8e0-2f33-432c-a7d9-c2db06878105", + "historySizeBytes": "1931", + "workerVersion": { + "buildId": "8c2a779eb0ea4f39243fe56c372758b2" + } + } + }, + { + "eventId": "10", + "eventTime": "2026-10-16T22:21:24.255732Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048613", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "8", + "startedEventId": "9", + "identity": "test-identity", + "workerVersion": { + "buildId": "8c2a779eb0ea4f39243fe56c372758b2" + }, + "sdkMetadata": {}, + "meteringMetadata": {} + } + }, + { + "eventId": "11", + "eventTime": "2026-10-16T22:21:24.255773Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", + "taskId": "1048614", + "workflowExecutionCompletedEventAttributes": { + "result": { + "payloads": [ + { + "metadata": { + "__temporal_external_storage_reference": "dHJ1ZQ==", + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "CjsKC21lc3NhZ2VUeXBlEix0ZW1wb3JhbC5hcGkuc2RrLnYxLkV4dGVybmFsU3RvcmFnZVJlZmVyZW5jZQotCiVfX3RlbXBvcmFsX2V4dGVybmFsX3N0b3JhZ2VfcmVmZXJlbmNlEgR0cnVlChkKCGVuY29kaW5nEg1qc29uL3Byb3RvYnVmEjx7ImNsYWltRGF0YSI6eyJrZXkiOiJwYXlsb2FkLTMifSwiZHJpdmVyTmFtZSI6InRlc3QtZHJpdmVyIn0aAwjBCA==", + "externalPayloads": [ + { + "sizeBytes": "1089" + } + ] + } + ] + }, + "workflowTaskCompletedEventId": "10" + } + } + ] +} \ No newline at end of file diff --git a/tests/worker/test_extstore_encoded_references_stored_payloads.json b/tests/worker/test_extstore_encoded_references_stored_payloads.json new file mode 100644 index 0000000000..03768b539c --- /dev/null +++ b/tests/worker/test_extstore_encoded_references_stored_payloads.json @@ -0,0 +1,26 @@ +{ + "payload-0": { + "metadata": { + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChYKCGVuY29kaW5nEgpqc29uL3BsYWluEoIIIndpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2ki" + }, + "payload-1": { + "metadata": { + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChYKCGVuY29kaW5nEgpqc29uL3BsYWluEoIIImFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWki" + }, + "payload-2": { + "metadata": { + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChYKCGVuY29kaW5nEgpqc29uL3BsYWluEoIIImFvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW8i" + }, + "payload-3": { + "metadata": { + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChYKCGVuY29kaW5nEgpqc29uL3BsYWluEoIIIndvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd28i" + } +} diff --git a/tests/worker/test_extstore_unencoded_references_history.json b/tests/worker/test_extstore_unencoded_references_history.json new file mode 100644 index 0000000000..4b46f8d0e9 --- /dev/null +++ b/tests/worker/test_extstore_unencoded_references_history.json @@ -0,0 +1,254 @@ +{ + "events": [ + { + "eventId": "1", + "eventTime": "2026-10-15T18:04:15.639732Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", + "taskId": "1048587", + "workflowExecutionStartedEventAttributes": { + "workflowType": { + "name": "ReferencesBeforeEncodingWorkflow" + }, + "taskQueue": { + "name": "references-before-encoding", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "input": { + "payloads": [ + { + "metadata": { + "messageType": "dGVtcG9yYWwuYXBpLnNkay52MS5FeHRlcm5hbFN0b3JhZ2VSZWZlcmVuY2U=", + "encoding": "anNvbi9wcm90b2J1Zg==" + }, + "data": "eyJjbGFpbURhdGEiOnsia2V5IjoicGF5bG9hZC0wIn0sImRyaXZlck5hbWUiOiJ0ZXN0LWRyaXZlciJ9", + "externalPayloads": [ + { + "sizeBytes": "1089" + } + ] + } + ] + }, + "workflowTaskTimeout": "10s", + "originalExecutionRunId": "01a140bc-7797-7b27-9a71-bfe54f3a1f6a", + "identity": "test-identity", + "firstExecutionRunId": "01a140bc-7797-7b27-9a71-bfe54f3a1f6a", + "attempt": 1, + "firstWorkflowTaskBackoff": "0s", + "workflowId": "references-before-encoding", + "priority": {} + } + }, + { + "eventId": "2", + "eventTime": "2026-10-15T18:04:15.639789Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048588", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "references-before-encoding", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "3", + "eventTime": "2026-10-15T18:04:15.642928Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048593", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "2", + "identity": "test-identity", + "requestId": "7af88403-fe6d-4f34-9219-d84cd0e8c922", + "historySizeBytes": "474", + "workerVersion": { + "buildId": "719681aca6c15dba2948274d63ba289f" + } + } + }, + { + "eventId": "4", + "eventTime": "2026-10-15T18:04:15.648786Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048598", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "2", + "startedEventId": "3", + "identity": "test-identity", + "workerVersion": { + "buildId": "719681aca6c15dba2948274d63ba289f" + }, + "sdkMetadata": { + "coreUsedFlags": [ + 1, + 3, + 2 + ], + "sdkName": "temporal-python", + "sdkVersion": "1.34.0" + }, + "meteringMetadata": {} + } + }, + { + "eventId": "5", + "eventTime": "2026-10-15T18:04:15.648861Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", + "taskId": "1048599", + "activityTaskScheduledEventAttributes": { + "activityId": "1", + "activityType": { + "name": "references_before_encoding_activity" + }, + "taskQueue": { + "name": "references-before-encoding", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "header": {}, + "input": { + "payloads": [ + { + "metadata": { + "messageType": "dGVtcG9yYWwuYXBpLnNkay52MS5FeHRlcm5hbFN0b3JhZ2VSZWZlcmVuY2U=", + "encoding": "anNvbi9wcm90b2J1Zg==" + }, + "data": "eyJjbGFpbURhdGEiOnsia2V5IjoicGF5bG9hZC0xIn0sImRyaXZlck5hbWUiOiJ0ZXN0LWRyaXZlciJ9", + "externalPayloads": [ + { + "sizeBytes": "1089" + } + ] + } + ] + }, + "scheduleToCloseTimeout": "0s", + "scheduleToStartTimeout": "0s", + "startToCloseTimeout": "30s", + "heartbeatTimeout": "0s", + "workflowTaskCompletedEventId": "4", + "retryPolicy": { + "initialInterval": "1s", + "backoffCoefficient": 2.0, + "maximumInterval": "100s" + }, + "useWorkflowBuildId": true, + "priority": {} + } + }, + { + "eventId": "6", + "eventTime": "2026-10-15T18:04:15.649402Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", + "taskId": "1048603", + "activityTaskStartedEventAttributes": { + "scheduledEventId": "5", + "identity": "test-identity", + "requestId": "1deae0f7-9ca9-47c1-b260-d5dccb9e24ee", + "attempt": 1, + "workerVersion": { + "buildId": "719681aca6c15dba2948274d63ba289f" + } + } + }, + { + "eventId": "7", + "eventTime": "2026-10-15T18:04:15.650894Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", + "taskId": "1048604", + "activityTaskCompletedEventAttributes": { + "result": { + "payloads": [ + { + "metadata": { + "messageType": "dGVtcG9yYWwuYXBpLnNkay52MS5FeHRlcm5hbFN0b3JhZ2VSZWZlcmVuY2U=", + "encoding": "anNvbi9wcm90b2J1Zg==" + }, + "data": "eyJjbGFpbURhdGEiOnsia2V5IjoicGF5bG9hZC0yIn0sImRyaXZlck5hbWUiOiJ0ZXN0LWRyaXZlciJ9", + "externalPayloads": [ + { + "sizeBytes": "1089" + } + ] + } + ] + }, + "scheduledEventId": "5", + "startedEventId": "6", + "identity": "test-identity" + } + }, + { + "eventId": "8", + "eventTime": "2026-10-15T18:04:15.650917Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048605", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "test-identity-sticky", + "kind": "TASK_QUEUE_KIND_STICKY", + "normalName": "references-before-encoding" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "9", + "eventTime": "2026-10-15T18:04:15.651608Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048609", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "8", + "identity": "test-identity", + "requestId": "b4cf3329-413e-4a7c-b07a-8c7f54660de2", + "historySizeBytes": "1549", + "workerVersion": { + "buildId": "719681aca6c15dba2948274d63ba289f" + } + } + }, + { + "eventId": "10", + "eventTime": "2026-10-15T18:04:15.654284Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048613", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "8", + "startedEventId": "9", + "identity": "test-identity", + "workerVersion": { + "buildId": "719681aca6c15dba2948274d63ba289f" + }, + "sdkMetadata": {}, + "meteringMetadata": {} + } + }, + { + "eventId": "11", + "eventTime": "2026-10-15T18:04:15.654332Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", + "taskId": "1048614", + "workflowExecutionCompletedEventAttributes": { + "result": { + "payloads": [ + { + "metadata": { + "messageType": "dGVtcG9yYWwuYXBpLnNkay52MS5FeHRlcm5hbFN0b3JhZ2VSZWZlcmVuY2U=", + "encoding": "anNvbi9wcm90b2J1Zg==" + }, + "data": "eyJjbGFpbURhdGEiOnsia2V5IjoicGF5bG9hZC0zIn0sImRyaXZlck5hbWUiOiJ0ZXN0LWRyaXZlciJ9", + "externalPayloads": [ + { + "sizeBytes": "1089" + } + ] + } + ] + }, + "workflowTaskCompletedEventId": "10" + } + } + ] +} diff --git a/tests/worker/test_extstore_unencoded_references_stored_payloads.json b/tests/worker/test_extstore_unencoded_references_stored_payloads.json new file mode 100644 index 0000000000..03768b539c --- /dev/null +++ b/tests/worker/test_extstore_unencoded_references_stored_payloads.json @@ -0,0 +1,26 @@ +{ + "payload-0": { + "metadata": { + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChYKCGVuY29kaW5nEgpqc29uL3BsYWluEoIIIndpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2l3aXdpd2ki" + }, + "payload-1": { + "metadata": { + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChYKCGVuY29kaW5nEgpqc29uL3BsYWluEoIIImFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWlhaWFpYWki" + }, + "payload-2": { + "metadata": { + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChYKCGVuY29kaW5nEgpqc29uL3BsYWluEoIIImFvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW9hb2FvYW8i" + }, + "payload-3": { + "metadata": { + "encoding": "YmluYXJ5L3Rlc3QtZW5jb2RlZA==" + }, + "data": "ChYKCGVuY29kaW5nEgpqc29uL3BsYWluEoIIIndvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd293b3dvd28i" + } +} diff --git a/tests/worker/test_interceptor.py b/tests/worker/test_interceptor.py index a5616bb17f..cfbe6a5fb7 100644 --- a/tests/worker/test_interceptor.py +++ b/tests/worker/test_interceptor.py @@ -2,7 +2,7 @@ import uuid from collections.abc import Callable from datetime import timedelta -from typing import Any, List, NoReturn, Optional, Tuple, Type +from typing import Any, NoReturn import nexusrpc import pytest @@ -35,7 +35,7 @@ WorkflowInterceptorClassInput, WorkflowOutboundInterceptor, ) -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from tests.helpers.nexus import make_nexus_endpoint_name interceptor_traces: list[tuple[str, Any]] = [] @@ -167,7 +167,7 @@ async def execute_nexus_operation_cancel( @workflow.defn class ExpectCancelNexusWorkflow: @workflow.run - async def run(self, input: str): + async def run(self, _input: str): try: await asyncio.wait_for(asyncio.Future(), 2) except asyncio.TimeoutError: @@ -252,7 +252,7 @@ def query(self, param: str) -> str: return f"query: {param}" @workflow.signal - def signal(self, param: str) -> None: + def signal(self, _param: str) -> None: self.finish.set() @workflow.update @@ -269,14 +269,15 @@ def update_validated_validator(self, param: str) -> None: raise ApplicationError("Invalid update") +@pytest.mark.requires_local_server async def test_worker_interceptor(client: Client, env: WorkflowEnvironment): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1424" ) task_queue = f"task-queue-{uuid.uuid4()}" - await create_nexus_endpoint(task_queue, client) + await env.create_nexus_endpoint(make_nexus_endpoint_name(task_queue), task_queue) async with Worker( client, diff --git a/tests/worker/test_payload_size_limits.py b/tests/worker/test_payload_size_limits.py new file mode 100644 index 0000000000..8a0d4e7121 --- /dev/null +++ b/tests/worker/test_payload_size_limits.py @@ -0,0 +1,250 @@ +import logging +import uuid +from dataclasses import dataclass +from datetime import timedelta + +import pytest + +import temporalio.api.enums.v1 +from temporalio import activity, workflow +from temporalio.client import PayloadLimitsConfig, WorkflowFailureError +from temporalio.exceptions import ( + TerminatedError, + TimeoutError, + TimeoutType, +) +from temporalio.runtime import ( + LogForwardingConfig, + LoggingConfig, + Runtime, + TelemetryConfig, + TelemetryFilter, +) +from temporalio.testing._workflow import WorkflowEnvironment +from tests import DEV_SERVER_DOWNLOAD_VERSION +from tests.helpers import LogCapturer, assert_eventually, new_worker + +# Payload/memo size-limit enforcement lives in sdk-rust. These tests only assert that the SDK's +# plumbing reaches core: oversized completions are failed proactively, the worker opt-out lets +# oversized payloads through to the server, and the connection's warn threshold produces a +# forwarded [TMPRL1103] warning. + + +@dataclass +class LargePayloadWorkflowInput: + activity_input_data_size: int + workflow_output_data_size: int + + +@dataclass +class LargePayloadActivityInput: + data: str + + +@activity.defn +async def large_payload_activity(_input: LargePayloadActivityInput) -> None: + return None + + +@workflow.defn +class LargePayloadWorkflow: + @workflow.run + async def run(self, input: LargePayloadWorkflowInput) -> str: + if input.activity_input_data_size > 0: + await workflow.execute_activity( + large_payload_activity, + LargePayloadActivityInput(data="i" * input.activity_input_data_size), + schedule_to_close_timeout=timedelta(seconds=5), + ) + return "o" * input.workflow_output_data_size + + +PAYLOAD_ERROR_LIMIT = 10 * 1024 +PAYLOAD_LIMITS_EXTRA_ARGS = [ + "--dynamic-config-value", + f"limit.blobSize.error={PAYLOAD_ERROR_LIMIT}", + # The server only enforces the error limit for payloads that also exceed the warn limit, so the + # warn limit must be below the error limit. + "--dynamic-config-value", + f"limit.blobSize.warn={2 * 1024}", +] + + +def _forwarding_runtime(logger: logging.Logger) -> Runtime: + return Runtime( + telemetry=TelemetryConfig( + logging=LoggingConfig( + filter=TelemetryFilter(core_level="WARN", other_level="ERROR"), + forwarding=LogForwardingConfig(logger=logger), + ) + ) + ) + + +async def test_oversized_payload_fails_task_with_error_log(env: WorkflowEnvironment): + """An oversized workflow completion is proactively failed by worker, which logs [TMPRL1103].""" + if env.supports_time_skipping_v1: + pytest.skip("Time-skipping server does not report payload limits.") + + async with await WorkflowEnvironment.start_local( + dev_server_extra_args=PAYLOAD_LIMITS_EXTRA_ARGS, + dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, + ) as env: + worker_logger = logging.getLogger(f"log-{uuid.uuid4()}") + worker_client = await env.connect_client( + runtime=_forwarding_runtime(worker_logger), + ) + + def predicate(record: logging.LogRecord) -> bool: + return ( + record.levelname == "ERROR" + and "[TMPRL1103] Attempted to upload payloads with size that exceeded the error limit." + in record.msg + ) + + with LogCapturer().logs_captured(worker_logger) as capturer: + async with new_worker( + worker_client, LargePayloadWorkflow, activities=[large_payload_activity] + ) as worker: + handle = await env.client.start_workflow( + LargePayloadWorkflow.run, + LargePayloadWorkflowInput( + activity_input_data_size=0, + workflow_output_data_size=PAYLOAD_ERROR_LIMIT + 1024, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=3), + ) + + with pytest.raises(WorkflowFailureError) as err: + await handle.result() + assert isinstance(err.value.cause, TimeoutError) + assert err.value.cause.type == TimeoutType.START_TO_CLOSE + + # Core forwards logs on a buffered interval; poll while the capturer is attached. + async def error_forwarded() -> None: + assert capturer.find(predicate) is not None + + await assert_eventually(error_forwarded) + + # Confirm worker reported a WorkflowTaskFailed with cause PAYLOADS_TOO_LARGE. + history = await handle.fetch_history() + assert any( + event.event_type + == temporalio.api.enums.v1.EventType.EVENT_TYPE_WORKFLOW_TASK_FAILED + and event.workflow_task_failed_event_attributes.cause + == temporalio.api.enums.v1.WorkflowTaskFailedCause.WORKFLOW_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE + for event in history.events + ) + + +async def test_disable_payload_error_limit_sends_to_server(env: WorkflowEnvironment): + """With the opt-out, worker does not pre-fail; the oversized payload reaches (and is rejected by) + the server.""" + if env.supports_time_skipping_v1: + pytest.skip("Time-skipping server does not report payload limits.") + + async with await WorkflowEnvironment.start_local( + dev_server_extra_args=PAYLOAD_LIMITS_EXTRA_ARGS, + dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, + ) as env: + async with new_worker( + env.client, + LargePayloadWorkflow, + activities=[large_payload_activity], + disable_payload_error_limit=True, + ) as worker: + with pytest.raises(WorkflowFailureError) as err: + await env.client.execute_workflow( + LargePayloadWorkflow.run, + LargePayloadWorkflowInput( + activity_input_data_size=PAYLOAD_ERROR_LIMIT + 1024, + workflow_output_data_size=0, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=3), + ) + + assert isinstance(err.value.cause, TerminatedError) + assert ( + err.value.cause.message + == "BadScheduleActivityAttributes: ScheduleActivityTaskCommandAttributes.Input exceeds size limit." + ) + + +async def test_payload_size_warning_forwarded(env: WorkflowEnvironment): + """The connection's warn threshold produces a forwarded [TMPRL1103] warning for over-threshold payloads.""" + worker_logger = logging.getLogger(f"log-{uuid.uuid4()}") + worker_client = await env.connect_client( + runtime=_forwarding_runtime(worker_logger), + payload_limits=PayloadLimitsConfig(payloads_warn_size=1024), + ) + + def predicate(record: logging.LogRecord) -> bool: + return ( + record.levelname == "WARNING" + and "[TMPRL1103] Attempted to upload payloads with size that exceeded the warning limit." + in record.msg + ) + + with LogCapturer().logs_captured(worker_logger) as capturer: + async with new_worker( + worker_client, LargePayloadWorkflow, activities=[large_payload_activity] + ) as worker: + await worker_client.execute_workflow( + LargePayloadWorkflow.run, + LargePayloadWorkflowInput( + activity_input_data_size=0, + workflow_output_data_size=2 * 1024, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + ) + + # Core forwards logs on a buffered interval; poll while the capturer is attached. + async def warning_forwarded() -> None: + assert capturer.find(predicate) is not None + + await assert_eventually(warning_forwarded) + + +async def test_memo_size_warning_forwarded(env: WorkflowEnvironment): + """The connection's memo warn threshold produces a forwarded [TMPRL1103] warning for an + over-threshold memo.""" + worker_logger = logging.getLogger(f"log-{uuid.uuid4()}") + worker_client = await env.connect_client( + runtime=_forwarding_runtime(worker_logger), + payload_limits=PayloadLimitsConfig(memo_warn_size=1024), + ) + + def predicate(record: logging.LogRecord) -> bool: + return ( + record.levelname == "WARNING" + and "[TMPRL1103] Attempted to upload memo with size that exceeded the warning limit." + in record.msg + ) + + with LogCapturer().logs_captured(worker_logger) as capturer: + async with new_worker( + worker_client, LargePayloadWorkflow, activities=[large_payload_activity] + ) as worker: + await worker_client.execute_workflow( + LargePayloadWorkflow.run, + LargePayloadWorkflowInput( + activity_input_data_size=0, + workflow_output_data_size=0, + ), + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=5), + memo={"key": "a" * 2048}, + ) + + # Core forwards logs on a buffered interval; poll while the capturer is attached. + async def warning_forwarded() -> None: + assert capturer.find(predicate) is not None + + await assert_eventually(warning_forwarded) diff --git a/tests/worker/test_poller_auto_enroll.py b/tests/worker/test_poller_auto_enroll.py new file mode 100644 index 0000000000..61120d2d5e --- /dev/null +++ b/tests/worker/test_poller_auto_enroll.py @@ -0,0 +1,116 @@ +import uuid +from datetime import timedelta + +import pytest + +from temporalio import activity, workflow +from temporalio.api.worker.v1 import WorkerHeartbeat +from temporalio.api.workflowservice.v1 import ( + DescribeNamespaceRequest, + ListWorkersRequest, +) +from temporalio.client import Client +from temporalio.runtime import Runtime, TelemetryConfig +from temporalio.testing import WorkflowEnvironment +from temporalio.worker import PollerBehaviorSimpleMaximum +from tests import DEV_SERVER_DOWNLOAD_VERSION +from tests.helpers import assert_eventually, new_worker + +AUTO_ENROLL_EXTRA_ARGS = [ + "--dynamic-config-value", + "frontend.pollerAutoscalingAutoEnroll=true", + "--dynamic-config-value", + "frontend.WorkerHeartbeatsEnabled=true", + "--dynamic-config-value", + "frontend.ListWorkersEnabled=true", +] + + +@activity.defn +async def noop_activity() -> None: + pass + + +@workflow.defn +class NoopWorkflow: + @workflow.run + async def run(self) -> None: + await workflow.execute_activity( + noop_activity, start_to_close_timeout=timedelta(seconds=10) + ) + + +async def _heartbeat(client: Client, task_queue: str) -> WorkerHeartbeat: + resp = await client.workflow_service.list_workers( + ListWorkersRequest( + namespace=client.namespace, + query=f'TaskQueue = "{task_queue}"', + page_size=100, + ) + ) + heartbeats = [ + info.worker_heartbeat + for info in resp.workers_info + if info.worker_heartbeat.task_queue == task_queue + ] + assert heartbeats, "no worker heartbeat yet" + return heartbeats[0] + + +async def test_poller_autoscaling_auto_enroll(env: WorkflowEnvironment): + if env.supports_time_skipping: + pytest.skip("Time-skipping server does not implement ListWorkers") + + async with await WorkflowEnvironment.start_local( + dev_server_extra_args=AUTO_ENROLL_EXTRA_ARGS, + dev_server_download_version=DEV_SERVER_DOWNLOAD_VERSION, + ) as local_env: + ns = await local_env.client.workflow_service.describe_namespace( + DescribeNamespaceRequest(namespace=local_env.client.namespace) + ) + if not ns.namespace_info.capabilities.poller_autoscaling_auto_enroll: + pytest.skip("Dev server does not support poller autoscaling auto-enroll") + + client = await local_env.connect_client( + runtime=Runtime( + telemetry=TelemetryConfig(), + worker_heartbeat_interval=timedelta(seconds=1), + ) + ) + + async with new_worker( + client, NoopWorkflow, activities=[noop_activity] + ) as worker: + await client.execute_workflow( + NoopWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + async def assert_autoscaling() -> None: + hb = await _heartbeat(client, worker.task_queue) + assert hb.workflow_poller_info.is_autoscaling + assert hb.activity_poller_info.is_autoscaling + + await assert_eventually(assert_autoscaling) + + async with new_worker( + client, + NoopWorkflow, + activities=[noop_activity], + workflow_task_poller_behavior=PollerBehaviorSimpleMaximum(maximum=5), + max_concurrent_activity_task_polls=5, + ) as worker: + await client.execute_workflow( + NoopWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + async def assert_fixed() -> None: + hb = await _heartbeat(client, worker.task_queue) + assert hb.workflow_poller_info.current_pollers > 0 + assert not hb.workflow_poller_info.is_autoscaling + assert not hb.activity_poller_info.is_autoscaling + + await assert_eventually(assert_fixed) diff --git a/tests/worker/test_replayer.py b/tests/worker/test_replayer.py index 67c1b1d522..b0274ca46b 100644 --- a/tests/worker/test_replayer.py +++ b/tests/worker/test_replayer.py @@ -6,10 +6,11 @@ from dataclasses import dataclass from datetime import timedelta from pathlib import Path -from typing import Any, Dict, Optional, Type +from typing import Any import pytest +import temporalio.worker._workflow_instance from temporalio import activity, workflow from temporalio.client import Client, WorkflowFailureError, WorkflowHistory from temporalio.exceptions import ApplicationError @@ -81,6 +82,24 @@ def waiting(self) -> bool: return self._waiting +_WorkflowLogicFlag = temporalio.worker._workflow_instance._WorkflowLogicFlag +_SINGLE_BATCH_WORKFLOW_LOGIC_FLAG = ( + _WorkflowLogicFlag.PROCESS_WORKFLOW_ACTIVATION_JOBS_AS_SINGLE_BATCH +) + + +def _history_uses_workflow_logic_flag( + history: WorkflowHistory, + flag: _WorkflowLogicFlag, +) -> bool: + return any( + event.HasField("workflow_task_completed_event_attributes") + and int(flag) + in event.workflow_task_completed_event_attributes.sdk_metadata.lang_used_flags + for event in history.events + ) + + @pytest.mark.skipif(sys.version_info < (3, 12), reason="Skipping for < 3.12") async def test_replayer_workflow_complete(client: Client) -> None: # This test skips for versions < 3.12 because this is flaky due to CPython reimport issue: @@ -283,10 +302,11 @@ async def test_replayer_workflow_not_registered(client: Client) -> None: assert "SayHelloWorkflow is not registered" in str(err.value) +@pytest.mark.requires_local_server async def test_replayer_multiple_from_client( client: Client, env: WorkflowEnvironment ) -> None: - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server doesn't support newer workflow listing") # Run 5 say-hello's, with 2nd and 4th having non-det errors. Reuse the same @@ -311,6 +331,14 @@ async def test_replayer_multiple_from_client( ) await handle.result() + async def visible_run_ids() -> set[str]: + return { + workflow.run_id + async for workflow in client.list_workflows(f"WorkflowId = '{workflow_id}'") + } + + await assert_eq_eventually(set(expected_runs_and_non_det), visible_run_ids) + # Run replayer with list iterator mapped to histories and collect results async with Replayer(workflows=[SayHelloWorkflow]).workflow_replay_iterator( client.list_workflows(f"WorkflowId = '{workflow_id}'").map_histories() @@ -427,15 +455,12 @@ async def execute_workflow(self, input: ExecuteWorkflowInput) -> Any: return res -async def test_replayer_async_ordering() -> None: - """ - This test verifies that the order that asyncio tasks/coroutines are woken up matches the - order they were before changes to apply all jobs and then run the event loop, where previously - the event loop was ran after each "batch" of jobs. - """ - histories_and_expecteds = [ - ( +@pytest.mark.parametrize( + ("history_filename", "uses_single_batch", "expected"), + [ + pytest.param( "test_replayer_event_tracing.json", + False, [ "sig-before-sync", "sig-before-1", @@ -453,9 +478,33 @@ async def test_replayer_async_ordering() -> None: "timer-1", "timer-2", ], + id="legacy-event-tracing", + ), + pytest.param( + "test_replayer_event_tracing_single_batch.json", + True, + [ + "sig-before-sync", + "sig-before-1", + "timer-sync", + "act-sync", + "sig-before-2", + "act-1", + "act-2", + "sig-1-sync", + "sig-1-1", + "sig-1-2", + "update-1-sync", + "update-1-1", + "update-1-2", + "timer-1", + "timer-2", + ], + id="single-batch-event-tracing", ), - ( + pytest.param( "test_replayer_event_tracing_double_sig_at_start.json", + False, [ "sig-before-sync", "sig-before-1", @@ -473,29 +522,69 @@ async def test_replayer_async_ordering() -> None: "timer-1", "timer-2", ], + id="legacy-double-signal-at-start", ), - ] - for history, expected in histories_and_expecteds: - with Path(__file__).with_name(history).open() as f: - history = f.read() - await Replayer( - workflows=[SignalsActivitiesTimersUpdatesTracingWorkflow], - interceptors=[WorkerWorkflowResultInterceptor()], - ).replay_workflow(WorkflowHistory.from_json("fake", history)) - assert test_replayer_workflow_res == expected + pytest.param( + "test_replayer_event_tracing_double_sig_at_start_single_batch.json", + True, + [ + "sig-before-sync", + "sig-before-1", + "sig-1-sync", + "sig-1-1", + "timer-sync", + "act-sync", + "sig-before-2", + "sig-1-2", + "act-1", + "act-2", + "update-1-sync", + "update-1-1", + "update-1-2", + "timer-1", + "timer-2", + ], + id="single-batch-double-signal-at-start", + ), + ], +) +async def test_replayer_async_ordering( + history_filename: str, + uses_single_batch: bool, + expected: list[str], +) -> None: + """ + Verify legacy and single-batch histories replay with the asyncio scheduling order that their + original executions observed. + """ + with Path(__file__).with_name(history_filename).open() as f: + history = WorkflowHistory.from_json("fake", f.read()) + assert ( + _history_uses_workflow_logic_flag(history, _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG) + is uses_single_batch + ) + await Replayer( + workflows=[SignalsActivitiesTimersUpdatesTracingWorkflow], + interceptors=[WorkerWorkflowResultInterceptor()], + ).replay_workflow(history) + assert test_replayer_workflow_res == expected -async def test_replayer_alternate_async_ordering() -> None: +async def test_replayer_unflagged_history_uses_legacy_async_ordering() -> None: with ( Path(__file__) .with_name("test_replayer_event_tracing_alternate.json") .open() as f ): - history = f.read() - await Replayer( + history = WorkflowHistory.from_json("fake", f.read()) + assert not _history_uses_workflow_logic_flag( + history, _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG + ) + replayer = Replayer( workflows=[ActivityAndSignalsWhileWorkflowDown], interceptors=[WorkerWorkflowResultInterceptor()], - ).replay_workflow(WorkflowHistory.from_json("fake", history)) + ) + await replayer.replay_workflow(history) assert test_replayer_workflow_res == [ "act-start", "sig-1", diff --git a/tests/worker/test_replayer_event_tracing_double_sig_at_start_single_batch.json b/tests/worker/test_replayer_event_tracing_double_sig_at_start_single_batch.json new file mode 100644 index 0000000000..ed0eae1439 --- /dev/null +++ b/tests/worker/test_replayer_event_tracing_double_sig_at_start_single_batch.json @@ -0,0 +1,433 @@ +{ + "events": [ + { + "eventId": "1", + "eventTime": "2026-07-22T17:46:09.820508351Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", + "taskId": "1048655", + "workflowExecutionStartedEventAttributes": { + "workflowType": { + "name": "SignalsActivitiesTimersUpdatesTracingWorkflow" + }, + "taskQueue": { + "name": "tq-104f9b8b-4835-4705-8f36-3fb3f0b9bce7", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "workflowTaskTimeout": "10s", + "originalExecutionRunId": "019f8aef-5a1c-77c0-8c6f-4c42b8984e71", + "identity": "2468547@monolith", + "firstExecutionRunId": "019f8aef-5a1c-77c0-8c6f-4c42b8984e71", + "attempt": 1, + "firstWorkflowTaskBackoff": "0s", + "workflowId": "wf-50105b28-aad3-488b-b8b5-6cd3c168369c", + "priority": {} + } + }, + { + "eventId": "2", + "eventTime": "2026-07-22T17:46:09.820553958Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048656", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "tq-104f9b8b-4835-4705-8f36-3fb3f0b9bce7", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "3", + "eventTime": "2026-07-22T17:46:09.823263829Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED", + "taskId": "1048661", + "workflowExecutionSignaledEventAttributes": { + "signalName": "dosig", + "input": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "ImJlZm9yZSI=" + } + ] + }, + "identity": "2468547@monolith", + "requestId": "0f1accfe-ffda-4af1-bc26-2a4b43007ef5" + } + }, + { + "eventId": "4", + "eventTime": "2026-07-22T17:46:09.826228197Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED", + "taskId": "1048663", + "workflowExecutionSignaledEventAttributes": { + "signalName": "dosig", + "input": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "IjEi" + } + ] + }, + "identity": "2468547@monolith", + "requestId": "7c76e2c6-c5c9-4bfa-9ef8-680e5fa0fdac" + } + }, + { + "eventId": "5", + "eventTime": "2026-07-22T17:46:09.911987108Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048665", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "2", + "identity": "2468547@monolith", + "requestId": "eb18fba3-0020-4bee-9824-68dee535759c", + "historySizeBytes": "600", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "6", + "eventTime": "2026-07-22T17:46:10.029696095Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048669", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "2", + "startedEventId": "5", + "identity": "2468547@monolith", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + }, + "sdkMetadata": { + "coreUsedFlags": [ + 2, + 3, + 1 + ], + "langUsedFlags": [ + 2 + ], + "sdkName": "temporal-python", + "sdkVersion": "1.30.0" + }, + "meteringMetadata": {} + } + }, + { + "eventId": "7", + "eventTime": "2026-07-22T17:46:10.029723573Z", + "eventType": "EVENT_TYPE_TIMER_STARTED", + "taskId": "1048670", + "timerStartedEventAttributes": { + "timerId": "1", + "startToFireTimeout": "0.100s", + "workflowTaskCompletedEventId": "6" + } + }, + { + "eventId": "8", + "eventTime": "2026-07-22T17:46:10.029791694Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", + "taskId": "1048671", + "activityTaskScheduledEventAttributes": { + "activityId": "1", + "activityType": { + "name": "say_hello" + }, + "taskQueue": { + "name": "tq-104f9b8b-4835-4705-8f36-3fb3f0b9bce7", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "header": {}, + "input": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "IkVuY2hpIg==" + } + ] + }, + "scheduleToCloseTimeout": "30s", + "scheduleToStartTimeout": "30s", + "startToCloseTimeout": "30s", + "heartbeatTimeout": "0s", + "workflowTaskCompletedEventId": "6", + "retryPolicy": { + "initialInterval": "1s", + "backoffCoefficient": 2.0, + "maximumInterval": "100s" + }, + "useWorkflowBuildId": true, + "priority": {} + } + }, + { + "eventId": "9", + "eventTime": "2026-07-22T17:46:10.031520468Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", + "taskId": "1048679", + "activityTaskStartedEventAttributes": { + "scheduledEventId": "8", + "identity": "2468547@monolith", + "requestId": "58a7bab7-a808-49ba-b906-3c07a281f078", + "attempt": 1, + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "10", + "eventTime": "2026-07-22T17:46:10.034867651Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", + "taskId": "1048680", + "activityTaskCompletedEventAttributes": { + "result": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "IkhlbGxvLCBFbmNoaSEi" + } + ] + }, + "scheduledEventId": "8", + "startedEventId": "9", + "identity": "2468547@monolith" + } + }, + { + "eventId": "11", + "eventTime": "2026-07-22T17:46:10.034876231Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048681", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "2468547@monolith-af9e32c231d44027a7fbb997838520bf", + "kind": "TASK_QUEUE_KIND_STICKY", + "normalName": "tq-104f9b8b-4835-4705-8f36-3fb3f0b9bce7" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "12", + "eventTime": "2026-07-22T17:46:10.035716599Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048685", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "11", + "identity": "2468547@monolith", + "requestId": "cf2bd6a2-3498-427d-920a-daf350415c70", + "historySizeBytes": "1389", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "13", + "eventTime": "2026-07-22T17:46:10.039414094Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048689", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "11", + "startedEventId": "12", + "identity": "2468547@monolith", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + }, + "sdkMetadata": {}, + "meteringMetadata": {} + } + }, + { + "eventId": "14", + "eventTime": "2026-07-22T17:46:10.112263987Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048695", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "2468547@monolith-af9e32c231d44027a7fbb997838520bf", + "kind": "TASK_QUEUE_KIND_STICKY", + "normalName": "tq-104f9b8b-4835-4705-8f36-3fb3f0b9bce7" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "15", + "eventTime": "2026-07-22T17:46:10.112924510Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048696", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "14", + "identity": "2468547@monolith", + "requestId": "6e079d38-0b99-48eb-b1e9-1b8236232fb1", + "historySizeBytes": "1598", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "16", + "eventTime": "2026-07-22T17:46:10.118047317Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048697", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "14", + "startedEventId": "15", + "identity": "2468547@monolith", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + }, + "sdkMetadata": {}, + "meteringMetadata": {} + } + }, + { + "eventId": "17", + "eventTime": "2026-07-22T17:46:10.118078114Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED", + "taskId": "1048698", + "workflowExecutionUpdateAcceptedEventAttributes": { + "protocolInstanceId": "3078b22e-fa4a-4bb3-bf21-7502464f3f8e", + "acceptedRequestMessageId": "3078b22e-fa4a-4bb3-bf21-7502464f3f8e/request", + "acceptedRequestSequencingEventId": "14", + "acceptedRequest": { + "meta": { + "updateId": "3078b22e-fa4a-4bb3-bf21-7502464f3f8e", + "identity": "2468547@monolith" + }, + "input": { + "name": "doupdate", + "args": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "IjEi" + } + ] + } + } + } + } + }, + { + "eventId": "18", + "eventTime": "2026-07-22T17:46:10.118094048Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED", + "taskId": "1048699", + "workflowExecutionUpdateCompletedEventAttributes": { + "meta": { + "updateId": "3078b22e-fa4a-4bb3-bf21-7502464f3f8e", + "identity": "2468547@monolith" + }, + "outcome": { + "success": { + "payloads": [ + { + "metadata": { + "encoding": "YmluYXJ5L251bGw=" + } + } + ] + } + }, + "acceptedEventId": "17" + } + }, + { + "eventId": "19", + "eventTime": "2026-07-22T17:46:10.822704848Z", + "eventType": "EVENT_TYPE_TIMER_FIRED", + "taskId": "1048702", + "timerFiredEventAttributes": { + "timerId": "1", + "startedEventId": "7" + } + }, + { + "eventId": "20", + "eventTime": "2026-07-22T17:46:10.822723284Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048703", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "2468547@monolith-af9e32c231d44027a7fbb997838520bf", + "kind": "TASK_QUEUE_KIND_STICKY", + "normalName": "tq-104f9b8b-4835-4705-8f36-3fb3f0b9bce7" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "21", + "eventTime": "2026-07-22T17:46:10.827860954Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048707", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "20", + "identity": "2468547@monolith", + "requestId": "facf828f-060f-4a8b-87cf-bdbb3a3297e9", + "historySizeBytes": "2430", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "22", + "eventTime": "2026-07-22T17:46:10.843601707Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048711", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "20", + "startedEventId": "21", + "identity": "2468547@monolith", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + }, + "sdkMetadata": {}, + "meteringMetadata": {} + } + }, + { + "eventId": "23", + "eventTime": "2026-07-22T17:46:10.843661263Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", + "taskId": "1048712", + "workflowExecutionCompletedEventAttributes": { + "result": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "WyJzaWctYmVmb3JlLXN5bmMiLCJzaWctYmVmb3JlLTEiLCJzaWctMS1zeW5jIiwic2lnLTEtMSIsInRpbWVyLXN5bmMiLCJhY3Qtc3luYyIsInNpZy1iZWZvcmUtMiIsInNpZy0xLTIiLCJhY3QtMSIsImFjdC0yIiwidXBkYXRlLTEtc3luYyIsInVwZGF0ZS0xLTEiLCJ1cGRhdGUtMS0yIiwidGltZXItMSIsInRpbWVyLTIiXQ==" + } + ] + }, + "workflowTaskCompletedEventId": "22" + } + } + ] +} + diff --git a/tests/worker/test_replayer_event_tracing_single_batch.json b/tests/worker/test_replayer_event_tracing_single_batch.json new file mode 100644 index 0000000000..42bab0b4f3 --- /dev/null +++ b/tests/worker/test_replayer_event_tracing_single_batch.json @@ -0,0 +1,479 @@ +{ + "events": [ + { + "eventId": "1", + "eventTime": "2026-07-22T17:46:08.798556582Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED", + "taskId": "1048587", + "workflowExecutionStartedEventAttributes": { + "workflowType": { + "name": "SignalsActivitiesTimersUpdatesTracingWorkflow" + }, + "taskQueue": { + "name": "tq-7049fd3e-356e-49d5-9047-2b97b454562e", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "workflowTaskTimeout": "10s", + "originalExecutionRunId": "019f8aef-561e-787b-8565-31e78b4a889a", + "identity": "2468547@monolith", + "firstExecutionRunId": "019f8aef-561e-787b-8565-31e78b4a889a", + "attempt": 1, + "firstWorkflowTaskBackoff": "0s", + "workflowId": "wf-2dd53446-a657-4f47-9e47-a3edeb302c5f", + "priority": {} + } + }, + { + "eventId": "2", + "eventTime": "2026-07-22T17:46:08.798633092Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048588", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "tq-7049fd3e-356e-49d5-9047-2b97b454562e", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "3", + "eventTime": "2026-07-22T17:46:08.801258084Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED", + "taskId": "1048593", + "workflowExecutionSignaledEventAttributes": { + "signalName": "dosig", + "input": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "ImJlZm9yZSI=" + } + ] + }, + "identity": "2468547@monolith", + "requestId": "c78a6332-adb5-4ff1-af4b-f55e1180d4d8" + } + }, + { + "eventId": "4", + "eventTime": "2026-07-22T17:46:08.949831498Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048595", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "2", + "identity": "2468547@monolith", + "requestId": "1e30e279-6cc7-497a-89f5-3e032d169c49", + "historySizeBytes": "477", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "5", + "eventTime": "2026-07-22T17:46:09.032870384Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048599", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "2", + "startedEventId": "4", + "identity": "2468547@monolith", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + }, + "sdkMetadata": { + "coreUsedFlags": [ + 3, + 1, + 2 + ], + "langUsedFlags": [ + 2 + ], + "sdkName": "temporal-python", + "sdkVersion": "1.30.0" + }, + "meteringMetadata": {} + } + }, + { + "eventId": "6", + "eventTime": "2026-07-22T17:46:09.032946093Z", + "eventType": "EVENT_TYPE_TIMER_STARTED", + "taskId": "1048600", + "timerStartedEventAttributes": { + "timerId": "1", + "startToFireTimeout": "0.100s", + "workflowTaskCompletedEventId": "5" + } + }, + { + "eventId": "7", + "eventTime": "2026-07-22T17:46:09.033008651Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED", + "taskId": "1048601", + "activityTaskScheduledEventAttributes": { + "activityId": "1", + "activityType": { + "name": "say_hello" + }, + "taskQueue": { + "name": "tq-7049fd3e-356e-49d5-9047-2b97b454562e", + "kind": "TASK_QUEUE_KIND_NORMAL" + }, + "header": {}, + "input": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "IkVuY2hpIg==" + } + ] + }, + "scheduleToCloseTimeout": "30s", + "scheduleToStartTimeout": "30s", + "startToCloseTimeout": "30s", + "heartbeatTimeout": "0s", + "workflowTaskCompletedEventId": "5", + "retryPolicy": { + "initialInterval": "1s", + "backoffCoefficient": 2.0, + "maximumInterval": "100s" + }, + "useWorkflowBuildId": true, + "priority": {} + } + }, + { + "eventId": "8", + "eventTime": "2026-07-22T17:46:09.035163378Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED", + "taskId": "1048609", + "activityTaskStartedEventAttributes": { + "scheduledEventId": "7", + "identity": "2468547@monolith", + "requestId": "bd46ae91-1b79-4c8b-9366-e24395d0da8b", + "attempt": 1, + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "9", + "eventTime": "2026-07-22T17:46:09.039131108Z", + "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED", + "taskId": "1048610", + "activityTaskCompletedEventAttributes": { + "result": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "IkhlbGxvLCBFbmNoaSEi" + } + ] + }, + "scheduledEventId": "7", + "startedEventId": "8", + "identity": "2468547@monolith" + } + }, + { + "eventId": "10", + "eventTime": "2026-07-22T17:46:09.039143351Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048611", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "2468547@monolith-3a1c4b9f82644345a21e1663c393c0d0", + "kind": "TASK_QUEUE_KIND_STICKY", + "normalName": "tq-7049fd3e-356e-49d5-9047-2b97b454562e" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "11", + "eventTime": "2026-07-22T17:46:09.040109929Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048615", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "10", + "identity": "2468547@monolith", + "requestId": "d3d3c3c3-5c9f-4570-8d8b-cce1f5856a4f", + "historySizeBytes": "1266", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "12", + "eventTime": "2026-07-22T17:46:09.043328426Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048619", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "10", + "startedEventId": "11", + "identity": "2468547@monolith", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + }, + "sdkMetadata": {}, + "meteringMetadata": {} + } + }, + { + "eventId": "13", + "eventTime": "2026-07-22T17:46:09.146751311Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED", + "taskId": "1048621", + "workflowExecutionSignaledEventAttributes": { + "signalName": "dosig", + "input": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "IjEi" + } + ] + }, + "identity": "2468547@monolith", + "requestId": "f18a65f6-8773-425d-b8f6-d1099056f758" + } + }, + { + "eventId": "14", + "eventTime": "2026-07-22T17:46:09.146757799Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048622", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "2468547@monolith-3a1c4b9f82644345a21e1663c393c0d0", + "kind": "TASK_QUEUE_KIND_STICKY", + "normalName": "tq-7049fd3e-356e-49d5-9047-2b97b454562e" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "15", + "eventTime": "2026-07-22T17:46:09.147668735Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048626", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "14", + "identity": "2468547@monolith", + "requestId": "7f9aa9f0-4bef-44a3-93f4-744ff1db8eb4", + "historySizeBytes": "1724", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "16", + "eventTime": "2026-07-22T17:46:09.151221140Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048630", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "14", + "startedEventId": "15", + "identity": "2468547@monolith", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + }, + "sdkMetadata": {}, + "meteringMetadata": {} + } + }, + { + "eventId": "17", + "eventTime": "2026-07-22T17:46:09.151638714Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048633", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "2468547@monolith-3a1c4b9f82644345a21e1663c393c0d0", + "kind": "TASK_QUEUE_KIND_STICKY", + "normalName": "tq-7049fd3e-356e-49d5-9047-2b97b454562e" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "18", + "eventTime": "2026-07-22T17:46:09.151645790Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048634", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "17", + "identity": "2468547@monolith", + "requestId": "request-from-RespondWorkflowTaskCompleted", + "historySizeBytes": "1933", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "19", + "eventTime": "2026-07-22T17:46:09.155070433Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048635", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "17", + "startedEventId": "18", + "identity": "2468547@monolith", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + }, + "sdkMetadata": {}, + "meteringMetadata": {} + } + }, + { + "eventId": "20", + "eventTime": "2026-07-22T17:46:09.155126964Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED", + "taskId": "1048636", + "workflowExecutionUpdateAcceptedEventAttributes": { + "protocolInstanceId": "dd163639-396a-440a-b950-00ac2f2ee490", + "acceptedRequestMessageId": "dd163639-396a-440a-b950-00ac2f2ee490/request", + "acceptedRequestSequencingEventId": "17", + "acceptedRequest": { + "meta": { + "updateId": "dd163639-396a-440a-b950-00ac2f2ee490", + "identity": "2468547@monolith" + }, + "input": { + "name": "doupdate", + "args": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "IjEi" + } + ] + } + } + } + } + }, + { + "eventId": "21", + "eventTime": "2026-07-22T17:46:09.155192377Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED", + "taskId": "1048637", + "workflowExecutionUpdateCompletedEventAttributes": { + "meta": { + "updateId": "dd163639-396a-440a-b950-00ac2f2ee490", + "identity": "2468547@monolith" + }, + "outcome": { + "success": { + "payloads": [ + { + "metadata": { + "encoding": "YmluYXJ5L251bGw=" + } + } + ] + } + }, + "acceptedEventId": "20" + } + }, + { + "eventId": "22", + "eventTime": "2026-07-22T17:46:09.801318803Z", + "eventType": "EVENT_TYPE_TIMER_FIRED", + "taskId": "1048640", + "timerFiredEventAttributes": { + "timerId": "1", + "startedEventId": "6" + } + }, + { + "eventId": "23", + "eventTime": "2026-07-22T17:46:09.801325729Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED", + "taskId": "1048641", + "workflowTaskScheduledEventAttributes": { + "taskQueue": { + "name": "2468547@monolith-3a1c4b9f82644345a21e1663c393c0d0", + "kind": "TASK_QUEUE_KIND_STICKY", + "normalName": "tq-7049fd3e-356e-49d5-9047-2b97b454562e" + }, + "startToCloseTimeout": "10s", + "attempt": 1 + } + }, + { + "eventId": "24", + "eventTime": "2026-07-22T17:46:09.802775220Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED", + "taskId": "1048645", + "workflowTaskStartedEventAttributes": { + "scheduledEventId": "23", + "identity": "2468547@monolith", + "requestId": "3d1c5327-09f4-4434-8880-f181a287c207", + "historySizeBytes": "2770", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + } + } + }, + { + "eventId": "25", + "eventTime": "2026-07-22T17:46:09.808121470Z", + "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED", + "taskId": "1048649", + "workflowTaskCompletedEventAttributes": { + "scheduledEventId": "23", + "startedEventId": "24", + "identity": "2468547@monolith", + "workerVersion": { + "buildId": "d7dd3d4f7dae90ccfe98229c9f116c9a" + }, + "sdkMetadata": {}, + "meteringMetadata": {} + } + }, + { + "eventId": "26", + "eventTime": "2026-07-22T17:46:09.808174063Z", + "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED", + "taskId": "1048650", + "workflowExecutionCompletedEventAttributes": { + "result": { + "payloads": [ + { + "metadata": { + "encoding": "anNvbi9wbGFpbg==" + }, + "data": "WyJzaWctYmVmb3JlLXN5bmMiLCJzaWctYmVmb3JlLTEiLCJ0aW1lci1zeW5jIiwiYWN0LXN5bmMiLCJzaWctYmVmb3JlLTIiLCJhY3QtMSIsImFjdC0yIiwic2lnLTEtc3luYyIsInNpZy0xLTEiLCJzaWctMS0yIiwidXBkYXRlLTEtc3luYyIsInVwZGF0ZS0xLTEiLCJ1cGRhdGUtMS0yIiwidGltZXItMSIsInRpbWVyLTIiXQ==" + } + ] + }, + "workflowTaskCompletedEventId": "25" + } + } + ] +} + diff --git a/tests/worker/test_update_with_start.py b/tests/worker/test_update_with_start.py index 23f997c08e..b8d236a10d 100644 --- a/tests/worker/test_update_with_start.py +++ b/tests/worker/test_update_with_start.py @@ -2,17 +2,18 @@ import asyncio import uuid -from collections.abc import Mapping +from collections.abc import Mapping, Sequence from dataclasses import dataclass from datetime import timedelta from enum import Enum, IntEnum -from typing import Any, Optional, Union +from typing import Any from unittest.mock import patch import pytest import temporalio.api.common.v1 import temporalio.api.workflowservice.v1 +import temporalio.worker from temporalio import activity, workflow from temporalio.client import ( Client, @@ -26,9 +27,11 @@ WorkflowUpdateStage, ) from temporalio.common import ( + HeaderCodecBehavior, WorkflowIDConflictPolicy, WorkflowIDReusePolicy, ) +from temporalio.converter import DataConverter, PayloadCodec from temporalio.exceptions import ApplicationError, WorkflowAlreadyStartedError from temporalio.service import RPCError, RPCStatusCode from temporalio.testing import WorkflowEnvironment @@ -124,7 +127,7 @@ async def test_non_blocking_update_with_must_create_workflow_semantics( env: WorkflowEnvironment, wait_for_stage: WorkflowUpdateStage, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "TODO: make update_with_start_tests pass under Java test server" ) @@ -147,7 +150,7 @@ async def test_non_blocking_update_with_get_or_create_workflow_semantics( env: WorkflowEnvironment, wait_for_stage: WorkflowUpdateStage, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "TODO: make update_with_start_tests pass under Java test server" ) @@ -170,7 +173,7 @@ async def test_blocking_update_with_get_or_create_workflow_semantics( env: WorkflowEnvironment, wait_for_stage: WorkflowUpdateStage, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "TODO: make update_with_start_tests pass under Java test server" ) @@ -192,6 +195,7 @@ async def _do_test( id_conflict_policy: WorkflowIDConflictPolicy, expect_error_when_workflow_exists: ExpectErrorWhenWorkflowExists, ): + workflow_id = f"{workflow_id}-{uuid.uuid4()}" await self._do_execute_update_test( client, workflow_id + "-execute-update", @@ -329,13 +333,14 @@ async def _do_start_update_test( async def test_update_with_start_sets_first_execution_run_id( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("TODO: make update_with_start_tests pass under Java test server") async with new_worker( client, WorkflowForUpdateWithStartTest, activities=[activity_called_by_update], ) as worker: + workflow_id_prefix = f"wid-{uuid.uuid4()}" def make_start_op(workflow_id: str): return WithStartWorkflowOperation( @@ -348,7 +353,7 @@ def make_start_op(workflow_id: str): # conflict policy is FAIL # First UWS succeeds and sets the first execution run ID - start_op_1 = make_start_op("wid-1") + start_op_1 = make_start_op(f"{workflow_id_prefix}-1") update_handle_1 = await client.start_update_with_start_workflow( WorkflowForUpdateWithStartTest.my_non_blocking_update, "1", @@ -360,7 +365,7 @@ def make_start_op(workflow_id: str): # Second UWS start fails because the workflow already exists # first execution run ID is not set on the second UWS handle - start_op_2 = make_start_op("wid-1") + start_op_2 = make_start_op(f"{workflow_id_prefix}-1") for aw in [ client.start_update_with_start_workflow( @@ -375,7 +380,7 @@ def make_start_op(workflow_id: str): await aw # Third UWS start succeeds, but the update fails after acceptance - start_op_3 = make_start_op("wid-2") + start_op_3 = make_start_op(f"{workflow_id_prefix}-2") update_handle_3 = await client.start_update_with_start_workflow( WorkflowForUpdateWithStartTest.my_non_blocking_update, "fail-after-acceptance", @@ -394,7 +399,7 @@ def make_start_op(workflow_id: str): assert await wf_handle_3.result() == "workflow-result-0" # Fourth UWS is same as third, but we use execute_update instead of start_update. - start_op_4 = make_start_op("wid-3") + start_op_4 = make_start_op(f"{workflow_id_prefix}-3") with pytest.raises(WorkflowUpdateFailedError): await client.execute_update_with_start_workflow( WorkflowForUpdateWithStartTest.my_non_blocking_update, @@ -412,7 +417,7 @@ async def test_update_with_start_workflow_already_started_error( gRPC error, and the start_workflow_operation promise should be rejected with the same error. """ - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("TODO: make update_with_start_tests pass under Java test server") async with new_worker( client, @@ -469,6 +474,70 @@ async def start_update_with_start_workflow( return await super().start_update_with_start_workflow(input) +class HeaderSharingCodec(PayloadCodec): + def __init__(self) -> None: + self.already_encoded_payloads = 0 + + async def encode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + for payload in payloads: + if payload.metadata.get("header-sharing-codec") == b"true": + self.already_encoded_payloads += 1 + return [ + temporalio.api.common.v1.Payload( + metadata={"header-sharing-codec": b"true"}, + data=payload.SerializeToString(), + ) + for payload in payloads + ] + + async def decode( + self, payloads: Sequence[temporalio.api.common.v1.Payload] + ) -> list[temporalio.api.common.v1.Payload]: + decoded_payloads = [] + for payload in payloads: + if payload.metadata.get("header-sharing-codec") != b"true": + decoded_payloads.append(payload) + continue + decoded = temporalio.api.common.v1.Payload() + decoded.ParseFromString(payload.data) + decoded_payloads.append(decoded) + return decoded_payloads + + +class HeaderSharingInterceptor(Interceptor): + def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor: + return HeaderSharingOutboundInterceptor(super().intercept_client(next)) + + +class HeaderSharingOutboundInterceptor(OutboundInterceptor): + async def start_update_with_start_workflow( + self, input: StartWorkflowUpdateWithStartInput + ) -> WorkflowUpdateHandle[Any]: + header = temporalio.api.common.v1.Payload(data=b"test-header") + input.start_workflow_input.headers = {"test-header": header} + input.update_workflow_input.headers = {"test-header": header} + return await super().start_update_with_start_workflow(input) + + +class HeaderSharingWorkerInterceptor(temporalio.worker.Interceptor): + def workflow_interceptor_class( + self, input: temporalio.worker.WorkflowInterceptorClassInput + ) -> type[temporalio.worker.WorkflowInboundInterceptor] | None: + return HeaderSharingWorkflowInboundInterceptor + + +class HeaderSharingWorkflowInboundInterceptor( + temporalio.worker.WorkflowInboundInterceptor +): + async def handle_update_handler( + self, input: temporalio.worker.HandleUpdateInput + ) -> Any: + assert input.headers["test-header"].data == b"test-header" + return await super().handle_update_handler(input) + + @workflow.defn class UpdateWithStartInterceptorWorkflow: def __init__(self) -> None: @@ -489,7 +558,7 @@ async def my_update(self, arg: str) -> str: async def test_update_with_start_client_outbound_interceptor( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("TODO: make update_with_start_tests pass under Java test server") interceptor = SimpleClientInterceptor() client = Client(**{**client.config(), "interceptors": [interceptor]}) # type: ignore @@ -516,6 +585,44 @@ async def test_update_with_start_client_outbound_interceptor( assert await wf_handle.result() == "intercepted-workflow-arg" +# Verify fix for https://github.com/temporalio/sdk-python/issues/1769 +async def test_update_with_start_does_not_encode_shared_interceptor_header_twice( + client: Client, + env: WorkflowEnvironment, +): + if env.supports_time_skipping_v1: + pytest.skip("TODO: make update_with_start_tests pass under Java test server") + codec = HeaderSharingCodec() + intercepted_client = Client( + **{ + **client.config(), + "data_converter": DataConverter(payload_codec=codec), + "header_codec_behavior": HeaderCodecBehavior.CODEC, + "interceptors": [HeaderSharingInterceptor()], + } # type: ignore + ) + async with new_worker( + intercepted_client, + UpdateWithStartInterceptorWorkflow, + interceptors=[HeaderSharingWorkerInterceptor()], + ) as worker: + start_workflow_operation = WithStartWorkflowOperation( + UpdateWithStartInterceptorWorkflow.run, + "wf-arg", + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + id_conflict_policy=WorkflowIDConflictPolicy.FAIL, + ) + update_result = await intercepted_client.execute_update_with_start_workflow( + UpdateWithStartInterceptorWorkflow.my_update, + "update-arg", + start_workflow_operation=start_workflow_operation, + ) + + assert update_result == "update-arg" + assert codec.already_encoded_payloads == 0 + + def test_with_start_workflow_operation_requires_conflict_policy(): with pytest.raises(ValueError): WithStartWorkflowOperation( @@ -905,7 +1012,7 @@ async def test_update_with_start_always_attaches_to_completed_update( the update is completed. The behavior is unaffected by the conflict policy or id reuse policy (so, for example, we attach to an update in an existing workflow even if the conflict policy is FAIL). """ - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("TODO: make update_with_start tests pass under Java test server") client = env.client id_conflict_policy = WorkflowIDConflictPolicy[id_conflict_policy_name] @@ -979,7 +1086,7 @@ async def test_update_with_start_attaches_to_non_completed_update_in_running_wor or id reuse policy (so, for example, we attach to the update in an existing workflow even if the conflict policy is FAIL). """ - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("TODO: make update_with_start tests pass under Java test server") client = env.client id_conflict_policy = WorkflowIDConflictPolicy[id_conflict_policy_name] @@ -1050,7 +1157,7 @@ async def test_update_with_start_does_not_attach_to_non_completed_update_in_clos ID and that update ID does not attach to the update. If the id reuse policy is ALLOW_DUPLICATE then a new workflow is started and the update is issued. """ - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("TODO: make update_with_start tests pass under Java test server") client = env.client id_conflict_policy = WorkflowIDConflictPolicy[id_conflict_policy_name] @@ -1104,3 +1211,84 @@ async def _do_update() -> Any: elif id_reuse_policy == WorkflowIDReusePolicy.REJECT_DUPLICATE: with pytest.raises(WorkflowAlreadyStartedError): await _do_update() + + +class MetadataCapturingInterceptor(Interceptor): + """Interceptor that sets rpc_metadata on update-with-start calls.""" + + def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor: + return MetadataCapturingOutboundInterceptor(super().intercept_client(next)) + + +class MetadataCapturingOutboundInterceptor(OutboundInterceptor): + def __init__(self, next: OutboundInterceptor) -> None: + super().__init__(next) + + async def start_update_with_start_workflow( + self, input: StartWorkflowUpdateWithStartInput + ) -> WorkflowUpdateHandle[Any]: + input.rpc_metadata = { + **input.rpc_metadata, + "test-header-key": "test-header-value", + } + return await super().start_update_with_start_workflow(input) + + +# Verify fix for https://github.com/temporalio/sdk-python/issues/1582 +async def test_update_with_start_rpc_metadata_and_timeout_forwarded(client: Client): + """Test that rpc_metadata and rpc_timeout on StartWorkflowUpdateWithStartInput + are forwarded to the execute_multi_operation gRPC call.""" + captured_metadata: dict[str, str | bytes] = {} + captured_timeout: list[timedelta | None] = [] + + class execute_multi_operation: + err = RPCError("intentional", RPCStatusCode.INTERNAL, b"") + err._grpc_status = temporalio.api.common.v1.GrpcStatus(details=[]) + + def __init__(self) -> None: # type: ignore[reportMissingSuperCall] + pass + + async def __call__( + self, + req: temporalio.api.workflowservice.v1.ExecuteMultiOperationRequest, + *, + retry: bool = False, + metadata: Mapping[str, str | bytes] = {}, + timeout: timedelta | None = None, + ) -> temporalio.api.workflowservice.v1.ExecuteMultiOperationResponse: + captured_metadata.update(metadata) + captured_timeout.append(timeout) + raise self.err + + interceptor = MetadataCapturingInterceptor() + intercepted_client = Client( + **{**client.config(), "interceptors": [interceptor]} # type: ignore + ) + + with patch.object( + intercepted_client.workflow_service, + "execute_multi_operation", + execute_multi_operation(), + ): + start_workflow_operation = WithStartWorkflowOperation( + UpdateWithStartInterceptorWorkflow.run, + "wf-arg", + id=f"wf-{uuid.uuid4()}", + task_queue="tq", + id_conflict_policy=WorkflowIDConflictPolicy.FAIL, + ) + with pytest.raises(RPCError): + await intercepted_client.start_update_with_start_workflow( + UpdateWithStartInterceptorWorkflow.my_update, + "update-arg", + start_workflow_operation=start_workflow_operation, + wait_for_stage=WorkflowUpdateStage.ACCEPTED, + rpc_metadata={"original-key": "original-value"}, + rpc_timeout=timedelta(seconds=42), + ) + + # The interceptor should have added its metadata on top of the caller's + assert captured_metadata.get("test-header-key") == "test-header-value" + assert captured_metadata.get("original-key") == "original-value" + # The caller's timeout should have been forwarded + assert captured_timeout == [timedelta(seconds=42)] diff --git a/tests/worker/test_visitor.py b/tests/worker/test_visitor.py index 4fb820f319..362288f348 100644 --- a/tests/worker/test_visitor.py +++ b/tests/worker/test_visitor.py @@ -1,8 +1,16 @@ +import asyncio +import dataclasses +import time from collections.abc import MutableSequence +import pytest from google.protobuf.duration_pb2 import Duration +import temporalio.api.workflowservice.v1.request_response_pb2 as workflowservice_pb2 import temporalio.bridge.worker +import temporalio.converter +import temporalio.exceptions +import temporalio.nexus.system as nexus_system from temporalio.api.common.v1.message_pb2 import ( Payload, Payloads, @@ -10,7 +18,8 @@ SearchAttributes, ) from temporalio.api.sdk.v1.user_metadata_pb2 import UserMetadata -from temporalio.bridge._visitor import PayloadVisitor, VisitorFunctions +from temporalio.bridge._visitor import PayloadVisitor +from temporalio.bridge._visitor_functions import VisitorFunctions from temporalio.bridge.proto.workflow_activation.workflow_activation_pb2 import ( InitializeWorkflow, WorkflowActivation, @@ -20,6 +29,7 @@ ContinueAsNewWorkflowExecution, ScheduleActivity, ScheduleLocalActivity, + ScheduleNexusOperation, SignalExternalWorkflowExecution, StartChildWorkflowExecution, UpdateResponse, @@ -99,14 +109,6 @@ async def test_workflow_activation(): ] ) - async def visitor(payload: Payload) -> Payload: - # Mark visited by prefixing data - new_payload = Payload() - new_payload.metadata.update(payload.metadata) - new_payload.metadata["visited"] = b"True" - new_payload.data = payload.data - return new_payload - act = original.__deepcopy__() await PayloadVisitor().visit(Visitor(), act) assert act.jobs[0].initialize_workflow.arguments[0].metadata["visited"] @@ -211,6 +213,313 @@ async def test_visit_payloads_on_other_commands(): assert ur.completed.metadata["visited"] +async def test_system_nexus_envelope_is_detected_in_generic_payload_field(): + class SystemNexusVisitor(Visitor): + def __init__(self) -> None: + self.visited_payload_count = 0 + self.system_envelope_count = 0 + + async def visit_payload(self, payload: Payload) -> None: + self.visited_payload_count += 1 + await super().visit_payload(payload) + + async def visit_payloads(self, payloads: MutableSequence[Payload]) -> None: + self.visited_payload_count += len(payloads) + await super().visit_payloads(payloads) + + async def visit_system_nexus_envelope(self, payload: Payload) -> None: + _ = payload + self.system_envelope_count += 1 + + system_request = workflowservice_pb2.SignalWithStartWorkflowExecutionRequest( + input=Payloads(payloads=[Payload(data=b"workflow-input")]), + ) + data_converter = temporalio.converter.default() + payload_converter = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ) + system_payload = payload_converter.to_payload(system_request) + assert system_payload is not None + comp = WorkflowActivationCompletion( + run_id="3", + successful=Success( + commands=[ + WorkflowCommand( + update_response=UpdateResponse(completed=system_payload), + ) + ] + ), + ) + visitor = SystemNexusVisitor() + + await PayloadVisitor(concurrency_limit=3).visit(visitor, comp) + + completed = comp.successful.commands[0].update_response.completed + assert completed.metadata["__temporal_system_payload"] == b"true" + assert "visited" not in completed.metadata + decoded = payload_converter.from_payload(completed) + assert isinstance( + decoded, workflowservice_pb2.SignalWithStartWorkflowExecutionRequest + ) + assert decoded.input.payloads[0].metadata["visited"] == b"True" + assert visitor.visited_payload_count == 1 + assert visitor.system_envelope_count == 1 + + +async def test_system_nexus_envelope_without_payloads_is_visited(): + class SystemNexusVisitor(Visitor): + def __init__(self) -> None: + self.system_envelope_count = 0 + + async def visit_system_nexus_envelope(self, payload: Payload) -> None: + _ = payload + self.system_envelope_count += 1 + + response = workflowservice_pb2.SignalWithStartWorkflowExecutionResponse( + run_id="test-run-id" + ) + data_converter = temporalio.converter.default() + payload_converter = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ) + system_payload = payload_converter.to_payload(response) + assert system_payload is not None + completion = WorkflowActivationCompletion( + run_id="3", + successful=Success( + commands=[ + WorkflowCommand( + update_response=UpdateResponse(completed=system_payload), + ) + ] + ), + ) + visitor = SystemNexusVisitor() + + await PayloadVisitor().visit(visitor, completion) + + completed = completion.successful.commands[0].update_response.completed + assert payload_converter.from_payload(completed) == response + assert visitor.system_envelope_count == 1 + + +async def test_unknown_system_nexus_payload_raises_application_error(): + data_converter = temporalio.converter.default() + payload_converter = nexus_system._get_payload_converter( + data_converter.payload_converter, + data_converter.failure_converter, + ) + system_payload = payload_converter.to_payload( + workflowservice_pb2.StartWorkflowExecutionResponse(run_id="test-run-id") + ) + assert system_payload is not None + completion = WorkflowActivationCompletion( + run_id="3", + successful=Success( + commands=[ + WorkflowCommand( + update_response=UpdateResponse(completed=system_payload), + ) + ] + ), + ) + + with pytest.raises(temporalio.exceptions.ApplicationError) as err: + await PayloadVisitor().visit(Visitor(), completion) + + assert ( + err.value.message == "Unknown Temporal system payload: " + "temporal.api.workflowservice.v1.StartWorkflowExecutionResponse" + ) + assert not err.value.non_retryable + + +async def test_concurrent_throughput(): + """Demonstrate that concurrent visitation is faster than serialized for I/O-bound codecs.""" + N_CMDS = 10 + N_ARGS = 5 + SLEEP = 0.02 + + class SlowVisitor(VisitorFunctions): + def __init__(self, *, blocking: bool = False): + self.visit_count = 0 + self._active = 0 + self.max_concurrent = 0 + self._blocking = blocking + + async def visit_payload(self, payload: Payload) -> None: + return await self._visit(1) + + async def visit_payloads(self, payloads: MutableSequence[Payload]) -> None: + return await self._visit(len(payloads)) + + async def _visit(self, count: int) -> None: + self._active += 1 + self.max_concurrent = max(self.max_concurrent, self._active) + try: + if self._blocking: + time.sleep(SLEEP * count) + else: + await asyncio.sleep(SLEEP * count) + self.visit_count += count + finally: + self._active -= 1 + + completion = WorkflowActivationCompletion( + run_id="1", + successful=Success( + commands=[ + WorkflowCommand( + schedule_activity=ScheduleActivity( + seq=i, + activity_id=str(i), + activity_type="", + task_queue="", + arguments=[ + Payload(data=f"cmd_{i}_arg_{j}".encode()) + for j in range(N_ARGS) + ], + priority=Priority(), + ) + ) + for i in range(N_CMDS) + ] + ), + ) + + visitor_default = SlowVisitor() + await PayloadVisitor().visit(visitor_default, completion) + + assert visitor_default.visit_count == N_CMDS * N_ARGS + assert visitor_default.max_concurrent == 1 + + visitor_concurrent = SlowVisitor() + await PayloadVisitor(concurrency_limit=5).visit(visitor_concurrent, completion) + + assert visitor_concurrent.visit_count == N_CMDS * N_ARGS + assert visitor_concurrent.max_concurrent == 5 + + +async def test_cancel_drains_background_tasks(): + """Cancelling visit() cancels in-flight tasks and awaits their cleanup.""" + tasks_started = 0 + tasks_cleaned_up = 0 + background_running = asyncio.Event() + + class SlowVisitor(VisitorFunctions): + async def visit_payload(self, payload: Payload) -> None: + pass + + async def visit_payloads(self, payloads: MutableSequence[Payload]) -> None: + nonlocal tasks_started, tasks_cleaned_up + tasks_started += 1 + background_running.set() + try: + await asyncio.sleep(10) + finally: + tasks_cleaned_up += 1 + + completion = WorkflowActivationCompletion( + run_id="1", + successful=Success( + commands=[ + WorkflowCommand( + schedule_activity=ScheduleActivity( + seq=i, + activity_id=str(i), + activity_type="", + task_queue="", + arguments=[Payload(data=f"arg_{i}".encode())], + priority=Priority(), + ) + ) + for i in range(5) + ] + ), + ) + + task = asyncio.create_task( + PayloadVisitor(concurrency_limit=5).visit(SlowVisitor(), completion) + ) + await background_running.wait() + task.cancel() + + with pytest.raises(asyncio.CancelledError): + await task + + # All started tasks ran their finally blocks before drain() returned. + assert tasks_started > 0 + assert tasks_cleaned_up == tasks_started + + +async def test_system_nexus_envelope_visit_is_bounded(): + active_visits = 0 + max_active_visits = 0 + two_visits_started = asyncio.Event() + release_visits = asyncio.Event() + + class SlowVisitor(VisitorFunctions): + async def visit_payload(self, payload: Payload) -> None: + await self._visit() + + async def visit_payloads(self, payloads: MutableSequence[Payload]) -> None: + await self._visit() + + async def visit_system_nexus_envelope(self, payload: Payload) -> None: + await self._visit() + + async def _visit(self) -> None: + nonlocal active_visits, max_active_visits + active_visits += 1 + max_active_visits = max(max_active_visits, active_visits) + if active_visits == 2: + two_visits_started.set() + try: + await release_visits.wait() + finally: + active_visits -= 1 + + data_converter = temporalio.converter.default() + payload_converter = nexus_system._get_payload_converter( + data_converter.payload_converter, data_converter.failure_converter + ) + system_request = workflowservice_pb2.SignalWithStartWorkflowExecutionRequest( + input=Payloads(payloads=[Payload(data=b"workflow-input")]), + signal_input=Payloads(payloads=[Payload(data=b"signal-input")]), + ) + payload = payload_converter.to_payload(system_request) + assert payload is not None + completion = WorkflowActivationCompletion( + run_id="1", + successful=Success( + commands=[ + WorkflowCommand( + schedule_nexus_operation=ScheduleNexusOperation( + seq=1, + endpoint=nexus_system.TEMPORAL_SYSTEM_ENDPOINT, + service="temporal.api.workflowservice.v1.WorkflowService", + operation="SignalWithStartWorkflowExecution", + input=payload, + ), + ) + ], + ), + ) + + task = asyncio.create_task( + PayloadVisitor(concurrency_limit=2).visit(SlowVisitor(), completion) + ) + await two_visits_started.wait() + await asyncio.sleep(0) + assert max_active_visits == 2 + + release_visits.set() + await task + assert max_active_visits == 2 + + async def test_bridge_encoding(): comp = WorkflowActivationCompletion( run_id="1", @@ -236,7 +545,14 @@ async def test_bridge_encoding(): ), ) - await temporalio.bridge.worker.encode_completion(comp, SimpleCodec(), True) + data_converter = dataclasses.replace( + temporalio.converter.default(), + payload_codec=SimpleCodec(), + ) + + await temporalio.bridge.worker.encode_completion( + comp, data_converter, True, storage_concurrency_limit=1 + ) cmd = comp.successful.commands[0] sa = cmd.schedule_activity diff --git a/tests/worker/test_worker.py b/tests/worker/test_worker.py index 9779bc633f..51b9b6633e 100644 --- a/tests/worker/test_worker.py +++ b/tests/worker/test_worker.py @@ -4,32 +4,36 @@ import concurrent.futures import multiprocessing import multiprocessing.context +import os +import sys import uuid from collections.abc import Awaitable, Callable, Sequence +from contextlib import contextmanager from datetime import timedelta -from typing import Any, Optional +from typing import Any +from unittest.mock import Mock from urllib.request import urlopen import nexusrpc import pytest import temporalio.api.enums.v1 +import temporalio.common import temporalio.nexus +import temporalio.service import temporalio.worker._worker from temporalio import activity, workflow from temporalio.api.workflowservice.v1 import ( DescribeWorkerDeploymentRequest, DescribeWorkerDeploymentResponse, - ListWorkersRequest, SetWorkerDeploymentCurrentVersionRequest, SetWorkerDeploymentCurrentVersionResponse, SetWorkerDeploymentRampingVersionRequest, SetWorkerDeploymentRampingVersionResponse, ) from temporalio.client import ( - BuildIdOpAddNewDefault, Client, - TaskReachabilityType, + WorkflowHandle, ) from temporalio.common import PinnedVersioningOverride, RawValue, VersioningBehavior from temporalio.runtime import ( @@ -40,10 +44,8 @@ from temporalio.service import RPCError from temporalio.testing import WorkflowEnvironment from temporalio.worker import ( - ActivitySlotInfo, CustomSlotSupplier, FixedSizeSlotSupplier, - LocalActivitySlotInfo, NexusSlotInfo, PollerBehaviorAutoscaling, ResourceBasedSlotConfig, @@ -59,15 +61,15 @@ WorkerTuner, WorkflowSlotInfo, ) +from temporalio.worker.workflow_sandbox import SandboxedWorkflowRunner from temporalio.workflow import DynamicWorkflowConfig, VersioningIntent from tests.helpers import ( assert_eventually, find_free_port, new_worker, - worker_versioning_enabled, ) from tests.helpers.fork import _ForkTestResult, _TestFork -from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name +from tests.helpers.nexus import make_nexus_endpoint_name def test_load_default_worker_binary_id(): @@ -77,6 +79,36 @@ def test_load_default_worker_binary_id(): assert val1 == val2 +@pytest.mark.skipif( + sys.version_info < (3, 14), + reason="InterpreterPoolExecutor requires Python 3.14 or newer", +) +@pytest.mark.parametrize("subclass", [False, True]) +def test_activity_executor_rejects_interpreter_pool(subclass: bool): + if sys.version_info >= (3, 14): + + class CustomInterpreterPoolExecutor(concurrent.futures.InterpreterPoolExecutor): # pyright: ignore[reportUnreachable] + pass + + executor_class = concurrent.futures.InterpreterPoolExecutor + if subclass: + executor_class = CustomInterpreterPoolExecutor + + client = Mock(spec=Client) + client.config.return_value = {"plugins": []} + with executor_class(max_workers=1) as executor: + with pytest.raises( + ValueError, + match="InterpreterPoolExecutor is not supported as an activity_executor", + ): + Worker( + client, + task_queue="test-interpreter-pool", + activities=[never_run_activity], + activity_executor=executor, + ) + + @activity.defn async def never_run_activity() -> None: raise NotImplementedError @@ -89,6 +121,16 @@ async def run(self) -> None: raise NotImplementedError +@workflow.defn +class TestClientUpdateWorkflow: + @workflow.run + async def run(self) -> None: + await workflow.execute_activity( + "capture_client_activity", + start_to_close_timeout=timedelta(seconds=10), + ) + + @nexusrpc.handler.service_handler class NeverRunService: @nexusrpc.handler.sync_operation @@ -225,8 +267,88 @@ def my_signal(self, value: str) -> None: workflow.logger.info(f"Signal: {value}") +async def test_worker_run_while_running_raises_already_started(client: Client): + async with new_worker( + client, WaitOnSignalWorkflow, activities=[say_hello] + ) as worker: + + async def complete_workflow() -> None: + handle = await client.start_workflow( + WaitOnSignalWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal(WaitOnSignalWorkflow.my_signal, "finish") + await handle.result() + + # is_running includes validation, so complete work before testing this state. + await complete_workflow() + with pytest.raises(RuntimeError, match="^Already started$"): + await worker.run() + await complete_workflow() + assert worker.is_running + + +async def test_worker_run_after_shutdown_raises_already_started(client: Client): + worker = create_worker(client) + async with worker: + + async def is_running() -> None: + assert worker.is_running + + await assert_eventually(is_running) + assert worker.is_shutdown + with pytest.raises(RuntimeError, match="^Already started$"): + await worker.run() + + +async def test_worker_run_before_validation_finishes_raises_already_started( + client: Client, monkeypatch: pytest.MonkeyPatch +): + worker = new_worker(client, WaitOnSignalWorkflow, activities=[say_hello]) + original_validate = worker._bridge_worker.validate + validated = asyncio.Event() + continue_run = asyncio.Event() + + async def validate() -> Any: + result = await original_validate() + validated.set() + await continue_run.wait() + return result + + # Hold validation's return so the calls overlap even with a fast server. + monkeypatch.setattr(worker._bridge_worker, "validate", validate) + first_run = asyncio.create_task(worker.run()) + try: + await asyncio.wait_for(validated.wait(), 10) + with pytest.raises(RuntimeError, match="^Already started$"): + await worker.run() + assert worker.is_running and not worker.is_shutdown + continue_run.set() + + # The first run is unaffected and still completes a workflow + handle = await client.start_workflow( + WaitOnSignalWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.signal(WaitOnSignalWorkflow.my_signal, "finish") + await handle.result() + finally: + continue_run.set() + await worker.shutdown() + await first_run + + +async def test_worker_run_inside_async_with_raises_already_started(client: Client): + # `async with` already runs the worker in the background + with pytest.raises(RuntimeError, match="^Already started$"): + async with create_worker(client) as worker: + await worker.run() + + async def test_worker_validate_fail(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server does not appear to fail on invalid namespace") # Try to run a worker on an invalid namespace config = client.config() @@ -239,7 +361,39 @@ async def test_worker_validate_fail(client: Client, env: WorkflowEnvironment): assert str(err.value).startswith("Worker validation failed") -async def test_can_run_resource_based_worker(client: Client, env: WorkflowEnvironment): +async def test_worker_validate_fail_does_not_hang_shutdown( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Java test server does not appear to fail on invalid namespace") + config = client.config() + config["namespace"] = "does-not-exist" + client = Client(**config) + + # Calling shutdown() after run() raised should return right away + worker = Worker( + client, task_queue=f"tq-{uuid.uuid4()}", workflows=[NeverRunWorkflow] + ) + with pytest.raises(RuntimeError, match="^Worker validation failed"): + await worker.run() + await asyncio.wait_for(worker.shutdown(), 10) + assert worker.is_shutdown and not worker.is_running + with pytest.raises(RuntimeError, match="^Already started$"): + await worker.run() + + # async with should raise the validation error instead of hanging + async def run_in_context() -> None: + async with Worker( + client, task_queue=f"tq-{uuid.uuid4()}", workflows=[NeverRunWorkflow] + ): + # The worker cancels this when it fails + await asyncio.Future() + + with pytest.raises(RuntimeError, match="^Worker validation failed"): + await asyncio.wait_for(run_in_context(), 10) + + +async def test_can_run_resource_based_worker(client: Client): tuner = WorkerTuner.create_resource_based( target_memory_usage=0.5, target_cpu_usage=0.5, @@ -262,7 +416,7 @@ async def test_can_run_resource_based_worker(client: Client, env: WorkflowEnviro await wf1.result() -async def test_can_run_composite_tuner_worker(client: Client, env: WorkflowEnvironment): +async def test_can_run_composite_tuner_worker(client: Client): resource_based_options = ResourceBasedTunerConfig(0.5, 0.5) tuner = WorkerTuner.create_composite( workflow_supplier=FixedSizeSlotSupplier(5), @@ -299,9 +453,7 @@ async def test_can_run_composite_tuner_worker(client: Client, env: WorkflowEnvir await wf1.result() -async def test_cant_specify_max_concurrent_and_tuner( - client: Client, env: WorkflowEnvironment -): +async def test_cant_specify_max_concurrent_and_tuner(client: Client): tuner = WorkerTuner.create_resource_based( target_memory_usage=0.5, target_cpu_usage=0.5, @@ -320,7 +472,7 @@ async def test_cant_specify_max_concurrent_and_tuner( assert "when also specifying tuner" in str(err.value) -async def test_warns_when_workers_too_low(client: Client, env: WorkflowEnvironment): +async def test_warns_when_workers_too_low(client: Client): tuner = WorkerTuner.create_resource_based( target_memory_usage=0.5, target_cpu_usage=0.5, @@ -376,6 +528,11 @@ async def run(self) -> None: versioning_intent=VersioningIntent.DEFAULT, start_to_close_timeout=timedelta(seconds=5), ) + await workflow.execute_local_activity( + say_hello, + "hi", + start_to_close_timeout=timedelta(seconds=5), + ) nexus_client = workflow.create_nexus_client( endpoint=make_nexus_endpoint_name(workflow.info().task_queue), service=SayHelloService, @@ -391,14 +548,25 @@ def my_signal(self, value: str) -> None: workflow.logger.info(f"Signal: {value}") +@pytest.mark.requires_local_server async def test_custom_slot_supplier(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Nexus tests don't work under Java test server") class MyPermit(SlotPermit): - def __init__(self, pnum: int): + def __init__(self, pnum: int, slot_type: str): super().__init__() self.pnum = pnum + self.slot_type = slot_type + + # Activity and local activity slot infos have the same shape, so the slot + # type recorded on the permit at reservation is used to tell them apart. + def slot_info_fields(permit: MyPermit, info: Any) -> tuple[Any, ...]: + if isinstance(info, WorkflowSlotInfo): + return (permit.slot_type, info.workflow_type, info.is_sticky) + if isinstance(info, NexusSlotInfo): + return (permit.slot_type, info.service, info.operation) + return (permit.slot_type, info.activity_type) class MySlotSupplier(CustomSlotSupplier): reserves = 0 @@ -407,7 +575,8 @@ class MySlotSupplier(CustomSlotSupplier): used = 0 seen_sticky_kinds = set() seen_slot_kinds = set() - seen_used_slot_kinds = set() + used_slot_infos = set() + released_slot_infos = set() seen_release_info_empty = False seen_release_info_nonempty = False @@ -416,7 +585,7 @@ async def reserve_slot(self, ctx: SlotReserveContext) -> SlotPermit: # Verify an async call doesn't bungle things await asyncio.sleep(0.01) self.reserves += 1 - return MyPermit(self.reserves) + return MyPermit(self.reserves, ctx.slot_type) def try_reserve_slot(self, ctx: SlotReserveContext) -> SlotPermit | None: self.reserve_asserts(ctx) @@ -427,14 +596,7 @@ def mark_slot_used(self, ctx: SlotMarkUsedContext) -> None: assert isinstance(ctx.permit, MyPermit) assert ctx.permit.pnum is not None assert ctx.slot_info is not None - if isinstance(ctx.slot_info, WorkflowSlotInfo): - self.seen_used_slot_kinds.add("wf") - elif isinstance(ctx.slot_info, ActivitySlotInfo): - self.seen_used_slot_kinds.add("a") - elif isinstance(ctx.slot_info, LocalActivitySlotInfo): - self.seen_used_slot_kinds.add("la") - elif isinstance(ctx.slot_info, NexusSlotInfo): - self.seen_used_slot_kinds.add("nx") + self.used_slot_infos.add(slot_info_fields(ctx.permit, ctx.slot_info)) self.used += 1 def release_slot(self, ctx: SlotReleaseContext) -> None: @@ -449,6 +611,9 @@ def release_slot(self, ctx: SlotReleaseContext) -> None: self.seen_release_info_empty = True else: self.seen_release_info_nonempty = True + self.released_slot_infos.add( + slot_info_fields(ctx.permit, ctx.slot_info) + ) self.releases += 1 def reserve_asserts(self, ctx: SlotReserveContext) -> None: @@ -474,7 +639,8 @@ def reserve_asserts(self, ctx: SlotReserveContext) -> None: tuner=tuner, identity="myworker", ) as w: - await create_nexus_endpoint(w.task_queue, client) + endpoint_name = make_nexus_endpoint_name(w.task_queue) + await env.create_nexus_endpoint(endpoint_name, w.task_queue) wf1 = await client.start_workflow( CustomSlotSupplierWorkflow.run, id=f"custom-slot-supplier-{uuid.uuid4()}", @@ -488,10 +654,19 @@ def reserve_asserts(self, ctx: SlotReserveContext) -> None: # This isn't solvable without redoing a chunk of pyo3-asyncio. So we only check # that the permits passed to release line up. assert ss.highest_seen_reserve_on_release >= ss.releases - assert ss.used == 5 + assert ss.used == 6 assert ss.seen_sticky_kinds == {True, False} assert ss.seen_slot_kinds == {"workflow", "activity", "local-activity", "nexus"} - assert ss.seen_used_slot_kinds == {"wf", "a", "nx"} + # Callback exceptions are logged and swallowed by the worker, so the slot + # info fields are checked here rather than inside the supplier. + assert ss.used_slot_infos == { + ("workflow", "CustomSlotSupplierWorkflow", False), + ("workflow", "CustomSlotSupplierWorkflow", True), + ("activity", "say_hello"), + ("local-activity", "say_hello"), + ("nexus", "SayHelloService", "say_hello"), + } + assert ss.released_slot_infos == ss.used_slot_infos assert ss.seen_release_info_empty assert ss.seen_release_info_nonempty @@ -503,7 +678,7 @@ async def run(self) -> str: return "hi" -async def test_throwing_slot_supplier(client: Client, env: WorkflowEnvironment): +async def test_throwing_slot_supplier(client: Client): """Ensures a (mostly) broken slot supplier doesn't hose everything up""" class ThrowingSlotSupplier(CustomSlotSupplier): @@ -546,7 +721,7 @@ def release_slot(self, ctx: SlotReleaseContext) -> None: await wf1.result() -async def test_blocking_slot_supplier(client: Client, env: WorkflowEnvironment): +async def test_blocking_slot_supplier(client: Client): class BlockingSlotSupplier(CustomSlotSupplier): marked_used = False @@ -580,6 +755,95 @@ def release_slot(self, ctx: SlotReleaseContext) -> None: await asyncio.sleep(1) +@activity.defn +async def heartbeating_activity(beats: int) -> None: + for i in range(beats): + activity.heartbeat(i) + await asyncio.sleep(0) + + +@workflow.defn +class HeartbeatingFanOutWorkflow: + @workflow.run + async def run(self, total: int, beats: int, window: int) -> None: + in_flight = asyncio.Semaphore(window) + + async def run_one() -> None: + async with in_flight: + await workflow.execute_activity( + heartbeating_activity, + beats, + start_to_close_timeout=timedelta(minutes=1), + heartbeat_timeout=timedelta(seconds=30), + ) + + await asyncio.gather(*(run_one() for _ in range(total))) + + +async def test_custom_slot_supplier_with_heartbeating_activities(client: Client): + """Regression test for the GIL <-> core-mutex deadlock (#1642). + + Any custom slot supplier plus heartbeating activities used to wedge the + worker permanently: the heartbeat FFI held the GIL while blocking on + core's outstanding-activity lock, while an activity task start invoked + mark_slot_used (which acquires the GIL) under that same lock. The + supplier below is deliberately trivial - the deadlock was in the calling + convention, not in what the callbacks do. + + NOTE: on regression this test HANGS rather than fails - the deadlock + freezes the event loop, so no in-process timeout (including the + wait_for below) can fire, and only a CI-level job timeout kills it. + """ + + class CappedSlotSupplier(CustomSlotSupplier): + def __init__(self, max_slots: int) -> None: + self.max_slots = max_slots + self.used = 0 + + async def reserve_slot(self, ctx: SlotReserveContext) -> SlotPermit: + while True: + permit = self.try_reserve_slot(ctx) + if permit is not None: + return permit + await asyncio.sleep(0.005) + + def try_reserve_slot(self, ctx: SlotReserveContext) -> SlotPermit | None: + # Called with the GIL held, so no extra lock is needed + if self.used >= self.max_slots: + return None + self.used += 1 + return SlotPermit() + + def mark_slot_used(self, ctx: SlotMarkUsedContext) -> None: + return None + + def release_slot(self, ctx: SlotReleaseContext) -> None: + self.used = max(0, self.used - 1) + + fixed = FixedSizeSlotSupplier(100) + tuner = WorkerTuner.create_composite( + workflow_supplier=fixed, + # A small cap keeps activity starts (and thus mark_slot_used calls) + # churning against the heartbeat FFI + activity_supplier=CappedSlotSupplier(8), + local_activity_supplier=fixed, + nexus_supplier=fixed, + ) + async with new_worker( + client, + HeartbeatingFanOutWorkflow, + activities=[heartbeating_activity], + tuner=tuner, + ) as w: + wf1 = await client.start_workflow( + HeartbeatingFanOutWorkflow.run, + args=[600, 50, 150], + id=f"heartbeating-slot-supplier-{uuid.uuid4()}", + task_queue=w.task_queue, + ) + await asyncio.wait_for(wf1.result(), timeout=120) + + @workflow.defn( name="DeploymentVersioningWorkflow", versioning_behavior=VersioningBehavior.AUTO_UPGRADE, @@ -653,10 +917,11 @@ def state(self): async def test_worker_with_worker_deployment_config( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Test Server doesn't support worker deployments") deployment_name = f"deployment-{uuid.uuid4()}" + workflow_id_prefix = f"basic-versioning-{uuid.uuid4()}" worker_v1 = WorkerDeploymentVersion(deployment_name=deployment_name, build_id="1.0") worker_v2 = WorkerDeploymentVersion(deployment_name=deployment_name, build_id="2.0") worker_v3 = WorkerDeploymentVersion(deployment_name=deployment_name, build_id="3.0") @@ -699,7 +964,7 @@ async def test_worker_with_worker_deployment_config( # Start workflow 1 which will use the 1.0 worker on auto-upgrade wf1 = await client.start_workflow( DeploymentVersioningWorkflowV1AutoUpgrade.run, - id="basic-versioning-v1", + id=f"{workflow_id_prefix}-v1", task_queue=w1.task_queue, ) assert "v1" == await wf1.query("state") @@ -711,7 +976,7 @@ async def test_worker_with_worker_deployment_config( wf2 = await client.start_workflow( DeploymentVersioningWorkflowV2Pinned.run, - id="basic-versioning-v2", + id=f"{workflow_id_prefix}-v2", task_queue=w1.task_queue, ) assert "v2" == await wf2.query("state") @@ -723,7 +988,7 @@ async def test_worker_with_worker_deployment_config( wf3 = await client.start_workflow( DeploymentVersioningWorkflowV3AutoUpgrade.run, - id="basic-versioning-v3", + id=f"{workflow_id_prefix}-v3", task_queue=w1.task_queue, ) assert "v3" == await wf3.query("state") @@ -743,7 +1008,7 @@ async def test_worker_with_worker_deployment_config( async def test_worker_deployment_ramp(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Test Server doesn't support worker deployments") deployment_name = f"deployment-ramping-{uuid.uuid4()}" @@ -775,9 +1040,15 @@ async def test_worker_deployment_ramp(client: Client, env: WorkflowEnvironment): client, describe_resp.conflict_token, v1 ) ).conflict_token + await wait_for_worker_deployment_routing_config_propagation( + client, deployment_name, v1.build_id + ) conflict_token = ( await set_ramping_version(client, conflict_token, v2, 100) ).conflict_token + await wait_for_worker_deployment_routing_config_propagation( + client, deployment_name, v1.build_id, v2.build_id, 100 + ) # Run workflows and verify they run on v2 for i in range(3): @@ -794,6 +1065,9 @@ async def test_worker_deployment_ramp(client: Client, env: WorkflowEnvironment): conflict_token = ( await set_ramping_version(client, conflict_token, v2, 0) ).conflict_token + await wait_for_worker_deployment_routing_config_propagation( + client, deployment_name, v1.build_id, v2.build_id, 0 + ) for i in range(3): wfa = await client.start_workflow( DeploymentVersioningWorkflowV1AutoUpgrade.run, @@ -806,6 +1080,9 @@ async def test_worker_deployment_ramp(client: Client, env: WorkflowEnvironment): # Set ramp to 50 and eventually verify workflows run on both versions await set_ramping_version(client, conflict_token, v2, 50) + await wait_for_worker_deployment_routing_config_propagation( + client, deployment_name, v1.build_id, v2.build_id, 50 + ) seen_results = set() async def run_and_record(): @@ -828,7 +1105,7 @@ async def check_results(): @workflow.defn(dynamic=True, versioning_behavior=VersioningBehavior.PINNED) class DynamicWorkflowVersioningOnDefn: @workflow.run - async def run(self, args: Sequence[RawValue]) -> str: + async def run(self, _args: Sequence[RawValue]) -> str: return "dynamic" @@ -841,7 +1118,7 @@ def dynamic_config(self) -> DynamicWorkflowConfig: ) @workflow.run - async def run(self, args: Sequence[RawValue]) -> str: + async def run(self, _args: Sequence[RawValue]) -> str: return "dynamic" @@ -851,7 +1128,7 @@ async def _test_worker_deployment_dynamic_workflow( workflow_class: type[Any], expected_versioning_behavior: temporalio.api.enums.v1.VersioningBehavior.ValueType, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Test Server doesn't support worker deployments") deployment_name = f"deployment-dynamic-{uuid.uuid4()}" @@ -922,12 +1199,12 @@ async def run(self) -> str: @workflow.defn(dynamic=True) class NoVersioningAnnotationDynamicWorkflow: @workflow.run - async def run(self, args: Sequence[RawValue]) -> str: + async def run(self, _args: Sequence[RawValue]) -> str: return "whee" async def test_workflows_must_have_versioning_behavior_when_feature_turned_on( - client: Client, env: WorkflowEnvironment + client: Client, ): with pytest.raises(ValueError) as exc_info: Worker( @@ -963,7 +1240,7 @@ async def test_workflows_must_have_versioning_behavior_when_feature_turned_on( async def test_workflows_can_use_default_versioning_behavior( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Test Server doesn't support worker versioning") deployment_name = f"deployment-default-versioning-{uuid.uuid4()}" @@ -1002,10 +1279,67 @@ async def test_workflows_can_use_default_versioning_behavior( ) +async def test_worker_deployment_config_without_versioning( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Test Server doesn't support worker deployments") + + build_id = "my-custom-build-id-1.0" + deployment_name = f"deployment-no-versioning-{uuid.uuid4()}" + + async with new_worker( + client, + NoVersioningAnnotationWorkflow, + deployment_config=WorkerDeploymentConfig( + version=WorkerDeploymentVersion( + deployment_name=deployment_name, build_id=build_id + ), + use_worker_versioning=False, + ), + ) as worker: + handle = await client.start_workflow( + NoVersioningAnnotationWorkflow.run, + id=f"no-versioning-build-id-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + result = await handle.result() + assert result == "whee" + + history = await handle.fetch_history() + assert any( + event.workflow_task_completed_event_attributes + and event.workflow_task_completed_event_attributes.worker_version + and event.workflow_task_completed_event_attributes.worker_version.build_id + == build_id + for event in history.events + ), "Expected build ID to appear in workflow history" + + +async def test_deployment_config_rejects_versioning_behavior_without_versioning( + client: Client, +): + with pytest.raises( + ValueError, match="default_versioning_behavior must be UNSPECIFIED" + ): + Worker( + client, + task_queue=f"task-queue-{uuid.uuid4()}", + workflows=[NoVersioningAnnotationWorkflow], + deployment_config=WorkerDeploymentConfig( + version=WorkerDeploymentVersion( + deployment_name="whatever", build_id="1.0" + ), + use_worker_versioning=False, + default_versioning_behavior=VersioningBehavior.AUTO_UPGRADE, + ), + ) + + async def test_workflows_can_use_versioning_override( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Test Server doesn't support worker versioning") deployment_name = f"deployment-versioning-override-{uuid.uuid4()}" @@ -1051,6 +1385,155 @@ async def test_workflows_can_use_versioning_override( ) +@workflow.defn(versioning_behavior=VersioningBehavior.PINNED) +class ChildVersioningOverrideParent: + def __init__(self) -> None: + self.start_child = False + + @workflow.run + async def run( + self, + child_id: str, + override_kind: str, + target_version: WorkerDeploymentVersion, + use_execute: bool, + ) -> tuple[str, str]: + await workflow.wait_condition(lambda: self.start_child) + override: temporalio.common.VersioningOverride + if override_kind == "pinned": + override = PinnedVersioningOverride(target_version) + elif override_kind == "auto_upgrade": + override = temporalio.common.AutoUpgradeVersioningOverride() + else: + override = temporalio.common.OneTimeVersioningOverride(target_version) + if use_execute: + result = await workflow.execute_child_workflow( + ChildVersioningOverrideWorkflow.run, + id=child_id, + versioning_override=override, + ) + else: + child = await workflow.start_child_workflow( + ChildVersioningOverrideWorkflow.run, + id=child_id, + versioning_override=override, + ) + result = await child + version = workflow.info().get_current_deployment_version() + assert version + return version.build_id, result + + @workflow.signal + def launch_child(self) -> None: + self.start_child = True + + +@workflow.defn +class ChildVersioningOverrideWorkflow: + def __init__(self) -> None: + self.finish = False + + @workflow.run + async def run(self) -> str: + version = workflow.info().get_current_deployment_version() + assert version + # Memo records the first task without issuing a query that could trigger routing. + workflow.upsert_memo({"initial_build_id": version.build_id}) + await workflow.wait_condition(lambda: self.finish) + version = workflow.info().get_current_deployment_version() + assert version + return version.build_id + + @workflow.signal + def do_finish(self) -> None: + self.finish = True + + +@pytest.mark.parametrize("use_execute", [False, True], ids=["start", "execute"]) +@pytest.mark.parametrize( + "override_kind, child_behavior, expected_final_build_id", + [ + ("pinned", VersioningBehavior.AUTO_UPGRADE, "2.0"), + ("auto_upgrade", VersioningBehavior.PINNED, "2.0"), + ("one_time", VersioningBehavior.AUTO_UPGRADE, "1.0"), + ("one_time", VersioningBehavior.PINNED, "2.0"), + ], + ids=["pinned", "auto-upgrade", "one-time-auto-upgrade", "one-time-pinned"], +) +async def test_child_workflows_can_use_versioning_override( + client: Client, + env: WorkflowEnvironment, + use_execute: bool, + override_kind: str, + child_behavior: VersioningBehavior, + expected_final_build_id: str, +): + if env.supports_time_skipping: + pytest.skip("Test Server doesn't support worker deployments") + + deployment_name = f"child-versioning-override-{uuid.uuid4()}" + v1 = WorkerDeploymentVersion(deployment_name=deployment_name, build_id="1.0") + v2 = WorkerDeploymentVersion(deployment_name=deployment_name, build_id="2.0") + async with ( + new_worker( + client, + ChildVersioningOverrideParent, + ChildVersioningOverrideWorkflow, + deployment_config=WorkerDeploymentConfig( + version=v1, + use_worker_versioning=True, + default_versioning_behavior=child_behavior, + ), + ) as w1, + new_worker( + client, + ChildVersioningOverrideParent, + ChildVersioningOverrideWorkflow, + task_queue=w1.task_queue, + deployment_config=WorkerDeploymentConfig( + version=v2, + use_worker_versioning=True, + default_versioning_behavior=child_behavior, + ), + ), + ): + await wait_until_worker_deployment_visible(client, v1) + describe_resp = await wait_until_worker_deployment_visible(client, v2) + current_version = v2 if override_kind == "auto_upgrade" else v1 + await set_current_deployment_version( + client, describe_resp.conflict_token, current_version + ) + await wait_for_worker_deployment_routing_config_propagation( + client, deployment_name, current_version.build_id + ) + + child_id = f"child-versioning-override-{uuid.uuid4()}" + parent = await client.start_workflow( + ChildVersioningOverrideParent.run, + args=[child_id, override_kind, v2, use_execute], + id=f"parent-{child_id}", + task_queue=w1.task_queue, + versioning_override=PinnedVersioningOverride(v1), + ) + await wait_for_workflow_running_on_version(parent, v1.build_id) + await parent.signal(ChildVersioningOverrideParent.launch_child) + child = client.get_workflow_handle(child_id) + + async def check_initial_version() -> None: + try: + desc = await child.describe() + except RPCError as err: + if err.status != temporalio.service.RPCStatusCode.NOT_FOUND: + raise + assert False, "Child has not started yet" + assert await desc.memo_value("initial_build_id", None) == v2.build_id + + await assert_eventually(check_initial_version) + await child.signal(ChildVersioningOverrideWorkflow.do_finish) + assert await parent.result() == (v1.build_id, expected_final_build_id) + assert await child.result() == expected_final_build_id + + async def test_can_run_autoscaling_polling_worker( client: Client, env: WorkflowEnvironment ): @@ -1061,9 +1544,7 @@ async def test_can_run_autoscaling_polling_worker( metrics=PrometheusConfig(bind_address=prom_addr), ) ) - client = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + client = await env.connect_client( runtime=runtime, ) @@ -1114,7 +1595,8 @@ async def mk_call() -> DescribeWorkerDeploymentResponse: DescribeWorkerDeploymentRequest( namespace=client.namespace, deployment_name=version.deployment_name, - ) + ), + retry=True, ) except RPCError: # Expected @@ -1137,7 +1619,8 @@ async def set_current_deployment_version( deployment_name=version.deployment_name, version=version.to_canonical_string(), conflict_token=conflict_token, - ) + ), + retry=True, ) @@ -1154,11 +1637,67 @@ async def set_ramping_version( version=version.to_canonical_string(), conflict_token=conflict_token, percentage=percentage, - ) + ), + retry=True, ) return response +async def wait_for_worker_deployment_routing_config_propagation( + client: Client, + deployment_name: str, + expected_current_build_id: str, + expected_ramping_build_id: str = "", + expected_ramping_percentage: float | None = None, +) -> None: + """Wait for routing config to be propagated to all task queues.""" + import temporalio.api.enums.v1 + + async def check() -> bool: + resp = await client.workflow_service.describe_worker_deployment( + DescribeWorkerDeploymentRequest( + namespace=client.namespace, + deployment_name=deployment_name, + ), + retry=True, + ) + routing_config = resp.worker_deployment_info.routing_config + if ( + routing_config.current_deployment_version.build_id + != expected_current_build_id + ): + return False + if ( + routing_config.ramping_deployment_version.build_id + != expected_ramping_build_id + ): + return False + if ( + expected_ramping_percentage is not None + and routing_config.ramping_version_percentage != expected_ramping_percentage + ): + return False + state = resp.worker_deployment_info.routing_config_update_state + if ( + state + == temporalio.api.enums.v1.RoutingConfigUpdateState.ROUTING_CONFIG_UPDATE_STATE_COMPLETED + ): + return True + if ( + state + == temporalio.api.enums.v1.RoutingConfigUpdateState.ROUTING_CONFIG_UPDATE_STATE_UNSPECIFIED + ): + return True # unimplemented + if ( + state + == temporalio.api.enums.v1.RoutingConfigUpdateState.ROUTING_CONFIG_UPDATE_STATE_IN_PROGRESS + ): + return False + return False + + await assert_eventually(check) + + def create_worker( client: Client, on_fatal_error: Callable[[BaseException], Awaitable[None]] | None = None, @@ -1228,7 +1767,7 @@ def shutdown(self) -> None: class TestForkCreateWorker(_TestFork): async def coro(self): - self._worker = Worker( + self._worker = Worker( # type:ignore[reportUninitializedInstanceVariable] self._client, task_queue=f"task-queue-{uuid.uuid4()}", activities=[never_run_activity], @@ -1242,7 +1781,7 @@ def test_fork_create_worker( self._expected = _ForkTestResult.assertion_error( "Cannot create worker across forks" ) - self._client = client + self._client = client # type:ignore[reportUninitializedInstanceVariable] self.run(mp_fork_ctx) @@ -1256,7 +1795,7 @@ def test_fork_use_worker( self._expected = _ForkTestResult.assertion_error( "Cannot use worker across forks" ) - self._pre_fork_worker = Worker( + self._pre_fork_worker = Worker( # type:ignore[reportUninitializedInstanceVariable] client, task_queue=f"task-queue-{uuid.uuid4()}", activities=[never_run_activity], @@ -1264,3 +1803,364 @@ def test_fork_use_worker( nexus_service_handlers=[], ) self.run(mp_fork_ctx) + + +async def test_activity_client_updates_when_worker_client_changes( + client: Client, env: WorkflowEnvironment +): + """Test that activities get the updated client when worker.client is changed.""" + # Create a second client (simulating a new client after cert rotation) + # Must use the same runtime + client2 = await env.connect_client( + data_converter=client.data_converter, + ) + + captured_clients: list[Client] = [] + + @activity.defn + async def capture_client_activity() -> None: + captured_clients.append(activity.client()) + + # Create worker with activities + worker = Worker( + client, + task_queue=f"task-queue-{uuid.uuid4()}", + activities=[capture_client_activity], + workflows=[TestClientUpdateWorkflow], + ) + + async with worker: + # Execute activity with original client + await client.execute_workflow( + TestClientUpdateWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Update worker's client + worker.client = client2 + + # Execute activity again - should get the new client + await client2.execute_workflow( + TestClientUpdateWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + # Should have captured both clients + assert len(captured_clients) == 2 + assert captured_clients[0] is client + assert captured_clients[1] is client2 # This will fail before the fix + + +@workflow.defn( + name="ContinueAsNewWithVersionUpgrade", + versioning_behavior=VersioningBehavior.PINNED, +) +class ContinueAsNewWithVersionUpgradeV1: + @workflow.run + async def run(self, attempt: int) -> str: + if attempt > 0: + return "v1.0" + + # Loop waiting for CAN suggestion with version changed + while True: + # Trigger a WFT when timer expires, thereby refreshing the continue-as-new-suggested flag + await asyncio.sleep(0.01) + info = workflow.info() + if info.is_target_worker_deployment_version_changed(): + workflow.continue_as_new( + arg=attempt + 1, + initial_versioning_behavior=workflow.ContinueAsNewVersioningBehavior.AUTO_UPGRADE, + ) + + +@workflow.defn( + name="ContinueAsNewWithVersionUpgrade", + versioning_behavior=VersioningBehavior.PINNED, +) +class ContinueAsNewWithVersionUpgradeV2: + @workflow.run + async def run(self, attempt: int) -> str: # type:ignore[reportUnusedParameter] + return "v2.0" + + +@workflow.defn( + name="ContinueAsNewWithRampingVersion", + versioning_behavior=VersioningBehavior.PINNED, +) +class ContinueAsNewWithRampingVersionV1: + def __init__(self) -> None: + self._should_continue_as_new = False + + @workflow.run + async def run(self, attempt: int) -> str: + if attempt > 0: + return "v1.0" + + await workflow.wait_condition(lambda: self._should_continue_as_new) + workflow.continue_as_new( + arg=attempt + 1, + initial_versioning_behavior=workflow.ContinueAsNewVersioningBehavior.USE_RAMPING_VERSION, + ) + + @workflow.signal + def do_continue_as_new(self) -> None: + self._should_continue_as_new = True + + +@workflow.defn( + name="ContinueAsNewWithRampingVersion", + versioning_behavior=VersioningBehavior.PINNED, +) +class ContinueAsNewWithRampingVersionV2: + @workflow.run + async def run(self, attempt: int) -> str: # type:ignore[reportUnusedParameter] + return "v2.0" + + +async def wait_for_workflow_running_on_version( + handle: WorkflowHandle[Any, Any], expected_build_id: str +) -> None: + """Wait until workflow is RUNNING with expected build ID.""" + + async def check() -> bool: + desc = await handle.describe() + if ( + desc.status + != temporalio.api.enums.v1.WorkflowExecutionStatus.WORKFLOW_EXECUTION_STATUS_RUNNING + ): + return False + versioning_info = desc.raw_description.workflow_execution_info.versioning_info + if not versioning_info.HasField("deployment_version"): + return False + return versioning_info.deployment_version.build_id == expected_build_id + + await assert_eventually(check) + + +async def test_continue_as_new_with_version_upgrade( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Test Server doesn't support worker deployments") + + deployment_name = f"deployment-can-upgrade-{uuid.uuid4()}" + v1 = WorkerDeploymentVersion(deployment_name=deployment_name, build_id="1.0") + v2 = WorkerDeploymentVersion(deployment_name=deployment_name, build_id="2.0") + + async with ( + new_worker( + client, + ContinueAsNewWithVersionUpgradeV1, + deployment_config=WorkerDeploymentConfig( + version=v1, + use_worker_versioning=True, + ), + ) as w1, + new_worker( + client, + ContinueAsNewWithVersionUpgradeV2, + deployment_config=WorkerDeploymentConfig( + version=v2, + use_worker_versioning=True, + ), + task_queue=w1.task_queue, + ), + ): + # Wait for the deployment to be ready + describe_resp = await wait_until_worker_deployment_visible(client, v1) + + # Set version 1.0 as current + resp2 = await set_current_deployment_version( + client, describe_resp.conflict_token, v1 + ) + + # Wait for v1.0-as-Current routing config to be propagated + await wait_for_worker_deployment_routing_config_propagation( + client, deployment_name, v1.build_id + ) + + # Start workflow with v1 as current + handle = await client.start_workflow( + "ContinueAsNewWithVersionUpgrade", + 0, + id=f"test-can-version-upgrade-{uuid.uuid4()}", + task_queue=w1.task_queue, + ) + + # Wait for workflow to complete one WFT on v1.0 + await wait_for_workflow_running_on_version(handle, v1.build_id) + + # Wait for version 2.0 to be ready + await wait_until_worker_deployment_visible(client, v2) + + # Set version 2.0 as current + await set_current_deployment_version(client, resp2.conflict_token, v2) + + # Wait for v2.0-as-Current routing config to be propagated + await wait_for_worker_deployment_routing_config_propagation( + client, deployment_name, v2.build_id + ) + + # Expect workflow to return "v2.0", indicating that it continued-as-new and completed on v2 + result = await handle.result() + assert result == "v2.0" + + +async def test_continue_as_new_with_ramping_version( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Test Server doesn't support worker deployments") + + deployment_name = f"deployment-can-ramping-{uuid.uuid4()}" + v1 = WorkerDeploymentVersion(deployment_name=deployment_name, build_id="1.0") + v2 = WorkerDeploymentVersion(deployment_name=deployment_name, build_id="2.0") + + async with ( + new_worker( + client, + ContinueAsNewWithRampingVersionV1, + deployment_config=WorkerDeploymentConfig( + version=v1, + use_worker_versioning=True, + ), + ) as w1, + new_worker( + client, + ContinueAsNewWithRampingVersionV2, + deployment_config=WorkerDeploymentConfig( + version=v2, + use_worker_versioning=True, + ), + task_queue=w1.task_queue, + ), + ): + describe_resp = await wait_until_worker_deployment_visible(client, v1) + + resp2 = await set_current_deployment_version( + client, describe_resp.conflict_token, v1 + ) + await wait_for_worker_deployment_routing_config_propagation( + client, deployment_name, v1.build_id + ) + + handle = await client.start_workflow( + "ContinueAsNewWithRampingVersion", + 0, + id=f"test-can-ramping-version-{uuid.uuid4()}", + task_queue=w1.task_queue, + ) + await wait_for_workflow_running_on_version(handle, v1.build_id) + + await wait_until_worker_deployment_visible(client, v2) + await set_ramping_version(client, resp2.conflict_token, v2, 0) + await wait_for_worker_deployment_routing_config_propagation( + client, deployment_name, v1.build_id, v2.build_id + ) + + await handle.signal(ContinueAsNewWithRampingVersionV1.do_continue_as_new) + + result = await handle.result() + assert result == "v2.0" + + +def test_worker_config_matches_init_params(): + """WorkerConfig TypedDict keys must match Worker.__init__ kwargs.""" + import inspect + + from temporalio.worker import Worker, WorkerConfig + + init_params = set(inspect.signature(Worker.__init__).parameters.keys()) - {"self"} + config_keys = set(WorkerConfig.__annotations__.keys()) + assert config_keys == init_params, ( + f"WorkerConfig is out of sync with Worker.__init__. " + f"Missing from config: {init_params - config_keys}. " + f"Extra in config: {config_keys - init_params}." + ) + + +async def test_worker_max_eager_activity_reservations_per_workflow_task_config( + client: Client, +): + worker = Worker( + client, + workflows=[SimpleWorkflow], + task_queue=f"task-queue-{uuid.uuid4()}", + max_eager_activity_reservations_per_workflow_task=7, + ) + assert worker.config().get("max_eager_activity_reservations_per_workflow_task") == 7 + + +@pytest.mark.parametrize("value", [0, -1]) +async def test_worker_rejects_non_positive_max_eager_activity_reservations( + client: Client, value: int +): + with pytest.raises( + ValueError, + match=( + "max_eager_activity_reservations_per_workflow_task must be positive; " + "use disable_eager_activity_execution=True to disable eager activity execution" + ), + ): + Worker( + client, + workflows=[SimpleWorkflow], + task_queue=f"task-queue-{uuid.uuid4()}", + max_eager_activity_reservations_per_workflow_task=value, + ) + + +async def test_worker_debug_mode(client: Client): + worker = Worker( + client, + workflows=[SimpleWorkflow], + task_queue=f"task-queue-{uuid.uuid4()}", + ) + assert worker._workflow_worker + assert worker._workflow_worker._deadlock_timeout_seconds == 2 + assert isinstance(worker._workflow_worker._workflow_runner, SandboxedWorkflowRunner) + assert ( + "_pydevd_bundle" + not in worker._workflow_worker._workflow_runner.restrictions.passthrough_modules + ) + + worker = Worker( + client, + workflows=[SimpleWorkflow], + task_queue=f"task-queue-{uuid.uuid4()}", + debug_mode=True, + ) + assert worker._workflow_worker + assert worker._workflow_worker._deadlock_timeout_seconds is None + assert isinstance(worker._workflow_worker._workflow_runner, SandboxedWorkflowRunner) + assert ( + "_pydevd_bundle" + in worker._workflow_worker._workflow_runner.restrictions.passthrough_modules + ) + + @contextmanager + def debug_envvar(): + os.environ["TEMPORAL_DEBUG"] = "true" + try: + yield + finally: + os.environ.pop("TEMPORAL_DEBUG") + + with debug_envvar(): + worker = Worker( + client, + workflows=[SimpleWorkflow], + task_queue=f"task-queue-{uuid.uuid4()}", + ) + assert worker._workflow_worker + assert worker._workflow_worker._deadlock_timeout_seconds is None + assert isinstance( + worker._workflow_worker._workflow_runner, + SandboxedWorkflowRunner, + ) + assert ( + "_pydevd_bundle" + in worker._workflow_worker._workflow_runner.restrictions.passthrough_modules + ) diff --git a/tests/worker/test_worker_exit.py b/tests/worker/test_worker_exit.py new file mode 100644 index 0000000000..49b89ba292 --- /dev/null +++ b/tests/worker/test_worker_exit.py @@ -0,0 +1,80 @@ +import asyncio +import uuid +from collections.abc import Awaitable, Callable +from datetime import timedelta + +from temporalio import workflow +from temporalio.client import Client +from temporalio.plugin import SimplePlugin +from temporalio.worker import Worker + + +@workflow.defn +class NothingWorkflow: + @workflow.run + async def run(self) -> None: + pass + + +class CleanupPlugin(SimplePlugin): + def __init__(self, client: Client) -> None: + super().__init__("test-cleanup") + self.client = client + self.cleanup_result: int | None = None + + async def run_worker( + self, worker: Worker, next: Callable[[Worker], Awaitable[None]] + ) -> None: + try: + await super().run_worker(worker, next) + finally: + # Plugin cleanup code calls the server after the Worker stops. + self.cleanup_result = (await self.client.count_workflows()).count + + +async def test_plugin_cleanup_awaits_after_worker_exit(client: Client): + plugin = CleanupPlugin(client) + async with Worker( + client, + task_queue=f"tq-{uuid.uuid4()}", + workflows=[NothingWorkflow], + plugins=[plugin], + ): + pass + assert plugin.cleanup_result is not None + # The caller can still await after the block. + await client.count_workflows() + + +class StuckCleanupPlugin(SimplePlugin): + def __init__(self) -> None: + super().__init__("test-stuck-cleanup") + self.cancelled = asyncio.Event() + + async def run_worker( + self, worker: Worker, next: Callable[[Worker], Awaitable[None]] + ) -> None: + try: + await super().run_worker(worker, next) + finally: + try: + await asyncio.Event().wait() + except asyncio.CancelledError: + self.cancelled.set() + raise + + +async def test_plugin_cleanup_is_cancelled_after_plugin_shutdown_timeout( + client: Client, +): + plugin = StuckCleanupPlugin() + async with Worker( + client, + task_queue=f"tq-{uuid.uuid4()}", + workflows=[NothingWorkflow], + plugins=[plugin], + plugin_shutdown_timeout=timedelta(milliseconds=100), + ): + pass + # The cancel reaches the cleanup code on a later loop iteration, so wait for it. + await asyncio.wait_for(plugin.cancelled.wait(), timeout=10) diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index 5dcab07cfe..da5688215b 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -1,3 +1,4 @@ +# pyright: reportUnreachable=false from __future__ import annotations import asyncio @@ -22,14 +23,8 @@ from functools import partial from typing import ( Any, - Dict, - List, Literal, NoReturn, - Optional, - Tuple, - Type, - Union, cast, ) from urllib.request import urlopen @@ -41,10 +36,13 @@ import temporalio.activity import temporalio.api.sdk.v1 +import temporalio.api.workflowservice.v1 import temporalio.client import temporalio.converter +import temporalio.converter._extstore import temporalio.worker import temporalio.worker._command_aware_visitor +import temporalio.worker._workflow_instance import temporalio.workflow from temporalio import activity, workflow from temporalio.api.common.v1 import Payload, Payloads, WorkflowExecution @@ -62,8 +60,6 @@ AsyncActivityCancelledError, Client, CreateScheduleInput, - RPCError, - RPCStatusCode, ScheduleActionStartWorkflow, ScheduleHandle, SignalWorkflowInput, @@ -106,6 +102,7 @@ TimeoutError, WorkflowAlreadyStartedError, ) +from temporalio.plugin import SimplePlugin from temporalio.runtime import ( BUFFERED_METRIC_KIND_COUNTER, BUFFERED_METRIC_KIND_HISTOGRAM, @@ -115,11 +112,12 @@ Runtime, TelemetryConfig, ) -from temporalio.service import __version__ +from temporalio.service import RPCError, RPCStatusCode, __version__ from temporalio.testing import WorkflowEnvironment from temporalio.worker import ( ExecuteWorkflowInput, HandleSignalInput, + Replayer, UnsandboxedWorkflowRunner, Worker, WorkflowInstance, @@ -129,18 +127,21 @@ from tests import DEV_SERVER_DOWNLOAD_VERSION from tests.helpers import ( LogCapturer, + LogHandler, admitted_update_task, assert_eq_eventually, assert_eventually, assert_pending_activity_exists_eventually, assert_task_fail_eventually, assert_workflow_exists_eventually, + async_wait_for_pause_event, ensure_search_attributes_present, find_free_port, get_pending_activity_info, new_worker, pause_and_assert, unpause_and_assert, + wait_for_pause_event, workflow_update_exists, ) from tests.helpers.cache_eviction import ( @@ -153,6 +154,7 @@ external_wait_cancel, ) from tests.helpers.metrics import PromMetricMatcher +from tests.helpers.time_skipping import skip_if_time_skipping_v1_unsupported @workflow.defn @@ -230,7 +232,7 @@ async def run(self) -> dict: async def test_workflow_info(client: Client, env: WorkflowEnvironment): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1426" ) @@ -257,6 +259,7 @@ async def test_workflow_info(client: Client, env: WorkflowEnvironment): json.dumps(dataclasses.asdict(retry_policy), default=str) ) assert uuid.UUID(info["run_id"]).version == 7 + assert info["original_execution_run_id"] == info["run_id"] assert info["run_timeout"] is None assert info["task_queue"] == worker.task_queue assert info["task_timeout"] == "0:00:10" @@ -309,10 +312,11 @@ def get_history_info(self) -> HistoryInfo: ) +@pytest.mark.requires_local_server async def test_workflow_history_info( client: Client, env: WorkflowEnvironment, continue_as_new_suggest_history_count: int ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server does not support should continue as new") async with new_worker(client, HistoryInfoWorkflow) as worker: handle = await client.start_workflow( @@ -332,14 +336,36 @@ async def test_workflow_history_info( await handle.signal( HistoryInfoWorkflow.bunch_of_events, continue_as_new_suggest_history_count ) + + # Wait for the first signal's timers to be committed so the next + # signal creates a post-timer workflow task with updated workflow.info(). + # This avoids a race where both signals are accepted before the worker + # processes the first one and both make it into the same activation. + # If that occurs, the query will have the stale history that the + # final signal is intended to avoid. + async def timer_events_recorded() -> None: + timer_started_count = 0 + async for event in handle.fetch_history_events(): + if event.HasField("timer_started_event_attributes"): + timer_started_count += 1 + if timer_started_count >= continue_as_new_suggest_history_count: + return + assert timer_started_count >= continue_as_new_suggest_history_count + + await assert_eventually(timer_events_recorded) + # Send one more event to trigger the WFT update. We have to do this # because just a query will have a stale representation of history # counts, but signal forces a new WFT. await handle.signal(HistoryInfoWorkflow.bunch_of_events, 1) - new_info = await handle.query(HistoryInfoWorkflow.get_history_info) - assert new_info.history_length > continue_as_new_suggest_history_count - assert new_info.history_size > orig_info.history_size - assert new_info.continue_as_new_suggested + + async def history_info_updated() -> None: + new_info = await handle.query(HistoryInfoWorkflow.get_history_info) + assert new_info.history_length > continue_as_new_suggest_history_count + assert new_info.history_size > orig_info.history_size + assert new_info.continue_as_new_suggested + + await assert_eventually(history_info_updated) @workflow.defn @@ -685,21 +711,76 @@ async def some_signal(self, param: BadSignalParam) -> None: async def test_workflow_bad_signal_param(client: Client): - async with new_worker(client, BadSignalParamWorkflow) as worker: - handle = await client.start_workflow( - BadSignalParamWorkflow.run, + with LogCapturer().logs_captured( + temporalio.worker._workflow_instance.logger + ) as capturer: + async with new_worker(client, BadSignalParamWorkflow) as worker: + handle = await client.start_workflow( + BadSignalParamWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + # Send 4 signals, first and third are bad + await handle.signal("some_signal", "bad") + await handle.signal("some_signal", BadSignalParam(some_str="good")) + await handle.signal("some_signal", 123) + await handle.signal("some_signal", BadSignalParam(some_str="finish")) + assert [ + BadSignalParam(some_str="good"), + BadSignalParam(some_str="finish"), + ] == await handle.result() + + # Check that the log message includes workflow context + record = capturer.find_log("Failed deserializing signal input") + assert record is not None + assert "some_signal" in record.message + assert "BadSignalParamWorkflow" in record.message + assert handle.id in record.message + assert hasattr(record, "temporal_workflow") + assert ( + getattr(record, "temporal_workflow")["workflow_type"] + == "BadSignalParamWorkflow" + ) + + +@workflow.defn +class TaskSchedulingWorkflow: + @workflow.run + async def run(self) -> None: + loop = cast( + temporalio.worker._workflow_instance._WorkflowInstanceImpl, + asyncio.get_running_loop(), + ) + completed = [] + + async def child() -> None: + completed.append(True) + + for eager_start in (None, False): + completed.clear() + task = loop.create_task(child(), eager_start=eager_start) + assert not completed + await task + assert completed == [True] + + coro = child() + try: + loop.create_task(coro, eager_start=True) + except NotImplementedError: + pass + else: + raise AssertionError("Eager task execution should be rejected") + finally: + coro.close() + + +async def test_workflow_task_scheduling(client: Client): + async with new_worker(client, TaskSchedulingWorkflow) as worker: + await client.execute_workflow( + TaskSchedulingWorkflow.run, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, ) - # Send 4 signals, first and third are bad - await handle.signal("some_signal", "bad") - await handle.signal("some_signal", BadSignalParam(some_str="good")) - await handle.signal("some_signal", 123) - await handle.signal("some_signal", BadSignalParam(some_str="finish")) - assert [ - BadSignalParam(some_str="good"), - BadSignalParam(some_str="finish"), - ] == await handle.result() @workflow.defn @@ -909,7 +990,7 @@ async def run(self, params: CancelActivityWorkflowParams) -> None: if params.local: handle = workflow.start_local_activity_method( ActivityWaitCancelNotify.wait_cancel, - schedule_to_close_timeout=timedelta(seconds=5), + schedule_to_close_timeout=timedelta(minutes=1), cancellation_type=workflow.ActivityCancellationType[ params.cancellation_type ], @@ -918,7 +999,7 @@ async def run(self, params: CancelActivityWorkflowParams) -> None: handle = workflow.start_activity_method( ActivityWaitCancelNotify.wait_cancel, schedule_to_close_timeout=timedelta(seconds=5), - heartbeat_timeout=timedelta(seconds=1), + heartbeat_timeout=timedelta(seconds=5), cancellation_type=workflow.ActivityCancellationType[ params.cancellation_type ], @@ -929,9 +1010,6 @@ async def run(self, params: CancelActivityWorkflowParams) -> None: self._activity_result = await handle except ActivityError as err: self._activity_result = f"Error: {err.cause.__class__.__name__}" - # TODO(cretz): Remove when https://github.com/temporalio/sdk-core/issues/323 is fixed - except CancelledError as err: - self._activity_result = f"Error: {err.__class__.__name__}" # Wait forever await asyncio.Future() @@ -942,14 +1020,24 @@ def activity_result(self) -> str: @pytest.mark.parametrize("local", [True, False]) async def test_workflow_cancel_activity(client: Client, local: bool): - # Need short task timeout to timeout LA task and longer assert timeout - # so the task can timeout - task_timeout = timedelta(seconds=1) - assert_timeout = timedelta(seconds=10) + # Core completes the task holding a local activity at 80% of this timeout, and + # the cancel reaches the activity on the second such cycle (~8s), so the assert + # budget needs headroom beyond that on loaded runners + task_timeout = timedelta(seconds=5) + assert_timeout = timedelta(seconds=30) activity_inst = ActivityWaitCancelNotify() + async def wait_cancel_complete() -> None: + await asyncio.wait_for( + activity_inst.wait_cancel_complete.wait(), assert_timeout.total_seconds() + ) + activity_inst.wait_cancel_complete.clear() + async with new_worker( - client, CancelActivityWorkflow, activities=[activity_inst.wait_cancel] + client, + CancelActivityWorkflow, + activities=[activity_inst.wait_cancel], + max_heartbeat_throttle_interval=timedelta(milliseconds=300), ) as worker: # Try cancel - confirm error and activity was sent the cancel handle = await client.start_workflow( @@ -969,7 +1057,7 @@ async def activity_result() -> str: await assert_eq_eventually( "Error: CancelledError", activity_result, timeout=assert_timeout ) - await activity_inst.wait_cancel_complete.wait() + await wait_cancel_complete() await handle.cancel() # Wait cancel - confirm no error due to graceful cancel handling @@ -988,7 +1076,7 @@ async def activity_result() -> str: activity_result, timeout=assert_timeout, ) - await activity_inst.wait_cancel_complete.wait() + await wait_cancel_complete() await handle.cancel() # Abandon - confirm error and that activity stays running @@ -1008,7 +1096,218 @@ async def activity_result() -> str: await asyncio.sleep(0.5) assert not activity_inst.wait_cancel_complete.is_set() await handle.cancel() - await activity_inst.wait_cancel_complete.wait() + await wait_cancel_complete() + + +@workflow.defn +class CancelActivityDuringWorkflowCancellationWorkflow: + def __init__(self) -> None: + self._activity_started = False + self._cancel_activity = False + + @workflow.run + async def run(self) -> str: + handle = workflow.start_activity( + wait_cancel, + start_to_close_timeout=timedelta(minutes=1), + heartbeat_timeout=timedelta(seconds=1), + ) + self._activity_started = True + + async def cancel_activity() -> None: + await workflow.wait_condition(lambda: self._cancel_activity) + handle.cancel() + + cancel_task = asyncio.create_task(cancel_activity()) + try: + await handle + except ActivityError: + pass + finally: + cancel_task.cancel() + return "activity cancelled" + + @workflow.signal + def cancel_activity(self) -> None: + self._cancel_activity = True + + @workflow.query + def activity_started(self) -> bool: + return self._activity_started + + +async def test_workflow_cancel_activity_while_workflow_cancelled(client: Client): + task_queue = str(uuid.uuid4()) + runner = CustomWorkflowRunner() + handle = await client.start_workflow( + CancelActivityDuringWorkflowCancellationWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + + async with new_worker(client, activities=[wait_cancel], task_queue=task_queue): + async with new_worker( + client, + CancelActivityDuringWorkflowCancellationWorkflow, + task_queue=task_queue, + workflow_runner=runner, + max_cached_workflows=0, + ): + + async def activity_started() -> bool: + return await handle.query( + CancelActivityDuringWorkflowCancellationWorkflow.activity_started + ) + + await assert_eq_eventually(True, activity_started) + + # Keep the workflow worker offline so the signal and cancellation are + # delivered in the same activation when it resumes. + await handle.signal( + CancelActivityDuringWorkflowCancellationWorkflow.cancel_activity + ) + await handle.cancel() + + async with new_worker( + client, + CancelActivityDuringWorkflowCancellationWorkflow, + task_queue=task_queue, + workflow_runner=runner, + ): + assert await handle.result() == "activity cancelled" + + assert not [ + event + async for event in handle.fetch_history_events() + if event.HasField("workflow_task_failed_event_attributes") + ] + assert any( + {"signal_workflow", "cancel_workflow"}.issubset( + {job.WhichOneof("variant") for job in activation.jobs} + ) + for activation, _ in runner._pairs + ) + + +@dataclass +class CancelActivityThenEvictWorkflowParams: + local: bool + cancellation_type: str + fail_task_after_cancel: bool + + +cancel_activity_then_evict_failed_runs: set[str] = set() + + +class ActivityStartedWaitCancel: + def __init__(self) -> None: + self.started = asyncio.Event() + + @activity.defn + async def wait_cancel(self) -> str: + self.started.set() + return await wait_cancel() + + +# Not sandboxed so the set of failed runs survives eviction +@workflow.defn(sandboxed=False) +class CancelActivityThenEvictWorkflow: + def __init__(self) -> None: + self._cancel_activity = False + + @workflow.run + async def run(self, params: CancelActivityThenEvictWorkflowParams) -> str: + cancellation_type = workflow.ActivityCancellationType[params.cancellation_type] + if params.local: + handle = workflow.start_local_activity_method( + ActivityStartedWaitCancel.wait_cancel, + schedule_to_close_timeout=timedelta(minutes=1), + cancellation_type=cancellation_type, + ) + else: + handle = workflow.start_activity_method( + ActivityStartedWaitCancel.wait_cancel, + schedule_to_close_timeout=timedelta(minutes=1), + heartbeat_timeout=timedelta(seconds=5), + cancellation_type=cancellation_type, + ) + # Cancel only once the activity is running, otherwise the cancel can + # resolve before the activity ever sees it + await workflow.wait_condition(lambda: self._cancel_activity) + handle.cancel() + # Let the handle task send its cancel command before the task can fail + await asyncio.sleep(0) + if ( + params.fail_task_after_cancel + and workflow.info().run_id not in cancel_activity_then_evict_failed_runs + ): + cancel_activity_then_evict_failed_runs.add(workflow.info().run_id) + raise RuntimeError("Intentional task failure") + try: + return await handle + except ActivityError as err: + return f"Error: {err.cause.__class__.__name__}" + + @workflow.signal + def cancel_activity(self) -> None: + self._cancel_activity = True + + +@pytest.mark.parametrize( + "params,expected", + [ + # A task failure evicts the workflow while the cancel is unresolved + ( + CancelActivityThenEvictWorkflowParams( + local=False, + cancellation_type=workflow.ActivityCancellationType.TRY_CANCEL.name, + fail_task_after_cancel=True, + ), + "Error: CancelledError", + ), + ( + CancelActivityThenEvictWorkflowParams( + local=True, + cancellation_type=workflow.ActivityCancellationType.TRY_CANCEL.name, + fail_task_after_cancel=True, + ), + "Error: CancelledError", + ), + # Without a cache, every activation evicts before the activity + # acknowledges the cancel + ( + CancelActivityThenEvictWorkflowParams( + local=False, + cancellation_type=workflow.ActivityCancellationType.WAIT_CANCELLATION_COMPLETED.name, + fail_task_after_cancel=False, + ), + "Got cancelled error, cancelled? True", + ), + ], + ids=["try-cancel-task-failure", "local-try-cancel-task-failure", "wait-no-cache"], +) +async def test_workflow_cancel_activity_then_evict( + client: Client, params: CancelActivityThenEvictWorkflowParams, expected: str +): + activity_inst = ActivityStartedWaitCancel() + async with new_worker( + client, + CancelActivityThenEvictWorkflow, + activities=[activity_inst.wait_cancel], + max_cached_workflows=1000 if params.fail_task_after_cancel else 0, + max_heartbeat_throttle_interval=timedelta(milliseconds=300), + ) as worker: + handle = await client.start_workflow( + CancelActivityThenEvictWorkflow.run, + params, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await activity_inst.started.wait() + await handle.signal(CancelActivityThenEvictWorkflow.cancel_activity) + assert expected == await handle.result() + assert worker._workflow_worker + assert worker._workflow_worker._could_not_evict_count == 0 @workflow.defn @@ -1063,122 +1362,602 @@ async def started() -> bool: @workflow.defn -class TrapCancelWorkflow: - @workflow.run - async def run(self) -> str: - try: - await asyncio.Future() - raise RuntimeError("should not get here") - except asyncio.CancelledError: - return "cancelled" - - -async def test_workflow_cancel_before_run(client: Client): - # Start the workflow _and_ send cancel before even starting the workflow - task_queue = str(uuid.uuid4()) - handle = await client.start_workflow( - TrapCancelWorkflow.run, - id=f"workflow-{uuid.uuid4()}", - task_queue=task_queue, - ) - await handle.cancel() - # Start worker and wait for result - async with new_worker(client, TrapCancelWorkflow, task_queue=task_queue): - assert "cancelled" == await handle.result() - - -@activity.defn -async def wait_forever() -> NoReturn: - await asyncio.Future() - raise RuntimeError("Unreachable") - - -@workflow.defn -class UncaughtCancelWorkflow: - _started = False +class CancelReasonWorkflow: + def __init__(self) -> None: + self._started = False + # Reason observed when the inner task was cancelled (no external + # workflow cancel has happened yet at that point). + self._reason_inner: str | None = "unset" + # Reason observed in the outer CancelledError handler after the + # external workflow cancel has been delivered. + self._reason_outer: str | None = "unset" @workflow.run - async def run(self, activity: bool) -> NoReturn: + async def run(self) -> NoReturn: self._started = True - # Wait forever on activity or child workflow - if activity: - await workflow.execute_activity( - wait_forever, start_to_close_timeout=timedelta(seconds=1000) - ) - else: - await workflow.execute_child_workflow( - UncaughtCancelWorkflow.run, - True, - id=f"{workflow.info().workflow_id}_child", - ) - raise RuntimeError("Unreachable") + task = asyncio.create_task(asyncio.sleep(1000)) + try: + task.cancel() + await task + except asyncio.CancelledError: + self._reason_inner = workflow.cancellation_reason() + try: + await workflow.wait_condition(lambda: False) + except asyncio.CancelledError: + self._reason_outer = workflow.cancellation_reason() + raise + raise RuntimeError("unreachable") @workflow.query def started(self) -> bool: return self._started + @workflow.query + def reason_inner(self) -> str | None: + return self._reason_inner -@pytest.mark.parametrize("activity", [True, False]) -async def test_workflow_uncaught_cancel(client: Client, activity: bool): - async with new_worker( - client, UncaughtCancelWorkflow, activities=[wait_forever] - ) as worker: - # Start workflow waiting on activity or child workflow, cancel it, and - # confirm the workflow is shown as cancelled + @workflow.query + def reason_outer(self) -> str | None: + return self._reason_outer + + +@pytest.mark.parametrize("reason", ["user-supplied reason", ""]) +async def test_workflow_cancellation_reason(client: Client, reason: str): + async with new_worker(client, CancelReasonWorkflow) as worker: handle = await client.start_workflow( - UncaughtCancelWorkflow.run, - activity, + CancelReasonWorkflow.run, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, ) async def started() -> bool: - return await handle.query(UncaughtCancelWorkflow.started) + return await handle.query(CancelReasonWorkflow.started) await assert_eq_eventually(True, started) - await handle.cancel() + # Before any external cancel, reason is None even though an inner task + # cancel has already been observed. + assert await handle.query(CancelReasonWorkflow.reason_inner) is None + + # When reason is "", cancel without providing the kwarg at all to + # exercise the default path. + if reason: + await handle.cancel(reason=reason) + else: + await handle.cancel() with pytest.raises(WorkflowFailureError) as err: await handle.result() assert isinstance(err.value.cause, CancelledError) + outer = await handle.query(CancelReasonWorkflow.reason_outer) + # Load-bearing: a cancel with no reason still produces an empty string, + # not None — None means "no external cancel happened". + assert outer is not None + assert outer == reason + @workflow.defn -class CancelChildWorkflow: - def __init__(self) -> None: - self._ready = False - self._task: asyncio.Task[Any] | None = None +class CancelReasonReporter: + """Workflow that swallows a cancel and returns the observed reason.""" @workflow.run - async def run(self, use_execute: bool) -> None: - if use_execute: - self._task = asyncio.create_task( - workflow.execute_child_workflow( - LongSleepWorkflow.run, id=f"{workflow.info().workflow_id}_child" - ) - ) - else: - self._task = await workflow.start_child_workflow( - LongSleepWorkflow.run, id=f"{workflow.info().workflow_id}_child" - ) - self._ready = True - await self._task + async def run(self) -> str: + try: + await asyncio.sleep(1000) + except asyncio.CancelledError: + return workflow.cancellation_reason() or "" + raise RuntimeError("unreachable") - @workflow.query - def ready(self) -> bool: - return self._ready - @workflow.signal - async def cancel_child(self) -> None: - assert self._task - self._task.cancel() +@workflow.defn +class ChildCancelReasonWorkflow: + @workflow.run + async def run(self, msg: str) -> str: + child = await workflow.start_child_workflow( + CancelReasonReporter.run, + id=f"{workflow.info().workflow_id}_child", + ) + child.cancel(msg) + return await child -@pytest.mark.parametrize("use_execute", [True, False]) -async def test_workflow_cancel_child_started(client: Client, use_execute: bool): - async with new_worker(client, CancelChildWorkflow, LongSleepWorkflow) as worker: - # Start workflow - handle = await client.start_workflow( - CancelChildWorkflow.run, +async def test_workflow_child_cancel_reason(client: Client): + async with new_worker( + client, ChildCancelReasonWorkflow, CancelReasonReporter + ) as worker: + result = await client.execute_workflow( + ChildCancelReasonWorkflow.run, + "from-parent", + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert result == "from-parent" + + +@workflow.defn +class ExternalCancelReasonWorkflow: + @workflow.run + async def run(self, target_id: str) -> None: + await workflow.get_external_workflow_handle(target_id).cancel( + reason="from-external-caller" + ) + + +async def test_workflow_external_cancel_reason(client: Client): + async with new_worker( + client, ExternalCancelReasonWorkflow, CancelReasonReporter + ) as worker: + target_id = f"workflow-{uuid.uuid4()}" + target = await client.start_workflow( + CancelReasonReporter.run, + id=target_id, + task_queue=worker.task_queue, + ) + await client.execute_workflow( + ExternalCancelReasonWorkflow.run, + target_id, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + # Server wraps the user-supplied reason with metadata about the caller + # when one workflow cancels another, so check for substring. + assert "from-external-caller" in await target.result() + + +@workflow.defn +class TrapCancelWorkflow: + @workflow.run + async def run(self) -> str: + try: + await asyncio.Future() + raise RuntimeError("should not get here") + except asyncio.CancelledError: + return "cancelled" + + +_WorkflowLogicFlag = temporalio.worker._workflow_instance._WorkflowLogicFlag +_SINGLE_BATCH_WORKFLOW_LOGIC_FLAG = ( + _WorkflowLogicFlag.PROCESS_WORKFLOW_ACTIVATION_JOBS_AS_SINGLE_BATCH +) + + +def test_single_batch_workflow_activation_jobs_default_disabled() -> None: + assert ( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG + not in temporalio.worker._workflow_instance._DEFAULT_ENABLED_WORKFLOW_LOGIC_FLAGS + ) + + +@workflow.defn +class EnableWorkflowLogicFlagAfterReplayWorkflow: + def __init__(self) -> None: + self._ready = False + self._finish = False + + @workflow.run + async def run(self) -> str: + self._ready = True + await workflow.wait_condition(lambda: self._finish) + return "done" + + @workflow.signal + def finish(self) -> None: + self._finish = True + + @workflow.query + def ready(self) -> bool: + return self._ready + + +async def test_workflow_logic_flag_enabled_after_replay(client: Client) -> None: + task_queue = str(uuid.uuid4()) + handle = await client.start_workflow( + EnableWorkflowLogicFlagAfterReplayWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + + worker = new_worker( + client, + EnableWorkflowLogicFlagAfterReplayWorkflow, + task_queue=task_queue, + # The Java test server does not reliably reschedule an abandoned sticky + # task after its timeout, so keep events sent after this worker stops on + # the normal queue. + max_cached_workflows=0, + ) + # Start under the legacy ordering so the first task does not record the flag + worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=False + ) + async with worker: + + async def ready() -> bool: + return await handle.query(EnableWorkflowLogicFlagAfterReplayWorkflow.ready) + + await assert_eq_eventually(True, ready) + + await handle.signal(EnableWorkflowLogicFlagAfterReplayWorkflow.finish) + + runner = CustomWorkflowRunner() + worker = new_worker( + client, + EnableWorkflowLogicFlagAfterReplayWorkflow, + task_queue=task_queue, + workflow_runner=runner, + ) + worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=True + ) + async with worker: + assert await handle.result() == "done" + + assert any(activation.is_replaying for activation, _ in runner._pairs) + assert any( + not activation.is_replaying + and _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG + in completion.successful.used_internal_flags + for activation, completion in runner._pairs + ) + + history = await handle.fetch_history() + workflow_task_flags = [ + event.workflow_task_completed_event_attributes.sdk_metadata.lang_used_flags + for event in history.events + if event.HasField("workflow_task_completed_event_attributes") + ] + assert _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG not in workflow_task_flags[0] + assert any( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG in flags for flags in workflow_task_flags[1:] + ) + await Replayer( + workflows=[EnableWorkflowLogicFlagAfterReplayWorkflow] + ).replay_workflow(history) + + +@pytest.mark.parametrize("single_batch", [False, True]) +async def test_workflow_cancel_before_run(client: Client, single_batch: bool): + # Start the workflow _and_ send cancel before even starting the workflow + task_queue = str(uuid.uuid4()) + handle = await client.start_workflow( + TrapCancelWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + await handle.cancel() + # Start worker and wait for result + worker = new_worker(client, TrapCancelWorkflow, task_queue=task_queue) + worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=single_batch + ) + async with worker: + assert "cancelled" == await handle.result() + + +@workflow.defn +class CancelAtWaitConditionWorkflow: + def __init__(self) -> None: + self._ready = False + self._proceed = False + self._waiting_after_cancel = False + self._finish_after_cancel = False + + @workflow.run + async def run(self, timeout: bool) -> str: + self._ready = True + try: + await workflow.wait_condition( + lambda: self._proceed, timeout=1000 if timeout else None + ) + except asyncio.CancelledError: + # A caught cancellation must not be raised again merely because a + # later wait sees the already-recorded workflow cancellation. + self._waiting_after_cancel = True + await workflow.wait_condition(lambda: self._finish_after_cancel) + return "cancelled" + return "condition" + + @workflow.signal + def proceed(self) -> None: + self._proceed = True + + @workflow.signal + def finish_after_cancel(self) -> None: + self._finish_after_cancel = True + + @workflow.query + def ready(self) -> bool: + return self._ready + + @workflow.query + def waiting_after_cancel(self) -> bool: + return self._waiting_after_cancel + + +@pytest.mark.parametrize("timeout", [False, True]) +async def test_workflow_cancel_and_condition_ready_in_same_activation( + client: Client, timeout: bool +): + task_queue = str(uuid.uuid4()) + runner = CustomWorkflowRunner() + handle = await client.start_workflow( + CancelAtWaitConditionWorkflow.run, + timeout, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + + worker = new_worker( + client, + CancelAtWaitConditionWorkflow, + task_queue=task_queue, + workflow_runner=runner, + # The Java test server does not reliably reschedule an abandoned sticky + # task after its timeout, so keep events sent after this worker stops on + # the normal queue. + max_cached_workflows=0, + ) + worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=True + ) + async with worker: + + async def ready() -> bool: + return await handle.query(CancelAtWaitConditionWorkflow.ready) + + await assert_eq_eventually(True, ready) + + # Keep the worker offline so the signal and cancellation are delivered in + # one activation when polling resumes. + await handle.signal(CancelAtWaitConditionWorkflow.proceed) + await handle.cancel() + + worker = new_worker( + client, + CancelAtWaitConditionWorkflow, + task_queue=task_queue, + workflow_runner=runner, + ) + worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=True + ) + async with worker: + + async def waiting_after_cancel() -> bool: + return await handle.query( + CancelAtWaitConditionWorkflow.waiting_after_cancel + ) + + await assert_eq_eventually(True, waiting_after_cancel) + await handle.signal(CancelAtWaitConditionWorkflow.finish_after_cancel) + assert await handle.result() == "cancelled" + + assert any( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG in completion.successful.used_internal_flags + for _, completion in runner._pairs + ) + assert any( + {"signal_workflow", "cancel_workflow"}.issubset( + {job.WhichOneof("variant") for job in activation.jobs} + ) + for activation, _ in runner._pairs + ) + await Replayer(workflows=[CancelAtWaitConditionWorkflow]).replay_workflow( + await handle.fetch_history() + ) + + +@workflow.defn +class CompleteChildOnSignalWorkflow: + def __init__(self) -> None: + self._finish = False + + @workflow.run + async def run(self) -> str: + await workflow.wait_condition(lambda: self._finish) + return "child complete" + + @workflow.signal + def finish(self) -> None: + self._finish = True + + +@workflow.defn +class CancelAtChildCompletionWorkflow: + def __init__(self) -> None: + self._child_started = False + + @workflow.run + async def run(self, child_task_queue: str) -> str: + child = await workflow.start_child_workflow( + CompleteChildOnSignalWorkflow.run, + id=f"{workflow.info().workflow_id}-child", + task_queue=child_task_queue, + ) + self._child_started = True + return await child + + @workflow.query + def child_started(self) -> bool: + return self._child_started + + +async def test_workflow_cancel_and_child_completion_in_same_activation( + client: Client, +): + parent_task_queue = str(uuid.uuid4()) + child_task_queue = str(uuid.uuid4()) + workflow_id = f"workflow-{uuid.uuid4()}" + child_id = f"{workflow_id}-child" + runner = CustomWorkflowRunner() + + child_worker = new_worker( + client, + CompleteChildOnSignalWorkflow, + task_queue=child_task_queue, + ) + child_worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=True + ) + async with child_worker: + handle = await client.start_workflow( + CancelAtChildCompletionWorkflow.run, + child_task_queue, + id=workflow_id, + task_queue=parent_task_queue, + ) + parent_worker = new_worker( + client, + CancelAtChildCompletionWorkflow, + task_queue=parent_task_queue, + workflow_runner=runner, + # The Java test server does not reliably reschedule an abandoned + # sticky task after its timeout, so keep events sent after this + # worker stops on the normal queue. + max_cached_workflows=0, + ) + parent_worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=True + ) + async with parent_worker: + + async def child_started() -> bool: + return await handle.query(CancelAtChildCompletionWorkflow.child_started) + + await assert_eq_eventually(True, child_started) + + child_handle = client.get_workflow_handle(child_id) + await child_handle.signal(CompleteChildOnSignalWorkflow.finish) + assert await child_handle.result() == "child complete" + + async def child_completion_recorded() -> None: + async for event in handle.fetch_history_events(): + if ( + event.event_type + == EventType.EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED + ): + return + raise AssertionError("Child completion is not in parent history") + + await assert_eventually(child_completion_recorded) + await handle.cancel() + + parent_worker = new_worker( + client, + CancelAtChildCompletionWorkflow, + task_queue=parent_task_queue, + workflow_runner=runner, + ) + parent_worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=True + ) + async with parent_worker: + with pytest.raises(WorkflowFailureError) as err: + await handle.result() + assert isinstance(err.value.cause, CancelledError) + + assert any( + {"resolve_child_workflow_execution", "cancel_workflow"}.issubset( + {job.WhichOneof("variant") for job in activation.jobs} + ) + for activation, _ in runner._pairs + ) + await Replayer(workflows=[CancelAtChildCompletionWorkflow]).replay_workflow( + await handle.fetch_history() + ) + + +@activity.defn +async def wait_forever() -> NoReturn: + await asyncio.Future() + raise RuntimeError("Unreachable") + + +@workflow.defn +class UncaughtCancelWorkflow: + _started = False + + @workflow.run + async def run(self, activity: bool) -> NoReturn: + self._started = True + # Wait forever on activity or child workflow + if activity: + await workflow.execute_activity( + wait_forever, start_to_close_timeout=timedelta(seconds=1000) + ) + else: + await workflow.execute_child_workflow( + UncaughtCancelWorkflow.run, + True, + id=f"{workflow.info().workflow_id}_child", + ) + raise RuntimeError("Unreachable") + + @workflow.query + def started(self) -> bool: + return self._started + + +@pytest.mark.parametrize("activity", [True, False]) +async def test_workflow_uncaught_cancel(client: Client, activity: bool): + async with new_worker( + client, UncaughtCancelWorkflow, activities=[wait_forever] + ) as worker: + # Start workflow waiting on activity or child workflow, cancel it, and + # confirm the workflow is shown as cancelled + handle = await client.start_workflow( + UncaughtCancelWorkflow.run, + activity, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + async def started() -> bool: + return await handle.query(UncaughtCancelWorkflow.started) + + await assert_eq_eventually(True, started) + await handle.cancel() + with pytest.raises(WorkflowFailureError) as err: + await handle.result() + assert isinstance(err.value.cause, CancelledError) + + +@workflow.defn +class CancelChildWorkflow: + def __init__(self) -> None: + self._ready = False + self._task: asyncio.Task[Any] | None = None + + @workflow.run + async def run(self, use_execute: bool) -> None: + if use_execute: + self._task = asyncio.create_task( + workflow.execute_child_workflow( + LongSleepWorkflow.run, id=f"{workflow.info().workflow_id}_child" + ) + ) + else: + self._task = await workflow.start_child_workflow( + LongSleepWorkflow.run, id=f"{workflow.info().workflow_id}_child" + ) + self._ready = True + await self._task + + @workflow.query + def ready(self) -> bool: + return self._ready + + @workflow.signal + async def cancel_child(self) -> None: + assert self._task + self._task.cancel() + + +@pytest.mark.parametrize("use_execute", [True, False]) +async def test_workflow_cancel_child_started(client: Client, use_execute: bool): + async with new_worker(client, CancelChildWorkflow, LongSleepWorkflow) as worker: + # Start workflow + handle = await client.start_workflow( + CancelChildWorkflow.run, use_execute, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, @@ -1195,9 +1974,58 @@ async def test_workflow_cancel_child_started(client: Client, use_execute: bool): assert isinstance(err.value.cause.cause, CancelledError) -@pytest.mark.skip(reason="unable to easily prevent child start currently") +@workflow.defn +class CancelDuringChildStartWorkflow: + def __init__(self) -> None: + self._proceed = False + + @workflow.signal + def proceed(self) -> None: + self._proceed = True + + @workflow.run + async def run(self) -> None: + await workflow.wait_condition(lambda: self._proceed) + # Start a child on a task queue with no worker. The child's first WFT + # never starts, so _start_fut remains unresolved and the start loop + # blocks forever. + await workflow.start_child_workflow( + LongSleepWorkflow.run, + id=f"{workflow.info().workflow_id}_child", + task_queue="nonexistent-task-queue-no-worker-abc123", + ) + await workflow.sleep(1000) + + async def test_workflow_cancel_child_unstarted(client: Client): - raise NotImplementedError + # Regression test for https://github.com/temporalio/sdk-python/issues/1445 + # + # When cancellation arrived while the parent was waiting for a child + # workflow to start, the CancelledError was caught in the start loop + # to send a cancel command to the child — but was not re-raised. + # Because _start_fut never resolves (child on a queue with no worker), + # the loop would keep waiting forever, hanging the parent workflow. + # + # The fix: re-raise only when self._cancel_requested is True, which + # distinguishes Temporal workflow cancellation from other CancelledError + # sources such as asyncio.wait_for timeouts. + async with new_worker( + client, + CancelDuringChildStartWorkflow, + # Deliberately not registering LongSleepWorkflow and not starting + # a worker on the child's task queue. + ) as worker: + handle = await client.start_workflow( + CancelDuringChildStartWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(seconds=30), + ) + await handle.signal(CancelDuringChildStartWorkflow.proceed) + await handle.cancel() + with pytest.raises(WorkflowFailureError) as err: + await handle.result() + assert isinstance(err.value.cause, CancelledError) @workflow.defn @@ -1246,22 +2074,159 @@ async def run(self, external_workflow_id: str) -> None: async def test_workflow_cancel_external(client: Client): - async with new_worker(client, CancelExternalWorkflow, LongSleepWorkflow) as worker: - # Start long sleep, then cancel and check that it got cancelled - long_sleep_handle = await client.start_workflow( - LongSleepWorkflow.run, + async with new_worker( + client, CancelExternalWorkflow, WaitForeverWorkflow + ) as worker: + # A timer can finish under time skipping before the external cancel is sent. + target_handle = await client.start_workflow( + WaitForeverWorkflow.run, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, ) await client.execute_workflow( CancelExternalWorkflow.run, - long_sleep_handle.id, + target_handle.id, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + with pytest.raises(WorkflowFailureError) as err: + await target_handle.result() + assert isinstance(err.value.cause, CancelledError) + + +@workflow.defn +class CancelExternalStopWaitingWorkflow: + def __init__(self) -> None: + self._finish = False + + @workflow.run + async def run(self, external_workflow_id: str) -> None: + cancel_task = asyncio.create_task( + workflow.get_external_workflow_handle(external_workflow_id).cancel() + ) + # Let the task send the request, then stop waiting on it the way + # asyncio.timeout or a failing TaskGroup sibling would + await asyncio.sleep(0) + cancel_task.cancel() + try: + await cancel_task + except asyncio.CancelledError: + pass + await workflow.wait_condition(lambda: self._finish) + + @workflow.signal + def finish(self) -> None: + self._finish = True + + +@workflow.defn +class CancelExternalThenCleanUpWorkflow: + def __init__(self) -> None: + self._finish = False + + @workflow.run + async def run(self, external_workflow_id: str) -> None: + try: + await workflow.get_external_workflow_handle(external_workflow_id).cancel() + except asyncio.CancelledError: + await workflow.wait_condition(lambda: self._finish) + raise + + @workflow.signal + def finish(self) -> None: + self._finish = True + + +async def wait_for_external_cancel_resolution(handle: WorkflowHandle) -> None: + async def resolved() -> None: + async for e in handle.fetch_history_events(): + if e.event_type in ( + EventType.EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED, + EventType.EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED, + ): + return + assert False, "External cancel request not resolved" + + # Letting the workflow finish any earlier could complete it before Core + # delivers the resolution + await assert_eventually(resolved) + + +async def test_workflow_cancel_external_stop_waiting(client: Client): + async with new_worker( + client, CancelExternalStopWaitingWorkflow, TrapCancelWorkflow + ) as worker: + # No timer, so time-skipping V2 cannot finish it before the cancel + target = await client.start_workflow( + TrapCancelWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + handle = await client.start_workflow( + CancelExternalStopWaitingWorkflow.run, + target.id, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await wait_for_external_cancel_resolution(handle) + await handle.signal(CancelExternalStopWaitingWorkflow.finish) + await handle.result() + event_types = [e.event_type async for e in handle.fetch_history_events()] + assert EventType.EVENT_TYPE_WORKFLOW_TASK_FAILED not in event_types + assert "cancelled" == await target.result() + + +async def test_workflow_cancel_external_stop_waiting_target_missing( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server does not resolve a cancel request for a missing workflow" + ) + async with new_worker(client, CancelExternalStopWaitingWorkflow) as worker: + handle = await client.start_workflow( + CancelExternalStopWaitingWorkflow.run, + f"workflow-{uuid.uuid4()}", id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, ) + await wait_for_external_cancel_resolution(handle) + await handle.signal(CancelExternalStopWaitingWorkflow.finish) + await handle.result() + event_types = [e.event_type async for e in handle.fetch_history_events()] + assert EventType.EVENT_TYPE_WORKFLOW_TASK_FAILED not in event_types + + +async def test_workflow_cancel_external_workflow_cancelled(client: Client): + task_queue = str(uuid.uuid4()) + target = await client.start_workflow( + TrapCancelWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + handle = await client.start_workflow( + CancelExternalThenCleanUpWorkflow.run, + target.id, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + # Cancelling before the first workflow task means the cancellation arrives + # in the same activation that sends the external cancel + await handle.cancel() + async with new_worker( + client, + CancelExternalThenCleanUpWorkflow, + TrapCancelWorkflow, + task_queue=task_queue, + ): + await wait_for_external_cancel_resolution(handle) + await handle.signal(CancelExternalThenCleanUpWorkflow.finish) with pytest.raises(WorkflowFailureError) as err: - await long_sleep_handle.result() + await handle.result() assert isinstance(err.value.cause, CancelledError) + event_types = [e.event_type async for e in handle.fetch_history_events()] + assert EventType.EVENT_TYPE_WORKFLOW_TASK_FAILED not in event_types + assert "cancelled" == await target.result() @dataclass @@ -1531,7 +2496,7 @@ async def decode(self, payloads: Sequence[Payload]) -> list[Payload]: return list(wrapper.payloads) -async def test_workflow_with_codec(client: Client, env: WorkflowEnvironment): +async def test_workflow_with_codec(client: Client): # Make client with this codec and run a couple of existing tests config = client.config() config["data_converter"] = DataConverter(payload_codec=SimpleCodec()) @@ -1617,6 +2582,15 @@ def get_serialization_context( ) -> temporalio.converter.SerializationContext | None: return self._unsandboxed.get_serialization_context(command_info) + def get_external_store_context( + self, + command_info: temporalio.worker._command_aware_visitor.CommandInfo | None, + ) -> temporalio.converter._extstore.StorageDriverStoreContext: + return self._unsandboxed.get_external_store_context(command_info) + + def get_info(self) -> temporalio.workflow.Info: + return self._unsandboxed.get_info() + async def test_workflow_with_custom_runner(client: Client): runner = CustomWorkflowRunner() @@ -1662,12 +2636,13 @@ async def run(self, past_run_ids: list[str]) -> list[str]: # Add memo and retry policy to check memo={"past_run_id_count": len(past_run_ids)}, retry_policy=RetryPolicy(maximum_attempts=1000 + len(past_run_ids)), + backoff_start_interval=timedelta(milliseconds=1), ) async def test_workflow_continue_as_new(client: Client, env: WorkflowEnvironment): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1424" ) @@ -1683,6 +2658,19 @@ async def test_workflow_continue_as_new(client: Client, env: WorkflowEnvironment result = await handle.result() assert len(result) == 5 assert result[0] == handle.first_execution_run_id + first_run_handle = client.get_workflow_handle( + handle.id, run_id=handle.first_execution_run_id + ) + history = await first_run_handle.fetch_history() + continued = [ + event.workflow_execution_continued_as_new_event_attributes + for event in history.events + if event.HasField("workflow_execution_continued_as_new_event_attributes") + ] + assert continued + assert continued[0].backoff_start_interval.ToTimedelta() == timedelta( + milliseconds=1 + ) sa_prefix = "python_test_" @@ -1771,6 +2759,7 @@ def do_search_attribute_update_typed(self) -> None: ) +@pytest.mark.requires_local_server async def test_workflow_search_attributes(client: Client, env_type: str): if env_type != "local": pytest.skip("Only testing search attributes on local which disables cache") @@ -1956,6 +2945,7 @@ async def run(self) -> None: # All we need to do is complete +@pytest.mark.requires_local_server async def test_workflow_no_initial_search_attributes(client: Client, env_type: str): if env_type != "local": pytest.skip("Only testing search attributes on local which disables cache") @@ -1993,11 +2983,31 @@ def my_update(self, value: str) -> None: @workflow.query def last_signal(self) -> str: + workflow.logger.info("Query called") return self._last_signal -async def test_workflow_logging(client: Client, env: WorkflowEnvironment): - workflow.logger.full_workflow_info_on_extra = True +@pytest.mark.parametrize( + "with_workflow_info", + [True, False], +) +async def test_workflow_logging(client: Client, with_workflow_info: bool): + orig_on_message = workflow.logger.workflow_info_on_message + orig_on_extra = workflow.logger.workflow_info_on_extra + orig_full_on_extra = workflow.logger.full_workflow_info_on_extra + + try: + workflow.logger.workflow_info_on_message = with_workflow_info + workflow.logger.workflow_info_on_extra = with_workflow_info + workflow.logger.full_workflow_info_on_extra = with_workflow_info + await _do_workflow_logging_test(client, with_workflow_info) + finally: + workflow.logger.workflow_info_on_message = orig_on_message + workflow.logger.workflow_info_on_extra = orig_on_extra + workflow.logger.full_workflow_info_on_extra = orig_full_on_extra + + +async def _do_workflow_logging_test(client: Client, with_workflow_info: bool): with LogCapturer().logs_captured( workflow.logger.base_logger, activity.logger.base_logger ) as capturer: @@ -2024,30 +3034,43 @@ async def test_workflow_logging(client: Client, env: WorkflowEnvironment): assert "signal 2" == await handle.query(LoggingWorkflow.last_signal) # Confirm logs were produced - assert capturer.find_log("Signal: signal 1 ({'attempt':") + assert capturer.find_log("Signal: signal 1") assert capturer.find_log("Signal: signal 2") assert capturer.find_log("Update: update 1") assert capturer.find_log("Update: update 2") + assert capturer.find_log("Query called") assert not capturer.find_log("Signal: signal 3") - # Also make sure it has some workflow info and correct funcName - record = capturer.find_log("Signal: signal 1") - assert ( - record - and record.__dict__["temporal_workflow"]["workflow_type"] - == "LoggingWorkflow" - and record.funcName == "my_signal" - ) - # Since we enabled full info, make sure it's there - assert isinstance(record.__dict__["workflow_info"], workflow.Info) - # Check the log emitted by the update execution. - record = capturer.find_log("Update: update 1") - assert ( - record - and record.__dict__["temporal_workflow"]["update_id"] == "update-1" - and record.__dict__["temporal_workflow"]["update_name"] == "my_update" - and "'update_id': 'update-1'" in record.message - and "'update_name': 'my_update'" in record.message - ) + + if with_workflow_info: + record = capturer.find_log("Signal: signal 1 ({'attempt':") + assert ( + record + and record.__dict__["temporal_workflow"]["workflow_type"] + == "LoggingWorkflow" + and record.funcName == "my_signal" + ) + # Since we enabled full info, make sure it's there + assert isinstance(record.__dict__["workflow_info"], workflow.Info) + + # Check the log emitted by the update execution. + record = capturer.find_log("Update: update 1") + assert ( + record + and record.__dict__["temporal_workflow"]["update_id"] == "update-1" + and record.__dict__["temporal_workflow"]["update_name"] == "my_update" + and "'update_id': 'update-1'" in record.message + and "'update_name': 'my_update'" in record.message + ) + else: + record = capturer.find_log("Signal: signal 1") + assert record and "temporal_workflow" not in record.__dict__ + assert record and "workflow_info" not in record.__dict__ + + record = capturer.find_log("Update: update 1") + assert record and "temporal_workflow" not in record.__dict__ + assert record and "workflow_info" not in record.__dict__ + assert "'update_id': 'update-1'" not in record.message + assert "'update_name': 'my_update'" not in record.message # Clear queue and start a new one with more signals capturer.log_queue.queue.clear() @@ -2403,9 +3426,9 @@ def complete(self) -> None: async def test_workflow_dataclass_typed(client: Client, env: WorkflowEnvironment): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( - "Java test server: https://github.com/temporalio/sdk-core/issues/390" + "Java test server: https://github.com/temporalio/sdk-rust/issues/390" ) async with new_worker( client, DataClassTypedWorkflow, activities=[data_class_typed_activity] @@ -2475,7 +3498,7 @@ async def test_workflow_separate_abstract(client: Client): async def test_workflow_already_started(client: Client, env: WorkflowEnvironment): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1220" ) @@ -2510,7 +3533,7 @@ async def run(self) -> None: async def test_workflow_child_already_started(client: Client, env: WorkflowEnvironment): # TODO(cretz): Fix - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1220" ) @@ -2647,6 +3670,72 @@ async def test_workflow_local_activity_backoff(client: Client): ) +@activity.defn +async def retry_later_activity() -> None: + # A delay above the default 60s local_retry_threshold makes Core back off + # with a workflow timer instead of retrying in memory + raise ApplicationError("Retry later", next_retry_delay=timedelta(seconds=90)) + + +@workflow.defn +class LocalActivityBackoffCancelWorkflow: + def __init__(self) -> None: + self._cancel_activity = False + + @workflow.run + async def run(self, cancel_from_workflow: bool) -> str: + handle = workflow.start_local_activity( + retry_later_activity, start_to_close_timeout=timedelta(seconds=10) + ) + if cancel_from_workflow: + await workflow.wait_condition(lambda: self._cancel_activity) + handle.cancel() + try: + await handle + except asyncio.CancelledError: + return "activity cancelled" + await handle + return "activity completed" + + @workflow.signal + def cancel_activity(self) -> None: + self._cancel_activity = True + + +@pytest.mark.parametrize("cancel_from_workflow", [False, True]) +async def test_workflow_local_activity_cancel_during_backoff( + client: Client, cancel_from_workflow: bool +): + async with new_worker( + client, LocalActivityBackoffCancelWorkflow, activities=[retry_later_activity] + ) as worker: + handle = await client.start_workflow( + LocalActivityBackoffCancelWorkflow.run, + cancel_from_workflow, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + async def backoff_timer_started() -> None: + async for e in handle.fetch_history_events(): + if e.event_type == EventType.EVENT_TYPE_TIMER_STARTED: + return + assert False, "Backoff timer not started" + + await assert_eventually(backoff_timer_started) + if cancel_from_workflow: + await handle.signal(LocalActivityBackoffCancelWorkflow.cancel_activity) + assert "activity cancelled" == await handle.result() + else: + await handle.cancel() + with pytest.raises(WorkflowFailureError) as err: + await handle.result() + assert isinstance(err.value.cause, CancelledError) + event_types = [e.event_type async for e in handle.fetch_history_events()] + assert EventType.EVENT_TYPE_TIMER_CANCELED in event_types + assert EventType.EVENT_TYPE_WORKFLOW_TASK_FAILED not in event_types + + deadlock_thread_event = threading.Event() @@ -2747,7 +3836,7 @@ async def last_history_task_failure() -> str: await assert_eq_eventually( "[TMPRL1101] Potential deadlock detected: workflow didn't yield within 1 second(s).", last_history_task_failure, - timeout=timedelta(seconds=5), + timeout=timedelta(seconds=10), interval=timedelta(seconds=1), ) @@ -2827,122 +3916,445 @@ async def query_result(handle: WorkflowHandle) -> str: assert "post-patch" == await query_result(patch_handle) assert "pre-patch" == await query_result(pre_patch_handle) - # Confirm what works during deprecated + # Confirm what works during deprecated + async with new_worker( + client, DeprecatePatchWorkflow, task_queue=task_queue, max_cached_workflows=0 + ): + deprecate_patch_handle = await execute() + assert "post-patch" == await query_result(deprecate_patch_handle) + assert "post-patch" == await query_result(patch_handle) + + # Confirm what works when deprecation gone + async with new_worker( + client, PostPatchWorkflow, task_queue=task_queue, max_cached_workflows=0 + ): + post_patch_handle = await execute() + assert "post-patch" == await query_result(post_patch_handle) + assert "post-patch" == await query_result(deprecate_patch_handle) + # TODO(cretz): This causes a non-determinism failure due to having the + # patch marker, but we don't have an easy way to test it + # await query_result(patch_handle) + + +@workflow.defn(name="patch-memoized") +class PatchMemoizedWorkflowUnpatched: + def __init__(self, *, should_patch: bool = False) -> None: + self.should_patch = should_patch + self._waiting_signal = True + + @workflow.run + async def run(self) -> list[str]: + results: list[str] = [] + if self.should_patch and workflow.patched("some-patch"): + results.append("pre-patch") + self._waiting_signal = True + await workflow.wait_condition(lambda: not self._waiting_signal) + results.append("some-value") + if self.should_patch and workflow.patched("some-patch"): + results.append("post-patch") + return results + + @workflow.signal + def signal(self) -> None: + self._waiting_signal = False + + @workflow.query + def waiting_signal(self) -> bool: + return self._waiting_signal + + +@workflow.defn(name="patch-memoized") +class PatchMemoizedWorkflowPatched(PatchMemoizedWorkflowUnpatched): + def __init__(self) -> None: + super().__init__(should_patch=True) + + @workflow.run + async def run(self) -> list[str]: + return await super().run() + + +async def test_workflow_patch_memoized(client: Client): + # Start a worker with the workflow unpatched and wait until halfway through. + # Need to disable workflow cache since we restart the worker and don't want + # to pay the sticky queue penalty. + task_queue = f"tq-{uuid.uuid4()}" + async with Worker( + client, + task_queue=task_queue, + workflows=[PatchMemoizedWorkflowUnpatched], + max_cached_workflows=0, + ): + pre_patch_handle = await client.start_workflow( + PatchMemoizedWorkflowUnpatched.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + + # Need to wait until it has gotten halfway through + async def waiting_signal() -> bool: + return await pre_patch_handle.query( + PatchMemoizedWorkflowUnpatched.waiting_signal + ) + + await assert_eq_eventually(True, waiting_signal) + + # Now start the worker again, but this time with a patched workflow + async with Worker( + client, + task_queue=task_queue, + workflows=[PatchMemoizedWorkflowPatched], + max_cached_workflows=0, + ): + # Start a new workflow post patch + post_patch_handle = await client.start_workflow( + PatchMemoizedWorkflowPatched.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + + # Need to wait until it has gotten halfway through, otherwise the post_patch workflow may never complete + async def waiting_signal() -> bool: + return await post_patch_handle.query( + PatchMemoizedWorkflowPatched.waiting_signal + ) + + await assert_eq_eventually(True, waiting_signal) + + # Send signal to both and check results + await pre_patch_handle.signal(PatchMemoizedWorkflowUnpatched.signal) + await post_patch_handle.signal(PatchMemoizedWorkflowPatched.signal) + + # Confirm expected values + assert ["some-value"] == await pre_patch_handle.result() + + assert [ + "pre-patch", + "some-value", + "post-patch", + ] == await post_patch_handle.result() + + +@workflow.defn +class PatchActivationWorkflow: + @workflow.run + async def run(self, patch_id: str, sleep_after_first: bool = False) -> list[bool]: + first = workflow.patched(patch_id) + if sleep_after_first: + await workflow.sleep(0.001) + return [first, workflow.patched(patch_id)] + + +@workflow.defn +class PatchActivationDeprecateWorkflow: + @workflow.run + async def run(self, patch_id: str) -> bool: + workflow.deprecate_patch(patch_id) + return workflow.patched(patch_id) + + +@workflow.defn(name="PatchActivationRolloutWorkflow") +class PatchActivationRolloutWorkflow: + def __init__(self) -> None: + self._ready = False + self._released = False + + @workflow.run + async def run(self) -> str: + workflow.patched("rollout-patch") + self._ready = True + await workflow.wait_condition(lambda: self._released) + return "new" if workflow.patched("rollout-patch") else "old" + + @workflow.query + def ready(self) -> bool: + return self._ready + + @workflow.signal + def release(self) -> None: + self._released = True + + +@workflow.defn(name="PatchActivationRolloutWorkflow") +class PatchActivationOldRolloutWorkflow: + def __init__(self) -> None: + self._ready = False + self._released = False + + @workflow.run + async def run(self) -> str: + self._ready = True + await workflow.wait_condition(lambda: self._released) + return "old" + + @workflow.query + def ready(self) -> bool: + return self._ready + + @workflow.signal + def release(self) -> None: + self._released = True + + +async def patch_marker_count(handle: WorkflowHandle) -> int: + count = 0 + async for event in handle.fetch_history_events(): + if event.event_type is EventType.EVENT_TYPE_MARKER_RECORDED: + count += 1 + return count + + +async def has_completed_workflow_task(handle: WorkflowHandle) -> bool: + async for event in handle.fetch_history_events(): + if event.event_type is EventType.EVENT_TYPE_WORKFLOW_TASK_COMPLETED: + return True + return False + + +def recording_patch_activation_callback( + calls: list[temporalio.worker.PatchActivationInput], decision: bool +) -> typing.Callable[[temporalio.worker.PatchActivationInput], bool]: + def callback(input: temporalio.worker.PatchActivationInput) -> bool: + calls.append(input) + return decision + + return callback + + +async def test_workflow_patch_activation_callback(client: Client): + workflow_id = f"workflow-{uuid.uuid4()}" + calls: list[temporalio.worker.PatchActivationInput] = [] + async with new_worker( + client, + PatchActivationWorkflow, + patch_activation_callback=recording_patch_activation_callback(calls, True), + ) as worker: + result = await client.execute_workflow( + PatchActivationWorkflow.run, + args=["my-patch", False], + id=workflow_id, + task_queue=worker.task_queue, + ) + + assert result == [True, True] + assert len(calls) == 1 + assert calls[0].workflow_info.workflow_id == workflow_id + assert calls[0].patch_id == "my-patch" + + +async def test_workflow_patch_activation_callback_can_decline(client: Client): + calls: list[temporalio.worker.PatchActivationInput] = [] + async with new_worker( + client, + PatchActivationWorkflow, + patch_activation_callback=recording_patch_activation_callback(calls, False), + ) as worker: + handle = await client.start_workflow( + PatchActivationWorkflow.run, + args=["my-patch", False], + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert await handle.result() == [False, False] + + assert len(calls) == 1 + assert await patch_marker_count(handle) == 0 + + +async def test_workflow_patch_activation_default_activates(client: Client): + async with new_worker(client, PatchActivationWorkflow) as worker: + handle = await client.start_workflow( + PatchActivationWorkflow.run, + args=["my-patch", False], + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert await handle.result() == [True, True] + + assert await patch_marker_count(handle) == 1 + + +async def test_workflow_patch_activation_callback_not_recalled_on_replay( + client: Client, +): + calls: list[temporalio.worker.PatchActivationInput] = [] + async with new_worker( + client, + PatchActivationWorkflow, + max_cached_workflows=0, + patch_activation_callback=recording_patch_activation_callback(calls, False), + ) as worker: + result = await client.execute_workflow( + PatchActivationWorkflow.run, + args=["my-patch", True], + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert result == [False, False] + + assert len(calls) == 1 + + +async def test_workflow_patch_activation_callback_bypassed_for_deprecate( + client: Client, +): + def unexpected_callback(_: temporalio.worker.PatchActivationInput) -> bool: + raise AssertionError("Patch activation callback should not be called") + async with new_worker( - client, DeprecatePatchWorkflow, task_queue=task_queue, max_cached_workflows=0 - ): - deprecate_patch_handle = await execute() - assert "post-patch" == await query_result(deprecate_patch_handle) - assert "post-patch" == await query_result(patch_handle) + client, + PatchActivationDeprecateWorkflow, + patch_activation_callback=unexpected_callback, + ) as worker: + result = await client.execute_workflow( + PatchActivationDeprecateWorkflow.run, + "my-patch", + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + assert result is True + + +async def test_workflow_patch_activation_callback_must_return_bool(client: Client): + def invalid_callback(_: temporalio.worker.PatchActivationInput) -> bool: + return "not a bool" # type: ignore[return-value] # pyright: ignore[reportReturnType] - # Confirm what works when deprecation gone async with new_worker( - client, PostPatchWorkflow, task_queue=task_queue, max_cached_workflows=0 - ): - post_patch_handle = await execute() - assert "post-patch" == await query_result(post_patch_handle) - assert "post-patch" == await query_result(deprecate_patch_handle) - # TODO(cretz): This causes a non-determinism failure due to having the - # patch marker, but we don't have an easy way to test it - # await query_result(patch_handle) + client, + PatchActivationWorkflow, + patch_activation_callback=invalid_callback, + ) as worker: + handle = await client.start_workflow( + PatchActivationWorkflow.run, + args=["my-patch", False], + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await assert_task_fail_eventually( + handle, + message_contains="Patch activation callback must return true or false", + ) -@workflow.defn(name="patch-memoized") -class PatchMemoizedWorkflowUnpatched: - def __init__(self, *, should_patch: bool = False) -> None: - self.should_patch = should_patch - self._waiting_signal = True +async def test_workflow_patch_activation_callback_is_read_only(client: Client): + def make_command(_: temporalio.worker.PatchActivationInput) -> bool: + workflow.upsert_memo({"foo": "bar"}) + return True - @workflow.run - async def run(self) -> list[str]: - results: list[str] = [] - if self.should_patch and workflow.patched("some-patch"): - results.append("pre-patch") - self._waiting_signal = True - await workflow.wait_condition(lambda: not self._waiting_signal) - results.append("some-value") - if self.should_patch and workflow.patched("some-patch"): - results.append("post-patch") - return results + def schedule_task(_: temporalio.worker.PatchActivationInput) -> bool: + asyncio.get_running_loop().call_soon(lambda: None) + return True - @workflow.signal - def signal(self) -> None: - self._waiting_signal = False + def wait_condition(_: temporalio.worker.PatchActivationInput) -> bool: + coroutine = workflow.wait_condition(lambda: True) + try: + coroutine.send(None) + finally: + coroutine.close() + return True - @workflow.query - def waiting_signal(self) -> bool: - return self._waiting_signal + def use_random(_: temporalio.worker.PatchActivationInput) -> bool: + workflow.random().random() + return True + def register_random_seed_callback( + _: temporalio.worker.PatchActivationInput, + ) -> bool: + workflow.register_random_seed_callback(lambda _seed: None) + return True -@workflow.defn(name="patch-memoized") -class PatchMemoizedWorkflowPatched(PatchMemoizedWorkflowUnpatched): - def __init__(self) -> None: - super().__init__(should_patch=True) + def create_new_random(_: temporalio.worker.PatchActivationInput) -> bool: + workflow.new_random() + return True - @workflow.run - async def run(self) -> list[str]: - return await super().run() + callbacks = [ + (make_command, "action attempted: add command"), + (schedule_task, "action attempted: schedule task"), + (wait_condition, "action attempted: wait condition"), + (use_random, "action attempted: random"), + ( + register_random_seed_callback, + "action attempted: register random seed callback", + ), + (create_new_random, "action attempted: register random seed callback"), + ] + for callback, message in callbacks: + async with new_worker( + client, + PatchActivationWorkflow, + patch_activation_callback=callback, + ) as worker: + handle = await client.start_workflow( + PatchActivationWorkflow.run, + args=["my-patch", False], + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await assert_task_fail_eventually(handle, message_contains=message) -async def test_workflow_patch_memoized(client: Client): - # Start a worker with the workflow unpatched and wait until halfway through. - # Need to disable workflow cache since we restart the worker and don't want - # to pay the sticky queue penalty. +async def test_workflow_declined_patch_rolls_out_to_old_worker(client: Client): task_queue = f"tq-{uuid.uuid4()}" - async with Worker( + calls: list[temporalio.worker.PatchActivationInput] = [] + async with new_worker( client, + PatchActivationRolloutWorkflow, task_queue=task_queue, - workflows=[PatchMemoizedWorkflowUnpatched], max_cached_workflows=0, + patch_activation_callback=recording_patch_activation_callback(calls, False), ): - pre_patch_handle = await client.start_workflow( - PatchMemoizedWorkflowUnpatched.run, + handle = await client.start_workflow( + PatchActivationRolloutWorkflow.run, id=f"workflow-{uuid.uuid4()}", task_queue=task_queue, ) + await assert_eq_eventually(True, lambda: has_completed_workflow_task(handle)) - # Need to wait until it has gotten halfway through - async def waiting_signal() -> bool: - return await pre_patch_handle.query( - PatchMemoizedWorkflowUnpatched.waiting_signal - ) + assert len(calls) == 1 + async with new_worker( + client, + PatchActivationOldRolloutWorkflow, + task_queue=task_queue, + max_cached_workflows=0, + ): + await handle.signal("release") + assert await handle.result() == "old" - await assert_eq_eventually(True, waiting_signal) - # Now start the worker again, but this time with a patched workflow - async with Worker( +async def test_workflow_activated_patch_ignores_declining_worker(client: Client): + task_queue = f"tq-{uuid.uuid4()}" + activated_calls: list[temporalio.worker.PatchActivationInput] = [] + declining_calls: list[temporalio.worker.PatchActivationInput] = [] + async with new_worker( client, + PatchActivationRolloutWorkflow, task_queue=task_queue, - workflows=[PatchMemoizedWorkflowPatched], max_cached_workflows=0, + patch_activation_callback=recording_patch_activation_callback( + activated_calls, True + ), ): - # Start a new workflow post patch - post_patch_handle = await client.start_workflow( - PatchMemoizedWorkflowPatched.run, + handle = await client.start_workflow( + PatchActivationRolloutWorkflow.run, id=f"workflow-{uuid.uuid4()}", task_queue=task_queue, ) + await assert_eq_eventually(True, lambda: has_completed_workflow_task(handle)) - # Need to wait until it has gotten halfway through, otherwise the post_patch workflow may never complete - async def waiting_signal() -> bool: - return await post_patch_handle.query( - PatchMemoizedWorkflowPatched.waiting_signal - ) - - await assert_eq_eventually(True, waiting_signal) - - # Send signal to both and check results - await pre_patch_handle.signal(PatchMemoizedWorkflowUnpatched.signal) - await post_patch_handle.signal(PatchMemoizedWorkflowPatched.signal) - - # Confirm expected values - assert ["some-value"] == await pre_patch_handle.result() + assert len(activated_calls) == 1 + async with new_worker( + client, + PatchActivationRolloutWorkflow, + task_queue=task_queue, + max_cached_workflows=0, + patch_activation_callback=recording_patch_activation_callback( + declining_calls, False + ), + ): + await handle.signal(PatchActivationRolloutWorkflow.release) + assert await handle.result() == "new" - assert [ - "pre-patch", - "some-value", - "post-patch", - ] == await post_patch_handle.result() + assert not declining_calls @workflow.defn @@ -2994,6 +4406,73 @@ async def test_workflow_uuid(client: Client): assert handle2_query_result == await handle2.query(UUIDWorkflow.result) +@workflow.defn +class UUID7Workflow: + def __init__(self) -> None: + self._result = "" + self._time_ms = -1 + + @workflow.run + async def run(self) -> None: + self._time_ms = workflow.time_ns() // 1_000_000 + self._result = str(workflow.uuid7()) + + @workflow.query + def result(self) -> str: + return self._result + + @workflow.query + def time_ms(self) -> int: + return self._time_ms + + +async def test_workflow_uuid7(client: Client): + task_queue = str(uuid.uuid4()) + async with new_worker( + client, UUID7Workflow, task_queue=task_queue, max_cached_workflows=0 + ): + # Get two handle UUID results. Need to disable workflow cache since we + # restart the worker and don't want to pay the sticky queue penalty. + handle1 = await client.start_workflow( + UUID7Workflow.run, id=f"workflow-{uuid.uuid4()}", task_queue=task_queue + ) + await handle1.result() + handle1_query_result = await handle1.query(UUID7Workflow.result) + + handle2 = await client.start_workflow( + UUID7Workflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + await handle2.result() + handle2_query_result = await handle2.query(UUID7Workflow.result) + + # Confirm they aren't equal to each other but they are equal to retries + # of the same query + assert handle1_query_result != handle2_query_result + assert handle1_query_result == await handle1.query(UUID7Workflow.result) + assert handle2_query_result == await handle2.query(UUID7Workflow.result) + + # Confirm RFC 9562 shape: version 7, RFC variant, and the leading 48 + # bits are the workflow time in milliseconds at generation + for handle, query_result in ( + (handle1, handle1_query_result), + (handle2, handle2_query_result), + ): + result_uuid = uuid.UUID(query_result) + assert result_uuid.version == 7 + assert result_uuid.variant == uuid.RFC_4122 + workflow_time_ms = await handle.query(UUID7Workflow.time_ms) + assert int(result_uuid) >> 80 == workflow_time_ms + + # Now confirm those results are the same even on a new worker + async with new_worker( + client, UUID7Workflow, task_queue=task_queue, max_cached_workflows=0 + ): + assert handle1_query_result == await handle1.query(UUID7Workflow.result) + assert handle2_query_result == await handle2.query(UUID7Workflow.result) + + @activity.defn(name="custom-name") class CallableClassActivity: def __init__(self, orig_field1: str) -> None: @@ -3080,6 +4559,12 @@ async def test_workflow_activity_method(client: Client): assert result == MyDataClass(field1="in worker, workflow param, in workflow") +async def test_workflow_activity_method_unbound_register(client: Client): + # Registering the method from the class instead of from an instance + with pytest.warns(UserWarning, match="is not bound to an instance"): + new_worker(client, ActivityMethodWorkflow, activities=[MethodActivity.add]) + + @workflow.defn class WaitConditionTimeoutWorkflow: def __init__(self) -> None: @@ -3344,8 +4829,15 @@ def check_condition(self) -> bool: return True -async def test_workflow_query_does_not_run_condition(client: Client): - async with new_worker(client, QueryAffectConditionWorkflow) as worker: +@pytest.mark.parametrize("single_batch", [False, True]) +async def test_workflow_query_does_not_run_condition( + client: Client, single_batch: bool +): + worker = new_worker(client, QueryAffectConditionWorkflow) + worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=single_batch + ) + async with worker: handle = await client.start_workflow( QueryAffectConditionWorkflow.run, id=f"workflow-{uuid.uuid4()}", @@ -3374,50 +4866,147 @@ def cancel_timer(self) -> None: self.timer_task.cancel() -async def test_workflow_cancel_signal_and_timer_fired_in_same_task( - client: Client, env: WorkflowEnvironment +async def test_workflow_cancel_signal_and_timer_fired_in_same_task_ts_v1(): + skip_if_time_skipping_v1_unsupported() + + # TODO(cretz): There is a bug in the Java test server, probably + # https://github.com/temporalio/sdk-java/issues/1138 where the first + # unlock-and-sleep hangs when running this test after + # test_workflow_cancel_activity. So we create a new test environment here. + async with await WorkflowEnvironment.start_time_skipping() as env: + # Start worker for 30 mins. Need to disable workflow cache since we + # restart the worker and don't want to pay the sticky queue penalty. + async with new_worker( + env.client, + CancelSignalAndTimerFiredInSameTaskWorkflow, + max_cached_workflows=0, + ) as worker: + task_queue = worker.task_queue + handle = await env.client.start_workflow( + CancelSignalAndTimerFiredInSameTaskWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=task_queue, + ) + # Wait 30 mins so the worker is waiting on timer + await env.sleep(30 * 60) + + # Listen to handler result in background so the auto-skipping works + result_task = asyncio.create_task(handle.result()) + + # Now that worker is stopped, send a signal and wait another hour to pass + # the timer + await handle.signal(CancelSignalAndTimerFiredInSameTaskWorkflow.cancel_timer) + await env.sleep(60 * 60) + + # Start worker again and wait for workflow completion + async with new_worker( + env.client, + CancelSignalAndTimerFiredInSameTaskWorkflow, + task_queue=task_queue, + max_cached_workflows=0, + ): + # This used to not complete because a signal cancelling the timer was + # not respected by the timer fire + await result_task + + +async def test_workflow_cancel_signal_and_timer_fired_in_same_task_ts_v2( + env: WorkflowEnvironment, +): + # V2 port of the test above. Uses the fixture env's V2 TS instead of + # spawning its own V1 TS server. Instead of worker-off buffering (not + # possible with V2 FF, which needs a worker to make progress), buffers + # the cancel signal server-side first, then fast-forwards past the timer + # deadline. The resulting workflow task contains both the signal-received + # event and the timer-fired event, delivered in the same task. + if not env.supports_time_skipping_v2: + pytest.skip("Requires V2 time skipping") + + async with new_worker( + env.client, + CancelSignalAndTimerFiredInSameTaskWorkflow, + max_cached_workflows=0, + ) as worker: + handle = await env.client.start_workflow( + CancelSignalAndTimerFiredInSameTaskWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + # Give the workflow a moment to process its initial task and start + # awaiting the timer. + await asyncio.sleep(0.5) + # Buffer the cancel signal server-side. It will be delivered on the + # next workflow task, which the fast-forward below triggers. + await handle.signal(CancelSignalAndTimerFiredInSameTaskWorkflow.cancel_timer) + # Fast-forward past the timer deadline. The timer-fired event lands + # in the same workflow task as the pre-buffered signal; the signal + # handler cancels the timer_task first, so the timer-fired event is + # a no-op and the workflow exits via `except asyncio.CancelledError`. + # If the ordering had been reversed (timer-fire delivered in its own + # task before the signal), the workflow would reach `assert False` + # and `handle.result()` would raise. + await env.fast_forward(handle, timedelta(hours=2)) + await handle.result() + + +@workflow.defn +class CancelWorkflowSleepTaskWorkflow: + """Like CancelSignalAndTimerFiredInSameTaskWorkflow but uses workflow.sleep.""" + + _ready = False + timer_task: asyncio.Task[None] # type: ignore[reportUninitializedInstanceVariable] + + @workflow.run + async def run(self) -> str: + self.timer_task = asyncio.create_task(workflow.sleep(60 * 60)) + self._ready = True + try: + await self.timer_task + return "timer_completed" + except asyncio.CancelledError: + return "timer_cancelled" + + @workflow.query + def ready(self) -> bool: + return self._ready + + @workflow.signal + def cancel_timer(self) -> None: + self.timer_task.cancel() + + +async def test_workflow_sleep_task_cancellation( + client: Client, ): - # This test only works when we support time skipping - if not env.supports_time_skipping: - pytest.skip("Need to skip time to validate this test") - - # TODO(cretz): There is a bug in the Java test server, probably - # https://github.com/temporalio/sdk-java/issues/1138 where the first - # unlock-and-sleep hangs when running this test after - # test_workflow_cancel_activity. So we create a new test environment here. - async with await WorkflowEnvironment.start_time_skipping() as env: - # Start worker for 30 mins. Need to disable workflow cache since we - # restart the worker and don't want to pay the sticky queue penalty. - async with new_worker( - client, CancelSignalAndTimerFiredInSameTaskWorkflow, max_cached_workflows=0 - ) as worker: - task_queue = worker.task_queue - handle = await client.start_workflow( - CancelSignalAndTimerFiredInSameTaskWorkflow.run, - id=f"workflow-{uuid.uuid4()}", - task_queue=task_queue, - ) - # Wait 30 mins so the worker is waiting on timer - await env.sleep(30 * 60) + async with new_worker( + client, + CancelWorkflowSleepTaskWorkflow, + ) as worker: + handle = await client.start_workflow( + CancelWorkflowSleepTaskWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) - # Listen to handler result in background so the auto-skipping works - result_task = asyncio.create_task(handle.result()) + async def ready() -> bool: + return await handle.query(CancelWorkflowSleepTaskWorkflow.ready) - # Now that worker is stopped, send a signal and wait another hour to pass - # the timer - await handle.signal(CancelSignalAndTimerFiredInSameTaskWorkflow.cancel_timer) - await env.sleep(60 * 60) + await assert_eq_eventually(True, ready) + await handle.signal(CancelWorkflowSleepTaskWorkflow.cancel_timer) + result = await handle.result() - # Start worker again and wait for workflow completion - async with new_worker( - client, - CancelSignalAndTimerFiredInSameTaskWorkflow, - task_queue=task_queue, - max_cached_workflows=0, - ): - # This used to not complete because a signal cancelling the timer was - # not respected by the timer fire - await result_task + assert result == "timer_cancelled" + # Verify the Temporal timer was actually cancelled on the server + resp = await client.workflow_service.get_workflow_execution_history( + GetWorkflowExecutionHistoryRequest( + namespace=client.namespace, + execution=WorkflowExecution(workflow_id=handle.id), + ) + ) + timer_canceled = any( + e.event_type == EventType.EVENT_TYPE_TIMER_CANCELED for e in resp.history.events + ) + assert timer_canceled, "Expected TimerCanceled event in history" class MyCustomError(ApplicationError): @@ -3866,6 +5455,8 @@ async def bad_query(self, bad_thing: str) -> str: workflow.set_query_handler("some-handler", lambda: "whatever") elif bad_thing == "patch": workflow.patched("some-patch") + elif bad_thing == "register_random_seed_callback": + workflow.register_random_seed_callback(lambda _seed: None) elif bad_thing == "signal_external_handle": await workflow.get_external_workflow_handle("some-id").signal("some-signal") return "should never get here" @@ -3894,31 +5485,31 @@ async def assert_bad_query(bad_thing: str) -> None: await assert_bad_query("random") await assert_bad_query("set_query_handler") await assert_bad_query("patch") + await assert_bad_query("register_random_seed_callback") await assert_bad_query("signal_external_handle") -# typing.Self only in 3.11+ -if sys.version_info >= (3, 11): +@dataclass +class AnnotatedWithSelfParam: + some_str: str - @dataclass - class AnnotatedWithSelfParam: - some_str: str - @workflow.defn - class WorkflowAnnotatedWithSelf: - @workflow.run - async def run(self: typing.Self, some_arg: AnnotatedWithSelfParam) -> str: - assert isinstance(some_arg, AnnotatedWithSelfParam) - return some_arg.some_str +@workflow.defn +class WorkflowAnnotatedWithSelf: + @workflow.run + async def run(self: typing.Self, some_arg: AnnotatedWithSelfParam) -> str: + assert isinstance(some_arg, AnnotatedWithSelfParam) + return some_arg.some_str + - async def test_workflow_annotated_with_self(client: Client): - async with new_worker(client, WorkflowAnnotatedWithSelf) as worker: - assert "foo" == await client.execute_workflow( - WorkflowAnnotatedWithSelf.run, - AnnotatedWithSelfParam(some_str="foo"), - id=f"wf-{uuid.uuid4()}", - task_queue=worker.task_queue, - ) +async def test_workflow_annotated_with_self(client: Client): + async with new_worker(client, WorkflowAnnotatedWithSelf) as worker: + assert "foo" == await client.execute_workflow( + WorkflowAnnotatedWithSelf.run, + AnnotatedWithSelfParam(some_str="foo"), + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) @activity.defn @@ -3947,7 +5538,7 @@ async def run(self) -> None: ) -async def test_workflow_custom_metrics(client: Client): +async def test_workflow_custom_metrics(client: Client, env: WorkflowEnvironment): # Run worker with default runtime which is noop meter just to confirm it # doesn't fail async with new_worker( @@ -3973,9 +5564,7 @@ async def test_workflow_custom_metrics(client: Client): assert str(err.value).startswith("Invalid value type for key") # New client with the runtime - client = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + client = await env.connect_client( runtime=runtime, ) @@ -4046,13 +5635,22 @@ async def test_workflow_custom_metrics(client: Client): }, 34, ) - # Also check Temporal metric got its prefix - prom_matcher.assert_metric_exists( - "foo_workflow_completed", {"workflow_type": "CustomMetricsWorkflow"}, 1 - ) + + # The Core completion metric can be recorded just after the workflow result + # reaches the client, so allow the Prometheus endpoint to catch up. + async def assert_workflow_completed_metric() -> None: + with urlopen(url=f"http://{prom_addr}/metrics") as f: + prom_lines = f.read().decode("utf-8").splitlines() + PromMetricMatcher(prom_lines).assert_metric_exists( + "foo_workflow_completed", + {"workflow_type": "CustomMetricsWorkflow"}, + 1, + ) + + await assert_eventually(assert_workflow_completed_metric) -async def test_workflow_buffered_metrics(client: Client): +async def test_workflow_buffered_metrics(client: Client, env: WorkflowEnvironment): # Create runtime with metric buffer buffer = MetricBuffer(10000) runtime = Runtime( @@ -4113,9 +5711,7 @@ async def test_workflow_buffered_metrics(client: Client): assert runtime_updates2[1].value == 400 # Create a new client on the runtime and execute the custom metric workflow - client = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + client = await env.connect_client( runtime=runtime, ) async with new_worker( @@ -4176,14 +5772,67 @@ async def test_workflow_buffered_metrics(client: Client): ) -async def test_workflow_metrics_other_types(client: Client): - async def do_stuff(buffer: MetricBuffer) -> None: +@pytest.mark.requires_local_server +async def test_workflow_buffered_metrics_worker_heartbeat(env: WorkflowEnvironment): + if env.supports_time_skipping: + pytest.skip("Time-skipping server does not implement ListWorkers") + + runtime = Runtime( + telemetry=TelemetryConfig(metrics=MetricBuffer(10000)), + worker_heartbeat_interval=timedelta(seconds=1), + ) + client = await env.connect_client(runtime=runtime) + async with new_worker( + client, + CustomMetricsWorkflow, + activities=[custom_metrics_activity], + plugins=[SimplePlugin("heartbeat-plugin", version="1.2.3")], + ) as worker: + await client.execute_workflow( + CustomMetricsWorkflow.run, + id=f"wf-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + async def assert_worker_heartbeat() -> None: + response = await client.workflow_service.list_workers( + temporalio.api.workflowservice.v1.ListWorkersRequest( + namespace=client.namespace, + query=f'TaskQueue = "{worker.task_queue}"', + page_size=100, + ) + ) + heartbeat = next( + ( + info.worker_heartbeat + for info in response.workers_info + if info.worker_heartbeat.task_queue == worker.task_queue + ), + None, + ) + assert heartbeat is not None + assert heartbeat.workflow_task_slots_info.total_processed_tasks > 0 + assert heartbeat.activity_task_slots_info.total_processed_tasks > 0 + assert heartbeat.workflow_task_slots_info.current_available_slots > 0 + assert heartbeat.activity_task_slots_info.current_available_slots > 0 + assert heartbeat.local_activity_slots_info.current_available_slots > 0 + assert heartbeat.workflow_poller_info.current_pollers > 0 + assert heartbeat.activity_poller_info.current_pollers > 0 + assert [(p.name, p.version) for p in heartbeat.plugins] == [ + ("heartbeat-plugin", "1.2.3") + ] + + # Do not drain the buffer: heartbeats must not depend on initializing Python attributes. + await assert_eventually(assert_worker_heartbeat) + + +async def test_workflow_metrics_other_types(env: WorkflowEnvironment): + async def do_stuff(buffer: MetricBuffer) -> float: runtime = Runtime(telemetry=TelemetryConfig(metrics=buffer)) - new_client = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + new_client = await env.connect_client( runtime=runtime, ) + start = time.monotonic() async with new_worker(new_client, HelloWorkflow) as worker: await new_client.execute_workflow( HelloWorkflow.run, @@ -4191,21 +5840,23 @@ async def do_stuff(buffer: MetricBuffer) -> None: id=f"wf-{uuid.uuid4()}", task_queue=worker.task_queue, ) + worker_seconds = time.monotonic() - start # Also, add some manual types beyond the defaults tested in other tests runtime.metric_meter.create_histogram_float("my-histogram-float").record(1.23) runtime.metric_meter.create_histogram_timedelta( "my-histogram-timedelta" ).record(timedelta(days=2, seconds=3, milliseconds=4)) runtime.metric_meter.create_gauge_float("my-gauge-float").set(4.56) + return worker_seconds # Create a buffer, do stuff, check the metrics buffer = MetricBuffer(10000) - await do_stuff(buffer) + worker_seconds = await do_stuff(buffer) updates = buffer.retrieve_updates() assert any( u.metric.name == "temporal_workflow_task_execution_latency" - # Took more than 3ms - and u.value > 3 + # Milliseconds, bounded by how long the worker ran + and 0 < u.value <= worker_seconds * 1000 and isinstance(u.value, int) and u.metric.unit == "ms" for u in updates @@ -4232,12 +5883,12 @@ async def do_stuff(buffer: MetricBuffer) -> None: # Do it again with seconds buffer = MetricBuffer(10000, duration_format=MetricBufferDurationFormat.SECONDS) - await do_stuff(buffer) + worker_seconds = await do_stuff(buffer) updates = buffer.retrieve_updates() assert any( u.metric.name == "temporal_workflow_task_execution_latency" - # Took less than 3s - and u.value < 3 + # Seconds, bounded by how long the worker ran + and 0 < u.value <= worker_seconds and isinstance(u.value, float) and u.metric.unit == "s" for u in updates @@ -4252,6 +5903,7 @@ async def do_stuff(buffer: MetricBuffer) -> None: bad_validator_fail_ct = 0 task_fail_ct = 0 +continue_as_new_update_task_fail_ct = 0 @workflow.defn @@ -4335,6 +5987,14 @@ def throws_runtime_err(self) -> None: task_fail_ct += 1 raise RuntimeError("intentional failure") + @workflow.update + def continue_as_new_for_task_failure(self) -> str: + global continue_as_new_update_task_fail_ct + if continue_as_new_update_task_fail_ct < 1: + continue_as_new_update_task_fail_ct += 1 + workflow.continue_as_new() + return "recovered after task failure" + async def test_workflow_update_handlers_happy(client: Client): async with new_worker( @@ -4451,6 +6111,57 @@ async def test_workflow_update_handlers_unhappy(client: Client): assert "Rejected" == err.value.cause.message +@workflow.defn +class ConditionEvaluationWorkflow: + def __init__(self) -> None: + self._condition_evaluations = 0 + self._done = False + + @workflow.run + async def run(self) -> None: + def condition() -> bool: + self._condition_evaluations += 1 + return self._done + + await workflow.wait_condition(condition) + + @workflow.query + def condition_evaluations(self) -> int: + return self._condition_evaluations + + @workflow.update + def finish(self, accept: bool) -> None: + self._done = accept + + @finish.validator + def finish_validator(self, accept: bool) -> None: + if not accept: + raise ApplicationError("Rejected") + + +async def test_workflow_update_rejected_does_not_evaluate_conditions(client: Client): + async with new_worker(client, ConditionEvaluationWorkflow) as worker: + handle = await client.start_workflow( + ConditionEvaluationWorkflow.run, + id=f"update-rejected-conditions-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + evaluations = await handle.query( + ConditionEvaluationWorkflow.condition_evaluations + ) + + # Neither the rejected update nor the queries can change state, so none of + # their activations may evaluate the condition + with pytest.raises(WorkflowUpdateFailedError): + await handle.execute_update(ConditionEvaluationWorkflow.finish, False) + assert evaluations == await handle.query( + ConditionEvaluationWorkflow.condition_evaluations + ) + + await handle.execute_update(ConditionEvaluationWorkflow.finish, True) + await handle.result() + + async def test_workflow_update_task_fails(client: Client): # Need to not sandbox so behavior can change based on globals async with new_worker( @@ -4477,6 +6188,82 @@ async def test_workflow_update_task_fails(client: Client): assert bad_validator_fail_ct == 2 +@workflow.defn +class AsyncUpdateValidatorDynamicWorkflow: + @workflow.run + async def run(self) -> list[str]: + def handler(_arg: int) -> int: + return 1 + + async def async_validator(_arg: int) -> None: + pass + + def sync_validator(_arg: int) -> None: + pass + + def dynamic_handler(_name: str, _args: Sequence[RawValue]) -> int: + return 3 + + # A rejected registration must not replace the existing handler + workflow.set_update_handler("named", handler, validator=sync_validator) + results = [] + for set_handler in ( + lambda: workflow.set_update_handler( + "named", lambda _arg: 2, validator=async_validator + ), + lambda: workflow.set_dynamic_update_handler( + dynamic_handler, validator=async_validator + ), + ): + try: + set_handler() + except ValueError as err: + results.append(str(err)) + results.append(str(workflow.get_update_handler("named") is handler)) + results.append(str(workflow.get_dynamic_update_handler() is None)) + return results + + +async def test_workflow_update_async_validator_dynamic_rejected(client: Client): + async with new_worker(client, AsyncUpdateValidatorDynamicWorkflow) as worker: + result = await client.execute_workflow( + AsyncUpdateValidatorDynamicWorkflow.run, + id=f"async-update-validator-dynamic-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert result == [ + "Update validator must not be an async function", + "Update validator must not be an async function", + "True", + "True", + ] + + +async def test_workflow_update_continue_as_new_fails_task(client: Client): + # Continue-as-new is a control-flow BaseException. From an update handler + # it must fail the workflow task, then retry the update rather than letting + # the detached update task escape without completing the protocol message. + global continue_as_new_update_task_fail_ct + continue_as_new_update_task_fail_ct = 0 + async with new_worker( + client, UpdateHandlersWorkflow, workflow_runner=UnsandboxedWorkflowRunner() + ) as worker: + handle = await client.start_workflow( + UpdateHandlersWorkflow.run, + id=f"update-continue-as-new-{uuid.uuid4()}", + task_queue=worker.task_queue, + task_timeout=timedelta(seconds=1), + ) + result = await asyncio.wait_for( + handle.execute_update( + UpdateHandlersWorkflow.continue_as_new_for_task_failure + ), + timeout=timedelta(seconds=10).total_seconds(), + ) + assert result == "recovered after task failure" + assert continue_as_new_update_task_fail_ct == 1 + + @workflow.defn class UpdateRespectsFirstExecutionRunIdWorkflow: def __init__(self) -> None: @@ -4494,7 +6281,7 @@ async def update(self) -> None: async def test_workflow_update_respects_first_execution_run_id( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1903" ) @@ -4747,8 +6534,6 @@ async def patched_call( class TimeoutSupportWorkflow: @workflow.run async def run(self, approach: str) -> None: - if sys.version_info < (3, 11): - raise RuntimeError("Timeout only in >= 3.11") if approach == "timeout": async with asyncio.timeout(0.2): await workflow.execute_activity( @@ -4792,8 +6577,6 @@ async def run(self, approach: str) -> None: "approach", ["timeout", "timeout_at", "wait_for", "call_later", "call_at"] ) async def test_workflow_timeout_support(client: Client, approach: str): - if sys.version_info < (3, 11): - pytest.skip("Timeout only in >= 3.11") async with new_worker( client, TimeoutSupportWorkflow, activities=[wait_cancel] ) as worker: @@ -4823,11 +6606,12 @@ async def test_workflow_timeout_support(client: Client, approach: str): @workflow.defn class BuildIDInfoWorkflow: + do_continue = False do_finish = False @workflow.run async def run(self): - await asyncio.sleep(1) + await workflow.wait_condition(lambda: self.do_continue) if workflow.info().get_current_build_id() == "1.0": await workflow.execute_activity( say_hello, "yo", schedule_to_close_timeout=timedelta(seconds=5) @@ -4838,6 +6622,10 @@ async def run(self): def get_build_id(self) -> str: return workflow.info().get_current_build_id() + @workflow.signal + async def continue_run(self): + self.do_continue = True + @workflow.signal async def finish(self): self.do_finish = True @@ -4846,7 +6634,7 @@ async def finish(self): async def test_workflow_current_build_id_appropriately_set( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Java test server does not support worker versioning") task_queue = str(uuid.uuid4()) @@ -4882,9 +6670,11 @@ async def test_workflow_current_build_id_appropriately_set( ) as worker: bid = await handle.query(BuildIDInfoWorkflow.get_build_id) assert bid == "1.0" + await handle.signal(BuildIDInfoWorkflow.continue_run) + await assert_eq_eventually( + "1.1", lambda: handle.query(BuildIDInfoWorkflow.get_build_id) + ) await handle.signal(BuildIDInfoWorkflow.finish) - bid = await handle.query(BuildIDInfoWorkflow.get_build_id) - assert bid == "1.1" await handle.result() bid = await handle.query(BuildIDInfoWorkflow.get_build_id) assert bid == "1.1" @@ -5148,7 +6938,7 @@ class Foo(pydantic.BaseModel): @workflow.defn(failure_exception_types=[pydantic.ValidationError]) class FailOnBadPydanticInputWorkflow: @workflow.run - async def run(self, params: Foo) -> None: + async def run(self, _params: Foo) -> None: pass @@ -5168,7 +6958,7 @@ async def test_workflow_fail_on_bad_pydantic_input(client: Client): @workflow.defn(failure_exception_types=[Exception]) class FailOnBadInputWorkflow: @workflow.run - async def run(self, param: str) -> None: + async def run(self, _param: str) -> None: pass @@ -5194,8 +6984,9 @@ async def run(self) -> None: await asyncio.sleep(0.1) +@pytest.mark.requires_local_server async def test_workflow_replace_worker_client(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Only testing against two real servers") # We are going to start a second ephemeral server and then replace the # client. So we will start a no-cache ticking workflow with the current @@ -5239,17 +7030,21 @@ async def any_task_completed(handle: WorkflowHandle) -> bool: # because we should have timer-done poll completions every 100ms worker.client = other_env.client # Now confirm the other workflow has started - await assert_eq_eventually(True, lambda: any_task_completed(handle2)) + await assert_eq_eventually( + True, + lambda: any_task_completed(handle2), + timeout=timedelta(seconds=30), + ) # Terminate both await handle1.terminate() await handle2.terminate() -async def test_workflow_replace_worker_client_diff_runtimes_fail(client: Client): +async def test_workflow_replace_worker_client_diff_runtimes_fail( + client: Client, env: WorkflowEnvironment +): other_runtime = Runtime(telemetry=TelemetryConfig()) - other_client = await Client.connect( - client.service_client.config.target_host, - namespace=client.namespace, + other_client = await env.connect_client( runtime=other_runtime, ) async with new_worker(client, HelloWorkflow) as worker: @@ -5260,8 +7055,35 @@ async def test_workflow_replace_worker_client_diff_runtimes_fail(client: Client) worker.client = other_client +async def test_workflow_replace_worker_client_implicit_default_runtime( + env: WorkflowEnvironment, +): + # Neither client sets a runtime, so both are on the default one + worker_client = await env.connect_client(runtime=None) + new_client = await env.connect_client(runtime=None) + async with new_worker(worker_client, HelloWorkflow) as worker: + worker.client = new_client + assert worker.client is new_client + + +async def test_workflow_replace_worker_client_implicit_default_runtime_mismatch_fail( + env: WorkflowEnvironment, +): + # No runtime means the default one, which isn't the worker's + worker_client = await env.connect_client( + runtime=Runtime(telemetry=TelemetryConfig()) + ) + default_runtime_client = await env.connect_client(runtime=None) + async with new_worker(worker_client, HelloWorkflow) as worker: + with pytest.raises( + ValueError, + match="New client is not on the same runtime as the existing client", + ): + worker.client = default_runtime_client + + @activity.defn(dynamic=True) -async def return_name_activity(args: Sequence[RawValue]) -> str: +async def return_name_activity(_args: Sequence[RawValue]) -> str: return activity.info().activity_type @@ -5412,12 +7234,6 @@ async def test_workflow_current_update(client: Client): ) -def skip_unfinished_handler_tests_in_older_python(): - # These tests reliably fail or timeout in 3.9 - if sys.version_info < (3, 10): - pytest.skip("Skipping unfinished handler tests in Python < 3.10") - - @workflow.defn class UnfinishedHandlersWarningsWorkflow: def __init__(self): @@ -5475,7 +7291,6 @@ async def test_unfinished_update_handler(client: Client): async def test_unfinished_signal_handler(client: Client): - skip_unfinished_handler_tests_in_older_python() async with new_worker(client, UnfinishedHandlersWarningsWorkflow) as worker: test = _UnfinishedHandlersWarningsTest(client, worker, "signal") await test.test_wait_all_handlers_finished_and_unfinished_handlers_warning() @@ -5620,13 +7435,13 @@ async def run( if handler_dynamism == "-dynamic-": async def my_late_registered_dynamic_update( - name: str, args: Sequence[RawValue] + _name: str, _args: Sequence[RawValue] ) -> str: await workflow.wait_condition(lambda: self.handlers_may_finish) return "my-late-registered-dynamic-update-result" async def my_late_registered_dynamic_signal( - name: str, args: Sequence[RawValue] + _name: str, _args: Sequence[RawValue] ) -> None: await workflow.wait_condition(lambda: self.handlers_may_finish) @@ -5681,15 +7496,18 @@ async def my_signal(self) -> None: await workflow.wait_condition(lambda: self.handlers_may_finish) @workflow.update(dynamic=True) - async def my_dynamic_update(self, name: str, args: Sequence[RawValue]) -> str: + async def my_dynamic_update(self, _name: str, _args: Sequence[RawValue]) -> str: await workflow.wait_condition(lambda: self.handlers_may_finish) return "my-dynamic-update-result" @workflow.signal(dynamic=True) - async def my_dynamic_signal(self, name: str, args: Sequence[RawValue]) -> None: + async def my_dynamic_signal(self, _name: str, _args: Sequence[RawValue]) -> None: await workflow.wait_condition(lambda: self.handlers_may_finish) +# Cloud cancels in-flight dynamic handlers before SDK teardown can emit the +# unfinished-handler warning this test asserts. +@pytest.mark.requires_local_server @pytest.mark.parametrize("handler_type", ["-signal-", "-update-"]) @pytest.mark.parametrize( "handler_registration", ["-late-registered-", "-not-late-registered-"] @@ -5704,7 +7522,6 @@ async def my_dynamic_signal(self, name: str, args: Sequence[RawValue]) -> None: ) async def test_unfinished_handler_on_workflow_termination( client: Client, - env: WorkflowEnvironment, handler_type: Literal["-signal-", "-update-"], handler_registration: Literal["-late-registered-", "-not-late-registered-"], handler_dynamism: Literal["-dynamic-", "-not-dynamic-"], @@ -5715,11 +7532,6 @@ async def test_unfinished_handler_on_workflow_termination( "-cancellation-", "-failure-", "-continue-as-new-" ], ): - if env.supports_time_skipping: - pytest.skip( - "Issues with update: https://github.com/temporalio/sdk-python/issues/826" - ) - skip_unfinished_handler_tests_in_older_python() await _UnfinishedHandlersOnWorkflowTerminationTest( client, handler_type, @@ -5753,7 +7565,7 @@ async def test_warning_is_issued_on_exit_with_unfinished_handler( async def _run_workflow_and_get_warning(self) -> bool: workflow_id = f"wf-{uuid.uuid4()}" update_id = "update-id" - task_queue = "tq" + task_queue = str(uuid.uuid4()) # We require a startWorkflow, an update, and maybe a cancellation request, to be delivered # in the same WFT. To do this we start the worker after they've all been accepted by the @@ -5769,9 +7581,6 @@ async def _run_workflow_and_get_warning(self) -> bool: id=workflow_id, task_queue=task_queue, ) - if self.workflow_termination_type == "-cancellation-": - await handle.cancel() - if self.handler_type == "-update-": update_method = ( "__does_not_exist__" @@ -5800,6 +7609,9 @@ async def _run_workflow_and_get_warning(self) -> bool: ) await handle.signal(signal_method) # type: ignore + if self.workflow_termination_type == "-cancellation-": + await handle.cancel() + async with new_worker( self.client, UnfinishedHandlersOnWorkflowTerminationWorkflow, @@ -5811,13 +7623,24 @@ async def _run_workflow_and_get_warning(self) -> bool: if self.handler_waiting == "-wait-all-handlers-finish-": await update_task else: - with pytest.raises(WorkflowUpdateFailedError) as err_info: + with pytest.raises( + (WorkflowUpdateFailedError, RPCError) + ) as err_info: await update_task update_err = err_info.value - assert isinstance(update_err.cause, ApplicationError) - assert ( - update_err.cause.type == "AcceptedUpdateCompletedWorkflow" - ) + if isinstance(update_err, WorkflowUpdateFailedError): + assert isinstance(update_err.cause, ApplicationError) + assert ( + update_err.cause.type + == "AcceptedUpdateCompletedWorkflow" + ) + else: + assert isinstance(update_err, RPCError) + assert update_err.status == RPCStatusCode.NOT_FOUND + assert str(update_err) in ( + "workflow execution already completed", + f"update {update_id} not found", + ) with pytest.raises(WorkflowFailureError) as err: await handle.result() @@ -5857,6 +7680,19 @@ async def run(self) -> None: await workflow.wait_condition(lambda: False) +@workflow.defn +class IDConflictContinueAsNewWorkflow: + @workflow.run + async def run(self, continue_as_new: bool) -> None: + if continue_as_new: + workflow.continue_as_new(False) + await workflow.wait_condition(lambda: False) + + @workflow.signal + def attach(self) -> None: + pass + + async def test_workflow_id_conflict(client: Client): async with new_worker(client, IDConflictWorkflow) as worker: # Start a workflow @@ -5915,6 +7751,50 @@ async def test_workflow_id_conflict(client: Client): assert (await new_handle.describe()).status == WorkflowExecutionStatus.RUNNING +@pytest.mark.parametrize("signal_with_start", [False, True]) +async def test_workflow_id_conflict_use_existing_first_execution_run_id( + client: Client, env: WorkflowEnvironment, signal_with_start: bool +): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server does not return first execution run ID from start" + ) + async with new_worker(client, IDConflictContinueAsNewWorkflow) as worker: + workflow_id = f"wf-{uuid.uuid4()}" + original_handle = await client.start_workflow( + IDConflictContinueAsNewWorkflow.run, + True, + id=workflow_id, + task_queue=worker.task_queue, + ) + first_execution_run_id = original_handle.first_execution_run_id + assert first_execution_run_id is not None + + async def current_run_id() -> str: + return (await client.get_workflow_handle(workflow_id).describe()).run_id + + async def assert_continued_as_new() -> None: + assert await current_run_id() != first_execution_run_id + + await assert_eventually(assert_continued_as_new) + current_execution_run_id = await current_run_id() + + attached_handle = await client.start_workflow( + IDConflictContinueAsNewWorkflow.run, + False, + id=workflow_id, + task_queue=worker.task_queue, + id_conflict_policy=WorkflowIDConflictPolicy.USE_EXISTING, + start_signal="attach" if signal_with_start else None, + ) + assert attached_handle.result_run_id == current_execution_run_id + assert attached_handle.first_execution_run_id == first_execution_run_id + + await attached_handle.cancel() + with pytest.raises(WorkflowFailureError): + await original_handle.result() + + @workflow.defn class UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow: def __init__(self) -> None: @@ -5984,7 +7864,6 @@ async def my_update(self) -> str: async def test_update_completion_is_honored_when_after_workflow_return_2( client: Client, - env: WorkflowEnvironment, ): async with Worker( client, @@ -6338,7 +8217,7 @@ def some_update(self): async def test_user_metadata_is_set(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/2219" ) @@ -6420,19 +8299,23 @@ async def waiting() -> bool: @workflow.defn class WorkflowSleepWorkflow: @workflow.run - async def run(self) -> None: + async def run(self) -> float: + start_time = workflow.time() await workflow.sleep(1) + return workflow.time() - start_time -async def test_workflow_sleep(client: Client): +async def test_workflow_sleep(client: Client, env: WorkflowEnvironment): async with new_worker(client, WorkflowSleepWorkflow) as worker: start_time = datetime.now() - await client.execute_workflow( + workflow_elapsed = await client.execute_workflow( WorkflowSleepWorkflow.run, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, ) - assert (datetime.now() - start_time) >= timedelta(seconds=1) + assert workflow_elapsed >= 1 + if not env.supports_time_skipping_v1: + assert (datetime.now() - start_time) >= timedelta(seconds=1) @workflow.defn @@ -6475,7 +8358,7 @@ async def make_timers(self, start: int, end: int): async def test_concurrent_sleeps_use_proper_options( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/2219" ) @@ -6512,6 +8395,54 @@ async def test_concurrent_sleeps_use_proper_options( await handle.query("__temporal_workflow_metadata") +@workflow.defn +class WaitConditionThenSleepWorkflow: + @workflow.run + async def run(self) -> None: + with workflow.create_event_group("wait").scope(): + try: + await workflow.wait_condition( + lambda: False, timeout=0.01, timeout_summary="wait_condition" + ) + except asyncio.TimeoutError: + pass + await asyncio.sleep(0.01) + with workflow.create_event_group("later").scope(): + await asyncio.sleep(0.01) + + +async def test_wait_condition_timer_options_not_used_by_later_timers( + client: Client, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip( + "Java test server: https://github.com/temporalio/sdk-java/issues/2219" + ) + async with new_worker(client, WaitConditionThenSleepWorkflow) as worker: + handle = await client.start_workflow( + WaitConditionThenSleepWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + await handle.result() + timers = [ + e + async for e in handle.fetch_history_events() + if e.event_type == EventType.EVENT_TYPE_TIMER_STARTED + ] + assert [ + PayloadConverter.default.from_payload(t.user_metadata.summary) + if t.user_metadata.HasField("summary") + else "" + for t in timers + ] == ["wait_condition", "", ""] + assert [[m.label.id for m in t.event_group_markers] for t in timers] == [ + ["wait"], + [], + ["later"], + ] + + class BadFailureConverterError(Exception): pass @@ -6654,10 +8585,10 @@ async def run_act(self): async def test_async_loop_ordering(client: Client, env: WorkflowEnvironment): - """This test mostly exists to generate histories for test_replayer_async_ordering. - See that test for more.""" + """This test mostly exists to generate PROCESS_WORKFLOW_ACTIVATION_JOBS_AS_SINGLE_BATCH + histories for test_replayer_async_ordering. See that test for more.""" - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("This test doesn't work right with time skipping for some reason") task_queue = f"tq-{uuid.uuid4()}" handle = await client.start_workflow( @@ -6667,12 +8598,16 @@ async def test_async_loop_ordering(client: Client, env: WorkflowEnvironment): ) await handle.signal(SignalsActivitiesTimersUpdatesTracingWorkflow.dosig, "before") - async with new_worker( + worker = new_worker( client, SignalsActivitiesTimersUpdatesTracingWorkflow, activities=[say_hello], task_queue=task_queue, - ): + ) + worker._set_default_workflow_logic_flag( + _SINGLE_BATCH_WORKFLOW_LOGIC_FLAG, enabled=True + ) + async with worker: await asyncio.sleep(0.2) await handle.signal(SignalsActivitiesTimersUpdatesTracingWorkflow.dosig, "1") await handle.execute_update( @@ -6716,7 +8651,7 @@ async def test_alternate_async_loop_ordering(client: Client, env: WorkflowEnviro """This test mostly exists to generate histories for test_replayer_alternate_async_ordering. See that test for more.""" - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("This test doesn't work right with time skipping for some reason") task_queue = f"tq-{uuid.uuid4()}" activity_tq = f"tq-{uuid.uuid4()}" @@ -6727,22 +8662,25 @@ async def test_alternate_async_loop_ordering(client: Client, env: WorkflowEnviro task_queue=task_queue, ) + async def wait_for_history_event(event_type: EventType.ValueType) -> None: + async for event in handle.fetch_history_events(wait_new_event=True): + if event.event_type is event_type: + return + async with new_worker( client, ActivityAndSignalsWhileWorkflowDown, activities=[say_hello], task_queue=task_queue, ): - # This sleep exists to make sure the first WFT is processed - await asyncio.sleep(0.2) + await wait_for_history_event(EventType.EVENT_TYPE_ACTIVITY_TASK_SCHEDULED) async with new_worker( client, activities=[say_hello], task_queue=activity_tq, ): - # Make sure the activity starts being processed before sending signals - await asyncio.sleep(1) + await wait_for_history_event(EventType.EVENT_TYPE_ACTIVITY_TASK_COMPLETED) await handle.signal(ActivityAndSignalsWhileWorkflowDown.dosig, "1") await handle.signal(ActivityAndSignalsWhileWorkflowDown.dosig, "2") @@ -6905,7 +8843,7 @@ async def _do_update_handler_lock_or_semaphore_test( n_updates: int, expectation: LockOrSemaphoreWorkflowConcurrencySummary, ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server: https://github.com/temporalio/sdk-java/issues/1903" ) @@ -7063,18 +9001,15 @@ async def run(self, scenario: str) -> None: elif scenario == "asyncio.wait_for": await asyncio.wait_for(asyncio.sleep(1000), timeout=0.01) elif scenario == "asyncio.timeout": - if sys.version_info >= (3, 11): - async with asyncio.timeout(0.1): - await asyncio.sleep(1000) + async with asyncio.timeout(0.1): + await asyncio.sleep(1000) else: raise RuntimeError("Unrecognized scenario") async def test_workflow_timeout_error(client: Client): async with new_worker(client, TimeoutErrorWorkflow) as worker: - scenarios = ["workflow.wait_condition", "asyncio.wait_for"] - if sys.version_info >= (3, 11): - scenarios.append("asyncio.timeout") + scenarios = ["workflow.wait_condition", "asyncio.wait_for", "asyncio.timeout"] for scenario in scenarios: with pytest.raises(WorkflowFailureError) as err: @@ -7109,6 +9044,22 @@ async def test_in_workflow_util(client: Client): ) +@workflow.defn +class LoopIsRunningWorkflow: + @workflow.run + async def run(self) -> bool: + return asyncio.get_running_loop().is_running() + + +async def test_workflow_loop_is_running(client: Client): + async with new_worker(client, LoopIsRunningWorkflow) as worker: + assert await client.execute_workflow( + LoopIsRunningWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + + deadlock_interruptible_completed = 0 @@ -7129,7 +9080,7 @@ async def test_workflow_deadlock_interruptible(client: Client): # TODO(cretz): Improve this test and other deadlock/eviction tests by # checking slot counts with Core. There are a couple of bugs where used slot # counts are off by one and slots are released before eviction (see - # https://github.com/temporalio/sdk-core/issues/894). + # https://github.com/temporalio/sdk-rust/issues/894). # This worker used to not be able to shutdown because we hung evictions on # deadlock @@ -7388,7 +9339,7 @@ async def run(self, expected_priority: int | None, stop_after_check: bool) -> st async def test_workflow_priorities(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server needs release with: https://github.com/temporalio/sdk-java/pull/2453" ) @@ -7470,7 +9421,7 @@ async def run(self, child_wf_id: str) -> temporalio.workflow.RootInfo | None: async def test_expose_root_execution(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip( "Java test server needs release with: https://github.com/temporalio/sdk-java/pull/2441" ) @@ -7514,7 +9465,7 @@ def dynamic_config(self) -> temporalio.workflow.DynamicWorkflowConfig: raise Exception("Dynamic config failure") @workflow.run - async def run(self, args: Sequence[RawValue]) -> None: + async def run(self, _args: Sequence[RawValue]) -> None: raise RuntimeError("Should never actually run") @@ -7655,38 +9606,40 @@ async def test_workflow_missing_local_activity_no_activities(client: Client): async def heartbeat_activity( catch_err: bool = True, ) -> temporalio.activity.ActivityCancellationDetails | None: - while True: - try: + try: + while True: activity.heartbeat() # If we have heartbeat details, we are on the second attempt, we have retried due to pause/unpause. if activity.info().heartbeat_details: return activity.cancellation_details() await asyncio.sleep(0.1) - except (CancelledError, asyncio.CancelledError) as err: - if not catch_err: - raise err - return activity.cancellation_details() - finally: - activity.heartbeat("finally-complete") + except (CancelledError, asyncio.CancelledError) as err: + if not catch_err: + raise err + await async_wait_for_pause_event(activity.info().activity_id) + return activity.cancellation_details() + finally: + activity.heartbeat("finally-complete") @activity.defn def sync_heartbeat_activity( catch_err: bool = True, ) -> temporalio.activity.ActivityCancellationDetails | None: - while True: - try: + try: + while True: activity.heartbeat() # If we have heartbeat details, we are on the second attempt, we have retried due to pause/unpause. if activity.info().heartbeat_details: return activity.cancellation_details() time.sleep(0.1) - except (CancelledError, asyncio.CancelledError) as err: - if not catch_err: - raise err - return activity.cancellation_details() - finally: - activity.heartbeat("finally-complete") + except (CancelledError, asyncio.CancelledError) as err: + if not catch_err: + raise err + wait_for_pause_event(activity.info().activity_id) + return activity.cancellation_details() + finally: + activity.heartbeat("finally-complete") @workflow.defn @@ -7699,6 +9652,7 @@ async def run( result.append( await workflow.execute_activity( sync_heartbeat_activity, + True, activity_id=activity_id, start_to_close_timeout=timedelta(seconds=10), heartbeat_timeout=timedelta(seconds=2), @@ -7708,6 +9662,7 @@ async def run( result.append( await workflow.execute_activity( heartbeat_activity, + True, activity_id=f"{activity_id}-2", start_to_close_timeout=timedelta(seconds=10), heartbeat_timeout=timedelta(seconds=2), @@ -7720,7 +9675,7 @@ async def run( async def test_activity_pause_cancellation_details( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Time-skipping server does not support pause API yet") with concurrent.futures.ThreadPoolExecutor() as executor: async with Worker( @@ -7799,7 +9754,7 @@ async def run( async def test_activity_pause_unpause(client: Client, env: WorkflowEnvironment): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Time-skipping server does not support pause API yet") async def check_heartbeat_details_exist( @@ -7835,7 +9790,7 @@ async def check_heartbeat_details_exist( # Wait for sync activity activity_info_1 = await assert_pending_activity_exists_eventually( - handle, test_activity_id + handle, test_activity_id, timeout=timedelta(seconds=10) ) # Assert not paused assert not activity_info_1.paused @@ -7897,7 +9852,7 @@ async def run(self, activity_id: str) -> None: async def test_external_activity_cancellation_details( client: Client, env: WorkflowEnvironment ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Time-skipping server does not support pause API yet") async with Worker( client, @@ -7968,8 +9923,10 @@ async def test_quick_activity_swallows_cancellation(client: Client): activities=[short_activity_async], activity_executor=concurrent.futures.ThreadPoolExecutor(max_workers=1), ) as worker: - for i in range(10): - wf_duration = random.uniform(5.0, 15.0) + # Keep this deterministic and bounded. The original randomized 10-iteration + # version could exceed the per-test timeout on slower CI hosts if + # cancellation was delayed a few times in a row. + for i, wf_duration in enumerate((5.0, 7.5, 10.0)): wf_handle = await client.start_workflow( QuickActivityWorkflow.run, id=f"short_activity_wf_id-{i}", @@ -8175,7 +10132,7 @@ async def create_schedule(self, input: CreateScheduleInput) -> ScheduleHandle: async def test_workflow_headers_with_codec( client: Client, env: WorkflowEnvironment, header_codec_behavior: HeaderCodecBehavior ): - if env.supports_time_skipping: + if env.supports_time_skipping_v1: pytest.skip("Time skipping server doesn't persist headers.") header_payload = Payload(data=b"bar") @@ -8278,13 +10235,14 @@ async def test_previous_run_failure(client: Client): task_queue=worker.task_queue, retry_policy=RetryPolicy( initial_interval=timedelta(milliseconds=10), + maximum_attempts=2, ), ) result = await handle.result() assert result == "Done" -class EncryptionCodec(PayloadCodec): +class FakeEncryptionCodec(PayloadCodec): def __init__( self, key_id: str = "test-key-id", @@ -8325,7 +10283,6 @@ async def decode(self, payloads: Sequence[Payload]) -> list[Payload]: return ret def encrypt(self, data: bytes) -> bytes: - nonce = os.urandom(12) return data def decrypt(self, data: bytes) -> bytes: @@ -8354,6 +10311,7 @@ async def run(self, name: str) -> str: return f"Hello from child, {name}" +@pytest.mark.requires_local_server async def test_search_attribute_codec(client: Client, env_type: str): if env_type != "local": pytest.skip("Only testing search attributes on local which disables cache") @@ -8364,7 +10322,7 @@ async def test_search_attribute_codec(client: Client, env_type: str): config = client.config() config["data_converter"] = dataclasses.replace( - temporalio.converter.default(), payload_codec=EncryptionCodec() + temporalio.converter.default(), payload_codec=FakeEncryptionCodec() ) client = Client(**config) @@ -8375,7 +10333,7 @@ async def test_search_attribute_codec(client: Client, env_type: str): SearchAttributeCodecChildWorkflow, ) as worker: # Run workflow - result = await client.execute_workflow( + await client.execute_workflow( SearchAttributeCodecParentWorkflow.run, "Temporal", id="encryption-workflow-id", @@ -8425,7 +10383,7 @@ async def test_activity_failure_with_encoded_payload_is_decoded_in_workflow( ): config = client.config() config["data_converter"] = dataclasses.replace( - temporalio.converter.default(), payload_codec=EncryptionCodec() + temporalio.converter.default(), payload_codec=FakeEncryptionCodec() ) client = Client(**config) @@ -8438,6 +10396,447 @@ async def test_activity_failure_with_encoded_payload_is_decoded_in_workflow( WorkflowWithFailingActivityAndCodec.run, id=f"workflow-{uuid.uuid4()}", task_queue=worker.task_queue, - run_timeout=timedelta(seconds=5), ) assert result == "Handled encrypted failure successfully" + + +@workflow.defn +class DisableLoggerSandbox: + @workflow.run + async def run(self): + workflow.logger.info("Running workflow") + + +class CustomLogHandler(logging.Handler): + def emit(self, record: logging.LogRecord) -> None: + import httpx # type: ignore[reportUnusedImport] # noqa + + +async def test_disable_logger_sandbox( + client: Client, +): + async def execute_with_new_worker(*, disable_sandbox: bool) -> None: + workflow.logger.unsafe_disable_sandbox(disable_sandbox) + async with new_worker( + client, + DisableLoggerSandbox, + activities=[], + ) as worker: + await client.execute_workflow( + DisableLoggerSandbox.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + run_timeout=timedelta(seconds=5), + retry_policy=RetryPolicy(maximum_attempts=1), + ) + + logger = workflow.logger.logger + handler = CustomLogHandler() + with LogHandler.apply(logger, handler): + with pytest.raises(WorkflowFailureError): + await execute_with_new_worker(disable_sandbox=False) + await execute_with_new_worker(disable_sandbox=True) + with pytest.raises(WorkflowFailureError): + await execute_with_new_worker(disable_sandbox=False) + + +@workflow.defn +class RandomSeedTestWorkflow: + def __init__(self) -> None: + self.seed_changes: list[int] = [] + self.continue_signal_received = False + + @workflow.run + async def run(self) -> dict[str, Any]: + # Get the initial seed + initial_seed = workflow.random_seed() + + # Register callback to track seed changes + workflow.register_random_seed_callback(self._on_seed_change) + + # Create a new random instance that auto-reseeds + auto_random = workflow.new_random() + + # Generate random values before waiting + auto_value1 = auto_random.randint(1, 1000000) + + # Do an activity to give a reset point + await workflow.execute_activity( + say_hello, + "Hi", + schedule_to_close_timeout=timedelta(seconds=5), + ) + + # Wait for signal to continue - this allows for workflow reset + await workflow.wait_condition(lambda: self.continue_signal_received) + + # Generate more random values after reset might have occurred + auto_value2 = auto_random.randint(1, 1000000) + + # Get final seed + final_seed = workflow.random_seed() + + return { + "initial_seed": initial_seed, + "final_seed": final_seed, + "seed_changes": self.seed_changes.copy(), + "auto_values": [auto_value1, auto_value2], + } + + def _on_seed_change(self, new_seed: int) -> None: + self.seed_changes.append(new_seed) + + @workflow.signal + def continue_workflow(self) -> None: + self.continue_signal_received = True + + +async def test_random_seed_functionality( + client: Client, worker: Worker, env: WorkflowEnvironment +): + if env.supports_time_skipping_v1: + pytest.skip("Java test server doesn't support reset") + async with new_worker( + client, RandomSeedTestWorkflow, activities=[say_hello], max_cached_workflows=0 + ) as worker: + workflow_id = f"test-random-seed-{uuid.uuid4()}" + handle = await client.start_workflow( + RandomSeedTestWorkflow.run, + id=workflow_id, + task_queue=worker.task_queue, + ) + + # Reset point: the workflow task started after the activity completed + activity_completed = False + reset_event_id = 0 + async for event in handle.fetch_history_events(wait_new_event=True): + if event.event_type is EventType.EVENT_TYPE_ACTIVITY_TASK_COMPLETED: + activity_completed = True + elif ( + activity_completed + and event.event_type is EventType.EVENT_TYPE_WORKFLOW_TASK_STARTED + ): + reset_event_id = event.event_id + elif ( + reset_event_id + and event.event_type is EventType.EVENT_TYPE_WORKFLOW_TASK_COMPLETED + ): + break + assert reset_event_id + + # Reset workflow using raw gRPC call to trigger seed change + from temporalio.api.common.v1.message_pb2 import WorkflowExecution + from temporalio.api.enums.v1.reset_pb2 import ResetReapplyType + from temporalio.api.workflowservice.v1 import ResetWorkflowExecutionRequest + + await client.workflow_service.reset_workflow_execution( + ResetWorkflowExecutionRequest( + namespace=client.namespace, + workflow_execution=WorkflowExecution( + workflow_id=handle.id, + run_id="", + ), + reason="Test seed change", + reset_reapply_type=ResetReapplyType.RESET_REAPPLY_TYPE_UNSPECIFIED, + request_id=str(uuid.uuid4()), + workflow_task_finish_event_id=reset_event_id, + ) + ) + + # Get handle to the reset workflow using the new run ID + reset_handle = client.get_workflow_handle( + workflow_id, + ) + + # Continue the workflow + await reset_handle.signal(RandomSeedTestWorkflow.continue_workflow) + + result = await reset_handle.result() + + # Verify basic functionality + assert isinstance(result["initial_seed"], int) + assert isinstance(result["final_seed"], int) + assert isinstance(result["seed_changes"], list) + assert len(result["auto_values"]) == 2 + assert len(result["seed_changes"]) == 1 + + +# Tests for task.uncancel() fix in shield loops (Python 3.11+) +# See https://github.com/temporalio/sdk-python/pull/1523 + + +@workflow.defn +class UncancelShieldActivityWorkflow: + """Workflow that cancels a shielded activity and checks for duplicate commands.""" + + def __init__(self) -> None: + self._activity_result = "" + self._cancel_count = 0 + + @workflow.run + async def run(self) -> str: + handle = workflow.start_activity( + wait_cancel, + schedule_to_close_timeout=timedelta(seconds=30), + heartbeat_timeout=timedelta(seconds=2), + cancellation_type=workflow.ActivityCancellationType.WAIT_CANCELLATION_COMPLETED, + ) + # Let activity start + await asyncio.sleep(0.01) + # Cancel the activity task + handle.cancel() + try: + self._activity_result = await handle + except ActivityError as err: + self._activity_result = f"Error: {err.cause.__class__.__name__}" + except CancelledError: + self._activity_result = "CancelledError" + return self._activity_result + + @workflow.query + def activity_result(self) -> str: + return self._activity_result + + +async def test_workflow_uncancel_shield_activity(client: Client): + """Verify that cancelling a shielded activity does not produce duplicate + cancel commands or spurious error logs due to elevated cancellation counter. + """ + log_capturer = LogCapturer() + with log_capturer.logs_captured( + temporalio.worker._workflow_instance.logger, level=logging.WARNING + ): + async with new_worker( + client, + UncancelShieldActivityWorkflow, + activities=[wait_cancel], + ) as worker: + result = await client.execute_workflow( + UncancelShieldActivityWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + # The activity should have been cancelled successfully + assert result == "Got cancelled error, cancelled? True" + + # Verify no spurious "exception in shielded future" error logs + shielded_err = log_capturer.find_log("exception in shielded future") + assert shielded_err is None, ( + f"Unexpected 'exception in shielded future' log: {shielded_err}" + ) + + +@workflow.defn +class UncancelShieldChildWorkflow: + """Workflow that starts a child workflow, cancels it via task cancel, + and returns information about the cancellation.""" + + def __init__(self) -> None: + self._ready = False + + @workflow.run + async def run(self) -> str: + # Start a child workflow via execute (which internally uses shield loops) + child_task = asyncio.create_task( + workflow.execute_child_workflow( + LongSleepWorkflow.run, + id=f"{workflow.info().workflow_id}_child", + ) + ) + self._ready = True + # Let the child start + await asyncio.sleep(0.01) + # Cancel the child task — this triggers the shield loop's CancelledError + child_task.cancel() + try: + await child_task + return "completed" + except ChildWorkflowError as err: + if isinstance(err.cause, CancelledError): + return "child_cancelled" + return f"child_error: {err.cause}" + except CancelledError: + return "task_cancelled" + + @workflow.query + def ready(self) -> bool: + return self._ready + + +async def test_workflow_uncancel_shield_child_workflow(client: Client): + """Verify that cancelling a shielded child workflow task does not produce + duplicate RequestCancelExternalWorkflowExecution commands in history. + This was the primary symptom of the bug fixed by task.uncancel(). + """ + log_capturer = LogCapturer() + with log_capturer.logs_captured( + temporalio.worker._workflow_instance.logger, level=logging.WARNING + ): + async with new_worker( + client, + UncancelShieldChildWorkflow, + LongSleepWorkflow, + ) as worker: + handle = await client.start_workflow( + UncancelShieldChildWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + result = await handle.result() + + assert result == "child_cancelled" + + # Check history for duplicate cancel commands + resp = await client.workflow_service.get_workflow_execution_history( + GetWorkflowExecutionHistoryRequest( + namespace=client.namespace, + execution=WorkflowExecution(workflow_id=handle.id), + ) + ) + cancel_events = [ + e + for e in resp.history.events + if e.event_type + == EventType.EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED + ] + # There should be exactly one cancel request, not duplicates + assert len(cancel_events) == 1, ( + f"Expected exactly 1 RequestCancelExternalWorkflowExecution event, " + f"got {len(cancel_events)}" + ) + + # Verify no spurious "exception in shielded future" error logs + shielded_err = log_capturer.find_log("exception in shielded future") + assert shielded_err is None, ( + f"Unexpected 'exception in shielded future' log: {shielded_err}" + ) + + +@workflow.defn +class UncancelShieldSignalExternalWorkflow: + """Workflow that signals an external workflow from a task that gets + cancelled, exercising the shield loop in _signal_external_workflow.""" + + def __init__(self) -> None: + self._ready = False + + @workflow.run + async def run(self, target_workflow_id: str) -> str: + # Start a signal task + signal_task = asyncio.create_task( + workflow.get_external_workflow_handle(target_workflow_id).signal( + ReturnSignalWorkflow.my_signal, "test_value" + ) + ) + self._ready = True + # The signal should complete quickly, but we test the path where + # the workflow itself gets cancelled while the signal is pending + try: + await signal_task + return "signal_sent" + except CancelledError: + return "signal_cancelled" + + @workflow.query + def ready(self) -> bool: + return self._ready + + +async def test_workflow_uncancel_shield_signal_external(client: Client): + """Verify that signal external workflow completes without spurious errors + when the shield loop properly resets the cancellation counter. + """ + log_capturer = LogCapturer() + with log_capturer.logs_captured( + temporalio.worker._workflow_instance.logger, level=logging.WARNING + ): + async with new_worker( + client, + UncancelShieldSignalExternalWorkflow, + ReturnSignalWorkflow, + ) as worker: + # Start the target workflow that waits for a signal + target_handle = await client.start_workflow( + ReturnSignalWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + # Start the signaler workflow + result = await client.execute_workflow( + UncancelShieldSignalExternalWorkflow.run, + target_handle.id, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert result == "signal_sent" + # Confirm the target received the signal + target_result = await target_handle.result() + assert target_result == "test_value" + + # Verify no spurious error logs + shielded_err = log_capturer.find_log("exception in shielded future") + assert shielded_err is None, ( + f"Unexpected 'exception in shielded future' log: {shielded_err}" + ) + + +class _SlowActivity: + def __init__(self) -> None: + self.started = asyncio.Event() + + @activity.defn(name="slow_activity") + async def slow_activity(self) -> None: + self.started.set() + await asyncio.sleep(60) + + +@workflow.defn +class _CancelInFlightActivityWorkflow: + @workflow.run + async def run(self) -> None: + await asyncio.gather( + *( + workflow.execute_activity( + "slow_activity", + start_to_close_timeout=timedelta(minutes=2), + ) + for _ in range(4) + ) + ) + + +@pytest.mark.asyncio +async def test_workflow_cancel_no_shielded_future_log( + client: Client, caplog: pytest.LogCaptureFixture +): + activity_inst = _SlowActivity() + + with caplog.at_level(logging.ERROR): + async with new_worker( + client, + _CancelInFlightActivityWorkflow, + activities=[activity_inst.slow_activity], + ) as worker: + handle = await client.start_workflow( + _CancelInFlightActivityWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + execution_timeout=timedelta(minutes=5), + ) + + # Wait for activities to start + await asyncio.wait_for(activity_inst.started.wait(), timeout=10) + + # Ignore worker startup logs + caplog.clear() + + await handle.cancel() + + try: + await handle.result() + except WorkflowFailureError as err: + assert isinstance(err.cause, CancelledError) + + assert not any( + "exception in shielded future" in record.message for record in caplog.records + ) diff --git a/tests/worker/test_workflow_deadlock.py b/tests/worker/test_workflow_deadlock.py new file mode 100644 index 0000000000..adc077e3fe --- /dev/null +++ b/tests/worker/test_workflow_deadlock.py @@ -0,0 +1,362 @@ +from __future__ import annotations + +import asyncio +import concurrent.futures +import contextvars +import threading +from collections.abc import Callable, Iterator +from typing import Any, cast +from unittest.mock import AsyncMock, Mock + +import pytest + +import temporalio.bridge.proto.workflow_activation as workflow_activation +import temporalio.bridge.proto.workflow_completion as workflow_completion +import temporalio.bridge.worker +import temporalio.client +import temporalio.common +import temporalio.converter +import temporalio.worker +import temporalio.worker._workflow +import temporalio.worker._workflow_instance +import temporalio.worker.workflow_sandbox +import temporalio.workflow +from tests.helpers import new_worker + + +@pytest.fixture +def workflow_worker() -> Iterator[temporalio.worker._workflow._WorkflowWorker]: + bridge = Mock(spec=temporalio.bridge.worker.Worker) + bridge.complete_workflow_activation = AsyncMock() + with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor: + yield temporalio.worker._workflow._WorkflowWorker( + bridge_worker=lambda: bridge, + namespace="default", + task_queue="test-deadlock", + workflows=[], + workflow_task_executor=executor, + max_concurrent_workflow_tasks=None, + workflow_runner=temporalio.worker.UnsandboxedWorkflowRunner(), + unsandboxed_workflow_runner=temporalio.worker.UnsandboxedWorkflowRunner(), + data_converter=temporalio.converter.DataConverter.default, + interceptors=[], + workflow_failure_exception_types=[], + patch_activation_callback=None, + debug_mode=False, + disable_eager_activity_execution=False, + metric_meter=temporalio.common.MetricMeter.noop, + on_eviction_hook=None, + disable_safe_eviction=False, + should_enforce_versioning_behavior=False, + assert_local_activity_valid=lambda _: None, + encode_headers=False, + max_workflow_task_external_storage_concurrency=3, + ) + + +def eviction_activation() -> workflow_activation.WorkflowActivation: + return workflow_activation.WorkflowActivation( + run_id="run", + jobs=[ + workflow_activation.WorkflowActivationJob( + remove_from_cache=workflow_activation.RemoveFromCache() + ) + ], + ) + + +@pytest.mark.parametrize( + "activation_error", + [None, RuntimeError, temporalio.worker._workflow._InterruptDeadlockError], +) +async def test_workflow_deadlock_waits_for_activation( + workflow_worker: temporalio.worker._workflow._WorkflowWorker, + monkeypatch: pytest.MonkeyPatch, + activation_error: type[BaseException] | None, +): + release = threading.Event() + activation_finished = threading.Event() + eviction_overlapped: list[bool] = [] + + def activate( + act: workflow_activation.WorkflowActivation, + ) -> workflow_completion.WorkflowActivationCompletion: + if act.jobs: + eviction_overlapped.append(not activation_finished.is_set()) + else: + try: + assert release.wait(15) + if activation_error: + raise activation_error() + finally: + activation_finished.set() + return workflow_completion.WorkflowActivationCompletion() + + instance = Mock(spec=temporalio.worker.WorkflowInstance) + instance.activate.side_effect = activate + instance.get_thread_id.return_value = None + instance.get_info.return_value = Mock(workflow_type="test") + running = temporalio.worker._workflow._RunningWorkflow(instance, "workflow") + interrupt = Mock() + monkeypatch.setattr(running, "attempt_deadlock_interruption", interrupt) + workflow_worker._running_workflows["run"] = running + workflow_worker._deadlock_timeout_seconds = 1 + eviction_task: asyncio.Task[None] | None = None + try: + await workflow_worker._handle_activation( + workflow_activation.WorkflowActivation(run_id="run") + ) + + bridge = cast(Mock, workflow_worker._bridge_worker()) + completion = bridge.complete_workflow_activation.call_args.args[0] + assert "TMPRL1101" in completion.failed.failure.message + interrupt.assert_called_once_with() + activation_future = cast(asyncio.Future, running.deadlocked_activation_task) + assert not activation_future.done() + + eviction_task = asyncio.create_task( + workflow_worker._handle_activation(eviction_activation()) + ) + await asyncio.sleep(0) + assert not eviction_task.done() + assert not eviction_overlapped + finally: + release.set() + if eviction_task: + await asyncio.wait_for(eviction_task, 10) + elif running.deadlocked_activation_task: + await asyncio.gather( + running.deadlocked_activation_task, return_exceptions=True + ) + + assert eviction_overlapped == [False] + assert "run" not in workflow_worker._running_workflows + assert bridge.complete_workflow_activation.call_count == 2 + + +async def test_workflow_deadlock_cancels_queued_activation( + workflow_worker: temporalio.worker._workflow._WorkflowWorker, + monkeypatch: pytest.MonkeyPatch, +): + release = threading.Event() + executor = workflow_worker._workflow_task_executor + instance = Mock(spec=temporalio.worker.WorkflowInstance) + instance.get_info.return_value = Mock(workflow_type="test") + instance.activate.return_value = workflow_completion.WorkflowActivationCompletion() + running = temporalio.worker._workflow._RunningWorkflow(instance, "workflow") + interrupt = Mock() + monkeypatch.setattr(running, "attempt_deadlock_interruption", interrupt) + workflow_worker._running_workflows["run"] = running + workflow_worker._deadlock_timeout_seconds = 1 + try: + # Fill both executor threads before submitting the activation. + for _ in range(2): + executor.submit(release.wait, 15) + await workflow_worker._handle_activation( + workflow_activation.WorkflowActivation(run_id="run") + ) + bridge = cast(Mock, workflow_worker._bridge_worker()) + completion = bridge.complete_workflow_activation.call_args.args[0] + assert "TMPRL1101" in completion.failed.failure.message + assert running.deadlocked_activation_task is None + interrupt.assert_not_called() + instance.activate.assert_not_called() + finally: + release.set() + if running.deadlocked_activation_task is not None: + await asyncio.gather( + running.deadlocked_activation_task, return_exceptions=True + ) + + evict = eviction_activation() + await workflow_worker._handle_activation(evict) + # Once executor capacity is available, only the eviction should run. + instance.activate.assert_called_once_with(evict) + assert "run" not in workflow_worker._running_workflows + assert bridge.complete_workflow_activation.call_count == 2 + + +@pytest.mark.parametrize("fail_first", [False, True]) +@pytest.mark.parametrize("finish_during_backoff", [False, True]) +async def test_workflow_eviction_timeout_reuses_activation( + workflow_worker: temporalio.worker._workflow._WorkflowWorker, + monkeypatch: pytest.MonkeyPatch, + caplog: pytest.LogCaptureFixture, + fail_first: bool, + finish_during_backoff: bool, +): + release = threading.Event() + calls = 0 + + def activate( + _act: workflow_activation.WorkflowActivation, + ) -> workflow_completion.WorkflowActivationCompletion: + nonlocal calls + calls += 1 + if calls == 1: + assert release.wait(15) + if fail_first: + raise RuntimeError("retry this eviction") + return workflow_completion.WorkflowActivationCompletion() + + instance = Mock(spec=temporalio.worker.WorkflowInstance) + instance.activate.side_effect = activate + running = temporalio.worker._workflow._RunningWorkflow(instance, "workflow") + workflow_worker._running_workflows["run"] = running + workflow_worker._deadlock_timeout_seconds = 1 + loop = asyncio.get_running_loop() + run_in_executor = loop.run_in_executor + eviction_futures: list[asyncio.Future] = [] + + def record_eviction( + executor: concurrent.futures.Executor | None, + func: Callable[..., Any], + *args: Any, + ) -> asyncio.Future: + future = run_in_executor(executor, func, *args) + if asyncio.current_task() is eviction_task: + eviction_futures.append(future) + return future + + backoff_started = asyncio.Event() + retry = asyncio.Event() + backoff_finished = asyncio.Event() + sleep = asyncio.sleep + + async def gate_backoff(delay: float, result: Any = None) -> Any: + if asyncio.current_task() is not eviction_task: + return await sleep(delay, result) + if not backoff_started.is_set(): + backoff_started.set() + await retry.wait() + backoff_finished.set() + return result + + monkeypatch.setattr(loop, "run_in_executor", record_eviction) + monkeypatch.setattr(asyncio, "sleep", gate_backoff) + bridge = cast(Mock, workflow_worker._bridge_worker()) + eviction_task = asyncio.create_task( + workflow_worker._handle_activation(eviction_activation()) + ) + try: + await asyncio.wait_for(backoff_started.wait(), 5) + assert "Timed out running eviction job" in caplog.text + assert len(eviction_futures) == 1 + first_eviction = eviction_futures[0] + assert not first_eviction.done() + assert workflow_worker._could_not_evict_count == 1 + bridge.complete_workflow_activation.assert_not_called() + if finish_during_backoff: + # Wait for completion without consuming its result or exception. + release.set() + done, _ = await asyncio.wait((first_eviction,), timeout=5) + assert first_eviction in done + else: + # Let the retry loop reach its next wait before releasing the worker + # thread. It must wait on the existing call, not submit another. + retry.set() + await asyncio.wait_for(backoff_finished.wait(), 5) + assert len(eviction_futures) == 1 + assert not eviction_task.done() + finally: + release.set() + retry.set() + await asyncio.wait_for(eviction_task, 10) + + assert len(eviction_futures) == (2 if fail_first else 1) + assert workflow_worker._could_not_evict_count == 0 + assert "run" not in workflow_worker._running_workflows + bridge.complete_workflow_activation.assert_called_once() + assert bridge.complete_workflow_activation.call_args.args[0].HasField("successful") + + +@temporalio.workflow.defn +class DeadlockEvictionWorkflow: + def __init__(self) -> None: + self.poked = False + + @temporalio.workflow.run + async def run(self) -> None: + await temporalio.workflow.wait_condition(lambda: self.poked) + + @temporalio.workflow.signal + def poke(self) -> None: + self.poked = True + + @temporalio.workflow.query + def state(self) -> bool: + return self.poked + + +@pytest.mark.parametrize("sandboxed", [False, True]) +async def test_workflow_eviction_after_lost_task_done_callback( + client: temporalio.client.Client, + monkeypatch: pytest.MonkeyPatch, + sandboxed: bool, +): + impl = temporalio.worker._workflow_instance._WorkflowInstanceImpl + original_call_soon = impl.call_soon + armed = False + interrupted: list[ + tuple[temporalio.worker._workflow_instance._WorkflowInstanceImpl, asyncio.Task] + ] = [] + + def call_soon( + self: temporalio.worker._workflow_instance._WorkflowInstanceImpl, + callback: Callable[..., object], + *args: Any, + context: contextvars.Context | None = None, + ) -> asyncio.Handle: + nonlocal armed + task = args[0] if args else None + if ( + armed + and getattr(callback, "__self__", None) is self._tasks + and isinstance(task, asyncio.Task) + and task.get_name().startswith("query:") + ): + armed = False + interrupted.append((self, task)) + # Reproduce #2067 without an actual asynchronous thread interrupt, + # so a regression cannot corrupt the test worker's event loop. + raise temporalio.worker._workflow._InterruptDeadlockError() + return original_call_soon(self, callback, *args, context=context) + + monkeypatch.setattr(impl, "call_soon", call_soon) + worker = new_worker( + client, + DeadlockEvictionWorkflow, + workflow_runner=( + temporalio.worker.workflow_sandbox.SandboxedWorkflowRunner() + if sandboxed + else temporalio.worker.UnsandboxedWorkflowRunner() + ), + ) + evicted = asyncio.Event() + assert worker._workflow_worker + worker._workflow_worker._on_eviction_hook = lambda _run_id, _job: evicted.set() + async with worker: + try: + handle = await client.start_workflow( + DeadlockEvictionWorkflow.run, + id=f"workflow-{worker.task_queue}", + task_queue=worker.task_queue, + ) + assert not await handle.query(DeadlockEvictionWorkflow.state) + armed = True + assert not await handle.query(DeadlockEvictionWorkflow.state) + assert len(interrupted) == 1 + instance, interrupted_task = interrupted[0] + assert interrupted_task.done() + assert interrupted_task in instance._tasks + + assert handle.result_run_id + worker._bridge_worker.request_workflow_eviction(handle.result_run_id) + await asyncio.wait_for(evicted.wait(), 10) + assert not instance._tasks + await handle.signal(DeadlockEvictionWorkflow.poke) + await asyncio.wait_for(handle.result(), 10) + finally: + # Keep shutdown safe even when the finished-task invariant regresses. + for instance, interrupted_task in interrupted: + instance._tasks.discard(interrupted_task) diff --git a/tests/worker/workflow_sandbox/test_importer.py b/tests/worker/workflow_sandbox/test_importer.py index 290ef86485..272fd97a43 100644 --- a/tests/worker/workflow_sandbox/test_importer.py +++ b/tests/worker/workflow_sandbox/test_importer.py @@ -1,32 +1,248 @@ import dataclasses +import importlib +import importlib.machinery +import select +import subprocess import sys +import textwrap +import time +import types +from typing import Any import pytest from temporalio import workflow from temporalio.worker.workflow_sandbox._importer import ( Importer, + _loaded_module_for_import, _thread_local_sys_modules, _ThreadLocalSysModules, ) from temporalio.worker.workflow_sandbox._restrictions import ( RestrictedWorkflowAccessError, RestrictionContext, + SandboxRestrictions, ) from .testmodules import restrictions +@pytest.mark.parametrize("fromlist", [None, (), ("urlparse",)]) +def test_workflow_sandbox_importer_optional_fromlist(fromlist: tuple[str, ...] | None): + importer = Importer(SandboxRestrictions.default, RestrictionContext()) + with importer.applied(): + module = importer.import_func("urllib.parse", fromlist=fromlist) + + assert module.__name__ == ("urllib.parse" if fromlist else "urllib") + + +def test_workflow_sandbox_importer_path_in_place_division(): + context = RestrictionContext() + context.is_runtime = True + with Importer(SandboxRestrictions.default, context).applied(): + from pathlib import Path + + path = original = Path("root") + path /= "child" + + assert str(path) == str(Path("root") / "child") + assert str(original) == "root" + with pytest.raises(RestrictedWorkflowAccessError): + path.exists() + + +@pytest.mark.skipif(not hasattr(select, "kevent"), reason="Requires kqueue support") +def test_workflow_sandbox_importer_subprocess_kqueue_probe(): + context = RestrictionContext() + restrictions = dataclasses.replace( + SandboxRestrictions.default, + passthrough_modules=SandboxRestrictions.passthrough_modules_with_temporal, + ) + with Importer(restrictions, context).applied(): + import select as sandboxed_select + import subprocess as sandboxed_subprocess + + kevent = getattr(sandboxed_select, "kevent") + assert type(kevent(1)) is kevent + context.is_runtime = True + with pytest.raises(RestrictedWorkflowAccessError): + getattr(sandboxed_select, "kqueue")() + with pytest.raises(RestrictedWorkflowAccessError): + sandboxed_subprocess.run(["unused"]) + + +@pytest.mark.parametrize( + ("function", "args"), + [ + ("time", ""), + ("monotonic", ""), + ("clock_gettime", "time.CLOCK_REALTIME"), + ("clock_gettime_ns", "time.CLOCK_REALTIME"), + ], + ids=["time", "monotonic", "clock_gettime", "clock_gettime_ns"], +) +def test_workflow_sandbox_importer_clock_restricted_at_runtime_only( + function: str, args: str +): + if not hasattr(time, function): + pytest.skip(f"time.{function} is not available on this platform") + call = f"time.{function}({args})" + context = RestrictionContext() + with Importer(SandboxRestrictions.default, context).applied(): + import time as sandboxed_time + + # Allowed while the workflow module is being imported + eval(call, {"time": sandboxed_time}) + context.is_runtime = True + with pytest.raises(RestrictedWorkflowAccessError) as err: + eval(call, {"time": sandboxed_time}) + assert err.value.qualified_name == f"time.{function}.__call__" + + +@pytest.mark.parametrize("first", ["host", "sandbox"]) +def test_workflow_sandbox_importer_pydantic_constraints(first: str): + pytest.importorskip("pydantic", minversion="2") + # Pydantic caches constraint classes process-wide, so each creation order + # needs a fresh process to catch constraints being ignored on either side. + result = subprocess.run( + [ + sys.executable, + "-c", + textwrap.dedent( + """ + import sys + from pydantic import BaseModel, Field, ValidationError, conint + from temporalio.worker.workflow_sandbox._importer import Importer + from temporalio.worker.workflow_sandbox._restrictions import ( + RestrictionContext, SandboxRestrictions, + ) + + def on_host(): + class Host(BaseModel): + field: int = Field(ge=0) + constrained: conint(ge=0) + return Host + + def in_sandbox(): + with Importer( + SandboxRestrictions.default, RestrictionContext() + ).applied(): + from typing import Annotated + import annotated_types + + class Sandboxed(BaseModel): + value: Annotated[int, annotated_types.Ge(1)] + return Sandboxed + + if sys.argv[1] == "host": + host, sandboxed = on_host(), in_sandbox() + else: + sandboxed, host = in_sandbox(), on_host() + + assert sandboxed(value=1).value == 1 + assert host(field=0, constrained=0).field == 0 + for model, values, field in ( + (sandboxed, {"value": 0}, "value"), + (host, {"field": -1, "constrained": 0}, "field"), + (host, {"field": 0, "constrained": -1}, "constrained"), + ): + try: + model(**values) + except ValidationError as err: + assert err.errors()[0]["loc"] == (field,) + assert err.errors()[0]["type"] == "greater_than_equal" + else: + raise AssertionError(f"Constraint ignored for {field}") + """ + ), + first, + ], + capture_output=True, + text=True, + timeout=30, + ) + assert result.returncode == 0, result.stdout + result.stderr + + def test_workflow_sandbox_importer_invalid_module(): with pytest.raises(RestrictedWorkflowAccessError) as err: with Importer(restrictions, RestrictionContext()).applied(): - import tests.worker.workflow_sandbox.testmodules.invalid_module + import tests.worker.workflow_sandbox.testmodules.invalid_module # type:ignore[reportUnusedImport] assert ( err.value.qualified_name == "tests.worker.workflow_sandbox.testmodules.invalid_module" ) +def test_workflow_sandbox_importer_repeat_import_skips_import_machinery( + monkeypatch: pytest.MonkeyPatch, +): + imported: list[str] = [] + orig_import = importlib.__import__ + + def recording_import( + name: str, + globals: Any = None, + locals: Any = None, + fromlist: Any = (), + level: int = 0, + ) -> Any: + imported.append(name) + return orig_import(name, globals, locals, fromlist, level) + + monkeypatch.setattr(importlib, "__import__", recording_import) + with Importer(restrictions, RestrictionContext()).applied(): + import tests.worker.workflow_sandbox.testmodules.passthrough_module as passthrough + import tests.worker.workflow_sandbox.testmodules.stateful_module as stateful + + assert imported + imported.clear() + + # Loaded modules are served from sys.modules without re-entering importlib + import typing + + import tests.worker.workflow_sandbox.testmodules as testmodules + import tests.worker.workflow_sandbox.testmodules.passthrough_module as passthrough_again + import tests.worker.workflow_sandbox.testmodules.stateful_module as stateful_again + + assert passthrough_again is passthrough + assert stateful_again is stateful + assert getattr(testmodules, "stateful_module") is stateful + assert typing is sys.modules["typing"] + assert imported == [] + + # Imports with a fromlist keep using importlib's full semantics. + from tests.worker.workflow_sandbox.testmodules import stateful_module + + assert stateful_module is stateful + assert imported == ["tests.worker.workflow_sandbox.testmodules"] + + +def test_loaded_module_fast_path_requires_completed_modules( + monkeypatch: pytest.MonkeyPatch, +): + top_name = "test_loaded_module_fast_path" + child_name = f"{top_name}.child" + top = types.ModuleType(top_name) + child = types.ModuleType(child_name) + top_spec = importlib.machinery.ModuleSpec(top_name, loader=None) + child_spec = importlib.machinery.ModuleSpec(child_name, loader=None) + top.__spec__ = top_spec + child.__spec__ = child_spec + monkeypatch.setitem(sys.modules, top_name, top) + monkeypatch.setitem(sys.modules, child_name, child) + + assert _loaded_module_for_import(child_name, ("child",), 0) is None + assert _loaded_module_for_import(child_name, (), 1) is None + setattr(child_spec, "_initializing", True) + assert _loaded_module_for_import(child_name, (), 0) is None + setattr(child_spec, "_initializing", False) + setattr(top_spec, "_initializing", True) + assert _loaded_module_for_import(child_name, (), 0) is None + setattr(top_spec, "_initializing", False) + assert _loaded_module_for_import(child_name, (), 0) is top + + def test_workflow_sandbox_importer_passthrough_module(): # Import outside of importer import tests.worker.workflow_sandbox.testmodules.passthrough_module as outside1 @@ -65,6 +281,48 @@ def test_workflow_sandbox_importer_passthough_context_manager(): assert id(outside) == id(inside) +def test_workflow_sandbox_importer_passthrough_from_import(): + import tests.worker.workflow_sandbox.testmodules.stateful_module as outside + + # The package is already loaded in the sandbox, like the package of a + # workflow module, so it has no attribute for the submodule yet + with Importer(restrictions, RestrictionContext()).applied(): + import tests.worker.workflow_sandbox.testmodules as package + + assert not hasattr(package, "stateful_module") + with workflow.unsafe.imports_passed_through(): + from tests.worker.workflow_sandbox.testmodules import ( + stateful_module as inside, + ) + assert id(inside) == id(outside) + + +def test_workflow_sandbox_importer_passthrough_relative_from_import(): + import tests.worker.workflow_sandbox.test_restrictions as outside + + with Importer(restrictions, RestrictionContext()).applied(): + import tests.worker.workflow_sandbox as package + + assert not hasattr(package, "test_restrictions") + with workflow.unsafe.imports_passed_through(): + from . import test_restrictions as inside + assert id(inside) == id(outside) + + +def test_workflow_sandbox_importer_passthrough_star_import(): + import tests.worker.workflow_sandbox.testmodules.stateful_module as outside + + importer = Importer(restrictions, RestrictionContext()) + package_name = "tests.worker.workflow_sandbox.testmodules" + with importer.applied(): + importer.import_func(package_name) + setattr(sys.modules[package_name], "__all__", ["stateful_module"]) + with workflow.unsafe.imports_passed_through(): + importer.import_func(package_name, fromlist=("*",)) + inside = sys.modules[f"{package_name}.stateful_module"] + assert id(inside) == id(outside) + + def test_workflow_sandbox_importer_passthrough_all_modules(): import tests.worker.workflow_sandbox.testmodules.stateful_module as outside @@ -116,8 +374,8 @@ def test_workflow_sandbox_importer_invalid_module_members(): def test_workflow_sandbox_importer_sys_module(): # Import outside to make sure this is in sys.modules - import tests.worker.workflow_sandbox.testmodules.passthrough_module - import tests.worker.workflow_sandbox.testmodules.stateful_module + import tests.worker.workflow_sandbox.testmodules.passthrough_module # type:ignore[reportUnusedImport] + import tests.worker.workflow_sandbox.testmodules.stateful_module # type:ignore[reportUnusedImport] with Importer(restrictions, RestrictionContext()).applied(): # Passthrough should be there but not non-passthrough @@ -156,3 +414,69 @@ def test_thread_local_sys_module_attrs(): norm |= {"baz": 789} thread_local |= {"baz": 789} # type: ignore assert norm.copy() == thread_local.copy() + + +@pytest.mark.skipif( + sys.version_info >= (3, 12), + reason="importlib's module lock is re-entrant from 3.12 (python/cpython#91351)", +) +def test_workflow_sandbox_importer_loaded_module_import_inside_module_lock( + monkeypatch: pytest.MonkeyPatch, tmp_path: Any +): + # Regression for the 3.10/3.11 failure behind "Failed validating workflow": + # while the sandbox loads a workflow module, importlib._bootstrap._ModuleLock + # .acquire holds _blocking_on[tid] until its finally. A GC finalizer inside + # that window imports `warnings` through builtins.__import__ (the sandbox's); + # routing that already-loaded module through importlib re-enters the lock and + # the outer acquire fails with KeyError(). Reproduced here + # deterministically by rebuilding acquire from the interpreter's own + # _bootstrap.py with the nested import placed inside the window. + import ast + import builtins + import importlib + import importlib._bootstrap as bootstrap + import pathlib + import textwrap + + text = pathlib.Path(importlib.__file__).with_name("_bootstrap.py").read_text() + acquire_src = next( + ast.get_source_segment(text, item) + for node in ast.walk(ast.parse(text)) + if isinstance(node, ast.ClassDef) and node.name == "_ModuleLock" + for item in node.body + if isinstance(item, ast.FunctionDef) and item.name == "acquire" + ) + assert acquire_src is not None + marker = "_blocking_on[tid] = self\n" + assert marker in acquire_src + + nested_done = False + + def nested_import() -> None: + nonlocal nested_done + if not nested_done: + nested_done = True + builtins.__import__("warnings", {"__builtins__": builtins}, {}, [], 0) + + namespace = dict(vars(bootstrap)) + namespace["_test_nested_import"] = nested_import + exec( + textwrap.dedent(acquire_src).replace( + marker, marker + " _test_nested_import()\n", 1 + ), + namespace, + ) + # Not in typeshed, so reach it dynamically. + module_lock = getattr(bootstrap, "_ModuleLock") + monkeypatch.setattr(module_lock, "acquire", namespace["acquire"]) + + # A module the sandbox has to load itself (not passthrough), so the outer + # import really holds importlib's lock with the sandbox importer applied. + (tmp_path / "sandbox_lock_reentry_module.py").write_text("VALUE = 1\n") + monkeypatch.syspath_prepend(str(tmp_path)) + # Production restrictions: stdlib (including warnings) is passthrough. + with Importer(SandboxRestrictions.default, RestrictionContext()).applied(): + import sandbox_lock_reentry_module # type: ignore[import-not-found] + + assert sandbox_lock_reentry_module.VALUE == 1 + assert nested_done diff --git a/tests/worker/workflow_sandbox/test_restrictions.py b/tests/worker/workflow_sandbox/test_restrictions.py index 27310c1ede..784e7e39fd 100644 --- a/tests/worker/workflow_sandbox/test_restrictions.py +++ b/tests/worker/workflow_sandbox/test_restrictions.py @@ -1,9 +1,12 @@ from __future__ import annotations +import operator import pathlib import sys +from collections.abc import Callable from dataclasses import dataclass -from typing import ClassVar, Dict, Optional +from datetime import timedelta +from typing import Any, ClassVar import pytest @@ -16,25 +19,6 @@ ) -def test_workflow_sandbox_stdlib_module_names(): - if sys.version_info[1] != 11: - pytest.skip("Test only runs on 3.11") - actual_names = ",".join(sorted(sys.stdlib_module_names)) - # Uncomment to print code for generating these - code_lines = [""] - for mod_name in sorted(sys.stdlib_module_names): - if code_lines[-1]: - code_lines[-1] += "," - if len(code_lines[-1]) > 80: - code_lines.append("") - code_lines[-1] += mod_name - code = '_stdlib_module_names = (\n "' + '"\n "'.join(code_lines) + '"\n)' - # TODO(cretz): Point releases may add modules :-( - assert actual_names == ",".join( - sys.stdlib_module_names - ), f"Expecting names as {actual_names}. In code as:\n{code}" - - def test_workflow_sandbox_restrictions_add_passthrough_modules(): updated = SandboxRestrictions.default.with_passthrough_modules("module1", "module2") assert ( @@ -95,6 +79,54 @@ def test_restricted_proxy_dunder_methods(): assert f"{restricted_path_obj}" == expected_path +def test_restricted_proxy_in_place_operations_preserve_proxy(): + restricted_list = _RestrictedProxy( + "list", + list, + RestrictionContext(), + SandboxMatcher(), + ) + values = original = restricted_list([1]) + + values += [2] + + assert type(values) is _RestrictedProxy + assert values is original + assert RestrictionContext.unwrap_if_proxied(values) == [1, 2] + + +@pytest.mark.parametrize( + "value, other, operation", + [ + ((1,), (2,), operator.iadd), + ((1,), 2, operator.imul), + (frozenset({1}), {2}, operator.ior), + ], +) +def test_restricted_proxy_in_place_operations_replace_value( + value: Any, other: Any, operation: Callable[[Any, Any], Any] +): + proxy = _RestrictedProxy("value", value, RestrictionContext(), SandboxMatcher()) + + result = operation(proxy, other) + + assert RestrictionContext.unwrap_if_proxied(result) == operation(value, other) + assert type(result) is _RestrictedProxy + assert result is not proxy + assert RestrictionContext.unwrap_if_proxied(proxy) is value + + +def test_restricted_proxy_in_place_operation_returns_primitive(): + value = _RestrictedProxy( + "timedelta", timedelta(seconds=4), RestrictionContext(), SandboxMatcher() + ) + + value /= timedelta(seconds=2) + + assert value == 2.0 + assert type(value) is float + + def test_workflow_sandbox_restricted_proxy(): obj_class = _RestrictedProxy( "RestrictableObject", @@ -146,3 +178,15 @@ def test_workflow_sandbox_restricted_proxy(): # Unfortunately, we can't intercept the type() call assert type(obj.foo) is _RestrictedProxy + + +def test_os_path_is_allowed_where_traceback_formatting_needs_it(): + # Formatting a traceback calls os.path (via linecache) from inside the + # sandbox on Python 3.14+ and on 3.13.12+, where the linecache rewrite + # (https://github.com/python/cpython/issues/133253) was backported. See + # https://github.com/python/cpython/issues/140228. + context = RestrictionContext() + context.is_runtime = True + matcher = SandboxRestrictions.invalid_module_members_default + restricted = matcher.match_access(context, "os", "path", "isabs", include_use=True) + assert restricted == (sys.version_info < (3, 13, 12)) diff --git a/tests/worker/workflow_sandbox/test_runner.py b/tests/worker/workflow_sandbox/test_runner.py index 5dc1bd02dd..73fcf27a6f 100644 --- a/tests/worker/workflow_sandbox/test_runner.py +++ b/tests/worker/workflow_sandbox/test_runner.py @@ -8,11 +8,12 @@ import sys import time import uuid +import warnings from collections.abc import Callable, Sequence from dataclasses import dataclass from datetime import date, datetime, timedelta from enum import IntEnum -from typing import Any, Dict, List, Optional, Set, Type +from typing import Any import pytest @@ -35,6 +36,9 @@ from temporalio.workflow import SandboxImportNotificationPolicy from tests.helpers import assert_eq_eventually from tests.worker.workflow_sandbox.testmodules import stateful_module +from tests.worker.workflow_sandbox.testmodules.from_import_workflow import ( + FromImportPassthroughWorkflow, +) from tests.worker.workflow_sandbox.testmodules.proto import SomeMessage global_state = ["global orig"] @@ -191,10 +195,21 @@ async def test_workflow_sandbox_restrictions(client: Client): "import uuid\nuuid.uuid4()", ] - # We can only validate this restriction prior to 3.14 because we had to exempt it due to + # We can only validate this restriction prior to 3.13.12 because we had to exempt it due to # https://github.com/python/cpython/issues/140228 - if sys.version_info < (3, 14): - invalid_code_to_check.append("import os.path\nos.path.abspath('foo')") + if sys.version_info < (3, 13, 12): + invalid_code_to_check.append("import os.path\nos.path.abspath('foo')") # type: ignore[reportUnreachable] + + # uuid7 was only added to the stdlib in 3.14 + if sys.version_info >= (3, 14): + invalid_code_to_check.append("import uuid\nuuid.uuid7()") # type: ignore[reportUnreachable] + + # clock_gettime is not available on every platform (e.g. Windows) + if hasattr(time, "clock_gettime"): + invalid_code_to_check += [ + "import time\ntime.clock_gettime(time.CLOCK_REALTIME)", + "import time\ntime.clock_gettime_ns(time.CLOCK_REALTIME)", + ] for code in invalid_code_to_check: with pytest.raises(WorkflowFailureError) as err: @@ -227,6 +242,11 @@ async def test_workflow_sandbox_restrictions(client: Client): # General library allowed calls "import datetime\ndatetime.date(2001, 1, 1)", "import uuid\nuuid.uuid5(uuid.NAMESPACE_DNS, 'example.com')", + "from pathlib import Path\n" + "path = original = Path('root')\n" + "path /= 'child'\n" + "assert str(path) == str(Path('root') / 'child')\n" + "assert str(original) == 'root'", # Other imports we want to allow "from concurrent.futures import ThreadPoolExecutor", ] @@ -467,6 +487,30 @@ async def test_workflow_sandbox_bad_asyncio(client: Client): assert "asyncio.wait()" in str(warnings[1].message) +@workflow.defn +class UnsupportedTaskGroupWorkflow: + @workflow.run + async def run(self) -> str: + async with asyncio.TaskGroup() as group: + task = group.create_task(asyncio.sleep(0, result="done")) + return task.result() + + +async def test_workflow_sandbox_task_group_warning(client: Client): + async with new_worker(client, UnsupportedTaskGroupWorkflow) as worker: + with pytest.warns( + UserWarning, + match=r"asyncio\.TaskGroup\(\) has non-deterministic task cancellation order", + ) as warnings: + result = await client.execute_workflow( + UnsupportedTaskGroupWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert result == "done" + assert len(warnings) == 1 + + def new_worker( client: Client, *workflows: type, @@ -500,7 +544,7 @@ async def execute_workflow(self, input: ExecuteWorkflowInput) -> Any: with workflow.unsafe.sandbox_import_notification_policy( workflow.SandboxImportNotificationPolicy.WARN_ON_UNINTENTIONAL_PASSTHROUGH ): - import tests.worker.workflow_sandbox.testmodules.lazy_module_interceptor # noqa: F401 + import tests.worker.workflow_sandbox.testmodules.lazy_module_interceptor # type:ignore[reportUnusedImport] # noqa: F401 return await super().execute_workflow(input) @@ -517,7 +561,7 @@ class LazyImportWorkflow: @workflow.run async def run(self) -> None: try: - import tests.worker.workflow_sandbox.testmodules.lazy_module # noqa: F401 + import tests.worker.workflow_sandbox.testmodules.lazy_module # type:ignore[reportUnusedImport] # noqa: F401 except UnintentionalPassthroughError as err: raise ApplicationError( str(err), type="UnintentionalPassthroughError" @@ -553,6 +597,27 @@ async def test_workflow_sandbox_import_default_warnings(client: Client): ) +async def test_workflow_sandbox_import_workflow_without_warning(): + restrictions = SandboxRestrictions.default.with_import_notification_policy( + SandboxImportNotificationPolicy.WARN_ON_UNINTENTIONAL_PASSTHROUGH + ) + with warnings.catch_warnings(record=True) as recorder: + warnings.simplefilter("always") + SandboxedWorkflowRunner(restrictions).prepare_workflow( + workflow._Definition.must_from_class(GlobalStateWorkflow) + ) + + actual_warnings = {str(w.message) for w in recorder} + assert ( + f"Module {GlobalStateWorkflow.__module__} was not intentionally passed through to the sandbox." + not in actual_warnings + ) + assert ( + f"Module {stateful_module.__package__} was not intentionally passed through to the sandbox." + in actual_warnings + ) + + async def test_workflow_sandbox_import_all_warnings(client: Client): restrictions = dataclasses.replace( SandboxRestrictions.default, @@ -626,7 +691,7 @@ async def run(self) -> None: SandboxImportNotificationPolicy.SILENT ): try: - import tests.worker.workflow_sandbox.testmodules.lazy_module # noqa: F401 + import tests.worker.workflow_sandbox.testmodules.lazy_module # type:ignore[reportUnusedImport] # noqa: F401 except UserWarning: raise ApplicationError("No warnings were expected") @@ -645,7 +710,8 @@ async def test_workflow_sandbox_import_suppress_warnings(client: Client): workflows=[SupressWarningsLazyImportWorkflow], workflow_runner=SandboxedWorkflowRunner(restrictions), ) as worker: - with pytest.warns(None) as recorder: # type:ignore + with warnings.catch_warnings(record=True) as recorder: + warnings.simplefilter("always") await client.execute_workflow( SupressWarningsLazyImportWorkflow.run, id=f"workflow-{uuid.uuid4()}", @@ -654,6 +720,18 @@ async def test_workflow_sandbox_import_suppress_warnings(client: Client): assert len(recorder) == 0, "Expected no warnings to be issued" +async def test_workflow_sandbox_passthrough_from_import_of_sibling_module( + client: Client, +): + async with new_worker(client, FromImportPassthroughWorkflow) as worker: + module_id = await client.execute_workflow( + FromImportPassthroughWorkflow.run, + id=f"workflow-{uuid.uuid4()}", + task_queue=worker.task_queue, + ) + assert module_id == id(stateful_module) + + def _assert_expected_warnings( recorder: pytest.WarningsRecorder, expected_warnings: set[str] ): diff --git a/tests/worker/workflow_sandbox/testmodules/from_import_workflow.py b/tests/worker/workflow_sandbox/testmodules/from_import_workflow.py new file mode 100644 index 0000000000..a314c8794d --- /dev/null +++ b/tests/worker/workflow_sandbox/testmodules/from_import_workflow.py @@ -0,0 +1,11 @@ +from temporalio import workflow + +with workflow.unsafe.imports_passed_through(): + from tests.worker.workflow_sandbox.testmodules import stateful_module + + +@workflow.defn +class FromImportPassthroughWorkflow: + @workflow.run + async def run(self) -> int: + return id(stateful_module) diff --git a/tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.py b/tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.py index 19a1c69b2b..9533d46547 100644 --- a/tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.py +++ b/tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.py @@ -5,9 +5,8 @@ from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -20,19 +19,8 @@ b'\n=worker/workflow_sandbox/testmodules/proto/proto_message.proto\x12)worker.workflow_sandbox.testmodules.proto\x1a\x1egoogle/protobuf/duration.proto"?\n\x0bSomeMessage\x12\x30\n\rsome_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Durationb\x06proto3' ) - -_SOMEMESSAGE = DESCRIPTOR.message_types_by_name["SomeMessage"] -SomeMessage = _reflection.GeneratedProtocolMessageType( - "SomeMessage", - (_message.Message,), - { - "DESCRIPTOR": _SOMEMESSAGE, - "__module__": "worker.workflow_sandbox.testmodules.proto.proto_message_pb2", - # @@protoc_insertion_point(class_scope:worker.workflow_sandbox.testmodules.proto.SomeMessage) - }, -) -_sym_db.RegisterMessage(SomeMessage) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, __name__, globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None _SOMEMESSAGE._serialized_start = 140 diff --git a/tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.pyi b/tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.pyi index db5f796b3e..3e0967e4a1 100644 --- a/tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.pyi +++ b/tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.pyi @@ -4,19 +4,15 @@ isort:skip_file """ import builtins -import sys +import typing import google.protobuf.descriptor import google.protobuf.duration_pb2 import google.protobuf.message -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing.final class SomeMessage(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -29,10 +25,10 @@ class SomeMessage(google.protobuf.message.Message): some_duration: google.protobuf.duration_pb2.Duration | None = ..., ) -> None: ... def HasField( - self, field_name: typing_extensions.Literal["some_duration", b"some_duration"] + self, field_name: typing.Literal["some_duration", b"some_duration"] ) -> builtins.bool: ... def ClearField( - self, field_name: typing_extensions.Literal["some_duration", b"some_duration"] + self, field_name: typing.Literal["some_duration", b"some_duration"] ) -> None: ... global___SomeMessage = SomeMessage diff --git a/uv.lock b/uv.lock index 3dd385b88e..a598112101 100644 --- a/uv.lock +++ b/uv.lock @@ -1,138 +1,249 @@ version = 1 revision = 3 -requires-python = ">=3.10" +requires-python = ">=3.11" resolution-markers = [ - "python_full_version >= '3.14'", - "python_full_version < '3.14'", + "python_full_version >= '3.15'", + "python_full_version == '3.14.*'", + "python_full_version == '3.13.*'", + "python_full_version == '3.12.*' and sys_platform == 'emscripten'", + "python_full_version == '3.12.*' and sys_platform != 'emscripten'", + "python_full_version < '3.12'", +] + +[options] +exclude-newer = "2026-10-30T23:59:12.555513Z" +exclude-newer-span = "P2W" + +[options.exclude-newer-package] +nexus-rpc = false +temporalio-google-genai = false +temporalio-deepagents = false +temporalio-langgraph = false +temporalio-strands-agents = false +temporalio-langsmith = false +temporalio-google-adk = false + +[[package]] +name = "aioboto3" +version = "15.5.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiobotocore", extra = ["boto3"] }, + { name = "aiofiles" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a2/01/92e9ab00f36e2899315f49eefcd5b4685fbb19016c7f19a9edf06da80bb0/aioboto3-15.5.0.tar.gz", hash = "sha256:ea8d8787d315594842fbfcf2c4dce3bac2ad61be275bc8584b2ce9a3402a6979", size = 255069, upload-time = "2025-10-30T13:37:16.122Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/3e/e8f5b665bca646d43b916763c901e00a07e40f7746c9128bdc912a089424/aioboto3-15.5.0-py3-none-any.whl", hash = "sha256:cc880c4d6a8481dd7e05da89f41c384dbd841454fc1998ae25ca9c39201437a6", size = 35913, upload-time = "2025-10-30T13:37:14.549Z" }, +] + +[[package]] +name = "aiobotocore" +version = "2.25.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohttp" }, + { name = "aioitertools" }, + { name = "botocore" }, + { name = "jmespath" }, + { name = "multidict" }, + { name = "python-dateutil" }, + { name = "wrapt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/62/94/2e4ec48cf1abb89971cb2612d86f979a6240520f0a659b53a43116d344dc/aiobotocore-2.25.1.tar.gz", hash = "sha256:ea9be739bfd7ece8864f072ec99bb9ed5c7e78ebb2b0b15f29781fbe02daedbc", size = 120560, upload-time = "2025-10-28T22:33:21.787Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/2a/d275ec4ce5cd0096665043995a7d76f5d0524853c76a3d04656de49f8808/aiobotocore-2.25.1-py3-none-any.whl", hash = "sha256:eb6daebe3cbef5b39a0bb2a97cffbe9c7cb46b2fcc399ad141f369f3c2134b1f", size = 86039, upload-time = "2025-10-28T22:33:19.949Z" }, +] + +[package.optional-dependencies] +boto3 = [ + { name = "boto3" }, +] + +[[package]] +name = "aiofiles" +version = "25.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/41/c3/534eac40372d8ee36ef40df62ec129bee4fdb5ad9706e58a29be53b2c970/aiofiles-25.1.0.tar.gz", hash = "sha256:a8d728f0a29de45dc521f18f07297428d56992a742f0cd2701ba86e44d23d5b2", size = 46354, upload-time = "2025-10-09T20:51:04.358Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bc/8a/340a1555ae33d7354dbca4faa54948d76d89a27ceef032c8c3bc661d003e/aiofiles-25.1.0-py3-none-any.whl", hash = "sha256:abe311e527c862958650f9438e859c1fa7568a141b22abcd015e120e86a85695", size = 14668, upload-time = "2025-10-09T20:51:03.174Z" }, ] [[package]] name = "aiohappyeyeballs" -version = "2.6.1" +version = "2.7.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz", hash = "sha256:c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558", size = 22760, upload-time = "2025-03-12T01:42:48.764Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ce/f4/eec0465c2f67b2664688d0240b3212d5196fd89e741df67ddb81f8d35658/aiohappyeyeballs-2.7.1.tar.gz", hash = "sha256:065665c041c42a5938ed220bdcd7230f22527fbec085e1853d2402c8a3615d9d", size = 24757, upload-time = "2026-07-01T17:11:55.501Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0f/15/5bf3b99495fb160b63f95972b81750f18f7f4e02ad051373b669d17d44f2/aiohappyeyeballs-2.6.1-py3-none-any.whl", hash = "sha256:f349ba8f4b75cb25c99c5c2d84e997e485204d2902a9597802b0371f09331fb8", size = 15265, upload-time = "2025-03-12T01:42:47.083Z" }, + { url = "https://files.pythonhosted.org/packages/71/43/1947f06babed6b3f1d7f38b0c767f52df66bfb2bc10b468c4a7de9eceff2/aiohappyeyeballs-2.7.1-py3-none-any.whl", hash = "sha256:9243213661e29250eb41368e5daa826fc017156c3b8a11440826b2e3ed376472", size = 15038, upload-time = "2026-07-01T17:11:54.055Z" }, ] [[package]] name = "aiohttp" -version = "3.13.0" +version = "3.14.5" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "aiohappyeyeballs", marker = "python_full_version < '3.14'" }, - { name = "aiosignal", marker = "python_full_version < '3.14'" }, - { name = "async-timeout", marker = "python_full_version < '3.11'" }, - { name = "attrs", marker = "python_full_version < '3.14'" }, - { name = "frozenlist", marker = "python_full_version < '3.14'" }, - { name = "multidict", marker = "python_full_version < '3.14'" }, - { name = "propcache", marker = "python_full_version < '3.14'" }, - { name = "yarl", marker = "python_full_version < '3.14'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/62/f1/8515650ac3121a9e55c7b217c60e7fae3e0134b5acfe65691781b5356929/aiohttp-3.13.0.tar.gz", hash = "sha256:378dbc57dd8cf341ce243f13fa1fa5394d68e2e02c15cd5f28eae35a70ec7f67", size = 7832348, upload-time = "2025-10-06T19:58:48.089Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/25/18/a3a9c9b7c8d400f71d1ff93c3e1520a5d53dba170f829ca9c6b2b070677b/aiohttp-3.13.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ca69ec38adf5cadcc21d0b25e2144f6a25b7db7bea7e730bac25075bc305eff0", size = 734428, upload-time = "2025-10-06T19:54:40.285Z" }, - { url = "https://files.pythonhosted.org/packages/aa/02/f1eac06d78997e015030130ccf1c7cf864a919f97d77ff27e89c82fc3186/aiohttp-3.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:240f99f88a9a6beb53ebadac79a2e3417247aa756202ed234b1dbae13d248092", size = 491939, upload-time = "2025-10-06T19:54:42.113Z" }, - { url = "https://files.pythonhosted.org/packages/e1/db/5d65af7cbe5f302e23b1ea5cfc156cd0c7738a0d2db531a3837d2754de94/aiohttp-3.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a4676b978a9711531e7cea499d4cdc0794c617a1c0579310ab46c9fdf5877702", size = 487229, upload-time = "2025-10-06T19:54:43.978Z" }, - { url = "https://files.pythonhosted.org/packages/d3/d5/56c622ad3bd57ff4adc2b701f298dcc0408735a8af998cec1c66a9ce224e/aiohttp-3.13.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:48fcdd5bc771cbbab8ccc9588b8b6447f6a30f9fe00898b1a5107098e00d6793", size = 1666118, upload-time = "2025-10-06T19:54:46.569Z" }, - { url = "https://files.pythonhosted.org/packages/44/16/db236671ec3758e3a6be6977009e74016470368012a58fea4b3799546549/aiohttp-3.13.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:eeea0cdd2f687e210c8f605f322d7b0300ba55145014a5dbe98bd4be6fff1f6c", size = 1633983, upload-time = "2025-10-06T19:54:48.244Z" }, - { url = "https://files.pythonhosted.org/packages/19/ad/d96d7d7023e7f5215b8737cad21a7637f6d9d10fbfbfef0435d0277f71a2/aiohttp-3.13.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:10b3f01d5aeb632adaaf39c5e93f040a550464a768d54c514050c635adcbb9d0", size = 1725922, upload-time = "2025-10-06T19:54:49.885Z" }, - { url = "https://files.pythonhosted.org/packages/88/d7/e8a5ba2bbd929ed587b2a8ea9390765daede2d8cd28dfae3a0773c6d3fbc/aiohttp-3.13.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a4dc0b83e25267f42ef065ea57653de4365b56d7bc4e4cfc94fabe56998f8ee6", size = 1813770, upload-time = "2025-10-06T19:54:51.648Z" }, - { url = "https://files.pythonhosted.org/packages/f9/ca/135c21e85ffeff66b80ecd8a647ca104f2e5a91c37dc86649244ddbf87ab/aiohttp-3.13.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:72714919ed9b90f030f761c20670e529c4af96c31bd000917dd0c9afd1afb731", size = 1667322, upload-time = "2025-10-06T19:54:53.668Z" }, - { url = "https://files.pythonhosted.org/packages/f6/38/348c4343052a400968dbf2051ee3dc222bdefd95af5874cf0f04cc7a8c92/aiohttp-3.13.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:564be41e85318403fdb176e9e5b3e852d528392f42f2c1d1efcbeeed481126d7", size = 1553270, upload-time = "2025-10-06T19:54:56.054Z" }, - { url = "https://files.pythonhosted.org/packages/47/89/71cbda30f0900ab16084769960c467a355d6b1db51668fbb821c4a4ad5ed/aiohttp-3.13.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:84912962071087286333f70569362e10793f73f45c48854e6859df11001eb2d3", size = 1637087, upload-time = "2025-10-06T19:54:58.548Z" }, - { url = "https://files.pythonhosted.org/packages/bf/b1/5ff5fcaecccdcd5be7ff717cbde6e630760a8130e89167c3aa05b6b57707/aiohttp-3.13.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:90b570f1a146181c3d6ae8f755de66227ded49d30d050479b5ae07710f7894c5", size = 1643443, upload-time = "2025-10-06T19:55:00.856Z" }, - { url = "https://files.pythonhosted.org/packages/87/e2/1d1f202f43c8be1956f05196159064cc05dc6842a33c1397cbb1b99610af/aiohttp-3.13.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:2d71ca30257ce756e37a6078b1dff2d9475fee13609ad831eac9a6531bea903b", size = 1695571, upload-time = "2025-10-06T19:55:03.006Z" }, - { url = "https://files.pythonhosted.org/packages/a4/b9/53c1df2991686f947a9651265757ea12c4afc29b351a249b73a0fc81dd3c/aiohttp-3.13.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:cd45eb70eca63f41bb156b7dffbe1a7760153b69892d923bdb79a74099e2ed90", size = 1539975, upload-time = "2025-10-06T19:55:04.839Z" }, - { url = "https://files.pythonhosted.org/packages/93/24/345166f9c4cd2f5cc1d2173131998ee4adab0db8729126db32a7f91ed400/aiohttp-3.13.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:5ae3a19949a27982c7425a7a5a963c1268fdbabf0be15ab59448cbcf0f992519", size = 1712866, upload-time = "2025-10-06T19:55:06.905Z" }, - { url = "https://files.pythonhosted.org/packages/09/f1/e8f70462848b74d49b3115050623ecbd697889713c2c93c96616da56b2de/aiohttp-3.13.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ea6df292013c9f050cbf3f93eee9953d6e5acd9e64a0bf4ca16404bfd7aa9bcc", size = 1654058, upload-time = "2025-10-06T19:55:08.51Z" }, - { url = "https://files.pythonhosted.org/packages/23/ba/47fd065510a8bfab5d5f6e1d97c0de672447c0a941c5021298bd7210afc3/aiohttp-3.13.0-cp310-cp310-win32.whl", hash = "sha256:3b64f22fbb6dcd5663de5ef2d847a5638646ef99112503e6f7704bdecb0d1c4d", size = 430230, upload-time = "2025-10-06T19:55:10.178Z" }, - { url = "https://files.pythonhosted.org/packages/c4/38/f5385cb79afa1f31bcaa3625a9e8d849b782edaeac09f894f46439e006a1/aiohttp-3.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:f8d877aa60d80715b2afc565f0f1aea66565824c229a2d065b31670e09fed6d7", size = 453013, upload-time = "2025-10-06T19:55:11.623Z" }, - { url = "https://files.pythonhosted.org/packages/b1/db/df80cacac46cd548a736c5535b13cc18925cf6f9f83cd128cf3839842219/aiohttp-3.13.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:99eb94e97a42367fef5fc11e28cb2362809d3e70837f6e60557816c7106e2e20", size = 741374, upload-time = "2025-10-06T19:55:13.095Z" }, - { url = "https://files.pythonhosted.org/packages/ae/f9/2d6d93fd57ab4726e18a7cdab083772eda8302d682620fbf2aef48322351/aiohttp-3.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4696665b2713021c6eba3e2b882a86013763b442577fe5d2056a42111e732eca", size = 494956, upload-time = "2025-10-06T19:55:14.687Z" }, - { url = "https://files.pythonhosted.org/packages/89/a6/e1c061b079fed04ffd6777950c82f2e8246fd08b7b3c4f56fdd47f697e5a/aiohttp-3.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3e6a38366f7f0d0f6ed7a1198055150c52fda552b107dad4785c0852ad7685d1", size = 491154, upload-time = "2025-10-06T19:55:16.661Z" }, - { url = "https://files.pythonhosted.org/packages/fe/4d/ee8913c0d2c7da37fdc98673a342b51611eaa0871682b37b8430084e35b5/aiohttp-3.13.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:aab715b1a0c37f7f11f9f1f579c6fbaa51ef569e47e3c0a4644fba46077a9409", size = 1745707, upload-time = "2025-10-06T19:55:18.376Z" }, - { url = "https://files.pythonhosted.org/packages/f9/70/26b2c97e8fa68644aec43d788940984c5f3b53a8d1468d5baaa328f809c9/aiohttp-3.13.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7972c82bed87d7bd8e374b60a6b6e816d75ba4f7c2627c2d14eed216e62738e1", size = 1702404, upload-time = "2025-10-06T19:55:20.098Z" }, - { url = "https://files.pythonhosted.org/packages/65/1e/c8aa3c293a0e8b18968b1b88e9bd8fb269eb67eb7449f504a4c3e175b159/aiohttp-3.13.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ca8313cb852af788c78d5afdea24c40172cbfff8b35e58b407467732fde20390", size = 1805519, upload-time = "2025-10-06T19:55:21.811Z" }, - { url = "https://files.pythonhosted.org/packages/51/b6/a3753fe86249eb441768658cfc00f8c4e0913b255c13be00ddb8192775e1/aiohttp-3.13.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6c333a2385d2a6298265f4b3e960590f787311b87f6b5e6e21bb8375914ef504", size = 1893904, upload-time = "2025-10-06T19:55:23.462Z" }, - { url = "https://files.pythonhosted.org/packages/51/6d/7b1e020fe1d2a2be7cf0ce5e35922f345e3507cf337faa1a6563c42065c1/aiohttp-3.13.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc6d5fc5edbfb8041d9607f6a417997fa4d02de78284d386bea7ab767b5ea4f3", size = 1745043, upload-time = "2025-10-06T19:55:25.208Z" }, - { url = "https://files.pythonhosted.org/packages/e6/df/aad5dce268f9d4f29759c3eeb5fb5995c569d76abb267468dc1075218d5b/aiohttp-3.13.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7ddedba3d0043349edc79df3dc2da49c72b06d59a45a42c1c8d987e6b8d175b8", size = 1604765, upload-time = "2025-10-06T19:55:27.157Z" }, - { url = "https://files.pythonhosted.org/packages/1c/19/a84a0e97b2da2224c8b85e1aef5cac834d07b2903c17bff1a6bdbc7041d2/aiohttp-3.13.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:23ca762140159417a6bbc959ca1927f6949711851e56f2181ddfe8d63512b5ad", size = 1721737, upload-time = "2025-10-06T19:55:28.854Z" }, - { url = "https://files.pythonhosted.org/packages/6c/61/ca6ad390128d964a08554fd63d6df5810fb5fbc7e599cb9e617f1729ae19/aiohttp-3.13.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:bfe824d6707a5dc3c5676685f624bc0c63c40d79dc0239a7fd6c034b98c25ebe", size = 1716052, upload-time = "2025-10-06T19:55:30.563Z" }, - { url = "https://files.pythonhosted.org/packages/2a/71/769e249e6625372c7d14be79b8b8c3b0592963a09793fb3d36758e60952c/aiohttp-3.13.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:3c11fa5dd2ef773a8a5a6daa40243d83b450915992eab021789498dc87acc114", size = 1783532, upload-time = "2025-10-06T19:55:32.798Z" }, - { url = "https://files.pythonhosted.org/packages/66/64/b9cd03cdbb629bc492e4a744fbe96550a8340b0cd7a0cc4a9c90cfecd8d3/aiohttp-3.13.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:00fdfe370cffede3163ba9d3f190b32c0cfc8c774f6f67395683d7b0e48cdb8a", size = 1593072, upload-time = "2025-10-06T19:55:34.686Z" }, - { url = "https://files.pythonhosted.org/packages/24/0e/87922c8cfdbd09f5e2197e9d87714a98c99c423560d44739e3af55400fe3/aiohttp-3.13.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:6475e42ef92717a678bfbf50885a682bb360a6f9c8819fb1a388d98198fdcb80", size = 1798613, upload-time = "2025-10-06T19:55:36.393Z" }, - { url = "https://files.pythonhosted.org/packages/c5/bb/a3adfe2af76e1ee9e3b5464522004b148b266bc99d7ec424ca7843d64a3c/aiohttp-3.13.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:77da5305a410910218b99f2a963092f4277d8a9c1f429c1ff1b026d1826bd0b6", size = 1737480, upload-time = "2025-10-06T19:55:38.043Z" }, - { url = "https://files.pythonhosted.org/packages/ad/53/e124dcbd64e6365602f3493fe37a11ca5b7ac0a40822a6e2bc8260cd08e0/aiohttp-3.13.0-cp311-cp311-win32.whl", hash = "sha256:2f9d9ea547618d907f2ee6670c9a951f059c5994e4b6de8dcf7d9747b420c820", size = 429824, upload-time = "2025-10-06T19:55:39.595Z" }, - { url = "https://files.pythonhosted.org/packages/3e/bd/485d98b372a2cd6998484a93ddd401ec6b6031657661c36846a10e2a1f6e/aiohttp-3.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:0f19f7798996d4458c669bd770504f710014926e9970f4729cf55853ae200469", size = 454137, upload-time = "2025-10-06T19:55:41.617Z" }, - { url = "https://files.pythonhosted.org/packages/3a/95/7e8bdfa6e79099a086d59d42589492f1fe9d29aae3cefb58b676015ce278/aiohttp-3.13.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1c272a9a18a5ecc48a7101882230046b83023bb2a662050ecb9bfcb28d9ab53a", size = 735585, upload-time = "2025-10-06T19:55:43.401Z" }, - { url = "https://files.pythonhosted.org/packages/9f/20/2f1d3ee06ee94eafe516810705219bff234d09f135d6951661661d5595ae/aiohttp-3.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:97891a23d7fd4e1afe9c2f4473e04595e4acb18e4733b910b6577b74e7e21985", size = 490613, upload-time = "2025-10-06T19:55:45.237Z" }, - { url = "https://files.pythonhosted.org/packages/74/15/ab8600ef6dc1dcd599009a81acfed2ea407037e654d32e47e344e0b08c34/aiohttp-3.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:475bd56492ce5f4cffe32b5533c6533ee0c406d1d0e6924879f83adcf51da0ae", size = 489750, upload-time = "2025-10-06T19:55:46.937Z" }, - { url = "https://files.pythonhosted.org/packages/33/59/752640c2b86ca987fe5703a01733b00d375e6cd2392bc7574489934e64e5/aiohttp-3.13.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c32ada0abb4bc94c30be2b681c42f058ab104d048da6f0148280a51ce98add8c", size = 1736812, upload-time = "2025-10-06T19:55:48.917Z" }, - { url = "https://files.pythonhosted.org/packages/3d/c6/dd6b86ddb852a7fdbcdc7a45b6bdc80178aef713c08279afcaee7a5a9f07/aiohttp-3.13.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4af1f8877ca46ecdd0bc0d4a6b66d4b2bddc84a79e2e8366bc0d5308e76bceb8", size = 1698535, upload-time = "2025-10-06T19:55:50.75Z" }, - { url = "https://files.pythonhosted.org/packages/33/e2/27c92d205b9e8cee7661670e8e9f187931b71e26d42796b153d2a0ba6949/aiohttp-3.13.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e04ab827ec4f775817736b20cdc8350f40327f9b598dec4e18c9ffdcbea88a93", size = 1766573, upload-time = "2025-10-06T19:55:53.106Z" }, - { url = "https://files.pythonhosted.org/packages/df/6a/1fc1ad71d130a30f7a207d8d958a41224c29b834463b5185efb2dbff6ad4/aiohttp-3.13.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a6d9487b9471ec36b0faedf52228cd732e89be0a2bbd649af890b5e2ce422353", size = 1865229, upload-time = "2025-10-06T19:55:55.01Z" }, - { url = "https://files.pythonhosted.org/packages/14/51/d0c1701a79fcb0109cff5304da16226581569b89a282d8e7f1549a7e3ec0/aiohttp-3.13.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2e66c57416352f36bf98f6641ddadd47c93740a22af7150d3e9a1ef6e983f9a8", size = 1750379, upload-time = "2025-10-06T19:55:57.219Z" }, - { url = "https://files.pythonhosted.org/packages/ae/3d/2ec4b934f85856de1c0c18e90adc8902adadbfac2b3c0b831bfeb7214fc8/aiohttp-3.13.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:469167d5372f5bb3aedff4fc53035d593884fff2617a75317740e885acd48b04", size = 1560798, upload-time = "2025-10-06T19:55:58.888Z" }, - { url = "https://files.pythonhosted.org/packages/38/56/e23d9c3e13006e599fdce3851517c70279e177871e3e567d22cf3baf5d6c/aiohttp-3.13.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a9f3546b503975a69b547c9fd1582cad10ede1ce6f3e313a2f547c73a3d7814f", size = 1697552, upload-time = "2025-10-06T19:56:01.172Z" }, - { url = "https://files.pythonhosted.org/packages/56/cb/caa32c2ccaeca0a3dc39129079fd2ad02f9406c3a5f7924340435b87d4cd/aiohttp-3.13.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:6b4174fcec98601f0cfdf308ee29a6ae53c55f14359e848dab4e94009112ee7d", size = 1718609, upload-time = "2025-10-06T19:56:03.102Z" }, - { url = "https://files.pythonhosted.org/packages/fb/c0/5911856fef9e40fd1ccbb8c54a90116875d5753a92c1cac66ce2059b390d/aiohttp-3.13.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:a533873a7a4ec2270fb362ee5a0d3b98752e4e1dc9042b257cd54545a96bd8ed", size = 1735887, upload-time = "2025-10-06T19:56:04.841Z" }, - { url = "https://files.pythonhosted.org/packages/0e/48/8d6f4757a24c02f0a454c043556593a00645d10583859f7156db44d8b7d3/aiohttp-3.13.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:ce887c5e54411d607ee0959cac15bb31d506d86a9bcaddf0b7e9d63325a7a802", size = 1553079, upload-time = "2025-10-06T19:56:07.197Z" }, - { url = "https://files.pythonhosted.org/packages/39/fa/e82c9445e40b50e46770702b5b6ca2f767966d53e1a5eef03583ceac6df6/aiohttp-3.13.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d871f6a30d43e32fc9252dc7b9febe1a042b3ff3908aa83868d7cf7c9579a59b", size = 1762750, upload-time = "2025-10-06T19:56:09.376Z" }, - { url = "https://files.pythonhosted.org/packages/3d/e6/9d30554e7f1e700bfeae4ab6b153d5dc7441606a9ec5e929288fa93a1477/aiohttp-3.13.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:222c828243b4789d79a706a876910f656fad4381661691220ba57b2ab4547865", size = 1717461, upload-time = "2025-10-06T19:56:11.551Z" }, - { url = "https://files.pythonhosted.org/packages/1f/e5/29cca547990a59ea54f0674fc01de98519fc628cfceeab6175711750eca7/aiohttp-3.13.0-cp312-cp312-win32.whl", hash = "sha256:682d2e434ff2f1108314ff7f056ce44e457f12dbed0249b24e106e385cf154b9", size = 424633, upload-time = "2025-10-06T19:56:13.316Z" }, - { url = "https://files.pythonhosted.org/packages/8b/68/46dd042d7bc62eab30bafdb8569f55ef125c3a88bb174270324224f8df56/aiohttp-3.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:0a2be20eb23888df130214b91c262a90e2de1553d6fb7de9e9010cec994c0ff2", size = 451401, upload-time = "2025-10-06T19:56:15.188Z" }, - { url = "https://files.pythonhosted.org/packages/86/2c/ac53efdc9c10e41399acc2395af98f835b86d0141d5c3820857eb9f6a14a/aiohttp-3.13.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:00243e51f16f6ec0fb021659d4af92f675f3cf9f9b39efd142aa3ad641d8d1e6", size = 730090, upload-time = "2025-10-06T19:56:16.858Z" }, - { url = "https://files.pythonhosted.org/packages/13/18/1ac95683e1c1d48ef4503965c96f5401618a04c139edae12e200392daae8/aiohttp-3.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:059978d2fddc462e9211362cbc8446747ecd930537fa559d3d25c256f032ff54", size = 488041, upload-time = "2025-10-06T19:56:18.659Z" }, - { url = "https://files.pythonhosted.org/packages/fd/79/ef0d477c771a642d1a881b92d226314c43d3c74bc674c93e12e679397a97/aiohttp-3.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:564b36512a7da3b386143c611867e3f7cfb249300a1bf60889bd9985da67ab77", size = 486989, upload-time = "2025-10-06T19:56:20.371Z" }, - { url = "https://files.pythonhosted.org/packages/37/b4/0e440481a0e77a551d6c5dcab5d11f1ff6b2b2ddb8dedc24f54f5caad732/aiohttp-3.13.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4aa995b9156ae499393d949a456a7ab0b994a8241a96db73a3b73c7a090eff6a", size = 1718331, upload-time = "2025-10-06T19:56:22.188Z" }, - { url = "https://files.pythonhosted.org/packages/e6/59/76c421cc4a75bb1aceadb92f20ee6f05a990aa6960c64b59e8e0d340e3f5/aiohttp-3.13.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:55ca0e95a3905f62f00900255ed807c580775174252999286f283e646d675a49", size = 1686263, upload-time = "2025-10-06T19:56:24.393Z" }, - { url = "https://files.pythonhosted.org/packages/ec/ac/5095f12a79c7775f402cfc3e83651b6e0a92ade10ddf7f2c78c4fed79f71/aiohttp-3.13.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:49ce7525853a981fc35d380aa2353536a01a9ec1b30979ea4e35966316cace7e", size = 1754265, upload-time = "2025-10-06T19:56:26.365Z" }, - { url = "https://files.pythonhosted.org/packages/05/d7/a48e4989bd76cc70600c505bbdd0d90ca1ad7f9053eceeb9dbcf9345a9ec/aiohttp-3.13.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2117be9883501eaf95503bd313eb4c7a23d567edd44014ba15835a1e9ec6d852", size = 1856486, upload-time = "2025-10-06T19:56:28.438Z" }, - { url = "https://files.pythonhosted.org/packages/1e/02/45b388b49e37933f316e1fb39c0de6fb1d77384b0c8f4cf6af5f2cbe3ea6/aiohttp-3.13.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d169c47e40c911f728439da853b6fd06da83761012e6e76f11cb62cddae7282b", size = 1737545, upload-time = "2025-10-06T19:56:30.688Z" }, - { url = "https://files.pythonhosted.org/packages/6c/a7/4fde058f1605c34a219348a83a99f14724cc64e68a42480fc03cf40f9ea3/aiohttp-3.13.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:703ad3f742fc81e543638a7bebddd35acadaa0004a5e00535e795f4b6f2c25ca", size = 1552958, upload-time = "2025-10-06T19:56:32.528Z" }, - { url = "https://files.pythonhosted.org/packages/d1/12/0bac4d29231981e3aa234e88d1931f6ba38135ff4c2cf3afbb7895527630/aiohttp-3.13.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5bf635c3476f4119b940cc8d94ad454cbe0c377e61b4527f0192aabeac1e9370", size = 1681166, upload-time = "2025-10-06T19:56:34.81Z" }, - { url = "https://files.pythonhosted.org/packages/71/95/b829eb5f8ac1ca1d8085bb8df614c8acf3ff32e23ad5ad1173c7c9761daa/aiohttp-3.13.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:cfe6285ef99e7ee51cef20609be2bc1dd0e8446462b71c9db8bb296ba632810a", size = 1710516, upload-time = "2025-10-06T19:56:36.787Z" }, - { url = "https://files.pythonhosted.org/packages/47/6d/15ccf4ef3c254d899f62580e0c7fc717014f4d14a3ac31771e505d2c736c/aiohttp-3.13.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:34d8af6391c5f2e69749d7f037b614b8c5c42093c251f336bdbfa4b03c57d6c4", size = 1731354, upload-time = "2025-10-06T19:56:38.659Z" }, - { url = "https://files.pythonhosted.org/packages/46/6a/8acf6c57e03b6fdcc8b4c06392e66abaff3213ea275e41db3edb20738d91/aiohttp-3.13.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:12f5d820fadc5848d4559ea838aef733cf37ed2a1103bba148ac2f5547c14c29", size = 1548040, upload-time = "2025-10-06T19:56:40.578Z" }, - { url = "https://files.pythonhosted.org/packages/75/7d/fbfd59ab2a83fe2578ce79ac3db49727b81e9f4c3376217ad09c03c6d279/aiohttp-3.13.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0f1338b61ea66f4757a0544ed8a02ccbf60e38d9cfb3225888888dd4475ebb96", size = 1756031, upload-time = "2025-10-06T19:56:42.492Z" }, - { url = "https://files.pythonhosted.org/packages/99/e7/cc9f0fdf06cab3ca61e6b62bff9a4b978b8ca736e9d76ddf54365673ab19/aiohttp-3.13.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:582770f82513419512da096e8df21ca44f86a2e56e25dc93c5ab4df0fe065bf0", size = 1714933, upload-time = "2025-10-06T19:56:45.542Z" }, - { url = "https://files.pythonhosted.org/packages/db/43/7abbe1de94748a58a71881163ee280fd3217db36e8344d109f63638fe16a/aiohttp-3.13.0-cp313-cp313-win32.whl", hash = "sha256:3194b8cab8dbc882f37c13ef1262e0a3d62064fa97533d3aa124771f7bf1ecee", size = 423799, upload-time = "2025-10-06T19:56:47.779Z" }, - { url = "https://files.pythonhosted.org/packages/c9/58/afab7f2b9e7df88c995995172eb78cae8a3d5a62d5681abaade86b3f0089/aiohttp-3.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:7897298b3eedc790257fef8a6ec582ca04e9dbe568ba4a9a890913b925b8ea21", size = 450138, upload-time = "2025-10-06T19:56:49.49Z" }, - { url = "https://files.pythonhosted.org/packages/fe/c1/93bb1e35cd0c4665bb422b1ca3d87b588f4bca2656bbe9292b963d5b76a9/aiohttp-3.13.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:c417f8c2e1137775569297c584a8a7144e5d1237789eae56af4faf1894a0b861", size = 733187, upload-time = "2025-10-06T19:56:51.385Z" }, - { url = "https://files.pythonhosted.org/packages/5e/36/2d50eba91992d3fe7a6452506ccdab45d03685ee8d8acaa5b289384a7d4c/aiohttp-3.13.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:f84b53326abf8e56ebc28a35cebf4a0f396a13a76300f500ab11fe0573bf0b52", size = 488684, upload-time = "2025-10-06T19:56:53.25Z" }, - { url = "https://files.pythonhosted.org/packages/82/93/fa4b1d5ecdc7805bdf0815ef00257db4632ccf0a8bffd44f9fc4657b1677/aiohttp-3.13.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:990a53b9d6a30b2878789e490758e568b12b4a7fb2527d0c89deb9650b0e5813", size = 489255, upload-time = "2025-10-06T19:56:55.136Z" }, - { url = "https://files.pythonhosted.org/packages/05/0f/85241f0d158da5e24e8ac9d50c0849ed24f882cafc53dc95749ef85eef09/aiohttp-3.13.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c811612711e01b901e18964b3e5dec0d35525150f5f3f85d0aee2935f059910a", size = 1715914, upload-time = "2025-10-06T19:56:57.286Z" }, - { url = "https://files.pythonhosted.org/packages/ab/fc/c755590d6f6d2b5d1565c72d6ee658d3c30ec61acb18964d1e9bf991d9b5/aiohttp-3.13.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ee433e594d7948e760b5c2a78cc06ac219df33b0848793cf9513d486a9f90a52", size = 1665171, upload-time = "2025-10-06T19:56:59.688Z" }, - { url = "https://files.pythonhosted.org/packages/3a/de/caa61e213ff546b8815aef5e931d7eae1dbe8c840a3f11ec5aa41c5ae462/aiohttp-3.13.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:19bb08e56f57c215e9572cd65cb6f8097804412c54081d933997ddde3e5ac579", size = 1755124, upload-time = "2025-10-06T19:57:02.69Z" }, - { url = "https://files.pythonhosted.org/packages/fb/b7/40c3219dd2691aa35cf889b4fbb0c00e48a19092928707044bfe92068e01/aiohttp-3.13.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f27b7488144eb5dd9151cf839b195edd1569629d90ace4c5b6b18e4e75d1e63a", size = 1835949, upload-time = "2025-10-06T19:57:05.251Z" }, - { url = "https://files.pythonhosted.org/packages/57/e8/66e3c32841fc0e26a09539c377aa0f3bbf6deac1957ac5182cf276c5719c/aiohttp-3.13.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d812838c109757a11354a161c95708ae4199c4fd4d82b90959b20914c1d097f6", size = 1714276, upload-time = "2025-10-06T19:57:07.41Z" }, - { url = "https://files.pythonhosted.org/packages/6b/a5/c68e5b46ff0410fe3abfa508651b09372428f27036138beacf4ff6b7cb8c/aiohttp-3.13.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7c20db99da682f9180fa5195c90b80b159632fb611e8dbccdd99ba0be0970620", size = 1545929, upload-time = "2025-10-06T19:57:09.336Z" }, - { url = "https://files.pythonhosted.org/packages/7a/a6/4c97dc27f9935c0c0aa6e3e10e5b4548823ab5d056636bde374fcd297256/aiohttp-3.13.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:cf8b0870047900eb1f17f453b4b3953b8ffbf203ef56c2f346780ff930a4d430", size = 1679988, upload-time = "2025-10-06T19:57:11.367Z" }, - { url = "https://files.pythonhosted.org/packages/8e/1b/11f9c52fd72b786a47e796e6794883417280cdca8eb1032d8d0939928dfa/aiohttp-3.13.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:5b8a5557d5af3f4e3add52a58c4cf2b8e6e59fc56b261768866f5337872d596d", size = 1678031, upload-time = "2025-10-06T19:57:13.357Z" }, - { url = "https://files.pythonhosted.org/packages/ea/eb/948903d40505f3a25e53e051488d2714ded3afac1f961df135f2936680f9/aiohttp-3.13.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:052bcdd80c1c54b8a18a9ea0cd5e36f473dc8e38d51b804cea34841f677a9971", size = 1726184, upload-time = "2025-10-06T19:57:15.478Z" }, - { url = "https://files.pythonhosted.org/packages/44/14/c8ced38c7dfe80804dec17a671963ccf3cb282f12700ec70b1f689d8de7d/aiohttp-3.13.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:76484ba17b2832776581b7ab466d094e48eba74cb65a60aea20154dae485e8bd", size = 1542344, upload-time = "2025-10-06T19:57:17.611Z" }, - { url = "https://files.pythonhosted.org/packages/a4/6e/f2e6bff550a51fd7c45fdab116a1dab7cc502e5d942956f10fc5c626bb15/aiohttp-3.13.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:62d8a0adcdaf62ee56bfb37737153251ac8e4b27845b3ca065862fb01d99e247", size = 1740913, upload-time = "2025-10-06T19:57:19.821Z" }, - { url = "https://files.pythonhosted.org/packages/da/00/8f057300d9b598a706348abb375b3de9a253195fb615f17c0b2be2a72836/aiohttp-3.13.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5004d727499ecb95f7c9147dd0bfc5b5670f71d355f0bd26d7af2d3af8e07d2f", size = 1695535, upload-time = "2025-10-06T19:57:21.856Z" }, - { url = "https://files.pythonhosted.org/packages/8a/ab/6919d584d8f053a14b15f0bfa3f315b3f548435c2142145459da2efa8673/aiohttp-3.13.0-cp314-cp314-win32.whl", hash = "sha256:a1c20c26af48aea984f63f96e5d7af7567c32cb527e33b60a0ef0a6313cf8b03", size = 429548, upload-time = "2025-10-06T19:57:24.285Z" }, - { url = "https://files.pythonhosted.org/packages/c5/59/5d9e78de6132079066f5077d9687bf524f764a2f8207e04d8d68790060c6/aiohttp-3.13.0-cp314-cp314-win_amd64.whl", hash = "sha256:56f7d230ec66e799fbfd8350e9544f8a45a4353f1cf40c1fea74c1780f555b8f", size = 455548, upload-time = "2025-10-06T19:57:26.136Z" }, - { url = "https://files.pythonhosted.org/packages/7c/ea/7d98da03d1e9798bb99c3ca4963229150d45c9b7a3a16210c5b4a5f89e07/aiohttp-3.13.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:2fd35177dc483ae702f07b86c782f4f4b100a8ce4e7c5778cea016979023d9fd", size = 765319, upload-time = "2025-10-06T19:57:28.278Z" }, - { url = "https://files.pythonhosted.org/packages/5c/02/37f29beced8213bb467c52ad509a5e3b41e6e967de2f6eaf7f8db63bea54/aiohttp-3.13.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:4df1984c8804ed336089e88ac81a9417b1fd0db7c6f867c50a9264488797e778", size = 502567, upload-time = "2025-10-06T19:57:30.273Z" }, - { url = "https://files.pythonhosted.org/packages/e7/22/b0afcafcfe3637bc8d7992abf08ee9452018366c0801e4e7d4efda2ed839/aiohttp-3.13.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e68c0076052dd911a81d3acc4ef2911cc4ef65bf7cadbfbc8ae762da24da858f", size = 507078, upload-time = "2025-10-06T19:57:32.619Z" }, - { url = "https://files.pythonhosted.org/packages/49/4c/046c847b7a1993b49f3855cc3b97872d5df193d9240de835d0dc6a97b164/aiohttp-3.13.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bc95c49853cd29613e4fe4ff96d73068ff89b89d61e53988442e127e8da8e7ba", size = 1862115, upload-time = "2025-10-06T19:57:34.758Z" }, - { url = "https://files.pythonhosted.org/packages/1a/25/1449a59e3c6405da5e47b0138ee0855414dc12a8c306685d7fc3dd300e1f/aiohttp-3.13.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3b3bdc89413117b40cc39baae08fd09cbdeb839d421c4e7dce6a34f6b54b3ac1", size = 1717147, upload-time = "2025-10-06T19:57:36.938Z" }, - { url = "https://files.pythonhosted.org/packages/23/8f/50cc34ad267b38608f21c6a74327015dd08a66f1dd8e7ceac954d0953191/aiohttp-3.13.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3e77a729df23be2116acc4e9de2767d8e92445fbca68886dd991dc912f473755", size = 1841443, upload-time = "2025-10-06T19:57:39.708Z" }, - { url = "https://files.pythonhosted.org/packages/df/b9/b3ab1278faa0d1b8f434c85f9cf34eeb0a25016ffe1ee6bc361d09fef0ec/aiohttp-3.13.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e88ab34826d6eeb6c67e6e92400b9ec653faf5092a35f07465f44c9f1c429f82", size = 1933652, upload-time = "2025-10-06T19:57:42.33Z" }, - { url = "https://files.pythonhosted.org/packages/88/e2/86050aaa3bd7021b115cdfc88477b754e8cf93ef0079867840eee22d3c34/aiohttp-3.13.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:019dbef24fe28ce2301419dd63a2b97250d9760ca63ee2976c2da2e3f182f82e", size = 1790682, upload-time = "2025-10-06T19:57:44.851Z" }, - { url = "https://files.pythonhosted.org/packages/78/8d/9af903324c2ba24a0c4778e9bcc738b773c98dded3a4fcf8041d5211769f/aiohttp-3.13.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2c4aeaedd20771b7b4bcdf0ae791904445df6d856c02fc51d809d12d17cffdc7", size = 1622011, upload-time = "2025-10-06T19:57:47.025Z" }, - { url = "https://files.pythonhosted.org/packages/84/97/5174971ba4986d913554ceb248b0401eb5358cb60672ea0166f9f596cd08/aiohttp-3.13.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:b3a8e6a2058a0240cfde542b641d0e78b594311bc1a710cbcb2e1841417d5cb3", size = 1787148, upload-time = "2025-10-06T19:57:49.149Z" }, - { url = "https://files.pythonhosted.org/packages/dd/ae/8b397e980ac613ef3ddd8e996aa7a40a1828df958257800d4bb325657db3/aiohttp-3.13.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:f8e38d55ca36c15f36d814ea414ecb2401d860de177c49f84a327a25b3ee752b", size = 1774816, upload-time = "2025-10-06T19:57:51.523Z" }, - { url = "https://files.pythonhosted.org/packages/c7/54/0e8e2111dd92051c787e934b6bbf30c213daaa5e7ee5f51bca8913607492/aiohttp-3.13.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:a921edbe971aade1bf45bcbb3494e30ba6863a5c78f28be992c42de980fd9108", size = 1788610, upload-time = "2025-10-06T19:57:54.337Z" }, - { url = "https://files.pythonhosted.org/packages/fa/dd/c9283dbfd9325ed6fa6c91f009db6344d8d370a7bcf09f36e7b2fcbfae02/aiohttp-3.13.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:474cade59a447cb4019c0dce9f0434bf835fb558ea932f62c686fe07fe6db6a1", size = 1615498, upload-time = "2025-10-06T19:57:56.604Z" }, - { url = "https://files.pythonhosted.org/packages/8c/f6/da76230679bd9ef175d876093f89e7fd6d6476c18505e115e3026fe5ef95/aiohttp-3.13.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:99a303ad960747c33b65b1cb65d01a62ac73fa39b72f08a2e1efa832529b01ed", size = 1815187, upload-time = "2025-10-06T19:57:59.036Z" }, - { url = "https://files.pythonhosted.org/packages/d5/78/394003ac738703822616f4f922705b54e5b3d8e7185831ecc1c97904174d/aiohttp-3.13.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:bb34001fc1f05f6b323e02c278090c07a47645caae3aa77ed7ed8a3ce6abcce9", size = 1760281, upload-time = "2025-10-06T19:58:01.585Z" }, - { url = "https://files.pythonhosted.org/packages/bd/b0/4bad0a9dd5910bd01c3119f8bd3d71887cd412d4105e4acddcdacf3cfa76/aiohttp-3.13.0-cp314-cp314t-win32.whl", hash = "sha256:dea698b64235d053def7d2f08af9302a69fcd760d1c7bd9988fd5d3b6157e657", size = 462608, upload-time = "2025-10-06T19:58:03.674Z" }, - { url = "https://files.pythonhosted.org/packages/bd/af/ad12d592f623aae2bd1d3463201dc39c201ea362f9ddee0d03efd9e83720/aiohttp-3.13.0-cp314-cp314t-win_amd64.whl", hash = "sha256:1f164699a060c0b3616459d13c1464a981fddf36f892f0a5027cbd45121fb14b", size = 496010, upload-time = "2025-10-06T19:58:05.589Z" }, + { name = "aiohappyeyeballs" }, + { name = "aiosignal" }, + { name = "attrs" }, + { name = "frozenlist" }, + { name = "multidict" }, + { name = "propcache" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "yarl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6c/4c/bdccd81e9ee225b69c60e7766c9a5b05364f118f4d383713b89a682d772d/aiohttp-3.14.5.tar.gz", hash = "sha256:5558a7f5a05af9ecf744af91e5baefc436f93c9333e656c27ec253f9a6bbe178", size = 8078052, upload-time = "2026-10-11T01:05:12.408Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d8/f3/8997f18890a92c79f77fcfbb4f78ca17c2d4ab109e9eb6d31b4e9de194a0/aiohttp-3.14.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d51db97c96384fbfcaf8f4c65922183a68b94f891c3c10c862ef5f6df2adbb1f", size = 832358, upload-time = "2026-10-11T00:59:42.195Z" }, + { url = "https://files.pythonhosted.org/packages/8e/42/084651e9efb5cadb99265f786df60f2a7b353cead7bfd2c87003cb4867ad/aiohttp-3.14.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ae53924aa853a7a2ca20ed4142c7c6b56338e4d4cd999e2980075b9efc2e257a", size = 559636, upload-time = "2026-10-11T00:59:43.677Z" }, + { url = "https://files.pythonhosted.org/packages/3d/fe/92838944e601f0fe195fd3f3ada37e29fbee3d19bfd323fe15937ec79d36/aiohttp-3.14.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a2c473a355f9239efcb72c92d5abfd8fcdb0cc78c8e9af607e72ca12dbb36593", size = 552588, upload-time = "2026-10-11T00:59:45.592Z" }, + { url = "https://files.pythonhosted.org/packages/8f/b8/dd9b95c5c20ceae1b47738e656bd79e9883e3117a9cc8b143901eb604e9a/aiohttp-3.14.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:32e8fa6644e541fcd7e02430588c7fc93b602c1778ea0bc345505db76b61cfb4", size = 1928224, upload-time = "2026-10-11T00:59:47.294Z" }, + { url = "https://files.pythonhosted.org/packages/c6/47/70010cd2ba8746968d53d433ff328c33f06a66c99da5f3de759c64a6b2eb/aiohttp-3.14.5-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:579f97d5120f2971876d2ddca2968135f6944d00c44c3a6590ad7d86ca9b403f", size = 1877674, upload-time = "2026-10-11T00:59:49.472Z" }, + { url = "https://files.pythonhosted.org/packages/c5/a1/b026f071dbd87f0bdba86b92d47e46f3899e3ad7143b6e0fe7e7887090b4/aiohttp-3.14.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:24409db442e2fb6e766bc7f3943851a8381dec3098140e43bb2e843b79e31b12", size = 1985850, upload-time = "2026-10-11T00:59:51.296Z" }, + { url = "https://files.pythonhosted.org/packages/36/d1/f7b6f6f8c3cb5a71b53baeddc2e70c224c28b12a23a55c42994c504019b7/aiohttp-3.14.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5e8f97c0488ffda3082766ac0f2c8150a9a58c4d05788330e479cfd449b37939", size = 2105471, upload-time = "2026-10-11T00:59:53.191Z" }, + { url = "https://files.pythonhosted.org/packages/42/74/2a2b22953de15c6c8a80debf26db3047e4e8a5a5db6dd7c2c6c01eec0605/aiohttp-3.14.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50a195903119008fe9cc68710535eb37f556ffffd6a7759afe70a2c145587045", size = 1929915, upload-time = "2026-10-11T00:59:55.609Z" }, + { url = "https://files.pythonhosted.org/packages/33/ad/f80e8d33933d0eacd0217efa3b7fb32c9f48ed480ed0db53cf9948bf474f/aiohttp-3.14.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0133c3c3b54a0bf1e71fa5c1ad95c93f07fd54e24ef1fe182f5122e1573d2bf1", size = 1773832, upload-time = "2026-10-11T00:59:57.611Z" }, + { url = "https://files.pythonhosted.org/packages/04/a4/0273d239f3e3bb69438f209c64c82e1f98dc60d5db264795e41f7dd05dcb/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c172db893e516e1358e65a95ee20b7ce7173963eefe318b6ab2a2220688b999e", size = 1901001, upload-time = "2026-10-11T01:00:00.605Z" }, + { url = "https://files.pythonhosted.org/packages/16/ed/7dd439d26c654645bc34ca3c9a822fc11c1c51801fed1cefdfe1cc41c1f6/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f2a7966bda23dd85051f1661ce0ace38d6890e05ec6c357ecae9d2479cba377e", size = 1907218, upload-time = "2026-10-11T01:00:02.699Z" }, + { url = "https://files.pythonhosted.org/packages/32/dd/86249c3b8248562a17fd3e22ee0c164378d65766f01aceef62cf52783710/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:4887d130a7bbfed3a85493bb5a25e5b5b558d40c1d986dd16970d2bb26d63793", size = 1958650, upload-time = "2026-10-11T01:00:04.851Z" }, + { url = "https://files.pythonhosted.org/packages/bc/0b/ca4d53d68f683ce195807fd0aeb063bf6d1c6b39343fff234c9524e8d5a9/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:225c579c23b68b343cccea27a7e06e3bd8ec23a09c30b427eb3f1e4ca6239b20", size = 1760057, upload-time = "2026-10-11T01:00:06.978Z" }, + { url = "https://files.pythonhosted.org/packages/6b/42/005437ffd7fa56c2ce3347add40404b654a32754ce91f2e2a14b9e5ab2bc/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ab52d8f1fc1b64821c1fbad64a647ed6203627004059a6d1ed4f0858a1499703", size = 1978081, upload-time = "2026-10-11T01:00:08.868Z" }, + { url = "https://files.pythonhosted.org/packages/03/71/3a5b66fe1b7b23d3c6524350817ed55de5feb7fbb4cccba7cbe044d118dd/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cb131d775a1573c1aee66656bd78b023577bbdb6cb8349a07773bd4f73e68a6e", size = 1922954, upload-time = "2026-10-11T01:00:11.035Z" }, + { url = "https://files.pythonhosted.org/packages/69/84/d08a554f281d42fd7c6b2b6dd7738f3e3a7a9f657ddd87e11ca2091cdfe3/aiohttp-3.14.5-cp311-cp311-win32.whl", hash = "sha256:e87046c8ff77a8decdb6a41d8ab25824b47531b2da933aeab0c1e21c7acff329", size = 488101, upload-time = "2026-10-11T01:00:12.933Z" }, + { url = "https://files.pythonhosted.org/packages/0f/15/52b5e65f02b33686ae49f1518548ae4f5a7adaf31d9d3c54fa12a143137b/aiohttp-3.14.5-cp311-cp311-win_amd64.whl", hash = "sha256:6f275c11d1aa6d4c458e05a68be084efe3c55a113d99e3f46a318098e52948fc", size = 512575, upload-time = "2026-10-11T01:00:14.743Z" }, + { url = "https://files.pythonhosted.org/packages/b0/b9/bb75012635f3defb0f7cbb7c4ae391e36bb9cb3fbdca3b9944e2ebebf743/aiohttp-3.14.5-cp311-cp311-win_arm64.whl", hash = "sha256:b032a0023eb41d768ce77d83210ab2a3c389bc0b09313273c7e1eca48c10a755", size = 493179, upload-time = "2026-10-11T01:00:16.961Z" }, + { url = "https://files.pythonhosted.org/packages/d5/94/6ba86efddcb616c811b40e6a0dfdd862738f647e4e3860a961075d5e9ed8/aiohttp-3.14.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:df37b620684e19b5e25724412518ccafc3b1a49cdac706fdbd2f983fad943450", size = 817499, upload-time = "2026-10-11T01:00:18.901Z" }, + { url = "https://files.pythonhosted.org/packages/5e/e1/7bca6d84dabd228aa8eb4b7f9feac2586aaa9be5505d7d65bf287a615c43/aiohttp-3.14.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ef60869969180ec2464f1349aff07138ae35ca2200f0946cb3552e49e8f301a8", size = 549467, upload-time = "2026-10-11T01:00:20.854Z" }, + { url = "https://files.pythonhosted.org/packages/64/91/11b89f45ca486252dd67dd5f3231fec04bf5518da39a95cb3997619f17fb/aiohttp-3.14.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d079c0a0135c36e7beb6f1c88087c8f108dc5891cdd0b5eafa778421bda70ed2", size = 548067, upload-time = "2026-10-11T01:00:22.659Z" }, + { url = "https://files.pythonhosted.org/packages/22/ff/c6615806c14aab34f82b9424ccde8ce6e417315fd57ce1c5b4d4747888e1/aiohttp-3.14.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:abfda5cb094a829f7bc25216a32f7db2e85cc65bd59910f8e7b40b3d9b224764", size = 1896245, upload-time = "2026-10-11T01:00:24.638Z" }, + { url = "https://files.pythonhosted.org/packages/39/b2/25a8c971ae6a92c8394d77e42422d7f38989e05cf41a5ceb92d73d67ab7e/aiohttp-3.14.5-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9cc882cf8619109583c906b4d4a85d6a111a98afa34b7a450d1e08118d016820", size = 1872180, upload-time = "2026-10-11T01:00:26.838Z" }, + { url = "https://files.pythonhosted.org/packages/2f/d5/99f93ea36cc5205e47c1e5a803e087f2ad21b5430b5db2e942cb6e988a37/aiohttp-3.14.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7457580535e019e1247ea35d6a02bf081ad30c26d0cbc210c93f6c3ab67a0835", size = 1937261, upload-time = "2026-10-11T01:00:28.74Z" }, + { url = "https://files.pythonhosted.org/packages/40/a6/9ac9c9e6695040bd73d2584a1b59a9388f6433c76d5294a7bf591e21ffe5/aiohttp-3.14.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c5ed596aedb9c42afd3fe0aae3117725378ac73d2cc5ddc735056fbdb96c5d02", size = 2064994, upload-time = "2026-10-11T01:00:30.623Z" }, + { url = "https://files.pythonhosted.org/packages/da/e4/aa172eb534b7f02f1f8ff1c3213347eaf3cf218db91a727c6863c22f1035/aiohttp-3.14.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20f085697d7e911f1f73c43ed03fafbed1e7121797e2eb5428efa80398060584", size = 1919630, upload-time = "2026-10-11T01:00:32.548Z" }, + { url = "https://files.pythonhosted.org/packages/06/7d/4eedafc5bababa8932636c141e346806966eade12c0b7e5946d43bf8218b/aiohttp-3.14.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:74b0a9c8270f9b0a11410e124ff8d4f18bfc1f1837440ec84da5ae7b50927b5d", size = 1710016, upload-time = "2026-10-11T01:00:34.471Z" }, + { url = "https://files.pythonhosted.org/packages/b2/94/eee018537ba19da0ceb2ac79cab83faed4ac49568e08376e2799043f2538/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:19e2ba471507c34f8252402ab50f5ab512398b9ea8c8f1cb26beb3f75793ba30", size = 1858112, upload-time = "2026-10-11T01:00:36.581Z" }, + { url = "https://files.pythonhosted.org/packages/68/76/354653a306547238f3427283905972d796ba7c292ba9977abec9f2b6f260/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d418ce2af40c6bb685b3f663e9e8de27cb0a22431d8e88a167348d7f01878073", size = 1896371, upload-time = "2026-10-11T01:00:38.478Z" }, + { url = "https://files.pythonhosted.org/packages/f2/ec/63e8c7136b570e356345ad3174e3820fdc973ea10712cb6c649bf875755a/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:70cb4008ac2ed1e0ca9e824deb4b53d3aa0d939109698ebf1e723a84337bd794", size = 1905836, upload-time = "2026-10-11T01:00:40.527Z" }, + { url = "https://files.pythonhosted.org/packages/57/d8/11365bda144b127928cd42533d0eff78a55613c9e28f81941bd6630ea887/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:a23fe35d776bc03cb495938b9594450d047e3bc08c5255315a82323e9cb7d2dd", size = 1696534, upload-time = "2026-10-11T01:00:42.686Z" }, + { url = "https://files.pythonhosted.org/packages/2f/3d/82df0461b18e00b2998f205c03e0d3010222478c43640aceb8e03dcd7e8f/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3e0eb43bed3c6801a6cee315195377789e90b2a72c2277a475b578535312488d", size = 1933970, upload-time = "2026-10-11T01:00:44.71Z" }, + { url = "https://files.pythonhosted.org/packages/03/ad/6ddfe0aacd931c17b53533336d97e9d11a98b96d6ae815a9da0b19f82ccf/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be7dd397d64ca3e1869626fa9318aaebb54b7bf93bc72d7a205448d83e4f748", size = 1899501, upload-time = "2026-10-11T01:00:46.629Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8e/189bdd9ae4793059bb09f6dc880f211a6c6c7859cebcbf33912dbfab7dd7/aiohttp-3.14.5-cp312-cp312-win32.whl", hash = "sha256:eb324e2009fb54db30a071dad7caf6998ee2879c4704007efb244514dad1fec1", size = 480370, upload-time = "2026-10-11T01:00:48.468Z" }, + { url = "https://files.pythonhosted.org/packages/ae/ce/1f08114679d49655b30a6e0a29858375c94b82c1de1a0bd0a20c2fee8b02/aiohttp-3.14.5-cp312-cp312-win_amd64.whl", hash = "sha256:2cc38a4f2b516bef1714e690df87a0e043faf1a7693c82d860091684453d5111", size = 506141, upload-time = "2026-10-11T01:00:50.272Z" }, + { url = "https://files.pythonhosted.org/packages/79/d4/c7b4f60b16a1b7e43249fa9031ae05e7e8c341ba4b7d1866f914dafeaa0e/aiohttp-3.14.5-cp312-cp312-win_arm64.whl", hash = "sha256:a63afd1f757de949028387e65a7127b61ad0f775432dbb0e62816ae619fe69ac", size = 488108, upload-time = "2026-10-11T01:00:52.321Z" }, + { url = "https://files.pythonhosted.org/packages/d3/e1/2841e020ebb7aefae5513586193e011e06313d9a6bdbd296622afbbce204/aiohttp-3.14.5-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:9ad7e6aa38c20da1be697874349c4c273c8a03b7887169665081706398d0439a", size = 538932, upload-time = "2026-10-11T01:00:54.3Z" }, + { url = "https://files.pythonhosted.org/packages/f7/a6/7fb8ea8fe96bcc7b7c7a36d10f021d99d01a8dc8a4b3f0ddacecfad9a80e/aiohttp-3.14.5-cp313-cp313-android_24_x86_64.whl", hash = "sha256:f59c7673465908cbe506117176156c127f29f917677afceada34957179221d91", size = 553329, upload-time = "2026-10-11T01:00:56.442Z" }, + { url = "https://files.pythonhosted.org/packages/de/64/d056e3c27647dc25af1a592cf356245382ea7c808171b9dac7677afedfc8/aiohttp-3.14.5-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:1b5416552740edf07234cc9437d0706f2acb67b93c198670b1a68e1b2b587dec", size = 521367, upload-time = "2026-10-11T01:00:58.345Z" }, + { url = "https://files.pythonhosted.org/packages/3e/e4/95226147e11d4db916fd1d495dcf85af8e3816e38333e42718241196e848/aiohttp-3.14.5-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:43351bdb5e4c3cb7d1772368e988534e869a74db7778079a83782c11c69535c7", size = 528322, upload-time = "2026-10-11T01:01:00.211Z" }, + { url = "https://files.pythonhosted.org/packages/17/cd/1d3c9192cafdb51cad62b2d3ded96cff9cc8af51893210aadd448a325389/aiohttp-3.14.5-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:c8c4478bef6d57fcfda15dae461ea3c9f06aa7b257c58df3f2300174ccbb185a", size = 539874, upload-time = "2026-10-11T01:01:02.06Z" }, + { url = "https://files.pythonhosted.org/packages/f6/0c/dfa33aecc7d4d1dc75e05248f5eac5a0edf4d09e7b44d93ab62529b0c1db/aiohttp-3.14.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c2c30484dd1417ef98b51021ffa2cc0d7f3c78918adaaaab7e70817335ab3e02", size = 813836, upload-time = "2026-10-11T01:01:04.01Z" }, + { url = "https://files.pythonhosted.org/packages/33/17/4a63738052d20567d55529d6daa1b9480d906fd52930fbcf6d3fbed618f0/aiohttp-3.14.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dab9ac5a67c8d1f070c00fa8fccb7cbd1b8dcc1a8d6b42f37540df9b3d4cc603", size = 548070, upload-time = "2026-10-11T01:01:06.035Z" }, + { url = "https://files.pythonhosted.org/packages/15/e5/b57e58695a757fd4c02497c033fced96a69c631b13866c43d336530c9670/aiohttp-3.14.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e1cc2bfaee8c214f06080a7c7d5772419b8a1108e8e5349236189811823fb02a", size = 545786, upload-time = "2026-10-11T01:01:07.817Z" }, + { url = "https://files.pythonhosted.org/packages/9a/68/8c2c67a3aedf46e00f3c42f04fbc6983de80d4ed5786151e33681ba45883/aiohttp-3.14.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:74efb69332b85675b1eabd760a8cfc2e2cf42c60607c66f88014c1bdfb40942d", size = 1886492, upload-time = "2026-10-11T01:01:09.834Z" }, + { url = "https://files.pythonhosted.org/packages/ab/4b/74aab5e8d28c62e8f795b4fe8f38cf5586fd264a9a27bd2141ef6490333d/aiohttp-3.14.5-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:42b5e616946dbaf505e2bff18c9af2cd4ef9e7ef300ee58a6e951a5b7cf147ae", size = 1870057, upload-time = "2026-10-11T01:01:12.045Z" }, + { url = "https://files.pythonhosted.org/packages/a8/f7/eafc3b1988302b1815d9fd4a21071be5c360d616c0a430d02fd92dc97688/aiohttp-3.14.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f9033b43f511f27547c557dcaba0177649e10a3725336ccd2cce0fdc1dc4850d", size = 1925119, upload-time = "2026-10-11T01:01:14.09Z" }, + { url = "https://files.pythonhosted.org/packages/a1/04/78d8f294f74dd570f3898ff20402349fce524176045df98ba727d6846a68/aiohttp-3.14.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:15a310d3c71398e3d7bfc93a1a73fbe664315cd9e9016b8efc1cff85eeab7155", size = 2053137, upload-time = "2026-10-11T01:01:16.344Z" }, + { url = "https://files.pythonhosted.org/packages/32/51/395d225ef36f5a50d8e548dcd3141bfdbcd31fb6eed859022c573d2c4d66/aiohttp-3.14.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1ffa3a523a36d8628f98c06492ae16a31a23d14c0b4ec721757b477319f656d6", size = 1911038, upload-time = "2026-10-11T01:01:18.653Z" }, + { url = "https://files.pythonhosted.org/packages/ff/a4/2aec1aa06d82e8a244843b5dae31d78061e5e76744270a86dd0ee051c889/aiohttp-3.14.5-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5fb6a6e919bfb703227bc1ce6579281b84b1a2ba57deb9794dfdbec7dcd1e40c", size = 1702205, upload-time = "2026-10-11T01:01:20.904Z" }, + { url = "https://files.pythonhosted.org/packages/16/27/6051bfde7b6f418f70edd60d655fa426abb3355fa0981764739d87ecf160/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:43e1b7994a8b038125f722bff07492ef501110722c2727c408995d9fb864c421", size = 1848588, upload-time = "2026-10-11T01:01:22.918Z" }, + { url = "https://files.pythonhosted.org/packages/9e/44/55efc06fc26c4e6e1c095f231b4c222bf2d86d64a8eebbc24b2bb5958ea8/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:5f3e96071686755d9cd3600c3880183eb94b012178e92746d68101800f0ed8a3", size = 1887540, upload-time = "2026-10-11T01:01:25.278Z" }, + { url = "https://files.pythonhosted.org/packages/48/dc/1502bfdc2a65760d386ac6a00090b0addaa8a3c9c60b3f8127fad3a9afb2/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:cd88b01f3d37b7a2a34f91d98f14720206f1ea3d540843fab2d649dd5fb91fec", size = 1895030, upload-time = "2026-10-11T01:01:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/93/7e/44174bb6288264418c9eec07a5e35180969c0d5a796c7af544db3cb8a33a/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:f2ed8b64dc0c651c0f5a9c926777719770021251b8f336d97c4b80b660836ce1", size = 1693244, upload-time = "2026-10-11T01:01:29.39Z" }, + { url = "https://files.pythonhosted.org/packages/47/dd/b507d64e50db23888582fff08eda13998b12f9dea70c072edaac19218380/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:a9918e58faf62ba2c7147927d06057aec78f42475aff5048047ec47e7265a600", size = 1926308, upload-time = "2026-10-11T01:01:31.634Z" }, + { url = "https://files.pythonhosted.org/packages/98/4b/5b51b4f63e3f2793151f4aea49c48fe1e00baeb7cec9c7a206de499f8de0/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:42f320d4a5b00b9af0bddcfec5407dc6f2d9816f006b2f79ebbaa31f16895df3", size = 1888406, upload-time = "2026-10-11T01:01:33.715Z" }, + { url = "https://files.pythonhosted.org/packages/ff/13/d5e818a5eaba9f822016727299f41c0e1075799f82a6433ec508a93ab867/aiohttp-3.14.5-cp313-cp313-win32.whl", hash = "sha256:3ae800a20947e2c2e53088047d021e6bf7d51560cc49f6a0737a1f79d2e3a13c", size = 479970, upload-time = "2026-10-11T01:01:35.677Z" }, + { url = "https://files.pythonhosted.org/packages/8d/d0/8eca2c65aa467320990d78fb2005f38ed3588944280c39ff9deb6423fef1/aiohttp-3.14.5-cp313-cp313-win_amd64.whl", hash = "sha256:d05e94cdfe0d15d0206f970722d2554780ce562787b21b218b275447f8751319", size = 505985, upload-time = "2026-10-11T01:01:37.574Z" }, + { url = "https://files.pythonhosted.org/packages/7a/f8/4cdd65305d2fca14b886bea9ed2abb1fe726287872524e56e3d26692b47d/aiohttp-3.14.5-cp313-cp313-win_arm64.whl", hash = "sha256:f001b571ead90ca1770f1e616db255351a1703317f20374c361ef22f12c06d09", size = 487629, upload-time = "2026-10-11T01:01:39.477Z" }, + { url = "https://files.pythonhosted.org/packages/43/be/3184a1d34a8be665569eadb7e9e764b4629e4f3413e241cb2e4d6fecf3b3/aiohttp-3.14.5-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:939042d5cda21d41a6f512e7cc8b8e33a2aebff863352251da495fbd91b673b5", size = 540673, upload-time = "2026-10-11T01:01:41.354Z" }, + { url = "https://files.pythonhosted.org/packages/60/2a/d35f3ba4cf157b072e3b674bf9983047ca5ea5173c995d32d877e1191d36/aiohttp-3.14.5-cp314-cp314-android_24_x86_64.whl", hash = "sha256:6da32b5ff3fd78d244e37300463434c7145162bfd2b6e9e915ab164da37f7343", size = 554087, upload-time = "2026-10-11T01:01:43.719Z" }, + { url = "https://files.pythonhosted.org/packages/fc/d2/61a33880ca4eaca95a9c60ca3f6beed15555af1028652dfaac601627787b/aiohttp-3.14.5-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:1b438b73c38111818d0c9d6a5c2bfed8584c8e503a49ef085d70e874ec846738", size = 522613, upload-time = "2026-10-11T01:01:46.154Z" }, + { url = "https://files.pythonhosted.org/packages/31/1d/de579b299d2225dc2c6fd99d579d91f16c02a913fb5af9a3cf2fe9bd88ba/aiohttp-3.14.5-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:755933b107ea7a6a9ac916f635a70595a5b1a32fac10a8ff0b9f2ab88555550c", size = 529682, upload-time = "2026-10-11T01:01:48.477Z" }, + { url = "https://files.pythonhosted.org/packages/f4/4a/ddb923564e15e053b6e060b0036e1694dcadcb13aa476c5a87dcad20e336/aiohttp-3.14.5-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:b3cc509327c7b27f6f4727a8830f4004f6df7766e179f2f4b8e54e65c0bec5d3", size = 540120, upload-time = "2026-10-11T01:01:50.474Z" }, + { url = "https://files.pythonhosted.org/packages/3d/36/a640fbecaa53727a5900b892bdbe17b5f3e8cc88903e22864fe41b654def/aiohttp-3.14.5-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:7bd8ac754ebd6733a3e2a0dd1674c4d8ab086196803fd8dcd776f07b4e2607d9", size = 818795, upload-time = "2026-10-11T01:01:52.665Z" }, + { url = "https://files.pythonhosted.org/packages/ef/b6/d52ca608859e271b5fa7944074802dc45f60e52c318a4ddc34edbf73586e/aiohttp-3.14.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e724a7b6091f0b1ac064f9d1b15ff9ec52e6033a86cdae649e5f086e32a3c0db", size = 549667, upload-time = "2026-10-11T01:01:54.65Z" }, + { url = "https://files.pythonhosted.org/packages/ce/b5/05b8ac39a76ff4bca89f42a4c2471560c71f894ff6e4bc16158c951874e3/aiohttp-3.14.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c32e26310cc10e547f53cd13d39a369034f69dcb7d749d5cb0e5f67bc196b6ba", size = 548922, upload-time = "2026-10-11T01:01:56.547Z" }, + { url = "https://files.pythonhosted.org/packages/19/b0/5aa186d56ce2334dabe29b70bd99dc8ae926ee44184c0de64a53d415a4f3/aiohttp-3.14.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1eb8167961ec4dfcc8cb9dd50bd0ee72519f7ef496be95203e49e27b01618382", size = 1882422, upload-time = "2026-10-11T01:01:59.258Z" }, + { url = "https://files.pythonhosted.org/packages/db/f7/7d5c91bb9620db300c8ddb05337a9014301acb626223faff3abcb8ea47d7/aiohttp-3.14.5-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c1d60eafd9c7e8e74abd03a5b00df44e7febfe6d9b89b559c0a6551eef0699d4", size = 1843621, upload-time = "2026-10-11T01:02:01.417Z" }, + { url = "https://files.pythonhosted.org/packages/30/0a/b208953b96d8f24b75f6da704f508e6c5cf3022f52b60c61933df082e89c/aiohttp-3.14.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:137351bf20bbed9a65e839f4a4452ac377389bdb2f2857d2acffef38f5e9f2d1", size = 1927915, upload-time = "2026-10-11T01:02:03.697Z" }, + { url = "https://files.pythonhosted.org/packages/f6/79/90ebcccb55e2d1e11a1fed581d83bb966e38fb35fb4b2577fdc980f8707a/aiohttp-3.14.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fba47bc2c3d7303c3d027c6cf4d07626c37b1314ac81f5820c31032e0ca1f677", size = 2036339, upload-time = "2026-10-11T01:02:06.046Z" }, + { url = "https://files.pythonhosted.org/packages/a6/66/55a8904b3a129fafdf94f9cc0a2e4ca09a3c914650be52355db7ad0bbdb6/aiohttp-3.14.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:94684b879ac1d71e4238850c99b62dc1b28d9086b156a2555f082010b85a865c", size = 1888041, upload-time = "2026-10-11T01:02:08.384Z" }, + { url = "https://files.pythonhosted.org/packages/0b/b8/96b25da7329a52e42c812b1e8b076386039ec4fc312afa043d173d8147fc/aiohttp-3.14.5-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:56572c42e3ecd636de8d2c3dd54cf5fc939cb5c32eb56297f176a0d366fac622", size = 1703849, upload-time = "2026-10-11T01:02:10.903Z" }, + { url = "https://files.pythonhosted.org/packages/1b/43/fbf976e3ae4c038d6f5c84945ab2150298c2d71201674d4e53d158063e75/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a95529a92a446db351675f4aab518feaf5e99842f63f5dd17160c2b74f382db3", size = 1849703, upload-time = "2026-10-11T01:02:13.15Z" }, + { url = "https://files.pythonhosted.org/packages/8b/7d/218e912f4c1d89bde7ac551409be57ad2f6121638e56942d395a7cb1fa58/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:3edbece0379b8b4aaa67619b8aa2399bb66fce372cd5911098a434ea77220aa0", size = 1852695, upload-time = "2026-10-11T01:02:15.295Z" }, + { url = "https://files.pythonhosted.org/packages/5a/42/252a1b9287e3b6e393a1c3bd1776f36af30f5f25f071bbf2b0cb7eba9116/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:56d9828f204331a5ca8850fcfe2bcce95a149f1f223f60cc7216e5524978e480", size = 1893493, upload-time = "2026-10-11T01:02:17.93Z" }, + { url = "https://files.pythonhosted.org/packages/78/97/71cae83d5100556fad1521684f7cd1e3e578432644f850245ed3bd969310/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:20064a177a070d789ee64a50b01a9161d3468e989baacfc6c714aa685c4b332f", size = 1693468, upload-time = "2026-10-11T01:02:20.666Z" }, + { url = "https://files.pythonhosted.org/packages/1f/69/73d88e97a8b5f0ca7a946d0011c0de99fb188b1687c7948ecd0553dc5bf0/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:81c2b3dfd56c62bee6108e4852d5970b4cf9086390b6983f52b666e878c1f115", size = 1915398, upload-time = "2026-10-11T01:02:23.011Z" }, + { url = "https://files.pythonhosted.org/packages/05/f0/881644bcb15d4b258daea9b720a0af9dc4330496cc8d6ade9090cdd0cffc/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:09ec102b4b8c9a920275733bbc11fdbb615efe6f9231a06007c0218d336fb77a", size = 1871470, upload-time = "2026-10-11T01:02:25.278Z" }, + { url = "https://files.pythonhosted.org/packages/7f/de/19d9ebbcce5aedaa3242d8a99ff8816a60bdb7629fb0084bf4a45bfd1f62/aiohttp-3.14.5-cp314-cp314-win32.whl", hash = "sha256:9c428eb2bd8817588d16a0ab898aa4eb5d141f896aa2b394cc79a4cf61d9a8e2", size = 485517, upload-time = "2026-10-11T01:02:27.579Z" }, + { url = "https://files.pythonhosted.org/packages/a9/74/8cdaf0e58c2588371670d5a9a8215bbb971d36940b6e5d051967dd05c07d/aiohttp-3.14.5-cp314-cp314-win_amd64.whl", hash = "sha256:6f967dde489ca6a8c02d093ab245d2cbf50ccb5c36adf0188b17b0ca39d24b67", size = 511755, upload-time = "2026-10-11T01:02:29.685Z" }, + { url = "https://files.pythonhosted.org/packages/1a/6b/e0100e25502430a531c7cf1482a378d0b65bf728ab60c01ee270e56bc469/aiohttp-3.14.5-cp314-cp314-win_arm64.whl", hash = "sha256:1d2d981b53dd09a319e3570ef8cc3bbc3ef86f5a7abef0f6b2bff3867db3a9e7", size = 495151, upload-time = "2026-10-11T01:02:32.163Z" }, + { url = "https://files.pythonhosted.org/packages/9d/c2/ca2ead7b655688c53c03aeeb6e96e6851c9ff08d6be7b13802f53a6ae8fd/aiohttp-3.14.5-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:9ce66feae6ac65327379460380549bf1b8df8e17c4e25df2a2bcf168272e3bed", size = 855396, upload-time = "2026-10-11T01:02:34.443Z" }, + { url = "https://files.pythonhosted.org/packages/a7/70/22206fea409255a240c926ce11de48de354ae2bb90ca44f709c05497585d/aiohttp-3.14.5-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:27c2322e03f66101acb09869ce1cf1efc04994ee95e1735b69827bf8c8b9d781", size = 567734, upload-time = "2026-10-11T01:02:36.644Z" }, + { url = "https://files.pythonhosted.org/packages/ce/e5/79a36c118308b56f8667d67e05d2fb6dc638ab45985704cdb199631bedaa/aiohttp-3.14.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ff75a7537413a86e7cafe98e0e1d6e3dc4b15c6349896e7d5c6b881bfdb6d550", size = 567379, upload-time = "2026-10-11T01:02:38.757Z" }, + { url = "https://files.pythonhosted.org/packages/63/a3/2ebec7dece3b1f02c30d2e484647f6f7b13952b1bb40a4cb285b849e8432/aiohttp-3.14.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c061aa954daaf57d2a4b8374f9fca621ef0e1b603584431c220c22458c59b6d", size = 2050686, upload-time = "2026-10-11T01:02:41.169Z" }, + { url = "https://files.pythonhosted.org/packages/3a/d2/7e4d093db2f4450482652e7ef19a9e19919028f5135aa52bc4078c3beb80/aiohttp-3.14.5-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1612fa5857b37bf32e5c1eaeefb96e3b01e9c70679eec81f0934e8a600080863", size = 1915077, upload-time = "2026-10-11T01:02:43.563Z" }, + { url = "https://files.pythonhosted.org/packages/a6/88/bd40d09958442a0a1df67da81de496361d6e2afc04f9db2950d835da750b/aiohttp-3.14.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:adbeee7d6fd4cf5fe0aece2fb3edc4243615d3180430ba8149d01a90670cac99", size = 2027204, upload-time = "2026-10-11T01:02:46.185Z" }, + { url = "https://files.pythonhosted.org/packages/63/eb/3a601c1f8d3103c1a60ea981f20924855da9f575d2007fc38f8898b792fb/aiohttp-3.14.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b2966998927d7bed9db12c0a4647b0c7b179755878fc9c357fe1ffd3e3b0c1a5", size = 2149520, upload-time = "2026-10-11T01:02:48.812Z" }, + { url = "https://files.pythonhosted.org/packages/22/d0/4e41bfe1b1ce1cb6f6d2e59fa7a88ef5cf92c402b2d07e9018778ba9edbc/aiohttp-3.14.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e317e0fb6b16212c881d2205a7d87414c29acd69320b3aa6dce9d9c7b86fe4f", size = 2002039, upload-time = "2026-10-11T01:02:51.293Z" }, + { url = "https://files.pythonhosted.org/packages/6f/5e/72067019545c502b881b031153c437752ecef48d7d213bc0218ccebb4bfb/aiohttp-3.14.5-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:50343c1757b4b6f6708eeaf24534b32f19dfb99fb1b762c00420867a62fc81e0", size = 1786164, upload-time = "2026-10-11T01:02:53.533Z" }, + { url = "https://files.pythonhosted.org/packages/d9/fe/7741efd6119bfb7a00827fe6f7b84b4409de58d888ae21adc5a9a6824992/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:083673c7a94c3ea035caaa5ca04288bdb44887abfe1f5ba23294e6a4b03efd2d", size = 1970689, upload-time = "2026-10-11T01:02:55.888Z" }, + { url = "https://files.pythonhosted.org/packages/43/e7/342a13bf67f34d269bf2f7e870ecd72b99c832cc6f0a271a9210c0ebfb84/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:2528cb4c6b92008c76ac9ac6298624069bb2db91ff4929905512d1d84485f658", size = 1951967, upload-time = "2026-10-11T01:02:58.467Z" }, + { url = "https://files.pythonhosted.org/packages/e7/d4/fdb3b27340617e5e64df18a70fa89097778652ea5c7c7e2f79def76999c3/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b1b8ece1e71132d2afba4dbc0c3d62c766e25165990b25db1196c04969eb3d84", size = 1968511, upload-time = "2026-10-11T01:03:00.883Z" }, + { url = "https://files.pythonhosted.org/packages/83/b2/e8f88298de78d1a951f36f9f966d38ec6ed1d4721303ba02064a545e8aa6/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:fce9523df31cea6284f3e2c479876750d7687cf671d7b25d32b19effc0e86441", size = 1778497, upload-time = "2026-10-11T01:03:03.206Z" }, + { url = "https://files.pythonhosted.org/packages/22/68/9ccdb93d664345c546be7f34480b921774d8c0d98f47e70d7e03b115d475/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:09e0eb18c7e0c8777e2f9149de63799195b9b3ca1b5c81ba6f32f2c6b8628210", size = 1999676, upload-time = "2026-10-11T01:03:05.829Z" }, + { url = "https://files.pythonhosted.org/packages/57/4a/a33cfa6dcb00e94194ae4fe710432ca4ed111e016356b4ba4d2f4c3a124c/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6774814fd5c338e72ee0da5cbb9432816df450e69c019f72b5d29bdec2a1792d", size = 1963437, upload-time = "2026-10-11T01:03:08.196Z" }, + { url = "https://files.pythonhosted.org/packages/f4/20/eacbecfea3b5c3dcbfc9b023e3a5460f43e5dda16d06a2877ebe7184c3f3/aiohttp-3.14.5-cp314-cp314t-win32.whl", hash = "sha256:33f706574e32c6e694f352a856e05caf18f7f2c871b3e87b41c55ea452b409ab", size = 503973, upload-time = "2026-10-11T01:03:10.481Z" }, + { url = "https://files.pythonhosted.org/packages/ff/78/18eec294f6c8c5dc845dcf6d730a0147d8d0f17e86138a7bdb85e43a30fa/aiohttp-3.14.5-cp314-cp314t-win_amd64.whl", hash = "sha256:5ba14a839fbe87cf7c12a6b5661c05f324a296eb8363141edb3944ba63d4c9d3", size = 531190, upload-time = "2026-10-11T01:03:12.716Z" }, + { url = "https://files.pythonhosted.org/packages/9d/39/e53f8169acc85271ebd12b5b32ad7f1541b35639ccbe0f49034c64785d10/aiohttp-3.14.5-cp314-cp314t-win_arm64.whl", hash = "sha256:1061b364556e8172e8d46b0b183adeeb73e8c42d30ebc745591e1bd89acad52e", size = 510360, upload-time = "2026-10-11T01:03:15.08Z" }, + { url = "https://files.pythonhosted.org/packages/f3/1c/06d89f58b2db3ee92dd377217659d587e06f973e57bf0a97a0d8a4586c0c/aiohttp-3.14.5-cp315-cp315-android_24_arm64_v8a.whl", hash = "sha256:788ecaa9c10533b786ce5ba70c4f2df78ad41819fd00a6c99d92b66f9a32e1da", size = 540674, upload-time = "2026-10-11T01:03:17.483Z" }, + { url = "https://files.pythonhosted.org/packages/18/39/5e822e038f496f0540ada91e27099d48f9e7f919b6c6deb4cf6db36cc706/aiohttp-3.14.5-cp315-cp315-android_24_x86_64.whl", hash = "sha256:5c76f1802bab718a68ac3cce447160605c734551f95c67ae90fa1132b215cb29", size = 554183, upload-time = "2026-10-11T01:03:19.71Z" }, + { url = "https://files.pythonhosted.org/packages/9b/ff/0cf2619d902b5b160762422a7e5e02091295766a7fe4fcf5b9a655e386c1/aiohttp-3.14.5-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:a6d02b4c38de03d9c7617813433e6a0fb6b522797974177d69d9dad431900833", size = 523160, upload-time = "2026-10-11T01:03:22.193Z" }, + { url = "https://files.pythonhosted.org/packages/86/99/3553abfc53a40849dbaacc3f54c730ec58410809ffa2d05885ae56108f2d/aiohttp-3.14.5-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:20726f9782d5c2744c1c66255842d1d163bb3edcf768b8de25216bf47f7b6ccf", size = 530311, upload-time = "2026-10-11T01:03:24.435Z" }, + { url = "https://files.pythonhosted.org/packages/fe/a4/5d25f73754bc1e8f983ba704e86d641aea290c967f195f2aeebdaed2bd84/aiohttp-3.14.5-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:248d779ad720b49d4fb355720e60c9e5f444f95887bc16974fea48fc56c41789", size = 540274, upload-time = "2026-10-11T01:03:26.698Z" }, + { url = "https://files.pythonhosted.org/packages/29/a4/07eda5db2e3ee017d9590f36c12a94ec6f1f50516e8df78672373dfc7185/aiohttp-3.14.5-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:0a8ea271867e360ac985ae607f4a23ad9a38414b9aca1d49ec98839ae660e49f", size = 819239, upload-time = "2026-10-11T01:03:29.481Z" }, + { url = "https://files.pythonhosted.org/packages/cb/aa/a8723dd987a696dd48d4cf2f0088e589ce77caebff0b96f2a78c20424380/aiohttp-3.14.5-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:823c910f046f23f4c713b8d99a2242dc65f591cb45ee86418fa11762a3c2963c", size = 549832, upload-time = "2026-10-11T01:03:32.02Z" }, + { url = "https://files.pythonhosted.org/packages/29/5c/969a1b72692055fd2a419590c41847ec9144fefb97b75ff1cde5b6372891/aiohttp-3.14.5-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:9b42db919715e91eb76acf3bc492a9a7ccd8bd9adc6745c1412b689735269f14", size = 549234, upload-time = "2026-10-11T01:03:34.469Z" }, + { url = "https://files.pythonhosted.org/packages/38/05/8e3e07fd8a0d33d06955ff4e54a1cb92f4bce347ff55e441dc3e25a7b5e5/aiohttp-3.14.5-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3112585250b199296c26ca6e0131640b6a8d01bab8b232d2eb3763ed469de11", size = 1891314, upload-time = "2026-10-11T01:03:36.899Z" }, + { url = "https://files.pythonhosted.org/packages/b6/b3/05a79ce2e25f024e93de30c94f39dc6aa6e2bc1e9c531a5c4b18dc61b7a4/aiohttp-3.14.5-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c147451b4a58e7050f7f7394e6c467867c84161560001f9ad4fb2d1446743946", size = 1884372, upload-time = "2026-10-11T01:03:39.334Z" }, + { url = "https://files.pythonhosted.org/packages/94/52/0fd8af0717db109eea258191b326b5cb5847fb88928bfa6c862fd78b9ad3/aiohttp-3.14.5-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bf163cc701f3d4ac43ba7d97771bf5fd955220ef5500ef3ee847bc0ecfbf4ec1", size = 1930957, upload-time = "2026-10-11T01:03:42.172Z" }, + { url = "https://files.pythonhosted.org/packages/4e/b3/fa78733da88812bf9fb193913fb0ce1548f8b6912047633fdf88a758ff8c/aiohttp-3.14.5-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f8d40ce41991e9d56fab4f5dc4a51fe59bc3b5c77c27f4b148963064d00232e8", size = 2038886, upload-time = "2026-10-11T01:03:44.646Z" }, + { url = "https://files.pythonhosted.org/packages/cf/f5/2fcc5e30053a938286f17d0edf3f0850b8061b984256fa7c26850b9c8809/aiohttp-3.14.5-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:276a4fc00b1d9ae492b802763a789c5b86328b989c5ea169f2faa447d6a11c7c", size = 1894470, upload-time = "2026-10-11T01:03:47.304Z" }, + { url = "https://files.pythonhosted.org/packages/62/2a/f87feb42abe8e6a7c03814dbcb711540849a1e90aa392055f3183c643610/aiohttp-3.14.5-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:50983e3be33d8c0942ab88cec3905b10602f64c469b20153c48c5d4e558dd016", size = 1716273, upload-time = "2026-10-11T01:03:50.121Z" }, + { url = "https://files.pythonhosted.org/packages/81/b2/adf1f960dd977722ed1347d33da512a1624807114f57a3b91f5cc828e081/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:16c8abd5bca220a47efe667d26f8460124c81810787e79ee87b242677563d9dd", size = 1857513, upload-time = "2026-10-11T01:03:52.959Z" }, + { url = "https://files.pythonhosted.org/packages/d7/fd/ef8d910e641de4160026a513ace5888b7f92826bbc3fd90ced05d55a828e/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:0790ec66fa4013e83c53b9025a45d454723da1a2fce28b3208c9b32d08af162f", size = 1887704, upload-time = "2026-10-11T01:03:55.641Z" }, + { url = "https://files.pythonhosted.org/packages/7e/db/6c9142f941cba8d35be8e1fae6ea2bd390e754fc14076b8147aee1a4592f/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:cb11a971a3aea10f9b8373be628f1df932964fc6c6b174516d318a48c3ac4412", size = 1895684, upload-time = "2026-10-11T01:03:58.18Z" }, + { url = "https://files.pythonhosted.org/packages/e6/7c/6a6bd9a72e576d376c668333b00c51c6147aba4fb863ed6c94996d497eca/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:932ce7e694bbc29b2bf6f64f2343c27d148d4997c771d01bdade4639b6749ff4", size = 1706299, upload-time = "2026-10-11T01:04:00.8Z" }, + { url = "https://files.pythonhosted.org/packages/69/ec/d2cc494242f8c4d3d1cd70baf591742818a74386dc3b84af3195c5c4fced/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:a7d470cf7b206e6359fc77b1b860632fde400d5a2ed59cd0181b93a686bc81ee", size = 1916645, upload-time = "2026-10-11T01:04:03.892Z" }, + { url = "https://files.pythonhosted.org/packages/a3/6e/e852c53647e815db09a1b6b5ab634f54bd736412397e11940feef4d2c89a/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:6e1d8637cf73eebc92eba2e11d4cfff98a3b562f2505bd75bba766d908926e8d", size = 1875408, upload-time = "2026-10-11T01:04:06.922Z" }, + { url = "https://files.pythonhosted.org/packages/fe/f6/72ab6ef20c332399be593bac543d2c24a6d241e39d3540ce9f95a63e4bd2/aiohttp-3.14.5-cp315-cp315-win32.whl", hash = "sha256:fbdc5ec49f9ca3cd24955cf3520b10a4d4c901ba2572094c84274e9e7eb30534", size = 485590, upload-time = "2026-10-11T01:04:09.626Z" }, + { url = "https://files.pythonhosted.org/packages/06/eb/e9de75b8c6d2170c42c08ff303abf857ea8a6d9d9b6e99b5aba40f15e962/aiohttp-3.14.5-cp315-cp315-win_amd64.whl", hash = "sha256:a9d3983bd6ab7aa1cfd573544ae98df9b6cb6912a5185a198263e024a636861d", size = 511740, upload-time = "2026-10-11T01:04:12.277Z" }, + { url = "https://files.pythonhosted.org/packages/fc/25/455f3c2785eb0d50748cffd0abd07500815f419a9495b14610b7622d8d2d/aiohttp-3.14.5-cp315-cp315-win_arm64.whl", hash = "sha256:e29347c142cf6e99e0dff5e2995ead1d50fa3b51bf37a7c726a7ccfe5419745a", size = 495171, upload-time = "2026-10-11T01:04:14.667Z" }, + { url = "https://files.pythonhosted.org/packages/e7/6c/497f0a98782eebfcf0f02a7fbdef5428148bd426027140cbad494cf842b5/aiohttp-3.14.5-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:9bf1d5dcc15204d9ec8b8ea4c18fd66e6b80e5de1f4ecbafb3a2f2740f8039d4", size = 855638, upload-time = "2026-10-11T01:04:17.154Z" }, + { url = "https://files.pythonhosted.org/packages/9a/c5/55c0cef2572af9b1ee81608f7c0a1bf74e6c9151a73b04915d933f192335/aiohttp-3.14.5-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:14f04769cfefe4734016a856a83af36133cd17779cef9ae817f812b8ba9d6d51", size = 567455, upload-time = "2026-10-11T01:04:19.702Z" }, + { url = "https://files.pythonhosted.org/packages/4d/47/e1a0e39f4a2b881f6071225afaf94a6547001b5aefc1566734d73c685934/aiohttp-3.14.5-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:6e4251c0ba4624a68a2c11471a1ac54c3306876c21f0ae86de085cc9241c8905", size = 567836, upload-time = "2026-10-11T01:04:22.235Z" }, + { url = "https://files.pythonhosted.org/packages/c3/1d/817d85836f52b687160064a326e62e037dc42f1ad5b6b5188a70e5c134b5/aiohttp-3.14.5-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e4f5cf4dc72a71c4cfa9751b4950be22f733626670230d46e7d606592aa22d59", size = 2051409, upload-time = "2026-10-11T01:04:24.821Z" }, + { url = "https://files.pythonhosted.org/packages/f7/25/e8ea6fc212a9aabce982917346ce8ecab0929c74b60232a056dd11c99da0/aiohttp-3.14.5-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:dbf53ae2601b7fd5a93c3944deea3a78d40f495226d582c35ef7a433425ce2b2", size = 1936493, upload-time = "2026-10-11T01:04:27.456Z" }, + { url = "https://files.pythonhosted.org/packages/24/33/de0517f71f1a19feea4aff78a2ec4ec2d98634129ec30ead78fce2f8f81b/aiohttp-3.14.5-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:657291433bf4dd3142f3abac495764cd47d0c7c92087751e6666c6447e65fcef", size = 2021405, upload-time = "2026-10-11T01:04:30.276Z" }, + { url = "https://files.pythonhosted.org/packages/c4/11/ddaf2e7930543e9f0cad3a1c54e1af0c1bd2fae3973d568c4263d3b010e9/aiohttp-3.14.5-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3e51a27980c3788e6e6b3325d694fdd4898087fa8a86b2763af77b39353da41e", size = 2142017, upload-time = "2026-10-11T01:04:33.022Z" }, + { url = "https://files.pythonhosted.org/packages/1d/7b/58784353c06de8adc20f426daad3d85dd86fd55331c713a3f4b638c94573/aiohttp-3.14.5-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:82c7583cd3dfdc7dcc927835b4f6c7faae7ecc1ba3ca5879321621ae2e6f8e84", size = 2002482, upload-time = "2026-10-11T01:04:35.94Z" }, + { url = "https://files.pythonhosted.org/packages/b9/f0/417d9535caa9e165ffe6a53e2347a78107e7c87dcb0e10aca315c3af0344/aiohttp-3.14.5-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6fdcd6af7e2e51d1ba1b4bea16e97b074bcb7b5dd0246a9d8201341bb28085a0", size = 1791774, upload-time = "2026-10-11T01:04:38.733Z" }, + { url = "https://files.pythonhosted.org/packages/98/01/25e49c2e8a01b9f0e19ca0a8448ad50aa2bdf96c8cd41e92bd45af044784/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:c8859a013ae0de1074660992139a1a440df3e6b219b86cf0d3f11c2692bb4fe3", size = 1970358, upload-time = "2026-10-11T01:04:41.66Z" }, + { url = "https://files.pythonhosted.org/packages/2d/fc/c132fd3465b6c7e4ce0193154f602c3e6c46b680e4da7eb3bd0d8a40d1c7/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:8966ecac808dd5f473c9c4cefd10cd3ffda71c18a4d3493b7c7d2ae1803bf2cc", size = 1969192, upload-time = "2026-10-11T01:04:44.66Z" }, + { url = "https://files.pythonhosted.org/packages/95/4e/d58b45e7dba4eb607eca11fc0a4aa77ae0f39c11afa804635a61ce18cff4/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:3093b72c215bda16ce961a6d073f6e71d46e022962a9d5d457c5d4d421c78b57", size = 1963618, upload-time = "2026-10-11T01:04:47.505Z" }, + { url = "https://files.pythonhosted.org/packages/a2/d9/f6ac50946efb3490428ef52b56e62c1c6b7f9c6ff3ec6083535526c83e60/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:149fb56caf7acb67073126f675d0958d9c4b3125fcd3f6d4877df98aa8a97ce9", size = 1784817, upload-time = "2026-10-11T01:04:50.287Z" }, + { url = "https://files.pythonhosted.org/packages/d0/2f/f255eb63da788cd8a452fe350869c03266ccad7d884925f6963c87808f24/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:293d3ae7c6a0ed176a42e59a1b5fde825ead65c835360f734148e96729f928d2", size = 1995956, upload-time = "2026-10-11T01:04:53.213Z" }, + { url = "https://files.pythonhosted.org/packages/d9/9b/241aa3393eaafda0034470add1625f82a4c252901108723b283a9b0b32ca/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:3f2dcc00191fd563e9075181a14ec31d7dd63223ced7582cc70a15a499de0c79", size = 1967794, upload-time = "2026-10-11T01:04:55.958Z" }, + { url = "https://files.pythonhosted.org/packages/5f/7f/a68e689288c9e4bfcf8d0979f2b12b774bf01861985420df6150eba5448e/aiohttp-3.14.5-cp315-cp315t-win32.whl", hash = "sha256:7779cd97e61ebe583ec2f1c5616cdd038aa08a4453b1848c67842176d054948e", size = 503876, upload-time = "2026-10-11T01:04:58.978Z" }, + { url = "https://files.pythonhosted.org/packages/a4/78/49b0299da6d54de19fc6fdc6889d50233ac47d192a461624f4fc010fde83/aiohttp-3.14.5-cp315-cp315t-win_amd64.whl", hash = "sha256:0e6f16f5e49c4b8267988c05ab07760d7064cea57d077c3d068d04b0fbb992cb", size = 530957, upload-time = "2026-10-11T01:05:02.23Z" }, + { url = "https://files.pythonhosted.org/packages/21/d4/b0afc936aeb6d2f93157e3408b069ec5d7934429ae7d023de5e0953b1887/aiohttp-3.14.5-cp315-cp315t-win_arm64.whl", hash = "sha256:1aead151c3abbac6b32942e452020cb66d7efc099d253cc6c20f748e926c858b", size = 510408, upload-time = "2026-10-11T01:05:05.362Z" }, + { url = "https://files.pythonhosted.org/packages/68/30/173960c42b05a6c59f7558e4b12a4b0d9ba376cf6aa9bde7f9e08a30ca8d/aiohttp-3.14.5-py3-none-any.whl", hash = "sha256:efc21a454892828368b11c2c780de0ff8bc991f73f6b99c6b66e56205470929b", size = 279517, upload-time = "2026-10-11T01:05:08.523Z" }, +] + +[[package]] +name = "aioitertools" +version = "0.13.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fd/3c/53c4a17a05fb9ea2313ee1777ff53f5e001aefd5cc85aa2f4c2d982e1e38/aioitertools-0.13.0.tar.gz", hash = "sha256:620bd241acc0bbb9ec819f1ab215866871b4bbd1f73836a55f799200ee86950c", size = 19322, upload-time = "2025-11-06T22:17:07.609Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/a1/510b0a7fadc6f43a6ce50152e69dbd86415240835868bb0bd9b5b88b1e06/aioitertools-0.13.0-py3-none-any.whl", hash = "sha256:0be0292b856f08dfac90e31f4739432f4cb6d7520ab9eb73e143f4f2fa5259be", size = 24182, upload-time = "2025-11-06T22:17:06.502Z" }, ] [[package]] @@ -140,7 +251,7 @@ name = "aiosignal" version = "1.4.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "frozenlist", marker = "python_full_version < '3.14'" }, + { name = "frozenlist" }, { name = "typing-extensions", marker = "python_full_version < '3.13'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz", hash = "sha256:f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7", size = 25007, upload-time = "2025-07-03T22:54:43.528Z" } @@ -148,46 +259,157 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fb/76/641ae371508676492379f16e2fa48f4e2c11741bd63c48be4b12a6b09cba/aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e", size = 7490, upload-time = "2025-07-03T22:54:42.156Z" }, ] +[[package]] +name = "aiosqlite" +version = "0.22.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4e/8a/64761f4005f17809769d23e518d915db74e6310474e733e3593cfc854ef1/aiosqlite-0.22.1.tar.gz", hash = "sha256:043e0bd78d32888c0a9ca90fc788b38796843360c855a7262a532813133a0650", size = 14821, upload-time = "2025-12-23T19:25:43.997Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/00/b7/e3bf5133d697a08128598c8d0abc5e16377b51465a33756de24fa7dee953/aiosqlite-0.22.1-py3-none-any.whl", hash = "sha256:21c002eb13823fad740196c5a2e9d8e62f6243bd9e7e4a1f87fb5e44ecb4fceb", size = 17405, upload-time = "2025-12-23T19:25:42.139Z" }, +] + +[[package]] +name = "annotated-doc" +version = "0.0.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/8e/38aa427ed5402449e226975b649c5dc73ccadfefeb95e6aecb8f8ea4b6b6/annotated_doc-0.0.5.tar.gz", hash = "sha256:c7e58ce09192557605d8bbd92836d7e1d520ac9580096042c0bfd197efacf1bb", size = 10758, upload-time = "2026-07-28T13:50:58.129Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3e/30/e900b21425a860e195f32e37657aa1f7c7f2b1bfb26f03ca209b90933c06/annotated_doc-0.0.5-py3-none-any.whl", hash = "sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101", size = 5302, upload-time = "2026-07-28T13:50:57.239Z" }, +] + [[package]] name = "annotated-types" -version = "0.7.0" +version = "0.8.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } +sdist = { url = "https://files.pythonhosted.org/packages/5f/56/a8120250d128bed162cd73c76d45f6ef9991f3e068f62a8ee060afa3104a/annotated_types-0.8.0.tar.gz", hash = "sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7", size = 15893, upload-time = "2026-07-23T20:16:13.995Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, + { url = "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", size = 13427, upload-time = "2026-07-23T20:16:12.938Z" }, ] [[package]] -name = "anyio" -version = "4.11.0" +name = "anthropic" +version = "1.13.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, - { name = "idna" }, + { name = "anyio" }, + { name = "docstring-parser" }, + { name = "httpx2" }, + { name = "jiter" }, + { name = "pydantic" }, { name = "sniffio" }, - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz", hash = "sha256:82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4", size = 219094, upload-time = "2025-09-23T09:19:12.58Z" } +sdist = { url = "https://files.pythonhosted.org/packages/0b/ed/e76e50601b7c476bcb9a2a7a4c4dab6f1a9b2c03e3922de8b3ec599ccbc5/anthropic-1.13.0.tar.gz", hash = "sha256:ad11d9bb9adafdfea26113943bcde9973e2a439ebeeda6c89ff3e3d85bb2f5c1", size = 1567362, upload-time = "2026-10-09T15:29:08.803Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/15/b3/9b1a8074496371342ec1e796a96f99c82c945a339cd81a8e73de28b4cf9e/anyio-4.11.0-py3-none-any.whl", hash = "sha256:0287e96f4d26d4149305414d4e3bc32f0dcd0862365a4bddea19d7a1ec38c4fc", size = 109097, upload-time = "2025-09-23T09:19:10.601Z" }, + { url = "https://files.pythonhosted.org/packages/ad/9a/a835340c91bc9a233bd54c05fc438fe07cbef71ca667f24f3892a268ae20/anthropic-1.13.0-py3-none-any.whl", hash = "sha256:157bd74dbf6a595cf9e5fcac557c791fd297924dc48261f57470c2ed6f4e6671", size = 1958595, upload-time = "2026-10-09T15:29:10.689Z" }, ] [[package]] -name = "async-timeout" -version = "5.0.1" +name = "antlr4-python3-runtime" +version = "4.13.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a5/ae/136395dfbfe00dfc94da3f3e136d0b13f394cba8f4841120e34226265780/async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3", size = 9274, upload-time = "2024-11-06T16:41:39.6Z" } +sdist = { url = "https://files.pythonhosted.org/packages/33/5f/2cdf6f7aca3b20d3f316e9f505292e1f256a32089bd702034c29ebde6242/antlr4_python3_runtime-4.13.2.tar.gz", hash = "sha256:909b647e1d2fc2b70180ac586df3933e38919c85f98ccc656a96cd3f25ef3916", size = 117467, upload-time = "2024-08-03T19:00:12.757Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fe/ba/e2081de779ca30d473f21f5b30e0e737c438205440784c7dfc81efc2b029/async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c", size = 6233, upload-time = "2024-11-06T16:41:37.9Z" }, + { url = "https://files.pythonhosted.org/packages/89/03/a851e84fcbb85214dc637b6378121ef9a0dd61b4c65264675d8a5c9b1ae7/antlr4_python3_runtime-4.13.2-py3-none-any.whl", hash = "sha256:fe3835eb8d33daece0e799090eda89719dbccee7aa39ef94eed3818cafa5a7e8", size = 144462, upload-time = "2024-08-03T19:00:11.134Z" }, +] + +[[package]] +name = "anyio" +version = "4.15.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "idna" }, + { name = "typing-extensions", marker = "python_full_version < '3.15'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a9/d2/f4d173e22df740bc37b1db102b386ba719b66e95b0f0d751f556b387e6d2/anyio-4.15.1.tar.gz", hash = "sha256:9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94", size = 276966, upload-time = "2026-09-05T10:42:39.44Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/b8/4bd346e22b28902df4d651910f5242c28d84e4a5c2435ca5c3f797ed7e2e/anyio-4.15.1-py3-none-any.whl", hash = "sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101", size = 132079, upload-time = "2026-09-05T10:42:37.923Z" }, +] + +[[package]] +name = "ast-serialize" +version = "0.13.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/21/d5/5dc1ee8a80c3b20a0b63c61b43ba6bc53517faecd1def47bcd752d22268e/ast_serialize-0.13.1.tar.gz", hash = "sha256:401cc84e8888d4d76f2c8d296fa006ed1a5ff993b6aff90dd777c03973efd025", size = 955137, upload-time = "2026-10-17T00:04:17.183Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f3/a8/fbd136b9f70c59e75f59a8e974c84102976f1201828b4f886480ba956936/ast_serialize-0.13.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:3e129d44b0cffbea24a7f40117ce49e30993c3d119e584d4817ebd6f87246456", size = 897306, upload-time = "2026-10-17T00:02:52.479Z" }, + { url = "https://files.pythonhosted.org/packages/50/3f/2ad51e9823a790e7a70fd781e9595ab3abeace27f3aefcaa1939457efd72/ast_serialize-0.13.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:523d45bab16ddaf1399c04c4fe81bbf180f81e33c2f7bcbe76be56b0f7311ab4", size = 1236082, upload-time = "2026-10-17T00:02:54.82Z" }, + { url = "https://files.pythonhosted.org/packages/c0/5c/8e959db5cc2237f9d4c560a8e2253c98f9746883fb4774651e4cda458901/ast_serialize-0.13.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:638333fb8ae72c62753f9e794fda20290883ddc65b0d85e26e08f8bb227567ad", size = 1221242, upload-time = "2026-10-17T00:02:56.395Z" }, + { url = "https://files.pythonhosted.org/packages/d6/05/ab1c56c3b7adcac88764bba609502d6b4989e449b2dd60eb478e1d20e369/ast_serialize-0.13.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc34c670747d85d4232834665e247009413eaebe47c69eaf60a5c439aaecaed9", size = 1282105, upload-time = "2026-10-17T00:02:58.275Z" }, + { url = "https://files.pythonhosted.org/packages/0d/f4/41981fcd2ddffe0760e5326be9dcbd2eda9478a8430a637e5123bd8fcb26/ast_serialize-0.13.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8c8ebd419811c435812d242fb2a173e57dfede198c9ac9a0a584666ebc9b9331", size = 1287905, upload-time = "2026-10-17T00:03:00.068Z" }, + { url = "https://files.pythonhosted.org/packages/6a/43/b783addc5681153707121991b7b47892f7e9c8ba58a0d03b71a3b023ba47/ast_serialize-0.13.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8899c038b1c15ae8b98e379057fb3ef398ceb0b21d1737a8156dd5a0923b7e51", size = 1541806, upload-time = "2026-10-17T00:03:01.503Z" }, + { url = "https://files.pythonhosted.org/packages/47/10/969db095038ee15270f65ad20d1129c5e4da605bf7e93b70ae640f1c8a9f/ast_serialize-0.13.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e14c4de98f965647a74e6eaf37e20207124e45451ccd36e84a6f6ebab45e0372", size = 1309946, upload-time = "2026-10-17T00:03:02.971Z" }, + { url = "https://files.pythonhosted.org/packages/06/dd/7c623d2fb0b868948952d1787e629a43b866f7d4caefd5445e20aefacec4/ast_serialize-0.13.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f3e8a3eff69af640db985360fef35073fb46956dfc3e5c614cf00920d2746dd", size = 1302773, upload-time = "2026-10-17T00:03:04.378Z" }, + { url = "https://files.pythonhosted.org/packages/d4/c2/4d49469110a19a44fc6269f4fd59679bcf84df068f185f89b73bee4da19b/ast_serialize-0.13.1-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:75d7750fe98f6f35a96c43aba8d98a2e623e22c778a0c17ab9ede92eb10f5d82", size = 1299579, upload-time = "2026-10-17T00:03:05.88Z" }, + { url = "https://files.pythonhosted.org/packages/9d/9a/2d381f1f262dda15affc8ad643fba1619eb07e7d9f8bd904deffef183006/ast_serialize-0.13.1-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43e8ddd63e80fc280c2f790157386f27f9b9f6ccb9c4f8e803b863cbfb085769", size = 1355969, upload-time = "2026-10-17T00:03:07.321Z" }, + { url = "https://files.pythonhosted.org/packages/9d/9c/2266794e6c25fa9ce51ce04a9bf4b7e330e3ac9351ba3fa14e487678acdb/ast_serialize-0.13.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:9221e09496fb942901993c1812ee87950cc0ecbb514c7c0f1f5fa6d78f701ed8", size = 1460227, upload-time = "2026-10-17T00:03:08.733Z" }, + { url = "https://files.pythonhosted.org/packages/2b/d6/14deb28e5d8f328f626a0778ea2cf98fe908f2bbcccd804cb6f449ee1782/ast_serialize-0.13.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:7a5c38bdb93669c596f94fb7204dd6ebe4fadb19058ac9a2faf2948c2a175f96", size = 1562691, upload-time = "2026-10-17T00:03:10.25Z" }, + { url = "https://files.pythonhosted.org/packages/f5/19/7a28c0e5ba54f0d3e054f847a2a549b748cb179ab433321a8dc1b39e398d/ast_serialize-0.13.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:acf4e9f055d75058ab01536da330648746f2f82b7697a85230547f2d5ebe895c", size = 1558669, upload-time = "2026-10-17T00:03:11.799Z" }, + { url = "https://files.pythonhosted.org/packages/18/9a/f9e2690eab58217f1d395a964a78efa7eaf813a1e38be8dfd9a8d45d0840/ast_serialize-0.13.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:87427913c325adc811e81e7c9a757b061f47ef1e29114ac479aa0953a2687a98", size = 1665071, upload-time = "2026-10-17T00:03:13.284Z" }, + { url = "https://files.pythonhosted.org/packages/8e/f3/ef5b159a0d7161b404f05e7ec21cf7735ee7edc10c000cd2cbbc7bb6b69a/ast_serialize-0.13.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:ad88921f95b92bc144d9ad059a0e16f8c1ae69f5239f2d3c6536fd2774f73dfe", size = 1473364, upload-time = "2026-10-17T00:03:14.563Z" }, + { url = "https://files.pythonhosted.org/packages/1d/87/6e8ac4a865124a12cc4f915bf1bcfac3bba426cd5f58d3712a873ee61012/ast_serialize-0.13.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f8b17e2921e56621bcb46792bd3e0b82ca3b85de78d5936e7b8174ba1758b0aa", size = 1500566, upload-time = "2026-10-17T00:03:15.917Z" }, + { url = "https://files.pythonhosted.org/packages/f5/1e/29155f1621433008013ad5c940a03d41a676be0680c41527040472d37583/ast_serialize-0.13.1-cp314-cp314t-win32.whl", hash = "sha256:2f9a9ce8b0994f757b941f7f7fe384a6666b4162b941ebc5c248081baea18e47", size = 1128674, upload-time = "2026-10-17T00:03:17.481Z" }, + { url = "https://files.pythonhosted.org/packages/bb/64/2506da65143ea138de5822e9173e0b72320a2f70e23bd723f044033175f1/ast_serialize-0.13.1-cp314-cp314t-win_amd64.whl", hash = "sha256:5d99910e6b9a9b9360bcca2ae99aee36cc912ce058df2a57d1c33099b6cb2593", size = 1163306, upload-time = "2026-10-17T00:03:19.046Z" }, + { url = "https://files.pythonhosted.org/packages/6d/8f/c7cb22638899b0cf15908809c270560e46395e65604bc59e4b623ab9f405/ast_serialize-0.13.1-cp314-cp314t-win_arm64.whl", hash = "sha256:a789cbe14d0a0e9ec9b32a456e5abc81ad8799479c3cfd88a29e3442262aebe6", size = 1133775, upload-time = "2026-10-17T00:03:20.377Z" }, + { url = "https://files.pythonhosted.org/packages/2b/e2/b0c140fe50fa39dd249e382f7733af6f816c90021fe7959a0b026f86237f/ast_serialize-0.13.1-cp315-abi3.abi3t-macosx_10_12_x86_64.whl", hash = "sha256:23d768369b89d551077dc173da6892fad00443338417523b6732f4e8ba4a7ed5", size = 1236160, upload-time = "2026-10-17T00:03:21.945Z" }, + { url = "https://files.pythonhosted.org/packages/23/c4/a8a2ca21e3943555b48221f8fba546877a7ad39efaf6505506524967d7c4/ast_serialize-0.13.1-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:68f8829d114dab6c9db4a8bbb8d0e342958faee1b5e15a29022678df639960f8", size = 1222214, upload-time = "2026-10-17T00:03:23.462Z" }, + { url = "https://files.pythonhosted.org/packages/15/19/2f58f2ba64e4799b39de85c140aef09a03aa6ea53be75dd292a9d9b9d8ae/ast_serialize-0.13.1-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e385b17d5bde892a6184003a9aff3518387908b73f8f5ea539313c07c8c0ede", size = 1282979, upload-time = "2026-10-17T00:03:24.695Z" }, + { url = "https://files.pythonhosted.org/packages/b1/af/ca6087fe84210c1ccd43e3182917bb70649fa1e69745a90c1d59ba08fea8/ast_serialize-0.13.1-cp315-abi3.abi3t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:02686b281ec9b8e9614f6f0db27e12e4cac515f336c5d05b678bc9eb73ff2af5", size = 1288596, upload-time = "2026-10-17T00:03:26.04Z" }, + { url = "https://files.pythonhosted.org/packages/b0/2c/4ef964c763329a0347125e745ec0451ba4fbaceec9efe2ac729b7cd55f17/ast_serialize-0.13.1-cp315-abi3.abi3t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a8ab2c2585b2e22e48cd4aff2136fce4eab4ced569b85f150ef9a5a5d6f34d49", size = 1545540, upload-time = "2026-10-17T00:03:27.52Z" }, + { url = "https://files.pythonhosted.org/packages/bb/85/aa961dbb75813cfa94de0ce9a16a9510c226b95f604c405421e727f44bb0/ast_serialize-0.13.1-cp315-abi3.abi3t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c652d9f5d52d8b81eff3ff2c95c9dd0f281de45f6ad5d3fa95527550c396454a", size = 1309374, upload-time = "2026-10-17T00:03:29.091Z" }, + { url = "https://files.pythonhosted.org/packages/b4/e6/f2b67c327d9f9533e41791804403ccc2dc457821195a2e51f0b587a90b90/ast_serialize-0.13.1-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:121e1d08d58b75c15491cc3003609cbad71ac2b0016043c36d30a6b2032b6605", size = 1303466, upload-time = "2026-10-17T00:03:30.451Z" }, + { url = "https://files.pythonhosted.org/packages/73/1d/33f18b81d1bb1f5d682943ea92fda8130a6593627f12f6201668d40824fd/ast_serialize-0.13.1-cp315-abi3.abi3t-manylinux_2_31_riscv64.whl", hash = "sha256:30cf89b6a6844542d116c758725d13de5b97b9410a51ee577715f761270d0c1c", size = 1300576, upload-time = "2026-10-17T00:03:32.102Z" }, + { url = "https://files.pythonhosted.org/packages/25/cb/64914144925f1a4abdd9217e717b122255c38fc5ebe4342f92052f3bacbc/ast_serialize-0.13.1-cp315-abi3.abi3t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:732aaae9e498c973fc63fd7f308009b57c4afa6ff59d0b674d894e57d0bca01a", size = 1355960, upload-time = "2026-10-17T00:03:33.676Z" }, + { url = "https://files.pythonhosted.org/packages/ee/80/bd29379fab2bce19adc0bf9177002b11b23dfe8d8fecf409998b458b4624/ast_serialize-0.13.1-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:d9c1a920b2aa0c1e016bed7721689717034ca0dba64ac3a3ff243b003d4e8dd8", size = 1459779, upload-time = "2026-10-17T00:03:35.09Z" }, + { url = "https://files.pythonhosted.org/packages/83/89/012dbe733de05ffdf8e40ca0f9fa5d417cb16ec93a74463c57c001914198/ast_serialize-0.13.1-cp315-abi3.abi3t-musllinux_1_2_armv7l.whl", hash = "sha256:847cad4c22953823f5e76d0b126c6f9da670cfa45b1df41b9324e22189d77611", size = 1563399, upload-time = "2026-10-17T00:03:37.285Z" }, + { url = "https://files.pythonhosted.org/packages/69/37/ee4bcb0358bee38744eb0f18560446572d095fe3bf6b63d6f739d08a839c/ast_serialize-0.13.1-cp315-abi3.abi3t-musllinux_1_2_i686.whl", hash = "sha256:aca07de3ca8e3d9f2b716c3c31f4f384fe4bd2d03e09912417cff7a3e08036f7", size = 1558808, upload-time = "2026-10-17T00:03:38.711Z" }, + { url = "https://files.pythonhosted.org/packages/54/1c/ff44c5355251d61ef22934c4430bb31a61de4781d25a992154aac9b8c82a/ast_serialize-0.13.1-cp315-abi3.abi3t-musllinux_1_2_ppc64le.whl", hash = "sha256:5db12d843d931b9d1f1519ce66b9cbfe72d8563b75c1204d255322254d1964dd", size = 1666324, upload-time = "2026-10-17T00:03:40.376Z" }, + { url = "https://files.pythonhosted.org/packages/c8/bb/6da4bfc8aa3403e6447607131bf3463acaf954d990c6c8b6787c1902ddfe/ast_serialize-0.13.1-cp315-abi3.abi3t-musllinux_1_2_riscv64.whl", hash = "sha256:fb8021f4dc3296de18737e3b8b34994411da725374d74a0b9eb32a738f2a23d0", size = 1474089, upload-time = "2026-10-17T00:03:41.715Z" }, + { url = "https://files.pythonhosted.org/packages/21/97/897e33bef2eefd880e6350e375cc66bc5bcd00a139be480fd655f5b3f095/ast_serialize-0.13.1-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:0d764913374ba21df8cd618045b371ed104ce55c6276de7c59e554a4f5ba26fd", size = 1501542, upload-time = "2026-10-17T00:03:43.08Z" }, + { url = "https://files.pythonhosted.org/packages/8d/4c/821211ac83870c27e4412381b7c7838336456b40575bf840e4680b2018d9/ast_serialize-0.13.1-cp315-abi3.abi3t-win32.whl", hash = "sha256:2bad302ae2427454ef9dab71bd5c3ad67188860c39d36daee38f72031edb39c4", size = 1126118, upload-time = "2026-10-17T00:03:44.616Z" }, + { url = "https://files.pythonhosted.org/packages/1f/86/2b2d5e6c4fa352874a80618e742ffd32d249dee6c119f4233b51afc6b8f4/ast_serialize-0.13.1-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:032b09d86c785c3984e975378b7861f2a68ac44e22ba7b07b93a536b2524eeb8", size = 1163766, upload-time = "2026-10-17T00:03:45.986Z" }, + { url = "https://files.pythonhosted.org/packages/77/a3/d610cfcdabaa44fd62a54ca1fc57a7dba120643798b089a14914973562de/ast_serialize-0.13.1-cp315-abi3.abi3t-win_arm64.whl", hash = "sha256:929eda0c419e622ab49df3a4c45f81c57dcc10874bbad55d0470a4a03324dac3", size = 1134043, upload-time = "2026-10-17T00:03:48.453Z" }, + { url = "https://files.pythonhosted.org/packages/f0/89/0e30f9eddf7d44ccf9d25979030754fd0457af61fa4279acb8c293a04f97/ast_serialize-0.13.1-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:bf53a3ba1cbe45399fc1e4ccd684b8f2a11cca450f89706b79122f478534c6f5", size = 897546, upload-time = "2026-10-17T00:03:50.093Z" }, + { url = "https://files.pythonhosted.org/packages/81/92/d705be88ff452b9ba0088b554a0cbd308fd01879da092b33fd2ad7d1aa60/ast_serialize-0.13.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:4bcf1d5f4eefecaa325a34ecf079b2741189e7d0821523f92cb343a389a67489", size = 1242416, upload-time = "2026-10-17T00:03:51.521Z" }, + { url = "https://files.pythonhosted.org/packages/60/c2/98370845a7f35cb8a25782e78284b48e01bf3128339881d48d613f304f8f/ast_serialize-0.13.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:1b158f1c9e3a0d386913924c57995d6df78224868a4d0f215bdd41587c97b34a", size = 1229729, upload-time = "2026-10-17T00:03:52.825Z" }, + { url = "https://files.pythonhosted.org/packages/d8/8b/2d7ffed76addd9d3fcf37fb171400942735c8912264c763561a85407f6a8/ast_serialize-0.13.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77a6201b69ce42e919f2fd9a559138d5410b5d8afff7c3a6b1f500b0481ff7d8", size = 1292255, upload-time = "2026-10-17T00:03:54.148Z" }, + { url = "https://files.pythonhosted.org/packages/6b/2a/bb9e0e719d89cc950fadfcfcc9cb4bc7640419c4228c852f031ab8abf440/ast_serialize-0.13.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6eb0be64c9b8f1ed26637eef345abe75ea90351c92c85a8aec7838b3af971011", size = 1298501, upload-time = "2026-10-17T00:03:55.559Z" }, + { url = "https://files.pythonhosted.org/packages/7a/32/13ce07dce48226f5bd9cfd8f708ec101a8be05aa430cda4918ce31ce8c82/ast_serialize-0.13.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7f2427bddfca208e84de700044fadf9aef2769a70bae740a1bdabb89ee9e1117", size = 1553758, upload-time = "2026-10-17T00:03:56.952Z" }, + { url = "https://files.pythonhosted.org/packages/e2/fb/9b51d186db0c20ca28cbaaefd50f03b573c89327b9a2627820cbce22196b/ast_serialize-0.13.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88df960e67184a71874e5b2ee014f87d1254a0dbc1f903c7bd7b1ab7733ecaef", size = 1318258, upload-time = "2026-10-17T00:03:58.418Z" }, + { url = "https://files.pythonhosted.org/packages/c5/fa/da311559dd3dae9af5825cf21660775a929b970f72e3786af3f2cd667944/ast_serialize-0.13.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f99786e0d62082a5b121b3437f3167562133711df22128de1e9886f57f0b226", size = 1313260, upload-time = "2026-10-17T00:04:00.194Z" }, + { url = "https://files.pythonhosted.org/packages/2b/11/97a4b9e5b4776d72f47fcd9a09a497bbf68ec8c1ae074307a2c51e410d85/ast_serialize-0.13.1-cp39-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:a01b515b25a03184eff4acef25b981ae007916379682e908fc8785b342a0bf3e", size = 1309992, upload-time = "2026-10-17T00:04:01.575Z" }, + { url = "https://files.pythonhosted.org/packages/2e/c4/62f85121a80cd451ef04f550cf0f7ea0ad9ff46cc4e9a5b9ae439b6527b1/ast_serialize-0.13.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:29422d7bcd9e7f39411571c36cec45ce8a7a9b3ad4b2e7aa64497c15a9e397f6", size = 1362715, upload-time = "2026-10-17T00:04:02.881Z" }, + { url = "https://files.pythonhosted.org/packages/c1/fa/c5f4a545f72a7681e3295bab6e3600ee0862ec4391bed961fe9f735b67e0/ast_serialize-0.13.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6ffb0f548a7dc126067fdfb7b2325ab5dfcdeecc29faf5e0f0461c96d6ebfa3d", size = 1469931, upload-time = "2026-10-17T00:04:04.181Z" }, + { url = "https://files.pythonhosted.org/packages/38/a9/65aed4f8fa7a001a7cfdc03e68e844517ab041ba6fb614b7d78a1d6ac056/ast_serialize-0.13.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:2876444a5f87a7c76f371af3c07c2fda563a08bc8af52568df812e8aba4bf568", size = 1570945, upload-time = "2026-10-17T00:04:05.778Z" }, + { url = "https://files.pythonhosted.org/packages/fb/8c/44b2da991cede79bfbf52089f33a5f0168945466b3d9cd38b5dcf08e7130/ast_serialize-0.13.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:885a62ec6481ce58ab24c6357360d7a82023b62dd7e5e7ceccf59e9662a3272b", size = 1569978, upload-time = "2026-10-17T00:04:07.347Z" }, + { url = "https://files.pythonhosted.org/packages/46/e4/109b2a5beca700237767d5add920c2f8e1ba9bd5799b0faf143d0e9cf4ef/ast_serialize-0.13.1-cp39-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:2015fd0165e463aac3b1aadc6a1fa1e5820c14ca950821f4fe02f8a3f6a388d6", size = 1676082, upload-time = "2026-10-17T00:04:08.7Z" }, + { url = "https://files.pythonhosted.org/packages/73/e0/7df70f6dbb11b5762da5416318f08316a1c51348e0d69ec79ca5f98f836a/ast_serialize-0.13.1-cp39-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:eb41e1906502ac80d24ff343f45008552a3f5b5158607959fe6a07dbfc6eb037", size = 1483207, upload-time = "2026-10-17T00:04:10.162Z" }, + { url = "https://files.pythonhosted.org/packages/1f/bc/523aa1c08bd69b5654621beb3dc1a9035715a4a63762fb8d219d6fb3eb81/ast_serialize-0.13.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ca9acc67f796aa2554fa3037dccc022a4b08b38b2ad153edfac9c9bb7cb1f3c6", size = 1512140, upload-time = "2026-10-17T00:04:11.589Z" }, + { url = "https://files.pythonhosted.org/packages/66/83/6607060659998f00afdea0d8375c1e6e2b7d515ab905090d9a5a02f48851/ast_serialize-0.13.1-cp39-abi3-win32.whl", hash = "sha256:4f98da562e5901d69c7dd30885594c5438f859edf354e9ac7517d188fb026c3a", size = 1131889, upload-time = "2026-10-17T00:04:12.953Z" }, + { url = "https://files.pythonhosted.org/packages/9f/6f/bafd6490fe7b355627fabe95f4417e3d02da93102c8552550eb9a0774e1e/ast_serialize-0.13.1-cp39-abi3-win_amd64.whl", hash = "sha256:ddf7cbc9c8abf70102c4a088efe154bb86bfb825b0a10e556d2b15972cf99bd7", size = 1171153, upload-time = "2026-10-17T00:04:14.362Z" }, + { url = "https://files.pythonhosted.org/packages/11/25/4235f4b375a67a37ac595bf478a5407a744eaf7b64113c1c3a5432b8d954/ast_serialize-0.13.1-cp39-abi3-win_arm64.whl", hash = "sha256:48f11d96c9ec71119612f8e79a8c55c12f2b136716d68347433c561d27a25f43", size = 1139035, upload-time = "2026-10-17T00:04:15.767Z" }, ] [[package]] name = "attrs" -version = "25.4.0" +version = "26.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, +] + +[[package]] +name = "authlib" +version = "1.9.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz", hash = "sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11", size = 934251, upload-time = "2025-10-06T13:54:44.725Z" } +dependencies = [ + { name = "cryptography" }, + { name = "joserfc" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c9/dc/087c08741a98d234c9b98beef8a28d3c309f814d14b6156422c5815bf6d6/authlib-1.9.1.tar.gz", hash = "sha256:5c7d9848f47cac340f060f76ae0bc09b59f5c8e89cc1bb032d4370a0c55b5974", size = 182700, upload-time = "2026-10-14T14:17:52.307Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/2a/7cc015f5b9f5db42b7d48157e23356022889fc354a2813c15934b7cb5c0e/attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373", size = 67615, upload-time = "2025-10-06T13:54:43.17Z" }, + { url = "https://files.pythonhosted.org/packages/39/44/a46089266de32a0d809023b6bf31b80a1f26a46954446a7ce695a565cbea/authlib-1.9.1-py2.py3-none-any.whl", hash = "sha256:8b9be8b1e5174dcbf5520e984f1a22dc2edae5b6e40a61d4cedbf86b97e9e69b", size = 266042, upload-time = "2026-10-14T14:17:50.695Z" }, ] [[package]] @@ -199,6 +421,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/02/ff/1175b0b7371e46244032d43a56862d0af455823b5280a50c63d99cc50f18/automat-25.4.16-py3-none-any.whl", hash = "sha256:04e9bce696a8d5671ee698005af6e5a9fa15354140a87f4870744604dcdd3ba1", size = 42842, upload-time = "2025-04-16T20:12:14.447Z" }, ] +[[package]] +name = "aws-xray-sdk" +version = "2.15.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "botocore" }, + { name = "wrapt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/14/25/0cbd7a440080def5e6f063720c3b190a25f8aa2938c1e34415dc18241596/aws_xray_sdk-2.15.0.tar.gz", hash = "sha256:794381b96e835314345068ae1dd3b9120bd8b4e21295066c37e8814dbb341365", size = 76315, upload-time = "2025-10-29T20:59:45Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/c3/f30a7a63e664acc7c2545ca0491b6ce8264536e0e5cad3965f1d1b91e960/aws_xray_sdk-2.15.0-py2.py3-none-any.whl", hash = "sha256:422d62ad7d52e373eebb90b642eb1bb24657afe03b22a8df4a8b2e5108e278a3", size = 103228, upload-time = "2025-10-29T21:00:24.12Z" }, +] + [[package]] name = "backports-tarfile" version = "1.2.0" @@ -208,6 +443,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b9/fa/123043af240e49752f1c4bd24da5053b6bd00cad78c2be53c0d1e8b975bc/backports.tarfile-1.2.0-py3-none-any.whl", hash = "sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34", size = 30181, upload-time = "2024-05-28T17:01:53.112Z" }, ] +[[package]] +name = "basedpyright" +version = "1.34.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nodejs-wheel-binaries" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a3/77/ded02ba2b400807b291fa2b9d29ac7f473e86a45d1f5212d8276e9029107/basedpyright-1.34.0.tar.gz", hash = "sha256:7ae3b06f644fac15fdd14a00d0d1f12f92a8205ae1609aabd5a0799b1a68be1d", size = 22803348, upload-time = "2025-11-19T14:48:16.38Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/9e/ced31964ed49f06be6197bd530958b6ddca9a079a8d7ee0ee7429cae9e27/basedpyright-1.34.0-py3-none-any.whl", hash = "sha256:e76015c1ebb671d2c6d7fef8a12bc0f1b9d15d74e17847b7b95a3a66e187c70f", size = 11865958, upload-time = "2025-11-19T14:48:13.724Z" }, +] + [[package]] name = "bashlex" version = "0.18" @@ -217,26 +464,72 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f4/be/6985abb1011fda8a523cfe21ed9629e397d6e06fb5bae99750402b25c95b/bashlex-0.18-py2.py3-none-any.whl", hash = "sha256:91d73a23a3e51711919c1c899083890cdecffc91d8c088942725ac13e9dcfffa", size = 69539, upload-time = "2023-01-18T15:21:24.167Z" }, ] +[[package]] +name = "blinker" +version = "1.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf", size = 22460, upload-time = "2024-11-08T17:25:47.436Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc", size = 8458, upload-time = "2024-11-08T17:25:46.184Z" }, +] + +[[package]] +name = "boto3" +version = "1.40.61" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "botocore" }, + { name = "jmespath" }, + { name = "s3transfer" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ed/f9/6ef8feb52c3cce5ec3967a535a6114b57ac7949fd166b0f3090c2b06e4e5/boto3-1.40.61.tar.gz", hash = "sha256:d6c56277251adf6c2bdd25249feae625abe4966831676689ff23b4694dea5b12", size = 111535, upload-time = "2025-10-28T19:26:57.247Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/61/24/3bf865b07d15fea85b63504856e137029b6acbc73762496064219cdb265d/boto3-1.40.61-py3-none-any.whl", hash = "sha256:6b9c57b2a922b5d8c17766e29ed792586a818098efe84def27c8f582b33f898c", size = 139321, upload-time = "2025-10-28T19:26:55.007Z" }, +] + +[[package]] +name = "botocore" +version = "1.40.61" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jmespath" }, + { name = "python-dateutil" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/28/a3/81d3a47c2dbfd76f185d3b894f2ad01a75096c006a2dd91f237dca182188/botocore-1.40.61.tar.gz", hash = "sha256:a2487ad69b090f9cccd64cf07c7021cd80ee9c0655ad974f87045b02f3ef52cd", size = 14393956, upload-time = "2025-10-28T19:26:46.108Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/c5/f6ce561004db45f0b847c2cd9b19c67c6bf348a82018a48cb718be6b58b0/botocore-1.40.61-py3-none-any.whl", hash = "sha256:17ebae412692fd4824f99cde0f08d50126dc97954008e5ba2b522eb049238aa7", size = 14055973, upload-time = "2025-10-28T19:26:42.15Z" }, +] + +[[package]] +name = "botocore-stubs" +version = "1.43.112" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f7/b4/11461e9eefc1a58acd87788f57fef2703fdadee4abdf39bdf890af029b99/botocore_stubs-1.43.112.tar.gz", hash = "sha256:eda6315f1976939aff1b9bb8bedd88ecc8bae9a1551a62b23050e876a4237dd1", size = 42914, upload-time = "2026-10-13T01:58:00.541Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9c/20/35b81efaa2a4818f67c585201bc912436d9cecb8a23385b66a2044aac188/botocore_stubs-1.43.112-py3-none-any.whl", hash = "sha256:a86d150dc924e072ede90d42415a6da81edc232330ea7ac4972e53fb3174f762", size = 67249, upload-time = "2026-10-13T01:57:57.419Z" }, +] + [[package]] name = "bracex" -version = "2.6" +version = "3.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/63/9a/fec38644694abfaaeca2798b58e276a8e61de49e2e37494ace423395febc/bracex-2.6.tar.gz", hash = "sha256:98f1347cd77e22ee8d967a30ad4e310b233f7754dbf31ff3fceb76145ba47dc7", size = 26642, upload-time = "2025-06-22T19:12:31.254Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e1/60/e2a6409041cb3f8ce7ac3d6917b5b30c39f81a0a5b2d414ec30f36fd96bf/bracex-3.1.tar.gz", hash = "sha256:35c69fc105f08d77c02722e8ae707c656ff298dd4d26c89bcb3c98fca8bc3614", size = 29040, upload-time = "2026-10-11T15:26:07.143Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9d/2a/9186535ce58db529927f6cf5990a849aa9e052eea3e2cfefe20b9e1802da/bracex-2.6-py3-none-any.whl", hash = "sha256:0b0049264e7340b3ec782b5cb99beb325f36c3782a32e36e876452fd49a09952", size = 11508, upload-time = "2025-06-22T19:12:29.781Z" }, + { url = "https://files.pythonhosted.org/packages/05/79/c1ba46e1acd235affd36ce1d3346320ddcda663c9482a9e5f34727db1d11/bracex-3.1-py3-none-any.whl", hash = "sha256:52002b8455658c21f3b6e5eb0f662b57ec9085f42709e58bc86eeab5bc4c37d7", size = 11925, upload-time = "2026-10-11T15:26:05.683Z" }, ] [[package]] name = "cachecontrol" -version = "0.14.3" +version = "0.14.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "msgpack" }, { name = "requests" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/58/3a/0cbeb04ea57d2493f3ec5a069a117ab467f85e4a10017c6d854ddcbff104/cachecontrol-0.14.3.tar.gz", hash = "sha256:73e7efec4b06b20d9267b441c1f733664f989fb8688391b670ca812d70795d11", size = 28985, upload-time = "2025-04-30T16:45:06.135Z" } +sdist = { url = "https://files.pythonhosted.org/packages/2d/f6/c972b32d80760fb79d6b9eeb0b3010a46b89c0b23cf6329417ff7886cd22/cachecontrol-0.14.4.tar.gz", hash = "sha256:e6220afafa4c22a47dd0badb319f84475d79108100d04e26e8542ef7d3ab05a1", size = 16150, upload-time = "2025-11-14T04:32:13.138Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/81/4c/800b0607b00b3fd20f1087f80ab53d6b4d005515b0f773e4831e37cfa83f/cachecontrol-0.14.3-py3-none-any.whl", hash = "sha256:b35e44a3113f17d2a31c1e6b27b9de6d4405f84ae51baa8c1d3cc5b633010cae", size = 21802, upload-time = "2025-04-30T16:45:03.863Z" }, + { url = "https://files.pythonhosted.org/packages/ef/79/c45f2d53efe6ada1110cf6f9fca095e4ff47a0454444aefdde6ac4789179/cachecontrol-0.14.4-py3-none-any.whl", hash = "sha256:b7ac014ff72ee199b5f8af1de29d60239954f223e948196fa3d84adaffc71d2b", size = 22247, upload-time = "2025-11-14T04:32:11.733Z" }, ] [package.optional-dependencies] @@ -246,158 +539,326 @@ filecache = [ [[package]] name = "certifi" -version = "2025.10.5" +version = "2026.7.22" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/4c/5b/b6ce21586237c77ce67d01dc5507039d444b630dd76611bbca2d8e5dcd91/certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43", size = 164519, upload-time = "2025-10-05T04:12:15.808Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e4/37/af0d2ef3967ac0d6113837b44a4f0bfe1328c2b9763bd5b1744520e5cfed/certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de", size = 163286, upload-time = "2025-10-05T04:12:14.03Z" }, + { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" }, ] [[package]] name = "cffi" -version = "2.0.0" +version = "2.1.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pycparser", marker = "implementation_name != 'PyPy'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/50/bd/b1a6362b80628111e6653c961f987faa55262b4002fcec42308cad1db680/cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c", size = 208811, upload-time = "2025-09-08T23:22:12.267Z" }, - { url = "https://files.pythonhosted.org/packages/4f/27/6933a8b2562d7bd1fb595074cf99cc81fc3789f6a6c05cdabb46284a3188/cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb", size = 216402, upload-time = "2025-09-08T23:22:13.455Z" }, - { url = "https://files.pythonhosted.org/packages/05/eb/b86f2a2645b62adcfff53b0dd97e8dfafb5c8aa864bd0d9a2c2049a0d551/cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0", size = 203217, upload-time = "2025-09-08T23:22:14.596Z" }, - { url = "https://files.pythonhosted.org/packages/9f/e0/6cbe77a53acf5acc7c08cc186c9928864bd7c005f9efd0d126884858a5fe/cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4", size = 203079, upload-time = "2025-09-08T23:22:15.769Z" }, - { url = "https://files.pythonhosted.org/packages/98/29/9b366e70e243eb3d14a5cb488dfd3a0b6b2f1fb001a203f653b93ccfac88/cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453", size = 216475, upload-time = "2025-09-08T23:22:17.427Z" }, - { url = "https://files.pythonhosted.org/packages/21/7a/13b24e70d2f90a322f2900c5d8e1f14fa7e2a6b3332b7309ba7b2ba51a5a/cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495", size = 218829, upload-time = "2025-09-08T23:22:19.069Z" }, - { url = "https://files.pythonhosted.org/packages/60/99/c9dc110974c59cc981b1f5b66e1d8af8af764e00f0293266824d9c4254bc/cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5", size = 211211, upload-time = "2025-09-08T23:22:20.588Z" }, - { url = "https://files.pythonhosted.org/packages/49/72/ff2d12dbf21aca1b32a40ed792ee6b40f6dc3a9cf1644bd7ef6e95e0ac5e/cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb", size = 218036, upload-time = "2025-09-08T23:22:22.143Z" }, - { url = "https://files.pythonhosted.org/packages/b1/b7/1200d354378ef52ec227395d95c2576330fd22a869f7a70e88e1447eb234/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92", size = 209613, upload-time = "2025-09-08T23:22:29.475Z" }, - { url = "https://files.pythonhosted.org/packages/b8/56/6033f5e86e8cc9bb629f0077ba71679508bdf54a9a5e112a3c0b91870332/cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93", size = 216476, upload-time = "2025-09-08T23:22:31.063Z" }, - { url = "https://files.pythonhosted.org/packages/dc/7f/55fecd70f7ece178db2f26128ec41430d8720f2d12ca97bf8f0a628207d5/cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5", size = 203374, upload-time = "2025-09-08T23:22:32.507Z" }, - { url = "https://files.pythonhosted.org/packages/84/ef/a7b77c8bdc0f77adc3b46888f1ad54be8f3b7821697a7b89126e829e676a/cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664", size = 202597, upload-time = "2025-09-08T23:22:34.132Z" }, - { url = "https://files.pythonhosted.org/packages/d7/91/500d892b2bf36529a75b77958edfcd5ad8e2ce4064ce2ecfeab2125d72d1/cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26", size = 215574, upload-time = "2025-09-08T23:22:35.443Z" }, - { url = "https://files.pythonhosted.org/packages/44/64/58f6255b62b101093d5df22dcb752596066c7e89dd725e0afaed242a61be/cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9", size = 218971, upload-time = "2025-09-08T23:22:36.805Z" }, - { url = "https://files.pythonhosted.org/packages/ab/49/fa72cebe2fd8a55fbe14956f9970fe8eb1ac59e5df042f603ef7c8ba0adc/cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414", size = 211972, upload-time = "2025-09-08T23:22:38.436Z" }, - { url = "https://files.pythonhosted.org/packages/0b/28/dd0967a76aab36731b6ebfe64dec4e981aff7e0608f60c2d46b46982607d/cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743", size = 217078, upload-time = "2025-09-08T23:22:39.776Z" }, - { url = "https://files.pythonhosted.org/packages/ff/df/a4f0fbd47331ceeba3d37c2e51e9dfc9722498becbeec2bd8bc856c9538a/cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe", size = 212529, upload-time = "2025-09-08T23:22:47.349Z" }, - { url = "https://files.pythonhosted.org/packages/d5/72/12b5f8d3865bf0f87cf1404d8c374e7487dcf097a1c91c436e72e6badd83/cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062", size = 220097, upload-time = "2025-09-08T23:22:48.677Z" }, - { url = "https://files.pythonhosted.org/packages/c2/95/7a135d52a50dfa7c882ab0ac17e8dc11cec9d55d2c18dda414c051c5e69e/cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e", size = 207983, upload-time = "2025-09-08T23:22:50.06Z" }, - { url = "https://files.pythonhosted.org/packages/3a/c8/15cb9ada8895957ea171c62dc78ff3e99159ee7adb13c0123c001a2546c1/cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037", size = 206519, upload-time = "2025-09-08T23:22:51.364Z" }, - { url = "https://files.pythonhosted.org/packages/78/2d/7fa73dfa841b5ac06c7b8855cfc18622132e365f5b81d02230333ff26e9e/cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba", size = 219572, upload-time = "2025-09-08T23:22:52.902Z" }, - { url = "https://files.pythonhosted.org/packages/07/e0/267e57e387b4ca276b90f0434ff88b2c2241ad72b16d31836adddfd6031b/cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94", size = 222963, upload-time = "2025-09-08T23:22:54.518Z" }, - { url = "https://files.pythonhosted.org/packages/b6/75/1f2747525e06f53efbd878f4d03bac5b859cbc11c633d0fb81432d98a795/cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187", size = 221361, upload-time = "2025-09-08T23:22:55.867Z" }, - { url = "https://files.pythonhosted.org/packages/b0/1e/d22cc63332bd59b06481ceaac49d6c507598642e2230f201649058a7e704/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b", size = 212446, upload-time = "2025-09-08T23:23:03.472Z" }, - { url = "https://files.pythonhosted.org/packages/a9/f5/a2c23eb03b61a0b8747f211eb716446c826ad66818ddc7810cc2cc19b3f2/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b", size = 220101, upload-time = "2025-09-08T23:23:04.792Z" }, - { url = "https://files.pythonhosted.org/packages/f2/7f/e6647792fc5850d634695bc0e6ab4111ae88e89981d35ac269956605feba/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2", size = 207948, upload-time = "2025-09-08T23:23:06.127Z" }, - { url = "https://files.pythonhosted.org/packages/cb/1e/a5a1bd6f1fb30f22573f76533de12a00bf274abcdc55c8edab639078abb6/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3", size = 206422, upload-time = "2025-09-08T23:23:07.753Z" }, - { url = "https://files.pythonhosted.org/packages/98/df/0a1755e750013a2081e863e7cd37e0cdd02664372c754e5560099eb7aa44/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26", size = 219499, upload-time = "2025-09-08T23:23:09.648Z" }, - { url = "https://files.pythonhosted.org/packages/50/e1/a969e687fcf9ea58e6e2a928ad5e2dd88cc12f6f0ab477e9971f2309b57c/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c", size = 222928, upload-time = "2025-09-08T23:23:10.928Z" }, - { url = "https://files.pythonhosted.org/packages/36/54/0362578dd2c9e557a28ac77698ed67323ed5b9775ca9d3fe73fe191bb5d8/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b", size = 221302, upload-time = "2025-09-08T23:23:12.42Z" }, - { url = "https://files.pythonhosted.org/packages/d6/43/0e822876f87ea8a4ef95442c3d766a06a51fc5298823f884ef87aaad168c/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b", size = 220049, upload-time = "2025-09-08T23:23:20.853Z" }, - { url = "https://files.pythonhosted.org/packages/b4/89/76799151d9c2d2d1ead63c2429da9ea9d7aac304603de0c6e8764e6e8e70/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c", size = 207793, upload-time = "2025-09-08T23:23:22.08Z" }, - { url = "https://files.pythonhosted.org/packages/bb/dd/3465b14bb9e24ee24cb88c9e3730f6de63111fffe513492bf8c808a3547e/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef", size = 206300, upload-time = "2025-09-08T23:23:23.314Z" }, - { url = "https://files.pythonhosted.org/packages/47/d9/d83e293854571c877a92da46fdec39158f8d7e68da75bf73581225d28e90/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775", size = 219244, upload-time = "2025-09-08T23:23:24.541Z" }, - { url = "https://files.pythonhosted.org/packages/2b/0f/1f177e3683aead2bb00f7679a16451d302c436b5cbf2505f0ea8146ef59e/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205", size = 222828, upload-time = "2025-09-08T23:23:26.143Z" }, - { url = "https://files.pythonhosted.org/packages/c6/0f/cafacebd4b040e3119dcb32fed8bdef8dfe94da653155f9d0b9dc660166e/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1", size = 220926, upload-time = "2025-09-08T23:23:27.873Z" }, - { url = "https://files.pythonhosted.org/packages/be/b4/c56878d0d1755cf9caa54ba71e5d049479c52f9e4afc230f06822162ab2f/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c", size = 221593, upload-time = "2025-09-08T23:23:31.91Z" }, - { url = "https://files.pythonhosted.org/packages/e0/0d/eb704606dfe8033e7128df5e90fee946bbcb64a04fcdaa97321309004000/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8", size = 209354, upload-time = "2025-09-08T23:23:33.214Z" }, - { url = "https://files.pythonhosted.org/packages/d8/19/3c435d727b368ca475fb8742ab97c9cb13a0de600ce86f62eab7fa3eea60/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc", size = 208480, upload-time = "2025-09-08T23:23:34.495Z" }, - { url = "https://files.pythonhosted.org/packages/d0/44/681604464ed9541673e486521497406fadcc15b5217c3e326b061696899a/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592", size = 221584, upload-time = "2025-09-08T23:23:36.096Z" }, - { url = "https://files.pythonhosted.org/packages/25/8e/342a504ff018a2825d395d44d63a767dd8ebc927ebda557fecdaca3ac33a/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512", size = 224443, upload-time = "2025-09-08T23:23:37.328Z" }, - { url = "https://files.pythonhosted.org/packages/e1/5e/b666bacbbc60fbf415ba9988324a132c9a7a0448a9a8f125074671c0f2c3/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4", size = 223437, upload-time = "2025-09-08T23:23:38.945Z" }, +sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807, upload-time = "2026-08-03T21:21:18.939Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/70/d2/16d99a0c4948febc0ebd133a13b2f688ff7f8cb04da971e1128872ce0c03/cffi-2.1.1-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:c8d2c9fd1f2d16f780d15127abb050d13d1a76c03a4bd87d7e4980e45e511e12", size = 183838, upload-time = "2026-08-03T21:19:29.637Z" }, + { url = "https://files.pythonhosted.org/packages/cd/95/31b535a9f0220ae9f357de4a08d57ce89cb417653c2fd9f075f50822a388/cffi-2.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:398aff33cee2767e3e781d2554c54bd0dff386bb437581e0d8011fde1a942ec1", size = 184168, upload-time = "2026-08-03T21:19:30.764Z" }, + { url = "https://files.pythonhosted.org/packages/ad/5a/4707a0dc1f203f5dde5a907b0d4e3c25d71120241048bd5bc6f1bb9d4e71/cffi-2.1.1-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:154852545011f779917b11c78db2358d095da62a9a172b78ad0a583ee5adc0d0", size = 211805, upload-time = "2026-08-03T21:19:31.867Z" }, + { url = "https://files.pythonhosted.org/packages/ad/66/c19feabb28485b6e0bbaaafa90837a1ef5d302e90f2178bd33f17a49879b/cffi-2.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3311ed60d36f83378794e1009ac6258bafbf81f7888b4caa7b35a521e3f95813", size = 218716, upload-time = "2026-08-03T21:19:32.896Z" }, + { url = "https://files.pythonhosted.org/packages/a7/92/500760486c8baab49a7a8a58ba7fc3355ec3974b454b8a09e528efde9e1d/cffi-2.1.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6e192623c49c94421616a5778fba35cf0d5a8d000650c1967ef4448ee5cdd990", size = 205569, upload-time = "2026-08-03T21:19:34.142Z" }, + { url = "https://files.pythonhosted.org/packages/a5/a7/a67c733254d6e7373f7822f8082d8d6beade791e0cf12a7611f376fa61c7/cffi-2.1.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a6e721d4b0e45d5b65e87534470e67b18dcd092c83f68fba09f152b9cbc061af", size = 204907, upload-time = "2026-08-03T21:19:35.174Z" }, + { url = "https://files.pythonhosted.org/packages/f7/a4/4399daaf8f7dfee9d7c3327fdb0426ee041cc63edc358b93911ceb2bfc7a/cffi-2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632", size = 217807, upload-time = "2026-08-03T21:19:36.286Z" }, + { url = "https://files.pythonhosted.org/packages/28/f7/dabe6da2466ecbd82dc62e7342dc6b1065dad990c06f00f0ede9ebf2a0ed/cffi-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7225e4514edb64eb6740324353e0da0711954fd8d7da4576755b1c6e09b697cd", size = 221252, upload-time = "2026-08-03T21:19:37.416Z" }, + { url = "https://files.pythonhosted.org/packages/ce/87/616202d8e51342c07d2534c510111c4cc37201775ce8f60802c9335d1edd/cffi-2.1.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:df913725b79db7bcf03448f36b7bf8815363417d5b58deecf9305e3e30f0f21a", size = 214214, upload-time = "2026-08-03T21:19:38.507Z" }, + { url = "https://files.pythonhosted.org/packages/b4/c6/ab025d75d2c26c19b087c0124e75ee31cb65032f4fe345d356d8c507ab97/cffi-2.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f5cfbc5fe74540d335175b656c725d74d90e3730c626d92575eea35029d9afaa", size = 219408, upload-time = "2026-08-03T21:19:39.809Z" }, + { url = "https://files.pythonhosted.org/packages/db/e2/7e8109f65445bdc673a7b54f02c677de462db75674220fd1335efc8eb598/cffi-2.1.1-cp311-cp311-win32.whl", hash = "sha256:f8ec5e643a9a937f64e1999eb9f75d072263751912dc5cd06d3c85f8f44be7c3", size = 174470, upload-time = "2026-08-03T21:19:41.246Z" }, + { url = "https://files.pythonhosted.org/packages/73/c0/77ba02423c2f7d7091143c45cd49e0e6575c4c1967394bb542bd923a9b74/cffi-2.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:42f6930c31dc7f50732c9ae793c2786c7b6b044195967bbdde40bb9be81c4cc0", size = 185096, upload-time = "2026-08-03T21:19:42.615Z" }, + { url = "https://files.pythonhosted.org/packages/7c/47/9f1f85f9672ceda4984dc6c4f8824e8558992a2972c3d3c81fb8eb28d4ba/cffi-2.1.1-cp311-cp311-win_arm64.whl", hash = "sha256:c7659f22557c5a0bc4855cd635f55edec690cc008a40768527762cb9fb263455", size = 179941, upload-time = "2026-08-03T21:19:43.747Z" }, + { url = "https://files.pythonhosted.org/packages/10/69/43965eccfdead3b9220015fd1320e117be8c6ed01a62ffab76eeb752f5d5/cffi-2.1.1-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:c8c69575568085ba0b1b10c0249d779a214aea6f6522e949a0fc9fb0fcb449d0", size = 184821, upload-time = "2026-08-03T21:19:44.887Z" }, + { url = "https://files.pythonhosted.org/packages/54/7d/16e5a096677b5e313ca80cd5e5170efa3ea44624a82bb111925522da64b1/cffi-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f81b3b8f3d4e343550fa4baa0e479bba9f2d29ce9c2e9b51d1ce1718d7442fcf", size = 184719, upload-time = "2026-08-03T21:19:46.129Z" }, + { url = "https://files.pythonhosted.org/packages/56/e6/8941622732edec876dd17d0453dce07317ae96db34f2ec1436c9d3785986/cffi-2.1.1-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:811bd1e21d32de12efca32393a0ab3f5133b54fce9bd44b8bd77ab07da14bf6a", size = 214799, upload-time = "2026-08-03T21:19:47.218Z" }, + { url = "https://files.pythonhosted.org/packages/44/de/f98430906df1545ffde0d543dd124a7a439bc2cd32b36b9c53f805df7333/cffi-2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:68e62fe11f30d5ca8289242866f0a5291402d8529ca2178ab8afc5c9694ae890", size = 222389, upload-time = "2026-08-03T21:19:48.331Z" }, + { url = "https://files.pythonhosted.org/packages/6a/5b/717f1526b9957b34456313c31645c5b82b8fb5c3fe9e4752999be7128bfc/cffi-2.1.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:4a7c934f7360e8cd64fe9efadcbd10c7c6364f531e432b9a4bf5ccbc9e0e8b50", size = 210249, upload-time = "2026-08-03T21:19:49.543Z" }, + { url = "https://files.pythonhosted.org/packages/64/b3/f8aa4f3e34986c7e4ec45072d1b1b9dd295b6b18007b45518d79726dd725/cffi-2.1.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:3143d81e29e1e20a9ce10901ec369012947876596f75a222235965f2b7ae832e", size = 208775, upload-time = "2026-08-03T21:19:50.918Z" }, + { url = "https://files.pythonhosted.org/packages/b1/db/dceb9dd5b231e1da801793f8acc9f3c52a7e1afe40bb1aae37e02b0faad5/cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf", size = 221822, upload-time = "2026-08-03T21:19:52.054Z" }, + { url = "https://files.pythonhosted.org/packages/a0/d2/6cd24ae3be000a634109c247d1475d62e5616d0dc78c82770942ec384248/cffi-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:208f941bb9d18e768138677f0a6d2ce01f590df56043dda1df1535ac57c88517", size = 225232, upload-time = "2026-08-03T21:19:53.109Z" }, + { url = "https://files.pythonhosted.org/packages/cb/52/3fa190537004dd7f0ab860a6dc7c0175b8667f68d1e618a46f5498d30250/cffi-2.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:210019b6c7cf07f081b4c54635c8cf744377001350e29cc0f81c4377b4797735", size = 223597, upload-time = "2026-08-03T21:19:54.515Z" }, + { url = "https://files.pythonhosted.org/packages/80/fb/0bb75b7039588c074b37ae99f40d9bfddf990ecb2fbc346ebccd2e56b9be/cffi-2.1.1-cp312-cp312-win32.whl", hash = "sha256:046bfc24911b37851ee1b51aab8bffe713d89c68c6a057b09484ce9fd5f69b4e", size = 175292, upload-time = "2026-08-03T21:19:55.566Z" }, + { url = "https://files.pythonhosted.org/packages/d9/79/615cc094e2fb508cade7de88d3b4f6c4ec2bab695c97bce9153dc65aadf5/cffi-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:f53e442b08449d42821fa4a4fba000095af9f62742a500f978a9f557ec44339a", size = 185919, upload-time = "2026-08-03T21:19:56.89Z" }, + { url = "https://files.pythonhosted.org/packages/70/c6/d0ea84713fe46b243a436a18fcd47d639732747e21635c8a27191b06dc30/cffi-2.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:7bde5e4cc5c10140859842b9d383af292b22639a4dffb725314baf45968cef80", size = 180093, upload-time = "2026-08-03T21:19:58.155Z" }, + { url = "https://files.pythonhosted.org/packages/9d/f4/035513d4117049066b4779dc3b7c0c0fdad175fa13731c9f4003f1cd1478/cffi-2.1.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:b5bdfd1c873d4e093aabc0ca84c4ca6dbc4f752afb5c86f146d9742580c9da2e", size = 194248, upload-time = "2026-08-03T21:19:59.399Z" }, + { url = "https://files.pythonhosted.org/packages/76/af/2aeb4dbb5fc41a04161ae9ff1518de7cec08e164f44a8ce6a4cf7fd2cd1d/cffi-2.1.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:31348097ff5bbe827ccc41795d4dd099d9f0625e7def00ee653c137a490c2a6c", size = 196908, upload-time = "2026-08-03T21:20:00.746Z" }, + { url = "https://files.pythonhosted.org/packages/a7/46/2e5fdde8555706dd98139a910ca11be02809f3f605ce956f655d0214e100/cffi-2.1.1-cp313-cp313-macosx_10_15_x86_64.whl", hash = "sha256:9d2055050ea716bd38b7f7f1579c275386646b4894c155a3e2f3cd62ed41b7c6", size = 184805, upload-time = "2026-08-03T21:20:02.02Z" }, + { url = "https://files.pythonhosted.org/packages/55/41/4c7042f317b9217502988f0873af87e16ad606dc20f84e546e3e6ce9764c/cffi-2.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19ee6127ee34de7d83ce3d371ebc5ed91addbdcc39f9ab15ce4eb35a4e534971", size = 184764, upload-time = "2026-08-03T21:20:03.141Z" }, + { url = "https://files.pythonhosted.org/packages/43/1f/1c3d90d91811c8f86ced9ed637956c54bfe5b79ca98fe976d7f8c8979f6b/cffi-2.1.1-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:6a8dddef476fab96d066d578fc88526767b836ab5ab21754e1d5bf3879c31c7c", size = 214722, upload-time = "2026-08-03T21:20:04.377Z" }, + { url = "https://files.pythonhosted.org/packages/37/6f/3b5ce4c3b2192d250f04908f2bfd91ef34552ec8f7716a5d4abdb8d67bb2/cffi-2.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f16c709686a78c727bbbf059f92b0bf41c6fc60deec706d2dc19f529175a6125", size = 222369, upload-time = "2026-08-03T21:20:05.544Z" }, + { url = "https://files.pythonhosted.org/packages/02/10/4b3c75dde3d9663c9e02ba05c2668b954f671d4bbe346413ca8c696b295a/cffi-2.1.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:fcd22650c908d7b7da162bbfaab594a1227a15d1643a98c68b122ac642fa2264", size = 210175, upload-time = "2026-08-03T21:20:06.75Z" }, + { url = "https://files.pythonhosted.org/packages/df/62/14f74b9543e605d17701dc797b815958b8bb70b7624ce1b832ddad48ed6c/cffi-2.1.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:aa9511c62d14da7aacc9b4bf51f3f697a621e83b2d6919008243c3aad168eea3", size = 208670, upload-time = "2026-08-03T21:20:08.04Z" }, + { url = "https://files.pythonhosted.org/packages/95/95/86342356ff5953b3fb06f7ef7c5bee212d45e770abc7218d451b9148313c/cffi-2.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a931079504ecc49efed7744c476a5c343a92fabf66dec2db95edb1b2fdc770e2", size = 221824, upload-time = "2026-08-03T21:20:09.274Z" }, + { url = "https://files.pythonhosted.org/packages/eb/ff/7b3429ff53aafe931ed8a5fc69f481bbef7ba6de87ddcbb63d08f483f613/cffi-2.1.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a2d7755bef5a12ed488f4ef1f1b69ee9191d7396083b755a5d2295f6edb4768b", size = 225148, upload-time = "2026-08-03T21:20:10.7Z" }, + { url = "https://files.pythonhosted.org/packages/34/34/a95870b9221e09cf4f2ce3178b1a210abdfe63a1bd357da940418d7b8d15/cffi-2.1.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e0bcb7e0f677f543555d2adff3bf19c05f66cdb4796e5ff602442ab2fe3c4ef7", size = 223564, upload-time = "2026-08-03T21:20:12.165Z" }, + { url = "https://files.pythonhosted.org/packages/70/ea/839b50531021a647fb5e929f72cf97bc1ff702b5472166164b5b6e76b851/cffi-2.1.1-cp313-cp313-win32.whl", hash = "sha256:334644fbac4eff73d985a17a91226df55d0f394160c4cfb880e084c8f7161cac", size = 175263, upload-time = "2026-08-03T21:20:13.559Z" }, + { url = "https://files.pythonhosted.org/packages/60/a6/8b149b2c3f2e11aaa1618ef64500b45f50f22c57a977a4dff1aff1f91042/cffi-2.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:1aa5645c30469b09530c4ebca77ebf8f17618293c58f8549cb1a543a50236e7d", size = 185688, upload-time = "2026-08-03T21:20:14.69Z" }, + { url = "https://files.pythonhosted.org/packages/01/9a/11f687cb39d6a3504060d5242f04f48c735afb4d3d533958a20594890cb2/cffi-2.1.1-cp313-cp313-win_arm64.whl", hash = "sha256:63bbfd5ded17c4840ac07cd8f1c21ba9d9708141f840b324f422f41b207e3973", size = 180078, upload-time = "2026-08-03T21:20:15.917Z" }, + { url = "https://files.pythonhosted.org/packages/d3/7b/d6bbf82b8b96e7391438898c42f5bd96dd02030fd5b64937d248220003e2/cffi-2.1.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7dbb61fe3a7699468030f71bbe5f8a0e326a151daa91beb11a6fc1f980c55e1c", size = 194064, upload-time = "2026-08-03T21:20:17.148Z" }, + { url = "https://files.pythonhosted.org/packages/94/e6/bcc91b283be94735e268487a054004f0aa19947b6348fa367db53230abc8/cffi-2.1.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:f24fb43132a4c6b4cb4eb029492919b2db645be6808d738f244fd146c03c32cb", size = 196720, upload-time = "2026-08-03T21:20:18.268Z" }, + { url = "https://files.pythonhosted.org/packages/d9/99/c4b0c17cacdc9c3b8f280026286a9826d6a208c0f047591a3c3ce99b91fd/cffi-2.1.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d28630f5854ab07ab1fd4aba756de52326c82e6be15d414b12793f1975048b54", size = 184964, upload-time = "2026-08-03T21:20:19.708Z" }, + { url = "https://files.pythonhosted.org/packages/b3/a9/9db617d05d7367c1ad0ab00b3aa6e6f9281edd689b4ee9ea0e5a84e89c97/cffi-2.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:661c298b4821edebead0c91edd2b00374d67ad7c5a1f7a91d4442633b79d6a72", size = 184962, upload-time = "2026-08-03T21:20:20.833Z" }, + { url = "https://files.pythonhosted.org/packages/67/b8/b42132ca113dc567d37684437b46ca1dafc885902b02a110a02d5b511857/cffi-2.1.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:58acb8ab8e295e6c5ea12f888cbb13cf21511ef2a3303a23f4325c29d17fe5c1", size = 222328, upload-time = "2026-08-03T21:20:22.118Z" }, + { url = "https://files.pythonhosted.org/packages/80/10/c5c0cbf0a657aecf59ef511409734230bf556f05a0d6c9eed7aa5c0a0166/cffi-2.1.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:456a61fa52d579ebf9df2e9552ead5129855dbaff6c1e5a9b1bc408809bdc062", size = 209985, upload-time = "2026-08-03T21:20:23.401Z" }, + { url = "https://files.pythonhosted.org/packages/d5/6c/bfa0b87b03b9238148beca990292843c9396ba069b54496596594173de7b/cffi-2.1.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a4f00aa42f75d6e4595e8866e748cc1705adc0cddfeb2ca86d0d03993d63ba03", size = 208530, upload-time = "2026-08-03T21:20:24.628Z" }, + { url = "https://files.pythonhosted.org/packages/e9/02/4e7d553a7ac4b4238b38b3c1b80d486e9d4436f8d2acbf87a0997fe3f402/cffi-2.1.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b0431303acaea1089ad4b3e9ce4e6518193def1118d4073ca848635ee4ea2e96", size = 221525, upload-time = "2026-08-03T21:20:25.758Z" }, + { url = "https://files.pythonhosted.org/packages/82/1d/a4aaf9babd75acb4d5f223bff71533bee748dd770a382619a798960ee9ba/cffi-2.1.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:64faea20f4e2613363a1a9b9c7dd73058f3ecd00133a511e72ad7c511658f527", size = 225053, upload-time = "2026-08-03T21:20:26.985Z" }, + { url = "https://files.pythonhosted.org/packages/81/10/5dc0e7bdd18e22107054288283380fc97a06ae3f1656a106908d666a3c88/cffi-2.1.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5c58fe613dc5e5336357eff555824a314d8e43282600435c8d1cb6a7a2fedd13", size = 223213, upload-time = "2026-08-03T21:20:28.277Z" }, + { url = "https://files.pythonhosted.org/packages/0b/e9/d0061c364cde06ee43168a0d076ac1da512cbc380d44767b844ba34fe2b6/cffi-2.1.1-cp314-cp314-win32.whl", hash = "sha256:1a18a57b58cfb21fc28d72e876acf10eaed67a1ed96226f92af4df681d571c4c", size = 177682, upload-time = "2026-08-03T21:20:44.288Z" }, + { url = "https://files.pythonhosted.org/packages/a7/06/1c3e01e3ba14c39f6d10bfbac52753b7e22259e38088e5cfe1d704918690/cffi-2.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:3222ba5d678f80a030e6afbcc33dc1ae5cb45facabb61cee2c7016b8432fde48", size = 187949, upload-time = "2026-08-03T21:20:45.623Z" }, + { url = "https://files.pythonhosted.org/packages/87/5b/da4e39efe18eeb89cf580ea9cfc66b6a7c3eadb808fc0cc1d3a295cb5a5d/cffi-2.1.1-cp314-cp314-win_arm64.whl", hash = "sha256:ab36d55f9ed2d067327667c2fea18dda018eb628dd6347aa01dda6cf1f5d3836", size = 182947, upload-time = "2026-08-03T21:20:46.955Z" }, + { url = "https://files.pythonhosted.org/packages/23/59/40338bf421c5accea1d45158170c87006ef1cd371b05c077e76476949728/cffi-2.1.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:7750c6449dff7864bb9bb27ddfb0267756189201a3afc911d82b3caacd70dfc3", size = 188504, upload-time = "2026-08-03T21:20:29.495Z" }, + { url = "https://files.pythonhosted.org/packages/7d/47/5ecf1023850036e674c77ec4de86182d309ae344e39e7cba984b7df5d647/cffi-2.1.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0beceaabe56af686895136a2de78db54ecd8e4046b236b8fd6d6cb61389e9bf2", size = 188259, upload-time = "2026-08-03T21:20:31.291Z" }, + { url = "https://files.pythonhosted.org/packages/2a/9c/92934c3bea9f785b23eba304538c0b4d37a2a96d2431eb3a1bc87a11aa19/cffi-2.1.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:49cbc70e6542d4ccccb936558d1064a8012541e78f821f955cff24e357776c94", size = 223864, upload-time = "2026-08-03T21:20:32.571Z" }, + { url = "https://files.pythonhosted.org/packages/4d/45/ba4c93527bc38616a8bd36488acb69a2212d60486794f0c1f318949bbb76/cffi-2.1.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e2d65b31f36619cda3999b78b2aa9632e76b78448e7a56fc4240824200e7c4fc", size = 211538, upload-time = "2026-08-03T21:20:33.808Z" }, + { url = "https://files.pythonhosted.org/packages/80/e9/b6ef565e452acb932fb0cb5443f44a78efbd1233e566f02b5a83855e9115/cffi-2.1.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:28907ab9bfb6aa13184cfc17c6b8e1023c5ab6fd7076d8c20a35e59fe04f8f29", size = 210688, upload-time = "2026-08-03T21:20:34.974Z" }, + { url = "https://files.pythonhosted.org/packages/9a/95/eff5f0cee78d2eabc7eebffec40d3fc1876b5f3c95582e018bb4b99601f2/cffi-2.1.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:51b31d1c98274844cfd7838ce00bfc27c7423a4dc00fc0772fc3331c2cc90676", size = 223803, upload-time = "2026-08-03T21:20:36.564Z" }, + { url = "https://files.pythonhosted.org/packages/fa/01/579d39fb8bef00a335a23d83757b44feb24cd6345a2c451b64cb67b9c362/cffi-2.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e7cecbaadb83884793e05828cee59b210b24583b9c7425d0ba6a754fe22eb4e", size = 226763, upload-time = "2026-08-03T21:20:37.816Z" }, + { url = "https://files.pythonhosted.org/packages/8d/b0/0b44f47c60b01b57b6e2bbd92343f13a85a1d93bc46ccf6e47e244acd99c/cffi-2.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:25792eac27877609e7bb06d42ff88278a6624fff2ba9bbb523c09616b117e80f", size = 225688, upload-time = "2026-08-03T21:20:38.959Z" }, + { url = "https://files.pythonhosted.org/packages/eb/d2/3b7176cb570a1d3e27faf67b72f591af508036e0d8b2be2ef9af9e8c84bb/cffi-2.1.1-cp314-cp314t-win32.whl", hash = "sha256:8ef53b2de9bcb9197d31854256575d59dbac0cba72ac627bb291ef5eceb74be4", size = 182868, upload-time = "2026-08-03T21:20:40.388Z" }, + { url = "https://files.pythonhosted.org/packages/56/78/31f00c1bcd97c9bbf55f1bfdf5bc809a5de8887473e90bb9960dca825e80/cffi-2.1.1-cp314-cp314t-win_amd64.whl", hash = "sha256:616f097f2fe415bc92a247f02e11f634e1f9e9a83d327e3c915c15089c87869e", size = 194104, upload-time = "2026-08-03T21:20:41.725Z" }, + { url = "https://files.pythonhosted.org/packages/7b/1b/58496f2ed0a35de575250c02a43ab3cc2c04d494a88fed31c1cabc0fd176/cffi-2.1.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ad2c86c495b899d862ea0f4b42891b8713a3bd45dd4105c7fd51c2a72f39f3a5", size = 186402, upload-time = "2026-08-03T21:20:43.042Z" }, + { url = "https://files.pythonhosted.org/packages/c1/8f/9ebe220eab48a093d1a5a5e339ab0dc7316eef3bb04d63c42f0251b61f50/cffi-2.1.1-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:dddad92b554513a31f272570678ba307fb9f618f05e3d4a5eacafff9eae03e1d", size = 194043, upload-time = "2026-08-03T21:20:48.179Z" }, + { url = "https://files.pythonhosted.org/packages/ff/69/844bad3ece306c4782c2ecb93597035b6690d48704b803914c199da1e8b3/cffi-2.1.1-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:da0e573f9f97159390c89d9f1a9e41908b66d408cc5b58d08cf3847d844c531b", size = 196737, upload-time = "2026-08-03T21:20:49.457Z" }, + { url = "https://files.pythonhosted.org/packages/1b/8a/af668013284634733f02d683458a0728739c7d6ddb5e14cb0c20832266fe/cffi-2.1.1-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:fb92203a88b3d3053034db775110081c49d28be6551923805e039924093761e4", size = 184933, upload-time = "2026-08-03T21:20:50.639Z" }, + { url = "https://files.pythonhosted.org/packages/0c/75/2f5207ff6d1a613133b23a5203cc0c2a628313b5eb3974d7956ae3c57950/cffi-2.1.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:2ae64be792b8966f2c69538199728b290e34726562896df1e5dc8ffd8d8188e8", size = 185002, upload-time = "2026-08-03T21:20:52.173Z" }, + { url = "https://files.pythonhosted.org/packages/e2/31/9e1313b0a6e30e91b3b3d3fff51ae99c857c07738e3afcce1f7334e1b7ab/cffi-2.1.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:507a24c282e0f42f8ed737cf048572cbf580468da5555764a8331735e9c736b6", size = 222271, upload-time = "2026-08-03T21:20:53.462Z" }, + { url = "https://files.pythonhosted.org/packages/50/e3/f6234a833e6e08c7007003074723c406559eecf9b48dfc97471e5a8eb7a0/cffi-2.1.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:246fa40ce8645a614ff682e0b70f37134e460eaf93a775e0cbe3cca585a67a80", size = 209919, upload-time = "2026-08-03T21:20:54.783Z" }, + { url = "https://files.pythonhosted.org/packages/0d/fc/5f74e293fced6edb51af3a46c4ccf6c23c9943774ecb375ddbd522c76add/cffi-2.1.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:471cee653ae88de62096552e6d24ccb4a5adb8c8c9f10b5054d0122c15bf2779", size = 208529, upload-time = "2026-08-03T21:20:56.066Z" }, + { url = "https://files.pythonhosted.org/packages/44/16/29e6d01b388bef055ecd6ca8244b3f4d336bd09e92d5d892187b9601084e/cffi-2.1.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:aeae0e330c9f6acd681f647d46cefd30c29f93e3392882e792e82080c9691399", size = 221630, upload-time = "2026-08-03T21:20:57.336Z" }, + { url = "https://files.pythonhosted.org/packages/a4/18/fa7f1f6857d5eb88a4ca99ffcbfb7c387a287ccc154c64a73e86314745d7/cffi-2.1.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:42a494cee34437f05546455144f2b5d9ac09b1face62bcfce597d2e521066688", size = 225134, upload-time = "2026-08-03T21:20:58.675Z" }, + { url = "https://files.pythonhosted.org/packages/e0/9f/e8e3dfa04a1b4c241f8c91faacad872b4d4efd051d49764ad4e2fd4b9fea/cffi-2.1.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:cc572dace3f60ef98d7b12ff411d20f5362feb31a0439eab0085bbfd349982d7", size = 223197, upload-time = "2026-08-03T21:20:59.968Z" }, + { url = "https://files.pythonhosted.org/packages/f8/7e/8debeb04f1ab9fe2a6963964cd6f1aaf7192627b83926586a6a4e089c9fa/cffi-2.1.1-cp315-cp315-win32.whl", hash = "sha256:4f42141fc14250de6dde5ee7ea4432be017252d91f19c5ad043c084cea629cac", size = 177683, upload-time = "2026-08-03T21:21:14.901Z" }, + { url = "https://files.pythonhosted.org/packages/e0/31/5158704cc474ab65c1647932e88be78dc0873f47130e253be38bcaf13d01/cffi-2.1.1-cp315-cp315-win_amd64.whl", hash = "sha256:e6e8cff14d6fb0be70a09c0bdc58096f501952d04624ebf867e0e56da2df8960", size = 187897, upload-time = "2026-08-03T21:21:16.108Z" }, + { url = "https://files.pythonhosted.org/packages/cc/4b/b3a2da8570c704ffc0f9762cdc3ec0f02c8573798e0b5cf7f11c82bbb70f/cffi-2.1.1-cp315-cp315-win_arm64.whl", hash = "sha256:27350daa11d4f10c540e6e89dada4c54feb7256ad03e9a4dc075ebad7ba360d1", size = 182935, upload-time = "2026-08-03T21:21:17.271Z" }, + { url = "https://files.pythonhosted.org/packages/d0/ef/5443574510a1207e6f6bc38ba6e1f1de36cb48fef07b2728bb896a21f430/cffi-2.1.1-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:c26608d2222fb1e94487e4a387d85f13eb55d5ed725cb25a0c589ac4ee60e7bc", size = 188464, upload-time = "2026-08-03T21:21:01.163Z" }, + { url = "https://files.pythonhosted.org/packages/7e/ae/a56fa8c4686ad50e148fcbc8d3ae0d03915ff5c30d795058988c24118cef/cffi-2.1.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:4be96343e422f2dfcd12ab5c9f5aebe03f82f737c6bffeca6830b3875cb44aab", size = 188262, upload-time = "2026-08-03T21:21:02.382Z" }, + { url = "https://files.pythonhosted.org/packages/53/b2/6187f46f2912276a3ae284076109cc5c8680482f11f766ccf26db4a86427/cffi-2.1.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:937c0052c05a31ca1daf18de3158eed4dbfcb9cc107adbea227728d647be701e", size = 223779, upload-time = "2026-08-03T21:21:03.553Z" }, + { url = "https://files.pythonhosted.org/packages/8a/f6/c3ad28bd19f77047a03084424fbd4cbe997303267c14423737324be0385d/cffi-2.1.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:df423d40ee8654634421812bc3b196da3f9bd7d32929da813f8394c4348a5358", size = 211520, upload-time = "2026-08-03T21:21:04.863Z" }, + { url = "https://files.pythonhosted.org/packages/a0/cd/ccac9013a5bd9fd764de118674ab9c805b5ca10c19270d90ee273f8b2240/cffi-2.1.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a730a083190634c65cca36ba5f489531576ebd79bcd5c8e172130f6453127231", size = 210673, upload-time = "2026-08-03T21:21:06.223Z" }, + { url = "https://files.pythonhosted.org/packages/52/86/2976131c639aead931c5bee5aba67e4b09fbeb8018b6f282f70803f923a7/cffi-2.1.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:363e05fa78e15116c3c32c210ee36884fd6b9afa6d440e47112c3bd511d64cb6", size = 223835, upload-time = "2026-08-03T21:21:07.539Z" }, + { url = "https://files.pythonhosted.org/packages/ac/0c/33a7aeab2f9c76918c52e084beb39c570db3588133412929e8ec06fab90b/cffi-2.1.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:770de9db11e84213beec501cfcaa013b019820ca881e03344dea5844f7876d94", size = 226705, upload-time = "2026-08-03T21:21:08.774Z" }, + { url = "https://files.pythonhosted.org/packages/e3/26/2cde30fdde421130bfc18f70395731a6e6b2053c6a1978a5258ff04e72fa/cffi-2.1.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:7da0c5eff80f0197f3b3d1232ec5a682a9325f4ae9016a78f5f5ca35f9ced1f5", size = 225539, upload-time = "2026-08-03T21:21:09.911Z" }, + { url = "https://files.pythonhosted.org/packages/6d/cd/a361394c94b2129d604bb846f624a8e88255a3ee33129c434a00d715e64f/cffi-2.1.1-cp315-cp315t-win32.whl", hash = "sha256:06c72bb76605a4b0cd0aad6930b69d4baf7dd5d806cfc409b824191099700e66", size = 182707, upload-time = "2026-08-03T21:21:11.226Z" }, + { url = "https://files.pythonhosted.org/packages/9b/b5/ba2b299993c26577d529b6ae29841f9e15b9fcf004d65f423f4fcf94ade9/cffi-2.1.1-cp315-cp315t-win_amd64.whl", hash = "sha256:d9c275eaacd24aa73f94ffd6de08fc3f932424d8b6c376f4bed7cde376fe7bc3", size = 193772, upload-time = "2026-08-03T21:21:12.39Z" }, + { url = "https://files.pythonhosted.org/packages/aa/29/35e016098c814cd93de9cd320c66b5bfba14dc6ecedd3cb518fa7c408c69/cffi-2.1.1-cp315-cp315t-win_arm64.whl", hash = "sha256:d18e5ac0f2f03f4f518d3e23db0f0cad7faa1da8620e9c09461d443bbf6e6692", size = 186360, upload-time = "2026-08-03T21:21:13.636Z" }, +] + +[[package]] +name = "cfn-lint" +version = "1.57.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonpatch" }, + { name = "networkx", version = "3.6.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, + { name = "networkx", version = "3.7", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, + { name = "pyyaml" }, + { name = "regex" }, + { name = "sympy" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/41/93/996a8c4a8916ed10b71207de4276c7dbec4d13ad0f9a21830f9eed04f771/cfn_lint-1.57.2.tar.gz", hash = "sha256:7e859164badf01d2bd62c6d362284ab6e814d036f0a64249ba6a05287d787d68", size = 5000546, upload-time = "2026-10-06T19:29:15.939Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2e/02/523307f365b693ee8e55564a13bef7767f5b6650fd22958dcd3d0390136e/cfn_lint-1.57.2-py3-none-any.whl", hash = "sha256:7007b30215ffb204bf1c669aeb68689253d23cddd21ef1a904fd424df13851cc", size = 5611048, upload-time = "2026-10-06T19:29:13.348Z" }, +] + +[[package]] +name = "chardet" +version = "7.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b1/51/cd61c567092a6cec796144510a68aff158ebfc1df82950a45bae65f28413/chardet-7.6.0.tar.gz", hash = "sha256:93d9df6089ded42ed1fe9f57e272c0b74bd0464d45c0c7d50f09f26f31105c3c", size = 914462, upload-time = "2026-08-14T20:36:59.305Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/11/2e/d8634bee23a07bf512512ddf6218a68e47f045ae061c0cc80657ed79dcc0/chardet-7.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6424512f576fa7e88b7431d38a42d57552c8f717465a975fc42e497cd280d833", size = 1088243, upload-time = "2026-08-14T20:36:17.135Z" }, + { url = "https://files.pythonhosted.org/packages/55/95/bd6d59026638cec47dace85858171fbecadd2f9e58cb2b973dc515aa790c/chardet-7.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:284136186ff90735f901ed0a1c6d41e7af67c666841cc0eceb58482a21b7056c", size = 1068688, upload-time = "2026-08-14T20:36:19.183Z" }, + { url = "https://files.pythonhosted.org/packages/7f/4a/60ed03656b28c1f4d378bc3cfe8a6cdda62c7c289398f925610fbbabfd00/chardet-7.6.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5e9b31b9ae93872d66439b046a1e08c2ea99791f3c254dce1e2633e395c5587c", size = 1487945, upload-time = "2026-08-14T20:36:20.64Z" }, + { url = "https://files.pythonhosted.org/packages/03/25/9c8db4f951e974a4db5558d9eea62e1fd5b5889c9d0ad0315eed67c5cdb3/chardet-7.6.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:aa03322e07ac08d520ec50bb50c73143d0892d1adc067d4c5e58f4ef4b2363a8", size = 1510112, upload-time = "2026-08-14T20:36:22.248Z" }, + { url = "https://files.pythonhosted.org/packages/76/1b/59eb88a78d8f5855c27c25788088df82834ad067f3dddaf4d86ef03cf2d3/chardet-7.6.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0ad9bc6dab4f338673353fa3f0dc96122f559aaf746087408106e2fcbf132fe8", size = 1462470, upload-time = "2026-08-14T20:36:23.557Z" }, + { url = "https://files.pythonhosted.org/packages/02/af/46c80c317f9b4dd61f15c33b1e073fbdd64d13c70fe19e34943071dc9e50/chardet-7.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:360260d074d8712ac1e9048fcafb0fdde246f9d0b12555748ad0017c5ecee43d", size = 1157092, upload-time = "2026-08-14T20:36:25.082Z" }, + { url = "https://files.pythonhosted.org/packages/6f/62/64da80dad0c804e743b4156f379183578f1e33918856ae928dc9248a6002/chardet-7.6.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:19fea52164e6e00f2a21ed418f42e4b0162a09199274c86d07ad3efd661317c4", size = 1094073, upload-time = "2026-08-14T20:36:26.53Z" }, + { url = "https://files.pythonhosted.org/packages/44/99/934fb862d102c8756008597f4398323f32cef329f16e87fbb3bf76d4f4be/chardet-7.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a12023d48d0e207791c01161d03cb3c0d85c6a15f345eb9d3d56063a63d1e40f", size = 1071612, upload-time = "2026-08-14T20:36:28.067Z" }, + { url = "https://files.pythonhosted.org/packages/71/e9/b04e0ec576a77e79fe37279a9a5d5b1ae752d365e43df2eca0d0eee4cea5/chardet-7.6.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:249993b88ac7a58cad2781acea8f379152a28a719c9b401d614898c63a8c83da", size = 1489219, upload-time = "2026-08-14T20:36:29.357Z" }, + { url = "https://files.pythonhosted.org/packages/7d/a2/c4d99299e9ce7fad561f8bb56babbbbdd3bb6b4fbd7c0ec674c1dbdd2cc5/chardet-7.6.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2cf0adaca8b1c4bacfade9d0a1e4f8f70b1bb122833d6f07ab90e3adc84eb13a", size = 1518293, upload-time = "2026-08-14T20:36:30.879Z" }, + { url = "https://files.pythonhosted.org/packages/56/1d/49f13052b74303bab2789d098063cbd19758217949ea54ffa216b6098cb3/chardet-7.6.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cf6d08c2373b7772a558d141f9e8cee53fe1d222341bac612e4d558b04995f73", size = 1459077, upload-time = "2026-08-14T20:36:32.149Z" }, + { url = "https://files.pythonhosted.org/packages/0d/53/8da1f4758286efd8faf71356facddb382788ecf1bbd7c70d63e2e18a4898/chardet-7.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:406936df1328a3284fef366eaa2bfd1cccd0ef1b10cb99781dd5b022ea644b84", size = 1160778, upload-time = "2026-08-14T20:36:33.436Z" }, + { url = "https://files.pythonhosted.org/packages/a3/29/16a7419edfbd60e901e6a797cbc3e038cb2a81903bc16c029db755f0156f/chardet-7.6.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:57e6846cc13ce1ff59979f4ec9da770c57e12aa99046073f632de5a51d9a6f20", size = 1088449, upload-time = "2026-08-14T20:36:34.723Z" }, + { url = "https://files.pythonhosted.org/packages/1d/36/3a14b0f8ddeb302f157281ca656a3ce6874b78e2d6af03682f520b487245/chardet-7.6.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:089e3bb81a0a07e94f15461ded9f9ee66d349615b1a9fd557d4de1003e2fc12e", size = 1065126, upload-time = "2026-08-14T20:36:36.21Z" }, + { url = "https://files.pythonhosted.org/packages/d2/4c/f59a39c2bfe4ac99baba8da842e8d2ea0b84dff7ba53a96e7ad8c71602d7/chardet-7.6.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:43ea433e43a23c55e8e17f3fad1e07f5cfe5450c73124b95b0d849c21ad379ee", size = 1482492, upload-time = "2026-08-14T20:36:37.649Z" }, + { url = "https://files.pythonhosted.org/packages/bd/eb/93e8036681157f2217a18769927a035984526e6dbd5e91f28a375ca41c14/chardet-7.6.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b5d31f9b7f793e15e81cca877e7ccd72bffffa2a3443a9d47be9dfee84fad69", size = 1514185, upload-time = "2026-08-14T20:36:39.119Z" }, + { url = "https://files.pythonhosted.org/packages/10/04/0066d7ab2c135e404a6fa166bb7fa49d1c7bf7af07b86ed95b1c48a348c7/chardet-7.6.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c54b6a8d3b219560fa5cf4c28df932c37471afe047afdc152067104e741f38c1", size = 1454420, upload-time = "2026-08-14T20:36:40.549Z" }, + { url = "https://files.pythonhosted.org/packages/6c/9f/e965f1d9eddfb86cf118f980d329cbee43c4ac4b562448b369a6b6ef36af/chardet-7.6.0-cp313-cp313-win_amd64.whl", hash = "sha256:b3b4c96c4df93899b3c8b9e8159e06b1f55c66d7ca384d91481108e251a06eb0", size = 1159067, upload-time = "2026-08-14T20:36:41.816Z" }, + { url = "https://files.pythonhosted.org/packages/cf/78/e14991c9487277ed7d006fff58f3084ac792ed94cced081788abb95df70c/chardet-7.6.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:c6061adf247ab5dda173b67010e13904c6071717660c7c8077fb50aca362b264", size = 1087678, upload-time = "2026-08-14T20:36:43.2Z" }, + { url = "https://files.pythonhosted.org/packages/7a/40/0f95e04cb1820e0a582cd6d86bbf26be8302a94ccf330f8ba5f69735389d/chardet-7.6.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:fc1e1571321baf8927582fe34363ad7f02279f11c8c2839c14b4c76894148db6", size = 1065310, upload-time = "2026-08-14T20:36:44.489Z" }, + { url = "https://files.pythonhosted.org/packages/3b/a1/04404dcc9d6e1253b02583e562d2c7ddca50a7e91f460d62eff7e1d07c92/chardet-7.6.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8900f6c7cf6b015b17a51767cc6144689059ba1cdceaa383d29eb037ac28579e", size = 1485028, upload-time = "2026-08-14T20:36:45.797Z" }, + { url = "https://files.pythonhosted.org/packages/f4/88/360064c4c7d9d0664561dae03b74c871d2f5332b329f5c99f1c997fb869a/chardet-7.6.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cedbc584789eb2edfde20fd03669972a833ce6019e60014ae613f9bfc440e8e3", size = 1510242, upload-time = "2026-08-14T20:36:47.206Z" }, + { url = "https://files.pythonhosted.org/packages/43/4c/302869fa1c69a5a41e4e78782680b12552ffd4286c3ae3c839b7b8df53d4/chardet-7.6.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d5dc835e40e0e09c2c3eab43731a8b5127834f42786dda09ba2f4b699ccd527a", size = 1456456, upload-time = "2026-08-14T20:36:48.668Z" }, + { url = "https://files.pythonhosted.org/packages/7c/a9/ff4fef15ed25fc3f945a3b981ae0f43c8559b3fbedb40267e59e583d105b/chardet-7.6.0-cp314-cp314-win_amd64.whl", hash = "sha256:0f304de7041afaec0195ad6464937cd112392002e9d72ed15d55f20a9abd3a13", size = 1159103, upload-time = "2026-08-14T20:36:50.107Z" }, + { url = "https://files.pythonhosted.org/packages/31/44/94e6f89485ce6c630e8fec6d388e3fa747e58b7246b0cc8c5c532ba98650/chardet-7.6.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:a4f0a368ad04d5def08bdfaa17c7e15e71552f93923dc2aa9b2f7d9dee02fbb6", size = 1120302, upload-time = "2026-08-14T20:36:51.484Z" }, + { url = "https://files.pythonhosted.org/packages/e0/cd/8e68ba12f13aaf4ee82d54ef8a1f83d62942e7a6bc1e579dd2d530a3e26e/chardet-7.6.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:75d6c3a4d2046d49e83d2d2206eb073a1f390743e856d90c1bbc19949b26acf4", size = 1093157, upload-time = "2026-08-14T20:36:52.987Z" }, + { url = "https://files.pythonhosted.org/packages/f3/f6/6a35342b9efa69dcceab0ea8966571c6442a59c336bf460f0a2af95ed234/chardet-7.6.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:459e2b1c98f9a86a4698112aa42dffa802bbbff883c1ff144071f87224125862", size = 1521213, upload-time = "2026-08-14T20:36:54.812Z" }, + { url = "https://files.pythonhosted.org/packages/df/8c/8f09bfabbaedae45caa72b996e96d5e3f6436dfddc55c1311ffa2f6bd7d2/chardet-7.6.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bdb6f03107b7ace3f44e0edd91aa24456ee558787df265cc19daf45785b31c7", size = 1528427, upload-time = "2026-08-14T20:36:56.224Z" }, + { url = "https://files.pythonhosted.org/packages/0c/3d/2540627b193112e08b8045f3cad9295570866208555aa6625b63cc69c6cd/chardet-7.6.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:0c44a32da32cc8b23d6b20d98ace15ec7600950e4955d1bf5ab1f849b0187fdb", size = 1087374, upload-time = "2026-08-14T21:04:14.994Z" }, + { url = "https://files.pythonhosted.org/packages/fe/de/dac4f550cde73c4732b4916e72ec489ae36933fbbd1697e4122d3ae2e9dd/chardet-7.6.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:7bbc8a9652c7f859c593847f220c1d264f25749369abb1a267b404ee8cceb209", size = 1064688, upload-time = "2026-08-14T21:04:16.806Z" }, + { url = "https://files.pythonhosted.org/packages/06/45/f4f3f288496797d2cf1d1e9036f920ed2b4c79787b21c42a3314f4a6d532/chardet-7.6.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:83512a475a2f3886166aa0bca1bbb39343a4eb3186dd5532127d6f2591d09118", size = 1486320, upload-time = "2026-08-14T21:04:18.535Z" }, + { url = "https://files.pythonhosted.org/packages/c0/81/3ca30c16e6c6015b737fca22d9342957cc617d8a65329d3e963ad754a31b/chardet-7.6.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:271ab71ec1be61dbbce0436de0848895c03eae051c379e937a39573d9ce403d9", size = 1515374, upload-time = "2026-08-14T21:04:20.724Z" }, + { url = "https://files.pythonhosted.org/packages/6e/98/163a75b8b3372a6b6503f5f5a4154a222ac135c7a706b5d176f8e4b237a2/chardet-7.6.0-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:da86fc1b40ff5996fbb5e4c2d2dca770eac2c893cef157dacc050b8b4d929846", size = 1469504, upload-time = "2026-08-14T21:04:22.352Z" }, + { url = "https://files.pythonhosted.org/packages/d7/4f/3ad1b1bd27ae7f0d3d13cf711366525cd781a9e067950d8a09aa280916cb/chardet-7.6.0-cp315-cp315-win_amd64.whl", hash = "sha256:b73f277c1ac09c4f8076c4214b816c7aa78a0a2f0cb7156742f4303f856bedc3", size = 1158551, upload-time = "2026-08-14T21:04:24.259Z" }, + { url = "https://files.pythonhosted.org/packages/8d/92/22a609c68c5123ebdccd8fe1a80e423609012ce20166de19a2ed3955b2f7/chardet-7.6.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:61238d5945b36af9a2ad13494f8969b7deb3c3b4abe223e54670c064e73f5328", size = 1119186, upload-time = "2026-08-14T21:04:25.761Z" }, + { url = "https://files.pythonhosted.org/packages/29/35/75a90143e4200e197f4f6cf5895d379e22bc785d0c7711120df18fa5347c/chardet-7.6.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:f2ec3c78cc6b54bf8e091ec4ee885473078b5d7ef18ab1b01c86ae1e98bf88f7", size = 1092596, upload-time = "2026-08-14T21:04:27.884Z" }, + { url = "https://files.pythonhosted.org/packages/d1/2c/b6d5f47d878c46e04ae6fcb58e0969467925bc0819b333c682e0c41bbc5c/chardet-7.6.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:167d7ba3ee08b654e36d7b43ebd9a36606c9a12e2fabdb361757a095ca3b7e3d", size = 1516644, upload-time = "2026-08-14T21:04:29.624Z" }, + { url = "https://files.pythonhosted.org/packages/25/d2/2bc3f1066c6f27bc3fa3a98dfd8a2a9c1e969a9d6bdc1edcd35278791fc4/chardet-7.6.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f14f46ef1977e41ce1f4814ca6984cea7f8b6baf8cbc6626ef7bf3d13cf7ea13", size = 1533221, upload-time = "2026-08-14T21:04:31.39Z" }, + { url = "https://files.pythonhosted.org/packages/cf/6e/5a0b348fa4cd7847567a28c6e697ccf58391960bfd13a6e7473ee23ca2f2/chardet-7.6.0-py3-none-any.whl", hash = "sha256:4076d795897ce45239825956a1334e134322ecc4bfe84dbb12acd5390de0fbc1", size = 680279, upload-time = "2026-08-14T20:36:57.763Z" }, ] [[package]] name = "charset-normalizer" -version = "3.4.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/1f/b8/6d51fc1d52cbd52cd4ccedd5b5b2f0f6a11bbf6765c782298b0f3e808541/charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d", size = 209709, upload-time = "2025-10-14T04:40:11.385Z" }, - { url = "https://files.pythonhosted.org/packages/5c/af/1f9d7f7faafe2ddfb6f72a2e07a548a629c61ad510fe60f9630309908fef/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8", size = 148814, upload-time = "2025-10-14T04:40:13.135Z" }, - { url = "https://files.pythonhosted.org/packages/79/3d/f2e3ac2bbc056ca0c204298ea4e3d9db9b4afe437812638759db2c976b5f/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad", size = 144467, upload-time = "2025-10-14T04:40:14.728Z" }, - { url = "https://files.pythonhosted.org/packages/ec/85/1bf997003815e60d57de7bd972c57dc6950446a3e4ccac43bc3070721856/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8", size = 162280, upload-time = "2025-10-14T04:40:16.14Z" }, - { url = "https://files.pythonhosted.org/packages/3e/8e/6aa1952f56b192f54921c436b87f2aaf7c7a7c3d0d1a765547d64fd83c13/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d", size = 159454, upload-time = "2025-10-14T04:40:17.567Z" }, - { url = "https://files.pythonhosted.org/packages/36/3b/60cbd1f8e93aa25d1c669c649b7a655b0b5fb4c571858910ea9332678558/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313", size = 153609, upload-time = "2025-10-14T04:40:19.08Z" }, - { url = "https://files.pythonhosted.org/packages/64/91/6a13396948b8fd3c4b4fd5bc74d045f5637d78c9675585e8e9fbe5636554/charset_normalizer-3.4.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e", size = 151849, upload-time = "2025-10-14T04:40:20.607Z" }, - { url = "https://files.pythonhosted.org/packages/b7/7a/59482e28b9981d105691e968c544cc0df3b7d6133152fb3dcdc8f135da7a/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93", size = 151586, upload-time = "2025-10-14T04:40:21.719Z" }, - { url = "https://files.pythonhosted.org/packages/92/59/f64ef6a1c4bdd2baf892b04cd78792ed8684fbc48d4c2afe467d96b4df57/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0", size = 145290, upload-time = "2025-10-14T04:40:23.069Z" }, - { url = "https://files.pythonhosted.org/packages/6b/63/3bf9f279ddfa641ffa1962b0db6a57a9c294361cc2f5fcac997049a00e9c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84", size = 163663, upload-time = "2025-10-14T04:40:24.17Z" }, - { url = "https://files.pythonhosted.org/packages/ed/09/c9e38fc8fa9e0849b172b581fd9803bdf6e694041127933934184e19f8c3/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e", size = 151964, upload-time = "2025-10-14T04:40:25.368Z" }, - { url = "https://files.pythonhosted.org/packages/d2/d1/d28b747e512d0da79d8b6a1ac18b7ab2ecfd81b2944c4c710e166d8dd09c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db", size = 161064, upload-time = "2025-10-14T04:40:26.806Z" }, - { url = "https://files.pythonhosted.org/packages/bb/9a/31d62b611d901c3b9e5500c36aab0ff5eb442043fb3a1c254200d3d397d9/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6", size = 155015, upload-time = "2025-10-14T04:40:28.284Z" }, - { url = "https://files.pythonhosted.org/packages/1f/f3/107e008fa2bff0c8b9319584174418e5e5285fef32f79d8ee6a430d0039c/charset_normalizer-3.4.4-cp310-cp310-win32.whl", hash = "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f", size = 99792, upload-time = "2025-10-14T04:40:29.613Z" }, - { url = "https://files.pythonhosted.org/packages/eb/66/e396e8a408843337d7315bab30dbf106c38966f1819f123257f5520f8a96/charset_normalizer-3.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d", size = 107198, upload-time = "2025-10-14T04:40:30.644Z" }, - { url = "https://files.pythonhosted.org/packages/b5/58/01b4f815bf0312704c267f2ccb6e5d42bcc7752340cd487bc9f8c3710597/charset_normalizer-3.4.4-cp310-cp310-win_arm64.whl", hash = "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69", size = 100262, upload-time = "2025-10-14T04:40:32.108Z" }, - { url = "https://files.pythonhosted.org/packages/ed/27/c6491ff4954e58a10f69ad90aca8a1b6fe9c5d3c6f380907af3c37435b59/charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8", size = 206988, upload-time = "2025-10-14T04:40:33.79Z" }, - { url = "https://files.pythonhosted.org/packages/94/59/2e87300fe67ab820b5428580a53cad894272dbb97f38a7a814a2a1ac1011/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0", size = 147324, upload-time = "2025-10-14T04:40:34.961Z" }, - { url = "https://files.pythonhosted.org/packages/07/fb/0cf61dc84b2b088391830f6274cb57c82e4da8bbc2efeac8c025edb88772/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3", size = 142742, upload-time = "2025-10-14T04:40:36.105Z" }, - { url = "https://files.pythonhosted.org/packages/62/8b/171935adf2312cd745d290ed93cf16cf0dfe320863ab7cbeeae1dcd6535f/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc", size = 160863, upload-time = "2025-10-14T04:40:37.188Z" }, - { url = "https://files.pythonhosted.org/packages/09/73/ad875b192bda14f2173bfc1bc9a55e009808484a4b256748d931b6948442/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897", size = 157837, upload-time = "2025-10-14T04:40:38.435Z" }, - { url = "https://files.pythonhosted.org/packages/6d/fc/de9cce525b2c5b94b47c70a4b4fb19f871b24995c728e957ee68ab1671ea/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381", size = 151550, upload-time = "2025-10-14T04:40:40.053Z" }, - { url = "https://files.pythonhosted.org/packages/55/c2/43edd615fdfba8c6f2dfbd459b25a6b3b551f24ea21981e23fb768503ce1/charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815", size = 149162, upload-time = "2025-10-14T04:40:41.163Z" }, - { url = "https://files.pythonhosted.org/packages/03/86/bde4ad8b4d0e9429a4e82c1e8f5c659993a9a863ad62c7df05cf7b678d75/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0", size = 150019, upload-time = "2025-10-14T04:40:42.276Z" }, - { url = "https://files.pythonhosted.org/packages/1f/86/a151eb2af293a7e7bac3a739b81072585ce36ccfb4493039f49f1d3cae8c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161", size = 143310, upload-time = "2025-10-14T04:40:43.439Z" }, - { url = "https://files.pythonhosted.org/packages/b5/fe/43dae6144a7e07b87478fdfc4dbe9efd5defb0e7ec29f5f58a55aeef7bf7/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4", size = 162022, upload-time = "2025-10-14T04:40:44.547Z" }, - { url = "https://files.pythonhosted.org/packages/80/e6/7aab83774f5d2bca81f42ac58d04caf44f0cc2b65fc6db2b3b2e8a05f3b3/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89", size = 149383, upload-time = "2025-10-14T04:40:46.018Z" }, - { url = "https://files.pythonhosted.org/packages/4f/e8/b289173b4edae05c0dde07f69f8db476a0b511eac556dfe0d6bda3c43384/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569", size = 159098, upload-time = "2025-10-14T04:40:47.081Z" }, - { url = "https://files.pythonhosted.org/packages/d8/df/fe699727754cae3f8478493c7f45f777b17c3ef0600e28abfec8619eb49c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224", size = 152991, upload-time = "2025-10-14T04:40:48.246Z" }, - { url = "https://files.pythonhosted.org/packages/1a/86/584869fe4ddb6ffa3bd9f491b87a01568797fb9bd8933f557dba9771beaf/charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a", size = 99456, upload-time = "2025-10-14T04:40:49.376Z" }, - { url = "https://files.pythonhosted.org/packages/65/f6/62fdd5feb60530f50f7e38b4f6a1d5203f4d16ff4f9f0952962c044e919a/charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016", size = 106978, upload-time = "2025-10-14T04:40:50.844Z" }, - { url = "https://files.pythonhosted.org/packages/7a/9d/0710916e6c82948b3be62d9d398cb4fcf4e97b56d6a6aeccd66c4b2f2bd5/charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1", size = 99969, upload-time = "2025-10-14T04:40:52.272Z" }, - { url = "https://files.pythonhosted.org/packages/f3/85/1637cd4af66fa687396e757dec650f28025f2a2f5a5531a3208dc0ec43f2/charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394", size = 208425, upload-time = "2025-10-14T04:40:53.353Z" }, - { url = "https://files.pythonhosted.org/packages/9d/6a/04130023fef2a0d9c62d0bae2649b69f7b7d8d24ea5536feef50551029df/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25", size = 148162, upload-time = "2025-10-14T04:40:54.558Z" }, - { url = "https://files.pythonhosted.org/packages/78/29/62328d79aa60da22c9e0b9a66539feae06ca0f5a4171ac4f7dc285b83688/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef", size = 144558, upload-time = "2025-10-14T04:40:55.677Z" }, - { url = "https://files.pythonhosted.org/packages/86/bb/b32194a4bf15b88403537c2e120b817c61cd4ecffa9b6876e941c3ee38fe/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d", size = 161497, upload-time = "2025-10-14T04:40:57.217Z" }, - { url = "https://files.pythonhosted.org/packages/19/89/a54c82b253d5b9b111dc74aca196ba5ccfcca8242d0fb64146d4d3183ff1/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8", size = 159240, upload-time = "2025-10-14T04:40:58.358Z" }, - { url = "https://files.pythonhosted.org/packages/c0/10/d20b513afe03acc89ec33948320a5544d31f21b05368436d580dec4e234d/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86", size = 153471, upload-time = "2025-10-14T04:40:59.468Z" }, - { url = "https://files.pythonhosted.org/packages/61/fa/fbf177b55bdd727010f9c0a3c49eefa1d10f960e5f09d1d887bf93c2e698/charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a", size = 150864, upload-time = "2025-10-14T04:41:00.623Z" }, - { url = "https://files.pythonhosted.org/packages/05/12/9fbc6a4d39c0198adeebbde20b619790e9236557ca59fc40e0e3cebe6f40/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f", size = 150647, upload-time = "2025-10-14T04:41:01.754Z" }, - { url = "https://files.pythonhosted.org/packages/ad/1f/6a9a593d52e3e8c5d2b167daf8c6b968808efb57ef4c210acb907c365bc4/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc", size = 145110, upload-time = "2025-10-14T04:41:03.231Z" }, - { url = "https://files.pythonhosted.org/packages/30/42/9a52c609e72471b0fc54386dc63c3781a387bb4fe61c20231a4ebcd58bdd/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf", size = 162839, upload-time = "2025-10-14T04:41:04.715Z" }, - { url = "https://files.pythonhosted.org/packages/c4/5b/c0682bbf9f11597073052628ddd38344a3d673fda35a36773f7d19344b23/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15", size = 150667, upload-time = "2025-10-14T04:41:05.827Z" }, - { url = "https://files.pythonhosted.org/packages/e4/24/a41afeab6f990cf2daf6cb8c67419b63b48cf518e4f56022230840c9bfb2/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9", size = 160535, upload-time = "2025-10-14T04:41:06.938Z" }, - { url = "https://files.pythonhosted.org/packages/2a/e5/6a4ce77ed243c4a50a1fecca6aaaab419628c818a49434be428fe24c9957/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0", size = 154816, upload-time = "2025-10-14T04:41:08.101Z" }, - { url = "https://files.pythonhosted.org/packages/a8/ef/89297262b8092b312d29cdb2517cb1237e51db8ecef2e9af5edbe7b683b1/charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26", size = 99694, upload-time = "2025-10-14T04:41:09.23Z" }, - { url = "https://files.pythonhosted.org/packages/3d/2d/1e5ed9dd3b3803994c155cd9aacb60c82c331bad84daf75bcb9c91b3295e/charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525", size = 107131, upload-time = "2025-10-14T04:41:10.467Z" }, - { url = "https://files.pythonhosted.org/packages/d0/d9/0ed4c7098a861482a7b6a95603edce4c0d9db2311af23da1fb2b75ec26fc/charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3", size = 100390, upload-time = "2025-10-14T04:41:11.915Z" }, - { url = "https://files.pythonhosted.org/packages/97/45/4b3a1239bbacd321068ea6e7ac28875b03ab8bc0aa0966452db17cd36714/charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", size = 208091, upload-time = "2025-10-14T04:41:13.346Z" }, - { url = "https://files.pythonhosted.org/packages/7d/62/73a6d7450829655a35bb88a88fca7d736f9882a27eacdca2c6d505b57e2e/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", size = 147936, upload-time = "2025-10-14T04:41:14.461Z" }, - { url = "https://files.pythonhosted.org/packages/89/c5/adb8c8b3d6625bef6d88b251bbb0d95f8205831b987631ab0c8bb5d937c2/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", size = 144180, upload-time = "2025-10-14T04:41:15.588Z" }, - { url = "https://files.pythonhosted.org/packages/91/ed/9706e4070682d1cc219050b6048bfd293ccf67b3d4f5a4f39207453d4b99/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", size = 161346, upload-time = "2025-10-14T04:41:16.738Z" }, - { url = "https://files.pythonhosted.org/packages/d5/0d/031f0d95e4972901a2f6f09ef055751805ff541511dc1252ba3ca1f80cf5/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", size = 158874, upload-time = "2025-10-14T04:41:17.923Z" }, - { url = "https://files.pythonhosted.org/packages/f5/83/6ab5883f57c9c801ce5e5677242328aa45592be8a00644310a008d04f922/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", size = 153076, upload-time = "2025-10-14T04:41:19.106Z" }, - { url = "https://files.pythonhosted.org/packages/75/1e/5ff781ddf5260e387d6419959ee89ef13878229732732ee73cdae01800f2/charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", size = 150601, upload-time = "2025-10-14T04:41:20.245Z" }, - { url = "https://files.pythonhosted.org/packages/d7/57/71be810965493d3510a6ca79b90c19e48696fb1ff964da319334b12677f0/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", size = 150376, upload-time = "2025-10-14T04:41:21.398Z" }, - { url = "https://files.pythonhosted.org/packages/e5/d5/c3d057a78c181d007014feb7e9f2e65905a6c4ef182c0ddf0de2924edd65/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", size = 144825, upload-time = "2025-10-14T04:41:22.583Z" }, - { url = "https://files.pythonhosted.org/packages/e6/8c/d0406294828d4976f275ffbe66f00266c4b3136b7506941d87c00cab5272/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", size = 162583, upload-time = "2025-10-14T04:41:23.754Z" }, - { url = "https://files.pythonhosted.org/packages/d7/24/e2aa1f18c8f15c4c0e932d9287b8609dd30ad56dbe41d926bd846e22fb8d/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", size = 150366, upload-time = "2025-10-14T04:41:25.27Z" }, - { url = "https://files.pythonhosted.org/packages/e4/5b/1e6160c7739aad1e2df054300cc618b06bf784a7a164b0f238360721ab86/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", size = 160300, upload-time = "2025-10-14T04:41:26.725Z" }, - { url = "https://files.pythonhosted.org/packages/7a/10/f882167cd207fbdd743e55534d5d9620e095089d176d55cb22d5322f2afd/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", size = 154465, upload-time = "2025-10-14T04:41:28.322Z" }, - { url = "https://files.pythonhosted.org/packages/89/66/c7a9e1b7429be72123441bfdbaf2bc13faab3f90b933f664db506dea5915/charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", size = 99404, upload-time = "2025-10-14T04:41:29.95Z" }, - { url = "https://files.pythonhosted.org/packages/c4/26/b9924fa27db384bdcd97ab83b4f0a8058d96ad9626ead570674d5e737d90/charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", size = 107092, upload-time = "2025-10-14T04:41:31.188Z" }, - { url = "https://files.pythonhosted.org/packages/af/8f/3ed4bfa0c0c72a7ca17f0380cd9e4dd842b09f664e780c13cff1dcf2ef1b/charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", size = 100408, upload-time = "2025-10-14T04:41:32.624Z" }, - { url = "https://files.pythonhosted.org/packages/2a/35/7051599bd493e62411d6ede36fd5af83a38f37c4767b92884df7301db25d/charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", size = 207746, upload-time = "2025-10-14T04:41:33.773Z" }, - { url = "https://files.pythonhosted.org/packages/10/9a/97c8d48ef10d6cd4fcead2415523221624bf58bcf68a802721a6bc807c8f/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", size = 147889, upload-time = "2025-10-14T04:41:34.897Z" }, - { url = "https://files.pythonhosted.org/packages/10/bf/979224a919a1b606c82bd2c5fa49b5c6d5727aa47b4312bb27b1734f53cd/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", size = 143641, upload-time = "2025-10-14T04:41:36.116Z" }, - { url = "https://files.pythonhosted.org/packages/ba/33/0ad65587441fc730dc7bd90e9716b30b4702dc7b617e6ba4997dc8651495/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", size = 160779, upload-time = "2025-10-14T04:41:37.229Z" }, - { url = "https://files.pythonhosted.org/packages/67/ed/331d6b249259ee71ddea93f6f2f0a56cfebd46938bde6fcc6f7b9a3d0e09/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", size = 159035, upload-time = "2025-10-14T04:41:38.368Z" }, - { url = "https://files.pythonhosted.org/packages/67/ff/f6b948ca32e4f2a4576aa129d8bed61f2e0543bf9f5f2b7fc3758ed005c9/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", size = 152542, upload-time = "2025-10-14T04:41:39.862Z" }, - { url = "https://files.pythonhosted.org/packages/16/85/276033dcbcc369eb176594de22728541a925b2632f9716428c851b149e83/charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", size = 149524, upload-time = "2025-10-14T04:41:41.319Z" }, - { url = "https://files.pythonhosted.org/packages/9e/f2/6a2a1f722b6aba37050e626530a46a68f74e63683947a8acff92569f979a/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", size = 150395, upload-time = "2025-10-14T04:41:42.539Z" }, - { url = "https://files.pythonhosted.org/packages/60/bb/2186cb2f2bbaea6338cad15ce23a67f9b0672929744381e28b0592676824/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", size = 143680, upload-time = "2025-10-14T04:41:43.661Z" }, - { url = "https://files.pythonhosted.org/packages/7d/a5/bf6f13b772fbb2a90360eb620d52ed8f796f3c5caee8398c3b2eb7b1c60d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", size = 162045, upload-time = "2025-10-14T04:41:44.821Z" }, - { url = "https://files.pythonhosted.org/packages/df/c5/d1be898bf0dc3ef9030c3825e5d3b83f2c528d207d246cbabe245966808d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", size = 149687, upload-time = "2025-10-14T04:41:46.442Z" }, - { url = "https://files.pythonhosted.org/packages/a5/42/90c1f7b9341eef50c8a1cb3f098ac43b0508413f33affd762855f67a410e/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", size = 160014, upload-time = "2025-10-14T04:41:47.631Z" }, - { url = "https://files.pythonhosted.org/packages/76/be/4d3ee471e8145d12795ab655ece37baed0929462a86e72372fd25859047c/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", size = 154044, upload-time = "2025-10-14T04:41:48.81Z" }, - { url = "https://files.pythonhosted.org/packages/b0/6f/8f7af07237c34a1defe7defc565a9bc1807762f672c0fde711a4b22bf9c0/charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", size = 99940, upload-time = "2025-10-14T04:41:49.946Z" }, - { url = "https://files.pythonhosted.org/packages/4b/51/8ade005e5ca5b0d80fb4aff72a3775b325bdc3d27408c8113811a7cbe640/charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", size = 107104, upload-time = "2025-10-14T04:41:51.051Z" }, - { url = "https://files.pythonhosted.org/packages/da/5f/6b8f83a55bb8278772c5ae54a577f3099025f9ade59d0136ac24a0df4bde/charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", size = 100743, upload-time = "2025-10-14T04:41:52.122Z" }, - { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" }, +version = "3.5.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659, upload-time = "2026-09-30T04:39:23.398Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/67/6a0b94a7960d5e1b5eacd2fb529f3fccc47db4644f7f0a7cfdcfc3be578a/charset_normalizer-3.5.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3d21b8b13c7592db2ac5e544a6d83187b995257472b0c9e8351b6d507ae37ed6", size = 370642, upload-time = "2026-09-30T04:35:06.91Z" }, + { url = "https://files.pythonhosted.org/packages/fb/94/01009e13b94041599004edf32e56e382c24e570f60f79bab8efe45cfe1eb/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d760fe2a4d7c3b226cb9026d6a842868d52a7901bd98420e1baf14e80da85cf5", size = 259280, upload-time = "2026-09-30T04:35:08.448Z" }, + { url = "https://files.pythonhosted.org/packages/66/85/3b5358f60a13210f0b67d3755c168ef758701b021e655d88d4da28554467/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c9790464842f85f437dbbb54417eda1e0e6bfc52dd8d22d6fd1c994b73b2dc74", size = 245335, upload-time = "2026-09-30T04:35:10.104Z" }, + { url = "https://files.pythonhosted.org/packages/74/75/77c1c479b09ecd751d1e767b251ea5c14d4d50ff757bf404afab2692f600/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4685902cf26edf013ed7a3da0f426ebba7a00ebb9541386d835afbf002c11cab", size = 291707, upload-time = "2026-09-30T04:35:11.575Z" }, + { url = "https://files.pythonhosted.org/packages/0b/0d/363f78cacb70f58f15f4b083961bbd9d292f335d3f5c66fc4f1cfe69cb90/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4495c5002a7b28557e7e222e77e0b661183e432b7d6d2e788101e3f240e05b8c", size = 286747, upload-time = "2026-09-30T04:35:13.022Z" }, + { url = "https://files.pythonhosted.org/packages/e4/ed/cf505d3011ffceb12c2067a7a5d3cfe92b875d4d44bb0ff0d69375e2c184/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f", size = 269972, upload-time = "2026-09-30T04:35:14.606Z" }, + { url = "https://files.pythonhosted.org/packages/15/d8/f0a93a431d170e7ca681d4f6650fee3de934d18560e474e7267eb4b0f987/charset_normalizer-3.5.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef4fcbf3327382cd4c9f540babd61248208af7b93eec4de397b4d5f58a09e288", size = 269339, upload-time = "2026-09-30T04:35:16.087Z" }, + { url = "https://files.pythonhosted.org/packages/86/bd/9b2bd1c5b7af02462c9752d33994834ff972a96b4c483eefde9e594488e2/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd16aabe4a02a297c23417aa17ac6299dbd8c49f673bcd645b4929b11f5a4400", size = 261683, upload-time = "2026-09-30T04:35:17.488Z" }, + { url = "https://files.pythonhosted.org/packages/76/a5/cac540ab0fd61f3fec88ad3dbb64509e71424593d73cfdfff5ab3e4db279/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:fb9e68df06293761f9fe66ade60a9bc6d0f5e42b8acf2939a9158af86ab0e5bd", size = 248143, upload-time = "2026-09-30T04:35:18.849Z" }, + { url = "https://files.pythonhosted.org/packages/71/7a/ff467301deef2089fad87f72df9e000a26a78fec7acbb18e1999371b8369/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:59f63901b0031c3136cf64704dcb21de0bbae62ce2c9529bc39d27665463de37", size = 292358, upload-time = "2026-09-30T04:35:20.326Z" }, + { url = "https://files.pythonhosted.org/packages/ad/77/22d7e785d1e210afc2e2f58600dd1799d17a35665faf84383f002826c5f8/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:304d5463e65a35d7bb0850550e0780395395f6fcf452f04db7d5ca7cecc425ac", size = 268766, upload-time = "2026-09-30T04:35:21.72Z" }, + { url = "https://files.pythonhosted.org/packages/ae/91/e8e946267f1c2d9e2bd651726e2fbd2addf02c4d36cea5069e32ca9d7bb5/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9cf9b1a857e25c4baceeb3624e92a56df3668f398c4acba74e174d81fb4d1d3a", size = 287432, upload-time = "2026-09-30T04:35:23.273Z" }, + { url = "https://files.pythonhosted.org/packages/4e/88/7561d8a88d555e7df6623abe7c0070b4baf47549b9408783a2ae0a1a6cf7/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:114e4d0c92d618409ed82a99e22b5c5e768fe995f2973f78265f4524f49d4640", size = 272470, upload-time = "2026-09-30T04:35:24.655Z" }, + { url = "https://files.pythonhosted.org/packages/35/7e/578c702301ec036f01455f30744a08d2b42f6ab35b9b2d4bf8cae0ef2a80/charset_normalizer-3.5.2-cp311-cp311-win32.whl", hash = "sha256:2625388c6c754520c37abaf3b41eb34d1cc4a373f457898f08606c8e362b891d", size = 186688, upload-time = "2026-09-30T04:35:26.225Z" }, + { url = "https://files.pythonhosted.org/packages/e8/fc/fdf8cf52ff21cd5bf158f20978991cf985325842f74283eb6df26c8a39d8/charset_normalizer-3.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:87e50a3e7cb90af586b6c5faf23e302a970415ac73bd7bd90a515a04b427ef96", size = 214932, upload-time = "2026-09-30T04:35:27.796Z" }, + { url = "https://files.pythonhosted.org/packages/97/66/3e45a506d8110b632541faf9a9470185aa9878f1ed44020f31346c1c5e5b/charset_normalizer-3.5.2-cp311-cp311-win_arm64.whl", hash = "sha256:254eb48b9fa5ee9898a3c445825a1f340fe53712a098904b39b0bddba8ea3cb1", size = 202828, upload-time = "2026-09-30T04:35:29.259Z" }, + { url = "https://files.pythonhosted.org/packages/e7/c8/693809898870237d82785a03f3b2b58fe4c9f14669f84a7d4e623c92a59e/charset_normalizer-3.5.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed2a239c0ea213acc1908150a3037257083c7c083128f1a4cec2ec4b97dca491", size = 367780, upload-time = "2026-09-30T04:35:30.888Z" }, + { url = "https://files.pythonhosted.org/packages/c9/87/2fea8c13dc24b3ca9c6f803a5b2dfdeae73eb4f9e12c7885ed908ff0433c/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b91363207bd9dc966a691e959bb47f64b30f7ac4b072be9968b366982f7db77c", size = 246730, upload-time = "2026-09-30T04:35:32.286Z" }, + { url = "https://files.pythonhosted.org/packages/a8/9e/09efac30b937722f46d3110ba30b875b24b2e3a266ed746cc4e376a94d80/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:38a873987f3be698494da8b2e3085e29da02da7b633dce73e79c699a113d7bf0", size = 237707, upload-time = "2026-09-30T04:35:33.709Z" }, + { url = "https://files.pythonhosted.org/packages/9e/18/70d76670b13686237863a379928d60bd10e021f17d243ab3d7014c4a5f4e/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:355ad8011081dec5412240c087a9a0c9d4d5039f3ed11a3f13e18c2b29b56c51", size = 273050, upload-time = "2026-09-30T04:35:35.138Z" }, + { url = "https://files.pythonhosted.org/packages/54/e2/77a8b09d5adc013ed07b95b01b8b8fa5441c4e810e83ee7e4aae2fa4d91a/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ee21e28f0430bd6dc9086c6e525d5e818a44a5ad19720c8a0ef766792f3eb5e5", size = 270345, upload-time = "2026-09-30T04:35:36.502Z" }, + { url = "https://files.pythonhosted.org/packages/7f/c5/38806a25ab5e65fc178f39affeda20858efafede2fce1ffc2556cfc9fe73/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649", size = 257601, upload-time = "2026-09-30T04:35:37.919Z" }, + { url = "https://files.pythonhosted.org/packages/ae/8d/213565184708fdb263ae55e2c04ee1ff748129dd65d48ed0e3502da9c85a/charset_normalizer-3.5.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5cde776b7cc66e4f6c99612cea4aa7269aa65863f7a15841b2c264f103822f4e", size = 252222, upload-time = "2026-09-30T04:35:39.544Z" }, + { url = "https://files.pythonhosted.org/packages/7e/24/76d2cefc25472531e4c5c7dfff68865eb1c39b78482f0fdc15b46f047830/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ae4f5fea5b8b8ccff88238cc8569303e5ee95efae67fa62922a311397a71f346", size = 248482, upload-time = "2026-09-30T04:35:41.088Z" }, + { url = "https://files.pythonhosted.org/packages/7d/dc/65a801b66ab4c197e22c433ab25e7ac24324ac6f45a2269aca42cce309bf/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f7d486c83842422badd511868fd8a9a20e9407ace71564b6af47ce7e60a336c1", size = 241206, upload-time = "2026-09-30T04:35:42.59Z" }, + { url = "https://files.pythonhosted.org/packages/a7/95/ca9b5eabde673002c6f1e7ada1b223916fe18f6d661da7aabd4d643718f1/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:11a4d68a6ecda3292cb1e50239e111543ba5d709bb62a6b4ea1afcfa729d8875", size = 273190, upload-time = "2026-09-30T04:35:44.347Z" }, + { url = "https://files.pythonhosted.org/packages/2d/8b/803b4d2a3f6e1740f63f1e87b04d14b42f3d4fdfe6ed7d4db2d34102b14f/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d6734d2ef8a50fbf8445c139477da401f50d62a0606bf00e20ec6d87773fefb1", size = 253527, upload-time = "2026-09-30T04:35:45.915Z" }, + { url = "https://files.pythonhosted.org/packages/a9/55/93c0e5dbd085ae0471346026abbe7e0db9ea2d6fea74e51f0b5a46f233a7/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a815775b6c38d4e0ff7bcffbeba67feded90202bb6a226b8dd35f1c855217413", size = 271285, upload-time = "2026-09-30T04:35:47.49Z" }, + { url = "https://files.pythonhosted.org/packages/95/69/0dbd0e0b9b16cfa816cdfcb3e2e3854a1f680dc07fb1245ea125e7448060/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:23851fb4e1b85ed3f6c2a27b777cdfe2e19fb5b38429a8faf38c7542b7665869", size = 260010, upload-time = "2026-09-30T04:35:48.996Z" }, + { url = "https://files.pythonhosted.org/packages/58/9d/e7b88e7b1bf403590c3b573277b5e1e488c68c7a6fbacca310a2c324e90c/charset_normalizer-3.5.2-cp312-cp312-win32.whl", hash = "sha256:db19d07e2e0129e974a0e65d0064fc222a446cd5122c2fd4184d2af9fc734a9e", size = 184125, upload-time = "2026-09-30T04:35:50.777Z" }, + { url = "https://files.pythonhosted.org/packages/eb/e6/e6e083884cbcfd49c64865af05027fe7011be7b2d9179524f099a1b611f3/charset_normalizer-3.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:780fbe7cab297b81dad9fb8dc5eb003c0468ffb0d9e5f65068c53a34661a96bc", size = 207486, upload-time = "2026-09-30T04:35:52.194Z" }, + { url = "https://files.pythonhosted.org/packages/c4/e3/017aea0911ada7405a825c7d937eb3a13009664e2f5b38e8c4bbf2abf894/charset_normalizer-3.5.2-cp312-cp312-win_arm64.whl", hash = "sha256:e2af3aad578aa6bd1384bcf4750fc285e5a9de53f40b7d41e5a0bf748edeb2b3", size = 196734, upload-time = "2026-09-30T04:35:53.636Z" }, + { url = "https://files.pythonhosted.org/packages/c5/34/68292d68512768591aaff07c59bb53ee31341c87759433a859c4641a50c2/charset_normalizer-3.5.2-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:ed905975ab14056a2e5eb1c376cb2e1ebc5396baf84163939c518556fccde9f5", size = 225946, upload-time = "2026-09-30T04:35:55.313Z" }, + { url = "https://files.pythonhosted.org/packages/e3/80/bee0b01b90ccd5322ae1d0abb33fab1bd95b7c2eadaf02aeccf22e04ee83/charset_normalizer-3.5.2-cp313-cp313-android_24_x86_64.whl", hash = "sha256:a66c3bc5ab1f0ff2164fc9965ddd611ff0802173f4b9d24554c563f6ab7e1d6e", size = 238619, upload-time = "2026-09-30T04:35:56.863Z" }, + { url = "https://files.pythonhosted.org/packages/78/6e/60ce52a85a7fd631ae8482ae6d74521014ca2f255892679484dc04d7ef56/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:d2374b62878abb00cd8309b32af6c0b715cd02dec0ca74ef12e5069bdc64144a", size = 206701, upload-time = "2026-09-30T04:35:58.639Z" }, + { url = "https://files.pythonhosted.org/packages/36/8c/71aafad23f971afc84c2b295bc0c560739ce1dac558aad9fec22e39f3639/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:d376bbd28b3a8999db1a103b3b388aee6f1ddeb3e51bc2172993efdcd86e064d", size = 210506, upload-time = "2026-09-30T04:36:00.147Z" }, + { url = "https://files.pythonhosted.org/packages/91/da/3c5a7798c046df7d2d68ad653cf5b6c5a8bfee225055a843c6f2f42aac1a/charset_normalizer-3.5.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6045373d5a89a5ec71afde535db987ca28e76dfa276c2d4c818265b375d4b055", size = 366626, upload-time = "2026-09-30T04:36:01.77Z" }, + { url = "https://files.pythonhosted.org/packages/e1/16/710ac3de2ee354e2bd1a9c94efe45a2d27b5c6ad39b2d6a905be2c094b6c/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:849df64e889b2e17230d58410a03dba311a65b163508fd33679b2b737d4b7858", size = 244624, upload-time = "2026-09-30T04:36:03.389Z" }, + { url = "https://files.pythonhosted.org/packages/d6/39/45c7439f5b63d24f7d5b2a1d760f34af7628782d7144b4cc8ded45c2d4bc/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:15c44f7edfd477b06f517a5cc317fc1707edb9de2c865f43d4b6513907473234", size = 235731, upload-time = "2026-09-30T04:36:04.987Z" }, + { url = "https://files.pythonhosted.org/packages/4d/34/38f3154785ce92e9f56eb226f4d35bdfae6b008480dd055f58837a89c810/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a89012d6d5476ee112d20d998570ed58df2260a852afb1758809cd6900411d21", size = 270352, upload-time = "2026-09-30T04:36:06.412Z" }, + { url = "https://files.pythonhosted.org/packages/04/f3/859f74e7babc977705026b30593b3be04049632a522fb7000f83c033d747/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0c951d5e6dd9c2ff60609476752bee49da4206adde960ebc247766937f72e718", size = 267393, upload-time = "2026-09-30T04:36:07.865Z" }, + { url = "https://files.pythonhosted.org/packages/4b/85/41d27f234b82e47c167a5f6c0f62501dc0c640585ff4aba79e08a390336a/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7218e8f32b0956cfcd048fd42d9d5779809745ca1d86113ca56f66e7ae1549c4", size = 254660, upload-time = "2026-09-30T04:36:09.248Z" }, + { url = "https://files.pythonhosted.org/packages/58/ca/5d1a997587febe5b26d8daffe363b5c1a091cece19828eec6502fd09c5ef/charset_normalizer-3.5.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a19a731138fc27d5682277d3b9df22855cea1239bce7fcec5f78f42ef2d1f3c3", size = 249996, upload-time = "2026-09-30T04:36:10.73Z" }, + { url = "https://files.pythonhosted.org/packages/b3/1f/d1e78246f7ed60c8c8d606b4ac27f66ce49cc3e95f24893ccbeba9f77302/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62603db9a7caa0802eaa28c1c46fecd7b3a263a774069c24c3c28c302448721c", size = 247028, upload-time = "2026-09-30T04:36:12.294Z" }, + { url = "https://files.pythonhosted.org/packages/8e/37/eba316edd4f0c4d3a5d945924c4eeeae59abac4056aa815d8a4268f863a2/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b6856554c4f44d79fc2307d5768854310a8f0096e501c75637542c82292b0429", size = 240562, upload-time = "2026-09-30T04:36:13.887Z" }, + { url = "https://files.pythonhosted.org/packages/c8/8e/aaa037d40ca9ef045977f1a661048b1aa33f223adfce3452fe9be9f79d14/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1bc0baf5ef96b6ede57d47f4b8fe4d9d84019c3bfcbeb20a41edc6a6ee341f1f", size = 271699, upload-time = "2026-09-30T04:36:15.41Z" }, + { url = "https://files.pythonhosted.org/packages/26/19/1c1c9f75974adf523b87f34b8a2adc5a435cd65916812bcbd0dfa45f9a29/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:56bc200a365efb37383b7852e4cc5898d3b2da5987289b543956cf8cad71018a", size = 252030, upload-time = "2026-09-30T04:36:16.839Z" }, + { url = "https://files.pythonhosted.org/packages/bc/90/0660ef18e18df0a4d2a1a0edff7dfbba42d4e50ef2425557a5bb7051f77b/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2c9ad19a6cfcd5ea5c0d41161d22f9df1dcc277e9bef2751391334546a314c00", size = 268565, upload-time = "2026-09-30T04:36:18.468Z" }, + { url = "https://files.pythonhosted.org/packages/79/ba/57adc269824e8658f1a0f97a9e514c247445a9632b3419b97e0ba37f16dc/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e243bd13217235fc7290c621941c3f5cc8b66e4872495be821d7436ba2fb838d", size = 257627, upload-time = "2026-09-30T04:36:19.938Z" }, + { url = "https://files.pythonhosted.org/packages/9a/85/33abd4315c052d3d4f54c92b1ee49bfbc0dc7115a981e462a793b6d2ab87/charset_normalizer-3.5.2-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:a090bb2c68df85450502e3e20d665e3a5af9c65a84d6508ed477badd49166fd3", size = 143407, upload-time = "2026-09-30T04:36:21.376Z" }, + { url = "https://files.pythonhosted.org/packages/4f/de/6435e18d1aaa5d910b896d551411c96af1f42a0c56c29afc2016c61ccc2e/charset_normalizer-3.5.2-cp313-cp313-win32.whl", hash = "sha256:2b7b3bbfb4fe8ef40600792d762fbaa9057559f9d3fad209525b7a22b99e91fd", size = 183207, upload-time = "2026-09-30T04:36:22.776Z" }, + { url = "https://files.pythonhosted.org/packages/9c/76/b8ec57f4e9ee3253541abf95e4a462c0175fe8032dcd070f1f2421240942/charset_normalizer-3.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:78456a747de8dc58360ffa581f30a002baf5aa28cb262536545e91f113ed7639", size = 206489, upload-time = "2026-09-30T04:36:24.306Z" }, + { url = "https://files.pythonhosted.org/packages/3e/60/c647c6ae47480221e875ea5d743ff94946f7416e3c69415ab772928e8d32/charset_normalizer-3.5.2-cp313-cp313-win_arm64.whl", hash = "sha256:11912e4bb14baae7c5d8791aa55ba0a3a03ec6729073307b0f57270abaa713d3", size = 195501, upload-time = "2026-09-30T04:36:25.846Z" }, + { url = "https://files.pythonhosted.org/packages/58/ca/7aa91362a2f77ac8e9e28a9b902a74f7d0e11a851ef0d27a74308da8cd90/charset_normalizer-3.5.2-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:1afb975bd5d68d5ce9f6b6d44fdf2f7e34b895a35e95708a7a91b20a3b51d187", size = 226010, upload-time = "2026-09-30T04:36:27.669Z" }, + { url = "https://files.pythonhosted.org/packages/a8/cf/ac8878d0322cf88a1aad4c7b147db32ca0bd806eb0060957b2e31486dbe6/charset_normalizer-3.5.2-cp314-cp314-android_24_x86_64.whl", hash = "sha256:bbbfc8e28816f19d7c0f1816664980c0a9875d01b27cdf8eedddb639d9e108ad", size = 239266, upload-time = "2026-09-30T04:36:29.434Z" }, + { url = "https://files.pythonhosted.org/packages/c9/6d/9a08d7e0b29b7208e2c6c01dc56c8e0520e7c7beadbbfb024b58fd69c8a5/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7967d08cf06dee78443b874f98c98036f624f3a4e73e11f9f64f5be4d25393cf", size = 206783, upload-time = "2026-09-30T04:36:30.872Z" }, + { url = "https://files.pythonhosted.org/packages/82/44/b0aa350280e6ff5a5492d17cf10460dd39d5ee848f872f7ba2df10607f60/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4c2b5031f63e331e3839b40aed2dd6f191e9c07edbde303e7876846ea1946995", size = 210449, upload-time = "2026-09-30T04:36:32.625Z" }, + { url = "https://files.pythonhosted.org/packages/7c/8a/40db9aa9f5907bb0e6f8b6d64064bf8852fb33d4b813ff9414911df7647c/charset_normalizer-3.5.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fcff63213e8e6e47770541a4607175404f47cbb3ebea7b6058cc82d524a0e424", size = 367815, upload-time = "2026-09-30T04:36:34.197Z" }, + { url = "https://files.pythonhosted.org/packages/7f/72/9c5e7707b57c8ddfa9ddf7b0b1d009d7fbab9e9e887d5b721060f37e307d/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8d86d6fc60743dc916eb79e2eb1ec4818e21e427731543af40a3021851174a13", size = 247095, upload-time = "2026-09-30T04:36:35.803Z" }, + { url = "https://files.pythonhosted.org/packages/83/09/71e453691e927de4ddf792770cfaab3f49d494e222f66ea5e404bbd5e39c/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a881931aa470808df94a8c380eed2bbbc76cd9dc622310f99665658c821eb6d", size = 233942, upload-time = "2026-09-30T04:36:37.407Z" }, + { url = "https://files.pythonhosted.org/packages/9f/86/85c84e4da8b27dd409577d9437926ff581c5f9d3c66038dc68c1a526de51/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8024d00c3faf3fc0c16e07a69f4405e8eac7cc0ab15f65fe6cf43827c4cf72b4", size = 273762, upload-time = "2026-09-30T04:36:38.904Z" }, + { url = "https://files.pythonhosted.org/packages/92/08/564955a4b5f2ccb410ab480bbe8c6a18063ff27f2d35458731c4a5335df9/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4d48f2d08b9de5864e2c8744d4461b862fb149a18274abc8b698c45975573438", size = 269514, upload-time = "2026-09-30T04:36:40.469Z" }, + { url = "https://files.pythonhosted.org/packages/18/24/bad3ac4271589df29cf5ce2f5ae490518a5739358052bd0d61209e6fea54/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34276fd796040bf0993ab33a369aa572e6979c7aab225a88893667ad8eac8f7a", size = 255056, upload-time = "2026-09-30T04:36:42.02Z" }, + { url = "https://files.pythonhosted.org/packages/d6/3e/350d89ad49916b86554d6f5f2d03ec1152148f87e5ff735106c6a03b1a36/charset_normalizer-3.5.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0521c5665880b33d603717defa76c094048900010897909952397feb3039da56", size = 251311, upload-time = "2026-09-30T04:36:43.577Z" }, + { url = "https://files.pythonhosted.org/packages/56/5b/4970a2d154df502e133402906dd04e3ae7cada7b3011283c88d0479a2585/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:eff0ac9dbe711a4aee69bf04a83896aa9b85f19641264053a9f6d48573abb7dd", size = 250190, upload-time = "2026-09-30T04:36:45.185Z" }, + { url = "https://files.pythonhosted.org/packages/88/8c/f1a91bddc8fb47c2889e29ea7ea49a194eb0d9868675d786806519c00d76/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:1503bccbeb36d5527790c3930327704c39af22de3112f1b1666a9f3ce15ee204", size = 237098, upload-time = "2026-09-30T04:36:46.689Z" }, + { url = "https://files.pythonhosted.org/packages/24/0e/bb5dace3cc7e79068425386a6589c19b5a2ab5fefc2a46abea6919683332/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:52aa6992700996af31f375de0c6bacd402b0097fe40b53c426b9f51a90ebabc7", size = 274228, upload-time = "2026-09-30T04:36:48.31Z" }, + { url = "https://files.pythonhosted.org/packages/9d/79/b849ad523017ea9f5a45581bbebed91439e0cf42fd2860a6f64e358eb5a6/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e09a3942ecbdee5cce73ea9d42da82b81b72ac1bf031ce069b93b5adf4eac8cd", size = 252401, upload-time = "2026-09-30T04:36:50.091Z" }, + { url = "https://files.pythonhosted.org/packages/89/8c/75469d690cf47200bce8f6cad7655724fc23148e147abfc5ce78b5f65863/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:c7c9ab723cde841fefb34efbad91e87f00a674b1fe1cd0784fde742bf2c154dc", size = 271846, upload-time = "2026-09-30T04:36:51.719Z" }, + { url = "https://files.pythonhosted.org/packages/26/cd/6d52d3c7437cdcf2e310ce9f28f282e733d4ef60ed19105d1819c356255f/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ddc7dacc8ece3a182e7f15cb862d1fd616b46d076cb1ae9dd232b2c38b655874", size = 258151, upload-time = "2026-09-30T04:36:53.234Z" }, + { url = "https://files.pythonhosted.org/packages/f7/4c/070b38bdb5f49a70199fce923ec0726a49536a63ab262abbfcaaf351110b/charset_normalizer-3.5.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:ee43c17b173d46a3212baa6ead3ae258eeabdae48c263a01ccf0218c366dd655", size = 143570, upload-time = "2026-09-30T04:36:54.816Z" }, + { url = "https://files.pythonhosted.org/packages/81/84/9ebfc8ed6c8c4fcd8e726ff6bf220cc8deb3966e31dce9be8dd8aa017e64/charset_normalizer-3.5.2-cp314-cp314-win32.whl", hash = "sha256:4f87960d57feabfb618e4e0af6e7371645fa26a277860739d6e5d6e0012c92f0", size = 186412, upload-time = "2026-09-30T04:36:56.643Z" }, + { url = "https://files.pythonhosted.org/packages/d1/78/5ed86f743d4bc350db307e7636419a0a5ee1d91806d30c7f667bd5c80dae/charset_normalizer-3.5.2-cp314-cp314-win_amd64.whl", hash = "sha256:e4e81e09c1578b8df602e3db08b0b3ea0a6947ad612f52bf8dc5ea8d47691f0c", size = 210965, upload-time = "2026-09-30T04:36:58.205Z" }, + { url = "https://files.pythonhosted.org/packages/53/94/a3a7698e9b1a395e1eb99ccd9a324be9347973bff4e72db2a06496d7cd27/charset_normalizer-3.5.2-cp314-cp314-win_arm64.whl", hash = "sha256:80d02b6f04e92601a081dd97b23d3128033098bff5d35d392ddcc0476ea11253", size = 200406, upload-time = "2026-09-30T04:36:59.764Z" }, + { url = "https://files.pythonhosted.org/packages/c1/48/c5dd00d5ef7791f02666de250a5bb6071e29b7e133cf4b835800b6d3bc27/charset_normalizer-3.5.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:dca9ab98072a5a54ebacebdc45f53e645336b320c667410b061be1ca588ae709", size = 396871, upload-time = "2026-09-30T04:37:01.543Z" }, + { url = "https://files.pythonhosted.org/packages/12/c8/8379554b42e8368161d898476686947a0fdbd3e8865170d7909dcabfdee8/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0aa869112ef88429ae17820d99c3dd9504c9e9c671d3c246f3d7442cb051084", size = 249711, upload-time = "2026-09-30T04:37:03.111Z" }, + { url = "https://files.pythonhosted.org/packages/4a/eb/2ddb1035d17320caa9f41682935123a9a250277b261c3efc86b2d2a21343/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c0afc6800ba57ccc350374c5bd6150419915d95ce93cdbab2d783d75eaf30ecb", size = 231146, upload-time = "2026-09-30T04:37:04.721Z" }, + { url = "https://files.pythonhosted.org/packages/4a/24/2ecb4bde104322cd7859d6594fcfa74649f8d90b3221c9feecbef149875b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7dcd882da75ef9adf94903b1e3b9419e8aa8fb4c7396822b834b9ef7fb96954f", size = 271552, upload-time = "2026-09-30T04:37:06.295Z" }, + { url = "https://files.pythonhosted.org/packages/3f/98/9d5f6ebc3aee9fef5d30b4aff11fb2ab7a1222b4064f8ef2c7c87cde217a/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2e06a3a98f916dd41d27f3105e02e7a40181c98c94b9158733d03a6f80506c09", size = 269810, upload-time = "2026-09-30T04:37:07.905Z" }, + { url = "https://files.pythonhosted.org/packages/09/e1/a3b06a10461b1b7628853c934c644e03bc28e42767116afb52f19a56519b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6bd128f206a7752ae1f2ab6c61bf8a24ba28913a10df8b14c2637b973ff97a80", size = 259845, upload-time = "2026-09-30T04:37:09.554Z" }, + { url = "https://files.pythonhosted.org/packages/fd/d3/6f561f74a296cf27d61775a1dc665ad13f3bff6a798810ca05907f37a7c4/charset_normalizer-3.5.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c8f3d67aeaf55f017982b73683f0e7342ba2f6635a78f69ce89ebb26aa411e5c", size = 252825, upload-time = "2026-09-30T04:37:11.274Z" }, + { url = "https://files.pythonhosted.org/packages/26/9f/69e13ca3b18f43e0eafcd34c04a45b732ae22a43b54a5fc9e119103356eb/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fe9753dfee015c570d73df76f899f18444d41388bffcde097deba51c4fadbb9f", size = 252659, upload-time = "2026-09-30T04:37:12.941Z" }, + { url = "https://files.pythonhosted.org/packages/73/a9/ace29806a0dae18939919c76ba526472d83214afa101105fabff2cf30625/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:92888bb3187c5ba50500b00b3b310c9f2c651709d28036077680cb5255450a03", size = 238819, upload-time = "2026-09-30T04:37:14.659Z" }, + { url = "https://files.pythonhosted.org/packages/f8/c1/6116d52a2e3311ec80f21f5fb5e17b27405f10b9608af8f6e69516841a1b/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:d008d90a7f2471519aef0c90dfbe73b3e6e4d5e66ac48e19154c17e89e98b604", size = 272973, upload-time = "2026-09-30T04:37:16.346Z" }, + { url = "https://files.pythonhosted.org/packages/19/aa/9955c7e93bba10a9c7e8f7a5031b7ced66f3a1883a55c00712b8d5850ff3/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:31f3930700408d211f13378ccbe1c40845d8da54bd0681fac3a9b5aae81c7aa8", size = 253692, upload-time = "2026-09-30T04:37:18.212Z" }, + { url = "https://files.pythonhosted.org/packages/bb/33/2a6ae7fdc1b10cb581cef91addd8cdfc5f40d50abb5702309369d5834579/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:2a925889534b3748302dae5dead07cc13480de1dac3aea80a941b729b471ef93", size = 268757, upload-time = "2026-09-30T04:37:19.877Z" }, + { url = "https://files.pythonhosted.org/packages/a2/22/80992720a0282cd39bba1db35868e6b9c22f41281160143a836544bc1d8a/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f5ec61164adcec446f8969a3358ec3f9b26bbda3b9213e5586d219afa8df2915", size = 262220, upload-time = "2026-09-30T04:37:21.583Z" }, + { url = "https://files.pythonhosted.org/packages/92/9f/181fd07e1bffea1d95cd80c84ac537354f50699c22cfc4d3c02b6fc16208/charset_normalizer-3.5.2-cp314-cp314t-win32.whl", hash = "sha256:598a11a2c7ebaa5334bf698bf29568c9c390abac6a154d8170fedecd1cea38c5", size = 197797, upload-time = "2026-09-30T04:37:23.235Z" }, + { url = "https://files.pythonhosted.org/packages/49/1c/25d8415ec1c4f2f41f1680435e4c87cfb378ff2f677d950946f2a45d0632/charset_normalizer-3.5.2-cp314-cp314t-win_amd64.whl", hash = "sha256:7fdde2c9fd9e3eca40631e024664cf2584272cc8f96308cbe5fdfc930f51d8bc", size = 222765, upload-time = "2026-09-30T04:37:24.891Z" }, + { url = "https://files.pythonhosted.org/packages/3e/b4/46b48f013dadfc0d0d33b375438e31bdf5a989dc68389c6bf627054d4df9/charset_normalizer-3.5.2-cp314-cp314t-win_arm64.whl", hash = "sha256:d1befeed746d247c81127bb14de9dc3d30edb6e5976d34f83f86ed262b1d9105", size = 210985, upload-time = "2026-09-30T04:37:26.634Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e9/34e597dee616d0b8ee4b34d29399e85c2204ade174157a48505d42baa4ff/charset_normalizer-3.5.2-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:87475fabc8d9996fd9c27debb395e642e8c838d78a00b6e932227a0e06b81e26", size = 367676, upload-time = "2026-09-30T04:37:28.329Z" }, + { url = "https://files.pythonhosted.org/packages/60/9f/a5d1c91c0263745e2cd344c5a4415d787c575501ab1d449f1148ac6b495d/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9409a8bf35cf78353942504b24a57de3d75b708997a1e4bd8db71ac8633ce364", size = 248414, upload-time = "2026-09-30T04:37:30.167Z" }, + { url = "https://files.pythonhosted.org/packages/26/79/e697f77464748a3ee3cf490c83d592459400d4898380d66c38366b03080c/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:498dc3188ca05a68231ac3fdbfc7f57eb67e1343c30e0fea17f8218c1599b253", size = 244775, upload-time = "2026-09-30T04:37:31.964Z" }, + { url = "https://files.pythonhosted.org/packages/ca/87/3d42a42e18ea066e2513936fd678a00696e77878b5ae04528976abdbcb83/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e242bb1c5e76e97dfa9e7f209a71e93a01d7f19ffdd5cfbb2e2d55b4f08f8ab0", size = 273877, upload-time = "2026-09-30T04:37:33.661Z" }, + { url = "https://files.pythonhosted.org/packages/c3/76/8a28136f3938ba9836f84280ce0c4d61ed1cf15a036b2034900c62634162/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:def79fa35ef0cef8d2accec024f4fdc7ead3012ff02f5215c783f39f03ef8cfc", size = 269455, upload-time = "2026-09-30T04:37:35.573Z" }, + { url = "https://files.pythonhosted.org/packages/a0/a1/4fbf5d0f0f1b2a080474c1cf9a2f12c4c6531bb0e8ba591055e846d2b4e9/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3df041de8887954562c9b261cba85ca0e9ded74048daf125f45edcfaa4832229", size = 257336, upload-time = "2026-09-30T04:37:37.397Z" }, + { url = "https://files.pythonhosted.org/packages/ba/a2/8b50aa320adb880ad579518e6f718f24944804b42a88b83d267d5d444125/charset_normalizer-3.5.2-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:04851f73ae72b8413dddadb16a49dfee95263553741fd42d546f7d66907e6be5", size = 257584, upload-time = "2026-09-30T04:37:39.522Z" }, + { url = "https://files.pythonhosted.org/packages/a5/57/50e3fed84e175f40349bd0da7a4fce94c87f0378f52d74f511d89e0bdc20/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:183b88127acdb4fabe59d951ab424faf1af7b63cdbb5f776186c1ea2ffcaed98", size = 251854, upload-time = "2026-09-30T04:37:41.23Z" }, + { url = "https://files.pythonhosted.org/packages/d6/54/f7fbb3493c9f49091213b9c2d6dd65800696f1ce1a3f196a4205f50417b1/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:16fa0eccf81304b79c5cd87f9271c3b85dd9dd99245e4422ae9c0dd45e0f99d3", size = 248767, upload-time = "2026-09-30T04:37:42.883Z" }, + { url = "https://files.pythonhosted.org/packages/d9/37/b3a6385acc5a1e45b39ae9c90bfb9cf838a09b9dd37ef2740ab4c6b4a2eb/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:7441d755b7ab94f8d4eb3e43ec05482d760842fd263d003a99102d742cd835e2", size = 274479, upload-time = "2026-09-30T04:37:44.658Z" }, + { url = "https://files.pythonhosted.org/packages/89/44/809913e2cfd279e635a9294fdbbfb1b1dc62a8189d473d561f649fce98d8/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:ca403d7e4798f525fdfc78e258820419cbbd0f0ecbab9de7840e3c017cf6b8cf", size = 258310, upload-time = "2026-09-30T04:37:46.529Z" }, + { url = "https://files.pythonhosted.org/packages/af/a2/f28400ab13359d91bd39179df8e149376b9bf36588e739a3a4f9de2b84b2/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:df29a0a7107f7011e77f4eebdddec4c7331e24d787a0b21a46d63bdf7445da95", size = 271100, upload-time = "2026-09-30T04:37:48.399Z" }, + { url = "https://files.pythonhosted.org/packages/e9/89/9bab37955edf0adb3b66f8a3a6617d9f2f487e0d56f295a6a286cb640aa6/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:f3c96f633825733f735c5a9cf21d21a257d8e1edf0b1cee0a064b9c424ca0f7d", size = 259936, upload-time = "2026-09-30T04:37:50.023Z" }, + { url = "https://files.pythonhosted.org/packages/23/b5/4459e08d45a679f903d50fea08bc52cfa728cca4d7bd02c757b5e5abda2e/charset_normalizer-3.5.2-cp315-cp315-win32.whl", hash = "sha256:281cb91036248400f4cc957495cccd44c275c2e0c5854f7e45ac5cf7dc193847", size = 186301, upload-time = "2026-09-30T04:37:51.722Z" }, + { url = "https://files.pythonhosted.org/packages/98/e8/55d5fd3935b4bce6da4fe0df61898e8c82653e317e677bd58aceb9c60f13/charset_normalizer-3.5.2-cp315-cp315-win_amd64.whl", hash = "sha256:89b53f3cda69831909888e0494f4fa0bcd3537e3e138dabeb620bd6ad946bae8", size = 210858, upload-time = "2026-09-30T04:37:53.427Z" }, + { url = "https://files.pythonhosted.org/packages/a9/5b/974423c2fd8e524c7a7f64318c1e02240ef954912fa2b4d70344107b9c68/charset_normalizer-3.5.2-cp315-cp315-win_arm64.whl", hash = "sha256:6be488a102b8cf28d0391d8c4ba7748938ae28b78ad901f8585520fca33ead1a", size = 200309, upload-time = "2026-09-30T04:37:55.015Z" }, + { url = "https://files.pythonhosted.org/packages/ee/f9/00ee0195db1013d8f7c416fd770fbeb560bb46eb2e36b054d05cb56f6cfa/charset_normalizer-3.5.2-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:915563965d418f986e7e145accc592eae9e1a1be3566ff98a05d7a9ec42a76e1", size = 395343, upload-time = "2026-09-30T04:37:56.743Z" }, + { url = "https://files.pythonhosted.org/packages/04/3a/c00b50e94c964cf934c7899cd47c97952fc11dad71cc5884b3c61795b09b/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:65cd72beeeca9d3aaea1201e5923859f308f952f9c71de93f06063c79f0f7a3b", size = 250114, upload-time = "2026-09-30T04:37:58.607Z" }, + { url = "https://files.pythonhosted.org/packages/50/27/d102dc880bbcffd0479ab64dfc1fb96777a854355a55e2bda72a71efadcb/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b7fd005a73d9e657273b7a10dc71a9e03c8fb9ee6999798d6918ce095b81ac7f", size = 239997, upload-time = "2026-09-30T04:38:00.511Z" }, + { url = "https://files.pythonhosted.org/packages/a5/4a/bf7ef45794dd293fab5f98a9309817977fbb845b9998f171b8cc5d8437a3/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e54da4baf05720032d527874d40b65fa4d7e5c6c6a43d0c3adbeffcaf275a2b3", size = 272313, upload-time = "2026-09-30T04:38:02.509Z" }, + { url = "https://files.pythonhosted.org/packages/e8/ee/008a2837737991474c5754bb3191010007663860979701990982a502cbaf/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:124fbf1a8ff966d87ae05bb8bd45a71f966055ed8bba320d0c7cf450bc5f4d0e", size = 269986, upload-time = "2026-09-30T04:38:04.435Z" }, + { url = "https://files.pythonhosted.org/packages/93/ad/bd74a283940dc910c5b14f8e4f80a248082bc9c0fcbe1f54530cb6d9cc5e/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28b4f0d66fb834ff90f28209ac7bce77868c45d8c93e26f906709d9b7c2e1af9", size = 260202, upload-time = "2026-09-30T04:38:06.549Z" }, + { url = "https://files.pythonhosted.org/packages/8a/7b/ed341c66f69f688723501fac752be3d63c7159ca0d0d4174fc611e5710bb/charset_normalizer-3.5.2-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:58ca3755ee7ff7f59b57789ec9833c9de9ea275405cdd240eda1f193112e398a", size = 259083, upload-time = "2026-09-30T04:38:08.311Z" }, + { url = "https://files.pythonhosted.org/packages/cc/9d/e41588b777965e5031a43128a1e96173ebb35ac75fc53ec3b517e7c21cd4/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:443eae2bf318abeaf6f15d785138f71fd6de770e99a92158b8b814265e079115", size = 253081, upload-time = "2026-09-30T04:38:10.402Z" }, + { url = "https://files.pythonhosted.org/packages/81/35/b761eb6d8c1eb218b9b42b9b4d5ac902afdc399fb6dac6f9a9aac7bda589/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:58f361dcbab699cf8f42db3f47c8e7fd1036f138c23a5d08de9fde5f425a730c", size = 248712, upload-time = "2026-09-30T04:38:12.317Z" }, + { url = "https://files.pythonhosted.org/packages/4d/2c/147169a041b747759f37405c0a97157e8e92de967968373101ff14915cba/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:1b4cbc7c3491ccb4aa17fcd8165649d01cf39f76de1696da8631b5f71b85401d", size = 274176, upload-time = "2026-09-30T04:38:14.138Z" }, + { url = "https://files.pythonhosted.org/packages/f0/2d/0ff8db0d373ba8538db686db11cd7e8912031490b9e4f383b41912e8d594/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:ba0b1d2620edf869789c3879223f52bf2afc5d31b3cb47cc57b3a12c05e2aa9d", size = 259413, upload-time = "2026-09-30T04:38:15.841Z" }, + { url = "https://files.pythonhosted.org/packages/8a/8e/b4a085fb47c9d3a7e43576a4784fdd8fe23f907514a972de8086edaf7a48/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:5e2b6b57e9733d39f0c9fd3185efa6b8e29652c4cd8fe94180272cf6ed9a78c4", size = 269434, upload-time = "2026-09-30T04:38:17.626Z" }, + { url = "https://files.pythonhosted.org/packages/83/1c/d8d8d7322a7c3eecdf3237a4a419cf41d2eaad8e006ce7dfdd9d4c8fa2eb/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:51cf45226a9b588d0d2b4880c62d686934b63ab0bd79ca23ab0e9762eb27441b", size = 262716, upload-time = "2026-09-30T04:38:19.214Z" }, + { url = "https://files.pythonhosted.org/packages/a0/16/0e4c6ba9b44e97a2da150e52d331e8f9c968b21b358fbffa6c856cebcd89/charset_normalizer-3.5.2-cp315-cp315t-win32.whl", hash = "sha256:5fb29fb8cd1a46c27a1bf9613ad5ec2599310d46b4025d9556404a6b6a292800", size = 197159, upload-time = "2026-09-30T04:38:21.037Z" }, + { url = "https://files.pythonhosted.org/packages/be/33/e90bc2b1374f7f36ef106f56620de5a783907e19ca857efe2277e31cac3e/charset_normalizer-3.5.2-cp315-cp315t-win_amd64.whl", hash = "sha256:a192e2c40070d92c3ccf777e3a5c4ff515573cd2bb7ed0c537fdadbbec5bbf21", size = 221322, upload-time = "2026-09-30T04:38:22.886Z" }, + { url = "https://files.pythonhosted.org/packages/66/89/dfa6dcb08c200b7830ab56439e8c1890f2971d51aafbb3937894a2e7fcfc/charset_normalizer-3.5.2-cp315-cp315t-win_arm64.whl", hash = "sha256:749e97e1b32313717a565abbe321bc2190bc8b35f1a67e4cdbc7c56c8d8ffe58", size = 209192, upload-time = "2026-09-30T04:38:24.648Z" }, + { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815, upload-time = "2026-09-30T04:38:26.216Z" }, + { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276, upload-time = "2026-09-30T04:38:28.032Z" }, + { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239, upload-time = "2026-09-30T04:38:29.732Z" }, + { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121, upload-time = "2026-09-30T04:38:31.462Z" }, + { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350, upload-time = "2026-09-30T04:38:33.239Z" }, + { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430, upload-time = "2026-09-30T04:38:34.865Z" }, + { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612, upload-time = "2026-09-30T04:38:36.649Z" }, + { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083, upload-time = "2026-09-30T04:38:38.26Z" }, + { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738, upload-time = "2026-09-30T04:38:39.81Z" }, + { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703, upload-time = "2026-09-30T04:38:41.346Z" }, + { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622, upload-time = "2026-09-30T04:38:42.937Z" }, + { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500, upload-time = "2026-09-30T04:38:44.604Z" }, + { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100, upload-time = "2026-09-30T04:38:46.289Z" }, + { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499, upload-time = "2026-09-30T04:38:47.999Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092, upload-time = "2026-09-30T04:38:49.707Z" }, + { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363, upload-time = "2026-09-30T04:38:51.312Z" }, + { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872, upload-time = "2026-09-30T04:39:21.828Z" }, ] [[package]] name = "cibuildwheel" -version = "2.23.3" +version = "2.23.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "bashlex" }, @@ -407,24 +868,19 @@ dependencies = [ { name = "filelock" }, { name = "packaging" }, { name = "platformdirs" }, - { name = "tomli", marker = "python_full_version < '3.11'" }, - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/50/f5/2c06c8229e291e121cb26ed2efa1ba5d89053a93631d8f1d795f2dacabb8/cibuildwheel-2.23.3.tar.gz", hash = "sha256:d85dd15b7eb81711900d8129e67efb32b12f99cc00fc271ab060fa6270c38397", size = 295383, upload-time = "2025-04-26T10:41:28.258Z" } +sdist = { url = "https://files.pythonhosted.org/packages/eb/6c/1934be8118ea842c3ee7542e6e2a0ff9299f632db531f61368b412bb75a7/cibuildwheel-2.23.4.tar.gz", hash = "sha256:5a3e4a3d9c18e77838c37c483642e4f071da06ec05c05336826cc46c97abb708", size = 294641, upload-time = "2026-03-16T19:33:13.649Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/17/8e/127e75e087c0a55903deb447a938e97935c6a56bfd20e6070bcc26c06d1b/cibuildwheel-2.23.3-py3-none-any.whl", hash = "sha256:0fa40073ae23a56d5f995d8405e82c1206049999bb89b92aa0835ee62ab8a891", size = 91792, upload-time = "2025-04-26T10:41:26.148Z" }, + { url = "https://files.pythonhosted.org/packages/66/00/c9e20a77dafae0ff9b02dfca1629950232278dc327d6231d0a0df128d99c/cibuildwheel-2.23.4-py3-none-any.whl", hash = "sha256:2f4300e9709bff0a83fd89d88f418df2c8da69bf40c010aa4a4b80156be3fbd5", size = 91284, upload-time = "2026-03-16T19:33:12.231Z" }, ] [[package]] name = "click" -version = "8.3.0" +version = "8.5.0" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz", hash = "sha256:e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4", size = 276943, upload-time = "2025-09-18T17:32:23.696Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c7/0e/7fa0ef50764b67090eca4114772a2abf8b6148198475e54c660b97caeee6/click-8.5.0.tar.gz", hash = "sha256:ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34", size = 382235, upload-time = "2026-08-26T13:33:14.56Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/db/d3/9dcc0f5797f070ec8edf30fbadfb200e71d9db6b84d211e3b2085a7589a0/click-8.3.0-py3-none-any.whl", hash = "sha256:9b9f285302c6e3064f4330c05f05b81945b2a39544279343e6e7c5f27a9baddc", size = 107295, upload-time = "2025-09-18T17:32:22.42Z" }, + { url = "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl", hash = "sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", size = 125251, upload-time = "2026-08-26T13:33:12.928Z" }, ] [[package]] @@ -438,11 +894,11 @@ wheels = [ [[package]] name = "configargparse" -version = "1.7.1" +version = "1.8.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/85/4d/6c9ef746dfcc2a32e26f3860bb4a011c008c392b83eabdfb598d1a8bbe5d/configargparse-1.7.1.tar.gz", hash = "sha256:79c2ddae836a1e5914b71d58e4b9adbd9f7779d4e6351a637b7d2d9b6c46d3d9", size = 43958, upload-time = "2025-05-23T14:26:17.369Z" } +sdist = { url = "https://files.pythonhosted.org/packages/5d/ed/33c0ba7f0b5be384ff8a2101ce77728f219e816b2104819f1651477e1ad5/configargparse-1.8.0.tar.gz", hash = "sha256:22a417f4d7b00149f0af82ef7c491f8ecc4b1d5454633fd319b386f5eb806f92", size = 74830, upload-time = "2026-09-28T15:10:52.119Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/31/28/d28211d29bcc3620b1fece85a65ce5bb22f18670a03cd28ea4b75ede270c/configargparse-1.7.1-py3-none-any.whl", hash = "sha256:8b586a31f9d873abd1ca527ffbe58863c99f36d896e2829779803125e83be4b6", size = 25607, upload-time = "2025-05-23T14:26:15.923Z" }, + { url = "https://files.pythonhosted.org/packages/b0/74/bd8453e8e20296063f9f431e6f1417f1b62bae0e012821df07fb71ede6c2/configargparse-1.8.0-py3-none-any.whl", hash = "sha256:bb25b307c3cd46a3e868e7f7aa51487eb8003a9f01cac3ae129b66ec26eb794c", size = 34611, upload-time = "2026-09-28T15:10:50.818Z" }, ] [[package]] @@ -456,101 +912,116 @@ wheels = [ [[package]] name = "coverage" -version = "7.11.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1c/38/ee22495420457259d2f3390309505ea98f98a5eed40901cf62196abad006/coverage-7.11.0.tar.gz", hash = "sha256:167bd504ac1ca2af7ff3b81d245dfea0292c5032ebef9d66cc08a7d28c1b8050", size = 811905, upload-time = "2025-10-15T15:15:08.542Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/12/95/c49df0aceb5507a80b9fe5172d3d39bf23f05be40c23c8d77d556df96cec/coverage-7.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eb53f1e8adeeb2e78962bade0c08bfdc461853c7969706ed901821e009b35e31", size = 215800, upload-time = "2025-10-15T15:12:19.824Z" }, - { url = "https://files.pythonhosted.org/packages/dc/c6/7bb46ce01ed634fff1d7bb53a54049f539971862cc388b304ff3c51b4f66/coverage-7.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d9a03ec6cb9f40a5c360f138b88266fd8f58408d71e89f536b4f91d85721d075", size = 216198, upload-time = "2025-10-15T15:12:22.549Z" }, - { url = "https://files.pythonhosted.org/packages/94/b2/75d9d8fbf2900268aca5de29cd0a0fe671b0f69ef88be16767cc3c828b85/coverage-7.11.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:0d7f0616c557cbc3d1c2090334eddcbb70e1ae3a40b07222d62b3aa47f608fab", size = 242953, upload-time = "2025-10-15T15:12:24.139Z" }, - { url = "https://files.pythonhosted.org/packages/65/ac/acaa984c18f440170525a8743eb4b6c960ace2dbad80dc22056a437fc3c6/coverage-7.11.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:e44a86a47bbdf83b0a3ea4d7df5410d6b1a0de984fbd805fa5101f3624b9abe0", size = 244766, upload-time = "2025-10-15T15:12:25.974Z" }, - { url = "https://files.pythonhosted.org/packages/d8/0d/938d0bff76dfa4a6b228c3fc4b3e1c0e2ad4aa6200c141fcda2bd1170227/coverage-7.11.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:596763d2f9a0ee7eec6e643e29660def2eef297e1de0d334c78c08706f1cb785", size = 246625, upload-time = "2025-10-15T15:12:27.387Z" }, - { url = "https://files.pythonhosted.org/packages/38/54/8f5f5e84bfa268df98f46b2cb396b1009734cfb1e5d6adb663d284893b32/coverage-7.11.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef55537ff511b5e0a43edb4c50a7bf7ba1c3eea20b4f49b1490f1e8e0e42c591", size = 243568, upload-time = "2025-10-15T15:12:28.799Z" }, - { url = "https://files.pythonhosted.org/packages/68/30/8ba337c2877fe3f2e1af0ed7ff4be0c0c4aca44d6f4007040f3ca2255e99/coverage-7.11.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9cbabd8f4d0d3dc571d77ae5bdbfa6afe5061e679a9d74b6797c48d143307088", size = 244665, upload-time = "2025-10-15T15:12:30.297Z" }, - { url = "https://files.pythonhosted.org/packages/cc/fb/c6f1d6d9a665536b7dde2333346f0cc41dc6a60bd1ffc10cd5c33e7eb000/coverage-7.11.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e24045453384e0ae2a587d562df2a04d852672eb63051d16096d3f08aa4c7c2f", size = 242681, upload-time = "2025-10-15T15:12:32.326Z" }, - { url = "https://files.pythonhosted.org/packages/be/38/1b532319af5f991fa153c20373291dc65c2bf532af7dbcffdeef745c8f79/coverage-7.11.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:7161edd3426c8d19bdccde7d49e6f27f748f3c31cc350c5de7c633fea445d866", size = 242912, upload-time = "2025-10-15T15:12:34.079Z" }, - { url = "https://files.pythonhosted.org/packages/67/3d/f39331c60ef6050d2a861dc1b514fa78f85f792820b68e8c04196ad733d6/coverage-7.11.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3d4ed4de17e692ba6415b0587bc7f12bc80915031fc9db46a23ce70fc88c9841", size = 243559, upload-time = "2025-10-15T15:12:35.809Z" }, - { url = "https://files.pythonhosted.org/packages/4b/55/cb7c9df9d0495036ce582a8a2958d50c23cd73f84a23284bc23bd4711a6f/coverage-7.11.0-cp310-cp310-win32.whl", hash = "sha256:765c0bc8fe46f48e341ef737c91c715bd2a53a12792592296a095f0c237e09cf", size = 218266, upload-time = "2025-10-15T15:12:37.429Z" }, - { url = "https://files.pythonhosted.org/packages/68/a8/b79cb275fa7bd0208767f89d57a1b5f6ba830813875738599741b97c2e04/coverage-7.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:24d6f3128f1b2d20d84b24f4074475457faedc3d4613a7e66b5e769939c7d969", size = 219169, upload-time = "2025-10-15T15:12:39.25Z" }, - { url = "https://files.pythonhosted.org/packages/49/3a/ee1074c15c408ddddddb1db7dd904f6b81bc524e01f5a1c5920e13dbde23/coverage-7.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d58ecaa865c5b9fa56e35efc51d1014d4c0d22838815b9fce57a27dd9576847", size = 215912, upload-time = "2025-10-15T15:12:40.665Z" }, - { url = "https://files.pythonhosted.org/packages/70/c4/9f44bebe5cb15f31608597b037d78799cc5f450044465bcd1ae8cb222fe1/coverage-7.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b679e171f1c104a5668550ada700e3c4937110dbdd153b7ef9055c4f1a1ee3cc", size = 216310, upload-time = "2025-10-15T15:12:42.461Z" }, - { url = "https://files.pythonhosted.org/packages/42/01/5e06077cfef92d8af926bdd86b84fb28bf9bc6ad27343d68be9b501d89f2/coverage-7.11.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:ca61691ba8c5b6797deb221a0d09d7470364733ea9c69425a640f1f01b7c5bf0", size = 246706, upload-time = "2025-10-15T15:12:44.001Z" }, - { url = "https://files.pythonhosted.org/packages/40/b8/7a3f1f33b35cc4a6c37e759137533119560d06c0cc14753d1a803be0cd4a/coverage-7.11.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:aef1747ede4bd8ca9cfc04cc3011516500c6891f1b33a94add3253f6f876b7b7", size = 248634, upload-time = "2025-10-15T15:12:45.768Z" }, - { url = "https://files.pythonhosted.org/packages/7a/41/7f987eb33de386bc4c665ab0bf98d15fcf203369d6aacae74f5dd8ec489a/coverage-7.11.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a1839d08406e4cba2953dcc0ffb312252f14d7c4c96919f70167611f4dee2623", size = 250741, upload-time = "2025-10-15T15:12:47.222Z" }, - { url = "https://files.pythonhosted.org/packages/23/c1/a4e0ca6a4e83069fb8216b49b30a7352061ca0cb38654bd2dc96b7b3b7da/coverage-7.11.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e0eb0a2dcc62478eb5b4cbb80b97bdee852d7e280b90e81f11b407d0b81c4287", size = 246837, upload-time = "2025-10-15T15:12:48.904Z" }, - { url = "https://files.pythonhosted.org/packages/5d/03/ced062a17f7c38b4728ff76c3acb40d8465634b20b4833cdb3cc3a74e115/coverage-7.11.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bc1fbea96343b53f65d5351d8fd3b34fd415a2670d7c300b06d3e14a5af4f552", size = 248429, upload-time = "2025-10-15T15:12:50.73Z" }, - { url = "https://files.pythonhosted.org/packages/97/af/a7c6f194bb8c5a2705ae019036b8fe7f49ea818d638eedb15fdb7bed227c/coverage-7.11.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:214b622259dd0cf435f10241f1333d32caa64dbc27f8790ab693428a141723de", size = 246490, upload-time = "2025-10-15T15:12:52.646Z" }, - { url = "https://files.pythonhosted.org/packages/ab/c3/aab4df02b04a8fde79068c3c41ad7a622b0ef2b12e1ed154da986a727c3f/coverage-7.11.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:258d9967520cca899695d4eb7ea38be03f06951d6ca2f21fb48b1235f791e601", size = 246208, upload-time = "2025-10-15T15:12:54.586Z" }, - { url = "https://files.pythonhosted.org/packages/30/d8/e282ec19cd658238d60ed404f99ef2e45eed52e81b866ab1518c0d4163cf/coverage-7.11.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cf9e6ff4ca908ca15c157c409d608da77a56a09877b97c889b98fb2c32b6465e", size = 247126, upload-time = "2025-10-15T15:12:56.485Z" }, - { url = "https://files.pythonhosted.org/packages/d1/17/a635fa07fac23adb1a5451ec756216768c2767efaed2e4331710342a3399/coverage-7.11.0-cp311-cp311-win32.whl", hash = "sha256:fcc15fc462707b0680cff6242c48625da7f9a16a28a41bb8fd7a4280920e676c", size = 218314, upload-time = "2025-10-15T15:12:58.365Z" }, - { url = "https://files.pythonhosted.org/packages/2a/29/2ac1dfcdd4ab9a70026edc8d715ece9b4be9a1653075c658ee6f271f394d/coverage-7.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:865965bf955d92790f1facd64fe7ff73551bd2c1e7e6b26443934e9701ba30b9", size = 219203, upload-time = "2025-10-15T15:12:59.902Z" }, - { url = "https://files.pythonhosted.org/packages/03/21/5ce8b3a0133179115af4c041abf2ee652395837cb896614beb8ce8ddcfd9/coverage-7.11.0-cp311-cp311-win_arm64.whl", hash = "sha256:5693e57a065760dcbeb292d60cc4d0231a6d4b6b6f6a3191561e1d5e8820b745", size = 217879, upload-time = "2025-10-15T15:13:01.35Z" }, - { url = "https://files.pythonhosted.org/packages/c4/db/86f6906a7c7edc1a52b2c6682d6dd9be775d73c0dfe2b84f8923dfea5784/coverage-7.11.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:9c49e77811cf9d024b95faf86c3f059b11c0c9be0b0d61bc598f453703bd6fd1", size = 216098, upload-time = "2025-10-15T15:13:02.916Z" }, - { url = "https://files.pythonhosted.org/packages/21/54/e7b26157048c7ba555596aad8569ff903d6cd67867d41b75287323678ede/coverage-7.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a61e37a403a778e2cda2a6a39abcc895f1d984071942a41074b5c7ee31642007", size = 216331, upload-time = "2025-10-15T15:13:04.403Z" }, - { url = "https://files.pythonhosted.org/packages/b9/19/1ce6bf444f858b83a733171306134a0544eaddf1ca8851ede6540a55b2ad/coverage-7.11.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:c79cae102bb3b1801e2ef1511fb50e91ec83a1ce466b2c7c25010d884336de46", size = 247825, upload-time = "2025-10-15T15:13:05.92Z" }, - { url = "https://files.pythonhosted.org/packages/71/0b/d3bcbbc259fcced5fb67c5d78f6e7ee965f49760c14afd931e9e663a83b2/coverage-7.11.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:16ce17ceb5d211f320b62df002fa7016b7442ea0fd260c11cec8ce7730954893", size = 250573, upload-time = "2025-10-15T15:13:07.471Z" }, - { url = "https://files.pythonhosted.org/packages/58/8d/b0ff3641a320abb047258d36ed1c21d16be33beed4152628331a1baf3365/coverage-7.11.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:80027673e9d0bd6aef86134b0771845e2da85755cf686e7c7c59566cf5a89115", size = 251706, upload-time = "2025-10-15T15:13:09.4Z" }, - { url = "https://files.pythonhosted.org/packages/59/c8/5a586fe8c7b0458053d9c687f5cff515a74b66c85931f7fe17a1c958b4ac/coverage-7.11.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4d3ffa07a08657306cd2215b0da53761c4d73cb54d9143b9303a6481ec0cd415", size = 248221, upload-time = "2025-10-15T15:13:10.964Z" }, - { url = "https://files.pythonhosted.org/packages/d0/ff/3a25e3132804ba44cfa9a778cdf2b73dbbe63ef4b0945e39602fc896ba52/coverage-7.11.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a3b6a5f8b2524fd6c1066bc85bfd97e78709bb5e37b5b94911a6506b65f47186", size = 249624, upload-time = "2025-10-15T15:13:12.5Z" }, - { url = "https://files.pythonhosted.org/packages/c5/12/ff10c8ce3895e1b17a73485ea79ebc1896a9e466a9d0f4aef63e0d17b718/coverage-7.11.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:fcc0a4aa589de34bc56e1a80a740ee0f8c47611bdfb28cd1849de60660f3799d", size = 247744, upload-time = "2025-10-15T15:13:14.554Z" }, - { url = "https://files.pythonhosted.org/packages/16/02/d500b91f5471b2975947e0629b8980e5e90786fe316b6d7299852c1d793d/coverage-7.11.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:dba82204769d78c3fd31b35c3d5f46e06511936c5019c39f98320e05b08f794d", size = 247325, upload-time = "2025-10-15T15:13:16.438Z" }, - { url = "https://files.pythonhosted.org/packages/77/11/dee0284fbbd9cd64cfce806b827452c6df3f100d9e66188e82dfe771d4af/coverage-7.11.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:81b335f03ba67309a95210caf3eb43bd6fe75a4e22ba653ef97b4696c56c7ec2", size = 249180, upload-time = "2025-10-15T15:13:17.959Z" }, - { url = "https://files.pythonhosted.org/packages/59/1b/cdf1def928f0a150a057cab03286774e73e29c2395f0d30ce3d9e9f8e697/coverage-7.11.0-cp312-cp312-win32.whl", hash = "sha256:037b2d064c2f8cc8716fe4d39cb705779af3fbf1ba318dc96a1af858888c7bb5", size = 218479, upload-time = "2025-10-15T15:13:19.608Z" }, - { url = "https://files.pythonhosted.org/packages/ff/55/e5884d55e031da9c15b94b90a23beccc9d6beee65e9835cd6da0a79e4f3a/coverage-7.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:d66c0104aec3b75e5fd897e7940188ea1892ca1d0235316bf89286d6a22568c0", size = 219290, upload-time = "2025-10-15T15:13:21.593Z" }, - { url = "https://files.pythonhosted.org/packages/23/a8/faa930cfc71c1d16bc78f9a19bb73700464f9c331d9e547bfbc1dbd3a108/coverage-7.11.0-cp312-cp312-win_arm64.whl", hash = "sha256:d91ebeac603812a09cf6a886ba6e464f3bbb367411904ae3790dfe28311b15ad", size = 217924, upload-time = "2025-10-15T15:13:23.39Z" }, - { url = "https://files.pythonhosted.org/packages/60/7f/85e4dfe65e400645464b25c036a26ac226cf3a69d4a50c3934c532491cdd/coverage-7.11.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:cc3f49e65ea6e0d5d9bd60368684fe52a704d46f9e7fc413918f18d046ec40e1", size = 216129, upload-time = "2025-10-15T15:13:25.371Z" }, - { url = "https://files.pythonhosted.org/packages/96/5d/dc5fa98fea3c175caf9d360649cb1aa3715e391ab00dc78c4c66fabd7356/coverage-7.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f39ae2f63f37472c17b4990f794035c9890418b1b8cca75c01193f3c8d3e01be", size = 216380, upload-time = "2025-10-15T15:13:26.976Z" }, - { url = "https://files.pythonhosted.org/packages/b2/f5/3da9cc9596708273385189289c0e4d8197d37a386bdf17619013554b3447/coverage-7.11.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7db53b5cdd2917b6eaadd0b1251cf4e7d96f4a8d24e174bdbdf2f65b5ea7994d", size = 247375, upload-time = "2025-10-15T15:13:28.923Z" }, - { url = "https://files.pythonhosted.org/packages/65/6c/f7f59c342359a235559d2bc76b0c73cfc4bac7d61bb0df210965cb1ecffd/coverage-7.11.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:10ad04ac3a122048688387828b4537bc9cf60c0bf4869c1e9989c46e45690b82", size = 249978, upload-time = "2025-10-15T15:13:30.525Z" }, - { url = "https://files.pythonhosted.org/packages/e7/8c/042dede2e23525e863bf1ccd2b92689692a148d8b5fd37c37899ba882645/coverage-7.11.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4036cc9c7983a2b1f2556d574d2eb2154ac6ed55114761685657e38782b23f52", size = 251253, upload-time = "2025-10-15T15:13:32.174Z" }, - { url = "https://files.pythonhosted.org/packages/7b/a9/3c58df67bfa809a7bddd786356d9c5283e45d693edb5f3f55d0986dd905a/coverage-7.11.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7ab934dd13b1c5e94b692b1e01bd87e4488cb746e3a50f798cb9464fd128374b", size = 247591, upload-time = "2025-10-15T15:13:34.147Z" }, - { url = "https://files.pythonhosted.org/packages/26/5b/c7f32efd862ee0477a18c41e4761305de6ddd2d49cdeda0c1116227570fd/coverage-7.11.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:59a6e5a265f7cfc05f76e3bb53eca2e0dfe90f05e07e849930fecd6abb8f40b4", size = 249411, upload-time = "2025-10-15T15:13:38.425Z" }, - { url = "https://files.pythonhosted.org/packages/76/b5/78cb4f1e86c1611431c990423ec0768122905b03837e1b4c6a6f388a858b/coverage-7.11.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:df01d6c4c81e15a7c88337b795bb7595a8596e92310266b5072c7e301168efbd", size = 247303, upload-time = "2025-10-15T15:13:40.464Z" }, - { url = "https://files.pythonhosted.org/packages/87/c9/23c753a8641a330f45f221286e707c427e46d0ffd1719b080cedc984ec40/coverage-7.11.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:8c934bd088eed6174210942761e38ee81d28c46de0132ebb1801dbe36a390dcc", size = 247157, upload-time = "2025-10-15T15:13:42.087Z" }, - { url = "https://files.pythonhosted.org/packages/c5/42/6e0cc71dc8a464486e944a4fa0d85bdec031cc2969e98ed41532a98336b9/coverage-7.11.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5a03eaf7ec24078ad64a07f02e30060aaf22b91dedf31a6b24d0d98d2bba7f48", size = 248921, upload-time = "2025-10-15T15:13:43.715Z" }, - { url = "https://files.pythonhosted.org/packages/e8/1c/743c2ef665e6858cccb0f84377dfe3a4c25add51e8c7ef19249be92465b6/coverage-7.11.0-cp313-cp313-win32.whl", hash = "sha256:695340f698a5f56f795b2836abe6fb576e7c53d48cd155ad2f80fd24bc63a040", size = 218526, upload-time = "2025-10-15T15:13:45.336Z" }, - { url = "https://files.pythonhosted.org/packages/ff/d5/226daadfd1bf8ddbccefbd3aa3547d7b960fb48e1bdac124e2dd13a2b71a/coverage-7.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:2727d47fce3ee2bac648528e41455d1b0c46395a087a229deac75e9f88ba5a05", size = 219317, upload-time = "2025-10-15T15:13:47.401Z" }, - { url = "https://files.pythonhosted.org/packages/97/54/47db81dcbe571a48a298f206183ba8a7ba79200a37cd0d9f4788fcd2af4a/coverage-7.11.0-cp313-cp313-win_arm64.whl", hash = "sha256:0efa742f431529699712b92ecdf22de8ff198df41e43aeaaadf69973eb93f17a", size = 217948, upload-time = "2025-10-15T15:13:49.096Z" }, - { url = "https://files.pythonhosted.org/packages/e5/8b/cb68425420154e7e2a82fd779a8cc01549b6fa83c2ad3679cd6c088ebd07/coverage-7.11.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:587c38849b853b157706407e9ebdca8fd12f45869edb56defbef2daa5fb0812b", size = 216837, upload-time = "2025-10-15T15:13:51.09Z" }, - { url = "https://files.pythonhosted.org/packages/33/55/9d61b5765a025685e14659c8d07037247de6383c0385757544ffe4606475/coverage-7.11.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b971bdefdd75096163dd4261c74be813c4508477e39ff7b92191dea19f24cd37", size = 217061, upload-time = "2025-10-15T15:13:52.747Z" }, - { url = "https://files.pythonhosted.org/packages/52/85/292459c9186d70dcec6538f06ea251bc968046922497377bf4a1dc9a71de/coverage-7.11.0-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:269bfe913b7d5be12ab13a95f3a76da23cf147be7fa043933320ba5625f0a8de", size = 258398, upload-time = "2025-10-15T15:13:54.45Z" }, - { url = "https://files.pythonhosted.org/packages/1f/e2/46edd73fb8bf51446c41148d81944c54ed224854812b6ca549be25113ee0/coverage-7.11.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:dadbcce51a10c07b7c72b0ce4a25e4b6dcb0c0372846afb8e5b6307a121eb99f", size = 260574, upload-time = "2025-10-15T15:13:56.145Z" }, - { url = "https://files.pythonhosted.org/packages/07/5e/1df469a19007ff82e2ca8fe509822820a31e251f80ee7344c34f6cd2ec43/coverage-7.11.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9ed43fa22c6436f7957df036331f8fe4efa7af132054e1844918866cd228af6c", size = 262797, upload-time = "2025-10-15T15:13:58.635Z" }, - { url = "https://files.pythonhosted.org/packages/f9/50/de216b31a1434b94d9b34a964c09943c6be45069ec704bfc379d8d89a649/coverage-7.11.0-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9516add7256b6713ec08359b7b05aeff8850c98d357784c7205b2e60aa2513fa", size = 257361, upload-time = "2025-10-15T15:14:00.409Z" }, - { url = "https://files.pythonhosted.org/packages/82/1e/3f9f8344a48111e152e0fd495b6fff13cc743e771a6050abf1627a7ba918/coverage-7.11.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:eb92e47c92fcbcdc692f428da67db33337fa213756f7adb6a011f7b5a7a20740", size = 260349, upload-time = "2025-10-15T15:14:02.188Z" }, - { url = "https://files.pythonhosted.org/packages/65/9b/3f52741f9e7d82124272f3070bbe316006a7de1bad1093f88d59bfc6c548/coverage-7.11.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:d06f4fc7acf3cabd6d74941d53329e06bab00a8fe10e4df2714f0b134bfc64ef", size = 258114, upload-time = "2025-10-15T15:14:03.907Z" }, - { url = "https://files.pythonhosted.org/packages/0b/8b/918f0e15f0365d50d3986bbd3338ca01178717ac5678301f3f547b6619e6/coverage-7.11.0-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:6fbcee1a8f056af07ecd344482f711f563a9eb1c2cad192e87df00338ec3cdb0", size = 256723, upload-time = "2025-10-15T15:14:06.324Z" }, - { url = "https://files.pythonhosted.org/packages/44/9e/7776829f82d3cf630878a7965a7d70cc6ca94f22c7d20ec4944f7148cb46/coverage-7.11.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dbbf012be5f32533a490709ad597ad8a8ff80c582a95adc8d62af664e532f9ca", size = 259238, upload-time = "2025-10-15T15:14:08.002Z" }, - { url = "https://files.pythonhosted.org/packages/9a/b8/49cf253e1e7a3bedb85199b201862dd7ca4859f75b6cf25ffa7298aa0760/coverage-7.11.0-cp313-cp313t-win32.whl", hash = "sha256:cee6291bb4fed184f1c2b663606a115c743df98a537c969c3c64b49989da96c2", size = 219180, upload-time = "2025-10-15T15:14:09.786Z" }, - { url = "https://files.pythonhosted.org/packages/ac/e1/1a541703826be7ae2125a0fb7f821af5729d56bb71e946e7b933cc7a89a4/coverage-7.11.0-cp313-cp313t-win_amd64.whl", hash = "sha256:a386c1061bf98e7ea4758e4313c0ab5ecf57af341ef0f43a0bf26c2477b5c268", size = 220241, upload-time = "2025-10-15T15:14:11.471Z" }, - { url = "https://files.pythonhosted.org/packages/d5/d1/5ee0e0a08621140fd418ec4020f595b4d52d7eb429ae6a0c6542b4ba6f14/coverage-7.11.0-cp313-cp313t-win_arm64.whl", hash = "sha256:f9ea02ef40bb83823b2b04964459d281688fe173e20643870bb5d2edf68bc836", size = 218510, upload-time = "2025-10-15T15:14:13.46Z" }, - { url = "https://files.pythonhosted.org/packages/f4/06/e923830c1985ce808e40a3fa3eb46c13350b3224b7da59757d37b6ce12b8/coverage-7.11.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:c770885b28fb399aaf2a65bbd1c12bf6f307ffd112d6a76c5231a94276f0c497", size = 216110, upload-time = "2025-10-15T15:14:15.157Z" }, - { url = "https://files.pythonhosted.org/packages/42/82/cdeed03bfead45203fb651ed756dfb5266028f5f939e7f06efac4041dad5/coverage-7.11.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a3d0e2087dba64c86a6b254f43e12d264b636a39e88c5cc0a01a7c71bcfdab7e", size = 216395, upload-time = "2025-10-15T15:14:16.863Z" }, - { url = "https://files.pythonhosted.org/packages/fc/ba/e1c80caffc3199aa699813f73ff097bc2df7b31642bdbc7493600a8f1de5/coverage-7.11.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:73feb83bb41c32811973b8565f3705caf01d928d972b72042b44e97c71fd70d1", size = 247433, upload-time = "2025-10-15T15:14:18.589Z" }, - { url = "https://files.pythonhosted.org/packages/80/c0/5b259b029694ce0a5bbc1548834c7ba3db41d3efd3474489d7efce4ceb18/coverage-7.11.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:c6f31f281012235ad08f9a560976cc2fc9c95c17604ff3ab20120fe480169bca", size = 249970, upload-time = "2025-10-15T15:14:20.307Z" }, - { url = "https://files.pythonhosted.org/packages/8c/86/171b2b5e1aac7e2fd9b43f7158b987dbeb95f06d1fbecad54ad8163ae3e8/coverage-7.11.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9570ad567f880ef675673992222746a124b9595506826b210fbe0ce3f0499cd", size = 251324, upload-time = "2025-10-15T15:14:22.419Z" }, - { url = "https://files.pythonhosted.org/packages/1a/7e/7e10414d343385b92024af3932a27a1caf75c6e27ee88ba211221ff1a145/coverage-7.11.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8badf70446042553a773547a61fecaa734b55dc738cacf20c56ab04b77425e43", size = 247445, upload-time = "2025-10-15T15:14:24.205Z" }, - { url = "https://files.pythonhosted.org/packages/c4/3b/e4f966b21f5be8c4bf86ad75ae94efa0de4c99c7bbb8114476323102e345/coverage-7.11.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a09c1211959903a479e389685b7feb8a17f59ec5a4ef9afde7650bd5eabc2777", size = 249324, upload-time = "2025-10-15T15:14:26.234Z" }, - { url = "https://files.pythonhosted.org/packages/00/a2/8479325576dfcd909244d0df215f077f47437ab852ab778cfa2f8bf4d954/coverage-7.11.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:5ef83b107f50db3f9ae40f69e34b3bd9337456c5a7fe3461c7abf8b75dd666a2", size = 247261, upload-time = "2025-10-15T15:14:28.42Z" }, - { url = "https://files.pythonhosted.org/packages/7b/d8/3a9e2db19d94d65771d0f2e21a9ea587d11b831332a73622f901157cc24b/coverage-7.11.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:f91f927a3215b8907e214af77200250bb6aae36eca3f760f89780d13e495388d", size = 247092, upload-time = "2025-10-15T15:14:30.784Z" }, - { url = "https://files.pythonhosted.org/packages/b3/b1/bbca3c472544f9e2ad2d5116b2379732957048be4b93a9c543fcd0207e5f/coverage-7.11.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:cdbcd376716d6b7fbfeedd687a6c4be019c5a5671b35f804ba76a4c0a778cba4", size = 248755, upload-time = "2025-10-15T15:14:32.585Z" }, - { url = "https://files.pythonhosted.org/packages/89/49/638d5a45a6a0f00af53d6b637c87007eb2297042186334e9923a61aa8854/coverage-7.11.0-cp314-cp314-win32.whl", hash = "sha256:bab7ec4bb501743edc63609320aaec8cd9188b396354f482f4de4d40a9d10721", size = 218793, upload-time = "2025-10-15T15:14:34.972Z" }, - { url = "https://files.pythonhosted.org/packages/30/cc/b675a51f2d068adb3cdf3799212c662239b0ca27f4691d1fff81b92ea850/coverage-7.11.0-cp314-cp314-win_amd64.whl", hash = "sha256:3d4ba9a449e9364a936a27322b20d32d8b166553bfe63059bd21527e681e2fad", size = 219587, upload-time = "2025-10-15T15:14:37.047Z" }, - { url = "https://files.pythonhosted.org/packages/93/98/5ac886876026de04f00820e5094fe22166b98dcb8b426bf6827aaf67048c/coverage-7.11.0-cp314-cp314-win_arm64.whl", hash = "sha256:ce37f215223af94ef0f75ac68ea096f9f8e8c8ec7d6e8c346ee45c0d363f0479", size = 218168, upload-time = "2025-10-15T15:14:38.861Z" }, - { url = "https://files.pythonhosted.org/packages/14/d1/b4145d35b3e3ecf4d917e97fc8895bcf027d854879ba401d9ff0f533f997/coverage-7.11.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:f413ce6e07e0d0dc9c433228727b619871532674b45165abafe201f200cc215f", size = 216850, upload-time = "2025-10-15T15:14:40.651Z" }, - { url = "https://files.pythonhosted.org/packages/ca/d1/7f645fc2eccd318369a8a9948acc447bb7c1ade2911e31d3c5620544c22b/coverage-7.11.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:05791e528a18f7072bf5998ba772fe29db4da1234c45c2087866b5ba4dea710e", size = 217071, upload-time = "2025-10-15T15:14:42.755Z" }, - { url = "https://files.pythonhosted.org/packages/54/7d/64d124649db2737ceced1dfcbdcb79898d5868d311730f622f8ecae84250/coverage-7.11.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cacb29f420cfeb9283b803263c3b9a068924474ff19ca126ba9103e1278dfa44", size = 258570, upload-time = "2025-10-15T15:14:44.542Z" }, - { url = "https://files.pythonhosted.org/packages/6c/3f/6f5922f80dc6f2d8b2c6f974835c43f53eb4257a7797727e6ca5b7b2ec1f/coverage-7.11.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:314c24e700d7027ae3ab0d95fbf8d53544fca1f20345fd30cd219b737c6e58d3", size = 260738, upload-time = "2025-10-15T15:14:46.436Z" }, - { url = "https://files.pythonhosted.org/packages/0e/5f/9e883523c4647c860b3812b417a2017e361eca5b635ee658387dc11b13c1/coverage-7.11.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:630d0bd7a293ad2fc8b4b94e5758c8b2536fdf36c05f1681270203e463cbfa9b", size = 262994, upload-time = "2025-10-15T15:14:48.3Z" }, - { url = "https://files.pythonhosted.org/packages/07/bb/43b5a8e94c09c8bf51743ffc65c4c841a4ca5d3ed191d0a6919c379a1b83/coverage-7.11.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e89641f5175d65e2dbb44db15fe4ea48fade5d5bbb9868fdc2b4fce22f4a469d", size = 257282, upload-time = "2025-10-15T15:14:50.236Z" }, - { url = "https://files.pythonhosted.org/packages/aa/e5/0ead8af411411330b928733e1d201384b39251a5f043c1612970310e8283/coverage-7.11.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c9f08ea03114a637dab06cedb2e914da9dc67fa52c6015c018ff43fdde25b9c2", size = 260430, upload-time = "2025-10-15T15:14:52.413Z" }, - { url = "https://files.pythonhosted.org/packages/ae/66/03dd8bb0ba5b971620dcaac145461950f6d8204953e535d2b20c6b65d729/coverage-7.11.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:ce9f3bde4e9b031eaf1eb61df95c1401427029ea1bfddb8621c1161dcb0fa02e", size = 258190, upload-time = "2025-10-15T15:14:54.268Z" }, - { url = "https://files.pythonhosted.org/packages/45/ae/28a9cce40bf3174426cb2f7e71ee172d98e7f6446dff936a7ccecee34b14/coverage-7.11.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:e4dc07e95495923d6fd4d6c27bf70769425b71c89053083843fd78f378558996", size = 256658, upload-time = "2025-10-15T15:14:56.436Z" }, - { url = "https://files.pythonhosted.org/packages/5c/7c/3a44234a8599513684bfc8684878fd7b126c2760f79712bb78c56f19efc4/coverage-7.11.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:424538266794db2861db4922b05d729ade0940ee69dcf0591ce8f69784db0e11", size = 259342, upload-time = "2025-10-15T15:14:58.538Z" }, - { url = "https://files.pythonhosted.org/packages/e1/e6/0108519cba871af0351725ebdb8660fd7a0fe2ba3850d56d32490c7d9b4b/coverage-7.11.0-cp314-cp314t-win32.whl", hash = "sha256:4c1eeb3fb8eb9e0190bebafd0462936f75717687117339f708f395fe455acc73", size = 219568, upload-time = "2025-10-15T15:15:00.382Z" }, - { url = "https://files.pythonhosted.org/packages/c9/76/44ba876e0942b4e62fdde23ccb029ddb16d19ba1bef081edd00857ba0b16/coverage-7.11.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b56efee146c98dbf2cf5cffc61b9829d1e94442df4d7398b26892a53992d3547", size = 220687, upload-time = "2025-10-15T15:15:02.322Z" }, - { url = "https://files.pythonhosted.org/packages/b9/0c/0df55ecb20d0d0ed5c322e10a441775e1a3a5d78c60f0c4e1abfe6fcf949/coverage-7.11.0-cp314-cp314t-win_arm64.whl", hash = "sha256:b5c2705afa83f49bd91962a4094b6b082f94aef7626365ab3f8f4bd159c5acf3", size = 218711, upload-time = "2025-10-15T15:15:04.575Z" }, - { url = "https://files.pythonhosted.org/packages/5f/04/642c1d8a448ae5ea1369eac8495740a79eb4e581a9fb0cbdce56bbf56da1/coverage-7.11.0-py3-none-any.whl", hash = "sha256:4b7589765348d78fb4e5fb6ea35d07564e387da2fc5efff62e0222971f155f68", size = 207761, upload-time = "2025-10-15T15:15:06.439Z" }, +version = "7.16.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2f/55/d1eaf3e73781174340a00dc1ba2aee8a65f82fadb18e2797b192b6b3925b/coverage-7.16.2.tar.gz", hash = "sha256:ca64d9f1f384f151b9511bec01126072acd2f313439f8ed015a22d8790aab6fa", size = 971999, upload-time = "2026-09-27T12:29:01.118Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/58/fa/ce3baf63d85b730398d92a7162f486f3a5e4e2cc3382a02488b3943725ba/coverage-7.16.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:732d950e51f3ba4fb6209c73250f3e8924fefca42953ee04a9e65d8c02414d7d", size = 223797, upload-time = "2026-09-27T12:25:54.756Z" }, + { url = "https://files.pythonhosted.org/packages/7a/57/9ba29c2aac7f756d479f03d45762120060f0f988788001001bf36e0e6fca/coverage-7.16.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5dca0bb66b4c3d624ba047887bf70270030c150692d543cb501293dc38a9f4b5", size = 224303, upload-time = "2026-09-27T12:25:56.214Z" }, + { url = "https://files.pythonhosted.org/packages/5d/7b/0d6d60906dca7d28cc1e3fce12a9861801c4fbb6cbf220ad78cd059c9467/coverage-7.16.2-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:af2a2a8c7c74de0559e0c368d94c8def9e16c58faaee33a0bf081057c4227e3b", size = 254715, upload-time = "2026-09-27T12:25:57.755Z" }, + { url = "https://files.pythonhosted.org/packages/cd/b8/9198b865679379fb165c689c64f6e11105ef380f6bd1c7673e83f73d9f5c/coverage-7.16.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:db5f8394e17f877a625b257f2ba0ce8e728a499c2c1579ad66220272cd3df510", size = 256627, upload-time = "2026-09-27T12:25:59.131Z" }, + { url = "https://files.pythonhosted.org/packages/98/79/9521462cb6072fe394701bc8974b74afd576c9c9355156c7844e1a86a42b/coverage-7.16.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5b3146d2317c75f70df2509066d979dadd941f7021cdf9b5db4bcd8568258e25", size = 258724, upload-time = "2026-09-27T12:26:00.691Z" }, + { url = "https://files.pythonhosted.org/packages/a6/76/8d7d5d633db9fe0f3182fedc731bf09f9bcf2366055735152504ad614677/coverage-7.16.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9e1d0ced76318bab499693ff25f64faa343415187cb2e4d7befdfdd391a1cf6a", size = 260692, upload-time = "2026-09-27T12:26:02.083Z" }, + { url = "https://files.pythonhosted.org/packages/4e/a7/76cb09c89ba46d74d37428bf93251fc14fb0bbe9e05cc2a5ef61773d318a/coverage-7.16.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:af98ad5ed9d6daaca956201e00bb429a7eb2b080426686f70a20353e0f9839f5", size = 254800, upload-time = "2026-09-27T12:26:03.369Z" }, + { url = "https://files.pythonhosted.org/packages/72/b6/2351c1979aaeb5b4a8091a75b90ca997ad60de36e181ddba267cf61dac97/coverage-7.16.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d56e4d21c56d2046447733f8b118409597db48c01efe898ee9ac24e858ec2d6", size = 256423, upload-time = "2026-09-27T12:26:04.751Z" }, + { url = "https://files.pythonhosted.org/packages/0f/f4/ad9a4f8b5cb2d494fa9452b546fe742ed2f9d3847cc14c05e36279a3e649/coverage-7.16.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1d5d0e3b660506fb84f995814e3118a21efdc0c8eb80127da1be627d90093c17", size = 254487, upload-time = "2026-09-27T12:26:06.082Z" }, + { url = "https://files.pythonhosted.org/packages/6c/1f/a520470472f3e8b01169bf42162b1470c9ba992230432f62ca36269bf3a0/coverage-7.16.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:17228fbca0f22976f797be94e975dcd237799c657d49551c7de1e0654d1202e9", size = 258259, upload-time = "2026-09-27T12:26:07.513Z" }, + { url = "https://files.pythonhosted.org/packages/09/d2/ff26d5938274745855fa61cfcba0245c88ccc10d98d2cbd96064f16cd5a7/coverage-7.16.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:bc0b0ac781d489304b741269857f1f8338b7a26b1b89c06c0344658001ec0035", size = 254216, upload-time = "2026-09-27T12:26:08.982Z" }, + { url = "https://files.pythonhosted.org/packages/a4/1d/5d832d3b06785d9f53267e4f2724a9f60c312eee6ebed9063a461d0d3b45/coverage-7.16.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bf1bd822ec4e387ed245bed0d71151582cf7be9e5309bc4145eefe36083d5878", size = 255125, upload-time = "2026-09-27T12:26:10.35Z" }, + { url = "https://files.pythonhosted.org/packages/55/4d/1d33edbc2fcf7d99e384e393e712aa5a2ebbbd8409825357815982207976/coverage-7.16.2-cp311-cp311-win32.whl", hash = "sha256:7ed238d227e23cc300c3d464babdaf9f6ddc740aa1b15a77ae96136e6a7c4516", size = 225898, upload-time = "2026-09-27T12:26:11.7Z" }, + { url = "https://files.pythonhosted.org/packages/6f/7c/676df4882118756c4f8f560c954eddb93e166d84dda8c5f0b6a829689bde/coverage-7.16.2-cp311-cp311-win_amd64.whl", hash = "sha256:a90700f743e29aa3d75a6ff5f01953176a889c00e526194bc4d281731b88d99d", size = 226369, upload-time = "2026-09-27T12:26:13.375Z" }, + { url = "https://files.pythonhosted.org/packages/7a/0e/a457f4a461b3c5610d845137fdd45fa465e011a64c25af440518ab1f4e41/coverage-7.16.2-cp311-cp311-win_arm64.whl", hash = "sha256:a336eec40e3520d369b8a6cdabb4f596e69a8b42927ca074aa1452fed943238a", size = 226344, upload-time = "2026-09-27T12:26:15.127Z" }, + { url = "https://files.pythonhosted.org/packages/5e/2c/f8296c63c5d542f3d21aed685e56b7031a419037d155bb3382fc0940d249/coverage-7.16.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:218d742afca2b5ad5ca759e93eddedfbcc6eadf8322f080dcefc40b7bd4e2d48", size = 223969, upload-time = "2026-09-27T12:26:16.753Z" }, + { url = "https://files.pythonhosted.org/packages/90/23/6f3dcb1423a0d43216e402ea1746e4a7c7c44f38896b97dd573790f56a40/coverage-7.16.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a9a638be322a8d76a41cdb17781c7f82aaee6a66493d8ffb7e2c09ee22423d99", size = 224328, upload-time = "2026-09-27T12:26:18.15Z" }, + { url = "https://files.pythonhosted.org/packages/ac/7d/8f3b6dc920e3fc6732f7678785a2091db439f186afbec30dbf2214d9b1f7/coverage-7.16.2-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:724bd0f1e81856b35e59fc98cf7b4e544a3cb662e4e0864dca73d4326ee9d808", size = 255832, upload-time = "2026-09-27T12:26:19.799Z" }, + { url = "https://files.pythonhosted.org/packages/d1/36/6c45f15be4eca4ac1062c6a55a323286494c99726a7e58951fe85967ac08/coverage-7.16.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:5375ebd99038021b35e99dc88255022912c06565d316212f4a576e4b08d30f5d", size = 258571, upload-time = "2026-09-27T12:26:21.199Z" }, + { url = "https://files.pythonhosted.org/packages/34/fb/b54cbeba3ad89082c2e441278681859e538322cc34b84b2af7ebff00080f/coverage-7.16.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7a076277ca9f5750cc230f0f578ebd2620cec60255b25707361699fef6fb465c", size = 259680, upload-time = "2026-09-27T12:26:22.822Z" }, + { url = "https://files.pythonhosted.org/packages/6e/a2/0dc65ec3d61930e1e4c2e371763b15eb4290896eb343a12d5d3091308116/coverage-7.16.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:58d4a54c6ea672afef66d49be922a2c69826c5ae1a42a9cd94f0c9c2bacdf800", size = 261945, upload-time = "2026-09-27T12:26:24.336Z" }, + { url = "https://files.pythonhosted.org/packages/d6/93/5fad7a61f2c14e08e98946fc31c1c7ffc1195061bf3fdc351db3be77a863/coverage-7.16.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0dcbcfcc059117284c603ff8cb61a65872512882f84a8cf0339241f7f7c2f148", size = 256191, upload-time = "2026-09-27T12:26:25.89Z" }, + { url = "https://files.pythonhosted.org/packages/2d/47/74e5de9227b939ece9f64e729645ddc4296bea10dbfa98721c1333c8be2e/coverage-7.16.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:afdf43b72ef3876c1fe66423b91466e37877c9e81e8cec70542b7e8525b9d1b7", size = 257610, upload-time = "2026-09-27T12:26:27.35Z" }, + { url = "https://files.pythonhosted.org/packages/13/fe/2cf28d40b43645d1b72388fe3ee7f7c747533a6a9557bb8c24a7ae74fe1a/coverage-7.16.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:9acc7f7ec4a1b5f89bd929fde5b8a714f6fafdc6cc18725413d510aa082b47ad", size = 255757, upload-time = "2026-09-27T12:26:28.949Z" }, + { url = "https://files.pythonhosted.org/packages/d7/3d/7c149fd99fc8bbc39c80db5e688d1d39fd040be2ecb78b8335a51a55b9c0/coverage-7.16.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:80d3f7b48d43ee8fc5e8707a8adb43d743a5a1a85256c25a24f9d6d0e2238fa6", size = 259822, upload-time = "2026-09-27T12:26:30.515Z" }, + { url = "https://files.pythonhosted.org/packages/e6/3f/b283fce09d5995e227bd8e513358dd7471bedc0f78abc85a925ebdb0a2f6/coverage-7.16.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:126d1af8804d7224421fe991ff65d3ce649081560df7a98b1a5ffff07f9923bd", size = 255325, upload-time = "2026-09-27T12:26:32.037Z" }, + { url = "https://files.pythonhosted.org/packages/bf/91/f3325edf0c4223fb1fe1532b8dbef2a1d2f729459a9a7d1a44d073bae534/coverage-7.16.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c19cd6d025c1673f22afcd22c7df8a662d779e05d8e3fa6820c22afb895b0206", size = 257191, upload-time = "2026-09-27T12:26:33.525Z" }, + { url = "https://files.pythonhosted.org/packages/c4/89/21eb5e83ecf2eed523c4eb3d65ae513cd082c8fd1b6deb34c4cb6c332f97/coverage-7.16.2-cp312-cp312-win32.whl", hash = "sha256:152877cdc8a07264882cfcd503ba56a3ef6cba56a70e8c70f6eb8ffd7384789a", size = 226034, upload-time = "2026-09-27T12:26:35.021Z" }, + { url = "https://files.pythonhosted.org/packages/db/de/e3ad6d864c0833624b4f1f9b53f9e58e116c945e5e965c3f1e172c5e84cd/coverage-7.16.2-cp312-cp312-win_amd64.whl", hash = "sha256:e6c52d3307824ff93b39efd99e4185d557db40bd841452abfb32e5d9151ca162", size = 226569, upload-time = "2026-09-27T12:26:36.604Z" }, + { url = "https://files.pythonhosted.org/packages/3e/c1/bccc58ebe5489cc70628f635c1932fd371f5d7da850dbcf960f95f4c4afc/coverage-7.16.2-cp312-cp312-win_arm64.whl", hash = "sha256:a678c0b6b22086ec2427359d22e37445d4a792f5fdbbc744112c7dade65cad02", size = 226372, upload-time = "2026-09-27T12:26:38.406Z" }, + { url = "https://files.pythonhosted.org/packages/f0/f6/8eb4f220ef24f84fb27d852d4f9bf83e0c73ec1a4a08dd9a87e3f4529739/coverage-7.16.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1a37c6e478cf687e1aa30a593d19c92c02fad9d122b51ab73f51b8dc7a0c0fc9", size = 223993, upload-time = "2026-09-27T12:26:40.164Z" }, + { url = "https://files.pythonhosted.org/packages/40/23/d4bbaf0c154e0b0c2b5264890dbf6ef098dcb50ec8f2469be9490d191660/coverage-7.16.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0993d0e90858c03943d3cb152e068a20dd4707924deec84dd2230261baae3b1b", size = 224368, upload-time = "2026-09-27T12:26:41.762Z" }, + { url = "https://files.pythonhosted.org/packages/7f/48/fc1e88fd571ec5cb38150b7f89f7696ca1bdf9920e01432febb69774cc85/coverage-7.16.2-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:bb2fc905bbf4e6b7f40806ea79e31515abf6349594cdf0adf27c4215f0463204", size = 255358, upload-time = "2026-09-27T12:26:43.442Z" }, + { url = "https://files.pythonhosted.org/packages/1d/56/6785397d07c29c8e70fbb9a07e97d062b43c21ffc5f12385917847f09f63/coverage-7.16.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:4358b9c8c0125b460407f3017c6cce8156e904b32772c5630d27112f52bdbfe5", size = 257955, upload-time = "2026-09-27T12:26:45.725Z" }, + { url = "https://files.pythonhosted.org/packages/27/3b/c8cdd07721e5f99abd81cea970d971997f99bf158c0b85f51bd284179c8b/coverage-7.16.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f15254427c9b33eedac4f198eaf9e356eb4f6214551afb43da6194a2c088ad7", size = 259183, upload-time = "2026-09-27T12:26:47.208Z" }, + { url = "https://files.pythonhosted.org/packages/9b/11/606b192fe43d32574ec6238549d48de588fdcc18485682a5ec0a8ac357f2/coverage-7.16.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9a75a4704ff640e46170042eec1f984385a121227c505d5a16ad8e495f452541", size = 261325, upload-time = "2026-09-27T12:26:49.084Z" }, + { url = "https://files.pythonhosted.org/packages/67/90/eea481f8b0305ceeb33f081a5f47e298391dbd1b589de0c4b3b3aa50d3f2/coverage-7.16.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:14253fc7bb15749b849795a06f5d3b6d8bc3fb8a4b5ddc341faf7a89dce205fc", size = 255531, upload-time = "2026-09-27T12:26:50.509Z" }, + { url = "https://files.pythonhosted.org/packages/6b/be/dedbf9aea1457b120c27ac10b8fc2a357f37fa2b54c3e7286d42980a0a2a/coverage-7.16.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:921415102a90637fcc2e3f169f61dad7699ecf690e8639fc21b813acbedc0967", size = 257329, upload-time = "2026-09-27T12:26:52.005Z" }, + { url = "https://files.pythonhosted.org/packages/fa/cb/b25c19d5bb2bd0f2e4e27fe8e2ffcae80c7a91ae181c0dc749ed60e9b1a4/coverage-7.16.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cce2bc991293f15cc4084ca116827b5900c5f34e1a54dfe83f10ab5c43162eb7", size = 255294, upload-time = "2026-09-27T12:26:53.634Z" }, + { url = "https://files.pythonhosted.org/packages/5f/a2/892c5c5f4ad44b7b2ca009aee705191f3f268f15052244f2f9e3539b2e35/coverage-7.16.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:e1fa594c887365b69745f25a416806e61085dd07b94c9eae68a6e20730629b23", size = 259444, upload-time = "2026-09-27T12:26:55.243Z" }, + { url = "https://files.pythonhosted.org/packages/ed/99/a562537deba0a3e370182ae71c149be796c39d8087365f17a09188f27145/coverage-7.16.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:11e597173af1dc33d5f8a7332ada544199269a223af1ee1770ddd5e245ad0fe8", size = 255111, upload-time = "2026-09-27T12:26:56.851Z" }, + { url = "https://files.pythonhosted.org/packages/2d/20/854ec68641a9b3362ff068a32dfa41637299761617ef253791dbade6fc76/coverage-7.16.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3e7f99698ba3a7d13988bdd984b7ebf13af4dbe2166dc8502eef90d77603b0a4", size = 256882, upload-time = "2026-09-27T12:26:58.41Z" }, + { url = "https://files.pythonhosted.org/packages/db/0d/748e4518b0ac0f9ff2687c248a6e5f8c0737306e709372632a2556f84443/coverage-7.16.2-cp313-cp313-win32.whl", hash = "sha256:f80bd9f9633eafc73d0a913ba2645c96ba58bba1befc30590f7c0fbfde59d865", size = 226045, upload-time = "2026-09-27T12:26:59.983Z" }, + { url = "https://files.pythonhosted.org/packages/31/fa/6e46edba66a183fe4d99d4bb52c173287e9b8dddabe0888d24cb8210e580/coverage-7.16.2-cp313-cp313-win_amd64.whl", hash = "sha256:8be099e979fc42559328a21828281b4578304191ae46ed4e80a407048a82eee6", size = 226581, upload-time = "2026-09-27T12:27:01.494Z" }, + { url = "https://files.pythonhosted.org/packages/1b/d9/9ef6845367600b336ff75d000444a0d32497d6972c833141bd39356abf68/coverage-7.16.2-cp313-cp313-win_arm64.whl", hash = "sha256:28ff850182a67d117990fa2ce5ea1032836d8c9630dae867e8bdd3bff4533b79", size = 226409, upload-time = "2026-09-27T12:27:03.116Z" }, + { url = "https://files.pythonhosted.org/packages/59/4c/577fc0803dab4155dcf808faffbdd7b159256781c0874a8586e17b81b149/coverage-7.16.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:4ee546b9e4872ffa194bf07ac87bfa1202ebb824d0795dc1ef22f175545ca90a", size = 224138, upload-time = "2026-09-27T12:27:05.141Z" }, + { url = "https://files.pythonhosted.org/packages/75/9e/e3785ba3ecba2bd11efc74bfe2801ca4b78c4480b15a375648d809a59da3/coverage-7.16.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a2fac6895eb299a2e52d7bbb8fb3903502b9da8d3f5309ceb16ec40c646b58ee", size = 224445, upload-time = "2026-09-27T12:27:06.805Z" }, + { url = "https://files.pythonhosted.org/packages/f0/d0/963ff22d3fd27117da3b8cc442f5bdc91196f783321e1a8ff0ec43476772/coverage-7.16.2-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:57ff3783f99d75a1e81dd56a9737eb5665e6736a5d93258ba596b6dcad8fd05b", size = 256112, upload-time = "2026-09-27T12:27:08.43Z" }, + { url = "https://files.pythonhosted.org/packages/a8/d4/a306940c81c6ae759e82fff27d20b7fdc6896e422b821f51313cce212b6c/coverage-7.16.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:35f37886699cb9abd29958247d718628d5bc6f39e623dff66a09e546c42a7e03", size = 258727, upload-time = "2026-09-27T12:27:09.927Z" }, + { url = "https://files.pythonhosted.org/packages/b9/a3/d3d99d93b02517087aa05bc0cf2d04d372956b849e5443e059079901429b/coverage-7.16.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0fd7a86fdda7cb6d616d178654bd0ad6bc0f3f33c2e478aa598500a1a9e34eda", size = 259909, upload-time = "2026-09-27T12:27:11.55Z" }, + { url = "https://files.pythonhosted.org/packages/08/44/39dd599181726758dd185ae4dc0c0ab3aeabf7ca70e68e145060feeaaa16/coverage-7.16.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ac0f3b379c94acc2f7dce5f5f0b24d44fa1cc6a509717ef83dfee07450c2117c", size = 262481, upload-time = "2026-09-27T12:27:13.17Z" }, + { url = "https://files.pythonhosted.org/packages/99/e8/91ee43f6ded411460c359d7e1aebde4d6fd8f00a2e5394182d9d212eb23c/coverage-7.16.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7d0732c83746bc24123c581a85d9dd96b70ddb538c9076020aa1a041790361e9", size = 256012, upload-time = "2026-09-27T12:27:14.91Z" }, + { url = "https://files.pythonhosted.org/packages/11/8c/e9499ddc33197bd7eabcb1118ca81756fc874457b324e2b479a4804b2ad2/coverage-7.16.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7b451c68218c150f616bc9649783ec8de76a59792c759b43aa0c9c0466a465e4", size = 257898, upload-time = "2026-09-27T12:27:16.588Z" }, + { url = "https://files.pythonhosted.org/packages/5f/6e/c081cb5991a0afba99f9c4ad6c74a5fce9513a38ddc64e3e6680c6fed9af/coverage-7.16.2-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:a56ac4fa5a75c7e182e8f62600cfb4aff43c5ed7356a034f3557659c3bec1d90", size = 255938, upload-time = "2026-09-27T12:27:18.19Z" }, + { url = "https://files.pythonhosted.org/packages/b2/42/1c3d819e8f9b6eb01c2fe90874d67a8882adb9507e0bbb09361ed131ea89/coverage-7.16.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:4cc4f73aa3fabc36e32046d6cd2971405948d8a903636508a3d3b2f9128b3a95", size = 260368, upload-time = "2026-09-27T12:27:19.903Z" }, + { url = "https://files.pythonhosted.org/packages/19/4f/d70eac07901fd587b6ab05e659b52afe13959992aa5113bf6cce059cc572/coverage-7.16.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:723dcdab91357159b722935b500ee8abc0a66c8c432e1e9fabf4cc7598952de8", size = 255620, upload-time = "2026-09-27T12:27:21.621Z" }, + { url = "https://files.pythonhosted.org/packages/34/5e/6d87af88317d3d9a9b18a9ca1bc1673eb516917f296e579d0d4a55cb3490/coverage-7.16.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5397e21a90dde0e9c6896b77ded8f0be26b66f8b22b33aed41f6043ed95d55e6", size = 257521, upload-time = "2026-09-27T12:27:23.358Z" }, + { url = "https://files.pythonhosted.org/packages/79/bb/90c2641170d2fa1a6757b3f8450ba2740197317b0ddd749e9604b914e886/coverage-7.16.2-cp314-cp314-win32.whl", hash = "sha256:848893e1d361448c113dc2f0913503522a6f7be231d0e38333d2a22d9698a011", size = 226248, upload-time = "2026-09-27T12:27:25.153Z" }, + { url = "https://files.pythonhosted.org/packages/30/08/d8d0478bb02c8eb0ae20a496fc80c40fcf4d3450bd184300d682ba2d28a6/coverage-7.16.2-cp314-cp314-win_amd64.whl", hash = "sha256:5a27b731c171e43dc8b5f32b76a5051dde2ec9b9366c87028f08a7088ebc2c7b", size = 226732, upload-time = "2026-09-27T12:27:26.907Z" }, + { url = "https://files.pythonhosted.org/packages/32/3f/0001da22155b0a8ce063ec0f7e64ecbe17b373f306e7a74435f6d6accb72/coverage-7.16.2-cp314-cp314-win_arm64.whl", hash = "sha256:1c569a9fd25505f1cd6bea90588818f90373ce90e2632e2cacf19ddbd6e14fdb", size = 226645, upload-time = "2026-09-27T12:27:28.588Z" }, + { url = "https://files.pythonhosted.org/packages/d7/85/6d8813aff9b8b8586691a9d33c43c5604f7227622574da7cdc3d91a86861/coverage-7.16.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:d93db87adb6b1c1b408dce4763314b55d76a9f589e96783a84ac9e7689e48bdf", size = 224871, upload-time = "2026-09-27T12:27:30.32Z" }, + { url = "https://files.pythonhosted.org/packages/5c/70/444f3a4981ac2cda40fdcf4cc9b56a4e1a33c222abeb33e51ed3e3eb2a6b/coverage-7.16.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:aa62c85046473959c13ba9edca9dc90a77d5c1095b1ba313556314d77fe5b036", size = 225123, upload-time = "2026-09-27T12:27:32.33Z" }, + { url = "https://files.pythonhosted.org/packages/d0/c1/980681cd7b33eb66ac835044116ef0a92e11fcc7bdd866cc89d10b1130b9/coverage-7.16.2-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:db76506aa5416081f3e8974ae0f7965c58ada0bb0ef7339ac86099588dbb20d3", size = 265049, upload-time = "2026-09-27T12:27:34.085Z" }, + { url = "https://files.pythonhosted.org/packages/b2/e3/87679875c33bb2191f0f05544a1cc9adcc940fe0c35443a10f2df753dde5/coverage-7.16.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a0f2285329dac10ab08f79cb11f5692c497018e6c7c511f95e6fd63a70b8f831", size = 267717, upload-time = "2026-09-27T12:27:36.025Z" }, + { url = "https://files.pythonhosted.org/packages/76/64/5d372776d6eb523d4e93bafba2253f96984e3b18261c4cc56a50863c6d0d/coverage-7.16.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:382d3346d56b0eec1b793d53a4c88799c8053f516aa3a8d7c44315696954bacf", size = 270047, upload-time = "2026-09-27T12:27:37.96Z" }, + { url = "https://files.pythonhosted.org/packages/be/c1/44082ff0cbf9f97d0043f57970a71204097ec7ba606361a9fd2065393669/coverage-7.16.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:648352b94507179d82637292e7ae8802508d95f78e2f00a705a50b6c48011681", size = 271360, upload-time = "2026-09-27T12:27:39.766Z" }, + { url = "https://files.pythonhosted.org/packages/b8/17/9a215efe25b5e0ecc87c89dbe525c4a87d14d87c8c0c7316ef140a5f6f3e/coverage-7.16.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fb2bde05838fffae1a1bf75e5d411a6cac3e4e9bb97e6640fed8cd47888b33f0", size = 264736, upload-time = "2026-09-27T12:27:42.072Z" }, + { url = "https://files.pythonhosted.org/packages/a2/da/7f0a31af8e448107d4d32844bd684757f51ea907bc0c68c8fd537b2123ff/coverage-7.16.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:6a75180829efb8ae62b4aded25be6ddca1c888d138d2d82e21d93bfbd88f41cb", size = 267600, upload-time = "2026-09-27T12:27:43.85Z" }, + { url = "https://files.pythonhosted.org/packages/dd/a4/3bfecbd3366b775bacdcb3330394d356cf384b5d8f5b2146ac4b14b252b5/coverage-7.16.2-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:99704f73721e23859112072d522076e11c31744fc96b5652e5dd2018aa4359f7", size = 264767, upload-time = "2026-09-27T12:27:45.768Z" }, + { url = "https://files.pythonhosted.org/packages/b8/3f/5d62163732d87e4a0c4710a0eab30f0fd6a2d480112abe2029f014fe8c9d/coverage-7.16.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:29309ccc86b7f33df7db12813c299f215bbbc470ed6292d0bedd63ffae1ebf64", size = 269026, upload-time = "2026-09-27T12:27:47.787Z" }, + { url = "https://files.pythonhosted.org/packages/49/4d/8e4579f225426535085a9be371cc75e3b026d058d679b80affbdfb4c3ef0/coverage-7.16.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:30c1b65d529e46569899fadca59e4a87c1faf2886923f1307ba61e654d4f3c20", size = 264147, upload-time = "2026-09-27T12:27:49.681Z" }, + { url = "https://files.pythonhosted.org/packages/d1/36/ef1f77e2c3f7bb03c2b13b9a2006f88700fdd75535ef158d70049f425c1c/coverage-7.16.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:dcf4bc2aab4e16b1c4c0c2005918f23a7dd5d7821ddae82caed9e3342dc2fcce", size = 266376, upload-time = "2026-09-27T12:27:51.551Z" }, + { url = "https://files.pythonhosted.org/packages/be/79/0cb2bf4428830dec971c718c2c841a039c084415c99e67281f5a72841aab/coverage-7.16.2-cp314-cp314t-win32.whl", hash = "sha256:a9cd3de0a5bfe7b0e21ee10e1a14e3d61bf52efc88217ab1d95d6ace6970bd46", size = 226585, upload-time = "2026-09-27T12:27:53.945Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f9/da17121c16667fd84998e972200ae226a41540f6ea4795776c6d99e8976f/coverage-7.16.2-cp314-cp314t-win_amd64.whl", hash = "sha256:611a44e5229a59d7483ce830160e1a0e85f700562c7a5651c7c63fb8f4eb528c", size = 227378, upload-time = "2026-09-27T12:27:55.778Z" }, + { url = "https://files.pythonhosted.org/packages/74/89/01179c62d1b7e6e33bd5001566b02d7f778cf33d3ec1e81e94ca170c517f/coverage-7.16.2-cp314-cp314t-win_arm64.whl", hash = "sha256:22957cef43ce038641de78ba995de7568d2d6a37c6ddbf7fa0fd7d1ae2344d91", size = 227064, upload-time = "2026-09-27T12:27:57.496Z" }, + { url = "https://files.pythonhosted.org/packages/4c/57/52935003c3f627ba6e5203d7179aad32448c10899663a30336aba8e81a2c/coverage-7.16.2-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:414c26dfdb96aac2d570a54e03008f001e32eb2d413705365503648c6bd361d8", size = 224140, upload-time = "2026-09-27T12:27:59.343Z" }, + { url = "https://files.pythonhosted.org/packages/31/38/df472520f3e626524d7e2fc9d6da0afe7895a2f1489d36b48af8ca40bb41/coverage-7.16.2-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:00d3eb96e9988c45f50cccd1f1496571ac5c1f91386ac02c4d55516eeda19a24", size = 224449, upload-time = "2026-09-27T12:28:01.299Z" }, + { url = "https://files.pythonhosted.org/packages/0c/aa/3be084d5b82e63ccdad4ed751e4acbae294673573e30481d29f8b7402eec/coverage-7.16.2-cp315-cp315-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:4dbbd1155ca46e6e0b6b89d204428c56ef6a459af21333f365d135a2820e5a09", size = 256060, upload-time = "2026-09-27T12:28:03.185Z" }, + { url = "https://files.pythonhosted.org/packages/de/29/48fca82a7ebf7ff7b2e35019cc9537e7f65e4d2aa1215cc5a8792c989251/coverage-7.16.2-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8fc15cc8d0d06e873c00ef18e1372d605f9aaf3de27d8c24e50782e75bc8b843", size = 259106, upload-time = "2026-09-27T12:28:05.15Z" }, + { url = "https://files.pythonhosted.org/packages/06/3d/b2d5986f2dd53fe201aa1be2e4ab204fa1aed5101e67c0dbbb419b850aee/coverage-7.16.2-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c6afdd69218202bc1758c9a14b86b8cf1084f37ed2ca143e567a103772b16d1", size = 260674, upload-time = "2026-09-27T12:28:06.868Z" }, + { url = "https://files.pythonhosted.org/packages/ce/7e/b50160be3506ead12e6480d14279af7f0f17627694300a2d1fd2c42d2ff5/coverage-7.16.2-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:aba5c63b7afdc749cc9eae943d5b868cba2b261a176378fa1c5a30bc8bc89982", size = 263139, upload-time = "2026-09-27T12:28:08.771Z" }, + { url = "https://files.pythonhosted.org/packages/14/5e/7c805ac9a32606de1399bd7e9bd375aa2f973dc61b12680d9e6403c2e891/coverage-7.16.2-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9174f0af24e5eff248b9dbfe76ec5275a3d19d37edbc2810543f12cf97347a34", size = 256591, upload-time = "2026-09-27T12:28:10.842Z" }, + { url = "https://files.pythonhosted.org/packages/ab/9e/76f1ed129a2daf658a3ea17122824cf2e3b91fea0460d8d3664fc5a61018/coverage-7.16.2-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:80e9fdb4c3d926b6ba721d4bf7435bdb869c3527ae7803290361d0ab73db13b6", size = 258708, upload-time = "2026-09-27T12:28:12.962Z" }, + { url = "https://files.pythonhosted.org/packages/5a/b7/8d62e75f48b527619239a65294f842d4b7fd02a0839d43ae1de80184e2df/coverage-7.16.2-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:7b3bce4a0d05401d70b7d0d5ca783e686bc9d30e81dbd7d980d532609bf809e4", size = 256562, upload-time = "2026-09-27T12:28:14.934Z" }, + { url = "https://files.pythonhosted.org/packages/b8/8d/0a15f95c3afb78e947c52644786ba4bc9de259905687dd720d5e6fae2e76/coverage-7.16.2-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:44f21e407b278efdfc1ee5e481e00518bd1d500310a30a5fbf2bcbedfef4aaf0", size = 261077, upload-time = "2026-09-27T12:28:17.215Z" }, + { url = "https://files.pythonhosted.org/packages/25/00/88389987305a47d732866c07c8a500000ab574df9505e3114ac69c8d027f/coverage-7.16.2-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:59c3926585e1cd1f2190f4b2ac9014de1bbeaf0d5d0587b0dc6b0aa90d17896a", size = 256034, upload-time = "2026-09-27T12:28:19.08Z" }, + { url = "https://files.pythonhosted.org/packages/92/02/34d079d4952ad461bde037d353f9a6e037a7edc45fe0f9ee8781ff73f028/coverage-7.16.2-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:066429634299e14dd2d511e1e85f8f9cecc500781f6b41907c0dd6f1baea7e63", size = 258034, upload-time = "2026-09-27T12:28:21.242Z" }, + { url = "https://files.pythonhosted.org/packages/f6/d8/3e59a62879285b464ec1b10fd824fbc1af9ce66e842cd39974f80a0becc4/coverage-7.16.2-cp315-cp315-win32.whl", hash = "sha256:893ea9cf86cb8d2546812ac93d973aaf2ee1fb45110a873b014214fd23e3725e", size = 226252, upload-time = "2026-09-27T12:28:23.102Z" }, + { url = "https://files.pythonhosted.org/packages/f4/e1/128026e1b2836e9ad6b219207ba9edf1c5e0088a7869e23088aee7fbbe7a/coverage-7.16.2-cp315-cp315-win_amd64.whl", hash = "sha256:01c6908bc613b420c26c818fe948e1b97dfd041a53c98b01c63bd8321f5c9aae", size = 226728, upload-time = "2026-09-27T12:28:25.21Z" }, + { url = "https://files.pythonhosted.org/packages/a8/f4/c9fa8e7cf525ca7748ac52b0ee89331d13fe09808e45c679830708782e90/coverage-7.16.2-cp315-cp315-win_arm64.whl", hash = "sha256:967d72c835d7a8cf0af99ec813a2d06e3db6df706402f1fe85b31b437645f495", size = 226648, upload-time = "2026-09-27T12:28:27.136Z" }, + { url = "https://files.pythonhosted.org/packages/a2/13/e96b045447a856666f36f9c653e2a80bdaa732aaaf72412b19aa2c26a473/coverage-7.16.2-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:98d9c97f51b334b0adce7b964442a9af33c1a00c6ac856984cc5dc8d18f81c75", size = 224858, upload-time = "2026-09-27T12:28:29.169Z" }, + { url = "https://files.pythonhosted.org/packages/23/90/087f6ad1bd3df059632ca3407a4e6552ed1053ee35354de0a771acf35423/coverage-7.16.2-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:3e861f1071dcc2fec1e88bef0920f6b1eaa66a143555b4f8ab79ba2b0f30ef55", size = 225139, upload-time = "2026-09-27T12:28:31.131Z" }, + { url = "https://files.pythonhosted.org/packages/7e/8e/285dcef0184358044e7cbcd810a1bdc9566bc620f54702d605477155df4a/coverage-7.16.2-cp315-cp315t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:fb9d92ecfe2d5b494367c67f7446f8b75b68d8d0c8cf3bc3e6997478be25d9e2", size = 265090, upload-time = "2026-09-27T12:28:33.04Z" }, + { url = "https://files.pythonhosted.org/packages/06/b2/cc83f3a6e5789a4e89059c69555bc641c2efcde568405a1c06fc702951ab/coverage-7.16.2-cp315-cp315t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:eb57acff4a74246ae513c142d4b36e18c389c3aed8661914a53f7cd0071031b2", size = 268254, upload-time = "2026-09-27T12:28:35.135Z" }, + { url = "https://files.pythonhosted.org/packages/ac/41/f548c19530f5d66ac6e3c92bbcbc49da7261de3a458b9f3e54a3efb1a0b2/coverage-7.16.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:444889f7f66b74e4455c0a97e0e166dd41177f1dca8c0239a47cff25e05ba7e1", size = 270695, upload-time = "2026-09-27T12:28:36.959Z" }, + { url = "https://files.pythonhosted.org/packages/94/61/4dc27cf82ef96434d2874110ad0cc10ea4621025705dc5049862bd3bd181/coverage-7.16.2-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a740ea6f083c6db7b926534d159508f80ba275ab35e722522de0d18d0f56e55f", size = 271853, upload-time = "2026-09-27T12:28:38.821Z" }, + { url = "https://files.pythonhosted.org/packages/38/29/bf8072b1b8bd5f2de8b21460a404460b1a2b97e80a9464c78ec0271f6199/coverage-7.16.2-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8e209591f7c41ae4a9171335cf6156afda0b21de73b02f73f5aa95b2d5fbb08d", size = 265644, upload-time = "2026-09-27T12:28:40.815Z" }, + { url = "https://files.pythonhosted.org/packages/7c/2f/0aecb8721be5cdeb8afd9d6d9f6b463f074e4d8d37f00f4c42442522709f/coverage-7.16.2-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:396bb16e04ce04efbb3df91456ae4e3da918e69ecdf67fb711b0a0fdf35ccce0", size = 268530, upload-time = "2026-09-27T12:28:42.725Z" }, + { url = "https://files.pythonhosted.org/packages/ab/0b/92b4b7628268ee711249958e68fc0328779bd3d9a7ab4715379465aedb84/coverage-7.16.2-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:9cdf19874e0d247f32f03609200370343c3c7aa260b191d8c2bb251d36198283", size = 265154, upload-time = "2026-09-27T12:28:44.684Z" }, + { url = "https://files.pythonhosted.org/packages/7b/d9/41c95c1ab29b3dcd357cd1227181d1c98185632aca41ce670ce671b23a43/coverage-7.16.2-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:fd3d72233eb8b48acc94fa57d44e2d32ce8e7abed02882ccb6d855ccc4ed33ec", size = 269799, upload-time = "2026-09-27T12:28:46.672Z" }, + { url = "https://files.pythonhosted.org/packages/80/07/ebeb259aa5362b033a137b86d7274ff4b109d59be8cc9913889b783bf75a/coverage-7.16.2-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:bb4ffe96aa663cee727659db5a2afeb38c95f8677b747d447b90d6d4874ea2c5", size = 265196, upload-time = "2026-09-27T12:28:48.996Z" }, + { url = "https://files.pythonhosted.org/packages/b2/18/8437620f90d023680a072eee02f968055f3658bbfb7d386d0ea34cfb7f30/coverage-7.16.2-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:dba2edfb054f6d4a08df9d1637c39a5aa3865bca6617c13c86be21e45658a59c", size = 267266, upload-time = "2026-09-27T12:28:51.361Z" }, + { url = "https://files.pythonhosted.org/packages/28/6c/f08e8ee4293e6434035424180bef4d45e028e8ecc006c61bf9453e74405e/coverage-7.16.2-cp315-cp315t-win32.whl", hash = "sha256:251aed777c47c77aba047096d4542889db089227655711dfc2b9c54ef0e15e35", size = 226583, upload-time = "2026-09-27T12:28:53.33Z" }, + { url = "https://files.pythonhosted.org/packages/f7/fd/3f939c2847f4a72c20cff8b1ac33da78ea91a2d38d9b43336e60db719103/coverage-7.16.2-cp315-cp315t-win_amd64.whl", hash = "sha256:2aca0bdfa9e91621d5b09d815357bf63def4fc0e9cb66da67bf2cf93f3b1a6f5", size = 227374, upload-time = "2026-09-27T12:28:55.158Z" }, + { url = "https://files.pythonhosted.org/packages/5a/35/b98cdc354c952402132e675a87f2cc3227fb68f959c84aaa491fbe15933d/coverage-7.16.2-cp315-cp315t-win_arm64.whl", hash = "sha256:b88841e654f09732804809e435b3e005a929ffd9998b872b7b213957b8759cb8", size = 227064, upload-time = "2026-09-27T12:28:57.075Z" }, + { url = "https://files.pythonhosted.org/packages/3f/0c/7a64e1ac90541a8edf50daef0914848011fb057a5bf55284a4811e21939a/coverage-7.16.2-py3-none-any.whl", hash = "sha256:11d28e9123a9156cb405d8d27b44256c9a58fb5decc2073a8f17862057e3aa0f", size = 215754, upload-time = "2026-09-27T12:28:59.075Z" }, ] [package.optional-dependencies] @@ -560,64 +1031,101 @@ toml = [ [[package]] name = "cryptography" -version = "46.0.2" +version = "50.0.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/4a/9b/e301418629f7bfdf72db9e80ad6ed9d1b83c487c471803eaa6464c511a01/cryptography-46.0.2.tar.gz", hash = "sha256:21b6fc8c71a3f9a604f028a329e5560009cc4a3a828bfea5fcba8eb7647d88fe", size = 749293, upload-time = "2025-10-01T00:29:11.856Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c6/38/b2adb2aa1baa6706adc3eb746691edd6f90a656a9a65c3509e274d15a2b8/cryptography-46.0.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1fd1a69086926b623ef8126b4c33d5399ce9e2f3fac07c9c734c2a4ec38b6d02", size = 4297596, upload-time = "2025-10-01T00:27:25.258Z" }, - { url = "https://files.pythonhosted.org/packages/e4/27/0f190ada240003119488ae66c897b5e97149292988f556aef4a6a2a57595/cryptography-46.0.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bb7fb9cd44c2582aa5990cf61a4183e6f54eea3172e54963787ba47287edd135", size = 4450899, upload-time = "2025-10-01T00:27:27.458Z" }, - { url = "https://files.pythonhosted.org/packages/85/d5/e4744105ab02fdf6bb58ba9a816e23b7a633255987310b4187d6745533db/cryptography-46.0.2-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:9066cfd7f146f291869a9898b01df1c9b0e314bfa182cef432043f13fc462c92", size = 4300382, upload-time = "2025-10-01T00:27:29.091Z" }, - { url = "https://files.pythonhosted.org/packages/33/fb/bf9571065c18c04818cb07de90c43fc042c7977c68e5de6876049559c72f/cryptography-46.0.2-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:97e83bf4f2f2c084d8dd792d13841d0a9b241643151686010866bbd076b19659", size = 4017347, upload-time = "2025-10-01T00:27:30.767Z" }, - { url = "https://files.pythonhosted.org/packages/35/72/fc51856b9b16155ca071080e1a3ad0c3a8e86616daf7eb018d9565b99baa/cryptography-46.0.2-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:4a766d2a5d8127364fd936572c6e6757682fc5dfcbdba1632d4554943199f2fa", size = 4983500, upload-time = "2025-10-01T00:27:32.741Z" }, - { url = "https://files.pythonhosted.org/packages/c1/53/0f51e926799025e31746d454ab2e36f8c3f0d41592bc65cb9840368d3275/cryptography-46.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:fab8f805e9675e61ed8538f192aad70500fa6afb33a8803932999b1049363a08", size = 4482591, upload-time = "2025-10-01T00:27:34.869Z" }, - { url = "https://files.pythonhosted.org/packages/86/96/4302af40b23ab8aa360862251fb8fc450b2a06ff24bc5e261c2007f27014/cryptography-46.0.2-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:1e3b6428a3d56043bff0bb85b41c535734204e599c1c0977e1d0f261b02f3ad5", size = 4300019, upload-time = "2025-10-01T00:27:37.029Z" }, - { url = "https://files.pythonhosted.org/packages/9b/59/0be12c7fcc4c5e34fe2b665a75bc20958473047a30d095a7657c218fa9e8/cryptography-46.0.2-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:1a88634851d9b8de8bb53726f4300ab191d3b2f42595e2581a54b26aba71b7cc", size = 4950006, upload-time = "2025-10-01T00:27:40.272Z" }, - { url = "https://files.pythonhosted.org/packages/55/1d/42fda47b0111834b49e31590ae14fd020594d5e4dadd639bce89ad790fba/cryptography-46.0.2-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:be939b99d4e091eec9a2bcf41aaf8f351f312cd19ff74b5c83480f08a8a43e0b", size = 4482088, upload-time = "2025-10-01T00:27:42.668Z" }, - { url = "https://files.pythonhosted.org/packages/17/50/60f583f69aa1602c2bdc7022dae86a0d2b837276182f8c1ec825feb9b874/cryptography-46.0.2-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9f13b040649bc18e7eb37936009b24fd31ca095a5c647be8bb6aaf1761142bd1", size = 4425599, upload-time = "2025-10-01T00:27:44.616Z" }, - { url = "https://files.pythonhosted.org/packages/d1/57/d8d4134cd27e6e94cf44adb3f3489f935bde85f3a5508e1b5b43095b917d/cryptography-46.0.2-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9bdc25e4e01b261a8fda4e98618f1c9515febcecebc9566ddf4a70c63967043b", size = 4697458, upload-time = "2025-10-01T00:27:46.209Z" }, - { url = "https://files.pythonhosted.org/packages/93/22/d66a8591207c28bbe4ac7afa25c4656dc19dc0db29a219f9809205639ede/cryptography-46.0.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e7155c0b004e936d381b15425273aee1cebc94f879c0ce82b0d7fecbf755d53a", size = 4287584, upload-time = "2025-10-01T00:27:57.018Z" }, - { url = "https://files.pythonhosted.org/packages/8c/3e/fac3ab6302b928e0398c269eddab5978e6c1c50b2b77bb5365ffa8633b37/cryptography-46.0.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a61c154cc5488272a6c4b86e8d5beff4639cdb173d75325ce464d723cda0052b", size = 4433796, upload-time = "2025-10-01T00:27:58.631Z" }, - { url = "https://files.pythonhosted.org/packages/7d/d8/24392e5d3c58e2d83f98fe5a2322ae343360ec5b5b93fe18bc52e47298f5/cryptography-46.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:9ec3f2e2173f36a9679d3b06d3d01121ab9b57c979de1e6a244b98d51fea1b20", size = 4292126, upload-time = "2025-10-01T00:28:00.643Z" }, - { url = "https://files.pythonhosted.org/packages/ed/38/3d9f9359b84c16c49a5a336ee8be8d322072a09fac17e737f3bb11f1ce64/cryptography-46.0.2-cp314-cp314t-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2fafb6aa24e702bbf74de4cb23bfa2c3beb7ab7683a299062b69724c92e0fa73", size = 3993056, upload-time = "2025-10-01T00:28:02.8Z" }, - { url = "https://files.pythonhosted.org/packages/d6/a3/4c44fce0d49a4703cc94bfbe705adebf7ab36efe978053742957bc7ec324/cryptography-46.0.2-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:0c7ffe8c9b1fcbb07a26d7c9fa5e857c2fe80d72d7b9e0353dcf1d2180ae60ee", size = 4967604, upload-time = "2025-10-01T00:28:04.783Z" }, - { url = "https://files.pythonhosted.org/packages/eb/c2/49d73218747c8cac16bb8318a5513fde3129e06a018af3bc4dc722aa4a98/cryptography-46.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:5840f05518caa86b09d23f8b9405a7b6d5400085aa14a72a98fdf5cf1568c0d2", size = 4465367, upload-time = "2025-10-01T00:28:06.864Z" }, - { url = "https://files.pythonhosted.org/packages/1b/64/9afa7d2ee742f55ca6285a54386ed2778556a4ed8871571cb1c1bfd8db9e/cryptography-46.0.2-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:27c53b4f6a682a1b645fbf1cd5058c72cf2f5aeba7d74314c36838c7cbc06e0f", size = 4291678, upload-time = "2025-10-01T00:28:08.982Z" }, - { url = "https://files.pythonhosted.org/packages/50/48/1696d5ea9623a7b72ace87608f6899ca3c331709ac7ebf80740abb8ac673/cryptography-46.0.2-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:512c0250065e0a6b286b2db4bbcc2e67d810acd53eb81733e71314340366279e", size = 4931366, upload-time = "2025-10-01T00:28:10.74Z" }, - { url = "https://files.pythonhosted.org/packages/eb/3c/9dfc778401a334db3b24435ee0733dd005aefb74afe036e2d154547cb917/cryptography-46.0.2-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:07c0eb6657c0e9cca5891f4e35081dbf985c8131825e21d99b4f440a8f496f36", size = 4464738, upload-time = "2025-10-01T00:28:12.491Z" }, - { url = "https://files.pythonhosted.org/packages/dc/b1/abcde62072b8f3fd414e191a6238ce55a0050e9738090dc6cded24c12036/cryptography-46.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:48b983089378f50cba258f7f7aa28198c3f6e13e607eaf10472c26320332ca9a", size = 4419305, upload-time = "2025-10-01T00:28:14.145Z" }, - { url = "https://files.pythonhosted.org/packages/c7/1f/3d2228492f9391395ca34c677e8f2571fb5370fe13dc48c1014f8c509864/cryptography-46.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:e6f6775eaaa08c0eec73e301f7592f4367ccde5e4e4df8e58320f2ebf161ea2c", size = 4681201, upload-time = "2025-10-01T00:28:15.951Z" }, - { url = "https://files.pythonhosted.org/packages/b7/66/f42071ce0e3ffbfa80a88feadb209c779fda92a23fbc1e14f74ebf72ef6b/cryptography-46.0.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d30bc11d35743bf4ddf76674a0a369ec8a21f87aaa09b0661b04c5f6c46e8d7b", size = 4293123, upload-time = "2025-10-01T00:28:25.072Z" }, - { url = "https://files.pythonhosted.org/packages/a8/5d/1fdbd2e5c1ba822828d250e5a966622ef00185e476d1cd2726b6dd135e53/cryptography-46.0.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bca3f0ce67e5a2a2cf524e86f44697c4323a86e0fd7ba857de1c30d52c11ede1", size = 4439524, upload-time = "2025-10-01T00:28:26.808Z" }, - { url = "https://files.pythonhosted.org/packages/c8/c1/5e4989a7d102d4306053770d60f978c7b6b1ea2ff8c06e0265e305b23516/cryptography-46.0.2-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ff798ad7a957a5021dcbab78dfff681f0cf15744d0e6af62bd6746984d9c9e9c", size = 4297264, upload-time = "2025-10-01T00:28:29.327Z" }, - { url = "https://files.pythonhosted.org/packages/28/78/b56f847d220cb1d6d6aef5a390e116ad603ce13a0945a3386a33abc80385/cryptography-46.0.2-cp38-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:cb5e8daac840e8879407acbe689a174f5ebaf344a062f8918e526824eb5d97af", size = 4011872, upload-time = "2025-10-01T00:28:31.479Z" }, - { url = "https://files.pythonhosted.org/packages/e1/80/2971f214b066b888944f7b57761bf709ee3f2cf805619a18b18cab9b263c/cryptography-46.0.2-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:3f37aa12b2d91e157827d90ce78f6180f0c02319468a0aea86ab5a9566da644b", size = 4978458, upload-time = "2025-10-01T00:28:33.267Z" }, - { url = "https://files.pythonhosted.org/packages/a5/84/0cb0a2beaa4f1cbe63ebec4e97cd7e0e9f835d0ba5ee143ed2523a1e0016/cryptography-46.0.2-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:5e38f203160a48b93010b07493c15f2babb4e0f2319bbd001885adb3f3696d21", size = 4472195, upload-time = "2025-10-01T00:28:36.039Z" }, - { url = "https://files.pythonhosted.org/packages/30/8b/2b542ddbf78835c7cd67b6fa79e95560023481213a060b92352a61a10efe/cryptography-46.0.2-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:d19f5f48883752b5ab34cff9e2f7e4a7f216296f33714e77d1beb03d108632b6", size = 4296791, upload-time = "2025-10-01T00:28:37.732Z" }, - { url = "https://files.pythonhosted.org/packages/78/12/9065b40201b4f4876e93b9b94d91feb18de9150d60bd842a16a21565007f/cryptography-46.0.2-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:04911b149eae142ccd8c9a68892a70c21613864afb47aba92d8c7ed9cc001023", size = 4939629, upload-time = "2025-10-01T00:28:39.654Z" }, - { url = "https://files.pythonhosted.org/packages/f6/9e/6507dc048c1b1530d372c483dfd34e7709fc542765015425f0442b08547f/cryptography-46.0.2-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:8b16c1ede6a937c291d41176934268e4ccac2c6521c69d3f5961c5a1e11e039e", size = 4471988, upload-time = "2025-10-01T00:28:41.822Z" }, - { url = "https://files.pythonhosted.org/packages/b1/86/d025584a5f7d5c5ec8d3633dbcdce83a0cd579f1141ceada7817a4c26934/cryptography-46.0.2-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:747b6f4a4a23d5a215aadd1d0b12233b4119c4313df83ab4137631d43672cc90", size = 4422989, upload-time = "2025-10-01T00:28:43.608Z" }, - { url = "https://files.pythonhosted.org/packages/4b/39/536370418b38a15a61bbe413006b79dfc3d2b4b0eafceb5581983f973c15/cryptography-46.0.2-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6b275e398ab3a7905e168c036aad54b5969d63d3d9099a0a66cc147a3cc983be", size = 4685578, upload-time = "2025-10-01T00:28:45.361Z" }, - { url = "https://files.pythonhosted.org/packages/e3/0a/0d10eb970fe3e57da9e9ddcfd9464c76f42baf7b3d0db4a782d6746f788f/cryptography-46.0.2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:fe245cf4a73c20592f0f48da39748b3513db114465be78f0a36da847221bd1b4", size = 4243379, upload-time = "2025-10-01T00:28:58.989Z" }, - { url = "https://files.pythonhosted.org/packages/7d/60/e274b4d41a9eb82538b39950a74ef06e9e4d723cb998044635d9deb1b435/cryptography-46.0.2-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:2b9cad9cf71d0c45566624ff76654e9bae5f8a25970c250a26ccfc73f8553e2d", size = 4409533, upload-time = "2025-10-01T00:29:00.785Z" }, - { url = "https://files.pythonhosted.org/packages/19/9a/fb8548f762b4749aebd13b57b8f865de80258083fe814957f9b0619cfc56/cryptography-46.0.2-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:9bd26f2f75a925fdf5e0a446c0de2714f17819bf560b44b7480e4dd632ad6c46", size = 4243120, upload-time = "2025-10-01T00:29:02.515Z" }, - { url = "https://files.pythonhosted.org/packages/71/60/883f24147fd4a0c5cab74ac7e36a1ff3094a54ba5c3a6253d2ff4b19255b/cryptography-46.0.2-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:7282d8f092b5be7172d6472f29b0631f39f18512a3642aefe52c3c0e0ccfad5a", size = 4408940, upload-time = "2025-10-01T00:29:04.42Z" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9d/af/182eb91b0df3fe75c4d9f26fe70684569566745f6ba7e5c9c73a862c5252/cryptography-50.0.2.tar.gz", hash = "sha256:7b46165bb56eb4704e2eaaf86f3c940d19154535d9b0ca7d6d590b04060e00d5", size = 880623, upload-time = "2026-09-30T15:30:04.884Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/56/d194340cc4a57535e82e1bee9e89667ac4b7c13b5d3f59686deae3094dd5/cryptography-50.0.2-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:fa8f5efb344d6908a1ce62f4a24e2e5780f825d6f53f5f50ec5ffacac72936cb", size = 3914904, upload-time = "2026-09-30T14:43:44.339Z" }, + { url = "https://files.pythonhosted.org/packages/d9/69/c9bd862c3bf43d6399c433caf002df16e2dffd4be49bdf515cda38038711/cryptography-50.0.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:79def8d059362e7831389ed3be0ecdf58a89386e1271e35dd9f5af84e81bffd0", size = 4731146, upload-time = "2026-09-30T14:43:47.113Z" }, + { url = "https://files.pythonhosted.org/packages/21/69/64cef1f702bf6657e0cc186ed1a2891d50d29fb41586b254e1c07adea261/cryptography-50.0.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:630ebfea3bf689d075f82316324ff7433dc447fe6bc1bfc76524b74b4a9567d2", size = 4719841, upload-time = "2026-09-30T14:43:49.01Z" }, + { url = "https://files.pythonhosted.org/packages/38/6b/61a3f8d8c5e1e49a6cddccafc4015cc1c0021360ab0acb4080e7a423644a/cryptography-50.0.2-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f9f6143a8c75945eb960d9eb98905a441394abfa24afaae239d514ffb2586480", size = 4738340, upload-time = "2026-09-30T14:43:50.932Z" }, + { url = "https://files.pythonhosted.org/packages/7b/2e/7212ca32fd43dc91f2f41db20160b268098874b4c9a0e7be94d6835f5b2e/cryptography-50.0.2-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:a582ab2ae1d34f67112cadc86702774c9ea4374df6bca6afe672817203c99134", size = 5367029, upload-time = "2026-09-30T14:43:52.911Z" }, + { url = "https://files.pythonhosted.org/packages/1a/f1/b474e930c4d910328780e3940da76f5aa5cbc48ce1fc14e44d239d9ea9db/cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856", size = 4753050, upload-time = "2026-09-30T14:43:55.272Z" }, + { url = "https://files.pythonhosted.org/packages/7c/52/9af10e80ac16b0fcc2123f9cbd5e7afbd0fd5075bb7a607c592258a39cda/cryptography-50.0.2-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:ac9ed99d81760c62fe89d5f0815cdfa1ba9a35141cf30f1c2d044f04b4803d2e", size = 4376724, upload-time = "2026-09-30T14:43:57.24Z" }, + { url = "https://files.pythonhosted.org/packages/71/37/6202e488cc1eb625ea110c292c6bda92823176e023f427d8d5660ce8d632/cryptography-50.0.2-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:87e9ce85beb6b328ba370cc6e6aea483c92617b4c95b1d33a49297eb662bfb04", size = 4737859, upload-time = "2026-09-30T14:43:59.541Z" }, + { url = "https://files.pythonhosted.org/packages/8f/30/e86d7d518489b0ae2497091a35287abcb1a2ce4037837a34afbe9b1d6964/cryptography-50.0.2-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:f265528741e048bce55c3463ed721fb0aa45a5888d8add8cfeccb3035451bbdc", size = 5324103, upload-time = "2026-09-30T14:44:01.901Z" }, + { url = "https://files.pythonhosted.org/packages/d3/69/2c833a049475e0a3444e94c7d0aca0aa51d166374a449b09e92ac98138de/cryptography-50.0.2-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9dab55f57c74c3cad24c323bacbbd04be4705ba6eb0d92e920b1fc4837ed5079", size = 4752576, upload-time = "2026-09-30T14:44:04.545Z" }, + { url = "https://files.pythonhosted.org/packages/6c/5d/906970b83bbfc1f5bbfb677a143c181f2801f23b6a7204a3b47c42c97e65/cryptography-50.0.2-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:25784ce8b9621c90c643efb9e1e2162ab3b0224cae446ad5e70e7fcb1ce18b51", size = 4870819, upload-time = "2026-09-30T14:44:06.884Z" }, + { url = "https://files.pythonhosted.org/packages/68/e3/f2298d3bb55e0c4a91841ec4d01b3f020ba8c5fbf15ccdcc6dcf03f97025/cryptography-50.0.2-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:85d0d9a31b9098e98534226d5686b47264b95e62ce459dc2e62fdfc809f9fe93", size = 5030152, upload-time = "2026-09-30T14:44:09.443Z" }, + { url = "https://files.pythonhosted.org/packages/9a/4f/adfc442765721292fff86d314ce385d3249d22db42295c0dd057727b60f3/cryptography-50.0.2-cp311-abi3-win_amd64.whl", hash = "sha256:7afa5a6602a9f29af1f3a2965f831bae7c9d5d597b7cbb716d41ab3b7d89879c", size = 3824692, upload-time = "2026-09-30T14:44:11.671Z" }, + { url = "https://files.pythonhosted.org/packages/ce/cb/52eb3770c0d0be2702a98c6e96065ddc0a2877cf0845aa9c23397c142cd4/cryptography-50.0.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f785f6161f202ab04d8ca194158968798e480ca058943907972da5f12e2881e8", size = 3892731, upload-time = "2026-09-30T14:44:13.485Z" }, + { url = "https://files.pythonhosted.org/packages/19/8e/aa1fc533d4546b127b45de8aa024eb5933d23eff9debfe25931e56861095/cryptography-50.0.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0ecbc5652bdb6fc9eaf89a7d196e20941adfe812f43bc4ca05d9150496821047", size = 4710431, upload-time = "2026-09-30T14:44:15.427Z" }, + { url = "https://files.pythonhosted.org/packages/6a/64/72bc3f75176e7e406b748a3e3830432b8c51297b38368713df04dc04898a/cryptography-50.0.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ab50ee449bf968271e820086f10a33d101dd060370abc10bcd22279be2656539", size = 4694824, upload-time = "2026-09-30T14:44:17.69Z" }, + { url = "https://files.pythonhosted.org/packages/4e/c6/62c77550edfa5ca3f14bf44a1e6739b9fa09d6e998a11d97ed8213bccc98/cryptography-50.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:a9f7355e6fab51f6c369b86fb7571cffa05edee2c2121e0380a37fb9ac1cd5c1", size = 4716967, upload-time = "2026-09-30T14:44:19.661Z" }, + { url = "https://files.pythonhosted.org/packages/f4/37/cce70f150c432914460157a6ecc161752e053aa5ec0ef3b3f7dc6e31039a/cryptography-50.0.2-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:94e5e9f108ee10471288214d3d233fbfbb492840a8457eb85178d643ddeb32c7", size = 5328676, upload-time = "2026-09-30T14:44:21.744Z" }, + { url = "https://files.pythonhosted.org/packages/aa/9a/6f2f0304d634ceafdeaf23e84537336664ac419b5d07611675c2ad3f6b7a/cryptography-50.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:241449bf940a5d27309bd317e6f9a2af6932113818bb2b8f5c59ddc7ef16da18", size = 4727698, upload-time = "2026-09-30T14:44:24.178Z" }, + { url = "https://files.pythonhosted.org/packages/1d/de/66bcf9244d118663b2e1aaded8990f4640e3d7b7411870a5765f252074d2/cryptography-50.0.2-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:d8947001be83df1394050758ce0e745dd74fb134eef0a4b5124208dfc3a68c37", size = 4354821, upload-time = "2026-09-30T14:44:26.263Z" }, + { url = "https://files.pythonhosted.org/packages/bd/e6/db28a28c7b6c676addce89136de3d8db49ea825a8c863472e36e42ead4ad/cryptography-50.0.2-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:4a20ce1e5cb4284a86692fdcba7cb8754185c6b2e5c56fcef3751cf451d3cdc2", size = 4716748, upload-time = "2026-09-30T14:44:28.447Z" }, + { url = "https://files.pythonhosted.org/packages/30/96/01546c7f69ea0e2ab790a2e4f0934a4052fb9b388147fbf83c2fd72f1e57/cryptography-50.0.2-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:84f964e537f916e2cc85199e5a88742e964939b575ac8598b3f9d6cc416cdaf1", size = 5285085, upload-time = "2026-09-30T14:44:30.704Z" }, + { url = "https://files.pythonhosted.org/packages/6c/01/03263395f74d50b071e9e66daace3f8bef80493e5d410726f2ba8554736b/cryptography-50.0.2-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:828d49b0ff5a0e3975865571c5d91dbbdd0d38d8289b249a163e9425413a5e05", size = 4727268, upload-time = "2026-09-30T14:44:32.92Z" }, + { url = "https://files.pythonhosted.org/packages/eb/94/2bfe8f29ec0cc9c0d99359c4161adf32858e4934b72c6d100d2ac0bbe962/cryptography-50.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:deb9fde5c60e437ee4821bc9bc39ff31b42135c27e1dc61ef0a629389c1de62e", size = 4849503, upload-time = "2026-09-30T14:44:34.969Z" }, + { url = "https://files.pythonhosted.org/packages/54/44/e80651ecbf0e42b62e2bb5f5768916e07eea72e1297338956a61df361f88/cryptography-50.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8c71ba2cd31fc93748c38e1b613200ff1c2665cbfd5341fe3a61cfde35a1430e", size = 5004057, upload-time = "2026-09-30T14:44:37.064Z" }, + { url = "https://files.pythonhosted.org/packages/f8/cc/1d33befb3cd7ea7e77d2d73f43f2066471da1b21f24a6156efcaabf6d2e8/cryptography-50.0.2-cp314-cp314t-win_amd64.whl", hash = "sha256:78198641e5be9521beea5aa782bb551a58068d10e6eb04c9c680c1b69f2e7d45", size = 3795868, upload-time = "2026-09-30T14:44:39.71Z" }, + { url = "https://files.pythonhosted.org/packages/2d/49/93f6a6e7a87c9aa68d44d3e1cdb5fe8f60c90d5d2f46acae9a56892816b8/cryptography-50.0.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:edc3342adf8f697fc5f59c887a304356f147b397809440ed64e2fa6af2f50f37", size = 4133708, upload-time = "2026-09-30T14:44:41.807Z" }, + { url = "https://files.pythonhosted.org/packages/8c/75/32ac2a56243d778805c16ca6a32b8f74fb757df7e28d7ecb560afafb59cf/cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d370b8d1dfcdf7130178137f6fbee6140774a1acc6cacefc4b42643ec11d0a3a", size = 4956267, upload-time = "2026-09-30T14:44:43.693Z" }, + { url = "https://files.pythonhosted.org/packages/aa/a4/2c8d734e43d97f0842ee9f1b7b4bfb3d0cf5e19edebf43c2afe6675c2320/cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f2f9bd7f90c64fe89253f0a2c05e3c4856072660429ce8831b4235bf29403a67", size = 4966465, upload-time = "2026-09-30T14:44:45.769Z" }, + { url = "https://files.pythonhosted.org/packages/c2/58/ee288c829a6f41f6235ae9dd33d82fd19b45442b65b4c8a3da36963d9f7a/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl", hash = "sha256:e275096ea1e60cc595cda2836fd4a6c725d1125108b868be17f53684d164e2cc", size = 4959356, upload-time = "2026-09-30T14:44:48.211Z" }, + { url = "https://files.pythonhosted.org/packages/92/20/9ded6d51ddd9897f6b6e81fb9ebea7951d7cc5d6c890b0ed8abf77a51a80/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_ppc64le.whl", hash = "sha256:b13478603dcd0a2479ff8e87e2c19a7d525734686fe3c49542472293a204212d", size = 5548822, upload-time = "2026-09-30T14:44:50.86Z" }, + { url = "https://files.pythonhosted.org/packages/02/a8/8df951850d6b31d2a00218f19e2b3f999523437ed7a819df7fa427942fca/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl", hash = "sha256:58a0c478eeca76fe5e07993c5a0703def34a6dc6a0cda4f5564639b33112ffe7", size = 5001199, upload-time = "2026-09-30T14:44:53.379Z" }, + { url = "https://files.pythonhosted.org/packages/8b/f9/36b3022218ce75b7cdf068fb95f809f9bd0d820e4955ef43b90c255cc7ac/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_31_armv7l.whl", hash = "sha256:d38cdff612d06fa6a32840d5e1b1f7a27cee4a349aa9085d94a67789d6bfd408", size = 4629333, upload-time = "2026-09-30T14:44:55.635Z" }, + { url = "https://files.pythonhosted.org/packages/8c/72/20f99a219f6af47cdd1cbd978c243b92d71496e168a746138af44ded4f29/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_aarch64.whl", hash = "sha256:fdd28f912fccfec1846a94e2e1e8f9b0012f557f0c46fe4f3eb0d7a87afcf90b", size = 4958822, upload-time = "2026-09-30T14:44:59.639Z" }, + { url = "https://files.pythonhosted.org/packages/f2/20/196f112617fb08eb4d608a2a6c422373d46f9cc2857f38fc0667033c0899/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_ppc64le.whl", hash = "sha256:cbc8738fd8526d80f35cb3a40d41f41a2e7030bb3b18b09a6778ef63d291c2fd", size = 5506351, upload-time = "2026-09-30T14:45:02.267Z" }, + { url = "https://files.pythonhosted.org/packages/24/95/83378121ef3eaaaf71d4b781577ff794acb39b9e1b87a3f156898c8497ed/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_x86_64.whl", hash = "sha256:e105ab60406787da31fccc883fc0f733af1efd78f0136a4599692c4083a73d0c", size = 5000859, upload-time = "2026-09-30T14:45:05.009Z" }, + { url = "https://files.pythonhosted.org/packages/22/f7/70fd7ae4d1dbfa7ba29b02e1b9068771519a86027756510b700ce81086a8/cryptography-50.0.2-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:6f8700550aa1474a91e5dc07049c46f98b423b5b1ddd0483e0b51362eeeaf5be", size = 5092151, upload-time = "2026-09-30T15:29:15.932Z" }, + { url = "https://files.pythonhosted.org/packages/d4/be/688367b74de86984bd58d8efacfc7c9e68b89a6a22ced0fb4f38db50254a/cryptography-50.0.2-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:c71be1cbfa5cd9a41ee452acf1eccd82b2c05950358b106ec8ceb83411d1a020", size = 5286120, upload-time = "2026-09-30T15:29:18.309Z" }, + { url = "https://files.pythonhosted.org/packages/39/d1/55f8a3f2ef5d1529e16835ef10cf0fe3d559ce237b46dddc440c0bba3649/cryptography-50.0.2-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:c423ab384a46c4dff7217b2ea5ba2e11cffdeab6441acd04cf65a369caf0366c", size = 4111557, upload-time = "2026-09-30T15:29:20.155Z" }, + { url = "https://files.pythonhosted.org/packages/23/ad/ac987755d00e1e64273760228d2635ae38dae2be83e3c6e0d3289d91dec3/cryptography-50.0.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:0ec5f09541743261e66e291b4a0cbf0fb2997aeaab6d9e9c740b9dba1b58d1c2", size = 3943588, upload-time = "2026-09-30T15:29:22.265Z" }, + { url = "https://files.pythonhosted.org/packages/d5/8d/6d585339bedf85d45044c85d8412dac53f2bb6f918e8b7777efba1787844/cryptography-50.0.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c5e67125c7dca78d199ec4e116aa93dbb83494808ecbb8211a2cb09b1bf41dbd", size = 4756166, upload-time = "2026-09-30T15:29:24.58Z" }, + { url = "https://files.pythonhosted.org/packages/bf/f1/1c1f6874e8550cfddd4b688ceb38cefb6ed15ceed224d56f133f3d88c214/cryptography-50.0.2-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ee247f5c245c9a2fe7c8e2214e295918838e44e00a45a6718451e4004219e767", size = 4749145, upload-time = "2026-09-30T15:29:26.807Z" }, + { url = "https://files.pythonhosted.org/packages/c1/63/61b15dc1a8de03fe0adbe3fd7608b3ad5c73bf50993bbcb1faaa930afe33/cryptography-50.0.2-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dfe9763530994147d9af1def057a5b9658b00e8f8fe8743d144d1e0911c2e454", size = 4763638, upload-time = "2026-09-30T15:29:28.588Z" }, + { url = "https://files.pythonhosted.org/packages/fc/35/b345bdfa40c9126df1a9d33236aa98418367931b8725f84fc3ae2b98dc59/cryptography-50.0.2-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:58ddb5a8e3179d12f19e4ea34d2d32e9d63a4baa142c875c1eb59f41b7243acd", size = 5382217, upload-time = "2026-09-30T15:29:30.589Z" }, + { url = "https://files.pythonhosted.org/packages/4f/87/ef344a9e616871f2519c22d6afcda79ddd5d35e9592d95eb6e677608d055/cryptography-50.0.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f21e8a22c8605750c7af886bab299a363721264061b4ac0a30efb73cfd58efc5", size = 4781387, upload-time = "2026-09-30T15:29:32.605Z" }, + { url = "https://files.pythonhosted.org/packages/90/5b/f2fdb13cd0b96f6f932c8627bb292a45f11c64d21620a8e120aee9a3b848/cryptography-50.0.2-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:9c8402a82ea0dc4ceeab793db05f0fafa8ca139ca34fcde5df0f596103c74107", size = 4403790, upload-time = "2026-09-30T15:29:34.374Z" }, + { url = "https://files.pythonhosted.org/packages/bc/ce/7e4f662b1e3c393513569e402cfc85ac7da0bd3d5435e122a3140219eb2d/cryptography-50.0.2-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:0ddc924c04591c2811ca024d62ecad4f7f6f08af8939c211438f48a16bd23602", size = 4764319, upload-time = "2026-09-30T15:29:36.149Z" }, + { url = "https://files.pythonhosted.org/packages/3c/3f/86ff33ce34cc0de6847fb96e035a1a760d81652e38643f617c02ad32ef7a/cryptography-50.0.2-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:a6557e5f38e065ca9fbdaf7cfc7435ecb1d113aa81a022d1b51921ee7432e227", size = 5338560, upload-time = "2026-09-30T15:29:39.053Z" }, + { url = "https://files.pythonhosted.org/packages/40/cf/6b5c8e2fd9202d98988ab7cb5cc5c991704c4ad55f492ff408e4969f83f1/cryptography-50.0.2-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:1981f1db4630889b9ef7803fadef12b056f428cb6b85c27ba57b774793b6093c", size = 4780973, upload-time = "2026-09-30T15:29:41.251Z" }, + { url = "https://files.pythonhosted.org/packages/10/bf/8d6ebc7dded797bd0f0160d52188021211f011a2b164ef0ae1dac4587465/cryptography-50.0.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:7a8701d6b584d76e909e3d305b7d126b41439876a5aaf76cddc67fc230eafa2e", size = 4897738, upload-time = "2026-09-30T15:29:43.106Z" }, + { url = "https://files.pythonhosted.org/packages/d4/aa/f3f6e0de7e6253b8baa8b2d8fb9d50924fa75cee3d4624bd4bc1208ee923/cryptography-50.0.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ce47f66801c20ec6c6632453bb5960fe38939e9306970b48b3a5a26de7745d94", size = 5058280, upload-time = "2026-09-30T15:29:44.827Z" }, + { url = "https://files.pythonhosted.org/packages/f6/b6/a1faf3a27ae9405fb34b1713cc73b2d8a26b04d5c561578fa2e6ef3e5bb9/cryptography-50.0.2-cp39-abi3-win_amd64.whl", hash = "sha256:4e81d95e5bafc2d6e34e4bed780e53e4d5b9a2f928573428aa4d35fbec1eb0de", size = 3854095, upload-time = "2026-09-30T15:29:46.782Z" }, + { url = "https://files.pythonhosted.org/packages/1d/7a/f08d34ce09d60f89ebd391e2ebc6ba2b995e6dd7552f41820f8085f94e53/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:92e665960f25fcdc73725b9cec7a3824f279ba97a98653afe9ffac2e43668f67", size = 4716035, upload-time = "2026-09-30T15:29:48.681Z" }, + { url = "https://files.pythonhosted.org/packages/45/67/e18fb65592451a2acb76e9f2fbe14e0f47a8318b4c5430f1633851d03daa/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:eef4c2f3423810b3070ab391f85436d2f8bbfcb286ac15cbc73190b3563b1f1a", size = 4726917, upload-time = "2026-09-30T15:29:50.608Z" }, + { url = "https://files.pythonhosted.org/packages/83/28/38fdce17e60f6b825e69fc3b7f75e70a6612759980704697e1de4cbfaf6e/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:7c6d0330c472d96f6a6afe24d80dfdf15176c33096f0a4397ae4c60f3dd3be48", size = 4715341, upload-time = "2026-09-30T15:29:52.522Z" }, + { url = "https://files.pythonhosted.org/packages/b6/b1/d9121a717e0f893c64bd6ca7702614778d7df2a5c309128a002421788516/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:1ba34f04897fcdaa73f74145c25f3ec146fbd56593853e88adc2e811303c5f42", size = 4726322, upload-time = "2026-09-30T15:29:54.263Z" }, + { url = "https://files.pythonhosted.org/packages/36/8b/e6d153808bf353e152abd2fd4d8f09670d956ac78379ac46e60d7efbf04c/cryptography-50.0.2-pp311-pypy311_pp80-macosx_11_0_arm64.whl", hash = "sha256:3dc4fd8058cea1644971207d530e1a03a184a805ffc8ebdddf0599d78a331b81", size = 3873097, upload-time = "2026-09-30T15:29:56.097Z" }, + { url = "https://files.pythonhosted.org/packages/ca/1d/1271f287ff7170ddafc2aad36260c4eec20ccd2fea70f38455e9d56d427b/cryptography-50.0.2-pp311-pypy311_pp80-win_amd64.whl", hash = "sha256:7b75de3c8b3be1cdb1052747c929440c3eea46c1bc2cb8a6e3a48388e9b7b452", size = 3805376, upload-time = "2026-09-30T15:29:58.729Z" }, +] + +[[package]] +name = "deepagents" +version = "0.7.15" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "langchain" }, + { name = "langchain-anthropic" }, + { name = "langchain-core" }, + { name = "langchain-google-genai" }, + { name = "langsmith" }, + { name = "packaging" }, + { name = "wcmatch" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fc/a5/be1b210a06d1b73ab8ef5d7c80bfcd432d3405e63ffac66613ce0004807b/deepagents-0.7.15.tar.gz", hash = "sha256:bf8922e72627d577739449cc8954517e71a6b2796e8ff880d1385249365e85cf", size = 300771, upload-time = "2026-09-16T21:01:05.793Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8d/1a/86b2f25bacfb9f62221e35dfcb4ce943ffdf2fe03a5472c24ff6a7ad89d1/deepagents-0.7.15-py3-none-any.whl", hash = "sha256:49d040f5d065cb20566967465bfbf36da226f3bca839e03446e97cf3fcd02bde", size = 327865, upload-time = "2026-09-16T21:01:04.053Z" }, ] [[package]] name = "dependency-groups" -version = "1.3.1" +version = "1.3.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "packaging" }, - { name = "tomli", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/62/55/f054de99871e7beb81935dea8a10b90cd5ce42122b1c3081d5282fdb3621/dependency_groups-1.3.1.tar.gz", hash = "sha256:78078301090517fd938c19f64a53ce98c32834dfe0dee6b88004a569a6adfefd", size = 10093, upload-time = "2025-05-02T00:34:29.452Z" } +sdist = { url = "https://files.pythonhosted.org/packages/b5/16/65e61d8e837e0d70a99a0d4dd76e2af53357c3a03ed1db8ad9b5786d7f25/dependency_groups-1.3.2.tar.gz", hash = "sha256:c81831f43828dbc3987ee247eb198241a0152b8e7ceab10977cc3808eb388ac7", size = 13309, upload-time = "2026-08-22T02:43:30.137Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/99/c7/d1ec24fb280caa5a79b6b950db565dab30210a66259d17d5bb2b3a9f878d/dependency_groups-1.3.1-py3-none-any.whl", hash = "sha256:51aeaa0dfad72430fcfb7bcdbefbd75f3792e5919563077f30bc0d73f4493030", size = 8664, upload-time = "2025-05-02T00:34:27.085Z" }, + { url = "https://files.pythonhosted.org/packages/a1/e4/da5f2f176050efcfb9222a76a3e81c41f69f775be8e563b76ca4292a134f/dependency_groups-1.3.2-py3-none-any.whl", hash = "sha256:8c337f7b92445823b0d0ea507f611390c58dcd2112be00aebcd738a2ca7a1c64", size = 9802, upload-time = "2026-08-22T02:43:28.853Z" }, ] [[package]] @@ -629,86 +1137,109 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2", size = 20277, upload-time = "2023-12-24T09:54:30.421Z" }, ] +[[package]] +name = "docker" +version = "7.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pywin32", marker = "sys_platform == 'win32'" }, + { name = "requests" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/88/7f/731ff914b0255d3d065f45fd4e626d4b8c95dbcbaada049f337a6ac16410/docker-7.2.0.tar.gz", hash = "sha256:cebb93773d334f778e023a7ee352a8d6e13ab1bd3b863a4d4a59dec897df43ac", size = 118731, upload-time = "2026-07-09T14:53:46.39Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/75/23/529140fe1aab80fc6992f93a706deec709140a6397439139a054e1515c45/docker-7.2.0-py3-none-any.whl", hash = "sha256:a3f45fdeb9165e2d25d9a1d02ddf3bc70fb572cf5ebbf9b58558c22caf29b71f", size = 148775, upload-time = "2026-07-09T14:53:45.224Z" }, +] + +[[package]] +name = "docstring-parser" +version = "0.18.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e0/4d/f332313098c1de1b2d2ff91cf2674415cc7cddab2ca1b01ae29774bd5fdf/docstring_parser-0.18.0.tar.gz", hash = "sha256:292510982205c12b1248696f44959db3cdd1740237a968ea1e2e7a900eeb2015", size = 29341, upload-time = "2026-04-14T04:09:19.867Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/5f/ed01f9a3cdffbd5a008556fc7b2a08ddb1cc6ace7effa7340604b1d16699/docstring_parser-0.18.0-py3-none-any.whl", hash = "sha256:b3fcbed555c47d8479be0796ef7e19c2670d428d72e96da63f3a40122860374b", size = 22484, upload-time = "2026-04-14T04:09:18.638Z" }, +] + [[package]] name = "docutils" -version = "0.22.2" +version = "0.23" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/4a/c0/89fe6215b443b919cb98a5002e107cb5026854ed1ccb6b5833e0768419d1/docutils-0.22.2.tar.gz", hash = "sha256:9fdb771707c8784c8f2728b67cb2c691305933d68137ef95a75db5f4dfbc213d", size = 2289092, upload-time = "2025-09-20T17:55:47.994Z" } +sdist = { url = "https://files.pythonhosted.org/packages/39/a4/5180d9afc57e8fca05601dd652bdff19604c218814037fe90ffc7625a50a/docutils-0.23.tar.gz", hash = "sha256:746f5060322511280a1e50eb76846ed6bf2342984b2ac04dc42caa1a8d78799e", size = 2303823, upload-time = "2026-05-27T17:41:06.934Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/66/dd/f95350e853a4468ec37478414fc04ae2d61dad7a947b3015c3dcc51a09b9/docutils-0.22.2-py3-none-any.whl", hash = "sha256:b0e98d679283fc3bb0ead8a5da7f501baa632654e7056e9c5846842213d674d8", size = 632667, upload-time = "2025-09-20T17:55:43.052Z" }, + { url = "https://files.pythonhosted.org/packages/32/91/30151a39f7570f448ed84529390628a651d7f27c87d73c9b887f8189695e/docutils-0.23-py3-none-any.whl", hash = "sha256:25d013af9bf23bc1c7b2b093dff4208166c53a94786c9e447808335ef1185fea", size = 634701, upload-time = "2026-05-27T17:40:58.442Z" }, ] [[package]] -name = "exceptiongroup" -version = "1.3.0" +name = "execnet" +version = "2.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bf/89/780e11f9588d9e7128a3f87788354c7946a9cbb1401ad38a48c4db9a4f07/execnet-2.1.2.tar.gz", hash = "sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd", size = 166622, upload-time = "2025-11-12T09:56:37.75Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ab/84/02fc1827e8cdded4aa65baef11296a9bbe595c474f0d6d758af082d849fd/execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec", size = 40708, upload-time = "2025-11-12T09:56:36.333Z" }, +] + +[[package]] +name = "fastapi" +version = "0.141.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "annotated-doc" }, + { name = "pydantic" }, + { name = "starlette" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/36/f4/c6e662dade71f56cd2f3735141b265c3c79293c109549c1e6933b0651ffc/exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10", size = 16674, upload-time = "2025-05-10T17:42:49.33Z" }, -] - -[[package]] -name = "fastuuid" -version = "0.13.5" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/15/80/3c16a1edad2e6cd82fbd15ac998cc1b881f478bf1f80ca717d941c441874/fastuuid-0.13.5.tar.gz", hash = "sha256:d4976821ab424d41542e1ea39bc828a9d454c3f8a04067c06fca123c5b95a1a1", size = 18255, upload-time = "2025-09-26T09:05:38.281Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f0/17/f8ed7f707c1bf994ff4e38f163b367cc2060f13a8aa60b03a3c821daaf0f/fastuuid-0.13.5-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:b9edf8ee30718aee787cdd2e9e1ff3d4a3ec6ddb32fba0a23fa04956df69ab07", size = 494134, upload-time = "2025-09-26T09:14:35.852Z" }, - { url = "https://files.pythonhosted.org/packages/18/de/b03e4a083a307fb5a2c8afcfbcc6ab45578fba7996f69f329e35d18e0e67/fastuuid-0.13.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:f67ea1e25c5e782f7fb5aaa5208f157d950401dd9321ce56bcc6d4dc3d72ed60", size = 252832, upload-time = "2025-09-26T09:10:21.321Z" }, - { url = "https://files.pythonhosted.org/packages/62/65/3a8be5ce86e2a1eb3947be32512b62fcb0a360a998ba2405cd3e54e54f04/fastuuid-0.13.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9ff3fc87e1f19603dd53c38f42c2ea8d5d5462554deab69e9cf1800574e4756c", size = 244309, upload-time = "2025-09-26T09:09:08.333Z" }, - { url = "https://files.pythonhosted.org/packages/ab/eb/7b9c98d25a810fcc5f4a3e10e1e051c18e10cdad4527242e18c998fab4b1/fastuuid-0.13.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6e5337fa7698dc52bc724da7e9239e93c5b24a09f6904b8660dfb8c41ce3dee", size = 271629, upload-time = "2025-09-26T09:13:37.525Z" }, - { url = "https://files.pythonhosted.org/packages/c0/37/6331f626852c2aeea8d666af049b1337e273d11e700a26333c402d0e7a94/fastuuid-0.13.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9db596023c10dabb12489a88c51b75297c3a2478cb2be645e06905934e7b9fc", size = 272312, upload-time = "2025-09-26T09:13:05.252Z" }, - { url = "https://files.pythonhosted.org/packages/ad/d3/e4d3f3c2968689e17d5c73bd0da808d1673329d5ff3b4065db03d58f36e3/fastuuid-0.13.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:191ff6192fe53c5fc9d4d241ee1156b30a7ed6f1677b1cc2423e7ecdbc26222b", size = 291049, upload-time = "2025-09-26T09:13:31.817Z" }, - { url = "https://files.pythonhosted.org/packages/4f/4e/f27539c9b15b1947ba50907b1a83bbe905363770472c0a1c3175fb2a0ebf/fastuuid-0.13.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:348ce9f296dda701ba46d8dceeff309f90dbc75dd85080bbed2b299aa908890a", size = 453074, upload-time = "2025-09-26T09:11:42.674Z" }, - { url = "https://files.pythonhosted.org/packages/6b/5c/57cba66a8f04cd26d3118b21393a0dda221cb82ac992b9fe153b69a22a0a/fastuuid-0.13.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:46954fb644995d7fc8bbd710fbd4c65cedaa48c921c86fdbafef0229168a8c96", size = 468531, upload-time = "2025-09-26T09:10:30.626Z" }, - { url = "https://files.pythonhosted.org/packages/dc/90/dbc19dc18282b3c2264554c595901b520224efe65907c5ff5595e688ab28/fastuuid-0.13.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22da0f66041e1c10c7d465b495cc6cd8e17e080dda34b4bd5ff5240b860fbb82", size = 444933, upload-time = "2025-09-26T09:09:33.405Z" }, - { url = "https://files.pythonhosted.org/packages/5b/03/4652cc314fc5163db12bc451512b087e5b5e4f36ba513f111fd5a5ff1c07/fastuuid-0.13.5-cp310-cp310-win32.whl", hash = "sha256:3e6b548f06c1ed7bad951a17a09eef69d6f24eb2b874cb4833e26b886d82990f", size = 144981, upload-time = "2025-09-26T09:08:14.812Z" }, - { url = "https://files.pythonhosted.org/packages/8f/0b/85b3a68418911923acb8955219ab33ac728eaa9337ef0135b9e5c9d1ed9d/fastuuid-0.13.5-cp310-cp310-win_amd64.whl", hash = "sha256:c82838e52189d16b1307631179cb2cd37778dd8f4ddc00e9ce3c26f920b3b2f7", size = 150741, upload-time = "2025-09-26T09:09:00.161Z" }, - { url = "https://files.pythonhosted.org/packages/04/ab/9351bfc04ff2144115758233130b5469993d3d379323903a4634cb9c78c1/fastuuid-0.13.5-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:c122558ca4b5487e2bd0863467e4ccfe636afd1274803741487d48f2e32ea0e1", size = 493910, upload-time = "2025-09-26T09:12:36.995Z" }, - { url = "https://files.pythonhosted.org/packages/b7/ab/84fac529cc12a03d49595e70ac459380f7cb12c70f0fe401781b276f9e94/fastuuid-0.13.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d7abd42a03a17a681abddd19aa4d44ca2747138cf8a48373b395cf1341a10de2", size = 252621, upload-time = "2025-09-26T09:12:22.222Z" }, - { url = "https://files.pythonhosted.org/packages/7f/9d/f4c734d7b74a04ca695781c58a1376f07b206fe2849e58e7778d476a0e94/fastuuid-0.13.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2705cf7c2d6f7c03053404b75a4c44f872a73f6f9d5ea34f1dc6bba400c4a97c", size = 244269, upload-time = "2025-09-26T09:08:31.921Z" }, - { url = "https://files.pythonhosted.org/packages/5b/da/b42b7eb84523d69cfe9dac82950e105061c8d59f4d4d2cc3e170dbd20937/fastuuid-0.13.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d220a056fcbad25932c1f25304261198612f271f4d150b2a84e81adb877daf7", size = 271528, upload-time = "2025-09-26T09:12:42.718Z" }, - { url = "https://files.pythonhosted.org/packages/1b/45/6eee36929119e9544b0906fd6591e685d682e4b51cfad4c25d96ccf04009/fastuuid-0.13.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f29f93b5a0c5f5579f97f77d5319e9bfefd61d8678ec59d850201544faf33bf", size = 272168, upload-time = "2025-09-26T09:07:04.238Z" }, - { url = "https://files.pythonhosted.org/packages/ce/ac/75b70f13515e12194a25b0459dd8a8a33de4ab0a92142f0776d21e41ca84/fastuuid-0.13.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:399d86623fb806151b1feb9fdd818ebfc1d50387199a35f7264f98dfc1540af5", size = 290948, upload-time = "2025-09-26T09:07:53.433Z" }, - { url = "https://files.pythonhosted.org/packages/76/30/1801326a5b433aafc04eae906e6b005e8a3d1120fd996409fe88124edb06/fastuuid-0.13.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:689e8795a1edd573b2c9a455024e4edf605a9690339bba29709857f7180894ea", size = 452932, upload-time = "2025-09-26T09:09:28.017Z" }, - { url = "https://files.pythonhosted.org/packages/61/2a/080b6b2ac4ef2ead54a7463ae4162d66a52867bbd4447ad5354427b82ae2/fastuuid-0.13.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:25e82c4a1734da168b36f7308e397afbe9c9b353799a9c69563a605f11dd4641", size = 468384, upload-time = "2025-09-26T09:08:14.32Z" }, - { url = "https://files.pythonhosted.org/packages/b6/d3/4a3ffcaf8d874f7f208dad7e98ded7c5359b6599073960e3aa0530ca6139/fastuuid-0.13.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f62299e3cca69aad6a6fb37e26e45055587954d498ad98903fea24382377ea0e", size = 444815, upload-time = "2025-09-26T09:06:38.691Z" }, - { url = "https://files.pythonhosted.org/packages/9d/a0/08dd8663f7bff3e9c0b2416708b01d1fb65f52bcd4bce18760f77c4735fd/fastuuid-0.13.5-cp311-cp311-win32.whl", hash = "sha256:68227f2230381b89fb1ad362ca6e433de85c6c11c36312b41757cad47b8a8e32", size = 144897, upload-time = "2025-09-26T09:14:53.695Z" }, - { url = "https://files.pythonhosted.org/packages/9e/e2/2c2a37dcc56e2323c6214c38c8faac22f9d03d98c481f8a40843e0b9526a/fastuuid-0.13.5-cp311-cp311-win_amd64.whl", hash = "sha256:4a32306982bd031cb20d5d1a726b7b958a55babebd2300ce6c8e352d3496e931", size = 150523, upload-time = "2025-09-26T09:12:24.031Z" }, - { url = "https://files.pythonhosted.org/packages/21/36/434f137c5970cac19e57834e1f7680e85301619d49891618c00666700c61/fastuuid-0.13.5-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:35fe8045e866bc6846f8de6fa05acb1de0c32478048484a995e96d31e21dff2a", size = 494638, upload-time = "2025-09-26T09:14:58.695Z" }, - { url = "https://files.pythonhosted.org/packages/ca/3c/083de2ac007b2b305523b9c006dba5051e5afd87a626ef1a39f76e2c6b82/fastuuid-0.13.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:02a460333f52d731a006d18a52ef6fcb2d295a1f5b1a5938d30744191b2f77b7", size = 253138, upload-time = "2025-09-26T09:13:33.283Z" }, - { url = "https://files.pythonhosted.org/packages/73/5e/630cffa1c8775db526e39e9e4c5c7db0c27be0786bb21ba82c912ae19f63/fastuuid-0.13.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:74b0e4f8c307b9f477a5d7284db4431ce53a3c1e3f4173db7a97db18564a6202", size = 244521, upload-time = "2025-09-26T09:14:40.682Z" }, - { url = "https://files.pythonhosted.org/packages/4d/51/55d78705f4fbdadf88fb40f382f508d6c7a4941ceddd7825fafebb4cc778/fastuuid-0.13.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6955a99ef455c2986f3851f4e0ccc35dec56ac1a7720f2b92e88a75d6684512e", size = 271557, upload-time = "2025-09-26T09:15:09.75Z" }, - { url = "https://files.pythonhosted.org/packages/6a/2b/1b89e90a8635e5587ccdbbeb169c590672ce7637880f2c047482a0359950/fastuuid-0.13.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f10c77b826738c1a27dcdaa92ea4dc1ec9d869748a99e1fde54f1379553d4854", size = 272334, upload-time = "2025-09-26T09:07:48.865Z" }, - { url = "https://files.pythonhosted.org/packages/0c/06/4c8207894eeb30414999e5c3f66ac039bc4003437eb4060d8a1bceb4cc6f/fastuuid-0.13.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bb25dccbeb249d16d5e664f65f17ebec05136821d5ef462c4110e3f76b86fb86", size = 290594, upload-time = "2025-09-26T09:12:54.124Z" }, - { url = "https://files.pythonhosted.org/packages/50/69/96d221931a31d77a47cc2487bdfacfb3091edfc2e7a04b1795df1aec05df/fastuuid-0.13.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:a5becc646a3eeafb76ce0a6783ba190cd182e3790a8b2c78ca9db2b5e87af952", size = 452835, upload-time = "2025-09-26T09:14:00.994Z" }, - { url = "https://files.pythonhosted.org/packages/25/ef/bf045f0a47dcec96247497ef3f7a31d86ebc074330e2dccc34b8dbc0468a/fastuuid-0.13.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:69b34363752d06e9bb0dbdf02ae391ec56ac948c6f2eb00be90dad68e80774b9", size = 468225, upload-time = "2025-09-26T09:13:38.585Z" }, - { url = "https://files.pythonhosted.org/packages/30/46/4817ab5a3778927155a4bde92540d4c4fa996161ec8b8e080c8928b0984e/fastuuid-0.13.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:57d0768afcad0eab8770c9b8cf904716bd3c547e8b9a4e755ee8a673b060a3a3", size = 444907, upload-time = "2025-09-26T09:14:30.163Z" }, - { url = "https://files.pythonhosted.org/packages/80/27/ab284117ce4dc9b356a7196bdbf220510285f201d27f1f078592cdc8187b/fastuuid-0.13.5-cp312-cp312-win32.whl", hash = "sha256:8ac6c6f5129d52eaa6ef9ea4b6e2f7c69468a053f3ab8e439661186b9c06bb85", size = 145415, upload-time = "2025-09-26T09:08:59.494Z" }, - { url = "https://files.pythonhosted.org/packages/f4/0c/f970a4222773b248931819f8940800b760283216ca3dda173ed027e94bdd/fastuuid-0.13.5-cp312-cp312-win_amd64.whl", hash = "sha256:ad630e97715beefef07ec37c9c162336e500400774e2c1cbe1a0df6f80d15b9a", size = 150840, upload-time = "2025-09-26T09:13:46.115Z" }, - { url = "https://files.pythonhosted.org/packages/4f/62/74fc53f6e04a4dc5b36c34e4e679f85a4c14eec800dcdb0f2c14b5442217/fastuuid-0.13.5-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:ea17dfd35e0e91920a35d91e65e5f9c9d1985db55ac4ff2f1667a0f61189cefa", size = 494678, upload-time = "2025-09-26T09:14:30.908Z" }, - { url = "https://files.pythonhosted.org/packages/09/ba/f28b9b7045738a8bfccfb9cd6aff4b91fce2669e6b383a48b0694ee9b3ff/fastuuid-0.13.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:be6ad91e5fefbcc2a4b478858a2715e386d405834ea3ae337c3b6b95cc0e47d6", size = 253162, upload-time = "2025-09-26T09:13:35.879Z" }, - { url = "https://files.pythonhosted.org/packages/b1/18/13fac89cb4c9f0cd7e81a9154a77ecebcc95d2b03477aa91d4d50f7227ee/fastuuid-0.13.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ea6df13a306aab3e0439d58c312ff1e6f4f07f09f667579679239b4a6121f64a", size = 244546, upload-time = "2025-09-26T09:14:58.13Z" }, - { url = "https://files.pythonhosted.org/packages/04/bf/9691167804d59411cc4269841df949f6dd5e76452ab10dcfcd1dbe04c5bc/fastuuid-0.13.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2354c1996d3cf12dc2ba3752e2c4d6edc46e1a38c63893146777b1939f3062d4", size = 271528, upload-time = "2025-09-26T09:14:48.996Z" }, - { url = "https://files.pythonhosted.org/packages/a9/b5/7a75a03d1c7aa0b6d573032fcca39391f0aef7f2caabeeb45a672bc0bd3c/fastuuid-0.13.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6cf9b7469fc26d1f9b1c43ac4b192e219e85b88fdf81d71aa755a6c08c8a817", size = 272292, upload-time = "2025-09-26T09:14:42.82Z" }, - { url = "https://files.pythonhosted.org/packages/c0/db/fa0f16cbf76e6880599533af4ef01bb586949c5320612e9d884eff13e603/fastuuid-0.13.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:92ba539170097b9047551375f1ca09d8d2b4aefcc79eeae3e1c43fe49b42072e", size = 290466, upload-time = "2025-09-26T09:08:33.161Z" }, - { url = "https://files.pythonhosted.org/packages/1e/02/6b8c45bfbc8500994dd94edba7f59555f9683c4d8c9a164ae1d25d03c7c7/fastuuid-0.13.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:dbb81d05617bc2970765c1ad82db7e8716f6a2b7a361a14b83de5b9240ade448", size = 452838, upload-time = "2025-09-26T09:13:44.747Z" }, - { url = "https://files.pythonhosted.org/packages/27/12/85d95a84f265b888e8eb9f9e2b5aaf331e8be60c0a7060146364b3544b6a/fastuuid-0.13.5-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:d973bd6bf9d754d3cca874714ac0a6b22a47f239fb3d3c8687569db05aac3471", size = 468149, upload-time = "2025-09-26T09:13:18.712Z" }, - { url = "https://files.pythonhosted.org/packages/ad/da/dd9a137e9ea707e883c92470113a432233482ec9ad3e9b99c4defc4904e6/fastuuid-0.13.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e725ceef79486423f05ee657634d4b4c1ca5fb2c8a94e0708f5d6356a83f2a83", size = 444933, upload-time = "2025-09-26T09:14:09.494Z" }, - { url = "https://files.pythonhosted.org/packages/12/f4/ab363d7f4ac3989691e2dc5ae2d8391cfb0b4169e52ef7fa0ac363e936f0/fastuuid-0.13.5-cp313-cp313-win32.whl", hash = "sha256:a1c430a332ead0b2674f1ef71b17f43b8139ec5a4201182766a21f131a31e021", size = 145462, upload-time = "2025-09-26T09:14:15.105Z" }, - { url = "https://files.pythonhosted.org/packages/aa/8a/52eb77d9c294a54caa0d2d8cc9f906207aa6d916a22de963687ab6db8b86/fastuuid-0.13.5-cp313-cp313-win_amd64.whl", hash = "sha256:241fdd362fd96e6b337db62a65dd7cb3dfac20adf854573247a47510e192db6f", size = 150923, upload-time = "2025-09-26T09:13:03.923Z" }, +sdist = { url = "https://files.pythonhosted.org/packages/8a/02/91e3416a8fdd715abb903a952a6bec7cdd8d14eed55d415fc8595524c319/fastapi-0.141.1.tar.gz", hash = "sha256:e8822fc40db1e1858054d7a949a888695bc9bdce70139178e33bd2871a453ca1", size = 425799, upload-time = "2026-07-29T17:18:05.568Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/03/10388a42375ee7e4ac9b94eb2c5c569c8b5795e377e701c9ac3ad63de890/fastapi-0.141.1-py3-none-any.whl", hash = "sha256:bfb91aa2d334c61cb35ba9a116fc123b3d3df31640b801cf57a7a78ec3f603b3", size = 131954, upload-time = "2026-07-29T17:18:04.364Z" }, ] [[package]] name = "filelock" -version = "3.20.0" +version = "4.1.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/35/c8/1d457d9150ff948f2ce6ada7715e0eeebbe5d3b58a45271a1e222474bcd3/filelock-4.1.1.tar.gz", hash = "sha256:7ba0927482c5a814b0a7f391d029ccdb8010f576f0a74c0dcde1811e8bc4c1b6", size = 563430, upload-time = "2026-10-11T16:11:54.373Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d7/8b/f837f52905395ba4510fe61f753c24833fb0a9c76e21267bb9f828b664a9/filelock-4.1.1-py3-none-any.whl", hash = "sha256:3f4a557945a7b0f95efeb1f432267affe5d45ac8ddde2aed1b97ebb62382c089", size = 132460, upload-time = "2026-10-11T16:11:52.753Z" }, +] + +[[package]] +name = "filetype" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bb/29/745f7d30d47fe0f251d3ad3dc2978a23141917661998763bebb6da007eb1/filetype-1.2.0.tar.gz", hash = "sha256:66b56cd6474bf41d8c54660347d37afcc3f7d1970648de365c102ef77548aadb", size = 998020, upload-time = "2022-11-02T17:34:04.141Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/79/1b8fa1bb3568781e84c9200f951c735f3f157429f44be0495da55894d620/filetype-1.2.0-py2.py3-none-any.whl", hash = "sha256:7ce71b6880181241cf7ac8697a2f1eb6a8bd9b429f7ad6d27b8db9ba5f1c2d25", size = 19970, upload-time = "2022-11-02T17:34:01.425Z" }, +] + +[[package]] +name = "flask" +version = "3.1.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "blinker" }, + { name = "click" }, + { name = "itsdangerous" }, + { name = "jinja2" }, + { name = "markupsafe" }, + { name = "werkzeug" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/26/00/35d85dcce6c57fdc871f3867d465d780f302a175ea360f62533f12b27e2b/flask-3.1.3.tar.gz", hash = "sha256:0ef0e52b8a9cd932855379197dd8f94047b359ca0a78695144304cb45f87c9eb", size = 759004, upload-time = "2026-02-19T05:00:57.678Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7f/9c/34f6962f9b9e9c71f6e5ed806e0d0ff03c9d1b0b2340088a0cf4bce09b18/flask-3.1.3-py3-none-any.whl", hash = "sha256:f4bcbefc124291925f1a26446da31a5178f9483862233b23c0c96a20701f670c", size = 103424, upload-time = "2026-02-19T05:00:56.027Z" }, +] + +[[package]] +name = "flask-cors" +version = "6.0.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz", hash = "sha256:711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4", size = 18922, upload-time = "2025-10-08T18:03:50.056Z" } +dependencies = [ + { name = "flask" }, + { name = "werkzeug" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/47/03/4e464a50860f9adf08b5c1d3479cb8ea1f12af2aa69535c7042c6e628135/flask_cors-6.0.5.tar.gz", hash = "sha256:30c5031552cd59f620ac0c8211dac45b345d3b2df310e7721879e4f46ef9c601", size = 101386, upload-time = "2026-06-08T20:20:17.765Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/76/91/7216b27286936c16f5b4d0c530087e4a54eead683e6b0b73dd0c64844af6/filelock-3.20.0-py3-none-any.whl", hash = "sha256:339b4732ffda5cd79b13f4e2711a31b0365ce445d95d243bb996273d072546a2", size = 16054, upload-time = "2025-10-08T18:03:48.35Z" }, + { url = "https://files.pythonhosted.org/packages/49/55/5bb1a2d918e9f02f131e47a59032bae70e48050e986e941511fd737a935c/flask_cors-6.0.5-py3-none-any.whl", hash = "sha256:68fcf75693e961f3af26683b23c4b9a8fb6b64de17d20d0c37b95e8de7ab2ed8", size = 16692, upload-time = "2026-06-08T20:20:16.247Z" }, ] [[package]] @@ -717,22 +1248,6 @@ version = "1.8.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad", size = 45875, upload-time = "2025-10-06T05:38:17.865Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/83/4a/557715d5047da48d54e659203b9335be7bfaafda2c3f627b7c47e0b3aaf3/frozenlist-1.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b37f6d31b3dcea7deb5e9696e529a6aa4a898adc33db82da12e4c60a7c4d2011", size = 86230, upload-time = "2025-10-06T05:35:23.699Z" }, - { url = "https://files.pythonhosted.org/packages/a2/fb/c85f9fed3ea8fe8740e5b46a59cc141c23b842eca617da8876cfce5f760e/frozenlist-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef2b7b394f208233e471abc541cc6991f907ffd47dc72584acee3147899d6565", size = 49621, upload-time = "2025-10-06T05:35:25.341Z" }, - { url = "https://files.pythonhosted.org/packages/63/70/26ca3f06aace16f2352796b08704338d74b6d1a24ca38f2771afbb7ed915/frozenlist-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a88f062f072d1589b7b46e951698950e7da00442fc1cacbe17e19e025dc327ad", size = 49889, upload-time = "2025-10-06T05:35:26.797Z" }, - { url = "https://files.pythonhosted.org/packages/5d/ed/c7895fd2fde7f3ee70d248175f9b6cdf792fb741ab92dc59cd9ef3bd241b/frozenlist-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2", size = 219464, upload-time = "2025-10-06T05:35:28.254Z" }, - { url = "https://files.pythonhosted.org/packages/6b/83/4d587dccbfca74cb8b810472392ad62bfa100bf8108c7223eb4c4fa2f7b3/frozenlist-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:799345ab092bee59f01a915620b5d014698547afd011e691a208637312db9186", size = 221649, upload-time = "2025-10-06T05:35:29.454Z" }, - { url = "https://files.pythonhosted.org/packages/6a/c6/fd3b9cd046ec5fff9dab66831083bc2077006a874a2d3d9247dea93ddf7e/frozenlist-1.8.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c23c3ff005322a6e16f71bf8692fcf4d5a304aaafe1e262c98c6d4adc7be863e", size = 219188, upload-time = "2025-10-06T05:35:30.951Z" }, - { url = "https://files.pythonhosted.org/packages/ce/80/6693f55eb2e085fc8afb28cf611448fb5b90e98e068fa1d1b8d8e66e5c7d/frozenlist-1.8.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8a76ea0f0b9dfa06f254ee06053d93a600865b3274358ca48a352ce4f0798450", size = 231748, upload-time = "2025-10-06T05:35:32.101Z" }, - { url = "https://files.pythonhosted.org/packages/97/d6/e9459f7c5183854abd989ba384fe0cc1a0fb795a83c033f0571ec5933ca4/frozenlist-1.8.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c7366fe1418a6133d5aa824ee53d406550110984de7637d65a178010f759c6ef", size = 236351, upload-time = "2025-10-06T05:35:33.834Z" }, - { url = "https://files.pythonhosted.org/packages/97/92/24e97474b65c0262e9ecd076e826bfd1d3074adcc165a256e42e7b8a7249/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13d23a45c4cebade99340c4165bd90eeb4a56c6d8a9d8aa49568cac19a6d0dc4", size = 218767, upload-time = "2025-10-06T05:35:35.205Z" }, - { url = "https://files.pythonhosted.org/packages/ee/bf/dc394a097508f15abff383c5108cb8ad880d1f64a725ed3b90d5c2fbf0bb/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4a3408834f65da56c83528fb52ce7911484f0d1eaf7b761fc66001db1646eff", size = 235887, upload-time = "2025-10-06T05:35:36.354Z" }, - { url = "https://files.pythonhosted.org/packages/40/90/25b201b9c015dbc999a5baf475a257010471a1fa8c200c843fd4abbee725/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:42145cd2748ca39f32801dad54aeea10039da6f86e303659db90db1c4b614c8c", size = 228785, upload-time = "2025-10-06T05:35:37.949Z" }, - { url = "https://files.pythonhosted.org/packages/84/f4/b5bc148df03082f05d2dd30c089e269acdbe251ac9a9cf4e727b2dbb8a3d/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e2de870d16a7a53901e41b64ffdf26f2fbb8917b3e6ebf398098d72c5b20bd7f", size = 230312, upload-time = "2025-10-06T05:35:39.178Z" }, - { url = "https://files.pythonhosted.org/packages/db/4b/87e95b5d15097c302430e647136b7d7ab2398a702390cf4c8601975709e7/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:20e63c9493d33ee48536600d1a5c95eefc870cd71e7ab037763d1fbb89cc51e7", size = 217650, upload-time = "2025-10-06T05:35:40.377Z" }, - { url = "https://files.pythonhosted.org/packages/e5/70/78a0315d1fea97120591a83e0acd644da638c872f142fd72a6cebee825f3/frozenlist-1.8.0-cp310-cp310-win32.whl", hash = "sha256:adbeebaebae3526afc3c96fad434367cafbfd1b25d72369a9e5858453b1bb71a", size = 39659, upload-time = "2025-10-06T05:35:41.863Z" }, - { url = "https://files.pythonhosted.org/packages/66/aa/3f04523fb189a00e147e60c5b2205126118f216b0aa908035c45336e27e4/frozenlist-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:667c3777ca571e5dbeb76f331562ff98b957431df140b54c85fd4d52eea8d8f6", size = 43837, upload-time = "2025-10-06T05:35:43.205Z" }, - { url = "https://files.pythonhosted.org/packages/39/75/1135feecdd7c336938bd55b4dc3b0dfc46d85b9be12ef2628574b28de776/frozenlist-1.8.0-cp310-cp310-win_arm64.whl", hash = "sha256:80f85f0a7cc86e7a54c46d99c9e1318ff01f4687c172ede30fd52d19d1da1c8e", size = 39989, upload-time = "2025-10-06T05:35:44.596Z" }, { url = "https://files.pythonhosted.org/packages/bc/03/077f869d540370db12165c0aa51640a873fb661d8b315d1d4d67b284d7ac/frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84", size = 86912, upload-time = "2025-10-06T05:35:45.98Z" }, { url = "https://files.pythonhosted.org/packages/df/b5/7610b6bd13e4ae77b96ba85abea1c8cb249683217ef09ac9e0ae93f25a91/frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9", size = 50046, upload-time = "2025-10-06T05:35:47.009Z" }, { url = "https://files.pythonhosted.org/packages/6e/ef/0e8f1fe32f8a53dd26bdd1f9347efe0778b0fddf62789ea683f4cc7d787d/frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93", size = 50119, upload-time = "2025-10-06T05:35:48.38Z" }, @@ -833,184 +1348,226 @@ wheels = [ ] [[package]] -name = "fsspec" -version = "2025.9.0" +name = "gcloud-aio-auth" +version = "5.5.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/de/e0/bab50af11c2d75c9c4a2a26a5254573c0bd97cea152254401510950486fa/fsspec-2025.9.0.tar.gz", hash = "sha256:19fd429483d25d28b65ec68f9f4adc16c17ea2c7c7bf54ec61360d478fb19c19", size = 304847, upload-time = "2025-09-02T19:10:49.215Z" } +dependencies = [ + { name = "aiohttp" }, + { name = "chardet" }, + { name = "cryptography" }, + { name = "pyjwt" }, + { name = "tenacity" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/c9/cf630a761d4bbe4de88c52362b55dc29ca24735b1d893a6d6c5990879c47/gcloud_aio_auth-5.5.1.tar.gz", hash = "sha256:8039b9423445e6ad702649e2b73c1352dd380c884cf6401963c5065f583ed30c", size = 15765, upload-time = "2026-10-02T12:44:07.558Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/47/71/70db47e4f6ce3e5c37a607355f80da8860a33226be640226ac52cb05ef2e/fsspec-2025.9.0-py3-none-any.whl", hash = "sha256:530dc2a2af60a414a832059574df4a6e10cce927f6f4a78209390fe38955cfb7", size = 199289, upload-time = "2025-09-02T19:10:47.708Z" }, + { url = "https://files.pythonhosted.org/packages/5d/a3/2766b5e0691743d1865aafe2323c8fd343df080597f287e52292c795c2e3/gcloud_aio_auth-5.5.1-py3-none-any.whl", hash = "sha256:3f3ca5a79c176586c142a017346b88535a5ac6ec492329f9e17334216d829894", size = 18359, upload-time = "2026-10-02T12:44:08.325Z" }, ] [[package]] -name = "googleapis-common-protos" -version = "1.70.0" +name = "gcloud-aio-storage" +version = "9.6.5" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "protobuf" }, + { name = "aiofiles" }, + { name = "cryptography" }, + { name = "gcloud-aio-auth" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/39/24/33db22342cf4a2ea27c9955e6713140fedd51e8b141b5ce5260897020f1a/googleapis_common_protos-1.70.0.tar.gz", hash = "sha256:0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257", size = 145903, upload-time = "2025-04-14T10:17:02.924Z" } +sdist = { url = "https://files.pythonhosted.org/packages/15/be/528ac1d1506eaf4526c2c0039d68dec99b243d50a556cd688968d1498e1a/gcloud_aio_storage-9.6.5.tar.gz", hash = "sha256:44a9529e429d7460f1a55b49a0f77906d988ee68483513abb3c0d66dedf43abd", size = 14309, upload-time = "2026-10-02T12:59:14.278Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/86/f1/62a193f0227cf15a920390abe675f386dec35f7ae3ffe6da582d3ade42c7/googleapis_common_protos-1.70.0-py3-none-any.whl", hash = "sha256:b8bfcca8c25a2bb253e0e0b0adaf8c00773e5e6af6fd92397576680b807e0fd8", size = 294530, upload-time = "2025-04-14T10:17:01.271Z" }, + { url = "https://files.pythonhosted.org/packages/c3/7d/88c82ec77bbf867734011fa4292c69b11e27c823db3dfb55879e5dbd139f/gcloud_aio_storage-9.6.5-py3-none-any.whl", hash = "sha256:07bf233a065539bebbd1a34ce61505d6dba2b6674f23f8e0319606d2f01111ab", size = 17005, upload-time = "2026-10-02T12:59:15.309Z" }, ] [[package]] -name = "griffe" -version = "1.14.0" +name = "google-adk" +version = "2.12.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama" }, + { name = "aiosqlite" }, + { name = "authlib" }, + { name = "click" }, + { name = "cryptography" }, + { name = "fastapi" }, + { name = "google-auth", extra = ["pyopenssl"] }, + { name = "google-genai" }, + { name = "graphviz" }, + { name = "httpx" }, + { name = "jsonschema" }, + { name = "opentelemetry-api" }, + { name = "opentelemetry-sdk" }, + { name = "packaging" }, + { name = "pydantic" }, + { name = "python-dotenv" }, + { name = "python-multipart" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "starlette" }, + { name = "tenacity" }, + { name = "typing-extensions" }, + { name = "uvicorn" }, + { name = "watchdog" }, + { name = "websockets" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ec/d7/6c09dd7ce4c7837e4cdb11dce980cb45ae3cd87677298dc3b781b6bce7d3/griffe-1.14.0.tar.gz", hash = "sha256:9d2a15c1eca966d68e00517de5d69dd1bc5c9f2335ef6c1775362ba5b8651a13", size = 424684, upload-time = "2025-09-05T15:02:29.167Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a5/c7/52dcd19f95d412a60b2e42bc4fc586f48106778d03de7c250840d6a40ba1/google_adk-2.12.0.tar.gz", hash = "sha256:93dfb7ff5e27d18f96520f59939faa8a7b6c21c7908161022702a3c208a37b25", size = 4305241, upload-time = "2026-10-13T16:42:58.223Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/b1/9ff6578d789a89812ff21e4e0f80ffae20a65d5dd84e7a17873fe3b365be/griffe-1.14.0-py3-none-any.whl", hash = "sha256:0e9d52832cccf0f7188cfe585ba962d2674b241c01916d780925df34873bceb0", size = 144439, upload-time = "2025-09-05T15:02:27.511Z" }, + { url = "https://files.pythonhosted.org/packages/d3/65/3706e52bac2f8ac1328caa7da28dfff8a9086fce5004619960f91c7f7bb4/google_adk-2.12.0-py3-none-any.whl", hash = "sha256:79f89ea94ccd87e4ac8c893e81c44ed2ce5568d05406a95c1d10bcef0ce0ff5d", size = 4998446, upload-time = "2026-10-13T16:42:55.26Z" }, +] + +[package.optional-dependencies] +mcp = [ + { name = "aiohttp" }, + { name = "anyio" }, + { name = "mcp" }, ] [[package]] -name = "grpcio" -version = "1.75.1" +name = "google-auth" +version = "2.62.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cryptography" }, + { name = "pyasn1-modules" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f5/b9/4b2528f30114b106e3c3a7298ba38d85e682fd1f83fe7c4a5b77c7677082/google_auth-2.62.0.tar.gz", hash = "sha256:0bef0ce54bdf9ce226c5d66e4264413bd918141c31bbe49fb52eac882f513d69", size = 398180, upload-time = "2026-10-12T19:20:48.328Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/eb/a3/87fe9b7203ec2e56ea6a57c75e6d632eaf9487c7f7978cdad1d801bee0af/google_auth-2.62.0-py3-none-any.whl", hash = "sha256:4ff4319aeb4ad128409759d397a9fcafad126d0031d241cc0dd6b9a00b43e3f3", size = 267911, upload-time = "2026-10-12T19:20:46.355Z" }, +] + +[package.optional-dependencies] +pyopenssl = [ + { name = "cryptography" }, +] +requests = [ + { name = "requests" }, +] + +[[package]] +name = "google-genai" +version = "2.30.1" source = { registry = "https://pypi.org/simple" } dependencies = [ + { name = "anyio" }, + { name = "distro" }, + { name = "google-auth", extra = ["requests"] }, + { name = "httpx" }, + { name = "pydantic" }, + { name = "requests" }, + { name = "sniffio" }, + { name = "tenacity" }, { name = "typing-extensions" }, + { name = "websockets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/8a/76e592bca2a4ff63a8ba8025012ccae2d1a9aa1762af2278f43756045e12/google_genai-2.30.1.tar.gz", hash = "sha256:a348b28b86a98fbc8e0bea759e14ae3ac807954355df8638079715d027cd14d5", size = 736895, upload-time = "2026-10-13T14:11:18.246Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/46/28/faa7c02d87df1343aa8e51c816694a82eb37f41d0e83253e6e75a00b96ec/google_genai-2.30.1-py3-none-any.whl", hash = "sha256:1bb8961c60f7100439a45067a32764a18da0f8d0f95954ffc777d1f8225a2469", size = 1199070, upload-time = "2026-10-13T14:11:16.459Z" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9d/f7/8963848164c7604efb3a3e6ee457fdb3a469653e19002bd24742473254f8/grpcio-1.75.1.tar.gz", hash = "sha256:3e81d89ece99b9ace23a6916880baca613c03a799925afb2857887efa8b1b3d2", size = 12731327, upload-time = "2025-09-26T09:03:36.887Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/51/57/89fd829fb00a6d0bee3fbcb2c8a7aa0252d908949b6ab58bfae99d39d77e/grpcio-1.75.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:1712b5890b22547dd29f3215c5788d8fc759ce6dd0b85a6ba6e2731f2d04c088", size = 5705534, upload-time = "2025-09-26T09:00:52.225Z" }, - { url = "https://files.pythonhosted.org/packages/76/dd/2f8536e092551cf804e96bcda79ecfbc51560b214a0f5b7ebc253f0d4664/grpcio-1.75.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:8d04e101bba4b55cea9954e4aa71c24153ba6182481b487ff376da28d4ba46cf", size = 11484103, upload-time = "2025-09-26T09:00:59.457Z" }, - { url = "https://files.pythonhosted.org/packages/9a/3d/affe2fb897804c98d56361138e73786af8f4dd876b9d9851cfe6342b53c8/grpcio-1.75.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:683cfc70be0c1383449097cba637317e4737a357cfc185d887fd984206380403", size = 6289953, upload-time = "2025-09-26T09:01:03.699Z" }, - { url = "https://files.pythonhosted.org/packages/87/aa/0f40b7f47a0ff10d7e482bc3af22dac767c7ff27205915f08962d5ca87a2/grpcio-1.75.1-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:491444c081a54dcd5e6ada57314321ae526377f498d4aa09d975c3241c5b9e1c", size = 6949785, upload-time = "2025-09-26T09:01:07.504Z" }, - { url = "https://files.pythonhosted.org/packages/a5/45/b04407e44050781821c84f26df71b3f7bc469923f92f9f8bc27f1406dbcc/grpcio-1.75.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ce08d4e112d0d38487c2b631ec8723deac9bc404e9c7b1011426af50a79999e4", size = 6465708, upload-time = "2025-09-26T09:01:11.028Z" }, - { url = "https://files.pythonhosted.org/packages/09/3e/4ae3ec0a4d20dcaafbb6e597defcde06399ccdc5b342f607323f3b47f0a3/grpcio-1.75.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5a2acda37fc926ccc4547977ac3e56b1df48fe200de968e8c8421f6e3093df6c", size = 7100912, upload-time = "2025-09-26T09:01:14.393Z" }, - { url = "https://files.pythonhosted.org/packages/34/3f/a9085dab5c313bb0cb853f222d095e2477b9b8490a03634cdd8d19daa5c3/grpcio-1.75.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:745c5fe6bf05df6a04bf2d11552c7d867a2690759e7ab6b05c318a772739bd75", size = 8042497, upload-time = "2025-09-26T09:01:17.759Z" }, - { url = "https://files.pythonhosted.org/packages/c3/87/ea54eba931ab9ed3f999ba95f5d8d01a20221b664725bab2fe93e3dee848/grpcio-1.75.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:259526a7159d39e2db40d566fe3e8f8e034d0fb2db5bf9c00e09aace655a4c2b", size = 7493284, upload-time = "2025-09-26T09:01:20.896Z" }, - { url = "https://files.pythonhosted.org/packages/b7/5e/287f1bf1a998f4ac46ef45d518de3b5da08b4e86c7cb5e1108cee30b0282/grpcio-1.75.1-cp310-cp310-win32.whl", hash = "sha256:f4b29b9aabe33fed5df0a85e5f13b09ff25e2c05bd5946d25270a8bd5682dac9", size = 3950809, upload-time = "2025-09-26T09:01:23.695Z" }, - { url = "https://files.pythonhosted.org/packages/a4/a2/3cbfc06a4ec160dc77403b29ecb5cf76ae329eb63204fea6a7c715f1dfdb/grpcio-1.75.1-cp310-cp310-win_amd64.whl", hash = "sha256:cf2e760978dcce7ff7d465cbc7e276c3157eedc4c27aa6de7b594c7a295d3d61", size = 4644704, upload-time = "2025-09-26T09:01:25.763Z" }, - { url = "https://files.pythonhosted.org/packages/0c/3c/35ca9747473a306bfad0cee04504953f7098527cd112a4ab55c55af9e7bd/grpcio-1.75.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:573855ca2e58e35032aff30bfbd1ee103fbcf4472e4b28d4010757700918e326", size = 5709761, upload-time = "2025-09-26T09:01:28.528Z" }, - { url = "https://files.pythonhosted.org/packages/c9/2c/ecbcb4241e4edbe85ac2663f885726fea0e947767401288b50d8fdcb9200/grpcio-1.75.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:6a4996a2c8accc37976dc142d5991adf60733e223e5c9a2219e157dc6a8fd3a2", size = 11496691, upload-time = "2025-09-26T09:01:31.214Z" }, - { url = "https://files.pythonhosted.org/packages/81/40/bc07aee2911f0d426fa53fe636216100c31a8ea65a400894f280274cb023/grpcio-1.75.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b1ea1bbe77ecbc1be00af2769f4ae4a88ce93be57a4f3eebd91087898ed749f9", size = 6296084, upload-time = "2025-09-26T09:01:34.596Z" }, - { url = "https://files.pythonhosted.org/packages/b8/d1/10c067f6c67396cbf46448b80f27583b5e8c4b46cdfbe18a2a02c2c2f290/grpcio-1.75.1-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:e5b425aee54cc5e3e3c58f00731e8a33f5567965d478d516d35ef99fd648ab68", size = 6950403, upload-time = "2025-09-26T09:01:36.736Z" }, - { url = "https://files.pythonhosted.org/packages/3f/42/5f628abe360b84dfe8dd8f32be6b0606dc31dc04d3358eef27db791ea4d5/grpcio-1.75.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0049a7bf547dafaeeb1db17079ce79596c298bfe308fc084d023c8907a845b9a", size = 6470166, upload-time = "2025-09-26T09:01:39.474Z" }, - { url = "https://files.pythonhosted.org/packages/c3/93/a24035080251324019882ee2265cfde642d6476c0cf8eb207fc693fcebdc/grpcio-1.75.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5b8ea230c7f77c0a1a3208a04a1eda164633fb0767b4cefd65a01079b65e5b1f", size = 7107828, upload-time = "2025-09-26T09:01:41.782Z" }, - { url = "https://files.pythonhosted.org/packages/e4/f8/d18b984c1c9ba0318e3628dbbeb6af77a5007f02abc378c845070f2d3edd/grpcio-1.75.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:36990d629c3c9fb41e546414e5af52d0a7af37ce7113d9682c46d7e2919e4cca", size = 8045421, upload-time = "2025-09-26T09:01:45.835Z" }, - { url = "https://files.pythonhosted.org/packages/7e/b6/4bf9aacff45deca5eac5562547ed212556b831064da77971a4e632917da3/grpcio-1.75.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b10ad908118d38c2453ade7ff790e5bce36580c3742919007a2a78e3a1e521ca", size = 7503290, upload-time = "2025-09-26T09:01:49.28Z" }, - { url = "https://files.pythonhosted.org/packages/3b/15/d8d69d10223cb54c887a2180bd29fe5fa2aec1d4995c8821f7aa6eaf72e4/grpcio-1.75.1-cp311-cp311-win32.whl", hash = "sha256:d6be2b5ee7bea656c954dcf6aa8093c6f0e6a3ef9945c99d99fcbfc88c5c0bfe", size = 3950631, upload-time = "2025-09-26T09:01:51.23Z" }, - { url = "https://files.pythonhosted.org/packages/8a/40/7b8642d45fff6f83300c24eaac0380a840e5e7fe0e8d80afd31b99d7134e/grpcio-1.75.1-cp311-cp311-win_amd64.whl", hash = "sha256:61c692fb05956b17dd6d1ab480f7f10ad0536dba3bc8fd4e3c7263dc244ed772", size = 4646131, upload-time = "2025-09-26T09:01:53.266Z" }, - { url = "https://files.pythonhosted.org/packages/3a/81/42be79e73a50aaa20af66731c2defeb0e8c9008d9935a64dd8ea8e8c44eb/grpcio-1.75.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:7b888b33cd14085d86176b1628ad2fcbff94cfbbe7809465097aa0132e58b018", size = 5668314, upload-time = "2025-09-26T09:01:55.424Z" }, - { url = "https://files.pythonhosted.org/packages/c5/a7/3686ed15822fedc58c22f82b3a7403d9faf38d7c33de46d4de6f06e49426/grpcio-1.75.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:8775036efe4ad2085975531d221535329f5dac99b6c2a854a995456098f99546", size = 11476125, upload-time = "2025-09-26T09:01:57.927Z" }, - { url = "https://files.pythonhosted.org/packages/14/85/21c71d674f03345ab183c634ecd889d3330177e27baea8d5d247a89b6442/grpcio-1.75.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:bb658f703468d7fbb5dcc4037c65391b7dc34f808ac46ed9136c24fc5eeb041d", size = 6246335, upload-time = "2025-09-26T09:02:00.76Z" }, - { url = "https://files.pythonhosted.org/packages/fd/db/3beb661bc56a385ae4fa6b0e70f6b91ac99d47afb726fe76aaff87ebb116/grpcio-1.75.1-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:4b7177a1cdb3c51b02b0c0a256b0a72fdab719600a693e0e9037949efffb200b", size = 6916309, upload-time = "2025-09-26T09:02:02.894Z" }, - { url = "https://files.pythonhosted.org/packages/1e/9c/eda9fe57f2b84343d44c1b66cf3831c973ba29b078b16a27d4587a1fdd47/grpcio-1.75.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7d4fa6ccc3ec2e68a04f7b883d354d7fea22a34c44ce535a2f0c0049cf626ddf", size = 6435419, upload-time = "2025-09-26T09:02:05.055Z" }, - { url = "https://files.pythonhosted.org/packages/c3/b8/090c98983e0a9d602e3f919a6e2d4e470a8b489452905f9a0fa472cac059/grpcio-1.75.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3d86880ecaeb5b2f0a8afa63824de93adb8ebe4e49d0e51442532f4e08add7d6", size = 7064893, upload-time = "2025-09-26T09:02:07.275Z" }, - { url = "https://files.pythonhosted.org/packages/ec/c0/6d53d4dbbd00f8bd81571f5478d8a95528b716e0eddb4217cc7cb45aae5f/grpcio-1.75.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a8041d2f9e8a742aeae96f4b047ee44e73619f4f9d24565e84d5446c623673b6", size = 8011922, upload-time = "2025-09-26T09:02:09.527Z" }, - { url = "https://files.pythonhosted.org/packages/f2/7c/48455b2d0c5949678d6982c3e31ea4d89df4e16131b03f7d5c590811cbe9/grpcio-1.75.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3652516048bf4c314ce12be37423c79829f46efffb390ad64149a10c6071e8de", size = 7466181, upload-time = "2025-09-26T09:02:12.279Z" }, - { url = "https://files.pythonhosted.org/packages/fd/12/04a0e79081e3170b6124f8cba9b6275871276be06c156ef981033f691880/grpcio-1.75.1-cp312-cp312-win32.whl", hash = "sha256:44b62345d8403975513af88da2f3d5cc76f73ca538ba46596f92a127c2aea945", size = 3938543, upload-time = "2025-09-26T09:02:14.77Z" }, - { url = "https://files.pythonhosted.org/packages/5f/d7/11350d9d7fb5adc73d2b0ebf6ac1cc70135577701e607407fe6739a90021/grpcio-1.75.1-cp312-cp312-win_amd64.whl", hash = "sha256:b1e191c5c465fa777d4cafbaacf0c01e0d5278022082c0abbd2ee1d6454ed94d", size = 4641938, upload-time = "2025-09-26T09:02:16.927Z" }, - { url = "https://files.pythonhosted.org/packages/46/74/bac4ab9f7722164afdf263ae31ba97b8174c667153510322a5eba4194c32/grpcio-1.75.1-cp313-cp313-linux_armv7l.whl", hash = "sha256:3bed22e750d91d53d9e31e0af35a7b0b51367e974e14a4ff229db5b207647884", size = 5672779, upload-time = "2025-09-26T09:02:19.11Z" }, - { url = "https://files.pythonhosted.org/packages/a6/52/d0483cfa667cddaa294e3ab88fd2c2a6e9dc1a1928c0e5911e2e54bd5b50/grpcio-1.75.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:5b8f381eadcd6ecaa143a21e9e80a26424c76a0a9b3d546febe6648f3a36a5ac", size = 11470623, upload-time = "2025-09-26T09:02:22.117Z" }, - { url = "https://files.pythonhosted.org/packages/cf/e4/d1954dce2972e32384db6a30273275e8c8ea5a44b80347f9055589333b3f/grpcio-1.75.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5bf4001d3293e3414d0cf99ff9b1139106e57c3a66dfff0c5f60b2a6286ec133", size = 6248838, upload-time = "2025-09-26T09:02:26.426Z" }, - { url = "https://files.pythonhosted.org/packages/06/43/073363bf63826ba8077c335d797a8d026f129dc0912b69c42feaf8f0cd26/grpcio-1.75.1-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:9f82ff474103e26351dacfe8d50214e7c9322960d8d07ba7fa1d05ff981c8b2d", size = 6922663, upload-time = "2025-09-26T09:02:28.724Z" }, - { url = "https://files.pythonhosted.org/packages/c2/6f/076ac0df6c359117676cacfa8a377e2abcecec6a6599a15a672d331f6680/grpcio-1.75.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0ee119f4f88d9f75414217823d21d75bfe0e6ed40135b0cbbfc6376bc9f7757d", size = 6436149, upload-time = "2025-09-26T09:02:30.971Z" }, - { url = "https://files.pythonhosted.org/packages/6b/27/1d08824f1d573fcb1fa35ede40d6020e68a04391709939e1c6f4193b445f/grpcio-1.75.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:664eecc3abe6d916fa6cf8dd6b778e62fb264a70f3430a3180995bf2da935446", size = 7067989, upload-time = "2025-09-26T09:02:33.233Z" }, - { url = "https://files.pythonhosted.org/packages/c6/98/98594cf97b8713feb06a8cb04eeef60b4757e3e2fb91aa0d9161da769843/grpcio-1.75.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c32193fa08b2fbebf08fe08e84f8a0aad32d87c3ad42999c65e9449871b1c66e", size = 8010717, upload-time = "2025-09-26T09:02:36.011Z" }, - { url = "https://files.pythonhosted.org/packages/8c/7e/bb80b1bba03c12158f9254762cdf5cced4a9bc2e8ed51ed335915a5a06ef/grpcio-1.75.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5cebe13088b9254f6e615bcf1da9131d46cfa4e88039454aca9cb65f639bd3bc", size = 7463822, upload-time = "2025-09-26T09:02:38.26Z" }, - { url = "https://files.pythonhosted.org/packages/23/1c/1ea57fdc06927eb5640f6750c697f596f26183573069189eeaf6ef86ba2d/grpcio-1.75.1-cp313-cp313-win32.whl", hash = "sha256:4b4c678e7ed50f8ae8b8dbad15a865ee73ce12668b6aaf411bf3258b5bc3f970", size = 3938490, upload-time = "2025-09-26T09:02:40.268Z" }, - { url = "https://files.pythonhosted.org/packages/4b/24/fbb8ff1ccadfbf78ad2401c41aceaf02b0d782c084530d8871ddd69a2d49/grpcio-1.75.1-cp313-cp313-win_amd64.whl", hash = "sha256:5573f51e3f296a1bcf71e7a690c092845fb223072120f4bdb7a5b48e111def66", size = 4642538, upload-time = "2025-09-26T09:02:42.519Z" }, - { url = "https://files.pythonhosted.org/packages/f2/1b/9a0a5cecd24302b9fdbcd55d15ed6267e5f3d5b898ff9ac8cbe17ee76129/grpcio-1.75.1-cp314-cp314-linux_armv7l.whl", hash = "sha256:c05da79068dd96723793bffc8d0e64c45f316248417515f28d22204d9dae51c7", size = 5673319, upload-time = "2025-09-26T09:02:44.742Z" }, - { url = "https://files.pythonhosted.org/packages/c6/ec/9d6959429a83fbf5df8549c591a8a52bb313976f6646b79852c4884e3225/grpcio-1.75.1-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:06373a94fd16ec287116a825161dca179a0402d0c60674ceeec8c9fba344fe66", size = 11480347, upload-time = "2025-09-26T09:02:47.539Z" }, - { url = "https://files.pythonhosted.org/packages/09/7a/26da709e42c4565c3d7bf999a9569da96243ce34a8271a968dee810a7cf1/grpcio-1.75.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4484f4b7287bdaa7a5b3980f3c7224c3c622669405d20f69549f5fb956ad0421", size = 6254706, upload-time = "2025-09-26T09:02:50.4Z" }, - { url = "https://files.pythonhosted.org/packages/f1/08/dcb26a319d3725f199c97e671d904d84ee5680de57d74c566a991cfab632/grpcio-1.75.1-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:2720c239c1180eee69f7883c1d4c83fc1a495a2535b5fa322887c70bf02b16e8", size = 6922501, upload-time = "2025-09-26T09:02:52.711Z" }, - { url = "https://files.pythonhosted.org/packages/78/66/044d412c98408a5e23cb348845979a2d17a2e2b6c3c34c1ec91b920f49d0/grpcio-1.75.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:07a554fa31c668cf0e7a188678ceeca3cb8fead29bbe455352e712ec33ca701c", size = 6437492, upload-time = "2025-09-26T09:02:55.542Z" }, - { url = "https://files.pythonhosted.org/packages/4e/9d/5e3e362815152aa1afd8b26ea613effa005962f9da0eec6e0e4527e7a7d1/grpcio-1.75.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:3e71a2105210366bfc398eef7f57a664df99194f3520edb88b9c3a7e46ee0d64", size = 7081061, upload-time = "2025-09-26T09:02:58.261Z" }, - { url = "https://files.pythonhosted.org/packages/1e/1a/46615682a19e100f46e31ddba9ebc297c5a5ab9ddb47b35443ffadb8776c/grpcio-1.75.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:8679aa8a5b67976776d3c6b0521e99d1c34db8a312a12bcfd78a7085cb9b604e", size = 8010849, upload-time = "2025-09-26T09:03:00.548Z" }, - { url = "https://files.pythonhosted.org/packages/67/8e/3204b94ac30b0f675ab1c06540ab5578660dc8b690db71854d3116f20d00/grpcio-1.75.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:aad1c774f4ebf0696a7f148a56d39a3432550612597331792528895258966dc0", size = 7464478, upload-time = "2025-09-26T09:03:03.096Z" }, - { url = "https://files.pythonhosted.org/packages/b7/97/2d90652b213863b2cf466d9c1260ca7e7b67a16780431b3eb1d0420e3d5b/grpcio-1.75.1-cp314-cp314-win32.whl", hash = "sha256:62ce42d9994446b307649cb2a23335fa8e927f7ab2cbf5fcb844d6acb4d85f9c", size = 4012672, upload-time = "2025-09-26T09:03:05.477Z" }, - { url = "https://files.pythonhosted.org/packages/f9/df/e2e6e9fc1c985cd1a59e6996a05647c720fe8a03b92f5ec2d60d366c531e/grpcio-1.75.1-cp314-cp314-win_amd64.whl", hash = "sha256:f86e92275710bea3000cb79feca1762dc0ad3b27830dd1a74e82ab321d4ee464", size = 4772475, upload-time = "2025-09-26T09:03:07.661Z" }, -] - -[[package]] -name = "grpcio-tools" -version = "1.75.1" + +[[package]] +name = "googleapis-common-protos" +version = "1.75.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "grpcio" }, { name = "protobuf" }, - { name = "setuptools" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/7d/76/0cd2a2bb379275c319544a3ab613dc3cea7a167503908c1b4de55f82bd9e/grpcio_tools-1.75.1.tar.gz", hash = "sha256:bb78960cf3d58941e1fec70cbdaccf255918beed13c34112a6915a6d8facebd1", size = 5390470, upload-time = "2025-09-26T09:10:11.948Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/26/b7/7d1b0b7669f993a6a393083a876937f478ca034c283eb23baf6720d8c85a/grpcio_tools-1.75.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:ae0f04d5ec8b8e13476bf516a08fc1de4e58c6bf79f99123a6b964ca7d02c790", size = 2545419, upload-time = "2025-09-26T09:07:44.432Z" }, - { url = "https://files.pythonhosted.org/packages/3e/c0/db5d052d1ba5e859c833d1366960d784c0b44c8330012717aeaa123b6b9f/grpcio_tools-1.75.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:24a881ad7292e904fc256892b647da17d9137ef2e72faf8b7c8e515314ad1377", size = 5841650, upload-time = "2025-09-26T09:07:50.987Z" }, - { url = "https://files.pythonhosted.org/packages/af/13/ab49230ef106f2b9de156a813bc14049e6fd4fe9c26fa0cde496f0e86a09/grpcio_tools-1.75.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1b5810ace274dba12ecfac69ac32c8047c6ee0200a23274cb4885ed4187271f8", size = 2591560, upload-time = "2025-09-26T09:07:52.777Z" }, - { url = "https://files.pythonhosted.org/packages/29/fd/1fd3069fb0559c2f90d85b0fd3a73adc3f63966c6300fee01e4e52740229/grpcio_tools-1.75.1-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:ab33993288b97b1180e092fa447a8ce00fbc8c59d67b23553245b88d14fe36bb", size = 2904895, upload-time = "2025-09-26T09:07:55.002Z" }, - { url = "https://files.pythonhosted.org/packages/d6/51/e58fae40132a4589819c388333545a33a89f91b8affcac45623ace9ca659/grpcio_tools-1.75.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4cac693621043ef11d3ab2318e811d919779f8cd5011ba8e37f44c178c831d94", size = 2656151, upload-time = "2025-09-26T09:07:56.762Z" }, - { url = "https://files.pythonhosted.org/packages/39/c9/a33736c2a8ceee39991f2c9f67a426ab799c6caf09145120bae6080428d5/grpcio_tools-1.75.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a09cd5d267b296af67116fe098633ad770bc8c19831a5f3c896f65fad90c1064", size = 3105152, upload-time = "2025-09-26T09:07:58.702Z" }, - { url = "https://files.pythonhosted.org/packages/ac/71/2f09cbe321f057a47a8ae4dacf004bbe8a171fd712b8f7f689ec7b2f1c49/grpcio_tools-1.75.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:dff4bcb4d16cf9ef745c1984394ed15187e6c23d73d71377377deaf443d11358", size = 3654551, upload-time = "2025-09-26T09:08:00.87Z" }, - { url = "https://files.pythonhosted.org/packages/05/54/91481a5b96cab2a81326ab1041fd7cfc6b6ce0cd82bab14ebcdb6ed78d4e/grpcio_tools-1.75.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:16d5986b37e2a9203f85e456c7ff8705b932718021d408adfe4a79e0f4d95949", size = 3322220, upload-time = "2025-09-26T09:08:02.724Z" }, - { url = "https://files.pythonhosted.org/packages/a2/07/272955f15a35ef0069ebe17a5fc14282c6dc6690edeb4dbe6a81dd2d1efb/grpcio_tools-1.75.1-cp310-cp310-win32.whl", hash = "sha256:3fbac14998bfadc6b9140b6339dbc5f673700ebb4d45ba0c4d4fbe0ffb8559a9", size = 992986, upload-time = "2025-09-26T09:08:04.6Z" }, - { url = "https://files.pythonhosted.org/packages/16/9a/482b05c1277b3385be7e426f000efb921ce3ae76bcb8aa4f9b9f724c58d3/grpcio_tools-1.75.1-cp310-cp310-win_amd64.whl", hash = "sha256:b56e495844eb899de721eb77d9e077192bdeb40842f598481d32a8f6de3db124", size = 1157427, upload-time = "2025-09-26T09:08:06.246Z" }, - { url = "https://files.pythonhosted.org/packages/45/28/71ab934662d41ded4e451d9af0ec6f9aade3525e470fdfd10bd20e588e44/grpcio_tools-1.75.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:f0635231feb70a9d551452829943a1a5fa651283e7a300aadc22df5ea5da696f", size = 2545461, upload-time = "2025-09-26T09:08:08.514Z" }, - { url = "https://files.pythonhosted.org/packages/69/40/d90f6fdb51f51b2a518401207b3920fcfdfa996ed7bca844096f111ed839/grpcio_tools-1.75.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:626293296ef7e2d87ab1a80b81a55eef91883c65b59a97576099a28b9535100b", size = 5842958, upload-time = "2025-09-26T09:08:11.468Z" }, - { url = "https://files.pythonhosted.org/packages/b4/b7/52e6f32fd0101e3ac9c654a6441b254ba5874f146b543b20afbcb8246947/grpcio_tools-1.75.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:071339d90f1faab332ce4919c815a10b9c3ed2c09473f550f686bf9cc148579f", size = 2591669, upload-time = "2025-09-26T09:08:13.481Z" }, - { url = "https://files.pythonhosted.org/packages/0a/3c/115c59a5c0c8e9d7d99a40bac8d5e91c05b6735b3bb185265d40e9fc4346/grpcio_tools-1.75.1-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:44195f58c052fa935b78c7438c85cbcd4b273dd685028e4f6d4d7b30d47daad1", size = 2904952, upload-time = "2025-09-26T09:08:15.299Z" }, - { url = "https://files.pythonhosted.org/packages/a9/cd/d2a3583a5b1d71da88f7998f20fb5a0b6fe5bb96bb916a610c29269063b6/grpcio_tools-1.75.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:860fafdb85726029d646c99859ff7bdca5aae61b5ff038c3bd355fc1ec6b2764", size = 2656311, upload-time = "2025-09-26T09:08:17.094Z" }, - { url = "https://files.pythonhosted.org/packages/aa/09/67b9215d39add550e430c9677bd43c9a315da07ab62fa3a5f44f1cf5bb75/grpcio_tools-1.75.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4559547a0cb3d3db1b982eea87d4656036339b400f48127fef932210672fb59e", size = 3105583, upload-time = "2025-09-26T09:08:19.179Z" }, - { url = "https://files.pythonhosted.org/packages/98/d7/d400b90812470f3dc2466964e62fc03592de46b5c824c82ef5303be60167/grpcio_tools-1.75.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9af65a310807d7f36a8f7cddea142fe97d6dffba74444f38870272f2e5a3a06b", size = 3654677, upload-time = "2025-09-26T09:08:21.227Z" }, - { url = "https://files.pythonhosted.org/packages/9c/93/edf6de71b4f936b3f09461a3286db1f902c6366c5de06ef19a8c2523034a/grpcio_tools-1.75.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:8c1de31aefc0585d2f915a7cd0994d153547495b8d79c44c58048a3ede0b65be", size = 3322147, upload-time = "2025-09-26T09:08:23.08Z" }, - { url = "https://files.pythonhosted.org/packages/80/00/0f8c6204e34070e7d4f344b27e4b1b0320dfdd94574f79738a43504d182e/grpcio_tools-1.75.1-cp311-cp311-win32.whl", hash = "sha256:efaf95fcaa5d3ac1bcfe44ceed9e2512eb95b5c8c476569bdbbe2bee4b59c8a9", size = 993388, upload-time = "2025-09-26T09:08:24.708Z" }, - { url = "https://files.pythonhosted.org/packages/b0/ae/6f738154980f606293988a64ef4bb0ea2bb12029a4529464aac56fe2ab99/grpcio_tools-1.75.1-cp311-cp311-win_amd64.whl", hash = "sha256:7cefe76fc35c825f0148d60d2294a527053d0f5dd6a60352419214a8c53223c9", size = 1157907, upload-time = "2025-09-26T09:08:26.537Z" }, - { url = "https://files.pythonhosted.org/packages/ef/a7/581bb204d19a347303ed5e25b19f7d8c6365a28c242fca013d1d6d78ad7e/grpcio_tools-1.75.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:49b68936cf212052eeafa50b824e17731b78d15016b235d36e0d32199000b14c", size = 2546099, upload-time = "2025-09-26T09:08:28.794Z" }, - { url = "https://files.pythonhosted.org/packages/9f/59/ab65998eba14ff9d292c880f6a276fe7d0571bba3bb4ddf66aca1f8438b5/grpcio_tools-1.75.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:08cb6e568e58b76a2178ad3b453845ff057131fff00f634d7e15dcd015cd455b", size = 5839838, upload-time = "2025-09-26T09:08:31.038Z" }, - { url = "https://files.pythonhosted.org/packages/7e/65/7027f71069b4c1e8c7b46de8c46c297c9d28ef6ed4ea0161e8c82c75d1d0/grpcio_tools-1.75.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:168402ad29a249092673079cf46266936ec2fb18d4f854d96e9c5fa5708efa39", size = 2592916, upload-time = "2025-09-26T09:08:33.216Z" }, - { url = "https://files.pythonhosted.org/packages/0f/84/1abfb3c679b78c7fca7524031cf9de4c4c509c441b48fd26291ac16dd1af/grpcio_tools-1.75.1-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:bbae11c29fcf450730f021bfc14b12279f2f985e2e493ccc2f133108728261db", size = 2905276, upload-time = "2025-09-26T09:08:35.691Z" }, - { url = "https://files.pythonhosted.org/packages/99/cd/7f9e05f1eddccb61bc0ead1e49eb2222441957b02ed11acfcd2f795b03a8/grpcio_tools-1.75.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:38c6c7d5d4800f636ee691cd073db1606d1a6a76424ca75c9b709436c9c20439", size = 2656424, upload-time = "2025-09-26T09:08:38.255Z" }, - { url = "https://files.pythonhosted.org/packages/29/1d/8b7852771c2467728341f7b9c3ca4ebc76e4e23485c6a3e6d97a8323ad2a/grpcio_tools-1.75.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:626f6a61a8f141dde9a657775854d1c0d99509f9a2762b82aa401a635f6ec73d", size = 3108985, upload-time = "2025-09-26T09:08:40.291Z" }, - { url = "https://files.pythonhosted.org/packages/c2/6a/069da89cdf2e97e4558bfceef5b60bf0ef200c443b465e7691869006dd32/grpcio_tools-1.75.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f61a8334ae38d4f98c744a732b89527e5af339d17180e25fff0676060f8709b7", size = 3657940, upload-time = "2025-09-26T09:08:42.437Z" }, - { url = "https://files.pythonhosted.org/packages/c3/e4/ca8dae800c084beb89e2720346f70012d36dfb9df02d8eacd518c06cf4a0/grpcio_tools-1.75.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:bd0c3fb40d89a1e24a41974e77c7331e80396ab7cde39bc396a13d6b5e2a750b", size = 3324878, upload-time = "2025-09-26T09:08:45.083Z" }, - { url = "https://files.pythonhosted.org/packages/58/06/cbe923679309bf970923f4a11351ea9e485291b504d7243130fdcfdcb03f/grpcio_tools-1.75.1-cp312-cp312-win32.whl", hash = "sha256:004bc5327593eea48abd03be3188e757c3ca0039079587a6aac24275127cac20", size = 993071, upload-time = "2025-09-26T09:08:46.785Z" }, - { url = "https://files.pythonhosted.org/packages/7c/0c/84d6be007262c5d88a590082f3a1fe62d4b0eeefa10c6cdb3548f3663e80/grpcio_tools-1.75.1-cp312-cp312-win_amd64.whl", hash = "sha256:23952692160b5fe7900653dfdc9858dc78c2c42e15c27e19ee780c8917ba6028", size = 1157506, upload-time = "2025-09-26T09:08:48.844Z" }, - { url = "https://files.pythonhosted.org/packages/47/fa/624bbe1b2ccf4f6044bf3cd314fe2c35f78f702fcc2191dc65519baddca4/grpcio_tools-1.75.1-cp313-cp313-linux_armv7l.whl", hash = "sha256:ca9e116aab0ecf4365fc2980f2e8ae1b22273c3847328b9a8e05cbd14345b397", size = 2545752, upload-time = "2025-09-26T09:08:51.433Z" }, - { url = "https://files.pythonhosted.org/packages/b9/4c/6d884e2337feff0a656e395338019adecc3aa1daeae9d7e8eb54340d4207/grpcio_tools-1.75.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:9fe87a926b65eb7f41f8738b6d03677cc43185ff77a9d9b201bdb2f673f3fa1e", size = 5838163, upload-time = "2025-09-26T09:08:53.858Z" }, - { url = "https://files.pythonhosted.org/packages/d1/2a/2ba7b6911a754719643ed92ae816a7f989af2be2882b9a9e1f90f4b0e882/grpcio_tools-1.75.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:45503a6094f91b3fd31c3d9adef26ac514f102086e2a37de797e220a6791ee87", size = 2592148, upload-time = "2025-09-26T09:08:55.86Z" }, - { url = "https://files.pythonhosted.org/packages/88/db/fa613a45c3c7b00f905bd5ad3a93c73194724d0a2dd72adae3be32983343/grpcio_tools-1.75.1-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:b01b60b3de67be531a39fd869d7613fa8f178aff38c05e4d8bc2fc530fa58cb5", size = 2905215, upload-time = "2025-09-26T09:08:58.27Z" }, - { url = "https://files.pythonhosted.org/packages/d7/0c/ee4786972bb82f60e4f313bb2227c79c2cd20eb13c94c0263067923cfd12/grpcio_tools-1.75.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:09e2b9b9488735514777d44c1e4eda813122d2c87aad219f98d5d49b359a8eab", size = 2656251, upload-time = "2025-09-26T09:09:00.249Z" }, - { url = "https://files.pythonhosted.org/packages/77/f1/cc5a50658d705d0b71ff8a4fbbfcc6279d3c95731a2ef7285e13dc40e2fe/grpcio_tools-1.75.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:55e60300e62b220fabe6f062fe69f143abaeff3335f79b22b56d86254f3c3c80", size = 3108911, upload-time = "2025-09-26T09:09:02.515Z" }, - { url = "https://files.pythonhosted.org/packages/09/d8/43545f77c4918e778e90bc2c02b3462ac71cee14f29d85cdb69b089538eb/grpcio_tools-1.75.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:49ce00fcc6facbbf52bf376e55b8e08810cecd03dab0b3a2986d73117c6f6ee4", size = 3657021, upload-time = "2025-09-26T09:09:05.331Z" }, - { url = "https://files.pythonhosted.org/packages/fc/0b/2ae5925374b66bc8df5b828eff1a5f9459349c83dae1773f0aa9858707e6/grpcio_tools-1.75.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:71e95479aea868f8c8014d9dc4267f26ee75388a0d8a552e1648cfa0b53d24b4", size = 3324450, upload-time = "2025-09-26T09:09:07.867Z" }, - { url = "https://files.pythonhosted.org/packages/6e/53/9f887bacbecf892ac5b0b282477ca8cfa5b73911b04259f0d88b52e9a055/grpcio_tools-1.75.1-cp313-cp313-win32.whl", hash = "sha256:fff9d2297416eae8861e53154ccf70a19994e5935e6c8f58ebf431f81cbd8d12", size = 992434, upload-time = "2025-09-26T09:09:09.966Z" }, - { url = "https://files.pythonhosted.org/packages/a5/f0/9979d97002edffdc2a88e5f2e0dccea396dd4a6eab34fa2f705fe43eae2f/grpcio_tools-1.75.1-cp313-cp313-win_amd64.whl", hash = "sha256:1849ddd508143eb48791e81d42ddc924c554d1b4900e06775a927573a8d4267f", size = 1157069, upload-time = "2025-09-26T09:09:12.287Z" }, - { url = "https://files.pythonhosted.org/packages/a6/0b/4ff4ead293f2b016668628a240937828444094778c8037d2bbef700e9097/grpcio_tools-1.75.1-cp314-cp314-linux_armv7l.whl", hash = "sha256:f281b594489184b1f9a337cdfed1fc1ddb8428f41c4b4023de81527e90b38e1e", size = 2545868, upload-time = "2025-09-26T09:09:14.716Z" }, - { url = "https://files.pythonhosted.org/packages/0e/78/aa6bf73a18de5357c01ef87eea92150931586b25196fa4df197a37bae11d/grpcio_tools-1.75.1-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:becf8332f391abc62bf4eea488b63be063d76a7cf2ef00b2e36c617d9ee9216b", size = 5838010, upload-time = "2025-09-26T09:09:20.415Z" }, - { url = "https://files.pythonhosted.org/packages/99/65/7eaad673bc971af45e079d3b13c20d9ba9842b8788d31953e3234c2e2cee/grpcio_tools-1.75.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a08330f24e5cd7b39541882a95a8ba04ffb4df79e2984aa0cd01ed26dcdccf49", size = 2593170, upload-time = "2025-09-26T09:09:22.889Z" }, - { url = "https://files.pythonhosted.org/packages/e4/db/57e1e29e9186c7ed223ce8a9b609d3f861c4db015efb643dfe60b403c137/grpcio_tools-1.75.1-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:6bf3742bd8f102630072ed317d1496f31c454cd85ad19d37a68bd85bf9d5f8b9", size = 2905167, upload-time = "2025-09-26T09:09:25.96Z" }, - { url = "https://files.pythonhosted.org/packages/cd/7b/894f891f3cf19812192f8bbf1e0e1c958055676ecf0a5466a350730a006d/grpcio_tools-1.75.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f26028949474feb380460ce52d9d090d00023940c65236294a66c42ac5850e8b", size = 2656210, upload-time = "2025-09-26T09:09:28.786Z" }, - { url = "https://files.pythonhosted.org/packages/99/76/8e48427da93ef243c09629969c7b5a2c59dceb674b6b623c1f5fbaa5c8c5/grpcio_tools-1.75.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:1bd68fb98bf08f11b6c3210834a14eefe585bad959bdba38e78b4ae3b04ba5bd", size = 3109226, upload-time = "2025-09-26T09:09:31.307Z" }, - { url = "https://files.pythonhosted.org/packages/b3/7e/ecf71c316c2a88c2478b7c6372d0f82d05f07edbf0f31b6da613df99ec7c/grpcio_tools-1.75.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:f1496e21586193da62c3a73cd16f9c63c5b3efd68ff06dab96dbdfefa90d40bf", size = 3657139, upload-time = "2025-09-26T09:09:35.043Z" }, - { url = "https://files.pythonhosted.org/packages/6f/f3/b2613e81da2085f40a989c0601ec9efc11e8b32fcb71b1234b64a18af830/grpcio_tools-1.75.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:14a78b1e36310cdb3516cdf9ee2726107875e0b247e2439d62fc8dc38cf793c1", size = 3324513, upload-time = "2025-09-26T09:09:37.44Z" }, - { url = "https://files.pythonhosted.org/packages/9a/1f/2df4fa8634542524bc22442ffe045d41905dae62cc5dd14408b80c5ac1b8/grpcio_tools-1.75.1-cp314-cp314-win32.whl", hash = "sha256:0e6f916daf222002fb98f9a6f22de0751959e7e76a24941985cc8e43cea77b50", size = 1015283, upload-time = "2025-09-26T09:09:39.461Z" }, - { url = "https://files.pythonhosted.org/packages/23/4f/f27c973ff50486a70be53a3978b6b0244398ca170a4e19d91988b5295d92/grpcio_tools-1.75.1-cp314-cp314-win_amd64.whl", hash = "sha256:878c3b362264588c45eba57ce088755f8b2b54893d41cc4a68cdeea62996da5c", size = 1189364, upload-time = "2025-09-26T09:09:42.036Z" }, +sdist = { url = "https://files.pythonhosted.org/packages/b5/c8/f439cffde755cffa462bfbb156278fa6f9d09119719af9814b858fd4f81f/googleapis_common_protos-1.75.0.tar.gz", hash = "sha256:53a062ff3c32552fbd62c11fe23768b78e4ddf0494d5e5fd97d3f4689c75fbbd", size = 151035, upload-time = "2026-05-07T08:04:49.423Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e7/c8/e2645aa8ed02fd4c7a2f59d68783b65b1f3cbdfe39a6308e156509d1fee8/googleapis_common_protos-1.75.0-py3-none-any.whl", hash = "sha256:961ed60399c457ceb0ee8f285a84c870aabc9c6a832b9d37bb281b5bebde43ed", size = 300631, upload-time = "2026-05-07T08:03:30.345Z" }, ] [[package]] -name = "h11" -version = "0.16.0" +name = "graphql-core" +version = "3.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } +sdist = { url = "https://files.pythonhosted.org/packages/fa/90/dfade6d16a55abb45e41b215fcdc940e4f119a6ac7d87430d45d020b659f/graphql_core-3.3.0.tar.gz", hash = "sha256:fd3424e88af3f3211931c6ff96350f1cd9069cf0f1a31b9972899e35d39136b5", size = 726439, upload-time = "2026-09-27T14:50:14.57Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, + { url = "https://files.pythonhosted.org/packages/0c/13/03fb01b3581134cc30d7dd3fb8a9c429267574ace881a9e72c2f57896ee9/graphql_core-3.3.0-py3-none-any.whl", hash = "sha256:d37fac6ef4dfc3eaa5daa59dcb498d7cbb118439d240993c68fddc4cb1bade44", size = 347906, upload-time = "2026-09-27T14:50:12.905Z" }, +] + +[[package]] +name = "graphviz" +version = "0.21" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f8/b3/3ac91e9be6b761a4b30d66ff165e54439dcd48b83f4e20d644867215f6ca/graphviz-0.21.tar.gz", hash = "sha256:20743e7183be82aaaa8ad6c93f8893c923bd6658a04c32ee115edb3c8a835f78", size = 200434, upload-time = "2025-06-15T09:35:05.824Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/91/4c/e0ce1ef95d4000ebc1c11801f9b944fa5910ecc15b5e351865763d8657f8/graphviz-0.21-py3-none-any.whl", hash = "sha256:54f33de9f4f911d7e84e4191749cac8cc5653f815b06738c54db9a15ab8b1e42", size = 47300, upload-time = "2025-06-15T09:35:04.433Z" }, +] + +[[package]] +name = "griffelib" +version = "2.3.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2b/27/b55f1a5278918be765fb2fd8b20966bc72bbdd3f789f031937cceea7834a/griffelib-2.3.2.tar.gz", hash = "sha256:df00c7a0dee3d86268d76788997a1859272cb1fb7b865658e043d2c0c3d52e60", size = 234729, upload-time = "2026-10-06T09:54:37.222Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/e5/0ae74c83c1cab2c14daadf28bd0143eb14bb81503834af987b66badc7b61/griffelib-2.3.2-py3-none-any.whl", hash = "sha256:8e710afededd5607f95bf3c8ccc175ee306e7084459faf27b9f9f44ef2a7a274", size = 169420, upload-time = "2026-10-06T09:54:32.038Z" }, +] + +[[package]] +name = "grpcio" +version = "1.84.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3f/4f/4435c0aae54657258d9cfcba78598f3d9e5fe4c82ff18d78558567b90faf/grpcio-1.84.0.tar.gz", hash = "sha256:19aaf172fc2edbefccce3f6e92c5150975dbe56c45744e9e87cf72ebdf85bfbe", size = 13493876, upload-time = "2026-09-14T06:59:33.291Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2d/b9/46146728b3f4a5c7e34c17d0ab724d58b5456b116e76dc77d3ef4e79b135/grpcio-1.84.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:4aaeceeb7fa7d824c322d1ec3208c8495c88478a927295553235435fc49043ad", size = 6454572, upload-time = "2026-09-14T06:57:14.651Z" }, + { url = "https://files.pythonhosted.org/packages/e3/63/5d668b4102637410d700153fd12d6a798e3ff8308bd9dcbaeae93f191060/grpcio-1.84.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:06619ba1515e5ee69fb2a514e95dd8be05ce74cb3928d5b34f87f87c86fe3c27", size = 12359529, upload-time = "2026-09-14T06:57:17.202Z" }, + { url = "https://files.pythonhosted.org/packages/18/2a/52e29c02047a493f15a78c0502bde4d3fab7c19c7813944d367cd501811c/grpcio-1.84.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:158c1c11cfb61b4849c3caf4d52de6f5ecd376e14446feb4a90dc95a90d616f5", size = 7029927, upload-time = "2026-09-14T06:57:19.767Z" }, + { url = "https://files.pythonhosted.org/packages/0a/11/9962b313553647abb091943e0721e4a1662ecc63cdfe930abf00abcce47a/grpcio-1.84.0-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:a9383401d9f116f98cacd4eba6c505a6edb80ba65badfc8e8ed8ae64983bcc44", size = 7782268, upload-time = "2026-09-14T06:57:22.381Z" }, + { url = "https://files.pythonhosted.org/packages/e2/b7/14a9413cb7d4b2e782b4f79c81a918610caedf55138ab5916f5fdd4b002f/grpcio-1.84.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bd8ea8eb3817b226057cc1c0e7ec4b378dcda52043b972b6ff12b1152178967d", size = 7187959, upload-time = "2026-09-14T06:57:24.686Z" }, + { url = "https://files.pythonhosted.org/packages/ee/3b/6cc8e6aed8f23be40f52af341e5d4595ec3ec8d7572271a692b5c1212178/grpcio-1.84.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:756ea5c2da00fa65c930284892d2a9706828704ca3ba40b4c51c4834eb39fcfd", size = 7737554, upload-time = "2026-09-14T06:57:27.5Z" }, + { url = "https://files.pythonhosted.org/packages/3c/7e/6f61002a01802ca9675e1b3599c9b0f9f3cf168ded94ebacc02199309f88/grpcio-1.84.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:28d2609691da93051e998495108bbddd2a9f7a561253bae94828d81290f30c15", size = 8792681, upload-time = "2026-09-14T06:57:29.731Z" }, + { url = "https://files.pythonhosted.org/packages/eb/84/8bec1ae7e6732a9b435a394ddfdfffde46c2620ae0109823f7cce1a54455/grpcio-1.84.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:27b8b36200a9fbee6e120246f4a8a41657549107ef19fb2c819c4b2fd524f39a", size = 8145493, upload-time = "2026-09-14T06:57:32.672Z" }, + { url = "https://files.pythonhosted.org/packages/59/84/c8c7bd210d657288f18af06522f150f61e81ea14fd3c7c135beed697c5fd/grpcio-1.84.0-cp311-cp311-win32.whl", hash = "sha256:465eef3d17e59ad22a556fc0138f7c7c799df426734344daec42c797d49fda99", size = 4495596, upload-time = "2026-09-14T06:57:34.799Z" }, + { url = "https://files.pythonhosted.org/packages/da/1e/da99356b3b573af357d059753a47fba54f1ca1a9c0e4deccd0210cb7f4ba/grpcio-1.84.0-cp311-cp311-win_amd64.whl", hash = "sha256:f9a456bdbed52a01c9ab8423bdebab04a5363c78676edc55ab9b58bd13bdf9e1", size = 5259900, upload-time = "2026-09-14T06:57:37.067Z" }, + { url = "https://files.pythonhosted.org/packages/0a/c1/4c9a2e0e6b0aaf02781404cad2f79211f989f2c827cf672a4a48d1604d3e/grpcio-1.84.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:b5c6f20d657ae09ae4e30d9d3a21edd13f1219d58cc6f999b9d1bb63be9c1baa", size = 6415756, upload-time = "2026-09-14T06:57:39.345Z" }, + { url = "https://files.pythonhosted.org/packages/b1/57/131e7007bdee9acb77a8dbe8a16fa9fef75f88c1695242d8ee0993ac2d3d/grpcio-1.84.0-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:406583b4e8fb2282ebd392e12b963e601c1f82e07125a8c2cb5b144e7e024796", size = 12339195, upload-time = "2026-09-14T06:57:42.373Z" }, + { url = "https://files.pythonhosted.org/packages/db/d1/a7b7cda98fcab9b3d2916204a872d87371158a7a34e41768f524584fb64d/grpcio-1.84.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fbdbcd06986ede3ce584083b1dc2afe6808e8943e5cf50ad11183c03aceda25a", size = 6984468, upload-time = "2026-09-14T06:57:45.035Z" }, + { url = "https://files.pythonhosted.org/packages/19/81/c5be83e3ac9416f73c4c51fe1ea9c41a0c42fc3509e3505faa46f5046abe/grpcio-1.84.0-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:23e6e8e8a75cff88e0a793bfd3becea03a13e2763ae90c1ff573bc19ca5b429a", size = 7749432, upload-time = "2026-09-14T06:57:47.395Z" }, + { url = "https://files.pythonhosted.org/packages/a0/bf/258cd7c0a7ed92745dc93c31666d462d05b702807a689744bd49fb833bde/grpcio-1.84.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b44f0a0fc7bc6677d38cc80bca1a32814ce6c8f200fb8b3c1a61c9d77eaefbf3", size = 7156115, upload-time = "2026-09-14T06:57:49.657Z" }, + { url = "https://files.pythonhosted.org/packages/2b/4b/7f829418dbfcf91b875e55e2973f1059a95decb4f081313416317ef04ec1/grpcio-1.84.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:210e4c32f907045eb8158273e60c6ab69a3947697df6245dbda381f26c59485b", size = 7708010, upload-time = "2026-09-14T06:57:52.496Z" }, + { url = "https://files.pythonhosted.org/packages/34/f0/9932e2fec6a04205f8bf3f8f4d2020479dcdac88feb6f93822ed31bf0eba/grpcio-1.84.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a71d24f40b0cc6798feaa978c7411dc1135b7018e9fc0442db611c139bf58344", size = 8759980, upload-time = "2026-09-14T06:57:55.312Z" }, + { url = "https://files.pythonhosted.org/packages/2c/5c/b67407c6dbc480dfc0715f6eccdb1061e7c88d85f9a330a241d357a538c5/grpcio-1.84.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f6c972474ce691aca74e58d17625450cef153dc4760364cadeb167983ea6d589", size = 8124904, upload-time = "2026-09-14T06:57:58.569Z" }, + { url = "https://files.pythonhosted.org/packages/02/37/2bfdae2df8dfcfc0df619b628e0c7153ce703adae827243f44720322ccc1/grpcio-1.84.0-cp312-cp312-win32.whl", hash = "sha256:0d532ade4486dad9b302ffa4d4683d67561051c26d17c4023322845e9fa10140", size = 4478915, upload-time = "2026-09-14T06:58:00.714Z" }, + { url = "https://files.pythonhosted.org/packages/85/2c/309268b7b39f6deb2342f634841e105623a0b67982e8b10ec516782ff1c6/grpcio-1.84.0-cp312-cp312-win_amd64.whl", hash = "sha256:49717e857899f4136d7657bf5aded61ac479110a075438290923a4d86af7cd02", size = 5253534, upload-time = "2026-09-14T06:58:03.336Z" }, + { url = "https://files.pythonhosted.org/packages/5d/51/40f99701adb01d4e5316a2aaf13838da1a24d5c879cd8c95156d7c364454/grpcio-1.84.0-cp313-cp313-linux_armv7l.whl", hash = "sha256:209414080da8c20af94df1395b635da52dd57b5edc9e917e1deca0dc1c4bb55e", size = 6427619, upload-time = "2026-09-14T06:58:06.025Z" }, + { url = "https://files.pythonhosted.org/packages/c5/4b/ed8e22a1237e6b2be6ef4f221d074a5b0e0dd8a0da8c944c04aea731f0eb/grpcio-1.84.0-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:e41c3993eee896c617dbd8a505085d28b6e84a0445ed9a1f40f95808473cf678", size = 12336549, upload-time = "2026-09-14T06:58:08.583Z" }, + { url = "https://files.pythonhosted.org/packages/d3/50/00165b05cd73f45996748ea67ce9e55d08936f2fea94a7fd8541cc2d0e54/grpcio-1.84.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fff5ef3fe1bba7d6147e5f19e01e5e122ac2c076486887ddcb8d42e663400fbe", size = 6989458, upload-time = "2026-09-14T06:58:11.884Z" }, + { url = "https://files.pythonhosted.org/packages/26/38/d0486230e684d916f97429a53041db88410e662a38f2a8d09e2d90375840/grpcio-1.84.0-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:b8c62888c3e49debf37ad9773e3c02f77b0c1e811f8fb0962f2b6c3bbab5b97a", size = 7757778, upload-time = "2026-09-14T06:58:14.849Z" }, + { url = "https://files.pythonhosted.org/packages/da/56/548a643decb059ca244499c675ae2c13a15f523ba94592c2774bd80a13c1/grpcio-1.84.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:986e9751d416d7a6eaa2fecdac38da63153d63a4b340ba7d624889c490451500", size = 7159572, upload-time = "2026-09-14T06:58:17.87Z" }, + { url = "https://files.pythonhosted.org/packages/db/f5/42caac81a79ec680f1f7a8eaf7ca90d2f93936ce0c3a073141ba96757f77/grpcio-1.84.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5933a052946873d01a42119a05420d669bdca436aeba2d1851988ccb12b421c0", size = 7710547, upload-time = "2026-09-14T06:58:20.607Z" }, + { url = "https://files.pythonhosted.org/packages/57/a4/828ad990b2410fee0a55cc73aa1bf98eb5b911c54847374ef4f24b9e877b/grpcio-1.84.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:e094dd21f077af8194923fc263cad872eaa1802bb0156fd7e5ae18e99cd86715", size = 8761519, upload-time = "2026-09-14T06:58:23.875Z" }, + { url = "https://files.pythonhosted.org/packages/d5/a5/1f91af098919eaf5d80d5a61126ad9fae074e5190c25a3014ce1d8d0d890/grpcio-1.84.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:08735e3d08d24ab3132cf87e2e5dea8746cabcc7d676c2b0b7362f195feef9d9", size = 8121424, upload-time = "2026-09-14T06:58:27.006Z" }, + { url = "https://files.pythonhosted.org/packages/8c/8f/77fd4a7a913b636785479922349c4cb98d94d05d15652e556b3ca0df6663/grpcio-1.84.0-cp313-cp313-win32.whl", hash = "sha256:70bb4ce8be0c5606bec259cbd7152374470396413b7863a658a08c849e6b29ff", size = 4477974, upload-time = "2026-09-14T06:58:29.528Z" }, + { url = "https://files.pythonhosted.org/packages/d0/9a/1fa59ddbfc8898e5518d1447e46f771f387f0ed6132ad531395338e51a5c/grpcio-1.84.0-cp313-cp313-win_amd64.whl", hash = "sha256:b61692f0069b3eee2fc8a3a1b7f6c044df9e03fede6ce69b3ca832e1c39f26c5", size = 5255326, upload-time = "2026-09-14T06:58:31.781Z" }, + { url = "https://files.pythonhosted.org/packages/26/6f/e25ca89ca5b0b7b95464c907a5c21a77c0ac8c4ee1dca164c4dd8f153ddb/grpcio-1.84.0-cp314-cp314-linux_armv7l.whl", hash = "sha256:026d757df86c5b7a41de8200b9a2cda454aaa5004cb0c7e3374c66eb82f61499", size = 6428207, upload-time = "2026-09-14T06:58:34.401Z" }, + { url = "https://files.pythonhosted.org/packages/cd/b4/6b76b429f3f9b901cdbc306c81364d708bc957f847a05cbd1046cd2d05d8/grpcio-1.84.0-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:3de427b05f244ba2c2a9bdc67e7a6731c8340811524ecc4435466549f8af1d17", size = 12342420, upload-time = "2026-09-14T06:58:37.416Z" }, + { url = "https://files.pythonhosted.org/packages/af/64/ac86d638ba7f73bee0dccb608ba551d4f63adf75151f00d2c43e46d3979e/grpcio-1.84.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e90e3bdf7b5eac005fef631adae9cafde16f922def207b80a7c46b253c18ad20", size = 6998396, upload-time = "2026-09-14T06:58:40.535Z" }, + { url = "https://files.pythonhosted.org/packages/4a/65/fa12e9ec9d7ebf8cc3e81428fa9e1ca0d30d22d546ce2baa4c64bc917cbc/grpcio-1.84.0-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:e88d304f094f4937bc27ec6a435e218a084168f11ec630c8d5d39b431d08d81d", size = 7757538, upload-time = "2026-09-14T06:58:43.297Z" }, + { url = "https://files.pythonhosted.org/packages/21/d7/94240c7fae121ff1f116dcf04a3b7ee0216a06832c704310363f72638d4c/grpcio-1.84.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:57dc36a5ab0e676f5f6e171de2917fd0aef73f32a9aaf23956bfe19997a30bd1", size = 7161480, upload-time = "2026-09-14T06:58:45.939Z" }, + { url = "https://files.pythonhosted.org/packages/23/c9/7033e95d4b344969818b09185721c7608b47fc2498d97b5e4eec4995dbf3/grpcio-1.84.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:5deda5b4bf62769eb98c119cca43d40e1231e34846b19db5cdea821d446a2253", size = 7720191, upload-time = "2026-09-14T06:58:48.308Z" }, + { url = "https://files.pythonhosted.org/packages/95/22/b45df2deba81d55069076859480bae7109c9eec02bce5515c799530cc2aa/grpcio-1.84.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:9bab4cf571653a8afffb83ce21aa27b51dfe629b526b7b6adec35491fe1fc2ea", size = 8762792, upload-time = "2026-09-14T06:58:51.068Z" }, + { url = "https://files.pythonhosted.org/packages/de/c4/3e1c3d6155c16b8737cc31d5b477d6cf1fc7cdd10d58320cf0ec9b446f42/grpcio-1.84.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c5559b492007dc09b4de9b95dab05f0b5e53547aad230cf07e46c7dd017a3be5", size = 8123299, upload-time = "2026-09-14T06:58:54.332Z" }, + { url = "https://files.pythonhosted.org/packages/56/fe/f4864de5b815e5ba18858771f99381a398fac14117f89ef5291ed43d3c4e/grpcio-1.84.0-cp314-cp314-win32.whl", hash = "sha256:2c024da73b296f040b8360e60bd73a659b230093684a438da0e1260f34cc724e", size = 4562560, upload-time = "2026-09-14T06:58:56.894Z" }, + { url = "https://files.pythonhosted.org/packages/44/03/640811d4d8c84f5e603995c5a9bab725223aa472cad9ca4286c3bbf1c3e3/grpcio-1.84.0-cp314-cp314-win_amd64.whl", hash = "sha256:800b7e00d92553313c0463c200087930aa78678ec1d528193aeb50906f55989b", size = 5394092, upload-time = "2026-09-14T06:58:59.61Z" }, + { url = "https://files.pythonhosted.org/packages/4a/1a/9e3d2c9f005f680f03308fa894b1db91d4ab3f0fe65ff630c69561e91e95/grpcio-1.84.0-cp315-cp315-linux_armv7l.whl", hash = "sha256:47ecf0d9b81d981f07b61bd89eced9d2582f5eaacc3aaa36ad27f81aef70a27f", size = 6428252, upload-time = "2026-09-14T06:59:02.597Z" }, + { url = "https://files.pythonhosted.org/packages/77/34/0bc9f52ebf091311651eeab3a452fb557985604a3088cb5406f4d6df85d3/grpcio-1.84.0-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:61386101ecaa096b694d0dd278caf99a56aeec78440cc17e918eef0b50f2d567", size = 12359488, upload-time = "2026-09-14T06:59:05.646Z" }, + { url = "https://files.pythonhosted.org/packages/93/0e/c31052712f241cb6ecae9c226fabd519b7f8c64a7a40bac27e9ca0405b78/grpcio-1.84.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f6d178ba6dc8e82976c184b65fddde172d054c17237993a3e083efe4f134d55b", size = 7019339, upload-time = "2026-09-14T06:59:08.76Z" }, + { url = "https://files.pythonhosted.org/packages/55/b9/b9b33ea4f1eb4cad28833cade604febf357385b5ebb0c9c7562d020e167a/grpcio-1.84.0-cp315-cp315-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:15bb76489e337fc492685c9758e2fd4d4ab516b901ad830dc5a91987decf00be", size = 7107974, upload-time = "2026-09-14T06:59:11.568Z" }, + { url = "https://files.pythonhosted.org/packages/0e/9e/799d4c45db91bbdcd8c54b3982932dbcf3d059f7ce67dca3e8540faa1ece/grpcio-1.84.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:82da34ae4f639c73ac46e521e00c0a49bf86f717b9fb1f405f133e98731e38dc", size = 7200036, upload-time = "2026-09-14T06:59:14.401Z" }, + { url = "https://files.pythonhosted.org/packages/45/dc/dcfdd13ada41aff9098f0c2c6f260eb7debbc88b84b7e5fcbd085165427d/grpcio-1.84.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:9b73836ba0e16fcbb57c31cf6cbc2907c8d8c790b83679df454b74bd15e0be04", size = 7742281, upload-time = "2026-09-14T06:59:17.348Z" }, + { url = "https://files.pythonhosted.org/packages/55/31/75eab2ec77b80804bc5e21cec99b57598e726fca6484cd3e8920a97639d5/grpcio-1.84.0-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:42959bd50dd660ffc3f2a9bec15a6da4f9aaa0dda555d59ff2d2e80b908456a8", size = 8113629, upload-time = "2026-09-14T06:59:20.584Z" }, + { url = "https://files.pythonhosted.org/packages/34/f0/fdcf6bdc1df9ca11679a1187bef8e6b81df31a2baae69497e17344f05ea3/grpcio-1.84.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:659728f20fc7a0933ed7b1945435e31014b97ab8a5a7edcbaa70da4794aeb191", size = 8152972, upload-time = "2026-09-14T06:59:24.523Z" }, + { url = "https://files.pythonhosted.org/packages/5c/cf/6720e720bfa80fcb1ace873f66724eb3c8b03bba2fa078a30c12cab3212e/grpcio-1.84.0-cp315-cp315-win32.whl", hash = "sha256:edb6f87fc60ff438557291501b3e16c7a77c3b01a52d782cf276dccc7c5dd89c", size = 4561981, upload-time = "2026-09-14T06:59:27.275Z" }, + { url = "https://files.pythonhosted.org/packages/7f/b9/69d8a709df225bc2e06e028e9465166b174c24b3da07cc72d9a5ddc63194/grpcio-1.84.0-cp315-cp315-win_amd64.whl", hash = "sha256:4119efa6519871719ad81f33bc95ab87857dcb1c5801f30a6e592f2c41164169", size = 5394757, upload-time = "2026-09-14T06:59:30.118Z" }, ] [[package]] -name = "hf-xet" -version = "1.1.10" +name = "h11" +version = "0.16.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/74/31/feeddfce1748c4a233ec1aa5b7396161c07ae1aa9b7bdbc9a72c3c7dd768/hf_xet-1.1.10.tar.gz", hash = "sha256:408aef343800a2102374a883f283ff29068055c111f003ff840733d3b715bb97", size = 487910, upload-time = "2025-09-12T20:10:27.12Z" } +sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f7/a2/343e6d05de96908366bdc0081f2d8607d61200be2ac802769c4284cc65bd/hf_xet-1.1.10-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:686083aca1a6669bc85c21c0563551cbcdaa5cf7876a91f3d074a030b577231d", size = 2761466, upload-time = "2025-09-12T20:10:22.836Z" }, - { url = "https://files.pythonhosted.org/packages/31/f9/6215f948ac8f17566ee27af6430ea72045e0418ce757260248b483f4183b/hf_xet-1.1.10-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:71081925383b66b24eedff3013f8e6bbd41215c3338be4b94ba75fd75b21513b", size = 2623807, upload-time = "2025-09-12T20:10:21.118Z" }, - { url = "https://files.pythonhosted.org/packages/15/07/86397573efefff941e100367bbda0b21496ffcdb34db7ab51912994c32a2/hf_xet-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b6bceb6361c80c1cc42b5a7b4e3efd90e64630bcf11224dcac50ef30a47e435", size = 3186960, upload-time = "2025-09-12T20:10:19.336Z" }, - { url = "https://files.pythonhosted.org/packages/01/a7/0b2e242b918cc30e1f91980f3c4b026ff2eedaf1e2ad96933bca164b2869/hf_xet-1.1.10-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:eae7c1fc8a664e54753ffc235e11427ca61f4b0477d757cc4eb9ae374b69f09c", size = 3087167, upload-time = "2025-09-12T20:10:17.255Z" }, - { url = "https://files.pythonhosted.org/packages/4a/25/3e32ab61cc7145b11eee9d745988e2f0f4fafda81b25980eebf97d8cff15/hf_xet-1.1.10-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:0a0005fd08f002180f7a12d4e13b22be277725bc23ed0529f8add5c7a6309c06", size = 3248612, upload-time = "2025-09-12T20:10:24.093Z" }, - { url = "https://files.pythonhosted.org/packages/2c/3d/ab7109e607ed321afaa690f557a9ada6d6d164ec852fd6bf9979665dc3d6/hf_xet-1.1.10-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f900481cf6e362a6c549c61ff77468bd59d6dd082f3170a36acfef2eb6a6793f", size = 3353360, upload-time = "2025-09-12T20:10:25.563Z" }, - { url = "https://files.pythonhosted.org/packages/ee/0e/471f0a21db36e71a2f1752767ad77e92d8cde24e974e03d662931b1305ec/hf_xet-1.1.10-cp37-abi3-win_amd64.whl", hash = "sha256:5f54b19cc347c13235ae7ee98b330c26dd65ef1df47e5316ffb1e87713ca7045", size = 2804691, upload-time = "2025-09-12T20:10:28.433Z" }, + { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, ] [[package]] @@ -1026,6 +1583,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, ] +[[package]] +name = "httpcore2" +version = "2.13.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "h11", marker = "python_full_version != '3.12.*' or sys_platform != 'emscripten'" }, + { name = "truststore", marker = "python_full_version != '3.12.*' or sys_platform != 'emscripten'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cb/f3/1db7aa2bc2524062192bb0e0323969492d1883152a232fe36eea65f4e35c/httpcore2-2.13.1.tar.gz", hash = "sha256:e0aa977abe17e69a3b820a24542a6fa88702676d83880b8d194dcd18408e5103", size = 68071, upload-time = "2026-09-23T07:47:22.372Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/09/ba/a4568248771ce81957bfb7cc600264a40fbcda092391ee1c415c50be4bea/httpcore2-2.13.1-py3-none-any.whl", hash = "sha256:e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a", size = 83423, upload-time = "2026-09-23T07:47:19.365Z" }, +] + [[package]] name = "httpx" version = "0.28.1" @@ -1051,27 +1621,34 @@ wheels = [ ] [[package]] -name = "huggingface-hub" -version = "0.35.3" +name = "httpx2" +version = "2.13.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "filelock", marker = "python_full_version < '3.14'" }, - { name = "fsspec", marker = "python_full_version < '3.14'" }, - { name = "hf-xet", marker = "(python_full_version < '3.14' and platform_machine == 'aarch64') or (python_full_version < '3.14' and platform_machine == 'amd64') or (python_full_version < '3.14' and platform_machine == 'arm64') or (python_full_version < '3.14' and platform_machine == 'x86_64')" }, - { name = "packaging", marker = "python_full_version < '3.14'" }, - { name = "pyyaml", marker = "python_full_version < '3.14'" }, - { name = "requests", marker = "python_full_version < '3.14'" }, - { name = "tqdm", marker = "python_full_version < '3.14'" }, - { name = "typing-extensions", marker = "python_full_version < '3.14'" }, + { name = "anyio", marker = "sys_platform != 'emscripten'" }, + { name = "httpcore2", marker = "sys_platform != 'emscripten'" }, + { name = "httpx2-jsfetch", marker = "python_full_version >= '3.12' and sys_platform == 'emscripten'" }, + { name = "idna" }, + { name = "truststore", marker = "sys_platform != 'emscripten'" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/10/7e/a0a97de7c73671863ca6b3f61fa12518caf35db37825e43d63a70956738c/huggingface_hub-0.35.3.tar.gz", hash = "sha256:350932eaa5cc6a4747efae85126ee220e4ef1b54e29d31c3b45c5612ddf0b32a", size = 461798, upload-time = "2025-09-29T14:29:58.625Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d5/44/474bef2a0e9d90f1715d32cb98b0738695ca17ba324095fb2497ed7fbd59/httpx2-2.13.1.tar.gz", hash = "sha256:e48744a19e3af5ee48313d0ce5fe941d5422fae5705ea922a4aabf94d7800dfa", size = 100405, upload-time = "2026-09-23T07:47:23.052Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/31/a0/651f93d154cb72323358bf2bbae3e642bdb5d2f1bfc874d096f7cb159fa0/huggingface_hub-0.35.3-py3-none-any.whl", hash = "sha256:0e3a01829c19d86d03793e4577816fe3bdfc1602ac62c7fb220d593d351224ba", size = 564262, upload-time = "2025-09-29T14:29:55.813Z" }, + { url = "https://files.pythonhosted.org/packages/d8/9c/6fe8931fd9f381042a9e4c7d5a7b4cbf7016b252bec0c99a49fce42c3326/httpx2-2.13.1-py3-none-any.whl", hash = "sha256:6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4", size = 95597, upload-time = "2026-09-23T07:47:20.995Z" }, ] [[package]] -name = "hyperlink" -version = "21.0.0" +name = "httpx2-jsfetch" +version = "1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cd/c4/0e5636363151a2a1795e0a77617168b9ca438e1748ec05fc9b5687f93d64/httpx2_jsfetch-1.0.tar.gz", hash = "sha256:70a0e3eabfef7cce5ad9c629f7d01ca05e418f586646f4ddf14782e4c1454c60", size = 6872, upload-time = "2026-08-07T00:13:07.492Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9b/43/832f631d32e4f1211caa2ba368317739fe71f0b8530e4c9d15dc454bac2a/httpx2_jsfetch-1.0-py3-none-any.whl", hash = "sha256:cb916b707601e69a07721aabc8f3f6659be3a6893bc1ff5c6f9e02241df2da32", size = 6382, upload-time = "2026-08-07T00:13:06.567Z" }, +] + +[[package]] +name = "hyperlink" +version = "21.0.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "idna" }, @@ -1083,45 +1660,53 @@ wheels = [ [[package]] name = "idna" -version = "3.11" +version = "3.20" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" }, + { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, ] [[package]] name = "importlib-metadata" -version = "8.7.0" +version = "9.0.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "zipp" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz", hash = "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000", size = 56641, upload-time = "2025-04-27T15:29:01.736Z" } +sdist = { url = "https://files.pythonhosted.org/packages/6f/7e/1e7e8dc30634b93ebb3d58a3dea569ad146e656218d3960ab04f62047b29/importlib_metadata-9.0.1.tar.gz", hash = "sha256:ab830580bc0ef3db61ce8fae716389e5462b67e033018bab6d8f80ef17172f99", size = 59124, upload-time = "2026-08-28T15:30:34.646Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/20/b0/36bd937216ec521246249be3bf9855081de4c5e06a0c9b4219dbeda50373/importlib_metadata-8.7.0-py3-none-any.whl", hash = "sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd", size = 27656, upload-time = "2025-04-27T15:29:00.214Z" }, + { url = "https://files.pythonhosted.org/packages/b3/55/ecca97ae19075f1fac62def77731e7f535e6c1fb8f92ff08160c5e6dade8/importlib_metadata-9.0.1-py3-none-any.whl", hash = "sha256:bba5600596a7e21f3eef53281cf28d6a5195634d2f2b78ff9501a3272c6eaab0", size = 27920, upload-time = "2026-08-28T15:30:33.433Z" }, ] [[package]] name = "incremental" -version = "24.7.2" +version = "24.11.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "setuptools" }, - { name = "tomli", marker = "python_full_version < '3.11'" }, + { name = "packaging" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/27/87/156b374ff6578062965afe30cc57627d35234369b3336cf244b240c8d8e6/incremental-24.7.2.tar.gz", hash = "sha256:fb4f1d47ee60efe87d4f6f0ebb5f70b9760db2b2574c59c8e8912be4ebd464c9", size = 28157, upload-time = "2024-07-29T20:03:55.441Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ef/3c/82e84109e02c492f382c711c58a3dd91badda6d746def81a1465f74dc9f5/incremental-24.11.0.tar.gz", hash = "sha256:87d3480dbb083c1d736222511a8cf380012a8176c2456d01ef483242abbbcf8c", size = 24000, upload-time = "2025-11-28T02:30:17.861Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0d/38/221e5b2ae676a3938c2c1919131410c342b6efc2baffeda395dd66eeca8f/incremental-24.7.2-py3-none-any.whl", hash = "sha256:8cb2c3431530bec48ad70513931a760f446ad6c25e8333ca5d95e24b0ed7b8fe", size = 20516, upload-time = "2024-07-29T20:03:53.677Z" }, + { url = "https://files.pythonhosted.org/packages/1d/55/0f4df2a44053867ea9cbea73fc588b03c55605cd695cee0a3d86f0029cb2/incremental-24.11.0-py3-none-any.whl", hash = "sha256:a34450716b1c4341fe6676a0598e88a39e04189f4dce5dc96f656e040baa10b3", size = 21109, upload-time = "2025-11-28T02:30:16.442Z" }, ] [[package]] name = "iniconfig" -version = "2.1.0" +version = "2.3.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" } +sdist = { url = "https://files.pythonhosted.org/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960", size = 21209, upload-time = "2026-10-06T22:48:38.076Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" }, + { url = "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", size = 7552, upload-time = "2026-10-06T22:48:36.959Z" }, +] + +[[package]] +name = "itsdangerous" +version = "2.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173", size = 54410, upload-time = "2024-04-16T21:28:15.614Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef", size = 16234, upload-time = "2024-04-16T21:28:14.499Z" }, ] [[package]] @@ -1138,26 +1723,26 @@ wheels = [ [[package]] name = "jaraco-context" -version = "6.0.1" +version = "6.1.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "backports-tarfile", marker = "python_full_version < '3.12'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/df/ad/f3777b81bf0b6e7bc7514a1656d3e637b2e8e15fab2ce3235730b3e7a4e6/jaraco_context-6.0.1.tar.gz", hash = "sha256:9bae4ea555cf0b14938dc0aee7c9f32ed303aa20a3b73e7dc80111628792d1b3", size = 13912, upload-time = "2024-08-20T03:39:27.358Z" } +sdist = { url = "https://files.pythonhosted.org/packages/af/50/4763cd07e722bb6285316d390a164bc7e479db9d90daa769f22578f698b4/jaraco_context-6.1.2.tar.gz", hash = "sha256:f1a6c9d391e661cc5b8d39861ff077a7dc24dc23833ccee564b234b81c82dfe3", size = 16801, upload-time = "2026-03-20T22:13:33.922Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ff/db/0c52c4cf5e4bd9f5d7135ec7669a3a767af21b3a308e1ed3674881e52b62/jaraco.context-6.0.1-py3-none-any.whl", hash = "sha256:f797fc481b490edb305122c9181830a3a5b76d84ef6d1aef2fb9b47ab956f9e4", size = 6825, upload-time = "2024-08-20T03:39:25.966Z" }, + { url = "https://files.pythonhosted.org/packages/f2/58/bc8954bda5fcda97bd7c19be11b85f91973d67a706ed4a3aec33e7de22db/jaraco_context-6.1.2-py3-none-any.whl", hash = "sha256:bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535", size = 7871, upload-time = "2026-03-20T22:13:32.808Z" }, ] [[package]] name = "jaraco-functools" -version = "4.3.0" +version = "4.6.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "more-itertools" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f7/ed/1aa2d585304ec07262e1a83a9889880701079dde796ac7b1d1826f40c63d/jaraco_functools-4.3.0.tar.gz", hash = "sha256:cfd13ad0dd2c47a3600b439ef72d8615d482cedcff1632930d6f28924d92f294", size = 19755, upload-time = "2025-08-18T20:05:09.91Z" } +sdist = { url = "https://files.pythonhosted.org/packages/6c/1f/c23395957d41ccf27c4e535c3d334c4051e5395b3752057ba4cbaec35c56/jaraco_functools-4.6.0.tar.gz", hash = "sha256:880c577ec9720b3a052d5bc611fb9f2269b3d87902ef42440df443b88e443280", size = 20837, upload-time = "2026-07-14T01:28:02.544Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b4/09/726f168acad366b11e420df31bf1c702a54d373a83f968d94141a8c3fde0/jaraco_functools-4.3.0-py3-none-any.whl", hash = "sha256:227ff8ed6f7b8f62c56deff101545fa7543cf2c8e7b82a7c2116e672f29c26e8", size = 10408, upload-time = "2025-08-18T20:05:08.69Z" }, + { url = "https://files.pythonhosted.org/packages/02/36/ecc85bc96c273dc8a11273ed4782272975e6338d4a3e9228621175edf0e3/jaraco_functools-4.6.0-py3-none-any.whl", hash = "sha256:99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30", size = 11677, upload-time = "2026-07-14T01:28:01.59Z" }, ] [[package]] @@ -1174,7 +1759,7 @@ name = "jinja2" version = "3.1.6" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "markupsafe", marker = "python_full_version < '3.14'" }, + { name = "markupsafe" }, ] sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } wheels = [ @@ -1183,80 +1768,171 @@ wheels = [ [[package]] name = "jiter" -version = "0.11.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/9d/c0/a3bb4cc13aced219dd18191ea66e874266bd8aa7b96744e495e1c733aa2d/jiter-0.11.0.tar.gz", hash = "sha256:1d9637eaf8c1d6a63d6562f2a6e5ab3af946c66037eb1b894e8fad75422266e4", size = 167094, upload-time = "2025-09-15T09:20:38.212Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/25/21/7dd1235a19e26979be6098e87e4cced2e061752f3a40a17bbce6dea7fae1/jiter-0.11.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3893ce831e1c0094a83eeaf56c635a167d6fa8cc14393cc14298fd6fdc2a2449", size = 309875, upload-time = "2025-09-15T09:18:48.41Z" }, - { url = "https://files.pythonhosted.org/packages/71/f9/462b54708aa85b135733ccba70529dd68a18511bf367a87c5fd28676c841/jiter-0.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:25c625b9b61b5a8725267fdf867ef2e51b429687f6a4eef211f4612e95607179", size = 316505, upload-time = "2025-09-15T09:18:51.057Z" }, - { url = "https://files.pythonhosted.org/packages/bd/40/14e2eeaac6a47bff27d213834795472355fd39769272eb53cb7aa83d5aa8/jiter-0.11.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd4ca85fb6a62cf72e1c7f5e34ddef1b660ce4ed0886ec94a1ef9777d35eaa1f", size = 337613, upload-time = "2025-09-15T09:18:52.358Z" }, - { url = "https://files.pythonhosted.org/packages/d3/ed/a5f1f8419c92b150a7c7fb5ccba1fb1e192887ad713d780e70874f0ce996/jiter-0.11.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:572208127034725e79c28437b82414028c3562335f2b4f451d98136d0fc5f9cd", size = 361438, upload-time = "2025-09-15T09:18:54.637Z" }, - { url = "https://files.pythonhosted.org/packages/dd/f5/70682c023dfcdd463a53faf5d30205a7d99c51d70d3e303c932d0936e5a2/jiter-0.11.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:494ba627c7f550ad3dabb21862864b8f2216098dc18ff62f37b37796f2f7c325", size = 486180, upload-time = "2025-09-15T09:18:56.158Z" }, - { url = "https://files.pythonhosted.org/packages/7c/39/020d08cbab4eab48142ad88b837c41eb08a15c0767fdb7c0d3265128a44b/jiter-0.11.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b8da18a99f58bca3ecc2d2bba99cac000a924e115b6c4f0a2b98f752b6fbf39a", size = 376681, upload-time = "2025-09-15T09:18:57.553Z" }, - { url = "https://files.pythonhosted.org/packages/52/10/b86733f6e594cf51dd142f37c602d8df87c554c5844958deaab0de30eb5d/jiter-0.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4ffd3b0fff3fabbb02cc09910c08144db6bb5697a98d227a074401e01ee63dd", size = 348685, upload-time = "2025-09-15T09:18:59.208Z" }, - { url = "https://files.pythonhosted.org/packages/fb/ee/8861665e83a9e703aa5f65fddddb6225428e163e6b0baa95a7f9a8fb9aae/jiter-0.11.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8fe6530aa738a4f7d4e4702aa8f9581425d04036a5f9e25af65ebe1f708f23be", size = 385573, upload-time = "2025-09-15T09:19:00.593Z" }, - { url = "https://files.pythonhosted.org/packages/25/74/05afec03600951f128293813b5a208c9ba1bf587c57a344c05a42a69e1b1/jiter-0.11.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e35d66681c133a03d7e974e7eedae89720fe8ca3bd09f01a4909b86a8adf31f5", size = 516669, upload-time = "2025-09-15T09:19:02.369Z" }, - { url = "https://files.pythonhosted.org/packages/93/d1/2e5bfe147cfbc2a5eef7f73eb75dc5c6669da4fa10fc7937181d93af9495/jiter-0.11.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c59459beca2fbc9718b6f1acb7bfb59ebc3eb4294fa4d40e9cb679dafdcc6c60", size = 508767, upload-time = "2025-09-15T09:19:04.011Z" }, - { url = "https://files.pythonhosted.org/packages/87/50/597f71307e10426b5c082fd05d38c615ddbdd08c3348d8502963307f0652/jiter-0.11.0-cp310-cp310-win32.whl", hash = "sha256:b7b0178417b0dcfc5f259edbc6db2b1f5896093ed9035ee7bab0f2be8854726d", size = 205476, upload-time = "2025-09-15T09:19:05.594Z" }, - { url = "https://files.pythonhosted.org/packages/c7/86/1e5214b3272e311754da26e63edec93a183811d4fc2e0118addec365df8b/jiter-0.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:11df2bf99fb4754abddd7f5d940a48e51f9d11624d6313ca4314145fcad347f0", size = 204708, upload-time = "2025-09-15T09:19:06.955Z" }, - { url = "https://files.pythonhosted.org/packages/38/55/a69fefeef09c2eaabae44b935a1aa81517e49639c0a0c25d861cb18cd7ac/jiter-0.11.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:cb5d9db02979c3f49071fce51a48f4b4e4cf574175fb2b11c7a535fa4867b222", size = 309503, upload-time = "2025-09-15T09:19:08.191Z" }, - { url = "https://files.pythonhosted.org/packages/bd/d5/a6aba9e6551f32f9c127184f398208e4eddb96c59ac065c8a92056089d28/jiter-0.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1dc6a123f3471c4730db7ca8ba75f1bb3dcb6faeb8d46dd781083e7dee88b32d", size = 317688, upload-time = "2025-09-15T09:19:09.918Z" }, - { url = "https://files.pythonhosted.org/packages/bb/f3/5e86f57c1883971cdc8535d0429c2787bf734840a231da30a3be12850562/jiter-0.11.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09858f8d230f031c7b8e557429102bf050eea29c77ad9c34c8fe253c5329acb7", size = 337418, upload-time = "2025-09-15T09:19:11.078Z" }, - { url = "https://files.pythonhosted.org/packages/5e/4f/a71d8a24c2a70664970574a8e0b766663f5ef788f7fe1cc20ee0c016d488/jiter-0.11.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dbe2196c4a0ce760925a74ab4456bf644748ab0979762139626ad138f6dac72d", size = 361423, upload-time = "2025-09-15T09:19:13.286Z" }, - { url = "https://files.pythonhosted.org/packages/8f/e5/b09076f4e7fd9471b91e16f9f3dc7330b161b738f3b39b2c37054a36e26a/jiter-0.11.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5beb56d22b63647bafd0b74979216fdee80c580c0c63410be8c11053860ffd09", size = 486367, upload-time = "2025-09-15T09:19:14.546Z" }, - { url = "https://files.pythonhosted.org/packages/fb/f1/98cb3a36f5e62f80cd860f0179f948d9eab5a316d55d3e1bab98d9767af5/jiter-0.11.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97025d09ef549795d8dc720a824312cee3253c890ac73c621721ddfc75066789", size = 376335, upload-time = "2025-09-15T09:19:15.939Z" }, - { url = "https://files.pythonhosted.org/packages/9f/d8/ec74886497ea393c29dbd7651ddecc1899e86404a6b1f84a3ddab0ab59fd/jiter-0.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d50880a6da65d8c23a2cf53c412847d9757e74cc9a3b95c5704a1d1a24667347", size = 348981, upload-time = "2025-09-15T09:19:17.568Z" }, - { url = "https://files.pythonhosted.org/packages/24/93/d22ad7fa3b86ade66c86153ceea73094fc2af8b20c59cb7fceab9fea4704/jiter-0.11.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:452d80a1c86c095a242007bd9fc5d21b8a8442307193378f891cb8727e469648", size = 385797, upload-time = "2025-09-15T09:19:19.121Z" }, - { url = "https://files.pythonhosted.org/packages/c8/bd/e25ff4a4df226e9b885f7cb01ee4b9dc74e3000e612d6f723860d71a1f34/jiter-0.11.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e84e58198d4894668eec2da660ffff60e0f3e60afa790ecc50cb12b0e02ca1d4", size = 516597, upload-time = "2025-09-15T09:19:20.301Z" }, - { url = "https://files.pythonhosted.org/packages/be/fb/beda613db7d93ffa2fdd2683f90f2f5dce8daf4bc2d0d2829e7de35308c6/jiter-0.11.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:df64edcfc5dd5279a791eea52aa113d432c933119a025b0b5739f90d2e4e75f1", size = 508853, upload-time = "2025-09-15T09:19:22.075Z" }, - { url = "https://files.pythonhosted.org/packages/20/64/c5b0d93490634e41e38e2a15de5d54fdbd2c9f64a19abb0f95305b63373c/jiter-0.11.0-cp311-cp311-win32.whl", hash = "sha256:144fc21337d21b1d048f7f44bf70881e1586401d405ed3a98c95a114a9994982", size = 205140, upload-time = "2025-09-15T09:19:23.351Z" }, - { url = "https://files.pythonhosted.org/packages/a1/e6/c347c0e6f5796e97d4356b7e5ff0ce336498b7f4ef848fae621a56f1ccf3/jiter-0.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:b0f32e644d241293b892b1a6dd8f0b9cc029bfd94c97376b2681c36548aabab7", size = 204311, upload-time = "2025-09-15T09:19:24.591Z" }, - { url = "https://files.pythonhosted.org/packages/ba/b5/3009b112b8f673e568ef79af9863d8309a15f0a8cdcc06ed6092051f377e/jiter-0.11.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:2fb7b377688cc3850bbe5c192a6bd493562a0bc50cbc8b047316428fbae00ada", size = 305510, upload-time = "2025-09-15T09:19:25.893Z" }, - { url = "https://files.pythonhosted.org/packages/fe/82/15514244e03b9e71e086bbe2a6de3e4616b48f07d5f834200c873956fb8c/jiter-0.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a1b7cbe3f25bd0d8abb468ba4302a5d45617ee61b2a7a638f63fee1dc086be99", size = 316521, upload-time = "2025-09-15T09:19:27.525Z" }, - { url = "https://files.pythonhosted.org/packages/92/94/7a2e905f40ad2d6d660e00b68d818f9e29fb87ffe82774f06191e93cbe4a/jiter-0.11.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c0a7f0ec81d5b7588c5cade1eb1925b91436ae6726dc2df2348524aeabad5de6", size = 338214, upload-time = "2025-09-15T09:19:28.727Z" }, - { url = "https://files.pythonhosted.org/packages/a8/9c/5791ed5bdc76f12110158d3316a7a3ec0b1413d018b41c5ed399549d3ad5/jiter-0.11.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07630bb46ea2a6b9c6ed986c6e17e35b26148cce2c535454b26ee3f0e8dcaba1", size = 361280, upload-time = "2025-09-15T09:19:30.013Z" }, - { url = "https://files.pythonhosted.org/packages/d4/7f/b7d82d77ff0d2cb06424141000176b53a9e6b16a1125525bb51ea4990c2e/jiter-0.11.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7764f27d28cd4a9cbc61704dfcd80c903ce3aad106a37902d3270cd6673d17f4", size = 487895, upload-time = "2025-09-15T09:19:31.424Z" }, - { url = "https://files.pythonhosted.org/packages/42/44/10a1475d46f1fc1fd5cc2e82c58e7bca0ce5852208e0fa5df2f949353321/jiter-0.11.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1d4a6c4a737d486f77f842aeb22807edecb4a9417e6700c7b981e16d34ba7c72", size = 378421, upload-time = "2025-09-15T09:19:32.746Z" }, - { url = "https://files.pythonhosted.org/packages/9a/5f/0dc34563d8164d31d07bc09d141d3da08157a68dcd1f9b886fa4e917805b/jiter-0.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf408d2a0abd919b60de8c2e7bc5eeab72d4dafd18784152acc7c9adc3291591", size = 347932, upload-time = "2025-09-15T09:19:34.612Z" }, - { url = "https://files.pythonhosted.org/packages/f7/de/b68f32a4fcb7b4a682b37c73a0e5dae32180140cd1caf11aef6ad40ddbf2/jiter-0.11.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cdef53eda7d18e799625023e1e250dbc18fbc275153039b873ec74d7e8883e09", size = 386959, upload-time = "2025-09-15T09:19:35.994Z" }, - { url = "https://files.pythonhosted.org/packages/76/0a/c08c92e713b6e28972a846a81ce374883dac2f78ec6f39a0dad9f2339c3a/jiter-0.11.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:53933a38ef7b551dd9c7f1064f9d7bb235bb3168d0fa5f14f0798d1b7ea0d9c5", size = 517187, upload-time = "2025-09-15T09:19:37.426Z" }, - { url = "https://files.pythonhosted.org/packages/89/b5/4a283bec43b15aad54fcae18d951f06a2ec3f78db5708d3b59a48e9c3fbd/jiter-0.11.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:11840d2324c9ab5162fc1abba23bc922124fedcff0d7b7f85fffa291e2f69206", size = 509461, upload-time = "2025-09-15T09:19:38.761Z" }, - { url = "https://files.pythonhosted.org/packages/34/a5/f8bad793010534ea73c985caaeef8cc22dfb1fedb15220ecdf15c623c07a/jiter-0.11.0-cp312-cp312-win32.whl", hash = "sha256:4f01a744d24a5f2bb4a11657a1b27b61dc038ae2e674621a74020406e08f749b", size = 206664, upload-time = "2025-09-15T09:19:40.096Z" }, - { url = "https://files.pythonhosted.org/packages/ed/42/5823ec2b1469395a160b4bf5f14326b4a098f3b6898fbd327366789fa5d3/jiter-0.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:29fff31190ab3a26de026da2f187814f4b9c6695361e20a9ac2123e4d4378a4c", size = 203520, upload-time = "2025-09-15T09:19:41.798Z" }, - { url = "https://files.pythonhosted.org/packages/97/c4/d530e514d0f4f29b2b68145e7b389cbc7cac7f9c8c23df43b04d3d10fa3e/jiter-0.11.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:4441a91b80a80249f9a6452c14b2c24708f139f64de959943dfeaa6cb915e8eb", size = 305021, upload-time = "2025-09-15T09:19:43.523Z" }, - { url = "https://files.pythonhosted.org/packages/7a/77/796a19c567c5734cbfc736a6f987affc0d5f240af8e12063c0fb93990ffa/jiter-0.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ff85fc6d2a431251ad82dbd1ea953affb5a60376b62e7d6809c5cd058bb39471", size = 314384, upload-time = "2025-09-15T09:19:44.849Z" }, - { url = "https://files.pythonhosted.org/packages/14/9c/824334de0b037b91b6f3fa9fe5a191c83977c7ec4abe17795d3cb6d174cf/jiter-0.11.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5e86126d64706fd28dfc46f910d496923c6f95b395138c02d0e252947f452bd", size = 337389, upload-time = "2025-09-15T09:19:46.094Z" }, - { url = "https://files.pythonhosted.org/packages/a2/95/ed4feab69e6cf9b2176ea29d4ef9d01a01db210a3a2c8a31a44ecdc68c38/jiter-0.11.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4ad8bd82165961867a10f52010590ce0b7a8c53da5ddd8bbb62fef68c181b921", size = 360519, upload-time = "2025-09-15T09:19:47.494Z" }, - { url = "https://files.pythonhosted.org/packages/b5/0c/2ad00f38d3e583caba3909d95b7da1c3a7cd82c0aa81ff4317a8016fb581/jiter-0.11.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b42c2cd74273455ce439fd9528db0c6e84b5623cb74572305bdd9f2f2961d3df", size = 487198, upload-time = "2025-09-15T09:19:49.116Z" }, - { url = "https://files.pythonhosted.org/packages/ea/8b/919b64cf3499b79bdfba6036da7b0cac5d62d5c75a28fb45bad7819e22f0/jiter-0.11.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f0062dab98172dd0599fcdbf90214d0dcde070b1ff38a00cc1b90e111f071982", size = 377835, upload-time = "2025-09-15T09:19:50.468Z" }, - { url = "https://files.pythonhosted.org/packages/29/7f/8ebe15b6e0a8026b0d286c083b553779b4dd63db35b43a3f171b544de91d/jiter-0.11.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb948402821bc76d1f6ef0f9e19b816f9b09f8577844ba7140f0b6afe994bc64", size = 347655, upload-time = "2025-09-15T09:19:51.726Z" }, - { url = "https://files.pythonhosted.org/packages/8e/64/332127cef7e94ac75719dda07b9a472af6158ba819088d87f17f3226a769/jiter-0.11.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:25a5b1110cca7329fd0daf5060faa1234be5c11e988948e4f1a1923b6a457fe1", size = 386135, upload-time = "2025-09-15T09:19:53.075Z" }, - { url = "https://files.pythonhosted.org/packages/20/c8/557b63527442f84c14774159948262a9d4fabb0d61166f11568f22fc60d2/jiter-0.11.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:bf11807e802a214daf6c485037778843fadd3e2ec29377ae17e0706ec1a25758", size = 516063, upload-time = "2025-09-15T09:19:54.447Z" }, - { url = "https://files.pythonhosted.org/packages/86/13/4164c819df4a43cdc8047f9a42880f0ceef5afeb22e8b9675c0528ebdccd/jiter-0.11.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:dbb57da40631c267861dd0090461222060960012d70fd6e4c799b0f62d0ba166", size = 508139, upload-time = "2025-09-15T09:19:55.764Z" }, - { url = "https://files.pythonhosted.org/packages/fa/70/6e06929b401b331d41ddb4afb9f91cd1168218e3371972f0afa51c9f3c31/jiter-0.11.0-cp313-cp313-win32.whl", hash = "sha256:8e36924dad32c48d3c5e188d169e71dc6e84d6cb8dedefea089de5739d1d2f80", size = 206369, upload-time = "2025-09-15T09:19:57.048Z" }, - { url = "https://files.pythonhosted.org/packages/f4/0d/8185b8e15de6dce24f6afae63380e16377dd75686d56007baa4f29723ea1/jiter-0.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:452d13e4fd59698408087235259cebe67d9d49173b4dacb3e8d35ce4acf385d6", size = 202538, upload-time = "2025-09-15T09:19:58.35Z" }, - { url = "https://files.pythonhosted.org/packages/13/3a/d61707803260d59520721fa326babfae25e9573a88d8b7b9cb54c5423a59/jiter-0.11.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:089f9df9f69532d1339e83142438668f52c97cd22ee2d1195551c2b1a9e6cf33", size = 313737, upload-time = "2025-09-15T09:19:59.638Z" }, - { url = "https://files.pythonhosted.org/packages/cd/cc/c9f0eec5d00f2a1da89f6bdfac12b8afdf8d5ad974184863c75060026457/jiter-0.11.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:29ed1fe69a8c69bf0f2a962d8d706c7b89b50f1332cd6b9fbda014f60bd03a03", size = 346183, upload-time = "2025-09-15T09:20:01.442Z" }, - { url = "https://files.pythonhosted.org/packages/a6/87/fc632776344e7aabbab05a95a0075476f418c5d29ab0f2eec672b7a1f0ac/jiter-0.11.0-cp313-cp313t-win_amd64.whl", hash = "sha256:a4d71d7ea6ea8786291423fe209acf6f8d398a0759d03e7f24094acb8ab686ba", size = 204225, upload-time = "2025-09-15T09:20:03.102Z" }, - { url = "https://files.pythonhosted.org/packages/ee/3b/e7f45be7d3969bdf2e3cd4b816a7a1d272507cd0edd2d6dc4b07514f2d9a/jiter-0.11.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:9a6dff27eca70930bdbe4cbb7c1a4ba8526e13b63dc808c0670083d2d51a4a72", size = 304414, upload-time = "2025-09-15T09:20:04.357Z" }, - { url = "https://files.pythonhosted.org/packages/06/32/13e8e0d152631fcc1907ceb4943711471be70496d14888ec6e92034e2caf/jiter-0.11.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:b1ae2a7593a62132c7d4c2abbee80bbbb94fdc6d157e2c6cc966250c564ef774", size = 314223, upload-time = "2025-09-15T09:20:05.631Z" }, - { url = "https://files.pythonhosted.org/packages/0c/7e/abedd5b5a20ca083f778d96bba0d2366567fcecb0e6e34ff42640d5d7a18/jiter-0.11.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b13a431dba4b059e9e43019d3022346d009baf5066c24dcdea321a303cde9f0", size = 337306, upload-time = "2025-09-15T09:20:06.917Z" }, - { url = "https://files.pythonhosted.org/packages/ac/e2/30d59bdc1204c86aa975ec72c48c482fee6633120ee9c3ab755e4dfefea8/jiter-0.11.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:af62e84ca3889604ebb645df3b0a3f3bcf6b92babbff642bd214616f57abb93a", size = 360565, upload-time = "2025-09-15T09:20:08.283Z" }, - { url = "https://files.pythonhosted.org/packages/fe/88/567288e0d2ed9fa8f7a3b425fdaf2cb82b998633c24fe0d98f5417321aa8/jiter-0.11.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c6f3b32bb723246e6b351aecace52aba78adb8eeb4b2391630322dc30ff6c773", size = 486465, upload-time = "2025-09-15T09:20:09.613Z" }, - { url = "https://files.pythonhosted.org/packages/18/6e/7b72d09273214cadd15970e91dd5ed9634bee605176107db21e1e4205eb1/jiter-0.11.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:adcab442f4a099a358a7f562eaa54ed6456fb866e922c6545a717be51dbed7d7", size = 377581, upload-time = "2025-09-15T09:20:10.884Z" }, - { url = "https://files.pythonhosted.org/packages/58/52/4db456319f9d14deed325f70102577492e9d7e87cf7097bda9769a1fcacb/jiter-0.11.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9967c2ab338ee2b2c0102fd379ec2693c496abf71ffd47e4d791d1f593b68e2", size = 347102, upload-time = "2025-09-15T09:20:12.175Z" }, - { url = "https://files.pythonhosted.org/packages/ce/b4/433d5703c38b26083aec7a733eb5be96f9c6085d0e270a87ca6482cbf049/jiter-0.11.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e7d0bed3b187af8b47a981d9742ddfc1d9b252a7235471ad6078e7e4e5fe75c2", size = 386477, upload-time = "2025-09-15T09:20:13.428Z" }, - { url = "https://files.pythonhosted.org/packages/c8/7a/a60bfd9c55b55b07c5c441c5085f06420b6d493ce9db28d069cc5b45d9f3/jiter-0.11.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:f6fe0283e903ebc55f1a6cc569b8c1f3bf4abd026fed85e3ff8598a9e6f982f0", size = 516004, upload-time = "2025-09-15T09:20:14.848Z" }, - { url = "https://files.pythonhosted.org/packages/2e/46/f8363e5ecc179b4ed0ca6cb0a6d3bfc266078578c71ff30642ea2ce2f203/jiter-0.11.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:4ee5821e3d66606b29ae5b497230b304f1376f38137d69e35f8d2bd5f310ff73", size = 507855, upload-time = "2025-09-15T09:20:16.176Z" }, - { url = "https://files.pythonhosted.org/packages/90/33/396083357d51d7ff0f9805852c288af47480d30dd31d8abc74909b020761/jiter-0.11.0-cp314-cp314-win32.whl", hash = "sha256:c2d13ba7567ca8799f17c76ed56b1d49be30df996eb7fa33e46b62800562a5e2", size = 205802, upload-time = "2025-09-15T09:20:17.661Z" }, - { url = "https://files.pythonhosted.org/packages/e7/ab/eb06ca556b2551d41de7d03bf2ee24285fa3d0c58c5f8d95c64c9c3281b1/jiter-0.11.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:fb4790497369d134a07fc763cc88888c46f734abdd66f9fdf7865038bf3a8f40", size = 313405, upload-time = "2025-09-15T09:20:18.918Z" }, - { url = "https://files.pythonhosted.org/packages/af/22/7ab7b4ec3a1c1f03aef376af11d23b05abcca3fb31fbca1e7557053b1ba2/jiter-0.11.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e2bbf24f16ba5ad4441a9845e40e4ea0cb9eed00e76ba94050664ef53ef4406", size = 347102, upload-time = "2025-09-15T09:20:20.16Z" }, - { url = "https://files.pythonhosted.org/packages/70/f3/ce100253c80063a7b8b406e1d1562657fd4b9b4e1b562db40e68645342fb/jiter-0.11.0-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:902b43386c04739229076bd1c4c69de5d115553d982ab442a8ae82947c72ede7", size = 336380, upload-time = "2025-09-15T09:20:36.867Z" }, +version = "0.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9c/1f/8176d92e001f86505424b41664032ae26a882bc9ca41a32c803f373f9195/jiter-0.17.0.tar.gz", hash = "sha256:03e432f226a453851079fb84cd17c6da9991eab723e28d716f14ae3d906e0c12", size = 229037, upload-time = "2026-09-12T15:14:14.253Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a1/50/17afdaffcc8af4bf4fddf2b6c26d066553aa2221983f2affcde435fc2532/jiter-0.17.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:cfafd7be8b16ceadd298db542cead37cddc211c4c49e04ad2596924df18625b1", size = 290699, upload-time = "2026-09-12T15:11:30.085Z" }, + { url = "https://files.pythonhosted.org/packages/c9/e4/c185d32d5b3657ad84da26c84a9eb15f00aa1b39d6882fcc0052dba2d7c2/jiter-0.17.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8adca2e793288e5f1bb29279bb439d0d3cfbb50eddca7e7e6ffd42ff4f482406", size = 324246, upload-time = "2026-09-12T15:11:31.3Z" }, + { url = "https://files.pythonhosted.org/packages/24/7a/8b8903bfe91a90a8fa1ec9b45d9fda5b6287a386693b69d720a882d73f3c/jiter-0.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30c692d567ba206c7cca38c9d1d0ccc70c9786290173c184d871ca12e9981ed7", size = 343275, upload-time = "2026-09-12T15:11:32.758Z" }, + { url = "https://files.pythonhosted.org/packages/a2/5d/6821fae2abc71a3c3a84bef8598d31fc4f27d9edfb55bd8f6c08afb8ef93/jiter-0.17.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:81c83c0abe614446a283d994d2c07c4f58632dea2cdf66ba9e2921bb8ccd593e", size = 328034, upload-time = "2026-09-12T15:11:33.9Z" }, + { url = "https://files.pythonhosted.org/packages/f3/51/8e7a963b1c2dfdc01d6228b004f50a2a3d7c46f0549d7b096a5d15ef81d5/jiter-0.17.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:073dc68c1a700c8fc480e877864a6b6ffc887533e261f4380c08c16bf09d057a", size = 342457, upload-time = "2026-09-12T15:11:36.414Z" }, + { url = "https://files.pythonhosted.org/packages/73/27/8b2a267e3bda45d9298331cacfe3521e761f0a2b05ad10a23c6548d08358/jiter-0.17.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:492f37230bbf9581ab2c17bcda862c249afb9ae2e3ab2dd6db59943bc4cc3153", size = 351271, upload-time = "2026-09-12T15:11:37.692Z" }, + { url = "https://files.pythonhosted.org/packages/4a/8f/5c74e5e142a6736833d7a991ab04d5c0738038dc44db05af0bb3cd2559e8/jiter-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5888fe5abc1ca2fa834a3e1b4c7ef0dcece286a7d7e95a609ef0934b777b9fc9", size = 346052, upload-time = "2026-09-12T15:11:39.722Z" }, + { url = "https://files.pythonhosted.org/packages/98/9c/f54920f06d1696e80b1be841d56412871c6856b1b1e3b541b1ed35346554/jiter-0.17.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:84ac78df457e1ee3f7e733bd114823302ae8c5ad5542d7e6647d92ffaa090a04", size = 328915, upload-time = "2026-09-12T15:11:41.065Z" }, + { url = "https://files.pythonhosted.org/packages/21/53/080f126863bceb055db9f1fd5431485eb493b35545a3c35e961ac18cd924/jiter-0.17.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7573e80232c5bcf80c24c038cf7e53a463f5c3b1dd1dd4109d66304f4dccc233", size = 337240, upload-time = "2026-09-12T15:11:42.356Z" }, + { url = "https://files.pythonhosted.org/packages/f0/76/3ab742823a0e0e70e143c6c90a482d9d90396ac2445e7b9483eb7245d3b5/jiter-0.17.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:11902505d401691720f5785c15b02204248526edee11b635cd6c40cd52b81599", size = 484917, upload-time = "2026-09-12T15:11:43.549Z" }, + { url = "https://files.pythonhosted.org/packages/14/e0/8ca71bc8b9cc9ed96c9da565863e00f3bb875a8fb82abcf03e975e067902/jiter-0.17.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:64846211a2debe7c071d2146d2283d2b0c1c93dc8fd5fb7794faac2ca6061b5c", size = 521868, upload-time = "2026-09-12T15:11:44.704Z" }, + { url = "https://files.pythonhosted.org/packages/c1/02/81f8719dcedb75713082a2048405376c81f6546b75af8167f3bba01a1ed0/jiter-0.17.0-cp311-cp311-win32.whl", hash = "sha256:c19b9357309b8cc6de8a48fca8e44a8c9c2feaaa2f5896d037fa505d48fcab80", size = 187844, upload-time = "2026-09-12T15:11:45.874Z" }, + { url = "https://files.pythonhosted.org/packages/3e/8c/59693f348488f01ed12d862e99ab8da14961152d3e9c39b9b1ef363f3572/jiter-0.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:e654b6b04e39c9cb19cb8b04c6ddf1f2db07751fa14156413969fd78bad0e5cb", size = 231402, upload-time = "2026-09-12T15:11:47.083Z" }, + { url = "https://files.pythonhosted.org/packages/fe/89/fb35e286463cb9f01edc2c4e47df6e5477ee36bca5096414e9ea87985588/jiter-0.17.0-cp311-cp311-win_arm64.whl", hash = "sha256:3ad556afc289f15d2b181b941982d01f06190863c07440185b9f354e1bd2def3", size = 187006, upload-time = "2026-09-12T15:11:48.245Z" }, + { url = "https://files.pythonhosted.org/packages/aa/f8/07bd8c3a23f7a8a6875e6a820bbffe1483a18f18f9398a91b5495123176e/jiter-0.17.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:ebf918dfd6a74adc1b9ad71f63c4ab00902fcd3b7fd39f2e24d871db8d713b91", size = 291633, upload-time = "2026-09-12T15:11:49.431Z" }, + { url = "https://files.pythonhosted.org/packages/0e/5e/0de4c6f84ffefa6809ffc2d550b9a314365acf7e7ec9b6c7375d49047900/jiter-0.17.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:61aed66ee042b3b49ef85fdf75714234d055d89d8496ac1c6e47f89e7a30d5e4", size = 321695, upload-time = "2026-09-12T15:11:52.727Z" }, + { url = "https://files.pythonhosted.org/packages/20/ac/befe2e82065bee37a0252081666ed2f48c1ac5f5c6c318c2de8168ba393d/jiter-0.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76eb4a5c20e86f9f848286f167024890f2862258a965d254774deb7fc1545ca1", size = 341967, upload-time = "2026-09-12T15:11:54.231Z" }, + { url = "https://files.pythonhosted.org/packages/9f/cd/9797c1e529746750ae589da7c1a8c24373f00d88e11a989f9e5eb1959079/jiter-0.17.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bcc064f99183a9cbe7f26ed648c352031a74145cd61ed75d34632c73eb46a5a8", size = 326546, upload-time = "2026-09-12T15:11:55.41Z" }, + { url = "https://files.pythonhosted.org/packages/d9/fd/e6914c38d6347bab4ebff2b1f0c0f191db276e7a1d5c376176757da42fe3/jiter-0.17.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:73b64e69c4150748e020356d958af94bec33c70a0a93d665cfa8f6d580fe1a63", size = 340995, upload-time = "2026-09-12T15:11:58.211Z" }, + { url = "https://files.pythonhosted.org/packages/9d/7d/611b3abf6f88945b5474da5cdc6d1a185e805ac9bf446bb7766dcda6ea87/jiter-0.17.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f0bc7f684b65bcda9c20434267577db71bf9905ceddd32b60d1d93278d8c8d3a", size = 352188, upload-time = "2026-09-12T15:11:59.414Z" }, + { url = "https://files.pythonhosted.org/packages/52/f8/b6e513ecbdf3b3cebe587c2279281ecf775b729a58cf4cc7bdf898ded029/jiter-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c21265b251d99bbb40080d178a8953e35601d3a1564e05c4de4c0d2ca616797", size = 345025, upload-time = "2026-09-12T15:12:00.697Z" }, + { url = "https://files.pythonhosted.org/packages/28/a8/fe26d06c5a6c5a4cfe703c5154c8a140da1305671eb3681aba9422d4f393/jiter-0.17.0-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:f3d7f7b34114f7ddc6d72a8e882d49de636b35d9fd12b4d420d3c5729f6c9812", size = 329180, upload-time = "2026-09-12T15:12:01.831Z" }, + { url = "https://files.pythonhosted.org/packages/e1/58/e6d66a26af40a20e62486feb7e222fd50f6e7aaa4f107abd89675dcc835b/jiter-0.17.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5078ab00664307fab2019b522a93aeb191122789f085daf5fd9e362154021d4a", size = 335805, upload-time = "2026-09-12T15:12:03.056Z" }, + { url = "https://files.pythonhosted.org/packages/ef/3e/96520aa2fef5ef831d95483a902140bfab83dcac9eaa74f7df61b5e50a1b/jiter-0.17.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:470e1b1e4c42f1ead2189166a299691871a2df5056c976e7fb96feafaf5f9d44", size = 484121, upload-time = "2026-09-12T15:12:04.414Z" }, + { url = "https://files.pythonhosted.org/packages/6a/8f/5d9d92fe538bf36ff481a2278c48147e59c1cf8eb2f7be665260665febe5/jiter-0.17.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:6eb6aedeb7352b8f3b6af9cbd67983840165c00428e63f1b420a85885128ea31", size = 521310, upload-time = "2026-09-12T15:12:05.612Z" }, + { url = "https://files.pythonhosted.org/packages/50/06/a09f979b22e652afbc3de66c709b2ba92edcef555f7535ab937c86b4f21a/jiter-0.17.0-cp312-cp312-win32.whl", hash = "sha256:362bb47423886d45a9f705d2d9d4008c6eedd4e41eb1bab4e96fb6daa06b33fd", size = 185029, upload-time = "2026-09-12T15:12:06.994Z" }, + { url = "https://files.pythonhosted.org/packages/6c/d9/98265a005b2473ec2be5a84e2b64c2f65382c673879f1574845cd4bcd77c/jiter-0.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:9bd3caac219df476dd0cc3fe01d2f1581ed588906feac767abd9614c1c12f8b3", size = 227381, upload-time = "2026-09-12T15:12:08.823Z" }, + { url = "https://files.pythonhosted.org/packages/a8/11/2e05bf5a56e57a543ebb8f585074adf09383e99d7b062dac92eab1f4d57f/jiter-0.17.0-cp312-cp312-win_arm64.whl", hash = "sha256:36ee6e69027396664e59995b9a635a947a5304ee9837279584a0bb8145c8f6b8", size = 183610, upload-time = "2026-09-12T15:12:10.374Z" }, + { url = "https://files.pythonhosted.org/packages/40/eb/2c4a8075ed5ea02b56911e9375d4c8d7784572ff4af32e5a99ae0d071044/jiter-0.17.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1b18434638228c0c184281609bf3d9459026a0f1ea48fb76c205e3ef72069caa", size = 290991, upload-time = "2026-09-12T15:12:11.641Z" }, + { url = "https://files.pythonhosted.org/packages/ca/b1/34bfa29599d420423baac6ff7cada6674fe63d5a7a2ccb3900b904678783/jiter-0.17.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ec89771f4272b989487a6364e519db6bbaba323e8bbf949ac89a45ea9c18b7a3", size = 321425, upload-time = "2026-09-12T15:12:13.855Z" }, + { url = "https://files.pythonhosted.org/packages/11/71/a5ac64a62a04aebd556afadab14a6b730001e16df87266ded943a100a1d9/jiter-0.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e3f052c671d5f425cca5ea5901cf11a831369fba4a55a3862cab93c323b4c3b", size = 343138, upload-time = "2026-09-12T15:12:15.046Z" }, + { url = "https://files.pythonhosted.org/packages/01/dd/f761e320ea473314cb68612bc6a435393464dbd198051399b36848b4ebf3/jiter-0.17.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:785a216bbaf8f15fc974e964ced7322cd3d774bb0e86949edd78c6bffd6ba35b", size = 325805, upload-time = "2026-09-12T15:12:16.506Z" }, + { url = "https://files.pythonhosted.org/packages/19/1a/27d8e40f0fb29bbc7a5adf30907144396a115dbe93d5d8976c054a6dfe96/jiter-0.17.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d85c558c9f8532bba287a990ac63767c7daf756f0d8c030219f62499b1fa228a", size = 340230, upload-time = "2026-09-12T15:12:17.682Z" }, + { url = "https://files.pythonhosted.org/packages/ac/c0/30bcde78a28155461f965d16b7aca4ffca6d17494d905f7a0bb072e6c64e/jiter-0.17.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c23849235d2142ce444b2b8c6eceee9f82f4cc0bd5c9081602e4155c6197807", size = 351343, upload-time = "2026-09-12T15:12:19.337Z" }, + { url = "https://files.pythonhosted.org/packages/27/17/91420b156315ae22732f5ee1a7b5725a030aab9dc8fd7dcdacfb4aa588d3/jiter-0.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58df29268a95e910f17db7ec9178eb7f15aa8619aaca3575275c4e6b3f4fe4c5", size = 344990, upload-time = "2026-09-12T15:12:20.705Z" }, + { url = "https://files.pythonhosted.org/packages/6d/a2/ae6d5672644cc11127970277c9aeb0fa6fae376845587f5b0a8e8828167c/jiter-0.17.0-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:a277f97eba7d66b1ee27eb5dab5b774ff46a10c78d89a1d3dcce04ce1357c8ca", size = 328624, upload-time = "2026-09-12T15:12:23.859Z" }, + { url = "https://files.pythonhosted.org/packages/04/62/45cb1162f6aa586536e4a973fc339d72dc6b08cca030d70a838a307aa778/jiter-0.17.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe15ddf316f1f1f643347d3a474e74ce61880c79a11ec5dca53df20c071bd3e8", size = 334731, upload-time = "2026-09-12T15:12:25.229Z" }, + { url = "https://files.pythonhosted.org/packages/d9/5f/45c1574b644da7deda0b7591c349520dcf83ce45b24d7ca19922dab1fc27/jiter-0.17.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:02adebb7ce6413c44d40af9ad59d1c1cd79630ccdcb6f7bdd2d461e48c03d8f9", size = 483649, upload-time = "2026-09-12T15:12:27.557Z" }, + { url = "https://files.pythonhosted.org/packages/c1/d3/ebea1ecb5b241c519f192b30215c79a8e47f42f1621acbcd6f8830728416/jiter-0.17.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:55d0e0e613a3f9ad600cf436e0e2b8057d1b52bcf1d91b2d36ac53451231e6a8", size = 520758, upload-time = "2026-09-12T15:12:28.99Z" }, + { url = "https://files.pythonhosted.org/packages/64/e6/682b641ff0765ea9bdc349dbc7d223de5c8af8ec1abda0db3406992f92fe/jiter-0.17.0-cp313-cp313-win32.whl", hash = "sha256:2c45ad7c973ef33fe5114a953377b35a95240f4542c0724d9f781e47dc24bac7", size = 184334, upload-time = "2026-09-12T15:12:30.813Z" }, + { url = "https://files.pythonhosted.org/packages/b8/d2/9a49aac2b27af4cc5015e368c0cc3588491a532f717a668ffce1f1ac57da/jiter-0.17.0-cp313-cp313-win_amd64.whl", hash = "sha256:a3cebb1fe4a1abb00465f3f8a17e09112603e8b7c59e5c3adbcd9f7815a64acd", size = 226601, upload-time = "2026-09-12T15:12:32.096Z" }, + { url = "https://files.pythonhosted.org/packages/b4/ce/9a43e9f614608eafa78de22aedcff54cd21324467b5d442d5c9b00244145/jiter-0.17.0-cp313-cp313-win_arm64.whl", hash = "sha256:96b8b0c6dc5d78682f54a450785e075aa929cde768304cad363cd4efba5a82ac", size = 183103, upload-time = "2026-09-12T15:12:34.396Z" }, + { url = "https://files.pythonhosted.org/packages/01/9e/23065f8e2c7a4c372c1b6f6622e4cfab4dc786cb5150052b1527e6a6a840/jiter-0.17.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:00d783a779c5664e16dbad5e3a3c3a75e128b07dd5f4765159658d9210a50ca5", size = 292210, upload-time = "2026-09-12T15:12:35.613Z" }, + { url = "https://files.pythonhosted.org/packages/ea/81/67b58647560bc82a4490d722caa8561d7a86a9f45d4fa620b7e5fe282c7a/jiter-0.17.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0619d806e260ecf0c2a64521942c94af5d547c9ec99b55ae4f51b538b5576a76", size = 321512, upload-time = "2026-09-12T15:12:36.907Z" }, + { url = "https://files.pythonhosted.org/packages/c7/07/6658359a25f55927f7f8bf0e16465dee2ccd0b2a1a5208acc0df8972e074/jiter-0.17.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc0288ce39190ee33fe6e4ec73161eed34e7e2da509b525546ca061778d62b64", size = 343897, upload-time = "2026-09-12T15:12:38.189Z" }, + { url = "https://files.pythonhosted.org/packages/46/04/5d50a9f0319cbdc37fd53c27f8c313d46afc34f1b048219ae6d8ea068da4/jiter-0.17.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5a52a430d04225ffde633e6840bf2381d34c019ff98526b5929755b9052fb199", size = 326519, upload-time = "2026-09-12T15:12:39.532Z" }, + { url = "https://files.pythonhosted.org/packages/bb/c7/d02517832b29eb8275fdd0f4ce0f17b80f58cc4c3ebecd4d9ace990d633d/jiter-0.17.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:37f33d327900bf2879613b3363fd48df97b4232d0c41f54bcf2e790c2fc40a71", size = 341369, upload-time = "2026-09-12T15:12:41.486Z" }, + { url = "https://files.pythonhosted.org/packages/3b/07/499b5f5603501cdd93a73a6a176dfad9c96555a3ae58ca9f8e3acba63dc9/jiter-0.17.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6cf564d43c4388149ca58ee571d0f5ccf875e20d1fd4662fd94cc0d1ea3b10ef", size = 352160, upload-time = "2026-09-12T15:12:42.721Z" }, + { url = "https://files.pythonhosted.org/packages/f5/75/b04013c7743269d4533ef4e746fc0ed678a143968dd7448658e3f51daad2/jiter-0.17.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:523c499235fb65add25d4bb01b1c4709ce695efdc7deb6c0a7bc515b5c44e0fb", size = 345018, upload-time = "2026-09-12T15:12:44.192Z" }, + { url = "https://files.pythonhosted.org/packages/1d/96/cbb6fd1e42a77c8412ec4643db95059b30cdfc635e387cc9193e098ce268/jiter-0.17.0-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:455e4ab35cb2a4a91a8404e08fd3c621bae433922e59bf1c494fe20a426b013b", size = 329244, upload-time = "2026-09-12T15:12:45.491Z" }, + { url = "https://files.pythonhosted.org/packages/15/67/d3be402f398566a379bf40ae65be5c3505b14d9e95e0802a597ddde7ddee/jiter-0.17.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6871973bfbd4408f7f1c632b30bbb5bbd9671c1bc8650af6823e24b7be13709b", size = 335693, upload-time = "2026-09-12T15:12:46.935Z" }, + { url = "https://files.pythonhosted.org/packages/7f/8d/98e2c4130b93d64f1d67c89060b928d04102549bf05e64451c9e6024f9ca/jiter-0.17.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:77f6aac0137309b31448c1bdcda4c6c77077664a6d018ece8d94019c68a5a5b9", size = 484329, upload-time = "2026-09-12T15:12:48.361Z" }, + { url = "https://files.pythonhosted.org/packages/78/5e/8da91e49f0fbca37c3489fb4cf3ad6676d4965f00ae5468bca3a2513737a/jiter-0.17.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:93946d89fa04d5ba64dd323a8dd8d901676cb8a3c81d99ae4f6c051a9b4c3f2f", size = 521358, upload-time = "2026-09-12T15:12:49.856Z" }, + { url = "https://files.pythonhosted.org/packages/be/21/5388684a5a38af3557cd9c2424b9827c71809cff24373c75ef9d0d3dfba9/jiter-0.17.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:70f19a2ca8429f91e82eeffb2f51cb87bc2d6e953b009b91a92d29c3a16ccb03", size = 110459, upload-time = "2026-09-12T15:12:51.747Z" }, + { url = "https://files.pythonhosted.org/packages/b1/ad/58b3a93525d2ffca7f54d9dee441381990082bd1172fbeb8d6a3f72a4dc3/jiter-0.17.0-cp314-cp314-win32.whl", hash = "sha256:71dbd74314c5df52a1bccf7b8bca46d14e943af7a2012e73b23f49977ef194c8", size = 185043, upload-time = "2026-09-12T15:12:54.477Z" }, + { url = "https://files.pythonhosted.org/packages/7a/4a/1aa520eb6c359b262c14ff995ca7283837208ddfb1202082ce9d73cf214d/jiter-0.17.0-cp314-cp314-win_amd64.whl", hash = "sha256:ac3c6ee3264d6f5c44c617f90bc7e8b9e1587e7d6708c9d8f811cb65582ee312", size = 227163, upload-time = "2026-09-12T15:12:55.931Z" }, + { url = "https://files.pythonhosted.org/packages/cf/e4/5997f648794bd9b499491d0ff480b096cc9a9c65bdba29f57568e6aa1705/jiter-0.17.0-cp314-cp314-win_arm64.whl", hash = "sha256:6219adaf59711ba7063a52496e8ec6d3fa3e209d7827d83eee3b2abc780a1744", size = 183505, upload-time = "2026-09-12T15:12:58.196Z" }, + { url = "https://files.pythonhosted.org/packages/ac/4a/84a5ec271d09f7590b6073af5ee4abb44eab4ccace453b7e2c5ce45234ca/jiter-0.17.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:59bddbe6f9ffecc68d641e1e2d619ce64cf8a9e9eeb74e5c518f74fc87abf1b0", size = 321527, upload-time = "2026-09-12T15:12:59.394Z" }, + { url = "https://files.pythonhosted.org/packages/39/71/9e1fd0045f5920b4c36be35c3f0f0dfd123668684f8ad352619d7aa44183/jiter-0.17.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6cb41cd1432f1dc19a231cf70b54d42b2c9f05085155859263fce06fa4d41388", size = 340865, upload-time = "2026-09-12T15:13:00.756Z" }, + { url = "https://files.pythonhosted.org/packages/b7/2b/14627fd2bc377f3dd09491bcace6b90e34b4d7fea2f1f3295031ff91f528/jiter-0.17.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fd7790aa79c8b518e512ebcdfce9f11d8ef5f30efd43720c8a19a548b39fa489", size = 325412, upload-time = "2026-09-12T15:13:02.152Z" }, + { url = "https://files.pythonhosted.org/packages/4c/f3/8d5808f7bf0f456bde79e6393587183a0cee5f83d179fe1f7f1eff2ba067/jiter-0.17.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dbbfe4e3c21c8166980cddc5bee1a315df082454f007947dfb6fb73800768165", size = 340473, upload-time = "2026-09-12T15:13:03.485Z" }, + { url = "https://files.pythonhosted.org/packages/4f/da/1d8c7c6c4ae6b2423b94a81b6b907d37b28f87664e077427b531bf1b5313/jiter-0.17.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c286860abfe8b100cac1c02e225e5776eb9216edd71ba17cdb237da4af32bc9", size = 350757, upload-time = "2026-09-12T15:13:04.828Z" }, + { url = "https://files.pythonhosted.org/packages/eb/96/c1813dcca15c5a370145a448aaea7d1f83f6f0228a5f1130e79340ee385f/jiter-0.17.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f753eb70b1474a29e635e7542ff7312e6d6b951e0b25e8a2e8c34eeb1ddcd478", size = 345203, upload-time = "2026-09-12T15:13:06.131Z" }, + { url = "https://files.pythonhosted.org/packages/d7/f7/fc61cbcf2992d169ede13648fc3fd8e2d3171a3669dde43cd4db556549ac/jiter-0.17.0-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:eae86b1f027031e39db2e0e9c4842221edb7b8cd474d23f87a79b3bd4b651768", size = 328322, upload-time = "2026-09-12T15:13:07.392Z" }, + { url = "https://files.pythonhosted.org/packages/8f/88/46418a3abbdffb7dc41b314200360f24f75faaeb35573e81c92de322cce9/jiter-0.17.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5bf350452a43173e69e1fc74847c57a60e3d7515807287f29849baa2a85d8718", size = 336570, upload-time = "2026-09-12T15:13:08.666Z" }, + { url = "https://files.pythonhosted.org/packages/f0/28/b8a55b949be6306df8888e365a8df05441de8a7b11289f6957004302e41e/jiter-0.17.0-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:da139721f4b7cafdbff580a4f511ea24cb91f4909330c6b926a1ca53836c0a59", size = 482879, upload-time = "2026-09-12T15:13:10.037Z" }, + { url = "https://files.pythonhosted.org/packages/75/3b/21d0afa53ba0680962c39f3eb95ed2946f8793369ed44b0c82b490723081/jiter-0.17.0-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:8079849db9a1371bfd90bad088458a8fb836261879df2233cc9632464ecf64e1", size = 520406, upload-time = "2026-09-12T15:13:11.456Z" }, + { url = "https://files.pythonhosted.org/packages/ef/03/bcbaf8b6b9ea23c2c074411f8ecfbb02d820abac5d0cb8f4e280209174a2/jiter-0.17.0-cp314-cp314t-win32.whl", hash = "sha256:8f770b0c77e5fac482e1ba03ca1a7e18286bfb213d749932a00a7e4cd5de5e06", size = 184434, upload-time = "2026-09-12T15:13:13.037Z" }, + { url = "https://files.pythonhosted.org/packages/7a/b5/5d6ce2c93ef6fe1241b37a9005547f9b6d58db1f07f39fe95807d4b98f51/jiter-0.17.0-cp314-cp314t-win_amd64.whl", hash = "sha256:c4289293e5278d9314b00f15c37f2120fa51d3d68565292e715524c750e775a9", size = 227392, upload-time = "2026-09-12T15:13:14.933Z" }, + { url = "https://files.pythonhosted.org/packages/f5/4b/1e52baf90187606e33a7b8cfa8f96f5829acd7f01870077eb01059ab76d0/jiter-0.17.0-cp314-cp314t-win_arm64.whl", hash = "sha256:4dfbfe5a6e1e80a7082af559f66386405025ec278833e0c649f69cbc6e1004cc", size = 182776, upload-time = "2026-09-12T15:13:16.239Z" }, + { url = "https://files.pythonhosted.org/packages/05/fc/efe3ac75564ab10f53517958f5ccdc231fc7334af66c76776cb554a88967/jiter-0.17.0-cp315-cp315-macosx_10_12_x86_64.whl", hash = "sha256:84963d3f395ef5e9a32ce47155e08a7962fa292c159a10cb98b931cef1416925", size = 292143, upload-time = "2026-09-12T15:13:17.502Z" }, + { url = "https://files.pythonhosted.org/packages/d1/4c/46982118d91f9ffe9714319d21ec4f98d9b7e0cfd9062826c524a54de24e/jiter-0.17.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:ffa0380ad091de7d3fc33e17a97ff479851ee18a0a2a3ee56ff3215cdc886656", size = 321341, upload-time = "2026-09-12T15:13:19.133Z" }, + { url = "https://files.pythonhosted.org/packages/e7/12/9b1ac6ecc6307049913db54839ddba1c11c1ef72c5a8bbb5514bc3b50d1b/jiter-0.17.0-cp315-cp315-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:755079792868ce5d4938e83b91a0939b34fb858a1ca65a104f2d771bea57faa1", size = 344383, upload-time = "2026-09-12T15:13:20.508Z" }, + { url = "https://files.pythonhosted.org/packages/a9/b6/527cc72af836d824e9d4d666e64f0a1ca7eafd662a8da9657b78592172ba/jiter-0.17.0-cp315-cp315-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3bf4dc2b84a464117fb097d15a25c58d100d2692888e3b0d92df5b48ed16b7c0", size = 326841, upload-time = "2026-09-12T15:13:21.83Z" }, + { url = "https://files.pythonhosted.org/packages/d1/41/567f98617e88005b249503b933803f633ec6ba2d427cf4cc35e5c832125c/jiter-0.17.0-cp315-cp315-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02a360707033d8cef53f7f3480817a1489177a259ec6ec01e98c37e0b922ddca", size = 341354, upload-time = "2026-09-12T15:13:23.323Z" }, + { url = "https://files.pythonhosted.org/packages/40/da/b29cda895b785f7d426e224638a885b6145a08ce853b381f34afe3e88c5d/jiter-0.17.0-cp315-cp315-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:300ce01ab0215e3dea4d00090143c909aedc65c0f809b3c07983e1d038f291b9", size = 351985, upload-time = "2026-09-12T15:13:26.526Z" }, + { url = "https://files.pythonhosted.org/packages/f7/5c/8a73829e7389e72ea298a450f2b3cb58e71a3e464b45f6d8753740f1c4f5/jiter-0.17.0-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:746243a080b4ca790b8499af3d7cf9825d5f5987933950cd818e767ee353d826", size = 346052, upload-time = "2026-09-12T15:13:27.887Z" }, + { url = "https://files.pythonhosted.org/packages/1d/2f/98d6001026932c095ba440925570123043bed29f5ff56158dfe729a9e81b/jiter-0.17.0-cp315-cp315-manylinux_2_31_riscv64.whl", hash = "sha256:b550585523339b71cb852b811aae49d08d7601ad8ffe9f5dc1562f4c3d22fd87", size = 329159, upload-time = "2026-09-12T15:13:31.569Z" }, + { url = "https://files.pythonhosted.org/packages/94/2e/708dc1d2678f092c31c12754e860cd8353e6a85ecbdb1010157edca0da9e/jiter-0.17.0-cp315-cp315-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0239520085cac678e77a606fd7e3f1c60c371d719790c5e3807388d3da4354c2", size = 336001, upload-time = "2026-09-12T15:13:32.846Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f0/75a5ae38862f4eaf0fe2f8a9fbf6484c4890df04c06dcdffc45e36bca61a/jiter-0.17.0-cp315-cp315-musllinux_1_1_aarch64.whl", hash = "sha256:eb2295da7c3769f6719b227a237aa6a5cfa6550e478bc838001b592c57e16575", size = 484281, upload-time = "2026-09-12T15:13:35.333Z" }, + { url = "https://files.pythonhosted.org/packages/a0/32/6636fae811c27c7f93e1b11fb5800de6a5c9e4269a27cf718e0b31218ad1/jiter-0.17.0-cp315-cp315-musllinux_1_1_x86_64.whl", hash = "sha256:e088612ff90ebc9247e1a43074b72835804261c47e6a6c01cb3ddcb55360d688", size = 521300, upload-time = "2026-09-12T15:13:37.101Z" }, + { url = "https://files.pythonhosted.org/packages/61/aa/12df7e0b0b1a2602e3d5a5a7104d7d9700f254b400f134a9b50955c4d231/jiter-0.17.0-cp315-cp315-win32.whl", hash = "sha256:0b52d52035b3907c5b1f6277857b29c1cbfc965e24e0f27330dbed83edb591ec", size = 185138, upload-time = "2026-09-12T15:13:38.901Z" }, + { url = "https://files.pythonhosted.org/packages/ba/ec/3dd2e495032cddde05723c1f4c743b67a23e55d2af244692a7f58f0cdae3/jiter-0.17.0-cp315-cp315-win_amd64.whl", hash = "sha256:10f5558eed511b830488003449d942bd75829ad6257dc58cb9a03e596a7777b1", size = 226950, upload-time = "2026-09-12T15:13:40.17Z" }, + { url = "https://files.pythonhosted.org/packages/c3/c7/ef85704e0a57e9cadb2babc05f6d7c5df4a1c75da1a6ee31e1986b0099a5/jiter-0.17.0-cp315-cp315-win_arm64.whl", hash = "sha256:fa13acf1046f95df808c64b1310705e143fab87aee73ae00cc42d640867fd2c1", size = 183618, upload-time = "2026-09-12T15:13:41.432Z" }, + { url = "https://files.pythonhosted.org/packages/0e/9a/a4b348349de68762b58d6713973d363ad80a1c741d0bf8def7975f0ecb26/jiter-0.17.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:af2f7501580f274b63c4b2283bc425f5df7edf06ae5b171e5f87d912ff359a20", size = 321155, upload-time = "2026-09-12T15:13:42.716Z" }, + { url = "https://files.pythonhosted.org/packages/c1/70/aebd6d0b5f0677de3a3d0bdc4a05fac949b97c4ede454c8809f180ac7b17/jiter-0.17.0-cp315-cp315t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10c5349312e5cb02b7a21e123a57665afa895953f05bf252a9dd4c13a572b7ab", size = 340985, upload-time = "2026-09-12T15:13:44.115Z" }, + { url = "https://files.pythonhosted.org/packages/a7/82/4c3b49796b5eb62f3f5046f957683f4ba0135fe1a60957c11180512460df/jiter-0.17.0-cp315-cp315t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:86f3f9343a288eb85a81ef20a752b2f84564296636db54a9fff0b5c8deaf1df2", size = 325670, upload-time = "2026-09-12T15:13:45.901Z" }, + { url = "https://files.pythonhosted.org/packages/bc/43/f6341ecb4872202a4ef150486fcee0e1ace4aa3da39b71b82061452cdd3a/jiter-0.17.0-cp315-cp315t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4607ec7d93355fbc25b8dc5189153cf21d66063b9f9cd04dd2774e6e783f9b6a", size = 340339, upload-time = "2026-09-12T15:13:47.442Z" }, + { url = "https://files.pythonhosted.org/packages/f9/c4/bc2c86e08fa065e03cb2fbc53b367c3640a7d257ef9d877b29118ea636b7/jiter-0.17.0-cp315-cp315t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:10cd64a5720ad7f809ac5466ff1705813f1b6b510f195a73acafba0ac0e1f675", size = 350705, upload-time = "2026-09-12T15:13:48.848Z" }, + { url = "https://files.pythonhosted.org/packages/9d/67/91f12aa111cca6e3a197c3e36bf60a034bf9f122f6d41112a639e44217d8/jiter-0.17.0-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:efe9f61bb30174d2f5c8396445c360c96c44e78164d0815dfe627ccf57849574", size = 345011, upload-time = "2026-09-12T15:13:50.215Z" }, + { url = "https://files.pythonhosted.org/packages/f5/cb/9f5556e8f6ec89755fb5a709d8eb8270c9a324e31079eda0dfbeca451b6e/jiter-0.17.0-cp315-cp315t-manylinux_2_31_riscv64.whl", hash = "sha256:370d8fe5bf201dc6925e8a84c81ac7291f74d9fd1778234fc79d517064a5c76b", size = 328268, upload-time = "2026-09-12T15:13:51.809Z" }, + { url = "https://files.pythonhosted.org/packages/22/98/153f20680fb75781a490fb849940e2b00f95035c7aa054df592f36ed33fc/jiter-0.17.0-cp315-cp315t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6b303d88e6a0bda789ec4b7801c7bad68e27230ba1fe4baffc756d1fbd32dc9d", size = 337024, upload-time = "2026-09-12T15:13:53.095Z" }, + { url = "https://files.pythonhosted.org/packages/af/59/b16c9be3a5035df4466cc72e888188c027562de90a723d290ab6814cb9d4/jiter-0.17.0-cp315-cp315t-musllinux_1_1_aarch64.whl", hash = "sha256:30793a24a31e968969757c9e08d830cbb15a2cd3c4959b4498b38f4b1c2258eb", size = 482766, upload-time = "2026-09-12T15:13:55.713Z" }, + { url = "https://files.pythonhosted.org/packages/d0/55/667dea313094024bef082175d6bfe8976f90d1c00c926af9df1d8e0eab48/jiter-0.17.0-cp315-cp315t-musllinux_1_1_x86_64.whl", hash = "sha256:686c93d86f2b426c803024b805bd161a6cd10e9627c23e901640eab646c0ad8a", size = 520367, upload-time = "2026-09-12T15:13:57.674Z" }, + { url = "https://files.pythonhosted.org/packages/21/e3/4b1a43501fb9ed17b01d137e380cb0e8fdcb39a254ce31aa2ab95bc861ac/jiter-0.17.0-cp315-cp315t-win32.whl", hash = "sha256:86d703d9faa1ffc8ae4e9de0fa007712ed2171b5c0d93811a8e2e105ac729b0d", size = 184603, upload-time = "2026-09-12T15:13:59.27Z" }, + { url = "https://files.pythonhosted.org/packages/f9/f2/b8ee0372b6ebdf1bde5cc44495d5291d17f961065f5b48f8616cc67cac2e/jiter-0.17.0-cp315-cp315t-win_amd64.whl", hash = "sha256:42b0260445251b1bc520a63baa94a32d88e0f931fba234f1764db7feb7c72174", size = 227936, upload-time = "2026-09-12T15:14:00.472Z" }, + { url = "https://files.pythonhosted.org/packages/a4/b4/923a1215daba959aed8355973315cb3f81f53e0d01c5b211870a27b41f45/jiter-0.17.0-cp315-cp315t-win_arm64.whl", hash = "sha256:d47687806f9c54c84ea38733507081337922beca90ce819c7d852dd485bc0f23", size = 182977, upload-time = "2026-09-12T15:14:01.799Z" }, + { url = "https://files.pythonhosted.org/packages/b9/3b/05a917204413e2e09906dfa35240c1021227aeb56c7305abea9562c598b4/jiter-0.17.0-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:eaba834b72d573547b9d966465b3394b749d5e14208cc70acb63aca37619ab33", size = 288143, upload-time = "2026-09-12T15:14:02.998Z" }, + { url = "https://files.pythonhosted.org/packages/d9/e1/a1cd3c0cf8f79945939e4f8caae9990529f67d7f77f671769f73956329b9/jiter-0.17.0-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:51e1519d676a9f14dad9c2a411170d43b022ddb7989562df4e849b261ce127b2", size = 281847, upload-time = "2026-09-12T15:14:04.414Z" }, + { url = "https://files.pythonhosted.org/packages/72/b4/9b797679e09f4a46c32986aeb3670bd9bc562fc0b373c7a0ee5c5dce1206/jiter-0.17.0-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0ce4feb52493e3513335b2accdcd75605652e4632772d3c8c2f7b86954d7f39", size = 304797, upload-time = "2026-09-12T15:14:05.733Z" }, + { url = "https://files.pythonhosted.org/packages/25/4a/0d77415b27a00d970e4e710f7c1de62e96a11c4cab3ed1add0015af04626/jiter-0.17.0-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:29f49b325e0234e4ad9ecca5b861ffbd09b95ccac9bd46fa55841b6e56eea5fe", size = 307815, upload-time = "2026-09-12T15:14:07.105Z" }, + { url = "https://files.pythonhosted.org/packages/17/31/4bb27f54333d3b9ef1e5bd3312dc0b4bbe59c68bb0885fdb40583a6b1567/jiter-0.17.0-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:454c4997d73cc466c71fd565d91e603b0274e48ea0c6b0b7a7aee6967e4ceb7c", size = 288415, upload-time = "2026-09-12T15:14:08.455Z" }, + { url = "https://files.pythonhosted.org/packages/28/30/879570ecf82574eaea77c5eb10309f4b630dece5f2a556e9814a90ba3f2d/jiter-0.17.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:40d2c240f8f80b5b0f201b29f0ae129c81448c60c772227a41747b5e0026f6a2", size = 279113, upload-time = "2026-09-12T15:14:10.117Z" }, + { url = "https://files.pythonhosted.org/packages/77/7a/1f0b8a35fbd079a4f1752c31a15dc99cf277f863747c459be0af39e900e5/jiter-0.17.0-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e05f5adbf68c4bd11e1610f394034d984152988e84be6f8314235ce6f2139e5", size = 303708, upload-time = "2026-09-12T15:14:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/e1/8b/d76219ebdbcf3d4209d9d21a0810db4c8d0a6f88e3ee87d30bdea4e90d30/jiter-0.17.0-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2c0bf24c72fd0491405dce5d40194f2070e9021ce648c1a1d46234b93d848ff", size = 307147, upload-time = "2026-09-12T15:14:12.897Z" }, +] + +[[package]] +name = "jmespath" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d3/59/322338183ecda247fb5d1763a6cbe46eff7222eaeebafd9fa65d4bf5cb11/jmespath-1.1.0.tar.gz", hash = "sha256:472c87d80f36026ae83c6ddd0f1d05d4e510134ed462851fd5f754c8c3cbb88d", size = 27377, upload-time = "2026-01-22T16:35:26.279Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/14/2f/967ba146e6d58cf6a652da73885f52fc68001525b4197effc174321d70b4/jmespath-1.1.0-py3-none-any.whl", hash = "sha256:a5663118de4908c91729bea0acadca56526eb2698e83de10cd116ae0f4e97c64", size = 20419, upload-time = "2026-01-22T16:35:24.919Z" }, +] + +[[package]] +name = "joserfc" +version = "1.7.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cryptography" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cd/db/ec5b5fe07a7bda62cd2c2d619daf160eb7442b979c7cd61bbe0262108de9/joserfc-1.7.6.tar.gz", hash = "sha256:fb1cf6d2977318bef976c2ed2ef2167cc5f8ade8fc96f034e38f7abd656907c4", size = 236091, upload-time = "2026-10-18T23:12:18.43Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/40/63886ba742c6fd9e6dd222e20b8d54012fbc933465350c7747c4ed5b31e4/joserfc-1.7.6-py3-none-any.whl", hash = "sha256:e2d72e3fa937ed8ddd42ad8c1cc337a43e7ffd02efa572a2aa15e2764a05b506", size = 71588, upload-time = "2026-10-18T23:12:17.085Z" }, +] + +[[package]] +name = "jsonpatch" +version = "1.35" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonpointer" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/f8/48a6033ebdd5013a58b5a79402eacb15ffb6e208f244c1c17f6f1e3b29c2/jsonpatch-1.35.tar.gz", hash = "sha256:679ad08672b4663c7ef1e5f3331d940f5e7786661b9acc1530104be1638e7a4f", size = 39440, upload-time = "2026-10-10T21:34:24.61Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/77/46/840ee494290e36ffad7c905b1f90a5a074d94de0f752ebe466ebccd6e1e1/jsonpatch-1.35-py3-none-any.whl", hash = "sha256:417e05303ebf7aef98d3ebf1e1ae7e7a4de6ec57bc5d243cd3509eff650e959f", size = 17005, upload-time = "2026-10-10T21:34:23.299Z" }, +] + +[[package]] +name = "jsonpath-ng" +version = "1.10.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4c/dc/178bf7bb75d2df2532d0d1796805381f2599eb805c40eeda089538af9393/jsonpath_ng-1.10.1.tar.gz", hash = "sha256:1247d0983361ebe44f47741e759bbb76e74213c68f25abb4b65f6de21d1934d6", size = 87626, upload-time = "2026-10-12T12:57:12.048Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/08/e6/d0f38911783aa7bc69afb0cdf5151e8cefeecd8ca3944c5453e13fc5afda/jsonpath_ng-1.10.1-py3-none-any.whl", hash = "sha256:9355047e5e6a8919f5ae0ccfd5b793bff69e4165f1248b1763e8962457b58ff5", size = 75386, upload-time = "2026-10-12T12:57:10.48Z" }, +] + +[[package]] +name = "jsonpointer" +version = "3.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/33/a2/c92f0a7ed439c490d2c8ad712fdb074c311afa4f77870987826a3b1483ba/jsonpointer-3.2.1.tar.gz", hash = "sha256:47c846513b3a4ec46eecef1105207fba075e2a3659048e362bd7daff0fc33342", size = 11309, upload-time = "2026-10-10T21:11:06.988Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fa/29/accef8eea16670b88f3a23102c35dee62c6f159db30d9628908043b3e21b/jsonpointer-3.2.1-py3-none-any.whl", hash = "sha256:b19ee68644e9ffb51440448d8f7811af2b7406eea1db90603e93f5849323119a", size = 8332, upload-time = "2026-10-10T21:11:05.648Z" }, ] [[package]] name = "jsonschema" -version = "4.25.1" +version = "4.26.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "attrs" }, @@ -1264,9 +1940,24 @@ dependencies = [ { name = "referencing" }, { name = "rpds-py" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/74/69/f7185de793a29082a9f3c7728268ffb31cb5095131a9c139a74078e27336/jsonschema-4.25.1.tar.gz", hash = "sha256:e4a9655ce0da0c0b67a085847e00a3a51449e1157f4f75e9fb5aa545e122eb85", size = 357342, upload-time = "2025-08-18T17:03:50.038Z" } +sdist = { url = "https://files.pythonhosted.org/packages/b3/fc/e067678238fa451312d4c62bf6e6cf5ec56375422aee02f9cb5f909b3047/jsonschema-4.26.0.tar.gz", hash = "sha256:0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326", size = 366583, upload-time = "2026-01-07T13:41:07.246Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl", hash = "sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce", size = 90630, upload-time = "2026-01-07T13:41:05.306Z" }, +] + +[[package]] +name = "jsonschema-path" +version = "0.5.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "pathable" }, + { name = "pyyaml" }, + { name = "referencing" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/39/79/cd02a4df6d9270efdc7d3feefe6edd730b0820c39eeaa107a2faee8322d5/jsonschema_path-0.5.0.tar.gz", hash = "sha256:493b156ba895c97602655b620a8456caa2ce08c1aa389f5a7addec065e6e855c", size = 19597, upload-time = "2026-05-19T20:45:00.971Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/bf/9c/8c95d856233c1f82500c2450b8c68576b4cf1c871db3afac5c34ff84e6fd/jsonschema-4.25.1-py3-none-any.whl", hash = "sha256:3fba0169e345c7175110351d456342c364814cfcf3b964ba4587f22915230a63", size = 90040, upload-time = "2025-08-18T17:03:48.373Z" }, + { url = "https://files.pythonhosted.org/packages/04/2c/9e69d73c4297508be9e3b64a970ea3971b3eb8db64ffc5802d40bd25981f/jsonschema_path-0.5.0-py3-none-any.whl", hash = "sha256:2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2", size = 24077, upload-time = "2026-05-19T20:44:59.225Z" }, ] [[package]] @@ -1283,7 +1974,7 @@ wheels = [ [[package]] name = "keyring" -version = "25.6.0" +version = "25.7.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "importlib-metadata", marker = "python_full_version < '3.12'" }, @@ -1294,167 +1985,499 @@ dependencies = [ { name = "pywin32-ctypes", marker = "sys_platform == 'win32'" }, { name = "secretstorage", marker = "sys_platform == 'linux'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/70/09/d904a6e96f76ff214be59e7aa6ef7190008f52a0ab6689760a98de0bf37d/keyring-25.6.0.tar.gz", hash = "sha256:0b39998aa941431eb3d9b0d4b2460bc773b9df6fed7621c2dfb291a7e0187a66", size = 62750, upload-time = "2024-12-25T15:26:45.782Z" } +sdist = { url = "https://files.pythonhosted.org/packages/43/4b/674af6ef2f97d56f0ab5153bf0bfa28ccb6c3ed4d1babf4305449668807b/keyring-25.7.0.tar.gz", hash = "sha256:fe01bd85eb3f8fb3dd0405defdeac9a5b4f6f0439edbb3149577f244a2e8245b", size = 63516, upload-time = "2025-11-16T16:26:09.482Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d3/32/da7f44bcb1105d3e88a0b74ebdca50c59121d2ddf71c9e34ba47df7f3a56/keyring-25.6.0-py3-none-any.whl", hash = "sha256:552a3f7af126ece7ed5c89753650eec89c7eaae8617d0aa4d9ad2b75111266bd", size = 39085, upload-time = "2024-12-25T15:26:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/81/db/e655086b7f3a705df045bf0933bdd9c2f79bb3c97bfef1384598bb79a217/keyring-25.7.0-py3-none-any.whl", hash = "sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f", size = 39160, upload-time = "2025-11-16T16:26:08.402Z" }, ] [[package]] -name = "litellm" -version = "1.78.0" +name = "langchain" +version = "1.4.5" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "aiohttp", marker = "python_full_version < '3.14'" }, - { name = "click", marker = "python_full_version < '3.14'" }, - { name = "fastuuid", marker = "python_full_version < '3.14'" }, - { name = "httpx", marker = "python_full_version < '3.14'" }, - { name = "importlib-metadata", marker = "python_full_version < '3.14'" }, - { name = "jinja2", marker = "python_full_version < '3.14'" }, - { name = "jsonschema", marker = "python_full_version < '3.14'" }, - { name = "openai", marker = "python_full_version < '3.14'" }, - { name = "pydantic", marker = "python_full_version < '3.14'" }, - { name = "python-dotenv", marker = "python_full_version < '3.14'" }, - { name = "tiktoken", marker = "python_full_version < '3.14'" }, - { name = "tokenizers", marker = "python_full_version < '3.14'" }, + { name = "langchain-core" }, + { name = "langgraph" }, + { name = "pydantic" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/fd/3e/1a96a3caeeb6092d85e70904e2caa98598abb7179cefe734e2fbffac6978/litellm-1.78.0.tar.gz", hash = "sha256:020e40e0d6e16009bb3a6b156d4c1d98cb5c33704aa340fdf9ffd014bfd31f3b", size = 10684595, upload-time = "2025-10-11T19:28:27.369Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ea/61/f52073a1b7b401b7ad82db3674e94dbe2d0fee28e794a8c4440223c0bc91/langchain-1.4.5.tar.gz", hash = "sha256:e99b9bd3b1203a475f627ba970ede2b1263fa4e52154b6c3660b4c3ee1bf73c8", size = 745545, upload-time = "2026-10-12T19:28:24.197Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fc/fb/38a48efe3e05a8e9a9765b991740282e0358a83fb896ec00d70bf1448791/litellm-1.78.0-py3-none-any.whl", hash = "sha256:a9d6deee882de8df38ca24beb930689f49209340137ff8a3dcab0c5fc4a0513d", size = 9677983, upload-time = "2025-10-11T19:28:23.242Z" }, + { url = "https://files.pythonhosted.org/packages/c1/e0/c8ec47569a73c0c6205eb545f229ffb9fae66e85b12e9032765442317a09/langchain-1.4.5-py3-none-any.whl", hash = "sha256:0879b85a79d7fbc89fc91f6c65c9fa573f03f4d9458e6b5b3c50c717868bd79f", size = 166359, upload-time = "2026-10-12T19:28:22.883Z" }, +] + +[[package]] +name = "langchain-anthropic" +version = "1.7.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anthropic" }, + { name = "langchain-core" }, + { name = "pydantic" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3c/45/b369666909be4a6f58877b18e692655ee792e06047c6c572d1218e09a31c/langchain_anthropic-1.7.6.tar.gz", hash = "sha256:e5b41959a39810e69bc608fd6622b7d5d017bde93f858b09332fbb6ac764c393", size = 765188, upload-time = "2026-10-12T14:39:58.537Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/97/d6/da1ba42b7c26cd511c9be5473dbb178c51b07a337e94f09188d45f0306a2/langchain_anthropic-1.7.6-py3-none-any.whl", hash = "sha256:06bee97006d99e9a04abc4bd56599fc356c0c7f7f2a97629645cb603d9785c73", size = 65535, upload-time = "2026-10-12T14:39:57.386Z" }, +] + +[[package]] +name = "langchain-core" +version = "1.6.10" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "httpx" }, + { name = "jsonpatch" }, + { name = "langchain-protocol" }, + { name = "langsmith" }, + { name = "packaging" }, + { name = "pydantic" }, + { name = "pyyaml" }, + { name = "tenacity" }, + { name = "typing-extensions" }, + { name = "uuid-utils" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f7/00/0a95f74a79908e7bc844a82fca35c1afc55689f55aaed086e95745946db8/langchain_core-1.6.10.tar.gz", hash = "sha256:3ad7a64eab150c1fea9f8a748b1c076aa1a960c5cf7c28d81a841a2f2dbffad1", size = 1010280, upload-time = "2026-10-12T14:13:51.184Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/2c/6ed698c6b451af0ed0efdbe94a703c18aea768d925347d8d1efd5645ae8c/langchain_core-1.6.10-py3-none-any.whl", hash = "sha256:14341bdd8b42d0dd9a53dbbcd8b0599ab47b0c718c7caa12e3eb5c50b32cffcb", size = 573253, upload-time = "2026-10-12T14:13:49.616Z" }, +] + +[[package]] +name = "langchain-google-genai" +version = "4.4.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filetype" }, + { name = "google-genai" }, + { name = "langchain-core" }, + { name = "pydantic" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3f/25/3004415b1547436fee3445bcb2e06b2eace2dce95b693ad37af3ee0017d4/langchain_google_genai-4.4.1.tar.gz", hash = "sha256:1729b83e1e08d1431a6f4f29776b6b787b4f1c2ca95a248b08c4d90149d817bd", size = 378698, upload-time = "2026-10-10T19:08:16.655Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/68/d6/bba02be84de7f3c92d0354a62f28cb6a40abed98373bce5b771ecde0a089/langchain_google_genai-4.4.1-py3-none-any.whl", hash = "sha256:462f1ad309498d11c8950d7b7ccf943580b021c0d778bd1415fa72e46e37e762", size = 81710, upload-time = "2026-10-10T19:08:15.389Z" }, +] + +[[package]] +name = "langchain-protocol" +version = "0.0.19" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/14/56/913599f2f9cec8524868929f12d72b2ede377a6056ca8a40a32bdadfa535/langchain_protocol-0.0.19.tar.gz", hash = "sha256:79d90a1425122ac87e8052e2ec054fbd09c3edbf341bdfb6397112a495c7bf8c", size = 6265, upload-time = "2026-08-26T21:12:00.703Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/80/c9/f6cbf357d48ccbd18bb394433b1fd7ad9be004eed9377ad08bb85777e5e6/langchain_protocol-0.0.19-py3-none-any.whl", hash = "sha256:4cdf879a492a35980fd859ae792d3c65458ccaae504e183c9a10d7eac1f0720f", size = 7327, upload-time = "2026-08-26T21:11:59.781Z" }, +] + +[[package]] +name = "langgraph" +version = "1.2.15" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "langchain-core" }, + { name = "langgraph-checkpoint" }, + { name = "langgraph-prebuilt" }, + { name = "langgraph-sdk" }, + { name = "pydantic" }, + { name = "xxhash" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ab/69/d43defeb393d5e222574b80411ee3c214dc4de4012b4ce363f6faf115aff/langgraph-1.2.15.tar.gz", hash = "sha256:bebcfe5369b7307de1369ac00775f6e7b5a64ec94c050896b67de69d98aac612", size = 767102, upload-time = "2026-10-12T22:38:13.165Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/82/d79317d651dc575aa471cd777d781d8fdd28d974b1de90e8718d473f6863/langgraph-1.2.15-py3-none-any.whl", hash = "sha256:6e1611c4dad33d933b8cf21a91db73285221e67508feb2db5a0397af55fb838f", size = 259575, upload-time = "2026-10-12T22:38:11.806Z" }, +] + +[[package]] +name = "langgraph-checkpoint" +version = "4.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "langchain-core" }, + { name = "ormsgpack" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0f/69/31fdbdc65a85bbd6178afa193c772bb926620f47b4869638bc2bc80afaaa/langgraph_checkpoint-4.3.0.tar.gz", hash = "sha256:c75965d84cc2c1d549163e910a15bcb577758001b141619d05297c463280b018", size = 182652, upload-time = "2026-10-12T22:26:31.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1f/0c/84747e340bf4f29291c84cdd5733fc8d0a822f3d33bb24e664a18afa4a7c/langgraph_checkpoint-4.3.0-py3-none-any.whl", hash = "sha256:bedfafe2f997ded60e4fa593e79f56f436a6e45586392dc382aa810d0c751c64", size = 58063, upload-time = "2026-10-12T22:26:30.429Z" }, +] + +[[package]] +name = "langgraph-prebuilt" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "langchain-core" }, + { name = "langgraph-checkpoint" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/29/66/ed9b93f56bc17ef22d551892f0ac2b225a97fe0fcf23a511b857f70d590b/langgraph_prebuilt-1.1.0.tar.gz", hash = "sha256:3c579cf6eed2d17f9c157c2d0fcaddcd8688524e7022d3b22b37a3bf4589d528", size = 178833, upload-time = "2026-05-12T03:37:49.332Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e9/43/3fe1a700b8490ed02679cdbbc8c915eb23a092faf496c9c1118abcd10be3/langgraph_prebuilt-1.1.0-py3-none-any.whl", hash = "sha256:51e311747d755b751d5c6b39b0c1446124d3a7643d2515017e6714b323508fc9", size = 41043, upload-time = "2026-05-12T03:37:48.007Z" }, +] + +[[package]] +name = "langgraph-sdk" +version = "0.4.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "httpx" }, + { name = "langchain-core" }, + { name = "langchain-protocol" }, + { name = "orjson" }, + { name = "websockets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0e/5d/cbeacb114f4a6269fc476f7d2feba088f6ada0c00f81bf5decc587f81511/langgraph_sdk-0.4.7.tar.gz", hash = "sha256:6827560be31e38daae1514234e9aa12c345dd40d4d4b94aa1b443729bfccda69", size = 350917, upload-time = "2026-10-12T22:54:05.573Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3a/2b/996e641d2020f30b25a523e8cc43f068406eb2b5b677190b3ca917cbbd05/langgraph_sdk-0.4.7-py3-none-any.whl", hash = "sha256:a005c7ac662c318a3405e436e9effaa90c05343f9f4ae9e11dca19c9369727dd", size = 162399, upload-time = "2026-10-12T22:54:04.224Z" }, +] + +[[package]] +name = "langsmith" +version = "0.12.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "distro" }, + { name = "httpx2" }, + { name = "orjson", marker = "platform_python_implementation != 'PyPy'" }, + { name = "packaging" }, + { name = "pydantic" }, + { name = "requests" }, + { name = "requests-toolbelt" }, + { name = "sniffio" }, + { name = "typing-extensions" }, + { name = "uuid-utils" }, + { name = "websockets" }, + { name = "xxhash" }, + { name = "zstandard" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1f/ab/53c8110164e52ae759d3fed27a24cf860c717995be3ab652cf4d671a2a60/langsmith-0.12.6.tar.gz", hash = "sha256:f16901a5be1539f8c789cd26391f1935886f4029bfaf465d82afde7f7cb464bb", size = 4890684, upload-time = "2026-09-16T17:35:09.174Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/73/03/e63610daca0bdadb6456648beea89e812f245293d39f2eb7287503e2f419/langsmith-0.12.6-py3-none-any.whl", hash = "sha256:5782b38dd259b2a6a1933dc9ca2beba4fb2899ad05e2ab10d61568dc49ce1d35", size = 768545, upload-time = "2026-09-16T17:35:07.252Z" }, +] + +[[package]] +name = "lazy-object-proxy" +version = "1.12.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/08/a2/69df9c6ba6d316cfd81fe2381e464db3e6de5db45f8c43c6a23504abf8cb/lazy_object_proxy-1.12.0.tar.gz", hash = "sha256:1f5a462d92fd0cfb82f1fab28b51bfb209fabbe6aabf7f0d51472c0c124c0c61", size = 43681, upload-time = "2025-08-22T13:50:06.783Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/01/b3/4684b1e128a87821e485f5a901b179790e6b5bc02f89b7ee19c23be36ef3/lazy_object_proxy-1.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1cf69cd1a6c7fe2dbcc3edaa017cf010f4192e53796538cc7d5e1fedbfa4bcff", size = 26656, upload-time = "2025-08-22T13:42:30.605Z" }, + { url = "https://files.pythonhosted.org/packages/3a/03/1bdc21d9a6df9ff72d70b2ff17d8609321bea4b0d3cffd2cea92fb2ef738/lazy_object_proxy-1.12.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:efff4375a8c52f55a145dc8487a2108c2140f0bec4151ab4e1843e52eb9987ad", size = 68832, upload-time = "2025-08-22T13:42:31.675Z" }, + { url = "https://files.pythonhosted.org/packages/3d/4b/5788e5e8bd01d19af71e50077ab020bc5cce67e935066cd65e1215a09ff9/lazy_object_proxy-1.12.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1192e8c2f1031a6ff453ee40213afa01ba765b3dc861302cd91dbdb2e2660b00", size = 69148, upload-time = "2025-08-22T13:42:32.876Z" }, + { url = "https://files.pythonhosted.org/packages/79/0e/090bf070f7a0de44c61659cb7f74c2fe02309a77ca8c4b43adfe0b695f66/lazy_object_proxy-1.12.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3605b632e82a1cbc32a1e5034278a64db555b3496e0795723ee697006b980508", size = 67800, upload-time = "2025-08-22T13:42:34.054Z" }, + { url = "https://files.pythonhosted.org/packages/cf/d2/b320325adbb2d119156f7c506a5fbfa37fcab15c26d13cf789a90a6de04e/lazy_object_proxy-1.12.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a61095f5d9d1a743e1e20ec6d6db6c2ca511961777257ebd9b288951b23b44fa", size = 68085, upload-time = "2025-08-22T13:42:35.197Z" }, + { url = "https://files.pythonhosted.org/packages/6a/48/4b718c937004bf71cd82af3713874656bcb8d0cc78600bf33bb9619adc6c/lazy_object_proxy-1.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:997b1d6e10ecc6fb6fe0f2c959791ae59599f41da61d652f6c903d1ee58b7370", size = 26535, upload-time = "2025-08-22T13:42:36.521Z" }, + { url = "https://files.pythonhosted.org/packages/0d/1b/b5f5bd6bda26f1e15cd3232b223892e4498e34ec70a7f4f11c401ac969f1/lazy_object_proxy-1.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8ee0d6027b760a11cc18281e702c0309dd92da458a74b4c15025d7fc490deede", size = 26746, upload-time = "2025-08-22T13:42:37.572Z" }, + { url = "https://files.pythonhosted.org/packages/55/64/314889b618075c2bfc19293ffa9153ce880ac6153aacfd0a52fcabf21a66/lazy_object_proxy-1.12.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:4ab2c584e3cc8be0dfca422e05ad30a9abe3555ce63e9ab7a559f62f8dbc6ff9", size = 71457, upload-time = "2025-08-22T13:42:38.743Z" }, + { url = "https://files.pythonhosted.org/packages/11/53/857fc2827fc1e13fbdfc0ba2629a7d2579645a06192d5461809540b78913/lazy_object_proxy-1.12.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:14e348185adbd03ec17d051e169ec45686dcd840a3779c9d4c10aabe2ca6e1c0", size = 71036, upload-time = "2025-08-22T13:42:40.184Z" }, + { url = "https://files.pythonhosted.org/packages/2b/24/e581ffed864cd33c1b445b5763d617448ebb880f48675fc9de0471a95cbc/lazy_object_proxy-1.12.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c4fcbe74fb85df8ba7825fa05eddca764138da752904b378f0ae5ab33a36c308", size = 69329, upload-time = "2025-08-22T13:42:41.311Z" }, + { url = "https://files.pythonhosted.org/packages/78/be/15f8f5a0b0b2e668e756a152257d26370132c97f2f1943329b08f057eff0/lazy_object_proxy-1.12.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:563d2ec8e4d4b68ee7848c5ab4d6057a6d703cb7963b342968bb8758dda33a23", size = 70690, upload-time = "2025-08-22T13:42:42.51Z" }, + { url = "https://files.pythonhosted.org/packages/5d/aa/f02be9bbfb270e13ee608c2b28b8771f20a5f64356c6d9317b20043c6129/lazy_object_proxy-1.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:53c7fd99eb156bbb82cbc5d5188891d8fdd805ba6c1e3b92b90092da2a837073", size = 26563, upload-time = "2025-08-22T13:42:43.685Z" }, + { url = "https://files.pythonhosted.org/packages/f4/26/b74c791008841f8ad896c7f293415136c66cc27e7c7577de4ee68040c110/lazy_object_proxy-1.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:86fd61cb2ba249b9f436d789d1356deae69ad3231dc3c0f17293ac535162672e", size = 26745, upload-time = "2025-08-22T13:42:44.982Z" }, + { url = "https://files.pythonhosted.org/packages/9b/52/641870d309e5d1fb1ea7d462a818ca727e43bfa431d8c34b173eb090348c/lazy_object_proxy-1.12.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:81d1852fb30fab81696f93db1b1e55a5d1ff7940838191062f5f56987d5fcc3e", size = 71537, upload-time = "2025-08-22T13:42:46.141Z" }, + { url = "https://files.pythonhosted.org/packages/47/b6/919118e99d51c5e76e8bf5a27df406884921c0acf2c7b8a3b38d847ab3e9/lazy_object_proxy-1.12.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be9045646d83f6c2664c1330904b245ae2371b5c57a3195e4028aedc9f999655", size = 71141, upload-time = "2025-08-22T13:42:47.375Z" }, + { url = "https://files.pythonhosted.org/packages/e5/47/1d20e626567b41de085cf4d4fb3661a56c159feaa73c825917b3b4d4f806/lazy_object_proxy-1.12.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:67f07ab742f1adfb3966c40f630baaa7902be4222a17941f3d85fd1dae5565ff", size = 69449, upload-time = "2025-08-22T13:42:48.49Z" }, + { url = "https://files.pythonhosted.org/packages/58/8d/25c20ff1a1a8426d9af2d0b6f29f6388005fc8cd10d6ee71f48bff86fdd0/lazy_object_proxy-1.12.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:75ba769017b944fcacbf6a80c18b2761a1795b03f8899acdad1f1c39db4409be", size = 70744, upload-time = "2025-08-22T13:42:49.608Z" }, + { url = "https://files.pythonhosted.org/packages/c0/67/8ec9abe15c4f8a4bcc6e65160a2c667240d025cbb6591b879bea55625263/lazy_object_proxy-1.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:7b22c2bbfb155706b928ac4d74c1a63ac8552a55ba7fff4445155523ea4067e1", size = 26568, upload-time = "2025-08-22T13:42:57.719Z" }, + { url = "https://files.pythonhosted.org/packages/23/12/cd2235463f3469fd6c62d41d92b7f120e8134f76e52421413a0ad16d493e/lazy_object_proxy-1.12.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4a79b909aa16bde8ae606f06e6bbc9d3219d2e57fb3e0076e17879072b742c65", size = 27391, upload-time = "2025-08-22T13:42:50.62Z" }, + { url = "https://files.pythonhosted.org/packages/60/9e/f1c53e39bbebad2e8609c67d0830cc275f694d0ea23d78e8f6db526c12d3/lazy_object_proxy-1.12.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:338ab2f132276203e404951205fe80c3fd59429b3a724e7b662b2eb539bb1be9", size = 80552, upload-time = "2025-08-22T13:42:51.731Z" }, + { url = "https://files.pythonhosted.org/packages/4c/b6/6c513693448dcb317d9d8c91d91f47addc09553613379e504435b4cc8b3e/lazy_object_proxy-1.12.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c40b3c9faee2e32bfce0df4ae63f4e73529766893258eca78548bac801c8f66", size = 82857, upload-time = "2025-08-22T13:42:53.225Z" }, + { url = "https://files.pythonhosted.org/packages/12/1c/d9c4aaa4c75da11eb7c22c43d7c90a53b4fca0e27784a5ab207768debea7/lazy_object_proxy-1.12.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:717484c309df78cedf48396e420fa57fc8a2b1f06ea889df7248fdd156e58847", size = 80833, upload-time = "2025-08-22T13:42:54.391Z" }, + { url = "https://files.pythonhosted.org/packages/0b/ae/29117275aac7d7d78ae4f5a4787f36ff33262499d486ac0bf3e0b97889f6/lazy_object_proxy-1.12.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a6b7ea5ea1ffe15059eb44bcbcb258f97bcb40e139b88152c40d07b1a1dfc9ac", size = 79516, upload-time = "2025-08-22T13:42:55.812Z" }, + { url = "https://files.pythonhosted.org/packages/19/40/b4e48b2c38c69392ae702ae7afa7b6551e0ca5d38263198b7c79de8b3bdf/lazy_object_proxy-1.12.0-cp313-cp313t-win_amd64.whl", hash = "sha256:08c465fb5cd23527512f9bd7b4c7ba6cec33e28aad36fbbe46bf7b858f9f3f7f", size = 27656, upload-time = "2025-08-22T13:42:56.793Z" }, + { url = "https://files.pythonhosted.org/packages/ef/3a/277857b51ae419a1574557c0b12e0d06bf327b758ba94cafc664cb1e2f66/lazy_object_proxy-1.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c9defba70ab943f1df98a656247966d7729da2fe9c2d5d85346464bf320820a3", size = 26582, upload-time = "2025-08-22T13:49:49.366Z" }, + { url = "https://files.pythonhosted.org/packages/1a/b6/c5e0fa43535bb9c87880e0ba037cdb1c50e01850b0831e80eb4f4762f270/lazy_object_proxy-1.12.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6763941dbf97eea6b90f5b06eb4da9418cc088fce0e3883f5816090f9afcde4a", size = 71059, upload-time = "2025-08-22T13:49:50.488Z" }, + { url = "https://files.pythonhosted.org/packages/06/8a/7dcad19c685963c652624702f1a968ff10220b16bfcc442257038216bf55/lazy_object_proxy-1.12.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fdc70d81235fc586b9e3d1aeef7d1553259b62ecaae9db2167a5d2550dcc391a", size = 71034, upload-time = "2025-08-22T13:49:54.224Z" }, + { url = "https://files.pythonhosted.org/packages/12/ac/34cbfb433a10e28c7fd830f91c5a348462ba748413cbb950c7f259e67aa7/lazy_object_proxy-1.12.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0a83c6f7a6b2bfc11ef3ed67f8cbe99f8ff500b05655d8e7df9aab993a6abc95", size = 69529, upload-time = "2025-08-22T13:49:55.29Z" }, + { url = "https://files.pythonhosted.org/packages/6f/6a/11ad7e349307c3ca4c0175db7a77d60ce42a41c60bcb11800aabd6a8acb8/lazy_object_proxy-1.12.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:256262384ebd2a77b023ad02fbcc9326282bcfd16484d5531154b02bc304f4c5", size = 70391, upload-time = "2025-08-22T13:49:56.35Z" }, + { url = "https://files.pythonhosted.org/packages/59/97/9b410ed8fbc6e79c1ee8b13f8777a80137d4bc189caf2c6202358e66192c/lazy_object_proxy-1.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:7601ec171c7e8584f8ff3f4e440aa2eebf93e854f04639263875b8c2971f819f", size = 26988, upload-time = "2025-08-22T13:49:57.302Z" }, + { url = "https://files.pythonhosted.org/packages/41/a0/b91504515c1f9a299fc157967ffbd2f0321bce0516a3d5b89f6f4cad0355/lazy_object_proxy-1.12.0-pp39.pp310.pp311.graalpy311-none-any.whl", hash = "sha256:c3b2e0af1f7f77c4263759c4824316ce458fabe0fceadcd24ef8ca08b2d1e402", size = 15072, upload-time = "2025-08-22T13:50:05.498Z" }, +] + +[[package]] +name = "librt" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/04/f5/9dc696772d241814bacac7880bac32f2930b5a6ebc1f85317b83161a011c/librt-0.16.0.tar.gz", hash = "sha256:ac38d6d8d66bf3d744148dbbc0b8e193e195a51e364ed55e224631f5721891fc", size = 219839, upload-time = "2026-09-29T00:55:32.891Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/0e/b04fd2d76b6a78a02286938251b2c119fb36ddece92c76cb4886ef7d44b8/librt-0.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fe4372c52d4849096c6cc1cda2817d293ec51440c890474ed59ef38d46556f18", size = 148058, upload-time = "2026-09-29T00:44:40.903Z" }, + { url = "https://files.pythonhosted.org/packages/a3/fc/e1ed24aadb32d38603c0c07f579d739eb4d90e64e90d525b024e4a999b4d/librt-0.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c72c5295a84bd249526da9bdca38f2e176d15c31c13bb0063c5053f4ca023421", size = 153073, upload-time = "2026-09-29T00:44:42.165Z" }, + { url = "https://files.pythonhosted.org/packages/be/38/133ab655409420e0c34a9a9836a7f4e5ae75fba758d7fe177099130d58ba/librt-0.16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be56ba9c884143495b517f23fe794ae367d58cd89ea0fdd6d437e3c024a87f9f", size = 493052, upload-time = "2026-09-29T00:44:44.043Z" }, + { url = "https://files.pythonhosted.org/packages/94/42/aaa663bc9421f5bf7bbbe9d3316d7219749698ec7688ac3b519770a89c04/librt-0.16.0-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:ef46c1a29ffb8c72e882e22618ec618778eacd0578fb22c6e7cf9c11d15f357b", size = 485506, upload-time = "2026-09-29T00:44:45.479Z" }, + { url = "https://files.pythonhosted.org/packages/7b/59/83a6eb5087ba8b45b083859e2085256963e06d4c2531944cdd962670bfb5/librt-0.16.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d3c94211ee0c4f8d649ec06b7c115c0ec4eadb873a0e3154ca15cef3f814b071", size = 498708, upload-time = "2026-09-29T00:44:46.916Z" }, + { url = "https://files.pythonhosted.org/packages/a0/e4/15a8d62b2bc12935080ec7277e2e0b9b233047781eb784a51d3e25af669a/librt-0.16.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:94aed6a8308818b91677957d1bd03188869cd7aeb23c5dba7912a6c0402f7602", size = 515981, upload-time = "2026-09-29T00:44:48.316Z" }, + { url = "https://files.pythonhosted.org/packages/46/4f/287cc282ac5dd815204c0779e79401bb0a568c3a1335fb319bf0838fb566/librt-0.16.0-cp311-cp311-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:349c0bcb87ebd07481b6ff781e25cdc699723dbe2212e57dabb27f7a13b7b87d", size = 508670, upload-time = "2026-09-29T00:44:49.726Z" }, + { url = "https://files.pythonhosted.org/packages/bf/5b/ab7292add898ade0d2b5b75d32a923aae315861671aa5c39f5491309f7ae/librt-0.16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:001bfd59a7d45b17e3e75f2a8c6405280b35e7b84471792778e718c4f368950e", size = 530393, upload-time = "2026-09-29T00:44:51.356Z" }, + { url = "https://files.pythonhosted.org/packages/7a/9e/8e6bcf027d4bcbc16a4e864b3d158a1d3e5f55ffa53af0238020cad89271/librt-0.16.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:28e038895b998d7a0c7798922ce8a1dc157675df5cf1c9ef0aca809ed804b7a1", size = 534302, upload-time = "2026-09-29T00:44:52.893Z" }, + { url = "https://files.pythonhosted.org/packages/96/a4/8c5ab4f3b3a8e905ff8305d76976a2e666f52fe049edd398aed2402beb36/librt-0.16.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:0dbe4096a7ecc00fa835d24510ad8545a4efef738dac96e0e63516783ccde905", size = 536150, upload-time = "2026-09-29T00:44:54.421Z" }, + { url = "https://files.pythonhosted.org/packages/ea/5e/7c4bc267e3cd4b8bd288de9f62d61fff203829c9cc649ea2aa12e9218cf0/librt-0.16.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:5cd5b092441053364af968ea12084692cb9d4a22f3ce9524e377880bf028761e", size = 514316, upload-time = "2026-09-29T00:44:55.998Z" }, + { url = "https://files.pythonhosted.org/packages/e0/75/c8bc6b50f43c73819334233f5a3259c81216742cef56d2140c3dd377c3f0/librt-0.16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3ddeb3c9dedb461bb457c6c7d9aa7fbf35329da313d1a7543d00c8d0f3473c96", size = 557731, upload-time = "2026-09-29T00:44:57.581Z" }, + { url = "https://files.pythonhosted.org/packages/93/fb/e241f91bc8de6c7ac1c6a20ea6dd381bc52312b44d711ffcd97140db1e57/librt-0.16.0-cp311-cp311-win32.whl", hash = "sha256:e05108e0849966f53a8d2d3112a7af881d0efaa479bc735bba91108f9f2350a7", size = 104922, upload-time = "2026-09-29T00:44:59.078Z" }, + { url = "https://files.pythonhosted.org/packages/d1/38/c892383d2bb1a6a80b2ec8ede84970a265a792c56614a06282bf3008517c/librt-0.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:5f49cff01bd608ef7d97104cb035c75455e79c2d70bf4a506cf773338ac1860d", size = 125093, upload-time = "2026-09-29T00:49:01.621Z" }, + { url = "https://files.pythonhosted.org/packages/e4/56/8bbde1ed0b21480163617648f638fdaec9374cf5e9c846ebcee34ec02a42/librt-0.16.0-cp311-cp311-win_arm64.whl", hash = "sha256:1d28ae980ae2218f9c5b95d191e947296f918c9bf0b400d467a9430275bbe678", size = 115910, upload-time = "2026-09-29T00:52:40.131Z" }, + { url = "https://files.pythonhosted.org/packages/ad/76/bbdaeb87b7c47b5c7343e90222b9bfa4e4a8a83f647e02933ad0129225b1/librt-0.16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fe52bf4641069e7978a14253b036cb9002def1926317e710f2e249f8a8c47742", size = 151028, upload-time = "2026-09-29T00:52:41.508Z" }, + { url = "https://files.pythonhosted.org/packages/fd/0c/ab8ed3dab0085931aec4a792c7eaac8dc6c5ff4691fda3a5360d9d8a9cd2/librt-0.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5bcc2c4726ced915b00de0c9856a4eeabfb3fddb93e10e0b8f735b7709358b6d", size = 155283, upload-time = "2026-09-29T00:52:42.873Z" }, + { url = "https://files.pythonhosted.org/packages/eb/36/494e79d460c80c1f030661e8287c9eca5e1ad652dc2b2180b6cd42abce0a/librt-0.16.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff7baa55f8e7c69851419e50a666015d02a74198716fd45c0125a2112e0a389f", size = 503185, upload-time = "2026-09-29T00:52:44.638Z" }, + { url = "https://files.pythonhosted.org/packages/9b/34/a8464038dd9db6e4381fa2b6eb73dc9a50888d77102c4c139304ac35cddc/librt-0.16.0-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:b95d5d92ab83d39e760a52091bb1baba664f3a2351e39b1e16801e5747c2f0e9", size = 496738, upload-time = "2026-09-29T00:52:46.441Z" }, + { url = "https://files.pythonhosted.org/packages/6a/53/e0e5e334ef0c6ed27039d323819368b9ef6712be87d55ee2bf9799398afd/librt-0.16.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b6d085d70bce51d43c5c7c36d63490770180d8779e71c49305c87b4213918de7", size = 513818, upload-time = "2026-09-29T00:52:48.068Z" }, + { url = "https://files.pythonhosted.org/packages/ad/f7/7ce72cbf19d0addd05090b339152fd0548a02562c2866a603e6e3b3da2df/librt-0.16.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:36e53948e99bbe3ffea257124cfcae1cfb01831555c9a9c903c9f9a72db7fd07", size = 531952, upload-time = "2026-09-29T00:52:49.816Z" }, + { url = "https://files.pythonhosted.org/packages/83/22/0b1bcb6a8e723c8b4fd60dfc8ae8ec6461c54073fbc8685efeb8d900d407/librt-0.16.0-cp312-cp312-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:54d11f726aae9df5a6ffbbf0a03a52449bbac84a53ef03669cb41cdfd4ae41bf", size = 524465, upload-time = "2026-09-29T00:52:51.354Z" }, + { url = "https://files.pythonhosted.org/packages/64/2e/e9c23b8b9df1813da1be205deca9606beb7ddd033972246cd426d05374a0/librt-0.16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4323193ac0cd025f85af531df8ba91bf24d1973b401697347a6282e8fd3fcf5e", size = 543191, upload-time = "2026-09-29T00:52:53.284Z" }, + { url = "https://files.pythonhosted.org/packages/bc/e5/6a8b21b342c03ed7e230fa3afbfd2edc58e6e87ef1f0d11fa2b9a748c252/librt-0.16.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e42f8e098b9c5396fefa05fb1cc7e33b0e08fc51da106b5de4a45fd22aac6743", size = 546979, upload-time = "2026-09-29T00:52:54.932Z" }, + { url = "https://files.pythonhosted.org/packages/84/9e/b5129023eced1be01e01c22757f53be551d463b1bb7264f787927404c1d6/librt-0.16.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:39ec1d5a14e37baf1450a6cabf03fe552340808bf1ad9d71824ab90117716459", size = 555317, upload-time = "2026-09-29T00:52:56.869Z" }, + { url = "https://files.pythonhosted.org/packages/71/89/28bba5938c725fe91f06bf93f7fa6c6b150229df53a87b454b0d5c2a796e/librt-0.16.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d1aabe3925cbb4a08d15b7b20ba4011b53019da0c4173a25155139b7b1baed65", size = 535846, upload-time = "2026-09-29T00:52:58.475Z" }, + { url = "https://files.pythonhosted.org/packages/22/92/63773026614f888c5d4e370e395ce42ca604b89f70b3acdfedbf94851b80/librt-0.16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:300c3ffdc459f4a779a8411ecb188e3ac0b1ff3a3a7b099642555dedae06c69b", size = 573700, upload-time = "2026-09-29T00:53:00.127Z" }, + { url = "https://files.pythonhosted.org/packages/66/8f/347d4677eefb57cd9f8e01d95a1dcee9a91b4e44e664173c32ff6f3752e5/librt-0.16.0-cp312-cp312-win32.whl", hash = "sha256:c17194318e4c0c0348b36f36c2ec7534436fe0a4c15582403162a4f08c80797a", size = 106158, upload-time = "2026-09-29T00:53:02.031Z" }, + { url = "https://files.pythonhosted.org/packages/f0/2c/5193dc81127cd5ddfad031391b046bf32dda219b38463ab872407ca30646/librt-0.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:25a58a19ea8d83b68209f04912df765e9260635ef77646542ed4b4abe6bc7940", size = 126176, upload-time = "2026-09-29T00:53:03.445Z" }, + { url = "https://files.pythonhosted.org/packages/ff/3d/9668a400c8dd81d162eba38b33fa49fa6205f1a64493570a13fbb815c3ee/librt-0.16.0-cp312-cp312-win_arm64.whl", hash = "sha256:f7be7cf555bc30ec12622e9447299cc4a9b8ff307548b634794353db0c2065dc", size = 116572, upload-time = "2026-09-29T00:53:04.815Z" }, + { url = "https://files.pythonhosted.org/packages/46/cd/ae5e0e9dba45d1399aa04a5395bcc0bead40d9fa06dc903634a7b4d7473d/librt-0.16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c5e6144e68b577f157519f2ba88ca20e3ed61c29b00e5cdfa76cd2d45acf059a", size = 151036, upload-time = "2026-09-29T00:53:06.284Z" }, + { url = "https://files.pythonhosted.org/packages/41/5a/48a16e323c5f9447a94cce7b59babf60fa04e62c3365ecf060c77ed8b320/librt-0.16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:33f41443a1f4e1f099331b3d8120e409fbff84b9760bc1cc9ea496f37ddaa5cc", size = 155211, upload-time = "2026-09-29T00:53:07.72Z" }, + { url = "https://files.pythonhosted.org/packages/3f/29/0f59299eb4251a409b2e690ad4b7d9f8a676db829d7817ec961f32b44f7e/librt-0.16.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7e510b7770bee609617a3374a96548eb114cae048023e3f049ee449e7ff2db32", size = 502587, upload-time = "2026-09-29T00:53:09.191Z" }, + { url = "https://files.pythonhosted.org/packages/de/ba/d6fb4ef8d1537c396079d72289f16be7cd35a366e5065c51253fea2760b6/librt-0.16.0-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:efc49c462d4516b8a58b00b490078fa64689fd1fe66970cc190131d7afb8027e", size = 496146, upload-time = "2026-09-29T00:53:11.016Z" }, + { url = "https://files.pythonhosted.org/packages/52/fc/8c50dd4d7cc97c0ee8f252c8a3104980f234391cf1519b554e8b9de08b60/librt-0.16.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:92caf82ebef5e12d21c72242b70d1e92536f1711cf2a727a4c276de4b4469087", size = 513336, upload-time = "2026-09-29T00:53:12.655Z" }, + { url = "https://files.pythonhosted.org/packages/a9/59/16c409c56f708eda2db9a0553662845d45e3871c77d70a240dae3f3bdc56/librt-0.16.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:17bac7f7a16b328fff77e440287693eb017abde913595b5827ebccbc21ecd8a6", size = 531689, upload-time = "2026-09-29T00:53:14.39Z" }, + { url = "https://files.pythonhosted.org/packages/88/82/d34772a6c29d1446dcca6e64d74062efd508523ab351aa16625a4689d5cc/librt-0.16.0-cp313-cp313-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5b976054553670829985ed767feb78fb6bcede0175327c4844dd5c281c1be659", size = 524537, upload-time = "2026-09-29T00:53:16.064Z" }, + { url = "https://files.pythonhosted.org/packages/77/8f/24c5631313746131ccee53bc91fdc8374f9cf25e0082a1fee9c93bb98acc/librt-0.16.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0058f9d68721094105917254c72ac0569117bb7b13b9769cf45d26d89f9d21cd", size = 543231, upload-time = "2026-09-29T00:53:17.939Z" }, + { url = "https://files.pythonhosted.org/packages/f2/cb/5f8e0d41dbd8b499c2265e939c31acc9ba59845565bf99539ad1c06aebcf/librt-0.16.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:30b7beaf3f4487b7d8adef1f158b49067cb4d5a19fa7a3bf31a4e7a820e435c5", size = 546499, upload-time = "2026-09-29T00:53:19.666Z" }, + { url = "https://files.pythonhosted.org/packages/be/61/063052de441d1385f59cea4223f184bf9e5d125de1ae3239b490aa1e486e/librt-0.16.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:468df902df016a06eb0e40b0747dc8d14e47d7a38b18b63b1fb167d85cb94d63", size = 555261, upload-time = "2026-09-29T00:53:21.292Z" }, + { url = "https://files.pythonhosted.org/packages/14/11/a2ada0529372268d6401afa9d457a095b68cd7753532b6f7f33049a19b43/librt-0.16.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:aea7b1f2b125dad5de85f049136651bff256c883c65e6b9209b2da0a1ac3cdef", size = 536029, upload-time = "2026-09-29T00:53:23.07Z" }, + { url = "https://files.pythonhosted.org/packages/23/9d/5bb6d38853382986dca702fc7e06c8256d30f5fa0676d882773b744610dc/librt-0.16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a8afb6557920860b7a3a596eb804cf37e09e7cf8a803db2478c202acc72d8c2e", size = 573748, upload-time = "2026-09-29T00:53:24.696Z" }, + { url = "https://files.pythonhosted.org/packages/99/f6/0025cde35ff7f607684dc775a2b2d732cce2561cec050a6ee1fb2e1fc6fe/librt-0.16.0-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:77c7a2b4fe2c1369e0d5aa1cade26740a7b14be32fbc9a5535d617d20065c39d", size = 79861, upload-time = "2026-09-29T00:53:26.089Z" }, + { url = "https://files.pythonhosted.org/packages/93/93/303b8592909bd583f83f02818ffbea3f7647ca1e22b1cd5465d04b8145fe/librt-0.16.0-cp313-cp313-win32.whl", hash = "sha256:02d89c813d5ff74b17df72d3a34819d132cd168e56b81bf755b809bd9e46b8c4", size = 106236, upload-time = "2026-09-29T00:53:27.43Z" }, + { url = "https://files.pythonhosted.org/packages/cf/24/80bbb463c60ed18e29cb26aba386ddb76609580e4e7160710e550587018c/librt-0.16.0-cp313-cp313-win_amd64.whl", hash = "sha256:14ed6ebe3e4f85f326d7920011ad30ff49ed9334e62cf88caef9ba973d9e3a92", size = 126180, upload-time = "2026-09-29T00:53:28.7Z" }, + { url = "https://files.pythonhosted.org/packages/43/80/b1a6fbdd7da825cdd55c71aa81eb6cfa82c513c360774152eacb50b4a771/librt-0.16.0-cp313-cp313-win_arm64.whl", hash = "sha256:83d4041a3d9b2fd053a8a4e1f22878b3e5833e2712956382d5c048d791454e91", size = 116557, upload-time = "2026-09-29T00:53:30.012Z" }, + { url = "https://files.pythonhosted.org/packages/1e/93/9e0cf7da129a93c3dc7f45bc3cd4a660f2aaa995aa8a6f95c2583ef41239/librt-0.16.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:931a0bb0fcac88f263e269e46eb30ba8e21402cd3c62ca40cb97034c0693fab1", size = 149844, upload-time = "2026-09-29T00:53:31.391Z" }, + { url = "https://files.pythonhosted.org/packages/8f/26/8a90d2a8f2b2e471bb486b7aec117b8ae622715ed6c39853aec48ea20073/librt-0.16.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1bc17e54e5305f8d40b7ca203671ff5a9e59c1d0f8ea0f625dcca53a3984de11", size = 154111, upload-time = "2026-09-29T00:53:32.718Z" }, + { url = "https://files.pythonhosted.org/packages/35/ce/67abb46258da4d3e42ff5b141db6f38c59357bef84c7979f183b22f924f1/librt-0.16.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:877698bf6bca5721d8be345f2fe09778e40ecadea8b58c73075f2b1a53666bf2", size = 494234, upload-time = "2026-09-29T00:53:34.466Z" }, + { url = "https://files.pythonhosted.org/packages/12/f9/ea7162414a16f8f1bbd3b493ad6d22b926c5471916e078350bdbca8c4e5f/librt-0.16.0-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:5981c011b306781ce561e18e14230a14524a3d8109b97553666c942c18f31a96", size = 491173, upload-time = "2026-09-29T00:53:36.124Z" }, + { url = "https://files.pythonhosted.org/packages/b1/09/9b3e869060dd33f9989b80ba4fea306f6db8cecefcdfe6d7346ef0603f65/librt-0.16.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:afced3dfc17cd805ecf7a3d77996a71cf5f2c75aa66eb0c21a9930f4fc992f86", size = 505547, upload-time = "2026-09-29T00:53:37.686Z" }, + { url = "https://files.pythonhosted.org/packages/50/07/79007d2165f649ea93e08c0962d1d62c70af9cde77965255095bf9d96f9a/librt-0.16.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ca8052401c55d7511dda6760719fda7618067e83535d7d0010096d216c34b667", size = 523057, upload-time = "2026-09-29T00:53:39.301Z" }, + { url = "https://files.pythonhosted.org/packages/61/0c/8fbaff66d0ba376d8864653f5acce1569bae27e89648671f26f7eca67ab8/librt-0.16.0-cp314-cp314-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1e511762a074005bb0aa569166779834e75e438370226930d0ce1866d4b6a33b", size = 515158, upload-time = "2026-09-29T00:53:41.012Z" }, + { url = "https://files.pythonhosted.org/packages/df/2e/23ff0dece76f07a4124413a57682efa0bbeb5765ac0122bc0955513f82ca/librt-0.16.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f1e8591bd8a5a628cd7f07954c6a1592359a878bf032957a8e9057a41d644311", size = 534183, upload-time = "2026-09-29T00:53:42.451Z" }, + { url = "https://files.pythonhosted.org/packages/26/c4/e11dea21d9a29486eba78887380374189d472734fa32cc50cb37ca44d3d0/librt-0.16.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:a4aaefb4ba6c07e1aeebb2795c8958148f1d6f9af3b555b53d23d766edb6d67a", size = 540663, upload-time = "2026-09-29T00:53:44.272Z" }, + { url = "https://files.pythonhosted.org/packages/44/75/e873ae158a8b7f5359be33e7fd6c1fbe02d9a78a3e89a77de6b0e837f476/librt-0.16.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:d92db7a0f6aee44f1baee94750457e8d2d1c6ccea41842de6268d34e8dc7eddd", size = 545908, upload-time = "2026-09-29T00:53:45.812Z" }, + { url = "https://files.pythonhosted.org/packages/ba/36/8939d3f6a93e11bd9592e6fe28d2b44f1c2dc4bed6e22e72359a91e18ffb/librt-0.16.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:378dfaffb38e59c24a87cde5713cd865d51ff7383fa12947f3907f306ea1ca55", size = 523302, upload-time = "2026-09-29T00:53:47.596Z" }, + { url = "https://files.pythonhosted.org/packages/71/14/35309f44a077f0f42ade0e2e7cd88c0cea760c661af205c01ea90d3c0e1f/librt-0.16.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:3e0c39bdc85370422e8b637be76eb1fd07d30967551b03e62267dd156f553152", size = 565911, upload-time = "2026-09-29T00:53:49.278Z" }, + { url = "https://files.pythonhosted.org/packages/78/0c/df6255b94967f3159ebc46f08d8e783c12da6ee269ddb74b2efed63c640c/librt-0.16.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:1b384b90ab79a7bc30b566895809a636e0666f21f3cf12b54823d025b7e83839", size = 79119, upload-time = "2026-09-29T00:53:50.938Z" }, + { url = "https://files.pythonhosted.org/packages/6b/44/d30d5a5461378c9d33f36736c6791c3b4c4ba4b1ffe0da7350aedcb2c9a0/librt-0.16.0-cp314-cp314-win32.whl", hash = "sha256:52327da75a94012e7f932f913d20d3876bed3c102be00e6c3e8600ff7bdd58a7", size = 100140, upload-time = "2026-09-29T00:53:52.205Z" }, + { url = "https://files.pythonhosted.org/packages/c2/98/769712f356a1e897df3581bb0c3100375d054a000de26099360ea65b5111/librt-0.16.0-cp314-cp314-win_amd64.whl", hash = "sha256:3f0b8114c44b2ac06ff5dacd08e07e8e807ff4f46083f2a1602685122559be41", size = 120464, upload-time = "2026-09-29T00:53:53.495Z" }, + { url = "https://files.pythonhosted.org/packages/bf/d3/ae2abccc8bdc8b063c1613a77686e17b74e9d3d60cfe6f12c63fa2821b9f/librt-0.16.0-cp314-cp314-win_arm64.whl", hash = "sha256:8caf96a4ef8fb27d0ac0d1ad8337d26a240acd4a02fe4345d0a8f264753e8f99", size = 110889, upload-time = "2026-09-29T00:53:54.817Z" }, + { url = "https://files.pythonhosted.org/packages/e4/26/0737d4be058dd6376eade7dd8b380d4b869b6394cee929393a5a431c45bb/librt-0.16.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:953107e2f68d0f3512c48f898b0dbf0ce5cc52bba0f318d847c985dc555ee4cc", size = 159838, upload-time = "2026-09-29T00:53:56.22Z" }, + { url = "https://files.pythonhosted.org/packages/01/96/9bc96531d7c620e9949af904470f02e3fa8f35129ab8e8f281c51eaa3788/librt-0.16.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ad37d5b9abd49c9a655dcda7ea52a8a752884062ef1ee71ae17c2f2a0f81fe6a", size = 162018, upload-time = "2026-09-29T00:53:57.532Z" }, + { url = "https://files.pythonhosted.org/packages/0e/fa/b0289dcb186eb3f97221ba00da5f4bd3ba7fa5e99752d48aa8d336615334/librt-0.16.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2c4aa329c17bd1aaea4f6e89335d8ccd494b3a5830b6654462273e50e11023f0", size = 703983, upload-time = "2026-09-29T00:53:59.024Z" }, + { url = "https://files.pythonhosted.org/packages/d9/ab/05ebbbde7530fc5eeb58fbd1581522a9f64f132fa703c4c595eed6e14760/librt-0.16.0-cp314-cp314t-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:0ead24d2562a49473dddd9efef8581f020007eb0054389c3ee3ffad38b1ca4c9", size = 683847, upload-time = "2026-09-29T00:54:00.671Z" }, + { url = "https://files.pythonhosted.org/packages/a3/75/f52aeecd4dbadbddf80725ba7de126d8bd5d0eb66247eae17a81ed90dd4d/librt-0.16.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:02118f56a9c36ddd07dfd9b919d9ecc117ba20a90987d56aa4c429fa34509188", size = 698045, upload-time = "2026-09-29T00:54:02.247Z" }, + { url = "https://files.pythonhosted.org/packages/e6/55/fa277a835cd6eb42380591ceb85f48c5b4d2b2d7e2cb9869e1e17d24d237/librt-0.16.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4e29522c62e28595ff7e324c6834ade51127707f0e255b18d1c1cf03d39c1048", size = 724640, upload-time = "2026-09-29T00:54:04.078Z" }, + { url = "https://files.pythonhosted.org/packages/25/e4/2cf64354f3fde8ebd591b3b48f96510bee24ac5f7d1e567adbbe210abdbd/librt-0.16.0-cp314-cp314t-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3ff4b2367926b69c6215635902cccb04048e73094e9862900d27cb2c6bbff143", size = 731748, upload-time = "2026-09-29T00:54:05.741Z" }, + { url = "https://files.pythonhosted.org/packages/f8/c9/c180af3e94e01aa529fa93d7733fec2abc47f222345400cf21d5481d5f8a/librt-0.16.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c6f1b27bf1632a7e016af9f145f82be95e1edd7721a646505c21059257cb5a04", size = 754960, upload-time = "2026-09-29T00:54:07.38Z" }, + { url = "https://files.pythonhosted.org/packages/95/d6/01073aa78c58f356b10d9c57b3fe9abb143df338142bcd316df417b89db0/librt-0.16.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:5696d7f52e7b37217cb3a8f92c744fe835942602fdd4c1a8bc4741d3bfdce15e", size = 747000, upload-time = "2026-09-29T00:54:09.06Z" }, + { url = "https://files.pythonhosted.org/packages/f7/d8/1de3783908658d697a8cfc00582f61299ffba7796d7260c112e4700b1109/librt-0.16.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:6072e92dd876ff6ceeb6cf371e35e51f479349837391341f479b08df4564242b", size = 749569, upload-time = "2026-09-29T00:54:10.702Z" }, + { url = "https://files.pythonhosted.org/packages/b7/32/e817f66c96d6caa8bb8435ff93c4c220624d59efc506be59ab98fcd01d0c/librt-0.16.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:39ca4f2f2fe05de8e63493da592d84311adabe5bef52b193851981da9816b302", size = 729483, upload-time = "2026-09-29T00:54:12.25Z" }, + { url = "https://files.pythonhosted.org/packages/7c/c9/23992ccd2b9d22798fdd0f61353183a47414e651da782ad83eb680f50833/librt-0.16.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f9807485a908f00355820f18e91e045ffdcdc5adb68aaec40a1e2b88c5f7bba1", size = 776584, upload-time = "2026-09-29T00:54:13.837Z" }, + { url = "https://files.pythonhosted.org/packages/67/3b/e8af957f08e6e2e8e566b099e43d2748418aa565df6ee1d9d3331209fdfe/librt-0.16.0-cp314-cp314t-win32.whl", hash = "sha256:94be5cb7bca4df6201f4183e9e4fa2086c655283d20b38cd84500a69057575a7", size = 104402, upload-time = "2026-09-29T00:54:15.568Z" }, + { url = "https://files.pythonhosted.org/packages/ca/1c/946e6443d7cd32347a086043395e421e52fd603c9163d2ec970ceab8eed6/librt-0.16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d46ca272b251d033dd4527b0dec5f261a28a52bd5fa0f99c117b0a1f8588cc2d", size = 126227, upload-time = "2026-09-29T00:54:17.165Z" }, + { url = "https://files.pythonhosted.org/packages/c2/a3/bc4f9959d3c62bcbf9e5fd3470a8bbd8bf33224ed4c25d7fba173201b8ac/librt-0.16.0-cp314-cp314t-win_arm64.whl", hash = "sha256:b9d6d4b14e92d876f8026b54c20c445f36425214c1081dc76f74e40db386b82b", size = 116493, upload-time = "2026-09-29T00:54:18.567Z" }, + { url = "https://files.pythonhosted.org/packages/b6/4b/10fdb42dfab4c1533e1570e686b18e86ff4328b406361b39fb3016667638/librt-0.16.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:6fe436af2eaf630474f491af5d032cbe45f93fcff5c3b9fe4ab194a7255b20ff", size = 149829, upload-time = "2026-09-29T00:54:19.933Z" }, + { url = "https://files.pythonhosted.org/packages/8e/30/a90ca13f1d3d91af1680000a4038536907018fbd51764767287a05d28b8b/librt-0.16.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:8ff5d26c529336be9bd7ae04483235d77778ee7d6444a95353102b542601ce81", size = 154522, upload-time = "2026-09-29T00:54:21.306Z" }, + { url = "https://files.pythonhosted.org/packages/5c/dd/bcf364eacfa070bb1fc88d503111ae7177914197ba1fa717c748926e7930/librt-0.16.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:909d8e3c1faee44cb762b1c519ff8613dcc5ceae5c99987a00917b5a31fd1d6a", size = 497593, upload-time = "2026-09-29T00:54:22.798Z" }, + { url = "https://files.pythonhosted.org/packages/18/c1/2c4e81e347bdabfe8346bfc6dc37ae5e154d61c88e30848ec0606025a5e0/librt-0.16.0-cp315-cp315-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:6d4a64283ee61824b5790de882bc68e2d9d7a5143537cb7a966f7354f71646d4", size = 480459, upload-time = "2026-09-29T00:54:24.364Z" }, + { url = "https://files.pythonhosted.org/packages/ab/d7/fef2a3cb8400701be496f6e459876f650b3451f407e30cb243de571ae615/librt-0.16.0-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5810ba811297fdf37a1531a57667cb8ace0842013ca8606bf9eb7c24cf4be154", size = 507814, upload-time = "2026-09-29T00:54:25.997Z" }, + { url = "https://files.pythonhosted.org/packages/e1/6f/53762927a32e9dc9eb1d1c1f3528da281290c86d96929a8af652f671266e/librt-0.16.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e56aaf8c167548dc8e5d6f3bd0f48dcdd299a23c73be3f744aab79d99e9c7f5d", size = 525114, upload-time = "2026-09-29T00:54:27.747Z" }, + { url = "https://files.pythonhosted.org/packages/6c/67/0b9d031f303c4e8c691a9a8ef9d272f13b530c11cc563b819df621b6a348/librt-0.16.0-cp315-cp315-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8f36c58e33b304b525c6c9c5076399c6ebf1109e17b9051a05a407b091b9215b", size = 520465, upload-time = "2026-09-29T00:54:29.331Z" }, + { url = "https://files.pythonhosted.org/packages/ae/d5/2056a3a85864e882eb17a203a10ddb26fa748bc9718ec67e79059ab46cae/librt-0.16.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:242e00b3d4fa37c3d3c1ca5f5c9adb7d909ddb1eac9c41f2787320d00caa0af2", size = 537257, upload-time = "2026-09-29T00:54:30.915Z" }, + { url = "https://files.pythonhosted.org/packages/54/57/e0d79790c163cbc0909e209a6f62e30bb713b647f905a176cdc64848fd4d/librt-0.16.0-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:0253721561787b8df8443eb347b7a6461015354e5bdd37ee38a41fef220d2bb0", size = 527442, upload-time = "2026-09-29T00:54:32.478Z" }, + { url = "https://files.pythonhosted.org/packages/aa/50/1c0c95aba7af51f4752ea34fbf2eb79b36e7cae3a72536248e8c735de735/librt-0.16.0-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:3e483a8d69ede8067db70c0e83007423b6925de6fd53afed01d66160f2e9398c", size = 548139, upload-time = "2026-09-29T00:54:34.183Z" }, + { url = "https://files.pythonhosted.org/packages/98/91/a8a43dd5138d4f55f88846b8f0c85454a4fad69952cebfcff9948f831290/librt-0.16.0-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:69ba927445cfaaffb4081003ef5224c55a5c2ab67ef956f416ef744916e44121", size = 529708, upload-time = "2026-09-29T00:54:35.761Z" }, + { url = "https://files.pythonhosted.org/packages/2d/41/d5226881ab2b7c20d9d587b37bdd4a0ec8775a96d00ca87ac9f385587db4/librt-0.16.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:d6a365f2ab45a984d0e00eee0dd17f599ceab8cadab6ea07b6111c8132fc0e42", size = 567781, upload-time = "2026-09-29T00:54:37.409Z" }, + { url = "https://files.pythonhosted.org/packages/bb/bf/2345ba57a626e8c78c4ddcc724636a8df5a593fe46c1ee76bbf477e32b0d/librt-0.16.0-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:f01f3805f2dae4781c0c34b440e31740d082950bdaf89a6f601ad589a28af57a", size = 79177, upload-time = "2026-09-29T00:54:38.792Z" }, + { url = "https://files.pythonhosted.org/packages/1e/40/99e77936cc9207f629b077bf7cbc5e2f0827cddd7c29792f04ef881bd2c3/librt-0.16.0-cp315-cp315-win32.whl", hash = "sha256:b0e3e721c75d2e79a76d4422c79d7ba705fe1bbafec907037fe7a657a480a0e3", size = 100127, upload-time = "2026-09-29T00:54:40.251Z" }, + { url = "https://files.pythonhosted.org/packages/56/1e/801fe26bc622061b9dfd010e166d94142cb774b733217e6d98d1c0cf2638/librt-0.16.0-cp315-cp315-win_amd64.whl", hash = "sha256:bc02954b1295de798bbdb0b4e2d8a28c2117de8b5c73dcbeb27dc32572dfb971", size = 120480, upload-time = "2026-09-29T00:54:41.722Z" }, + { url = "https://files.pythonhosted.org/packages/bb/a9/d533983055bd36e112627384c2c038845d1df882540b8bcefb566475640b/librt-0.16.0-cp315-cp315-win_arm64.whl", hash = "sha256:c5db585d43449a5f54303d4b2774e45e1babd975cfe1630a3d708c0b80c3e560", size = 110915, upload-time = "2026-09-29T00:54:43.052Z" }, + { url = "https://files.pythonhosted.org/packages/55/fe/d62238fa9c653b0e0613290349467cb65711b5800e8e474f45e942a0ad95/librt-0.16.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:f06c689cb14afd9b612727553a5ec5a40febf113ca41c4413a2b0b334285884b", size = 159714, upload-time = "2026-09-29T00:54:44.497Z" }, + { url = "https://files.pythonhosted.org/packages/f3/ac/f31efe7818700be72ba4f9af8a80fa67c39808c8d26dacc55dc1f6f35172/librt-0.16.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:13b4e8aba90b0b1c82474e9844aa9ffe7ad3faa484350e1da64cb8188d903134", size = 162086, upload-time = "2026-09-29T00:54:45.968Z" }, + { url = "https://files.pythonhosted.org/packages/d9/16/4d7487bf86a9d7e8e18f37ba5538789233ea693637379b75701bd35ec9de/librt-0.16.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5a269c46ae327d8e6f8c1f85f7516cb52c0fa48127565a1105a4f4a05ff2a0b4", size = 712727, upload-time = "2026-09-29T00:54:47.486Z" }, + { url = "https://files.pythonhosted.org/packages/77/74/50cd550ccc1a517b9ed62347625c01ddf8c4afad66490312677c011458f6/librt-0.16.0-cp315-cp315t-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:a33e0dae1f8592146a4764d54ce842b278732d21a84e17c3bbe6b1bc158a2248", size = 681106, upload-time = "2026-09-29T00:54:49.126Z" }, + { url = "https://files.pythonhosted.org/packages/df/5d/7293f712975ee6fdd2251411fd9ef1c62bc99c7b83ecbe62dbc999b1fab7/librt-0.16.0-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:47ada6ea32636492c61aa8ad27ae3b9404bfe7a97e3ba946d1984236cc741da0", size = 705921, upload-time = "2026-09-29T00:54:50.905Z" }, + { url = "https://files.pythonhosted.org/packages/67/f7/8aab946f11d59d1bece9ffc65d994b200c789a8ca5a95c17e17e609f912a/librt-0.16.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c43bd6e642d8a248c114327f98dd25ac5a7cb5aa168ef02f0559b91874df16b8", size = 731786, upload-time = "2026-09-29T00:54:52.584Z" }, + { url = "https://files.pythonhosted.org/packages/43/76/1c42ab31e7cb8384ebf6d3af607213c495222474f4940443ae7639ab7685/librt-0.16.0-cp315-cp315t-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c3d1bb7841a816ace6449bb26d3f9560dbfa20e71c568d23f0f62bf1e68f50b1", size = 744964, upload-time = "2026-09-29T00:54:54.217Z" }, + { url = "https://files.pythonhosted.org/packages/6f/2e/4b19982d933d2dfced671e840b219e4c1cd3f507df6e6dabb51bbd4e3850/librt-0.16.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:3931f7a3db322e7f44e02a280e3949326ce9579ad388ee8d691dc7c76da9fb70", size = 765305, upload-time = "2026-09-29T00:54:55.815Z" }, + { url = "https://files.pythonhosted.org/packages/b8/1b/e872583de2dcb3ac7746e7a2321aeeb168274f3952a87dc66e05ddb29faf/librt-0.16.0-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:f4462528b6000afe8f16907b5c7c2553abf1df005ba5140e6eb394541c3624c3", size = 744959, upload-time = "2026-09-29T00:54:57.532Z" }, + { url = "https://files.pythonhosted.org/packages/10/de/a18c6bcfb297af2674233e90b3c3661c3a0af0f1434a0c966d2ef708a835/librt-0.16.0-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:80039ba9b6a7d5f1a0175a4cca6bbefead87bd854c80abad1cb30afe47a830db", size = 758138, upload-time = "2026-09-29T00:54:59.484Z" }, + { url = "https://files.pythonhosted.org/packages/22/1c/0df1d732539c297bb1a093e1fe3204d2faf76a9022cf4e1d1c2fce059790/librt-0.16.0-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:7a1d272724b581bb6bc769dfdafed6da2ecc9886ba2450311de55a4ac2e1e9cd", size = 744268, upload-time = "2026-09-29T00:55:01.179Z" }, + { url = "https://files.pythonhosted.org/packages/a2/f7/ccaf31331f20c91a5bd9bd48ffc3f743f9c81bb5720cc7b2a720ca204f0a/librt-0.16.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:fbe4fb8c5445f7496d7f7f6bb0807875d09d47e6771ffa175fb2df2895fb86ba", size = 785783, upload-time = "2026-09-29T00:55:02.938Z" }, + { url = "https://files.pythonhosted.org/packages/c1/ea/7421d9e6db894cd6cd788b604b3394a163ded6b942052b6f96c23ccf08e1/librt-0.16.0-cp315-cp315t-win32.whl", hash = "sha256:375bfe6b572a8f6cfc398709356046173bf27e64c4c5edaf5f7062f051fb4bf9", size = 104355, upload-time = "2026-09-29T00:55:04.533Z" }, + { url = "https://files.pythonhosted.org/packages/85/6d/7c31a506eb847bc58aeb2402d58e17605e821f68ab5df5e66fe274a6df41/librt-0.16.0-cp315-cp315t-win_amd64.whl", hash = "sha256:bd3150023d3dc2bc70f3784e59ffa1140d56ddba3d8125b3d6f9f85221279bfc", size = 126134, upload-time = "2026-09-29T00:55:06.017Z" }, + { url = "https://files.pythonhosted.org/packages/36/69/7a5d10ac409c4da0355e054a14371871da9b5557fcc42772cd00181c6cce/librt-0.16.0-cp315-cp315t-win_arm64.whl", hash = "sha256:8ceafb70f2a4f0826f11031942e59c0728fd98da112dc346d4352bde1e486866", size = 116391, upload-time = "2026-09-29T00:55:07.484Z" }, ] [[package]] name = "lunr" -version = "0.7.0.post1" +version = "0.8.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/8b/92/885c5e6251b76d3a171ff757a4e167cbb44c02fd9aff67b545a246778a6a/lunr-0.7.0.post1.tar.gz", hash = "sha256:00fc98f59b53c7ee0f6384c99e6c099f28cb746ecfff865bbc3705c3e9104bda", size = 1146070, upload-time = "2023-08-16T16:51:34.135Z" } +sdist = { url = "https://files.pythonhosted.org/packages/43/e9/b3dee02312eaa2a1b3212b6e20a90a81adba489b404d4f0ffbbe8258b761/lunr-0.8.0.tar.gz", hash = "sha256:b46cf5059578d277a14bfc901bb3d5666d013bf73c035331ac0222fdac358228", size = 1147598, upload-time = "2025-03-08T13:31:40.907Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/51/6c/9209b793fc98f9211846f3b2ec63e0780d30c26b9a0f2985100430dcd238/lunr-0.7.0.post1-py3-none-any.whl", hash = "sha256:77cce585d195d412cff362698799c9571ff3e285fc6bd8816ecbc9ec82dbb368", size = 35209, upload-time = "2023-08-16T16:51:31.589Z" }, + { url = "https://files.pythonhosted.org/packages/6c/8b/bf975fabd26195915ebdf3e4252baa936f1863bcd9eb49598b705638f5d5/lunr-0.8.0-py3-none-any.whl", hash = "sha256:a2bc4e08dbb35b32723006bf2edbe6dc1f4f4b95955eea0d23165a184d276ce8", size = 35211, upload-time = "2025-03-08T13:31:38.657Z" }, ] [[package]] name = "markdown-it-py" -version = "4.0.0" +version = "4.2.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "mdurl" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3", size = 73070, upload-time = "2025-08-11T12:57:52.854Z" } +sdist = { url = "https://files.pythonhosted.org/packages/06/ff/7841249c247aa650a76b9ee4bbaeae59370dc8bfd2f6c01f3630c35eb134/markdown_it_py-4.2.0.tar.gz", hash = "sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49", size = 82454, upload-time = "2026-05-07T12:08:28.36Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/94/54/e7d793b573f298e1c9013b8c4dade17d481164aa517d1d7148619c2cedbf/markdown_it_py-4.0.0-py3-none-any.whl", hash = "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", size = 87321, upload-time = "2025-08-11T12:57:51.923Z" }, + { url = "https://files.pythonhosted.org/packages/b3/81/4da04ced5a082363ecfa159c010d200ecbd959ae410c10c0264a38cac0f5/markdown_it_py-4.2.0-py3-none-any.whl", hash = "sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a", size = 91687, upload-time = "2026-05-07T12:08:27.182Z" }, ] [[package]] name = "markupsafe" -version = "3.0.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e8/4b/3541d44f3937ba468b75da9eebcae497dcf67adb65caa16760b0a6807ebb/markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559", size = 11631, upload-time = "2025-09-27T18:36:05.558Z" }, - { url = "https://files.pythonhosted.org/packages/98/1b/fbd8eed11021cabd9226c37342fa6ca4e8a98d8188a8d9b66740494960e4/markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419", size = 12057, upload-time = "2025-09-27T18:36:07.165Z" }, - { url = "https://files.pythonhosted.org/packages/40/01/e560d658dc0bb8ab762670ece35281dec7b6c1b33f5fbc09ebb57a185519/markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695", size = 22050, upload-time = "2025-09-27T18:36:08.005Z" }, - { url = "https://files.pythonhosted.org/packages/af/cd/ce6e848bbf2c32314c9b237839119c5a564a59725b53157c856e90937b7a/markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591", size = 20681, upload-time = "2025-09-27T18:36:08.881Z" }, - { url = "https://files.pythonhosted.org/packages/c9/2a/b5c12c809f1c3045c4d580b035a743d12fcde53cf685dbc44660826308da/markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c", size = 20705, upload-time = "2025-09-27T18:36:10.131Z" }, - { url = "https://files.pythonhosted.org/packages/cf/e3/9427a68c82728d0a88c50f890d0fc072a1484de2f3ac1ad0bfc1a7214fd5/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f", size = 21524, upload-time = "2025-09-27T18:36:11.324Z" }, - { url = "https://files.pythonhosted.org/packages/bc/36/23578f29e9e582a4d0278e009b38081dbe363c5e7165113fad546918a232/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6", size = 20282, upload-time = "2025-09-27T18:36:12.573Z" }, - { url = "https://files.pythonhosted.org/packages/56/21/dca11354e756ebd03e036bd8ad58d6d7168c80ce1fe5e75218e4945cbab7/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1", size = 20745, upload-time = "2025-09-27T18:36:13.504Z" }, - { url = "https://files.pythonhosted.org/packages/87/99/faba9369a7ad6e4d10b6a5fbf71fa2a188fe4a593b15f0963b73859a1bbd/markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa", size = 14571, upload-time = "2025-09-27T18:36:14.779Z" }, - { url = "https://files.pythonhosted.org/packages/d6/25/55dc3ab959917602c96985cb1253efaa4ff42f71194bddeb61eb7278b8be/markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8", size = 15056, upload-time = "2025-09-27T18:36:16.125Z" }, - { url = "https://files.pythonhosted.org/packages/d0/9e/0a02226640c255d1da0b8d12e24ac2aa6734da68bff14c05dd53b94a0fc3/markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1", size = 13932, upload-time = "2025-09-27T18:36:17.311Z" }, - { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, - { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, - { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, - { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" }, - { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" }, - { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" }, - { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" }, - { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" }, - { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" }, - { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" }, - { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" }, - { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, - { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, - { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, - { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, - { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, - { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, - { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, - { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, - { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, - { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, - { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, - { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, - { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, - { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, - { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, - { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, - { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, - { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, - { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, - { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, - { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, - { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, - { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, - { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, - { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, - { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, - { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, - { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, - { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, - { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, - { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, - { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, - { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, - { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" }, - { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" }, - { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" }, - { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" }, - { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" }, - { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" }, - { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" }, - { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" }, - { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" }, - { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" }, - { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" }, - { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" }, - { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" }, - { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" }, - { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" }, - { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" }, - { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" }, - { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" }, - { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" }, - { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" }, - { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" }, - { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, +version = "3.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777, upload-time = "2026-10-02T23:07:22.29Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/32/55/18dbb4778b30ada5ce071608503cc3edc9e14e13d868c17a6d178fc30f7a/markupsafe-3.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9e25feb9e330b63edb0278a0acdf85e50d0cb0fbf49c3084abbe4e24ae195346", size = 11520, upload-time = "2026-10-02T23:04:36.299Z" }, + { url = "https://files.pythonhosted.org/packages/6c/14/0b05f79b4733e264a18d08fe08fa1df7347630ff32a6cb82180d9dccec55/markupsafe-3.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7d3391b2188d18737cb2fa147028b1096236eaa7e156446c650a489fa2cadc91", size = 12063, upload-time = "2026-10-02T23:04:37.291Z" }, + { url = "https://files.pythonhosted.org/packages/ca/3a/63ba10b6c1463216b3e4df669a9f0e5a3b0c3071557d2e8229e3968c79fb/markupsafe-3.0.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:849dd2bb0e5e4ab2b71c7191726a4a8d5aa8a610daa584728cbee0b710ddc4ef", size = 24321, upload-time = "2026-10-02T23:04:38.262Z" }, + { url = "https://files.pythonhosted.org/packages/1a/2e/5f015261b76ad633d187ef6f388b413aedd64a8773c4df59e530a0be5525/markupsafe-3.0.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:befb4158af32106b9a93db8d6d1d1cbbd418c0d5aca0cabb7b1780abf0c89169", size = 28845, upload-time = "2026-10-02T23:04:39.295Z" }, + { url = "https://files.pythonhosted.org/packages/33/cf/26e594b26be40c2f1fec63ccf8a8b99d0335a5b2cbe84835c7d82a994375/markupsafe-3.0.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:71f88e749ea29f67f21f3b36433c1dc54c7729ed2a6d9e2da2e0d9e0d7b224eb", size = 24701, upload-time = "2026-10-02T23:04:40.348Z" }, + { url = "https://files.pythonhosted.org/packages/81/a5/a513b76c139a3915b43404324e55c0b7979ae4f0d39eb6f075b0282e90a8/markupsafe-3.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808", size = 22961, upload-time = "2026-10-02T23:04:41.372Z" }, + { url = "https://files.pythonhosted.org/packages/46/cf/4c66192c100b4542bcbe392ae06696b670f66927be3ac38a213234778ff9/markupsafe-3.0.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8f0fac8b13d14bb06c68195f849371924ae53dd7b1c00fed24650f704383b692", size = 21920, upload-time = "2026-10-02T23:04:42.429Z" }, + { url = "https://files.pythonhosted.org/packages/cb/17/ac3662678bfbad649893117ada2ba44dc30bf56884e84f13154a792b10f1/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4a7cdc2a420ca01058182da4253329764d4bfa055564d1eced90e6ba1e8b1d3d", size = 23726, upload-time = "2026-10-02T23:04:43.531Z" }, + { url = "https://files.pythonhosted.org/packages/f7/af/fe47cee339180a69ebca3c57fb3483d0f5cbd1e8337d1871fb1d9c1aebee/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:83b3944fea42a8400edf92fd1770fb8d0d4f7de651353bd2d8525a92dba69a21", size = 22539, upload-time = "2026-10-02T23:04:44.618Z" }, + { url = "https://files.pythonhosted.org/packages/12/32/d55440ba140442800e02d799c9cb5ab597bf6ebdb1177b5ea39a11f797bd/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:8138eb83940ec7299024d92d4dee45f601b9e6c5ffde9d25f4e35e326203c707", size = 23963, upload-time = "2026-10-02T23:04:45.656Z" }, + { url = "https://files.pythonhosted.org/packages/50/9d/9c86042cb364c2ad4c971e6d1247929effd25f714cd7ee11b05e6316445b/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:811d02d5122171c1941357efd8f9bf4ffe907b7f0a1a4e729a880e4be3f46e3e", size = 21506, upload-time = "2026-10-02T23:04:46.671Z" }, + { url = "https://files.pythonhosted.org/packages/75/ef/5b824f03ba40c3b3652b6272d083d2fc4fcdd440de519a3a39ba2c3e7262/markupsafe-3.0.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:50b5bedc9ed8a94fc8857a42ef4f84a81ea88f8d4f05dc8705fb23ee6d8dcca7", size = 22955, upload-time = "2026-10-02T23:04:47.698Z" }, + { url = "https://files.pythonhosted.org/packages/1e/e8/44cfcb5ea40e5e43cec7793ef90704ed0c475280839076c4345757eb8e59/markupsafe-3.0.4-cp311-cp311-win32.whl", hash = "sha256:2e5a7cd7fdd14fcb1ae5d7d8bf23d24fbd1daefd1fbca2580132e1ea75f098b5", size = 14094, upload-time = "2026-10-02T23:04:48.788Z" }, + { url = "https://files.pythonhosted.org/packages/91/89/f2b509f7bf79352e40117824c1070dbeafd4df67031d3fa98165a3134228/markupsafe-3.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:fdb4ca07ab75ffadab4a8b135ad59cdbb3156b99310f3d565370da74a15d6bd3", size = 14328, upload-time = "2026-10-02T23:04:49.801Z" }, + { url = "https://files.pythonhosted.org/packages/2b/5a/ccf22672a0f64dc682306e288f0dabcb06c7a201f3bb6e6cbf86d9e8ad03/markupsafe-3.0.4-cp311-cp311-win_arm64.whl", hash = "sha256:569d65055d367e3dcdf30c3f41119467b73d9ee9faf332bdf40402644f5ac08e", size = 14188, upload-time = "2026-10-02T23:04:50.847Z" }, + { url = "https://files.pythonhosted.org/packages/81/09/4c59d56b8461ae8eb0d8ba34bb25b7e618547044679d58a82ef9b2479fc1/markupsafe-3.0.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:61631e08084be9e21a8967ec3139c7616ed7c5e9368e05c86d1b39562c8a57b6", size = 11658, upload-time = "2026-10-02T23:04:51.876Z" }, + { url = "https://files.pythonhosted.org/packages/a2/f0/d6613774d86fbf6d145751d43c59875e47a6f9f17daee0aef173bd36d90e/markupsafe-3.0.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0930db9bdc62d22944e10b066448bb65dc9abe9112880c7cab8da54db4284d5f", size = 12050, upload-time = "2026-10-02T23:04:52.931Z" }, + { url = "https://files.pythonhosted.org/packages/0d/f2/8f18e0b806eb13c1f8d07d917a720831ead54253a6dec011fbc78098a6f8/markupsafe-3.0.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6a45c3d514f2436064db00d7fc8778d888f0236ebfed649b53d13a59e69ad51b", size = 24363, upload-time = "2026-10-02T23:04:53.895Z" }, + { url = "https://files.pythonhosted.org/packages/60/ce/fa07dbe8a5675558fa36dea033e19995bc783de2dec5f540ccb9030b06aa/markupsafe-3.0.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1e1451fab512d1bcc3dc26988ec1edb0b82c2db909132872cd9356070a6b63df", size = 28525, upload-time = "2026-10-02T23:04:54.905Z" }, + { url = "https://files.pythonhosted.org/packages/85/40/be87c01f3868ec217f8a2015089d71c22c8c5a75324822e5ed1cdd87210d/markupsafe-3.0.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bd3ce56ae2cbae3ba82b683bc425cd7e48d2ed8b10f3e818186b6f5646d9271c", size = 24733, upload-time = "2026-10-02T23:04:56.229Z" }, + { url = "https://files.pythonhosted.org/packages/4f/a7/aeedb5140afa41fc74c225e9184ab96723a6e873b6ee1c9fede7283456d8/markupsafe-3.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581", size = 22985, upload-time = "2026-10-02T23:04:57.521Z" }, + { url = "https://files.pythonhosted.org/packages/c3/fc/e91352bb08c6a59da3ef0909d457bf95a5f5908fbf151b30a06d9dbcfbb4/markupsafe-3.0.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c02e8f18bdedba082cef725942ac823b9b60656db07f7e265cb31618dfd00d77", size = 22001, upload-time = "2026-10-02T23:04:58.597Z" }, + { url = "https://files.pythonhosted.org/packages/5d/f8/bffee5e7d2a3deb59748a797650a48af7e672025cf641a79344a771ad106/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9f098115c247e11d138ab83a28fa0323c77015007ea2df73ba5fd714dfefd67c", size = 23793, upload-time = "2026-10-02T23:04:59.686Z" }, + { url = "https://files.pythonhosted.org/packages/ed/59/b853d6628ecb4d658e1d637224846d5e9bb4adf4f8df97f3be9f29dce2ec/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d5f93ebbeb8032d47e349328ec8662d973d9b05a70b3c35df1f91fe419b84749", size = 22640, upload-time = "2026-10-02T23:05:00.768Z" }, + { url = "https://files.pythonhosted.org/packages/09/b2/1506df394f0f075797c418d0301498f49e43be194e3ffcb49e6fe6ccf022/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:64511c54db4e4987aef4c41923235927428729e8174c5dba488429be70a998ed", size = 24074, upload-time = "2026-10-02T23:05:01.813Z" }, + { url = "https://files.pythonhosted.org/packages/c7/81/5ed69cda630ac69ef60d06c09ba5a7f84ff66a2e28cf986fd5614ab3c6e6/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:e1a622f13970d81f95d0c72f9dc090dce9085fccfa4c9f2174377ee32bd15786", size = 21563, upload-time = "2026-10-02T23:05:03.239Z" }, + { url = "https://files.pythonhosted.org/packages/0c/fe/fb1e79be0fea60aa32602ebefc9c35a82bb42b4df157285ab7dfec12341a/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c9a7f43c0b202b334cc9184af09bb8f21d3a209e038efaf106936fb69e6b026e", size = 23048, upload-time = "2026-10-02T23:05:04.479Z" }, + { url = "https://files.pythonhosted.org/packages/c8/52/7632a53360671a9b750cdbabaf9cdd89f18b42248b8e4cb42c0b0296e459/markupsafe-3.0.4-cp312-cp312-win32.whl", hash = "sha256:f0ec3b750b59375eab5b0fb2b9254810c00a3375be6d789899f1055a1d556237", size = 14108, upload-time = "2026-10-02T23:05:05.513Z" }, + { url = "https://files.pythonhosted.org/packages/3f/bf/62495e180b7000aaf30000fff849e933f74264638057176cf46852500adc/markupsafe-3.0.4-cp312-cp312-win_amd64.whl", hash = "sha256:11935df9bf455ed0c04eb87bcd720f02b1fe5e02128a9430f23aed6f93336fc7", size = 14303, upload-time = "2026-10-02T23:05:06.538Z" }, + { url = "https://files.pythonhosted.org/packages/c5/8e/4c24208776a65878d656996945aacfbfe010d3720d1a98fc0eb8491fc03b/markupsafe-3.0.4-cp312-cp312-win_arm64.whl", hash = "sha256:a4bbd2d87dd233b9fc5812160c3d0ffbe42edc22a26ce0469f58479ede633fe9", size = 14174, upload-time = "2026-10-02T23:05:07.617Z" }, + { url = "https://files.pythonhosted.org/packages/6d/18/4bc5ba32499e87bb2b0ef5b3a9bb9c00a131fa961ddf0be548cb550f548b/markupsafe-3.0.4-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:de8b364c423ef0a4bad9069657d617f9a5d2b2062457a89b1fa16ee199c399c1", size = 12786, upload-time = "2026-10-02T23:05:08.709Z" }, + { url = "https://files.pythonhosted.org/packages/4e/6f/17f0c099bf25f3e31e63cc19244d9f6af861a9a4ab778c203997903cfdd0/markupsafe-3.0.4-cp313-cp313-android_24_x86_64.whl", hash = "sha256:34bdde374c5932765d7dc685c4a1d191a3207852d67e8e0a9eb6ea85156181f1", size = 12510, upload-time = "2026-10-02T23:05:09.93Z" }, + { url = "https://files.pythonhosted.org/packages/11/af/1a141081b905036ee904ec4bd945e1f70b4e1b32d33c4e59e8cf1d58b247/markupsafe-3.0.4-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:6bd9e1788e15bfcf6a9082de42e30387e7b85d211ab21e57a939bb8cfaaf8d96", size = 11583, upload-time = "2026-10-02T23:05:10.884Z" }, + { url = "https://files.pythonhosted.org/packages/e7/0a/a89385ae590232622a03e091805cff12f24fabe6c11e0e8bae096cece81c/markupsafe-3.0.4-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:5066b244f576f91afc8ee3ba029a89f99d39c79b1853fe9d39bea9f0afbec148", size = 11801, upload-time = "2026-10-02T23:05:11.913Z" }, + { url = "https://files.pythonhosted.org/packages/ed/85/ea548dc013962eb73653124bc595635fbf9e0fa41d1f181a967ccb784dfb/markupsafe-3.0.4-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:7a83aa6e4805df46fed18e989d3d16f86ef60cb50bbc8d9ce3a6be89165fbf6e", size = 11443, upload-time = "2026-10-02T23:05:12.887Z" }, + { url = "https://files.pythonhosted.org/packages/cc/72/15f2e5ec9cf2eb00d5cdfe968d94e4156a7bd7303832c3f3b2c403a36839/markupsafe-3.0.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2d1b7d9308288661f56672b1b157d75fc536714d3638487bbea17b6318a78248", size = 11665, upload-time = "2026-10-02T23:05:13.829Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e0/4030bea613677e333c8a2c901fd405055f657f9d06acba5b7357984b6ef7/markupsafe-3.0.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:73e77980c7207854f00fc4e71fb1626868d5740ab4012623d55c7a99ad122a72", size = 12061, upload-time = "2026-10-02T23:05:14.807Z" }, + { url = "https://files.pythonhosted.org/packages/f3/a5/28b76a7449eb702966b88bef599e2360b411fbb3afeee8fe560939be06ec/markupsafe-3.0.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7018d4af1cd272e847aa5917983ab5e83e4f6579f9dbfecd4a79c0ca80b144c2", size = 24395, upload-time = "2026-10-02T23:05:15.909Z" }, + { url = "https://files.pythonhosted.org/packages/07/6c/21232811afc3a063b5e934b1ae2efda52f46154ec382f585149c020e61fe/markupsafe-3.0.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c90d5b3d4e944e065a301d741b3c1d784f6bd1f503aa68b4967e32b2ba313d85", size = 27183, upload-time = "2026-10-02T23:05:16.976Z" }, + { url = "https://files.pythonhosted.org/packages/14/38/6ccdfa5b59049cb36fb80cbc80aee9cf1fc9bb77d1335ad435f2070b08cf/markupsafe-3.0.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:18a801868a884f216e784d7d14db2a4077143ce7610440aee2ce8f734e7cfcde", size = 24772, upload-time = "2026-10-02T23:05:18.209Z" }, + { url = "https://files.pythonhosted.org/packages/63/e0/cec6865dfe88cb48fedd4b20aed6af5158e41092adcbf3e028bcc6ec2108/markupsafe-3.0.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:434139499bb20b502ed3baa1f169e618f924a97e7a777fea1a49446d80106cf6", size = 23017, upload-time = "2026-10-02T23:05:19.286Z" }, + { url = "https://files.pythonhosted.org/packages/ee/76/6ed4940bb7648a9aac457c14f870cfdd5105f139a0fb1f29cd61fafa47d1/markupsafe-3.0.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9e227f3dbe6bde7491cf0a9965d00b88c6b1a4a95d11480ddf88bb96d397c19f", size = 22036, upload-time = "2026-10-02T23:05:20.352Z" }, + { url = "https://files.pythonhosted.org/packages/a1/4f/ed476226d4fe46a09090a36025bf319296810028df55eb12f1253b540f3a/markupsafe-3.0.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b8cd1f918b26fd7b1832ece557cc18f2d8747309ff8b3f0ef9d4250c5ad67a39", size = 23786, upload-time = "2026-10-02T23:05:21.576Z" }, + { url = "https://files.pythonhosted.org/packages/9a/35/66ff30450e35ef5fba9ebc930c9411747e537fd9447b65e44f5007e2b84d/markupsafe-3.0.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:a5fcffb37e602b0b3c1638a97746b9b96125caa9bcf6fa41d337a9261de231ee", size = 22672, upload-time = "2026-10-02T23:05:22.922Z" }, + { url = "https://files.pythonhosted.org/packages/32/0b/72f45ce4b4efcbca4b80cf1b06703eff0be8d37e82abb78f66c85a7ead1e/markupsafe-3.0.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5989cb26b2e1efc6a42216a9f6b5ee495ce5ace2e5b352a9af489976b32d1ee2", size = 24107, upload-time = "2026-10-02T23:05:24.175Z" }, + { url = "https://files.pythonhosted.org/packages/d2/03/71776e5fdcba04614b384cc102e8a4198208579d896fd1394cb7cb9aa900/markupsafe-3.0.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:add96447a86d205ab616665d53b2950ee81083757f56e6ea833c8b2917646b46", size = 21615, upload-time = "2026-10-02T23:05:25.215Z" }, + { url = "https://files.pythonhosted.org/packages/ab/5f/801ce02a02e7aee0f784b1ec7843026178f6adeb9c93ac67eb1992a9a84d/markupsafe-3.0.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2628d3a8cb648ecebb3c5d6b0a1052d400e4d8b7ac0fb786be8d285b50040d17", size = 23076, upload-time = "2026-10-02T23:05:26.423Z" }, + { url = "https://files.pythonhosted.org/packages/4a/85/c43776625428f3bb4a61e8633940400e3efe6409e3c6f5bff26de5e45618/markupsafe-3.0.4-cp313-cp313-win32.whl", hash = "sha256:672d207103e6b16ca098611b0f9efad6bc00afd47c03d6ef62186495ca677dc0", size = 14118, upload-time = "2026-10-02T23:05:27.716Z" }, + { url = "https://files.pythonhosted.org/packages/6f/36/163da64de88a13db79214ef75fa041be7fa13bdb42261cf5b7484de14bfb/markupsafe-3.0.4-cp313-cp313-win_amd64.whl", hash = "sha256:1f1f9477e174582b0a1b583d60b66e1f2cf5d3fe12cee985e4aedf44766600e5", size = 14313, upload-time = "2026-10-02T23:05:28.749Z" }, + { url = "https://files.pythonhosted.org/packages/9f/a8/9b662783ffaa1149221432a923cee562f78b9cbbb8baa3df9b3753e63e1e/markupsafe-3.0.4-cp313-cp313-win_arm64.whl", hash = "sha256:06de8ef6331f6e822c28d577dc8bf43fe398800477c49498f38fc38b67ff33fc", size = 14189, upload-time = "2026-10-02T23:05:29.917Z" }, + { url = "https://files.pythonhosted.org/packages/5c/c3/a944f3b0df22bd129e96915b9f4e98d2eeca6516687d7618304a966c3c74/markupsafe-3.0.4-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:4ed644d75aa94a2baf7ec3a96eaa160ea58c742eb9d27c6506053c5c40fc84ed", size = 12787, upload-time = "2026-10-02T23:05:30.971Z" }, + { url = "https://files.pythonhosted.org/packages/d4/d6/a44863f69d88b6c7e27889108f70d47aed259edf89d5df3c5fca1eac87d6/markupsafe-3.0.4-cp314-cp314-android_24_x86_64.whl", hash = "sha256:6d2a9efe686f9de00d0d1ea32a4a5a86d558a2277501bd78d964214eab625e59", size = 12525, upload-time = "2026-10-02T23:05:32.263Z" }, + { url = "https://files.pythonhosted.org/packages/17/8f/168ba80e532dd6a93f96f8f706f1ad41d7990b6e1aeedc1cc0d211a33497/markupsafe-3.0.4-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:8781a792a070cf2bd1b86d3aa943894115faaba6e88122a7bf32d62072742453", size = 11589, upload-time = "2026-10-02T23:05:33.251Z" }, + { url = "https://files.pythonhosted.org/packages/32/b3/aa2c95a574d3af39403a469b295886eb9b6d448da568cbebb5a2cbfdc2e5/markupsafe-3.0.4-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:971a3bbb75d97ae4e2e8f7d4834236f86f85f0c85e04ab2e191db1123b04f80b", size = 11801, upload-time = "2026-10-02T23:05:34.315Z" }, + { url = "https://files.pythonhosted.org/packages/60/d0/34b810107d83840e768bf485de795893ebbae35b26ab061b487adfa0a692/markupsafe-3.0.4-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:8909c2f1c6dd65e054ac4b573a91c8384d1492281e55d82d159d653f7a13adf6", size = 11447, upload-time = "2026-10-02T23:05:35.302Z" }, + { url = "https://files.pythonhosted.org/packages/6c/ab/2f8488f0f817a39fca068d2b17daf446bf5cdb3eae28c3720af534d873b4/markupsafe-3.0.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:4cf3468d5ec187ffffcaca8e61929a37448f215dafc1386a12c750a72fe53634", size = 11722, upload-time = "2026-10-02T23:05:36.363Z" }, + { url = "https://files.pythonhosted.org/packages/ad/40/e2d117b048d47282ade906fbfd92814cbee5647afc13fda88a3406039372/markupsafe-3.0.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:52704c5d36eb6dda8866493decd61111fff86244c9b1ad225ca01b9e91e5970f", size = 12061, upload-time = "2026-10-02T23:05:37.397Z" }, + { url = "https://files.pythonhosted.org/packages/9a/a8/73a81135e85ba66217f5af7facb03bbb386807e1a729ab64532e4c802652/markupsafe-3.0.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1caa2fa5a6184fb233153b35f654e6687bd555476f6170f29d8ee9be1a8b0af9", size = 24434, upload-time = "2026-10-02T23:05:38.407Z" }, + { url = "https://files.pythonhosted.org/packages/ac/ca/fa9216dd01efee2dfdacafe7df32b4d0170fbac694b0c258a193d6e53999/markupsafe-3.0.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:387d8cd30e69b3f0a72877b9ae717033396404e19095b17fe89753a981fda44f", size = 27183, upload-time = "2026-10-02T23:05:39.581Z" }, + { url = "https://files.pythonhosted.org/packages/fa/4e/a469509e538d37af51103b17b073126973f2b1cbf197ff32c7ddf025cfe5/markupsafe-3.0.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:051417f74bcaaefa316276e0ff723f541616ca51043d070da00249d9bddd3e3c", size = 24813, upload-time = "2026-10-02T23:05:40.671Z" }, + { url = "https://files.pythonhosted.org/packages/8f/db/d7282caf7ab03af44d5d6fdbaa019b35c7d7f1c90588b839c07cba640d6a/markupsafe-3.0.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8e9f292fcda89b324f2f5c91d13f1424a153e40fc2756f38ee23b15835ff300", size = 23049, upload-time = "2026-10-02T23:05:41.864Z" }, + { url = "https://files.pythonhosted.org/packages/30/f3/b6a425206e6964efda6acee544d0eb01d1501784d0b8e2dcc74986f33b17/markupsafe-3.0.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:df1ae86ff54725a01fa1a0510b914ca53a161b7050be74f6204e24aded5971d0", size = 22088, upload-time = "2026-10-02T23:05:43.014Z" }, + { url = "https://files.pythonhosted.org/packages/ea/8a/84d3582fc1f0d5bd466cdf2eebf175e172158a6e70701aacec1de1b35430/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:8965520ac587c94a4ac48b729be3d8b8de00af39699b17585dfb599babe77977", size = 23846, upload-time = "2026-10-02T23:05:44.098Z" }, + { url = "https://files.pythonhosted.org/packages/1c/65/db101cce51b7ba4864ac491a9859d297dd1adf0e55b103fee9db9c47c527/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:340cbb1957ba99929cbf19a75626d36ba1ae21d1730b287d1cf7f824a20c4fc7", size = 22674, upload-time = "2026-10-02T23:05:45.23Z" }, + { url = "https://files.pythonhosted.org/packages/e0/49/ddee9813d71db0c7a5c9d97c832125e6758a0c844777f1cf076569bb0e22/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:3a93d9616ddecfb393727a0041a562cf0b15a244e20f2bd25efc7949be4c4f17", size = 24104, upload-time = "2026-10-02T23:05:46.398Z" }, + { url = "https://files.pythonhosted.org/packages/aa/0e/7d8518d726726870a2399d69fd30d0fa36c5e57a2132c336b58d7c491073/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:d2e56fd3b00222722abfb3f5f0759ddbae4b90811b5ad4343c64030ad1bde70c", size = 21637, upload-time = "2026-10-02T23:05:47.48Z" }, + { url = "https://files.pythonhosted.org/packages/b4/b0/b505e8a361ba557dbf3b3aa7331ea39b00d2022a26e925ff8463b9714bb3/markupsafe-3.0.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:0d9c47709875fdb321452056622e930c52afbc07a7d780762fbb8b4d91ce6fa4", size = 23081, upload-time = "2026-10-02T23:05:48.611Z" }, + { url = "https://files.pythonhosted.org/packages/1c/ea/9cc3cea873f980c75cbdb6f4277ce30ee955de38be0b3d02f14c108e0698/markupsafe-3.0.4-cp314-cp314-win32.whl", hash = "sha256:38fc55594dab834470b6733dead2ee9e3f657fb0608c769dcafa0ba5ab52f45c", size = 14272, upload-time = "2026-10-02T23:05:49.707Z" }, + { url = "https://files.pythonhosted.org/packages/80/f0/5792ff768a410f93ee3f84fc19345295ffc352d2c936b424cb37e514714c/markupsafe-3.0.4-cp314-cp314-win_amd64.whl", hash = "sha256:c1bc67752d5f21013cfe430df4062441714eab79f65a6a05e01505957e9c35fe", size = 14501, upload-time = "2026-10-02T23:05:50.788Z" }, + { url = "https://files.pythonhosted.org/packages/5f/cf/3d074a8edffcc6899355232ff2543ae8d929733239596423b7db79698bc9/markupsafe-3.0.4-cp314-cp314-win_arm64.whl", hash = "sha256:7e1636da3d8dfc220b6dd10264db5f2b165e4888c4518594898fbe381049af8a", size = 14364, upload-time = "2026-10-02T23:05:51.857Z" }, + { url = "https://files.pythonhosted.org/packages/d9/31/87ce42159aae2163cf3bbbd0c44bc87780510eecab1ea3859099aed95dcb/markupsafe-3.0.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:805c8b84534fa10891890f0e4be39f3a99e94615d93e8836bf9fa1fdca2feeb2", size = 11759, upload-time = "2026-10-02T23:05:52.951Z" }, + { url = "https://files.pythonhosted.org/packages/5f/53/b047207eeb7752e960aca3eb1df5fb7eefa7dd4c62ac49bb156456c8a702/markupsafe-3.0.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:fa95848c929b6a75f6848d3c9793e59db365ee436776e57db835cdbfa79ba977", size = 12096, upload-time = "2026-10-02T23:05:54.066Z" }, + { url = "https://files.pythonhosted.org/packages/ee/51/4326c88a13c7b755657d44b4bb986f8c3d9843ecba7e22d98661d87f9a57/markupsafe-3.0.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e916035e3e9930cbdfdd10abf48861340221857f45509565898e012263f7b289", size = 25699, upload-time = "2026-10-02T23:05:55.15Z" }, + { url = "https://files.pythonhosted.org/packages/f2/bb/990581b7474bfcf2cf34bed6ba5ea23bd87adb9d671213d68e88620e7a6b/markupsafe-3.0.4-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b4d12837e0203bbace818ff4a7461afdcd78bcd782351cea148139180d7bcffe", size = 27804, upload-time = "2026-10-02T23:05:56.29Z" }, + { url = "https://files.pythonhosted.org/packages/6b/89/89491878c28e8291f5aa2fffe2c2d57230d10ae366d55dd810b840513d78/markupsafe-3.0.4-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5086f9975abb1ab531ee6afca1761e4b59a19b446f3f6522ed776963228cfe5a", size = 25912, upload-time = "2026-10-02T23:05:57.416Z" }, + { url = "https://files.pythonhosted.org/packages/30/77/680998b54efdea06fc114565cd739b6d059f826a0279219b218dfa750d29/markupsafe-3.0.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b4a635a0487774f841cb1fb62e907e7195cc95bc761e053184b8acc3ceb20733", size = 23623, upload-time = "2026-10-02T23:05:58.557Z" }, + { url = "https://files.pythonhosted.org/packages/ae/75/2709f5ac5de9467b40b10e2bb8f89cc63dfb74582e09aa734b1124a217de/markupsafe-3.0.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb96e6e088d6cf71c1ea977510948320234824cf226e32f6f6e044f7a9c82b34", size = 23301, upload-time = "2026-10-02T23:05:59.94Z" }, + { url = "https://files.pythonhosted.org/packages/a0/c8/39eadc6c5b14c9c7679bfb98f4d4c6a97863b5beb91839aca4d2d6e16e55/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8b5d563170ff8ba3181caa967c99a3c804d1dedb702c7cb93a6a7c32247da978", size = 24950, upload-time = "2026-10-02T23:06:01.289Z" }, + { url = "https://files.pythonhosted.org/packages/1a/5e/01037f8a43e8ccb0bffb4fbdc5212db05bf080fdd7286cd392332d58128a/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:396ec4e65cc889f69786b3b89478b471cee5a3bcf468b9d9bb03e1a30fb291fc", size = 23330, upload-time = "2026-10-02T23:06:02.441Z" }, + { url = "https://files.pythonhosted.org/packages/d4/f4/23e83ce0596bb0cbe670502d31df8f757bbd01a392aa486fa3b40d1ed399/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:15ba9e28640feef770374b116a6f019c21f52404aeabe516aa7f800587b98cfc", size = 25239, upload-time = "2026-10-02T23:06:03.579Z" }, + { url = "https://files.pythonhosted.org/packages/88/5b/3708897368073cc683d524750474f41a77d2986152c380dcc55b20fdf340/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:d920abdfa61279ba1a2ef9484aab07bf03331f8c08a10120fa332353d06e6932", size = 22767, upload-time = "2026-10-02T23:06:04.699Z" }, + { url = "https://files.pythonhosted.org/packages/c6/61/ebda1307864b409e6b3115757a3d4a09cca46cfb6cc65191b5de226b424b/markupsafe-3.0.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a9f54054101545a9a9cccefddf54316aa6e4491611fcbef9e91b3b6bebec04f6", size = 23668, upload-time = "2026-10-02T23:06:05.9Z" }, + { url = "https://files.pythonhosted.org/packages/09/15/98075cceac3b5ba0dbb8e4762a847be967d2befc349a2cf2d0ac77f62c9d/markupsafe-3.0.4-cp314-cp314t-win32.whl", hash = "sha256:12a606a492de952afcb43b59a14aaaaad120e708d3663dd0fdf2d738d427a691", size = 14301, upload-time = "2026-10-02T23:06:07.109Z" }, + { url = "https://files.pythonhosted.org/packages/0b/a3/768b560fcc4156685cb563d922b217810cfa7bc135773367f62f1f9d2078/markupsafe-3.0.4-cp314-cp314t-win_amd64.whl", hash = "sha256:a18f38cafc329bac5e3c2b96c765b4c96d3d103421ed22ab7988c1e3fce27464", size = 14526, upload-time = "2026-10-02T23:06:08.276Z" }, + { url = "https://files.pythonhosted.org/packages/93/63/da554b4c97a6b0ea3229ca7fe8cbfb620be81613d517f482e85958550537/markupsafe-3.0.4-cp314-cp314t-win_arm64.whl", hash = "sha256:eba154571c16e032112afac0dc2dfe9e63c2ceb7aedd07bb7eecf2ce26d4dd4c", size = 14421, upload-time = "2026-10-02T23:06:09.402Z" }, + { url = "https://files.pythonhosted.org/packages/a9/30/54d11c8ca027114898cab97421fb39e4ffd9ddf47cdbc44df2ec76722da9/markupsafe-3.0.4-cp315-cp315-android_24_arm64_v8a.whl", hash = "sha256:737c9c3981998eba27f11786f84fddcbabc74068b72a4a1f454ea02094b57b65", size = 12791, upload-time = "2026-10-02T23:06:10.485Z" }, + { url = "https://files.pythonhosted.org/packages/10/6d/97c913e253a14bd3cd0e15a5c56d13203b823fa7ee32498342896a072dc4/markupsafe-3.0.4-cp315-cp315-android_24_x86_64.whl", hash = "sha256:489505b03f692c3f376394e49194fa7a7f9e8558d6e293a7056a0032b0c38163", size = 12527, upload-time = "2026-10-02T23:06:11.834Z" }, + { url = "https://files.pythonhosted.org/packages/26/f9/b86d032042a4d597d9e1997f0e5f63a3eedaf11258e0a05760b0a0a826ea/markupsafe-3.0.4-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:077293e425f28ec737dbcad442a71752e28f8ae27cde3d68acd1fb212091cd92", size = 11602, upload-time = "2026-10-02T23:06:13.122Z" }, + { url = "https://files.pythonhosted.org/packages/f2/dc/73c14c1eedf0ac5fa3292ba43435e6c49d2c2050f33cebde541f8f4807f1/markupsafe-3.0.4-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:9348cbb300d224fe3b89793262cb093504d4ae927004468463f745188a193e4a", size = 11817, upload-time = "2026-10-02T23:06:14.227Z" }, + { url = "https://files.pythonhosted.org/packages/8f/69/2c2fcaa5fcee22d72c7819c0d536fd181c74a688e6143845419579cd2863/markupsafe-3.0.4-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:b807e598953730f82e4eae3bd30f6a122cf6b31c398c6b504c0e04c13c170429", size = 11446, upload-time = "2026-10-02T23:06:15.574Z" }, + { url = "https://files.pythonhosted.org/packages/88/54/9e5ec76c62e6e2834d5a93623018c943e8b3bb41d663e3fd4c03303b9b85/markupsafe-3.0.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:799c39bdf5e2f1292fedd3009f7b3c9e760f10b2420cb9638d56920840ff6db8", size = 11719, upload-time = "2026-10-02T23:06:16.701Z" }, + { url = "https://files.pythonhosted.org/packages/96/24/3ec292b44064c16229e064d770b2625bd8ea941aa61f44905a9fa44942c0/markupsafe-3.0.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:ae9dcb8fbe244cb82f8a6458b455b927a03685e383d9bacf1ea5ce180b96dc97", size = 12075, upload-time = "2026-10-02T23:06:17.855Z" }, + { url = "https://files.pythonhosted.org/packages/aa/85/b64fdb1f304848518742136983c24e96d967bfb59a0ea160e92736901ab0/markupsafe-3.0.4-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bced6e2a6dba6a28f7dd3c6ce14df1b2dd495923f16ea484cad03decd463b2b", size = 24656, upload-time = "2026-10-02T23:06:18.963Z" }, + { url = "https://files.pythonhosted.org/packages/9c/18/23997d4c65b355da6390d61cd56e0ab3befd6ba8dda25cb40c602bd0fa6b/markupsafe-3.0.4-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3882fb412298575bae3b9c46868251f15cc69307359f87bb1b382e53d6e5a2c9", size = 27737, upload-time = "2026-10-02T23:06:20.117Z" }, + { url = "https://files.pythonhosted.org/packages/d4/36/35998dead3c6af88c38265a56e58100211f036234ab88eb2283fd4cbce44/markupsafe-3.0.4-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:04e7902ba80ee4bac1d50a549606527a1dcf0476cd81403db41099d3b60ec653", size = 25003, upload-time = "2026-10-02T23:06:21.284Z" }, + { url = "https://files.pythonhosted.org/packages/82/96/ef49135ce260db4ca4a12b119ed468449cd248db6b1468e2112b546d7a2e/markupsafe-3.0.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:925f929d6b59a8b3f8b8c6ac363cd0af7eecc81efb3071770b3c6717c450a369", size = 23111, upload-time = "2026-10-02T23:06:22.524Z" }, + { url = "https://files.pythonhosted.org/packages/50/7d/83126e338bd88c17a220668235368ad719fd4638e426739858cbb8508f77/markupsafe-3.0.4-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f68edfc67aabac33708941f26f22a7b8e9f81429bc0cf249fcf7d66b23af8d19", size = 22403, upload-time = "2026-10-02T23:06:23.785Z" }, + { url = "https://files.pythonhosted.org/packages/83/dd/daf7e420de23c8206c365204e7b85e1251d8e19d34196a56336f316e5ed2/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:e5c802729725bd07e2bc3ab7b76dc7e0bbfc53129d8f1eb1c002c24cf774717e", size = 24083, upload-time = "2026-10-02T23:06:25.037Z" }, + { url = "https://files.pythonhosted.org/packages/19/3c/11eecdc06bc44ad5570350085b572ebf049e8f9a38d1ece6d76640b739cd/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:55ffd6ce583d97dc71dc92e930324c8c0d25aea7e3ade6ae54ef77cedb096811", size = 22931, upload-time = "2026-10-02T23:06:26.328Z" }, + { url = "https://files.pythonhosted.org/packages/0d/9e/ac0fd77f2a726e56ecc3ca0235d095feace1358d1b822406c2a2ef26a4dc/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:2cb3dd71fc6be918ad4264346a8ed69485f9b7ed7bf35495d8e22807cd6b8bea", size = 24299, upload-time = "2026-10-02T23:06:27.742Z" }, + { url = "https://files.pythonhosted.org/packages/d7/09/c6bd842ad58ff5b3bc76eeed7e9a42a6f11adc5d090ec697b72c9672731e/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:94f5407f7bc64fa6463906b896f9904beeeb7dd8dc116ee8e9056c8714ff9916", size = 21948, upload-time = "2026-10-02T23:06:29.274Z" }, + { url = "https://files.pythonhosted.org/packages/a3/46/82f586711fed61e86faa1ee1bc317d68cd45a10c8bdbe3f7d1fdf9026ad8/markupsafe-3.0.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:2dad610540cb2e6272855c178f08ae9a1c7ac258a7fb71660553a5f104b42741", size = 23150, upload-time = "2026-10-02T23:06:30.583Z" }, + { url = "https://files.pythonhosted.org/packages/19/2d/2dfdce99318abbfa26925195fbc17db188c46a1ec6457be121b6f9cfeb42/markupsafe-3.0.4-cp315-cp315-win32.whl", hash = "sha256:03470d1a8268e692ecf79ecd565593e59d44219377a7ead61f1f1b94c1f7ff6b", size = 14269, upload-time = "2026-10-02T23:06:31.949Z" }, + { url = "https://files.pythonhosted.org/packages/5b/ec/6000fd82e8791e58fcd0456ec20f098957e2b03d5ed02eb73241a577c0ba/markupsafe-3.0.4-cp315-cp315-win_amd64.whl", hash = "sha256:d882a373d8093c2941e01291b7ced96e9cbe4781da9a7751ca7e6c70385e5214", size = 14496, upload-time = "2026-10-02T23:06:33.258Z" }, + { url = "https://files.pythonhosted.org/packages/bc/66/e73bd5016421d5d6e2fb6de7dd609f9de020942ac8c626526bd8c6eeaf82/markupsafe-3.0.4-cp315-cp315-win_arm64.whl", hash = "sha256:353bd63081912ab8cfa6a0c7d185934cdf8426f04c618bba6bc4b394f2069b67", size = 14361, upload-time = "2026-10-02T23:06:34.539Z" }, + { url = "https://files.pythonhosted.org/packages/90/df/cb8c3dc98d313a951df2f8968f44e4cb5643df6d3cab749a530ce2f7d972/markupsafe-3.0.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:c61750fadcd119d0825bcb7d7d675dd264dcc89cc05292aab5be68ebdbb374ad", size = 11760, upload-time = "2026-10-02T23:06:35.807Z" }, + { url = "https://files.pythonhosted.org/packages/d6/bb/4af9b3ca0753d654ac75f9531d5bd741bb77ca6e696f36807c475ffc099a/markupsafe-3.0.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:1c0df495a977d10460a94941799c72d5b5ab03d3858d949b55b5a66c8f371c99", size = 12108, upload-time = "2026-10-02T23:06:37.089Z" }, + { url = "https://files.pythonhosted.org/packages/3f/d4/b56429313aee5fd59b079c3df5615299959e25e7113eb6d8caadbdd7d38a/markupsafe-3.0.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:02fa4acbc6a3fc5c693c34d4dd8c1130b7fe99cc915181b0ddd6f72aeb296002", size = 25762, upload-time = "2026-10-02T23:06:38.419Z" }, + { url = "https://files.pythonhosted.org/packages/65/f5/34c181e891aa4f7d59c918584672e0c5eb7fffe76c1387d1246008bf4081/markupsafe-3.0.4-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:05295589e619b9bed252a86b532b8e27350abc372d18ba89b59375325e91ec1e", size = 28400, upload-time = "2026-10-02T23:06:39.819Z" }, + { url = "https://files.pythonhosted.org/packages/ce/b5/ad14694fd0ac9a5ce30bc6498f2999378f418583dd1679cca5a1b512957e/markupsafe-3.0.4-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:be6cb0c799abb0e2ba3e618e6d28ddddf7e485f6c2ce938dfa237daf3905072c", size = 25946, upload-time = "2026-10-02T23:06:41.381Z" }, + { url = "https://files.pythonhosted.org/packages/d6/a8/26b606445387d0ceb1eb1f21840094b84e4e3c3c3983d80d10b89823b490/markupsafe-3.0.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:26e9867520db70d37f7fb421a7f0d8adb40171011fb84ce869afa1a83370dfa8", size = 23634, upload-time = "2026-10-02T23:06:42.748Z" }, + { url = "https://files.pythonhosted.org/packages/39/a2/b8814de672f1f0094d498bf646f2fec9d6356b503d28ef500b71c5095377/markupsafe-3.0.4-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f03460ff076f70ab595bb45a0205ccea1971443575b6920c52e755dec2b3fbfe", size = 23488, upload-time = "2026-10-02T23:06:44.176Z" }, + { url = "https://files.pythonhosted.org/packages/db/c7/287223376fb73335a3cc5d6eb22c6ab01358cf33945a9c39c06b9dac3f4b/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:436e3ffc6310d3c41878c601db29098102fe5d8a467c49da4a4125254e0980f2", size = 25037, upload-time = "2026-10-02T23:06:45.646Z" }, + { url = "https://files.pythonhosted.org/packages/f9/29/4df8355e313426d19e62ba33e0253c009ca12a0894ee77d67fa67255361c/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:4e2c4809c14559aa7ef426f27fb35afbb38104c349a903bf8f3600456764bb38", size = 23543, upload-time = "2026-10-02T23:06:47.264Z" }, + { url = "https://files.pythonhosted.org/packages/71/e5/8377731e8495668dcc768f645e717df18318c841edaf023a99395f6da9b4/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:da2af0d7aebfc2074080d72efa6ab8317c62481ef1f896f65d9999c1c01f4494", size = 25282, upload-time = "2026-10-02T23:06:48.795Z" }, + { url = "https://files.pythonhosted.org/packages/ed/5f/373456e37ceb1478d657d6fe769cbe0a39f0a8dfc1548eeb19c471eefdd9/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:aa2c838cc024642cc04c6854232f32b43e5e22833dd11119c1766c7873b8370d", size = 22993, upload-time = "2026-10-02T23:06:50.31Z" }, + { url = "https://files.pythonhosted.org/packages/d7/93/2cbd5628435afb6f541bbaced4bce0c2edac4b09a142e6e928b8b0da9858/markupsafe-3.0.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:b91cc9d336957239ff200f30097e6fea2dc6d6fb3c81e853eaa09eac904fd894", size = 23712, upload-time = "2026-10-02T23:06:51.759Z" }, + { url = "https://files.pythonhosted.org/packages/81/99/157e10966b033b363aeda5263e82596ee232a0b1d082fdbf90aa417ff083/markupsafe-3.0.4-cp315-cp315t-win32.whl", hash = "sha256:e49fb0d1ce92cfa0cb198cc5b1b11cdf9d0638658e2a2db2687e39db7c87fc78", size = 14300, upload-time = "2026-10-02T23:06:53.241Z" }, + { url = "https://files.pythonhosted.org/packages/33/05/55884815414c9706a23deca150b72c25a62109e65b0b6ce232077802c719/markupsafe-3.0.4-cp315-cp315t-win_amd64.whl", hash = "sha256:4f6e0852a0283b1b1fd776eeb7b766a5f440b3e2bd31ab51af3b400585f3965c", size = 14522, upload-time = "2026-10-02T23:06:54.729Z" }, + { url = "https://files.pythonhosted.org/packages/92/f9/ecbde7149e95b8a0f18e16d5d747f7dc06049d5da2e4f77f6f5e4a1f46a8/markupsafe-3.0.4-cp315-cp315t-win_arm64.whl", hash = "sha256:39dbacefc411633db5b4378b066a9aca70a3d7e2922c9e578d825f844026eeba", size = 14417, upload-time = "2026-10-02T23:06:56.246Z" }, ] [[package]] name = "maturin" -version = "1.9.6" +version = "1.15.0" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "tomli", marker = "python_full_version < '3.11'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/9a/35/c3370188492f4c139c7a318f438d01b8185c216303c49c4bc885c98b6afb/maturin-1.9.6.tar.gz", hash = "sha256:2c2ae37144811d365509889ed7220b0598487f1278c2441829c3abf56cc6324a", size = 214846, upload-time = "2025-10-07T12:45:08.408Z" } +sdist = { url = "https://files.pythonhosted.org/packages/b9/c8/22e5e21b2679c9bce6415ca578034ca2cc9316be0642ae21e051a2d5198c/maturin-1.15.0.tar.gz", hash = "sha256:94b26cc8e8aba61a5f2099715fe640e18c5f678e9a500408b38761263954228a", size = 385504, upload-time = "2026-08-24T12:11:22.665Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/55/5c/b435418ba4ba2647a1f7a95d53314991b1e556e656ae276dea993c3bce1d/maturin-1.9.6-py3-none-linux_armv6l.whl", hash = "sha256:26e3ab1a42a7145824210e9d763f6958f2c46afb1245ddd0bab7d78b1f59bb3f", size = 8134483, upload-time = "2025-10-07T12:44:44.274Z" }, - { url = "https://files.pythonhosted.org/packages/4d/1c/8e58eda6601f328b412cdeeaa88a9b6a10e591e2a73f313e8c0154d68385/maturin-1.9.6-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:5263dda3f71feef2e4122baf5c4620e4b3710dbb7f2121f85a337182de214369", size = 15776470, upload-time = "2025-10-07T12:44:47.476Z" }, - { url = "https://files.pythonhosted.org/packages/6c/33/8c967cce6848cdd87a2e442c86120ac644b80c5ed4c32e3291bde6a17df8/maturin-1.9.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fe78262c2800c92f67d1ce3c0f6463f958a692cc67bfb572e5dbf5b4b696a8ba", size = 8226557, upload-time = "2025-10-07T12:44:49.844Z" }, - { url = "https://files.pythonhosted.org/packages/58/bd/3e2675cdc8b7270700ba30c663c852a35694441732a107ac30ebd6878bd8/maturin-1.9.6-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl", hash = "sha256:7ab827c6e8c022eb2e1e7fb6deede54549c8460b20ccc2e9268cc6e8cde957a8", size = 8166544, upload-time = "2025-10-07T12:44:51.396Z" }, - { url = "https://files.pythonhosted.org/packages/58/1f/a2047ddf2230e700d5f8a13dd4b9af5ce806ad380c32e58105888205926e/maturin-1.9.6-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl", hash = "sha256:0246202377c49449315305209f45c8ecef6e2d6bd27a04b5b6f1ab3e4ea47238", size = 8641010, upload-time = "2025-10-07T12:44:53.658Z" }, - { url = "https://files.pythonhosted.org/packages/be/1f/265d63c7aa6faf363d4a3f23396f51bc6b4d5c7680a4190ae68dba25dea2/maturin-1.9.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:f5bac167700fbb6f8c8ed1a97b494522554b4432d7578e11403b894b6a91d99f", size = 7965945, upload-time = "2025-10-07T12:44:55.248Z" }, - { url = "https://files.pythonhosted.org/packages/4c/ca/a8e61979ccfe080948bcc1bddd79356157aee687134df7fb013050cec783/maturin-1.9.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:7f53d3b1d8396d3fea3e1ee5fd37558bca5719090f3d194ba1c02b0b56327ae3", size = 7978820, upload-time = "2025-10-07T12:44:56.919Z" }, - { url = "https://files.pythonhosted.org/packages/bf/4a/81b412f8ad02a99801ef19ec059fba0822d1d28fb44cb6a92e722f05f278/maturin-1.9.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl", hash = "sha256:7f506eb358386d94d6ec3208c003130cf4b69cab26034fc0cbbf8bf83afa4c2e", size = 10452064, upload-time = "2025-10-07T12:44:58.232Z" }, - { url = "https://files.pythonhosted.org/packages/5b/12/cc96c7a8cb51d8dcc9badd886c361caa1526fba7fa69d1e7892e613b71d4/maturin-1.9.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f2d6984ab690af509f525dbd2b130714207c06ebb14a5814edbe1e42b17ae0de", size = 8852401, upload-time = "2025-10-07T12:44:59.8Z" }, - { url = "https://files.pythonhosted.org/packages/51/8e/653ac3c9f2c25cdd81aefb0a2d17ff140ca5a14504f5e3c7f94dcfe4dbb7/maturin-1.9.6-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:5c2252b0956bb331460ac750c805ddf0d9b44442449fc1f16e3b66941689d0bc", size = 8425057, upload-time = "2025-10-07T12:45:01.711Z" }, - { url = "https://files.pythonhosted.org/packages/db/29/f13490328764ae9bfc1da55afc5b707cebe4fa75ad7a1573bfa82cfae0c6/maturin-1.9.6-py3-none-win32.whl", hash = "sha256:f2c58d29ebdd4346fd004e6be213d071fdd94a77a16aa91474a21a4f9dbf6309", size = 7165956, upload-time = "2025-10-07T12:45:03.766Z" }, - { url = "https://files.pythonhosted.org/packages/db/9f/dd51e5ac1fce47581b8efa03d77a03f928c0ef85b6e48a61dfa37b6b85a2/maturin-1.9.6-py3-none-win_amd64.whl", hash = "sha256:1b39a5d82572c240d20d9e8be024d722dfb311d330c5e28ddeb615211755941a", size = 8145722, upload-time = "2025-10-07T12:45:05.487Z" }, - { url = "https://files.pythonhosted.org/packages/65/f2/e97aaba6d0d78c5871771bf9dd71d4eb8dac15df9109cf452748d2207412/maturin-1.9.6-py3-none-win_arm64.whl", hash = "sha256:ac02a30083553d2a781c10cd6f5480119bf6692fd177e743267406cad2ad198c", size = 6857006, upload-time = "2025-10-07T12:45:06.813Z" }, + { url = "https://files.pythonhosted.org/packages/14/69/5c01b461044eb1f45ddcce006706eb88110c793cdb11c7ae0b5e08492e94/maturin-1.15.0-py3-none-linux_armv6l.whl", hash = "sha256:6bf6dc62e22d4dcfd5a51244ff0d58975fa4979c48209fe84159617648956d82", size = 10206220, upload-time = "2026-08-24T12:10:53.327Z" }, + { url = "https://files.pythonhosted.org/packages/eb/1f/2b431554e11687cdb1077e0cdadcc118c53f611086b3af00c8545a67c6a5/maturin-1.15.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:cd35772633f489841132bc8e71d6fc7f842df30b9c05cd5cdf1ee1ddcb744cc7", size = 19416513, upload-time = "2026-08-24T12:10:56.126Z" }, + { url = "https://files.pythonhosted.org/packages/51/36/e23a21cb34a648b711036b9b2fe1d4f3f4ee24f8db54215d73f1a9a3a3ec/maturin-1.15.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:c40b4eae7bf5ef1f4b1af8d623fe4105016f93578fb15b764e741d08ec3b92dd", size = 10014962, upload-time = "2026-08-24T12:10:58.486Z" }, + { url = "https://files.pythonhosted.org/packages/8c/80/33b15cb2d8f30f12c807955e8f2fd775027692904e30ec0784744ce8cd83/maturin-1.15.0-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl", hash = "sha256:7eb066372f541f8eb4909c79c5d9bd0b9e8125980bdf1ec9e8aba23c6c8d6c55", size = 10196223, upload-time = "2026-08-24T12:11:00.696Z" }, + { url = "https://files.pythonhosted.org/packages/fe/91/b495e19e2f5c503b540452b2039115e7b2363867e8c5ad4179eb752fa92c/maturin-1.15.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl", hash = "sha256:653020a63525bb224e5ab0adf02e17a2e08bc86dbea7fc1399c9a56d7529b99e", size = 10541186, upload-time = "2026-08-24T12:11:02.857Z" }, + { url = "https://files.pythonhosted.org/packages/5d/2b/2abff58037188d852b124871b1f0d720e1c2bfb3d4f1b03d87c52cd66488/maturin-1.15.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:0ebf9767892725083138e671c34482c660317a2f3d6a29fc0e0f34e9d8c99136", size = 10083468, upload-time = "2026-08-24T12:11:05.012Z" }, + { url = "https://files.pythonhosted.org/packages/3f/07/b7e9f8be99a6627849e81ac7b6694876bce8f50a92995fe17e3cf2610f0a/maturin-1.15.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:7ab7eebffd7b8debca2265985de4eaeb332141276d24b9560b5ad484d4b3add1", size = 10047786, upload-time = "2026-08-24T12:11:07.042Z" }, + { url = "https://files.pythonhosted.org/packages/ca/ab/167e3cb7accee11b507dbe53e0e87aeccb376d44ae66284c96ee4df3a9fd/maturin-1.15.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl", hash = "sha256:126e12e618b4db42f68c779a56d41f82a390145ba36ac3f621d057eb34f5ad9d", size = 13315332, upload-time = "2026-08-24T12:11:09.433Z" }, + { url = "https://files.pythonhosted.org/packages/14/4d/801379f646cbc6b00998e5289b0630a886be3a4ee4c75b6bc9b87478a7f1/maturin-1.15.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4f9d33e6c3f9615c8caceecbbbd440f8eb25a3ddeb687077682cd5eca2e9ae15", size = 10807183, upload-time = "2026-08-24T12:11:11.73Z" }, + { url = "https://files.pythonhosted.org/packages/89/27/2e612e1cbd1580e9e94d4722c227b5180dca27b32b955a34b79918aa1292/maturin-1.15.0-py3-none-manylinux_2_31_riscv64.musllinux_1_1_riscv64.whl", hash = "sha256:bf29beddd0c6708f112db51d5275fc28b28b9e9c9c5faae387eaef662918b176", size = 10413274, upload-time = "2026-08-24T12:11:14.04Z" }, + { url = "https://files.pythonhosted.org/packages/70/d8/202a7b4d75a51f20f84ec9ce3b7345b12b822207072164e2b1c6ef665125/maturin-1.15.0-py3-none-win32.whl", hash = "sha256:da649988be98e87e009e51b1bf0d301b6a301bc0cecbdd60d40d8ba60748d1ca", size = 8928744, upload-time = "2026-08-24T12:11:16.269Z" }, + { url = "https://files.pythonhosted.org/packages/40/dc/4e90da594986ba78dd3bc8a5921ecdcdb11085b22b02a412caab3b225601/maturin-1.15.0-py3-none-win_amd64.whl", hash = "sha256:552c2be4afd43fe8d5c9f3ec8d4c4756d973b8dcbe94c14084390301f50243e1", size = 10335085, upload-time = "2026-08-24T12:11:18.326Z" }, + { url = "https://files.pythonhosted.org/packages/8b/10/15d4314edf130955edf2dc237aa393a8a7c10f2b9b57b89fa2f61f915659/maturin-1.15.0-py3-none-win_arm64.whl", hash = "sha256:c7dc0c66c78d3debdd9c5aa807e861fbcbf07f3505d34b125df74c03986b0f48", size = 9713795, upload-time = "2026-08-24T12:11:20.83Z" }, ] [[package]] name = "mcp" -version = "1.17.0" +version = "1.30.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -1463,15 +2486,18 @@ dependencies = [ { name = "jsonschema" }, { name = "pydantic" }, { name = "pydantic-settings" }, + { name = "pyjwt", extra = ["crypto"] }, { name = "python-multipart" }, { name = "pywin32", marker = "sys_platform == 'win32'" }, { name = "sse-starlette" }, { name = "starlette" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, { name = "uvicorn", marker = "sys_platform != 'emscripten'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5a/79/5724a540df19e192e8606c543cdcf162de8eb435077520cca150f7365ec0/mcp-1.17.0.tar.gz", hash = "sha256:1b57fabf3203240ccc48e39859faf3ae1ccb0b571ff798bbedae800c73c6df90", size = 477951, upload-time = "2025-10-10T12:16:44.519Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ba/93/0142dc84a666daf8ad51a34268f34c12fd6fda4f3810c4be2504eecc8212/mcp-1.30.0.tar.gz", hash = "sha256:445414625fce5c295faa505bb11bacece661ab6f4028d57c935db57820b7a3e4", size = 680511, upload-time = "2026-09-07T14:34:15.845Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1c/72/3751feae343a5ad07959df713907b5c3fbaed269d697a14b0c449080cf2e/mcp-1.17.0-py3-none-any.whl", hash = "sha256:0660ef275cada7a545af154db3082f176cf1d2681d5e35ae63e014faf0a35d40", size = 167737, upload-time = "2025-10-10T12:16:42.863Z" }, + { url = "https://files.pythonhosted.org/packages/f5/f4/e58bc33317c92a0203664daaf00bf6f41166cc0149e5d6870a03f7cd004a/mcp-1.30.0-py3-none-any.whl", hash = "sha256:666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0", size = 234581, upload-time = "2026-09-07T14:34:14.266Z" }, ] [[package]] @@ -1485,255 +2511,365 @@ wheels = [ [[package]] name = "more-itertools" -version = "10.8.0" +version = "11.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/55/e5/8735dc589d9e3571e76cd684e7763dc0fcc940b811f71640410458749689/more_itertools-11.2.0.tar.gz", hash = "sha256:59960f488835254863a857eb501f69e4ec92fdc8822f098c0f48dba530afd487", size = 75940, upload-time = "2026-10-13T16:01:14.428Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d4/f7/86f27473377a8ebdbdfedec5e62e87fbc24c4c88ed0a2a5ea0a12ee2229b/more_itertools-11.2.0-py3-none-any.whl", hash = "sha256:e4c522352a24664c974d0be8382944107ae638281a06391a5a538366b5707fe5", size = 74407, upload-time = "2026-10-13T16:01:13.424Z" }, +] + +[[package]] +name = "moto" +version = "5.2.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "boto3" }, + { name = "botocore" }, + { name = "cryptography" }, + { name = "requests" }, + { name = "responses" }, + { name = "werkzeug" }, + { name = "xmltodict" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/17/27/671bc2fbff0f86a8fcd6882ee56de69b5f80f71ba089eb663d10eca28726/moto-5.2.4.tar.gz", hash = "sha256:1a467004562034a09717c3f1ed533337a81ead573ed5d2d40cad648b5ec17e00", size = 9228741, upload-time = "2026-10-11T18:41:16.538Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/00/5729790afc2ee0ac52567c2388452918dfabb383d3afbf613f9136ee5ee2/moto-5.2.4-py3-none-any.whl", hash = "sha256:b75cf0a0063315bab6a4c3606f475ee118f3c329c8d5477a2447e699bdf13155", size = 7195856, upload-time = "2026-10-11T18:41:12.892Z" }, +] + +[package.optional-dependencies] +s3 = [ + { name = "py-partiql-parser" }, + { name = "pyyaml" }, +] +server = [ + { name = "antlr4-python3-runtime" }, + { name = "aws-xray-sdk" }, + { name = "cfn-lint" }, + { name = "docker" }, + { name = "flask" }, + { name = "flask-cors" }, + { name = "graphql-core" }, + { name = "joserfc" }, + { name = "jsonpath-ng" }, + { name = "openapi-spec-validator" }, + { name = "py-partiql-parser" }, + { name = "pyparsing" }, + { name = "pyyaml" }, +] + +[[package]] +name = "mpmath" +version = "1.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz", hash = "sha256:f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd", size = 137431, upload-time = "2025-09-02T15:23:11.018Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f", size = 508106, upload-time = "2023-03-07T16:47:11.061Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a4/8e/469e5a4a2f5855992e425f3cb33804cc07bf18d48f2db061aec61ce50270/more_itertools-10.8.0-py3-none-any.whl", hash = "sha256:52d4362373dcf7c52546bc4af9a86ee7c4579df9a8dc268be0a2f949d376cc9b", size = 69667, upload-time = "2025-09-02T15:23:09.635Z" }, + { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" }, ] [[package]] name = "msgpack" -version = "1.1.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz", hash = "sha256:3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e", size = 173581, upload-time = "2025-10-08T09:15:56.596Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f5/a2/3b68a9e769db68668b25c6108444a35f9bd163bb848c0650d516761a59c0/msgpack-1.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0051fffef5a37ca2cd16978ae4f0aef92f164df86823871b5162812bebecd8e2", size = 81318, upload-time = "2025-10-08T09:14:38.722Z" }, - { url = "https://files.pythonhosted.org/packages/5b/e1/2b720cc341325c00be44e1ed59e7cfeae2678329fbf5aa68f5bda57fe728/msgpack-1.1.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a605409040f2da88676e9c9e5853b3449ba8011973616189ea5ee55ddbc5bc87", size = 83786, upload-time = "2025-10-08T09:14:40.082Z" }, - { url = "https://files.pythonhosted.org/packages/71/e5/c2241de64bfceac456b140737812a2ab310b10538a7b34a1d393b748e095/msgpack-1.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b696e83c9f1532b4af884045ba7f3aa741a63b2bc22617293a2c6a7c645f251", size = 398240, upload-time = "2025-10-08T09:14:41.151Z" }, - { url = "https://files.pythonhosted.org/packages/b7/09/2a06956383c0fdebaef5aa9246e2356776f12ea6f2a44bd1368abf0e46c4/msgpack-1.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:365c0bbe981a27d8932da71af63ef86acc59ed5c01ad929e09a0b88c6294e28a", size = 406070, upload-time = "2025-10-08T09:14:42.821Z" }, - { url = "https://files.pythonhosted.org/packages/0e/74/2957703f0e1ef20637d6aead4fbb314330c26f39aa046b348c7edcf6ca6b/msgpack-1.1.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:41d1a5d875680166d3ac5c38573896453bbbea7092936d2e107214daf43b1d4f", size = 393403, upload-time = "2025-10-08T09:14:44.38Z" }, - { url = "https://files.pythonhosted.org/packages/a5/09/3bfc12aa90f77b37322fc33e7a8a7c29ba7c8edeadfa27664451801b9860/msgpack-1.1.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:354e81bcdebaab427c3df4281187edc765d5d76bfb3a7c125af9da7a27e8458f", size = 398947, upload-time = "2025-10-08T09:14:45.56Z" }, - { url = "https://files.pythonhosted.org/packages/4b/4f/05fcebd3b4977cb3d840f7ef6b77c51f8582086de5e642f3fefee35c86fc/msgpack-1.1.2-cp310-cp310-win32.whl", hash = "sha256:e64c8d2f5e5d5fda7b842f55dec6133260ea8f53c4257d64494c534f306bf7a9", size = 64769, upload-time = "2025-10-08T09:14:47.334Z" }, - { url = "https://files.pythonhosted.org/packages/d0/3e/b4547e3a34210956382eed1c85935fff7e0f9b98be3106b3745d7dec9c5e/msgpack-1.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:db6192777d943bdaaafb6ba66d44bf65aa0e9c5616fa1d2da9bb08828c6b39aa", size = 71293, upload-time = "2025-10-08T09:14:48.665Z" }, - { url = "https://files.pythonhosted.org/packages/2c/97/560d11202bcd537abca693fd85d81cebe2107ba17301de42b01ac1677b69/msgpack-1.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2e86a607e558d22985d856948c12a3fa7b42efad264dca8a3ebbcfa2735d786c", size = 82271, upload-time = "2025-10-08T09:14:49.967Z" }, - { url = "https://files.pythonhosted.org/packages/83/04/28a41024ccbd67467380b6fb440ae916c1e4f25e2cd4c63abe6835ac566e/msgpack-1.1.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:283ae72fc89da59aa004ba147e8fc2f766647b1251500182fac0350d8af299c0", size = 84914, upload-time = "2025-10-08T09:14:50.958Z" }, - { url = "https://files.pythonhosted.org/packages/71/46/b817349db6886d79e57a966346cf0902a426375aadc1e8e7a86a75e22f19/msgpack-1.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:61c8aa3bd513d87c72ed0b37b53dd5c5a0f58f2ff9f26e1555d3bd7948fb7296", size = 416962, upload-time = "2025-10-08T09:14:51.997Z" }, - { url = "https://files.pythonhosted.org/packages/da/e0/6cc2e852837cd6086fe7d8406af4294e66827a60a4cf60b86575a4a65ca8/msgpack-1.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:454e29e186285d2ebe65be34629fa0e8605202c60fbc7c4c650ccd41870896ef", size = 426183, upload-time = "2025-10-08T09:14:53.477Z" }, - { url = "https://files.pythonhosted.org/packages/25/98/6a19f030b3d2ea906696cedd1eb251708e50a5891d0978b012cb6107234c/msgpack-1.1.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7bc8813f88417599564fafa59fd6f95be417179f76b40325b500b3c98409757c", size = 411454, upload-time = "2025-10-08T09:14:54.648Z" }, - { url = "https://files.pythonhosted.org/packages/b7/cd/9098fcb6adb32187a70b7ecaabf6339da50553351558f37600e53a4a2a23/msgpack-1.1.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bafca952dc13907bdfdedfc6a5f579bf4f292bdd506fadb38389afa3ac5b208e", size = 422341, upload-time = "2025-10-08T09:14:56.328Z" }, - { url = "https://files.pythonhosted.org/packages/e6/ae/270cecbcf36c1dc85ec086b33a51a4d7d08fc4f404bdbc15b582255d05ff/msgpack-1.1.2-cp311-cp311-win32.whl", hash = "sha256:602b6740e95ffc55bfb078172d279de3773d7b7db1f703b2f1323566b878b90e", size = 64747, upload-time = "2025-10-08T09:14:57.882Z" }, - { url = "https://files.pythonhosted.org/packages/2a/79/309d0e637f6f37e83c711f547308b91af02b72d2326ddd860b966080ef29/msgpack-1.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:d198d275222dc54244bf3327eb8cbe00307d220241d9cec4d306d49a44e85f68", size = 71633, upload-time = "2025-10-08T09:14:59.177Z" }, - { url = "https://files.pythonhosted.org/packages/73/4d/7c4e2b3d9b1106cd0aa6cb56cc57c6267f59fa8bfab7d91df5adc802c847/msgpack-1.1.2-cp311-cp311-win_arm64.whl", hash = "sha256:86f8136dfa5c116365a8a651a7d7484b65b13339731dd6faebb9a0242151c406", size = 64755, upload-time = "2025-10-08T09:15:00.48Z" }, - { url = "https://files.pythonhosted.org/packages/ad/bd/8b0d01c756203fbab65d265859749860682ccd2a59594609aeec3a144efa/msgpack-1.1.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:70a0dff9d1f8da25179ffcf880e10cf1aad55fdb63cd59c9a49a1b82290062aa", size = 81939, upload-time = "2025-10-08T09:15:01.472Z" }, - { url = "https://files.pythonhosted.org/packages/34/68/ba4f155f793a74c1483d4bdef136e1023f7bcba557f0db4ef3db3c665cf1/msgpack-1.1.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:446abdd8b94b55c800ac34b102dffd2f6aa0ce643c55dfc017ad89347db3dbdb", size = 85064, upload-time = "2025-10-08T09:15:03.764Z" }, - { url = "https://files.pythonhosted.org/packages/f2/60/a064b0345fc36c4c3d2c743c82d9100c40388d77f0b48b2f04d6041dbec1/msgpack-1.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c63eea553c69ab05b6747901b97d620bb2a690633c77f23feb0c6a947a8a7b8f", size = 417131, upload-time = "2025-10-08T09:15:05.136Z" }, - { url = "https://files.pythonhosted.org/packages/65/92/a5100f7185a800a5d29f8d14041f61475b9de465ffcc0f3b9fba606e4505/msgpack-1.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:372839311ccf6bdaf39b00b61288e0557916c3729529b301c52c2d88842add42", size = 427556, upload-time = "2025-10-08T09:15:06.837Z" }, - { url = "https://files.pythonhosted.org/packages/f5/87/ffe21d1bf7d9991354ad93949286f643b2bb6ddbeab66373922b44c3b8cc/msgpack-1.1.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2929af52106ca73fcb28576218476ffbb531a036c2adbcf54a3664de124303e9", size = 404920, upload-time = "2025-10-08T09:15:08.179Z" }, - { url = "https://files.pythonhosted.org/packages/ff/41/8543ed2b8604f7c0d89ce066f42007faac1eaa7d79a81555f206a5cdb889/msgpack-1.1.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:be52a8fc79e45b0364210eef5234a7cf8d330836d0a64dfbb878efa903d84620", size = 415013, upload-time = "2025-10-08T09:15:09.83Z" }, - { url = "https://files.pythonhosted.org/packages/41/0d/2ddfaa8b7e1cee6c490d46cb0a39742b19e2481600a7a0e96537e9c22f43/msgpack-1.1.2-cp312-cp312-win32.whl", hash = "sha256:1fff3d825d7859ac888b0fbda39a42d59193543920eda9d9bea44d958a878029", size = 65096, upload-time = "2025-10-08T09:15:11.11Z" }, - { url = "https://files.pythonhosted.org/packages/8c/ec/d431eb7941fb55a31dd6ca3404d41fbb52d99172df2e7707754488390910/msgpack-1.1.2-cp312-cp312-win_amd64.whl", hash = "sha256:1de460f0403172cff81169a30b9a92b260cb809c4cb7e2fc79ae8d0510c78b6b", size = 72708, upload-time = "2025-10-08T09:15:12.554Z" }, - { url = "https://files.pythonhosted.org/packages/c5/31/5b1a1f70eb0e87d1678e9624908f86317787b536060641d6798e3cf70ace/msgpack-1.1.2-cp312-cp312-win_arm64.whl", hash = "sha256:be5980f3ee0e6bd44f3a9e9dea01054f175b50c3e6cdb692bc9424c0bbb8bf69", size = 64119, upload-time = "2025-10-08T09:15:13.589Z" }, - { url = "https://files.pythonhosted.org/packages/6b/31/b46518ecc604d7edf3a4f94cb3bf021fc62aa301f0cb849936968164ef23/msgpack-1.1.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4efd7b5979ccb539c221a4c4e16aac1a533efc97f3b759bb5a5ac9f6d10383bf", size = 81212, upload-time = "2025-10-08T09:15:14.552Z" }, - { url = "https://files.pythonhosted.org/packages/92/dc/c385f38f2c2433333345a82926c6bfa5ecfff3ef787201614317b58dd8be/msgpack-1.1.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:42eefe2c3e2af97ed470eec850facbe1b5ad1d6eacdbadc42ec98e7dcf68b4b7", size = 84315, upload-time = "2025-10-08T09:15:15.543Z" }, - { url = "https://files.pythonhosted.org/packages/d3/68/93180dce57f684a61a88a45ed13047558ded2be46f03acb8dec6d7c513af/msgpack-1.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1fdf7d83102bf09e7ce3357de96c59b627395352a4024f6e2458501f158bf999", size = 412721, upload-time = "2025-10-08T09:15:16.567Z" }, - { url = "https://files.pythonhosted.org/packages/5d/ba/459f18c16f2b3fc1a1ca871f72f07d70c07bf768ad0a507a698b8052ac58/msgpack-1.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fac4be746328f90caa3cd4bc67e6fe36ca2bf61d5c6eb6d895b6527e3f05071e", size = 424657, upload-time = "2025-10-08T09:15:17.825Z" }, - { url = "https://files.pythonhosted.org/packages/38/f8/4398c46863b093252fe67368b44edc6c13b17f4e6b0e4929dbf0bdb13f23/msgpack-1.1.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:fffee09044073e69f2bad787071aeec727183e7580443dfeb8556cbf1978d162", size = 402668, upload-time = "2025-10-08T09:15:19.003Z" }, - { url = "https://files.pythonhosted.org/packages/28/ce/698c1eff75626e4124b4d78e21cca0b4cc90043afb80a507626ea354ab52/msgpack-1.1.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5928604de9b032bc17f5099496417f113c45bc6bc21b5c6920caf34b3c428794", size = 419040, upload-time = "2025-10-08T09:15:20.183Z" }, - { url = "https://files.pythonhosted.org/packages/67/32/f3cd1667028424fa7001d82e10ee35386eea1408b93d399b09fb0aa7875f/msgpack-1.1.2-cp313-cp313-win32.whl", hash = "sha256:a7787d353595c7c7e145e2331abf8b7ff1e6673a6b974ded96e6d4ec09f00c8c", size = 65037, upload-time = "2025-10-08T09:15:21.416Z" }, - { url = "https://files.pythonhosted.org/packages/74/07/1ed8277f8653c40ebc65985180b007879f6a836c525b3885dcc6448ae6cb/msgpack-1.1.2-cp313-cp313-win_amd64.whl", hash = "sha256:a465f0dceb8e13a487e54c07d04ae3ba131c7c5b95e2612596eafde1dccf64a9", size = 72631, upload-time = "2025-10-08T09:15:22.431Z" }, - { url = "https://files.pythonhosted.org/packages/e5/db/0314e4e2db56ebcf450f277904ffd84a7988b9e5da8d0d61ab2d057df2b6/msgpack-1.1.2-cp313-cp313-win_arm64.whl", hash = "sha256:e69b39f8c0aa5ec24b57737ebee40be647035158f14ed4b40e6f150077e21a84", size = 64118, upload-time = "2025-10-08T09:15:23.402Z" }, - { url = "https://files.pythonhosted.org/packages/22/71/201105712d0a2ff07b7873ed3c220292fb2ea5120603c00c4b634bcdafb3/msgpack-1.1.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e23ce8d5f7aa6ea6d2a2b326b4ba46c985dbb204523759984430db7114f8aa00", size = 81127, upload-time = "2025-10-08T09:15:24.408Z" }, - { url = "https://files.pythonhosted.org/packages/1b/9f/38ff9e57a2eade7bf9dfee5eae17f39fc0e998658050279cbb14d97d36d9/msgpack-1.1.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:6c15b7d74c939ebe620dd8e559384be806204d73b4f9356320632d783d1f7939", size = 84981, upload-time = "2025-10-08T09:15:25.812Z" }, - { url = "https://files.pythonhosted.org/packages/8e/a9/3536e385167b88c2cc8f4424c49e28d49a6fc35206d4a8060f136e71f94c/msgpack-1.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:99e2cb7b9031568a2a5c73aa077180f93dd2e95b4f8d3b8e14a73ae94a9e667e", size = 411885, upload-time = "2025-10-08T09:15:27.22Z" }, - { url = "https://files.pythonhosted.org/packages/2f/40/dc34d1a8d5f1e51fc64640b62b191684da52ca469da9cd74e84936ffa4a6/msgpack-1.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:180759d89a057eab503cf62eeec0aa61c4ea1200dee709f3a8e9397dbb3b6931", size = 419658, upload-time = "2025-10-08T09:15:28.4Z" }, - { url = "https://files.pythonhosted.org/packages/3b/ef/2b92e286366500a09a67e03496ee8b8ba00562797a52f3c117aa2b29514b/msgpack-1.1.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:04fb995247a6e83830b62f0b07bf36540c213f6eac8e851166d8d86d83cbd014", size = 403290, upload-time = "2025-10-08T09:15:29.764Z" }, - { url = "https://files.pythonhosted.org/packages/78/90/e0ea7990abea5764e4655b8177aa7c63cdfa89945b6e7641055800f6c16b/msgpack-1.1.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:8e22ab046fa7ede9e36eeb4cfad44d46450f37bb05d5ec482b02868f451c95e2", size = 415234, upload-time = "2025-10-08T09:15:31.022Z" }, - { url = "https://files.pythonhosted.org/packages/72/4e/9390aed5db983a2310818cd7d3ec0aecad45e1f7007e0cda79c79507bb0d/msgpack-1.1.2-cp314-cp314-win32.whl", hash = "sha256:80a0ff7d4abf5fecb995fcf235d4064b9a9a8a40a3ab80999e6ac1e30b702717", size = 66391, upload-time = "2025-10-08T09:15:32.265Z" }, - { url = "https://files.pythonhosted.org/packages/6e/f1/abd09c2ae91228c5f3998dbd7f41353def9eac64253de3c8105efa2082f7/msgpack-1.1.2-cp314-cp314-win_amd64.whl", hash = "sha256:9ade919fac6a3e7260b7f64cea89df6bec59104987cbea34d34a2fa15d74310b", size = 73787, upload-time = "2025-10-08T09:15:33.219Z" }, - { url = "https://files.pythonhosted.org/packages/6a/b0/9d9f667ab48b16ad4115c1935d94023b82b3198064cb84a123e97f7466c1/msgpack-1.1.2-cp314-cp314-win_arm64.whl", hash = "sha256:59415c6076b1e30e563eb732e23b994a61c159cec44deaf584e5cc1dd662f2af", size = 66453, upload-time = "2025-10-08T09:15:34.225Z" }, - { url = "https://files.pythonhosted.org/packages/16/67/93f80545eb1792b61a217fa7f06d5e5cb9e0055bed867f43e2b8e012e137/msgpack-1.1.2-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:897c478140877e5307760b0ea66e0932738879e7aa68144d9b78ea4c8302a84a", size = 85264, upload-time = "2025-10-08T09:15:35.61Z" }, - { url = "https://files.pythonhosted.org/packages/87/1c/33c8a24959cf193966ef11a6f6a2995a65eb066bd681fd085afd519a57ce/msgpack-1.1.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a668204fa43e6d02f89dbe79a30b0d67238d9ec4c5bd8a940fc3a004a47b721b", size = 89076, upload-time = "2025-10-08T09:15:36.619Z" }, - { url = "https://files.pythonhosted.org/packages/fc/6b/62e85ff7193663fbea5c0254ef32f0c77134b4059f8da89b958beb7696f3/msgpack-1.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5559d03930d3aa0f3aacb4c42c776af1a2ace2611871c84a75afe436695e6245", size = 435242, upload-time = "2025-10-08T09:15:37.647Z" }, - { url = "https://files.pythonhosted.org/packages/c1/47/5c74ecb4cc277cf09f64e913947871682ffa82b3b93c8dad68083112f412/msgpack-1.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:70c5a7a9fea7f036b716191c29047374c10721c389c21e9ffafad04df8c52c90", size = 432509, upload-time = "2025-10-08T09:15:38.794Z" }, - { url = "https://files.pythonhosted.org/packages/24/a4/e98ccdb56dc4e98c929a3f150de1799831c0a800583cde9fa022fa90602d/msgpack-1.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:f2cb069d8b981abc72b41aea1c580ce92d57c673ec61af4c500153a626cb9e20", size = 415957, upload-time = "2025-10-08T09:15:40.238Z" }, - { url = "https://files.pythonhosted.org/packages/da/28/6951f7fb67bc0a4e184a6b38ab71a92d9ba58080b27a77d3e2fb0be5998f/msgpack-1.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:d62ce1f483f355f61adb5433ebfd8868c5f078d1a52d042b0a998682b4fa8c27", size = 422910, upload-time = "2025-10-08T09:15:41.505Z" }, - { url = "https://files.pythonhosted.org/packages/f0/03/42106dcded51f0a0b5284d3ce30a671e7bd3f7318d122b2ead66ad289fed/msgpack-1.1.2-cp314-cp314t-win32.whl", hash = "sha256:1d1418482b1ee984625d88aa9585db570180c286d942da463533b238b98b812b", size = 75197, upload-time = "2025-10-08T09:15:42.954Z" }, - { url = "https://files.pythonhosted.org/packages/15/86/d0071e94987f8db59d4eeb386ddc64d0bb9b10820a8d82bcd3e53eeb2da6/msgpack-1.1.2-cp314-cp314t-win_amd64.whl", hash = "sha256:5a46bf7e831d09470ad92dff02b8b1ac92175ca36b087f904a0519857c6be3ff", size = 85772, upload-time = "2025-10-08T09:15:43.954Z" }, - { url = "https://files.pythonhosted.org/packages/81/f2/08ace4142eb281c12701fc3b93a10795e4d4dc7f753911d836675050f886/msgpack-1.1.2-cp314-cp314t-win_arm64.whl", hash = "sha256:d99ef64f349d5ec3293688e91486c5fdb925ed03807f64d98d205d2713c60b46", size = 70868, upload-time = "2025-10-08T09:15:44.959Z" }, +version = "1.2.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0a/e7/bb605a7bab2d8425a64b3fa762b39dc1bf1c7e3f11ba6fb5413d6db0ff8c/msgpack-1.2.3.tar.gz", hash = "sha256:32edb81a2b5eb7cd7c9d941b2bfbbb082fd2cd09e0e725930316af6b708db186", size = 196517, upload-time = "2026-09-29T02:33:52.276Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/95/b9c651ccb9d720b2e2c8d537954dff528ab869a03bf89598145716db823c/msgpack-1.2.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ec90a9ae3e1169fa1171147340f0e97d941aa19fcd3b34e8339a55933ed042af", size = 90404, upload-time = "2026-09-29T02:31:44.826Z" }, + { url = "https://files.pythonhosted.org/packages/50/cd/fc9e2e367e80f1493e2ec5f610dda558b344eeede296f88976db133e8f2c/msgpack-1.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9d7e9cbb0998bbfd363fd9a09c330520d5e9cb323c05b5a1a05865d23ccf2226", size = 89683, upload-time = "2026-09-29T02:31:46.413Z" }, + { url = "https://files.pythonhosted.org/packages/19/9e/1028485c6886c1c117f777cc9b053e541eff0fedb3292dfb1da95040edb5/msgpack-1.2.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6707d2fa2aa1bb5424ea0b05f44ffc989b15ab41a73ff5855bff4944fec7c8ac", size = 465347, upload-time = "2026-09-29T02:31:47.934Z" }, + { url = "https://files.pythonhosted.org/packages/aa/83/800570e6a22376eb8d599920f70aead4779a63611696f567477c4e85a70f/msgpack-1.2.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:382b219de3d436de3baba0f4b0c6d4336e8f5858d0eb047918b13b69a71c6c55", size = 477820, upload-time = "2026-09-29T02:31:49.479Z" }, + { url = "https://files.pythonhosted.org/packages/ab/ff/817e4a2052f848d3fb67726908d6e4e7c19f68ee7c19553a82ce7b0ed415/msgpack-1.2.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:186e6c602b8a9968b8e864c67d622a69279f7d1e55ae25f40e3bff7e815b2b62", size = 436656, upload-time = "2026-09-29T02:31:51.18Z" }, + { url = "https://files.pythonhosted.org/packages/3d/42/040cc55dde6a7d92057baac8d1fc9cfb9f4fd4162900e2ec16dc33917a7d/msgpack-1.2.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9276ba88891338f2617044429dfd080ae008c9868a25f6f1a7d004a35dc9ac0a", size = 460939, upload-time = "2026-09-29T02:31:53.026Z" }, + { url = "https://files.pythonhosted.org/packages/09/93/4dc007bdef930eed247346773bc0189b710078961d3218d5ee7ba59f322c/msgpack-1.2.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:c942c21a93f36b3a69e828c8945bb72c94dc2ffe488a2086950c812f3edf046c", size = 433608, upload-time = "2026-09-29T02:31:54.981Z" }, + { url = "https://files.pythonhosted.org/packages/c0/97/a1b944046f283ec89445cb2a982c42233b5b07cc630f9be739f4f1d469a3/msgpack-1.2.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:18a6ed513023001b28dcd3ba54966f6bb90a38274ba8d2640464bcab3a1b81d4", size = 477373, upload-time = "2026-09-29T02:31:56.713Z" }, + { url = "https://files.pythonhosted.org/packages/59/79/ab411d0d172743732ab2503f4c32a22dd1a7d1436a6feecbb160e4b6376a/msgpack-1.2.3-cp311-cp311-win32.whl", hash = "sha256:d0238cd05dec9ffbe0de1071df685ba63e30a36ac155285b1a094e727c38cbe9", size = 67514, upload-time = "2026-09-29T02:31:58.267Z" }, + { url = "https://files.pythonhosted.org/packages/63/8d/6f0cb2b84e484e96278455c26870196d025bb0cec312b226a663f1fa9000/msgpack-1.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:30e1522e4173230dca4d9ad896f038f73c0da6c1edd42f4dbad88ac583cf5d46", size = 75850, upload-time = "2026-09-29T02:31:59.449Z" }, + { url = "https://files.pythonhosted.org/packages/aa/25/f99e13a2c1d3f5a1dcaa5aab27f474e8c4358188bbc68ad79fecb0d1aefe/msgpack-1.2.3-cp311-cp311-win_arm64.whl", hash = "sha256:8ca67f77938ea6a3663aa9bd22b3e031f6da84d665be850abab910ee90728dfd", size = 72338, upload-time = "2026-09-29T02:32:00.885Z" }, + { url = "https://files.pythonhosted.org/packages/af/12/4d7c6d6203416d9fbf0f59ebaa805e70fb929b93a41b611bc821ec5964a0/msgpack-1.2.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:89c930aece4e972b208ba589c8410b4167b05e411a5ea2cb25fd96f8bc47ee43", size = 91577, upload-time = "2026-09-29T02:32:02.141Z" }, + { url = "https://files.pythonhosted.org/packages/eb/c7/8576ad39f4ca42ddad26f68eb8621d2d0a60501193d480f504bd9d7f36c4/msgpack-1.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:905a189853d6bdb204c7ae5f4ab77fb857448abfff574d3d93c62e2815b24b4f", size = 90027, upload-time = "2026-09-29T02:32:03.508Z" }, + { url = "https://files.pythonhosted.org/packages/0a/3a/aa9c580aea1314529a0f3562461479780b0d254b064f0880956bfbcc74a8/msgpack-1.2.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f3d7b3d0018746b5997dd6b14a1870b07cc4c327d9101145d94a1fc264a51a06", size = 460343, upload-time = "2026-09-29T02:32:04.906Z" }, + { url = "https://files.pythonhosted.org/packages/3a/cf/9c2e4d6c179529d5bf4a64cff76fa581486569e9fbdd35bd98f51cb624bf/msgpack-1.2.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ede33b2892ceb976283e009ad12fa1834cfdf1f9c43ee9c97849fc588d00a618", size = 472998, upload-time = "2026-09-29T02:32:06.69Z" }, + { url = "https://files.pythonhosted.org/packages/7b/41/915c81fe6df2d3cbdb0dece4f1a5cd313e1cd2abd9f501d0f50c0582517e/msgpack-1.2.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:666ef5601ab0e6e345e47febc96aa81143cc932201543480cbb9499164f05ffb", size = 423216, upload-time = "2026-09-29T02:32:08.739Z" }, + { url = "https://files.pythonhosted.org/packages/a2/e7/7dda8b1039abfd9bba4c5068172c67135c9e33089f503512db9226f23c24/msgpack-1.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:87cf2ef05ff2f2493ba29fcdaef27e960ca64dacfd13460ae29e6f92e0ed05bb", size = 451218, upload-time = "2026-09-29T02:32:10.517Z" }, + { url = "https://files.pythonhosted.org/packages/16/5b/ce995c1ed4a0522b7f2d034bc2034fd63005f240b945961b70fb56fbaf3d/msgpack-1.2.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:b774ff994d844e541439ac5d2d49a14def4104830c3465e9394c153f86200ffb", size = 422453, upload-time = "2026-09-29T02:32:11.956Z" }, + { url = "https://files.pythonhosted.org/packages/d2/3f/ce191fb87e2650d0166b34c437e499ee4a7f9db9c1eb164f41725eb6160e/msgpack-1.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:eaf7e82249837e3aa97297b34a0bb9ff562027381631e057cea6e1367f10b438", size = 469003, upload-time = "2026-09-29T02:32:13.663Z" }, + { url = "https://files.pythonhosted.org/packages/42/35/539123407fe200fb16609c835675496fbeb6017ace9fc93909f0613223ae/msgpack-1.2.3-cp312-cp312-win32.whl", hash = "sha256:7c047250096f9fc19dba26e3d1639b5e7a84114003605c94def667149a70ced1", size = 68303, upload-time = "2026-09-29T02:32:15.02Z" }, + { url = "https://files.pythonhosted.org/packages/6f/4c/331b45f9b86fbda6b9e103244d189068e51f726d8c40021ed66e1f2c415e/msgpack-1.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:3ec409b0d6aa8e9eec6eaf881b893caa215dbe68c5319ca96e8a271d81bb111d", size = 76744, upload-time = "2026-09-29T02:32:16.344Z" }, + { url = "https://files.pythonhosted.org/packages/13/9f/fb572dc42b9fac06c7ea848aaee6e140d84469743bd1402bc07089fc4566/msgpack-1.2.3-cp312-cp312-win_arm64.whl", hash = "sha256:59612b4ed48a04cf024584218e813562f3b30a3bafa5f55abe300b15da314751", size = 71580, upload-time = "2026-09-29T02:32:17.617Z" }, + { url = "https://files.pythonhosted.org/packages/1f/8b/3824d65e912e925d09ce30d9130fa9970d6d2855d7888b13639a6604967f/msgpack-1.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:21bfa4d2aa0b04c1806ef778a1199e9e53ea2441bcbf284420a32083896320b8", size = 91728, upload-time = "2026-09-29T02:32:18.949Z" }, + { url = "https://files.pythonhosted.org/packages/05/e6/df7f2c9ebb94760113debbcea2bd3afe5fdab88a4f7bec1b618755517460/msgpack-1.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:db84203b13aecc222f465061397fdd5b53b7ae73d2c95ffc1c8dc5be0153a709", size = 89955, upload-time = "2026-09-29T02:32:20.224Z" }, + { url = "https://files.pythonhosted.org/packages/08/6a/e5fc57136e8bacccb2b39627dea2cd546540a06181e22fe6db90e15b3ae4/msgpack-1.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5e0d7950ca3c1bbae291d0552dd3bb2792fc680629c4c0d44e47e5bab969f3ca", size = 454930, upload-time = "2026-09-29T02:32:21.771Z" }, + { url = "https://files.pythonhosted.org/packages/b0/30/c394d37898db9212d1693456cdf363c7e1a097d0b63e10664007f3df3ec1/msgpack-1.2.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:07c9733089d1b176c3dd2f7fa268452f9d5d784d076473499d754a58e8d1fbbb", size = 466866, upload-time = "2026-09-29T02:32:23.742Z" }, + { url = "https://files.pythonhosted.org/packages/4a/c8/1e4ddf6f6b829b3ee6c530c79dfae89cb609d2b0eedb5e0ae716851c52d1/msgpack-1.2.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f24a43b3560e20f825b807fe1e874bd73d53abaf8bbdcf258a6eb152cddbc1f5", size = 418715, upload-time = "2026-09-29T02:32:25.262Z" }, + { url = "https://files.pythonhosted.org/packages/11/a5/f460ba6d7a12d4301002f3efbb8f841e8bdc9c5fc98d771689677a352885/msgpack-1.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6576f348ed6cc4f31db6fd915a8e94245f042f50eae08d48732425e70638ea37", size = 446489, upload-time = "2026-09-29T02:32:26.988Z" }, + { url = "https://files.pythonhosted.org/packages/49/23/adface88db909bed321c85dd673655152d4a514c67e1f0800eb51c777d07/msgpack-1.2.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:cd5a9f9f86a52c24713679aa2631956835f3842512964ff93f736ff76f1f530d", size = 416998, upload-time = "2026-09-29T02:32:28.606Z" }, + { url = "https://files.pythonhosted.org/packages/36/00/5bb3a239ccfc3763c4d0fa49b13b1b7010b00182c499ab3c1fecfe6294bc/msgpack-1.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f9ddd28d3e9bbc602a9dced1591882c7fb9ab776eef8837da2c326fde19e2853", size = 463288, upload-time = "2026-09-29T02:32:30.375Z" }, + { url = "https://files.pythonhosted.org/packages/29/8c/456df77f00d701df9d6980ffb80291bce6e4e2e112e25a4dfae216f0715a/msgpack-1.2.3-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:62cc1a4ef0e553bac32c8342e1f04834aca7de276b92744eb7307db77759b890", size = 53347, upload-time = "2026-09-29T02:32:31.867Z" }, + { url = "https://files.pythonhosted.org/packages/9d/22/ce780be666f89b77cdb855daa9ec62e87bb7f69e9f403e4a5d83a2b2208f/msgpack-1.2.3-cp313-cp313-win32.whl", hash = "sha256:d2f9c4f85e47a44d26d5baf3b041eef23436e224d44eed273f01bd8a12048d9f", size = 68258, upload-time = "2026-09-29T02:32:33.163Z" }, + { url = "https://files.pythonhosted.org/packages/51/06/c3def9bc4db283103c5901b302ee2a4305cb1e69729244f94d9bd8f8e8e7/msgpack-1.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:bb89b5dc30469c84bbf8684826eb851d82412ca95690e111b9ac5e8fb343961a", size = 76569, upload-time = "2026-09-29T02:32:34.412Z" }, + { url = "https://files.pythonhosted.org/packages/12/9f/cef344073858b80adb92d6ea342e20b0eae7a8f6fe70281b69cf03707270/msgpack-1.2.3-cp313-cp313-win_arm64.whl", hash = "sha256:471e12a6a42498a31490c206e0069e343b6a7c35db540be73a879eb06f5be047", size = 71530, upload-time = "2026-09-29T02:32:35.892Z" }, + { url = "https://files.pythonhosted.org/packages/3f/8e/f777f74e38731c428857933c8011596f2d2f3160c821152f23b6ffba862f/msgpack-1.2.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:3a31905206722103a84c1f72633fe30692cff6732c9d262e09a27dbc468797c8", size = 92042, upload-time = "2026-09-29T02:32:37.464Z" }, + { url = "https://files.pythonhosted.org/packages/a0/71/551608543ee5d590f7e8d522267665d6d9946866ad2a2a70a770f7c70793/msgpack-1.2.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:3372475211a9ce1a23acefe512cb3e121d18c95dc74ed56cb1819ef40836ebf4", size = 90578, upload-time = "2026-09-29T02:32:38.883Z" }, + { url = "https://files.pythonhosted.org/packages/ea/11/6d78ce5a9a58bf9ba7b1b6a8f649173b030e6770c8019cf330b91825ee5d/msgpack-1.2.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9324c54995641c3d1f92a9d55093c8cde0ffa2fbc87a467a688ef60428393220", size = 454352, upload-time = "2026-09-29T02:32:40.34Z" }, + { url = "https://files.pythonhosted.org/packages/3d/08/feb9a196269ba7809f44f9117d9e4a601c41c313f6144fd0c337293a5488/msgpack-1.2.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d8ef3a66e4b52d2d7fdd90df2984670124b2ff7546d76bb25dcf68ef47f7df58", size = 462562, upload-time = "2026-09-29T02:32:42.176Z" }, + { url = "https://files.pythonhosted.org/packages/f5/77/3a674f366def24140b103d1ffd4fd27b3d912a13e47da67422afa16bebb3/msgpack-1.2.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:902f3490db0e07a7d40b48536a85c9b28fbf1397e7e1658a45a55f958e303620", size = 418134, upload-time = "2026-09-29T02:32:43.693Z" }, + { url = "https://files.pythonhosted.org/packages/48/82/944e71f280577490d99a3951cbce21aa4cbe04e7ab42cb373fd668af883c/msgpack-1.2.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:8e51eca14fbb65c4e0a5a9657346962bd3dca78c08e04e3d4dee70ef48687d30", size = 445937, upload-time = "2026-09-29T02:32:45.739Z" }, + { url = "https://files.pythonhosted.org/packages/b1/ec/feddd629c4a3edf1395313680450c525086cceab56dec0d4de9da9ccb618/msgpack-1.2.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:f42f146752eedb6765f07dcc04d72dab0a25779ec8d4a88c0085263ce114f22c", size = 416450, upload-time = "2026-09-29T02:32:47.558Z" }, + { url = "https://files.pythonhosted.org/packages/e4/59/263a10f8c4613ba0713f48cbda7695ac8dd6d6fab2fcbc9168f03f23a94d/msgpack-1.2.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:0ed5823c4efc20fe87d3530665f40ec18a002be003114814c21235cc8d256207", size = 459546, upload-time = "2026-09-29T02:32:49.145Z" }, + { url = "https://files.pythonhosted.org/packages/1e/21/addcfa1e583cfc8a22fbdc57526621b5decd7ad676ae12e9150b7be1be5d/msgpack-1.2.3-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:2487453ca1b6104442c6442f9a1a8fee1fe8f428a70d99d4cba799108b304150", size = 53462, upload-time = "2026-09-29T02:32:50.708Z" }, + { url = "https://files.pythonhosted.org/packages/8d/2c/3cb5c8524a1335ee27ca952c7ab78d375a16fea8e18ae3767ba0c880416c/msgpack-1.2.3-cp314-cp314-win32.whl", hash = "sha256:6df430419f2338cb71e4a34d6e64f83c88ccd321f91f40ba4513400b36d864ec", size = 70294, upload-time = "2026-09-29T02:32:52.037Z" }, + { url = "https://files.pythonhosted.org/packages/23/f9/9172ff3cdb85d160ad06df5e2708a5fce7682982a5eee8d31869b9f69d2e/msgpack-1.2.3-cp314-cp314-win_amd64.whl", hash = "sha256:84a6616d396ec1bc18a1e83e67c96a393ec35dfe5e17434a5be7b9aa0fe988ab", size = 77778, upload-time = "2026-09-29T02:32:53.429Z" }, + { url = "https://files.pythonhosted.org/packages/04/e8/b4c23178bcf605ae17cec48a75530dd69d49b0a5a6f5f4df5c47d59f746e/msgpack-1.2.3-cp314-cp314-win_arm64.whl", hash = "sha256:7a003b02c6ee2eea6dfe0bb08818631e3597e69f0131f2a8250488a1cc553290", size = 73794, upload-time = "2026-09-29T02:32:54.763Z" }, + { url = "https://files.pythonhosted.org/packages/66/b1/92704be352c4f428b7e0a0e0fb210cb1aa2b1c42c102b8dc22d34b82fac0/msgpack-1.2.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:ccea05b5542f6d283fef3f0a8e93a7f0be90af0ddeeef84c25c0216ba76dcae1", size = 93721, upload-time = "2026-09-29T02:32:56.342Z" }, + { url = "https://files.pythonhosted.org/packages/49/78/9c91f1e86cadcbc100b3780fd429c3715648704032a612e77a00646ebe79/msgpack-1.2.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b1631e12fe572e181cd77e831f69335d6cd5278eac22e3db3f33cf264ac2ac18", size = 94256, upload-time = "2026-09-29T02:32:58.056Z" }, + { url = "https://files.pythonhosted.org/packages/91/4d/270f9725921ae88a29d37a774a77ac24f0ef1411fc960a63f5a4665e81b4/msgpack-1.2.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e54394b7dbe2e12ab032d9d21feef7bb61a90a150a2623633ba3781ba69dcb1f", size = 471673, upload-time = "2026-09-29T02:32:59.886Z" }, + { url = "https://files.pythonhosted.org/packages/48/b8/eaa8d930f72dc1d1dd79511dc2ccf965922b059f2f0ed3b30aebac8c4b11/msgpack-1.2.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:63bb7448a1e9111319ae2430c09a5596140c160422830d6271bc75730ff2ff9a", size = 466257, upload-time = "2026-09-29T02:33:01.517Z" }, + { url = "https://files.pythonhosted.org/packages/5b/5a/97adc805037bc7e24c4e2f711bbcd3b28be8ec9aea3e778f18208cfbdb46/msgpack-1.2.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:382bc88fe90f29f5ac8a0b65c7046ff255356f2f2f3186c30e370215736fa1dc", size = 418484, upload-time = "2026-09-29T02:33:03.402Z" }, + { url = "https://files.pythonhosted.org/packages/0d/7e/1c53302606fe436ab48ba539ebafafe4a6a9efe12c4f04dc7eb36912d93e/msgpack-1.2.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c77e27790ad72989db783d5303825fba0b71550f00a490efba35cde7dc4b719f", size = 454064, upload-time = "2026-09-29T02:33:04.977Z" }, + { url = "https://files.pythonhosted.org/packages/00/2d/9ee0170f638907b396c15c6cd26b3e54f869159efc6206683acfd8f696e1/msgpack-1.2.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:700bc0fc9e968a292b9137ee70e7a012f7e115bf0107ce45e3a88202788dfc1e", size = 417901, upload-time = "2026-09-29T02:33:06.489Z" }, + { url = "https://files.pythonhosted.org/packages/cc/d2/905c84490a75cd15a27065407cd085d201f7d392e1e0411f49f03fd31ade/msgpack-1.2.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5bd5f91ea75c45cafcc5433ba8fae59b708b736ec178d2441c40c499e9e079db", size = 459896, upload-time = "2026-09-29T02:33:08.361Z" }, + { url = "https://files.pythonhosted.org/packages/37/cd/4ce5809b9ab3b114d7cca64863e436820fa1614b49d55ccb93d49824ac2d/msgpack-1.2.3-cp314-cp314t-win32.whl", hash = "sha256:7995a7c6a62a1d6e7df211b4a16de513bd99fd053525050a319f80f44fb8015e", size = 75983, upload-time = "2026-09-29T02:33:10.023Z" }, + { url = "https://files.pythonhosted.org/packages/8a/31/853bb580744c24be0dbd8b090c3e6987dce466a1fc840fe50c0ac2ef9044/msgpack-1.2.3-cp314-cp314t-win_amd64.whl", hash = "sha256:bfe7d5b62cbe7aa664f0b3e2c49077f10fcdd06183d3014f8271ff3c5edbfbf9", size = 83757, upload-time = "2026-09-29T02:33:11.441Z" }, + { url = "https://files.pythonhosted.org/packages/0d/49/9f1b2ee484414eef9e21ee2b2b23b482bb71433ab9bac1da03cbda15ebf5/msgpack-1.2.3-cp314-cp314t-win_arm64.whl", hash = "sha256:1f585407f740a9eac04a3bb82c61d68a0ea78f90e29e670bfb086b9ce3a518dd", size = 78128, upload-time = "2026-09-29T02:33:13.063Z" }, + { url = "https://files.pythonhosted.org/packages/47/b8/50db4235407c3802f622b4ccdf65c6fe1e48d3c3eab6981fa6a9a5e53f11/msgpack-1.2.3-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:13221a6c81ebb8e43ea63a7251c35d54e4175cea37ebf3a62e911bdf42562a3c", size = 92111, upload-time = "2026-09-29T02:33:14.476Z" }, + { url = "https://files.pythonhosted.org/packages/15/56/50cf2a45c6163edafd737e2fd555103a26ce6748e1e241fb56ed445ea835/msgpack-1.2.3-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:0955b9000725573d1457c1676944b370dd9643c8d18f25bda5ac72913f850949", size = 90583, upload-time = "2026-09-29T02:33:15.924Z" }, + { url = "https://files.pythonhosted.org/packages/2a/fd/8cc02f767c3bc94d2649c954d28dea935ce9398eb9c93ce2444bb9474cc1/msgpack-1.2.3-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0c91762c48cd686dc9cf2b142c0bc544083952de32f5853d6624c956e54b85e5", size = 454751, upload-time = "2026-09-29T02:33:17.475Z" }, + { url = "https://files.pythonhosted.org/packages/80/c9/ddb896767808e3e022453d8dfae26fd52ed404b0aa6fb7f752d39c040208/msgpack-1.2.3-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f4ae8bd4ad9ba085fde95e95d055a896d19210238a4199a771a3cf36dceed49", size = 463597, upload-time = "2026-09-29T02:33:19.309Z" }, + { url = "https://files.pythonhosted.org/packages/4d/a5/e7c261abf75783c07dcac89951cb31dd0c123bf02fbdeda0c67303e698d8/msgpack-1.2.3-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7013534a7163aa4f213c4d9864f1a8a7555daac6fcd48f699a198e29b436bfab", size = 422661, upload-time = "2026-09-29T02:33:21.093Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8e/466d5133f9e1c2e232e15e304f715b62f6f0e28332d18e37d975fe174315/msgpack-1.2.3-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:6a834097144aabe948b8ca9020a833e8026f7d0abbd0ec54bc7e50f45a8ce012", size = 445188, upload-time = "2026-09-29T02:33:22.877Z" }, + { url = "https://files.pythonhosted.org/packages/d4/b4/33e7ad987ee2f4b3d449a6cbf28f574ed222987ca7f65ad277072646ac5e/msgpack-1.2.3-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:d31864ba3933a589b6a00249f89c0eb422197f49128fc10da550e57e9cb0f377", size = 420451, upload-time = "2026-09-29T02:33:24.485Z" }, + { url = "https://files.pythonhosted.org/packages/34/2c/9d8be0d6c16e7e6131cd7da20257dd3da65473e3e6df0c00572fb10a195c/msgpack-1.2.3-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:e15f70588f4db8cd10df0930145b186de70feb9db51710cd378b1399009655bd", size = 460624, upload-time = "2026-09-29T02:33:26.063Z" }, + { url = "https://files.pythonhosted.org/packages/6a/e7/3a04783582c6f44f398cbfcf5f07a111192126ec4e63edf7f5640143bf64/msgpack-1.2.3-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:b949cc25e4a09252cbcc54e66e507de914d0e94a3a7039bd54c299bf7037c098", size = 53474, upload-time = "2026-09-29T02:33:27.83Z" }, + { url = "https://files.pythonhosted.org/packages/68/fb/db07359851644e258609d84f8e4fe0030ef448c108e20afe73f2a3bf539c/msgpack-1.2.3-cp315-cp315-win32.whl", hash = "sha256:8ec7a1d49ca6c2569d722ab5ec86e90089b0713900aa31905b47b4c4d9e78ce0", size = 70344, upload-time = "2026-09-29T02:33:29.382Z" }, + { url = "https://files.pythonhosted.org/packages/5b/e4/cf5584d2f2a2e4465d5896a855a3e75a34a20ab172360b3d42ad862dd1ce/msgpack-1.2.3-cp315-cp315-win_amd64.whl", hash = "sha256:79dfa38faf92f804aa61beec140d70b18418e1dde1778dbb77a87a4cce85aa8a", size = 77800, upload-time = "2026-09-29T02:33:30.941Z" }, + { url = "https://files.pythonhosted.org/packages/63/f9/518ad4e8a580027b507eafdd26de7aae661a714e43d7c111c212482e4a1b/msgpack-1.2.3-cp315-cp315-win_arm64.whl", hash = "sha256:ed899d73a22f286a72bd9528d63f2ab3030dbad8bf1527fc249319a50d61fb9d", size = 73871, upload-time = "2026-09-29T02:33:32.406Z" }, + { url = "https://files.pythonhosted.org/packages/a4/79/254d4c9ad642b2a3ba84e646787892b34cc815eb36c9976f67a1c4f38515/msgpack-1.2.3-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:f56fba61b2516be7917cb00151f0d060b5b21184e3499bb57f0f7d9259bea124", size = 93370, upload-time = "2026-09-29T02:33:33.87Z" }, + { url = "https://files.pythonhosted.org/packages/3d/6f/5a2ba167646a25e84eaa8894e12935351e4331b80c28a9237ce6fe8d375f/msgpack-1.2.3-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:69ad12cedb674c73527bed869cddb42b742cac79a207a614202a4abaa24ea173", size = 93959, upload-time = "2026-09-29T02:33:35.503Z" }, + { url = "https://files.pythonhosted.org/packages/e9/a1/2b44612e55f7cf5d5e4b580294959b4429bbbcb1991177888e3e18668137/msgpack-1.2.3-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:db9fb67a3a2e75247bae569d34ebb5ff61c0448a4f0d6dbf991dae68af39b007", size = 467921, upload-time = "2026-09-29T02:33:37.023Z" }, + { url = "https://files.pythonhosted.org/packages/0b/6e/3309798ed1c11d7fcfdc7b946642685b0ff1588477925bc0d26bee7dcaae/msgpack-1.2.3-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2574ef81c1c8c38b10e330f3f9406fd09198a776b002030fafcf8e7647e9e06e", size = 467310, upload-time = "2026-09-29T02:33:38.799Z" }, + { url = "https://files.pythonhosted.org/packages/6f/79/9c799f489fa4146de4e00cfe9fee17afe33d8012f88ddffffea94f7c4700/msgpack-1.2.3-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fafc3b8898b432b841d30a61082c599fa7f4d06885f9dc58ad72259e12059fa6", size = 420178, upload-time = "2026-09-29T02:33:40.781Z" }, + { url = "https://files.pythonhosted.org/packages/94/c6/5850dc9cafcd2ea315692e65db0e222d20923dd55f44adf35061003de27e/msgpack-1.2.3-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:a393e428f6ffb0dcb73308c1fff5593041c16ff42da66e5bac8a83a6107a54b0", size = 450248, upload-time = "2026-09-29T02:33:42.366Z" }, + { url = "https://files.pythonhosted.org/packages/a9/d2/b4c806e3497fe21f0b353568266aec14ff735d092aea672de7b2955db03f/msgpack-1.2.3-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:d1c1e8989a855b7f1f2a64ec4a80b23a631822903952770813857b2e4f460471", size = 418431, upload-time = "2026-09-29T02:33:44.178Z" }, + { url = "https://files.pythonhosted.org/packages/b0/f5/f4ecc3ddac4d551bf2f3cdb283ec546dcc826fe7c500074be61aa273e08a/msgpack-1.2.3-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:e0bd394e999949c814f7912284243298de1b5a17b6a3dcb6cc8a79b156ffc4fa", size = 457543, upload-time = "2026-09-29T02:33:45.978Z" }, + { url = "https://files.pythonhosted.org/packages/a4/69/1c821d8386fae5cecc5fcaacf3de3947ff0a23f16bb481b5532b5868372a/msgpack-1.2.3-cp315-cp315t-win32.whl", hash = "sha256:3d4c807ed050fe3ddbea5ba7e9f63d7136871ce42861be1f50ff739f0e91047a", size = 75820, upload-time = "2026-09-29T02:33:47.596Z" }, + { url = "https://files.pythonhosted.org/packages/68/9e/41e2f7343a3764a9c1fb10c79f9a6a05db9df93dedd76401d1b511f5a685/msgpack-1.2.3-cp315-cp315t-win_amd64.whl", hash = "sha256:5f304123b90e8b2e49867981b7f6061612c39f50cca51ee88de007c084cf68d3", size = 83345, upload-time = "2026-09-29T02:33:49.325Z" }, + { url = "https://files.pythonhosted.org/packages/80/cd/0c3aa439bc7a7bf24684fef3a0ad776cba170e18ed94445e723bce42fce7/msgpack-1.2.3-cp315-cp315t-win_arm64.whl", hash = "sha256:f41ca154b7737b11893cdce3c78c61d703398a1cd54d4297bdad908392338a8e", size = 77572, upload-time = "2026-09-29T02:33:50.729Z" }, ] [[package]] name = "multidict" -version = "6.7.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/80/1e/5492c365f222f907de1039b91f922b93fa4f764c713ee858d235495d8f50/multidict-6.7.0.tar.gz", hash = "sha256:c6e99d9a65ca282e578dfea819cfa9c0a62b2499d8677392e09feaf305e9e6f5", size = 101834, upload-time = "2025-10-06T14:52:30.657Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a9/63/7bdd4adc330abcca54c85728db2327130e49e52e8c3ce685cec44e0f2e9f/multidict-6.7.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9f474ad5acda359c8758c8accc22032c6abe6dc87a8be2440d097785e27a9349", size = 77153, upload-time = "2025-10-06T14:48:26.409Z" }, - { url = "https://files.pythonhosted.org/packages/3f/bb/b6c35ff175ed1a3142222b78455ee31be71a8396ed3ab5280fbe3ebe4e85/multidict-6.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4b7a9db5a870f780220e931d0002bbfd88fb53aceb6293251e2c839415c1b20e", size = 44993, upload-time = "2025-10-06T14:48:28.4Z" }, - { url = "https://files.pythonhosted.org/packages/e0/1f/064c77877c5fa6df6d346e68075c0f6998547afe952d6471b4c5f6a7345d/multidict-6.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:03ca744319864e92721195fa28c7a3b2bc7b686246b35e4078c1e4d0eb5466d3", size = 44607, upload-time = "2025-10-06T14:48:29.581Z" }, - { url = "https://files.pythonhosted.org/packages/04/7a/bf6aa92065dd47f287690000b3d7d332edfccb2277634cadf6a810463c6a/multidict-6.7.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f0e77e3c0008bc9316e662624535b88d360c3a5d3f81e15cf12c139a75250046", size = 241847, upload-time = "2025-10-06T14:48:32.107Z" }, - { url = "https://files.pythonhosted.org/packages/94/39/297a8de920f76eda343e4ce05f3b489f0ab3f9504f2576dfb37b7c08ca08/multidict-6.7.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:08325c9e5367aa379a3496aa9a022fe8837ff22e00b94db256d3a1378c76ab32", size = 242616, upload-time = "2025-10-06T14:48:34.054Z" }, - { url = "https://files.pythonhosted.org/packages/39/3a/d0eee2898cfd9d654aea6cb8c4addc2f9756e9a7e09391cfe55541f917f7/multidict-6.7.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e2862408c99f84aa571ab462d25236ef9cb12a602ea959ba9c9009a54902fc73", size = 222333, upload-time = "2025-10-06T14:48:35.9Z" }, - { url = "https://files.pythonhosted.org/packages/05/48/3b328851193c7a4240815b71eea165b49248867bbb6153a0aee227a0bb47/multidict-6.7.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4d72a9a2d885f5c208b0cb91ff2ed43636bb7e345ec839ff64708e04f69a13cc", size = 253239, upload-time = "2025-10-06T14:48:37.302Z" }, - { url = "https://files.pythonhosted.org/packages/b1/ca/0706a98c8d126a89245413225ca4a3fefc8435014de309cf8b30acb68841/multidict-6.7.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:478cc36476687bac1514d651cbbaa94b86b0732fb6855c60c673794c7dd2da62", size = 251618, upload-time = "2025-10-06T14:48:38.963Z" }, - { url = "https://files.pythonhosted.org/packages/5e/4f/9c7992f245554d8b173f6f0a048ad24b3e645d883f096857ec2c0822b8bd/multidict-6.7.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6843b28b0364dc605f21481c90fadb5f60d9123b442eb8a726bb74feef588a84", size = 241655, upload-time = "2025-10-06T14:48:40.312Z" }, - { url = "https://files.pythonhosted.org/packages/31/79/26a85991ae67efd1c0b1fc2e0c275b8a6aceeb155a68861f63f87a798f16/multidict-6.7.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:23bfeee5316266e5ee2d625df2d2c602b829435fc3a235c2ba2131495706e4a0", size = 239245, upload-time = "2025-10-06T14:48:41.848Z" }, - { url = "https://files.pythonhosted.org/packages/14/1e/75fa96394478930b79d0302eaf9a6c69f34005a1a5251ac8b9c336486ec9/multidict-6.7.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:680878b9f3d45c31e1f730eef731f9b0bc1da456155688c6745ee84eb818e90e", size = 233523, upload-time = "2025-10-06T14:48:43.749Z" }, - { url = "https://files.pythonhosted.org/packages/b2/5e/085544cb9f9c4ad2b5d97467c15f856df8d9bac410cffd5c43991a5d878b/multidict-6.7.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:eb866162ef2f45063acc7a53a88ef6fe8bf121d45c30ea3c9cd87ce7e191a8d4", size = 243129, upload-time = "2025-10-06T14:48:45.225Z" }, - { url = "https://files.pythonhosted.org/packages/b9/c3/e9d9e2f20c9474e7a8fcef28f863c5cbd29bb5adce6b70cebe8bdad0039d/multidict-6.7.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:df0e3bf7993bdbeca5ac25aa859cf40d39019e015c9c91809ba7093967f7a648", size = 248999, upload-time = "2025-10-06T14:48:46.703Z" }, - { url = "https://files.pythonhosted.org/packages/b5/3f/df171b6efa3239ae33b97b887e42671cd1d94d460614bfb2c30ffdab3b95/multidict-6.7.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:661709cdcd919a2ece2234f9bae7174e5220c80b034585d7d8a755632d3e2111", size = 243711, upload-time = "2025-10-06T14:48:48.146Z" }, - { url = "https://files.pythonhosted.org/packages/3c/2f/9b5564888c4e14b9af64c54acf149263721a283aaf4aa0ae89b091d5d8c1/multidict-6.7.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:096f52730c3fb8ed419db2d44391932b63891b2c5ed14850a7e215c0ba9ade36", size = 237504, upload-time = "2025-10-06T14:48:49.447Z" }, - { url = "https://files.pythonhosted.org/packages/6c/3a/0bd6ca0f7d96d790542d591c8c3354c1e1b6bfd2024d4d92dc3d87485ec7/multidict-6.7.0-cp310-cp310-win32.whl", hash = "sha256:afa8a2978ec65d2336305550535c9c4ff50ee527914328c8677b3973ade52b85", size = 41422, upload-time = "2025-10-06T14:48:50.789Z" }, - { url = "https://files.pythonhosted.org/packages/00/35/f6a637ea2c75f0d3b7c7d41b1189189acff0d9deeb8b8f35536bb30f5e33/multidict-6.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:b15b3afff74f707b9275d5ba6a91ae8f6429c3ffb29bbfd216b0b375a56f13d7", size = 46050, upload-time = "2025-10-06T14:48:51.938Z" }, - { url = "https://files.pythonhosted.org/packages/e7/b8/f7bf8329b39893d02d9d95cf610c75885d12fc0f402b1c894e1c8e01c916/multidict-6.7.0-cp310-cp310-win_arm64.whl", hash = "sha256:4b73189894398d59131a66ff157837b1fafea9974be486d036bb3d32331fdbf0", size = 43153, upload-time = "2025-10-06T14:48:53.146Z" }, - { url = "https://files.pythonhosted.org/packages/34/9e/5c727587644d67b2ed479041e4b1c58e30afc011e3d45d25bbe35781217c/multidict-6.7.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4d409aa42a94c0b3fa617708ef5276dfe81012ba6753a0370fcc9d0195d0a1fc", size = 76604, upload-time = "2025-10-06T14:48:54.277Z" }, - { url = "https://files.pythonhosted.org/packages/17/e4/67b5c27bd17c085a5ea8f1ec05b8a3e5cba0ca734bfcad5560fb129e70ca/multidict-6.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:14c9e076eede3b54c636f8ce1c9c252b5f057c62131211f0ceeec273810c9721", size = 44715, upload-time = "2025-10-06T14:48:55.445Z" }, - { url = "https://files.pythonhosted.org/packages/4d/e1/866a5d77be6ea435711bef2a4291eed11032679b6b28b56b4776ab06ba3e/multidict-6.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c09703000a9d0fa3c3404b27041e574cc7f4df4c6563873246d0e11812a94b6", size = 44332, upload-time = "2025-10-06T14:48:56.706Z" }, - { url = "https://files.pythonhosted.org/packages/31/61/0c2d50241ada71ff61a79518db85ada85fdabfcf395d5968dae1cbda04e5/multidict-6.7.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a265acbb7bb33a3a2d626afbe756371dce0279e7b17f4f4eda406459c2b5ff1c", size = 245212, upload-time = "2025-10-06T14:48:58.042Z" }, - { url = "https://files.pythonhosted.org/packages/ac/e0/919666a4e4b57fff1b57f279be1c9316e6cdc5de8a8b525d76f6598fefc7/multidict-6.7.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:51cb455de290ae462593e5b1cb1118c5c22ea7f0d3620d9940bf695cea5a4bd7", size = 246671, upload-time = "2025-10-06T14:49:00.004Z" }, - { url = "https://files.pythonhosted.org/packages/a1/cc/d027d9c5a520f3321b65adea289b965e7bcbd2c34402663f482648c716ce/multidict-6.7.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:db99677b4457c7a5c5a949353e125ba72d62b35f74e26da141530fbb012218a7", size = 225491, upload-time = "2025-10-06T14:49:01.393Z" }, - { url = "https://files.pythonhosted.org/packages/75/c4/bbd633980ce6155a28ff04e6a6492dd3335858394d7bb752d8b108708558/multidict-6.7.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f470f68adc395e0183b92a2f4689264d1ea4b40504a24d9882c27375e6662bb9", size = 257322, upload-time = "2025-10-06T14:49:02.745Z" }, - { url = "https://files.pythonhosted.org/packages/4c/6d/d622322d344f1f053eae47e033b0b3f965af01212de21b10bcf91be991fb/multidict-6.7.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0db4956f82723cc1c270de9c6e799b4c341d327762ec78ef82bb962f79cc07d8", size = 254694, upload-time = "2025-10-06T14:49:04.15Z" }, - { url = "https://files.pythonhosted.org/packages/a8/9f/78f8761c2705d4c6d7516faed63c0ebdac569f6db1bef95e0d5218fdc146/multidict-6.7.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3e56d780c238f9e1ae66a22d2adf8d16f485381878250db8d496623cd38b22bd", size = 246715, upload-time = "2025-10-06T14:49:05.967Z" }, - { url = "https://files.pythonhosted.org/packages/78/59/950818e04f91b9c2b95aab3d923d9eabd01689d0dcd889563988e9ea0fd8/multidict-6.7.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9d14baca2ee12c1a64740d4531356ba50b82543017f3ad6de0deb943c5979abb", size = 243189, upload-time = "2025-10-06T14:49:07.37Z" }, - { url = "https://files.pythonhosted.org/packages/7a/3d/77c79e1934cad2ee74991840f8a0110966d9599b3af95964c0cd79bb905b/multidict-6.7.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:295a92a76188917c7f99cda95858c822f9e4aae5824246bba9b6b44004ddd0a6", size = 237845, upload-time = "2025-10-06T14:49:08.759Z" }, - { url = "https://files.pythonhosted.org/packages/63/1b/834ce32a0a97a3b70f86437f685f880136677ac00d8bce0027e9fd9c2db7/multidict-6.7.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39f1719f57adbb767ef592a50ae5ebb794220d1188f9ca93de471336401c34d2", size = 246374, upload-time = "2025-10-06T14:49:10.574Z" }, - { url = "https://files.pythonhosted.org/packages/23/ef/43d1c3ba205b5dec93dc97f3fba179dfa47910fc73aaaea4f7ceb41cec2a/multidict-6.7.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:0a13fb8e748dfc94749f622de065dd5c1def7e0d2216dba72b1d8069a389c6ff", size = 253345, upload-time = "2025-10-06T14:49:12.331Z" }, - { url = "https://files.pythonhosted.org/packages/6b/03/eaf95bcc2d19ead522001f6a650ef32811aa9e3624ff0ad37c445c7a588c/multidict-6.7.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e3aa16de190d29a0ea1b48253c57d99a68492c8dd8948638073ab9e74dc9410b", size = 246940, upload-time = "2025-10-06T14:49:13.821Z" }, - { url = "https://files.pythonhosted.org/packages/e8/df/ec8a5fd66ea6cd6f525b1fcbb23511b033c3e9bc42b81384834ffa484a62/multidict-6.7.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a048ce45dcdaaf1defb76b2e684f997fb5abf74437b6cb7b22ddad934a964e34", size = 242229, upload-time = "2025-10-06T14:49:15.603Z" }, - { url = "https://files.pythonhosted.org/packages/8a/a2/59b405d59fd39ec86d1142630e9049243015a5f5291ba49cadf3c090c541/multidict-6.7.0-cp311-cp311-win32.whl", hash = "sha256:a90af66facec4cebe4181b9e62a68be65e45ac9b52b67de9eec118701856e7ff", size = 41308, upload-time = "2025-10-06T14:49:16.871Z" }, - { url = "https://files.pythonhosted.org/packages/32/0f/13228f26f8b882c34da36efa776c3b7348455ec383bab4a66390e42963ae/multidict-6.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:95b5ffa4349df2887518bb839409bcf22caa72d82beec453216802f475b23c81", size = 46037, upload-time = "2025-10-06T14:49:18.457Z" }, - { url = "https://files.pythonhosted.org/packages/84/1f/68588e31b000535a3207fd3c909ebeec4fb36b52c442107499c18a896a2a/multidict-6.7.0-cp311-cp311-win_arm64.whl", hash = "sha256:329aa225b085b6f004a4955271a7ba9f1087e39dcb7e65f6284a988264a63912", size = 43023, upload-time = "2025-10-06T14:49:19.648Z" }, - { url = "https://files.pythonhosted.org/packages/c2/9e/9f61ac18d9c8b475889f32ccfa91c9f59363480613fc807b6e3023d6f60b/multidict-6.7.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:8a3862568a36d26e650a19bb5cbbba14b71789032aebc0423f8cc5f150730184", size = 76877, upload-time = "2025-10-06T14:49:20.884Z" }, - { url = "https://files.pythonhosted.org/packages/38/6f/614f09a04e6184f8824268fce4bc925e9849edfa654ddd59f0b64508c595/multidict-6.7.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:960c60b5849b9b4f9dcc9bea6e3626143c252c74113df2c1540aebce70209b45", size = 45467, upload-time = "2025-10-06T14:49:22.054Z" }, - { url = "https://files.pythonhosted.org/packages/b3/93/c4f67a436dd026f2e780c433277fff72be79152894d9fc36f44569cab1a6/multidict-6.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2049be98fb57a31b4ccf870bf377af2504d4ae35646a19037ec271e4c07998aa", size = 43834, upload-time = "2025-10-06T14:49:23.566Z" }, - { url = "https://files.pythonhosted.org/packages/7f/f5/013798161ca665e4a422afbc5e2d9e4070142a9ff8905e482139cd09e4d0/multidict-6.7.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:0934f3843a1860dd465d38895c17fce1f1cb37295149ab05cd1b9a03afacb2a7", size = 250545, upload-time = "2025-10-06T14:49:24.882Z" }, - { url = "https://files.pythonhosted.org/packages/71/2f/91dbac13e0ba94669ea5119ba267c9a832f0cb65419aca75549fcf09a3dc/multidict-6.7.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b3e34f3a1b8131ba06f1a73adab24f30934d148afcd5f5de9a73565a4404384e", size = 258305, upload-time = "2025-10-06T14:49:26.778Z" }, - { url = "https://files.pythonhosted.org/packages/ef/b0/754038b26f6e04488b48ac621f779c341338d78503fb45403755af2df477/multidict-6.7.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:efbb54e98446892590dc2458c19c10344ee9a883a79b5cec4bc34d6656e8d546", size = 242363, upload-time = "2025-10-06T14:49:28.562Z" }, - { url = "https://files.pythonhosted.org/packages/87/15/9da40b9336a7c9fa606c4cf2ed80a649dffeb42b905d4f63a1d7eb17d746/multidict-6.7.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a35c5fc61d4f51eb045061e7967cfe3123d622cd500e8868e7c0c592a09fedc4", size = 268375, upload-time = "2025-10-06T14:49:29.96Z" }, - { url = "https://files.pythonhosted.org/packages/82/72/c53fcade0cc94dfaad583105fd92b3a783af2091eddcb41a6d5a52474000/multidict-6.7.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29fe6740ebccba4175af1b9b87bf553e9c15cd5868ee967e010efcf94e4fd0f1", size = 269346, upload-time = "2025-10-06T14:49:31.404Z" }, - { url = "https://files.pythonhosted.org/packages/0d/e2/9baffdae21a76f77ef8447f1a05a96ec4bc0a24dae08767abc0a2fe680b8/multidict-6.7.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:123e2a72e20537add2f33a79e605f6191fba2afda4cbb876e35c1a7074298a7d", size = 256107, upload-time = "2025-10-06T14:49:32.974Z" }, - { url = "https://files.pythonhosted.org/packages/3c/06/3f06f611087dc60d65ef775f1fb5aca7c6d61c6db4990e7cda0cef9b1651/multidict-6.7.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b284e319754366c1aee2267a2036248b24eeb17ecd5dc16022095e747f2f4304", size = 253592, upload-time = "2025-10-06T14:49:34.52Z" }, - { url = "https://files.pythonhosted.org/packages/20/24/54e804ec7945b6023b340c412ce9c3f81e91b3bf5fa5ce65558740141bee/multidict-6.7.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:803d685de7be4303b5a657b76e2f6d1240e7e0a8aa2968ad5811fa2285553a12", size = 251024, upload-time = "2025-10-06T14:49:35.956Z" }, - { url = "https://files.pythonhosted.org/packages/14/48/011cba467ea0b17ceb938315d219391d3e421dfd35928e5dbdc3f4ae76ef/multidict-6.7.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c04a328260dfd5db8c39538f999f02779012268f54614902d0afc775d44e0a62", size = 251484, upload-time = "2025-10-06T14:49:37.631Z" }, - { url = "https://files.pythonhosted.org/packages/0d/2f/919258b43bb35b99fa127435cfb2d91798eb3a943396631ef43e3720dcf4/multidict-6.7.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8a19cdb57cd3df4cd865849d93ee14920fb97224300c88501f16ecfa2604b4e0", size = 263579, upload-time = "2025-10-06T14:49:39.502Z" }, - { url = "https://files.pythonhosted.org/packages/31/22/a0e884d86b5242b5a74cf08e876bdf299e413016b66e55511f7a804a366e/multidict-6.7.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9b2fd74c52accced7e75de26023b7dccee62511a600e62311b918ec5c168fc2a", size = 259654, upload-time = "2025-10-06T14:49:41.32Z" }, - { url = "https://files.pythonhosted.org/packages/b2/e5/17e10e1b5c5f5a40f2fcbb45953c9b215f8a4098003915e46a93f5fcaa8f/multidict-6.7.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3e8bfdd0e487acf992407a140d2589fe598238eaeffa3da8448d63a63cd363f8", size = 251511, upload-time = "2025-10-06T14:49:46.021Z" }, - { url = "https://files.pythonhosted.org/packages/e3/9a/201bb1e17e7af53139597069c375e7b0dcbd47594604f65c2d5359508566/multidict-6.7.0-cp312-cp312-win32.whl", hash = "sha256:dd32a49400a2c3d52088e120ee00c1e3576cbff7e10b98467962c74fdb762ed4", size = 41895, upload-time = "2025-10-06T14:49:48.718Z" }, - { url = "https://files.pythonhosted.org/packages/46/e2/348cd32faad84eaf1d20cce80e2bb0ef8d312c55bca1f7fa9865e7770aaf/multidict-6.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:92abb658ef2d7ef22ac9f8bb88e8b6c3e571671534e029359b6d9e845923eb1b", size = 46073, upload-time = "2025-10-06T14:49:50.28Z" }, - { url = "https://files.pythonhosted.org/packages/25/ec/aad2613c1910dce907480e0c3aa306905830f25df2e54ccc9dea450cb5aa/multidict-6.7.0-cp312-cp312-win_arm64.whl", hash = "sha256:490dab541a6a642ce1a9d61a4781656b346a55c13038f0b1244653828e3a83ec", size = 43226, upload-time = "2025-10-06T14:49:52.304Z" }, - { url = "https://files.pythonhosted.org/packages/d2/86/33272a544eeb36d66e4d9a920602d1a2f57d4ebea4ef3cdfe5a912574c95/multidict-6.7.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:bee7c0588aa0076ce77c0ea5d19a68d76ad81fcd9fe8501003b9a24f9d4000f6", size = 76135, upload-time = "2025-10-06T14:49:54.26Z" }, - { url = "https://files.pythonhosted.org/packages/91/1c/eb97db117a1ebe46d457a3d235a7b9d2e6dcab174f42d1b67663dd9e5371/multidict-6.7.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7ef6b61cad77091056ce0e7ce69814ef72afacb150b7ac6a3e9470def2198159", size = 45117, upload-time = "2025-10-06T14:49:55.82Z" }, - { url = "https://files.pythonhosted.org/packages/f1/d8/6c3442322e41fb1dd4de8bd67bfd11cd72352ac131f6368315617de752f1/multidict-6.7.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9c0359b1ec12b1d6849c59f9d319610b7f20ef990a6d454ab151aa0e3b9f78ca", size = 43472, upload-time = "2025-10-06T14:49:57.048Z" }, - { url = "https://files.pythonhosted.org/packages/75/3f/e2639e80325af0b6c6febdf8e57cc07043ff15f57fa1ef808f4ccb5ac4cd/multidict-6.7.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cd240939f71c64bd658f186330603aac1a9a81bf6273f523fca63673cb7378a8", size = 249342, upload-time = "2025-10-06T14:49:58.368Z" }, - { url = "https://files.pythonhosted.org/packages/5d/cc/84e0585f805cbeaa9cbdaa95f9a3d6aed745b9d25700623ac89a6ecff400/multidict-6.7.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a60a4d75718a5efa473ebd5ab685786ba0c67b8381f781d1be14da49f1a2dc60", size = 257082, upload-time = "2025-10-06T14:49:59.89Z" }, - { url = "https://files.pythonhosted.org/packages/b0/9c/ac851c107c92289acbbf5cfb485694084690c1b17e555f44952c26ddc5bd/multidict-6.7.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:53a42d364f323275126aff81fb67c5ca1b7a04fda0546245730a55c8c5f24bc4", size = 240704, upload-time = "2025-10-06T14:50:01.485Z" }, - { url = "https://files.pythonhosted.org/packages/50/cc/5f93e99427248c09da95b62d64b25748a5f5c98c7c2ab09825a1d6af0e15/multidict-6.7.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3b29b980d0ddbecb736735ee5bef69bb2ddca56eff603c86f3f29a1128299b4f", size = 266355, upload-time = "2025-10-06T14:50:02.955Z" }, - { url = "https://files.pythonhosted.org/packages/ec/0c/2ec1d883ceb79c6f7f6d7ad90c919c898f5d1c6ea96d322751420211e072/multidict-6.7.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f8a93b1c0ed2d04b97a5e9336fd2d33371b9a6e29ab7dd6503d63407c20ffbaf", size = 267259, upload-time = "2025-10-06T14:50:04.446Z" }, - { url = "https://files.pythonhosted.org/packages/c6/2d/f0b184fa88d6630aa267680bdb8623fb69cb0d024b8c6f0d23f9a0f406d3/multidict-6.7.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9ff96e8815eecacc6645da76c413eb3b3d34cfca256c70b16b286a687d013c32", size = 254903, upload-time = "2025-10-06T14:50:05.98Z" }, - { url = "https://files.pythonhosted.org/packages/06/c9/11ea263ad0df7dfabcad404feb3c0dd40b131bc7f232d5537f2fb1356951/multidict-6.7.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7516c579652f6a6be0e266aec0acd0db80829ca305c3d771ed898538804c2036", size = 252365, upload-time = "2025-10-06T14:50:07.511Z" }, - { url = "https://files.pythonhosted.org/packages/41/88/d714b86ee2c17d6e09850c70c9d310abac3d808ab49dfa16b43aba9d53fd/multidict-6.7.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:040f393368e63fb0f3330e70c26bfd336656bed925e5cbe17c9da839a6ab13ec", size = 250062, upload-time = "2025-10-06T14:50:09.074Z" }, - { url = "https://files.pythonhosted.org/packages/15/fe/ad407bb9e818c2b31383f6131ca19ea7e35ce93cf1310fce69f12e89de75/multidict-6.7.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b3bc26a951007b1057a1c543af845f1c7e3e71cc240ed1ace7bf4484aa99196e", size = 249683, upload-time = "2025-10-06T14:50:10.714Z" }, - { url = "https://files.pythonhosted.org/packages/8c/a4/a89abdb0229e533fb925e7c6e5c40201c2873efebc9abaf14046a4536ee6/multidict-6.7.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7b022717c748dd1992a83e219587aabe45980d88969f01b316e78683e6285f64", size = 261254, upload-time = "2025-10-06T14:50:12.28Z" }, - { url = "https://files.pythonhosted.org/packages/8d/aa/0e2b27bd88b40a4fb8dc53dd74eecac70edaa4c1dd0707eb2164da3675b3/multidict-6.7.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:9600082733859f00d79dee64effc7aef1beb26adb297416a4ad2116fd61374bd", size = 257967, upload-time = "2025-10-06T14:50:14.16Z" }, - { url = "https://files.pythonhosted.org/packages/d0/8e/0c67b7120d5d5f6d874ed85a085f9dc770a7f9d8813e80f44a9fec820bb7/multidict-6.7.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:94218fcec4d72bc61df51c198d098ce2b378e0ccbac41ddbed5ef44092913288", size = 250085, upload-time = "2025-10-06T14:50:15.639Z" }, - { url = "https://files.pythonhosted.org/packages/ba/55/b73e1d624ea4b8fd4dd07a3bb70f6e4c7c6c5d9d640a41c6ffe5cdbd2a55/multidict-6.7.0-cp313-cp313-win32.whl", hash = "sha256:a37bd74c3fa9d00be2d7b8eca074dc56bd8077ddd2917a839bd989612671ed17", size = 41713, upload-time = "2025-10-06T14:50:17.066Z" }, - { url = "https://files.pythonhosted.org/packages/32/31/75c59e7d3b4205075b4c183fa4ca398a2daf2303ddf616b04ae6ef55cffe/multidict-6.7.0-cp313-cp313-win_amd64.whl", hash = "sha256:30d193c6cc6d559db42b6bcec8a5d395d34d60c9877a0b71ecd7c204fcf15390", size = 45915, upload-time = "2025-10-06T14:50:18.264Z" }, - { url = "https://files.pythonhosted.org/packages/31/2a/8987831e811f1184c22bc2e45844934385363ee61c0a2dcfa8f71b87e608/multidict-6.7.0-cp313-cp313-win_arm64.whl", hash = "sha256:ea3334cabe4d41b7ccd01e4d349828678794edbc2d3ae97fc162a3312095092e", size = 43077, upload-time = "2025-10-06T14:50:19.853Z" }, - { url = "https://files.pythonhosted.org/packages/e8/68/7b3a5170a382a340147337b300b9eb25a9ddb573bcdfff19c0fa3f31ffba/multidict-6.7.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:ad9ce259f50abd98a1ca0aa6e490b58c316a0fce0617f609723e40804add2c00", size = 83114, upload-time = "2025-10-06T14:50:21.223Z" }, - { url = "https://files.pythonhosted.org/packages/55/5c/3fa2d07c84df4e302060f555bbf539310980362236ad49f50eeb0a1c1eb9/multidict-6.7.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07f5594ac6d084cbb5de2df218d78baf55ef150b91f0ff8a21cc7a2e3a5a58eb", size = 48442, upload-time = "2025-10-06T14:50:22.871Z" }, - { url = "https://files.pythonhosted.org/packages/fc/56/67212d33239797f9bd91962bb899d72bb0f4c35a8652dcdb8ed049bef878/multidict-6.7.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0591b48acf279821a579282444814a2d8d0af624ae0bc600aa4d1b920b6e924b", size = 46885, upload-time = "2025-10-06T14:50:24.258Z" }, - { url = "https://files.pythonhosted.org/packages/46/d1/908f896224290350721597a61a69cd19b89ad8ee0ae1f38b3f5cd12ea2ac/multidict-6.7.0-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:749a72584761531d2b9467cfbdfd29487ee21124c304c4b6cb760d8777b27f9c", size = 242588, upload-time = "2025-10-06T14:50:25.716Z" }, - { url = "https://files.pythonhosted.org/packages/ab/67/8604288bbd68680eee0ab568fdcb56171d8b23a01bcd5cb0c8fedf6e5d99/multidict-6.7.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b4c3d199f953acd5b446bf7c0de1fe25d94e09e79086f8dc2f48a11a129cdf1", size = 249966, upload-time = "2025-10-06T14:50:28.192Z" }, - { url = "https://files.pythonhosted.org/packages/20/33/9228d76339f1ba51e3efef7da3ebd91964d3006217aae13211653193c3ff/multidict-6.7.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9fb0211dfc3b51efea2f349ec92c114d7754dd62c01f81c3e32b765b70c45c9b", size = 228618, upload-time = "2025-10-06T14:50:29.82Z" }, - { url = "https://files.pythonhosted.org/packages/f8/2d/25d9b566d10cab1c42b3b9e5b11ef79c9111eaf4463b8c257a3bd89e0ead/multidict-6.7.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a027ec240fe73a8d6281872690b988eed307cd7d91b23998ff35ff577ca688b5", size = 257539, upload-time = "2025-10-06T14:50:31.731Z" }, - { url = "https://files.pythonhosted.org/packages/b6/b1/8d1a965e6637fc33de3c0d8f414485c2b7e4af00f42cab3d84e7b955c222/multidict-6.7.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1d964afecdf3a8288789df2f5751dc0a8261138c3768d9af117ed384e538fad", size = 256345, upload-time = "2025-10-06T14:50:33.26Z" }, - { url = "https://files.pythonhosted.org/packages/ba/0c/06b5a8adbdeedada6f4fb8d8f193d44a347223b11939b42953eeb6530b6b/multidict-6.7.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:caf53b15b1b7df9fbd0709aa01409000a2b4dd03a5f6f5cc548183c7c8f8b63c", size = 247934, upload-time = "2025-10-06T14:50:34.808Z" }, - { url = "https://files.pythonhosted.org/packages/8f/31/b2491b5fe167ca044c6eb4b8f2c9f3b8a00b24c432c365358eadac5d7625/multidict-6.7.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:654030da3197d927f05a536a66186070e98765aa5142794c9904555d3a9d8fb5", size = 245243, upload-time = "2025-10-06T14:50:36.436Z" }, - { url = "https://files.pythonhosted.org/packages/61/1a/982913957cb90406c8c94f53001abd9eafc271cb3e70ff6371590bec478e/multidict-6.7.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:2090d3718829d1e484706a2f525e50c892237b2bf9b17a79b059cb98cddc2f10", size = 235878, upload-time = "2025-10-06T14:50:37.953Z" }, - { url = "https://files.pythonhosted.org/packages/be/c0/21435d804c1a1cf7a2608593f4d19bca5bcbd7a81a70b253fdd1c12af9c0/multidict-6.7.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:2d2cfeec3f6f45651b3d408c4acec0ebf3daa9bc8a112a084206f5db5d05b754", size = 243452, upload-time = "2025-10-06T14:50:39.574Z" }, - { url = "https://files.pythonhosted.org/packages/54/0a/4349d540d4a883863191be6eb9a928846d4ec0ea007d3dcd36323bb058ac/multidict-6.7.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:4ef089f985b8c194d341eb2c24ae6e7408c9a0e2e5658699c92f497437d88c3c", size = 252312, upload-time = "2025-10-06T14:50:41.612Z" }, - { url = "https://files.pythonhosted.org/packages/26/64/d5416038dbda1488daf16b676e4dbfd9674dde10a0cc8f4fc2b502d8125d/multidict-6.7.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e93a0617cd16998784bf4414c7e40f17a35d2350e5c6f0bd900d3a8e02bd3762", size = 246935, upload-time = "2025-10-06T14:50:43.972Z" }, - { url = "https://files.pythonhosted.org/packages/9f/8c/8290c50d14e49f35e0bd4abc25e1bc7711149ca9588ab7d04f886cdf03d9/multidict-6.7.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f0feece2ef8ebc42ed9e2e8c78fc4aa3cf455733b507c09ef7406364c94376c6", size = 243385, upload-time = "2025-10-06T14:50:45.648Z" }, - { url = "https://files.pythonhosted.org/packages/ef/a0/f83ae75e42d694b3fbad3e047670e511c138be747bc713cf1b10d5096416/multidict-6.7.0-cp313-cp313t-win32.whl", hash = "sha256:19a1d55338ec1be74ef62440ca9e04a2f001a04d0cc49a4983dc320ff0f3212d", size = 47777, upload-time = "2025-10-06T14:50:47.154Z" }, - { url = "https://files.pythonhosted.org/packages/dc/80/9b174a92814a3830b7357307a792300f42c9e94664b01dee8e457551fa66/multidict-6.7.0-cp313-cp313t-win_amd64.whl", hash = "sha256:3da4fb467498df97e986af166b12d01f05d2e04f978a9c1c680ea1988e0bc4b6", size = 53104, upload-time = "2025-10-06T14:50:48.851Z" }, - { url = "https://files.pythonhosted.org/packages/cc/28/04baeaf0428d95bb7a7bea0e691ba2f31394338ba424fb0679a9ed0f4c09/multidict-6.7.0-cp313-cp313t-win_arm64.whl", hash = "sha256:b4121773c49a0776461f4a904cdf6264c88e42218aaa8407e803ca8025872792", size = 45503, upload-time = "2025-10-06T14:50:50.16Z" }, - { url = "https://files.pythonhosted.org/packages/e2/b1/3da6934455dd4b261d4c72f897e3a5728eba81db59959f3a639245891baa/multidict-6.7.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3bab1e4aff7adaa34410f93b1f8e57c4b36b9af0426a76003f441ee1d3c7e842", size = 75128, upload-time = "2025-10-06T14:50:51.92Z" }, - { url = "https://files.pythonhosted.org/packages/14/2c/f069cab5b51d175a1a2cb4ccdf7a2c2dabd58aa5bd933fa036a8d15e2404/multidict-6.7.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:b8512bac933afc3e45fb2b18da8e59b78d4f408399a960339598374d4ae3b56b", size = 44410, upload-time = "2025-10-06T14:50:53.275Z" }, - { url = "https://files.pythonhosted.org/packages/42/e2/64bb41266427af6642b6b128e8774ed84c11b80a90702c13ac0a86bb10cc/multidict-6.7.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:79dcf9e477bc65414ebfea98ffd013cb39552b5ecd62908752e0e413d6d06e38", size = 43205, upload-time = "2025-10-06T14:50:54.911Z" }, - { url = "https://files.pythonhosted.org/packages/02/68/6b086fef8a3f1a8541b9236c594f0c9245617c29841f2e0395d979485cde/multidict-6.7.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:31bae522710064b5cbeddaf2e9f32b1abab70ac6ac91d42572502299e9953128", size = 245084, upload-time = "2025-10-06T14:50:56.369Z" }, - { url = "https://files.pythonhosted.org/packages/15/ee/f524093232007cd7a75c1d132df70f235cfd590a7c9eaccd7ff422ef4ae8/multidict-6.7.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a0df7ff02397bb63e2fd22af2c87dfa39e8c7f12947bc524dbdc528282c7e34", size = 252667, upload-time = "2025-10-06T14:50:57.991Z" }, - { url = "https://files.pythonhosted.org/packages/02/a5/eeb3f43ab45878f1895118c3ef157a480db58ede3f248e29b5354139c2c9/multidict-6.7.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a0222514e8e4c514660e182d5156a415c13ef0aabbd71682fc714e327b95e99", size = 233590, upload-time = "2025-10-06T14:50:59.589Z" }, - { url = "https://files.pythonhosted.org/packages/6a/1e/76d02f8270b97269d7e3dbd45644b1785bda457b474315f8cf999525a193/multidict-6.7.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2397ab4daaf2698eb51a76721e98db21ce4f52339e535725de03ea962b5a3202", size = 264112, upload-time = "2025-10-06T14:51:01.183Z" }, - { url = "https://files.pythonhosted.org/packages/76/0b/c28a70ecb58963847c2a8efe334904cd254812b10e535aefb3bcce513918/multidict-6.7.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8891681594162635948a636c9fe0ff21746aeb3dd5463f6e25d9bea3a8a39ca1", size = 261194, upload-time = "2025-10-06T14:51:02.794Z" }, - { url = "https://files.pythonhosted.org/packages/b4/63/2ab26e4209773223159b83aa32721b4021ffb08102f8ac7d689c943fded1/multidict-6.7.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18706cc31dbf402a7945916dd5cddf160251b6dab8a2c5f3d6d5a55949f676b3", size = 248510, upload-time = "2025-10-06T14:51:04.724Z" }, - { url = "https://files.pythonhosted.org/packages/93/cd/06c1fa8282af1d1c46fd55c10a7930af652afdce43999501d4d68664170c/multidict-6.7.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f844a1bbf1d207dd311a56f383f7eda2d0e134921d45751842d8235e7778965d", size = 248395, upload-time = "2025-10-06T14:51:06.306Z" }, - { url = "https://files.pythonhosted.org/packages/99/ac/82cb419dd6b04ccf9e7e61befc00c77614fc8134362488b553402ecd55ce/multidict-6.7.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:d4393e3581e84e5645506923816b9cc81f5609a778c7e7534054091acc64d1c6", size = 239520, upload-time = "2025-10-06T14:51:08.091Z" }, - { url = "https://files.pythonhosted.org/packages/fa/f3/a0f9bf09493421bd8716a362e0cd1d244f5a6550f5beffdd6b47e885b331/multidict-6.7.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:fbd18dc82d7bf274b37aa48d664534330af744e03bccf696d6f4c6042e7d19e7", size = 245479, upload-time = "2025-10-06T14:51:10.365Z" }, - { url = "https://files.pythonhosted.org/packages/8d/01/476d38fc73a212843f43c852b0eee266b6971f0e28329c2184a8df90c376/multidict-6.7.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:b6234e14f9314731ec45c42fc4554b88133ad53a09092cc48a88e771c125dadb", size = 258903, upload-time = "2025-10-06T14:51:12.466Z" }, - { url = "https://files.pythonhosted.org/packages/49/6d/23faeb0868adba613b817d0e69c5f15531b24d462af8012c4f6de4fa8dc3/multidict-6.7.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:08d4379f9744d8f78d98c8673c06e202ffa88296f009c71bbafe8a6bf847d01f", size = 252333, upload-time = "2025-10-06T14:51:14.48Z" }, - { url = "https://files.pythonhosted.org/packages/1e/cc/48d02ac22b30fa247f7dad82866e4b1015431092f4ba6ebc7e77596e0b18/multidict-6.7.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9fe04da3f79387f450fd0061d4dd2e45a72749d31bf634aecc9e27f24fdc4b3f", size = 243411, upload-time = "2025-10-06T14:51:16.072Z" }, - { url = "https://files.pythonhosted.org/packages/4a/03/29a8bf5a18abf1fe34535c88adbdfa88c9fb869b5a3b120692c64abe8284/multidict-6.7.0-cp314-cp314-win32.whl", hash = "sha256:fbafe31d191dfa7c4c51f7a6149c9fb7e914dcf9ffead27dcfd9f1ae382b3885", size = 40940, upload-time = "2025-10-06T14:51:17.544Z" }, - { url = "https://files.pythonhosted.org/packages/82/16/7ed27b680791b939de138f906d5cf2b4657b0d45ca6f5dd6236fdddafb1a/multidict-6.7.0-cp314-cp314-win_amd64.whl", hash = "sha256:2f67396ec0310764b9222a1728ced1ab638f61aadc6226f17a71dd9324f9a99c", size = 45087, upload-time = "2025-10-06T14:51:18.875Z" }, - { url = "https://files.pythonhosted.org/packages/cd/3c/e3e62eb35a1950292fe39315d3c89941e30a9d07d5d2df42965ab041da43/multidict-6.7.0-cp314-cp314-win_arm64.whl", hash = "sha256:ba672b26069957ee369cfa7fc180dde1fc6f176eaf1e6beaf61fbebbd3d9c000", size = 42368, upload-time = "2025-10-06T14:51:20.225Z" }, - { url = "https://files.pythonhosted.org/packages/8b/40/cd499bd0dbc5f1136726db3153042a735fffd0d77268e2ee20d5f33c010f/multidict-6.7.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:c1dcc7524066fa918c6a27d61444d4ee7900ec635779058571f70d042d86ed63", size = 82326, upload-time = "2025-10-06T14:51:21.588Z" }, - { url = "https://files.pythonhosted.org/packages/13/8a/18e031eca251c8df76daf0288e6790561806e439f5ce99a170b4af30676b/multidict-6.7.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:27e0b36c2d388dc7b6ced3406671b401e84ad7eb0656b8f3a2f46ed0ce483718", size = 48065, upload-time = "2025-10-06T14:51:22.93Z" }, - { url = "https://files.pythonhosted.org/packages/40/71/5e6701277470a87d234e433fb0a3a7deaf3bcd92566e421e7ae9776319de/multidict-6.7.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2a7baa46a22e77f0988e3b23d4ede5513ebec1929e34ee9495be535662c0dfe2", size = 46475, upload-time = "2025-10-06T14:51:24.352Z" }, - { url = "https://files.pythonhosted.org/packages/fe/6a/bab00cbab6d9cfb57afe1663318f72ec28289ea03fd4e8236bb78429893a/multidict-6.7.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7bf77f54997a9166a2f5675d1201520586439424c2511723a7312bdb4bcc034e", size = 239324, upload-time = "2025-10-06T14:51:25.822Z" }, - { url = "https://files.pythonhosted.org/packages/2a/5f/8de95f629fc22a7769ade8b41028e3e5a822c1f8904f618d175945a81ad3/multidict-6.7.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e011555abada53f1578d63389610ac8a5400fc70ce71156b0aa30d326f1a5064", size = 246877, upload-time = "2025-10-06T14:51:27.604Z" }, - { url = "https://files.pythonhosted.org/packages/23/b4/38881a960458f25b89e9f4a4fdcb02ac101cfa710190db6e5528841e67de/multidict-6.7.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:28b37063541b897fd6a318007373930a75ca6d6ac7c940dbe14731ffdd8d498e", size = 225824, upload-time = "2025-10-06T14:51:29.664Z" }, - { url = "https://files.pythonhosted.org/packages/1e/39/6566210c83f8a261575f18e7144736059f0c460b362e96e9cf797a24b8e7/multidict-6.7.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:05047ada7a2fde2631a0ed706f1fd68b169a681dfe5e4cf0f8e4cb6618bbc2cd", size = 253558, upload-time = "2025-10-06T14:51:31.684Z" }, - { url = "https://files.pythonhosted.org/packages/00/a3/67f18315100f64c269f46e6c0319fa87ba68f0f64f2b8e7fd7c72b913a0b/multidict-6.7.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:716133f7d1d946a4e1b91b1756b23c088881e70ff180c24e864c26192ad7534a", size = 252339, upload-time = "2025-10-06T14:51:33.699Z" }, - { url = "https://files.pythonhosted.org/packages/c8/2a/1cb77266afee2458d82f50da41beba02159b1d6b1f7973afc9a1cad1499b/multidict-6.7.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d1bed1b467ef657f2a0ae62844a607909ef1c6889562de5e1d505f74457d0b96", size = 244895, upload-time = "2025-10-06T14:51:36.189Z" }, - { url = "https://files.pythonhosted.org/packages/dd/72/09fa7dd487f119b2eb9524946ddd36e2067c08510576d43ff68469563b3b/multidict-6.7.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ca43bdfa5d37bd6aee89d85e1d0831fb86e25541be7e9d376ead1b28974f8e5e", size = 241862, upload-time = "2025-10-06T14:51:41.291Z" }, - { url = "https://files.pythonhosted.org/packages/65/92/bc1f8bd0853d8669300f732c801974dfc3702c3eeadae2f60cef54dc69d7/multidict-6.7.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:44b546bd3eb645fd26fb949e43c02a25a2e632e2ca21a35e2e132c8105dc8599", size = 232376, upload-time = "2025-10-06T14:51:43.55Z" }, - { url = "https://files.pythonhosted.org/packages/09/86/ac39399e5cb9d0c2ac8ef6e10a768e4d3bc933ac808d49c41f9dc23337eb/multidict-6.7.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:a6ef16328011d3f468e7ebc326f24c1445f001ca1dec335b2f8e66bed3006394", size = 240272, upload-time = "2025-10-06T14:51:45.265Z" }, - { url = "https://files.pythonhosted.org/packages/3d/b6/fed5ac6b8563ec72df6cb1ea8dac6d17f0a4a1f65045f66b6d3bf1497c02/multidict-6.7.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:5aa873cbc8e593d361ae65c68f85faadd755c3295ea2c12040ee146802f23b38", size = 248774, upload-time = "2025-10-06T14:51:46.836Z" }, - { url = "https://files.pythonhosted.org/packages/6b/8d/b954d8c0dc132b68f760aefd45870978deec6818897389dace00fcde32ff/multidict-6.7.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:3d7b6ccce016e29df4b7ca819659f516f0bc7a4b3efa3bb2012ba06431b044f9", size = 242731, upload-time = "2025-10-06T14:51:48.541Z" }, - { url = "https://files.pythonhosted.org/packages/16/9d/a2dac7009125d3540c2f54e194829ea18ac53716c61b655d8ed300120b0f/multidict-6.7.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:171b73bd4ee683d307599b66793ac80981b06f069b62eea1c9e29c9241aa66b0", size = 240193, upload-time = "2025-10-06T14:51:50.355Z" }, - { url = "https://files.pythonhosted.org/packages/39/ca/c05f144128ea232ae2178b008d5011d4e2cea86e4ee8c85c2631b1b94802/multidict-6.7.0-cp314-cp314t-win32.whl", hash = "sha256:b2d7f80c4e1fd010b07cb26820aae86b7e73b681ee4889684fb8d2d4537aab13", size = 48023, upload-time = "2025-10-06T14:51:51.883Z" }, - { url = "https://files.pythonhosted.org/packages/ba/8f/0a60e501584145588be1af5cc829265701ba3c35a64aec8e07cbb71d39bb/multidict-6.7.0-cp314-cp314t-win_amd64.whl", hash = "sha256:09929cab6fcb68122776d575e03c6cc64ee0b8fca48d17e135474b042ce515cd", size = 53507, upload-time = "2025-10-06T14:51:53.672Z" }, - { url = "https://files.pythonhosted.org/packages/7f/ae/3148b988a9c6239903e786eac19c889fab607c31d6efa7fb2147e5680f23/multidict-6.7.0-cp314-cp314t-win_arm64.whl", hash = "sha256:cc41db090ed742f32bd2d2c721861725e6109681eddf835d0a82bd3a5c382827", size = 44804, upload-time = "2025-10-06T14:51:55.415Z" }, - { url = "https://files.pythonhosted.org/packages/b7/da/7d22601b625e241d4f23ef1ebff8acfc60da633c9e7e7922e24d10f592b3/multidict-6.7.0-py3-none-any.whl", hash = "sha256:394fc5c42a333c9ffc3e421a4c85e08580d990e08b99f6bf35b4132114c5dcb3", size = 12317, upload-time = "2025-10-06T14:52:29.272Z" }, +version = "6.9.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/99/1d4d69c3512d0ddbfa3a1b69cfd9a151012ab2eb4eabbb096201b1f0b7d8/multidict-6.9.1.tar.gz", hash = "sha256:0f06e60fa190aa7abd0914c2a766736fdc8e9f34878c4346338534b73d1b20e2", size = 182404, upload-time = "2026-09-21T17:59:05.362Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e3/24/3823efc330630a1f132bcd0a9b182ddec3c53f452f551c8e8d3aaf5a2d20/multidict-6.9.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:910d4260512660484c0dc1588a316fbb35a40c081c36fc51d1225351af17cfe4", size = 96739, upload-time = "2026-09-21T17:54:42.815Z" }, + { url = "https://files.pythonhosted.org/packages/6a/69/36331fe1d3aeb0c525a9972d6cf82791075a395aa96f026f060009d691ae/multidict-6.9.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:33fa55b990f81c2927e01399ace0d18926c69d69baa8cdaa819424132fb97987", size = 58514, upload-time = "2026-09-21T17:54:44.064Z" }, + { url = "https://files.pythonhosted.org/packages/8c/ca/5860651f782078ef13f2761c2593f4ba066d76f626b2f30f23a7f838b775/multidict-6.9.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:369b5aa01b241cd3fea6890bdbb11a1425d87bf1515831500d518f4223e9d72c", size = 57303, upload-time = "2026-09-21T17:54:45.304Z" }, + { url = "https://files.pythonhosted.org/packages/c7/9f/c56e2fa223cb5d182660e1a09eec38880f96b7cd22769582f74447c60418/multidict-6.9.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:803f8b575a71b1b299d677c28db0653459c79b5308874efec813f17b7457c7f1", size = 320076, upload-time = "2026-09-21T17:54:46.826Z" }, + { url = "https://files.pythonhosted.org/packages/59/97/eda4fe0cad51f96096363ed32d3e0f8df28dab00beff4d92adc9db517726/multidict-6.9.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b8a65621b98984a62e59403009591b8a5a7736273aefe1cab64cfb85b365cc07", size = 315489, upload-time = "2026-09-21T17:54:48.25Z" }, + { url = "https://files.pythonhosted.org/packages/24/14/10b1ded0a4085a51c3054125f854da4f47ce4fec724a2d2503231b83f3db/multidict-6.9.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:13849a1d4f54c3809ae721e9e83ab28f5ea602f33660cb84eb6ef261eac706c1", size = 296716, upload-time = "2026-09-21T17:54:49.749Z" }, + { url = "https://files.pythonhosted.org/packages/dc/14/04d155dd18528443cb9009f3a9f35f7417773797d072c95104ff17b8b9b7/multidict-6.9.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:dd9a137a4a9becda3094f3831cd026380f75f6855e051eefe4c73ade524f1cc3", size = 330244, upload-time = "2026-09-21T17:54:51.26Z" }, + { url = "https://files.pythonhosted.org/packages/8b/90/284d10b3a9e5b312a8ec5b7a175fc7d560eefdc99886320449891a197992/multidict-6.9.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9ae9614c317c50836689ce2dfde07c05fe0b16378562e2221746c3913ede3c80", size = 331288, upload-time = "2026-09-21T17:54:52.595Z" }, + { url = "https://files.pythonhosted.org/packages/27/50/f420de3683f9b047fc5588064d84043ef57a7152ef451b8373dfc7068d22/multidict-6.9.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e8f1e362c9352b50ed120f001046fdbb80810c9d56580f4c3fc13bbe30823387", size = 320663, upload-time = "2026-09-21T17:54:53.91Z" }, + { url = "https://files.pythonhosted.org/packages/01/ab/0120a650d7ce4fe167299c13a13cc4ee2dc72458a9c0e9e9330b824b73c9/multidict-6.9.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0dd655518f136febd96c05131a76a863e32fc2a1d7acd4e3c959e3ceb77d8345", size = 291139, upload-time = "2026-09-21T17:54:55.313Z" }, + { url = "https://files.pythonhosted.org/packages/b3/3f/c66342f73ee5cd2c9b1dda6cfce89b5f348c48921b8c8b6e59aafbbfe31a/multidict-6.9.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2c5d675da8f1cb5650271c8ad5e95c0a3e5a183c105e72d953b12877b1c8d0fd", size = 310044, upload-time = "2026-09-21T17:54:56.745Z" }, + { url = "https://files.pythonhosted.org/packages/05/0d/e44b90d9e77e44ec3473c4c7ac7ea95764d7e8fbf6d5a085ef9bff7ce0c2/multidict-6.9.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:658f90f49cf5af2441cad0a2b801c3ef520471989a1ec55bcb25b255b2ca8d2f", size = 303279, upload-time = "2026-09-21T17:54:58.178Z" }, + { url = "https://files.pythonhosted.org/packages/97/8a/7741f7c23c211fae31ab546f0ba41569dae7671cf7ca30d5afb59e9d92aa/multidict-6.9.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:43124fe172ada86d03ac3c8dc8179091341f6724d5e5d5b160e1587e4cd3761b", size = 326177, upload-time = "2026-09-21T17:54:59.825Z" }, + { url = "https://files.pythonhosted.org/packages/e8/63/0cdbfbbe36316b2ef4b8e011afaca2cf291a73fe4fabf34dd0b22e3ee48a/multidict-6.9.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:b2f0adc22a4eb31e545221d93fc73a0f6a8cc2379d0f4309f71d1d17ba938b82", size = 323526, upload-time = "2026-09-21T17:55:01.43Z" }, + { url = "https://files.pythonhosted.org/packages/98/05/0c86e9678e78f4596df0ed7f59d2aa755107da3f2a92f1b7fa150e94cbb8/multidict-6.9.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7fc59e9ba821b220944ccfe0f89c9dc4745f6d097569992356eb03869f21e953", size = 290278, upload-time = "2026-09-21T17:55:02.993Z" }, + { url = "https://files.pythonhosted.org/packages/95/8e/71bd7f43c4883cba6c5f96db88bd2311d52e74ad7680be5915938490d56f/multidict-6.9.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:87cc632c88ee5dc80e12681047839304d98ee5c9a708d686505767001c9b8b9a", size = 321142, upload-time = "2026-09-21T17:55:04.48Z" }, + { url = "https://files.pythonhosted.org/packages/2d/00/bf59d6bb22a4c152e4039574c29490caf3c65107715121807b4bd7cde244/multidict-6.9.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b828cf64d62dc09ac183f03c1aeedd164ade96a2ce4934109452edf29de1dd13", size = 319045, upload-time = "2026-09-21T17:55:06.119Z" }, + { url = "https://files.pythonhosted.org/packages/3a/3c/f27f4f045198bf1c4bcd6eb3b6cf06be2dceaceb6e67222b903fce7a6749/multidict-6.9.1-cp311-cp311-win32.whl", hash = "sha256:2c1aeb92eea59d824f004341b26d5e4b47a8a441cf9726769b9a90abf9d0e08f", size = 51309, upload-time = "2026-09-21T17:55:07.531Z" }, + { url = "https://files.pythonhosted.org/packages/91/17/c2064aef64efc007bc89a571f843e5772f27946eb9bc018731bf8016e319/multidict-6.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:5f89dad732280e7a10b74d40b91364f88e13c3f2c08c2ef83a8cd42f7a61af2e", size = 59148, upload-time = "2026-09-21T17:55:08.936Z" }, + { url = "https://files.pythonhosted.org/packages/45/a1/3bab1827edd813dfb90712af5cbb7fc1473ed4d9c871d103df4f4bb950c2/multidict-6.9.1-cp311-cp311-win_arm64.whl", hash = "sha256:5800368526647146978389dfaa46da3356291e9f0fff9a4ef12e8c2bef964a0d", size = 54258, upload-time = "2026-09-21T17:55:10.191Z" }, + { url = "https://files.pythonhosted.org/packages/d9/0d/4b5afb6d3e545c9af0cdfe2db8f6f4c6664568c23d863d888674e447e6a4/multidict-6.9.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:29138fef49828542e859828107e42e50d0e587c513b7eb4b2d92bade2b0860fe", size = 98360, upload-time = "2026-09-21T17:55:11.508Z" }, + { url = "https://files.pythonhosted.org/packages/89/ab/1b9ca66251899981b21138b87da9d5a9c2c81af12b1ea7d19466972f7fe2/multidict-6.9.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:19e31815d41cefc365489e591d105d2baceb2f65aa75d29471fbdbda8651e006", size = 59979, upload-time = "2026-09-21T17:55:12.866Z" }, + { url = "https://files.pythonhosted.org/packages/36/eb/6ae44062466c26c8469ef43f2481a6a48d8cea0587b2d54514ec92e2adfd/multidict-6.9.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6ed30be8918e18c8bed0a2e8b70639ecf02feb61ed00ca2e41cfcb2a50fa3f42", size = 57736, upload-time = "2026-09-21T17:55:14.223Z" }, + { url = "https://files.pythonhosted.org/packages/b9/5c/a67817593019257a4ac8b0d1b4c426030e637c047b0692ef405439ecea7a/multidict-6.9.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:637f4ae36264bd7b8d9a60193acddc1d735ad52e8ed53a19931ea6d921fea8e5", size = 333097, upload-time = "2026-09-21T17:55:15.591Z" }, + { url = "https://files.pythonhosted.org/packages/90/bf/599ae2e6222822d88a247a8a7ae82fe6fd25d5700757b79603d5edafe6a0/multidict-6.9.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:35fc236507fb1b3138f0af5ecd5f94ed752d4d6d826248eae425f86204013eea", size = 334196, upload-time = "2026-09-21T17:55:17.015Z" }, + { url = "https://files.pythonhosted.org/packages/15/10/d8aac5acacbe7f5c117866c776ec26d5f15a868759b6f37ad8e7ed3b5b02/multidict-6.9.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e58952f04772f59f11c6e007471449809a30165188669bca8fdb19dde40a8f24", size = 317465, upload-time = "2026-09-21T17:55:18.412Z" }, + { url = "https://files.pythonhosted.org/packages/19/0a/714f796f7293a8b1c5c3f465a26996231d5450c54e85d64ef1258c091134/multidict-6.9.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d35a4f1c63f07fbb8c8f9946dea98b21eddf6c57421585f71d91864be3ba2a24", size = 345914, upload-time = "2026-09-21T17:55:20.306Z" }, + { url = "https://files.pythonhosted.org/packages/da/b1/e37fbf769c567be277bcf32df6234035a4384677fcc1bd852752be3d6b93/multidict-6.9.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b5f8771aaaed7f80e84a4e471d2f29ab6721e4595075e54d03ae1ed951b2000a", size = 351163, upload-time = "2026-09-21T17:55:22.21Z" }, + { url = "https://files.pythonhosted.org/packages/ed/5b/db08419c1e1f7c9d60cfd2787b2b517d7ae4ebbda8281b48a33eb5141467/multidict-6.9.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:976fd7689d69ec78d67d31d38d396d8adb562f7e8368279f76aed4aa451fa06d", size = 336881, upload-time = "2026-09-21T17:55:23.699Z" }, + { url = "https://files.pythonhosted.org/packages/9b/07/cc9bc8a62651d2d53ab93ee4993b3a71b7cb78eb8ebfc9c757a5b6698617/multidict-6.9.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:95052e8777a86bae87c0bd0b5ab22d809e3d1d02bf69e3e66ddda5ba75a05805", size = 303405, upload-time = "2026-09-21T17:55:25.305Z" }, + { url = "https://files.pythonhosted.org/packages/b6/0c/8e912afafa70e944dbb8bec4b66ca6e008511395278c0d3dd0e89567536a/multidict-6.9.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1a8adfcaf96f587ab138476eaddef95f29b8a2a8a9afbfea8d2fd62180995d02", size = 324265, upload-time = "2026-09-21T17:55:26.989Z" }, + { url = "https://files.pythonhosted.org/packages/66/6a/62c2af80fb085e6234805017af857b8e913dfac7a55e9c1349c27768c58a/multidict-6.9.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:1a53de2772cfb74559df2eb4456ec4eeb908435ec55a84b69370d9d745d62aa8", size = 322085, upload-time = "2026-09-21T17:55:28.732Z" }, + { url = "https://files.pythonhosted.org/packages/f8/6b/35bf801b336fd960811207203ffdcdc24acc3558b3e7ff2e1c914b141e70/multidict-6.9.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f2ce963299d42fa3f22a90adc0fdf174792ffef5ff4c7ffb68260548fb05580", size = 338107, upload-time = "2026-09-21T17:55:30.303Z" }, + { url = "https://files.pythonhosted.org/packages/80/41/495ef65bf5bba29d142d81b3fe1b8154b919bed70e96491b1e93c3c26f0f/multidict-6.9.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5b30ddf7234e611ca877575b62840e6af5977f92f1f9d532eedbb05a44ff8004", size = 339631, upload-time = "2026-09-21T17:55:32.012Z" }, + { url = "https://files.pythonhosted.org/packages/19/bd/057fdff5f4e04dcd40a960e38f77d19d3c4b67dd243ffa5f43718edb29fc/multidict-6.9.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:63ada7ee2e9345695f9e9bc4c65d72222253f07b1ac94fd0e37555cc6f3c7f60", size = 302080, upload-time = "2026-09-21T17:55:33.817Z" }, + { url = "https://files.pythonhosted.org/packages/3f/de/9ace933ee8dad808632523726f42255b09600087219e3d4ead7369820910/multidict-6.9.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3c95601ed98fad3f6e2f8fe809c3b526b0fab31ef525e00a155e227f3d17f58a", size = 341107, upload-time = "2026-09-21T17:55:35.471Z" }, + { url = "https://files.pythonhosted.org/packages/d8/ac/7c1204406097bfc5c283d4a3287d61166807d189917567df4c1318484fc4/multidict-6.9.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c148e8b596000dd3e4bfe206e70f3e666be18d72032e0012555f2373c52e35d6", size = 333482, upload-time = "2026-09-21T17:55:37.002Z" }, + { url = "https://files.pythonhosted.org/packages/ff/c0/a70c32ea3299ebe00f44533740cb46905717c51faf29bbd3ce8bb5886d9d/multidict-6.9.1-cp312-cp312-win32.whl", hash = "sha256:f9dad513626a33670f17cddc6078e30e311f444c957e8dbfc5b2b4603c8b4edb", size = 52548, upload-time = "2026-09-21T17:55:38.529Z" }, + { url = "https://files.pythonhosted.org/packages/d7/2e/8c9c2591df01e5692ad1bf92febb082a17b1c6c3a19aa8b7ff49988fd989/multidict-6.9.1-cp312-cp312-win_amd64.whl", hash = "sha256:a16a1dc8529f9e734a41c3b856f3eae7ebacdc061dde3f8a844e0c7889c97203", size = 59622, upload-time = "2026-09-21T17:55:39.86Z" }, + { url = "https://files.pythonhosted.org/packages/d0/95/59f4472ec512bc180fd207899594c7803ece96262ff9aaa3a4b6d7da6940/multidict-6.9.1-cp312-cp312-win_arm64.whl", hash = "sha256:361f7206cf341ba94fb015688f5c8b480f8e63bd58a4c14a48aeca7851a241cc", size = 54930, upload-time = "2026-09-21T17:55:41.155Z" }, + { url = "https://files.pythonhosted.org/packages/eb/45/ddf7c76860f5f553a23ad3ca38463ccf5247081618977742c8dc4625355e/multidict-6.9.1-cp313-cp313-android_24_x86_64.whl", hash = "sha256:d7bf9e43282d69561618e8a0ea33368d532ebef42f15c096f427090521dd74f3", size = 63266, upload-time = "2026-09-21T17:55:42.676Z" }, + { url = "https://files.pythonhosted.org/packages/6d/d3/f4ae5945ea2de597eaeb4eca3a74c59783ace54482c9b49435442b63efa8/multidict-6.9.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:03d47df72f084f757c1cb771188d5f4e3a805e4abc4d67e32509272343ae9382", size = 55771, upload-time = "2026-09-21T17:55:44.016Z" }, + { url = "https://files.pythonhosted.org/packages/93/7d/15468239920040d01c686e5ae669e6382f7bf31fc3e5e0a6b8f1c3b32d3b/multidict-6.9.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:6bc94fe17c3c56e5418f79515b786b101845f70609b0d19d0c1ba13448e5633a", size = 57116, upload-time = "2026-09-21T17:55:45.315Z" }, + { url = "https://files.pythonhosted.org/packages/17/1b/b958f06aac2d8b1e485eb1c105b1b159cbf3868249e5142142451577dad2/multidict-6.9.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8f2973bbd2bebd9d2e0cd6394c1292a1a19ccd56bdcbe1e174059f1a39be5b40", size = 97692, upload-time = "2026-09-21T17:55:46.674Z" }, + { url = "https://files.pythonhosted.org/packages/93/6c/d6cfe18e61010166d7237d7527c775eb9843e7078feadea45b7628751b60/multidict-6.9.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:de7738b8c0bb74c4cc16bbd7fb49fc2bcf6430dba11b3432cd52768ae40933e8", size = 59556, upload-time = "2026-09-21T17:55:48.22Z" }, + { url = "https://files.pythonhosted.org/packages/46/46/9b4c1127cece0289fb207d04aae5116382ddfcb2a4dc8e0cb49a33f3c7b3/multidict-6.9.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e5ccad4b7bac125722f48d6f862bed3b514d8526deea06316bb72f152cd30a7c", size = 57357, upload-time = "2026-09-21T17:55:49.998Z" }, + { url = "https://files.pythonhosted.org/packages/bc/fc/c18b07100a6064573e49e538d13d47eb2b5221f48080512df78aef54ab04/multidict-6.9.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a49ff5cdb33654cb7d6a3c377aa2a83ddefaa1db31eb10bcf3c180aa84f9af8a", size = 330433, upload-time = "2026-09-21T17:55:51.435Z" }, + { url = "https://files.pythonhosted.org/packages/62/ff/52a0082adeb69656b634609d4fb0ae65456deaae4cca3d5a12656626dc50/multidict-6.9.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b22ff30006a2f28f8bff878fb93413cbe3a4d1fd517c28081d848c90e9cfd2c8", size = 332487, upload-time = "2026-09-21T17:55:52.937Z" }, + { url = "https://files.pythonhosted.org/packages/39/3e/80bd4729635a7af371ff4dcc312594cf96e73f98854491be8740792de430/multidict-6.9.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3adf06c66041aa21eeb8a71e82379b74773298c8e6d3d839b151aae441a99b94", size = 316911, upload-time = "2026-09-21T17:55:54.751Z" }, + { url = "https://files.pythonhosted.org/packages/15/f4/7ea4a907e053e924e2e1694d90560f79f72056504bfd5e8483695f9527d2/multidict-6.9.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:963a8d8f97057082679523d0fd4c53a38f86bc58cabe4556faef682ae53fa2fa", size = 344950, upload-time = "2026-09-21T17:55:56.5Z" }, + { url = "https://files.pythonhosted.org/packages/0d/16/9642ae41fbfbdc546aa481c2b07ae1bc087a94ab5f5020b4d9ab77da401f/multidict-6.9.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b66ccc5c2cdd26e74fa5d4c29ffae424cc6148bf93ce574821783fb3b6d452c5", size = 350264, upload-time = "2026-09-21T17:55:58.073Z" }, + { url = "https://files.pythonhosted.org/packages/93/f2/e06c8e42074d0a4b8419bfe92afbd1d262190b69549ecbcd2dffa4f103c2/multidict-6.9.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7fd79c521f6290c69125fa2b85fa65d9e657e6a8ffaf722dc881b926bef4aa5c", size = 336213, upload-time = "2026-09-21T17:55:59.723Z" }, + { url = "https://files.pythonhosted.org/packages/98/43/d7cf9ef4700e7c25244590d1b4f20cf12cbed86beba6c17be4d9e48c1099/multidict-6.9.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1d804e4caf5d5da37d6dac1325da5629ebef1e27a294c2b568b295814aa36c7b", size = 302555, upload-time = "2026-09-21T17:56:01.666Z" }, + { url = "https://files.pythonhosted.org/packages/7d/3a/54209920324bc3928f5f2ba28b01a6dd957a9d48c3aaff77e38faaf5668d/multidict-6.9.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bb0d664505f4b112f384cffeee82e91e3f6448d8e574989479db4439b68cba05", size = 322247, upload-time = "2026-09-21T17:56:03.265Z" }, + { url = "https://files.pythonhosted.org/packages/33/50/df96f961b178b621ab0adbf9221d4fd21534e1064fd9f5e85c1fa27fea55/multidict-6.9.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:9e14d17773b1b3c758ff153659a1824608a0cb562c45f484b5ed8a433428444a", size = 321787, upload-time = "2026-09-21T17:56:04.894Z" }, + { url = "https://files.pythonhosted.org/packages/a7/9b/37f354562a8f82f9c1f63d3a94300fc82126d50320175f0702bbd544f87c/multidict-6.9.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:083735b7f395894e43adb278d5dae901448883a835ff8f1977e285fefdb10418", size = 335498, upload-time = "2026-09-21T17:56:06.783Z" }, + { url = "https://files.pythonhosted.org/packages/1e/44/78e366efc6c004185295cc9eb9711c10f13eadf3b547603b9c5526329976/multidict-6.9.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b65121091567847a8cb520d364ab22ba90e00d3cc55fa9eb34bb439f0684bcd1", size = 338244, upload-time = "2026-09-21T17:56:09.162Z" }, + { url = "https://files.pythonhosted.org/packages/ad/2b/ab5bd3964691abe4d14b43bdbdb8a621b77cea2ca352dc93159ec0a4575b/multidict-6.9.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:ea999ae6e80e66ad5eea287860951b033d0104ca34d6d87c7b5125ebe0e12721", size = 301641, upload-time = "2026-09-21T17:56:11.227Z" }, + { url = "https://files.pythonhosted.org/packages/ea/a8/f6bc899f5aafaba755edc8e4bb934bc00b1e405f8d3fbc1dd10283738074/multidict-6.9.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:095d900c242e00fbe5f321ee072e7278b4153e78c5ce9c1efde167d62c1e4771", size = 340162, upload-time = "2026-09-21T17:56:13.076Z" }, + { url = "https://files.pythonhosted.org/packages/eb/03/a8fc809ef364b8c231c065ea2ea2f97ae86d4f9a0e36b5721759fd606778/multidict-6.9.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6441cc837aea58be7d9baef1b2383eb8311ab9303f500f99ac90b584cd78bb14", size = 332826, upload-time = "2026-09-21T17:56:15.175Z" }, + { url = "https://files.pythonhosted.org/packages/f2/27/32dde80245e2024e9bb7a6ca3c2fb7c695dc74014cba557cc35be6f91e24/multidict-6.9.1-cp313-cp313-win32.whl", hash = "sha256:9c4880d017555d70dea367dd49271830842d48e3891c2da97da7ce8c4abcee40", size = 52378, upload-time = "2026-09-21T17:56:16.959Z" }, + { url = "https://files.pythonhosted.org/packages/be/78/1bac2987edac273a6b27fa50e9204bc3466c94a7b4f6a44828d730f8810f/multidict-6.9.1-cp313-cp313-win_amd64.whl", hash = "sha256:ac51cd64bae51c462ea58ad2492c9b8209667a4ef60c45c4a304518b67598d5d", size = 59449, upload-time = "2026-09-21T17:56:18.336Z" }, + { url = "https://files.pythonhosted.org/packages/e1/32/2a77ce19eea48cb9b3521a202b513ba3349aafa702c8317be0b645ffb74b/multidict-6.9.1-cp313-cp313-win_arm64.whl", hash = "sha256:37a9ebe00c698279213d56e6c64e1962ab1e092918270649b397cac3dc196ca4", size = 54713, upload-time = "2026-09-21T17:56:19.774Z" }, + { url = "https://files.pythonhosted.org/packages/ec/0f/c6041015aa2cdc11e1dff0cae58898ae5525d19e35efd65a4ecf3c6ea235/multidict-6.9.1-cp314-cp314-android_24_x86_64.whl", hash = "sha256:fc0dcb22fa9aeabfe3fa4e0430099acff985ec5d77a851382f76cc6146e780e5", size = 62336, upload-time = "2026-09-21T17:56:21.181Z" }, + { url = "https://files.pythonhosted.org/packages/23/db/95bd0afb130a0149c955f1f066143528d60864e64f41ff5a1e1313609361/multidict-6.9.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:024123f0ab402ab33828e24eb80fa8f25167d0d3783ba5f287e39ed741e6abf9", size = 54892, upload-time = "2026-09-21T17:56:22.63Z" }, + { url = "https://files.pythonhosted.org/packages/94/cc/8aa34ae8d09498e8da003f485c03371b55cf1bc6d56cff861b3a7de61251/multidict-6.9.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:af1b5a92315048c3e36bbebfa7d4760a9c3e910bc4166f11b20d77d20d6bcfca", size = 56251, upload-time = "2026-09-21T17:56:24.36Z" }, + { url = "https://files.pythonhosted.org/packages/52/48/22baa3b95375096369b04c4348af14139570f302f951773d2c68bf0ccf2e/multidict-6.9.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:b2483da477932ad1983d1d33c18bc3771c6fb00cfbaaed70a875fd547ef8e840", size = 96345, upload-time = "2026-09-21T17:56:25.777Z" }, + { url = "https://files.pythonhosted.org/packages/2f/3e/b96779dcac28ec6d491fd821112a0156b519b6701bba186cdf6f6df737f4/multidict-6.9.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:db4d697b18b6ef5528b1f36bfa25072cd2a421869f5963bc0e92c8a34b9e2800", size = 58901, upload-time = "2026-09-21T17:56:27.364Z" }, + { url = "https://files.pythonhosted.org/packages/f9/b4/8e6d950f02ca6ecc00ecf671f2ddb5dab7017671a8d197326f75621f5786/multidict-6.9.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:854fd2f1bc6e8a56b89910b5cd7261a8b40f13ebb31572da985ce59c7da0886d", size = 56491, upload-time = "2026-09-21T17:56:28.901Z" }, + { url = "https://files.pythonhosted.org/packages/ed/8f/212ed7e03282c7bc271e3796bf985b53d5727c2827361e3dd9c5ee6b093f/multidict-6.9.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:03731f6fc036180700c9dc2308205a48e5ca6f3ff03087739ab746f294022201", size = 332297, upload-time = "2026-09-21T17:56:30.495Z" }, + { url = "https://files.pythonhosted.org/packages/a0/97/555aab000e03ecba85c0a1837fd5674d8bf10949490df7800da3a40660ce/multidict-6.9.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:989261c5f1735a165f2e4e87cf6d5f17ab734fa18f9ad0383d5adfcdaefce701", size = 329197, upload-time = "2026-09-21T17:56:32.652Z" }, + { url = "https://files.pythonhosted.org/packages/3d/25/f3539b5bdc147beba66015795dfe589eedcc580348fb1a8c69b1df4196b5/multidict-6.9.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b4c9e5d05b126b267ac048a89a0e2d9b48b1b648add62d4872906304a8590610", size = 308456, upload-time = "2026-09-21T17:56:34.657Z" }, + { url = "https://files.pythonhosted.org/packages/1e/7d/4665cad8fc326787d218879be879d86dfe32f006c1f88ae47b04d3b52fd5/multidict-6.9.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9d0a21cf76153de8f2d96a877991d6bc59b9ab5180b949e50db73cc193b4a694", size = 343382, upload-time = "2026-09-21T17:56:36.606Z" }, + { url = "https://files.pythonhosted.org/packages/41/01/e1e9abe27f492b22dede492bc423015597412b14ce074f7475f4ecd80185/multidict-6.9.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e7386aa18d98d6b8af44b92173654ec469237fda35f8e8523e43b581a86f476a", size = 346848, upload-time = "2026-09-21T17:56:38.344Z" }, + { url = "https://files.pythonhosted.org/packages/f8/e5/8d54118bc228e64e1087f1729647b93bbea225eda4a3f914663a6f410bca/multidict-6.9.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b69651732c64afb691e50cdc3387cae305e0eeff8804fe3e3ce203876494932a", size = 333612, upload-time = "2026-09-21T17:56:40.041Z" }, + { url = "https://files.pythonhosted.org/packages/76/e1/9509dafc1fc68948e75842a74533ddfa64af57f2b17810e9cacfa68a829b/multidict-6.9.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1fee9a16d88a1c4865610de31ef5c666671020d7a81d1f510eaf3c97d00ebeba", size = 304246, upload-time = "2026-09-21T17:56:42.313Z" }, + { url = "https://files.pythonhosted.org/packages/1d/b6/96b93808e1bec0b51d49d89859e49b82a94f7b2e58eca0fc44ffcafd3ae5/multidict-6.9.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7814bbee202acd3bd240204c17d8b87a4c48c81064fd8674dbe527d94d5a4290", size = 321983, upload-time = "2026-09-21T17:56:44.399Z" }, + { url = "https://files.pythonhosted.org/packages/d9/1c/08e5184df026b9d8e05a6dce5da22628e46bc4a7c7f03b8bf3c6939a8c46/multidict-6.9.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:95f273bea318a194f656527ee2ed19494327bc500b8e87d9358e3222579aa28d", size = 315927, upload-time = "2026-09-21T17:56:46.208Z" }, + { url = "https://files.pythonhosted.org/packages/d7/5d/9ff39e7387f6fcc9a81af5dbf055fde08149849a04f8df10ca5b086b0d39/multidict-6.9.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:73bcafa21a78d0776b3ee7cd2a63c66f968eb7db8e8d594e32d7329950f6e828", size = 336827, upload-time = "2026-09-21T17:56:48.021Z" }, + { url = "https://files.pythonhosted.org/packages/5a/be/30fbb2cab22203128928066de94be247dc9a3230bf2bfc54437ac3b5f9f7/multidict-6.9.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:1a938761c77e0e6edb0c93d02f4e988d44a69e5195e5a3b893e5553311347132", size = 336317, upload-time = "2026-09-21T17:56:49.778Z" }, + { url = "https://files.pythonhosted.org/packages/bf/f0/2480aef6b7d8e7ab89b064ae14f12ec069570dab3a5c13e0155912293247/multidict-6.9.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:37245ca4105386194dd1d292a6f2aae09bfe1bd7ac6f9ec25093e3cf8e9b143b", size = 303258, upload-time = "2026-09-21T17:56:51.829Z" }, + { url = "https://files.pythonhosted.org/packages/4c/04/dbe59cf4ea3778600e8e70e30b31aa9118ad6da2844bc9f717804cbaa000/multidict-6.9.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f0700527dd5bfa8b7204b08330542f4f388899d3c14d885d8a368992e0eb562d", size = 337232, upload-time = "2026-09-21T17:56:53.537Z" }, + { url = "https://files.pythonhosted.org/packages/f4/8c/abe55548f06f12878588f08eb803c5a391283f01243f784cb00adac79231/multidict-6.9.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6b7e54fd883671d1a8810704851c044b7173287c552b9f5c3d9e0eb9f00ae194", size = 330261, upload-time = "2026-09-21T17:56:55.335Z" }, + { url = "https://files.pythonhosted.org/packages/d0/f1/ba67f668478f152bdfa18abe72e7588bd078bf8b42c172fcf542fcf45826/multidict-6.9.1-cp314-cp314-win32.whl", hash = "sha256:e81ae656b9935ac4528a71f96bb7a14d949778ed1897c573d3e7ebb9187f8841", size = 51715, upload-time = "2026-09-21T17:56:57.048Z" }, + { url = "https://files.pythonhosted.org/packages/33/81/014bb2128aedc8157d2848f0ec8a0209c6b822fb88deea012834e1c4a4e8/multidict-6.9.1-cp314-cp314-win_amd64.whl", hash = "sha256:acddcac38adc8342ba48aba98896faa7928854bebb62542362138655b5367ee3", size = 58621, upload-time = "2026-09-21T17:56:58.531Z" }, + { url = "https://files.pythonhosted.org/packages/66/34/8f43c03c2d8821a2320b8c560d8a49d0be2920627edfac3f546922f91969/multidict-6.9.1-cp314-cp314-win_arm64.whl", hash = "sha256:32217133dddc58c927805cf6c0731d8144584176b768042ee886d51e71860bc9", size = 53959, upload-time = "2026-09-21T17:57:00.15Z" }, + { url = "https://files.pythonhosted.org/packages/08/64/4f2a5eeea10b6d42634ba168ec6efc732ef218772e57b8239cd485c202f6/multidict-6.9.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:0b2fb8c349d1103863750b5d8cb5ace766917f4b35f3d883c8f778853eaa9f76", size = 107694, upload-time = "2026-09-21T17:57:01.785Z" }, + { url = "https://files.pythonhosted.org/packages/32/ce/c68d08ac2096c1528ff20d77fd10f7e401db3e534ac5a1c7726e36a77c2f/multidict-6.9.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:56d834b74c993a7d7cb2b8ab33a0d55c3e0d4a3d2f2da2808a4ad3d79189711b", size = 64766, upload-time = "2026-09-21T17:57:03.52Z" }, + { url = "https://files.pythonhosted.org/packages/3a/9a/9f5c270c88fe289b4876fe28f9932a70e015a7916aff1e5b0325f7597b11/multidict-6.9.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:783ba7d845d79ce976afd9c1e91a4e5714671defa198ee789e8b23316083a485", size = 62723, upload-time = "2026-09-21T17:57:05.104Z" }, + { url = "https://files.pythonhosted.org/packages/7c/63/c9a0b131354dd949426166cef712d708f436a8cf261114f8d5d2aec440ca/multidict-6.9.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:4d718fa1b5f0d0dd75e86fbbc5b0c93ea3a5d65216c85c61cd5d7cdddfe08455", size = 290445, upload-time = "2026-09-21T17:57:06.687Z" }, + { url = "https://files.pythonhosted.org/packages/9d/41/ed27d1d20ba91f4e13e8f7dcfaa592614ae0e1d5f45e03171d23c3b098ac/multidict-6.9.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a313bad717dde740959d50850c315b75fd4eb0c5e6b4dc8535db0f1c369be125", size = 304375, upload-time = "2026-09-21T17:57:08.717Z" }, + { url = "https://files.pythonhosted.org/packages/66/6f/a7b26167173c3b73d6e5ebb0856c5154ad005156c3a2fa4062329921819c/multidict-6.9.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ef01d29fca550ab871fd99154f82c6472aacf8e7def272dfb07b460123850390", size = 281746, upload-time = "2026-09-21T17:57:10.713Z" }, + { url = "https://files.pythonhosted.org/packages/34/1d/da27bdd49b0cb84263288f5f48dbd915f2d17fd228fee2078ca607e80277/multidict-6.9.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0f3bd290711c6e9486173a6ee7cd4e7f00c3971c7908c1ec1b6e5437c5e4c6f9", size = 311499, upload-time = "2026-09-21T17:57:12.467Z" }, + { url = "https://files.pythonhosted.org/packages/d0/36/ab0299a7abf53e38ff75d96c64480f1e2ff8edde985f93f7a1ad5e08bd94/multidict-6.9.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:81cdc537e0a42e3c0170752fcadbe450246d5c3b4b7231d6eb9672456605ac94", size = 313553, upload-time = "2026-09-21T17:57:14.548Z" }, + { url = "https://files.pythonhosted.org/packages/5a/44/e21be702efc9c9ba097c8be874c68860b1cb6cf9c85611263039bf95b37e/multidict-6.9.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8b193bf7a443c97d81c47052f60c486071a4bdef4a573fa2514f920089414d45", size = 299898, upload-time = "2026-09-21T17:57:16.192Z" }, + { url = "https://files.pythonhosted.org/packages/00/8d/e93bc0dc947c7f872e502cfaa7ad9d98f001e1c93cfa6f4940457a6e187a/multidict-6.9.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7a0c98f6a636adf0d7edd60c61589eaf52d149239af754d0bfeb0effedba53a8", size = 273054, upload-time = "2026-09-21T17:57:17.793Z" }, + { url = "https://files.pythonhosted.org/packages/5e/c9/945b44493fbe7af26ffe1e43c506b376daeab070fc1a0923bef9bbf572eb/multidict-6.9.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:6e6b7e3a1520c39a2772f414cd9ddf5995f77e4e823dfa1522af383addd465a3", size = 294751, upload-time = "2026-09-21T17:57:19.631Z" }, + { url = "https://files.pythonhosted.org/packages/24/79/0969a9b38b814e5fa3af1b0a57708c49b3d9b3d55c208bac6e98b87bb028/multidict-6.9.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:ca65cced0d67a9039e93bcd98a369920e499bf98296844ff56ead01c9085321f", size = 284523, upload-time = "2026-09-21T17:57:21.313Z" }, + { url = "https://files.pythonhosted.org/packages/1d/1e/c32ddf53234c228b1a374ddabca19f542ac7f32752f5155982abe2304833/multidict-6.9.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:372c063f37480f62c1ae32dc3a1a0a5942b180c883f99789075a8a8ec3c4e709", size = 290275, upload-time = "2026-09-21T17:57:23.206Z" }, + { url = "https://files.pythonhosted.org/packages/5d/09/7a99a3daafd987330abb865a2d36e432fd8bf18e790ddda55c5de15eb98f/multidict-6.9.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:827c92145b3b976b39430129c89d213b250dacbe5fce678e9a03940e6e848983", size = 303350, upload-time = "2026-09-21T17:57:25.086Z" }, + { url = "https://files.pythonhosted.org/packages/2e/09/7e6ebaecc4e226d7fe27973c271d58b75c14c24e84c23736d21dc39997dd/multidict-6.9.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:9b0124b9c17e9890f0819b2e7a5f65ec9a2f5aabd6c8e7ad090c1675cf70dee6", size = 272232, upload-time = "2026-09-21T17:57:27.193Z" }, + { url = "https://files.pythonhosted.org/packages/1f/6e/420e9e879b21cbdb5036214ee238efabcfab7bf262d3fc124132050f79ff/multidict-6.9.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:23136f5a564654eb61061ec6d5620a4c1ea32c8f552b65e9982a12b72bff601b", size = 300525, upload-time = "2026-09-21T17:57:29.004Z" }, + { url = "https://files.pythonhosted.org/packages/b7/7f/c6b0896850b3ceb190ca302760d63148843371f027c5dde3d1d732343a08/multidict-6.9.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f2524ec55b3e65cbe235a8b3c36e2af3b635be02ed05e20c94e70c5c943c009e", size = 295933, upload-time = "2026-09-21T17:57:30.837Z" }, + { url = "https://files.pythonhosted.org/packages/29/f2/f0ff3384a756227741c72f4ee94cadf1f9900df0ae961e48639f96115b1c/multidict-6.9.1-cp314-cp314t-win32.whl", hash = "sha256:35ba0263bae5dd3ad5aad767cc9afc01a8598c7dae30f1b3b2de98b1b32c28bd", size = 57776, upload-time = "2026-09-21T17:57:32.835Z" }, + { url = "https://files.pythonhosted.org/packages/8d/87/013e1eed30ad46bec1eb68947bc9caf55ba2fd0d6aed04fe964e3b44c23b/multidict-6.9.1-cp314-cp314t-win_amd64.whl", hash = "sha256:7c8d5882ba25ac0282258be435d8a05aa0cbcacfce15799154a338f847f159b9", size = 64881, upload-time = "2026-09-21T17:57:34.489Z" }, + { url = "https://files.pythonhosted.org/packages/7f/95/64dd049bb4c53426e2fee7afb874daaa8b4426c41878785883a94511ecf8/multidict-6.9.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ac348379cf4de5538a0a213be1532d289aa801ec5d267c5909446b9ea2f8e2c3", size = 58582, upload-time = "2026-09-21T17:57:36.19Z" }, + { url = "https://files.pythonhosted.org/packages/a2/2c/26bc1723592cfe965b575652a7749026474b0625b04b04564e1fba265dc5/multidict-6.9.1-cp315-cp315-android_24_x86_64.whl", hash = "sha256:f04551dce5a7db8c9659f2e4245494c182d0663b83661803e08d46bfcae5eda1", size = 62339, upload-time = "2026-09-21T17:57:37.967Z" }, + { url = "https://files.pythonhosted.org/packages/bd/c5/614d2eb9995232d066aae7f17d1d454060b6b5d882b22fbaf6150b05ef1d/multidict-6.9.1-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:c0c88085affd35c33e124e36930c5ad96aff9294ce195eaa0fd9cec962b64a82", size = 55009, upload-time = "2026-09-21T17:57:39.746Z" }, + { url = "https://files.pythonhosted.org/packages/7f/24/f7179ecdf9cdd3581ace3292c3b883a1a500a374aa4e619bf6eb521c62e5/multidict-6.9.1-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:a8b75dd3d3638d9a19f23e84af4ffab3b8940422c0df2da2a77005ef5aa3d7ea", size = 56273, upload-time = "2026-09-21T17:57:41.544Z" }, + { url = "https://files.pythonhosted.org/packages/ac/72/c9dffcecccd1f8b9a58f960ec4eaecab62c4edb08d5bb984d4de67fe3fdb/multidict-6.9.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:006c4478de0a1876f4834e14255776286f09b9846b505fe63f67f9d173a9487c", size = 96390, upload-time = "2026-09-21T17:57:43.385Z" }, + { url = "https://files.pythonhosted.org/packages/e9/3f/76542360e655cecdb7c158c7af88c69c4db0d2aac3421659d41214927229/multidict-6.9.1-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:2784090c30a586d5b45197bd9c32f87fb927216cde302f6cfd76d76577e90f08", size = 58900, upload-time = "2026-09-21T17:57:45.105Z" }, + { url = "https://files.pythonhosted.org/packages/04/15/f28c71af461dd4ff15653a165cfd8ddaf01f3387ff80d2dd0de057d527d0/multidict-6.9.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:7c708566da8014b120a64b1eb6d200c6c0c8cb36296383723cdb6fc82038270b", size = 56540, upload-time = "2026-09-21T17:57:46.913Z" }, + { url = "https://files.pythonhosted.org/packages/19/de/5ee4050c3ddad88c605a89fc1cd18e89abd40a64f183e6fb5276b6eb7f52/multidict-6.9.1-cp315-cp315-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:042fb0196047e786936a730bd302de83143950da45f2c16078da8f35e1cf7919", size = 331818, upload-time = "2026-09-21T17:57:48.825Z" }, + { url = "https://files.pythonhosted.org/packages/70/e2/2d4e3c3ee70f583334ff236fe6a3babf7a05ce56169a15df65453af647c0/multidict-6.9.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a2212a0c842c723d919ea4a22a9296cb6b244b386e4e6ea92adfc7fbf3095519", size = 329800, upload-time = "2026-09-21T17:57:50.91Z" }, + { url = "https://files.pythonhosted.org/packages/d6/14/f64bd05667343a7250cdd99f81bda2270e3959f00832441f10c7f904e1c1/multidict-6.9.1-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fd882aa29bf402b62bf1fd7c19fd5df4b6528cf468a908864b39368572b662a9", size = 312048, upload-time = "2026-09-21T17:57:53.053Z" }, + { url = "https://files.pythonhosted.org/packages/64/bf/a91256ce00199e7544e3eda79c4e9544eb7388c38fa22f11638c2e357ccb/multidict-6.9.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c57541034d12b215ab0a2bfa371d1a8a198da18176d0426c27105b9161a6862d", size = 343676, upload-time = "2026-09-21T17:57:55.069Z" }, + { url = "https://files.pythonhosted.org/packages/14/48/628b978413518159228c2b2ec38645362ceb6427e935d83d716e26490a49/multidict-6.9.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d73fed4e37158ff00cd271871170b79e40138db51e625fd352fa17c6acb34f67", size = 347028, upload-time = "2026-09-21T17:57:57.157Z" }, + { url = "https://files.pythonhosted.org/packages/8c/73/5f9dc2b5ac7dd7a82458ae9cd283b99c185834f23442ace295362dcc5e45/multidict-6.9.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:79da2491348b30810728050b4a8ec0416f85884125c2fd44655b3d01150d9c3e", size = 335670, upload-time = "2026-09-21T17:57:59.126Z" }, + { url = "https://files.pythonhosted.org/packages/f8/84/6f319ee000f5ab3fa0055b194ad706fddd552c60c76a21d581c87db1d46c/multidict-6.9.1-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b4da208a63434d21a3df64d29758e650fc4aa8cb05848554b76949c296539cca", size = 307804, upload-time = "2026-09-21T17:58:01.2Z" }, + { url = "https://files.pythonhosted.org/packages/3f/24/61be5fe1616d033532e8d63dc789c0f35b9793917834713eefe050589ba9/multidict-6.9.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:877ca17fdcfdf5c397493a71e5ff97a87bb181417fe717fdadc77c08c09301ac", size = 323409, upload-time = "2026-09-21T17:58:03.383Z" }, + { url = "https://files.pythonhosted.org/packages/22/a6/eab8aaf59892169a0f4e8e78a5516a6caa6abd8e96e6410111258f4ef0ef/multidict-6.9.1-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:40aec5299e1ed71fbb988389059da381c3c1a60e0c649acceb2a35d9b128848e", size = 315746, upload-time = "2026-09-21T17:58:05.372Z" }, + { url = "https://files.pythonhosted.org/packages/42/b1/d1e14bab80a74babf6e2ac971a878b84fdcf3a972f3ec3400ca12260fac5/multidict-6.9.1-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:4a409ccc42aefec904038695d5d7fd6d8f3af2721b7b6401d55135ec7d6d298e", size = 334529, upload-time = "2026-09-21T17:58:07.35Z" }, + { url = "https://files.pythonhosted.org/packages/f5/50/a05b1d36f6d3363a5a334cebbf11624c9c7a69d66fd23345eb53b1d43b7e/multidict-6.9.1-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:0a5769559e3312dd96731fbe15b4abb6033368ac1cad5a98dadd21946a4c7d6c", size = 336455, upload-time = "2026-09-21T17:58:09.112Z" }, + { url = "https://files.pythonhosted.org/packages/cd/0d/bf33cb097380252b08e1177b5ae0cab822c47ce80d236f3f724953c76721/multidict-6.9.1-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:03fac50ddfd8302175b77863a015eccfae76767cda5506eef86df559ba861e1f", size = 305865, upload-time = "2026-09-21T17:58:10.921Z" }, + { url = "https://files.pythonhosted.org/packages/ba/ee/a2bd133391204b1cec5a5caf327dc9a06710439b7403220860a8fb164560/multidict-6.9.1-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:5ecace251ccfa705bf3d7d35c5032cf750f5c629809740405697bce5c118c4a4", size = 337531, upload-time = "2026-09-21T17:58:12.846Z" }, + { url = "https://files.pythonhosted.org/packages/a8/32/c0972486f81a06c3bbb23063c85afaac53c51608f7e35bcb101a1006408b/multidict-6.9.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:ecc89dbd4155b2f8a47f4bbd89242a35ed15e8e0ec581cab5ac65fa38407329d", size = 332464, upload-time = "2026-09-21T17:58:14.673Z" }, + { url = "https://files.pythonhosted.org/packages/69/4f/5cbbe852b45d8a7f0ab3ed042386e4894e463010eb230603596cb15d0fee/multidict-6.9.1-cp315-cp315-win32.whl", hash = "sha256:a3ffe881246d28a862f1985824f484cb7361f44d6b99c4c620436ef56462f38d", size = 51714, upload-time = "2026-09-21T17:58:16.409Z" }, + { url = "https://files.pythonhosted.org/packages/d4/77/1fa118386deeae4e7a48870fa5cb073e748b0ac5265a6990651cefc48068/multidict-6.9.1-cp315-cp315-win_amd64.whl", hash = "sha256:59c123d0e948d760a5f930f316cfefa07e8d632ab84327c0693ee6a88171154f", size = 58619, upload-time = "2026-09-21T17:58:18.369Z" }, + { url = "https://files.pythonhosted.org/packages/dd/ee/51c45748acfce9cb69d89dcfcd09c874b385407fd6993e885d6905659865/multidict-6.9.1-cp315-cp315-win_arm64.whl", hash = "sha256:31199204b3ced121ff5407a2c342326a5d27e3870abbf94bd80dbd2451b7bc8f", size = 53969, upload-time = "2026-09-21T17:58:20.102Z" }, + { url = "https://files.pythonhosted.org/packages/aa/57/89d2d3dedfae2558853c1770c7cbcdfd5211eb4c4090b1e8cb570544a490/multidict-6.9.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:8879510a76940670517ea1cb589978da44b86e286ec3e50d664ef330817afce7", size = 107679, upload-time = "2026-09-21T17:58:21.98Z" }, + { url = "https://files.pythonhosted.org/packages/c8/df/0c2a28870181c1762f90952b897f6db46c934ce073efe0442604cbc276db/multidict-6.9.1-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:aec65b53a07f580606593f877eefbb29a45939bfc0d3fe6e6d9f42b41b749f68", size = 64753, upload-time = "2026-09-21T17:58:23.622Z" }, + { url = "https://files.pythonhosted.org/packages/43/7e/9c6a3e7619459407d8958f7e56ab3dda7f0738f5aed9bb4ad48076e8de83/multidict-6.9.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:14c56f73e78faa1f68bbb826197cd5871994e70e841b8590829c35912ece5c64", size = 62732, upload-time = "2026-09-21T17:58:25.46Z" }, + { url = "https://files.pythonhosted.org/packages/38/eb/fd56c9d83ba0cdc3cf66f9acb278b24ef1f043b620b96d145685a3b57338/multidict-6.9.1-cp315-cp315t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:38c9986f9ce50c459b10de216a05f4bd7ed5ac63887d56e500a52bb464b861ce", size = 288648, upload-time = "2026-09-21T17:58:27.115Z" }, + { url = "https://files.pythonhosted.org/packages/df/ef/51e79c2442b0f56ac4ac580108d713078b31297e028d468fc220971a305d/multidict-6.9.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:15db6a102cbaf1949cf028ecf080aac76d20bcd29ad4e092574db6c6b7af78a5", size = 304919, upload-time = "2026-09-21T17:58:29.143Z" }, + { url = "https://files.pythonhosted.org/packages/6f/e4/774700cc5739353fe88a7204ed30e78a9403d98d4bb2496cc91f096d2e71/multidict-6.9.1-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:bd82c4977196681a499bb6ca9e462afbc5c91c1c15b6a991dfbd72733fea4dd2", size = 289094, upload-time = "2026-09-21T17:58:30.938Z" }, + { url = "https://files.pythonhosted.org/packages/ca/41/0bec327bc3a8271825376b6d8a469d1f80e3ba1e2e730e019836e29663c3/multidict-6.9.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bb58ba73a3f96f9a3e46b1fab69929d7edbbddb3133ee74b5c3c54074a53c4f1", size = 312007, upload-time = "2026-09-21T17:58:32.964Z" }, + { url = "https://files.pythonhosted.org/packages/c3/7a/9906bf5f1fe20e8e755affccc1a69ecd8aebb079ac65386e5ffc8eefbe75/multidict-6.9.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7c6eecfab7ce4cd9487ff8ba936fe38cdfd68c04faf3d5c710363c6a8e695659", size = 314657, upload-time = "2026-09-21T17:58:35.285Z" }, + { url = "https://files.pythonhosted.org/packages/33/92/cf6d665a45663bbe216420fe632da10e9f4f842b07ce02bc3ddf8eb882b8/multidict-6.9.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c62e71e6289d78c0108d8aeb495f8bd3cad4bc1632fedddc9297ddf287ecc20", size = 301563, upload-time = "2026-09-21T17:58:37.472Z" }, + { url = "https://files.pythonhosted.org/packages/97/4c/9f1b7945526905d58b4b2d422e2ea81326dda71f9bdc9c32c8002639234a/multidict-6.9.1-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:539c2cd5fed0947c135cd7eabaaac55f48300dfa1de0f3ca4edb5efa6606f471", size = 278540, upload-time = "2026-09-21T17:58:39.551Z" }, + { url = "https://files.pythonhosted.org/packages/5c/d9/133aa472fc1be181de29a0c2e1c4cd778280882f532b404395f646742e46/multidict-6.9.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:3100d169ceb7bc8f05f89a6db11d1b21f119975fc26f29dc45a472e3569f0879", size = 294858, upload-time = "2026-09-21T17:58:41.791Z" }, + { url = "https://files.pythonhosted.org/packages/bd/38/21f2305dd20ac5038fa581b5d7e0d8dbbd70dc6b50231c22ec173dacddda/multidict-6.9.1-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:696477ad71385c4795e3b8e4cf10b0d2c28c2a1ca6a955e031cb1e62993e9ee3", size = 285461, upload-time = "2026-09-21T17:58:43.844Z" }, + { url = "https://files.pythonhosted.org/packages/ad/21/465a43c214d1d7e2d0c974e727d4b5935f8a0868838b5df9d0984c83c1dc/multidict-6.9.1-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:f5844e7befc707367807586f550fa97e23dcfef0728f02b98c7bc498a961a5df", size = 288964, upload-time = "2026-09-21T17:58:46.16Z" }, + { url = "https://files.pythonhosted.org/packages/2d/58/72a3e8d56c1e05146d2d1841dbaacf8986375eded1e5a58d30eef191a580/multidict-6.9.1-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:abc7c2e4b47bfe6a9aea434d3fdebb9597ee636e914e92ba352f2068b9142f4c", size = 303924, upload-time = "2026-09-21T17:58:48.395Z" }, + { url = "https://files.pythonhosted.org/packages/6f/b9/911084c04530a682a54536b4f738d3992a593b5ff6fea1d6a1f02f3acc6b/multidict-6.9.1-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:7ab379f95caee071a37cbd8be86d4c65accc651d391f9f97748fef006f38769c", size = 278479, upload-time = "2026-09-21T17:58:50.494Z" }, + { url = "https://files.pythonhosted.org/packages/45/eb/9a333346c02c928a9e82534638bce85697c10c46b4901fcd70af19357356/multidict-6.9.1-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:557a4e1708df428ebe6c3081c83a273d275dad2446ce0d81fc648ac71afdb18d", size = 301650, upload-time = "2026-09-21T17:58:52.554Z" }, + { url = "https://files.pythonhosted.org/packages/67/2f/1d936c4e45c8199db6082b6836e9182e31aa393de0de652637790831ca4b/multidict-6.9.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:475d04d5192eba487a3e2f935976340baa24529046e9c1c9c7a3b7bf80445ae1", size = 298024, upload-time = "2026-09-21T17:58:55.03Z" }, + { url = "https://files.pythonhosted.org/packages/a4/0c/ca62ae2882b89a4cfeb0bbca873a4afdb5fc32994c4f8a37a7cb52ede7a0/multidict-6.9.1-cp315-cp315t-win32.whl", hash = "sha256:10083a8a0f4e1b26b599889e90b9802504ce5d3f7722f925bbb7ca47dd22a7c1", size = 57810, upload-time = "2026-09-21T17:58:57.141Z" }, + { url = "https://files.pythonhosted.org/packages/02/8b/b2c2805c3eb6fa4cdf5512fb95ac6174dde71e34dd601c5be52f4df5dc82/multidict-6.9.1-cp315-cp315t-win_amd64.whl", hash = "sha256:e96ca64383efa107262ee3949f047af5ee4f1845ba09463466c04d35a83bd3ec", size = 64984, upload-time = "2026-09-21T17:58:59.446Z" }, + { url = "https://files.pythonhosted.org/packages/fd/34/03f1d204d698c408f4754c969882609b6b7a902c0e3d16a7033f219cdeda/multidict-6.9.1-cp315-cp315t-win_arm64.whl", hash = "sha256:501ed8b02a5990c67a91c732843609d43a6be1f7576fcdfc867331239f37fbd3", size = 58742, upload-time = "2026-09-21T17:59:01.726Z" }, + { url = "https://files.pythonhosted.org/packages/be/59/e26cb779be4c591d1a910f59d29aca9fba4de70349840a833beba2652371/multidict-6.9.1-py3-none-any.whl", hash = "sha256:7bf6478188f4e47bf5686e8a33da4ae28bf43b1b2528d9ee144d28492bfac60b", size = 19176, upload-time = "2026-09-21T17:59:03.501Z" }, ] [[package]] name = "mypy" -version = "1.18.2" +version = "2.4.0" source = { registry = "https://pypi.org/simple" } dependencies = [ + { name = "ast-serialize" }, + { name = "librt", marker = "platform_python_implementation != 'PyPy'" }, { name = "mypy-extensions" }, { name = "pathspec" }, - { name = "tomli", marker = "python_full_version < '3.11'" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c0/77/8f0d0001ffad290cef2f7f216f96c814866248a0b92a722365ed54648e7e/mypy-1.18.2.tar.gz", hash = "sha256:06a398102a5f203d7477b2923dda3634c36727fa5c237d8f859ef90c42a9924b", size = 3448846, upload-time = "2025-09-19T00:11:10.519Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/03/6f/657961a0743cff32e6c0611b63ff1c1970a0b482ace35b069203bf705187/mypy-1.18.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c1eab0cf6294dafe397c261a75f96dc2c31bffe3b944faa24db5def4e2b0f77c", size = 12807973, upload-time = "2025-09-19T00:10:35.282Z" }, - { url = "https://files.pythonhosted.org/packages/10/e9/420822d4f661f13ca8900f5fa239b40ee3be8b62b32f3357df9a3045a08b/mypy-1.18.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7a780ca61fc239e4865968ebc5240bb3bf610ef59ac398de9a7421b54e4a207e", size = 11896527, upload-time = "2025-09-19T00:10:55.791Z" }, - { url = "https://files.pythonhosted.org/packages/aa/73/a05b2bbaa7005f4642fcfe40fb73f2b4fb6bb44229bd585b5878e9a87ef8/mypy-1.18.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:448acd386266989ef11662ce3c8011fd2a7b632e0ec7d61a98edd8e27472225b", size = 12507004, upload-time = "2025-09-19T00:11:05.411Z" }, - { url = "https://files.pythonhosted.org/packages/4f/01/f6e4b9f0d031c11ccbd6f17da26564f3a0f3c4155af344006434b0a05a9d/mypy-1.18.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f9e171c465ad3901dc652643ee4bffa8e9fef4d7d0eece23b428908c77a76a66", size = 13245947, upload-time = "2025-09-19T00:10:46.923Z" }, - { url = "https://files.pythonhosted.org/packages/d7/97/19727e7499bfa1ae0773d06afd30ac66a58ed7437d940c70548634b24185/mypy-1.18.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:592ec214750bc00741af1f80cbf96b5013d81486b7bb24cb052382c19e40b428", size = 13499217, upload-time = "2025-09-19T00:09:39.472Z" }, - { url = "https://files.pythonhosted.org/packages/9f/4f/90dc8c15c1441bf31cf0f9918bb077e452618708199e530f4cbd5cede6ff/mypy-1.18.2-cp310-cp310-win_amd64.whl", hash = "sha256:7fb95f97199ea11769ebe3638c29b550b5221e997c63b14ef93d2e971606ebed", size = 9766753, upload-time = "2025-09-19T00:10:49.161Z" }, - { url = "https://files.pythonhosted.org/packages/88/87/cafd3ae563f88f94eec33f35ff722d043e09832ea8530ef149ec1efbaf08/mypy-1.18.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:807d9315ab9d464125aa9fcf6d84fde6e1dc67da0b6f80e7405506b8ac72bc7f", size = 12731198, upload-time = "2025-09-19T00:09:44.857Z" }, - { url = "https://files.pythonhosted.org/packages/0f/e0/1e96c3d4266a06d4b0197ace5356d67d937d8358e2ee3ffac71faa843724/mypy-1.18.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:776bb00de1778caf4db739c6e83919c1d85a448f71979b6a0edd774ea8399341", size = 11817879, upload-time = "2025-09-19T00:09:47.131Z" }, - { url = "https://files.pythonhosted.org/packages/72/ef/0c9ba89eb03453e76bdac5a78b08260a848c7bfc5d6603634774d9cd9525/mypy-1.18.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1379451880512ffce14505493bd9fe469e0697543717298242574882cf8cdb8d", size = 12427292, upload-time = "2025-09-19T00:10:22.472Z" }, - { url = "https://files.pythonhosted.org/packages/1a/52/ec4a061dd599eb8179d5411d99775bec2a20542505988f40fc2fee781068/mypy-1.18.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1331eb7fd110d60c24999893320967594ff84c38ac6d19e0a76c5fd809a84c86", size = 13163750, upload-time = "2025-09-19T00:09:51.472Z" }, - { url = "https://files.pythonhosted.org/packages/c4/5f/2cf2ceb3b36372d51568f2208c021870fe7834cf3186b653ac6446511839/mypy-1.18.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3ca30b50a51e7ba93b00422e486cbb124f1c56a535e20eff7b2d6ab72b3b2e37", size = 13351827, upload-time = "2025-09-19T00:09:58.311Z" }, - { url = "https://files.pythonhosted.org/packages/c8/7d/2697b930179e7277529eaaec1513f8de622818696857f689e4a5432e5e27/mypy-1.18.2-cp311-cp311-win_amd64.whl", hash = "sha256:664dc726e67fa54e14536f6e1224bcfce1d9e5ac02426d2326e2bb4e081d1ce8", size = 9757983, upload-time = "2025-09-19T00:10:09.071Z" }, - { url = "https://files.pythonhosted.org/packages/07/06/dfdd2bc60c66611dd8335f463818514733bc763e4760dee289dcc33df709/mypy-1.18.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:33eca32dd124b29400c31d7cf784e795b050ace0e1f91b8dc035672725617e34", size = 12908273, upload-time = "2025-09-19T00:10:58.321Z" }, - { url = "https://files.pythonhosted.org/packages/81/14/6a9de6d13a122d5608e1a04130724caf9170333ac5a924e10f670687d3eb/mypy-1.18.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a3c47adf30d65e89b2dcd2fa32f3aeb5e94ca970d2c15fcb25e297871c8e4764", size = 11920910, upload-time = "2025-09-19T00:10:20.043Z" }, - { url = "https://files.pythonhosted.org/packages/5f/a9/b29de53e42f18e8cc547e38daa9dfa132ffdc64f7250e353f5c8cdd44bee/mypy-1.18.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d6c838e831a062f5f29d11c9057c6009f60cb294fea33a98422688181fe2893", size = 12465585, upload-time = "2025-09-19T00:10:33.005Z" }, - { url = "https://files.pythonhosted.org/packages/77/ae/6c3d2c7c61ff21f2bee938c917616c92ebf852f015fb55917fd6e2811db2/mypy-1.18.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01199871b6110a2ce984bde85acd481232d17413868c9807e95c1b0739a58914", size = 13348562, upload-time = "2025-09-19T00:10:11.51Z" }, - { url = "https://files.pythonhosted.org/packages/4d/31/aec68ab3b4aebdf8f36d191b0685d99faa899ab990753ca0fee60fb99511/mypy-1.18.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a2afc0fa0b0e91b4599ddfe0f91e2c26c2b5a5ab263737e998d6817874c5f7c8", size = 13533296, upload-time = "2025-09-19T00:10:06.568Z" }, - { url = "https://files.pythonhosted.org/packages/9f/83/abcb3ad9478fca3ebeb6a5358bb0b22c95ea42b43b7789c7fb1297ca44f4/mypy-1.18.2-cp312-cp312-win_amd64.whl", hash = "sha256:d8068d0afe682c7c4897c0f7ce84ea77f6de953262b12d07038f4d296d547074", size = 9828828, upload-time = "2025-09-19T00:10:28.203Z" }, - { url = "https://files.pythonhosted.org/packages/5f/04/7f462e6fbba87a72bc8097b93f6842499c428a6ff0c81dd46948d175afe8/mypy-1.18.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:07b8b0f580ca6d289e69209ec9d3911b4a26e5abfde32228a288eb79df129fcc", size = 12898728, upload-time = "2025-09-19T00:10:01.33Z" }, - { url = "https://files.pythonhosted.org/packages/99/5b/61ed4efb64f1871b41fd0b82d29a64640f3516078f6c7905b68ab1ad8b13/mypy-1.18.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ed4482847168439651d3feee5833ccedbf6657e964572706a2adb1f7fa4dfe2e", size = 11910758, upload-time = "2025-09-19T00:10:42.607Z" }, - { url = "https://files.pythonhosted.org/packages/3c/46/d297d4b683cc89a6e4108c4250a6a6b717f5fa96e1a30a7944a6da44da35/mypy-1.18.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3ad2afadd1e9fea5cf99a45a822346971ede8685cc581ed9cd4d42eaf940986", size = 12475342, upload-time = "2025-09-19T00:11:00.371Z" }, - { url = "https://files.pythonhosted.org/packages/83/45/4798f4d00df13eae3bfdf726c9244bcb495ab5bd588c0eed93a2f2dd67f3/mypy-1.18.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a431a6f1ef14cf8c144c6b14793a23ec4eae3db28277c358136e79d7d062f62d", size = 13338709, upload-time = "2025-09-19T00:11:03.358Z" }, - { url = "https://files.pythonhosted.org/packages/d7/09/479f7358d9625172521a87a9271ddd2441e1dab16a09708f056e97007207/mypy-1.18.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7ab28cc197f1dd77a67e1c6f35cd1f8e8b73ed2217e4fc005f9e6a504e46e7ba", size = 13529806, upload-time = "2025-09-19T00:10:26.073Z" }, - { url = "https://files.pythonhosted.org/packages/71/cf/ac0f2c7e9d0ea3c75cd99dff7aec1c9df4a1376537cb90e4c882267ee7e9/mypy-1.18.2-cp313-cp313-win_amd64.whl", hash = "sha256:0e2785a84b34a72ba55fb5daf079a1003a34c05b22238da94fcae2bbe46f3544", size = 9833262, upload-time = "2025-09-19T00:10:40.035Z" }, - { url = "https://files.pythonhosted.org/packages/5a/0c/7d5300883da16f0063ae53996358758b2a2df2a09c72a5061fa79a1f5006/mypy-1.18.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:62f0e1e988ad41c2a110edde6c398383a889d95b36b3e60bcf155f5164c4fdce", size = 12893775, upload-time = "2025-09-19T00:10:03.814Z" }, - { url = "https://files.pythonhosted.org/packages/50/df/2cffbf25737bdb236f60c973edf62e3e7b4ee1c25b6878629e88e2cde967/mypy-1.18.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:8795a039bab805ff0c1dfdb8cd3344642c2b99b8e439d057aba30850b8d3423d", size = 11936852, upload-time = "2025-09-19T00:10:51.631Z" }, - { url = "https://files.pythonhosted.org/packages/be/50/34059de13dd269227fb4a03be1faee6e2a4b04a2051c82ac0a0b5a773c9a/mypy-1.18.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6ca1e64b24a700ab5ce10133f7ccd956a04715463d30498e64ea8715236f9c9c", size = 12480242, upload-time = "2025-09-19T00:11:07.955Z" }, - { url = "https://files.pythonhosted.org/packages/5b/11/040983fad5132d85914c874a2836252bbc57832065548885b5bb5b0d4359/mypy-1.18.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d924eef3795cc89fecf6bedc6ed32b33ac13e8321344f6ddbf8ee89f706c05cb", size = 13326683, upload-time = "2025-09-19T00:09:55.572Z" }, - { url = "https://files.pythonhosted.org/packages/e9/ba/89b2901dd77414dd7a8c8729985832a5735053be15b744c18e4586e506ef/mypy-1.18.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:20c02215a080e3a2be3aa50506c67242df1c151eaba0dcbc1e4e557922a26075", size = 13514749, upload-time = "2025-09-19T00:10:44.827Z" }, - { url = "https://files.pythonhosted.org/packages/25/bc/cc98767cffd6b2928ba680f3e5bc969c4152bf7c2d83f92f5a504b92b0eb/mypy-1.18.2-cp314-cp314-win_amd64.whl", hash = "sha256:749b5f83198f1ca64345603118a6f01a4e99ad4bf9d103ddc5a3200cc4614adf", size = 9982959, upload-time = "2025-09-19T00:10:37.344Z" }, - { url = "https://files.pythonhosted.org/packages/87/e3/be76d87158ebafa0309946c4a73831974d4d6ab4f4ef40c3b53a385a66fd/mypy-1.18.2-py3-none-any.whl", hash = "sha256:22a1748707dd62b58d2ae53562ffc4d7f8bcc727e8ac7cbc69c053ddc874d47e", size = 2352367, upload-time = "2025-09-19T00:10:15.489Z" }, +sdist = { url = "https://files.pythonhosted.org/packages/34/4e/64300736cf0a0373a27b94a91b664ee7382e36f77b0621bae6381da3e180/mypy-2.4.0.tar.gz", hash = "sha256:77bdaebd452f43fcfc4cc3ba94352a3ea537cd01e3f2d0879f48673d2ec00d6e", size = 4064425, upload-time = "2026-10-01T20:40:39.229Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/26/67/e53965e67d23d48e78dd603aa7525a8d77e7818c23954cc217ccde5cd5c0/mypy-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5d20e6c7c35fcbf2a0ebdd0eaeacfbc243009dfd33ab7822d54e213912e6dbbd", size = 14315745, upload-time = "2026-10-01T20:39:25.03Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5d/a588ccd57625822d8484d7aff4e9c70f88d042a91c2ec84324a2bc14b3f3/mypy-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3011537be6cf1de4511c0255a324362a812b58184bbe61e15f59c8b31033bd74", size = 14465652, upload-time = "2026-10-01T20:38:57.19Z" }, + { url = "https://files.pythonhosted.org/packages/05/af/b4978a5566cb829ca563dc08e3ad8d944f116078786ad54ba3dff2bcb64d/mypy-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a96b07a49b7b1d025ce59c1b3acbcf24bead9a83da4523c4a6bde1bb94e7a0e1", size = 15419180, upload-time = "2026-10-01T20:40:27.808Z" }, + { url = "https://files.pythonhosted.org/packages/b2/8c/52c71f31c54d0a749d832cc73b933c6e38c52d9b270d5503e031c73723dc/mypy-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7c4f8f8d1d1c0e2832d8ee7113dd08f6df6c7aad9e863fcbed9f25832be0b8c4", size = 15669212, upload-time = "2026-10-01T20:39:20.443Z" }, + { url = "https://files.pythonhosted.org/packages/e8/55/ba63121494404fd7d3787ec176ccd02820d6ec125ac4e7c4c0b79f2cc6c7/mypy-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:ba05652540bf12828e52abae807b024b09ca144ff4f75e2450a81d69c376425b", size = 11299572, upload-time = "2026-10-01T20:40:03.627Z" }, + { url = "https://files.pythonhosted.org/packages/9c/9c/385c81b5c0d3a2917f077c4da660d0493f9521ccfd4b058e33b860f72d02/mypy-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:6306086b87cf7f8a29aa618d9fd9bffb56c59247166b9660fdb54d86d7714ecd", size = 10869751, upload-time = "2026-10-01T20:40:25.483Z" }, + { url = "https://files.pythonhosted.org/packages/68/ed/e5d7cf4017e74a1c1e1c4058ce8f614fc1e3e7606564f47166e22bfc9f95/mypy-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e05ff2925d8b37ad26c80c1b9dc43ae5d455da2df1e23c24c095a6425917c57e", size = 14378593, upload-time = "2026-10-01T20:38:48.222Z" }, + { url = "https://files.pythonhosted.org/packages/30/7d/12d994886a922f0f1997becc9c6625198d61eeb5962558a886af7dd38d54/mypy-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:29243242cf72582b65f9582ad9e56e8cb281566ed3519f4cd70bb8b9f2977e90", size = 14464697, upload-time = "2026-10-01T20:39:11.059Z" }, + { url = "https://files.pythonhosted.org/packages/f3/9e/bcc9af755425ad17790bf11d73c2ea7592914cf309ee1340997670f9d57a/mypy-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:29eb0b9427a6b11b992e452f6cceb8af724f4dceb47e779d0b35e405e996ea5e", size = 15552257, upload-time = "2026-10-01T20:39:56.269Z" }, + { url = "https://files.pythonhosted.org/packages/af/0c/3343fc4525d6f00d75ad17a93a9f052d5163641cb8911840d4a12cb59ff2/mypy-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e3ebe2f72a2a1156065a9851570ffbf50c0a93cdccadef9c6e05c508a4fd10b1", size = 15800443, upload-time = "2026-10-01T20:38:54.815Z" }, + { url = "https://files.pythonhosted.org/packages/8f/0e/69aac6b8159da7c53e6115a2be1bf48e85503402cadbf506dd708e8b2ad7/mypy-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:236e0d68f6941992b0811128e652590f590db444ab29ad8f1324765b9298b946", size = 11381574, upload-time = "2026-10-01T20:39:49.406Z" }, + { url = "https://files.pythonhosted.org/packages/6e/d3/d32ce4feb5993eec09d2024bef16cedc9b93701b1446b86092f08b24491b/mypy-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:82d0f94c8587ccb472622ee7795280aaa38a06640d5f45b3f16909d6dd86a989", size = 10944729, upload-time = "2026-10-01T20:40:15.203Z" }, + { url = "https://files.pythonhosted.org/packages/44/f2/eb15183c97c69d7cbfac990a6efd33a19ecfd97dab9e714c742fa78a784f/mypy-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7da85fbcff6dac1abcc636707bed38b45598131fb7a605d9719c70b5cc733af8", size = 14213395, upload-time = "2026-10-01T20:40:21.178Z" }, + { url = "https://files.pythonhosted.org/packages/8c/b5/ba91b6ff65e4d6b6ff53b2b3b3ac5f1babf0c7c27d0b43a0196b1c967926/mypy-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4209da39d85cf240f762af622d8180fcdfcb4727d021f44ade62d613a1a43324", size = 14373009, upload-time = "2026-10-01T20:39:58.86Z" }, + { url = "https://files.pythonhosted.org/packages/d5/c4/484275efc935c0003e55e4e8a33e4b8e99528ee956c12256ece4708f903f/mypy-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6be721bd4bd57576193653b75b4af3461c9d0bf7dd8b528f782e9be210dc75bb", size = 15465557, upload-time = "2026-10-01T20:39:01.794Z" }, + { url = "https://files.pythonhosted.org/packages/50/30/66eb6fdd0875e3c9025a02f0bb0ea2e524b74274b658c37fde0068c4939d/mypy-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e1fde197ae65be856a034a91b70ed747a16562ca69577785f06c661548424bf1", size = 15728673, upload-time = "2026-10-01T20:38:43.724Z" }, + { url = "https://files.pythonhosted.org/packages/58/bc/2aa98fd7f49c42dba8e9c065886fadffdd00f3c654cff3f2a7103a797ac8/mypy-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:295ecf2e57542cd836ca537486951289678c8c7d1ee6ad74ebe29b2168a003cf", size = 11389803, upload-time = "2026-10-01T20:39:37.547Z" }, + { url = "https://files.pythonhosted.org/packages/49/41/17b60df2d946792ef6af43b89351f5c9ddabc69053206b2304945572a744/mypy-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:bc378bdad4e9f12b5bd96466083d1e71acf00594ec9c7b2bdb5e02816f77f303", size = 10951060, upload-time = "2026-10-01T20:39:04.015Z" }, + { url = "https://files.pythonhosted.org/packages/e0/66/924be0b653372ed31ad5c48e26044cc00840e591943a56e61621cf05b60e/mypy-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:058165f564ccf559c68c70fec2091fca5891110480210c22594635e3f6683437", size = 14234230, upload-time = "2026-10-01T20:39:44.535Z" }, + { url = "https://files.pythonhosted.org/packages/56/39/c4f176880a4177123576de6cec6309feea8f42fca2bf2f6584e88054f656/mypy-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9fa247e02b505a45a2775f69df38d360d197e3790bc60f717595db9eda358b6e", size = 14392944, upload-time = "2026-10-01T20:40:05.78Z" }, + { url = "https://files.pythonhosted.org/packages/bc/1c/26e16977e25ef2494a74f8ffc872a76ec2c3aa43c3156057cbdf88f352c5/mypy-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20e9a5cd875837520c43db98dea0b6d0c2197833d95c30127d8f570fb9b1f00b", size = 15441463, upload-time = "2026-10-01T20:40:32.412Z" }, + { url = "https://files.pythonhosted.org/packages/31/9c/9e4b049f0ecefbfd6817ca2a16eea55dd74a07950268edc6cffd29ccfe98/mypy-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9f03a7828cca2b0adcd6662aee8f2711ff8830e1027641fdea3ab0b787483566", size = 15705406, upload-time = "2026-10-01T20:40:34.844Z" }, + { url = "https://files.pythonhosted.org/packages/4a/5e/e861b5f6c5ef9ee6cd24683aed1edecf82a26dbd536049f9b7850b586267/mypy-2.4.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:9279488933040b638c0ab739084c0ca100efeea6db581bf5d7628d8e89de53fe", size = 7897523, upload-time = "2026-10-01T20:39:39.861Z" }, + { url = "https://files.pythonhosted.org/packages/3a/87/61ffee58b25a956532a6006fae84918a2de849ed25f397492b2e815fe7b3/mypy-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:2106b55105ba5ea9be4f53a24517fc5fa927ff1585edc9bc1a975abb72caef89", size = 11576345, upload-time = "2026-10-01T20:39:41.553Z" }, + { url = "https://files.pythonhosted.org/packages/a1/88/a331c20698971c2ce8d1c30f317fd61b5be13a85b1f053e12dfa22ac6568/mypy-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:528c8744b8b5e3ecb8774f86af38d2376216816e9908317ad055f3c9c2d74799", size = 11172062, upload-time = "2026-10-01T20:38:59.534Z" }, + { url = "https://files.pythonhosted.org/packages/47/c0/4f7daa73270dced8e86c6f4a911c68082d03a84e6c1ec9bd916028d66131/mypy-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0bb95cf34899e4619c61ab0a8667804e139e580b30d5df12af2102dfe44d0c97", size = 15711208, upload-time = "2026-10-01T20:39:30.597Z" }, + { url = "https://files.pythonhosted.org/packages/2f/05/f1afa303c678be24cf7a266d38fb24b3de4599a024c2f9ba0d5905a3efa3/mypy-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:86d616fe84c6eab8026f8c50ab5bcb90db780d2ccd233d971e34e92bede9b359", size = 15935442, upload-time = "2026-10-01T20:39:22.781Z" }, + { url = "https://files.pythonhosted.org/packages/9d/d6/6a1a45459b63716e0d035f4892a926d3054f0a8cbfa02551d228a9946083/mypy-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a3f86fd1313dd69d013e265f1fdcd12ea7a9d606f9875b2a3db946cd334555f3", size = 17240044, upload-time = "2026-10-01T20:39:32.95Z" }, + { url = "https://files.pythonhosted.org/packages/87/85/ae33bee66c13f98d421964d87bf0888be941063bc75c1204a4cf142cf1cc/mypy-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:720434d48542ecfe84d32d287b727569d3fc8f5769acd39051130e490a5c295c", size = 17545856, upload-time = "2026-10-01T20:39:08.827Z" }, + { url = "https://files.pythonhosted.org/packages/df/de/eeff209b65c3e267818d79333bb9f058da6e4e73761461bd94748a2eb628/mypy-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:a6e851b82c0661f69f1630fc16172c68787a6a9cf0991e7c6437d60976cdcd76", size = 12369342, upload-time = "2026-10-01T20:40:10.516Z" }, + { url = "https://files.pythonhosted.org/packages/2b/43/e62d8d5c1dd737aa248968302ff7d6eabf997c3301773ed8bcb64932ca77/mypy-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:3bd0e340f0ebe65c548210f53be3fd8192e83964760caf0c28bef368e68b0d37", size = 11849099, upload-time = "2026-10-01T20:39:51.834Z" }, + { url = "https://files.pythonhosted.org/packages/2e/5f/335b8980055118dc131355155883fb676bb2161a0d97e08658e479c776fb/mypy-2.4.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:afa89837d9be67e0cadfa33bca3bb7efdda98c3b07e74dc3b635ebfb1c8a926a", size = 14241302, upload-time = "2026-10-01T20:39:13.227Z" }, + { url = "https://files.pythonhosted.org/packages/18/37/1482fdc49332b145828912b15f16eee0c4ca70a8bce0f6514ece79b14680/mypy-2.4.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fb443e81057896132d3642d6be219e6efd158691ac7883e3ba8fcb469865f05d", size = 14408200, upload-time = "2026-10-01T20:38:52.576Z" }, + { url = "https://files.pythonhosted.org/packages/04/09/dce2e8f6c1b31053c430ef6963f6f7a38ccb49b90c5e01e37ed0129b7d5a/mypy-2.4.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7f38f57d344f8b6accb40e01c3d83cfc590498231724d16c07ffb7940f157818", size = 15444409, upload-time = "2026-10-01T20:39:18.1Z" }, + { url = "https://files.pythonhosted.org/packages/43/c5/91b68306da4cd280cb15be35dbb5ffc343cabd67c4b121b6625bf2d13177/mypy-2.4.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:e76172710bd4e5eeae061abfd68347e5264632e02778be61784671ae3a2132f5", size = 15731186, upload-time = "2026-10-01T20:40:23.426Z" }, + { url = "https://files.pythonhosted.org/packages/64/71/2d0340182a8f27352fb1e25531355951108b506097c433937e9eec452ffd/mypy-2.4.0-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:f83353e47ab520bf6fd4df8f5897d9fe081211f2fbc4b7d37736a3e3c166cbcf", size = 7897838, upload-time = "2026-10-01T20:38:50.779Z" }, + { url = "https://files.pythonhosted.org/packages/3e/08/32703c117e134c02efa2a82705bb40cee91eaedea10b6530e20eba651b1f/mypy-2.4.0-cp315-cp315-win_amd64.whl", hash = "sha256:970b221ed5842213d98e3c480c08f795ace4b1f81fb21e1b126bd0476bce1c34", size = 11575700, upload-time = "2026-10-01T20:39:53.982Z" }, + { url = "https://files.pythonhosted.org/packages/ab/08/08bb269feafdaad031046ee2d771528a64467e6a180f962afc28c4a3ccd8/mypy-2.4.0-cp315-cp315-win_arm64.whl", hash = "sha256:502b94b0b331f7dafe32fd6b151797ddbb4f32385b362e722c783a025e5954a3", size = 11172908, upload-time = "2026-10-01T20:40:12.91Z" }, + { url = "https://files.pythonhosted.org/packages/fb/3f/c5c92626006ca92c7686adfbece47fc6a0daa0e54753952a9ad13ce0561c/mypy-2.4.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:c9de622fd397495695d0598ddc789222bfcfec9d7c9ec3a1e385c855e3bc5e01", size = 15705970, upload-time = "2026-10-01T20:40:17.79Z" }, + { url = "https://files.pythonhosted.org/packages/10/f3/863365f7997a76a5a1dd42d7902ab05afa4124e8419089cbca1ce2554db1/mypy-2.4.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9f459f0b4f0596d9d51fe7716b404b35287b99e77da98a7af90a65dd5fd61141", size = 15942234, upload-time = "2026-10-01T20:40:37.243Z" }, + { url = "https://files.pythonhosted.org/packages/f6/30/2f45b1f425a2c95dbe1a3f4d076bfd42b76e9615dba5906230703b14e4eb/mypy-2.4.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f9b028548b3af480e2b1ed8df14ccaac86f99c9f600d1580770ab7ba3dcd40f0", size = 17218364, upload-time = "2026-10-01T20:39:06.497Z" }, + { url = "https://files.pythonhosted.org/packages/43/8b/5b2bbfc69e84800b78fa2dba16d995b003f93b573558e412c5490d6e6c37/mypy-2.4.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:cb734b2668c1f40d07ce093bbeb4407e9527c67901627b0e1679825be3f09975", size = 17557934, upload-time = "2026-10-01T20:38:46.077Z" }, + { url = "https://files.pythonhosted.org/packages/df/c0/1a5dc601c22041a7bbfe1ff71cf097fbbd4fb49930867c6789baf5102106/mypy-2.4.0-cp315-cp315t-win_amd64.whl", hash = "sha256:172e30b8fea631fe310f0c665477f52d9ea40bb4e99e0c81dc30118563b13710", size = 12350955, upload-time = "2026-10-01T20:40:01.52Z" }, + { url = "https://files.pythonhosted.org/packages/1c/bc/697e9e26fc2a86c094ad67ee1e419971b7f01ded66ee66231b09e9f3e12e/mypy-2.4.0-cp315-cp315t-win_arm64.whl", hash = "sha256:5786ef987b3767e51aaa53f20aec104c0252b42ecda7aef8e8b4cbae279b05c5", size = 11842738, upload-time = "2026-10-01T20:40:30.026Z" }, + { url = "https://files.pythonhosted.org/packages/81/12/46ae8670c98a3cd0286ca5645c2f918f8f6be65edfed81b916010619f668/mypy-2.4.0-py3-none-any.whl", hash = "sha256:d01c5d26a352acc6d5cf3128225477e1e8465e8d3029d4c345807fbf7f3cf093", size = 2800734, upload-time = "2026-10-01T20:39:26.837Z" }, ] [[package]] @@ -1746,188 +2882,457 @@ wheels = [ ] [[package]] -name = "mypy-protobuf" -version = "3.6.0" +name = "networkx" +version = "3.6.1" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "protobuf" }, - { name = "types-protobuf" }, +resolution-markers = [ + "python_full_version < '3.12'", ] -sdist = { url = "https://files.pythonhosted.org/packages/4d/6f/282d64d66bf48ce60e38a6560753f784e0f88ab245ac2fb5e93f701a36cd/mypy-protobuf-3.6.0.tar.gz", hash = "sha256:02f242eb3409f66889f2b1a3aa58356ec4d909cdd0f93115622e9e70366eca3c", size = 24445, upload-time = "2024-04-01T20:24:42.837Z" } +sdist = { url = "https://files.pythonhosted.org/packages/6a/51/63fe664f3908c97be9d2e4f1158eb633317598cfa6e1fc14af5383f17512/networkx-3.6.1.tar.gz", hash = "sha256:26b7c357accc0c8cde558ad486283728b65b6a95d85ee1cd66bafab4c8168509", size = 2517025, upload-time = "2025-12-08T17:02:39.908Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e8/73/d6b999782ae22f16971cc05378b3b33f6a89ede3b9619e8366aa23484bca/mypy_protobuf-3.6.0-py3-none-any.whl", hash = "sha256:56176e4d569070e7350ea620262478b49b7efceba4103d468448f1d21492fd6c", size = 16434, upload-time = "2024-04-01T20:24:40.583Z" }, + { url = "https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl", hash = "sha256:d47fbf302e7d9cbbb9e2555a0d267983d2aa476bac30e90dfbe5669bd57f3762", size = 2068504, upload-time = "2025-12-08T17:02:38.159Z" }, +] + +[[package]] +name = "networkx" +version = "3.7" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.15'", + "python_full_version == '3.14.*'", + "python_full_version == '3.13.*'", + "python_full_version == '3.12.*' and sys_platform == 'emscripten'", + "python_full_version == '3.12.*' and sys_platform != 'emscripten'", +] +sdist = { url = "https://files.pythonhosted.org/packages/dc/76/3af777226b63a5e64a6b36b1ec5855c14e2b94a37096d4760e595fc43511/networkx-3.7.tar.gz", hash = "sha256:fd77a511bd90f39f3d016351345b52cf5319b813bdca01de3f755d3cca62e96a", size = 1866482, upload-time = "2026-09-21T16:45:16.974Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/cd/fe58041e9011f307c490e3e17dd48cc516448f7c698a3f2d9d9d65d7e6a8/networkx-3.7-py3-none-any.whl", hash = "sha256:e3fd2c13a7814cee3746340d8d7f8598a67f16a58bf47fb7f8793fab6efca1b0", size = 2142205, upload-time = "2026-09-21T16:45:14.609Z" }, ] [[package]] name = "nexus-rpc" -version = "1.3.0" +version = "1.5.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/2e/f2/d54f5c03d8f4672ccc0875787a385f53dcb61f98a8ae594b5620e85b9cb3/nexus_rpc-1.3.0.tar.gz", hash = "sha256:e56d3b57b60d707ce7a72f83f23f106b86eca1043aa658e44582ab5ff30ab9ad", size = 75650, upload-time = "2025-12-08T22:59:13.002Z" } +sdist = { url = "https://files.pythonhosted.org/packages/25/e5/25be948c92492cfc8ac24a524ad8828fe0cb9f71f46a974d7a37f0794a26/nexus_rpc-1.5.0.tar.gz", hash = "sha256:be2d6934414677bc9dd8e571fb5106c22b8769edc19562c3f49d9988edd24e1c", size = 97404, upload-time = "2026-10-28T17:12:21.82Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d6/74/0afd841de3199c148146c1d43b4bfb5605b2f1dc4c9a9087fe395091ea5a/nexus_rpc-1.3.0-py3-none-any.whl", hash = "sha256:aee0707b4861b22d8124ecb3f27d62dafbe8777dc50c66c91e49c006f971b92d", size = 28873, upload-time = "2025-12-08T22:59:12.024Z" }, + { url = "https://files.pythonhosted.org/packages/33/e2/00541e7997f3dfb294f7be3dafea3307ea09b9d3fd332054fe4d30627efc/nexus_rpc-1.5.0-py3-none-any.whl", hash = "sha256:5d6e856972be812573948df02da2257344c407a8eaa99977b5d38be54448305a", size = 30406, upload-time = "2026-10-28T17:12:20.245Z" }, ] [[package]] name = "nh3" -version = "0.3.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/cf/a6/c6e942fc8dcadab08645f57a6d01d63e97114a30ded5f269dc58e05d4741/nh3-0.3.1.tar.gz", hash = "sha256:6a854480058683d60bdc7f0456105092dae17bef1f300642856d74bd4201da93", size = 18590, upload-time = "2025-10-07T03:27:58.217Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9c/24/4becaa61e066ff694c37627f5ef7528901115ffa17f7a6693c40da52accd/nh3-0.3.1-cp313-cp313t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:80dc7563a2a3b980e44b221f69848e3645bbf163ab53e3d1add4f47b26120355", size = 1420887, upload-time = "2025-10-07T03:27:25.654Z" }, - { url = "https://files.pythonhosted.org/packages/94/49/16a6ec9098bb9bdf0fb9f09d6464865a3a48858d8d96e779a998ec3bdce0/nh3-0.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f600ad86114df21efc4a3592faa6b1d099c0eebc7e018efebb1c133376097da", size = 791700, upload-time = "2025-10-07T03:27:27.041Z" }, - { url = "https://files.pythonhosted.org/packages/1d/cc/1c024d7c23ad031dfe82ad59581736abcc403b006abb0d2785bffa768b54/nh3-0.3.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:669a908706cd28203d9cfce2f567575686e364a1bc6074d413d88d456066f743", size = 830225, upload-time = "2025-10-07T03:27:28.315Z" }, - { url = "https://files.pythonhosted.org/packages/89/08/4a87f9212373bd77bba01c1fd515220e0d263316f448d9c8e4b09732a645/nh3-0.3.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a5721f59afa0ab3dcaa0d47e58af33a5fcd254882e1900ee4a8968692a40f79d", size = 999112, upload-time = "2025-10-07T03:27:29.782Z" }, - { url = "https://files.pythonhosted.org/packages/19/cf/94783911eb966881a440ba9641944c27152662a253c917a794a368b92a3c/nh3-0.3.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:2cb6d9e192fbe0d451c7cb1350dadedbeae286207dbf101a28210193d019752e", size = 1070424, upload-time = "2025-10-07T03:27:31.2Z" }, - { url = "https://files.pythonhosted.org/packages/71/44/efb57b44e86a3de528561b49ed53803e5d42cd0441dcfd29b89422160266/nh3-0.3.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:474b176124c1b495ccfa1c20f61b7eb83ead5ecccb79ab29f602c148e8378489", size = 996129, upload-time = "2025-10-07T03:27:32.595Z" }, - { url = "https://files.pythonhosted.org/packages/ee/d3/87c39ea076510e57ee99a27fa4c2335e9e5738172b3963ee7c744a32726c/nh3-0.3.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4a2434668f4eef4eab17c128e565ce6bea42113ce10c40b928e42c578d401800", size = 980310, upload-time = "2025-10-07T03:27:34.282Z" }, - { url = "https://files.pythonhosted.org/packages/bc/30/00cfbd2a4d268e8d3bda9d1542ba4f7a20fbed37ad1e8e51beeee3f6fdae/nh3-0.3.1-cp313-cp313t-win32.whl", hash = "sha256:0f454ba4c6aabafcaae964ae6f0a96cecef970216a57335fabd229a265fbe007", size = 584439, upload-time = "2025-10-07T03:27:36.103Z" }, - { url = "https://files.pythonhosted.org/packages/80/fa/39d27a62a2f39eb88c2bd50d9fee365a3645e456f3ec483c945a49c74f47/nh3-0.3.1-cp313-cp313t-win_amd64.whl", hash = "sha256:22b9e9c9eda497b02b7273b79f7d29e1f1170d2b741624c1b8c566aef28b1f48", size = 592388, upload-time = "2025-10-07T03:27:37.075Z" }, - { url = "https://files.pythonhosted.org/packages/7c/39/7df1c4ee13ef65ee06255df8101141793e97b4326e8509afbce5deada2b5/nh3-0.3.1-cp313-cp313t-win_arm64.whl", hash = "sha256:42e426f36e167ed29669b77ae3c4b9e185e4a1b130a86d7c3249194738a1d7b2", size = 579337, upload-time = "2025-10-07T03:27:38.055Z" }, - { url = "https://files.pythonhosted.org/packages/e1/28/a387fed70438d2810c8ac866e7b24bf1a5b6f30ae65316dfe4de191afa52/nh3-0.3.1-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:1de5c1a35bed19a1b1286bab3c3abfe42e990a8a6c4ce9bb9ab4bde49107ea3b", size = 1433666, upload-time = "2025-10-07T03:27:39.118Z" }, - { url = "https://files.pythonhosted.org/packages/c7/f9/500310c1f19cc80770a81aac3c94a0c6b4acdd46489e34019173b2b15a50/nh3-0.3.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eaba26591867f697cffdbc539faddeb1d75a36273f5bfe957eb421d3f87d7da1", size = 819897, upload-time = "2025-10-07T03:27:40.488Z" }, - { url = "https://files.pythonhosted.org/packages/d0/d4/ebb0965d767cba943793fa8f7b59d7f141bd322c86387a5e9485ad49754a/nh3-0.3.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:489ca5ecd58555c2865701e65f614b17555179e71ecc76d483b6f3886b813a9b", size = 803562, upload-time = "2025-10-07T03:27:41.86Z" }, - { url = "https://files.pythonhosted.org/packages/0a/9c/df037a13f0513283ecee1cf99f723b18e5f87f20e480582466b1f8e3a7db/nh3-0.3.1-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:5a25662b392b06f251da6004a1f8a828dca7f429cd94ac07d8a98ba94d644438", size = 1050854, upload-time = "2025-10-07T03:27:43.29Z" }, - { url = "https://files.pythonhosted.org/packages/d0/9d/488fce56029de430e30380ec21f29cfaddaf0774f63b6aa2bf094c8b4c27/nh3-0.3.1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38b4872499ab15b17c5c6e9f091143d070d75ddad4a4d1ce388d043ca556629c", size = 1002152, upload-time = "2025-10-07T03:27:44.358Z" }, - { url = "https://files.pythonhosted.org/packages/da/4a/24b0118de34d34093bf03acdeca3a9556f8631d4028814a72b9cc5216382/nh3-0.3.1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48425995d37880281b467f7cf2b3218c1f4750c55bcb1ff4f47f2320a2bb159c", size = 912333, upload-time = "2025-10-07T03:27:45.757Z" }, - { url = "https://files.pythonhosted.org/packages/11/0e/16b3886858b3953ef836dea25b951f3ab0c5b5a431da03f675c0e999afb8/nh3-0.3.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94292dd1bd2a2e142fa5bb94c0ee1d84433a5d9034640710132da7e0376fca3a", size = 796945, upload-time = "2025-10-07T03:27:47.169Z" }, - { url = "https://files.pythonhosted.org/packages/87/bb/aac139cf6796f2e0fec026b07843cea36099864ec104f865e2d802a25a30/nh3-0.3.1-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:dd6d1be301123a9af3263739726eeeb208197e5e78fc4f522408c50de77a5354", size = 837257, upload-time = "2025-10-07T03:27:48.243Z" }, - { url = "https://files.pythonhosted.org/packages/f8/d7/1d770876a288a3f5369fd6c816363a5f9d3a071dba24889458fdeb4f7a49/nh3-0.3.1-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b74bbd047b361c0f21d827250c865ff0895684d9fcf85ea86131a78cfa0b835b", size = 1004142, upload-time = "2025-10-07T03:27:49.278Z" }, - { url = "https://files.pythonhosted.org/packages/31/2a/c4259e8b94c2f4ba10a7560e0889a6b7d2f70dce7f3e93f6153716aaae47/nh3-0.3.1-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:b222c05ae5139320da6caa1c5aed36dd0ee36e39831541d9b56e048a63b4d701", size = 1075896, upload-time = "2025-10-07T03:27:50.527Z" }, - { url = "https://files.pythonhosted.org/packages/59/06/b15ba9fea4773741acb3382dcf982f81e55f6053e8a6e72a97ac91928b1d/nh3-0.3.1-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:b0d6c834d3c07366ecbdcecc1f4804c5ce0a77fa52ee4653a2a26d2d909980ea", size = 1003235, upload-time = "2025-10-07T03:27:51.673Z" }, - { url = "https://files.pythonhosted.org/packages/1d/13/74707f99221bbe0392d18611b51125d45f8bd5c6be077ef85575eb7a38b1/nh3-0.3.1-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:670f18b09f75c86c3865f79543bf5acd4bbe2a5a4475672eef2399dd8cdb69d2", size = 987308, upload-time = "2025-10-07T03:27:53.003Z" }, - { url = "https://files.pythonhosted.org/packages/ee/81/24bf41a5ce7648d7e954de40391bb1bcc4b7731214238c7138c2420f962c/nh3-0.3.1-cp38-abi3-win32.whl", hash = "sha256:d7431b2a39431017f19cd03144005b6c014201b3e73927c05eab6ca37bb1d98c", size = 591695, upload-time = "2025-10-07T03:27:54.43Z" }, - { url = "https://files.pythonhosted.org/packages/a5/ca/263eb96b6d32c61a92c1e5480b7f599b60db7d7fbbc0d944be7532d0ac42/nh3-0.3.1-cp38-abi3-win_amd64.whl", hash = "sha256:c0acef923a1c3a2df3ee5825ea79c149b6748c6449781c53ab6923dc75e87d26", size = 600564, upload-time = "2025-10-07T03:27:55.966Z" }, - { url = "https://files.pythonhosted.org/packages/34/67/d5e07efd38194f52b59b8af25a029b46c0643e9af68204ee263022924c27/nh3-0.3.1-cp38-abi3-win_arm64.whl", hash = "sha256:a3e810a92fb192373204456cac2834694440af73d749565b4348e30235da7f0b", size = 586369, upload-time = "2025-10-07T03:27:57.234Z" }, +version = "0.3.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/18/2f/022b27146d52d24b1b353b003359134788ecbcd6fcdf6283adbd57c0fbc8/nh3-0.3.7.tar.gz", hash = "sha256:71860d01c16f4d8c72e334e0674beb2b0899dbd0bf760de18932ef4390303848", size = 25662, upload-time = "2026-08-23T14:26:30.728Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ce/88/b594f0e86856b37e182fb663283da419eea6424972506e640e890885467f/nh3-0.3.7-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:91a4dab4e94d9fc54b9f67b1adfb23e81fab7ab43f33c3b8c97be9aa38f789ba", size = 1471147, upload-time = "2026-08-23T14:25:55.259Z" }, + { url = "https://files.pythonhosted.org/packages/1e/60/847a21339f095c4d4c655af31fa2d18b174585bcc210709facacc7ce205c/nh3-0.3.7-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eae64328e46a25785535afcb6885b6f182ecaf5ee8c88f8c075422db8aacc65b", size = 820463, upload-time = "2026-08-23T14:25:56.803Z" }, + { url = "https://files.pythonhosted.org/packages/7b/7f/1a103e00aaf5e59f2dee4c2709aac609bb2d4bb74fddaf0dcfade11ed87b/nh3-0.3.7-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4968fe8d2db97c6f047659bf46a449fd8ec377f44ebf3e0a1b96c0d3a333ae32", size = 861456, upload-time = "2026-08-23T14:25:58.087Z" }, + { url = "https://files.pythonhosted.org/packages/d8/4a/e9c436089a0c80b928011ead0efd156aa7639a19b6064ef58dcedcab8369/nh3-0.3.7-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:be53a4825585f701955cb9baf49f478f56eb81e20294329fe4bc689dd5dd81fa", size = 1023930, upload-time = "2026-08-23T14:25:59.465Z" }, + { url = "https://files.pythonhosted.org/packages/04/5c/aa1468e3e281e78d2b3b7d762ccba59f681af355e971dbd255d5903f7b86/nh3-0.3.7-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:94fd6e59553fbb9ffd8ba71bbd5a54e3126ba01799a097ae30d5341d750bc6ac", size = 1102614, upload-time = "2026-08-23T14:26:00.869Z" }, + { url = "https://files.pythonhosted.org/packages/6a/9f/57d186d9d3dd38905dc12dddb3484406cdf6aa0b1ce33639a2d277d4ee1c/nh3-0.3.7-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:18f4278ecd157d43cb35acd5aae9f35cfa79f546b4922bd86536adc0f6312102", size = 1059915, upload-time = "2026-08-23T14:26:02.388Z" }, + { url = "https://files.pythonhosted.org/packages/6b/53/097a5ad0b34b15d67a472ef849165a54209fa5fbd3e639801c6fe439ba28/nh3-0.3.7-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:808def0c8c07843e6e50dc84f532457bfa2cfd17417b219a5d9e7c773709331a", size = 1047402, upload-time = "2026-08-23T14:26:03.897Z" }, + { url = "https://files.pythonhosted.org/packages/9a/a7/c57a2c70534418310889a65ccfac3525e62f0bc0a8613225903403755ce7/nh3-0.3.7-cp314-cp314t-win32.whl", hash = "sha256:874b7d67a067bd29a59223f6270fc30da4edd8e6d87fd219fc93bcbaa662c946", size = 619895, upload-time = "2026-08-23T14:26:05.105Z" }, + { url = "https://files.pythonhosted.org/packages/e6/b7/efda1d0a611d940bdfde6893bde1ea6b7b7d48c31273aea48e35b822fd58/nh3-0.3.7-cp314-cp314t-win_amd64.whl", hash = "sha256:614dac4a4c36ad084e78447d16fe898dedd762e354a7ab9cda2984e82f67883d", size = 633456, upload-time = "2026-08-23T14:26:06.661Z" }, + { url = "https://files.pythonhosted.org/packages/1d/18/3ab564595cb88196f50d26e163ed0fd2acc731ab26ac615df91981885887/nh3-0.3.7-cp314-cp314t-win_arm64.whl", hash = "sha256:157ec1eb7a62f3d9a7badb8d82d89aa810e3e24e097eedfa481a25d0c8a99877", size = 611003, upload-time = "2026-08-23T14:26:07.813Z" }, + { url = "https://files.pythonhosted.org/packages/94/0d/c257754bf57f829f307aa226bbe136d3a1356b5a0d08324c7b6bd2a8aacd/nh3-0.3.7-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:6c3aa50eb26e9228238271db9f983cbc3b006dfbfeca2d4dc34c33ddc6ac5ea5", size = 1493959, upload-time = "2026-08-23T14:26:09.025Z" }, + { url = "https://files.pythonhosted.org/packages/07/42/a687e7091928806e514f89fa2666f25ec9bfe0a902fc4402b25e51ce408b/nh3-0.3.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f266d3f1b3647449923a8e406524632220dd5d8b647078dfe45b885d33d10479", size = 859615, upload-time = "2026-08-23T14:26:10.606Z" }, + { url = "https://files.pythonhosted.org/packages/85/05/b0e6bef633549a23347d5462aa288fcc42381e7918482062ca3cb456242a/nh3-0.3.7-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e8fd1ab205258b29254f72db377d99e2c96aa7653ef3b015ccab0420b094b506", size = 839872, upload-time = "2026-08-23T14:26:12.037Z" }, + { url = "https://files.pythonhosted.org/packages/17/40/2a0921d45b20828708bcb56887e47dcf8cae13818de5bf9a01308d348712/nh3-0.3.7-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:19f288c938ec6eef1f5d2c6cab47838e71fef8097e1c1233802be5a6230ba086", size = 1091325, upload-time = "2026-08-23T14:26:13.34Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d1/9d70e0e418a48280ec0ddc6c1b08b4b1136ebcc31a1625e57ff5c665fa51/nh3-0.3.7-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de2b2aab32ea303405debefdcfc58043d3e635fa3f67b9eb140d2b0e0c0d2563", size = 1042482, upload-time = "2026-08-23T14:26:14.667Z" }, + { url = "https://files.pythonhosted.org/packages/93/a7/02dd159d4e71f98607d8d4249cddb7561e77be1a8e4dec77d76e1b68fc99/nh3-0.3.7-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b7279d43323a25225df23576af6594a16693f61431170848b8b2ac21ad4f174", size = 946868, upload-time = "2026-08-23T14:26:16.094Z" }, + { url = "https://files.pythonhosted.org/packages/a6/ed/c5510c615dce55b6fcc364aa1838142f938beed64f5e4927490dfcaf4405/nh3-0.3.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70f5ac8626e899a4bab0ef74ca2f5bd602f49c7b739e6e5026b4afc6d63dac42", size = 832161, upload-time = "2026-08-23T14:26:17.272Z" }, + { url = "https://files.pythonhosted.org/packages/7b/e3/3212c1a5b5745245d7f18885207bbddb34c56075f34dd682bd539aad55cc/nh3-0.3.7-cp38-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:5ffdfcb9a686ffb12765376bcfb6b5b55728516d3c0ee317d29982381ded3df8", size = 849791, upload-time = "2026-08-23T14:26:18.498Z" }, + { url = "https://files.pythonhosted.org/packages/20/64/9e36594efad6c290de4240d02cb2bd80c339a4ab1c4de66e599ffa6d9d81/nh3-0.3.7-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bc42bb1193c1e28a1e74c2cabaca178e118a7103e8832699fef8a2b3e2496493", size = 875473, upload-time = "2026-08-23T14:26:19.908Z" }, + { url = "https://files.pythonhosted.org/packages/00/0c/1a8985fd43fea5530c0ac890b6f0b423770ee72f111b70b7a77f2dec243a/nh3-0.3.7-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d56e76bd3cadb09b6b0cef364850811663734b348a25f5f587a2819c495367bd", size = 1036463, upload-time = "2026-08-23T14:26:21.536Z" }, + { url = "https://files.pythonhosted.org/packages/b2/5d/891e533b716cf00df76ad0ba6485dcfd14d59a6430a3cc99057c4c04004e/nh3-0.3.7-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:fd4a70efb45d5372174f718878eb7a35c12677626a63b2f103b23b833457dcac", size = 1116029, upload-time = "2026-08-23T14:26:22.907Z" }, + { url = "https://files.pythonhosted.org/packages/42/e5/ae8c0782fce74fb6fcf7234bb3d4017f37ce181b4f9d29369eab21c50a04/nh3-0.3.7-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:15f5fbf090f5c88d61c820e1fc1fceecb6520cca9fe85649c06b57ef9dc9ff62", size = 1076589, upload-time = "2026-08-23T14:26:24.302Z" }, + { url = "https://files.pythonhosted.org/packages/26/a4/c3423351e8d864ad756e85e15f0c01433361f14d34e4ed156482c0518f2a/nh3-0.3.7-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6698a822132beedab80f131c08d8d0ac5a178ddeb488d02ca4b67716ecfac7af", size = 1058871, upload-time = "2026-08-23T14:26:25.674Z" }, + { url = "https://files.pythonhosted.org/packages/4b/6a/478f153f1d7c0baaa3d1e8bb5fdcee3a6235f90fe44ea969a9d4e2b8c47a/nh3-0.3.7-cp38-abi3-win32.whl", hash = "sha256:6e4280115d44c3b278eef712a86748c1a723105cd79feec46952383117ab4e59", size = 630729, upload-time = "2026-08-23T14:26:26.932Z" }, + { url = "https://files.pythonhosted.org/packages/b4/b9/34433ccb1f0fe6968dabbb7d4bf5721c6221878ef07832748c06655a6a80/nh3-0.3.7-cp38-abi3-win_amd64.whl", hash = "sha256:618e3059caf41ccdf5dcccb3fa9df4cf6e4efe23d1382a8bbfca272a8a4f8bfc", size = 644462, upload-time = "2026-08-23T14:26:28.294Z" }, + { url = "https://files.pythonhosted.org/packages/f9/70/e140dffff6e808dc6343598df76e7e2407fd0f581de3524c75fba2e0cf24/nh3-0.3.7-cp38-abi3-win_arm64.whl", hash = "sha256:f04b7d333b27f13ca439da3cf1c75c2fba34f104969f6ce4ac8e7079699c2f4a", size = 621867, upload-time = "2026-08-23T14:26:29.547Z" }, ] [[package]] name = "nodeenv" -version = "1.9.1" +version = "1.11.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437, upload-time = "2024-06-04T18:44:11.171Z" } +sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/105de02c1322cfada6d9710d9146ef8026419d433c9d08359a2d35805811/nodeenv-1.11.0.tar.gz", hash = "sha256:3ce8fe5b71d16e8af7039ca65257354100bc772965d6bc549070649e53b1b146", size = 99301, upload-time = "2026-09-26T11:29:21.367Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload-time = "2024-06-04T18:44:08.352Z" }, + { url = "https://files.pythonhosted.org/packages/54/c8/12811c9b48fde162bb72b6f2e78fada9a247a09d7bb5be2050a5d099c77b/nodeenv-1.11.0-py2.py3-none-any.whl", hash = "sha256:edaa16e6c14d7cf395d75d4bbd5a26390f4dc06501a33b4e76282b02cc688a25", size = 34277, upload-time = "2026-09-26T11:29:19.933Z" }, +] + +[[package]] +name = "nodejs-wheel-binaries" +version = "24.19.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c0/76/7e97195e14346598565a0de4ca8bdbd5e634b3fb5b1ba590b7b1b89f8a63/nodejs_wheel_binaries-24.19.0.tar.gz", hash = "sha256:db217eef8cab8551667863379b08db4d9067403f6cbbe87481eb40edceb8aa9b", size = 8058, upload-time = "2026-08-19T21:47:19.671Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8c/52/0774b52c7be8151ad9d5aff44edc100c3f13d6d8eb3765f63ffa40e69fe8/nodejs_wheel_binaries-24.19.0-py2.py3-none-macosx_13_0_arm64.whl", hash = "sha256:e12cbfd69089504e42fb14194ce734a9dcf3eb38c820ca63dd511d36fb964e9c", size = 56047203, upload-time = "2026-08-19T21:46:43.448Z" }, + { url = "https://files.pythonhosted.org/packages/67/3a/4fdbbfecf2c23d52c0e3f68de7f7c1b3c97a26d328c69c5f6c49c48e340e/nodejs_wheel_binaries-24.19.0-py2.py3-none-macosx_13_0_x86_64.whl", hash = "sha256:1c890adf4b7e6556ccc1ca66c866bb81884b6c9a581dee4e530dc7f78fb9d514", size = 56219459, upload-time = "2026-08-19T21:46:48.45Z" }, + { url = "https://files.pythonhosted.org/packages/5f/a8/0147149415195c59b8a72a594916bfb80d6be4d586f9fbfda313889e0efc/nodejs_wheel_binaries-24.19.0-py2.py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:4e029dadfae1295876063c96b236f673487e8c27379fe146c1e2250283520227", size = 60588256, upload-time = "2026-08-19T21:46:53.298Z" }, + { url = "https://files.pythonhosted.org/packages/f4/89/6631d0982353da1bb7bc00bb1988f702822c62b42634f57999ee53b5c337/nodejs_wheel_binaries-24.19.0-py2.py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:4196a947bcc883f2003ab101762d729f3e99b5e86b75bd09151563403e2eceb8", size = 61123607, upload-time = "2026-08-19T21:46:58.117Z" }, + { url = "https://files.pythonhosted.org/packages/32/a2/fa30f0841e4602995782e124359f9b910c7b481d98decf61ef0b2fc3ebfb/nodejs_wheel_binaries-24.19.0-py2.py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:352e048ab4dd35e7de5f338d1cc4fcbf77a0e93da30bf7336a8217ee246b31d7", size = 62632842, upload-time = "2026-08-19T21:47:03.42Z" }, + { url = "https://files.pythonhosted.org/packages/18/01/22d97ca72213f66cc386ee638db30c2e62757fdf761c6029074bced83d1c/nodejs_wheel_binaries-24.19.0-py2.py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:28d078b2ced9e2069516e652dc4b1380e7a1a7f2d3934eccd1611586d283ba4c", size = 63250653, upload-time = "2026-08-19T21:47:07.938Z" }, + { url = "https://files.pythonhosted.org/packages/88/d1/e3be8fa327a795bcaf7a19cd84299e338a7bce32ff0665fdce9cfa22573c/nodejs_wheel_binaries-24.19.0-py2.py3-none-win_amd64.whl", hash = "sha256:67e3abeb9c3830cae8c8487ae8a2af7cc27dfa75af06145cee5ca7d1857c81bd", size = 42448503, upload-time = "2026-08-19T21:47:12.093Z" }, + { url = "https://files.pythonhosted.org/packages/1d/37/34cf28ba1691a060174948a9927fe61091982d6048b2e403071a9acce443/nodejs_wheel_binaries-24.19.0-py2.py3-none-win_arm64.whl", hash = "sha256:d9074c665ea68b04e183d82482c86dc907d3a9bd15eb6cf85542cb785266bb36", size = 40090155, upload-time = "2026-08-19T21:47:16.032Z" }, ] [[package]] name = "openai" -version = "2.13.0" +version = "3.29.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, - { name = "distro" }, - { name = "httpx" }, + { name = "httpx2" }, { name = "jiter" }, { name = "pydantic" }, { name = "sniffio" }, - { name = "tqdm" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/0f/39/8e347e9fda125324d253084bb1b82407e5e3c7777a03dc398f79b2d95626/openai-2.13.0.tar.gz", hash = "sha256:9ff633b07a19469ec476b1e2b5b26c5ef700886524a7a72f65e6f0b5203142d5", size = 626583, upload-time = "2025-12-16T18:19:44.387Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/99/5f6206494a87edbaa67b35c5212a2cb5e6f414bee5efb0f0672c4704315a/openai-3.29.0.tar.gz", hash = "sha256:bc70a46d97b70ba64daedfcb3227f610a395f297ec68d39f735676190a92be94", size = 1828914, upload-time = "2026-10-11T17:39:41.895Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/bb/d5/eb52edff49d3d5ea116e225538c118699ddeb7c29fa17ec28af14bc10033/openai-2.13.0-py3-none-any.whl", hash = "sha256:746521065fed68df2f9c2d85613bb50844343ea81f60009b60e6a600c9352c79", size = 1066837, upload-time = "2025-12-16T18:19:43.124Z" }, + { url = "https://files.pythonhosted.org/packages/ef/9a/91285d01a9293d0b3d86167f9c7bd13f08c960d3fa365782751ce9bcbfb1/openai-3.29.0-py3-none-any.whl", hash = "sha256:860d3bad424c5d38cd9ba0a0a2050d558b58ce027596a39f9ccbc0f51a2090b7", size = 2173181, upload-time = "2026-10-11T17:39:39.493Z" }, ] [[package]] name = "openai-agents" -version = "0.6.3" +version = "0.22.3" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "griffe" }, + { name = "griffelib" }, + { name = "httpx2" }, { name = "mcp" }, { name = "openai" }, { name = "pydantic" }, + { name = "pyjwt" }, + { name = "python-multipart" }, { name = "requests" }, - { name = "types-requests" }, + { name = "starlette" }, { name = "typing-extensions" }, + { name = "urllib3" }, + { name = "websockets" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ac/0b/1bfc1f47708ce5500ad6b05ba8a0a789232ee6f5b9dd68938131c4674533/openai_agents-0.6.3.tar.gz", hash = "sha256:436479f201910cfc466893854b47d0f3acbf7b3bdafa95eedb590ed0d40393ef", size = 2016166, upload-time = "2025-12-11T18:07:47.823Z" } +sdist = { url = "https://files.pythonhosted.org/packages/88/2a/78734078b2d6c2132fab1c4c0ca223b4085b3c983c135a5bd7171c5d57ff/openai_agents-0.22.3.tar.gz", hash = "sha256:33c79a5da0c9cf8ace0019bb09e268338d9162a18edbb6c2ce12bc139917109e", size = 6584491, upload-time = "2026-09-17T22:20:44.87Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3e/06/d4bf0a8403ebc7d6b0fb2b45e41d6da6996b20f1dde1debffdac1b5ccb63/openai_agents-0.6.3-py3-none-any.whl", hash = "sha256:ada8b598f4db787939a62c8a291d07cbe68dae2d635955c44a0a0300746ee84f", size = 239015, upload-time = "2025-12-11T18:07:46.275Z" }, + { url = "https://files.pythonhosted.org/packages/f8/56/f5d32edb2e890a5dea9824cb76d179cef47c6a5ea8269d3559d092936106/openai_agents-0.22.3-py3-none-any.whl", hash = "sha256:41dec9e2e703db32a627bf0290f3721a6ca37405603a8cb654213356dbb8ee9d", size = 1149658, upload-time = "2026-09-17T22:20:42.768Z" }, ] -[package.optional-dependencies] -litellm = [ - { name = "litellm", marker = "python_full_version < '3.14'" }, +[[package]] +name = "openapi-schema-validator" +version = "0.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonschema" }, + { name = "jsonschema-specifications" }, + { name = "pydantic" }, + { name = "pydantic-settings" }, + { name = "referencing" }, + { name = "rfc3339-validator" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/98/e8/ab3f27dbca54ec645f7fab714b640907d5d36c2ebb07e87eebd30bd5c81b/openapi_schema_validator-0.9.0.tar.gz", hash = "sha256:b72db64315b89d21834cd3ffef37e3e6893bc876327be2d366e8424b1029afd3", size = 24686, upload-time = "2026-04-27T17:31:27.606Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/90/c0/5467967d95378b2cfce312e09cbd0c9ab64354a0922379b734f793edd04f/openapi_schema_validator-0.9.0-py3-none-any.whl", hash = "sha256:faa3bbe7c3aa8ca2087ad83f709dc3b7d920283153a570c03e24ea182558aa25", size = 19980, upload-time = "2026-04-27T17:31:25.965Z" }, +] + +[[package]] +name = "openapi-spec-validator" +version = "0.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonschema" }, + { name = "jsonschema-path" }, + { name = "lazy-object-proxy" }, + { name = "openapi-schema-validator" }, + { name = "pydantic" }, + { name = "pydantic-settings" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8f/d2/640b5149cd5688bc0ad1fdbb4df6a2f7b84a093c8d787c27d566132f8b8b/openapi_spec_validator-0.9.0.tar.gz", hash = "sha256:6d648cff6490ebb799dcfe273792f2941c050158854c721f086599d845da78b8", size = 1756839, upload-time = "2026-05-20T09:23:18.871Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/d8/321ff889330acca2e3097f3d4f80a40bcc41b6d34d302978ab32c449520b/openapi_spec_validator-0.9.0-py3-none-any.whl", hash = "sha256:222fecffc7714f6d0a6ad62c0e4b66cc2b7dbfafb7b93acfc6c308abbdb51af8", size = 50328, upload-time = "2026-05-20T09:23:17.017Z" }, ] [[package]] name = "opentelemetry-api" -version = "1.37.0" +version = "1.42.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "importlib-metadata" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/63/04/05040d7ce33a907a2a02257e601992f0cdf11c73b33f13c4492bf6c3d6d5/opentelemetry_api-1.37.0.tar.gz", hash = "sha256:540735b120355bd5112738ea53621f8d5edb35ebcd6fe21ada3ab1c61d1cd9a7", size = 64923, upload-time = "2025-09-11T10:29:01.662Z" } +sdist = { url = "https://files.pythonhosted.org/packages/b4/1c/125e1c936c0873796771b7f04f6c93b9f1bf5d424cea90fda94a99f61da8/opentelemetry_api-1.42.1.tar.gz", hash = "sha256:56c63bea9f77b62856be8c47600474acad853b2924b99b1687c4cb6297166716", size = 72296, upload-time = "2026-05-21T16:32:49.335Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a3/ca/9520cc1f3dfbbd03ac5903bbf55833e257bc64b1cf30fa8b0d6df374d821/opentelemetry_api-1.42.1-py3-none-any.whl", hash = "sha256:51a69edacadbc03a8950ace1c4c21099cacc538820ac2c9e36277e78cebba714", size = 61311, upload-time = "2026-05-21T16:32:28.822Z" }, +] + +[[package]] +name = "opentelemetry-exporter-otlp-proto-common" +version = "1.42.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "opentelemetry-proto" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0e/9c/216acfeaedadf2e1937f4373929b20f73197c5c4a2546d4f584b7fa63813/opentelemetry_exporter_otlp_proto_common-1.42.1.tar.gz", hash = "sha256:04f1f01fb597c4249dfcd7f8b861c902c2102369d376d9d346ff38de4469a2ee", size = 21433, upload-time = "2026-05-21T16:32:55.526Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d6/43/2375e7612e1121a4518c17603b6e0b03ad94f565aafad53f464dc5be2bf6/opentelemetry_exporter_otlp_proto_common-1.42.1-py3-none-any.whl", hash = "sha256:f48d395ab815b444da118868977e9798ea354c25737d5cf39578ae894011c140", size = 17327, upload-time = "2026-05-21T16:32:33.387Z" }, +] + +[[package]] +name = "opentelemetry-exporter-otlp-proto-grpc" +version = "1.42.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "googleapis-common-protos" }, + { name = "grpcio" }, + { name = "opentelemetry-api" }, + { name = "opentelemetry-exporter-otlp-proto-common" }, + { name = "opentelemetry-proto" }, + { name = "opentelemetry-sdk" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/87/87/ca7fc790dfdbcf4f9e9aab14a39ef1b7508ead13707e283de0b3131478d2/opentelemetry_exporter_otlp_proto_grpc-1.42.1.tar.gz", hash = "sha256:975c4461f167dd8ed8857d68d3b6b25f3d272eab896f6a9470d0f5b90e2faf15", size = 27140, upload-time = "2026-05-21T16:32:56.162Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/89/2b/28ba5b128f47fe8c3bab541000d6feb4b5a9bd26623ca013406f01c0fb60/opentelemetry_exporter_otlp_proto_grpc-1.42.1-py3-none-any.whl", hash = "sha256:0ae1177e2038b18a929b3098215243631ef91136cba26b7e2b12790ceb7e87cc", size = 19617, upload-time = "2026-05-21T16:32:34.278Z" }, +] + +[[package]] +name = "opentelemetry-instrumentation" +version = "0.63b1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "opentelemetry-api" }, + { name = "opentelemetry-semantic-conventions" }, + { name = "packaging" }, + { name = "wrapt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/da/6d/4de72d97ff54db1ed270c7a59c9b904b917c0ac7af429c086c388b824ddb/opentelemetry_instrumentation-0.63b1.tar.gz", hash = "sha256:32368d6ae52c8de20aa790a6ad86b10a76f09956092337ae37d675773990e541", size = 41081, upload-time = "2026-05-21T16:36:14.206Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/35/a1/9314e621c143e4d82a5bf7a43c2ff7a745d31023506336857607c8c543cc/opentelemetry_instrumentation-0.63b1-py3-none-any.whl", hash = "sha256:f1986716d52cc316ea5f60189098726a9071d8ecc0eee96c9ed110be08bade9c", size = 35577, upload-time = "2026-05-21T16:34:56.818Z" }, +] + +[[package]] +name = "opentelemetry-instrumentation-threading" +version = "0.63b1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "opentelemetry-api" }, + { name = "opentelemetry-instrumentation" }, + { name = "wrapt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d9/90/7b0279192fab614d57af3d57584ef7ac9e38fa3df0b1d412224f6f55a85b/opentelemetry_instrumentation_threading-0.63b1.tar.gz", hash = "sha256:afa8c2cada8ed136f07b04dc8739bc861a15e9a5edea1a65e4c5e1919c62946c", size = 9080, upload-time = "2026-05-21T16:36:49.977Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/91/48/28ed9e55dcf2f453128df738210a980e09f4e468a456fa3c763dbc8be70a/opentelemetry_api-1.37.0-py3-none-any.whl", hash = "sha256:accf2024d3e89faec14302213bc39550ec0f4095d1cf5ca688e1bfb1c8612f47", size = 65732, upload-time = "2025-09-11T10:28:41.826Z" }, + { url = "https://files.pythonhosted.org/packages/c9/3d/3a991a4fcdf5ac82c04215e38cea4e73ad63713707014f9a70d1ab257f5f/opentelemetry_instrumentation_threading-0.63b1-py3-none-any.whl", hash = "sha256:33059298e68c94b13c38b562ad28799ec16a2fd06182ebfc762bb4e956e55d94", size = 8486, upload-time = "2026-05-21T16:35:58.084Z" }, +] + +[[package]] +name = "opentelemetry-proto" +version = "1.42.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "protobuf" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b4/55/63eac3e1089b768ba014091fdd2ae8a9a440c821ef5e2b786909c94c8836/opentelemetry_proto-1.42.1.tar.gz", hash = "sha256:c6a51e6b4f05ae63565f3a113217f3d2bfaec68f78c02d7a6c85f9010d1cfca6", size = 45839, upload-time = "2026-05-21T16:33:03.937Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/41/9d/171c02c84a76940b7e601805b3bb536985aded9168fbcc9ba52f0a730fa2/opentelemetry_proto-1.42.1-py3-none-any.whl", hash = "sha256:dedb74cba2886c59c7789b227a7a670613025a07489040050aedff6e5c0fb43c", size = 71782, upload-time = "2026-05-21T16:32:44.867Z" }, ] [[package]] name = "opentelemetry-sdk" -version = "1.37.0" +version = "1.42.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "opentelemetry-api" }, { name = "opentelemetry-semantic-conventions" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f4/62/2e0ca80d7fe94f0b193135375da92c640d15fe81f636658d2acf373086bc/opentelemetry_sdk-1.37.0.tar.gz", hash = "sha256:cc8e089c10953ded765b5ab5669b198bbe0af1b3f89f1007d19acd32dc46dda5", size = 170404, upload-time = "2025-09-11T10:29:11.779Z" } +sdist = { url = "https://files.pythonhosted.org/packages/40/f7/b390bd9bfd703bf98a68fea1f27786c6872331fd617164a54b8a59bdc008/opentelemetry_sdk-1.42.1.tar.gz", hash = "sha256:8c834e8f8c9ba4171d4ec843d0cb8a67e4c7394d3f9e9297e582cbd9456ddbf7", size = 239262, upload-time = "2026-05-21T16:33:04.641Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/6b/4287766cfbde577ae2272e8884abac325aeaac0d64f41c61d5b8cc595105/opentelemetry_sdk-1.42.1-py3-none-any.whl", hash = "sha256:083cd4bbfaa5aa7b5a9e552430d9951219967cfb27aa61feb13a77aba1fc839d", size = 170907, upload-time = "2026-05-21T16:32:45.894Z" }, +] + +[[package]] +name = "opentelemetry-sdk-extension-aws" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "opentelemetry-sdk" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f5/b3/825c93fe4c238845f1356297abea33d03b2adaafb5ae98fc257b394de124/opentelemetry_sdk_extension_aws-2.1.0.tar.gz", hash = "sha256:ff68ddecc1910f62c019d22ec0f7461713ead7f662d6a2304d4089c1a0b20416", size = 16334, upload-time = "2024-12-24T15:01:57.387Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/02/61/47a6a43b7935d54b5734fbf3fb0357dd5a7d0dfaa9677b7318518fe8d507/opentelemetry_sdk_extension_aws-2.1.0-py3-none-any.whl", hash = "sha256:c7cf6efc275d2c24108a468d954287ce5aab9733bac816a080cfb3117374e63a", size = 18776, upload-time = "2024-12-24T15:01:56.053Z" }, +] + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.63b1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "opentelemetry-api" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/93/99/4d7dd6df64795951413ce6e815f8cf1eb191daf7196ae86574589643d5f3/opentelemetry_semantic_conventions-0.63b1.tar.gz", hash = "sha256:3daf963611334b365e98a57438183eb012d3bfb40b2d931a9af613476b8701a9", size = 148340, upload-time = "2026-05-21T16:33:05.455Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9f/62/9f4ad6a54126fb00f7ed4bb5034964c6e4f00fcd5a905e115bd22707e20d/opentelemetry_sdk-1.37.0-py3-none-any.whl", hash = "sha256:8f3c3c22063e52475c5dbced7209495c2c16723d016d39287dfc215d1771257c", size = 131941, upload-time = "2025-09-11T10:28:57.83Z" }, + { url = "https://files.pythonhosted.org/packages/cb/7a/7fe66f5f3682b1dd47d88cc4e11f1c6c0966b737de2d16671146e23c39a5/opentelemetry_semantic_conventions-0.63b1-py3-none-any.whl", hash = "sha256:dfe5ef4dee82586b746f522b818ceb298d00b3d59f660042bd79404bff8d0682", size = 203713, upload-time = "2026-05-21T16:32:47.016Z" }, +] + +[[package]] +name = "orjson" +version = "3.13.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f2/72/380b97dc45bd162d23afe5194721ef678d9eac7cfaa549fe2873f7f0a518/orjson-3.13.0.tar.gz", hash = "sha256:d1de5eb04485110c5da4c657e49168995d55e076b1ce60f1a042e254f4186c4f", size = 2732604, upload-time = "2026-10-07T14:09:25.719Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ce/a3/0be3b115907fea61ed340639fb0e1562cd18969bad5b3f486f808197aaff/orjson-3.13.0-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:948bad47f2e2e43527f14248364a0e5dee26dd3184691010ec4a1ebeb0fd6771", size = 223146, upload-time = "2026-10-07T14:08:06.474Z" }, + { url = "https://files.pythonhosted.org/packages/9e/f7/665935edb16163f8b764182e29a30cf056947a66893ed032191e5f01eb3d/orjson-3.13.0-cp311-cp311-macosx_15_0_arm64.whl", hash = "sha256:1807c2fa49d393c7ee95fd1ef1b39cbb24aa3ccd81f30b84503ba59407666960", size = 123546, upload-time = "2026-10-07T14:08:08.324Z" }, + { url = "https://files.pythonhosted.org/packages/67/ec/e7cde480c0e212594d17ba2b2bd210c002052e9147fc1a1aeafaabe722fb/orjson-3.13.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:637dbca1fccffe83780e806fbc0f17427c0c59bf822528eb0acc8f0aa9f19acb", size = 113290, upload-time = "2026-10-07T14:08:09.816Z" }, + { url = "https://files.pythonhosted.org/packages/36/59/4455fb11a297af73611dfc437f0f89456220227ed1cb1544a5a0ee9d6c03/orjson-3.13.0-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:554948becd1110123ef9f6a6e1310fd92b2d07d2cbac6dbf65df3de75702e736", size = 130342, upload-time = "2026-10-07T14:08:11.253Z" }, + { url = "https://files.pythonhosted.org/packages/ca/80/0eec5fbde2e52407646b4cb3118f63175bdcee1e2390c2759dc96e0bc62a/orjson-3.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9d9a101bd8dbfad112170f009cd155e52bb8c936468821a0d03cbb96c0e426", size = 129138, upload-time = "2026-10-07T14:08:12.814Z" }, + { url = "https://files.pythonhosted.org/packages/cd/cc/c0874f13819ae346d69ca00d074d464710b494abd4442bdebf75ac404a98/orjson-3.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89bcf2d4bc6c9a7e1763c8cf534f38712e66b76a0fefda7fb7785462f0d635e4", size = 130518, upload-time = "2026-10-07T14:08:14.392Z" }, + { url = "https://files.pythonhosted.org/packages/25/ab/140dd9adff84bf64b862c4fcfe2d055af6014d5ba03a075f95c9addb2ec7/orjson-3.13.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a79cdc4934fe81f593072c94e13da3095e9d41c2deef8f6ff2901794ca1c5042", size = 134924, upload-time = "2026-10-07T14:08:16.09Z" }, + { url = "https://files.pythonhosted.org/packages/08/0a/e8f6deb032b1d98a39043cf99b863d8b9e842e2ffc2d2067d2e2a88c18e4/orjson-3.13.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:50a5202ba388b3850ba24437951727d3aa6d79a21964a30ae8dc6a059a5fd34c", size = 126704, upload-time = "2026-10-07T14:08:17.439Z" }, + { url = "https://files.pythonhosted.org/packages/af/cf/be64b99ff75f7983488390d4ef5df72115119770eed295691c0a715d492a/orjson-3.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:a0377d6962fa431c93ecd78fdea771bb62ec545b24ee0c5d4e32acf2260af259", size = 121287, upload-time = "2026-10-07T14:08:18.843Z" }, + { url = "https://files.pythonhosted.org/packages/ca/ab/1b8ca186baf3420f12db1f2819fcc5f2cae69e4cf051168501726a64c0fa/orjson-3.13.0-cp311-cp311-win_arm64.whl", hash = "sha256:1d84820b2ec4ac975cba482214032de5b0dbdd17046170c98e642ef9c4a4ee4b", size = 126314, upload-time = "2026-10-07T14:08:20.452Z" }, + { url = "https://files.pythonhosted.org/packages/98/17/ed65f84ed5ed6a1e06eb628611b4172e7480fc4ad92594856751a6363cac/orjson-3.13.0-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:fb8644dc6d705e1269ed2842bf4dbe2b4e50d670de503bf79d5cef3a5148a4c7", size = 223063, upload-time = "2026-10-07T14:08:21.979Z" }, + { url = "https://files.pythonhosted.org/packages/6f/4d/9332eb96d2e379384be0f211f543835eebc81f460c9403b84abe1294c431/orjson-3.13.0-cp312-cp312-macosx_15_0_arm64.whl", hash = "sha256:6ff2a2c67f35202f7d823753d38ad371a9b7fc297567cdfff4420e763cb9f6f8", size = 123364, upload-time = "2026-10-07T14:08:24.026Z" }, + { url = "https://files.pythonhosted.org/packages/b4/06/558456b7da27e974a8c9ea09117b07119f6fa131cd62b8b9ecad9eea94e1/orjson-3.13.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:65c4e0e106ccc7265b488385659117a6805c37d042f737558ecd68aa0c67ad8f", size = 113199, upload-time = "2026-10-07T14:08:25.476Z" }, + { url = "https://files.pythonhosted.org/packages/b7/f2/1187a9c09965620348262ec0f406868f6d7c234b2e9b5ee51020bdde5748/orjson-3.13.0-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:fbbad6b9b1da43f25c1f5b20cd5a268e028a2fc95d5a8d1ade6059973bc71584", size = 130329, upload-time = "2026-10-07T14:08:26.877Z" }, + { url = "https://files.pythonhosted.org/packages/46/07/5d1a151bc11600434fe799e73abfc6a4d463d02e149a20e47c59d3a985ae/orjson-3.13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae1d895cf7bbfd50ef34bb63bb727b14514f259f3e3f8dd010783bd38e864c6e", size = 129072, upload-time = "2026-10-07T14:08:28.355Z" }, + { url = "https://files.pythonhosted.org/packages/ea/8c/bb07c368abbf4021c4cd01c12edb526e00090f7f750ff1b88da6e6b6c7a6/orjson-3.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bceadfd314bd238f584fc229a4bbaf0e573597e7a026dec5429fbf29fd66c641", size = 130612, upload-time = "2026-10-07T14:08:30.041Z" }, + { url = "https://files.pythonhosted.org/packages/d2/8d/4b66d19619ed344ac000ffea7c006477d0061d580646e736ef0e203759e8/orjson-3.13.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b74c30e56346aad067937d766846ee74c231d1d18aad3f324e9b9261de3b2d5e", size = 134632, upload-time = "2026-10-07T14:08:31.474Z" }, + { url = "https://files.pythonhosted.org/packages/ea/88/f8221f6593e37eb26ec4706e185b9ac6f38ff0c8f7bad5459844031ffd2d/orjson-3.13.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4329c19b8a25693f60a77b867c9d2a3ab637b20e36f5b7bea7f5acb492b44b15", size = 126807, upload-time = "2026-10-07T14:08:32.914Z" }, + { url = "https://files.pythonhosted.org/packages/58/9d/a1ca7321eeafd7d72e174cdc388cc96301f41516d863e7b1f64f0a1735be/orjson-3.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:b571236d8393edcd3236e07423f762bfcf571f852aad667a3bce9e7b755e0790", size = 121538, upload-time = "2026-10-07T14:08:34.325Z" }, + { url = "https://files.pythonhosted.org/packages/d0/a0/1f19b4779c910104370932fceb9ed436b47ac077f297db74008062525c04/orjson-3.13.0-cp312-cp312-win_arm64.whl", hash = "sha256:8594956a75223f657e1e68c568c0eeb3dd145f02cd6b78a47fd9a8095dbc4eae", size = 126259, upload-time = "2026-10-07T14:08:35.765Z" }, + { url = "https://files.pythonhosted.org/packages/a9/56/f8ad2546150168858c16915c452b00eecb79597597524d1ad6ae14ad4eab/orjson-3.13.0-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:64e8f345048d988c8b68d3882e5d41028fca1219a9939b32e4a77be34c8ae8e3", size = 222892, upload-time = "2026-10-07T14:08:37.495Z" }, + { url = "https://files.pythonhosted.org/packages/1f/19/725d23160b2471a3f27026c55bb79af34687652d8be8f5f583cee5dcd42f/orjson-3.13.0-cp313-cp313-macosx_15_0_arm64.whl", hash = "sha256:ded33b972cffdaf4ca0ac917338ab61d2bb10d68987dbcae641c313fbfdbf499", size = 123319, upload-time = "2026-10-07T14:08:38.989Z" }, + { url = "https://files.pythonhosted.org/packages/ac/08/e5d81a00b22c73dfcb60d80da3bd92d5a7684346593536565f184dbae3c9/orjson-3.13.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:45e34deb3437509f4ec9888dd9ee5dc426cfe21be10f1eb4ea3a9e4d33034f9e", size = 113196, upload-time = "2026-10-07T14:08:40.383Z" }, + { url = "https://files.pythonhosted.org/packages/67/78/fda6117c69a43e470b1e9dff38dd8c5f0bc6fd8a47e4d4561ab023039335/orjson-3.13.0-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:9825b954155b345c4759f24e5f8d652b9aec2261bb5d4e1abe06bba0a1200535", size = 130245, upload-time = "2026-10-07T14:08:41.878Z" }, + { url = "https://files.pythonhosted.org/packages/6d/31/d0cfebd456defb234414795ae7599696bf124843dfe077d0c9ece0c93554/orjson-3.13.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b081f0e7b600ff24513dec4ca75507fa05e904607847e386e8310d5b7b96b6c7", size = 128981, upload-time = "2026-10-07T14:08:43.716Z" }, + { url = "https://files.pythonhosted.org/packages/45/46/f8d83189ff5b7b2ff225a58c5908618cc4e86afe09e65d17a30ac68c9da4/orjson-3.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cbed5f4c4b88d94bcc36115f4c3bb3aa25da1563a5c3328aa3acebce2b083040", size = 130370, upload-time = "2026-10-07T14:08:45.132Z" }, + { url = "https://files.pythonhosted.org/packages/e6/6a/d6344c305003ea826b3fa0482645a897a3cd6d477ed74e1fe15d3322cb23/orjson-3.13.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e9b61676116f755126b90e740a9cff36b91562f47ec330056cc88cc3b9f02f4b", size = 134595, upload-time = "2026-10-07T14:08:46.63Z" }, + { url = "https://files.pythonhosted.org/packages/9f/52/d73fa44f88d53e02d10de1cf77c16ed13204ff5bca47e1692da6b406619c/orjson-3.13.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3ef75ed7e81dae34a3649f82df52cd85f9ac839a7d6ec78ab355b33b3b27ef7f", size = 126513, upload-time = "2026-10-07T14:08:48.111Z" }, + { url = "https://files.pythonhosted.org/packages/fb/f8/bcfc50b4ab851c4f9c0ee62f52bf3b28f0bcd0d9fe08e0ad98d4585148db/orjson-3.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:4ee06e53b998c71ce3eb93b86222912fdd9dcced685ac64d4525d36fac338ea4", size = 121371, upload-time = "2026-10-07T14:08:49.549Z" }, + { url = "https://files.pythonhosted.org/packages/7b/7a/d6927845712ec2b1e89263cd12d7203531db185dbad67f914226f2fca156/orjson-3.13.0-cp313-cp313-win_arm64.whl", hash = "sha256:89efecad02515df7f318d0613b5dfd6d2a1acd323a2b8294712789a715945525", size = 126134, upload-time = "2026-10-07T14:08:51.118Z" }, + { url = "https://files.pythonhosted.org/packages/f0/10/98b5a3cdc086abf78d8cd20bb0cba124485d4b6a745722197bd209d967a5/orjson-3.13.0-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:a7bfc7db961c7d96cb75889dc6a1e4ae1e91d87ee61da564f582bd742b8dfeef", size = 222889, upload-time = "2026-10-07T14:08:52.673Z" }, + { url = "https://files.pythonhosted.org/packages/22/7c/7728c5280ab5202f4891ff4b0b96e2e1dbd5520dfee53edf083c54409a64/orjson-3.13.0-cp314-cp314-macosx_15_0_arm64.whl", hash = "sha256:91d933e668ff0ffe164d7c2daec36beba6d1ce7fadb71538fbe142a71f8a1e6e", size = 123312, upload-time = "2026-10-07T14:08:54.25Z" }, + { url = "https://files.pythonhosted.org/packages/a9/a5/d9a44321e6f66c0f64b45be587395f87ad94cb447bce7d92286f6b97d46a/orjson-3.13.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:6c8bfe728b81b0fd58a3c7f3f9c5a113f87f2992c9948e0f28707aafd737c0bc", size = 113146, upload-time = "2026-10-07T14:08:55.803Z" }, + { url = "https://files.pythonhosted.org/packages/80/da/d95c80d413f288feb471e16d82e5c1512d2439728e3bac917d058c31f098/orjson-3.13.0-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:e8e05549f3b30f9d8a8e28c5aba11cc2a4b90b90961ec685ca58444b0815fc09", size = 130348, upload-time = "2026-10-07T14:08:57.31Z" }, + { url = "https://files.pythonhosted.org/packages/04/0f/36fdfb32ad1852997bac00e3ce52c7888d8a1094ba9dcdcbb22fcc6b953a/orjson-3.13.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c749ab3ac30b5ab1ffb7677f8b92eacfdfdc5260210baa398f845bc3714c05d8", size = 128971, upload-time = "2026-10-07T14:08:58.843Z" }, + { url = "https://files.pythonhosted.org/packages/25/de/a82acf93bdcca0c79ccff25ef0c6868d24ccbc2e72f21fae39c8cabce4f1/orjson-3.13.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58a9619d88f8818d9ab6b39d70d203789457ba13c1ed5d274f33ce9ae7e81a36", size = 130359, upload-time = "2026-10-07T14:09:00.412Z" }, + { url = "https://files.pythonhosted.org/packages/71/ca/2bc4f7697cb9f6897bf61aca11803df096a5d971bf69ef5538b243bb1fa8/orjson-3.13.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2715c4808d1571029ed18fd07a82140bf3ba7def0dc89f8d015c416e3649bf87", size = 134583, upload-time = "2026-10-07T14:09:02.047Z" }, + { url = "https://files.pythonhosted.org/packages/23/b3/12b1af9b87ff9fa0aaf4e5724c87672b30bb5de76f275f7fac64e8219c1b/orjson-3.13.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:08bf722f923d2100bc5e5a5dcf72c656db557049c1bea26582fdd5dd9d5395a1", size = 126500, upload-time = "2026-10-07T14:09:03.863Z" }, + { url = "https://files.pythonhosted.org/packages/ad/ea/cf257fc8a7f4b18f5677c22b3a9673a1b51d4b7161f25177ed389b76560e/orjson-3.13.0-cp314-cp314-win_amd64.whl", hash = "sha256:6adcaa85d79977659a448b4123a88eb33511a11ed2db243535ad7ea88a6668e0", size = 121378, upload-time = "2026-10-07T14:09:05.375Z" }, + { url = "https://files.pythonhosted.org/packages/05/0a/9f4643f849e9918eab11983b83928af3aac14bedb04002e28e885ee1936f/orjson-3.13.0-cp314-cp314-win_arm64.whl", hash = "sha256:83705c12b4afde10c62a5dd3fe6fdb21b7900bd0dcd5af1c85612ae94d0ee590", size = 126123, upload-time = "2026-10-07T14:09:07.085Z" }, + { url = "https://files.pythonhosted.org/packages/8c/15/d265f2b556c0c7c0b30ea830316d6e5af5b85dde08f234a1ebed60fab386/orjson-3.13.0-cp315-cp315-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:5ef4d4157392a0439b74f7e49e5636b4ea43d9616bd0884effc0195fffcaa2d5", size = 223305, upload-time = "2026-10-07T14:09:08.84Z" }, + { url = "https://files.pythonhosted.org/packages/0c/97/781be8b80a33b8171b3f5acea941af47182c8b4b5827c2b7c3fea706f21c/orjson-3.13.0-cp315-cp315-macosx_15_0_arm64.whl", hash = "sha256:84d87e322e1674408f85adea63f11aa19201eba082755aec20ebc217f493bbd2", size = 123515, upload-time = "2026-10-07T14:09:10.792Z" }, + { url = "https://files.pythonhosted.org/packages/20/68/011bb98fa7da7b430b363db1bb7ef9160c438fc5c43e7468fb593c220037/orjson-3.13.0-cp315-cp315-manylinux_2_39_aarch64.whl", hash = "sha256:8c2ac5c09b017c484df1b4c68b2cf250b4e8ba08204cb58e7cd6cbbc71a9c902", size = 129222, upload-time = "2026-10-07T14:09:12.542Z" }, + { url = "https://files.pythonhosted.org/packages/86/7f/d96fa2aedaaec14c095ea9cd48d2158fdf33c0f4fd6e7a598d899d536b03/orjson-3.13.0-cp315-cp315-manylinux_2_39_armv7l.whl", hash = "sha256:51d11525bc3ca736fa97ce4e4c7da9999cc00bf261522bede43b4e7531bd7965", size = 113152, upload-time = "2026-10-07T14:09:14.059Z" }, + { url = "https://files.pythonhosted.org/packages/e9/2d/ee77aa685c54bd920a1f0e2936986b46269adb0d72bf5098c2c694dbeb36/orjson-3.13.0-cp315-cp315-manylinux_2_39_i686.whl", hash = "sha256:ac81530647c3423107cf61c3481e91f57134e9ddfb6ef83f5150ccbdcbc3a3ee", size = 130749, upload-time = "2026-10-07T14:09:15.835Z" }, + { url = "https://files.pythonhosted.org/packages/48/eb/3411fbfdad61b3f3af22343b5af7ed5c8a1679e35f442e8f1b229b33040e/orjson-3.13.0-cp315-cp315-manylinux_2_39_x86_64.whl", hash = "sha256:0526a3456db67b264c6d661b5f090077f326b6cd074d0ef53a72763595dec5d7", size = 130471, upload-time = "2026-10-07T14:09:17.463Z" }, + { url = "https://files.pythonhosted.org/packages/87/71/abdc2b8c70b8d85a6cb22f404da0f52d7d712f9d49cda039a0cb1adcb973/orjson-3.13.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:dd61e64802d51d1e4f16531c64536354fc3bc67932dc0cff254044f72bf0f187", size = 134793, upload-time = "2026-10-07T14:09:19.084Z" }, + { url = "https://files.pythonhosted.org/packages/0a/2e/1c13552d8b0241083116de02b2f284ee38501ef06ebfb79893f741538168/orjson-3.13.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:c5e3ccaac3106e8fa6e2f2f6962449d7c757d7b067e41b395a19d6f0d6cec892", size = 126711, upload-time = "2026-10-07T14:09:20.645Z" }, + { url = "https://files.pythonhosted.org/packages/85/f8/d4ece953a519d064cf690adaa68cd389d5b64fd261726334841b32978d6a/orjson-3.13.0-cp315-cp315-win_amd64.whl", hash = "sha256:7804dd1d6161da0e53b284c2aebf20f23e78eaac617300803e1467d1828d987f", size = 121496, upload-time = "2026-10-07T14:09:22.359Z" }, + { url = "https://files.pythonhosted.org/packages/70/cf/f691388c4a9bc4af7dcc1648c4b40845869908b517d7c0009d005c7d1fa1/orjson-3.13.0-cp315-cp315-win_arm64.whl", hash = "sha256:f5c05a8fee59309f537590a1ff12d3c1009c485e96a50a9ac60dd085c09d0fc0", size = 126260, upload-time = "2026-10-07T14:09:23.928Z" }, +] + +[[package]] +name = "ormsgpack" +version = "1.13.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/ae/aea2bee05bd61645daf97515174d71d8fd978a2c395b4dd5f0a5ada7facc/ormsgpack-1.13.0.tar.gz", hash = "sha256:4127e84b07816e1f36d557e95b5642041692df22bf77f2c2f563a2039ab8144e", size = 45467, upload-time = "2026-10-15T19:51:30.979Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2d/bc/7f7285cb06217751bff45c4e6d8a98509baf6afe2291549ef551dc2d5a86/ormsgpack-1.13.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:4615f5bfd4bef7bf6186c0677fe15bd8ef741c88c0183ea1578064078a3175af", size = 442833, upload-time = "2026-10-15T19:50:15.446Z" }, + { url = "https://files.pythonhosted.org/packages/68/f1/1fab220a4469c42337831090b14a190cfe625f966cc03e2a676f52d68d26/ormsgpack-1.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ad79aeeb3335e851abe6216f7409328fce166dd192774eb0f02e8c671fe77e9", size = 244445, upload-time = "2026-10-15T19:50:17.735Z" }, + { url = "https://files.pythonhosted.org/packages/3f/61/38bb1b8dd7bb8f7f764539f2449287f967f62976ff8c030bfd1d054e0376/ormsgpack-1.13.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ffa23ab2fe9188f24c3f68428a2cb61b37c8b7f103af75a4700ad199339d6bfc", size = 248948, upload-time = "2026-10-15T19:50:20.325Z" }, + { url = "https://files.pythonhosted.org/packages/32/95/b7fc58012b596b477f4f4a360c98667d6a4dafd9791f61e8235c3d685c2d/ormsgpack-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c12feb508595b6fbe9e2eae35ac132dc819fb3d7bafff428c6e0a7934be3b99c", size = 251084, upload-time = "2026-10-15T19:50:21.764Z" }, + { url = "https://files.pythonhosted.org/packages/58/21/e74b936ba087fc4e123b0e119dd225b550d51a03627d07a24aa8fafec2ae/ormsgpack-1.13.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:840495450518a5fc21f47a412be387cdcccf3f6c14f35ac97f7c3317b2080889", size = 423497, upload-time = "2026-10-15T19:50:23.228Z" }, + { url = "https://files.pythonhosted.org/packages/a4/9c/21ffa391d8c1a73deb91d912c1ed622031b8aefed6621465e031131df5e5/ormsgpack-1.13.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:fc4a6f98828cbe0a4fce3171806504f3926d658b696ae4c7c6cf4bc44d462373", size = 465790, upload-time = "2026-10-15T19:50:24.85Z" }, + { url = "https://files.pythonhosted.org/packages/15/b0/a6283210086037418ba2a8cb1e2795772eadce9f301c2c0669b90c9e34eb/ormsgpack-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:dcc34f07b883d96681385517110182fe319ba8a5cdd40c990560c0fe1e01a27f", size = 153758, upload-time = "2026-10-15T19:50:26.536Z" }, + { url = "https://files.pythonhosted.org/packages/ef/1d/ef43638664016a6cac64ee4ac2f96f8690d6a5b86b9384a16b4ed91bfdb0/ormsgpack-1.13.0-cp311-cp311-win_arm64.whl", hash = "sha256:a897a75d40e4c6f496d984eb2eaa7ca44fe0b0cade790e3a75ca3595428b4450", size = 150907, upload-time = "2026-10-15T19:50:27.769Z" }, + { url = "https://files.pythonhosted.org/packages/3d/f4/a8e286ff787c247cec785ceb1f438a59c52806d66636f5b3a46eada93cd4/ormsgpack-1.13.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:0036b68293a526b852fad7e490e30f4646fc360a76b4d587800c96bece9df657", size = 442511, upload-time = "2026-10-15T19:50:29.319Z" }, + { url = "https://files.pythonhosted.org/packages/e9/dc/95e81104f1cecc52caaa52983296b3d5d896035c8238f14ae8e7daf1117f/ormsgpack-1.13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a22d85e6010676b8a6e9024c4f7fdeb56953684ea6679cc084d0ecb7d768b572", size = 246498, upload-time = "2026-10-15T19:50:30.974Z" }, + { url = "https://files.pythonhosted.org/packages/d9/82/ee80a587364a1cd4cd39a7e90089ef3ba2687e0c6ee8292a76ccc92398cd/ormsgpack-1.13.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6684d53e9bb1b20ebda36b8e746c3af8c9c2b33ae05f8f8558b57fe4a06e11d0", size = 249452, upload-time = "2026-10-15T19:50:32.799Z" }, + { url = "https://files.pythonhosted.org/packages/49/f1/1bc3710e6f1b8d4da288d949aa8c04d12d5265c23004799f0b102778ee2c/ormsgpack-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8187048ec7b9ec628f985954e2409248acfeb8732e2751305649eaaba7304db7", size = 254913, upload-time = "2026-10-15T19:50:34.24Z" }, + { url = "https://files.pythonhosted.org/packages/01/3a/73d98be73efc79e6b99ec967be0f285c47e90c9fa852f2a34d70074d72d2/ormsgpack-1.13.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4608875478521f10fc40d17b6f925b2f16e8e69265c6d86a8fb8e389d58853b3", size = 425884, upload-time = "2026-10-15T19:50:35.641Z" }, + { url = "https://files.pythonhosted.org/packages/b4/7c/127707749c3bd30cd6058e67604c1084a7680fe074d05b7445db9e023d25/ormsgpack-1.13.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:738d03e31651861c5582fecf2901cf473b8745f1c948aba7ee7770f3a8f89fec", size = 469643, upload-time = "2026-10-15T19:50:37.2Z" }, + { url = "https://files.pythonhosted.org/packages/0e/37/4732e2864fac58a878b941ef6a1cc385c6d22b924e7bfdbdd23a6b64b23c/ormsgpack-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:03f579be28e7cab389815650ef003b0f47a2adc63f756d5064a3040b98553484", size = 157757, upload-time = "2026-10-15T19:50:38.816Z" }, + { url = "https://files.pythonhosted.org/packages/90/88/ea2c6f359356cdd8daecd21272709266580fa865eab969fb7ca406234a23/ormsgpack-1.13.0-cp312-cp312-win_arm64.whl", hash = "sha256:a40a974b8917949e3fdff71fa8b44bebd0e36a70bb4a40eb817653070cdc1afc", size = 152986, upload-time = "2026-10-15T19:50:40.126Z" }, + { url = "https://files.pythonhosted.org/packages/d3/26/a021066bf089ca5af395525d6f01f09d7ca3bd47e78251724cdaf3191164/ormsgpack-1.13.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:a50285a1910d8fd334b1b8c0108cd7574a0b50c7cde6581aea5bf23622b167ad", size = 442945, upload-time = "2026-10-15T19:50:41.638Z" }, + { url = "https://files.pythonhosted.org/packages/d9/03/bd0ee0fe7f41b6be15147ce01114b25cc0a0556c35a8feade2a175399b8a/ormsgpack-1.13.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1294f8c325a4ba77f6a49b8e3430024e912a7ba845c5ad03bde281422c82698b", size = 246924, upload-time = "2026-10-15T19:50:43.039Z" }, + { url = "https://files.pythonhosted.org/packages/2a/9a/95b2bb2c660a514c16e8daab50eeefd6eee4149e9bf89c7e0207c97a7c89/ormsgpack-1.13.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c20b99d0d375681529e621b47491ef684a1538b55981ff05281d4f83f00b900d", size = 249462, upload-time = "2026-10-15T19:50:44.742Z" }, + { url = "https://files.pythonhosted.org/packages/12/d8/6e06361ae376131982c43a56d53bf7ef0a36149481b8cea6413e28ce8794/ormsgpack-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc8eff22184cbfef56f0a4a6ca4fedc38174b2447ecef517fc050d6340546345", size = 255216, upload-time = "2026-10-15T19:50:46.408Z" }, + { url = "https://files.pythonhosted.org/packages/5d/6d/d18aa8463b35aec4737d9fd670afd6813d1e287328bd1caabe240e7490ca/ormsgpack-1.13.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1428ed9cfc1fd7dc5fa75ea4cb8f1f445428e3d06a478dcad6e7f357555ea86a", size = 426174, upload-time = "2026-10-15T19:50:47.783Z" }, + { url = "https://files.pythonhosted.org/packages/04/eb/d87ab35e6c7e34be9e0f147f9d82f4e71d10a8c87515b950471d00b2f5c1/ormsgpack-1.13.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e0633eeb91eada7609881823aae77435f57ac7f49ce39b1657c823b139536b20", size = 469990, upload-time = "2026-10-15T19:50:49.231Z" }, + { url = "https://files.pythonhosted.org/packages/35/ec/c0746317254800377ca815c48496b8cd833de0d91ab221886b2c2c20259f/ormsgpack-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:8ae078104fceb107250d1b792a4c3b72bc9a0e9536c11c4dd0b6cc6ffc44ba9c", size = 158109, upload-time = "2026-10-15T19:50:50.674Z" }, + { url = "https://files.pythonhosted.org/packages/0d/5b/e644b5ab0e4b1c66c00e66c5d4b7ad5cd9003735f8bb9f15e4c8d3d6b38f/ormsgpack-1.13.0-cp313-cp313-win_arm64.whl", hash = "sha256:6a2f510666f5094a8187086bc3c82509a6ceccdb0f73f3cdd5beb0245a2867cf", size = 153241, upload-time = "2026-10-15T19:50:52.041Z" }, + { url = "https://files.pythonhosted.org/packages/0a/1a/3094130c991b4af52a884a5ce49dc1164e4e41e32108939596bcf2aac09e/ormsgpack-1.13.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:057fc67582f1f2b12a1d777c7b1937205fc11a7b191b11e306ce1398342a6b8e", size = 441938, upload-time = "2026-10-15T19:50:53.501Z" }, + { url = "https://files.pythonhosted.org/packages/92/b8/6c9f6af94b3593f31b8c3475ba68c58fe87be04be6f1ff8e3dc1d342d6a8/ormsgpack-1.13.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1e8fb08f8ff5de3204486a6b94dd8034c5fa223356b222725c41ccdd6145161", size = 246577, upload-time = "2026-10-15T19:50:54.859Z" }, + { url = "https://files.pythonhosted.org/packages/f1/ad/fa855a48e202f584ffd57de2f518e16fab1fe1de6c882606dc4acfbef90e/ormsgpack-1.13.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:31cd297453ce4723e03667d1d65c77626a5471d5b9cbc9ec19f70d6bfc5b470e", size = 249131, upload-time = "2026-10-15T19:50:56.211Z" }, + { url = "https://files.pythonhosted.org/packages/b8/be/53833e82ce1e2f2354e17e067df1e47a630cc7a5da93c74672604ba1050e/ormsgpack-1.13.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e1bc81dc0b5f55105838e1be312e81320338f6e26f0023a9306d45857c073ca", size = 254851, upload-time = "2026-10-15T19:50:57.799Z" }, + { url = "https://files.pythonhosted.org/packages/ca/d3/869ffe3b5c78d0c79435e2a687f3e22e1fc5f8677cc2eeb0544a8dbaa780/ormsgpack-1.13.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:139722db6d60a68eb3fbef1bd04f912f8fcce5c50ce7d57e83c466e6085aed2e", size = 425850, upload-time = "2026-10-15T19:50:59.178Z" }, + { url = "https://files.pythonhosted.org/packages/9a/5c/9b482f690abe4f1990007bcc2acdae6c0c73a3363280d8c02aeacac275e5/ormsgpack-1.13.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f9cac2b774e189252754e2e52ea84f2180d9ebf84994ac2a3ce57dc902fe4679", size = 469719, upload-time = "2026-10-15T19:51:00.568Z" }, + { url = "https://files.pythonhosted.org/packages/19/2a/179860fc46783a9355ed5bedf2000bb504d2c5c248552a6907114fa13297/ormsgpack-1.13.0-cp314-cp314-win_amd64.whl", hash = "sha256:e640fa1e884bfb77d50c5bf04a514814794df2826665ee8abdfa92c9f3bacbd5", size = 157230, upload-time = "2026-10-15T19:51:02.069Z" }, + { url = "https://files.pythonhosted.org/packages/23/40/9386084706ae2d3f1db446fafb3e4d9f7647b7560a48b998af4367c250a4/ormsgpack-1.13.0-cp314-cp314-win_arm64.whl", hash = "sha256:5ab8e0418ece15e378143808ff8c7f2fc3c0de5472da712a5bf7465883acf4f3", size = 152311, upload-time = "2026-10-15T19:51:03.503Z" }, + { url = "https://files.pythonhosted.org/packages/ec/65/e1a8c48b33a32a3908f3cfd31a3c3c045c4fba59326163e4873eecdb7397/ormsgpack-1.13.0-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:b004c3b9360ddff287a04d9e161ed05439d241637753cd99054dd3ca09c2f24a", size = 438955, upload-time = "2026-10-15T19:51:04.881Z" }, + { url = "https://files.pythonhosted.org/packages/fc/47/303b6d462bcdb3f1940f65a76ad5ae11529fd99f6f27fd6a59d23d140ee6/ormsgpack-1.13.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab4abaf49bebebf7f9586c58a7d70153cbea4f2dc96c9c5aadc072312bf6e3c7", size = 244921, upload-time = "2026-10-15T19:51:06.438Z" }, + { url = "https://files.pythonhosted.org/packages/97/1e/bc82ca79b79f4883360a7ad9a10dea5fd362f74ddb0071821c6f293c9519/ormsgpack-1.13.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b531d01d2b2274d038f02b455729774f08d868e190cfba6c75d1cb46a9c1c80a", size = 253288, upload-time = "2026-10-15T19:51:08.232Z" }, + { url = "https://files.pythonhosted.org/packages/ba/5c/75f1ef31fa85432554a62f772dd535773eaa601e86e1706aec15d2995750/ormsgpack-1.13.0-cp314-cp314t-win_amd64.whl", hash = "sha256:e7747caab9d87f684bd59934f414d97a1a502db9ea60594a0cc67e67001a8f3a", size = 155310, upload-time = "2026-10-15T19:51:10.091Z" }, + { url = "https://files.pythonhosted.org/packages/62/cf/5f07edd33c66f6d98a762f3e5823bcc770d972749fd15c9f0930b4465f7f/ormsgpack-1.13.0-cp315-cp315-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:02008ec476f5f3162a36abb7b49a2b091982f902cb20457553eb6d9fb4891a20", size = 442308, upload-time = "2026-10-15T19:51:12.236Z" }, + { url = "https://files.pythonhosted.org/packages/7c/9c/78d1a9c3d8ef1e873af3a1dd74240815cbea6252277c3a5e7f2f5fbff5de/ormsgpack-1.13.0-cp315-cp315-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:720cfe54a4350c892d2a21971022e39263b2044ecd1575c69d4e2f9fec339297", size = 246906, upload-time = "2026-10-15T19:51:14.06Z" }, + { url = "https://files.pythonhosted.org/packages/90/80/dd7f0f8d3be226b556e8e9bbfb54bc8a1298dc8d82d5ee0ec0b8b3c2c36d/ormsgpack-1.13.0-cp315-cp315-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:97bb6ae1a87cb50440a663a5cc33e11f25b7d10727dc3ae00198aacd1deb421e", size = 249415, upload-time = "2026-10-15T19:51:15.475Z" }, + { url = "https://files.pythonhosted.org/packages/e3/b1/b3b98b45b23e22977f891b0164b9f200d7a978d4217f13936c9496c40a24/ormsgpack-1.13.0-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10207cff63729a24e50d7bdacbffbb01384ee9baf3373bbbb4be3e43fdf65de8", size = 255169, upload-time = "2026-10-15T19:51:17.207Z" }, + { url = "https://files.pythonhosted.org/packages/52/0a/cd9c408e35a75604c51beb65d9e00373ded60007a58ad5d84fe6fd80d048/ormsgpack-1.13.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:9128325adcfd1c8c8c3447dfd9265de7df8408377c75168dc0a1a2a9ff028453", size = 426227, upload-time = "2026-10-15T19:51:18.97Z" }, + { url = "https://files.pythonhosted.org/packages/56/7d/e498890118b5b784e0c0f2d818622b3665b918885e6efc5d189d6135b8ff/ormsgpack-1.13.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:38dd6945be164ff6babe609ecd5f684ac58c88520643bd962a4fc5c07e6b0c45", size = 470014, upload-time = "2026-10-15T19:51:20.571Z" }, + { url = "https://files.pythonhosted.org/packages/1a/d8/5d28464c0b34b71fc79ef7e36533c5e0f8a43fd214e38fdeba2c8c01359a/ormsgpack-1.13.0-cp315-cp315-win_amd64.whl", hash = "sha256:3caea52fe5d04ff8e926e4ad6d5a3bffdc31db120ac65b35105cea027777fca3", size = 157513, upload-time = "2026-10-15T19:51:22.093Z" }, + { url = "https://files.pythonhosted.org/packages/29/0b/39daf74d2e94883b21fd1a4f82c920671a858ef41d643985ce9ed9391293/ormsgpack-1.13.0-cp315-cp315-win_arm64.whl", hash = "sha256:53bb4509ec12986a457608f76157b4fb12b90a36ce04b1e441daa43da354e2fe", size = 152397, upload-time = "2026-10-15T19:51:23.49Z" }, + { url = "https://files.pythonhosted.org/packages/89/6a/857bfc6da976bcd5f93a2c5285e7c4582d2cad0f183f8ab8bfd4b29a8167/ormsgpack-1.13.0-cp315-cp315t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:814c6b5634721635d4601fbf01d87b1fdb53beed7ac4058871cc5d4743e65b66", size = 439675, upload-time = "2026-10-15T19:51:24.99Z" }, + { url = "https://files.pythonhosted.org/packages/bc/a6/d099434eebeaf31ac1eb60f814d09eb7fc02da9c18c63f2d2c780f78408a/ormsgpack-1.13.0-cp315-cp315t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b6aa751eff9821bb51768930f94eb4616ce66a78a5b0cfd8e964c293ccbfd07a", size = 245220, upload-time = "2026-10-15T19:51:26.76Z" }, + { url = "https://files.pythonhosted.org/packages/fb/00/797e0ff57c70222c36d42c57a423a3f6cd71dc447c082c400dac796e91bf/ormsgpack-1.13.0-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:793da94721648804c9055cba73dcb569e55724574c362aa2b33bd05396da1fe5", size = 253649, upload-time = "2026-10-15T19:51:28.293Z" }, + { url = "https://files.pythonhosted.org/packages/a6/0a/a42471023b6fc0ad7c4fa171eb398a712de2aaeb36d2b070806ddf3bcb50/ormsgpack-1.13.0-cp315-cp315t-win_amd64.whl", hash = "sha256:85bad43f70fdbb77e9a0d5bae592829632c2c4d9508b6dd844997aa285f8d2a9", size = 155501, upload-time = "2026-10-15T19:51:29.719Z" }, ] [[package]] -name = "opentelemetry-semantic-conventions" -version = "0.58b0" +name = "packaging" +version = "26.3" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "opentelemetry-api" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/aa/1b/90701d91e6300d9f2fb352153fb1721ed99ed1f6ea14fa992c756016e63a/opentelemetry_semantic_conventions-0.58b0.tar.gz", hash = "sha256:6bd46f51264279c433755767bb44ad00f1c9e2367e1b42af563372c5a6fa0c25", size = 129867, upload-time = "2025-09-11T10:29:12.597Z" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/07/90/68152b7465f50285d3ce2481b3aec2f82822e3f52e5152eeeaf516bab841/opentelemetry_semantic_conventions-0.58b0-py3-none-any.whl", hash = "sha256:5564905ab1458b96684db1340232729fce3b5375a06e140e8904c78e4f815b28", size = 207954, upload-time = "2025-09-11T10:28:59.218Z" }, + { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, ] [[package]] -name = "packaging" -version = "25.0" +name = "pathable" +version = "0.6.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" } +sdist = { url = "https://files.pythonhosted.org/packages/66/f3/5a20387de9bcd0607871bfc2198ee0e15836da7baa4592ccd7f24c27c986/pathable-0.6.0.tar.gz", hash = "sha256:6404b8b82aef5ff0fd478934137128b99b12212ba35afdde5525ca4f8388ea58", size = 18970, upload-time = "2026-05-19T18:15:11.911Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, + { url = "https://files.pythonhosted.org/packages/a2/e8/6d75ffd9784bce2e93d1ae4415649427e39a53bb172d4672b2b59c6f0a7b/pathable-0.6.0-py3-none-any.whl", hash = "sha256:82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566", size = 18983, upload-time = "2026-05-19T18:15:10.728Z" }, ] [[package]] name = "pathspec" -version = "0.12.1" +version = "1.1.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712", size = 51043, upload-time = "2023-12-10T22:30:45Z" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a", size = 135180, upload-time = "2026-04-27T01:46:08.907Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191, upload-time = "2023-12-10T22:30:43.14Z" }, + { url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189", size = 57328, upload-time = "2026-04-27T01:46:07.06Z" }, ] [[package]] name = "pkginfo" -version = "1.12.1.2" +version = "1.13" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/24/03/e26bf3d6453b7fda5bd2b84029a426553bb373d6277ef6b5ac8863421f87/pkginfo-1.12.1.2.tar.gz", hash = "sha256:5cd957824ac36f140260964eba3c6be6442a8359b8c48f4adf90210f33a04b7b", size = 451828, upload-time = "2025-02-19T15:27:37.188Z" } +sdist = { url = "https://files.pythonhosted.org/packages/3e/ad/97538d5a1041d8d3ba155075b0b35248cf8538e1f1ec764f1d117962b01d/pkginfo-1.13.tar.gz", hash = "sha256:4f70471c643f71fe84a06230c0e33c5c5b12a33b2fd21bff14ddaef5a974adb1", size = 453525, upload-time = "2026-08-30T02:45:07.804Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fa/3d/f4f2ba829efb54b6cd2d91349c7463316a9cc55a43fc980447416c88540f/pkginfo-1.12.1.2-py3-none-any.whl", hash = "sha256:c783ac885519cab2c34927ccfa6bf64b5a704d7c69afaea583dd9b7afe969343", size = 32717, upload-time = "2025-02-19T15:27:33.071Z" }, + { url = "https://files.pythonhosted.org/packages/ed/ad/2e9e8a7bb014758af9453b3d818848d50852592296aceb8817f2a937fa71/pkginfo-1.13-py3-none-any.whl", hash = "sha256:37e1bfb7b5b149829e6f140a225b517c4c8808d8d164f68137b9492023874061", size = 32769, upload-time = "2026-08-30T02:45:06.55Z" }, ] [[package]] name = "platformdirs" -version = "4.5.0" +version = "4.13.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz", hash = "sha256:70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312", size = 21632, upload-time = "2025-10-08T17:44:48.791Z" } +sdist = { url = "https://files.pythonhosted.org/packages/80/a8/66d45abadff219e36e2a824181b8f6a67e7ed4572934d6252c71c29d5731/platformdirs-4.13.0.tar.gz", hash = "sha256:1aa0b0d3f224c1f07c295121e312a5a24a180d6ae5a8425ea1784b3e3863e9c0", size = 61094, upload-time = "2026-10-11T02:05:24.109Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/73/cb/ac7874b3e5d58441674fb70742e6c374b28b0c7cb988d37d991cde47166c/platformdirs-4.5.0-py3-none-any.whl", hash = "sha256:e578a81bb873cbb89a41fcc904c7ef523cc18284b7e3b3ccf06aca1403b7ebd3", size = 18651, upload-time = "2025-10-08T17:44:47.223Z" }, + { url = "https://files.pythonhosted.org/packages/8d/15/1633010b26e88e872c93b67c0b6c5e174fb74cb6fb5c1472b4d51d4a8f22/platformdirs-4.13.0-py3-none-any.whl", hash = "sha256:3dbcf4cd708f21cf876c4eaa90e58412bc4f033d87143f41b1493ff77c25b7e1", size = 32724, upload-time = "2026-10-11T02:05:22.776Z" }, ] [[package]] @@ -1941,131 +3346,144 @@ wheels = [ [[package]] name = "propcache" -version = "0.4.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz", hash = "sha256:f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d", size = 46442, upload-time = "2025-10-08T19:49:02.291Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3c/0e/934b541323035566a9af292dba85a195f7b78179114f2c6ebb24551118a9/propcache-0.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c2d1fa3201efaf55d730400d945b5b3ab6e672e100ba0f9a409d950ab25d7db", size = 79534, upload-time = "2025-10-08T19:46:02.083Z" }, - { url = "https://files.pythonhosted.org/packages/a1/6b/db0d03d96726d995dc7171286c6ba9d8d14251f37433890f88368951a44e/propcache-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1eb2994229cc8ce7fe9b3db88f5465f5fd8651672840b2e426b88cdb1a30aac8", size = 45526, upload-time = "2025-10-08T19:46:03.884Z" }, - { url = "https://files.pythonhosted.org/packages/e4/c3/82728404aea669e1600f304f2609cde9e665c18df5a11cdd57ed73c1dceb/propcache-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:66c1f011f45a3b33d7bcb22daed4b29c0c9e2224758b6be00686731e1b46f925", size = 47263, upload-time = "2025-10-08T19:46:05.405Z" }, - { url = "https://files.pythonhosted.org/packages/df/1b/39313ddad2bf9187a1432654c38249bab4562ef535ef07f5eb6eb04d0b1b/propcache-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9a52009f2adffe195d0b605c25ec929d26b36ef986ba85244891dee3b294df21", size = 201012, upload-time = "2025-10-08T19:46:07.165Z" }, - { url = "https://files.pythonhosted.org/packages/5b/01/f1d0b57d136f294a142acf97f4ed58c8e5b974c21e543000968357115011/propcache-0.4.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5d4e2366a9c7b837555cf02fb9be2e3167d333aff716332ef1b7c3a142ec40c5", size = 209491, upload-time = "2025-10-08T19:46:08.909Z" }, - { url = "https://files.pythonhosted.org/packages/a1/c8/038d909c61c5bb039070b3fb02ad5cccdb1dde0d714792e251cdb17c9c05/propcache-0.4.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9d2b6caef873b4f09e26ea7e33d65f42b944837563a47a94719cc3544319a0db", size = 215319, upload-time = "2025-10-08T19:46:10.7Z" }, - { url = "https://files.pythonhosted.org/packages/08/57/8c87e93142b2c1fa2408e45695205a7ba05fb5db458c0bf5c06ba0e09ea6/propcache-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b16ec437a8c8a965ecf95739448dd938b5c7f56e67ea009f4300d8df05f32b7", size = 196856, upload-time = "2025-10-08T19:46:12.003Z" }, - { url = "https://files.pythonhosted.org/packages/42/df/5615fec76aa561987a534759b3686008a288e73107faa49a8ae5795a9f7a/propcache-0.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:296f4c8ed03ca7476813fe666c9ea97869a8d7aec972618671b33a38a5182ef4", size = 193241, upload-time = "2025-10-08T19:46:13.495Z" }, - { url = "https://files.pythonhosted.org/packages/d5/21/62949eb3a7a54afe8327011c90aca7e03547787a88fb8bd9726806482fea/propcache-0.4.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:1f0978529a418ebd1f49dad413a2b68af33f85d5c5ca5c6ca2a3bed375a7ac60", size = 190552, upload-time = "2025-10-08T19:46:14.938Z" }, - { url = "https://files.pythonhosted.org/packages/30/ee/ab4d727dd70806e5b4de96a798ae7ac6e4d42516f030ee60522474b6b332/propcache-0.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fd138803047fb4c062b1c1dd95462f5209456bfab55c734458f15d11da288f8f", size = 200113, upload-time = "2025-10-08T19:46:16.695Z" }, - { url = "https://files.pythonhosted.org/packages/8a/0b/38b46208e6711b016aa8966a3ac793eee0d05c7159d8342aa27fc0bc365e/propcache-0.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8c9b3cbe4584636d72ff556d9036e0c9317fa27b3ac1f0f558e7e84d1c9c5900", size = 200778, upload-time = "2025-10-08T19:46:18.023Z" }, - { url = "https://files.pythonhosted.org/packages/cf/81/5abec54355ed344476bee711e9f04815d4b00a311ab0535599204eecc257/propcache-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f93243fdc5657247533273ac4f86ae106cc6445a0efacb9a1bfe982fcfefd90c", size = 193047, upload-time = "2025-10-08T19:46:19.449Z" }, - { url = "https://files.pythonhosted.org/packages/ec/b6/1f237c04e32063cb034acd5f6ef34ef3a394f75502e72703545631ab1ef6/propcache-0.4.1-cp310-cp310-win32.whl", hash = "sha256:a0ee98db9c5f80785b266eb805016e36058ac72c51a064040f2bc43b61101cdb", size = 38093, upload-time = "2025-10-08T19:46:20.643Z" }, - { url = "https://files.pythonhosted.org/packages/a6/67/354aac4e0603a15f76439caf0427781bcd6797f370377f75a642133bc954/propcache-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:1cdb7988c4e5ac7f6d175a28a9aa0c94cb6f2ebe52756a3c0cda98d2809a9e37", size = 41638, upload-time = "2025-10-08T19:46:21.935Z" }, - { url = "https://files.pythonhosted.org/packages/e0/e1/74e55b9fd1a4c209ff1a9a824bf6c8b3d1fc5a1ac3eabe23462637466785/propcache-0.4.1-cp310-cp310-win_arm64.whl", hash = "sha256:d82ad62b19645419fe79dd63b3f9253e15b30e955c0170e5cebc350c1844e581", size = 38229, upload-time = "2025-10-08T19:46:23.368Z" }, - { url = "https://files.pythonhosted.org/packages/8c/d4/4e2c9aaf7ac2242b9358f98dccd8f90f2605402f5afeff6c578682c2c491/propcache-0.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:60a8fda9644b7dfd5dece8c61d8a85e271cb958075bfc4e01083c148b61a7caf", size = 80208, upload-time = "2025-10-08T19:46:24.597Z" }, - { url = "https://files.pythonhosted.org/packages/c2/21/d7b68e911f9c8e18e4ae43bdbc1e1e9bbd971f8866eb81608947b6f585ff/propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c30b53e7e6bda1d547cabb47c825f3843a0a1a42b0496087bb58d8fedf9f41b5", size = 45777, upload-time = "2025-10-08T19:46:25.733Z" }, - { url = "https://files.pythonhosted.org/packages/d3/1d/11605e99ac8ea9435651ee71ab4cb4bf03f0949586246476a25aadfec54a/propcache-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6918ecbd897443087a3b7cd978d56546a812517dcaaca51b49526720571fa93e", size = 47647, upload-time = "2025-10-08T19:46:27.304Z" }, - { url = "https://files.pythonhosted.org/packages/58/1a/3c62c127a8466c9c843bccb503d40a273e5cc69838805f322e2826509e0d/propcache-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3d902a36df4e5989763425a8ab9e98cd8ad5c52c823b34ee7ef307fd50582566", size = 214929, upload-time = "2025-10-08T19:46:28.62Z" }, - { url = "https://files.pythonhosted.org/packages/56/b9/8fa98f850960b367c4b8fe0592e7fc341daa7a9462e925228f10a60cf74f/propcache-0.4.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a9695397f85973bb40427dedddf70d8dc4a44b22f1650dd4af9eedf443d45165", size = 221778, upload-time = "2025-10-08T19:46:30.358Z" }, - { url = "https://files.pythonhosted.org/packages/46/a6/0ab4f660eb59649d14b3d3d65c439421cf2f87fe5dd68591cbe3c1e78a89/propcache-0.4.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2bb07ffd7eaad486576430c89f9b215f9e4be68c4866a96e97db9e97fead85dc", size = 228144, upload-time = "2025-10-08T19:46:32.607Z" }, - { url = "https://files.pythonhosted.org/packages/52/6a/57f43e054fb3d3a56ac9fc532bc684fc6169a26c75c353e65425b3e56eef/propcache-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd6f30fdcf9ae2a70abd34da54f18da086160e4d7d9251f81f3da0ff84fc5a48", size = 210030, upload-time = "2025-10-08T19:46:33.969Z" }, - { url = "https://files.pythonhosted.org/packages/40/e2/27e6feebb5f6b8408fa29f5efbb765cd54c153ac77314d27e457a3e993b7/propcache-0.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:fc38cba02d1acba4e2869eef1a57a43dfbd3d49a59bf90dda7444ec2be6a5570", size = 208252, upload-time = "2025-10-08T19:46:35.309Z" }, - { url = "https://files.pythonhosted.org/packages/9e/f8/91c27b22ccda1dbc7967f921c42825564fa5336a01ecd72eb78a9f4f53c2/propcache-0.4.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:67fad6162281e80e882fb3ec355398cf72864a54069d060321f6cd0ade95fe85", size = 202064, upload-time = "2025-10-08T19:46:36.993Z" }, - { url = "https://files.pythonhosted.org/packages/f2/26/7f00bd6bd1adba5aafe5f4a66390f243acab58eab24ff1a08bebb2ef9d40/propcache-0.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f10207adf04d08bec185bae14d9606a1444715bc99180f9331c9c02093e1959e", size = 212429, upload-time = "2025-10-08T19:46:38.398Z" }, - { url = "https://files.pythonhosted.org/packages/84/89/fd108ba7815c1117ddca79c228f3f8a15fc82a73bca8b142eb5de13b2785/propcache-0.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e9b0d8d0845bbc4cfcdcbcdbf5086886bc8157aa963c31c777ceff7846c77757", size = 216727, upload-time = "2025-10-08T19:46:39.732Z" }, - { url = "https://files.pythonhosted.org/packages/79/37/3ec3f7e3173e73f1d600495d8b545b53802cbf35506e5732dd8578db3724/propcache-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:981333cb2f4c1896a12f4ab92a9cc8f09ea664e9b7dbdc4eff74627af3a11c0f", size = 205097, upload-time = "2025-10-08T19:46:41.025Z" }, - { url = "https://files.pythonhosted.org/packages/61/b0/b2631c19793f869d35f47d5a3a56fb19e9160d3c119f15ac7344fc3ccae7/propcache-0.4.1-cp311-cp311-win32.whl", hash = "sha256:f1d2f90aeec838a52f1c1a32fe9a619fefd5e411721a9117fbf82aea638fe8a1", size = 38084, upload-time = "2025-10-08T19:46:42.693Z" }, - { url = "https://files.pythonhosted.org/packages/f4/78/6cce448e2098e9f3bfc91bb877f06aa24b6ccace872e39c53b2f707c4648/propcache-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:364426a62660f3f699949ac8c621aad6977be7126c5807ce48c0aeb8e7333ea6", size = 41637, upload-time = "2025-10-08T19:46:43.778Z" }, - { url = "https://files.pythonhosted.org/packages/9c/e9/754f180cccd7f51a39913782c74717c581b9cc8177ad0e949f4d51812383/propcache-0.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:e53f3a38d3510c11953f3e6a33f205c6d1b001129f972805ca9b42fc308bc239", size = 38064, upload-time = "2025-10-08T19:46:44.872Z" }, - { url = "https://files.pythonhosted.org/packages/a2/0f/f17b1b2b221d5ca28b4b876e8bb046ac40466513960646bda8e1853cdfa2/propcache-0.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e153e9cd40cc8945138822807139367f256f89c6810c2634a4f6902b52d3b4e2", size = 80061, upload-time = "2025-10-08T19:46:46.075Z" }, - { url = "https://files.pythonhosted.org/packages/76/47/8ccf75935f51448ba9a16a71b783eb7ef6b9ee60f5d14c7f8a8a79fbeed7/propcache-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cd547953428f7abb73c5ad82cbb32109566204260d98e41e5dfdc682eb7f8403", size = 46037, upload-time = "2025-10-08T19:46:47.23Z" }, - { url = "https://files.pythonhosted.org/packages/0a/b6/5c9a0e42df4d00bfb4a3cbbe5cf9f54260300c88a0e9af1f47ca5ce17ac0/propcache-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f048da1b4f243fc44f205dfd320933a951b8d89e0afd4c7cacc762a8b9165207", size = 47324, upload-time = "2025-10-08T19:46:48.384Z" }, - { url = "https://files.pythonhosted.org/packages/9e/d3/6c7ee328b39a81ee877c962469f1e795f9db87f925251efeb0545e0020d0/propcache-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ec17c65562a827bba85e3872ead335f95405ea1674860d96483a02f5c698fa72", size = 225505, upload-time = "2025-10-08T19:46:50.055Z" }, - { url = "https://files.pythonhosted.org/packages/01/5d/1c53f4563490b1d06a684742cc6076ef944bc6457df6051b7d1a877c057b/propcache-0.4.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:405aac25c6394ef275dee4c709be43745d36674b223ba4eb7144bf4d691b7367", size = 230242, upload-time = "2025-10-08T19:46:51.815Z" }, - { url = "https://files.pythonhosted.org/packages/20/e1/ce4620633b0e2422207c3cb774a0ee61cac13abc6217763a7b9e2e3f4a12/propcache-0.4.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0013cb6f8dde4b2a2f66903b8ba740bdfe378c943c4377a200551ceb27f379e4", size = 238474, upload-time = "2025-10-08T19:46:53.208Z" }, - { url = "https://files.pythonhosted.org/packages/46/4b/3aae6835b8e5f44ea6a68348ad90f78134047b503765087be2f9912140ea/propcache-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15932ab57837c3368b024473a525e25d316d8353016e7cc0e5ba9eb343fbb1cf", size = 221575, upload-time = "2025-10-08T19:46:54.511Z" }, - { url = "https://files.pythonhosted.org/packages/6e/a5/8a5e8678bcc9d3a1a15b9a29165640d64762d424a16af543f00629c87338/propcache-0.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:031dce78b9dc099f4c29785d9cf5577a3faf9ebf74ecbd3c856a7b92768c3df3", size = 216736, upload-time = "2025-10-08T19:46:56.212Z" }, - { url = "https://files.pythonhosted.org/packages/f1/63/b7b215eddeac83ca1c6b934f89d09a625aa9ee4ba158338854c87210cc36/propcache-0.4.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ab08df6c9a035bee56e31af99be621526bd237bea9f32def431c656b29e41778", size = 213019, upload-time = "2025-10-08T19:46:57.595Z" }, - { url = "https://files.pythonhosted.org/packages/57/74/f580099a58c8af587cac7ba19ee7cb418506342fbbe2d4a4401661cca886/propcache-0.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4d7af63f9f93fe593afbf104c21b3b15868efb2c21d07d8732c0c4287e66b6a6", size = 220376, upload-time = "2025-10-08T19:46:59.067Z" }, - { url = "https://files.pythonhosted.org/packages/c4/ee/542f1313aff7eaf19c2bb758c5d0560d2683dac001a1c96d0774af799843/propcache-0.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cfc27c945f422e8b5071b6e93169679e4eb5bf73bbcbf1ba3ae3a83d2f78ebd9", size = 226988, upload-time = "2025-10-08T19:47:00.544Z" }, - { url = "https://files.pythonhosted.org/packages/8f/18/9c6b015dd9c6930f6ce2229e1f02fb35298b847f2087ea2b436a5bfa7287/propcache-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:35c3277624a080cc6ec6f847cbbbb5b49affa3598c4535a0a4682a697aaa5c75", size = 215615, upload-time = "2025-10-08T19:47:01.968Z" }, - { url = "https://files.pythonhosted.org/packages/80/9e/e7b85720b98c45a45e1fca6a177024934dc9bc5f4d5dd04207f216fc33ed/propcache-0.4.1-cp312-cp312-win32.whl", hash = "sha256:671538c2262dadb5ba6395e26c1731e1d52534bfe9ae56d0b5573ce539266aa8", size = 38066, upload-time = "2025-10-08T19:47:03.503Z" }, - { url = "https://files.pythonhosted.org/packages/54/09/d19cff2a5aaac632ec8fc03737b223597b1e347416934c1b3a7df079784c/propcache-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:cb2d222e72399fcf5890d1d5cc1060857b9b236adff2792ff48ca2dfd46c81db", size = 41655, upload-time = "2025-10-08T19:47:04.973Z" }, - { url = "https://files.pythonhosted.org/packages/68/ab/6b5c191bb5de08036a8c697b265d4ca76148efb10fa162f14af14fb5f076/propcache-0.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:204483131fb222bdaaeeea9f9e6c6ed0cac32731f75dfc1d4a567fc1926477c1", size = 37789, upload-time = "2025-10-08T19:47:06.077Z" }, - { url = "https://files.pythonhosted.org/packages/bf/df/6d9c1b6ac12b003837dde8a10231a7344512186e87b36e855bef32241942/propcache-0.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:43eedf29202c08550aac1d14e0ee619b0430aaef78f85864c1a892294fbc28cf", size = 77750, upload-time = "2025-10-08T19:47:07.648Z" }, - { url = "https://files.pythonhosted.org/packages/8b/e8/677a0025e8a2acf07d3418a2e7ba529c9c33caf09d3c1f25513023c1db56/propcache-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d62cdfcfd89ccb8de04e0eda998535c406bf5e060ffd56be6c586cbcc05b3311", size = 44780, upload-time = "2025-10-08T19:47:08.851Z" }, - { url = "https://files.pythonhosted.org/packages/89/a4/92380f7ca60f99ebae761936bc48a72a639e8a47b29050615eef757cb2a7/propcache-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cae65ad55793da34db5f54e4029b89d3b9b9490d8abe1b4c7ab5d4b8ec7ebf74", size = 46308, upload-time = "2025-10-08T19:47:09.982Z" }, - { url = "https://files.pythonhosted.org/packages/2d/48/c5ac64dee5262044348d1d78a5f85dd1a57464a60d30daee946699963eb3/propcache-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:333ddb9031d2704a301ee3e506dc46b1fe5f294ec198ed6435ad5b6a085facfe", size = 208182, upload-time = "2025-10-08T19:47:11.319Z" }, - { url = "https://files.pythonhosted.org/packages/c6/0c/cd762dd011a9287389a6a3eb43aa30207bde253610cca06824aeabfe9653/propcache-0.4.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd0858c20f078a32cf55f7e81473d96dcf3b93fd2ccdb3d40fdf54b8573df3af", size = 211215, upload-time = "2025-10-08T19:47:13.146Z" }, - { url = "https://files.pythonhosted.org/packages/30/3e/49861e90233ba36890ae0ca4c660e95df565b2cd15d4a68556ab5865974e/propcache-0.4.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:678ae89ebc632c5c204c794f8dab2837c5f159aeb59e6ed0539500400577298c", size = 218112, upload-time = "2025-10-08T19:47:14.913Z" }, - { url = "https://files.pythonhosted.org/packages/f1/8b/544bc867e24e1bd48f3118cecd3b05c694e160a168478fa28770f22fd094/propcache-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d472aeb4fbf9865e0c6d622d7f4d54a4e101a89715d8904282bb5f9a2f476c3f", size = 204442, upload-time = "2025-10-08T19:47:16.277Z" }, - { url = "https://files.pythonhosted.org/packages/50/a6/4282772fd016a76d3e5c0df58380a5ea64900afd836cec2c2f662d1b9bb3/propcache-0.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4d3df5fa7e36b3225954fba85589da77a0fe6a53e3976de39caf04a0db4c36f1", size = 199398, upload-time = "2025-10-08T19:47:17.962Z" }, - { url = "https://files.pythonhosted.org/packages/3e/ec/d8a7cd406ee1ddb705db2139f8a10a8a427100347bd698e7014351c7af09/propcache-0.4.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:ee17f18d2498f2673e432faaa71698032b0127ebf23ae5974eeaf806c279df24", size = 196920, upload-time = "2025-10-08T19:47:19.355Z" }, - { url = "https://files.pythonhosted.org/packages/f6/6c/f38ab64af3764f431e359f8baf9e0a21013e24329e8b85d2da32e8ed07ca/propcache-0.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:580e97762b950f993ae618e167e7be9256b8353c2dcd8b99ec100eb50f5286aa", size = 203748, upload-time = "2025-10-08T19:47:21.338Z" }, - { url = "https://files.pythonhosted.org/packages/d6/e3/fa846bd70f6534d647886621388f0a265254d30e3ce47e5c8e6e27dbf153/propcache-0.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:501d20b891688eb8e7aa903021f0b72d5a55db40ffaab27edefd1027caaafa61", size = 205877, upload-time = "2025-10-08T19:47:23.059Z" }, - { url = "https://files.pythonhosted.org/packages/e2/39/8163fc6f3133fea7b5f2827e8eba2029a0277ab2c5beee6c1db7b10fc23d/propcache-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a0bd56e5b100aef69bd8562b74b46254e7c8812918d3baa700c8a8009b0af66", size = 199437, upload-time = "2025-10-08T19:47:24.445Z" }, - { url = "https://files.pythonhosted.org/packages/93/89/caa9089970ca49c7c01662bd0eeedfe85494e863e8043565aeb6472ce8fe/propcache-0.4.1-cp313-cp313-win32.whl", hash = "sha256:bcc9aaa5d80322bc2fb24bb7accb4a30f81e90ab8d6ba187aec0744bc302ad81", size = 37586, upload-time = "2025-10-08T19:47:25.736Z" }, - { url = "https://files.pythonhosted.org/packages/f5/ab/f76ec3c3627c883215b5c8080debb4394ef5a7a29be811f786415fc1e6fd/propcache-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:381914df18634f5494334d201e98245c0596067504b9372d8cf93f4bb23e025e", size = 40790, upload-time = "2025-10-08T19:47:26.847Z" }, - { url = "https://files.pythonhosted.org/packages/59/1b/e71ae98235f8e2ba5004d8cb19765a74877abf189bc53fc0c80d799e56c3/propcache-0.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:8873eb4460fd55333ea49b7d189749ecf6e55bf85080f11b1c4530ed3034cba1", size = 37158, upload-time = "2025-10-08T19:47:27.961Z" }, - { url = "https://files.pythonhosted.org/packages/83/ce/a31bbdfc24ee0dcbba458c8175ed26089cf109a55bbe7b7640ed2470cfe9/propcache-0.4.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:92d1935ee1f8d7442da9c0c4fa7ac20d07e94064184811b685f5c4fada64553b", size = 81451, upload-time = "2025-10-08T19:47:29.445Z" }, - { url = "https://files.pythonhosted.org/packages/25/9c/442a45a470a68456e710d96cacd3573ef26a1d0a60067e6a7d5e655621ed/propcache-0.4.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:473c61b39e1460d386479b9b2f337da492042447c9b685f28be4f74d3529e566", size = 46374, upload-time = "2025-10-08T19:47:30.579Z" }, - { url = "https://files.pythonhosted.org/packages/f4/bf/b1d5e21dbc3b2e889ea4327044fb16312a736d97640fb8b6aa3f9c7b3b65/propcache-0.4.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c0ef0aaafc66fbd87842a3fe3902fd889825646bc21149eafe47be6072725835", size = 48396, upload-time = "2025-10-08T19:47:31.79Z" }, - { url = "https://files.pythonhosted.org/packages/f4/04/5b4c54a103d480e978d3c8a76073502b18db0c4bc17ab91b3cb5092ad949/propcache-0.4.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95393b4d66bfae908c3ca8d169d5f79cd65636ae15b5e7a4f6e67af675adb0e", size = 275950, upload-time = "2025-10-08T19:47:33.481Z" }, - { url = "https://files.pythonhosted.org/packages/b4/c1/86f846827fb969c4b78b0af79bba1d1ea2156492e1b83dea8b8a6ae27395/propcache-0.4.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c07fda85708bc48578467e85099645167a955ba093be0a2dcba962195676e859", size = 273856, upload-time = "2025-10-08T19:47:34.906Z" }, - { url = "https://files.pythonhosted.org/packages/36/1d/fc272a63c8d3bbad6878c336c7a7dea15e8f2d23a544bda43205dfa83ada/propcache-0.4.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:af223b406d6d000830c6f65f1e6431783fc3f713ba3e6cc8c024d5ee96170a4b", size = 280420, upload-time = "2025-10-08T19:47:36.338Z" }, - { url = "https://files.pythonhosted.org/packages/07/0c/01f2219d39f7e53d52e5173bcb09c976609ba30209912a0680adfb8c593a/propcache-0.4.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a78372c932c90ee474559c5ddfffd718238e8673c340dc21fe45c5b8b54559a0", size = 263254, upload-time = "2025-10-08T19:47:37.692Z" }, - { url = "https://files.pythonhosted.org/packages/2d/18/cd28081658ce597898f0c4d174d4d0f3c5b6d4dc27ffafeef835c95eb359/propcache-0.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:564d9f0d4d9509e1a870c920a89b2fec951b44bf5ba7d537a9e7c1ccec2c18af", size = 261205, upload-time = "2025-10-08T19:47:39.659Z" }, - { url = "https://files.pythonhosted.org/packages/7a/71/1f9e22eb8b8316701c2a19fa1f388c8a3185082607da8e406a803c9b954e/propcache-0.4.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:17612831fda0138059cc5546f4d12a2aacfb9e47068c06af35c400ba58ba7393", size = 247873, upload-time = "2025-10-08T19:47:41.084Z" }, - { url = "https://files.pythonhosted.org/packages/4a/65/3d4b61f36af2b4eddba9def857959f1016a51066b4f1ce348e0cf7881f58/propcache-0.4.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:41a89040cb10bd345b3c1a873b2bf36413d48da1def52f268a055f7398514874", size = 262739, upload-time = "2025-10-08T19:47:42.51Z" }, - { url = "https://files.pythonhosted.org/packages/2a/42/26746ab087faa77c1c68079b228810436ccd9a5ce9ac85e2b7307195fd06/propcache-0.4.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e35b88984e7fa64aacecea39236cee32dd9bd8c55f57ba8a75cf2399553f9bd7", size = 263514, upload-time = "2025-10-08T19:47:43.927Z" }, - { url = "https://files.pythonhosted.org/packages/94/13/630690fe201f5502d2403dd3cfd451ed8858fe3c738ee88d095ad2ff407b/propcache-0.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f8b465489f927b0df505cbe26ffbeed4d6d8a2bbc61ce90eb074ff129ef0ab1", size = 257781, upload-time = "2025-10-08T19:47:45.448Z" }, - { url = "https://files.pythonhosted.org/packages/92/f7/1d4ec5841505f423469efbfc381d64b7b467438cd5a4bbcbb063f3b73d27/propcache-0.4.1-cp313-cp313t-win32.whl", hash = "sha256:2ad890caa1d928c7c2965b48f3a3815c853180831d0e5503d35cf00c472f4717", size = 41396, upload-time = "2025-10-08T19:47:47.202Z" }, - { url = "https://files.pythonhosted.org/packages/48/f0/615c30622316496d2cbbc29f5985f7777d3ada70f23370608c1d3e081c1f/propcache-0.4.1-cp313-cp313t-win_amd64.whl", hash = "sha256:f7ee0e597f495cf415bcbd3da3caa3bd7e816b74d0d52b8145954c5e6fd3ff37", size = 44897, upload-time = "2025-10-08T19:47:48.336Z" }, - { url = "https://files.pythonhosted.org/packages/fd/ca/6002e46eccbe0e33dcd4069ef32f7f1c9e243736e07adca37ae8c4830ec3/propcache-0.4.1-cp313-cp313t-win_arm64.whl", hash = "sha256:929d7cbe1f01bb7baffb33dc14eb5691c95831450a26354cd210a8155170c93a", size = 39789, upload-time = "2025-10-08T19:47:49.876Z" }, - { url = "https://files.pythonhosted.org/packages/8e/5c/bca52d654a896f831b8256683457ceddd490ec18d9ec50e97dfd8fc726a8/propcache-0.4.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3f7124c9d820ba5548d431afb4632301acf965db49e666aa21c305cbe8c6de12", size = 78152, upload-time = "2025-10-08T19:47:51.051Z" }, - { url = "https://files.pythonhosted.org/packages/65/9b/03b04e7d82a5f54fb16113d839f5ea1ede58a61e90edf515f6577c66fa8f/propcache-0.4.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:c0d4b719b7da33599dfe3b22d3db1ef789210a0597bc650b7cee9c77c2be8c5c", size = 44869, upload-time = "2025-10-08T19:47:52.594Z" }, - { url = "https://files.pythonhosted.org/packages/b2/fa/89a8ef0468d5833a23fff277b143d0573897cf75bd56670a6d28126c7d68/propcache-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9f302f4783709a78240ebc311b793f123328716a60911d667e0c036bc5dcbded", size = 46596, upload-time = "2025-10-08T19:47:54.073Z" }, - { url = "https://files.pythonhosted.org/packages/86/bd/47816020d337f4a746edc42fe8d53669965138f39ee117414c7d7a340cfe/propcache-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c80ee5802e3fb9ea37938e7eecc307fb984837091d5fd262bb37238b1ae97641", size = 206981, upload-time = "2025-10-08T19:47:55.715Z" }, - { url = "https://files.pythonhosted.org/packages/df/f6/c5fa1357cc9748510ee55f37173eb31bfde6d94e98ccd9e6f033f2fc06e1/propcache-0.4.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ed5a841e8bb29a55fb8159ed526b26adc5bdd7e8bd7bf793ce647cb08656cdf4", size = 211490, upload-time = "2025-10-08T19:47:57.499Z" }, - { url = "https://files.pythonhosted.org/packages/80/1e/e5889652a7c4a3846683401a48f0f2e5083ce0ec1a8a5221d8058fbd1adf/propcache-0.4.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:55c72fd6ea2da4c318e74ffdf93c4fe4e926051133657459131a95c846d16d44", size = 215371, upload-time = "2025-10-08T19:47:59.317Z" }, - { url = "https://files.pythonhosted.org/packages/b2/f2/889ad4b2408f72fe1a4f6a19491177b30ea7bf1a0fd5f17050ca08cfc882/propcache-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8326e144341460402713f91df60ade3c999d601e7eb5ff8f6f7862d54de0610d", size = 201424, upload-time = "2025-10-08T19:48:00.67Z" }, - { url = "https://files.pythonhosted.org/packages/27/73/033d63069b57b0812c8bd19f311faebeceb6ba31b8f32b73432d12a0b826/propcache-0.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:060b16ae65bc098da7f6d25bf359f1f31f688384858204fe5d652979e0015e5b", size = 197566, upload-time = "2025-10-08T19:48:02.604Z" }, - { url = "https://files.pythonhosted.org/packages/dc/89/ce24f3dc182630b4e07aa6d15f0ff4b14ed4b9955fae95a0b54c58d66c05/propcache-0.4.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:89eb3fa9524f7bec9de6e83cf3faed9d79bffa560672c118a96a171a6f55831e", size = 193130, upload-time = "2025-10-08T19:48:04.499Z" }, - { url = "https://files.pythonhosted.org/packages/a9/24/ef0d5fd1a811fb5c609278d0209c9f10c35f20581fcc16f818da959fc5b4/propcache-0.4.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:dee69d7015dc235f526fe80a9c90d65eb0039103fe565776250881731f06349f", size = 202625, upload-time = "2025-10-08T19:48:06.213Z" }, - { url = "https://files.pythonhosted.org/packages/f5/02/98ec20ff5546f68d673df2f7a69e8c0d076b5abd05ca882dc7ee3a83653d/propcache-0.4.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5558992a00dfd54ccbc64a32726a3357ec93825a418a401f5cc67df0ac5d9e49", size = 204209, upload-time = "2025-10-08T19:48:08.432Z" }, - { url = "https://files.pythonhosted.org/packages/a0/87/492694f76759b15f0467a2a93ab68d32859672b646aa8a04ce4864e7932d/propcache-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c9b822a577f560fbd9554812526831712c1436d2c046cedee4c3796d3543b144", size = 197797, upload-time = "2025-10-08T19:48:09.968Z" }, - { url = "https://files.pythonhosted.org/packages/ee/36/66367de3575db1d2d3f3d177432bd14ee577a39d3f5d1b3d5df8afe3b6e2/propcache-0.4.1-cp314-cp314-win32.whl", hash = "sha256:ab4c29b49d560fe48b696cdcb127dd36e0bc2472548f3bf56cc5cb3da2b2984f", size = 38140, upload-time = "2025-10-08T19:48:11.232Z" }, - { url = "https://files.pythonhosted.org/packages/0c/2a/a758b47de253636e1b8aef181c0b4f4f204bf0dd964914fb2af90a95b49b/propcache-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:5a103c3eb905fcea0ab98be99c3a9a5ab2de60228aa5aceedc614c0281cf6153", size = 41257, upload-time = "2025-10-08T19:48:12.707Z" }, - { url = "https://files.pythonhosted.org/packages/34/5e/63bd5896c3fec12edcbd6f12508d4890d23c265df28c74b175e1ef9f4f3b/propcache-0.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:74c1fb26515153e482e00177a1ad654721bf9207da8a494a0c05e797ad27b992", size = 38097, upload-time = "2025-10-08T19:48:13.923Z" }, - { url = "https://files.pythonhosted.org/packages/99/85/9ff785d787ccf9bbb3f3106f79884a130951436f58392000231b4c737c80/propcache-0.4.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:824e908bce90fb2743bd6b59db36eb4f45cd350a39637c9f73b1c1ea66f5b75f", size = 81455, upload-time = "2025-10-08T19:48:15.16Z" }, - { url = "https://files.pythonhosted.org/packages/90/85/2431c10c8e7ddb1445c1f7c4b54d886e8ad20e3c6307e7218f05922cad67/propcache-0.4.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:c2b5e7db5328427c57c8e8831abda175421b709672f6cfc3d630c3b7e2146393", size = 46372, upload-time = "2025-10-08T19:48:16.424Z" }, - { url = "https://files.pythonhosted.org/packages/01/20/b0972d902472da9bcb683fa595099911f4d2e86e5683bcc45de60dd05dc3/propcache-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6f6ff873ed40292cd4969ef5310179afd5db59fdf055897e282485043fc80ad0", size = 48411, upload-time = "2025-10-08T19:48:17.577Z" }, - { url = "https://files.pythonhosted.org/packages/e2/e3/7dc89f4f21e8f99bad3d5ddb3a3389afcf9da4ac69e3deb2dcdc96e74169/propcache-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49a2dc67c154db2c1463013594c458881a069fcf98940e61a0569016a583020a", size = 275712, upload-time = "2025-10-08T19:48:18.901Z" }, - { url = "https://files.pythonhosted.org/packages/20/67/89800c8352489b21a8047c773067644e3897f02ecbbd610f4d46b7f08612/propcache-0.4.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:005f08e6a0529984491e37d8dbc3dd86f84bd78a8ceb5fa9a021f4c48d4984be", size = 273557, upload-time = "2025-10-08T19:48:20.762Z" }, - { url = "https://files.pythonhosted.org/packages/e2/a1/b52b055c766a54ce6d9c16d9aca0cad8059acd9637cdf8aa0222f4a026ef/propcache-0.4.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5c3310452e0d31390da9035c348633b43d7e7feb2e37be252be6da45abd1abcc", size = 280015, upload-time = "2025-10-08T19:48:22.592Z" }, - { url = "https://files.pythonhosted.org/packages/48/c8/33cee30bd890672c63743049f3c9e4be087e6780906bfc3ec58528be59c1/propcache-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c3c70630930447f9ef1caac7728c8ad1c56bc5015338b20fed0d08ea2480b3a", size = 262880, upload-time = "2025-10-08T19:48:23.947Z" }, - { url = "https://files.pythonhosted.org/packages/0c/b1/8f08a143b204b418285c88b83d00edbd61afbc2c6415ffafc8905da7038b/propcache-0.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8e57061305815dfc910a3634dcf584f08168a8836e6999983569f51a8544cd89", size = 260938, upload-time = "2025-10-08T19:48:25.656Z" }, - { url = "https://files.pythonhosted.org/packages/cf/12/96e4664c82ca2f31e1c8dff86afb867348979eb78d3cb8546a680287a1e9/propcache-0.4.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:521a463429ef54143092c11a77e04056dd00636f72e8c45b70aaa3140d639726", size = 247641, upload-time = "2025-10-08T19:48:27.207Z" }, - { url = "https://files.pythonhosted.org/packages/18/ed/e7a9cfca28133386ba52278136d42209d3125db08d0a6395f0cba0c0285c/propcache-0.4.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:120c964da3fdc75e3731aa392527136d4ad35868cc556fd09bb6d09172d9a367", size = 262510, upload-time = "2025-10-08T19:48:28.65Z" }, - { url = "https://files.pythonhosted.org/packages/f5/76/16d8bf65e8845dd62b4e2b57444ab81f07f40caa5652b8969b87ddcf2ef6/propcache-0.4.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:d8f353eb14ee3441ee844ade4277d560cdd68288838673273b978e3d6d2c8f36", size = 263161, upload-time = "2025-10-08T19:48:30.133Z" }, - { url = "https://files.pythonhosted.org/packages/e7/70/c99e9edb5d91d5ad8a49fa3c1e8285ba64f1476782fed10ab251ff413ba1/propcache-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ab2943be7c652f09638800905ee1bab2c544e537edb57d527997a24c13dc1455", size = 257393, upload-time = "2025-10-08T19:48:31.567Z" }, - { url = "https://files.pythonhosted.org/packages/08/02/87b25304249a35c0915d236575bc3574a323f60b47939a2262b77632a3ee/propcache-0.4.1-cp314-cp314t-win32.whl", hash = "sha256:05674a162469f31358c30bcaa8883cb7829fa3110bf9c0991fe27d7896c42d85", size = 42546, upload-time = "2025-10-08T19:48:32.872Z" }, - { url = "https://files.pythonhosted.org/packages/cb/ef/3c6ecf8b317aa982f309835e8f96987466123c6e596646d4e6a1dfcd080f/propcache-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:990f6b3e2a27d683cb7602ed6c86f15ee6b43b1194736f9baaeb93d0016633b1", size = 46259, upload-time = "2025-10-08T19:48:34.226Z" }, - { url = "https://files.pythonhosted.org/packages/c4/2d/346e946d4951f37eca1e4f55be0f0174c52cd70720f84029b02f296f4a38/propcache-0.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ecef2343af4cc68e05131e45024ba34f6095821988a9d0a02aa7c73fcc448aa9", size = 40428, upload-time = "2025-10-08T19:48:35.441Z" }, - { url = "https://files.pythonhosted.org/packages/5b/5a/bc7b4a4ef808fa59a816c17b20c4bef6884daebbdf627ff2a161da67da19/propcache-0.4.1-py3-none-any.whl", hash = "sha256:af2a6052aeb6cf17d3e46ee169099044fd8224cbaf75c76a2ef596e8163e2237", size = 13305, upload-time = "2025-10-08T19:49:00.792Z" }, +version = "0.5.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b3/9a/9fbf4e4ec0c2d7f1c32519fff782ef467859b8faa9fbc5331a96f6395d43/propcache-0.5.4.tar.gz", hash = "sha256:ff6b113f50bc066a698db5d944d2c6dc7507168dd3341e255a8892fd0715a558", size = 61545, upload-time = "2026-09-16T00:17:14.386Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/40/14b21e505b7921617466576423f188a5c9caddfdaa1cf4b2b8a83d8fe216/propcache-0.5.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:897d1ddf6716e8f47200f7aad9a0efa6cc7586df66c6defa572f9eab379c078e", size = 86393, upload-time = "2026-09-16T00:14:06.9Z" }, + { url = "https://files.pythonhosted.org/packages/e7/4b/5a52e1a7b43563f7d408814194bb23cc8bf214eb6b86639b667a33a8d0d0/propcache-0.5.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9cbfff4423eef4cc6cafc021469641a2b835f610b2647a6c5281903e21b8670d", size = 50431, upload-time = "2026-09-16T00:14:08.025Z" }, + { url = "https://files.pythonhosted.org/packages/05/cf/b5248180bf056cc76acc60c9c6e8c0ebbfdbd1c6cffd31fd14996927b7c8/propcache-0.5.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3fc24f209c1b7f7f688b66b98293954f5504279760999b58920ee12dd8471c1d", size = 52116, upload-time = "2026-09-16T00:14:09.114Z" }, + { url = "https://files.pythonhosted.org/packages/86/a8/7c6cd6bfead1a11f2e411e688640e6d26574cb0bde7dcaa7423b0b65ed7a/propcache-0.5.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:62530ca89187827e4a4fe733f971abe81a7542eeea48ff61995f19b64d7199c8", size = 238729, upload-time = "2026-09-16T00:14:10.357Z" }, + { url = "https://files.pythonhosted.org/packages/5c/b4/442715b2e980df51be52d203549279e027728f24c80b00b5e525e31cd5ea/propcache-0.5.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:56fc3f7599528db40b1efa0889a620116e2704144495273d66066e8164e45838", size = 246121, upload-time = "2026-09-16T00:14:11.735Z" }, + { url = "https://files.pythonhosted.org/packages/bc/5d/df0684fc2b1732a01a7bec26d7897369022712422d25b09c37ce7dbc88a2/propcache-0.5.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4f2d880ff60f45898f4acfa152aac8d04e3ee627d90ff4003491bf92239d5757", size = 251735, upload-time = "2026-09-16T00:14:13.053Z" }, + { url = "https://files.pythonhosted.org/packages/c7/06/519a5ebb48b6f94beb48396e55c905f12246a25c3a3608a7ec7bceabf50e/propcache-0.5.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6e9368e87a3efc285e559131092c5db643eb8e56de4ee42064d5baec22ef2bb5", size = 235381, upload-time = "2026-09-16T00:14:14.398Z" }, + { url = "https://files.pythonhosted.org/packages/3c/07/1e0a9bb310830f2245edbd5cd3c6d24a783c053c4efd8e08e386e513c940/propcache-0.5.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:004e685b315646c410771836e72a44f143bbe624f29653a42687815069a303d5", size = 208973, upload-time = "2026-09-16T00:14:15.715Z" }, + { url = "https://files.pythonhosted.org/packages/62/5c/9324fab27d6088eecc47fe4332bf7aaf8c1ded93c36f558391e8a06d41a7/propcache-0.5.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:594eb4c6ec35e7179b058481f4e9f02521b56de16fa577c4b85c76fb1bf8a9f8", size = 233897, upload-time = "2026-09-16T00:14:17.25Z" }, + { url = "https://files.pythonhosted.org/packages/9c/a3/570d92fc952eae93b676f3a1568f4b89264102abd3c982ab6a9ebec58dcf/propcache-0.5.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:2dba2f02d2d5c09ef8a0e6c1a42aeaa451f4be9898cb00b04fe98717da2eb23b", size = 223512, upload-time = "2026-09-16T00:14:18.87Z" }, + { url = "https://files.pythonhosted.org/packages/65/47/26810d889d89bba31db397e6a88f8984af775f5ed6bad0a29dce84324cff/propcache-0.5.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c3ef2818d63bc86071e9d2989ae75a1bc32b8f7059cfd9f5abbbee70c32e2ed6", size = 239043, upload-time = "2026-09-16T00:14:20.366Z" }, + { url = "https://files.pythonhosted.org/packages/89/2d/f9c47691aa024c8299a3afacd78d22a01ab57eb627b481b6089708e71017/propcache-0.5.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:dd2ac8f5b643454c2cc6b6118b13da16e88f4a6434fc3ba61aca384029f04f36", size = 208218, upload-time = "2026-09-16T00:14:21.801Z" }, + { url = "https://files.pythonhosted.org/packages/74/6b/d510c0c378cabbf9d0ac7b663af6d00f2e9074073d93b20c85f24aa5c071/propcache-0.5.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:4054acf80d40456a0537f2913b349718649d8d6458a14ab7f48d0ce28c30869d", size = 240301, upload-time = "2026-09-16T00:14:23.121Z" }, + { url = "https://files.pythonhosted.org/packages/3d/80/c80f6adaaa1e51f0db2dce8c9b3714d94ec45e358a21f9a1910b10b40a80/propcache-0.5.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:40e94adb1e7d39ff28a8bd8d8b8fbd1df6b9f40976dbe379134f1ce058e532dd", size = 230785, upload-time = "2026-09-16T00:14:24.458Z" }, + { url = "https://files.pythonhosted.org/packages/d9/e2/c32a7df3f39caa7f11b2eb37ea5b6960a6946f2bc7c4b8ff97bbdf6d6b6e/propcache-0.5.4-cp311-cp311-win32.whl", hash = "sha256:9f86f7259efe2c951f43e57d471c9b41daa5bfc7db9f67189059cf1ae6d77fd9", size = 42747, upload-time = "2026-09-16T00:14:25.715Z" }, + { url = "https://files.pythonhosted.org/packages/0a/8a/3db6a3543d8101263b4c52978b6276a04ead2caff2c5ab880d934f47bd89/propcache-0.5.4-cp311-cp311-win_amd64.whl", hash = "sha256:e904d4d01f36bd6e197590be1533c44e06058771e0746dd073a8ebb3ef880858", size = 46268, upload-time = "2026-09-16T00:14:26.996Z" }, + { url = "https://files.pythonhosted.org/packages/41/07/5222e2665bbf6e45847492ecbf3b9f3e4975a0ae300e5fd465df7d48ce55/propcache-0.5.4-cp311-cp311-win_arm64.whl", hash = "sha256:d42a9a856a4a6e2f6c10f1318c07e7daa498d6593abe745c71dae4521a26ca39", size = 43547, upload-time = "2026-09-16T00:14:28.143Z" }, + { url = "https://files.pythonhosted.org/packages/71/cd/348d58f142aebc4873345c6b31087629182ca6e0f2b3caeaa528cf882eba/propcache-0.5.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b28f41fa3b8c6900457f858ec5b03998f3a6d535fbc1bb2edec5961ea05ec429", size = 87285, upload-time = "2026-09-16T00:14:29.362Z" }, + { url = "https://files.pythonhosted.org/packages/df/f4/f3ffaee281b276da854ac1d7a6a506d26cbc62ea2e623756f1d0a4a1ba1a/propcache-0.5.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:dcbf346a318a5e30063f547630b02bb787ce2f45b6368d5da143660b6a3835d8", size = 50984, upload-time = "2026-09-16T00:14:30.473Z" }, + { url = "https://files.pythonhosted.org/packages/25/88/1d7df7201750b37765ef2b23bc1c526c028dadde80afa0f57a118fc01182/propcache-0.5.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:87a3caecf8095e48dc72f84bfa42e23a848cf410cc9cc13031fba4869b706a21", size = 52460, upload-time = "2026-09-16T00:14:31.692Z" }, + { url = "https://files.pythonhosted.org/packages/83/4f/48865bd02a16ee5236bc46166b2946f37b93e07b0eae355dac0be0b216ca/propcache-0.5.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:60a64cbccaa11b7760ce705a14ada17ba459e7ca9f23ba587eb013821032d7ef", size = 251768, upload-time = "2026-09-16T00:14:32.908Z" }, + { url = "https://files.pythonhosted.org/packages/b0/19/3742a5eed62317b03b4002ee865dc9fd720308bdd0da1f29a5786c630311/propcache-0.5.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a74bfa37147cc08fb29df10bd9c16f40fa7f860cd3a6d2fff853323a94f6e17f", size = 257723, upload-time = "2026-09-16T00:14:34.267Z" }, + { url = "https://files.pythonhosted.org/packages/cb/d5/ee6350fb0be9122bb6c67082a876d34b90d980d100c106af4b81023e04f4/propcache-0.5.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a4d7a54719b67338a305dca2ce6aafe366817df94ddfd4b5514374356f5ca546", size = 265597, upload-time = "2026-09-16T00:14:35.56Z" }, + { url = "https://files.pythonhosted.org/packages/85/9f/83a07b6ec0e043c050cfdd35fb0cf1b7897b91d554d6eea293740309afe7/propcache-0.5.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2814ecd8e818f487bee4b0f921bc4d1c176cc5fc71ac0f072d0fa67eda4ac14b", size = 250424, upload-time = "2026-09-16T00:14:36.894Z" }, + { url = "https://files.pythonhosted.org/packages/33/2c/a763a8251f50fba042af0fb1f02bfec4b31381e40aff760db2be7b2e1f84/propcache-0.5.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6af4693716bfb03f1752ef1b30faa593db2c01d5272e9b8564a1549452a979ab", size = 216748, upload-time = "2026-09-16T00:14:38.369Z" }, + { url = "https://files.pythonhosted.org/packages/6a/e2/4d11bea8fd6a777149c6c20645f873952eab5de3a2497aa11648ec9ab6ab/propcache-0.5.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4fbc1a15dc8cd1689508758d626b372b1f09d28d9577667feaf9e6bfcd8efcbc", size = 246533, upload-time = "2026-09-16T00:14:39.82Z" }, + { url = "https://files.pythonhosted.org/packages/9f/36/6683597de4907e70c717e3588c541202c66086a72ff3db58be49de66e72c/propcache-0.5.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:cdee8205a44d0be91bbac4c41b95d86641b72dfc7aef1279400e4fda3f26a937", size = 238173, upload-time = "2026-09-16T00:14:41.259Z" }, + { url = "https://files.pythonhosted.org/packages/85/84/cb08d79f1762daafeb2b030c470cd0c725c97b8ad67412457c6f35c53e9d/propcache-0.5.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:9a2a8a50a93dee0268a860a07fa3b4bd968f8ce4dbd794957da772f395368526", size = 251128, upload-time = "2026-09-16T00:14:42.652Z" }, + { url = "https://files.pythonhosted.org/packages/c2/0d/41b848036db6621370c1f2e5471a7da8149c730f8552a5257567721f4576/propcache-0.5.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:7ffafcbfc7b549ab940047e505c831eabac5e67de53e1bc174adbc5285c55944", size = 214821, upload-time = "2026-09-16T00:14:44.112Z" }, + { url = "https://files.pythonhosted.org/packages/f1/b7/adfae4bf9c63bccf12e2d9690a175c6579047a6eec3b5a6a5f51428c15e2/propcache-0.5.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d1f5a500bfcbb2c0ab85e98a0dcd70f5899d34efe365a0187700369a79603031", size = 254793, upload-time = "2026-09-16T00:14:45.429Z" }, + { url = "https://files.pythonhosted.org/packages/51/6f/eeca9647245d5f92e87d53e5f14335bb42fce1a7e6842c8045b364eded8b/propcache-0.5.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8a235f73d6e020855dc29dff012d920c02ee0feab8d73a24185a7569f4be1161", size = 247134, upload-time = "2026-09-16T00:14:46.976Z" }, + { url = "https://files.pythonhosted.org/packages/5d/a9/424e38838793d37160b4379c702f61c74c598fc6cd17204adbe3c554f7a8/propcache-0.5.4-cp312-cp312-win32.whl", hash = "sha256:b3083bfe87f95c756e610bd8025f26cbd1cd4aaa03a422f2d65efb7a97cd53d8", size = 43073, upload-time = "2026-09-16T00:14:48.338Z" }, + { url = "https://files.pythonhosted.org/packages/58/7b/6e8ef26f6d510a7916064fec68d55fcbfbdf7eb01e377480d66a122152d8/propcache-0.5.4-cp312-cp312-win_amd64.whl", hash = "sha256:98914de2c4d7f0f9f4a8c6ea4bf05841f4175796941e3ef7d47eb718f22311fb", size = 46190, upload-time = "2026-09-16T00:14:49.99Z" }, + { url = "https://files.pythonhosted.org/packages/08/b9/72028c5b56ced97f456de6aefa79435ca64d7f77af78ea8cf3c76fc5195f/propcache-0.5.4-cp312-cp312-win_arm64.whl", hash = "sha256:8876b39961e33d912afe3c1bee18ee564fdad0206f873cc15d522756b7f50737", size = 43075, upload-time = "2026-09-16T00:14:51.155Z" }, + { url = "https://files.pythonhosted.org/packages/78/4c/3b1365d58a667689e067e13d055fcd92bdf8d9a2fca3d9201b47ed5b3631/propcache-0.5.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:36c0d9db44b523ef93d03341b1c42d69ff01d673c053d1b1c6c3a363bcaa39ba", size = 85290, upload-time = "2026-09-16T00:14:52.342Z" }, + { url = "https://files.pythonhosted.org/packages/8f/61/5f9c29c3aa67c30238c4eadf95149b1d983a48f69b86b0cff927a7d6df13/propcache-0.5.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1d52a05dc417279f7e5c7618c5dfbbc29923aaf9bc0a5c1802ddcebf54c61a0", size = 50027, upload-time = "2026-09-16T00:14:53.67Z" }, + { url = "https://files.pythonhosted.org/packages/25/7d/c1ab1ef09e9d4d835be5d58c0a32a1e1de8397abaa4e502a9d4141328cad/propcache-0.5.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:44149f46500a0a41b95b4d99c2e586a77319539730607b9892974a092788b111", size = 51425, upload-time = "2026-09-16T00:14:54.826Z" }, + { url = "https://files.pythonhosted.org/packages/73/36/0093091ebb270fcd1bc1f6e095f93b2e0ed7f1011c28837dc2dbe5f96b99/propcache-0.5.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dbab5f5ff6897c81f355d079010cdae85b02e5a0b518b5251523b8ad8ae9ac3c", size = 233595, upload-time = "2026-09-16T00:14:56.09Z" }, + { url = "https://files.pythonhosted.org/packages/ae/8f/0de9d4c8e05ce0be71b436919a216bd7fc5cc6e2691c0602295efb22b9ed/propcache-0.5.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c3e98c55bde2bcf7db3c70d1aed7ae9aa8aebbf19a250c66645cde44cdb8b867", size = 240318, upload-time = "2026-09-16T00:14:57.674Z" }, + { url = "https://files.pythonhosted.org/packages/7d/71/2b35e91455209b85ee98f7859583e0814fab57d3af0f2381aaee34c37304/propcache-0.5.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:db3ae52ccc150dbc84704e9d642743897f3e1c54742ff34cacb661e52e3818a9", size = 246649, upload-time = "2026-09-16T00:14:59.352Z" }, + { url = "https://files.pythonhosted.org/packages/ed/74/08e6c1faf26ee2732023a3828787ba535557122774f4a386b1f715cbd8e0/propcache-0.5.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f85915e00dcb1cd9f2f890ead064ed40a27df06f0db65be427b29482ae357572", size = 234316, upload-time = "2026-09-16T00:15:00.696Z" }, + { url = "https://files.pythonhosted.org/packages/5c/9a/08385733c9321c9bb78039d3ff31045e4fca962d9665023c4eb70f998819/propcache-0.5.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c2ba30a89035b57b73e00475de948521602f543d79ce01db10b04b36c4c76fc8", size = 204666, upload-time = "2026-09-16T00:15:02.019Z" }, + { url = "https://files.pythonhosted.org/packages/1d/f4/e87bc7629af9a14a752b218764a78742d73c2c563ac58315da6841f0cbe4/propcache-0.5.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ae58f361bd5dae942717c65d3413b478c70aea9c462599e7b9adad3731db3894", size = 225900, upload-time = "2026-09-16T00:15:03.394Z" }, + { url = "https://files.pythonhosted.org/packages/d9/6d/11014938d3fe9bea2ea2dcf930f26ed565bfb2f5be3c756362ea48c92636/propcache-0.5.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:96f7c5c15656040ddcbc51e56dc59b58aa25999d743c126abd425b9766ab43e9", size = 219988, upload-time = "2026-09-16T00:15:04.811Z" }, + { url = "https://files.pythonhosted.org/packages/dc/72/fbf17c589f92c0b3bbf6709a425661f8ef2ed0d46b38985a7d7b5a0f6b91/propcache-0.5.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7cc528e760a8af06f2b13e9b9f362cd90c7c718ea61228a96dbd31ba16ed7f47", size = 233611, upload-time = "2026-09-16T00:15:06.498Z" }, + { url = "https://files.pythonhosted.org/packages/55/7e/dbd637572a279692e5518d117274a9331bf5faac59f191d30e82521a3ec7/propcache-0.5.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:425f8cc86ab5018b4b8d4a23bc8e74d964bd3d757c3702e301aa79be76c53f6c", size = 204333, upload-time = "2026-09-16T00:15:07.961Z" }, + { url = "https://files.pythonhosted.org/packages/ba/5a/f99c92068f1e0f5c886899ce0e4a619db376ca98c5279d93f95bd86906af/propcache-0.5.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:a5793c7698a53f56f4a1889a4737c7eeb1b7ad0842fa6b1abca22913ff79c8c1", size = 235177, upload-time = "2026-09-16T00:15:09.334Z" }, + { url = "https://files.pythonhosted.org/packages/ee/28/95456fabd2daf6be89049a13fbf03341756014d2959c83d12957d4c49694/propcache-0.5.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c02c0e570c5c7e077b0181a9f3cdb7d4c3617d1cda6b5c95bd5d34022923d82c", size = 228982, upload-time = "2026-09-16T00:15:10.729Z" }, + { url = "https://files.pythonhosted.org/packages/b1/bb/df90f62c9cf7c93ea235f6f9405143bba802914607317266dd81fc8d737e/propcache-0.5.4-cp313-cp313-win32.whl", hash = "sha256:3e413d7a4a9b4866b7a761d6060d434b64d23cd35122eda3b026a0bbe8196b25", size = 42611, upload-time = "2026-09-16T00:15:12.111Z" }, + { url = "https://files.pythonhosted.org/packages/01/bc/e0a7b84af04ec02d73a48aa71f091e1e4a2107e3074b7ce12195b66901f4/propcache-0.5.4-cp313-cp313-win_amd64.whl", hash = "sha256:0c889f6fa84957bc7e8b4eab71fd16a0455068d5045e3aa40c733071d2b2fd77", size = 45342, upload-time = "2026-09-16T00:15:13.519Z" }, + { url = "https://files.pythonhosted.org/packages/9a/70/50b031cafe72a5c1878b903ee87303f71313345566bf3d6ec202e5ddc9ec/propcache-0.5.4-cp313-cp313-win_arm64.whl", hash = "sha256:69fc35c0779522da366c563e5faf203ffc1f8ff0021d5b1337fa4efa5be73177", size = 42408, upload-time = "2026-09-16T00:15:14.788Z" }, + { url = "https://files.pythonhosted.org/packages/33/c9/07e227b930c8ae513b8ef1aae3793499be097bffcdf7aee4fb8b33db4cd1/propcache-0.5.4-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:e6720ba44ad7e72174314d0e1fb0172494cff5c73a3a8a2159c3d2402ff15565", size = 85933, upload-time = "2026-09-16T00:15:16.073Z" }, + { url = "https://files.pythonhosted.org/packages/e4/e1/6710bb44510c4e4a8e0f004bbaf3cecfd048141309c77bae56d4e5a6ebc1/propcache-0.5.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:4cfe0a92ae30151869e67a4b5f5e105e4e03ad30b3f38e5211b5bf77d0881993", size = 50179, upload-time = "2026-09-16T00:15:17.377Z" }, + { url = "https://files.pythonhosted.org/packages/e2/22/b533b493d7025456f44518b33e53e000021a20fe7c27b88cf3d341df7186/propcache-0.5.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d759d05634f1b038fb625a66662a8c85e5a8fec912da381b5149ddac107482b", size = 51942, upload-time = "2026-09-16T00:15:18.589Z" }, + { url = "https://files.pythonhosted.org/packages/f1/74/70ac8430e28f21e442c7bcb964eb46c4363f6881ade4aa0e978bfd8d503a/propcache-0.5.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:251c63dd46a0659bb875cb254dc4c1e79ee91a847c737cd62373295afc2235dc", size = 232647, upload-time = "2026-09-16T00:15:19.905Z" }, + { url = "https://files.pythonhosted.org/packages/72/95/f222f13b6fe623310be0eb61a673bf26df439ce27e563ca8e422d0818777/propcache-0.5.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7a8d5ff04eb1f85698a78d20c62a14676e7b960dcafde09a388d60ad377d355d", size = 241541, upload-time = "2026-09-16T00:15:21.3Z" }, + { url = "https://files.pythonhosted.org/packages/a2/3e/763e370340db16115c5e63ad46e21ef0770a7f06928b3d3b62d8f8edfca4/propcache-0.5.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7b9100a93b372418d8688f3f2a3e5b45c64d70ca4d6176e121aca1e3bfc1e32f", size = 245332, upload-time = "2026-09-16T00:15:22.802Z" }, + { url = "https://files.pythonhosted.org/packages/96/d3/e97cd6f5de2176bd90ed4076c7a9b5e09d0f0b9687d00a576507988bb62c/propcache-0.5.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc07876cfb079b6f6f36d21ce75784ad6c2c6b563eeac0ed26c2fa2669b85df9", size = 232757, upload-time = "2026-09-16T00:15:24.374Z" }, + { url = "https://files.pythonhosted.org/packages/f9/4c/6766e5f60bcda26d244333aa71d0a702c1c9b21b251d543c7af5953d1eee/propcache-0.5.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0951315a6b3142ee2167404d707743f0157c110091342b1aa0accac5cf0e4acf", size = 204389, upload-time = "2026-09-16T00:15:25.667Z" }, + { url = "https://files.pythonhosted.org/packages/b8/5e/ec4bb09a70b26ea99d76a8292c3383b960b296de2b347ac9986678f1761c/propcache-0.5.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:bee7d3aed13d56f54e681df38c3a23031bc9e3863f687d9d598825c9146acd7d", size = 228217, upload-time = "2026-09-16T00:15:27.11Z" }, + { url = "https://files.pythonhosted.org/packages/e1/7d/b53922ba7d9e5bf797324e63aa05906ec240871899f779628df068743e2d/propcache-0.5.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:4e985382be6d15da8d0c2710a6fa7b9070fc9ecdeefb7f580e88373984ec8be3", size = 216947, upload-time = "2026-09-16T00:15:28.532Z" }, + { url = "https://files.pythonhosted.org/packages/ff/39/b62eee45e5ea4de094a258cbb3b01c1e856ca51ddfd95b43135c5effd1eb/propcache-0.5.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:9e9ab13760aa8b6d0881ae7cb04fd891d8d490cd2554ea8e79bb278399169bcc", size = 233457, upload-time = "2026-09-16T00:15:29.977Z" }, + { url = "https://files.pythonhosted.org/packages/cc/a9/feec61ed296d993db9dd097e0f6723e3f576a647722367547495e4c5b05c/propcache-0.5.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:1b2f3bec4261a94019575481c726c29850f72e27907773c75b1de421e20e9f9d", size = 204131, upload-time = "2026-09-16T00:15:31.74Z" }, + { url = "https://files.pythonhosted.org/packages/92/4d/411ef380cddad28dc001f1c6d75ec72c76cd3817030f68ec1ccfba0ec6c1/propcache-0.5.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:720cf832eb2d0b0dfee129cb3335a26f6ce3cc45ee1187e8f0731758caa16792", size = 234820, upload-time = "2026-09-16T00:15:33.087Z" }, + { url = "https://files.pythonhosted.org/packages/15/37/c988229753629ef1cfd5198337a83e624780ea2b3787efe9e747c05aad2d/propcache-0.5.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9fb0a5be8d9aa213150e8d8148a42aca4984b285bcad1e69587dc4298edd929b", size = 228350, upload-time = "2026-09-16T00:15:34.533Z" }, + { url = "https://files.pythonhosted.org/packages/12/49/5ef1c5cf98591da3c5b952b39e6a298084cc1ce353bc70f85e82397a5036/propcache-0.5.4-cp314-cp314-win32.whl", hash = "sha256:30cc1cebaf9aef49db06357a50398323ae04d70460c0491837d026ab7d6452ea", size = 43578, upload-time = "2026-09-16T00:15:35.957Z" }, + { url = "https://files.pythonhosted.org/packages/1e/9e/a0ac821a2229186af5e2e3c3635a78abb23cfddca57f38513ab5d70420f3/propcache-0.5.4-cp314-cp314-win_amd64.whl", hash = "sha256:0a095db8e15a6020db149ecbed6461939fe74f6acaa3ae8b702a1fe8c38cd983", size = 46304, upload-time = "2026-09-16T00:15:37.655Z" }, + { url = "https://files.pythonhosted.org/packages/a1/19/c8d0d36a9d16cba5dcee67d389c9333b988c8986a653a61c00a451817a46/propcache-0.5.4-cp314-cp314-win_arm64.whl", hash = "sha256:45488d1a5f9ab5bd90aaa1ca20f50fe1922b8ffad71a2009d2adf41355897aac", size = 43440, upload-time = "2026-09-16T00:15:39.091Z" }, + { url = "https://files.pythonhosted.org/packages/2c/e9/42f1da77cacfc184e6ec929557ef653b7961bbf6f1da460b9221273948b3/propcache-0.5.4-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:53eaa697c4d0422ff4cb714d00231b43352064d97b944033b30c1d57cc506ec0", size = 90672, upload-time = "2026-09-16T00:15:40.306Z" }, + { url = "https://files.pythonhosted.org/packages/cf/2f/4b79940908c6ab8c795097c102999d7bc1f7e0b8604dfd1c232f9d99d67a/propcache-0.5.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:886b59c4d28ca97dd23b025fdfc50a0356be934efbbbca89ad26230067f86fe5", size = 52586, upload-time = "2026-09-16T00:15:41.575Z" }, + { url = "https://files.pythonhosted.org/packages/eb/07/02196ae6320c110235bb343f90dbd34be41f8b8964a3ee30db84ec12579e/propcache-0.5.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:3fa15757fea1dfcd5b7745cad9f4638929605531bd4018ab2adff7955f1a403d", size = 54335, upload-time = "2026-09-16T00:15:43.027Z" }, + { url = "https://files.pythonhosted.org/packages/6f/44/f48b9a131985659924df5fa5093f68fe72c7ee375329802989ba3126efc6/propcache-0.5.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6f0093ac3e9daada202c2082439d414a625c57184727a46e112a3fb2a81cb788", size = 297567, upload-time = "2026-09-16T00:15:44.373Z" }, + { url = "https://files.pythonhosted.org/packages/04/a1/418d956d2735139f77fc35262179f1f52c23aa666de5a8ab3819c1ae7854/propcache-0.5.4-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3cd3a7edb6b95b9b33998135ebfa18d709da82290fb8f27c858970b5a12c8b56", size = 297477, upload-time = "2026-09-16T00:15:46.048Z" }, + { url = "https://files.pythonhosted.org/packages/69/fd/ff811fdb6d3d3e67fd9bbfb75881675d34a42d0ef29a45d33e3e233dde07/propcache-0.5.4-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c174bfd1c48a1b51a3078e95586dde718374bac79719ab3541ec9e74aec40574", size = 302669, upload-time = "2026-09-16T00:15:47.458Z" }, + { url = "https://files.pythonhosted.org/packages/fc/57/527910c455b5ec62f6871bef45d4f79fea16cb8c966ba0d4a07f0339ddc4/propcache-0.5.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a219f0ac59817a9114dd2aa57c13180f993e819ba658c7ddab4b66ed1ee0d370", size = 287908, upload-time = "2026-09-16T00:15:48.99Z" }, + { url = "https://files.pythonhosted.org/packages/1d/86/f69ab82707534a0cb2057bdca04f9200a71214c7551800f9d34d6ac39e4f/propcache-0.5.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:17a7400cec0256f0a71ae71f9da398f9894c956ff6668a1c9d317b3367316320", size = 249804, upload-time = "2026-09-16T00:15:50.486Z" }, + { url = "https://files.pythonhosted.org/packages/27/19/60677af50d93be4256213de7cd487f056944c048b9c0b6f2e45b3a30f666/propcache-0.5.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:978f28401afbc76cdc3df9e1717b4229a06b626a1dcc75db4e1f2beb3884c3e9", size = 282344, upload-time = "2026-09-16T00:15:52.029Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f7/a0057808a91fb3b6a5f3602b528f0cdcb3d53e0ff8315d73fabdfdf8fec4/propcache-0.5.4-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:4a1f4f5ffa55dce6307631f3cb2948e117e665966ea512e0d502b16c24f567e7", size = 270167, upload-time = "2026-09-16T00:15:53.466Z" }, + { url = "https://files.pythonhosted.org/packages/83/c8/f4a865490df0dc0c8531d4e59ac411cb6dc24bb255d2396a6f1c60a368f4/propcache-0.5.4-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:213bb68d9ced5cf2bf717b1071bf2b09b4b04c426256f9fe6d054c60318424c4", size = 286551, upload-time = "2026-09-16T00:15:54.995Z" }, + { url = "https://files.pythonhosted.org/packages/b0/67/b4faebde9da4e8173d0e5a30e8cd31335914af7ef350b988f27fec588cfd/propcache-0.5.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:286867fb156488c251a3721766e380ac4495e4fd6b51aaa1403d89ce7f4359d9", size = 249595, upload-time = "2026-09-16T00:15:56.505Z" }, + { url = "https://files.pythonhosted.org/packages/f6/40/52e1dd5636e9f5a27f6b5a4b4e2f33c322fd72afe956c397d82523ec4a80/propcache-0.5.4-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:445ee3bfb46e85838387fb3c536a73cc0b994dc192b004e40e170adc54aa2a7e", size = 286700, upload-time = "2026-09-16T00:15:57.985Z" }, + { url = "https://files.pythonhosted.org/packages/d5/0e/30b2b324b93ff31a0bab539c102aae59e84e444031b2742150a7646aa1bb/propcache-0.5.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:48cb48c5346a97de792254af77715aa2529c2a1ebc5f586aa0aae44a02f1fe57", size = 280500, upload-time = "2026-09-16T00:15:59.487Z" }, + { url = "https://files.pythonhosted.org/packages/64/36/721bb59f682ff060d0c8df64274fca8cd0521b1a54506c2eedaef795b7f5/propcache-0.5.4-cp314-cp314t-win32.whl", hash = "sha256:03b229037d25b801e7af53fd52b9fc49d9439b036fca1e087e02780631adfa97", size = 46121, upload-time = "2026-09-16T00:16:01.349Z" }, + { url = "https://files.pythonhosted.org/packages/c1/86/0b1b80fa1ac3a0aac44e2922a6964fbe9cd52af5eab8fa933bf9e90b030c/propcache-0.5.4-cp314-cp314t-win_amd64.whl", hash = "sha256:8a1fc236528c457cd739c88abe823da851b7ab645d72792f88658114cc340c12", size = 49154, upload-time = "2026-09-16T00:16:02.901Z" }, + { url = "https://files.pythonhosted.org/packages/69/4f/9fe6f05a47cb550c823155052116f710064b6be5c6e8ec4e9faae7e18115/propcache-0.5.4-cp314-cp314t-win_arm64.whl", hash = "sha256:135036c5cfc93864affb0f9af9a27e5d7a71cb7bd745e7b6dbfc2d56cc30e827", size = 46005, upload-time = "2026-09-16T00:16:04.266Z" }, + { url = "https://files.pythonhosted.org/packages/58/25/895a11d1e4c5c2acc6d816e2bece34e02d9dc92f2182ae276cd819e9e804/propcache-0.5.4-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:45bf2e730ab8905d0527fe05a86500f406e64305c34cc81ebe64b4617cab9760", size = 85634, upload-time = "2026-09-16T00:16:05.599Z" }, + { url = "https://files.pythonhosted.org/packages/58/41/c0acd69271de7a1cf439e77d5d60c18575fd09bad56e798b95fa23458ea4/propcache-0.5.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:31eb43ba2edc704ab2ec27815315dd8a19def0fb16215be4cfe8d32fe78ffd51", size = 50084, upload-time = "2026-09-16T00:16:07.384Z" }, + { url = "https://files.pythonhosted.org/packages/a5/1a/ad561f99f90884089e6403b76c220610809429ba868a81a2e7ce115d32e0/propcache-0.5.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:174507f82d3594622acb1dd2dafecf2d899d6d506335494e7107767bf05f3aae", size = 51692, upload-time = "2026-09-16T00:16:08.956Z" }, + { url = "https://files.pythonhosted.org/packages/e9/07/057bdd3a9609ffad59b06239cceee784b047f6c720247bfaa36d2103e138/propcache-0.5.4-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:50e337653721d20ead710da33bf44487fbe8a0db8782714b60306481e9f95b51", size = 232947, upload-time = "2026-09-16T00:16:10.466Z" }, + { url = "https://files.pythonhosted.org/packages/fa/dd/d36ad35986718530498a65e45e3713f9f0e6a580f192ef02d2ef7cae9b52/propcache-0.5.4-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0d21d0d2c82bbfeb1677a9711f38df968f9837576102bb4add1bd449d28d88f1", size = 241250, upload-time = "2026-09-16T00:16:12.056Z" }, + { url = "https://files.pythonhosted.org/packages/fb/81/f1459415cdb6c10d46942779de39bb59a77b38e5a76bb1def9227962eb45/propcache-0.5.4-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ccf4f7a79e26bb7efb06ecd50c177833b71df05cbc748701372325e6bcc17f6f", size = 245150, upload-time = "2026-09-16T00:16:13.596Z" }, + { url = "https://files.pythonhosted.org/packages/ce/4e/58b9b1460afc97a4c0b17ee89af701c4011d4d7f46470eba3aaff76a8069/propcache-0.5.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23278f808cd81d5ada7184a76606b925fb3389c60e1077b2cd7da7b1fcf0553c", size = 232166, upload-time = "2026-09-16T00:16:15.126Z" }, + { url = "https://files.pythonhosted.org/packages/b9/c6/5a79e0eda3e7b6987d03d8c622ff6d52a42165a12e8418eb37694b9cc4b4/propcache-0.5.4-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e738ab81179510ce79b2eac9a6ecf47feffd9e76d1c72e403005dddb6e36c06c", size = 206085, upload-time = "2026-09-16T00:16:16.713Z" }, + { url = "https://files.pythonhosted.org/packages/4e/72/940aed42c73f9da345ca2de0f6e835c726498159abca5f1ef14fb0a2af8a/propcache-0.5.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:a419ee85e654927baabda3929c03c0cc1112bf472ff0dfd6142f4e3a81ca4162", size = 228460, upload-time = "2026-09-16T00:16:18.352Z" }, + { url = "https://files.pythonhosted.org/packages/85/71/3f54e1535c8f323d91ba566044d7c2b39ff6f6a2f1d0bd9071779d07b9b3/propcache-0.5.4-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:b61805357d966680acf68b3b6d49772631ed9df44ebece10ff1460e117a7da8a", size = 218350, upload-time = "2026-09-16T00:16:20.064Z" }, + { url = "https://files.pythonhosted.org/packages/a8/f4/025890cc389ac3ec485ecec607d4a7ca47e15bfa2a465746ab98af602536/propcache-0.5.4-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:58134228927cee6c047d626c08e60a81be604a20578a12ce752cc5c9a84d4826", size = 233156, upload-time = "2026-09-16T00:16:21.624Z" }, + { url = "https://files.pythonhosted.org/packages/04/29/b39cae08c87c140d3d274f0a2c058cb5588e836175c3309e260b230ab07d/propcache-0.5.4-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:350b272b2279f4135a64fc0c304a5d08e28a137c9573442c606152446638a831", size = 206206, upload-time = "2026-09-16T00:16:23.204Z" }, + { url = "https://files.pythonhosted.org/packages/18/61/e16462ef18a87247dc9ebbd5c606f46d5ce67e708bd9cc734dd0d9222564/propcache-0.5.4-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:45bebbe252550fec975ba3b62bc6f931643cfd3b5464ef47619cf3fef154e01c", size = 234469, upload-time = "2026-09-16T00:16:24.841Z" }, + { url = "https://files.pythonhosted.org/packages/9f/84/b6a1490922427204fc47df920ed002eec709621de6b79b11592bf45c623a/propcache-0.5.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:ada748108a43d29b7c328ba7db3755327cd94f028bcc1a7ee3f0addcfacd9c38", size = 227311, upload-time = "2026-09-16T00:16:26.549Z" }, + { url = "https://files.pythonhosted.org/packages/ff/5c/5a59527582e9bcb694b2f08b9894134b65a0f5f79dbff174f054f5f74ed0/propcache-0.5.4-cp315-cp315-win32.whl", hash = "sha256:ee19113bce2f3acd46432050688b70f61acd6857d75abb9ec96341b7e9ced123", size = 43512, upload-time = "2026-09-16T00:16:28.313Z" }, + { url = "https://files.pythonhosted.org/packages/26/07/93cf699ed363681e754d7c3fad587fb09ef6b65618ee193332ad16a68d7b/propcache-0.5.4-cp315-cp315-win_amd64.whl", hash = "sha256:ceb3e879afac028f93d272c957814695dc5569e4904262dbee92f6c41bd5e4a3", size = 46264, upload-time = "2026-09-16T00:16:29.751Z" }, + { url = "https://files.pythonhosted.org/packages/65/10/fef04fbdcd44a4a163cb5ff5674599c6d6fdefd64a5a459438f9ad2ba042/propcache-0.5.4-cp315-cp315-win_arm64.whl", hash = "sha256:c83acbce9f2b5e3f5f5eda9e53d2001fed22fcdfef81274a9e02d8fd53b70a30", size = 43395, upload-time = "2026-09-16T00:16:31.5Z" }, + { url = "https://files.pythonhosted.org/packages/70/f6/7e2f4dab0b92ab46111bd48cee9ee1e5f519514c44e3779ede5358d7ada0/propcache-0.5.4-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:a5e8ef588c109725dc713ba69aadcac00a1ef90c2ce9c0a8c7075128f569f47f", size = 89825, upload-time = "2026-09-16T00:16:43.115Z" }, + { url = "https://files.pythonhosted.org/packages/9f/8b/dfeff925cb6ced97ede701d5c6a99998da963c6f2e06abbf879c9dac5b54/propcache-0.5.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:4d86476a935c88963d9b8e1a9a0d38188790e9622169bfbafa173046846709d3", size = 52159, upload-time = "2026-09-16T00:16:44.754Z" }, + { url = "https://files.pythonhosted.org/packages/24/6c/924c810be5b7cf218ef47e707cf06d34adb4e3f3a31e3c24c55c6d945a88/propcache-0.5.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:f5470694918830da62fac9e69133b53d23b736d7070e587b27a4a2be37e08e68", size = 53956, upload-time = "2026-09-16T00:16:46.762Z" }, + { url = "https://files.pythonhosted.org/packages/3f/b6/9ed0a5c939b58b6bed740a05b5d0f919f0b318d03284b4b6d81a0fe8a29a/propcache-0.5.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10ef33a68a61ce317e095fd2e202a592ea92392b90944a78c993f0d9a73ab06c", size = 295235, upload-time = "2026-09-16T00:16:48.577Z" }, + { url = "https://files.pythonhosted.org/packages/5a/eb/5ce886e902a2e781dddf110993d5329458a9b1a8626b876c65e5e25bf413/propcache-0.5.4-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5cacf3c9efd09df409dc33654dd077e1c245ba8fb747b0f0236ef41b7c49b589", size = 294463, upload-time = "2026-09-16T00:16:50.539Z" }, + { url = "https://files.pythonhosted.org/packages/f2/88/c98f49183ecd3e5b204a556f0ca47baa02c2206a500fe8c7ec1726297b0a/propcache-0.5.4-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:770e8209d018175fc0063936fa9583b6d27e88c5ad31543f3383d66080efdd62", size = 300081, upload-time = "2026-09-16T00:16:52.423Z" }, + { url = "https://files.pythonhosted.org/packages/27/0d/c5090f9e6f67cbc30a2b744c7bb0f8006dcba5ec1b0d82f866ae1cc7c5c4/propcache-0.5.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:03969626faf0783a592dfa17e28eac06018bd0b44dafae6943d53b92421a7f72", size = 285360, upload-time = "2026-09-16T00:16:54.141Z" }, + { url = "https://files.pythonhosted.org/packages/ac/9c/34a55396910583ed07926669ab309dde2213a2dec05a7e946bb90ad66908/propcache-0.5.4-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef3b928d9c984322b5c44e6964d8dbc653da87d2d8ee1647fa6da43072e650a9", size = 248014, upload-time = "2026-09-16T00:16:56.062Z" }, + { url = "https://files.pythonhosted.org/packages/cd/b5/c0a142b656093ca397039dd3fe166cbb87c945712b534546514a24cd2611/propcache-0.5.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:7177c43eddf10a0893c4fec52ebb408fdcd7f7d63962caace9180d8f81b14ece", size = 280662, upload-time = "2026-09-16T00:16:58.044Z" }, + { url = "https://files.pythonhosted.org/packages/54/28/fab2809c2e337fe26becea9648e84d5cef46075c91b826acb13e4f9dd04e/propcache-0.5.4-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:420162a77f94eb1cf5ef7893f500016dabd548e73de956785a1dd899cc73006a", size = 266149, upload-time = "2026-09-16T00:16:59.702Z" }, + { url = "https://files.pythonhosted.org/packages/3a/11/7ddf336288b2678a5f054f8da2e2bd1a719f5d4b7de714d9c6bd588a2313/propcache-0.5.4-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:3eb2e820e8e2101407da93f17c57cbb7d225461955fc60105daaba14cd421ee2", size = 283097, upload-time = "2026-09-16T00:17:01.459Z" }, + { url = "https://files.pythonhosted.org/packages/1a/ae/351b1a5225f5473c411d9a612a229ae147cf0cf65c72ad838b87219ea8e8/propcache-0.5.4-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:13e52b6e0bde97dee98ab66552dbff2931649c96f1ac432eac299fe689ec373b", size = 248160, upload-time = "2026-09-16T00:17:03.298Z" }, + { url = "https://files.pythonhosted.org/packages/3f/d0/7f79f061e30d135bb615c9782c94a74652033d00b49254edbbf35a9165a8/propcache-0.5.4-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:12682126712ddc19b70ff819debbd279e58adf1f0c8f8f8138c18ade2044b284", size = 283036, upload-time = "2026-09-16T00:17:05.238Z" }, + { url = "https://files.pythonhosted.org/packages/53/3c/016f1cad8bf4c428d748cf399b2bac603026fbfd6966e6a5579b5c5b6956/propcache-0.5.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:3af0c8642b2da4815d86e631232ac8286e17644fad907c19508aa8e7cb4ba8ad", size = 279350, upload-time = "2026-09-16T00:17:06.881Z" }, + { url = "https://files.pythonhosted.org/packages/ea/60/d8f72cb24b412487ed4c397f539117d3b74c3c33dd32020e91fe00a958a8/propcache-0.5.4-cp315-cp315t-win32.whl", hash = "sha256:1df8d8561b21465c5dd56110a01caf897e026d065b4b84e98a488209094272ec", size = 45874, upload-time = "2026-09-16T00:17:08.567Z" }, + { url = "https://files.pythonhosted.org/packages/d4/ef/8bae0a316d406644450522f2f3d44a4e19632f5f3bb60d1d0e6c53842616/propcache-0.5.4-cp315-cp315t-win_amd64.whl", hash = "sha256:02c0a34f16889cf800f10f0247a564d8ce6eeab6ffcd7c87198f769067eb8432", size = 48574, upload-time = "2026-09-16T00:17:10.077Z" }, + { url = "https://files.pythonhosted.org/packages/57/be/bcc053f66a97355683884b448198e79580fae8e8fa4d96b9bb01614e9913/propcache-0.5.4-cp315-cp315t-win_arm64.whl", hash = "sha256:dc4242ca653c9b30ab51c5f8193323e7bc0928f897ee9103201e59a43abcb72e", size = 45625, upload-time = "2026-09-16T00:17:11.377Z" }, + { url = "https://files.pythonhosted.org/packages/f5/cd/785c64ed382f3f04201870267b02783f63b4678c2acfddc177a3ebcc2727/propcache-0.5.4-py3-none-any.whl", hash = "sha256:62c60aec739ed00124573cce1178138fd690c7676352d67a37328c1cf51d7468", size = 16338, upload-time = "2026-09-16T00:17:13.106Z" }, ] [[package]] name = "protobuf" -version = "6.33.0" +version = "5.29.6" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/19/ff/64a6c8f420818bb873713988ca5492cba3a7946be57e027ac63495157d97/protobuf-6.33.0.tar.gz", hash = "sha256:140303d5c8d2037730c548f8c7b93b20bb1dc301be280c378b82b8894589c954", size = 443463, upload-time = "2025-10-15T20:39:52.159Z" } +sdist = { url = "https://files.pythonhosted.org/packages/7e/57/394a763c103e0edf87f0938dafcd918d53b4c011dfc5c8ae80f3b0452dbb/protobuf-5.29.6.tar.gz", hash = "sha256:da9ee6a5424b6b30fd5e45c5ea663aef540ca95f9ad99d1e887e819cdf9b8723", size = 425623, upload-time = "2026-02-04T22:54:40.584Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/ee/52b3fa8feb6db4a833dfea4943e175ce645144532e8a90f72571ad85df4e/protobuf-6.33.0-cp310-abi3-win32.whl", hash = "sha256:d6101ded078042a8f17959eccd9236fb7a9ca20d3b0098bbcb91533a5680d035", size = 425593, upload-time = "2025-10-15T20:39:40.29Z" }, - { url = "https://files.pythonhosted.org/packages/7b/c6/7a465f1825872c55e0341ff4a80198743f73b69ce5d43ab18043699d1d81/protobuf-6.33.0-cp310-abi3-win_amd64.whl", hash = "sha256:9a031d10f703f03768f2743a1c403af050b6ae1f3480e9c140f39c45f81b13ee", size = 436882, upload-time = "2025-10-15T20:39:42.841Z" }, - { url = "https://files.pythonhosted.org/packages/e1/a9/b6eee662a6951b9c3640e8e452ab3e09f117d99fc10baa32d1581a0d4099/protobuf-6.33.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:905b07a65f1a4b72412314082c7dbfae91a9e8b68a0cc1577515f8df58ecf455", size = 427521, upload-time = "2025-10-15T20:39:43.803Z" }, - { url = "https://files.pythonhosted.org/packages/10/35/16d31e0f92c6d2f0e77c2a3ba93185130ea13053dd16200a57434c882f2b/protobuf-6.33.0-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:e0697ece353e6239b90ee43a9231318302ad8353c70e6e45499fa52396debf90", size = 324445, upload-time = "2025-10-15T20:39:44.932Z" }, - { url = "https://files.pythonhosted.org/packages/e6/eb/2a981a13e35cda8b75b5585aaffae2eb904f8f351bdd3870769692acbd8a/protobuf-6.33.0-cp39-abi3-manylinux2014_s390x.whl", hash = "sha256:e0a1715e4f27355afd9570f3ea369735afc853a6c3951a6afe1f80d8569ad298", size = 339159, upload-time = "2025-10-15T20:39:46.186Z" }, - { url = "https://files.pythonhosted.org/packages/21/51/0b1cbad62074439b867b4e04cc09b93f6699d78fd191bed2bbb44562e077/protobuf-6.33.0-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:35be49fd3f4fefa4e6e2aacc35e8b837d6703c37a2168a55ac21e9b1bc7559ef", size = 323172, upload-time = "2025-10-15T20:39:47.465Z" }, - { url = "https://files.pythonhosted.org/packages/07/d1/0a28c21707807c6aacd5dc9c3704b2aa1effbf37adebd8caeaf68b17a636/protobuf-6.33.0-py3-none-any.whl", hash = "sha256:25c9e1963c6734448ea2d308cfa610e692b801304ba0908d7bfa564ac5132995", size = 170477, upload-time = "2025-10-15T20:39:51.311Z" }, + { url = "https://files.pythonhosted.org/packages/d4/88/9ee58ff7863c479d6f8346686d4636dd4c415b0cbeed7a6a7d0617639c2a/protobuf-5.29.6-cp310-abi3-win32.whl", hash = "sha256:62e8a3114992c7c647bce37dcc93647575fc52d50e48de30c6fcb28a6a291eb1", size = 423357, upload-time = "2026-02-04T22:54:25.805Z" }, + { url = "https://files.pythonhosted.org/packages/1c/66/2dc736a4d576847134fb6d80bd995c569b13cdc7b815d669050bf0ce2d2c/protobuf-5.29.6-cp310-abi3-win_amd64.whl", hash = "sha256:7e6ad413275be172f67fdee0f43484b6de5a904cc1c3ea9804cb6fe2ff366eda", size = 435175, upload-time = "2026-02-04T22:54:28.592Z" }, + { url = "https://files.pythonhosted.org/packages/06/db/49b05966fd208ae3f44dcd33837b6243b4915c57561d730a43f881f24dea/protobuf-5.29.6-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:b5a169e664b4057183a34bdc424540e86eea47560f3c123a0d64de4e137f9269", size = 418619, upload-time = "2026-02-04T22:54:30.266Z" }, + { url = "https://files.pythonhosted.org/packages/b7/d7/48cbf6b0c3c39761e47a99cb483405f0fde2be22cf00d71ef316ce52b458/protobuf-5.29.6-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:a8866b2cff111f0f863c1b3b9e7572dc7eaea23a7fae27f6fc613304046483e6", size = 320284, upload-time = "2026-02-04T22:54:31.782Z" }, + { url = "https://files.pythonhosted.org/packages/e3/dd/cadd6ec43069247d91f6345fa7a0d2858bef6af366dbd7ba8f05d2c77d3b/protobuf-5.29.6-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:e3387f44798ac1106af0233c04fb8abf543772ff241169946f698b3a9a3d3ab9", size = 320478, upload-time = "2026-02-04T22:54:32.909Z" }, + { url = "https://files.pythonhosted.org/packages/5a/cb/e3065b447186cb70aa65acc70c86baf482d82bf75625bf5a2c4f6919c6a3/protobuf-5.29.6-py3-none-any.whl", hash = "sha256:6b9edb641441b2da9fa8f428760fc136a49cf97a52076010cf22a2ff73438a86", size = 173126, upload-time = "2026-02-04T22:54:39.462Z" }, ] [[package]] @@ -2082,18 +3500,48 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/05/33/2d74d588408caedd065c2497bdb5ef83ce6082db01289a1e1147f6639802/psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8", size = 249898, upload-time = "2024-01-19T20:47:59.238Z" }, ] +[[package]] +name = "py-partiql-parser" +version = "0.6.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/56/7a/a0f6bda783eb4df8e3dfd55973a1ac6d368a89178c300e1b5b91cd181e5e/py_partiql_parser-0.6.3.tar.gz", hash = "sha256:09cecf916ce6e3da2c050f0cb6106166de42c33d34a078ec2eb19377ea70389a", size = 17456, upload-time = "2025-10-18T13:56:13.441Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c9/33/a7cbfccc39056a5cf8126b7aab4c8bafbedd4f0ca68ae40ecb627a2d2cd3/py_partiql_parser-0.6.3-py2.py3-none-any.whl", hash = "sha256:deb0769c3346179d2f590dcbde556f708cdb929059fb654bad75f4cf6e07f582", size = 23752, upload-time = "2025-10-18T13:56:12.256Z" }, +] + +[[package]] +name = "pyasn1" +version = "0.6.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a4/9a/23310166d960def5897e91fe20e5b724601b02a22e84ba1f94232c0b7f67/pyasn1-0.6.4.tar.gz", hash = "sha256:9c447d8431c947fe4c8febc4ed9e760bc29011a5b01e5c74b67025bd9fb8ce81", size = 151262, upload-time = "2026-07-09T01:12:33.988Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/3b/6163796d69c3977d1e4287bea4a6979161cbbdd170ebb430511e8e1999ce/pyasn1-0.6.4-py3-none-any.whl", hash = "sha256:deda9277cfd454080ec40b207fb6df82206a3a2688735233cdcd8d3d565f088b", size = 84410, upload-time = "2026-07-09T01:12:32.92Z" }, +] + +[[package]] +name = "pyasn1-modules" +version = "0.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyasn1" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6", size = 307892, upload-time = "2025-03-28T02:41:22.17Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/47/8d/d529b5d697919ba8c11ad626e835d4039be708a35b0d22de83a269a6682c/pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a", size = 181259, upload-time = "2025-03-28T02:41:19.028Z" }, +] + [[package]] name = "pycparser" -version = "2.23" +version = "3.11" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz", hash = "sha256:78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2", size = 173734, upload-time = "2025-09-09T13:23:47.91Z" } +sdist = { url = "https://files.pythonhosted.org/packages/da/a8/c5fdbeee588bb8ada9458774f43adf1bdd30bd59157055142183e769a024/pycparser-3.11.tar.gz", hash = "sha256:d875f09c3507d00e1aba0eecc6dcadc1352f30fff09dc6bff2f1c2935e97c2bc", size = 113796, upload-time = "2026-10-09T12:56:59.539Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a0/e3/59cd50310fc9b59512193629e1984c1f95e5c8ae6e5d8c69532ccc65a7fe/pycparser-2.23-py3-none-any.whl", hash = "sha256:e5c6e8d3fbad53479cab09ac03729e0a9faf2bee3db8208a550daf5af81a5934", size = 118140, upload-time = "2025-09-09T13:23:46.651Z" }, + { url = "https://files.pythonhosted.org/packages/90/11/0e6f11117525ff0eec40ebac3d313376f102df93ca44ad9e893ee85e4f89/pycparser-3.11-py3-none-any.whl", hash = "sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", size = 51178, upload-time = "2026-10-09T12:56:58.131Z" }, ] [[package]] name = "pydantic" -version = "2.12.5" +version = "2.14.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "annotated-types" }, @@ -2101,141 +3549,156 @@ dependencies = [ { name = "typing-extensions" }, { name = "typing-inspection" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" } +sdist = { url = "https://files.pythonhosted.org/packages/7c/0b/8e10b2e693af8ec54346a14caf36221334775975a747c9ceaa3f8371d96d/pydantic-2.14.1.tar.gz", hash = "sha256:94f478203dd03404682a1ada216965651dd74b1d2d5ffd62e00e0837caab5c26", size = 900362, upload-time = "2026-10-11T18:37:55.396Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" }, + { url = "https://files.pythonhosted.org/packages/35/ea/a56b9fe5066f3537b7882f77e9c5dfb26d8c2eefdaed9b5fc73d57b4dc22/pydantic-2.14.1-py3-none-any.whl", hash = "sha256:9195d967ec791692a04438115466764fb8b9a27b31f14a760437694f40d6b454", size = 488106, upload-time = "2026-10-11T18:37:53.437Z" }, ] [[package]] name = "pydantic-core" -version = "2.41.5" +version = "2.50.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c6/90/32c9941e728d564b411d574d8ee0cf09b12ec978cb22b294995bae5549a5/pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146", size = 2107298, upload-time = "2025-11-04T13:39:04.116Z" }, - { url = "https://files.pythonhosted.org/packages/fb/a8/61c96a77fe28993d9a6fb0f4127e05430a267b235a124545d79fea46dd65/pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2", size = 1901475, upload-time = "2025-11-04T13:39:06.055Z" }, - { url = "https://files.pythonhosted.org/packages/5d/b6/338abf60225acc18cdc08b4faef592d0310923d19a87fba1faf05af5346e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97", size = 1918815, upload-time = "2025-11-04T13:39:10.41Z" }, - { url = "https://files.pythonhosted.org/packages/d1/1c/2ed0433e682983d8e8cba9c8d8ef274d4791ec6a6f24c58935b90e780e0a/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9", size = 2065567, upload-time = "2025-11-04T13:39:12.244Z" }, - { url = "https://files.pythonhosted.org/packages/b3/24/cf84974ee7d6eae06b9e63289b7b8f6549d416b5c199ca2d7ce13bbcf619/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52", size = 2230442, upload-time = "2025-11-04T13:39:13.962Z" }, - { url = "https://files.pythonhosted.org/packages/fd/21/4e287865504b3edc0136c89c9c09431be326168b1eb7841911cbc877a995/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941", size = 2350956, upload-time = "2025-11-04T13:39:15.889Z" }, - { url = "https://files.pythonhosted.org/packages/a8/76/7727ef2ffa4b62fcab916686a68a0426b9b790139720e1934e8ba797e238/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a", size = 2068253, upload-time = "2025-11-04T13:39:17.403Z" }, - { url = "https://files.pythonhosted.org/packages/d5/8c/a4abfc79604bcb4c748e18975c44f94f756f08fb04218d5cb87eb0d3a63e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c", size = 2177050, upload-time = "2025-11-04T13:39:19.351Z" }, - { url = "https://files.pythonhosted.org/packages/67/b1/de2e9a9a79b480f9cb0b6e8b6ba4c50b18d4e89852426364c66aa82bb7b3/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2", size = 2147178, upload-time = "2025-11-04T13:39:21Z" }, - { url = "https://files.pythonhosted.org/packages/16/c1/dfb33f837a47b20417500efaa0378adc6635b3c79e8369ff7a03c494b4ac/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556", size = 2341833, upload-time = "2025-11-04T13:39:22.606Z" }, - { url = "https://files.pythonhosted.org/packages/47/36/00f398642a0f4b815a9a558c4f1dca1b4020a7d49562807d7bc9ff279a6c/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49", size = 2321156, upload-time = "2025-11-04T13:39:25.843Z" }, - { url = "https://files.pythonhosted.org/packages/7e/70/cad3acd89fde2010807354d978725ae111ddf6d0ea46d1ea1775b5c1bd0c/pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba", size = 1989378, upload-time = "2025-11-04T13:39:27.92Z" }, - { url = "https://files.pythonhosted.org/packages/76/92/d338652464c6c367e5608e4488201702cd1cbb0f33f7b6a85a60fe5f3720/pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9", size = 2013622, upload-time = "2025-11-04T13:39:29.848Z" }, - { url = "https://files.pythonhosted.org/packages/e8/72/74a989dd9f2084b3d9530b0915fdda64ac48831c30dbf7c72a41a5232db8/pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6", size = 2105873, upload-time = "2025-11-04T13:39:31.373Z" }, - { url = "https://files.pythonhosted.org/packages/12/44/37e403fd9455708b3b942949e1d7febc02167662bf1a7da5b78ee1ea2842/pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b", size = 1899826, upload-time = "2025-11-04T13:39:32.897Z" }, - { url = "https://files.pythonhosted.org/packages/33/7f/1d5cab3ccf44c1935a359d51a8a2a9e1a654b744b5e7f80d41b88d501eec/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a", size = 1917869, upload-time = "2025-11-04T13:39:34.469Z" }, - { url = "https://files.pythonhosted.org/packages/6e/6a/30d94a9674a7fe4f4744052ed6c5e083424510be1e93da5bc47569d11810/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8", size = 2063890, upload-time = "2025-11-04T13:39:36.053Z" }, - { url = "https://files.pythonhosted.org/packages/50/be/76e5d46203fcb2750e542f32e6c371ffa9b8ad17364cf94bb0818dbfb50c/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e", size = 2229740, upload-time = "2025-11-04T13:39:37.753Z" }, - { url = "https://files.pythonhosted.org/packages/d3/ee/fed784df0144793489f87db310a6bbf8118d7b630ed07aa180d6067e653a/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1", size = 2350021, upload-time = "2025-11-04T13:39:40.94Z" }, - { url = "https://files.pythonhosted.org/packages/c8/be/8fed28dd0a180dca19e72c233cbf58efa36df055e5b9d90d64fd1740b828/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b", size = 2066378, upload-time = "2025-11-04T13:39:42.523Z" }, - { url = "https://files.pythonhosted.org/packages/b0/3b/698cf8ae1d536a010e05121b4958b1257f0b5522085e335360e53a6b1c8b/pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b", size = 2175761, upload-time = "2025-11-04T13:39:44.553Z" }, - { url = "https://files.pythonhosted.org/packages/b8/ba/15d537423939553116dea94ce02f9c31be0fa9d0b806d427e0308ec17145/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284", size = 2146303, upload-time = "2025-11-04T13:39:46.238Z" }, - { url = "https://files.pythonhosted.org/packages/58/7f/0de669bf37d206723795f9c90c82966726a2ab06c336deba4735b55af431/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594", size = 2340355, upload-time = "2025-11-04T13:39:48.002Z" }, - { url = "https://files.pythonhosted.org/packages/e5/de/e7482c435b83d7e3c3ee5ee4451f6e8973cff0eb6007d2872ce6383f6398/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e", size = 2319875, upload-time = "2025-11-04T13:39:49.705Z" }, - { url = "https://files.pythonhosted.org/packages/fe/e6/8c9e81bb6dd7560e33b9053351c29f30c8194b72f2d6932888581f503482/pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b", size = 1987549, upload-time = "2025-11-04T13:39:51.842Z" }, - { url = "https://files.pythonhosted.org/packages/11/66/f14d1d978ea94d1bc21fc98fcf570f9542fe55bfcc40269d4e1a21c19bf7/pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe", size = 2011305, upload-time = "2025-11-04T13:39:53.485Z" }, - { url = "https://files.pythonhosted.org/packages/56/d8/0e271434e8efd03186c5386671328154ee349ff0354d83c74f5caaf096ed/pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f", size = 1972902, upload-time = "2025-11-04T13:39:56.488Z" }, - { url = "https://files.pythonhosted.org/packages/5f/5d/5f6c63eebb5afee93bcaae4ce9a898f3373ca23df3ccaef086d0233a35a7/pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7", size = 2110990, upload-time = "2025-11-04T13:39:58.079Z" }, - { url = "https://files.pythonhosted.org/packages/aa/32/9c2e8ccb57c01111e0fd091f236c7b371c1bccea0fa85247ac55b1e2b6b6/pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0", size = 1896003, upload-time = "2025-11-04T13:39:59.956Z" }, - { url = "https://files.pythonhosted.org/packages/68/b8/a01b53cb0e59139fbc9e4fda3e9724ede8de279097179be4ff31f1abb65a/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69", size = 1919200, upload-time = "2025-11-04T13:40:02.241Z" }, - { url = "https://files.pythonhosted.org/packages/38/de/8c36b5198a29bdaade07b5985e80a233a5ac27137846f3bc2d3b40a47360/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75", size = 2052578, upload-time = "2025-11-04T13:40:04.401Z" }, - { url = "https://files.pythonhosted.org/packages/00/b5/0e8e4b5b081eac6cb3dbb7e60a65907549a1ce035a724368c330112adfdd/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05", size = 2208504, upload-time = "2025-11-04T13:40:06.072Z" }, - { url = "https://files.pythonhosted.org/packages/77/56/87a61aad59c7c5b9dc8caad5a41a5545cba3810c3e828708b3d7404f6cef/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc", size = 2335816, upload-time = "2025-11-04T13:40:07.835Z" }, - { url = "https://files.pythonhosted.org/packages/0d/76/941cc9f73529988688a665a5c0ecff1112b3d95ab48f81db5f7606f522d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c", size = 2075366, upload-time = "2025-11-04T13:40:09.804Z" }, - { url = "https://files.pythonhosted.org/packages/d3/43/ebef01f69baa07a482844faaa0a591bad1ef129253ffd0cdaa9d8a7f72d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5", size = 2171698, upload-time = "2025-11-04T13:40:12.004Z" }, - { url = "https://files.pythonhosted.org/packages/b1/87/41f3202e4193e3bacfc2c065fab7706ebe81af46a83d3e27605029c1f5a6/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c", size = 2132603, upload-time = "2025-11-04T13:40:13.868Z" }, - { url = "https://files.pythonhosted.org/packages/49/7d/4c00df99cb12070b6bccdef4a195255e6020a550d572768d92cc54dba91a/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294", size = 2329591, upload-time = "2025-11-04T13:40:15.672Z" }, - { url = "https://files.pythonhosted.org/packages/cc/6a/ebf4b1d65d458f3cda6a7335d141305dfa19bdc61140a884d165a8a1bbc7/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1", size = 2319068, upload-time = "2025-11-04T13:40:17.532Z" }, - { url = "https://files.pythonhosted.org/packages/49/3b/774f2b5cd4192d5ab75870ce4381fd89cf218af999515baf07e7206753f0/pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d", size = 1985908, upload-time = "2025-11-04T13:40:19.309Z" }, - { url = "https://files.pythonhosted.org/packages/86/45/00173a033c801cacf67c190fef088789394feaf88a98a7035b0e40d53dc9/pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815", size = 2020145, upload-time = "2025-11-04T13:40:21.548Z" }, - { url = "https://files.pythonhosted.org/packages/f9/22/91fbc821fa6d261b376a3f73809f907cec5ca6025642c463d3488aad22fb/pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3", size = 1976179, upload-time = "2025-11-04T13:40:23.393Z" }, - { url = "https://files.pythonhosted.org/packages/87/06/8806241ff1f70d9939f9af039c6c35f2360cf16e93c2ca76f184e76b1564/pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9", size = 2120403, upload-time = "2025-11-04T13:40:25.248Z" }, - { url = "https://files.pythonhosted.org/packages/94/02/abfa0e0bda67faa65fef1c84971c7e45928e108fe24333c81f3bfe35d5f5/pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34", size = 1896206, upload-time = "2025-11-04T13:40:27.099Z" }, - { url = "https://files.pythonhosted.org/packages/15/df/a4c740c0943e93e6500f9eb23f4ca7ec9bf71b19e608ae5b579678c8d02f/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0", size = 1919307, upload-time = "2025-11-04T13:40:29.806Z" }, - { url = "https://files.pythonhosted.org/packages/9a/e3/6324802931ae1d123528988e0e86587c2072ac2e5394b4bc2bc34b61ff6e/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33", size = 2063258, upload-time = "2025-11-04T13:40:33.544Z" }, - { url = "https://files.pythonhosted.org/packages/c9/d4/2230d7151d4957dd79c3044ea26346c148c98fbf0ee6ebd41056f2d62ab5/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e", size = 2214917, upload-time = "2025-11-04T13:40:35.479Z" }, - { url = "https://files.pythonhosted.org/packages/e6/9f/eaac5df17a3672fef0081b6c1bb0b82b33ee89aa5cec0d7b05f52fd4a1fa/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2", size = 2332186, upload-time = "2025-11-04T13:40:37.436Z" }, - { url = "https://files.pythonhosted.org/packages/cf/4e/35a80cae583a37cf15604b44240e45c05e04e86f9cfd766623149297e971/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586", size = 2073164, upload-time = "2025-11-04T13:40:40.289Z" }, - { url = "https://files.pythonhosted.org/packages/bf/e3/f6e262673c6140dd3305d144d032f7bd5f7497d3871c1428521f19f9efa2/pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d", size = 2179146, upload-time = "2025-11-04T13:40:42.809Z" }, - { url = "https://files.pythonhosted.org/packages/75/c7/20bd7fc05f0c6ea2056a4565c6f36f8968c0924f19b7d97bbfea55780e73/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740", size = 2137788, upload-time = "2025-11-04T13:40:44.752Z" }, - { url = "https://files.pythonhosted.org/packages/3a/8d/34318ef985c45196e004bc46c6eab2eda437e744c124ef0dbe1ff2c9d06b/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e", size = 2340133, upload-time = "2025-11-04T13:40:46.66Z" }, - { url = "https://files.pythonhosted.org/packages/9c/59/013626bf8c78a5a5d9350d12e7697d3d4de951a75565496abd40ccd46bee/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858", size = 2324852, upload-time = "2025-11-04T13:40:48.575Z" }, - { url = "https://files.pythonhosted.org/packages/1a/d9/c248c103856f807ef70c18a4f986693a46a8ffe1602e5d361485da502d20/pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36", size = 1994679, upload-time = "2025-11-04T13:40:50.619Z" }, - { url = "https://files.pythonhosted.org/packages/9e/8b/341991b158ddab181cff136acd2552c9f35bd30380422a639c0671e99a91/pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11", size = 2019766, upload-time = "2025-11-04T13:40:52.631Z" }, - { url = "https://files.pythonhosted.org/packages/73/7d/f2f9db34af103bea3e09735bb40b021788a5e834c81eedb541991badf8f5/pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd", size = 1981005, upload-time = "2025-11-04T13:40:54.734Z" }, - { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622, upload-time = "2025-11-04T13:40:56.68Z" }, - { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725, upload-time = "2025-11-04T13:40:58.807Z" }, - { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040, upload-time = "2025-11-04T13:41:00.853Z" }, - { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691, upload-time = "2025-11-04T13:41:03.504Z" }, - { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897, upload-time = "2025-11-04T13:41:05.804Z" }, - { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302, upload-time = "2025-11-04T13:41:07.809Z" }, - { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877, upload-time = "2025-11-04T13:41:09.827Z" }, - { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680, upload-time = "2025-11-04T13:41:12.379Z" }, - { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960, upload-time = "2025-11-04T13:41:14.627Z" }, - { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102, upload-time = "2025-11-04T13:41:16.868Z" }, - { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039, upload-time = "2025-11-04T13:41:18.934Z" }, - { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126, upload-time = "2025-11-04T13:41:21.418Z" }, - { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489, upload-time = "2025-11-04T13:41:24.076Z" }, - { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288, upload-time = "2025-11-04T13:41:26.33Z" }, - { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255, upload-time = "2025-11-04T13:41:28.569Z" }, - { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760, upload-time = "2025-11-04T13:41:31.055Z" }, - { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092, upload-time = "2025-11-04T13:41:33.21Z" }, - { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385, upload-time = "2025-11-04T13:41:35.508Z" }, - { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832, upload-time = "2025-11-04T13:41:37.732Z" }, - { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585, upload-time = "2025-11-04T13:41:40Z" }, - { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078, upload-time = "2025-11-04T13:41:42.323Z" }, - { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914, upload-time = "2025-11-04T13:41:45.221Z" }, - { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560, upload-time = "2025-11-04T13:41:47.474Z" }, - { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244, upload-time = "2025-11-04T13:41:49.992Z" }, - { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955, upload-time = "2025-11-04T13:41:54.079Z" }, - { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, - { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, - { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, - { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" }, - { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" }, - { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" }, - { url = "https://files.pythonhosted.org/packages/2e/1b/687711069de7efa6af934e74f601e2a4307365e8fdc404703afc453eab26/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad", size = 2138905, upload-time = "2025-11-04T13:42:47.156Z" }, - { url = "https://files.pythonhosted.org/packages/09/32/59b0c7e63e277fa7911c2fc70ccfb45ce4b98991e7ef37110663437005af/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd", size = 2110495, upload-time = "2025-11-04T13:42:49.689Z" }, - { url = "https://files.pythonhosted.org/packages/aa/81/05e400037eaf55ad400bcd318c05bb345b57e708887f07ddb2d20e3f0e98/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc", size = 1915388, upload-time = "2025-11-04T13:42:52.215Z" }, - { url = "https://files.pythonhosted.org/packages/6e/0d/e3549b2399f71d56476b77dbf3cf8937cec5cd70536bdc0e374a421d0599/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56", size = 1942879, upload-time = "2025-11-04T13:42:56.483Z" }, - { url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" }, - { url = "https://files.pythonhosted.org/packages/e6/b0/1a2aa41e3b5a4ba11420aba2d091b2d17959c8d1519ece3627c371951e73/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8", size = 2103351, upload-time = "2025-11-04T13:43:02.058Z" }, - { url = "https://files.pythonhosted.org/packages/a4/ee/31b1f0020baaf6d091c87900ae05c6aeae101fa4e188e1613c80e4f1ea31/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a", size = 1925363, upload-time = "2025-11-04T13:43:05.159Z" }, - { url = "https://files.pythonhosted.org/packages/e1/89/ab8e86208467e467a80deaca4e434adac37b10a9d134cd2f99b28a01e483/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b", size = 2135615, upload-time = "2025-11-04T13:43:08.116Z" }, - { url = "https://files.pythonhosted.org/packages/99/0a/99a53d06dd0348b2008f2f30884b34719c323f16c3be4e6cc1203b74a91d/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2", size = 2175369, upload-time = "2025-11-04T13:43:12.49Z" }, - { url = "https://files.pythonhosted.org/packages/6d/94/30ca3b73c6d485b9bb0bc66e611cff4a7138ff9736b7e66bcf0852151636/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093", size = 2144218, upload-time = "2025-11-04T13:43:15.431Z" }, - { url = "https://files.pythonhosted.org/packages/87/57/31b4f8e12680b739a91f472b5671294236b82586889ef764b5fbc6669238/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a", size = 2329951, upload-time = "2025-11-04T13:43:18.062Z" }, - { url = "https://files.pythonhosted.org/packages/7d/73/3c2c8edef77b8f7310e6fb012dbc4b8551386ed575b9eb6fb2506e28a7eb/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963", size = 2318428, upload-time = "2025-11-04T13:43:20.679Z" }, - { url = "https://files.pythonhosted.org/packages/2f/02/8559b1f26ee0d502c74f9cca5c0d2fd97e967e083e006bbbb4e97f3a043a/pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a", size = 2147009, upload-time = "2025-11-04T13:43:23.286Z" }, - { url = "https://files.pythonhosted.org/packages/5f/9b/1b3f0e9f9305839d7e84912f9e8bfbd191ed1b1ef48083609f0dabde978c/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26", size = 2101980, upload-time = "2025-11-04T13:43:25.97Z" }, - { url = "https://files.pythonhosted.org/packages/a4/ed/d71fefcb4263df0da6a85b5d8a7508360f2f2e9b3bf5814be9c8bccdccc1/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808", size = 1923865, upload-time = "2025-11-04T13:43:28.763Z" }, - { url = "https://files.pythonhosted.org/packages/ce/3a/626b38db460d675f873e4444b4bb030453bbe7b4ba55df821d026a0493c4/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc", size = 2134256, upload-time = "2025-11-04T13:43:31.71Z" }, - { url = "https://files.pythonhosted.org/packages/83/d9/8412d7f06f616bbc053d30cb4e5f76786af3221462ad5eee1f202021eb4e/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1", size = 2174762, upload-time = "2025-11-04T13:43:34.744Z" }, - { url = "https://files.pythonhosted.org/packages/55/4c/162d906b8e3ba3a99354e20faa1b49a85206c47de97a639510a0e673f5da/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84", size = 2143141, upload-time = "2025-11-04T13:43:37.701Z" }, - { url = "https://files.pythonhosted.org/packages/1f/f2/f11dd73284122713f5f89fc940f370d035fa8e1e078d446b3313955157fe/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770", size = 2330317, upload-time = "2025-11-04T13:43:40.406Z" }, - { url = "https://files.pythonhosted.org/packages/88/9d/b06ca6acfe4abb296110fb1273a4d848a0bfb2ff65f3ee92127b3244e16b/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f", size = 2316992, upload-time = "2025-11-04T13:43:43.602Z" }, - { url = "https://files.pythonhosted.org/packages/36/c7/cfc8e811f061c841d7990b0201912c3556bfeb99cdcb7ed24adc8d6f8704/pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51", size = 2145302, upload-time = "2025-11-04T13:43:46.64Z" }, +sdist = { url = "https://files.pythonhosted.org/packages/a6/24/af4ec4be49fbc810f35b0bdcacc3d433b56bbfa469fd3bfd4ae116cd9bf1/pydantic_core-2.50.1.tar.gz", hash = "sha256:e50d7b94baac6c7d09927fa5ca5800a0c7ee5015c7fcff65beb3a1931b5a6e09", size = 513515, upload-time = "2026-10-11T18:35:44.82Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/45/1b/ca81811da3d2aea724fb3c4ba6b83f50ab8f210576306ccd601973142d35/pydantic_core-2.50.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:c531166c42ea7bdfecc8c50049581f05dd1993b09cc7c52bb36a14e96deaec7d", size = 2152145, upload-time = "2026-10-11T18:31:58.046Z" }, + { url = "https://files.pythonhosted.org/packages/59/20/938ef7e0541af0a314e2f9d63848dbd1656ba2ebfe5ca0469f7ebee00d5e/pydantic_core-2.50.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b6d0c2183008c188e19f4906d426b293bdc4f67ab17df8e180fe16cda208fa71", size = 2045761, upload-time = "2026-10-11T18:31:59.35Z" }, + { url = "https://files.pythonhosted.org/packages/2f/4b/456497fe2affa18f49b226e89bde31e8a204751ee343dd9beaac5438123e/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94be440c03fede26969a5ce75468e0e6a9927a1b46d9b679ee8adc1b057b0350", size = 2049557, upload-time = "2026-10-11T18:32:01.121Z" }, + { url = "https://files.pythonhosted.org/packages/a5/9d/cd5dfe13928f55e236dff3a1bee06721d318ca6c955d9ca993b0a5d09f39/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:36c426eac0af8d1529ff8467e612b933346caec1fdc0d774f78f67a1a11e16c1", size = 2188153, upload-time = "2026-10-11T18:32:02.442Z" }, + { url = "https://files.pythonhosted.org/packages/fb/8d/d0b25bc484f8d9136ea76ece69e0b2d24ab370cc2e7bbd1b79e61723b763/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:028e2f212273d4a39b1ec1e0de8166b1165a65fc0f1111452a9d94fc7c625c63", size = 2388308, upload-time = "2026-10-11T18:32:03.767Z" }, + { url = "https://files.pythonhosted.org/packages/c5/64/6513cac7c9f78492abafa01d57a69de1d246bf3085fd7b0330bf14b025b3/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6f0cc1bb9900dc558960894adeb30b0c083366fc1d69b856209fb2ca5c36fe5", size = 2431187, upload-time = "2026-10-11T18:32:05.159Z" }, + { url = "https://files.pythonhosted.org/packages/ed/60/7f2ae89c37e69a3dc0da9ff57b0388c285542c688d05f36767770429de85/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8812592c85d0edf423f10eadcef42716d71e8219085ad9e85b775057b7306133", size = 2157623, upload-time = "2026-10-11T18:32:06.616Z" }, + { url = "https://files.pythonhosted.org/packages/87/02/e3a71373b85a7973099b9a229a4302c7792262717e0b4997e41c01f7dd16/pydantic_core-2.50.1-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:bbce99252ba3167b2b6277f1829d5bf4b43b754524bddf7f944707c3db7d2253", size = 2254539, upload-time = "2026-10-11T18:32:07.968Z" }, + { url = "https://files.pythonhosted.org/packages/3f/d5/5b620aaf40dc631d911565b64d49d3fa8422027c046a7a96dc4e4921ae98/pydantic_core-2.50.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:476f6ed8e43cd1e0b460920e23571700872b284e77331cb30c4faf459cf48a4b", size = 2267344, upload-time = "2026-10-11T18:32:09.399Z" }, + { url = "https://files.pythonhosted.org/packages/e0/48/f46baf4580d8a56ca4782aa65842e16d3cf39736b29fcce8e9c0521b3422/pydantic_core-2.50.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2cbd1b75b09e976ed0d6b6ca297675632ca35df86130088457cdc60ef36970ae", size = 2300877, upload-time = "2026-10-11T18:32:10.903Z" }, + { url = "https://files.pythonhosted.org/packages/2b/9d/e7d28505e6092c1fe075838a4f793ccbe6dd676e44ab16175815ee06cfe0/pydantic_core-2.50.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:5958c72adb417c39b12ac87525ac60b0d73315fcdc59e21f44ee4a5e2512c9ef", size = 2464270, upload-time = "2026-10-11T18:32:12.329Z" }, + { url = "https://files.pythonhosted.org/packages/22/b1/3bf63b82efd93ebc9968f9c12fc46037a28bcb452c88e4688f33e5ff7dca/pydantic_core-2.50.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d8f9e8a6c4ab04b78d61f78627370d834eb004b2869dcb28cfffa647b4ea1980", size = 2478653, upload-time = "2026-10-11T18:32:13.735Z" }, + { url = "https://files.pythonhosted.org/packages/28/17/26d1e4b9c2ba6a92b7dc75bbcb99ef44456b7e3af1bced868403667ea7d3/pydantic_core-2.50.1-cp311-cp311-win32.whl", hash = "sha256:4be846f55c9477f5f3ddde8f2ce941137e16862a56d018ed885d422bb6ae02f2", size = 2120246, upload-time = "2026-10-11T18:32:15.591Z" }, + { url = "https://files.pythonhosted.org/packages/24/65/3e875e7991eaecd4d70686293ff0d8a99aa8f93dc295e6a21c3d702912fb/pydantic_core-2.50.1-cp311-cp311-win_amd64.whl", hash = "sha256:0048b6dddc8ef4b64fccaad878bd143b0c3882ea9936279dc11d613f6b7dd1bc", size = 2176332, upload-time = "2026-10-11T18:32:17.153Z" }, + { url = "https://files.pythonhosted.org/packages/ab/5c/58dbd17c61f209d91c70f549eb7a3bbec7023e89ea12dead091462d6d658/pydantic_core-2.50.1-cp311-cp311-win_arm64.whl", hash = "sha256:6a733778df2f7087ec1100ed0b41533e4f3001976e99570fa34f57c66e7f8e3e", size = 2182471, upload-time = "2026-10-11T18:32:18.49Z" }, + { url = "https://files.pythonhosted.org/packages/ee/94/101b49a6c63f99586755690696eae14532772587d9e39e93f7b8d28a49da/pydantic_core-2.50.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:704075d10b74f2f3c6e15407c696d88701df35fc8953f434a431add0d0074db0", size = 2222428, upload-time = "2026-10-11T18:32:20.228Z" }, + { url = "https://files.pythonhosted.org/packages/db/a3/f8b1b39349c33037c73d7a1b794c9c29d8f07d5bd2b74399c1375a529cc6/pydantic_core-2.50.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e8e1d6ce820aa23317e8209a86bd65a540973c12dc7552b48a4f6c8e9926815e", size = 2025779, upload-time = "2026-10-11T18:32:21.723Z" }, + { url = "https://files.pythonhosted.org/packages/d2/2d/862a7d115305cc621358e51ba13f296e0ffdf4fbd984be9f63bc7862730b/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c18db21573bd2c6489f9a544b7499f0df2853958c568e5e783536ee1f690af41", size = 2048429, upload-time = "2026-10-11T18:32:23.3Z" }, + { url = "https://files.pythonhosted.org/packages/c0/7d/fed95d18bf2b5abe2d5ab2bbec4184bfc22b6805994a33ccdae8edffd25a/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cb57f304525a5e3c13333b772bf9a473f36326e9c821b2e8e1b2fd36f80ae2c3", size = 2173274, upload-time = "2026-10-11T18:32:24.697Z" }, + { url = "https://files.pythonhosted.org/packages/93/1e/c6f22ceac65dc3d291ff79bea0eb74cbd1de8b128f01fee48af03bcea1e1/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a27c09d86600f1bf2fe3f37e1ae697faf3143931c09322cd799da94deee923b5", size = 2360403, upload-time = "2026-10-11T18:32:26.281Z" }, + { url = "https://files.pythonhosted.org/packages/2c/97/190b5b6bfe4c72f265feb657913eb30749193927a5ad7b83cfa7866a25a2/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:46b3301d3b5c886f77de7546e47274a5842c622ea2020b8c6524c6b66913b4a6", size = 2439799, upload-time = "2026-10-11T18:32:27.844Z" }, + { url = "https://files.pythonhosted.org/packages/90/24/48cd98388e4ac2c08d0800af36d15413db15e20387f1038123a2c86cb2f6/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:93ba4e9d8210d941c200431a56b2c0400b131865947903937ed3ec5404307d2e", size = 2160157, upload-time = "2026-10-11T18:32:29.553Z" }, + { url = "https://files.pythonhosted.org/packages/00/86/d909133d0b9979ed14c20f110f21124a0e346caf071bd66ac5af3009062b/pydantic_core-2.50.1-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:e5faeaee74a57d32b3ab3aebad2e348f06d3ba946fc5d28c1728455f00a3d13a", size = 2229523, upload-time = "2026-10-11T18:32:31.027Z" }, + { url = "https://files.pythonhosted.org/packages/90/31/4b43f08131b2098e73a852fd932063385f3103b33839fd9d1abdb89e673d/pydantic_core-2.50.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3cda0e538208e5d722bbf3698b24f19c0a7d05bc8d5f8a7f9b121ea7fa243d9", size = 2242700, upload-time = "2026-10-11T18:32:32.622Z" }, + { url = "https://files.pythonhosted.org/packages/88/77/de39658569dc7a4c293d110a89629f61145e7538f00d1e4280c28debefd3/pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:57f51b31ff826e2859120cf4737c5a758a48d96f3e97da40ccee1796d58078ff", size = 2278452, upload-time = "2026-10-11T18:32:34.165Z" }, + { url = "https://files.pythonhosted.org/packages/46/bd/1eeb9e4e791e81210ef9096f58080b32ba15b5b13c108d50aaa3f8ce9f73/pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:8daa7ee75245d43ad7d747e5c9ecc1b1d06552f72b14887e9276f787d57375f4", size = 2450098, upload-time = "2026-10-11T18:32:35.547Z" }, + { url = "https://files.pythonhosted.org/packages/1c/e6/b2accfdff17e5a88d6358536702146de00f9339adaa4d5bbe1ee93cb4832/pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:acbf31f37c53a5ac0c34706c80b4f5107ba20b05fdd3816124bf236ef0c57dd2", size = 2476839, upload-time = "2026-10-11T18:32:37.119Z" }, + { url = "https://files.pythonhosted.org/packages/3b/7e/c8a83eb5d2cd42c2e13507150fb777b1edea5a018adc9cbf2858a1d08285/pydantic_core-2.50.1-cp312-cp312-win32.whl", hash = "sha256:45b11cac094aa25725581d9304eee93c9028516b9ea80dd9e175e13a5a2c840e", size = 2101425, upload-time = "2026-10-11T18:32:38.593Z" }, + { url = "https://files.pythonhosted.org/packages/c5/17/8bbd530b8659e9d963f5b16f6cb8e159f4cd174b4d6304e48969ab12dba8/pydantic_core-2.50.1-cp312-cp312-win_amd64.whl", hash = "sha256:132529c83901437ff642f585216831bf5fd7a91df66829907e155192ead62498", size = 2172522, upload-time = "2026-10-11T18:32:40.112Z" }, + { url = "https://files.pythonhosted.org/packages/af/9f/a79d690b127e4e3cff143d031538ab9aa715f6b2fbeecbd07cd6f2bf9fb7/pydantic_core-2.50.1-cp312-cp312-win_arm64.whl", hash = "sha256:4e834f6a8e4ff772dcc34f58ef5504147a3ea5b0f4eeb13b0f8eb2ca75ac57f1", size = 2161366, upload-time = "2026-10-11T18:32:41.606Z" }, + { url = "https://files.pythonhosted.org/packages/ae/57/0e237d7091d2cd44a35d243b7344227f90440166860469cd036afc23a04d/pydantic_core-2.50.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:d5e062c01286d861fd6a1c4ff6e063547b3e713067f2df033c0ff97ac2ca006b", size = 2222774, upload-time = "2026-10-11T18:32:43.103Z" }, + { url = "https://files.pythonhosted.org/packages/f7/b9/c720e56858d4e1539503297ed37063e0c08e0f3541c41b777f6a800f75fa/pydantic_core-2.50.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0c003c3b7f49debb893d2d85ae099ac5959c9839e2f330fadb1fcdf7a6594482", size = 2024738, upload-time = "2026-10-11T18:32:44.587Z" }, + { url = "https://files.pythonhosted.org/packages/4d/b8/fbfc25875219cc060e613170ff10e850c6d8924beb4910da57c2ee3ba1d2/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:409e0ea40ec30d9158f33574fd758e689f6045a0f2596701828c27816ca9687d", size = 2047049, upload-time = "2026-10-11T18:32:46.164Z" }, + { url = "https://files.pythonhosted.org/packages/d7/43/34210124d504c553688f2f04b48500b131237528ac545b445e0d6d30e0d5/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:131059670f1d2444269b8585cb888963994871932447c08b39ac6a51fcfef658", size = 2173415, upload-time = "2026-10-11T18:32:47.722Z" }, + { url = "https://files.pythonhosted.org/packages/65/cf/6e178e8fdc11da5965bef980983bf46326a42f436871dd51ba0a57f39df1/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6dbcbee53bf17196a7f745aa9bf5a9603953a1e365b1f020be3207c676a3e7c4", size = 2361719, upload-time = "2026-10-11T18:32:49.217Z" }, + { url = "https://files.pythonhosted.org/packages/11/14/bd5169d356aa91bf777e28ba0b281c192d286d03c2812c9c9db023a2f00e/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:325c23f3e35cfbf0fe3486fa5f7260d1e45885173002d30a28ca019994124255", size = 2439803, upload-time = "2026-10-11T18:32:51.025Z" }, + { url = "https://files.pythonhosted.org/packages/1c/bc/d79d000e5203ebef39af839f2ce77a777fcad6e08ad26af9a2fcd114ffc8/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17e722e156d0444ecaefbe640bdb60928752bf2013e2b7a11cdb099aaae19bec", size = 2158402, upload-time = "2026-10-11T18:32:52.714Z" }, + { url = "https://files.pythonhosted.org/packages/1b/a5/4902cb5fd599422c130bd3124ab31ee8b771199bd56662702eed07d3fec7/pydantic_core-2.50.1-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:aa8224f10880d9bf1b5993988ba153d42a8b4f3f4f511f93b1f09c93ff613c72", size = 2229755, upload-time = "2026-10-11T18:32:54.126Z" }, + { url = "https://files.pythonhosted.org/packages/1a/f5/c1481f8669f6060d89110c9b1374173fc8767ca276b84f4870bd8acd5e3f/pydantic_core-2.50.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:41bc8237121bd8dc8d888dfd6279fc166ffc88c1f1bf3a8bf00869680533ca4c", size = 2242303, upload-time = "2026-10-11T18:32:55.641Z" }, + { url = "https://files.pythonhosted.org/packages/04/f9/77fc3c7653ba9b6e42049e17e96b25388187d4a7c274ab1cb07f58ac8419/pydantic_core-2.50.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:45c6266d071c241f2a168d45bf8c54344f0effce35e7e6b73afdec11f3687568", size = 2278345, upload-time = "2026-10-11T18:32:57.38Z" }, + { url = "https://files.pythonhosted.org/packages/95/9b/0579c5d12e7f2b16b27e6782427987341fcce07b0725e02ddb0b74add0c4/pydantic_core-2.50.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:1deeacb112d14d3f4fcb16b165f7dbaf76c70ba6e82f37ba042bdab51970a0b8", size = 2449947, upload-time = "2026-10-11T18:32:58.896Z" }, + { url = "https://files.pythonhosted.org/packages/a8/ac/1b677db91eba54cc5922f4de6edc46ba45c2bd712dfdc0130382d158e214/pydantic_core-2.50.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1c96fd793b73d1b92e65570132505498fe7b21eaef73cdf74e67e5dfba7ac9e4", size = 2476889, upload-time = "2026-10-11T18:33:00.665Z" }, + { url = "https://files.pythonhosted.org/packages/4d/2a/3a9f6624ee3ea9ccba5249dde11418bb4c35780a7a92608f8768bd3fea39/pydantic_core-2.50.1-cp313-cp313-win32.whl", hash = "sha256:06ead20d39ffd6f2f6f2a8f8a6de67ff8bb1b4f14a8a30e058502514ee2ac685", size = 2101118, upload-time = "2026-10-11T18:33:02.329Z" }, + { url = "https://files.pythonhosted.org/packages/2d/1f/323f78ddd9d9938aac420c1abb4e8ba799fc8bdab0acc67c0593b837c979/pydantic_core-2.50.1-cp313-cp313-win_amd64.whl", hash = "sha256:7816e98acc08119dc0f340ab167048ecc54126316330c1f0caf7c6756c88e28f", size = 2170840, upload-time = "2026-10-11T18:33:03.919Z" }, + { url = "https://files.pythonhosted.org/packages/cb/09/8497c52a739ae425c3ac2f7f56414cbc711c67d374346174f40fe2062644/pydantic_core-2.50.1-cp313-cp313-win_arm64.whl", hash = "sha256:c17799a62c142d61b8a3c51752a7cbc87fe2ad4ccfab10e628a77b405075c662", size = 2161633, upload-time = "2026-10-11T18:33:05.518Z" }, + { url = "https://files.pythonhosted.org/packages/49/33/28b96e81677153715e3eafb9f26663a80841e859fde282a380359b0d3fa1/pydantic_core-2.50.1-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:1cf41f1ae3fa155cf167a72689ad044bcc1e3c97e064123677149bdfb5dafc4a", size = 2224428, upload-time = "2026-10-11T18:33:07.153Z" }, + { url = "https://files.pythonhosted.org/packages/94/40/15c06410c9b7b8da5805d27b64e09bd3f900e986728106db2689dbc51513/pydantic_core-2.50.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4df197990c15b5a37c5a277d131d9f2c67de6133f2e5dafd80d9bba4b99f46f9", size = 2023740, upload-time = "2026-10-11T18:33:08.763Z" }, + { url = "https://files.pythonhosted.org/packages/a1/4e/5eb629f6efc2a27e421d789dd4bfacbb5f6d09c80c28b13d1e87d73163d5/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0036473f5583e6a60e50b8b21651511564277a3f05cc5dab8cf579f552cd5f6c", size = 2049435, upload-time = "2026-10-11T18:33:10.366Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8e/f195aebec49ad12318876ac2368c197a7939f5d52f8e156d2238ef8a4588/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:992c3514ec891fa7858099183e4d64e6bd5a5d4ff452fae29df22faa77a006bb", size = 2172975, upload-time = "2026-10-11T18:33:12.368Z" }, + { url = "https://files.pythonhosted.org/packages/e0/f5/7ad9fb83010cd5ea0948409db105676ed779c4e709e2d3d89b9fe2558794/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:739dc730e6be3bd5ec2f4ab5cfc7eb047cc45fc1497b3bafec74ff2ed07df597", size = 2364197, upload-time = "2026-10-11T18:33:14.244Z" }, + { url = "https://files.pythonhosted.org/packages/ca/fb/bf0aab3e78301d202b82a0322ec968cd703b11fc0623fde9a28708936f62/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:32fad3a91e51b6d2039c572db04a5a873260b399f6bd62c3552671fa7a4a2899", size = 2444259, upload-time = "2026-10-11T18:33:15.79Z" }, + { url = "https://files.pythonhosted.org/packages/45/35/38f6d6564fae57d9b12e5676dfa947e0e7d5c46dbeaa7eb3352261d6d299/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42b54c2c90ad348b5e3a85e03e715d572c1fde357ef104cdfe3b03b697a404ea", size = 2159857, upload-time = "2026-10-11T18:33:17.51Z" }, + { url = "https://files.pythonhosted.org/packages/65/a0/fb0a3ca10f139dcf765b2d312d10cf0f65c57c59993229d00ad12b14ceff/pydantic_core-2.50.1-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:2df1ff41884de2bc4b307bafd7c40a691094fad2ff8e767e5b45a319257bcf4e", size = 2233954, upload-time = "2026-10-11T18:33:19.591Z" }, + { url = "https://files.pythonhosted.org/packages/8c/6a/e63842252702aa4ec6e6b7178ca85e541a77459076592c23ebe2d9840b33/pydantic_core-2.50.1-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe90228920fd8ff2be62622b6bb8a2b11acd65046d50c6b130614b5879605a20", size = 2243876, upload-time = "2026-10-11T18:33:21.393Z" }, + { url = "https://files.pythonhosted.org/packages/39/25/5991cf8318b37e0dfab47b87541619a1df8501a793cba0d978846cba37a7/pydantic_core-2.50.1-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:844b869f118e22a41a091bdcedda8a71bc1b0f62c38d1a0c3211cece47e1d8fc", size = 2277908, upload-time = "2026-10-11T18:33:23.324Z" }, + { url = "https://files.pythonhosted.org/packages/a7/3e/3ee8baaa6cc25a6961c69168cf9ff0f002d56f4e0d541ad6724c18fb61f3/pydantic_core-2.50.1-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:2eb75304506894a281d346220a4f7481a1b8729577c5ed2a05395991966a8396", size = 2449285, upload-time = "2026-10-11T18:33:24.942Z" }, + { url = "https://files.pythonhosted.org/packages/c0/c7/acbec6deac13fe697a80c275a9b6661db62c4d323bac8a47347b1f39c7cd/pydantic_core-2.50.1-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:6b20a4bffabdad0db2927ac034ae3b8a681b1f7a0182f3e60b479ad2fde21ebb", size = 2479013, upload-time = "2026-10-11T18:33:26.925Z" }, + { url = "https://files.pythonhosted.org/packages/10/08/21a3f237b264389f6219d053ee78fc1b5c2fd402c1b1cb2b6cb8b85f9834/pydantic_core-2.50.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:99ba9bc2b8062ea0c326a990f7f00e6530c23579de66dd246e72c4cafef950a5", size = 1484400, upload-time = "2026-10-11T18:33:28.693Z" }, + { url = "https://files.pythonhosted.org/packages/09/ce/077a6d262d12ef09108377ac0717f029f420d773ace63cafd6143af75568/pydantic_core-2.50.1-cp314-cp314-win32.whl", hash = "sha256:cf356f70551d40374eaffb1aa63f1eb6d2006681cbd7a9faea173ce0f4dd7cd2", size = 2103222, upload-time = "2026-10-11T18:33:30.326Z" }, + { url = "https://files.pythonhosted.org/packages/14/4c/350a2415209c43d670eb71d3c040f332c04a30583d39e311b05c7ac15762/pydantic_core-2.50.1-cp314-cp314-win_amd64.whl", hash = "sha256:d32f3acc081cc3923386d88f422cde8892335e95f034e0104bb4cf9310d9915f", size = 2171586, upload-time = "2026-10-11T18:33:32.139Z" }, + { url = "https://files.pythonhosted.org/packages/bf/92/9bea6ca96580a0902fed366f064f0829e404f41889b34543279a1162b888/pydantic_core-2.50.1-cp314-cp314-win_arm64.whl", hash = "sha256:bed5163e03b98bc1fa2eb05d74c63d9c5c95d8ed6254985481640fbf5e237dea", size = 2155773, upload-time = "2026-10-11T18:33:33.896Z" }, + { url = "https://files.pythonhosted.org/packages/86/8c/f121f073cf32bdd5cba7e6230b1ce0ac845b0cf43e44dd597d95af272db2/pydantic_core-2.50.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:9572c1369e9c9da2d64a7b7992c786d90ff295abc93964cfe3125e4290768070", size = 2234017, upload-time = "2026-10-11T18:33:35.588Z" }, + { url = "https://files.pythonhosted.org/packages/a4/69/2bb2bcd6146cffe98d760a46c42ae71efd5151d9b2f9c9bf6619a3b32083/pydantic_core-2.50.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2005207aafe1231315718bf6ed5d064a7300fb4772754af35ee72fc68159492e", size = 2001016, upload-time = "2026-10-11T18:33:37.57Z" }, + { url = "https://files.pythonhosted.org/packages/20/b3/fbf854c7d07ec114260c26e9e2071a4381740f9ae09641dbfcbdf2a18c45/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64f6047f62a6c5ae08d0a6afb035667aa2d97c3d20d69762e034c5ea144d92a5", size = 2023015, upload-time = "2026-10-11T18:33:39.433Z" }, + { url = "https://files.pythonhosted.org/packages/65/20/6de55b2f92cdb614b745c6e9ced639fc4fd7e1e77604825a88bdece6fcbd/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ef800dd7d85bcdadf4c3076e4c94e43939493558a3b69a1ea830c706d4617bb", size = 2192543, upload-time = "2026-10-11T18:33:41.381Z" }, + { url = "https://files.pythonhosted.org/packages/0c/d9/19e91c94bd5c405945ce2f15526808aea37e162c253160de8ed7bf70b406/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b0135bcdcaa0f23573f286e4cb5e0fd2962700964ed13df085b85f2b97aeab9e", size = 2388704, upload-time = "2026-10-11T18:33:43.167Z" }, + { url = "https://files.pythonhosted.org/packages/b6/bc/2e24c8415eae1a25ee5a5484946a917123bad2e9d01689a759236928175a/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0b3a6f334c6a2345ca15318ff894502a90012536404b37c844a976c76c846e0b", size = 2464118, upload-time = "2026-10-11T18:33:44.856Z" }, + { url = "https://files.pythonhosted.org/packages/bd/1f/945b8053cb061c64e102bcaf7bfb9ed740c0bd4349f9bb978a7d4ddff4ab/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06e01fbbfdb9be777b316a71b6c49efaf4a08b615d0a98d678cda3023f79d019", size = 2150142, upload-time = "2026-10-11T18:33:46.661Z" }, + { url = "https://files.pythonhosted.org/packages/2b/78/96a3e50bf0d64aaae781107eb9335b7529d05a85793ed6e7241c4cd1d931/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:a29a061fec0b4e2d714f277e70a3a18125ecff803f2fea6eade2f2e53711d112", size = 2245577, upload-time = "2026-10-11T18:33:48.574Z" }, + { url = "https://files.pythonhosted.org/packages/7a/5d/a6038a0322232758a6ebfa709f4ca14a60bf5b93940cd0b345056a557da4/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f5187624823423e1d1b82b1072ac41dc837389e18d3d0572cc19bbee46cd550a", size = 2263728, upload-time = "2026-10-11T18:33:50.527Z" }, + { url = "https://files.pythonhosted.org/packages/0d/4b/76ded3333a457a9344c4f2d63f2d82d0101654b05178fa4ddfe7d3627674/pydantic_core-2.50.1-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:3e46a9eb0a0901dd6275e6b06ac3a464885ef350ec4121fe486869de8053e4bb", size = 2293630, upload-time = "2026-10-11T18:33:52.362Z" }, + { url = "https://files.pythonhosted.org/packages/a9/00/9eca378335c9c1b72bc779bf6e4c2a82ce784f14ec48a0e87102c9870e05/pydantic_core-2.50.1-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:756d669f04e62ec4148ecfe22be6a4484d9b1181a6ef32e205ebfd200540858b", size = 2468048, upload-time = "2026-10-11T18:33:54.118Z" }, + { url = "https://files.pythonhosted.org/packages/35/ca/e3832e9cf93651251de43c8c5c029ed680a3c1a0a1b17ee26c81bed08cbd/pydantic_core-2.50.1-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:c516cc5367ca3448995d42cb994bf3f4c9002d2a7c22eac9622551269ad1b807", size = 2512159, upload-time = "2026-10-11T18:33:55.99Z" }, + { url = "https://files.pythonhosted.org/packages/4b/f2/773469b5a10a39116a2cb17edaf6d722f017dd8da07161b371465311c542/pydantic_core-2.50.1-cp314-cp314t-win32.whl", hash = "sha256:9d1bed94af6a63835461f3cf7502058eb166c58c4778e11d0f433cfb1bd69e19", size = 2098406, upload-time = "2026-10-11T18:33:58.043Z" }, + { url = "https://files.pythonhosted.org/packages/ee/42/0bb74f8f25204b259b11ab7c12dc7f180893b6bd706118b385147fb6efd5/pydantic_core-2.50.1-cp314-cp314t-win_amd64.whl", hash = "sha256:c8dce1f1e0e5358b682a6ad3fa5e31b31d4560997b8e61417e9217c8d60f8a0c", size = 2148481, upload-time = "2026-10-11T18:33:59.913Z" }, + { url = "https://files.pythonhosted.org/packages/47/0d/d801646c9679a4e630e15cf521d4108b93854b42a6e6e02391bd4c6b1095/pydantic_core-2.50.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ceff0acc940be2715bd6ad17b24c0e5304abf44f6efd0f81ee8499e640f9dc86", size = 2174972, upload-time = "2026-10-11T18:34:01.875Z" }, + { url = "https://files.pythonhosted.org/packages/b2/84/23984b763d8862a02a13d27a44b6e8169428fd85ecfed88f54c29108604d/pydantic_core-2.50.1-cp315-cp315-macosx_10_12_x86_64.whl", hash = "sha256:8a6791afa2245e6c6b180122d105941644f5bd410bb18623b408808cc41a3102", size = 2224599, upload-time = "2026-10-11T18:34:04.016Z" }, + { url = "https://files.pythonhosted.org/packages/4d/90/a63cf8586abc1d1a3f6d9b18f0224789ebf003851f092ebda3c7c863fd32/pydantic_core-2.50.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:84f34323a61a365b4e9295de6028474754829aaddd59c7bf1a040e7487ef8f3c", size = 2024191, upload-time = "2026-10-11T18:34:05.901Z" }, + { url = "https://files.pythonhosted.org/packages/a6/6a/f34bff9808ffb4907fbf5f5040457d253cacf2da7fce9efbc99ca1b1a44d/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23edad659e8dbd8ca7e4e877fe6c81573abbdf215bd25a68b53e1272f58b80c7", size = 2048252, upload-time = "2026-10-11T18:34:07.757Z" }, + { url = "https://files.pythonhosted.org/packages/b2/54/13f419bf1eb59852003818e25935aaf175687d978f4c4bca70e08fe40a3b/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a5fce22f1e87d181e924e12da7d81cfe031fb3881a5ddf26ad28f141756ca43", size = 2173376, upload-time = "2026-10-11T18:34:09.592Z" }, + { url = "https://files.pythonhosted.org/packages/6d/6c/b5a34d24cd0c81669d8f8339d74e6815abcf2f8fb48ab4b49b84c09be1d5/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c73622ef819328873b53109ee4f77ceb598bffedd02daf916102be3228866b78", size = 2364559, upload-time = "2026-10-11T18:34:11.534Z" }, + { url = "https://files.pythonhosted.org/packages/eb/8d/d64d6216a8df365082665927ff923f183056f9049fee08e9777c9ac05296/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ce8c25ca38cc0e3d7753ba180808de2c0c8cb24eae0df64491e40921454e9831", size = 2444697, upload-time = "2026-10-11T18:34:13.535Z" }, + { url = "https://files.pythonhosted.org/packages/b8/0d/1b1149f60a00ea21ba5f70e28acbd40feb4598af414f80f53c921fac07c9/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7689580e72a642ab5ec64d5f55b2e33636fa43b4ebe63c0c2c965ef307c7d1aa", size = 2159961, upload-time = "2026-10-11T18:34:15.56Z" }, + { url = "https://files.pythonhosted.org/packages/1e/35/f236549299dcc78e71e945495d7ec67e78d20844d0999c60601685003031/pydantic_core-2.50.1-cp315-cp315-manylinux_2_31_riscv64.whl", hash = "sha256:d5c0e32fdbce7f1e8ef4d11f655694bf5f4175c757a9f1dc2be09b8864e5bcf5", size = 2234581, upload-time = "2026-10-11T18:34:17.502Z" }, + { url = "https://files.pythonhosted.org/packages/6a/85/26901a490522b7f75ef9bb9a7afb73e5bb550f0e1cb5b99a0069183e2eb9/pydantic_core-2.50.1-cp315-cp315-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:40f523349960fa30f3ea51404308ff50f9997a90df639590f47a057c1f32b415", size = 2244090, upload-time = "2026-10-11T18:34:19.402Z" }, + { url = "https://files.pythonhosted.org/packages/ca/2c/481bcfc70ceeb77a778ca6e5b705fe592cb64735c108157f81b7dd9c280e/pydantic_core-2.50.1-cp315-cp315-musllinux_1_1_aarch64.whl", hash = "sha256:d4193206b6587047437f6f11d7e776df23e1c1e23af2a54d9347275614791e10", size = 2277948, upload-time = "2026-10-11T18:34:21.317Z" }, + { url = "https://files.pythonhosted.org/packages/24/eb/f1e09333faa7ba447cde967310f758430cc7c5e987bdab5228816c70030d/pydantic_core-2.50.1-cp315-cp315-musllinux_1_1_armv7l.whl", hash = "sha256:84bc765b282a9d5b7fe0348b8648904f25a6a04b2139da52b1dd30c8ac3a2c8f", size = 2449688, upload-time = "2026-10-11T18:34:23.321Z" }, + { url = "https://files.pythonhosted.org/packages/d1/b3/036bde636db8f76d92996e81aefc75678ab5cec4a07eea1ad0c72a893fc3/pydantic_core-2.50.1-cp315-cp315-musllinux_1_1_x86_64.whl", hash = "sha256:ed1e728b39a383c81035b2459cfcb35d99dfb01f7d6ebe3a913bc1cc5b81e459", size = 2479286, upload-time = "2026-10-11T18:34:25.214Z" }, + { url = "https://files.pythonhosted.org/packages/d0/a3/07f018294ee18d144afeb6df1a47d9e92960f014be45c5ed13519fa5af95/pydantic_core-2.50.1-cp315-cp315-win32.whl", hash = "sha256:bc94f474417604bd383d2cd445d071b07dd55fedceed3ce33407bf1fcc107290", size = 2103683, upload-time = "2026-10-11T18:34:27.42Z" }, + { url = "https://files.pythonhosted.org/packages/5f/98/f9bd7e1f9b6709f155acb9ef826d9c3884fe925f811fd8e55b9b52280bad/pydantic_core-2.50.1-cp315-cp315-win_amd64.whl", hash = "sha256:983a662de2571cb2502fc8ff47b6770b03d025d2eb314c92f77b3f07c74720ed", size = 2171681, upload-time = "2026-10-11T18:34:29.508Z" }, + { url = "https://files.pythonhosted.org/packages/10/87/4bb3e1e7f385c076ab5af4d6dd0571b22042cd8207eb810d5b9fef15ae31/pydantic_core-2.50.1-cp315-cp315-win_arm64.whl", hash = "sha256:94845ff54dc5193f228cab81b2662a04bfbb892e95bdc15edf7399000ce57d54", size = 2156251, upload-time = "2026-10-11T18:34:31.455Z" }, + { url = "https://files.pythonhosted.org/packages/47/47/83643225b08f2aef6c8cc4bbe6e3f79c5e139c4364a6e450d0f399d87774/pydantic_core-2.50.1-cp315-cp315t-macosx_10_12_x86_64.whl", hash = "sha256:4a53d13cdfbedbfa87f08b83c1a0a5efcc767d785a4b41934fa9cb672670493a", size = 2234363, upload-time = "2026-10-11T18:34:33.65Z" }, + { url = "https://files.pythonhosted.org/packages/5e/66/127ca649ba2f2462039dc1e694c6c01e00a3689f023a617364d3507e6d97/pydantic_core-2.50.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:efbecf43d321f7b9281441f1f213f7c21c66988b0e06c2730ba13ed47a46bb08", size = 2000972, upload-time = "2026-10-11T18:34:36.037Z" }, + { url = "https://files.pythonhosted.org/packages/5e/4f/e421e0a5d653b1203b090b2e48745976988d7338a647940704b5b9c2b399/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc1f08f68dac9f9e83845a8039880aba2ab553eb9b2259c3243a313182c253fe", size = 2022925, upload-time = "2026-10-11T18:34:37.972Z" }, + { url = "https://files.pythonhosted.org/packages/d5/4e/ea5568e2491e1a71100f15ae8c2d01ef52db42a184a2d4e716bc79e5eb8f/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5dfe41f232befddb9c4377f6cfc702b51595e2d78ed082672adf8758d2c4619f", size = 2192867, upload-time = "2026-10-11T18:34:39.921Z" }, + { url = "https://files.pythonhosted.org/packages/ae/5e/3b8c3a35acbe219909ada5defad5d7d9fed845fb2b37bd5ec518f453c119/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:adc06d218a1cadfd2ec4628424d7d79ce4eba69c2965e7e7b55106f0da5208c8", size = 2388687, upload-time = "2026-10-11T18:34:42.184Z" }, + { url = "https://files.pythonhosted.org/packages/b6/aa/7889b4e515f91a2e8c0ae6b5081fec0feb30c4398d1434e14793c60f173a/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2cf91809d0721ab81592ba67bea7694821679c10b1a2e3c3460082b286c1918a", size = 2464415, upload-time = "2026-10-11T18:34:44.384Z" }, + { url = "https://files.pythonhosted.org/packages/08/78/93449e628eb8a6fdcce3eff9043081179d1bc7ce6f1bff32dc5006f41e00/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23923ab9292c40da026330b1ecf4dc2618c8e86e0422e5d1fbf50d94d64ca4f8", size = 2150823, upload-time = "2026-10-11T18:34:46.392Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f1/72c5bc129fceb0d00f05dc1e67f518c1728de1928c55f81fc13d7690de39/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_31_riscv64.whl", hash = "sha256:f3377c8c2b3ce898423c5e5dd94c7982e30aa7717a7e6ab2470b9de364963709", size = 2245806, upload-time = "2026-10-11T18:34:48.805Z" }, + { url = "https://files.pythonhosted.org/packages/28/2a/922a0e78f3aa6ab837b59f88190233fb8dad546c17995fde9bb3ed3b9b49/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:455a773617b5913bf5c20d0692e5787b119e52c4d40ea644ca31f5758fd31be2", size = 2264160, upload-time = "2026-10-11T18:34:50.876Z" }, + { url = "https://files.pythonhosted.org/packages/52/a8/0f1449e3e1b20941c9372faa18e7b6a092e30cdfa841902473f7989532ac/pydantic_core-2.50.1-cp315-cp315t-musllinux_1_1_aarch64.whl", hash = "sha256:1a9006395dece0e32e704c315eff8a00bede494f6108546cfc5539c89fef4f9a", size = 2294031, upload-time = "2026-10-11T18:34:52.876Z" }, + { url = "https://files.pythonhosted.org/packages/d1/d0/1031f492857de70355fb16524bbb03efce5fd34c93ed4a1ec60be07e0d4b/pydantic_core-2.50.1-cp315-cp315t-musllinux_1_1_armv7l.whl", hash = "sha256:d2d82aa62521c55ddfb000ae70f88cdd8de974078f6024e821dfe5addd0c818f", size = 2468423, upload-time = "2026-10-11T18:34:54.995Z" }, + { url = "https://files.pythonhosted.org/packages/46/52/269ffffa645b8e47906395a39cf9db1151ae9fa4bcd7f47b960bc31baf37/pydantic_core-2.50.1-cp315-cp315t-musllinux_1_1_x86_64.whl", hash = "sha256:009634b83993777ddcd69cad0ffcace43dabde692109528e35f0fde91e386a8b", size = 2512598, upload-time = "2026-10-11T18:34:57.149Z" }, + { url = "https://files.pythonhosted.org/packages/31/5c/e47e28281f20326ff6f3c31d626f0a83e615d2d94ba41bb0ad6ec237184a/pydantic_core-2.50.1-cp315-cp315t-win32.whl", hash = "sha256:3fde4fdc6487a58d944ca87cf5adc95d5f266e872c19599f5f4c0a8a1b1f9f9f", size = 2098535, upload-time = "2026-10-11T18:34:59.313Z" }, + { url = "https://files.pythonhosted.org/packages/03/ad/759e181e69c1b472c60b2049e5f61d5da1deefdd5ce1df4bb2ebcf771f25/pydantic_core-2.50.1-cp315-cp315t-win_amd64.whl", hash = "sha256:1c8632d4ac04e6f91128fca584b3a8a507d81604c24eeaaad00d4be42765c32b", size = 2148645, upload-time = "2026-10-11T18:35:01.571Z" }, + { url = "https://files.pythonhosted.org/packages/6d/56/8a702c27e5be9f47e5f19d8669227424290e4c024e7c370279cbaf244b4e/pydantic_core-2.50.1-cp315-cp315t-win_arm64.whl", hash = "sha256:c3ede305158e75510be50869b319550ab072008c13d64d4ab1e094fb286b6f44", size = 2175297, upload-time = "2026-10-11T18:35:04.079Z" }, + { url = "https://files.pythonhosted.org/packages/e7/73/a23a327237d9bb985298ce47702e196f995ce850224c12c70886bd66bb5c/pydantic_core-2.50.1-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:062e891facce5ca296a1c37098e5e466780457f86413894b399f0cf22934f769", size = 2162560, upload-time = "2026-10-11T18:35:06.274Z" }, + { url = "https://files.pythonhosted.org/packages/df/b2/33b37b5e82408f402a5e82649a43e7c95cd5dab7beaeef2c35cedbfd18f2/pydantic_core-2.50.1-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:49c2cbb2397fe4d0987e84606e691af6cb87bc0ee1bd3e7b737f7e10b4c142f9", size = 2075250, upload-time = "2026-10-11T18:35:08.455Z" }, + { url = "https://files.pythonhosted.org/packages/04/62/c7d5b9249466ccab90f3ce4790c2399dbfb8172ae9e74a7753dd295fe65a/pydantic_core-2.50.1-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e4472072de0137ee0d8e72d6620e85939c271d2f90f6bbb4b15c24638b79f92", size = 2107891, upload-time = "2026-10-11T18:35:10.918Z" }, + { url = "https://files.pythonhosted.org/packages/d4/7e/28d29bc1657195933147f772dee0558d9e0f045bbc11db7f992f40c37bb5/pydantic_core-2.50.1-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ed4f3cef55164b026fefb41341b7754cc6b624c75dfe7142d2ecceb5ad21c87", size = 2268026, upload-time = "2026-10-11T18:35:13.336Z" }, + { url = "https://files.pythonhosted.org/packages/a5/09/1bcf160f3cd6333e2a76982fae5963e5032de0bcaaba38464223dc266bfe/pydantic_core-2.50.1-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:76e2e83fa6ec8cdc972d438dafc2522b3a47bee4ec0ae668b29cfb1977ab5242", size = 2217070, upload-time = "2026-10-11T18:35:15.688Z" }, + { url = "https://files.pythonhosted.org/packages/3d/81/f02de95eec7794dfc7a5bc69a834f0e834b31b3009014ce6de903855f775/pydantic_core-2.50.1-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:a51eee75939cf811ac09b278745a6cee7dc873ccfbc8b9af3cc88fe4b7ce25b5", size = 2039027, upload-time = "2026-10-11T18:35:18.07Z" }, + { url = "https://files.pythonhosted.org/packages/4d/16/227746ed3771d9bf2304568b55134849ece34e13b38b1d76de763015c77f/pydantic_core-2.50.1-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae28183297fb0d2b8dc46a1f01d51f5e45825fc5afe76a835a6cb7fb34821295", size = 2109009, upload-time = "2026-10-11T18:35:20.218Z" }, + { url = "https://files.pythonhosted.org/packages/e5/b9/7664d1592a0e5a74903f357cd5b28ceb7336f3473256c5a4e8c8432f1881/pydantic_core-2.50.1-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88e492e8b9d0312e7dc13667c30222abf284dc3b79b5302b3607b41a5784ce61", size = 2269883, upload-time = "2026-10-11T18:35:22.48Z" }, + { url = "https://files.pythonhosted.org/packages/bd/35/002a378302ff91d2a7f149bc8d22363faf581ba40ac39d0123444315a32d/pydantic_core-2.50.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7456d699b13954e9c0164dcb267250a10ae0dfb03e6e26d6796ab0d46e189c84", size = 2154076, upload-time = "2026-10-11T18:35:24.743Z" }, + { url = "https://files.pythonhosted.org/packages/4b/5c/7a034330082c00f3c9795052bd9b161aaaf6e1951e897ac00a094823ef7e/pydantic_core-2.50.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0d955195bbbe489ad343fcc956eacea9357b79cb22192c66cacdefcbc14b32f", size = 2085850, upload-time = "2026-10-11T18:35:27.009Z" }, + { url = "https://files.pythonhosted.org/packages/57/fa/d5b44a7d3d4eceed6ef8713a0003af56fefde6ec75915513bcdd5d730cd9/pydantic_core-2.50.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2c634642694e6a0dad2ab1d375589fa671fd442edd5caf7d9737b8f6ca22906", size = 2259754, upload-time = "2026-10-11T18:35:29.763Z" }, + { url = "https://files.pythonhosted.org/packages/b6/88/e01dd37301710bd8b3b2daf34ec9e2a6e83a333130831c0d468b0292a48c/pydantic_core-2.50.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ee6db2fbed51a7991302e8fac498cd67e336246026d0dfa84cf5166ce1412760", size = 2268712, upload-time = "2026-10-11T18:35:32.654Z" }, + { url = "https://files.pythonhosted.org/packages/3e/43/5bb80d4a4d2b2d84612a30205662cc521a20d209c94abc079ea48b4e0df2/pydantic_core-2.50.1-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:79490e33c4c0fcb933bbbcfc3a62184d8803b99f535863dfbb925e1bcb6945ad", size = 2305049, upload-time = "2026-10-11T18:35:35.392Z" }, + { url = "https://files.pythonhosted.org/packages/e8/7b/e3ef76b269cfe4a5bd3bdcf5d7124cf05e5a8909d443b91639307116bdae/pydantic_core-2.50.1-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:48569b0ade9edfbe065cad1d700175546592aebbb42f02adcebcc26e75b896fe", size = 2466001, upload-time = "2026-10-11T18:35:37.791Z" }, + { url = "https://files.pythonhosted.org/packages/8f/7a/ea0947aadc1d9f72d4be00d2e19939611ec17363bcb5e6eb9ec7d8221c34/pydantic_core-2.50.1-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:5f3cae32fc46121f787cb2486de9cf95a8bf72aec5cc78f64c606fa1735a6ef5", size = 2481777, upload-time = "2026-10-11T18:35:40.287Z" }, + { url = "https://files.pythonhosted.org/packages/24/f3/d15bc0b1fb0c4f1e07b3326ffb7489f7ae70da2b56a0884d22641b0eb47c/pydantic_core-2.50.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:7f476456ac2bb0d937f75191494a09c83a30765fea4f70f3b404942fe25f6cdf", size = 2336787, upload-time = "2026-10-11T18:35:42.558Z" }, ] [[package]] name = "pydantic-settings" -version = "2.11.0" +version = "2.15.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pydantic" }, { name = "python-dotenv" }, { name = "typing-inspection" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/20/c5/dbbc27b814c71676593d1c3f718e6cd7d4f00652cefa24b75f7aa3efb25e/pydantic_settings-2.11.0.tar.gz", hash = "sha256:d0e87a1c7d33593beb7194adb8470fc426e95ba02af83a0f23474a04c9a08180", size = 188394, upload-time = "2025-09-24T14:19:11.764Z" } +sdist = { url = "https://files.pythonhosted.org/packages/68/ca/31c57507b13119d7d3cfa1576dad2911a4861e3be07b579395f4e9d393f9/pydantic_settings-2.15.0.tar.gz", hash = "sha256:694b793e84f766ba76a90ebdefc01d0a9a045dab0382bee70393da93712ad117", size = 261253, upload-time = "2026-08-07T09:24:57.419Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/83/d6/887a1ff844e64aa823fb4905978d882a633cfe295c32eacad582b78a7d8b/pydantic_settings-2.11.0-py3-none-any.whl", hash = "sha256:fe2cea3413b9530d10f3a5875adffb17ada5c1e1bab0b2885546d7310415207c", size = 48608, upload-time = "2025-09-24T14:19:10.015Z" }, + { url = "https://files.pythonhosted.org/packages/30/a4/2bffa9f8e804325a09867f0e9d30795c80ea9f8d62560bd1b6ad6220eb2f/pydantic_settings-2.15.0-py3-none-any.whl", hash = "sha256:0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42", size = 69413, upload-time = "2026-08-07T09:24:55.839Z" }, ] [[package]] @@ -2262,7 +3725,6 @@ dependencies = [ { name = "lunr" }, { name = "platformdirs" }, { name = "requests" }, - { name = "tomli", marker = "python_full_version < '3.11'" }, { name = "twisted" }, { name = "urllib3" }, ] @@ -2273,41 +3735,63 @@ wheels = [ [[package]] name = "pygments" -version = "2.19.2" +version = "2.21.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, +] + +[[package]] +name = "pyjwt" +version = "2.15.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/ea/5194e52748b0da83d71e082d75496eaec6e58f419f5e184786ded517e6a9/pyjwt-2.15.1.tar.gz", hash = "sha256:4f259e80cdfb6b3fc18a7de51fd1ef9ec79652f25019bae68975ca2468a34df8", size = 121252, upload-time = "2026-09-28T18:40:42.598Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/50/ca/44de4e75f8aadc457f0634be3b542815078ded46dca30efb960edeecad6e/pyjwt-2.15.1-py3-none-any.whl", hash = "sha256:42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193", size = 33860, upload-time = "2026-09-28T18:40:41.429Z" }, +] + +[package.optional-dependencies] +crypto = [ + { name = "cryptography" }, +] + +[[package]] +name = "pyparsing" +version = "3.3.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/11/b213bebff182584360cb8d17c72c1677fec5c5c228de439e63bcf8ab1c8f/pyparsing-3.3.3.tar.gz", hash = "sha256:928ae7e20211f3b6f3915a72f06a0cfd29ab9d24279dd6346b6b1a7146397d36", size = 1050487, upload-time = "2026-09-20T20:59:05.609Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, + { url = "https://files.pythonhosted.org/packages/38/bb/d215ee7c73b61497b28a5503f9f53523f294fcc936762b7caf90e0c1c2b5/pyparsing-3.3.3-py3-none-any.whl", hash = "sha256:ece8c00a69cf01b45d0b1dedabb469c90d8caf996d4fda40f147627a122849a4", size = 126420, upload-time = "2026-09-20T20:59:04.025Z" }, ] [[package]] name = "pyright" -version = "1.1.403" +version = "1.1.414" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "nodeenv" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/fe/f6/35f885264ff08c960b23d1542038d8da86971c5d8c955cfab195a4f672d7/pyright-1.1.403.tar.gz", hash = "sha256:3ab69b9f41c67fb5bbb4d7a36243256f0d549ed3608678d381d5f51863921104", size = 3913526, upload-time = "2025-07-09T07:15:52.882Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e1/1b/244c7b710031ada80f27e579ec20d28a2285dfc318fed0339866b1047f12/pyright-1.1.414.tar.gz", hash = "sha256:523c0a97c60da6333234955c277730c9cf4f5bd6d5399e7b7d2b0fc5d3599524", size = 4154638, upload-time = "2026-09-10T12:26:53.181Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/49/b6/b04e5c2f41a5ccad74a1a4759da41adb20b4bc9d59a5e08d29ba60084d07/pyright-1.1.403-py3-none-any.whl", hash = "sha256:c0eeca5aa76cbef3fcc271259bbd785753c7ad7bcac99a9162b4c4c7daed23b3", size = 5684504, upload-time = "2025-07-09T07:15:50.958Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ba/18b6e682ead424ad24bcc134339ae5d1b931cd9ae260540592a058a91279/pyright-1.1.414-py3-none-any.whl", hash = "sha256:2a6b4b3298c9eec174c5ed83bd338de6eee82df2992f3e1930e6199d381be36f", size = 6225049, upload-time = "2026-09-10T12:26:51.427Z" }, ] [[package]] name = "pytest" -version = "7.4.4" +version = "9.1.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, { name = "iniconfig" }, { name = "packaging" }, { name = "pluggy" }, - { name = "tomli", marker = "python_full_version < '3.11'" }, + { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/80/1f/9d8e98e4133ffb16c90f3b405c43e38d3abb715bb5d7a63a5a684f7e46a3/pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280", size = 1357116, upload-time = "2023-12-31T12:00:18.035Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/51/ff/f6e8b8f39e08547faece4bd80f89d5a8de68a38b2d179cc1c4490ffa3286/pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8", size = 325287, upload-time = "2023-12-31T12:00:13.963Z" }, + { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, ] [[package]] @@ -2324,16 +3808,28 @@ wheels = [ [[package]] name = "pytest-cov" -version = "7.0.0" +version = "7.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "coverage", extra = ["toml"] }, { name = "pluggy" }, { name = "pytest" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5e/f7/c933acc76f5208b3b00089573cf6a2bc26dc80a8aece8f52bb7d6b1855ca/pytest_cov-7.0.0.tar.gz", hash = "sha256:33c97eda2e049a0c5298e91f519302a1334c26ac65c1a483d6206fd458361af1", size = 54328, upload-time = "2025-09-09T10:57:02.113Z" } +sdist = { url = "https://files.pythonhosted.org/packages/b1/51/a849f96e117386044471c8ec2bd6cfebacda285da9525c9106aeb28da671/pytest_cov-7.1.0.tar.gz", hash = "sha256:30674f2b5f6351aa09702a9c8c364f6a01c27aae0c1366ae8016160d1efc56b2", size = 55592, upload-time = "2026-03-21T20:11:16.284Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9d/7a/d968e294073affff457b041c2be9868a40c1c71f4a35fcc1e45e5493067b/pytest_cov-7.1.0-py3-none-any.whl", hash = "sha256:a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678", size = 22876, upload-time = "2026-03-21T20:11:14.438Z" }, +] + +[[package]] +name = "pytest-flakefinder" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ec/53/69c56a93ea057895b5761c5318455804873a6cd9d796d7c55d41c2358125/pytest-flakefinder-1.1.0.tar.gz", hash = "sha256:e2412a1920bdb8e7908783b20b3d57e9dad590cc39a93e8596ffdd493b403e0e", size = 6795, upload-time = "2022-10-26T18:27:54.243Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ee/49/1377b49de7d0c1ce41292161ea0f721913fa8722c19fb9c1e3aa0367eecb/pytest_cov-7.0.0-py3-none-any.whl", hash = "sha256:3b8e9558b16cc1479da72058bdecf8073661c7f57f7d3c5f22a1c23507f2d861", size = 22424, upload-time = "2025-09-09T10:57:00.695Z" }, + { url = "https://files.pythonhosted.org/packages/33/8b/06787150d0fd0cbd3a8054262b56f91631c7778c1bc91bf4637e47f909ad/pytest_flakefinder-1.1.0-py2.py3-none-any.whl", hash = "sha256:741e0e8eea427052f5b8c89c2b3c3019a50c39a59ce4df6a305a2c2d9ba2bd13", size = 4644, upload-time = "2022-10-26T18:27:52.128Z" }, ] [[package]] @@ -2351,15 +3847,15 @@ wheels = [ [[package]] name = "pytest-rerunfailures" -version = "16.1" +version = "16.7" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "packaging" }, { name = "pytest" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/de/04/71e9520551fc8fe2cf5c1a1842e4e600265b0815f2016b7c27ec85688682/pytest_rerunfailures-16.1.tar.gz", hash = "sha256:c38b266db8a808953ebd71ac25c381cb1981a78ff9340a14bcb9f1b9bff1899e", size = 30889, upload-time = "2025-10-10T07:06:01.238Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d1/b0/6b5337f9d59b26b0069ea3d5e863c31dc04b69e51bbfb1cf2ea6328fba87/pytest_rerunfailures-16.7.tar.gz", hash = "sha256:6956ddfb65ca1d07e7e3d99e2c5359d82300f4cb062e6049563bd2c106f72d5c", size = 59666, upload-time = "2026-09-17T07:08:48.871Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/77/54/60eabb34445e3db3d3d874dc1dfa72751bfec3265bd611cb13c8b290adea/pytest_rerunfailures-16.1-py3-none-any.whl", hash = "sha256:5d11b12c0ca9a1665b5054052fcc1084f8deadd9328962745ef6b04e26382e86", size = 14093, upload-time = "2025-10-10T07:06:00.019Z" }, + { url = "https://files.pythonhosted.org/packages/c1/d3/07ea35102cf2020ddaaac368d2a6f0bcc63d6523fb8918805bac3eb8b98f/pytest_rerunfailures-16.7-py3-none-any.whl", hash = "sha256:edf1886209c2b7dafe35b5bf1708d6ec40ccf6c6b357f0f02807efcec0204c99", size = 23952, upload-time = "2026-09-17T07:08:47.635Z" }, ] [[package]] @@ -2374,12 +3870,25 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fa/b6/3127540ecdf1464a00e5a01ee60a1b09175f6913f0644ac748494d9c4b21/pytest_timeout-2.4.0-py3-none-any.whl", hash = "sha256:c42667e5cdadb151aeb5b26d114aff6bdf5a907f176a007a30b940d3d865b5c2", size = 14382, upload-time = "2025-05-05T19:44:33.502Z" }, ] +[[package]] +name = "pytest-xdist" +version = "3.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "execnet" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/78/b4/439b179d1ff526791eb921115fca8e44e596a13efeda518b9d845a619450/pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1", size = 88069, upload-time = "2025-07-01T13:30:59.346Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ca/31/d4e37e9e550c2b92a9cbc2e4d0b7420a27224968580b5a447f420847c975/pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88", size = 46396, upload-time = "2025-07-01T13:30:56.632Z" }, +] + [[package]] name = "python-dateutil" version = "2.9.0.post0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "six", marker = "python_full_version < '3.14'" }, + { name = "six" }, ] sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } wheels = [ @@ -2388,42 +3897,42 @@ wheels = [ [[package]] name = "python-dotenv" -version = "1.1.1" +version = "1.2.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f6/b0/4bc07ccd3572a2f9df7e6782f52b0c6c90dcbb803ac4a167702d7d0dfe1e/python_dotenv-1.1.1.tar.gz", hash = "sha256:a8a6399716257f45be6a007360200409fce5cda2661e3dec71d23dc15f6189ab", size = 41978, upload-time = "2025-06-24T04:21:07.341Z" } +sdist = { url = "https://files.pythonhosted.org/packages/74/26/2fbeedb218a787a5eea551c7532cac4e009f83d689dd2faa0d0353473f86/python_dotenv-1.2.4.tar.gz", hash = "sha256:f0d53e69935a851c0dcc78f3ab7aaccd8cabef0b92382b576b824212902873c0", size = 60824, upload-time = "2026-10-01T05:36:10Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5f/ed/539768cf28c661b5b068d66d96a2f155c4971a5d55684a514c1a0e0dec2f/python_dotenv-1.1.1-py3-none-any.whl", hash = "sha256:31f23644fe2602f88ff55e1f5c79ba497e01224ee7737937930c448e4d0e24dc", size = 20556, upload-time = "2025-06-24T04:21:06.073Z" }, + { url = "https://files.pythonhosted.org/packages/60/d1/38f3a3405989a89ac18390803e70c6ad7c7760da4f9b83cbeca0c44a0c72/python_dotenv-1.2.4-py3-none-any.whl", hash = "sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc", size = 23266, upload-time = "2026-10-01T05:36:08.633Z" }, ] [[package]] name = "python-multipart" -version = "0.0.20" +version = "0.0.32" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f3/87/f44d7c9f274c7ee665a29b885ec97089ec5dc034c7f3fafa03da9e39a09e/python_multipart-0.0.20.tar.gz", hash = "sha256:8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13", size = 37158, upload-time = "2024-12-16T19:45:46.972Z" } +sdist = { url = "https://files.pythonhosted.org/packages/5b/42/55c32bb9b12693c092ad250a0e82edb5b31ddeda6eb772de5f308b3804ad/python_multipart-0.0.32.tar.gz", hash = "sha256:be54b7f3fa167bb83e4fcd936b887b708f4e57fe75911c02aebf53efaf8d938e", size = 46881, upload-time = "2026-06-04T16:18:58.647Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/45/58/38b5afbc1a800eeea951b9285d3912613f2603bdf897a4ab0f4bd7f405fc/python_multipart-0.0.20-py3-none-any.whl", hash = "sha256:8a62d3a8335e06589fe01f2a3e178cdcc632f3fbe0d492ad9ee0ec35aab1f104", size = 24546, upload-time = "2024-12-16T19:45:44.423Z" }, + { url = "https://files.pythonhosted.org/packages/e1/04/e8135ebd1ad02c56ec633277529b2602ff99ff634be76cdba5744cf554fd/python_multipart-0.0.32-py3-none-any.whl", hash = "sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23", size = 30042, upload-time = "2026-06-04T16:18:57.319Z" }, ] [[package]] name = "pywin32" -version = "311" +version = "312" source = { registry = "https://pypi.org/simple" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7b/40/44efbb0dfbd33aca6a6483191dae0716070ed99e2ecb0c53683f400a0b4f/pywin32-311-cp310-cp310-win32.whl", hash = "sha256:d03ff496d2a0cd4a5893504789d4a15399133fe82517455e78bad62efbb7f0a3", size = 8760432, upload-time = "2025-07-14T20:13:05.9Z" }, - { url = "https://files.pythonhosted.org/packages/5e/bf/360243b1e953bd254a82f12653974be395ba880e7ec23e3731d9f73921cc/pywin32-311-cp310-cp310-win_amd64.whl", hash = "sha256:797c2772017851984b97180b0bebe4b620bb86328e8a884bb626156295a63b3b", size = 9590103, upload-time = "2025-07-14T20:13:07.698Z" }, - { url = "https://files.pythonhosted.org/packages/57/38/d290720e6f138086fb3d5ffe0b6caa019a791dd57866940c82e4eeaf2012/pywin32-311-cp310-cp310-win_arm64.whl", hash = "sha256:0502d1facf1fed4839a9a51ccbcc63d952cf318f78ffc00a7e78528ac27d7a2b", size = 8778557, upload-time = "2025-07-14T20:13:11.11Z" }, - { url = "https://files.pythonhosted.org/packages/7c/af/449a6a91e5d6db51420875c54f6aff7c97a86a3b13a0b4f1a5c13b988de3/pywin32-311-cp311-cp311-win32.whl", hash = "sha256:184eb5e436dea364dcd3d2316d577d625c0351bf237c4e9a5fabbcfa5a58b151", size = 8697031, upload-time = "2025-07-14T20:13:13.266Z" }, - { url = "https://files.pythonhosted.org/packages/51/8f/9bb81dd5bb77d22243d33c8397f09377056d5c687aa6d4042bea7fbf8364/pywin32-311-cp311-cp311-win_amd64.whl", hash = "sha256:3ce80b34b22b17ccbd937a6e78e7225d80c52f5ab9940fe0506a1a16f3dab503", size = 9508308, upload-time = "2025-07-14T20:13:15.147Z" }, - { url = "https://files.pythonhosted.org/packages/44/7b/9c2ab54f74a138c491aba1b1cd0795ba61f144c711daea84a88b63dc0f6c/pywin32-311-cp311-cp311-win_arm64.whl", hash = "sha256:a733f1388e1a842abb67ffa8e7aad0e70ac519e09b0f6a784e65a136ec7cefd2", size = 8703930, upload-time = "2025-07-14T20:13:16.945Z" }, - { url = "https://files.pythonhosted.org/packages/e7/ab/01ea1943d4eba0f850c3c61e78e8dd59757ff815ff3ccd0a84de5f541f42/pywin32-311-cp312-cp312-win32.whl", hash = "sha256:750ec6e621af2b948540032557b10a2d43b0cee2ae9758c54154d711cc852d31", size = 8706543, upload-time = "2025-07-14T20:13:20.765Z" }, - { url = "https://files.pythonhosted.org/packages/d1/a8/a0e8d07d4d051ec7502cd58b291ec98dcc0c3fff027caad0470b72cfcc2f/pywin32-311-cp312-cp312-win_amd64.whl", hash = "sha256:b8c095edad5c211ff31c05223658e71bf7116daa0ecf3ad85f3201ea3190d067", size = 9495040, upload-time = "2025-07-14T20:13:22.543Z" }, - { url = "https://files.pythonhosted.org/packages/ba/3a/2ae996277b4b50f17d61f0603efd8253cb2d79cc7ae159468007b586396d/pywin32-311-cp312-cp312-win_arm64.whl", hash = "sha256:e286f46a9a39c4a18b319c28f59b61de793654af2f395c102b4f819e584b5852", size = 8710102, upload-time = "2025-07-14T20:13:24.682Z" }, - { url = "https://files.pythonhosted.org/packages/a5/be/3fd5de0979fcb3994bfee0d65ed8ca9506a8a1260651b86174f6a86f52b3/pywin32-311-cp313-cp313-win32.whl", hash = "sha256:f95ba5a847cba10dd8c4d8fefa9f2a6cf283b8b88ed6178fa8a6c1ab16054d0d", size = 8705700, upload-time = "2025-07-14T20:13:26.471Z" }, - { url = "https://files.pythonhosted.org/packages/e3/28/e0a1909523c6890208295a29e05c2adb2126364e289826c0a8bc7297bd5c/pywin32-311-cp313-cp313-win_amd64.whl", hash = "sha256:718a38f7e5b058e76aee1c56ddd06908116d35147e133427e59a3983f703a20d", size = 9494700, upload-time = "2025-07-14T20:13:28.243Z" }, - { url = "https://files.pythonhosted.org/packages/04/bf/90339ac0f55726dce7d794e6d79a18a91265bdf3aa70b6b9ca52f35e022a/pywin32-311-cp313-cp313-win_arm64.whl", hash = "sha256:7b4075d959648406202d92a2310cb990fea19b535c7f4a78d3f5e10b926eeb8a", size = 8709318, upload-time = "2025-07-14T20:13:30.348Z" }, - { url = "https://files.pythonhosted.org/packages/c9/31/097f2e132c4f16d99a22bfb777e0fd88bd8e1c634304e102f313af69ace5/pywin32-311-cp314-cp314-win32.whl", hash = "sha256:b7a2c10b93f8986666d0c803ee19b5990885872a7de910fc460f9b0c2fbf92ee", size = 8840714, upload-time = "2025-07-14T20:13:32.449Z" }, - { url = "https://files.pythonhosted.org/packages/90/4b/07c77d8ba0e01349358082713400435347df8426208171ce297da32c313d/pywin32-311-cp314-cp314-win_amd64.whl", hash = "sha256:3aca44c046bd2ed8c90de9cb8427f581c479e594e99b5c0bb19b29c10fd6cb87", size = 9656800, upload-time = "2025-07-14T20:13:34.312Z" }, - { url = "https://files.pythonhosted.org/packages/c0/d2/21af5c535501a7233e734b8af901574572da66fcc254cb35d0609c9080dd/pywin32-311-cp314-cp314-win_arm64.whl", hash = "sha256:a508e2d9025764a8270f93111a970e1d0fbfc33f4153b388bb649b7eec4f9b42", size = 8932540, upload-time = "2025-07-14T20:13:36.379Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f5/10a6e845a00fc5e7afd0a988b744f403d4d57162a28d160a093c4d9322f0/pywin32-312-cp311-cp311-win32.whl", hash = "sha256:17948aeadbdb091f0ced6ef0841620794e68327b94ee415571c1203594b7215c", size = 6362659, upload-time = "2026-06-04T07:49:21.349Z" }, + { url = "https://files.pythonhosted.org/packages/35/c4/dcd2d62b5944b6d5db53413a5899016ccd57ffcb7278f3f81655d25d2027/pywin32-312-cp311-cp311-win_amd64.whl", hash = "sha256:d11417d84412f859b722fad0841b3614459ed0047f7542d8362e77884f6b6e8a", size = 6928825, upload-time = "2026-06-04T07:49:23.934Z" }, + { url = "https://files.pythonhosted.org/packages/b7/56/3cbb433fe4501cdba2eb9040f56a4e1a8243faa4186b25295564d1a7a79d/pywin32-312-cp311-cp311-win_arm64.whl", hash = "sha256:b2200a054ca6d6625c4842fc56a4976a4b47f96b73dbe5538c3f813a80359f47", size = 6721875, upload-time = "2026-06-04T07:49:26.416Z" }, + { url = "https://files.pythonhosted.org/packages/83/ff/32aa7d2ed0ab12b323aaa64f9b75e6ad4f8fd09f9ccfc28c79414d46838d/pywin32-312-cp312-cp312-win32.whl", hash = "sha256:dab4f65ac9c4e48400a2a0530c46c3c579cd5905ecd11b80692373915269208b", size = 6371877, upload-time = "2026-06-04T07:49:28.836Z" }, + { url = "https://files.pythonhosted.org/packages/03/d9/77040d3b43df3f3be32ea289433d660d2727f5ba327bc73be835127d9d60/pywin32-312-cp312-cp312-win_amd64.whl", hash = "sha256:b457f6d628a47e8a7346ce22acb7e1a46a4a78b52e1d17e1af56871bd19a93bc", size = 6914841, upload-time = "2026-06-04T07:49:31.85Z" }, + { url = "https://files.pythonhosted.org/packages/e3/cc/7b1ec671775756020a0ee7f4feeaf3c568f0ab86bd3900088cf986937a92/pywin32-312-cp312-cp312-win_arm64.whl", hash = "sha256:6017c58e12f6809fbb0555b75df144c2922a9ffd18e4b9b5afa863b6c1a9d950", size = 6727901, upload-time = "2026-06-04T07:49:34.244Z" }, + { url = "https://files.pythonhosted.org/packages/2d/41/12fbfd7f36ed2146d8bc9de96c2741296bf0d490b98508496cff322e274c/pywin32-312-cp313-cp313-win32.whl", hash = "sha256:7a27df850933d16a8eabfbaeb73d52b273e2da667f80d70b01a89d1f6828d02c", size = 6370184, upload-time = "2026-06-04T07:49:36.253Z" }, + { url = "https://files.pythonhosted.org/packages/ba/db/36a78e3403099d31d9746d13fdcde5accc43c1155f375a34d15983a479a7/pywin32-312-cp313-cp313-win_amd64.whl", hash = "sha256:c53e878d15a1c44788082bfe712a905433473aa38f86375b7cf8b45e3acbaaf9", size = 6914298, upload-time = "2026-06-04T07:49:38.876Z" }, + { url = "https://files.pythonhosted.org/packages/84/37/c1697194092b76de9ed47ca124323f02c57ffc8a45c06f88a3d5acaf01eb/pywin32-312-cp313-cp313-win_arm64.whl", hash = "sha256:59aba5d5940842075343a5ddc6b11f1cdf0d1567fe745290359dfbcc7c2eb831", size = 6727640, upload-time = "2026-06-04T07:49:41.083Z" }, + { url = "https://files.pythonhosted.org/packages/fc/2b/1f3cded5822fd49c02f40544cbb5f58c7cfd6b1694869fd476cb6170ee97/pywin32-312-cp314-cp314-win32.whl", hash = "sha256:a77a90fbb6881238d2ca9c6fd797b25817f3768fe78d214a90137ff055a75f5b", size = 6468928, upload-time = "2026-06-04T07:49:43.188Z" }, + { url = "https://files.pythonhosted.org/packages/21/82/3bf86d2e2808902013132e1ce905a7da0da53790f3836c64bf44d55e24f3/pywin32-312-cp314-cp314-win_amd64.whl", hash = "sha256:a4dd3a848290ef724347b19f301045831d8e802fa4464f491b98b1e0a081432e", size = 7024157, upload-time = "2026-06-04T07:49:45.34Z" }, + { url = "https://files.pythonhosted.org/packages/a4/0e/73f6d6800b4f27655abd9e9f6aaeaefcddb2b946e4674efa2bab184a7f7b/pywin32-312-cp314-cp314-win_arm64.whl", hash = "sha256:9fce94568364e0155e6dfb781ac5d95903be8baf28670632beab1b523f300daa", size = 6839598, upload-time = "2026-06-04T07:49:47.613Z" }, + { url = "https://files.pythonhosted.org/packages/eb/61/caa39686032d2ebdd04ff0ab5cbe163126c0066d98e00c9018646e42393b/pywin32-312-cp315-cp315-win32.whl", hash = "sha256:5c1fbe4a937a73ae9297384a3da38518cbc694c68ad8a809b2e19acd350f03ed", size = 6471159, upload-time = "2026-06-04T07:49:50.035Z" }, + { url = "https://files.pythonhosted.org/packages/0f/cd/7e1de64a4a6f69c04214169657ccab0d93a670ea50e35eb8f489d7378249/pywin32-312-cp315-cp315-win_amd64.whl", hash = "sha256:c2f03a0f73f804a13c2735b99392b0cd426bb4f2c4d0178e5ac966a0f21618d5", size = 7025293, upload-time = "2026-06-04T07:49:54.857Z" }, + { url = "https://files.pythonhosted.org/packages/23/ed/4532e9388e65fa16b46776ef47ad631a64eda1631884488af707666350ed/pywin32-312-cp315-cp315-win_arm64.whl", hash = "sha256:a8597d28f267b39074aef51fa593530082b39cbe5a074226096857b1fed2dfb9", size = 6840337, upload-time = "2026-06-04T07:49:57.531Z" }, ] [[package]] @@ -2441,15 +3950,6 @@ version = "6.0.3" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" }, - { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" }, - { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" }, - { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" }, - { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" }, - { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" }, - { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" }, - { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" }, - { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" }, { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, @@ -2501,16 +4001,16 @@ wheels = [ [[package]] name = "readme-renderer" -version = "44.0" +version = "46.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "docutils" }, { name = "nh3" }, { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5a/a9/104ec9234c8448c4379768221ea6df01260cd6c2ce13182d4eac531c8342/readme_renderer-44.0.tar.gz", hash = "sha256:8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1", size = 32056, upload-time = "2024-07-08T15:00:57.805Z" } +sdist = { url = "https://files.pythonhosted.org/packages/25/d7/9309494fad74ee831d4546f69325b5519f37c6dfb2d9ba495db8c6d4f4ca/readme_renderer-46.0.tar.gz", hash = "sha256:af3e964914f6310a33ff67b72a4bdd940bed8d7c3bdecd2d14f40edf284bfe90", size = 38382, upload-time = "2026-08-28T15:18:32.49Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e1/67/921ec3024056483db83953ae8e48079ad62b92db7880013ca77632921dd0/readme_renderer-44.0-py3-none-any.whl", hash = "sha256:2fbca89b81a08526aadf1357a8c2ae889ec05fb03f5da67f9769c9a592166151", size = 13310, upload-time = "2024-07-08T15:00:56.577Z" }, + { url = "https://files.pythonhosted.org/packages/4b/72/ac5ca81fe9121fcaa9d828d21017cba00a16a98e4ea5fb60c878f93dda4f/readme_renderer-46.0-py3-none-any.whl", hash = "sha256:d0dae1f74bb273b534770cb4cccb6bb78735540afdb03c2146f4e19dcd412560", size = 14239, upload-time = "2026-08-28T15:18:31.132Z" }, ] [[package]] @@ -2529,114 +4029,127 @@ wheels = [ [[package]] name = "regex" -version = "2025.9.18" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/49/d3/eaa0d28aba6ad1827ad1e716d9a93e1ba963ada61887498297d3da715133/regex-2025.9.18.tar.gz", hash = "sha256:c5ba23274c61c6fef447ba6a39333297d0c247f53059dba0bca415cac511edc4", size = 400917, upload-time = "2025-09-19T00:38:35.79Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/d8/7e06171db8e55f917c5b8e89319cea2d86982e3fc46b677f40358223dece/regex-2025.9.18-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:12296202480c201c98a84aecc4d210592b2f55e200a1d193235c4db92b9f6788", size = 484829, upload-time = "2025-09-19T00:35:05.215Z" }, - { url = "https://files.pythonhosted.org/packages/8d/70/bf91bb39e5bedf75ce730ffbaa82ca585584d13335306d637458946b8b9f/regex-2025.9.18-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:220381f1464a581f2ea988f2220cf2a67927adcef107d47d6897ba5a2f6d51a4", size = 288993, upload-time = "2025-09-19T00:35:08.154Z" }, - { url = "https://files.pythonhosted.org/packages/fe/89/69f79b28365eda2c46e64c39d617d5f65a2aa451a4c94de7d9b34c2dc80f/regex-2025.9.18-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:87f681bfca84ebd265278b5daa1dcb57f4db315da3b5d044add7c30c10442e61", size = 286624, upload-time = "2025-09-19T00:35:09.717Z" }, - { url = "https://files.pythonhosted.org/packages/44/31/81e62955726c3a14fcc1049a80bc716765af6c055706869de5e880ddc783/regex-2025.9.18-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:34d674cbba70c9398074c8a1fcc1a79739d65d1105de2a3c695e2b05ea728251", size = 780473, upload-time = "2025-09-19T00:35:11.013Z" }, - { url = "https://files.pythonhosted.org/packages/fb/23/07072b7e191fbb6e213dc03b2f5b96f06d3c12d7deaded84679482926fc7/regex-2025.9.18-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:385c9b769655cb65ea40b6eea6ff763cbb6d69b3ffef0b0db8208e1833d4e746", size = 849290, upload-time = "2025-09-19T00:35:12.348Z" }, - { url = "https://files.pythonhosted.org/packages/b3/f0/aec7f6a01f2a112210424d77c6401b9015675fb887ced7e18926df4ae51e/regex-2025.9.18-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8900b3208e022570ae34328712bef6696de0804c122933414014bae791437ab2", size = 897335, upload-time = "2025-09-19T00:35:14.058Z" }, - { url = "https://files.pythonhosted.org/packages/cc/90/2e5f9da89d260de7d0417ead91a1bc897f19f0af05f4f9323313b76c47f2/regex-2025.9.18-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c204e93bf32cd7a77151d44b05eb36f469d0898e3fba141c026a26b79d9914a0", size = 789946, upload-time = "2025-09-19T00:35:15.403Z" }, - { url = "https://files.pythonhosted.org/packages/2b/d5/1c712c7362f2563d389be66bae131c8bab121a3fabfa04b0b5bfc9e73c51/regex-2025.9.18-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3acc471d1dd7e5ff82e6cacb3b286750decd949ecd4ae258696d04f019817ef8", size = 780787, upload-time = "2025-09-19T00:35:17.061Z" }, - { url = "https://files.pythonhosted.org/packages/4f/92/c54cdb4aa41009632e69817a5aa452673507f07e341076735a2f6c46a37c/regex-2025.9.18-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6479d5555122433728760e5f29edb4c2b79655a8deb681a141beb5c8a025baea", size = 773632, upload-time = "2025-09-19T00:35:18.57Z" }, - { url = "https://files.pythonhosted.org/packages/db/99/75c996dc6a2231a8652d7ad0bfbeaf8a8c77612d335580f520f3ec40e30b/regex-2025.9.18-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:431bd2a8726b000eb6f12429c9b438a24062a535d06783a93d2bcbad3698f8a8", size = 844104, upload-time = "2025-09-19T00:35:20.259Z" }, - { url = "https://files.pythonhosted.org/packages/1c/f7/25aba34cc130cb6844047dbfe9716c9b8f9629fee8b8bec331aa9241b97b/regex-2025.9.18-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0cc3521060162d02bd36927e20690129200e5ac9d2c6d32b70368870b122db25", size = 834794, upload-time = "2025-09-19T00:35:22.002Z" }, - { url = "https://files.pythonhosted.org/packages/51/eb/64e671beafa0ae29712268421597596d781704973551312b2425831d4037/regex-2025.9.18-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a021217b01be2d51632ce056d7a837d3fa37c543ede36e39d14063176a26ae29", size = 778535, upload-time = "2025-09-19T00:35:23.298Z" }, - { url = "https://files.pythonhosted.org/packages/26/33/c0ebc0b07bd0bf88f716cca240546b26235a07710ea58e271cfe390ae273/regex-2025.9.18-cp310-cp310-win32.whl", hash = "sha256:4a12a06c268a629cb67cc1d009b7bb0be43e289d00d5111f86a2efd3b1949444", size = 264115, upload-time = "2025-09-19T00:35:25.206Z" }, - { url = "https://files.pythonhosted.org/packages/59/39/aeb11a4ae68faaec2498512cadae09f2d8a91f1f65730fe62b9bffeea150/regex-2025.9.18-cp310-cp310-win_amd64.whl", hash = "sha256:47acd811589301298c49db2c56bde4f9308d6396da92daf99cba781fa74aa450", size = 276143, upload-time = "2025-09-19T00:35:26.785Z" }, - { url = "https://files.pythonhosted.org/packages/29/04/37f2d3fc334a1031fc2767c9d89cec13c2e72207c7e7f6feae8a47f4e149/regex-2025.9.18-cp310-cp310-win_arm64.whl", hash = "sha256:16bd2944e77522275e5ee36f867e19995bcaa533dcb516753a26726ac7285442", size = 268473, upload-time = "2025-09-19T00:35:28.39Z" }, - { url = "https://files.pythonhosted.org/packages/58/61/80eda662fc4eb32bfedc331f42390974c9e89c7eac1b79cd9eea4d7c458c/regex-2025.9.18-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:51076980cd08cd13c88eb7365427ae27f0d94e7cebe9ceb2bb9ffdae8fc4d82a", size = 484832, upload-time = "2025-09-19T00:35:30.011Z" }, - { url = "https://files.pythonhosted.org/packages/a6/d9/33833d9abddf3f07ad48504ddb53fe3b22f353214bbb878a72eee1e3ddbf/regex-2025.9.18-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:828446870bd7dee4e0cbeed767f07961aa07f0ea3129f38b3ccecebc9742e0b8", size = 288994, upload-time = "2025-09-19T00:35:31.733Z" }, - { url = "https://files.pythonhosted.org/packages/2a/b3/526ee96b0d70ea81980cbc20c3496fa582f775a52e001e2743cc33b2fa75/regex-2025.9.18-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c28821d5637866479ec4cc23b8c990f5bc6dd24e5e4384ba4a11d38a526e1414", size = 286619, upload-time = "2025-09-19T00:35:33.221Z" }, - { url = "https://files.pythonhosted.org/packages/65/4f/c2c096b02a351b33442aed5895cdd8bf87d372498d2100927c5a053d7ba3/regex-2025.9.18-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:726177ade8e481db669e76bf99de0b278783be8acd11cef71165327abd1f170a", size = 792454, upload-time = "2025-09-19T00:35:35.361Z" }, - { url = "https://files.pythonhosted.org/packages/24/15/b562c9d6e47c403c4b5deb744f8b4bf6e40684cf866c7b077960a925bdff/regex-2025.9.18-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f5cca697da89b9f8ea44115ce3130f6c54c22f541943ac8e9900461edc2b8bd4", size = 858723, upload-time = "2025-09-19T00:35:36.949Z" }, - { url = "https://files.pythonhosted.org/packages/f2/01/dba305409849e85b8a1a681eac4c03ed327d8de37895ddf9dc137f59c140/regex-2025.9.18-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:dfbde38f38004703c35666a1e1c088b778e35d55348da2b7b278914491698d6a", size = 905899, upload-time = "2025-09-19T00:35:38.723Z" }, - { url = "https://files.pythonhosted.org/packages/fe/d0/c51d1e6a80eab11ef96a4cbad17fc0310cf68994fb01a7283276b7e5bbd6/regex-2025.9.18-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f2f422214a03fab16bfa495cfec72bee4aaa5731843b771860a471282f1bf74f", size = 798981, upload-time = "2025-09-19T00:35:40.416Z" }, - { url = "https://files.pythonhosted.org/packages/c4/5e/72db90970887bbe02296612bd61b0fa31e6d88aa24f6a4853db3e96c575e/regex-2025.9.18-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a295916890f4df0902e4286bc7223ee7f9e925daa6dcdec4192364255b70561a", size = 781900, upload-time = "2025-09-19T00:35:42.077Z" }, - { url = "https://files.pythonhosted.org/packages/50/ff/596be45eea8e9bc31677fde243fa2904d00aad1b32c31bce26c3dbba0b9e/regex-2025.9.18-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:5db95ff632dbabc8c38c4e82bf545ab78d902e81160e6e455598014f0abe66b9", size = 852952, upload-time = "2025-09-19T00:35:43.751Z" }, - { url = "https://files.pythonhosted.org/packages/e5/1b/2dfa348fa551e900ed3f5f63f74185b6a08e8a76bc62bc9c106f4f92668b/regex-2025.9.18-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:fb967eb441b0f15ae610b7069bdb760b929f267efbf522e814bbbfffdf125ce2", size = 844355, upload-time = "2025-09-19T00:35:45.309Z" }, - { url = "https://files.pythonhosted.org/packages/f4/bf/aefb1def27fe33b8cbbb19c75c13aefccfbef1c6686f8e7f7095705969c7/regex-2025.9.18-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f04d2f20da4053d96c08f7fde6e1419b7ec9dbcee89c96e3d731fca77f411b95", size = 787254, upload-time = "2025-09-19T00:35:46.904Z" }, - { url = "https://files.pythonhosted.org/packages/e3/4e/8ef042e7cf0dbbb401e784e896acfc1b367b95dfbfc9ada94c2ed55a081f/regex-2025.9.18-cp311-cp311-win32.whl", hash = "sha256:895197241fccf18c0cea7550c80e75f185b8bd55b6924fcae269a1a92c614a07", size = 264129, upload-time = "2025-09-19T00:35:48.597Z" }, - { url = "https://files.pythonhosted.org/packages/b4/7d/c4fcabf80dcdd6821c0578ad9b451f8640b9110fb3dcb74793dd077069ff/regex-2025.9.18-cp311-cp311-win_amd64.whl", hash = "sha256:7e2b414deae99166e22c005e154a5513ac31493db178d8aec92b3269c9cce8c9", size = 276160, upload-time = "2025-09-19T00:36:00.45Z" }, - { url = "https://files.pythonhosted.org/packages/64/f8/0e13c8ae4d6df9d128afaba138342d532283d53a4c1e7a8c93d6756c8f4a/regex-2025.9.18-cp311-cp311-win_arm64.whl", hash = "sha256:fb137ec7c5c54f34a25ff9b31f6b7b0c2757be80176435bf367111e3f71d72df", size = 268471, upload-time = "2025-09-19T00:36:02.149Z" }, - { url = "https://files.pythonhosted.org/packages/b0/99/05859d87a66ae7098222d65748f11ef7f2dff51bfd7482a4e2256c90d72b/regex-2025.9.18-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:436e1b31d7efd4dcd52091d076482031c611dde58bf9c46ca6d0a26e33053a7e", size = 486335, upload-time = "2025-09-19T00:36:03.661Z" }, - { url = "https://files.pythonhosted.org/packages/97/7e/d43d4e8b978890932cf7b0957fce58c5b08c66f32698f695b0c2c24a48bf/regex-2025.9.18-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c190af81e5576b9c5fdc708f781a52ff20f8b96386c6e2e0557a78402b029f4a", size = 289720, upload-time = "2025-09-19T00:36:05.471Z" }, - { url = "https://files.pythonhosted.org/packages/bb/3b/ff80886089eb5dcf7e0d2040d9aaed539e25a94300403814bb24cc775058/regex-2025.9.18-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e4121f1ce2b2b5eec4b397cc1b277686e577e658d8f5870b7eb2d726bd2300ab", size = 287257, upload-time = "2025-09-19T00:36:07.072Z" }, - { url = "https://files.pythonhosted.org/packages/ee/66/243edf49dd8720cba8d5245dd4d6adcb03a1defab7238598c0c97cf549b8/regex-2025.9.18-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:300e25dbbf8299d87205e821a201057f2ef9aa3deb29caa01cd2cac669e508d5", size = 797463, upload-time = "2025-09-19T00:36:08.399Z" }, - { url = "https://files.pythonhosted.org/packages/df/71/c9d25a1142c70432e68bb03211d4a82299cd1c1fbc41db9409a394374ef5/regex-2025.9.18-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7b47fcf9f5316c0bdaf449e879407e1b9937a23c3b369135ca94ebc8d74b1742", size = 862670, upload-time = "2025-09-19T00:36:10.101Z" }, - { url = "https://files.pythonhosted.org/packages/f8/8f/329b1efc3a64375a294e3a92d43372bf1a351aa418e83c21f2f01cf6ec41/regex-2025.9.18-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:57a161bd3acaa4b513220b49949b07e252165e6b6dc910ee7617a37ff4f5b425", size = 910881, upload-time = "2025-09-19T00:36:12.223Z" }, - { url = "https://files.pythonhosted.org/packages/35/9e/a91b50332a9750519320ed30ec378b74c996f6befe282cfa6bb6cea7e9fd/regex-2025.9.18-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f130c3a7845ba42de42f380fff3c8aebe89a810747d91bcf56d40a069f15352", size = 802011, upload-time = "2025-09-19T00:36:13.901Z" }, - { url = "https://files.pythonhosted.org/packages/a4/1d/6be3b8d7856b6e0d7ee7f942f437d0a76e0d5622983abbb6d21e21ab9a17/regex-2025.9.18-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5f96fa342b6f54dcba928dd452e8d8cb9f0d63e711d1721cd765bb9f73bb048d", size = 786668, upload-time = "2025-09-19T00:36:15.391Z" }, - { url = "https://files.pythonhosted.org/packages/cb/ce/4a60e53df58bd157c5156a1736d3636f9910bdcc271d067b32b7fcd0c3a8/regex-2025.9.18-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:0f0d676522d68c207828dcd01fb6f214f63f238c283d9f01d85fc664c7c85b56", size = 856578, upload-time = "2025-09-19T00:36:16.845Z" }, - { url = "https://files.pythonhosted.org/packages/86/e8/162c91bfe7217253afccde112868afb239f94703de6580fb235058d506a6/regex-2025.9.18-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:40532bff8a1a0621e7903ae57fce88feb2e8a9a9116d341701302c9302aef06e", size = 849017, upload-time = "2025-09-19T00:36:18.597Z" }, - { url = "https://files.pythonhosted.org/packages/35/34/42b165bc45289646ea0959a1bc7531733e90b47c56a72067adfe6b3251f6/regex-2025.9.18-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:039f11b618ce8d71a1c364fdee37da1012f5a3e79b1b2819a9f389cd82fd6282", size = 788150, upload-time = "2025-09-19T00:36:20.464Z" }, - { url = "https://files.pythonhosted.org/packages/79/5d/cdd13b1f3c53afa7191593a7ad2ee24092a5a46417725ffff7f64be8342d/regex-2025.9.18-cp312-cp312-win32.whl", hash = "sha256:e1dd06f981eb226edf87c55d523131ade7285137fbde837c34dc9d1bf309f459", size = 264536, upload-time = "2025-09-19T00:36:21.922Z" }, - { url = "https://files.pythonhosted.org/packages/e0/f5/4a7770c9a522e7d2dc1fa3ffc83ab2ab33b0b22b447e62cffef186805302/regex-2025.9.18-cp312-cp312-win_amd64.whl", hash = "sha256:3d86b5247bf25fa3715e385aa9ff272c307e0636ce0c9595f64568b41f0a9c77", size = 275501, upload-time = "2025-09-19T00:36:23.4Z" }, - { url = "https://files.pythonhosted.org/packages/df/05/9ce3e110e70d225ecbed455b966003a3afda5e58e8aec2964042363a18f4/regex-2025.9.18-cp312-cp312-win_arm64.whl", hash = "sha256:032720248cbeeae6444c269b78cb15664458b7bb9ed02401d3da59fe4d68c3a5", size = 268601, upload-time = "2025-09-19T00:36:25.092Z" }, - { url = "https://files.pythonhosted.org/packages/d2/c7/5c48206a60ce33711cf7dcaeaed10dd737733a3569dc7e1dce324dd48f30/regex-2025.9.18-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2a40f929cd907c7e8ac7566ac76225a77701a6221bca937bdb70d56cb61f57b2", size = 485955, upload-time = "2025-09-19T00:36:26.822Z" }, - { url = "https://files.pythonhosted.org/packages/e9/be/74fc6bb19a3c491ec1ace943e622b5a8539068771e8705e469b2da2306a7/regex-2025.9.18-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c90471671c2cdf914e58b6af62420ea9ecd06d1554d7474d50133ff26ae88feb", size = 289583, upload-time = "2025-09-19T00:36:28.577Z" }, - { url = "https://files.pythonhosted.org/packages/25/c4/9ceaa433cb5dc515765560f22a19578b95b92ff12526e5a259321c4fc1a0/regex-2025.9.18-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1a351aff9e07a2dabb5022ead6380cff17a4f10e4feb15f9100ee56c4d6d06af", size = 287000, upload-time = "2025-09-19T00:36:30.161Z" }, - { url = "https://files.pythonhosted.org/packages/7d/e6/68bc9393cb4dc68018456568c048ac035854b042bc7c33cb9b99b0680afa/regex-2025.9.18-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bc4b8e9d16e20ddfe16430c23468a8707ccad3365b06d4536142e71823f3ca29", size = 797535, upload-time = "2025-09-19T00:36:31.876Z" }, - { url = "https://files.pythonhosted.org/packages/6a/1c/ebae9032d34b78ecfe9bd4b5e6575b55351dc8513485bb92326613732b8c/regex-2025.9.18-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4b8cdbddf2db1c5e80338ba2daa3cfa3dec73a46fff2a7dda087c8efbf12d62f", size = 862603, upload-time = "2025-09-19T00:36:33.344Z" }, - { url = "https://files.pythonhosted.org/packages/3b/74/12332c54b3882557a4bcd2b99f8be581f5c6a43cf1660a85b460dd8ff468/regex-2025.9.18-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a276937d9d75085b2c91fb48244349c6954f05ee97bba0963ce24a9d915b8b68", size = 910829, upload-time = "2025-09-19T00:36:34.826Z" }, - { url = "https://files.pythonhosted.org/packages/86/70/ba42d5ed606ee275f2465bfc0e2208755b06cdabd0f4c7c4b614d51b57ab/regex-2025.9.18-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:92a8e375ccdc1256401c90e9dc02b8642894443d549ff5e25e36d7cf8a80c783", size = 802059, upload-time = "2025-09-19T00:36:36.664Z" }, - { url = "https://files.pythonhosted.org/packages/da/c5/fcb017e56396a7f2f8357412638d7e2963440b131a3ca549be25774b3641/regex-2025.9.18-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0dc6893b1f502d73037cf807a321cdc9be29ef3d6219f7970f842475873712ac", size = 786781, upload-time = "2025-09-19T00:36:38.168Z" }, - { url = "https://files.pythonhosted.org/packages/c6/ee/21c4278b973f630adfb3bcb23d09d83625f3ab1ca6e40ebdffe69901c7a1/regex-2025.9.18-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a61e85bfc63d232ac14b015af1261f826260c8deb19401c0597dbb87a864361e", size = 856578, upload-time = "2025-09-19T00:36:40.129Z" }, - { url = "https://files.pythonhosted.org/packages/87/0b/de51550dc7274324435c8f1539373ac63019b0525ad720132866fff4a16a/regex-2025.9.18-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1ef86a9ebc53f379d921fb9a7e42b92059ad3ee800fcd9e0fe6181090e9f6c23", size = 849119, upload-time = "2025-09-19T00:36:41.651Z" }, - { url = "https://files.pythonhosted.org/packages/60/52/383d3044fc5154d9ffe4321696ee5b2ee4833a28c29b137c22c33f41885b/regex-2025.9.18-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d3bc882119764ba3a119fbf2bd4f1b47bc56c1da5d42df4ed54ae1e8e66fdf8f", size = 788219, upload-time = "2025-09-19T00:36:43.575Z" }, - { url = "https://files.pythonhosted.org/packages/20/bd/2614fc302671b7359972ea212f0e3a92df4414aaeacab054a8ce80a86073/regex-2025.9.18-cp313-cp313-win32.whl", hash = "sha256:3810a65675845c3bdfa58c3c7d88624356dd6ee2fc186628295e0969005f928d", size = 264517, upload-time = "2025-09-19T00:36:45.503Z" }, - { url = "https://files.pythonhosted.org/packages/07/0f/ab5c1581e6563a7bffdc1974fb2d25f05689b88e2d416525271f232b1946/regex-2025.9.18-cp313-cp313-win_amd64.whl", hash = "sha256:16eaf74b3c4180ede88f620f299e474913ab6924d5c4b89b3833bc2345d83b3d", size = 275481, upload-time = "2025-09-19T00:36:46.965Z" }, - { url = "https://files.pythonhosted.org/packages/49/22/ee47672bc7958f8c5667a587c2600a4fba8b6bab6e86bd6d3e2b5f7cac42/regex-2025.9.18-cp313-cp313-win_arm64.whl", hash = "sha256:4dc98ba7dd66bd1261927a9f49bd5ee2bcb3660f7962f1ec02617280fc00f5eb", size = 268598, upload-time = "2025-09-19T00:36:48.314Z" }, - { url = "https://files.pythonhosted.org/packages/e8/83/6887e16a187c6226cb85d8301e47d3b73ecc4505a3a13d8da2096b44fd76/regex-2025.9.18-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:fe5d50572bc885a0a799410a717c42b1a6b50e2f45872e2b40f4f288f9bce8a2", size = 489765, upload-time = "2025-09-19T00:36:49.996Z" }, - { url = "https://files.pythonhosted.org/packages/51/c5/e2f7325301ea2916ff301c8d963ba66b1b2c1b06694191df80a9c4fea5d0/regex-2025.9.18-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:1b9d9a2d6cda6621551ca8cf7a06f103adf72831153f3c0d982386110870c4d3", size = 291228, upload-time = "2025-09-19T00:36:51.654Z" }, - { url = "https://files.pythonhosted.org/packages/91/60/7d229d2bc6961289e864a3a3cfebf7d0d250e2e65323a8952cbb7e22d824/regex-2025.9.18-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:13202e4c4ac0ef9a317fff817674b293c8f7e8c68d3190377d8d8b749f566e12", size = 289270, upload-time = "2025-09-19T00:36:53.118Z" }, - { url = "https://files.pythonhosted.org/packages/3c/d7/b4f06868ee2958ff6430df89857fbf3d43014bbf35538b6ec96c2704e15d/regex-2025.9.18-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:874ff523b0fecffb090f80ae53dc93538f8db954c8bb5505f05b7787ab3402a0", size = 806326, upload-time = "2025-09-19T00:36:54.631Z" }, - { url = "https://files.pythonhosted.org/packages/d6/e4/bca99034a8f1b9b62ccf337402a8e5b959dd5ba0e5e5b2ead70273df3277/regex-2025.9.18-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d13ab0490128f2bb45d596f754148cd750411afc97e813e4b3a61cf278a23bb6", size = 871556, upload-time = "2025-09-19T00:36:56.208Z" }, - { url = "https://files.pythonhosted.org/packages/6d/df/e06ffaf078a162f6dd6b101a5ea9b44696dca860a48136b3ae4a9caf25e2/regex-2025.9.18-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:05440bc172bc4b4b37fb9667e796597419404dbba62e171e1f826d7d2a9ebcef", size = 913817, upload-time = "2025-09-19T00:36:57.807Z" }, - { url = "https://files.pythonhosted.org/packages/9e/05/25b05480b63292fd8e84800b1648e160ca778127b8d2367a0a258fa2e225/regex-2025.9.18-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5514b8e4031fdfaa3d27e92c75719cbe7f379e28cacd939807289bce76d0e35a", size = 811055, upload-time = "2025-09-19T00:36:59.762Z" }, - { url = "https://files.pythonhosted.org/packages/70/97/7bc7574655eb651ba3a916ed4b1be6798ae97af30104f655d8efd0cab24b/regex-2025.9.18-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:65d3c38c39efce73e0d9dc019697b39903ba25b1ad45ebbd730d2cf32741f40d", size = 794534, upload-time = "2025-09-19T00:37:01.405Z" }, - { url = "https://files.pythonhosted.org/packages/b4/c2/d5da49166a52dda879855ecdba0117f073583db2b39bb47ce9a3378a8e9e/regex-2025.9.18-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:ae77e447ebc144d5a26d50055c6ddba1d6ad4a865a560ec7200b8b06bc529368", size = 866684, upload-time = "2025-09-19T00:37:03.441Z" }, - { url = "https://files.pythonhosted.org/packages/bd/2d/0a5c4e6ec417de56b89ff4418ecc72f7e3feca806824c75ad0bbdae0516b/regex-2025.9.18-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e3ef8cf53dc8df49d7e28a356cf824e3623764e9833348b655cfed4524ab8a90", size = 853282, upload-time = "2025-09-19T00:37:04.985Z" }, - { url = "https://files.pythonhosted.org/packages/f4/8e/d656af63e31a86572ec829665d6fa06eae7e144771e0330650a8bb865635/regex-2025.9.18-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:9feb29817df349c976da9a0debf775c5c33fc1c8ad7b9f025825da99374770b7", size = 797830, upload-time = "2025-09-19T00:37:06.697Z" }, - { url = "https://files.pythonhosted.org/packages/db/ce/06edc89df8f7b83ffd321b6071be4c54dc7332c0f77860edc40ce57d757b/regex-2025.9.18-cp313-cp313t-win32.whl", hash = "sha256:168be0d2f9b9d13076940b1ed774f98595b4e3c7fc54584bba81b3cc4181742e", size = 267281, upload-time = "2025-09-19T00:37:08.568Z" }, - { url = "https://files.pythonhosted.org/packages/83/9a/2b5d9c8b307a451fd17068719d971d3634ca29864b89ed5c18e499446d4a/regex-2025.9.18-cp313-cp313t-win_amd64.whl", hash = "sha256:d59ecf3bb549e491c8104fea7313f3563c7b048e01287db0a90485734a70a730", size = 278724, upload-time = "2025-09-19T00:37:10.023Z" }, - { url = "https://files.pythonhosted.org/packages/3d/70/177d31e8089a278a764f8ec9a3faac8d14a312d622a47385d4b43905806f/regex-2025.9.18-cp313-cp313t-win_arm64.whl", hash = "sha256:dbef80defe9fb21310948a2595420b36c6d641d9bea4c991175829b2cc4bc06a", size = 269771, upload-time = "2025-09-19T00:37:13.041Z" }, - { url = "https://files.pythonhosted.org/packages/44/b7/3b4663aa3b4af16819f2ab6a78c4111c7e9b066725d8107753c2257448a5/regex-2025.9.18-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:c6db75b51acf277997f3adcd0ad89045d856190d13359f15ab5dda21581d9129", size = 486130, upload-time = "2025-09-19T00:37:14.527Z" }, - { url = "https://files.pythonhosted.org/packages/80/5b/4533f5d7ac9c6a02a4725fe8883de2aebc713e67e842c04cf02626afb747/regex-2025.9.18-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8f9698b6f6895d6db810e0bda5364f9ceb9e5b11328700a90cae573574f61eea", size = 289539, upload-time = "2025-09-19T00:37:16.356Z" }, - { url = "https://files.pythonhosted.org/packages/b8/8d/5ab6797c2750985f79e9995fad3254caa4520846580f266ae3b56d1cae58/regex-2025.9.18-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:29cd86aa7cb13a37d0f0d7c21d8d949fe402ffa0ea697e635afedd97ab4b69f1", size = 287233, upload-time = "2025-09-19T00:37:18.025Z" }, - { url = "https://files.pythonhosted.org/packages/cb/1e/95afcb02ba8d3a64e6ffeb801718ce73471ad6440c55d993f65a4a5e7a92/regex-2025.9.18-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7c9f285a071ee55cd9583ba24dde006e53e17780bb309baa8e4289cd472bcc47", size = 797876, upload-time = "2025-09-19T00:37:19.609Z" }, - { url = "https://files.pythonhosted.org/packages/c8/fb/720b1f49cec1f3b5a9fea5b34cd22b88b5ebccc8c1b5de9cc6f65eed165a/regex-2025.9.18-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5adf266f730431e3be9021d3e5b8d5ee65e563fec2883ea8093944d21863b379", size = 863385, upload-time = "2025-09-19T00:37:21.65Z" }, - { url = "https://files.pythonhosted.org/packages/a9/ca/e0d07ecf701e1616f015a720dc13b84c582024cbfbb3fc5394ae204adbd7/regex-2025.9.18-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1137cabc0f38807de79e28d3f6e3e3f2cc8cfb26bead754d02e6d1de5f679203", size = 910220, upload-time = "2025-09-19T00:37:23.723Z" }, - { url = "https://files.pythonhosted.org/packages/b6/45/bba86413b910b708eca705a5af62163d5d396d5f647ed9485580c7025209/regex-2025.9.18-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7cc9e5525cada99699ca9223cce2d52e88c52a3d2a0e842bd53de5497c604164", size = 801827, upload-time = "2025-09-19T00:37:25.684Z" }, - { url = "https://files.pythonhosted.org/packages/b8/a6/740fbd9fcac31a1305a8eed30b44bf0f7f1e042342be0a4722c0365ecfca/regex-2025.9.18-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:bbb9246568f72dce29bcd433517c2be22c7791784b223a810225af3b50d1aafb", size = 786843, upload-time = "2025-09-19T00:37:27.62Z" }, - { url = "https://files.pythonhosted.org/packages/80/a7/0579e8560682645906da640c9055506465d809cb0f5415d9976f417209a6/regex-2025.9.18-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:6a52219a93dd3d92c675383efff6ae18c982e2d7651c792b1e6d121055808743", size = 857430, upload-time = "2025-09-19T00:37:29.362Z" }, - { url = "https://files.pythonhosted.org/packages/8d/9b/4dc96b6c17b38900cc9fee254fc9271d0dde044e82c78c0811b58754fde5/regex-2025.9.18-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:ae9b3840c5bd456780e3ddf2f737ab55a79b790f6409182012718a35c6d43282", size = 848612, upload-time = "2025-09-19T00:37:31.42Z" }, - { url = "https://files.pythonhosted.org/packages/b3/6a/6f659f99bebb1775e5ac81a3fb837b85897c1a4ef5acffd0ff8ffe7e67fb/regex-2025.9.18-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d488c236ac497c46a5ac2005a952c1a0e22a07be9f10c3e735bc7d1209a34773", size = 787967, upload-time = "2025-09-19T00:37:34.019Z" }, - { url = "https://files.pythonhosted.org/packages/61/35/9e35665f097c07cf384a6b90a1ac11b0b1693084a0b7a675b06f760496c6/regex-2025.9.18-cp314-cp314-win32.whl", hash = "sha256:0c3506682ea19beefe627a38872d8da65cc01ffa25ed3f2e422dffa1474f0788", size = 269847, upload-time = "2025-09-19T00:37:35.759Z" }, - { url = "https://files.pythonhosted.org/packages/af/64/27594dbe0f1590b82de2821ebfe9a359b44dcb9b65524876cd12fabc447b/regex-2025.9.18-cp314-cp314-win_amd64.whl", hash = "sha256:57929d0f92bebb2d1a83af372cd0ffba2263f13f376e19b1e4fa32aec4efddc3", size = 278755, upload-time = "2025-09-19T00:37:37.367Z" }, - { url = "https://files.pythonhosted.org/packages/30/a3/0cd8d0d342886bd7d7f252d701b20ae1a3c72dc7f34ef4b2d17790280a09/regex-2025.9.18-cp314-cp314-win_arm64.whl", hash = "sha256:6a4b44df31d34fa51aa5c995d3aa3c999cec4d69b9bd414a8be51984d859f06d", size = 271873, upload-time = "2025-09-19T00:37:39.125Z" }, - { url = "https://files.pythonhosted.org/packages/99/cb/8a1ab05ecf404e18b54348e293d9b7a60ec2bd7aa59e637020c5eea852e8/regex-2025.9.18-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:b176326bcd544b5e9b17d6943f807697c0cb7351f6cfb45bf5637c95ff7e6306", size = 489773, upload-time = "2025-09-19T00:37:40.968Z" }, - { url = "https://files.pythonhosted.org/packages/93/3b/6543c9b7f7e734d2404fa2863d0d710c907bef99d4598760ed4563d634c3/regex-2025.9.18-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:0ffd9e230b826b15b369391bec167baed57c7ce39efc35835448618860995946", size = 291221, upload-time = "2025-09-19T00:37:42.901Z" }, - { url = "https://files.pythonhosted.org/packages/cd/91/e9fdee6ad6bf708d98c5d17fded423dcb0661795a49cba1b4ffb8358377a/regex-2025.9.18-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ec46332c41add73f2b57e2f5b642f991f6b15e50e9f86285e08ffe3a512ac39f", size = 289268, upload-time = "2025-09-19T00:37:44.823Z" }, - { url = "https://files.pythonhosted.org/packages/94/a6/bc3e8a918abe4741dadeaeb6c508e3a4ea847ff36030d820d89858f96a6c/regex-2025.9.18-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b80fa342ed1ea095168a3f116637bd1030d39c9ff38dc04e54ef7c521e01fc95", size = 806659, upload-time = "2025-09-19T00:37:46.684Z" }, - { url = "https://files.pythonhosted.org/packages/2b/71/ea62dbeb55d9e6905c7b5a49f75615ea1373afcad95830047e4e310db979/regex-2025.9.18-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f4d97071c0ba40f0cf2a93ed76e660654c399a0a04ab7d85472239460f3da84b", size = 871701, upload-time = "2025-09-19T00:37:48.882Z" }, - { url = "https://files.pythonhosted.org/packages/6a/90/fbe9dedb7dad24a3a4399c0bae64bfa932ec8922a0a9acf7bc88db30b161/regex-2025.9.18-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0ac936537ad87cef9e0e66c5144484206c1354224ee811ab1519a32373e411f3", size = 913742, upload-time = "2025-09-19T00:37:51.015Z" }, - { url = "https://files.pythonhosted.org/packages/f0/1c/47e4a8c0e73d41eb9eb9fdeba3b1b810110a5139a2526e82fd29c2d9f867/regex-2025.9.18-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dec57f96d4def58c422d212d414efe28218d58537b5445cf0c33afb1b4768571", size = 811117, upload-time = "2025-09-19T00:37:52.686Z" }, - { url = "https://files.pythonhosted.org/packages/2a/da/435f29fddfd015111523671e36d30af3342e8136a889159b05c1d9110480/regex-2025.9.18-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:48317233294648bf7cd068857f248e3a57222259a5304d32c7552e2284a1b2ad", size = 794647, upload-time = "2025-09-19T00:37:54.626Z" }, - { url = "https://files.pythonhosted.org/packages/23/66/df5e6dcca25c8bc57ce404eebc7342310a0d218db739d7882c9a2b5974a3/regex-2025.9.18-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:274687e62ea3cf54846a9b25fc48a04459de50af30a7bd0b61a9e38015983494", size = 866747, upload-time = "2025-09-19T00:37:56.367Z" }, - { url = "https://files.pythonhosted.org/packages/82/42/94392b39b531f2e469b2daa40acf454863733b674481fda17462a5ffadac/regex-2025.9.18-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:a78722c86a3e7e6aadf9579e3b0ad78d955f2d1f1a8ca4f67d7ca258e8719d4b", size = 853434, upload-time = "2025-09-19T00:37:58.39Z" }, - { url = "https://files.pythonhosted.org/packages/a8/f8/dcc64c7f7bbe58842a8f89622b50c58c3598fbbf4aad0a488d6df2c699f1/regex-2025.9.18-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:06104cd203cdef3ade989a1c45b6215bf42f8b9dd705ecc220c173233f7cba41", size = 798024, upload-time = "2025-09-19T00:38:00.397Z" }, - { url = "https://files.pythonhosted.org/packages/20/8d/edf1c5d5aa98f99a692313db813ec487732946784f8f93145e0153d910e5/regex-2025.9.18-cp314-cp314t-win32.whl", hash = "sha256:2e1eddc06eeaffd249c0adb6fafc19e2118e6308c60df9db27919e96b5656096", size = 273029, upload-time = "2025-09-19T00:38:02.383Z" }, - { url = "https://files.pythonhosted.org/packages/a7/24/02d4e4f88466f17b145f7ea2b2c11af3a942db6222429c2c146accf16054/regex-2025.9.18-cp314-cp314t-win_amd64.whl", hash = "sha256:8620d247fb8c0683ade51217b459cb4a1081c0405a3072235ba43a40d355c09a", size = 282680, upload-time = "2025-09-19T00:38:04.102Z" }, - { url = "https://files.pythonhosted.org/packages/1f/a3/c64894858aaaa454caa7cc47e2f225b04d3ed08ad649eacf58d45817fad2/regex-2025.9.18-cp314-cp314t-win_arm64.whl", hash = "sha256:b7531a8ef61de2c647cdf68b3229b071e46ec326b3138b2180acb4275f470b01", size = 273034, upload-time = "2025-09-19T00:38:05.807Z" }, +version = "2026.9.29" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fc/f2/af1da9d3ceed77bfcdce40427d49ba0be94e4fe84245e3bfef68c10e75b6/regex-2026.9.29.tar.gz", hash = "sha256:8b5fcc4771732191b2b7d1dd68d8f0353f47f8d90b6150f6dce58bf1112442cb", size = 419199, upload-time = "2026-09-29T00:49:58.298Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e8/6b/6dea87689c3a06a6e79d254bf824e6f3e3d724b5ba027c6112559aa6cd2c/regex-2026.9.29-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6abb75ab16bc3281714a5b99548a2225db70dba1f995f6d7f7419b76eb5a8fbe", size = 495413, upload-time = "2026-09-29T00:46:14.51Z" }, + { url = "https://files.pythonhosted.org/packages/3a/a5/0c791a0e83ad1013d262c13247c4c77e0f4a8d05bdc167df96aba6681c0d/regex-2026.9.29-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b7b893976e7fe42053da64f2aa27239c24252fd2ec6df471e1be197c0addc3b1", size = 295145, upload-time = "2026-09-29T00:46:16.292Z" }, + { url = "https://files.pythonhosted.org/packages/b1/07/9bf3607d8d13a12e436ab9d63f9791e10706827d535695b23964ad79fd79/regex-2026.9.29-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:066d0e3dbfdd739bce2bf8c2a41dd16f73e3d8adc2eb06dd803a36a307f56075", size = 292123, upload-time = "2026-09-29T00:46:17.646Z" }, + { url = "https://files.pythonhosted.org/packages/64/6b/32c2e6fc617e1d3f247e250fea31a9a35b1265bd32f585968aa13b9999b9/regex-2026.9.29-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7020ed44df30b3aa492c00ee3b52d0548c1f30c2c6c5bb13ae897680900d3413", size = 799537, upload-time = "2026-09-29T00:46:18.976Z" }, + { url = "https://files.pythonhosted.org/packages/bf/72/f041177f3c7a4606f7c81a95fe7eea03e2a0c4e8bff9e439a01432cbc9f2/regex-2026.9.29-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ae4613d7d9dda60fcba95f846cc6f808017f1843f392cf9daad14a6534493d71", size = 873255, upload-time = "2026-09-29T00:46:20.684Z" }, + { url = "https://files.pythonhosted.org/packages/d0/4e/a78948e11dd715e0e46716c2e0f3404b3fe6a44e2a2e9abdc7d965cab2b3/regex-2026.9.29-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bec37990e3d6121f29ecfb594bd8f1bf009e9f7926daba2e50e3b27d3892a783", size = 914570, upload-time = "2026-09-29T00:46:22.599Z" }, + { url = "https://files.pythonhosted.org/packages/8a/70/aa08d1d2b294894b365e5f8ba5380fe3f8546acdb81f10639dfd74209c37/regex-2026.9.29-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:612b709381c0355b70d89cdb51b7f670591ed5cbbc0e3b5337488019dc667b65", size = 804978, upload-time = "2026-09-29T00:46:23.981Z" }, + { url = "https://files.pythonhosted.org/packages/21/32/1b03534c4715aca3b564416d28d518083ed4dab3bc913267600d2256140d/regex-2026.9.29-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a760da040b47767b4b873adfb7c3b691e9ba2fc60f113f9d0b88f1a62f323e85", size = 779297, upload-time = "2026-09-29T00:46:25.318Z" }, + { url = "https://files.pythonhosted.org/packages/76/a7/378f6f558d9e4444af315a307c5953565a511d1e3666f1bb7bdc82012b6b/regex-2026.9.29-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:49ee178ca31c94621294bf9b8b676a92a2e6bba8af0529591753719e57edb621", size = 786961, upload-time = "2026-09-29T00:46:26.963Z" }, + { url = "https://files.pythonhosted.org/packages/59/13/79f0b1846f5f342f92ddbd4b27b18bcb86da96d902c1a0be26520bde98d7/regex-2026.9.29-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:5eeb8edc6110d9194a4d0d54610f64c37a31c605b5dbb7e407fc6ec7fa34a4a1", size = 863234, upload-time = "2026-09-29T00:46:28.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/19/05af70dec9f2eed6ba34e08d2dcc6a48e7ae5e307659d5fe4201a5d7bbee/regex-2026.9.29-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:ccb64d887a9db1cd76dbc0f92051a1a478a2a67e7f56c62d915cb881d7734704", size = 766487, upload-time = "2026-09-29T00:46:29.941Z" }, + { url = "https://files.pythonhosted.org/packages/01/e1/9c7486d4afe8fdd1fe0ad60139f8aa91427381f409af6a29b609d8fdcb3a/regex-2026.9.29-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9e4482589065c8ecd761cff522dcd85f2d39e62f551e37e025d1c7d54772def3", size = 854792, upload-time = "2026-09-29T00:46:31.358Z" }, + { url = "https://files.pythonhosted.org/packages/26/c7/49d008ff5f741d9a9799d7315556f3a12b983ff0fcd2cdfb62904bedafbf/regex-2026.9.29-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d60030baaa7bfbb02d650c126cdcddcb6e33dbff14d819434c8fa2fdcaeeeba5", size = 793050, upload-time = "2026-09-29T00:46:32.775Z" }, + { url = "https://files.pythonhosted.org/packages/cb/a1/46ba549e65562ca04608b24179b8a7bb6f146ae0e7c6d7f5e70f3339c8ba/regex-2026.9.29-cp311-cp311-win32.whl", hash = "sha256:18ae8eed4526e35bdb754d61562b90bf5c00a67fdcf3cc1380dd59597486631b", size = 268940, upload-time = "2026-09-29T00:46:34.179Z" }, + { url = "https://files.pythonhosted.org/packages/4d/4a/aab232183c70fdcf77bcf0c51819da02ec522e393e6a0bf00bcf2142e21f/regex-2026.9.29-cp311-cp311-win_amd64.whl", hash = "sha256:1043aedf5917caa861bcb25a9c11460049656bdf0017a90a309fa8f255467725", size = 280641, upload-time = "2026-09-29T00:46:35.484Z" }, + { url = "https://files.pythonhosted.org/packages/33/b1/7c05954af0f51de376df2ba97f7f78a8b79334c7e5b3d2d9f2aead1f4d3d/regex-2026.9.29-cp311-cp311-win_arm64.whl", hash = "sha256:352cf115a810b357caa35193ab656ecf5ef41056855e82f292c99e8514f8d954", size = 279411, upload-time = "2026-09-29T00:46:37.193Z" }, + { url = "https://files.pythonhosted.org/packages/84/48/3fdcde9a0baa84d7d25571223265d6e434e114763b438601d54a8028bf3e/regex-2026.9.29-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:dc79d36d0618752265f0d575915bdc5c5130ecb9c9f6b3bcefeae32e4bdfafcf", size = 497903, upload-time = "2026-09-29T00:46:38.938Z" }, + { url = "https://files.pythonhosted.org/packages/2e/1c/4ee3e97c76f53940488dfe7a7e18705e78daac8cd7fb161d246b9e328449/regex-2026.9.29-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3a21a9509d0ee88e7a70e1ad228cd2f0e0fd1e187458db132e8a8d18c97daf9d", size = 296416, upload-time = "2026-09-29T00:46:40.406Z" }, + { url = "https://files.pythonhosted.org/packages/37/14/f3f0ba083d2094392d5eabf56db5ea6ba469fd6e927afd187042054ea68a/regex-2026.9.29-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f57dc6b8fef170f105d2cf5cdce254f47b137d7755086cf7050f47e16582abba", size = 293633, upload-time = "2026-09-29T00:46:41.959Z" }, + { url = "https://files.pythonhosted.org/packages/c9/72/67e7a8ce17f1aea49df215564048efb49cc8c2b31a0e0fc30f36838f8516/regex-2026.9.29-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f93bc1c3486ef3747e07c9d7c1d0a147b8fbaab975f80e348aed6f71309dfaca", size = 805885, upload-time = "2026-09-29T00:46:43.373Z" }, + { url = "https://files.pythonhosted.org/packages/f6/78/25436bcfd4d2260b4b4090094d55d7ab53ec8a1ab4865a0b8bcb33c7d5c0/regex-2026.9.29-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9e1d3a4cb7993b708f0ada8d0c84590efd853f169e7147d2202c9da503180242", size = 878344, upload-time = "2026-09-29T00:46:45.328Z" }, + { url = "https://files.pythonhosted.org/packages/97/e6/a09ec3a23ae41d6179880e67f0aace9284b2d95f2d7b326eff203f8eec5e/regex-2026.9.29-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:dabee8f4935e731fb46b2a3091bdda0d3d94b3bbfb907d2b4f12eefce4009619", size = 919181, upload-time = "2026-09-29T00:46:47.041Z" }, + { url = "https://files.pythonhosted.org/packages/26/83/d2fbd2e4e3afb1167daa825187d196f313cbaa1a4768f311fb041bb0e3d2/regex-2026.9.29-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:39ab5894d971f9ac68baa6eca5c50387db579cfcacf36ae8df3feceb1815e6d0", size = 807783, upload-time = "2026-09-29T00:46:48.894Z" }, + { url = "https://files.pythonhosted.org/packages/46/0b/eb429a7016610d44fc89a597163f8c9127505f0d7dc724dc9effbb6a3ac0/regex-2026.9.29-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c1a9a6651197fbed6f0212591418b9def774fc3f8324f78d1bf0e6a63e5f8aa1", size = 783465, upload-time = "2026-09-29T00:46:50.64Z" }, + { url = "https://files.pythonhosted.org/packages/1b/07/58a3c0153c7476898430f6a7cf3d9062a1d17fbea4f43399ecaf411c7b4c/regex-2026.9.29-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:87fb80cbe3557e27e7b28b995c2b2eedf689b8886f941ab93e0e288f0976518a", size = 793519, upload-time = "2026-09-29T00:46:52.396Z" }, + { url = "https://files.pythonhosted.org/packages/2a/e8/161b94d39164520e21a7befe0245569bf7fda4c7cf1fc4e2df2b5def49da/regex-2026.9.29-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3c5c2ef13797466aa64170cbb66ad98a32351dd4127694cea7199f80f213750d", size = 869293, upload-time = "2026-09-29T00:46:54.128Z" }, + { url = "https://files.pythonhosted.org/packages/8f/07/3b02ed829aa2decdc1955d222bd1e2f99d1c8bb4873bbb9a66b2f0a36bff/regex-2026.9.29-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:59b49507f47479e299a9e1bc41b5cb83a7afda0540625f1dbae886615978acbf", size = 770239, upload-time = "2026-09-29T00:46:56.106Z" }, + { url = "https://files.pythonhosted.org/packages/42/5b/ba61f6fe062eb8562e742367d177bb75370434138ef6c9d2a27114f8d613/regex-2026.9.29-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:0dd8af32e9f7b56b7f95cc1fd79b23054c3bdc172392ae560acc24d57b7ffe71", size = 861973, upload-time = "2026-09-29T00:46:57.665Z" }, + { url = "https://files.pythonhosted.org/packages/cc/27/767259b20e8a842948990f5e99138d6c077248fd42f8b5468b1d9ca4b814/regex-2026.9.29-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:db5e82ba15c142425b8406690032df89e39cca4a2e8afbbb9a3d84edc2373ac3", size = 796470, upload-time = "2026-09-29T00:46:59.236Z" }, + { url = "https://files.pythonhosted.org/packages/a0/05/2566c4ba849b68a8ab81a6bf428fa79d20aae7ddee83979103c0381df254/regex-2026.9.29-cp312-cp312-win32.whl", hash = "sha256:d0c3082bf79bcd6a614d55916590ad4b8f93200e10b97f463ea5d9d07c9b5f23", size = 269327, upload-time = "2026-09-29T00:47:01.135Z" }, + { url = "https://files.pythonhosted.org/packages/93/19/489bc8db91196381c935752df01ba3f607140daece33b78d88573f028e64/regex-2026.9.29-cp312-cp312-win_amd64.whl", hash = "sha256:fdd88ed5e20b1bcdd234421e454962c971aa44b653bdb7f1ea9ef683e90fb649", size = 280334, upload-time = "2026-09-29T00:47:04.436Z" }, + { url = "https://files.pythonhosted.org/packages/0b/47/fb88ba779d0e5e7d4b0ec1aceeb13845948a2cb876bd572a2d1dfdba090b/regex-2026.9.29-cp312-cp312-win_arm64.whl", hash = "sha256:4fe97894d1b306c919b4e50def1e6f6c522f4d03a7283811f4d108f1ce5d3ac2", size = 279614, upload-time = "2026-09-29T00:47:06.541Z" }, + { url = "https://files.pythonhosted.org/packages/79/d5/6080f7d1a6e7e36aa720f806ac93c035ba39c209ae6cc510e8ef4c0279c6/regex-2026.9.29-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f1a0d5117230dd46b399a30a38afa44f79c99f3168988fdc4f425c3f928b39df", size = 497622, upload-time = "2026-09-29T00:47:08.251Z" }, + { url = "https://files.pythonhosted.org/packages/00/71/c87fc7a2e21a42f9d57489db32951c37eef56d153840459a80d464f0321d/regex-2026.9.29-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f0fe9834e5aeccaf19a0d8feb296d66a24be1a7c9922002f842a682cd5abb787", size = 296281, upload-time = "2026-09-29T00:47:09.764Z" }, + { url = "https://files.pythonhosted.org/packages/11/9e/aa0f4cde3bc4688c1d58b0cd8415edd708339bc0bc401a195b0b1e8c8f0c/regex-2026.9.29-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c90fcf7804ea0a54b896ce0f2b9565350220b8d4890fd0db461a476a4c687963", size = 293472, upload-time = "2026-09-29T00:47:11.723Z" }, + { url = "https://files.pythonhosted.org/packages/90/d4/e835c487850ed922a8d6074f953b888c8ea99775c76b9ed5f8a4d72eab92/regex-2026.9.29-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e11edba5bc344a32b029a7af9d4b3173982dd79eeafa0b9dbd787364414b0509", size = 805966, upload-time = "2026-09-29T00:47:13.235Z" }, + { url = "https://files.pythonhosted.org/packages/2c/57/ba8809847fbae8d2cbc71367c6ded510a7ec88bf52493c65efc1acf4effb/regex-2026.9.29-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bb90e7177944b6684738c1fc36aabd2dd00d1de3be7dbe09f91e196f1bc0dc81", size = 878346, upload-time = "2026-09-29T00:47:14.877Z" }, + { url = "https://files.pythonhosted.org/packages/1a/52/e3da19fc3cc15ef67ab67e121e87887c3bccfdb683a7a9ec557c460ca5b7/regex-2026.9.29-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d06fcdecc10fc7954d7c8f27a03c96055fe525274dc84a7b0dbdc3d6b9e03dab", size = 919250, upload-time = "2026-09-29T00:47:16.622Z" }, + { url = "https://files.pythonhosted.org/packages/9a/8e/c1ed81f55f992f6aa0b699a592a50c1ce9e6d44ff1aee2c14c0537dcef9c/regex-2026.9.29-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d49c18f1ea294cf4adde2e5ac256e98c82ea9d708462ce4bf799dffa7cfe8a2c", size = 807902, upload-time = "2026-09-29T00:47:18.268Z" }, + { url = "https://files.pythonhosted.org/packages/ad/bc/5a6886eb470e41040e21e05b75024a18b6ebfe7ea400b72094a60f949101/regex-2026.9.29-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3e778bfccd63075167709136afbc251c1f683758d5bf49c803c60ac3f894ce6b", size = 783514, upload-time = "2026-09-29T00:47:19.921Z" }, + { url = "https://files.pythonhosted.org/packages/cb/52/6d951d453b023c6edb880f1ba474291b53b8ce1cc438b96a9db6d791d991/regex-2026.9.29-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:686ac5350fceae63830bb98805fcb8039325bf4c06d9f6f048ff65229d5bffa5", size = 793466, upload-time = "2026-09-29T00:47:21.552Z" }, + { url = "https://files.pythonhosted.org/packages/99/b9/d5a41adc08360f5eee0dc4846c578f002366947211fc8af5a69a64ee7b9f/regex-2026.9.29-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:26ec4ccce55aa533fbd603d08911b01101a8fcfec987845ac3ae2c7087b2bde3", size = 869464, upload-time = "2026-09-29T00:47:23.276Z" }, + { url = "https://files.pythonhosted.org/packages/4b/32/d76c9d91f5d798e2e9e67f6f85ec4ae35445ac425f7454797311cecb80ca/regex-2026.9.29-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:a655d34b2a6943af32401f3d94f72e9d731f6ad16285815550bf2b4ee69d420a", size = 770278, upload-time = "2026-09-29T00:47:25.193Z" }, + { url = "https://files.pythonhosted.org/packages/24/00/aeebdb540c620a0f7317f6d6fad80a47729ecf0599a24b5c34ec155351f5/regex-2026.9.29-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0c992c19cd45058a4b92f68f139c93db168b48fb1f322c9a7cd620806afb6b51", size = 861949, upload-time = "2026-09-29T00:47:27.005Z" }, + { url = "https://files.pythonhosted.org/packages/12/62/d0314bcedfd3586197e4596931fa220260eb2385bf53184e5b9ae67db24b/regex-2026.9.29-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ebb8912f565b8cdbbf27debfe00df04202c20e2f651b9e32767930c5eace3621", size = 796602, upload-time = "2026-09-29T00:47:29.233Z" }, + { url = "https://files.pythonhosted.org/packages/ae/c7/d5a8c13a613facb03e0fb55c1ebaaf7bb35d8e2c1abe8bef8dca809fc1d9/regex-2026.9.29-cp313-cp313-win32.whl", hash = "sha256:4d7d93613b01b0199961330e49cfc52d479b3d5776c56c691db31130c0a07d91", size = 269306, upload-time = "2026-09-29T00:47:31.14Z" }, + { url = "https://files.pythonhosted.org/packages/80/a7/bf93a3a6afa5f7bc16b7afb94ae581b01cae620b8ad56bd8f9572a985959/regex-2026.9.29-cp313-cp313-win_amd64.whl", hash = "sha256:61956f074ecd123f55adca68ee3eab46e6a07ad3f8e64e6db95dfacb444f55c4", size = 280307, upload-time = "2026-09-29T00:47:32.709Z" }, + { url = "https://files.pythonhosted.org/packages/b2/7d/388274e53605a86297f433a08102a7bbdcf9379d47683d307ccaefd88e2c/regex-2026.9.29-cp313-cp313-win_arm64.whl", hash = "sha256:bfc71e6d970419c1309b3640305298643e2a734cad3f7cfb6d2ddee4175ab53d", size = 279599, upload-time = "2026-09-29T00:47:34.674Z" }, + { url = "https://files.pythonhosted.org/packages/93/1f/d9dc6f02f569625faf67a4daec926cd5023472dcd69bb44286dccd5a5ab3/regex-2026.9.29-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:957bb708e8057ab1649ba566456429d691ec9b90d1c9ad1af1ba7ffbbeaf05f2", size = 497598, upload-time = "2026-09-29T00:47:36.541Z" }, + { url = "https://files.pythonhosted.org/packages/9c/83/9b693a3fd1451381e812031a8961ec5b3b8f0c8cc6871f14c5223642804d/regex-2026.9.29-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:c9b602fae1e00b7c035d661ce85575365719192a7b46784bd71cf64c68053aa0", size = 296250, upload-time = "2026-09-29T00:47:38.233Z" }, + { url = "https://files.pythonhosted.org/packages/dd/5f/52bc2abc3fef040cd9de76ab29c918d6a717a454ae2b9dd7938b0c95656d/regex-2026.9.29-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0166844493626c5015c6088ee15c9ca2fd060ca15b7641d1657da6a58432ae33", size = 293518, upload-time = "2026-09-29T00:47:39.957Z" }, + { url = "https://files.pythonhosted.org/packages/dc/fc/cf50671215ee0057046980b4571ef8646a005819bb67f0957e779ed107a5/regex-2026.9.29-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b97a38fb4c732b6832db6bf108963adbcd82ef1268ba2025dce390f45af75efa", size = 806037, upload-time = "2026-09-29T00:47:41.676Z" }, + { url = "https://files.pythonhosted.org/packages/14/4b/dddef8fc15c63e4347cc9efb138d0cd306f30e6c98acbcc81a8f780083b9/regex-2026.9.29-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a540abfab208e1b7ef2df231c40ef3b6cbb30a0aad6204e9b6a81c10a6794628", size = 878881, upload-time = "2026-09-29T00:47:43.755Z" }, + { url = "https://files.pythonhosted.org/packages/9f/cb/38daabed32d28f7e58a06e9344ce00dc67952e9996bc578ed6a29fe1240e/regex-2026.9.29-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ddfa987262763c3c22a8367d2a49c244b018a74c3a8e3ab1a864119ad45c5633", size = 918684, upload-time = "2026-09-29T00:47:45.594Z" }, + { url = "https://files.pythonhosted.org/packages/a9/4d/041d9458a645fee4fce4d642a89d27271a3cfcd91095104f6dde44da70bf/regex-2026.9.29-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2f7f7aa47b229f2b39a2ae2596d2ad5625d77b5eb9856fac2dab3eb506cdd0a0", size = 807176, upload-time = "2026-09-29T00:47:47.372Z" }, + { url = "https://files.pythonhosted.org/packages/bf/c4/4383eed7aa5aef67616cb1b3f3ad06b7c624c4e6cced48630cd5ce133d85/regex-2026.9.29-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d9b77b25b4f395f92de6099ab08e8ae2bc7e51dfe157f22900902243a5cc90c7", size = 784315, upload-time = "2026-09-29T00:47:49.518Z" }, + { url = "https://files.pythonhosted.org/packages/5c/a6/0086ad31cebb183c637d3198547075aa493afde308e1ff61fccccb29ba6e/regex-2026.9.29-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:34b6925af9853bf461950e6508910f179fd6e9b1a7ec8548e069606b7e51a26b", size = 793748, upload-time = "2026-09-29T00:47:51.279Z" }, + { url = "https://files.pythonhosted.org/packages/d5/a0/f9005cba3f629a859573fc5d1224ea4e1f97919ec8581d018e03a351a604/regex-2026.9.29-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:addd736a0547d553283adaf4e05d7104e7f2c7b0b092e9b4d28756825f14531f", size = 870302, upload-time = "2026-09-29T00:47:53.368Z" }, + { url = "https://files.pythonhosted.org/packages/01/4f/e1a3e46bb5315a4e18b01a990e7a28e2a16595609d50c442baf2815a3c65/regex-2026.9.29-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:fe3fa1dd453ed5c7f5ea23a26218329790ed7197a99b90e94330e313959a7f52", size = 770299, upload-time = "2026-09-29T00:47:55.606Z" }, + { url = "https://files.pythonhosted.org/packages/2c/fe/f303b4acfda44e1ff1379368748c1ef2dad04a6a8e9c0ecbc970b19d97ca/regex-2026.9.29-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:0cc63b5e47c12a48d90c7e9d7de6a035dd14f62868aaedbb4e0ff8ba2b8bfe7b", size = 861570, upload-time = "2026-09-29T00:47:57.617Z" }, + { url = "https://files.pythonhosted.org/packages/60/b6/b4f7e99249f596017c60ccad5faf9310fc8e3e59bb2244940a90a1b0bdff/regex-2026.9.29-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:724184b4aafed865e4f13ca313fdcb43024300c028ec67319cfa16847d84685e", size = 795967, upload-time = "2026-09-29T00:47:59.922Z" }, + { url = "https://files.pythonhosted.org/packages/fb/d3/fc865a4638d9f6762192b6bab5b7aa1f33a90e9e99578c2e111e2a63c8c3/regex-2026.9.29-cp314-cp314-win32.whl", hash = "sha256:c6c8fabf1dafc1f1ddcbb67896d3f93efb092e8c4b6322d7389b944e76a484e5", size = 274758, upload-time = "2026-09-29T00:48:01.8Z" }, + { url = "https://files.pythonhosted.org/packages/31/e2/c2b466924ccbeb874862968ca638051b15a8fd29d994a0e99004a5cbf78e/regex-2026.9.29-cp314-cp314-win_amd64.whl", hash = "sha256:1c2a0026062abcc321a53db4a185ceba0b59a66b5d37b0808917a88b55a5257f", size = 283817, upload-time = "2026-09-29T00:48:03.614Z" }, + { url = "https://files.pythonhosted.org/packages/c6/42/ea0f8dbaa924fa75c6338935eaee2f44dab369b27f02db1e03d74344b049/regex-2026.9.29-cp314-cp314-win_arm64.whl", hash = "sha256:121a76a0985db80ceae9e171c337f8c927868e37d01b54e3ce87bc87f9c6a208", size = 283663, upload-time = "2026-09-29T00:48:05.624Z" }, + { url = "https://files.pythonhosted.org/packages/44/48/d58e5081119f5c223bbb37d2340acde3d069e1df8e8cd166c37502eee4da/regex-2026.9.29-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:e31f72490b7c12f7790e1e25c3afffd20503ee1bfb43461d7838b871ff244b19", size = 501393, upload-time = "2026-09-29T00:48:07.833Z" }, + { url = "https://files.pythonhosted.org/packages/72/3c/c49945287d4f9efee7d41f98072f8ad880efb8f430595a612fbdea996a4e/regex-2026.9.29-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:80ea96f5c1a30bf09007d48466521d9c294bebe197c708c3359096e3e3691632", size = 298237, upload-time = "2026-09-29T00:48:09.684Z" }, + { url = "https://files.pythonhosted.org/packages/f9/1f/688cb61c3d4cf7bcc1ed444b5cc49399eba3e51c469ae285cf87fea3022e/regex-2026.9.29-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:554bffadcbcb6d5f4e5fb10a61cc52084b9a63d1dab5f10bcd2c4343972e8e2c", size = 295936, upload-time = "2026-09-29T00:48:11.454Z" }, + { url = "https://files.pythonhosted.org/packages/26/a3/de43ac6b877b7d09c19a3a426b1bd5acdd209eaaf68f406466f80439ccf6/regex-2026.9.29-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:864e9b87ac33c3fb9fb4ad48166d4fdb579c351d5c77deb0d34bccb36a775cd9", size = 816905, upload-time = "2026-09-29T00:48:13.321Z" }, + { url = "https://files.pythonhosted.org/packages/62/14/9940763201c51d537786304984c67d0fc3d2ed18837ffb6f09a869f6b6c9/regex-2026.9.29-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:044265d77d94f5e3cb2fd72c76723807c429cb8c533e9d4672d0334a6f14f588", size = 881527, upload-time = "2026-09-29T00:48:15.313Z" }, + { url = "https://files.pythonhosted.org/packages/d3/e1/c842d8df0b23245ebf202f8ab9c39fd48e2db39959454ec39a41c8c72082/regex-2026.9.29-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2089fe39c406784d90101c726755ffa1497bb74638fd434300d2b88006186de8", size = 923115, upload-time = "2026-09-29T00:48:17.328Z" }, + { url = "https://files.pythonhosted.org/packages/d8/c1/98622479e3c354a446a75232e522d747d2b3df23092dcd8a5309380a2020/regex-2026.9.29-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0def9fb6abac55492d6d51cddb7225d07d6f279e774e0adc08569a54a5fc8d46", size = 820674, upload-time = "2026-09-29T00:48:19.32Z" }, + { url = "https://files.pythonhosted.org/packages/6c/d0/5808c95f9c79ed27b5eedaafc3df6239ec56a49f2e23ea8f831b18427c82/regex-2026.9.29-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:888d60953908dcf761aa320c3e390ab8556efbdb551ace63921de90f6ae0848d", size = 793306, upload-time = "2026-09-29T00:48:21.615Z" }, + { url = "https://files.pythonhosted.org/packages/bf/d3/021ca2638671ad20603bcd9b4d5bfa35d2610cd216a043ea7f0b44ea39f6/regex-2026.9.29-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ed511a0708e2297e1d6431e7fb217e3402791e491e02da800658ace4973df1bb", size = 803103, upload-time = "2026-09-29T00:48:23.871Z" }, + { url = "https://files.pythonhosted.org/packages/6b/2d/755c6d13ef9c657378013676c391c7a402166b3f419a464a3e058dcbe533/regex-2026.9.29-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:e1172147d28d8fbcf8cb8d26c41506169f5ad8fe9ec969cb116835a19d4d8eca", size = 872175, upload-time = "2026-09-29T00:48:26.255Z" }, + { url = "https://files.pythonhosted.org/packages/6c/fc/e1cab183b9dafe8597f58c1c766da9bf96204d3b2f232bcf3eeb75ff7b6c/regex-2026.9.29-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:92f05c9c42bde5785dc48770bc2194d9f7442544156f951e19cd31b096cec562", size = 777362, upload-time = "2026-09-29T00:48:28.389Z" }, + { url = "https://files.pythonhosted.org/packages/06/7c/e10ea17fba31fb4a1f9d13ed53a2d2a9066a2aea58d7557e263f6d99e7b0/regex-2026.9.29-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:f37964e4a5e993d2fd45147741e9dff7f34a2d8c00ab94c4ea0514a4677f959e", size = 865606, upload-time = "2026-09-29T00:48:30.4Z" }, + { url = "https://files.pythonhosted.org/packages/8e/6e/69824d9aee1fd41c54ea7264654a47c8d9d84d8a228e11c2bcf4c201ed81/regex-2026.9.29-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:951733b1bbdb71e377cec567b409f1a7881b47cfcad84121aa74cb575fa425ea", size = 807945, upload-time = "2026-09-29T00:48:32.375Z" }, + { url = "https://files.pythonhosted.org/packages/89/22/857050a86e21ce60193e02a8ef662521f2e263a645c8b1b905fc136b61a7/regex-2026.9.29-cp314-cp314t-win32.whl", hash = "sha256:65b408d8fcb273e3499e7ef2ce796810da1becd208c7fb4373692a242d79d461", size = 276758, upload-time = "2026-09-29T00:48:34.72Z" }, + { url = "https://files.pythonhosted.org/packages/4d/96/56808fe029553d7d4c703414f2a527faad2ea2bfa9ca094a2e7f8762b530/regex-2026.9.29-cp314-cp314t-win_amd64.whl", hash = "sha256:bf48516e35cf848390ea68850aba53e7c333720d2945b4d2c25b69fc5171723f", size = 286527, upload-time = "2026-09-29T00:48:36.864Z" }, + { url = "https://files.pythonhosted.org/packages/01/aa/074e2cfb3d8101a6a764aba5f7c5d1e21de087483e35bdc0c4ce2eb60364/regex-2026.9.29-cp314-cp314t-win_arm64.whl", hash = "sha256:9173db3be74a35cb6731701094b98120f7ee4876a287882a59cdea1fa7da342f", size = 285954, upload-time = "2026-09-29T00:48:38.901Z" }, + { url = "https://files.pythonhosted.org/packages/a7/dc/d84990386c9dfdf8c377f00f371b241fdc9a2c8aea0e3d66941b2e51be0b/regex-2026.9.29-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:c3589f40749acce747510bf5d589d54e376cb0930ea58b35effac97e5312b0c1", size = 497836, upload-time = "2026-09-29T00:48:40.858Z" }, + { url = "https://files.pythonhosted.org/packages/c2/ab/a569ebde875fa12ff8c6c9a30e07503620f195e4be4d54c3d3ee8eecc283/regex-2026.9.29-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:32ab11df9677ca80bcbb5fe4eb1da9109a5019239a054836efc6fa1c64e683cf", size = 296244, upload-time = "2026-09-29T00:48:42.952Z" }, + { url = "https://files.pythonhosted.org/packages/f3/3e/7d548e82a108e7c8b2d5246650e397a2f8db599f9b2e975466939c5b4e70/regex-2026.9.29-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:7c03031610e3e6ed1768a2b7a8fc84637c1257b50c5eacaf094c6e17a84fc563", size = 293748, upload-time = "2026-09-29T00:48:44.985Z" }, + { url = "https://files.pythonhosted.org/packages/40/34/a8e19a52f452bbb07b32a2bef70dcdf90c2737049749f74cc12d7486fb4f/regex-2026.9.29-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:42e82e578c904445d4c8a35b8f28052cf567593215fa5db06266fbc6f77aaa2e", size = 807840, upload-time = "2026-09-29T00:48:46.948Z" }, + { url = "https://files.pythonhosted.org/packages/88/7b/11fbd4640b3bb82b72822a63c20ade4013d562d291703a9debeedc24e682/regex-2026.9.29-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0b65c72739f981377c9c22e0c5c3cd7f42da7bd8a3c9209330fac772c7d893ed", size = 879330, upload-time = "2026-09-29T00:48:49.168Z" }, + { url = "https://files.pythonhosted.org/packages/f3/55/de58c74f1f4e31586d83eb39c56872d686c4e0d0966d151884c833b94ced/regex-2026.9.29-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4408b2b27a95ca8cc48b7411945753773353b5c93b307754781086c99d3a576f", size = 919251, upload-time = "2026-09-29T00:48:51.322Z" }, + { url = "https://files.pythonhosted.org/packages/81/42/a8c480f6dd5ac59fa28ddae79afd9d7ac7e596fdb61813adc65bb6e674b8/regex-2026.9.29-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a714befaacbd10092ffe4cea0d3c5f008fb9efe9bc322c715bcdfdee414b9a3d", size = 808808, upload-time = "2026-09-29T00:48:53.529Z" }, + { url = "https://files.pythonhosted.org/packages/68/60/0bc0d1ec8b37ad64be6fa30e035251f11de9667a0fac9e82ee74517d81be/regex-2026.9.29-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:33026515aebc0e70d1c89978e53e8d695d35d9e472f8d5b34465ba3c74028650", size = 789907, upload-time = "2026-09-29T00:48:56.036Z" }, + { url = "https://files.pythonhosted.org/packages/da/84/116a3ef19b3acfe81077f0bf2cbc7714a5e94bc8935b7243ab61cb0f1c3c/regex-2026.9.29-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:31b003f9a070335e2a8233ee9b14a3ca8e6d792012ae011f741bf0aaf11744c5", size = 795770, upload-time = "2026-09-29T00:48:58.284Z" }, + { url = "https://files.pythonhosted.org/packages/96/ba/e38c3f203e7e7e18c957d48e6cb6dbf96c11e95a44efa4a480522afc5d6d/regex-2026.9.29-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:c03c6eb6ece86dfdcbb34799efaa339b093132e1aceed491ba5e08fe06cdf699", size = 870671, upload-time = "2026-09-29T00:49:00.506Z" }, + { url = "https://files.pythonhosted.org/packages/2f/0f/9ee0b0cb76c55f63684bd7fff554978e8773b4fc86e2bcb2d50772dc1086/regex-2026.9.29-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:a5300757f8a68f5b6cc33f57338d72a0e3589c5cc9ad5f8504ea06f028be582a", size = 778631, upload-time = "2026-09-29T00:49:02.984Z" }, + { url = "https://files.pythonhosted.org/packages/b6/19/e6e3eeb226af5872c4958002f6edef4e4f40ea4cc5f5665023f2019eb045/regex-2026.9.29-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:80c7cadd3fd2bfde5df8aa0787e315812cad0c313a753095d02f4c2b6c01677b", size = 862187, upload-time = "2026-09-29T00:49:05.264Z" }, + { url = "https://files.pythonhosted.org/packages/5b/62/823c102e106bb2711d6b7dfe5981552fe4467b2969c46a20c5c383cf498c/regex-2026.9.29-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:3f1e6cb402a89457582cd696f982559217d13484a193202c394015297968c86d", size = 798423, upload-time = "2026-09-29T00:49:07.644Z" }, + { url = "https://files.pythonhosted.org/packages/37/e0/e927776258fa70b2f6feffc3be584ffc85ba4c1e20a320f0aee9a632fc7d/regex-2026.9.29-cp315-cp315-win32.whl", hash = "sha256:a64b85a4760337cfefdb27d42da6ed8b58e8cde3f2d57b6ef43e76ef6ea9ef47", size = 274757, upload-time = "2026-09-29T00:49:10.513Z" }, + { url = "https://files.pythonhosted.org/packages/77/04/358de85d1860238e1b4fa98fc2c80c990124a25d2e14739e28cc02c25562/regex-2026.9.29-cp315-cp315-win_amd64.whl", hash = "sha256:b3e445b66c80b4eb4234e855ce94d9adc183eedbd632816228d89930b91b2c5b", size = 283824, upload-time = "2026-09-29T00:49:12.849Z" }, + { url = "https://files.pythonhosted.org/packages/92/d3/d5c5b264784a5ab2b0f8cf620c1eeb4dbf3440d306761905e7d99345bef5/regex-2026.9.29-cp315-cp315-win_arm64.whl", hash = "sha256:8f39588af4731c8923c26810eb3b33f76f17633985e40f59c3cd45a33805a895", size = 283664, upload-time = "2026-09-29T00:49:15.331Z" }, + { url = "https://files.pythonhosted.org/packages/02/dc/f63ec2c201445ce1150fe780f5c56f16a10124d9a9da3a93161dbb0d8892/regex-2026.9.29-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:fb99cc9d45f48895d9d67f6a0b8a57f08d39c174d9f25ad97a313e0470267b1c", size = 501549, upload-time = "2026-09-29T00:49:17.705Z" }, + { url = "https://files.pythonhosted.org/packages/9a/5c/d2a698dc6bfc11fbce03f1cb0249c13284e93b79ed11f893edf6fac431c9/regex-2026.9.29-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:720537c7ea6f80dc61913184edb0ce2497a306b39ef19f28505b322553d52bdb", size = 298187, upload-time = "2026-09-29T00:49:20.171Z" }, + { url = "https://files.pythonhosted.org/packages/85/b7/88dcdb38cd3935d4ee9e9ce9b8e56cb3b3518d1f020acfa7dd62ad289bf8/regex-2026.9.29-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:0fd2c901cc307a745ad4bc87f20060d7a0825a3371d1e93488af22e7a387f78f", size = 296157, upload-time = "2026-09-29T00:49:22.342Z" }, + { url = "https://files.pythonhosted.org/packages/d3/8e/ba6c01dde33a69fc294b38b43f6677baaa5735a6248f39708031a738158a/regex-2026.9.29-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b11b589e00095ec69cf79841a76360f9b079e95b0368a25b5ebb951ab0c157ff", size = 818468, upload-time = "2026-09-29T00:49:24.612Z" }, + { url = "https://files.pythonhosted.org/packages/2a/f1/2586693e3a2d6b1247852593d37a6c17b42a92ee44f7cdcb9a0c1494e64a/regex-2026.9.29-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d7cab119d0df0b9413f106b4d7fc34f2872d3574ed3806fb48959c830b1537da", size = 882825, upload-time = "2026-09-29T00:49:26.996Z" }, + { url = "https://files.pythonhosted.org/packages/30/51/084f3e7bdcd0e9c33665c938cf5d134dc3548cbb4a75f0197ec7bfd754b1/regex-2026.9.29-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b89efc38431793d28b7cd91227e2f952ad7c48df19132b17f43a5fec3c14143b", size = 923314, upload-time = "2026-09-29T00:49:29.822Z" }, + { url = "https://files.pythonhosted.org/packages/5a/f1/066c6fc23b7dc229789c21c880b5ba5ad689fb95fed12e078266f55a1f9b/regex-2026.9.29-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:80a5ea3b4fd9d6a5b9a44f7976a9acaaab35aa3c1f6b29e5bd857dfabaded223", size = 822222, upload-time = "2026-09-29T00:49:32.404Z" }, + { url = "https://files.pythonhosted.org/packages/0a/56/592cd46fdb8f2f8682a1d7fd1310e4d0bcb93fbd0e6bbe4141ac28240227/regex-2026.9.29-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:19959129885356df0e97556856f77eb2888380dac18bed075a7c05c5128c618d", size = 794882, upload-time = "2026-09-29T00:49:35.076Z" }, + { url = "https://files.pythonhosted.org/packages/ee/4d/d65384bb071c864b01aa8314e3a6a687845ebd57588390976edc960c218b/regex-2026.9.29-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:6a1a824fbed817e0a891103886b68f063b1e83cc51bc97192a90a60195a9291f", size = 805887, upload-time = "2026-09-29T00:49:37.395Z" }, + { url = "https://files.pythonhosted.org/packages/65/b6/358de0d8f40d5178e4f7e7e121cfd5b961c812b77a055d11f5079e3f8fd7/regex-2026.9.29-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:1ba8c6a416569ce0d37e83e28a254a61dc99a419084dfb6476cea02d997f74fa", size = 872901, upload-time = "2026-09-29T00:49:39.927Z" }, + { url = "https://files.pythonhosted.org/packages/00/06/6bfded72d043240c6b52bbb5e16f639d81affbf7484b4fe2ec45f3d4afc9/regex-2026.9.29-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:446654b29bfaa30500d80947eda42cef1449dc8a87f4e3cf061cc8485d3a1f0b", size = 782970, upload-time = "2026-09-29T00:49:42.581Z" }, + { url = "https://files.pythonhosted.org/packages/5a/20/9f418a50baa78b3ed8308fcb0cc49e472dd000b7ef935a7295af202ea744/regex-2026.9.29-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:bf3c49863c23a1ad6da9c30351aed6cff8d5ddbeb63c5c8420ae54e98c7d0138", size = 865441, upload-time = "2026-09-29T00:49:45.238Z" }, + { url = "https://files.pythonhosted.org/packages/2c/29/817c7eacdeaf8463123e949bd394c39ad024eea1ec38ddf5ad141da2f3bd/regex-2026.9.29-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:01000ddf0e3ffef97f2413ceb514f6313040106b6d18a03ee00a4fe35c1eb1db", size = 809431, upload-time = "2026-09-29T00:49:47.878Z" }, + { url = "https://files.pythonhosted.org/packages/63/0b/83aab3b5b739947f744135a7a3a446e25433ebc92b05e01aae197ccbfdda/regex-2026.9.29-cp315-cp315t-win32.whl", hash = "sha256:c4e38dd8f39c43a91d2410ad2b85610701b0979342c3df1d69eaf8e838c757d8", size = 276964, upload-time = "2026-09-29T00:49:50.524Z" }, + { url = "https://files.pythonhosted.org/packages/72/f2/6314b5fc68789b5dcc38885bc6e3d6986b34fb3372b7231088ee5cecaa05/regex-2026.9.29-cp315-cp315t-win_amd64.whl", hash = "sha256:e2c89e9b762c57f59d5e99ee8b20202adb892e35f8d3485741340999ca55058e", size = 286487, upload-time = "2026-09-29T00:49:53.224Z" }, + { url = "https://files.pythonhosted.org/packages/56/bc/97b2245c8c7b2dd01f2db74f2bea003cd33c15009b4996a2447f46b5325c/regex-2026.9.29-cp315-cp315t-win_arm64.whl", hash = "sha256:e8c65ef3862a8ad6e86492b6ed9327805dd66904c012bd3649dc67d822ed6c34", size = 285955, upload-time = "2026-09-29T00:49:55.655Z" }, ] [[package]] name = "requests" -version = "2.32.5" +version = "2.34.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "certifi" }, @@ -2644,9 +4157,9 @@ dependencies = [ { name = "idna" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517, upload-time = "2025-08-18T20:46:02.573Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" }, + { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" }, ] [[package]] @@ -2661,6 +4174,32 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/3f/51/d4db610ef29373b879047326cbf6fa98b6c1969d6f6dc423279de2b1be2c/requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06", size = 54481, upload-time = "2023-05-01T04:11:28.427Z" }, ] +[[package]] +name = "responses" +version = "0.26.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyyaml" }, + { name = "requests" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9f/47/f216a33221db8eff328987661cf18371afee89c62a62b434b963d6b509c9/responses-0.26.3.tar.gz", hash = "sha256:b0c11ca8131b8b227b8d5108e6ed39772222bd5aab030ed430e8f99057c4c409", size = 86335, upload-time = "2026-08-26T19:17:24.373Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/86/ca7958de70cb0752350575e98229368a3a2f746a2942034b3364e17312bb/responses-0.26.3-py3-none-any.whl", hash = "sha256:74474f799334ac4f37d93b6437ecc3bb1bb5c77a8d31780a338643be2dce0af8", size = 36289, upload-time = "2026-08-26T19:17:23.176Z" }, +] + +[[package]] +name = "rfc3339-validator" +version = "0.1.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz", hash = "sha256:138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b", size = 5513, upload-time = "2021-05-12T16:37:54.178Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/44/4e421b96b67b2daff264473f7465db72fbdf36a07e05494f50300cc7b0c6/rfc3339_validator-0.1.4-py2.py3-none-any.whl", hash = "sha256:24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa", size = 3490, upload-time = "2021-05-12T16:37:52.536Z" }, +] + [[package]] name = "rfc3986" version = "2.0.0" @@ -2672,197 +4211,209 @@ wheels = [ [[package]] name = "rich" -version = "14.2.0" +version = "15.0.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markdown-it-py" }, { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz", hash = "sha256:73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4", size = 219990, upload-time = "2025-10-09T14:16:53.064Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c0/8f/0722ca900cc807c13a6a0c696dacf35430f72e0ec571c4275d2371fca3e9/rich-15.0.0.tar.gz", hash = "sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36", size = 230680, upload-time = "2026-04-12T08:24:00.75Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/25/7a/b0178788f8dc6cafce37a212c99565fa1fe7872c70c6c9c1e1a372d9d88f/rich-14.2.0-py3-none-any.whl", hash = "sha256:76bc51fe2e57d2b1be1f96c524b890b816e334ab4c1e45888799bfaab0021edd", size = 243393, upload-time = "2025-10-09T14:16:51.245Z" }, + { url = "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", hash = "sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", size = 310654, upload-time = "2026-04-12T08:24:02.83Z" }, ] [[package]] name = "rpds-py" -version = "0.27.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e9/dd/2c0cbe774744272b0ae725f44032c77bdcab6e8bcf544bffa3b6e70c8dba/rpds_py-0.27.1.tar.gz", hash = "sha256:26a1c73171d10b7acccbded82bf6a586ab8203601e565badc74bbbf8bc5a10f8", size = 27479, upload-time = "2025-08-27T12:16:36.024Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a5/ed/3aef893e2dd30e77e35d20d4ddb45ca459db59cead748cad9796ad479411/rpds_py-0.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:68afeec26d42ab3b47e541b272166a0b4400313946871cba3ed3a4fc0cab1cef", size = 371606, upload-time = "2025-08-27T12:12:25.189Z" }, - { url = "https://files.pythonhosted.org/packages/6d/82/9818b443e5d3eb4c83c3994561387f116aae9833b35c484474769c4a8faf/rpds_py-0.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:74e5b2f7bb6fa38b1b10546d27acbacf2a022a8b5543efb06cfebc72a59c85be", size = 353452, upload-time = "2025-08-27T12:12:27.433Z" }, - { url = "https://files.pythonhosted.org/packages/99/c7/d2a110ffaaa397fc6793a83c7bd3545d9ab22658b7cdff05a24a4535cc45/rpds_py-0.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9024de74731df54546fab0bfbcdb49fae19159ecaecfc8f37c18d2c7e2c0bd61", size = 381519, upload-time = "2025-08-27T12:12:28.719Z" }, - { url = "https://files.pythonhosted.org/packages/5a/bc/e89581d1f9d1be7d0247eaef602566869fdc0d084008ba139e27e775366c/rpds_py-0.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:31d3ebadefcd73b73928ed0b2fd696f7fefda8629229f81929ac9c1854d0cffb", size = 394424, upload-time = "2025-08-27T12:12:30.207Z" }, - { url = "https://files.pythonhosted.org/packages/ac/2e/36a6861f797530e74bb6ed53495f8741f1ef95939eed01d761e73d559067/rpds_py-0.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2e7f8f169d775dd9092a1743768d771f1d1300453ddfe6325ae3ab5332b4657", size = 523467, upload-time = "2025-08-27T12:12:31.808Z" }, - { url = "https://files.pythonhosted.org/packages/c4/59/c1bc2be32564fa499f988f0a5c6505c2f4746ef96e58e4d7de5cf923d77e/rpds_py-0.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d905d16f77eb6ab2e324e09bfa277b4c8e5e6b8a78a3e7ff8f3cdf773b4c013", size = 402660, upload-time = "2025-08-27T12:12:33.444Z" }, - { url = "https://files.pythonhosted.org/packages/0a/ec/ef8bf895f0628dd0a59e54d81caed6891663cb9c54a0f4bb7da918cb88cf/rpds_py-0.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50c946f048209e6362e22576baea09193809f87687a95a8db24e5fbdb307b93a", size = 384062, upload-time = "2025-08-27T12:12:34.857Z" }, - { url = "https://files.pythonhosted.org/packages/69/f7/f47ff154be8d9a5e691c083a920bba89cef88d5247c241c10b9898f595a1/rpds_py-0.27.1-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:3deab27804d65cd8289eb814c2c0e807c4b9d9916c9225e363cb0cf875eb67c1", size = 401289, upload-time = "2025-08-27T12:12:36.085Z" }, - { url = "https://files.pythonhosted.org/packages/3b/d9/ca410363efd0615814ae579f6829cafb39225cd63e5ea5ed1404cb345293/rpds_py-0.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8b61097f7488de4be8244c89915da8ed212832ccf1e7c7753a25a394bf9b1f10", size = 417718, upload-time = "2025-08-27T12:12:37.401Z" }, - { url = "https://files.pythonhosted.org/packages/e3/a0/8cb5c2ff38340f221cc067cc093d1270e10658ba4e8d263df923daa18e86/rpds_py-0.27.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:8a3f29aba6e2d7d90528d3c792555a93497fe6538aa65eb675b44505be747808", size = 558333, upload-time = "2025-08-27T12:12:38.672Z" }, - { url = "https://files.pythonhosted.org/packages/6f/8c/1b0de79177c5d5103843774ce12b84caa7164dfc6cd66378768d37db11bf/rpds_py-0.27.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:dd6cd0485b7d347304067153a6dc1d73f7d4fd995a396ef32a24d24b8ac63ac8", size = 589127, upload-time = "2025-08-27T12:12:41.48Z" }, - { url = "https://files.pythonhosted.org/packages/c8/5e/26abb098d5e01266b0f3a2488d299d19ccc26849735d9d2b95c39397e945/rpds_py-0.27.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6f4461bf931108c9fa226ffb0e257c1b18dc2d44cd72b125bec50ee0ab1248a9", size = 554899, upload-time = "2025-08-27T12:12:42.925Z" }, - { url = "https://files.pythonhosted.org/packages/de/41/905cc90ced13550db017f8f20c6d8e8470066c5738ba480d7ba63e3d136b/rpds_py-0.27.1-cp310-cp310-win32.whl", hash = "sha256:ee5422d7fb21f6a00c1901bf6559c49fee13a5159d0288320737bbf6585bd3e4", size = 217450, upload-time = "2025-08-27T12:12:44.813Z" }, - { url = "https://files.pythonhosted.org/packages/75/3d/6bef47b0e253616ccdf67c283e25f2d16e18ccddd38f92af81d5a3420206/rpds_py-0.27.1-cp310-cp310-win_amd64.whl", hash = "sha256:3e039aabf6d5f83c745d5f9a0a381d031e9ed871967c0a5c38d201aca41f3ba1", size = 228447, upload-time = "2025-08-27T12:12:46.204Z" }, - { url = "https://files.pythonhosted.org/packages/b5/c1/7907329fbef97cbd49db6f7303893bd1dd5a4a3eae415839ffdfb0762cae/rpds_py-0.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:be898f271f851f68b318872ce6ebebbc62f303b654e43bf72683dbdc25b7c881", size = 371063, upload-time = "2025-08-27T12:12:47.856Z" }, - { url = "https://files.pythonhosted.org/packages/11/94/2aab4bc86228bcf7c48760990273653a4900de89c7537ffe1b0d6097ed39/rpds_py-0.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:62ac3d4e3e07b58ee0ddecd71d6ce3b1637de2d373501412df395a0ec5f9beb5", size = 353210, upload-time = "2025-08-27T12:12:49.187Z" }, - { url = "https://files.pythonhosted.org/packages/3a/57/f5eb3ecf434342f4f1a46009530e93fd201a0b5b83379034ebdb1d7c1a58/rpds_py-0.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4708c5c0ceb2d034f9991623631d3d23cb16e65c83736ea020cdbe28d57c0a0e", size = 381636, upload-time = "2025-08-27T12:12:50.492Z" }, - { url = "https://files.pythonhosted.org/packages/ae/f4/ef95c5945e2ceb5119571b184dd5a1cc4b8541bbdf67461998cfeac9cb1e/rpds_py-0.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:abfa1171a9952d2e0002aba2ad3780820b00cc3d9c98c6630f2e93271501f66c", size = 394341, upload-time = "2025-08-27T12:12:52.024Z" }, - { url = "https://files.pythonhosted.org/packages/5a/7e/4bd610754bf492d398b61725eb9598ddd5eb86b07d7d9483dbcd810e20bc/rpds_py-0.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4b507d19f817ebaca79574b16eb2ae412e5c0835542c93fe9983f1e432aca195", size = 523428, upload-time = "2025-08-27T12:12:53.779Z" }, - { url = "https://files.pythonhosted.org/packages/9f/e5/059b9f65a8c9149361a8b75094864ab83b94718344db511fd6117936ed2a/rpds_py-0.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:168b025f8fd8d8d10957405f3fdcef3dc20f5982d398f90851f4abc58c566c52", size = 402923, upload-time = "2025-08-27T12:12:55.15Z" }, - { url = "https://files.pythonhosted.org/packages/f5/48/64cabb7daced2968dd08e8a1b7988bf358d7bd5bcd5dc89a652f4668543c/rpds_py-0.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb56c6210ef77caa58e16e8c17d35c63fe3f5b60fd9ba9d424470c3400bcf9ed", size = 384094, upload-time = "2025-08-27T12:12:57.194Z" }, - { url = "https://files.pythonhosted.org/packages/ae/e1/dc9094d6ff566bff87add8a510c89b9e158ad2ecd97ee26e677da29a9e1b/rpds_py-0.27.1-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:d252f2d8ca0195faa707f8eb9368955760880b2b42a8ee16d382bf5dd807f89a", size = 401093, upload-time = "2025-08-27T12:12:58.985Z" }, - { url = "https://files.pythonhosted.org/packages/37/8e/ac8577e3ecdd5593e283d46907d7011618994e1d7ab992711ae0f78b9937/rpds_py-0.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6e5e54da1e74b91dbc7996b56640f79b195d5925c2b78efaa8c5d53e1d88edde", size = 417969, upload-time = "2025-08-27T12:13:00.367Z" }, - { url = "https://files.pythonhosted.org/packages/66/6d/87507430a8f74a93556fe55c6485ba9c259949a853ce407b1e23fea5ba31/rpds_py-0.27.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ffce0481cc6e95e5b3f0a47ee17ffbd234399e6d532f394c8dce320c3b089c21", size = 558302, upload-time = "2025-08-27T12:13:01.737Z" }, - { url = "https://files.pythonhosted.org/packages/3a/bb/1db4781ce1dda3eecc735e3152659a27b90a02ca62bfeea17aee45cc0fbc/rpds_py-0.27.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a205fdfe55c90c2cd8e540ca9ceba65cbe6629b443bc05db1f590a3db8189ff9", size = 589259, upload-time = "2025-08-27T12:13:03.127Z" }, - { url = "https://files.pythonhosted.org/packages/7b/0e/ae1c8943d11a814d01b482e1f8da903f88047a962dff9bbdadf3bd6e6fd1/rpds_py-0.27.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:689fb5200a749db0415b092972e8eba85847c23885c8543a8b0f5c009b1a5948", size = 554983, upload-time = "2025-08-27T12:13:04.516Z" }, - { url = "https://files.pythonhosted.org/packages/b2/d5/0b2a55415931db4f112bdab072443ff76131b5ac4f4dc98d10d2d357eb03/rpds_py-0.27.1-cp311-cp311-win32.whl", hash = "sha256:3182af66048c00a075010bc7f4860f33913528a4b6fc09094a6e7598e462fe39", size = 217154, upload-time = "2025-08-27T12:13:06.278Z" }, - { url = "https://files.pythonhosted.org/packages/24/75/3b7ffe0d50dc86a6a964af0d1cc3a4a2cdf437cb7b099a4747bbb96d1819/rpds_py-0.27.1-cp311-cp311-win_amd64.whl", hash = "sha256:b4938466c6b257b2f5c4ff98acd8128ec36b5059e5c8f8372d79316b1c36bb15", size = 228627, upload-time = "2025-08-27T12:13:07.625Z" }, - { url = "https://files.pythonhosted.org/packages/8d/3f/4fd04c32abc02c710f09a72a30c9a55ea3cc154ef8099078fd50a0596f8e/rpds_py-0.27.1-cp311-cp311-win_arm64.whl", hash = "sha256:2f57af9b4d0793e53266ee4325535a31ba48e2f875da81a9177c9926dfa60746", size = 220998, upload-time = "2025-08-27T12:13:08.972Z" }, - { url = "https://files.pythonhosted.org/packages/bd/fe/38de28dee5df58b8198c743fe2bea0c785c6d40941b9950bac4cdb71a014/rpds_py-0.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:ae2775c1973e3c30316892737b91f9283f9908e3cc7625b9331271eaaed7dc90", size = 361887, upload-time = "2025-08-27T12:13:10.233Z" }, - { url = "https://files.pythonhosted.org/packages/7c/9a/4b6c7eedc7dd90986bf0fab6ea2a091ec11c01b15f8ba0a14d3f80450468/rpds_py-0.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2643400120f55c8a96f7c9d858f7be0c88d383cd4653ae2cf0d0c88f668073e5", size = 345795, upload-time = "2025-08-27T12:13:11.65Z" }, - { url = "https://files.pythonhosted.org/packages/6f/0e/e650e1b81922847a09cca820237b0edee69416a01268b7754d506ade11ad/rpds_py-0.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16323f674c089b0360674a4abd28d5042947d54ba620f72514d69be4ff64845e", size = 385121, upload-time = "2025-08-27T12:13:13.008Z" }, - { url = "https://files.pythonhosted.org/packages/1b/ea/b306067a712988e2bff00dcc7c8f31d26c29b6d5931b461aa4b60a013e33/rpds_py-0.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9a1f4814b65eacac94a00fc9a526e3fdafd78e439469644032032d0d63de4881", size = 398976, upload-time = "2025-08-27T12:13:14.368Z" }, - { url = "https://files.pythonhosted.org/packages/2c/0a/26dc43c8840cb8fe239fe12dbc8d8de40f2365e838f3d395835dde72f0e5/rpds_py-0.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ba32c16b064267b22f1850a34051121d423b6f7338a12b9459550eb2096e7ec", size = 525953, upload-time = "2025-08-27T12:13:15.774Z" }, - { url = "https://files.pythonhosted.org/packages/22/14/c85e8127b573aaf3a0cbd7fbb8c9c99e735a4a02180c84da2a463b766e9e/rpds_py-0.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5c20f33fd10485b80f65e800bbe5f6785af510b9f4056c5a3c612ebc83ba6cb", size = 407915, upload-time = "2025-08-27T12:13:17.379Z" }, - { url = "https://files.pythonhosted.org/packages/ed/7b/8f4fee9ba1fb5ec856eb22d725a4efa3deb47f769597c809e03578b0f9d9/rpds_py-0.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:466bfe65bd932da36ff279ddd92de56b042f2266d752719beb97b08526268ec5", size = 386883, upload-time = "2025-08-27T12:13:18.704Z" }, - { url = "https://files.pythonhosted.org/packages/86/47/28fa6d60f8b74fcdceba81b272f8d9836ac0340570f68f5df6b41838547b/rpds_py-0.27.1-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:41e532bbdcb57c92ba3be62c42e9f096431b4cf478da9bc3bc6ce5c38ab7ba7a", size = 405699, upload-time = "2025-08-27T12:13:20.089Z" }, - { url = "https://files.pythonhosted.org/packages/d0/fd/c5987b5e054548df56953a21fe2ebed51fc1ec7c8f24fd41c067b68c4a0a/rpds_py-0.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f149826d742b406579466283769a8ea448eed82a789af0ed17b0cd5770433444", size = 423713, upload-time = "2025-08-27T12:13:21.436Z" }, - { url = "https://files.pythonhosted.org/packages/ac/ba/3c4978b54a73ed19a7d74531be37a8bcc542d917c770e14d372b8daea186/rpds_py-0.27.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:80c60cfb5310677bd67cb1e85a1e8eb52e12529545441b43e6f14d90b878775a", size = 562324, upload-time = "2025-08-27T12:13:22.789Z" }, - { url = "https://files.pythonhosted.org/packages/b5/6c/6943a91768fec16db09a42b08644b960cff540c66aab89b74be6d4a144ba/rpds_py-0.27.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:7ee6521b9baf06085f62ba9c7a3e5becffbc32480d2f1b351559c001c38ce4c1", size = 593646, upload-time = "2025-08-27T12:13:24.122Z" }, - { url = "https://files.pythonhosted.org/packages/11/73/9d7a8f4be5f4396f011a6bb7a19fe26303a0dac9064462f5651ced2f572f/rpds_py-0.27.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a512c8263249a9d68cac08b05dd59d2b3f2061d99b322813cbcc14c3c7421998", size = 558137, upload-time = "2025-08-27T12:13:25.557Z" }, - { url = "https://files.pythonhosted.org/packages/6e/96/6772cbfa0e2485bcceef8071de7821f81aeac8bb45fbfd5542a3e8108165/rpds_py-0.27.1-cp312-cp312-win32.whl", hash = "sha256:819064fa048ba01b6dadc5116f3ac48610435ac9a0058bbde98e569f9e785c39", size = 221343, upload-time = "2025-08-27T12:13:26.967Z" }, - { url = "https://files.pythonhosted.org/packages/67/b6/c82f0faa9af1c6a64669f73a17ee0eeef25aff30bb9a1c318509efe45d84/rpds_py-0.27.1-cp312-cp312-win_amd64.whl", hash = "sha256:d9199717881f13c32c4046a15f024971a3b78ad4ea029e8da6b86e5aa9cf4594", size = 232497, upload-time = "2025-08-27T12:13:28.326Z" }, - { url = "https://files.pythonhosted.org/packages/e1/96/2817b44bd2ed11aebacc9251da03689d56109b9aba5e311297b6902136e2/rpds_py-0.27.1-cp312-cp312-win_arm64.whl", hash = "sha256:33aa65b97826a0e885ef6e278fbd934e98cdcfed80b63946025f01e2f5b29502", size = 222790, upload-time = "2025-08-27T12:13:29.71Z" }, - { url = "https://files.pythonhosted.org/packages/cc/77/610aeee8d41e39080c7e14afa5387138e3c9fa9756ab893d09d99e7d8e98/rpds_py-0.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e4b9fcfbc021633863a37e92571d6f91851fa656f0180246e84cbd8b3f6b329b", size = 361741, upload-time = "2025-08-27T12:13:31.039Z" }, - { url = "https://files.pythonhosted.org/packages/3a/fc/c43765f201c6a1c60be2043cbdb664013def52460a4c7adace89d6682bf4/rpds_py-0.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1441811a96eadca93c517d08df75de45e5ffe68aa3089924f963c782c4b898cf", size = 345574, upload-time = "2025-08-27T12:13:32.902Z" }, - { url = "https://files.pythonhosted.org/packages/20/42/ee2b2ca114294cd9847d0ef9c26d2b0851b2e7e00bf14cc4c0b581df0fc3/rpds_py-0.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55266dafa22e672f5a4f65019015f90336ed31c6383bd53f5e7826d21a0e0b83", size = 385051, upload-time = "2025-08-27T12:13:34.228Z" }, - { url = "https://files.pythonhosted.org/packages/fd/e8/1e430fe311e4799e02e2d1af7c765f024e95e17d651612425b226705f910/rpds_py-0.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d78827d7ac08627ea2c8e02c9e5b41180ea5ea1f747e9db0915e3adf36b62dcf", size = 398395, upload-time = "2025-08-27T12:13:36.132Z" }, - { url = "https://files.pythonhosted.org/packages/82/95/9dc227d441ff2670651c27a739acb2535ccaf8b351a88d78c088965e5996/rpds_py-0.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae92443798a40a92dc5f0b01d8a7c93adde0c4dc965310a29ae7c64d72b9fad2", size = 524334, upload-time = "2025-08-27T12:13:37.562Z" }, - { url = "https://files.pythonhosted.org/packages/87/01/a670c232f401d9ad461d9a332aa4080cd3cb1d1df18213dbd0d2a6a7ab51/rpds_py-0.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c46c9dd2403b66a2a3b9720ec4b74d4ab49d4fabf9f03dfdce2d42af913fe8d0", size = 407691, upload-time = "2025-08-27T12:13:38.94Z" }, - { url = "https://files.pythonhosted.org/packages/03/36/0a14aebbaa26fe7fab4780c76f2239e76cc95a0090bdb25e31d95c492fcd/rpds_py-0.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2efe4eb1d01b7f5f1939f4ef30ecea6c6b3521eec451fb93191bf84b2a522418", size = 386868, upload-time = "2025-08-27T12:13:40.192Z" }, - { url = "https://files.pythonhosted.org/packages/3b/03/8c897fb8b5347ff6c1cc31239b9611c5bf79d78c984430887a353e1409a1/rpds_py-0.27.1-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:15d3b4d83582d10c601f481eca29c3f138d44c92187d197aff663a269197c02d", size = 405469, upload-time = "2025-08-27T12:13:41.496Z" }, - { url = "https://files.pythonhosted.org/packages/da/07/88c60edc2df74850d496d78a1fdcdc7b54360a7f610a4d50008309d41b94/rpds_py-0.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4ed2e16abbc982a169d30d1a420274a709949e2cbdef119fe2ec9d870b42f274", size = 422125, upload-time = "2025-08-27T12:13:42.802Z" }, - { url = "https://files.pythonhosted.org/packages/6b/86/5f4c707603e41b05f191a749984f390dabcbc467cf833769b47bf14ba04f/rpds_py-0.27.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a75f305c9b013289121ec0f1181931975df78738cdf650093e6b86d74aa7d8dd", size = 562341, upload-time = "2025-08-27T12:13:44.472Z" }, - { url = "https://files.pythonhosted.org/packages/b2/92/3c0cb2492094e3cd9baf9e49bbb7befeceb584ea0c1a8b5939dca4da12e5/rpds_py-0.27.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:67ce7620704745881a3d4b0ada80ab4d99df390838839921f99e63c474f82cf2", size = 592511, upload-time = "2025-08-27T12:13:45.898Z" }, - { url = "https://files.pythonhosted.org/packages/10/bb/82e64fbb0047c46a168faa28d0d45a7851cd0582f850b966811d30f67ad8/rpds_py-0.27.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9d992ac10eb86d9b6f369647b6a3f412fc0075cfd5d799530e84d335e440a002", size = 557736, upload-time = "2025-08-27T12:13:47.408Z" }, - { url = "https://files.pythonhosted.org/packages/00/95/3c863973d409210da7fb41958172c6b7dbe7fc34e04d3cc1f10bb85e979f/rpds_py-0.27.1-cp313-cp313-win32.whl", hash = "sha256:4f75e4bd8ab8db624e02c8e2fc4063021b58becdbe6df793a8111d9343aec1e3", size = 221462, upload-time = "2025-08-27T12:13:48.742Z" }, - { url = "https://files.pythonhosted.org/packages/ce/2c/5867b14a81dc217b56d95a9f2a40fdbc56a1ab0181b80132beeecbd4b2d6/rpds_py-0.27.1-cp313-cp313-win_amd64.whl", hash = "sha256:f9025faafc62ed0b75a53e541895ca272815bec18abe2249ff6501c8f2e12b83", size = 232034, upload-time = "2025-08-27T12:13:50.11Z" }, - { url = "https://files.pythonhosted.org/packages/c7/78/3958f3f018c01923823f1e47f1cc338e398814b92d83cd278364446fac66/rpds_py-0.27.1-cp313-cp313-win_arm64.whl", hash = "sha256:ed10dc32829e7d222b7d3b93136d25a406ba9788f6a7ebf6809092da1f4d279d", size = 222392, upload-time = "2025-08-27T12:13:52.587Z" }, - { url = "https://files.pythonhosted.org/packages/01/76/1cdf1f91aed5c3a7bf2eba1f1c4e4d6f57832d73003919a20118870ea659/rpds_py-0.27.1-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:92022bbbad0d4426e616815b16bc4127f83c9a74940e1ccf3cfe0b387aba0228", size = 358355, upload-time = "2025-08-27T12:13:54.012Z" }, - { url = "https://files.pythonhosted.org/packages/c3/6f/bf142541229374287604caf3bb2a4ae17f0a580798fd72d3b009b532db4e/rpds_py-0.27.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:47162fdab9407ec3f160805ac3e154df042e577dd53341745fc7fb3f625e6d92", size = 342138, upload-time = "2025-08-27T12:13:55.791Z" }, - { url = "https://files.pythonhosted.org/packages/1a/77/355b1c041d6be40886c44ff5e798b4e2769e497b790f0f7fd1e78d17e9a8/rpds_py-0.27.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb89bec23fddc489e5d78b550a7b773557c9ab58b7946154a10a6f7a214a48b2", size = 380247, upload-time = "2025-08-27T12:13:57.683Z" }, - { url = "https://files.pythonhosted.org/packages/d6/a4/d9cef5c3946ea271ce2243c51481971cd6e34f21925af2783dd17b26e815/rpds_py-0.27.1-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e48af21883ded2b3e9eb48cb7880ad8598b31ab752ff3be6457001d78f416723", size = 390699, upload-time = "2025-08-27T12:13:59.137Z" }, - { url = "https://files.pythonhosted.org/packages/3a/06/005106a7b8c6c1a7e91b73169e49870f4af5256119d34a361ae5240a0c1d/rpds_py-0.27.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6f5b7bd8e219ed50299e58551a410b64daafb5017d54bbe822e003856f06a802", size = 521852, upload-time = "2025-08-27T12:14:00.583Z" }, - { url = "https://files.pythonhosted.org/packages/e5/3e/50fb1dac0948e17a02eb05c24510a8fe12d5ce8561c6b7b7d1339ab7ab9c/rpds_py-0.27.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:08f1e20bccf73b08d12d804d6e1c22ca5530e71659e6673bce31a6bb71c1e73f", size = 402582, upload-time = "2025-08-27T12:14:02.034Z" }, - { url = "https://files.pythonhosted.org/packages/cb/b0/f4e224090dc5b0ec15f31a02d746ab24101dd430847c4d99123798661bfc/rpds_py-0.27.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0dc5dceeaefcc96dc192e3a80bbe1d6c410c469e97bdd47494a7d930987f18b2", size = 384126, upload-time = "2025-08-27T12:14:03.437Z" }, - { url = "https://files.pythonhosted.org/packages/54/77/ac339d5f82b6afff1df8f0fe0d2145cc827992cb5f8eeb90fc9f31ef7a63/rpds_py-0.27.1-cp313-cp313t-manylinux_2_31_riscv64.whl", hash = "sha256:d76f9cc8665acdc0c9177043746775aa7babbf479b5520b78ae4002d889f5c21", size = 399486, upload-time = "2025-08-27T12:14:05.443Z" }, - { url = "https://files.pythonhosted.org/packages/d6/29/3e1c255eee6ac358c056a57d6d6869baa00a62fa32eea5ee0632039c50a3/rpds_py-0.27.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:134fae0e36022edad8290a6661edf40c023562964efea0cc0ec7f5d392d2aaef", size = 414832, upload-time = "2025-08-27T12:14:06.902Z" }, - { url = "https://files.pythonhosted.org/packages/3f/db/6d498b844342deb3fa1d030598db93937a9964fcf5cb4da4feb5f17be34b/rpds_py-0.27.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:eb11a4f1b2b63337cfd3b4d110af778a59aae51c81d195768e353d8b52f88081", size = 557249, upload-time = "2025-08-27T12:14:08.37Z" }, - { url = "https://files.pythonhosted.org/packages/60/f3/690dd38e2310b6f68858a331399b4d6dbb9132c3e8ef8b4333b96caf403d/rpds_py-0.27.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:13e608ac9f50a0ed4faec0e90ece76ae33b34c0e8656e3dceb9a7db994c692cd", size = 587356, upload-time = "2025-08-27T12:14:10.034Z" }, - { url = "https://files.pythonhosted.org/packages/86/e3/84507781cccd0145f35b1dc32c72675200c5ce8d5b30f813e49424ef68fc/rpds_py-0.27.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dd2135527aa40f061350c3f8f89da2644de26cd73e4de458e79606384f4f68e7", size = 555300, upload-time = "2025-08-27T12:14:11.783Z" }, - { url = "https://files.pythonhosted.org/packages/e5/ee/375469849e6b429b3516206b4580a79e9ef3eb12920ddbd4492b56eaacbe/rpds_py-0.27.1-cp313-cp313t-win32.whl", hash = "sha256:3020724ade63fe320a972e2ffd93b5623227e684315adce194941167fee02688", size = 216714, upload-time = "2025-08-27T12:14:13.629Z" }, - { url = "https://files.pythonhosted.org/packages/21/87/3fc94e47c9bd0742660e84706c311a860dcae4374cf4a03c477e23ce605a/rpds_py-0.27.1-cp313-cp313t-win_amd64.whl", hash = "sha256:8ee50c3e41739886606388ba3ab3ee2aae9f35fb23f833091833255a31740797", size = 228943, upload-time = "2025-08-27T12:14:14.937Z" }, - { url = "https://files.pythonhosted.org/packages/70/36/b6e6066520a07cf029d385de869729a895917b411e777ab1cde878100a1d/rpds_py-0.27.1-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:acb9aafccaae278f449d9c713b64a9e68662e7799dbd5859e2c6b3c67b56d334", size = 362472, upload-time = "2025-08-27T12:14:16.333Z" }, - { url = "https://files.pythonhosted.org/packages/af/07/b4646032e0dcec0df9c73a3bd52f63bc6c5f9cda992f06bd0e73fe3fbebd/rpds_py-0.27.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:b7fb801aa7f845ddf601c49630deeeccde7ce10065561d92729bfe81bd21fb33", size = 345676, upload-time = "2025-08-27T12:14:17.764Z" }, - { url = "https://files.pythonhosted.org/packages/b0/16/2f1003ee5d0af4bcb13c0cf894957984c32a6751ed7206db2aee7379a55e/rpds_py-0.27.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe0dd05afb46597b9a2e11c351e5e4283c741237e7f617ffb3252780cca9336a", size = 385313, upload-time = "2025-08-27T12:14:19.829Z" }, - { url = "https://files.pythonhosted.org/packages/05/cd/7eb6dd7b232e7f2654d03fa07f1414d7dfc980e82ba71e40a7c46fd95484/rpds_py-0.27.1-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b6dfb0e058adb12d8b1d1b25f686e94ffa65d9995a5157afe99743bf7369d62b", size = 399080, upload-time = "2025-08-27T12:14:21.531Z" }, - { url = "https://files.pythonhosted.org/packages/20/51/5829afd5000ec1cb60f304711f02572d619040aa3ec033d8226817d1e571/rpds_py-0.27.1-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ed090ccd235f6fa8bb5861684567f0a83e04f52dfc2e5c05f2e4b1309fcf85e7", size = 523868, upload-time = "2025-08-27T12:14:23.485Z" }, - { url = "https://files.pythonhosted.org/packages/05/2c/30eebca20d5db95720ab4d2faec1b5e4c1025c473f703738c371241476a2/rpds_py-0.27.1-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bf876e79763eecf3e7356f157540d6a093cef395b65514f17a356f62af6cc136", size = 408750, upload-time = "2025-08-27T12:14:24.924Z" }, - { url = "https://files.pythonhosted.org/packages/90/1a/cdb5083f043597c4d4276eae4e4c70c55ab5accec078da8611f24575a367/rpds_py-0.27.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12ed005216a51b1d6e2b02a7bd31885fe317e45897de81d86dcce7d74618ffff", size = 387688, upload-time = "2025-08-27T12:14:27.537Z" }, - { url = "https://files.pythonhosted.org/packages/7c/92/cf786a15320e173f945d205ab31585cc43969743bb1a48b6888f7a2b0a2d/rpds_py-0.27.1-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:ee4308f409a40e50593c7e3bb8cbe0b4d4c66d1674a316324f0c2f5383b486f9", size = 407225, upload-time = "2025-08-27T12:14:28.981Z" }, - { url = "https://files.pythonhosted.org/packages/33/5c/85ee16df5b65063ef26017bef33096557a4c83fbe56218ac7cd8c235f16d/rpds_py-0.27.1-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0b08d152555acf1f455154d498ca855618c1378ec810646fcd7c76416ac6dc60", size = 423361, upload-time = "2025-08-27T12:14:30.469Z" }, - { url = "https://files.pythonhosted.org/packages/4b/8e/1c2741307fcabd1a334ecf008e92c4f47bb6f848712cf15c923becfe82bb/rpds_py-0.27.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:dce51c828941973a5684d458214d3a36fcd28da3e1875d659388f4f9f12cc33e", size = 562493, upload-time = "2025-08-27T12:14:31.987Z" }, - { url = "https://files.pythonhosted.org/packages/04/03/5159321baae9b2222442a70c1f988cbbd66b9be0675dd3936461269be360/rpds_py-0.27.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:c1476d6f29eb81aa4151c9a31219b03f1f798dc43d8af1250a870735516a1212", size = 592623, upload-time = "2025-08-27T12:14:33.543Z" }, - { url = "https://files.pythonhosted.org/packages/ff/39/c09fd1ad28b85bc1d4554a8710233c9f4cefd03d7717a1b8fbfd171d1167/rpds_py-0.27.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:3ce0cac322b0d69b63c9cdb895ee1b65805ec9ffad37639f291dd79467bee675", size = 558800, upload-time = "2025-08-27T12:14:35.436Z" }, - { url = "https://files.pythonhosted.org/packages/c5/d6/99228e6bbcf4baa764b18258f519a9035131d91b538d4e0e294313462a98/rpds_py-0.27.1-cp314-cp314-win32.whl", hash = "sha256:dfbfac137d2a3d0725758cd141f878bf4329ba25e34979797c89474a89a8a3a3", size = 221943, upload-time = "2025-08-27T12:14:36.898Z" }, - { url = "https://files.pythonhosted.org/packages/be/07/c802bc6b8e95be83b79bdf23d1aa61d68324cb1006e245d6c58e959e314d/rpds_py-0.27.1-cp314-cp314-win_amd64.whl", hash = "sha256:a6e57b0abfe7cc513450fcf529eb486b6e4d3f8aee83e92eb5f1ef848218d456", size = 233739, upload-time = "2025-08-27T12:14:38.386Z" }, - { url = "https://files.pythonhosted.org/packages/c8/89/3e1b1c16d4c2d547c5717377a8df99aee8099ff050f87c45cb4d5fa70891/rpds_py-0.27.1-cp314-cp314-win_arm64.whl", hash = "sha256:faf8d146f3d476abfee026c4ae3bdd9ca14236ae4e4c310cbd1cf75ba33d24a3", size = 223120, upload-time = "2025-08-27T12:14:39.82Z" }, - { url = "https://files.pythonhosted.org/packages/62/7e/dc7931dc2fa4a6e46b2a4fa744a9fe5c548efd70e0ba74f40b39fa4a8c10/rpds_py-0.27.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:ba81d2b56b6d4911ce735aad0a1d4495e808b8ee4dc58715998741a26874e7c2", size = 358944, upload-time = "2025-08-27T12:14:41.199Z" }, - { url = "https://files.pythonhosted.org/packages/e6/22/4af76ac4e9f336bfb1a5f240d18a33c6b2fcaadb7472ac7680576512b49a/rpds_py-0.27.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:84f7d509870098de0e864cad0102711c1e24e9b1a50ee713b65928adb22269e4", size = 342283, upload-time = "2025-08-27T12:14:42.699Z" }, - { url = "https://files.pythonhosted.org/packages/1c/15/2a7c619b3c2272ea9feb9ade67a45c40b3eeb500d503ad4c28c395dc51b4/rpds_py-0.27.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9e960fc78fecd1100539f14132425e1d5fe44ecb9239f8f27f079962021523e", size = 380320, upload-time = "2025-08-27T12:14:44.157Z" }, - { url = "https://files.pythonhosted.org/packages/a2/7d/4c6d243ba4a3057e994bb5bedd01b5c963c12fe38dde707a52acdb3849e7/rpds_py-0.27.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:62f85b665cedab1a503747617393573995dac4600ff51869d69ad2f39eb5e817", size = 391760, upload-time = "2025-08-27T12:14:45.845Z" }, - { url = "https://files.pythonhosted.org/packages/b4/71/b19401a909b83bcd67f90221330bc1ef11bc486fe4e04c24388d28a618ae/rpds_py-0.27.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fed467af29776f6556250c9ed85ea5a4dd121ab56a5f8b206e3e7a4c551e48ec", size = 522476, upload-time = "2025-08-27T12:14:47.364Z" }, - { url = "https://files.pythonhosted.org/packages/e4/44/1a3b9715c0455d2e2f0f6df5ee6d6f5afdc423d0773a8a682ed2b43c566c/rpds_py-0.27.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f2729615f9d430af0ae6b36cf042cb55c0936408d543fb691e1a9e36648fd35a", size = 403418, upload-time = "2025-08-27T12:14:49.991Z" }, - { url = "https://files.pythonhosted.org/packages/1c/4b/fb6c4f14984eb56673bc868a66536f53417ddb13ed44b391998100a06a96/rpds_py-0.27.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1b207d881a9aef7ba753d69c123a35d96ca7cb808056998f6b9e8747321f03b8", size = 384771, upload-time = "2025-08-27T12:14:52.159Z" }, - { url = "https://files.pythonhosted.org/packages/c0/56/d5265d2d28b7420d7b4d4d85cad8ef891760f5135102e60d5c970b976e41/rpds_py-0.27.1-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:639fd5efec029f99b79ae47e5d7e00ad8a773da899b6309f6786ecaf22948c48", size = 400022, upload-time = "2025-08-27T12:14:53.859Z" }, - { url = "https://files.pythonhosted.org/packages/8f/e9/9f5fc70164a569bdd6ed9046486c3568d6926e3a49bdefeeccfb18655875/rpds_py-0.27.1-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fecc80cb2a90e28af8a9b366edacf33d7a91cbfe4c2c4544ea1246e949cfebeb", size = 416787, upload-time = "2025-08-27T12:14:55.673Z" }, - { url = "https://files.pythonhosted.org/packages/d4/64/56dd03430ba491db943a81dcdef115a985aac5f44f565cd39a00c766d45c/rpds_py-0.27.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:42a89282d711711d0a62d6f57d81aa43a1368686c45bc1c46b7f079d55692734", size = 557538, upload-time = "2025-08-27T12:14:57.245Z" }, - { url = "https://files.pythonhosted.org/packages/3f/36/92cc885a3129993b1d963a2a42ecf64e6a8e129d2c7cc980dbeba84e55fb/rpds_py-0.27.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:cf9931f14223de59551ab9d38ed18d92f14f055a5f78c1d8ad6493f735021bbb", size = 588512, upload-time = "2025-08-27T12:14:58.728Z" }, - { url = "https://files.pythonhosted.org/packages/dd/10/6b283707780a81919f71625351182b4f98932ac89a09023cb61865136244/rpds_py-0.27.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f39f58a27cc6e59f432b568ed8429c7e1641324fbe38131de852cd77b2d534b0", size = 555813, upload-time = "2025-08-27T12:15:00.334Z" }, - { url = "https://files.pythonhosted.org/packages/04/2e/30b5ea18c01379da6272a92825dd7e53dc9d15c88a19e97932d35d430ef7/rpds_py-0.27.1-cp314-cp314t-win32.whl", hash = "sha256:d5fa0ee122dc09e23607a28e6d7b150da16c662e66409bbe85230e4c85bb528a", size = 217385, upload-time = "2025-08-27T12:15:01.937Z" }, - { url = "https://files.pythonhosted.org/packages/32/7d/97119da51cb1dd3f2f3c0805f155a3aa4a95fa44fe7d78ae15e69edf4f34/rpds_py-0.27.1-cp314-cp314t-win_amd64.whl", hash = "sha256:6567d2bb951e21232c2f660c24cf3470bb96de56cdcb3f071a83feeaff8a2772", size = 230097, upload-time = "2025-08-27T12:15:03.961Z" }, - { url = "https://files.pythonhosted.org/packages/d5/63/b7cc415c345625d5e62f694ea356c58fb964861409008118f1245f8c3347/rpds_py-0.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7ba22cb9693df986033b91ae1d7a979bc399237d45fccf875b76f62bb9e52ddf", size = 371360, upload-time = "2025-08-27T12:15:29.218Z" }, - { url = "https://files.pythonhosted.org/packages/e5/8c/12e1b24b560cf378b8ffbdb9dc73abd529e1adcfcf82727dfd29c4a7b88d/rpds_py-0.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5b640501be9288c77738b5492b3fd3abc4ba95c50c2e41273c8a1459f08298d3", size = 353933, upload-time = "2025-08-27T12:15:30.837Z" }, - { url = "https://files.pythonhosted.org/packages/9b/85/1bb2210c1f7a1b99e91fea486b9f0f894aa5da3a5ec7097cbad7dec6d40f/rpds_py-0.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb08b65b93e0c6dd70aac7f7890a9c0938d5ec71d5cb32d45cf844fb8ae47636", size = 382962, upload-time = "2025-08-27T12:15:32.348Z" }, - { url = "https://files.pythonhosted.org/packages/cc/c9/a839b9f219cf80ed65f27a7f5ddbb2809c1b85c966020ae2dff490e0b18e/rpds_py-0.27.1-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d7ff07d696a7a38152ebdb8212ca9e5baab56656749f3d6004b34ab726b550b8", size = 394412, upload-time = "2025-08-27T12:15:33.839Z" }, - { url = "https://files.pythonhosted.org/packages/02/2d/b1d7f928b0b1f4fc2e0133e8051d199b01d7384875adc63b6ddadf3de7e5/rpds_py-0.27.1-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fb7c72262deae25366e3b6c0c0ba46007967aea15d1eea746e44ddba8ec58dcc", size = 523972, upload-time = "2025-08-27T12:15:35.377Z" }, - { url = "https://files.pythonhosted.org/packages/a9/af/2cbf56edd2d07716df1aec8a726b3159deb47cb5c27e1e42b71d705a7c2f/rpds_py-0.27.1-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7b002cab05d6339716b03a4a3a2ce26737f6231d7b523f339fa061d53368c9d8", size = 403273, upload-time = "2025-08-27T12:15:37.051Z" }, - { url = "https://files.pythonhosted.org/packages/c0/93/425e32200158d44ff01da5d9612c3b6711fe69f606f06e3895511f17473b/rpds_py-0.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23f6b69d1c26c4704fec01311963a41d7de3ee0570a84ebde4d544e5a1859ffc", size = 385278, upload-time = "2025-08-27T12:15:38.571Z" }, - { url = "https://files.pythonhosted.org/packages/eb/1a/1a04a915ecd0551bfa9e77b7672d1937b4b72a0fc204a17deef76001cfb2/rpds_py-0.27.1-pp310-pypy310_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:530064db9146b247351f2a0250b8f00b289accea4596a033e94be2389977de71", size = 402084, upload-time = "2025-08-27T12:15:40.529Z" }, - { url = "https://files.pythonhosted.org/packages/51/f7/66585c0fe5714368b62951d2513b684e5215beaceab2c6629549ddb15036/rpds_py-0.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7b90b0496570bd6b0321724a330d8b545827c4df2034b6ddfc5f5275f55da2ad", size = 419041, upload-time = "2025-08-27T12:15:42.191Z" }, - { url = "https://files.pythonhosted.org/packages/8e/7e/83a508f6b8e219bba2d4af077c35ba0e0cdd35a751a3be6a7cba5a55ad71/rpds_py-0.27.1-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:879b0e14a2da6a1102a3fc8af580fc1ead37e6d6692a781bd8c83da37429b5ab", size = 560084, upload-time = "2025-08-27T12:15:43.839Z" }, - { url = "https://files.pythonhosted.org/packages/66/66/bb945683b958a1b19eb0fe715594630d0f36396ebdef4d9b89c2fa09aa56/rpds_py-0.27.1-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:0d807710df3b5faa66c731afa162ea29717ab3be17bdc15f90f2d9f183da4059", size = 590115, upload-time = "2025-08-27T12:15:46.647Z" }, - { url = "https://files.pythonhosted.org/packages/12/00/ccfaafaf7db7e7adace915e5c2f2c2410e16402561801e9c7f96683002d3/rpds_py-0.27.1-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:3adc388fc3afb6540aec081fa59e6e0d3908722771aa1e37ffe22b220a436f0b", size = 556561, upload-time = "2025-08-27T12:15:48.219Z" }, - { url = "https://files.pythonhosted.org/packages/e1/b7/92b6ed9aad103bfe1c45df98453dfae40969eef2cb6c6239c58d7e96f1b3/rpds_py-0.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:c796c0c1cc68cb08b0284db4229f5af76168172670c74908fdbd4b7d7f515819", size = 229125, upload-time = "2025-08-27T12:15:49.956Z" }, - { url = "https://files.pythonhosted.org/packages/0c/ed/e1fba02de17f4f76318b834425257c8ea297e415e12c68b4361f63e8ae92/rpds_py-0.27.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:cdfe4bb2f9fe7458b7453ad3c33e726d6d1c7c0a72960bcc23800d77384e42df", size = 371402, upload-time = "2025-08-27T12:15:51.561Z" }, - { url = "https://files.pythonhosted.org/packages/af/7c/e16b959b316048b55585a697e94add55a4ae0d984434d279ea83442e460d/rpds_py-0.27.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:8fabb8fd848a5f75a2324e4a84501ee3a5e3c78d8603f83475441866e60b94a3", size = 354084, upload-time = "2025-08-27T12:15:53.219Z" }, - { url = "https://files.pythonhosted.org/packages/de/c1/ade645f55de76799fdd08682d51ae6724cb46f318573f18be49b1e040428/rpds_py-0.27.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eda8719d598f2f7f3e0f885cba8646644b55a187762bec091fa14a2b819746a9", size = 383090, upload-time = "2025-08-27T12:15:55.158Z" }, - { url = "https://files.pythonhosted.org/packages/1f/27/89070ca9b856e52960da1472efcb6c20ba27cfe902f4f23ed095b9cfc61d/rpds_py-0.27.1-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3c64d07e95606ec402a0a1c511fe003873fa6af630bda59bac77fac8b4318ebc", size = 394519, upload-time = "2025-08-27T12:15:57.238Z" }, - { url = "https://files.pythonhosted.org/packages/b3/28/be120586874ef906aa5aeeae95ae8df4184bc757e5b6bd1c729ccff45ed5/rpds_py-0.27.1-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:93a2ed40de81bcff59aabebb626562d48332f3d028ca2036f1d23cbb52750be4", size = 523817, upload-time = "2025-08-27T12:15:59.237Z" }, - { url = "https://files.pythonhosted.org/packages/a8/ef/70cc197bc11cfcde02a86f36ac1eed15c56667c2ebddbdb76a47e90306da/rpds_py-0.27.1-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:387ce8c44ae94e0ec50532d9cb0edce17311024c9794eb196b90e1058aadeb66", size = 403240, upload-time = "2025-08-27T12:16:00.923Z" }, - { url = "https://files.pythonhosted.org/packages/cf/35/46936cca449f7f518f2f4996e0e8344db4b57e2081e752441154089d2a5f/rpds_py-0.27.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aaf94f812c95b5e60ebaf8bfb1898a7d7cb9c1af5744d4a67fa47796e0465d4e", size = 385194, upload-time = "2025-08-27T12:16:02.802Z" }, - { url = "https://files.pythonhosted.org/packages/e1/62/29c0d3e5125c3270b51415af7cbff1ec587379c84f55a5761cc9efa8cd06/rpds_py-0.27.1-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:4848ca84d6ded9b58e474dfdbad4b8bfb450344c0551ddc8d958bf4b36aa837c", size = 402086, upload-time = "2025-08-27T12:16:04.806Z" }, - { url = "https://files.pythonhosted.org/packages/8f/66/03e1087679227785474466fdd04157fb793b3b76e3fcf01cbf4c693c1949/rpds_py-0.27.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2bde09cbcf2248b73c7c323be49b280180ff39fadcfe04e7b6f54a678d02a7cf", size = 419272, upload-time = "2025-08-27T12:16:06.471Z" }, - { url = "https://files.pythonhosted.org/packages/6a/24/e3e72d265121e00b063aef3e3501e5b2473cf1b23511d56e529531acf01e/rpds_py-0.27.1-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:94c44ee01fd21c9058f124d2d4f0c9dc7634bec93cd4b38eefc385dabe71acbf", size = 560003, upload-time = "2025-08-27T12:16:08.06Z" }, - { url = "https://files.pythonhosted.org/packages/26/ca/f5a344c534214cc2d41118c0699fffbdc2c1bc7046f2a2b9609765ab9c92/rpds_py-0.27.1-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:df8b74962e35c9249425d90144e721eed198e6555a0e22a563d29fe4486b51f6", size = 590482, upload-time = "2025-08-27T12:16:10.137Z" }, - { url = "https://files.pythonhosted.org/packages/ce/08/4349bdd5c64d9d193c360aa9db89adeee6f6682ab8825dca0a3f535f434f/rpds_py-0.27.1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:dc23e6820e3b40847e2f4a7726462ba0cf53089512abe9ee16318c366494c17a", size = 556523, upload-time = "2025-08-27T12:16:12.188Z" }, +version = "2026.9.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/42/68/3bd46b8a5e01d3c2ebdf9c5e9497912e3fe0cde02bac21a7130ca866e403/rpds_py-2026.9.1.tar.gz", hash = "sha256:4793ef7f78268b124b73fa933440f01d258bbae01de9fa53e9080c9ab0425a12", size = 63948, upload-time = "2026-10-04T16:32:36.469Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f5/6d/ddb8dfcf41892ba9c672d27988592c038d30db61708230313831b6780a1b/rpds_py-2026.9.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:2711d29b653b3bce48a63d18b9c6b53274669e6d6c4094dddeb4d9a0e45128b2", size = 344947, upload-time = "2026-10-04T16:28:55.207Z" }, + { url = "https://files.pythonhosted.org/packages/9e/b2/632c3d034961149eff606e3e357547620a9ab37b849ae5815f67838753fd/rpds_py-2026.9.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3231c4c0e521dafa5be0c9f114ee2c2ad46650836f2d72caa86801950c3e7044", size = 346770, upload-time = "2026-10-04T16:28:56.884Z" }, + { url = "https://files.pythonhosted.org/packages/6d/45/4df346410bb873d03ec60c3b891d1fceb8cabde1971d29844bbb625cc296/rpds_py-2026.9.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e01b3c878c8641913e688edd1b3f08658c6783d29cf6b826bd3c0d1ae7a1ffaa", size = 377795, upload-time = "2026-10-04T16:28:58.193Z" }, + { url = "https://files.pythonhosted.org/packages/ba/b8/a70f302207e4f29f873c01a986fcac5def49b9c8224328cef1ad7da6b7a9/rpds_py-2026.9.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3e524c7874ac72884d28e16dd5b8d839fd09e0fe76b020d3fbca23212a7b8c52", size = 383137, upload-time = "2026-10-04T16:28:59.411Z" }, + { url = "https://files.pythonhosted.org/packages/13/e3/3aa28a48a01169d0e20728bf0e5ebbea3ae2774285b40853ae49b3ef332a/rpds_py-2026.9.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:761fdae6728ceb99ab182fad2f0cc1e262f610834dc891aea1d1a2a2e634776f", size = 496789, upload-time = "2026-10-04T16:29:01.011Z" }, + { url = "https://files.pythonhosted.org/packages/3e/a7/414e8d088602d66ad6f47c65bf07fe5090992a8574cdd4571c1a83b647ed/rpds_py-2026.9.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6b723eb406dec5bc9ec516c73ab9c3239a3284e017f7eb89ee2b3258bd504fb7", size = 395929, upload-time = "2026-10-04T16:29:02.465Z" }, + { url = "https://files.pythonhosted.org/packages/2d/5c/aac3b960fd55d37b49f77c0eebbe043eaf36762ebd48e7b46951e59c1c05/rpds_py-2026.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:136a1c3fe4402b7008bc81cb62ee538481795b61a7e83df88dff3b3f02b726ff", size = 375426, upload-time = "2026-10-04T16:29:03.944Z" }, + { url = "https://files.pythonhosted.org/packages/d3/80/77987a41c40be7202a78d9aed4a650bfb05792237cfd3b9e22638d990fe5/rpds_py-2026.9.1-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:839dde845559254f34885267c6878f60d61d5205180226d976fe488d45fa128e", size = 381497, upload-time = "2026-10-04T16:29:05.308Z" }, + { url = "https://files.pythonhosted.org/packages/b8/d0/640b02eb1ecd71a913c1178b6235287b31006266bca9a26862e80e497b54/rpds_py-2026.9.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:56cd8b3f77d7b6812f533b662186a1f28316931166ddc00fb893b1b0db7e9888", size = 405740, upload-time = "2026-10-04T16:29:06.578Z" }, + { url = "https://files.pythonhosted.org/packages/3e/8c/d034195d45d215625a23f2ae85dbbdb86a49a93a51272061c97c80b9d316/rpds_py-2026.9.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:074a4d198bc34d9a8ea425114fc3ded6d11ec01f6a314a8db67454a5152d8834", size = 555850, upload-time = "2026-10-04T16:29:08.115Z" }, + { url = "https://files.pythonhosted.org/packages/de/f8/532f1addfc86207bc3cf23749638bb0d457bce891595012ed8a08d0543b8/rpds_py-2026.9.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:6beb738155fe8ab8091afdfa5a3226b21c2b1593f1e50ebb90eb25b44dbc0391", size = 618661, upload-time = "2026-10-04T16:29:09.554Z" }, + { url = "https://files.pythonhosted.org/packages/50/5b/b0f2c9833a36a5b1f6ac5cb0e635fabacf713266f46ceefba2102da0bf51/rpds_py-2026.9.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:57492a550a1d88d29d003247e5f78dd8cf04a701fac0e4c8db8745a6d2504e0a", size = 583530, upload-time = "2026-10-04T16:29:11.072Z" }, + { url = "https://files.pythonhosted.org/packages/bf/20/464ed4b98d3c8c6a334f3b5e24d3886de04b05658a95fc40a37e0e6e4775/rpds_py-2026.9.1-cp311-cp311-win32.whl", hash = "sha256:d95a354e02393eada6d7351184671aced9d4cce109dabf927cb7aa99624352a1", size = 208125, upload-time = "2026-10-04T16:29:12.408Z" }, + { url = "https://files.pythonhosted.org/packages/df/c9/384a9b62f8cd89c8e3e609b8c9052c140e8c01d807261e0517c904b8bf29/rpds_py-2026.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:ce4d4f52e2a4324396caddbd45a97d8d7be5f42edd25d2355282a9c34f9b2f7f", size = 226045, upload-time = "2026-10-04T16:29:13.751Z" }, + { url = "https://files.pythonhosted.org/packages/4f/3b/0a691f0dcb2301fa9c736346da2d0d4991778373283301c5c12b8f952f3d/rpds_py-2026.9.1-cp311-cp311-win_arm64.whl", hash = "sha256:fdcd198979b4ecffcc1beba366a7fbcf4eb41243691a82fe52ceb0b902f09c12", size = 222636, upload-time = "2026-10-04T16:29:14.989Z" }, + { url = "https://files.pythonhosted.org/packages/5d/34/a828586ea3329fbb50895b50e9cf98ca3d924a9f41a0b26d443bff1b3794/rpds_py-2026.9.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:50906f5aea24b5a865cbd0a589698288631d9f3a54c3a937c83aefa95a0d14af", size = 346822, upload-time = "2026-10-04T16:29:16.258Z" }, + { url = "https://files.pythonhosted.org/packages/90/81/ac6a0d064982251856ce009c9e1dd51a34110b3c055aa7d1aad18b4899a3/rpds_py-2026.9.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e21c1429e205828ea886a2293a4a2c8e01f4c25d9893ca330e97a6cf73f52e7b", size = 341380, upload-time = "2026-10-04T16:29:17.706Z" }, + { url = "https://files.pythonhosted.org/packages/42/ff/bf7d54f362748fd6a49277b9d6531c394074110fedf50ad791ec59133fbb/rpds_py-2026.9.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2693b2728bbcc48d09a981a356954b0c47c53ff25b545856f28a889ea619f69a", size = 373053, upload-time = "2026-10-04T16:29:19.063Z" }, + { url = "https://files.pythonhosted.org/packages/60/de/74b0ccdbbd28687b9b5fdb34c1cabed88352182facaced9d6f5486b8b9ed/rpds_py-2026.9.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8601470267d938bcb7f3ab1a336100af51a4fd5b6ed030ef52461bb3ef5e7e07", size = 377742, upload-time = "2026-10-04T16:29:20.543Z" }, + { url = "https://files.pythonhosted.org/packages/c2/6d/b979775a3057b2a5c26d75ecbff60a20a24ef081db6dd76836fca3f20247/rpds_py-2026.9.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3890a6aa36e6baa53d5258a2a25d3ef8b37ad165a6ab27a892d7c3e3a432cd69", size = 487289, upload-time = "2026-10-04T16:29:21.958Z" }, + { url = "https://files.pythonhosted.org/packages/1d/5d/7c34734ce3ece943d9d6ee0122a74a21bbc75b47acb5b7053c83f6efb1ed/rpds_py-2026.9.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6b5b393eda5ea42cca1c1a6665f2a4882b4fd5d1777e41ce0545a107fb008c9d", size = 390710, upload-time = "2026-10-04T16:29:23.378Z" }, + { url = "https://files.pythonhosted.org/packages/1d/6d/b26eb1e75395925b3a142ed351cbed2ec8212f5c9d937aee3df32c701baa/rpds_py-2026.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:addeda51556dac7c1a2f14cda62db8b621cd12afba3091d03a96c72932387eab", size = 371261, upload-time = "2026-10-04T16:29:25.1Z" }, + { url = "https://files.pythonhosted.org/packages/7c/98/b2fdfe10301a9e27af21e634337fbba7baac0bc17fe44619a17c26bba2cb/rpds_py-2026.9.1-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:d9edf30457d74eebfd76b045535e36f1cd89062566a128a0db2145ca042d787e", size = 376075, upload-time = "2026-10-04T16:29:26.748Z" }, + { url = "https://files.pythonhosted.org/packages/c5/b1/c4b8d954e49c3c69cf8063c0c9e0919c99f3d2cecc46311606a1cbe835dc/rpds_py-2026.9.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:815d26356930846a40c7bc1366e7b1b0320ab8a063e66c11298a208bed0fd237", size = 399358, upload-time = "2026-10-04T16:29:28.282Z" }, + { url = "https://files.pythonhosted.org/packages/b3/59/9559a7293c97dff0cbb293efffbd36644103883ecc27741af8ef90c84ca8/rpds_py-2026.9.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3b5a6f40f0a1486b4b36c888123afc67acdbd9f33235927acf5ff295429a0ba3", size = 550267, upload-time = "2026-10-04T16:29:29.851Z" }, + { url = "https://files.pythonhosted.org/packages/6c/9d/6dc60e49511de4c8b00e74f9c1d43aed4d27f712cdb1ade92f2c199cbf64/rpds_py-2026.9.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b5b8b0753718d258fd454283fbd57e14545d3b40583fa672e27cb4f987626bcc", size = 614018, upload-time = "2026-10-04T16:29:31.54Z" }, + { url = "https://files.pythonhosted.org/packages/fb/bc/92a4ecf27301b886232a413360f6b348a81d55ffef654f2ebda5970ebc3d/rpds_py-2026.9.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:46d80bc76b51a6c24f9944368c28d38b8bcbcea1da4f2f8d3ebc31a67e8c6ec6", size = 578509, upload-time = "2026-10-04T16:29:33.01Z" }, + { url = "https://files.pythonhosted.org/packages/08/53/efb97f2e6589b7ab8394385a73870e0b2ab2a195281c117b21fd6d7d4855/rpds_py-2026.9.1-cp312-cp312-win32.whl", hash = "sha256:befc2d6a953e563f8a7bfd87a42c22ebf8a3e980dcb7b6a4d17b70b0e914e8a3", size = 205401, upload-time = "2026-10-04T16:29:34.451Z" }, + { url = "https://files.pythonhosted.org/packages/1c/84/1700cc748d0eaa747486e4e82882d2575224e6e9a3148df583058850c629/rpds_py-2026.9.1-cp312-cp312-win_amd64.whl", hash = "sha256:5ce8943f79c2210f7abcc28e86367b03b28d95027fd01c46d2472373ae70c86f", size = 222923, upload-time = "2026-10-04T16:29:35.709Z" }, + { url = "https://files.pythonhosted.org/packages/c3/89/0302215373c2f8b4408b0fdfee955368cc378a98ff59508d47a7e0dc2dbf/rpds_py-2026.9.1-cp312-cp312-win_arm64.whl", hash = "sha256:501909f2e4a1e2dee528ef766fe3c469060ebc17e54a8383d404ba07a81a6f02", size = 218415, upload-time = "2026-10-04T16:29:37.263Z" }, + { url = "https://files.pythonhosted.org/packages/83/ea/ee88fd9e756ff93fb6b1182a47ec09504a242620e33ce1d20679efefe841/rpds_py-2026.9.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:a36b70596407634ca82d4b989a3729074a008537a0522e4c8046a67c729103e9", size = 346229, upload-time = "2026-10-04T16:29:38.82Z" }, + { url = "https://files.pythonhosted.org/packages/57/71/a097d6552f837500fc36e6b23d09cfb9890c3cc47531f9ca64e149799615/rpds_py-2026.9.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:eba5d173f7d5708b22a93815017a4611873ed54db9f268077c0dd1ed99cfc858", size = 340514, upload-time = "2026-10-04T16:29:40.405Z" }, + { url = "https://files.pythonhosted.org/packages/bd/b7/497e85768bf4e0d8ddbaa096a4cac31d1509251dee2728a8490aa367e0b5/rpds_py-2026.9.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:457866b85daf5034296666168b84a69e0b2e89dc4f1af102b46f6448a60b9063", size = 372611, upload-time = "2026-10-04T16:29:41.778Z" }, + { url = "https://files.pythonhosted.org/packages/52/4b/74ab4108916250b6e198e0d3af05bc6835eb046315f22f7a0ceb49667c5a/rpds_py-2026.9.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a3a52a3ba86436ab3aef510fbe21512abc2ddd1993005dfe50514bd2284ef025", size = 377712, upload-time = "2026-10-04T16:29:43.242Z" }, + { url = "https://files.pythonhosted.org/packages/0c/8e/067e77d9d7b3cc793c9d909b7e97e7aadbbb1fb094093b6876902cc96d38/rpds_py-2026.9.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d7841166b7fa64c9c56404617ae4341448847482d45933b13135d26c130519e5", size = 488106, upload-time = "2026-10-04T16:29:44.692Z" }, + { url = "https://files.pythonhosted.org/packages/3c/b4/c5aae6c2dde269bf955f6b7d35065c655a57e47750d9668052ad67e74dda/rpds_py-2026.9.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:926bdd3e3b5998ddf70cc64bc8cf57209571f9044542913afb673799fec77dd0", size = 390795, upload-time = "2026-10-04T16:29:46.129Z" }, + { url = "https://files.pythonhosted.org/packages/a0/36/76fab39973ee11e7f9f357c55138197bb01c86f6502cb76487e3b4f42db0/rpds_py-2026.9.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7868b85224291c6cb6759f9b5adb9745f486d226f62b16a614dd5a2a5ab2b35b", size = 370794, upload-time = "2026-10-04T16:29:47.603Z" }, + { url = "https://files.pythonhosted.org/packages/3d/fe/cd2a80e6d7b871937a60e935c5d507aa390d143f4ff3636f640b9733d5df/rpds_py-2026.9.1-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:3cd182d7291d29b92c521a0069d9c01ba6193628a9a105531d11b40a6d731a33", size = 375673, upload-time = "2026-10-04T16:29:49.223Z" }, + { url = "https://files.pythonhosted.org/packages/6c/18/7464a9953724e55a3b3206062fa0ffdeaa519584c6aabf65d3956d94f131/rpds_py-2026.9.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e6ea1cda8d8c688278430e4268a42f5e5da3bdd74578dfadc0820c3f1766ce83", size = 398758, upload-time = "2026-10-04T16:29:50.601Z" }, + { url = "https://files.pythonhosted.org/packages/c0/86/1534b436700fd49ff411063b7c4d7e938adfabf90895b6cf1622d5a7d1f6/rpds_py-2026.9.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5943980471829f6de242a20b109de3111ba6b77e3af0ffc587028ac854b05e6c", size = 550370, upload-time = "2026-10-04T16:29:52.002Z" }, + { url = "https://files.pythonhosted.org/packages/57/1c/e1fa82a8a01e3c5820f3ba98a8b2673f642128eb368fa88871b01dd2c909/rpds_py-2026.9.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:76d3af9732d2dab69f28179b40ba2d87e2f1d5824b4a694780aa787d685e8f36", size = 613106, upload-time = "2026-10-04T16:29:53.655Z" }, + { url = "https://files.pythonhosted.org/packages/29/55/b20b8c4c3dde8755bfcd5b08492a02d0cd2e26929aedf6199ca2a377d42a/rpds_py-2026.9.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:78326f4cb4427a56ba4996c0762b63be45f06b85f086526420d2b3a66e40f84d", size = 578235, upload-time = "2026-10-04T16:29:55.157Z" }, + { url = "https://files.pythonhosted.org/packages/55/42/df3f7bbc3f7ab37a8a9db8d6c2ff2c985422899f1f7926afbf7ec3c0b8b4/rpds_py-2026.9.1-cp313-cp313-win32.whl", hash = "sha256:172e47169583f46ce118cbec68e6795d0da0f4606b488b6434f8276bca0a058c", size = 205293, upload-time = "2026-10-04T16:29:56.669Z" }, + { url = "https://files.pythonhosted.org/packages/31/9c/ba5a9569d719bfdd6ce863df4133ac6a1658cf1b07cc3534c31db729fbbc/rpds_py-2026.9.1-cp313-cp313-win_amd64.whl", hash = "sha256:3e93b2cd69a9830be33e03945cd7cda940a0a8bfcfbff41d6144f0cb0d3d8bd9", size = 222409, upload-time = "2026-10-04T16:29:58.049Z" }, + { url = "https://files.pythonhosted.org/packages/35/72/f28ca566f6c23c35bbf7445f65eb0364577b25a026305995e24f78b83d94/rpds_py-2026.9.1-cp313-cp313-win_arm64.whl", hash = "sha256:d151e148117294133bf8af7eeace085e7e87432db15ab6adf640330298a47f6f", size = 217681, upload-time = "2026-10-04T16:29:59.449Z" }, + { url = "https://files.pythonhosted.org/packages/8a/f2/67b94be1532767803415c1c5a1fd88ea487643d74a673cec1ba140af77bb/rpds_py-2026.9.1-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:c9d1aca01f49170fdcf5c92761b1fafe97f554b721ca4570c5949fff778f0d4b", size = 347178, upload-time = "2026-10-04T16:30:00.865Z" }, + { url = "https://files.pythonhosted.org/packages/04/37/b751de2b59b0197a1d92a5dd491de88e8a5e928c2e6562581974f1e85263/rpds_py-2026.9.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:3f0e9ac28fc067d4d34b88ae43c48e9489455c97fee9633d851f7eeed5a05d35", size = 341878, upload-time = "2026-10-04T16:30:02.564Z" }, + { url = "https://files.pythonhosted.org/packages/72/e2/5873bc4643c250db9e05d48dc0c93763d4aa68bc3b81164cb1af3b45b284/rpds_py-2026.9.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:07deecbfce94c78473018bc7d10b337cc651d12df87a1eb2cb3e4024bc9c33d0", size = 373963, upload-time = "2026-10-04T16:30:04.026Z" }, + { url = "https://files.pythonhosted.org/packages/51/03/5acf7632158247f3f6386ff0af3a1ee48167d575037e8d0920594b76d92b/rpds_py-2026.9.1-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:821b2755db9194409254012f429c56643416fb96ef9be090be82ec8826b7f477", size = 377975, upload-time = "2026-10-04T16:30:05.555Z" }, + { url = "https://files.pythonhosted.org/packages/e6/00/63fda451b8bffa5808fc8bb311ee7c073b340974b09f273c7b2a145d3d62/rpds_py-2026.9.1-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c91c210ae7645626c608400e3519b4a642f837cce09ca830db3beb2e9f274d4", size = 490347, upload-time = "2026-10-04T16:30:07.156Z" }, + { url = "https://files.pythonhosted.org/packages/a1/ae/c093ffd070ba0fb02f76c565d06fecc65ad6e4afdbae78f7031076d3cdac/rpds_py-2026.9.1-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:54ac2158a6f96cfbabff0b2eedaf94b90c5ec7ca8317fcadc61e1c2b2e0ff6ef", size = 392962, upload-time = "2026-10-04T16:30:08.77Z" }, + { url = "https://files.pythonhosted.org/packages/22/9d/d08a1128ab199b2f0cf25bfeb0639bd05119fff4b7c47bec24ef9a8ec23f/rpds_py-2026.9.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eac2f5dbafd585dfe31f86a23ebf0d3ba480a9d49ebc87947267b5608d4ea0cd", size = 371623, upload-time = "2026-10-04T16:30:10.501Z" }, + { url = "https://files.pythonhosted.org/packages/53/c7/4758ddcbb75609414bbccfcb11d612436f9b3ee821bd2f33f0f1604ee648/rpds_py-2026.9.1-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:8aa5dda18d39b6143eb24809d158f9252c88f402749b6f1b62a506cc7d96cc35", size = 376997, upload-time = "2026-10-04T16:30:12.124Z" }, + { url = "https://files.pythonhosted.org/packages/87/e4/947bd7f608ff60faf46dc9d389c3dffd0e3d767d78a0be19978448ef0ce7/rpds_py-2026.9.1-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5c90e7fa02e8f5de0d10c17595c568ada48c5302e749462c0ea1a4c362111a86", size = 400169, upload-time = "2026-10-04T16:30:13.804Z" }, + { url = "https://files.pythonhosted.org/packages/4b/35/fe93e020a0543b5670472c18d7e6af3197c08da571240ce1965c84f85c0f/rpds_py-2026.9.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:e6d198bad4e49dd6732fbd636e2fc5c082f45c8cad0b4acb756b00c82c76072e", size = 551615, upload-time = "2026-10-04T16:30:15.332Z" }, + { url = "https://files.pythonhosted.org/packages/0d/4f/5d2a0136bb03b2a56a39dc6ff92d58a6e3e53a2e17079238b86228882f16/rpds_py-2026.9.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:96beca19ec79de272e8668585380ff9092c47077c1d7a1e098e00bbd921f4785", size = 614655, upload-time = "2026-10-04T16:30:16.92Z" }, + { url = "https://files.pythonhosted.org/packages/09/1c/3f1025aaf70d9bf7272cc41f8b64ee76b48bf01726248138430e16f23b38/rpds_py-2026.9.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:a5cf77eb04f20b720be95265a3e00eb2a14814074255cc27069c551b2db53118", size = 579602, upload-time = "2026-10-04T16:30:18.555Z" }, + { url = "https://files.pythonhosted.org/packages/53/0d/5c72e6204f76610608706da32b6b7e11ef7e10317558a7bb15a122e008dc/rpds_py-2026.9.1-cp314-cp314-win32.whl", hash = "sha256:a03d57b86d2a51d0a66c92177e2be154ad015f357791d306e714569999cdb4cc", size = 206315, upload-time = "2026-10-04T16:30:20.05Z" }, + { url = "https://files.pythonhosted.org/packages/a4/0b/489d48abbcc7d70cf3fbf662d9d22abf1f4650761c0a9ae05260800800d3/rpds_py-2026.9.1-cp314-cp314-win_amd64.whl", hash = "sha256:837c6b305e26fe0f75b15c92cf3b2ba29e0ae19dc40b1c557b026cb426347d0c", size = 222852, upload-time = "2026-10-04T16:30:21.604Z" }, + { url = "https://files.pythonhosted.org/packages/91/16/bbb05a7e6a10cf79ba639be7f799d770ee15f64175cc61d081b218dd402a/rpds_py-2026.9.1-cp314-cp314-win_arm64.whl", hash = "sha256:fce4b85234a0cbad67bf8e6e1201ee815d172c9aebad75f25645bc4d834f8e31", size = 218709, upload-time = "2026-10-04T16:30:23.036Z" }, + { url = "https://files.pythonhosted.org/packages/22/ac/ac507a0a4ec478ca470440a09583db4be5259ba7670aeba0620822f1e57a/rpds_py-2026.9.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:3a72c11530d71abfb66c8d7696a2f86c43e63fca8b948f1a784ac490f4ec688e", size = 349596, upload-time = "2026-10-04T16:30:24.558Z" }, + { url = "https://files.pythonhosted.org/packages/e9/f2/817a46b658d5070f477f722c298ee9a24525b0e4017347964146ef5fdd0e/rpds_py-2026.9.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:068c37bba854ec2fe42f7365c640af11dd9895890ccbf2df5070d0c059bd7f96", size = 343114, upload-time = "2026-10-04T16:30:26.048Z" }, + { url = "https://files.pythonhosted.org/packages/6c/42/6ade976b13ac1b4cb3bf2eb603f1be2fe74df19a29988d4c2b386be59d6f/rpds_py-2026.9.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fca4eb6df565e2a928f1c7dad92d27db8f9df0f449e76423ed5d7e713ed445", size = 374197, upload-time = "2026-10-04T16:30:27.699Z" }, + { url = "https://files.pythonhosted.org/packages/d9/70/77cdf1d3f1a07faabe936016ae623aec7981f73108a8fe7a203ed2e21998/rpds_py-2026.9.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c933c6678c6f116ff8af47a4c6db0868b8ace74af0343016c0ef00f00272ea69", size = 378025, upload-time = "2026-10-04T16:30:29.451Z" }, + { url = "https://files.pythonhosted.org/packages/3f/6b/18a44a3beaa9b7931acb04af7bd9539836477c630a794452d4826d6185d4/rpds_py-2026.9.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:028ad274ea951dac64491b5d1e65712a4aeabfdbdb9fccf797b57bd899b0c495", size = 491969, upload-time = "2026-10-04T16:30:30.995Z" }, + { url = "https://files.pythonhosted.org/packages/73/27/fb39cfd6bddaf741b024f813890374578ff8ac1f1adc473659c048b03b05/rpds_py-2026.9.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:740d0a99cf9de0b17a3943388e9294a59becf75e7c43421f387bd3c7a9901f7c", size = 393905, upload-time = "2026-10-04T16:30:32.628Z" }, + { url = "https://files.pythonhosted.org/packages/ed/71/0fa7bb77b57af0d710273964180d11b503f62b8a5c358eb2d8c3f62feff6/rpds_py-2026.9.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0da298fb372dc192610a4b9ecbc68a0cd8b675bbbd1fc519d01b41cfd658333e", size = 374569, upload-time = "2026-10-04T16:30:34.257Z" }, + { url = "https://files.pythonhosted.org/packages/54/22/f41cfac269af3b449513ef1bc3d7f32fde52abbbd2d01c7e76b47743acd9/rpds_py-2026.9.1-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:eb61be926bb81567c1f48bdc8aa22b9855048dc2efd53871f9f7e6e9a5632346", size = 377482, upload-time = "2026-10-04T16:30:35.997Z" }, + { url = "https://files.pythonhosted.org/packages/b4/fc/312b49006e7f8f9ca5f96647577b8aa6f3df30519c46bd448f5c425af0b2/rpds_py-2026.9.1-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:42e75466f83cd43f6026c81eab74246efb2bdadafb307b85700632d06c68f299", size = 400040, upload-time = "2026-10-04T16:30:37.76Z" }, + { url = "https://files.pythonhosted.org/packages/cf/a6/18cca7a878dc7fa95165a83343fd4d7b65643fd22e54e47340a451121d5c/rpds_py-2026.9.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:617f59cde379b4f648a09797b7f683d04b90a46344cddab85639da5aff0f5531", size = 551849, upload-time = "2026-10-04T16:30:39.443Z" }, + { url = "https://files.pythonhosted.org/packages/e4/6d/1f5685e20f39604691bdc3c05aaa6b8bd2f954e9e996477adf2376768e33/rpds_py-2026.9.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:3edae8c5ddfdb6985d49ae9d150516e5076888879022f91a26c2de9276ce0bdb", size = 614842, upload-time = "2026-10-04T16:30:41.231Z" }, + { url = "https://files.pythonhosted.org/packages/c6/25/98652109fd9f7e10268dd4571aa52b81987001b806f37ef1a18260de714a/rpds_py-2026.9.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0f045bb053c9057720d72c56dffe30dffdc05997b2897a827b9325f0ab6623fa", size = 582606, upload-time = "2026-10-04T16:30:43.345Z" }, + { url = "https://files.pythonhosted.org/packages/19/03/11ca09099bab5f53373a80a334c424ec917c13d050760a59499d2af5171e/rpds_py-2026.9.1-cp314-cp314t-win32.whl", hash = "sha256:bf35d0568abda97233239ce32896d3ad53fccc537832c104e30c94aa5fb93569", size = 203341, upload-time = "2026-10-04T16:30:44.954Z" }, + { url = "https://files.pythonhosted.org/packages/6f/8a/88909e3ffd9f47f5b58211473875d8c3c09079f0058c46fb72c55a702a26/rpds_py-2026.9.1-cp314-cp314t-win_amd64.whl", hash = "sha256:1e8d4d79d828299bf44a55db22a9388ab967b49d17132c88eab0f4360b48da8e", size = 222843, upload-time = "2026-10-04T16:30:46.486Z" }, + { url = "https://files.pythonhosted.org/packages/f6/b7/a662f367d4896dd0a10cef2fc91f10b7f08af1c10858e287e019563f338d/rpds_py-2026.9.1-cp315-cp315-macosx_10_12_x86_64.whl", hash = "sha256:1d77b649e6f7cdf12ca5c2a98dad0ad37f9ea9b6f960408a92f0cb12bb3d04d9", size = 347463, upload-time = "2026-10-04T16:30:48.203Z" }, + { url = "https://files.pythonhosted.org/packages/ae/3f/ad45d03df4f84ebae5439577ee81f3999d182711e82235c8037b6528890e/rpds_py-2026.9.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:00ba2d8c7dd4ee537978ddf4b3fbd712bef2d8751603f7f3146b3f4287768e25", size = 342051, upload-time = "2026-10-04T16:30:49.872Z" }, + { url = "https://files.pythonhosted.org/packages/7e/31/3dcd68c13d4bcc59c1f7eb33ac8e80698f06f3eb0d8a1e06419836071c20/rpds_py-2026.9.1-cp315-cp315-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec450527cbf485e13c8d3602a54f428ab0432fdade0ede75efd74b735421c871", size = 374143, upload-time = "2026-10-04T16:30:51.508Z" }, + { url = "https://files.pythonhosted.org/packages/cf/0d/68c1f058a250fbd1380ebda9fc227cbf50117adf8ffe8161ef383ea79f68/rpds_py-2026.9.1-cp315-cp315-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:306ee1850d8105b5baf977e78d45fcadd12c1a54678d614c9baf217708446e91", size = 378604, upload-time = "2026-10-04T16:30:53.206Z" }, + { url = "https://files.pythonhosted.org/packages/d7/d6/2d4c59b85397cb4800594fadf692688ccf5ce556adc930e7a5bf21061a5e/rpds_py-2026.9.1-cp315-cp315-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ef6b65b03247c54692ad4fd9ee97cb772781927db72e3cb05e70b3db6d1ff14f", size = 490790, upload-time = "2026-10-04T16:30:54.925Z" }, + { url = "https://files.pythonhosted.org/packages/da/04/7e05dc3aebaf52f4e026766bd668fdd09a9d0e23f64a14686b36b3501892/rpds_py-2026.9.1-cp315-cp315-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a575404ebc9cf2e91edd32eaf570ec1430eb900d4f56724ba7dd4bc1fc9c176d", size = 393146, upload-time = "2026-10-04T16:30:56.625Z" }, + { url = "https://files.pythonhosted.org/packages/57/ca/e2e9a0a46a74ed51a0498ba1fe10f4ea6b2d9a155f372a2f91e51f18cf10/rpds_py-2026.9.1-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c16ab111bc27c646ba8aa005d0527754edc538ebb636f0b1bf8e244b48d1945", size = 372022, upload-time = "2026-10-04T16:30:58.295Z" }, + { url = "https://files.pythonhosted.org/packages/ba/cb/8f8774df5134e23424372838bcc5c7ed4127d723e1ff52f7bebd4dcb2563/rpds_py-2026.9.1-cp315-cp315-manylinux_2_31_riscv64.whl", hash = "sha256:7664419f27db41d4f1c43a78dccda7dd6e8ef2428df3ee01d0c2a07a6b071297", size = 377092, upload-time = "2026-10-04T16:30:59.984Z" }, + { url = "https://files.pythonhosted.org/packages/90/02/8d7095d73bf9114219be40230baa5df00611e0a82ed9517779ff9c19f82b/rpds_py-2026.9.1-cp315-cp315-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4b26b03d9d2658ee2fa234f8f4f19f38a09773fe5261028025032e26d4d35af0", size = 400830, upload-time = "2026-10-04T16:31:01.721Z" }, + { url = "https://files.pythonhosted.org/packages/ec/02/8206856f8f363cd042a8315dc86b3912f5dcb6d3c66bbb24b69c2bfb0775/rpds_py-2026.9.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:be3e47e2d91aa3942ff9bf4077a505226005abfc39b6f7554a91c1b9393986b9", size = 551478, upload-time = "2026-10-04T16:31:03.472Z" }, + { url = "https://files.pythonhosted.org/packages/41/6b/36211f1bb1f0b0313f496d92f5905b74ea107f27cb16fa3355a82f04575e/rpds_py-2026.9.1-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:6307a0da524939decb8ca4a3933b8ab62525794411d6984fca6726e732804af6", size = 615173, upload-time = "2026-10-04T16:31:05.281Z" }, + { url = "https://files.pythonhosted.org/packages/35/77/cda0c4a6f055446b692f0ed5692f73707cafd3dff82672ede31b1a9b59de/rpds_py-2026.9.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:159a7aab5c5e8b112c8830f54717ce56da1252ebdbb526f5be2df2309280b9e7", size = 579653, upload-time = "2026-10-04T16:31:07.065Z" }, + { url = "https://files.pythonhosted.org/packages/74/ec/d8385f446240aed643b9e92a5055cff3015cc04a13c61f73b2883c478ed5/rpds_py-2026.9.1-cp315-cp315-win32.whl", hash = "sha256:dbc2673f9223d420c91145599b3ba45a8a50c207d1976908e5fb5ddb0c9b9429", size = 206498, upload-time = "2026-10-04T16:31:08.989Z" }, + { url = "https://files.pythonhosted.org/packages/6d/a5/71b5cd00e0521e3b6b81828baea368c62b6b700ebdd9554cd7d41ddf12fa/rpds_py-2026.9.1-cp315-cp315-win_amd64.whl", hash = "sha256:75c38c50ab9aca840225d9a9a3810bf11d04bd5c1f186cabbb8aee56db3e9b15", size = 223121, upload-time = "2026-10-04T16:31:10.84Z" }, + { url = "https://files.pythonhosted.org/packages/33/58/dba857c3bc8221b31b62eb170a3080f4f191de79f047200389b7ed1b06a7/rpds_py-2026.9.1-cp315-cp315-win_arm64.whl", hash = "sha256:a431156bb41865fc14cd5d79bb9d7bbed83110b0159e34e62ae30951f96c0009", size = 218741, upload-time = "2026-10-04T16:31:12.592Z" }, + { url = "https://files.pythonhosted.org/packages/5b/d0/320ab28ccc1415eeb509d68682b0014fb74690cd49f1c2d29a232475af50/rpds_py-2026.9.1-cp315-cp315t-macosx_10_12_x86_64.whl", hash = "sha256:ef0d8c843e2827d6c120ab4687e9423fb1d893db1df27b7c1506615bcb9734a0", size = 349719, upload-time = "2026-10-04T16:31:14.48Z" }, + { url = "https://files.pythonhosted.org/packages/56/88/f5b12f1358f443c08b7ce3cc8391d82d335f4872580e2e097847fd36087a/rpds_py-2026.9.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:45bc6bccf78b20fd834237d18db64965d7ee68ba7f60440a26c7ab71e7b8d51a", size = 343267, upload-time = "2026-10-04T16:31:16.827Z" }, + { url = "https://files.pythonhosted.org/packages/f7/0c/c765b0059d532acb3b9c45d781ccc22f15a96dbe443d00903f643ba9df10/rpds_py-2026.9.1-cp315-cp315t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d55198263bb51f557550c6ed2e6d1cb6a6fed6eb5c9120b741c5926bef8a45d", size = 374555, upload-time = "2026-10-04T16:31:18.931Z" }, + { url = "https://files.pythonhosted.org/packages/6b/8a/cafddfda77564a10cd21184640c3bffda6a2b8d20972fb5dedd5e0166328/rpds_py-2026.9.1-cp315-cp315t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a8763f20692da7df39b0afdd1ba3042b004c50a45994f76c2d9a25641f7673db", size = 378346, upload-time = "2026-10-04T16:31:20.75Z" }, + { url = "https://files.pythonhosted.org/packages/b9/01/5e626016eff72c183bf6c96539240cace15d402468647a453ec08415b2fc/rpds_py-2026.9.1-cp315-cp315t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e43d4a1f673e8a1cbd8533e809e02b4bf9d4f2280269bb640436556312121250", size = 492373, upload-time = "2026-10-04T16:31:22.614Z" }, + { url = "https://files.pythonhosted.org/packages/3b/9c/15a2469e9389242f46896b3f0a01d68caea8a5a35c011fcb05ef333aae73/rpds_py-2026.9.1-cp315-cp315t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ea394a937f17a54c51239348bdbe2e3518124c8d4a8951ba04a311d3095bd18f", size = 394371, upload-time = "2026-10-04T16:31:24.768Z" }, + { url = "https://files.pythonhosted.org/packages/63/f5/c100ff77e1e6366e947c75969c258fdfc4b7bc5bbfe7351e62ffbf2a1228/rpds_py-2026.9.1-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdeaa99ce822dca76cfb1b993e9120c5ea212f2eb66d48950ad63c349668a018", size = 375132, upload-time = "2026-10-04T16:31:26.588Z" }, + { url = "https://files.pythonhosted.org/packages/dd/f4/fe0269c9de253e99c81cabc12b8971a5feaa083debdaff1221e06264d9e3/rpds_py-2026.9.1-cp315-cp315t-manylinux_2_31_riscv64.whl", hash = "sha256:b4f062343e7ad3fa94f2c66e5ae667dee47ee74dd41a9057c4fbe163236a123d", size = 377642, upload-time = "2026-10-04T16:31:28.677Z" }, + { url = "https://files.pythonhosted.org/packages/05/65/b34a7b257baccff8f4a24a722933166d4941d5ebdc9c3f4bc4ffcd5ce4f4/rpds_py-2026.9.1-cp315-cp315t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:22ffd29a63d71fb1b81552c21f2c2b734949b7ac751a9be70675a939a900839b", size = 400855, upload-time = "2026-10-04T16:31:30.802Z" }, + { url = "https://files.pythonhosted.org/packages/98/32/844e54176b6071b90b38a564e6940bc6eb8f97b2890dc709c19db9dec0f4/rpds_py-2026.9.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:08dae4a4095150a7c4545a1fb40b98e1ab1744fbc2770d92c977b9dadaa49ab6", size = 552573, upload-time = "2026-10-04T16:31:32.709Z" }, + { url = "https://files.pythonhosted.org/packages/17/73/6041d20729dffbfdf155c02d65be58bc225a1c1fb548fd87c23ef306138f/rpds_py-2026.9.1-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:9a0460d43603d1fd9ef59c30278531e15d78581721ddb538fa560aa7817ea4ad", size = 615840, upload-time = "2026-10-04T16:31:34.565Z" }, + { url = "https://files.pythonhosted.org/packages/af/9e/418094adaee6b056ce199051b255448ed872829051e341b2294c80da0977/rpds_py-2026.9.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:1c2d1f6da5128eabf34e963d7163a818846075a52568250d006c4c953b40f903", size = 582764, upload-time = "2026-10-04T16:31:36.665Z" }, + { url = "https://files.pythonhosted.org/packages/3d/9b/1698ebf6b840ddfe8b472198abbed6ace35c6e398faeecd6c47dae742a4e/rpds_py-2026.9.1-cp315-cp315t-win32.whl", hash = "sha256:5c6ee90dee3e85e055ddfd502d611643d9b0fd94c818220bda84ec3dacd9b27b", size = 203795, upload-time = "2026-10-04T16:31:38.53Z" }, + { url = "https://files.pythonhosted.org/packages/8a/e2/91f70d804c61f8eac39a417e82aa1024f655ab9e8bdd7393b196242bc41b/rpds_py-2026.9.1-cp315-cp315t-win_amd64.whl", hash = "sha256:fe5ad0664ec772b02c45859041aa17655709cced7a31005817fbbbd988c25567", size = 223037, upload-time = "2026-10-04T16:31:40.468Z" }, + { url = "https://files.pythonhosted.org/packages/f3/ad/f0eba548e297987964ef8088403db875b333963bf8189f3f563b6936b20e/rpds_py-2026.9.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c0d2cb595a420b34d5086db0add011e26e2c09d6a024afbac4228bf8f863a30", size = 384112, upload-time = "2026-10-04T16:31:42.643Z" }, + { url = "https://files.pythonhosted.org/packages/33/89/891fa4d81f1eae7fe262ecd0aba2c51de94a116c7f3ccfb034fa75f4c537/rpds_py-2026.9.1-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f3d6ed6a98cfd19155996605474982cc470d7601746a6439078f1a5a3fa8b050", size = 389662, upload-time = "2026-10-04T16:31:44.642Z" }, + { url = "https://files.pythonhosted.org/packages/4f/46/912cf623b2263f9c9c2d04e8508fc38dbe89983faeba5fb36ca4558ae550/rpds_py-2026.9.1-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8171b44a054e5c67fd748ada04187f1250bf35b95f85e52ab64bcf3331a923bb", size = 504637, upload-time = "2026-10-04T16:31:46.667Z" }, + { url = "https://files.pythonhosted.org/packages/9b/5c/7f3cfa7c5f01765c9f47c8398210ed0c1eb686c0e99c223cb1c6776d3fb9/rpds_py-2026.9.1-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fda1d96e542c37b6c804547dbf489c129fe7c97183a76a5ec275909ba1a063df", size = 402607, upload-time = "2026-10-04T16:31:49.068Z" }, + { url = "https://files.pythonhosted.org/packages/f0/76/2e915d4115ee453c33e6af17bc1df7e22ddc52974e178eeeb92a78c09983/rpds_py-2026.9.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:270bdcdaac5d5b6f73c5e22e7e135c7f2a50e789f71d9e241d5be8d90026e19a", size = 382762, upload-time = "2026-10-04T16:31:51.24Z" }, + { url = "https://files.pythonhosted.org/packages/0d/e5/844382925d7b84a4074ad79fc2b9d05eb6231ea243b34f247e68e519b606/rpds_py-2026.9.1-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:84a6ecc0c940169190d2c23bd969debd48c94dbc855acd60188a68d71d421608", size = 389563, upload-time = "2026-10-04T16:31:53.549Z" }, + { url = "https://files.pythonhosted.org/packages/81/82/d6e3951602dc2e24790ef9d299aa24bf5e2493df5043f2c6da00480cc447/rpds_py-2026.9.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ab4b2fda7c2b542f7f9d886cc6a838c5079d2b76f72e6081411faba11adde2c9", size = 416842, upload-time = "2026-10-04T16:31:55.76Z" }, + { url = "https://files.pythonhosted.org/packages/ea/1c/8d248e4ea671d525ab7daa0703ad81cc2175076fa0ccd7ef088facbd2b01/rpds_py-2026.9.1-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:44b32a7c4f0da3d28af31c259e38ddcff096f855e205ed0671d02fcf44f1ea1c", size = 562434, upload-time = "2026-10-04T16:31:57.874Z" }, + { url = "https://files.pythonhosted.org/packages/ad/38/e7ac0db898120d15dea25e3661b1242a40cb3b23d1f4db86c15a01fe0ba1/rpds_py-2026.9.1-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:a3dbc5ed9514908d5046107d7b1346bde71eea61de6e0e4919c19354f97e769f", size = 627909, upload-time = "2026-10-04T16:31:59.977Z" }, + { url = "https://files.pythonhosted.org/packages/03/c8/37e555514932cb1ee36c75349187aa882a98dee5d5654c761699ed8a0d27/rpds_py-2026.9.1-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:6eae33003518fd4cb4f83a218d5371469dd3001aa3b87128c005b07762f7fe5e", size = 593658, upload-time = "2026-10-04T16:32:02.14Z" }, + { url = "https://files.pythonhosted.org/packages/12/5c/5f69a91add94a8a33acea68a2b034a464946a654ff7296af9d957ef0d6a5/rpds_py-2026.9.1-pp311-pypy311_pp80-macosx_10_12_x86_64.whl", hash = "sha256:0483515261947e4e8b8e1375bf7463e7eb6ccfb3d86e7b554d90cd5285f20f32", size = 351769, upload-time = "2026-10-04T16:32:04.675Z" }, + { url = "https://files.pythonhosted.org/packages/41/22/35ea8bf3b2682b90ab687c74e4828418ff12298a5b0b0a0c033f61c86a30/rpds_py-2026.9.1-pp311-pypy311_pp80-macosx_11_0_arm64.whl", hash = "sha256:4cfaf02209061880210819934de2f4f6aa83dc04dafe6770276acc240a56da31", size = 351719, upload-time = "2026-10-04T16:32:06.834Z" }, + { url = "https://files.pythonhosted.org/packages/a3/90/a9ba81408369d34c1aca73319c15adc91ed45c1d21e9e8ee4832ffb7fe0b/rpds_py-2026.9.1-pp312-pypy312_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6cdc537c8633d7fd92a82e2e0d2ab74320a3f63d5e59fb9cf08711e08fe151c4", size = 381109, upload-time = "2026-10-04T16:32:08.994Z" }, + { url = "https://files.pythonhosted.org/packages/b3/44/5192a0bed94cec86bd2a5e1cc5a1bb8f7eec3aec907eacd2deb13e87e326/rpds_py-2026.9.1-pp312-pypy312_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:10e208f2425d973938afcd56e28a7c4be32e27b6a60b5d381f49fb9d8acf9759", size = 388222, upload-time = "2026-10-04T16:32:11.321Z" }, + { url = "https://files.pythonhosted.org/packages/92/cd/5356549711448f18b52f7a11ffbe90f1228774996fbf3c6cd1b18d22abaf/rpds_py-2026.9.1-pp312-pypy312_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6c0dbbcc19735fe5f8b0a54c07659d154a9e69f47e15d0a6ab7299215daf62cb", size = 500384, upload-time = "2026-10-04T16:32:13.478Z" }, + { url = "https://files.pythonhosted.org/packages/7a/88/ddda9d28adfe33119c75b2e733d4ba7e326f41d7e1b1093951771768ca48/rpds_py-2026.9.1-pp312-pypy312_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:684fd492fff4fead00587544e059be2bbcb6f93454f21fa2a91b66fc7508be82", size = 401661, upload-time = "2026-10-04T16:32:15.653Z" }, + { url = "https://files.pythonhosted.org/packages/32/c3/bb59ba16a6b4a57995d15b8c04c00f28df3b938c4dcdde48fbe0f73edb0c/rpds_py-2026.9.1-pp312-pypy312_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1028417bb44037eb3069c1009bd7b7277212876cda22fbe565b0bca9fab6d2c", size = 380748, upload-time = "2026-10-04T16:32:17.727Z" }, + { url = "https://files.pythonhosted.org/packages/f5/b8/0580faa1c5a32ddc160130dd7ae54d2d007272a89a40a6b5db3e50f9f585/rpds_py-2026.9.1-pp312-pypy312_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:492e5e428cbe126221611f47e068f01660352feec4ad18bc0f5ea9b2ae88fb14", size = 385731, upload-time = "2026-10-04T16:32:19.855Z" }, + { url = "https://files.pythonhosted.org/packages/bf/70/f73564642bbe3322c7eeef2c2f258cf040b71c41a430b532e59d04a1b838/rpds_py-2026.9.1-pp312-pypy312_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:88b5268892fde430d5531f95bc560b6efbbd67c929662c586afd729a96e7461c", size = 412131, upload-time = "2026-10-04T16:32:22.285Z" }, + { url = "https://files.pythonhosted.org/packages/8c/5d/17fff2e1f8f68721a2afb5cb48f7e442c751bb6b4883157c5abaf618cd08/rpds_py-2026.9.1-pp312-pypy312_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:01445c8d194aa032a08e944f16567672da1c62dbdbefd8b6d0693032e290cf68", size = 558193, upload-time = "2026-10-04T16:32:24.4Z" }, + { url = "https://files.pythonhosted.org/packages/2a/d0/869ab6fb08531f97aae4a780b4d61b4190d8aef48fe054ee28bcf7114466/rpds_py-2026.9.1-pp312-pypy312_pp73-musllinux_1_2_i686.whl", hash = "sha256:eef6a03b0b6d08d0835ccfa8ec8d1bc70525e3801387567137b50c557695e6da", size = 622448, upload-time = "2026-10-04T16:32:26.844Z" }, + { url = "https://files.pythonhosted.org/packages/ba/a5/9672e532fe02cd3b92c78cfd8743abca939d96853006c63835009a1ecb6f/rpds_py-2026.9.1-pp312-pypy312_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:6b9bf3135b4ad5981df9a73d71a35272d650a2985ae9c2746357b24d59de2448", size = 591126, upload-time = "2026-10-04T16:32:29.274Z" }, + { url = "https://files.pythonhosted.org/packages/80/ef/3a9f8e4279c7920af561deed4cb7ebebed2794a8f608cf404d5eef14a105/rpds_py-2026.9.1-pp312-pypy312_pp80-macosx_10_12_x86_64.whl", hash = "sha256:56c6952a9b15047466d0c2347c446a761d4527f89976156341e68f0ce5cc08b0", size = 357108, upload-time = "2026-10-04T16:32:31.641Z" }, + { url = "https://files.pythonhosted.org/packages/b7/55/4b2fa381a583760aea5c92841e4e928a358e1c6511b129219e9c2826a226/rpds_py-2026.9.1-pp312-pypy312_pp80-macosx_11_0_arm64.whl", hash = "sha256:b242c27c8f836305a4a72df9cdd564386ac57b807bd252a063223331c9316b37", size = 346877, upload-time = "2026-10-04T16:32:34.061Z" }, ] [[package]] name = "ruff" -version = "0.5.7" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/bf/2b/69e5e412f9d390adbdbcbf4f64d6914fa61b44b08839a6584655014fc524/ruff-0.5.7.tar.gz", hash = "sha256:8dfc0a458797f5d9fb622dd0efc52d796f23f0a1493a9527f4e49a550ae9a7e5", size = 2449817, upload-time = "2024-08-08T15:43:07.467Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/6b/eb/06e06aaf96af30a68e83b357b037008c54a2ddcbad4f989535007c700394/ruff-0.5.7-py3-none-linux_armv6l.whl", hash = "sha256:548992d342fc404ee2e15a242cdbea4f8e39a52f2e7752d0e4cbe88d2d2f416a", size = 9570571, upload-time = "2024-08-08T15:41:56.537Z" }, - { url = "https://files.pythonhosted.org/packages/a4/10/1be32aeaab8728f78f673e7a47dd813222364479b2d6573dbcf0085e83ea/ruff-0.5.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:00cc8872331055ee017c4f1071a8a31ca0809ccc0657da1d154a1d2abac5c0be", size = 8685138, upload-time = "2024-08-08T15:42:02.833Z" }, - { url = "https://files.pythonhosted.org/packages/3d/1d/c218ce83beb4394ba04d05e9aa2ae6ce9fba8405688fe878b0fdb40ce855/ruff-0.5.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:eaf3d86a1fdac1aec8a3417a63587d93f906c678bb9ed0b796da7b59c1114a1e", size = 8266785, upload-time = "2024-08-08T15:42:08.321Z" }, - { url = "https://files.pythonhosted.org/packages/26/79/7f49509bd844476235b40425756def366b227a9714191c91f02fb2178635/ruff-0.5.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a01c34400097b06cf8a6e61b35d6d456d5bd1ae6961542de18ec81eaf33b4cb8", size = 9983964, upload-time = "2024-08-08T15:42:12.419Z" }, - { url = "https://files.pythonhosted.org/packages/bf/b1/939836b70bf9fcd5e5cd3ea67fdb8abb9eac7631351d32f26544034a35e4/ruff-0.5.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fcc8054f1a717e2213500edaddcf1dbb0abad40d98e1bd9d0ad364f75c763eea", size = 9359490, upload-time = "2024-08-08T15:42:16.713Z" }, - { url = "https://files.pythonhosted.org/packages/32/7d/b3db19207de105daad0c8b704b2c6f2a011f9c07017bd58d8d6e7b8eba19/ruff-0.5.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f70284e73f36558ef51602254451e50dd6cc479f8b6f8413a95fcb5db4a55fc", size = 10170833, upload-time = "2024-08-08T15:42:20.54Z" }, - { url = "https://files.pythonhosted.org/packages/a2/45/eae9da55f3357a1ac04220230b8b07800bf516e6dd7e1ad20a2ff3b03b1b/ruff-0.5.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:a78ad870ae3c460394fc95437d43deb5c04b5c29297815a2a1de028903f19692", size = 10896360, upload-time = "2024-08-08T15:42:25.2Z" }, - { url = "https://files.pythonhosted.org/packages/99/67/4388b36d145675f4c51ebec561fcd4298a0e2550c81e629116f83ce45a39/ruff-0.5.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9ccd078c66a8e419475174bfe60a69adb36ce04f8d4e91b006f1329d5cd44bcf", size = 10477094, upload-time = "2024-08-08T15:42:29.553Z" }, - { url = "https://files.pythonhosted.org/packages/e1/9c/f5e6ed1751dc187a4ecf19a4970dd30a521c0ee66b7941c16e292a4043fb/ruff-0.5.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7e31c9bad4ebf8fdb77b59cae75814440731060a09a0e0077d559a556453acbb", size = 11480896, upload-time = "2024-08-08T15:42:33.772Z" }, - { url = "https://files.pythonhosted.org/packages/c8/3b/2b683be597bbd02046678fc3fc1c199c641512b20212073b58f173822bb3/ruff-0.5.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d796327eed8e168164346b769dd9a27a70e0298d667b4ecee6877ce8095ec8e", size = 10179702, upload-time = "2024-08-08T15:42:38.038Z" }, - { url = "https://files.pythonhosted.org/packages/f1/38/c2d94054dc4b3d1ea4c2ba3439b2a7095f08d1c8184bc41e6abe2a688be7/ruff-0.5.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a09ea2c3f7778cc635e7f6edf57d566a8ee8f485f3c4454db7771efb692c499", size = 9982855, upload-time = "2024-08-08T15:42:42.031Z" }, - { url = "https://files.pythonhosted.org/packages/7d/e7/1433db2da505ffa8912dcf5b28a8743012ee780cbc20ad0bf114787385d9/ruff-0.5.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a36d8dcf55b3a3bc353270d544fb170d75d2dff41eba5df57b4e0b67a95bb64e", size = 9433156, upload-time = "2024-08-08T15:42:45.339Z" }, - { url = "https://files.pythonhosted.org/packages/e0/36/4fa43250e67741edeea3d366f59a1dc993d4d89ad493a36cbaa9889895f2/ruff-0.5.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9369c218f789eefbd1b8d82a8cf25017b523ac47d96b2f531eba73770971c9e5", size = 9782971, upload-time = "2024-08-08T15:42:49.354Z" }, - { url = "https://files.pythonhosted.org/packages/80/0e/8c276103d518e5cf9202f70630aaa494abf6fc71c04d87c08b6d3cd07a4b/ruff-0.5.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b88ca3db7eb377eb24fb7c82840546fb7acef75af4a74bd36e9ceb37a890257e", size = 10247775, upload-time = "2024-08-08T15:42:53.294Z" }, - { url = "https://files.pythonhosted.org/packages/cb/b9/673096d61276f39291b729dddde23c831a5833d98048349835782688a0ec/ruff-0.5.7-py3-none-win32.whl", hash = "sha256:33d61fc0e902198a3e55719f4be6b375b28f860b09c281e4bdbf783c0566576a", size = 7841772, upload-time = "2024-08-08T15:42:57.488Z" }, - { url = "https://files.pythonhosted.org/packages/67/1c/4520c98bfc06b9c73cd1457686d4d3935d40046b1ddea08403e5a6deff51/ruff-0.5.7-py3-none-win_amd64.whl", hash = "sha256:083bbcbe6fadb93cd86709037acc510f86eed5a314203079df174c40bbbca6b3", size = 8699779, upload-time = "2024-08-08T15:43:00.429Z" }, - { url = "https://files.pythonhosted.org/packages/38/23/b3763a237d2523d40a31fe2d1a301191fe392dd48d3014977d079cf8c0bd/ruff-0.5.7-py3-none-win_arm64.whl", hash = "sha256:2dca26154ff9571995107221d0aeaad0e75a77b5a682d6236cf89a58c70b76f4", size = 8091891, upload-time = "2024-08-08T15:43:04.162Z" }, +version = "0.15.22" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3a/06/ae069393fc66e8ff33036d4b368003833bf6e88ccf182e17e7a2f1c754fd/ruff-0.15.22.tar.gz", hash = "sha256:3f15175b1fb580126f58285a5dae6b2ea89000136d980c64499211f116b54809", size = 4785063, upload-time = "2026-07-16T15:14:13.244Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/23/18/ee54b7ae1e121be7a28ea6da4b67564ebb0530e183a54415ab7e3bcd2c4e/ruff-0.15.22-py3-none-linux_armv6l.whl", hash = "sha256:44423e73493737f5e7c5b41d475483898ff37afcdae38bc3da5085e29af1c2d8", size = 10781258, upload-time = "2026-07-16T15:13:19.452Z" }, + { url = "https://files.pythonhosted.org/packages/2f/d2/2520cb14761ddbeaf57642a76942fc36adcbdbe53b4532241995f6fc485c/ruff-0.15.22-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b82c6482946e9eda7ff2e091d25b8bad3f718684e1916d41bd56873cee05b697", size = 10999477, upload-time = "2026-07-16T15:13:23.318Z" }, + { url = "https://files.pythonhosted.org/packages/c9/10/74e53572aa758dfaa678c2a2646b5c5515d884b7ca56be4d2ce03ca4b560/ruff-0.15.22-py3-none-macosx_11_0_arm64.whl", hash = "sha256:11c1c715af53a09f714e011106bffc419751ec8232fcb5da42173284ea3fec6f", size = 10466716, upload-time = "2026-07-16T15:13:26.162Z" }, + { url = "https://files.pythonhosted.org/packages/1e/cc/44eaaf0844e028182f2d0a8f2190d0f359159aed0a9e5ab861d892f1ae2a/ruff-0.15.22-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:742a29cf29bddb7c8327895d6a10e0e6c5b38a96dd407af9b5d0857f809c0576", size = 10892644, upload-time = "2026-07-16T15:13:29.229Z" }, + { url = "https://files.pythonhosted.org/packages/9f/21/8edf559014d2b0f82beea19cfb713993ad802ccda16868769979c6090a84/ruff-0.15.22-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72af58b951b0ae395935ae79763dc349bc0eb706319d28f7a33ad2cfb3cfc178", size = 10576719, upload-time = "2026-07-16T15:13:32.35Z" }, + { url = "https://files.pythonhosted.org/packages/bf/1e/3a13abd392a3b50b62e5938a831f9ab6e588358cacad5c18545b716d2182/ruff-0.15.22-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62d425005c1835eb24e2ee4161cb90e8db263415f4a71c8c72c33abaa6c0c224", size = 11376494, upload-time = "2026-07-16T15:13:35.958Z" }, + { url = "https://files.pythonhosted.org/packages/bf/3e/422d3d95bcf04dd78e1aeac22184d4f9a8fb2c01865d39d44618484a0317/ruff-0.15.22-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8b9b3f8779a4f08c969defc3c8c35abffaa757e601ed5ae66d6d1db6519969a", size = 12208370, upload-time = "2026-07-16T15:13:39.185Z" }, + { url = "https://files.pythonhosted.org/packages/1e/91/5d065a0e0a02bf4813f5119ad278462eed081d2b832eb7c021ade0ec9e65/ruff-0.15.22-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e0dd1b2e4d3d585f897a0d137cbf4eaf6223bef4e8ce34d6bb12556c5f9249e", size = 11581098, upload-time = "2026-07-16T15:13:42.132Z" }, + { url = "https://files.pythonhosted.org/packages/f6/f9/a0d4871d12fae702eb1f41b686caf05f1f8b124dc6db6f784f53d74918fa/ruff-0.15.22-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:365523eb91d9224e1bcb03b022fbf0facb8f9e23792a2c53d9d4b3924bdbdebb", size = 11399422, upload-time = "2026-07-16T15:13:45.2Z" }, + { url = "https://files.pythonhosted.org/packages/18/80/c843a5176cddbceb0b7e8dd41cf9993490796c1c469348d384f5a5c13c56/ruff-0.15.22-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:fabfd168afdf29fee5be98b831efa9683c94d7c5a3b58b9ce5a2e38444589a74", size = 11381683, upload-time = "2026-07-16T15:13:48.46Z" }, + { url = "https://files.pythonhosted.org/packages/d4/00/8485de0ae92239438a36cfc51350db9b9e85c9ebdfaea91b18e422706662/ruff-0.15.22-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:225dbf095a87f1d9f90f5fd7924d2613ee452a75a4308c63a8f50f761787aa7c", size = 10850295, upload-time = "2026-07-16T15:13:51.655Z" }, + { url = "https://files.pythonhosted.org/packages/fa/91/24977ec2ec72eaf15e4394ace2959fdff2dd1e14f03e005e838023407169/ruff-0.15.22-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:1877d63b9d24ed278744f1523fd11b85540566d54641f97c566d7d9dc5ca5296", size = 10579640, upload-time = "2026-07-16T15:13:54.79Z" }, + { url = "https://files.pythonhosted.org/packages/9c/47/9b51216951974df1f263ac19da550d34252e0ed7218c25f10c5ef9ed7517/ruff-0.15.22-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a1606c510bd7215680d32efab38965f7cdec3ef69f5170a3f4791404ffdd5262", size = 11105077, upload-time = "2026-07-16T15:13:57.915Z" }, + { url = "https://files.pythonhosted.org/packages/c2/47/20e9d4a3b8016778acea5fc32bb50d35d207500a17ddb529ffa6996feef8/ruff-0.15.22-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:630479b18625f5ffc373f77603a22a9f8ac0acd7ff0501178b5db28ec71e9c64", size = 11490980, upload-time = "2026-07-16T15:14:01.032Z" }, + { url = "https://files.pythonhosted.org/packages/4d/76/3f72d8fc38c1cb77b38c56a70da9d0c17700cc1cc50f9649c9d3c8f5ba71/ruff-0.15.22-py3-none-win32.whl", hash = "sha256:e5ba0e4a13fd14abbed2a77b517a3911290c6c6c59ef67784328d1668fab76cf", size = 10789165, upload-time = "2026-07-16T15:14:04.16Z" }, + { url = "https://files.pythonhosted.org/packages/cb/46/4965251734c2b6fcdca1b1b187d20bcac3af0ee5b083b89c910bb961ce3a/ruff-0.15.22-py3-none-win_amd64.whl", hash = "sha256:9be63ba1eb936acd2d1342fb8337c356353706fce233b2a15a09a97037e6acde", size = 11938297, upload-time = "2026-07-16T15:14:07.316Z" }, + { url = "https://files.pythonhosted.org/packages/57/c9/e69b1ff4c8b69093ef08b8919ab767af0569666865b39c30a8795d88d3c6/ruff-0.15.22-py3-none-win_arm64.whl", hash = "sha256:e1168075b72158510839f250027659cdd78476f40507dd517892304c41318661", size = 11298172, upload-time = "2026-07-16T15:14:10.51Z" }, +] + +[[package]] +name = "s3transfer" +version = "0.14.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "botocore" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/62/74/8d69dcb7a9efe8baa2046891735e5dfe433ad558ae23d9e3c14c633d1d58/s3transfer-0.14.0.tar.gz", hash = "sha256:eff12264e7c8b4985074ccce27a3b38a485bb7f7422cc8046fee9be4983e4125", size = 151547, upload-time = "2025-09-09T19:23:31.089Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/48/f0/ae7ca09223a81a1d890b2557186ea015f6e0502e9b8cb8e1813f1d8cfa4e/s3transfer-0.14.0-py3-none-any.whl", hash = "sha256:ea3b790c7077558ed1f02a3072fb3cb992bbbd253392f4b6e9e8976941c7d456", size = 85712, upload-time = "2025-09-09T19:23:30.041Z" }, ] [[package]] name = "secretstorage" -version = "3.4.0" +version = "3.5.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "cryptography" }, - { name = "jeepney" }, + { name = "cryptography", marker = "python_full_version != '3.12.*' or sys_platform != 'emscripten'" }, + { name = "jeepney", marker = "python_full_version != '3.12.*' or sys_platform != 'emscripten'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/31/9f/11ef35cf1027c1339552ea7bfe6aaa74a8516d8b5caf6e7d338daf54fd80/secretstorage-3.4.0.tar.gz", hash = "sha256:c46e216d6815aff8a8a18706a2fbfd8d53fcbb0dce99301881687a1b0289ef7c", size = 19748, upload-time = "2025-09-09T16:42:13.859Z" } +sdist = { url = "https://files.pythonhosted.org/packages/1c/03/e834bcd866f2f8a49a85eaff47340affa3bfa391ee9912a952a1faa68c7b/secretstorage-3.5.0.tar.gz", hash = "sha256:f04b8e4689cbce351744d5537bf6b1329c6fc68f91fa666f60a380edddcd11be", size = 19884, upload-time = "2025-11-23T19:02:53.191Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/91/ff/2e2eed29e02c14a5cb6c57f09b2d5b40e65d6cc71f45b52e0be295ccbc2f/secretstorage-3.4.0-py3-none-any.whl", hash = "sha256:0e3b6265c2c63509fb7415717607e4b2c9ab767b7f344a57473b779ca13bd02e", size = 15272, upload-time = "2025-09-09T16:42:12.744Z" }, + { url = "https://files.pythonhosted.org/packages/b7/46/f5af3402b579fd5e11573ce652019a67074317e18c1935cc0b4ba9b35552/secretstorage-3.5.0-py3-none-any.whl", hash = "sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137", size = 15554, upload-time = "2025-11-23T19:02:51.545Z" }, ] [[package]] name = "setuptools" -version = "80.9.0" +version = "81.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz", hash = "sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c", size = 1319958, upload-time = "2025-05-27T00:56:51.443Z" } +sdist = { url = "https://files.pythonhosted.org/packages/0d/1c/73e719955c59b8e424d015ab450f51c0af856ae46ea2da83eba51cc88de1/setuptools-81.0.0.tar.gz", hash = "sha256:487b53915f52501f0a79ccfd0c02c165ffe06631443a886740b91af4b7a5845a", size = 1198299, upload-time = "2026-02-06T21:10:39.601Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl", hash = "sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922", size = 1201486, upload-time = "2025-05-27T00:56:49.664Z" }, + { url = "https://files.pythonhosted.org/packages/e1/e3/c164c88b2e5ce7b24d667b9bd83589cf4f3520d97cad01534cd3c4f55fdb/setuptools-81.0.0-py3-none-any.whl", hash = "sha256:fdd925d5c5d9f62e4b74b30d6dd7828ce236fd6ed998a08d81de62ce5a6310d6", size = 1062021, upload-time = "2026-02-06T21:10:37.175Z" }, ] [[package]] @@ -2885,57 +4436,127 @@ wheels = [ [[package]] name = "snowballstemmer" -version = "3.0.1" +version = "3.1.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/75/a7/9810d872919697c9d01295633f5d574fb416d47e535f258272ca1f01f447/snowballstemmer-3.0.1.tar.gz", hash = "sha256:6d5eeeec8e9f84d4d56b847692bacf79bc2c8e90c7f80ca4444ff8b6f2e52895", size = 105575, upload-time = "2025-05-09T16:34:51.843Z" } +sdist = { url = "https://files.pythonhosted.org/packages/43/f8/0a71edf031f03c40db17503cb8ca78a69a171254e568e7db241b0ab57ea1/snowballstemmer-3.1.1.tar.gz", hash = "sha256:e07bbc54a0d798fe6010a12398422e62a8bfbba95c394fd0956ef58cb4d3e260", size = 123314, upload-time = "2026-06-03T00:56:40.194Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c8/78/3565d011c61f5a43488987ee32b6f3f656e7f107ac2782dd57bdd7d91d9a/snowballstemmer-3.0.1-py3-none-any.whl", hash = "sha256:6cd7b3897da8d6c9ffb968a6781fa6532dce9c3618a4b127d920dab764a19064", size = 103274, upload-time = "2025-05-09T16:34:50.371Z" }, + { url = "https://files.pythonhosted.org/packages/4c/07/2ebca9b11fb9be7340a818d8d6f63feaebb146be2c4afbd6061701d6df6e/snowballstemmer-3.1.1-py3-none-any.whl", hash = "sha256:7e207fa178741da09cdee59d3ecec3827ad5f92b1fc5c9ff3755b639f71f5752", size = 104164, upload-time = "2026-06-03T00:56:38.614Z" }, ] [[package]] name = "sse-starlette" -version = "3.0.2" +version = "3.5.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, + { name = "starlette" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/42/6f/22ed6e33f8a9e76ca0a412405f31abb844b779d52c5f96660766edcd737c/sse_starlette-3.0.2.tar.gz", hash = "sha256:ccd60b5765ebb3584d0de2d7a6e4f745672581de4f5005ab31c3a25d10b52b3a", size = 20985, upload-time = "2025-07-27T09:07:44.565Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/be/0123026f719d1a7936f214a88b553bb5701e04ff2511147c1dab0c5035eb/sse_starlette-3.5.0.tar.gz", hash = "sha256:75de713aa8a9441513cc283220826da079d982770965b951e9437720e8bafdb2", size = 36794, upload-time = "2026-09-28T17:48:14.7Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/10/c78f463b4ef22eef8491f218f692be838282cd65480f6e423d7730dfd1fb/sse_starlette-3.0.2-py3-none-any.whl", hash = "sha256:16b7cbfddbcd4eaca11f7b586f3b8a080f1afe952c15813455b162edea619e5a", size = 11297, upload-time = "2025-07-27T09:07:43.268Z" }, + { url = "https://files.pythonhosted.org/packages/be/e4/cdda14023c316d71493bc54fdffc3dd006631b88866145c9d3cc33e0f1df/sse_starlette-3.5.0-py3-none-any.whl", hash = "sha256:3e6e1070df3f0f5d9cea81496de92dbb72f6721871d99748ece67441dd8b7997", size = 17407, upload-time = "2026-09-28T17:48:13.228Z" }, ] [[package]] name = "starlette" -version = "0.48.0" +version = "1.8.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, { name = "typing-extensions", marker = "python_full_version < '3.13'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/a7/a5/d6f429d43394057b67a6b5bbe6eae2f77a6bf7459d961fdb224bf206eee6/starlette-0.48.0.tar.gz", hash = "sha256:7e8cee469a8ab2352911528110ce9088fdc6a37d9876926e73da7ce4aa4c7a46", size = 2652949, upload-time = "2025-09-13T08:41:05.699Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e9/0c/6efb252d091ecccd7d62048ae11f0ea35cd75a4fbaeea5e30f9c3bf91d10/starlette-1.8.0.tar.gz", hash = "sha256:1565dc0b35d5737a271ed1e0e04e949f4e81198799f216d2667b0a0fb9cf9522", size = 2730457, upload-time = "2026-10-13T07:54:39.53Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c1/b0/5742e4ac7af5eb58ec3470a537a49d7aa507e5539413e504b3a65ef50ba8/starlette-1.8.0-py3-none-any.whl", hash = "sha256:dfdd6b29c26483288088d990eee59631dedadd66ce20d203402a7ca8e3c4656f", size = 79612, upload-time = "2026-10-13T07:54:38.019Z" }, +] + +[[package]] +name = "strands-agents" +version = "1.60.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "boto3" }, + { name = "botocore" }, + { name = "docstring-parser" }, + { name = "httpx" }, + { name = "jsonschema" }, + { name = "mcp" }, + { name = "opentelemetry-api" }, + { name = "opentelemetry-instrumentation-threading" }, + { name = "opentelemetry-sdk" }, + { name = "pydantic" }, + { name = "pyyaml" }, + { name = "typing-extensions" }, + { name = "watchdog" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5a/04/2eba3ef1d72d8bfe78d103ca5aa46001085eeee877bc16e2a89308253758/strands_agents-1.60.0.tar.gz", hash = "sha256:14afec652c6f3ae88ed65e1098db21297ff6daf7ddaa7f6eff6250f6a7c160a3", size = 1760086, upload-time = "2026-10-12T19:37:48.139Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c0/e8/a449e98c09edcf270a54fb2707ce0d28d86b7fbfef577bcd4b827c80f7ed/strands_agents-1.60.0-py3-none-any.whl", hash = "sha256:3d0c9f6cb263c1d7f54ebd0f653d873deb8b1d88d1f3c161bc71515c5d616b27", size = 885125, upload-time = "2026-10-12T19:37:45.667Z" }, +] + +[[package]] +name = "sympy" +version = "1.14.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mpmath" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517", size = 7793921, upload-time = "2025-04-27T18:05:01.611Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/be/72/2db2f49247d0a18b4f1bb9a5a39a0162869acf235f3a96418363947b3d46/starlette-0.48.0-py3-none-any.whl", hash = "sha256:0764ca97b097582558ecb498132ed0c7d942f233f365b86ba37770e026510659", size = 73736, upload-time = "2025-09-13T08:41:03.869Z" }, + { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" }, ] [[package]] name = "temporalio" -version = "1.21.1" +version = "1.36.1" source = { virtual = "." } dependencies = [ { name = "nexus-rpc" }, { name = "protobuf" }, - { name = "python-dateutil", marker = "python_full_version < '3.11'" }, { name = "types-protobuf" }, { name = "typing-extensions" }, ] [package.optional-dependencies] +aioboto3 = [ + { name = "aioboto3" }, + { name = "types-aioboto3", extra = ["s3"] }, +] +cloud-run-worker-otel = [ + { name = "opentelemetry-api" }, + { name = "opentelemetry-exporter-otlp-proto-grpc" }, + { name = "opentelemetry-sdk" }, + { name = "protobuf" }, +] +deepagents = [ + { name = "temporalio-deepagents" }, +] +gcloud-aio-storage = [ + { name = "gcloud-aio-storage" }, +] +google-adk = [ + { name = "temporalio-google-adk", extra = ["mcp"] }, +] +google-genai = [ + { name = "temporalio-google-genai", extra = ["mcp"] }, +] grpc = [ { name = "grpcio" }, ] +lambda-worker-otel = [ + { name = "opentelemetry-api" }, + { name = "opentelemetry-exporter-otlp-proto-grpc" }, + { name = "opentelemetry-sdk" }, + { name = "opentelemetry-sdk-extension-aws" }, + { name = "opentelemetry-semantic-conventions" }, +] +langgraph = [ + { name = "temporalio-langgraph" }, +] +langsmith = [ + { name = "temporalio-langsmith" }, +] openai-agents = [ - { name = "mcp" }, - { name = "openai-agents" }, + { name = "temporalio-openai-agents" }, ] opentelemetry = [ { name = "opentelemetry-api" }, @@ -2944,18 +4565,23 @@ opentelemetry = [ pydantic = [ { name = "pydantic" }, ] +strands-agents = [ + { name = "temporalio-strands-agents" }, +] [package.dev-dependencies] dev = [ + { name = "basedpyright" }, { name = "cibuildwheel" }, + { name = "cryptography" }, { name = "googleapis-common-protos" }, - { name = "grpcio-tools" }, { name = "httpx" }, { name = "maturin" }, + { name = "moto", extra = ["s3", "server"] }, { name = "mypy" }, - { name = "mypy-protobuf" }, - { name = "openai-agents" }, - { name = "openai-agents", extra = ["litellm"], marker = "python_full_version < '3.14'" }, + { name = "opentelemetry-exporter-otlp-proto-grpc" }, + { name = "opentelemetry-sdk-extension-aws" }, + { name = "opentelemetry-semantic-conventions" }, { name = "psutil" }, { name = "pydocstyle" }, { name = "pydoctor" }, @@ -2963,140 +4589,211 @@ dev = [ { name = "pytest" }, { name = "pytest-asyncio" }, { name = "pytest-cov" }, + { name = "pytest-flakefinder" }, { name = "pytest-pretty" }, { name = "pytest-rerunfailures" }, { name = "pytest-timeout" }, + { name = "pytest-xdist" }, { name = "ruff" }, + { name = "setuptools" }, + { name = "temporalio-openai-agents" }, { name = "toml" }, + { name = "tomlkit" }, { name = "twine" }, ] [package.metadata] requires-dist = [ - { name = "grpcio", marker = "extra == 'grpc'", specifier = ">=1.48.2,<2" }, - { name = "mcp", marker = "extra == 'openai-agents'", specifier = ">=1.9.4,<2" }, - { name = "nexus-rpc", specifier = "==1.3.0" }, - { name = "openai-agents", marker = "extra == 'openai-agents'", specifier = ">=0.3,<0.7" }, - { name = "opentelemetry-api", marker = "extra == 'opentelemetry'", specifier = ">=1.11.1,<2" }, - { name = "opentelemetry-sdk", marker = "extra == 'opentelemetry'", specifier = ">=1.11.1,<2" }, - { name = "protobuf", specifier = ">=3.20,<7.0.0" }, + { name = "aioboto3", marker = "extra == 'aioboto3'", specifier = ">=10.4.0" }, + { name = "gcloud-aio-storage", marker = "extra == 'gcloud-aio-storage'", specifier = ">=9.6.4,<10" }, + { name = "grpcio", marker = "extra == 'grpc'", specifier = ">=1.49.1,<2" }, + { name = "nexus-rpc", specifier = "==1.5.0" }, + { name = "opentelemetry-api", marker = "extra == 'cloud-run-worker-otel'", specifier = ">=1.26,<2" }, + { name = "opentelemetry-api", marker = "extra == 'lambda-worker-otel'", specifier = ">=1.26,<2" }, + { name = "opentelemetry-api", marker = "extra == 'opentelemetry'", specifier = ">=1.26,<2" }, + { name = "opentelemetry-exporter-otlp-proto-grpc", marker = "extra == 'cloud-run-worker-otel'", specifier = ">=1.11.1,<2" }, + { name = "opentelemetry-exporter-otlp-proto-grpc", marker = "extra == 'lambda-worker-otel'", specifier = ">=1.11.1,<2" }, + { name = "opentelemetry-sdk", marker = "extra == 'cloud-run-worker-otel'", specifier = ">=1.26,<2" }, + { name = "opentelemetry-sdk", marker = "extra == 'lambda-worker-otel'", specifier = ">=1.26,<2" }, + { name = "opentelemetry-sdk", marker = "extra == 'opentelemetry'", specifier = ">=1.26,<2" }, + { name = "opentelemetry-sdk-extension-aws", marker = "extra == 'lambda-worker-otel'", specifier = ">=2.0.0,<3" }, + { name = "opentelemetry-semantic-conventions", marker = "extra == 'lambda-worker-otel'", specifier = ">=0.40b0,<1" }, + { name = "protobuf", specifier = ">=4.21.12,<8.0.0" }, + { name = "protobuf", marker = "extra == 'cloud-run-worker-otel'", specifier = "<7" }, { name = "pydantic", marker = "extra == 'pydantic'", specifier = ">=2.0.0,<3" }, - { name = "python-dateutil", marker = "python_full_version < '3.11'", specifier = ">=2.8.2,<3" }, - { name = "types-protobuf", specifier = ">=3.20" }, + { name = "temporalio-deepagents", marker = "extra == 'deepagents'", specifier = ">=0.0.1" }, + { name = "temporalio-google-adk", extras = ["mcp"], marker = "extra == 'google-adk'", specifier = ">=0.0.1" }, + { name = "temporalio-google-genai", extras = ["mcp"], marker = "extra == 'google-genai'", specifier = ">=0.1.0" }, + { name = "temporalio-langgraph", marker = "extra == 'langgraph'", specifier = ">=0.1.0" }, + { name = "temporalio-langsmith", marker = "extra == 'langsmith'", specifier = ">=0.1.1" }, + { name = "temporalio-openai-agents", marker = "extra == 'openai-agents'", specifier = ">=1.0.0" }, + { name = "temporalio-strands-agents", marker = "extra == 'strands-agents'", specifier = ">=0.1.0" }, + { name = "types-aioboto3", extras = ["s3"], marker = "extra == 'aioboto3'", specifier = ">=10.4.0" }, + { name = "types-protobuf", specifier = ">=4.24,<8.0.0" }, { name = "typing-extensions", specifier = ">=4.2.0,<5" }, ] -provides-extras = ["grpc", "opentelemetry", "pydantic", "openai-agents"] +provides-extras = ["grpc", "opentelemetry", "pydantic", "openai-agents", "google-adk", "langgraph", "langsmith", "deepagents", "lambda-worker-otel", "cloud-run-worker-otel", "aioboto3", "gcloud-aio-storage", "google-genai", "strands-agents"] [package.metadata.requires-dev] dev = [ + { name = "basedpyright", specifier = "==1.34.0" }, { name = "cibuildwheel", specifier = ">=2.22.0,<3" }, - { name = "googleapis-common-protos", specifier = "==1.70.0" }, - { name = "grpcio-tools", specifier = ">=1.48.2,<2" }, + { name = "cryptography", specifier = ">=46" }, + { name = "googleapis-common-protos", specifier = ">=1.75.0,<2" }, { name = "httpx", specifier = ">=0.28.1" }, { name = "maturin", specifier = ">=1.8.2" }, - { name = "mypy", specifier = "==1.18.2" }, - { name = "mypy-protobuf", specifier = ">=3.3.0,<4" }, - { name = "openai-agents", marker = "python_full_version >= '3.14'", specifier = ">=0.3,<0.7" }, - { name = "openai-agents", extras = ["litellm"], marker = "python_full_version < '3.14'", specifier = ">=0.3,<0.7" }, + { name = "moto", extras = ["s3", "server"], specifier = ">=5" }, + { name = "mypy", specifier = "==2.4.0" }, + { name = "opentelemetry-exporter-otlp-proto-grpc", specifier = ">=1.11.1,<2" }, + { name = "opentelemetry-sdk-extension-aws", specifier = ">=2.0.0,<3" }, + { name = "opentelemetry-semantic-conventions", specifier = ">=0.40b0,<1" }, { name = "psutil", specifier = ">=5.9.3,<6" }, { name = "pydocstyle", specifier = ">=6.3.0,<7" }, { name = "pydoctor", specifier = ">=25.10.1,<26" }, - { name = "pyright", specifier = "==1.1.403" }, - { name = "pytest", specifier = "~=7.4" }, + { name = "pyright", specifier = "==1.1.414" }, + { name = "pytest", specifier = ">=9.0,<9.2" }, { name = "pytest-asyncio", specifier = ">=0.21,<0.22" }, { name = "pytest-cov", specifier = ">=6.1.1" }, + { name = "pytest-flakefinder", specifier = ">=1.1.0" }, { name = "pytest-pretty", specifier = ">=1.3.0" }, { name = "pytest-rerunfailures", specifier = ">=16.1" }, { name = "pytest-timeout", specifier = "~=2.2" }, - { name = "ruff", specifier = ">=0.5.0,<0.6" }, + { name = "pytest-xdist", specifier = ">=3.6,<4" }, + { name = "ruff", specifier = ">=0.15.12,<0.16" }, + { name = "setuptools", specifier = "<82" }, + { name = "temporalio-openai-agents", specifier = ">=1.0.0" }, { name = "toml", specifier = ">=0.10.2,<0.11" }, + { name = "tomlkit", specifier = ">=0.13,<0.14" }, { name = "twine", specifier = ">=4.0.1,<5" }, ] [[package]] -name = "tiktoken" -version = "0.12.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "regex", marker = "python_full_version < '3.14'" }, - { name = "requests", marker = "python_full_version < '3.14'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/7d/ab/4d017d0f76ec3171d469d80fc03dfbb4e48a4bcaddaa831b31d526f05edc/tiktoken-0.12.0.tar.gz", hash = "sha256:b18ba7ee2b093863978fcb14f74b3707cdc8d4d4d3836853ce7ec60772139931", size = 37806, upload-time = "2025-10-06T20:22:45.419Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/89/b3/2cb7c17b6c4cf8ca983204255d3f1d95eda7213e247e6947a0ee2c747a2c/tiktoken-0.12.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3de02f5a491cfd179aec916eddb70331814bd6bf764075d39e21d5862e533970", size = 1051991, upload-time = "2025-10-06T20:21:34.098Z" }, - { url = "https://files.pythonhosted.org/packages/27/0f/df139f1df5f6167194ee5ab24634582ba9a1b62c6b996472b0277ec80f66/tiktoken-0.12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b6cfb6d9b7b54d20af21a912bfe63a2727d9cfa8fbda642fd8322c70340aad16", size = 995798, upload-time = "2025-10-06T20:21:35.579Z" }, - { url = "https://files.pythonhosted.org/packages/ef/5d/26a691f28ab220d5edc09b9b787399b130f24327ef824de15e5d85ef21aa/tiktoken-0.12.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:cde24cdb1b8a08368f709124f15b36ab5524aac5fa830cc3fdce9c03d4fb8030", size = 1129865, upload-time = "2025-10-06T20:21:36.675Z" }, - { url = "https://files.pythonhosted.org/packages/b2/94/443fab3d4e5ebecac895712abd3849b8da93b7b7dec61c7db5c9c7ebe40c/tiktoken-0.12.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:6de0da39f605992649b9cfa6f84071e3f9ef2cec458d08c5feb1b6f0ff62e134", size = 1152856, upload-time = "2025-10-06T20:21:37.873Z" }, - { url = "https://files.pythonhosted.org/packages/54/35/388f941251b2521c70dd4c5958e598ea6d2c88e28445d2fb8189eecc1dfc/tiktoken-0.12.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6faa0534e0eefbcafaccb75927a4a380463a2eaa7e26000f0173b920e98b720a", size = 1195308, upload-time = "2025-10-06T20:21:39.577Z" }, - { url = "https://files.pythonhosted.org/packages/f8/00/c6681c7f833dd410576183715a530437a9873fa910265817081f65f9105f/tiktoken-0.12.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:82991e04fc860afb933efb63957affc7ad54f83e2216fe7d319007dab1ba5892", size = 1255697, upload-time = "2025-10-06T20:21:41.154Z" }, - { url = "https://files.pythonhosted.org/packages/5f/d2/82e795a6a9bafa034bf26a58e68fe9a89eeaaa610d51dbeb22106ba04f0a/tiktoken-0.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:6fb2995b487c2e31acf0a9e17647e3b242235a20832642bb7a9d1a181c0c1bb1", size = 879375, upload-time = "2025-10-06T20:21:43.201Z" }, - { url = "https://files.pythonhosted.org/packages/de/46/21ea696b21f1d6d1efec8639c204bdf20fde8bafb351e1355c72c5d7de52/tiktoken-0.12.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6e227c7f96925003487c33b1b32265fad2fbcec2b7cf4817afb76d416f40f6bb", size = 1051565, upload-time = "2025-10-06T20:21:44.566Z" }, - { url = "https://files.pythonhosted.org/packages/c9/d9/35c5d2d9e22bb2a5f74ba48266fb56c63d76ae6f66e02feb628671c0283e/tiktoken-0.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c06cf0fcc24c2cb2adb5e185c7082a82cba29c17575e828518c2f11a01f445aa", size = 995284, upload-time = "2025-10-06T20:21:45.622Z" }, - { url = "https://files.pythonhosted.org/packages/01/84/961106c37b8e49b9fdcf33fe007bb3a8fdcc380c528b20cc7fbba80578b8/tiktoken-0.12.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:f18f249b041851954217e9fd8e5c00b024ab2315ffda5ed77665a05fa91f42dc", size = 1129201, upload-time = "2025-10-06T20:21:47.074Z" }, - { url = "https://files.pythonhosted.org/packages/6a/d0/3d9275198e067f8b65076a68894bb52fd253875f3644f0a321a720277b8a/tiktoken-0.12.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:47a5bc270b8c3db00bb46ece01ef34ad050e364b51d406b6f9730b64ac28eded", size = 1152444, upload-time = "2025-10-06T20:21:48.139Z" }, - { url = "https://files.pythonhosted.org/packages/78/db/a58e09687c1698a7c592e1038e01c206569b86a0377828d51635561f8ebf/tiktoken-0.12.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:508fa71810c0efdcd1b898fda574889ee62852989f7c1667414736bcb2b9a4bd", size = 1195080, upload-time = "2025-10-06T20:21:49.246Z" }, - { url = "https://files.pythonhosted.org/packages/9e/1b/a9e4d2bf91d515c0f74afc526fd773a812232dd6cda33ebea7f531202325/tiktoken-0.12.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a1af81a6c44f008cba48494089dd98cccb8b313f55e961a52f5b222d1e507967", size = 1255240, upload-time = "2025-10-06T20:21:50.274Z" }, - { url = "https://files.pythonhosted.org/packages/9d/15/963819345f1b1fb0809070a79e9dd96938d4ca41297367d471733e79c76c/tiktoken-0.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:3e68e3e593637b53e56f7237be560f7a394451cb8c11079755e80ae64b9e6def", size = 879422, upload-time = "2025-10-06T20:21:51.734Z" }, - { url = "https://files.pythonhosted.org/packages/a4/85/be65d39d6b647c79800fd9d29241d081d4eeb06271f383bb87200d74cf76/tiktoken-0.12.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b97f74aca0d78a1ff21b8cd9e9925714c15a9236d6ceacf5c7327c117e6e21e8", size = 1050728, upload-time = "2025-10-06T20:21:52.756Z" }, - { url = "https://files.pythonhosted.org/packages/4a/42/6573e9129bc55c9bf7300b3a35bef2c6b9117018acca0dc760ac2d93dffe/tiktoken-0.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2b90f5ad190a4bb7c3eb30c5fa32e1e182ca1ca79f05e49b448438c3e225a49b", size = 994049, upload-time = "2025-10-06T20:21:53.782Z" }, - { url = "https://files.pythonhosted.org/packages/66/c5/ed88504d2f4a5fd6856990b230b56d85a777feab84e6129af0822f5d0f70/tiktoken-0.12.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:65b26c7a780e2139e73acc193e5c63ac754021f160df919add909c1492c0fb37", size = 1129008, upload-time = "2025-10-06T20:21:54.832Z" }, - { url = "https://files.pythonhosted.org/packages/f4/90/3dae6cc5436137ebd38944d396b5849e167896fc2073da643a49f372dc4f/tiktoken-0.12.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:edde1ec917dfd21c1f2f8046b86348b0f54a2c0547f68149d8600859598769ad", size = 1152665, upload-time = "2025-10-06T20:21:56.129Z" }, - { url = "https://files.pythonhosted.org/packages/a3/fe/26df24ce53ffde419a42f5f53d755b995c9318908288c17ec3f3448313a3/tiktoken-0.12.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:35a2f8ddd3824608b3d650a000c1ef71f730d0c56486845705a8248da00f9fe5", size = 1194230, upload-time = "2025-10-06T20:21:57.546Z" }, - { url = "https://files.pythonhosted.org/packages/20/cc/b064cae1a0e9fac84b0d2c46b89f4e57051a5f41324e385d10225a984c24/tiktoken-0.12.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:83d16643edb7fa2c99eff2ab7733508aae1eebb03d5dfc46f5565862810f24e3", size = 1254688, upload-time = "2025-10-06T20:21:58.619Z" }, - { url = "https://files.pythonhosted.org/packages/81/10/b8523105c590c5b8349f2587e2fdfe51a69544bd5a76295fc20f2374f470/tiktoken-0.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:ffc5288f34a8bc02e1ea7047b8d041104791d2ddbf42d1e5fa07822cbffe16bd", size = 878694, upload-time = "2025-10-06T20:21:59.876Z" }, - { url = "https://files.pythonhosted.org/packages/00/61/441588ee21e6b5cdf59d6870f86beb9789e532ee9718c251b391b70c68d6/tiktoken-0.12.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:775c2c55de2310cc1bc9a3ad8826761cbdc87770e586fd7b6da7d4589e13dab3", size = 1050802, upload-time = "2025-10-06T20:22:00.96Z" }, - { url = "https://files.pythonhosted.org/packages/1f/05/dcf94486d5c5c8d34496abe271ac76c5b785507c8eae71b3708f1ad9b45a/tiktoken-0.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a01b12f69052fbe4b080a2cfb867c4de12c704b56178edf1d1d7b273561db160", size = 993995, upload-time = "2025-10-06T20:22:02.788Z" }, - { url = "https://files.pythonhosted.org/packages/a0/70/5163fe5359b943f8db9946b62f19be2305de8c3d78a16f629d4165e2f40e/tiktoken-0.12.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:01d99484dc93b129cd0964f9d34eee953f2737301f18b3c7257bf368d7615baa", size = 1128948, upload-time = "2025-10-06T20:22:03.814Z" }, - { url = "https://files.pythonhosted.org/packages/0c/da/c028aa0babf77315e1cef357d4d768800c5f8a6de04d0eac0f377cb619fa/tiktoken-0.12.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:4a1a4fcd021f022bfc81904a911d3df0f6543b9e7627b51411da75ff2fe7a1be", size = 1151986, upload-time = "2025-10-06T20:22:05.173Z" }, - { url = "https://files.pythonhosted.org/packages/a0/5a/886b108b766aa53e295f7216b509be95eb7d60b166049ce2c58416b25f2a/tiktoken-0.12.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:981a81e39812d57031efdc9ec59fa32b2a5a5524d20d4776574c4b4bd2e9014a", size = 1194222, upload-time = "2025-10-06T20:22:06.265Z" }, - { url = "https://files.pythonhosted.org/packages/f4/f8/4db272048397636ac7a078d22773dd2795b1becee7bc4922fe6207288d57/tiktoken-0.12.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9baf52f84a3f42eef3ff4e754a0db79a13a27921b457ca9832cf944c6be4f8f3", size = 1255097, upload-time = "2025-10-06T20:22:07.403Z" }, - { url = "https://files.pythonhosted.org/packages/8e/32/45d02e2e0ea2be3a9ed22afc47d93741247e75018aac967b713b2941f8ea/tiktoken-0.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:b8a0cd0c789a61f31bf44851defbd609e8dd1e2c8589c614cc1060940ef1f697", size = 879117, upload-time = "2025-10-06T20:22:08.418Z" }, - { url = "https://files.pythonhosted.org/packages/ce/76/994fc868f88e016e6d05b0da5ac24582a14c47893f4474c3e9744283f1d5/tiktoken-0.12.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d5f89ea5680066b68bcb797ae85219c72916c922ef0fcdd3480c7d2315ffff16", size = 1050309, upload-time = "2025-10-06T20:22:10.939Z" }, - { url = "https://files.pythonhosted.org/packages/f6/b8/57ef1456504c43a849821920d582a738a461b76a047f352f18c0b26c6516/tiktoken-0.12.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b4e7ed1c6a7a8a60a3230965bdedba8cc58f68926b835e519341413370e0399a", size = 993712, upload-time = "2025-10-06T20:22:12.115Z" }, - { url = "https://files.pythonhosted.org/packages/72/90/13da56f664286ffbae9dbcfadcc625439142675845baa62715e49b87b68b/tiktoken-0.12.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:fc530a28591a2d74bce821d10b418b26a094bf33839e69042a6e86ddb7a7fb27", size = 1128725, upload-time = "2025-10-06T20:22:13.541Z" }, - { url = "https://files.pythonhosted.org/packages/05/df/4f80030d44682235bdaecd7346c90f67ae87ec8f3df4a3442cb53834f7e4/tiktoken-0.12.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:06a9f4f49884139013b138920a4c393aa6556b2f8f536345f11819389c703ebb", size = 1151875, upload-time = "2025-10-06T20:22:14.559Z" }, - { url = "https://files.pythonhosted.org/packages/22/1f/ae535223a8c4ef4c0c1192e3f9b82da660be9eb66b9279e95c99288e9dab/tiktoken-0.12.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:04f0e6a985d95913cabc96a741c5ffec525a2c72e9df086ff17ebe35985c800e", size = 1194451, upload-time = "2025-10-06T20:22:15.545Z" }, - { url = "https://files.pythonhosted.org/packages/78/a7/f8ead382fce0243cb625c4f266e66c27f65ae65ee9e77f59ea1653b6d730/tiktoken-0.12.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:0ee8f9ae00c41770b5f9b0bb1235474768884ae157de3beb5439ca0fd70f3e25", size = 1253794, upload-time = "2025-10-06T20:22:16.624Z" }, - { url = "https://files.pythonhosted.org/packages/93/e0/6cc82a562bc6365785a3ff0af27a2a092d57c47d7a81d9e2295d8c36f011/tiktoken-0.12.0-cp313-cp313t-win_amd64.whl", hash = "sha256:dc2dd125a62cb2b3d858484d6c614d136b5b848976794edfb63688d539b8b93f", size = 878777, upload-time = "2025-10-06T20:22:18.036Z" }, - { url = "https://files.pythonhosted.org/packages/72/05/3abc1db5d2c9aadc4d2c76fa5640134e475e58d9fbb82b5c535dc0de9b01/tiktoken-0.12.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:a90388128df3b3abeb2bfd1895b0681412a8d7dc644142519e6f0a97c2111646", size = 1050188, upload-time = "2025-10-06T20:22:19.563Z" }, - { url = "https://files.pythonhosted.org/packages/e3/7b/50c2f060412202d6c95f32b20755c7a6273543b125c0985d6fa9465105af/tiktoken-0.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:da900aa0ad52247d8794e307d6446bd3cdea8e192769b56276695d34d2c9aa88", size = 993978, upload-time = "2025-10-06T20:22:20.702Z" }, - { url = "https://files.pythonhosted.org/packages/14/27/bf795595a2b897e271771cd31cb847d479073497344c637966bdf2853da1/tiktoken-0.12.0-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:285ba9d73ea0d6171e7f9407039a290ca77efcdb026be7769dccc01d2c8d7fff", size = 1129271, upload-time = "2025-10-06T20:22:22.06Z" }, - { url = "https://files.pythonhosted.org/packages/f5/de/9341a6d7a8f1b448573bbf3425fa57669ac58258a667eb48a25dfe916d70/tiktoken-0.12.0-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:d186a5c60c6a0213f04a7a802264083dea1bbde92a2d4c7069e1a56630aef830", size = 1151216, upload-time = "2025-10-06T20:22:23.085Z" }, - { url = "https://files.pythonhosted.org/packages/75/0d/881866647b8d1be4d67cb24e50d0c26f9f807f994aa1510cb9ba2fe5f612/tiktoken-0.12.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:604831189bd05480f2b885ecd2d1986dc7686f609de48208ebbbddeea071fc0b", size = 1194860, upload-time = "2025-10-06T20:22:24.602Z" }, - { url = "https://files.pythonhosted.org/packages/b3/1e/b651ec3059474dab649b8d5b69f5c65cd8fcd8918568c1935bd4136c9392/tiktoken-0.12.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:8f317e8530bb3a222547b85a58583238c8f74fd7a7408305f9f63246d1a0958b", size = 1254567, upload-time = "2025-10-06T20:22:25.671Z" }, - { url = "https://files.pythonhosted.org/packages/80/57/ce64fd16ac390fafde001268c364d559447ba09b509181b2808622420eec/tiktoken-0.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:399c3dd672a6406719d84442299a490420b458c44d3ae65516302a99675888f3", size = 921067, upload-time = "2025-10-06T20:22:26.753Z" }, - { url = "https://files.pythonhosted.org/packages/ac/a4/72eed53e8976a099539cdd5eb36f241987212c29629d0a52c305173e0a68/tiktoken-0.12.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:c2c714c72bc00a38ca969dae79e8266ddec999c7ceccd603cc4f0d04ccd76365", size = 1050473, upload-time = "2025-10-06T20:22:27.775Z" }, - { url = "https://files.pythonhosted.org/packages/e6/d7/0110b8f54c008466b19672c615f2168896b83706a6611ba6e47313dbc6e9/tiktoken-0.12.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:cbb9a3ba275165a2cb0f9a83f5d7025afe6b9d0ab01a22b50f0e74fee2ad253e", size = 993855, upload-time = "2025-10-06T20:22:28.799Z" }, - { url = "https://files.pythonhosted.org/packages/5f/77/4f268c41a3957c418b084dd576ea2fad2e95da0d8e1ab705372892c2ca22/tiktoken-0.12.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:dfdfaa5ffff8993a3af94d1125870b1d27aed7cb97aa7eb8c1cefdbc87dbee63", size = 1129022, upload-time = "2025-10-06T20:22:29.981Z" }, - { url = "https://files.pythonhosted.org/packages/4e/2b/fc46c90fe5028bd094cd6ee25a7db321cb91d45dc87531e2bdbb26b4867a/tiktoken-0.12.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:584c3ad3d0c74f5269906eb8a659c8bfc6144a52895d9261cdaf90a0ae5f4de0", size = 1150736, upload-time = "2025-10-06T20:22:30.996Z" }, - { url = "https://files.pythonhosted.org/packages/28/c0/3c7a39ff68022ddfd7d93f3337ad90389a342f761c4d71de99a3ccc57857/tiktoken-0.12.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:54c891b416a0e36b8e2045b12b33dd66fb34a4fe7965565f1b482da50da3e86a", size = 1194908, upload-time = "2025-10-06T20:22:32.073Z" }, - { url = "https://files.pythonhosted.org/packages/ab/0d/c1ad6f4016a3968c048545f5d9b8ffebf577774b2ede3e2e352553b685fe/tiktoken-0.12.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5edb8743b88d5be814b1a8a8854494719080c28faaa1ccbef02e87354fe71ef0", size = 1253706, upload-time = "2025-10-06T20:22:33.385Z" }, - { url = "https://files.pythonhosted.org/packages/af/df/c7891ef9d2712ad774777271d39fdef63941ffba0a9d59b7ad1fd2765e57/tiktoken-0.12.0-cp314-cp314t-win_amd64.whl", hash = "sha256:f61c0aea5565ac82e2ec50a05e02a6c44734e91b51c10510b084ea1b8e633a71", size = 920667, upload-time = "2025-10-06T20:22:34.444Z" }, -] - -[[package]] -name = "tokenizers" -version = "0.22.1" +name = "temporalio-deepagents" +version = "0.0.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "deepagents" }, + { name = "langchain" }, + { name = "langchain-core" }, + { name = "langgraph" }, + { name = "langsmith" }, + { name = "pydantic" }, + { name = "temporalio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/85/9a/eb64750f6324cf0b8974da00e31fd5ee78f3f560add9c46815b7532e1ba5/temporalio_deepagents-0.0.3.tar.gz", hash = "sha256:9e4f03553f4e6d2883979820d8960f4563fd7fb13f753ea20c047b02323a0f4a", size = 42419, upload-time = "2026-10-20T20:09:00.614Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/25/1a/603ea405ee9e8da61d2844954c5c20911d91ea7091f328a6fdbc1513aef1/temporalio_deepagents-0.0.3-py3-none-any.whl", hash = "sha256:c27c461aea3eada1fca15e20d1b4cbe190a7ce2148aab3cc868044e9e6a91f33", size = 47768, upload-time = "2026-10-20T20:08:59.021Z" }, +] + +[[package]] +name = "temporalio-google-adk" +version = "0.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "google-adk" }, + { name = "google-genai" }, + { name = "opentelemetry-api" }, + { name = "opentelemetry-sdk" }, + { name = "pydantic" }, + { name = "temporalio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e6/76/560481d0fdf61f3644a7eeac329915e72d13cd842d4e734b46172a74ee6c/temporalio_google_adk-0.0.1.tar.gz", hash = "sha256:faad4a0a210e0788859b3548f5f14794de65a498b6bcb56b7457ea6e40286e9f", size = 28843, upload-time = "2026-10-07T18:48:47.47Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/af/e6/f19f7f07268e7537b5028557426ec050c0645baabb94d81ee26707955d88/temporalio_google_adk-0.0.1-py3-none-any.whl", hash = "sha256:0c82b463d00f3c53eeb25c71e22ea4277502e8f9d9862dcd29e9770eca3d8f8e", size = 31334, upload-time = "2026-10-07T18:48:45.902Z" }, +] + +[package.optional-dependencies] +mcp = [ + { name = "google-adk", extra = ["mcp"] }, +] + +[[package]] +name = "temporalio-google-genai" +version = "0.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "google-genai" }, + { name = "pydantic" }, + { name = "temporalio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3d/2a/eeaf7cab52aa6500e7b325378fd20347dba4a905293959ffb91b0468b35f/temporalio_google_genai-0.1.0.tar.gz", hash = "sha256:ce90309de31f8080930a7de1fec16ac9542419325b420e487c88aa38f9ab1f53", size = 31914, upload-time = "2026-10-07T20:56:53.814Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/0e/979153cfdba59d0be935e3235ffd3388c043ec4b5d519bc99f9927661763/temporalio_google_genai-0.1.0-py3-none-any.whl", hash = "sha256:48dac47903277100434aa8687a71dcf93bfd652f49c43ac0671872f6b175680e", size = 42970, upload-time = "2026-10-07T20:56:52.45Z" }, +] + +[package.optional-dependencies] +mcp = [ + { name = "mcp" }, +] + +[[package]] +name = "temporalio-langgraph" +version = "0.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "langchain-core" }, + { name = "langgraph" }, + { name = "temporalio" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a0/03/21d4cbeda7843c276d01aea5fe6d17bd82877ac4111f29b39975e568cb6e/temporalio_langgraph-0.1.0.tar.gz", hash = "sha256:35d67361016052b7a87e3878096ca9cd77a7390979dbb60e5b5bb32b53098e0d", size = 17438, upload-time = "2026-10-07T21:36:42.771Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/2b/af6582b850ce59ca84d491c24a92d0bfaa6eb0ea02a73e15df6e66af6b73/temporalio_langgraph-0.1.0-py3-none-any.whl", hash = "sha256:7a1643d089559d70cf3982eea9628810dc0981a1bc599f376d66a2dc69a3779e", size = 20352, upload-time = "2026-10-07T21:36:41.445Z" }, +] + +[[package]] +name = "temporalio-langsmith" +version = "0.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "langchain-core" }, + { name = "langsmith" }, + { name = "temporalio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/17/16/f2f679300c83f141acced23ac09b55160dbdd2f3fbd1cf561197671da3b1/temporalio_langsmith-0.1.1.tar.gz", hash = "sha256:7cafe4e210152e0ef40a6b832436084fcf55c9956b98b354f6135f1857322488", size = 214499, upload-time = "2026-10-28T18:55:44.815Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d9/e6/95dc7eba97dfa3c821fb2931cf367632d1b303e7370d65ec2e541d434937/temporalio_langsmith-0.1.1-py3-none-any.whl", hash = "sha256:74a71f4ceb59eb285007dd09cdb83f88d670ee8384fe3ad6e873f2afcb7bc938", size = 214523, upload-time = "2026-10-28T18:55:43.142Z" }, +] + +[[package]] +name = "temporalio-openai-agents" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mcp" }, + { name = "openai" }, + { name = "openai-agents" }, + { name = "pydantic" }, + { name = "temporalio", extra = ["opentelemetry", "pydantic"] }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1b/10/56612e595263546b578d0510e03755c7b7267de88d9ac726ebf50daca1ee/temporalio_openai_agents-1.1.0.tar.gz", hash = "sha256:5a279838db6288e873e8268a74b905c533ec196b2fbb796f14a4f45d06ee0260", size = 73387, upload-time = "2026-10-01T19:43:24.843Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/42/73/c118e692c0d5e6c624632d3b07d3c49f071c12f9ce92f825c6cccd061248/temporalio_openai_agents-1.1.0-py3-none-any.whl", hash = "sha256:d8054af26a7b4f8414b60bc04550d48dff0cb607cf70550c43e0a5b99d13041e", size = 72409, upload-time = "2026-10-01T19:43:23.328Z" }, +] + +[[package]] +name = "temporalio-strands-agents" +version = "0.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "huggingface-hub", marker = "python_full_version < '3.14'" }, + { name = "botocore" }, + { name = "mcp" }, + { name = "strands-agents" }, + { name = "temporalio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/35/ab/2b2a30df8ef357546e14a151ab114869da541405d99da513a74b9c4fc89f/temporalio_strands_agents-0.1.0.tar.gz", hash = "sha256:1da8ac046004bb83f12cd3c87df278f4c71ee11c2abecfb791928e22c22c3f75", size = 36060, upload-time = "2026-10-07T22:52:50.223Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f5/52/2d8e3126bbfc88f6cf8cbbacf98550ea509e3796885420344b1f49a7eb2d/temporalio_strands_agents-0.1.0-py3-none-any.whl", hash = "sha256:3227ae604e845feeab0f0868fc301d44b299585935dfb42c47d9910234f74e9f", size = 36680, upload-time = "2026-10-07T22:52:49.072Z" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/1c/46/fb6854cec3278fbfa4a75b50232c77622bc517ac886156e6afbfa4d8fc6e/tokenizers-0.22.1.tar.gz", hash = "sha256:61de6522785310a309b3407bac22d99c4db5dba349935e99e4d15ea2226af2d9", size = 363123, upload-time = "2025-09-19T09:49:23.424Z" } + +[[package]] +name = "tenacity" +version = "9.1.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/47/c6/ee486fd809e357697ee8a44d3d69222b344920433d3b6666ccd9b374630c/tenacity-9.1.4.tar.gz", hash = "sha256:adb31d4c263f2bd041081ab33b498309a57c77f9acf2db65aadf0898179cf93a", size = 49413, upload-time = "2026-02-07T10:45:33.841Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/bf/33/f4b2d94ada7ab297328fc671fed209368ddb82f965ec2224eb1892674c3a/tokenizers-0.22.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:59fdb013df17455e5f950b4b834a7b3ee2e0271e6378ccb33aa74d178b513c73", size = 3069318, upload-time = "2025-09-19T09:49:11.848Z" }, - { url = "https://files.pythonhosted.org/packages/1c/58/2aa8c874d02b974990e89ff95826a4852a8b2a273c7d1b4411cdd45a4565/tokenizers-0.22.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8d4e484f7b0827021ac5f9f71d4794aaef62b979ab7608593da22b1d2e3c4edc", size = 2926478, upload-time = "2025-09-19T09:49:09.759Z" }, - { url = "https://files.pythonhosted.org/packages/1e/3b/55e64befa1e7bfea963cf4b787b2cea1011362c4193f5477047532ce127e/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19d2962dd28bc67c1f205ab180578a78eef89ac60ca7ef7cbe9635a46a56422a", size = 3256994, upload-time = "2025-09-19T09:48:56.701Z" }, - { url = "https://files.pythonhosted.org/packages/71/0b/fbfecf42f67d9b7b80fde4aabb2b3110a97fac6585c9470b5bff103a80cb/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:38201f15cdb1f8a6843e6563e6e79f4abd053394992b9bbdf5213ea3469b4ae7", size = 3153141, upload-time = "2025-09-19T09:48:59.749Z" }, - { url = "https://files.pythonhosted.org/packages/17/a9/b38f4e74e0817af8f8ef925507c63c6ae8171e3c4cb2d5d4624bf58fca69/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1cbe5454c9a15df1b3443c726063d930c16f047a3cc724b9e6e1a91140e5a21", size = 3508049, upload-time = "2025-09-19T09:49:05.868Z" }, - { url = "https://files.pythonhosted.org/packages/d2/48/dd2b3dac46bb9134a88e35d72e1aa4869579eacc1a27238f1577270773ff/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e7d094ae6312d69cc2a872b54b91b309f4f6fbce871ef28eb27b52a98e4d0214", size = 3710730, upload-time = "2025-09-19T09:49:01.832Z" }, - { url = "https://files.pythonhosted.org/packages/93/0e/ccabc8d16ae4ba84a55d41345207c1e2ea88784651a5a487547d80851398/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:afd7594a56656ace95cdd6df4cca2e4059d294c5cfb1679c57824b605556cb2f", size = 3412560, upload-time = "2025-09-19T09:49:03.867Z" }, - { url = "https://files.pythonhosted.org/packages/d0/c6/dc3a0db5a6766416c32c034286d7c2d406da1f498e4de04ab1b8959edd00/tokenizers-0.22.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2ef6063d7a84994129732b47e7915e8710f27f99f3a3260b8a38fc7ccd083f4", size = 3250221, upload-time = "2025-09-19T09:49:07.664Z" }, - { url = "https://files.pythonhosted.org/packages/d7/a6/2c8486eef79671601ff57b093889a345dd3d576713ef047776015dc66de7/tokenizers-0.22.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ba0a64f450b9ef412c98f6bcd2a50c6df6e2443b560024a09fa6a03189726879", size = 9345569, upload-time = "2025-09-19T09:49:14.214Z" }, - { url = "https://files.pythonhosted.org/packages/6b/16/32ce667f14c35537f5f605fe9bea3e415ea1b0a646389d2295ec348d5657/tokenizers-0.22.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:331d6d149fa9c7d632cde4490fb8bbb12337fa3a0232e77892be656464f4b446", size = 9271599, upload-time = "2025-09-19T09:49:16.639Z" }, - { url = "https://files.pythonhosted.org/packages/51/7c/a5f7898a3f6baa3fc2685c705e04c98c1094c523051c805cdd9306b8f87e/tokenizers-0.22.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:607989f2ea68a46cb1dfbaf3e3aabdf3f21d8748312dbeb6263d1b3b66c5010a", size = 9533862, upload-time = "2025-09-19T09:49:19.146Z" }, - { url = "https://files.pythonhosted.org/packages/36/65/7e75caea90bc73c1dd8d40438adf1a7bc26af3b8d0a6705ea190462506e1/tokenizers-0.22.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a0f307d490295717726598ef6fa4f24af9d484809223bbc253b201c740a06390", size = 9681250, upload-time = "2025-09-19T09:49:21.501Z" }, - { url = "https://files.pythonhosted.org/packages/30/2c/959dddef581b46e6209da82df3b78471e96260e2bc463f89d23b1bf0e52a/tokenizers-0.22.1-cp39-abi3-win32.whl", hash = "sha256:b5120eed1442765cd90b903bb6cfef781fd8fe64e34ccaecbae4c619b7b12a82", size = 2472003, upload-time = "2025-09-19T09:49:27.089Z" }, - { url = "https://files.pythonhosted.org/packages/b3/46/e33a8c93907b631a99377ef4c5f817ab453d0b34f93529421f42ff559671/tokenizers-0.22.1-cp39-abi3-win_amd64.whl", hash = "sha256:65fd6e3fb11ca1e78a6a93602490f134d1fdeb13bcef99389d5102ea318ed138", size = 2674684, upload-time = "2025-09-19T09:49:24.953Z" }, + { url = "https://files.pythonhosted.org/packages/d7/c1/eb8f9debc45d3b7918a32ab756658a0904732f75e555402972246b0b8e71/tenacity-9.1.4-py3-none-any.whl", hash = "sha256:6095a360c919085f28c6527de529e76a06ad89b23659fa881ae0649b867a9d55", size = 28926, upload-time = "2026-02-07T10:45:32.24Z" }, ] [[package]] @@ -3110,63 +4807,92 @@ wheels = [ [[package]] name = "tomli" -version = "2.3.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/52/ed/3f73f72945444548f33eba9a87fc7a6e969915e7b1acc8260b30e1f76a2f/tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549", size = 17392, upload-time = "2025-10-08T22:01:47.119Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b3/2e/299f62b401438d5fe1624119c723f5d877acc86a4c2492da405626665f12/tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45", size = 153236, upload-time = "2025-10-08T22:01:00.137Z" }, - { url = "https://files.pythonhosted.org/packages/86/7f/d8fffe6a7aefdb61bced88fcb5e280cfd71e08939da5894161bd71bea022/tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba", size = 148084, upload-time = "2025-10-08T22:01:01.63Z" }, - { url = "https://files.pythonhosted.org/packages/47/5c/24935fb6a2ee63e86d80e4d3b58b222dafaf438c416752c8b58537c8b89a/tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf", size = 234832, upload-time = "2025-10-08T22:01:02.543Z" }, - { url = "https://files.pythonhosted.org/packages/89/da/75dfd804fc11e6612846758a23f13271b76d577e299592b4371a4ca4cd09/tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441", size = 242052, upload-time = "2025-10-08T22:01:03.836Z" }, - { url = "https://files.pythonhosted.org/packages/70/8c/f48ac899f7b3ca7eb13af73bacbc93aec37f9c954df3c08ad96991c8c373/tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845", size = 239555, upload-time = "2025-10-08T22:01:04.834Z" }, - { url = "https://files.pythonhosted.org/packages/ba/28/72f8afd73f1d0e7829bfc093f4cb98ce0a40ffc0cc997009ee1ed94ba705/tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c", size = 245128, upload-time = "2025-10-08T22:01:05.84Z" }, - { url = "https://files.pythonhosted.org/packages/b6/eb/a7679c8ac85208706d27436e8d421dfa39d4c914dcf5fa8083a9305f58d9/tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456", size = 96445, upload-time = "2025-10-08T22:01:06.896Z" }, - { url = "https://files.pythonhosted.org/packages/0a/fe/3d3420c4cb1ad9cb462fb52967080575f15898da97e21cb6f1361d505383/tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be", size = 107165, upload-time = "2025-10-08T22:01:08.107Z" }, - { url = "https://files.pythonhosted.org/packages/ff/b7/40f36368fcabc518bb11c8f06379a0fd631985046c038aca08c6d6a43c6e/tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac", size = 154891, upload-time = "2025-10-08T22:01:09.082Z" }, - { url = "https://files.pythonhosted.org/packages/f9/3f/d9dd692199e3b3aab2e4e4dd948abd0f790d9ded8cd10cbaae276a898434/tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22", size = 148796, upload-time = "2025-10-08T22:01:10.266Z" }, - { url = "https://files.pythonhosted.org/packages/60/83/59bff4996c2cf9f9387a0f5a3394629c7efa5ef16142076a23a90f1955fa/tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f", size = 242121, upload-time = "2025-10-08T22:01:11.332Z" }, - { url = "https://files.pythonhosted.org/packages/45/e5/7c5119ff39de8693d6baab6c0b6dcb556d192c165596e9fc231ea1052041/tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52", size = 250070, upload-time = "2025-10-08T22:01:12.498Z" }, - { url = "https://files.pythonhosted.org/packages/45/12/ad5126d3a278f27e6701abde51d342aa78d06e27ce2bb596a01f7709a5a2/tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8", size = 245859, upload-time = "2025-10-08T22:01:13.551Z" }, - { url = "https://files.pythonhosted.org/packages/fb/a1/4d6865da6a71c603cfe6ad0e6556c73c76548557a8d658f9e3b142df245f/tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6", size = 250296, upload-time = "2025-10-08T22:01:14.614Z" }, - { url = "https://files.pythonhosted.org/packages/a0/b7/a7a7042715d55c9ba6e8b196d65d2cb662578b4d8cd17d882d45322b0d78/tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876", size = 97124, upload-time = "2025-10-08T22:01:15.629Z" }, - { url = "https://files.pythonhosted.org/packages/06/1e/f22f100db15a68b520664eb3328fb0ae4e90530887928558112c8d1f4515/tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878", size = 107698, upload-time = "2025-10-08T22:01:16.51Z" }, - { url = "https://files.pythonhosted.org/packages/89/48/06ee6eabe4fdd9ecd48bf488f4ac783844fd777f547b8d1b61c11939974e/tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b", size = 154819, upload-time = "2025-10-08T22:01:17.964Z" }, - { url = "https://files.pythonhosted.org/packages/f1/01/88793757d54d8937015c75dcdfb673c65471945f6be98e6a0410fba167ed/tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae", size = 148766, upload-time = "2025-10-08T22:01:18.959Z" }, - { url = "https://files.pythonhosted.org/packages/42/17/5e2c956f0144b812e7e107f94f1cc54af734eb17b5191c0bbfb72de5e93e/tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b", size = 240771, upload-time = "2025-10-08T22:01:20.106Z" }, - { url = "https://files.pythonhosted.org/packages/d5/f4/0fbd014909748706c01d16824eadb0307115f9562a15cbb012cd9b3512c5/tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf", size = 248586, upload-time = "2025-10-08T22:01:21.164Z" }, - { url = "https://files.pythonhosted.org/packages/30/77/fed85e114bde5e81ecf9bc5da0cc69f2914b38f4708c80ae67d0c10180c5/tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f", size = 244792, upload-time = "2025-10-08T22:01:22.417Z" }, - { url = "https://files.pythonhosted.org/packages/55/92/afed3d497f7c186dc71e6ee6d4fcb0acfa5f7d0a1a2878f8beae379ae0cc/tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05", size = 248909, upload-time = "2025-10-08T22:01:23.859Z" }, - { url = "https://files.pythonhosted.org/packages/f8/84/ef50c51b5a9472e7265ce1ffc7f24cd4023d289e109f669bdb1553f6a7c2/tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606", size = 96946, upload-time = "2025-10-08T22:01:24.893Z" }, - { url = "https://files.pythonhosted.org/packages/b2/b7/718cd1da0884f281f95ccfa3a6cc572d30053cba64603f79d431d3c9b61b/tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999", size = 107705, upload-time = "2025-10-08T22:01:26.153Z" }, - { url = "https://files.pythonhosted.org/packages/19/94/aeafa14a52e16163008060506fcb6aa1949d13548d13752171a755c65611/tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e", size = 154244, upload-time = "2025-10-08T22:01:27.06Z" }, - { url = "https://files.pythonhosted.org/packages/db/e4/1e58409aa78eefa47ccd19779fc6f36787edbe7d4cd330eeeedb33a4515b/tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3", size = 148637, upload-time = "2025-10-08T22:01:28.059Z" }, - { url = "https://files.pythonhosted.org/packages/26/b6/d1eccb62f665e44359226811064596dd6a366ea1f985839c566cd61525ae/tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc", size = 241925, upload-time = "2025-10-08T22:01:29.066Z" }, - { url = "https://files.pythonhosted.org/packages/70/91/7cdab9a03e6d3d2bb11beae108da5bdc1c34bdeb06e21163482544ddcc90/tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0", size = 249045, upload-time = "2025-10-08T22:01:31.98Z" }, - { url = "https://files.pythonhosted.org/packages/15/1b/8c26874ed1f6e4f1fcfeb868db8a794cbe9f227299402db58cfcc858766c/tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879", size = 245835, upload-time = "2025-10-08T22:01:32.989Z" }, - { url = "https://files.pythonhosted.org/packages/fd/42/8e3c6a9a4b1a1360c1a2a39f0b972cef2cc9ebd56025168c4137192a9321/tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005", size = 253109, upload-time = "2025-10-08T22:01:34.052Z" }, - { url = "https://files.pythonhosted.org/packages/22/0c/b4da635000a71b5f80130937eeac12e686eefb376b8dee113b4a582bba42/tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463", size = 97930, upload-time = "2025-10-08T22:01:35.082Z" }, - { url = "https://files.pythonhosted.org/packages/b9/74/cb1abc870a418ae99cd5c9547d6bce30701a954e0e721821df483ef7223c/tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8", size = 107964, upload-time = "2025-10-08T22:01:36.057Z" }, - { url = "https://files.pythonhosted.org/packages/54/78/5c46fff6432a712af9f792944f4fcd7067d8823157949f4e40c56b8b3c83/tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77", size = 163065, upload-time = "2025-10-08T22:01:37.27Z" }, - { url = "https://files.pythonhosted.org/packages/39/67/f85d9bd23182f45eca8939cd2bc7050e1f90c41f4a2ecbbd5963a1d1c486/tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf", size = 159088, upload-time = "2025-10-08T22:01:38.235Z" }, - { url = "https://files.pythonhosted.org/packages/26/5a/4b546a0405b9cc0659b399f12b6adb750757baf04250b148d3c5059fc4eb/tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530", size = 268193, upload-time = "2025-10-08T22:01:39.712Z" }, - { url = "https://files.pythonhosted.org/packages/42/4f/2c12a72ae22cf7b59a7fe75b3465b7aba40ea9145d026ba41cb382075b0e/tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b", size = 275488, upload-time = "2025-10-08T22:01:40.773Z" }, - { url = "https://files.pythonhosted.org/packages/92/04/a038d65dbe160c3aa5a624e93ad98111090f6804027d474ba9c37c8ae186/tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67", size = 272669, upload-time = "2025-10-08T22:01:41.824Z" }, - { url = "https://files.pythonhosted.org/packages/be/2f/8b7c60a9d1612a7cbc39ffcca4f21a73bf368a80fc25bccf8253e2563267/tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f", size = 279709, upload-time = "2025-10-08T22:01:43.177Z" }, - { url = "https://files.pythonhosted.org/packages/7e/46/cc36c679f09f27ded940281c38607716c86cf8ba4a518d524e349c8b4874/tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0", size = 107563, upload-time = "2025-10-08T22:01:44.233Z" }, - { url = "https://files.pythonhosted.org/packages/84/ff/426ca8683cf7b753614480484f6437f568fd2fda2edbdf57a2d3d8b27a0b/tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba", size = 119756, upload-time = "2025-10-08T22:01:45.234Z" }, - { url = "https://files.pythonhosted.org/packages/77/b8/0135fadc89e73be292b473cb820b4f5a08197779206b33191e801feeae40/tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b", size = 14408, upload-time = "2025-10-08T22:01:46.04Z" }, -] - -[[package]] -name = "tqdm" -version = "4.67.1" +version = "2.5.0" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2", size = 169737, upload-time = "2024-11-24T20:12:22.481Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2", size = 78540, upload-time = "2024-11-24T20:12:19.698Z" }, +sdist = { url = "https://files.pythonhosted.org/packages/b0/78/9ad63712633ed3ab5cc1a648d863d7e7da371e9425e209555a0fe711b695/tomli-2.5.0.tar.gz", hash = "sha256:264507556cd8b8c8e7c6ee037cdf443a463f03f4c958e57195e3d369711b8ff6", size = 17662, upload-time = "2026-10-07T12:23:37.892Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/a6/ab99b60ee52acd949684febabc3005d0045d0f66bebd9cdebd67372d26dd/tomli-2.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c4dc1c1781f2f716de763d1e9a7b34c6a894e167e291c7c5d16c72f7a9538545", size = 163901, upload-time = "2026-10-07T12:22:15.601Z" }, + { url = "https://files.pythonhosted.org/packages/bc/00/ee01b7ed4579180fff07142d290257f25ba786f23f3ec6005f620933c2f5/tomli-2.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:eff8babca5a7999bc137acbc7482a8b7e17ffca5075ab41f5d770ab408c7bfef", size = 163756, upload-time = "2026-10-07T12:22:16.957Z" }, + { url = "https://files.pythonhosted.org/packages/72/c2/4efebf65372f6583185f79799312109dddb61102d47e5c33dcfd1a297aca/tomli-2.5.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:86665cee9c4835b7a7f1e8ec2c719b5258d4dc782887aded5a8ae7352a96843b", size = 268038, upload-time = "2026-10-07T12:22:18.135Z" }, + { url = "https://files.pythonhosted.org/packages/53/07/5850468e925d898abb36038666f9c333a94d2a223e802a8ba5b6d319d23f/tomli-2.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7e369fd63331746182360977b1892bfc215476a30d61612d732425311639f56", size = 276422, upload-time = "2026-10-07T12:22:19.567Z" }, + { url = "https://files.pythonhosted.org/packages/b4/87/f293984cdcf83c054196d4fd3dad44fc68ae55b4b8c44bc76cef360c3150/tomli-2.5.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7ad1ea345759240d6463efa0ed1c704402752e49aa21476620738d74d72d8aa1", size = 272616, upload-time = "2026-10-07T12:22:20.794Z" }, + { url = "https://files.pythonhosted.org/packages/ce/ce/db582886b3c1219d3fec93ebd669332482e5aee7a91e0f7838d84f2d1759/tomli-2.5.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:96243987194634bd411066ce40c952e108f86af04db533ecd8ac3ff2a85b1885", size = 276593, upload-time = "2026-10-07T12:22:22.12Z" }, + { url = "https://files.pythonhosted.org/packages/bf/72/7619b87dea4261fc27dd7b54c4461c129c1f7d9bb7ba3aec89c797a431b8/tomli-2.5.0-cp311-cp311-win32.whl", hash = "sha256:610b27d99f28ec5f191c7064a48f3ddb179a1fe6ca73d571483ae859f57b605e", size = 101830, upload-time = "2026-10-07T12:22:23.651Z" }, + { url = "https://files.pythonhosted.org/packages/1e/74/220106da34502304b6751a2a9b8a9fbca6c3fd47e737a2e2e3da7c61c9db/tomli-2.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:c804ae44fe7b4bab5da295e4f980a1ff04670bca9d23fe0a4e887e08ebd741a8", size = 112742, upload-time = "2026-10-07T12:22:24.972Z" }, + { url = "https://files.pythonhosted.org/packages/27/99/7d9c8b41837a7773613e169504147375c157a290167aa59ad74a085f521f/tomli-2.5.0-cp311-cp311-win_arm64.whl", hash = "sha256:cfac177ebd6236003846ea339981f71457cb6eb748f23381eb257e45092e3980", size = 109332, upload-time = "2026-10-07T12:22:26.117Z" }, + { url = "https://files.pythonhosted.org/packages/52/ed/7baa86f87493646a594de388c7c1c40a39dd0461f7e9c0359cbeefc91fe8/tomli-2.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:1f4a40d03fb9f63424f0979855bdeaf44dd7696b8d59501822c10ed30ba532df", size = 164854, upload-time = "2026-10-07T12:22:27.444Z" }, + { url = "https://files.pythonhosted.org/packages/a5/b1/44c0341f2224397855723c7a8a39f718ea6fcbcc3dacc66e5aeca0f334e3/tomli-2.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9ebf8d19b17bd0daeb7b7dec81a946a439b753942fd0210d6e96c532249eea6b", size = 164074, upload-time = "2026-10-07T12:22:28.679Z" }, + { url = "https://files.pythonhosted.org/packages/23/04/e2d5b7d3fba47adedb23de616c16d428ea076c79a3d8e1d95d649ffe197e/tomli-2.5.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf0b5e8e0f68ebb494356e577c06c139161efd8d3b9050f93b39b7c26cc54ff0", size = 274274, upload-time = "2026-10-07T12:22:29.804Z" }, + { url = "https://files.pythonhosted.org/packages/43/90/6090e706ff27a6f89f4a40578e3324b95c3cd8c4150868aabf33a8f414c3/tomli-2.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6cf74416bdc94ae458b14e37286c1073081850ac8459a00d0c5efef5d44294c6", size = 286435, upload-time = "2026-10-07T12:22:31.297Z" }, + { url = "https://files.pythonhosted.org/packages/0a/9e/a2c40768df16c408f22430afb0a73e9d7e5f79c950884954649d1146b74d/tomli-2.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:61ea1ebe1e55a34ea8199cc8dbff398d35027b82271c8ac4802fd3a1fd5b1bcc", size = 278119, upload-time = "2026-10-07T12:22:32.601Z" }, + { url = "https://files.pythonhosted.org/packages/12/25/3c0cb485b98e9cfac495629b1c93c87ccf0b72fbe9d2689fd8fe62c6d5a3/tomli-2.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ed53f7e89bb04f6d9e8e7799112360b0c4d5cbff067de0814c98c37c39b920f7", size = 286177, upload-time = "2026-10-07T12:22:33.745Z" }, + { url = "https://files.pythonhosted.org/packages/77/8b/0144c65f0e37e51c18d04ae15c21b19431c165002d0131fe9aa8b0b8b1e8/tomli-2.5.0-cp312-cp312-win32.whl", hash = "sha256:e7ad033e27a516a233bea839cdb77b80146facb3b4f40bf02cd0cac165cdd5c2", size = 102760, upload-time = "2026-10-07T12:22:34.887Z" }, + { url = "https://files.pythonhosted.org/packages/de/32/5d6d8f42fc9a05fce69354e00ff256484192f5f2fc9a2165718fa0de61ec/tomli-2.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:bd05de8c1698f8413dd7d869492693a0bf2211543b787ac78cd5e7536af1a6d7", size = 112722, upload-time = "2026-10-07T12:22:36.162Z" }, + { url = "https://files.pythonhosted.org/packages/30/65/df18032218db0fb9b769fb23c8039a051f15c811993995ea04c350273a32/tomli-2.5.0-cp312-cp312-win_arm64.whl", hash = "sha256:069435bd5480429b98c5e5afb02ab21c219b6f0064680671c6dc0d46817346ea", size = 109534, upload-time = "2026-10-07T12:22:37.296Z" }, + { url = "https://files.pythonhosted.org/packages/42/e5/51736d70da209350969e15aca5c5ab6e2ce1ea87a0a892a6c13aec172a86/tomli-2.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:943276cf269e0071948d9ff697159c1735e623c1151d88abb09b74659ef0cbea", size = 163328, upload-time = "2026-10-07T12:22:38.373Z" }, + { url = "https://files.pythonhosted.org/packages/ec/55/086f80dab4ab497602644274e6dea7ec5dd0b4e262e443a8ad3bb7edee2d/tomli-2.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:463b16086865b97facd8d0b3fb4cb7c544e3f58d2a69dc3113d6db9653fdb043", size = 162246, upload-time = "2026-10-07T12:22:39.673Z" }, + { url = "https://files.pythonhosted.org/packages/aa/eb/3ecc94459f3635c92321f4e7bde571323fdb2267c50e19e3188a281eae3b/tomli-2.5.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1245a6638fc4bb0a60af38a7d45413db34a13842027c77597c712c998c62fdf0", size = 272655, upload-time = "2026-10-07T12:22:41.08Z" }, + { url = "https://files.pythonhosted.org/packages/c0/d7/494fd1f0c37a621f1ad9975c2efadb523e8101f144ed6edb2e7fe64738f2/tomli-2.5.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5d8bac3d603c97e6854424e5b2b5b741bdbde387e09f162fb0446812b4a8362b", size = 283595, upload-time = "2026-10-07T12:22:42.222Z" }, + { url = "https://files.pythonhosted.org/packages/70/51/bb8d62b1317e6640866f6949b2d5855e5300f2c99d46de1cd245570bba65/tomli-2.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:21e4cae4114aba25aa0d4f85cdf486d290fb35c0954d7bba536248da64d43066", size = 276253, upload-time = "2026-10-07T12:22:43.625Z" }, + { url = "https://files.pythonhosted.org/packages/66/f4/f46bd7f0763cd47de2db697dca9257c6a4adfd1a93b018cc75c8190ed5a8/tomli-2.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bbaefc84548d754be821bba7c4141c4787dda182f9e77f2f87b71213529efa7b", size = 283582, upload-time = "2026-10-07T12:22:44.983Z" }, + { url = "https://files.pythonhosted.org/packages/ac/03/70f2bcb2923a6db37818d917e124270a7f4cfd38ea576f5aa753a91c0ef5/tomli-2.5.0-cp313-cp313-win32.whl", hash = "sha256:abdbf6313b8d9efe157edeb7ab6eae4de064b1300ad31abf73755154b30abe68", size = 102628, upload-time = "2026-10-07T12:22:46.508Z" }, + { url = "https://files.pythonhosted.org/packages/dc/98/d52024bb5b0ff68b4f0d276d867f634c84a67319a7e9f6b7708a37742333/tomli-2.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:fd4dc129784e0c5335bd4e61dfcc4487499a013419e655cf2da1d091b7e0efdc", size = 113301, upload-time = "2026-10-07T12:22:47.647Z" }, + { url = "https://files.pythonhosted.org/packages/6f/f2/540db3a70572a8c23a28aba3e9c358ce0ffffbafc990905c1343aa265b31/tomli-2.5.0-cp313-cp313-win_arm64.whl", hash = "sha256:69491c143d2fe063046e0301e62a810bed338fa4d1ce0fd870c27dc1e09b0d84", size = 109744, upload-time = "2026-10-07T12:22:48.925Z" }, + { url = "https://files.pythonhosted.org/packages/e4/49/caf6b307766eb9567664a8707e9d6be5fcc0e8903f18781c6677a60d80c7/tomli-2.5.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d3182ee2d887e507bd67319a0a61105d1dd33facc111329559a233b772c1a105", size = 162899, upload-time = "2026-10-07T12:22:50.088Z" }, + { url = "https://files.pythonhosted.org/packages/d3/c8/68cfce773a2733a49c74f99d627fb461bd990756860099eac25617889585/tomli-2.5.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:521345fd1f19d45b8df87657aaa38b6f2ca3800059fadf428e7ebf479a383646", size = 162080, upload-time = "2026-10-07T12:22:51.558Z" }, + { url = "https://files.pythonhosted.org/packages/7e/b2/e5bb8651fdad593f670501a7d718b1a7f73f064d44dea15e04c04dfef45d/tomli-2.5.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6e95c7614e705bfe2b04b27aa124adec59752d15813df37e2156747cab3a006b", size = 273380, upload-time = "2026-10-07T12:22:52.918Z" }, + { url = "https://files.pythonhosted.org/packages/8d/d2/9e2d7f8b1dfe0e2b34c245986ebd55c4c553ea4ce6c47c443b332673253f/tomli-2.5.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7ac2027d37c3afbdf4bdd377f2676f6f1d2122a5be1f1137b49dced590b37e75", size = 283228, upload-time = "2026-10-07T12:22:54.173Z" }, + { url = "https://files.pythonhosted.org/packages/ba/df/ec7b876b7b1a2718bd74a3743c076fff565b04029ba33e8f61fac262739f/tomli-2.5.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c414be4ed9d3cac80c42e348fa5a956117d1a48227f48026e31f59cb4a7671eb", size = 277189, upload-time = "2026-10-07T12:22:55.342Z" }, + { url = "https://files.pythonhosted.org/packages/7d/7b/e192d9eed0b9cb80da799f4d77052297fb9a2c3cc9b19f571f56ea88add6/tomli-2.5.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9b03d7dc168353b4132965bde20feceabaa470e570c6f59660dfae59b1f9eeb3", size = 283632, upload-time = "2026-10-07T12:22:56.735Z" }, + { url = "https://files.pythonhosted.org/packages/84/50/ff94454e75461d75623e47401ed323d65c10aab8fe9033242c20cd2fdf32/tomli-2.5.0-cp314-cp314-win32.whl", hash = "sha256:6f041843c4d3a37245c0c056fd955b186bf8b1fb85690cbe40b81230891dc34b", size = 103535, upload-time = "2026-10-07T12:22:58.084Z" }, + { url = "https://files.pythonhosted.org/packages/54/0b/bdacf05f963bd6026ebf6eeb0beda847d1d60e03e440725c64a4e08a0afd/tomli-2.5.0-cp314-cp314-win_amd64.whl", hash = "sha256:f4b653094e18f9031102d3a1da5c729c8f222d85225b18037dac621695e46e1a", size = 114621, upload-time = "2026-10-07T12:22:59.2Z" }, + { url = "https://files.pythonhosted.org/packages/61/99/53f438fa6ae4f9d4ed0ddde3e7242b3bdc34b48c8f9948b72b9e9b127676/tomli-2.5.0-cp314-cp314-win_arm64.whl", hash = "sha256:3f89d10c1ff6a38d992c27fc8a4816af71a909e08a40ec66934240b1e74347c3", size = 111572, upload-time = "2026-10-07T12:23:00.479Z" }, + { url = "https://files.pythonhosted.org/packages/b9/20/1f88f19427d380a40e90a770e087489eaafe4aeee070ae88ed2bbec00acd/tomli-2.5.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:e9e15b4a6c7dd6b85b5fbab29488a73f1f70de516942308daa266bf0e0aeb0d4", size = 171814, upload-time = "2026-10-07T12:23:01.914Z" }, + { url = "https://files.pythonhosted.org/packages/d0/56/cbe5079c9f9a54b9b3e27fc82f08f3cb36edee75561679f53d2380c801d6/tomli-2.5.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e12bbcd32897272fb05929110362ae9ff4c1b9bb26bd9e971e71dcd3275b4c3d", size = 171324, upload-time = "2026-10-07T12:23:03.18Z" }, + { url = "https://files.pythonhosted.org/packages/2b/30/1d53fd3b0f1cb3ba542e345ec32c26aefdddc4e829e4f3429af8a4f27782/tomli-2.5.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:20aa36de8f2cf87237143bc1fa1aae8d6612c09118f4da21c6a684db5dd1f6f9", size = 297441, upload-time = "2026-10-07T12:23:04.345Z" }, + { url = "https://files.pythonhosted.org/packages/66/d9/0800acb6a111686f764c1b91ef15cc42a20a66a46013bb42220f1d2c61c1/tomli-2.5.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22185fad8a1e622f064e78008018a0dd3323550dcb479cb7a1d296888d74024f", size = 307476, upload-time = "2026-10-07T12:23:05.671Z" }, + { url = "https://files.pythonhosted.org/packages/e8/63/30a8f3cd51b5bec37f04744bad0b0dc6160df84aad4f27b0e9283d66f221/tomli-2.5.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:984012f71908165449a951de2050d52f276bfe3aa5d5f570f63ddad814370374", size = 296113, upload-time = "2026-10-07T12:23:07.202Z" }, + { url = "https://files.pythonhosted.org/packages/ab/18/0b9ffc597e69c5a1e20a7823cb60d54b39a9f54e91edcb8574f022186758/tomli-2.5.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f79203b3965b4000e91808aaa7c040206093f2b8bf86f455982f2274c9ccf442", size = 307725, upload-time = "2026-10-07T12:23:08.508Z" }, + { url = "https://files.pythonhosted.org/packages/ab/c7/18f8baae0b5607a60e8e19b4a7fedee43a8ff6458e3896dcbbadeeac9c22/tomli-2.5.0-cp314-cp314t-win32.whl", hash = "sha256:91294a9fb94a75542f6e46e4a2ae709bd8d9b51134098cae5cf3bea5478b6d03", size = 108546, upload-time = "2026-10-07T12:23:09.956Z" }, + { url = "https://files.pythonhosted.org/packages/72/34/4cca9739254130627bde87500b3f2b512154fe2f278efa7e2a5e10ad4bcb/tomli-2.5.0-cp314-cp314t-win_amd64.whl", hash = "sha256:f15e3e0b835a6d68b10c86bf80a3149780498d6911c93c3ffd1861d19f9200f1", size = 117814, upload-time = "2026-10-07T12:23:11.486Z" }, + { url = "https://files.pythonhosted.org/packages/7d/fb/afa530d47dd80a78fce43beac6bc6e00f84558eafcffbc6f37b21e80d056/tomli-2.5.0-cp314-cp314t-win_arm64.whl", hash = "sha256:6664b7ae7af7294256c53960a6103077f4914cec8ff98479c352f622c6f6b2f0", size = 115188, upload-time = "2026-10-07T12:23:12.728Z" }, + { url = "https://files.pythonhosted.org/packages/66/98/316fdc00f8c0939e6fe50461dd343c162d3ad51d1286eb25b7db54361d50/tomli-2.5.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:a525685c2f97da40762b8695eb7aa0af4c8344ca1905c73e4e29cb04d34607dc", size = 162775, upload-time = "2026-10-07T12:23:13.941Z" }, + { url = "https://files.pythonhosted.org/packages/c5/22/7b10fa5bb01c9539f53f69b619361b19350acc73657772ea7ac70ba309a8/tomli-2.5.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:9dbb18c1cfb2f6517942fc9314437f66aa06d94436ffb1f06102ef3572f35276", size = 161406, upload-time = "2026-10-07T12:23:15.215Z" }, + { url = "https://files.pythonhosted.org/packages/9c/e7/1a069d86dfd20f1f84f71c63faed9f83c1d890bc06c27d82dc7d888fb573/tomli-2.5.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:752e8b1aa6a4367ef8bf6a1a1e005540f7ed055ba36d7193796812ca5404eb52", size = 273855, upload-time = "2026-10-07T12:23:16.471Z" }, + { url = "https://files.pythonhosted.org/packages/ae/83/d1ef43d1687d092ab9c235455c76e6e709483b346b056f086095c7c263a5/tomli-2.5.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c47300f9bf791808f77d82747691c4bb09cb14bdf3060cca99b42cdc4361d5a7", size = 284910, upload-time = "2026-10-07T12:23:18.166Z" }, + { url = "https://files.pythonhosted.org/packages/cc/05/f4d9cf7de61822ece0c3873f30d291e324911c71a378b8bfe5ced13fd9f5/tomli-2.5.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:19b0dd8749f4ea2f112c5fcfb3c5248390c899d7e2e173f1d91abee1fa0ff391", size = 277723, upload-time = "2026-10-07T12:23:19.355Z" }, + { url = "https://files.pythonhosted.org/packages/42/28/78262493141fa543151cf005760c3cb01d09fc28a11f993c05109902cb8c/tomli-2.5.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:57b1c3b01fab802e2899bc3d168dca320e14165e2fd9fd584760fb4ca5826859", size = 285115, upload-time = "2026-10-07T12:23:20.698Z" }, + { url = "https://files.pythonhosted.org/packages/1a/b9/e1dab9a30bcb677b5cc5cee810609cfd64f24306a3055767dd3fda00b1e0/tomli-2.5.0-cp315-cp315-win32.whl", hash = "sha256:667e521b37a6c5ccaa044202c235b530f90177ffe2cd4a64ecc213c7dd535feb", size = 103475, upload-time = "2026-10-07T12:23:21.941Z" }, + { url = "https://files.pythonhosted.org/packages/4c/bd/31a3790c11d6ea95fcf5e6022ac0f8d0543c9b61120b730fc481bd43d3b4/tomli-2.5.0-cp315-cp315-win_amd64.whl", hash = "sha256:d747252933c8a65ef6bd8da0fbb7ce28a90eb6119d8cd00772cd528aa07b68d5", size = 114589, upload-time = "2026-10-07T12:23:23.098Z" }, + { url = "https://files.pythonhosted.org/packages/47/a2/4f6310fa699364f0e3af7ee3af88dddd9af066d33e716a0265bbe2b3ea84/tomli-2.5.0-cp315-cp315-win_arm64.whl", hash = "sha256:75dbcde8751b0a960aa3de173aa5e894d590755c6d7758b7e774c06f1dc3cbdd", size = 111493, upload-time = "2026-10-07T12:23:24.233Z" }, + { url = "https://files.pythonhosted.org/packages/68/14/00853f0b396d8971107ae1921bb5b322fdee1650d2f16bf06c20adb532e5/tomli-2.5.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:2419c2a189551987b59d80e63ec355671283336f41c6b9b89462df679c7d0c57", size = 171380, upload-time = "2026-10-07T12:23:25.512Z" }, + { url = "https://files.pythonhosted.org/packages/89/ad/fa6949321dadee46b27363974fb197b94c911c3b0f7a5fd26d7dc18fc2a0/tomli-2.5.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:0dc598040da8d42cf20f0be588ed7004f46db12a0ac6c32e03a59dccedaaadcd", size = 170553, upload-time = "2026-10-07T12:23:26.855Z" }, + { url = "https://files.pythonhosted.org/packages/53/aa/3056c919eb3e084df3752b2cf5f865dcc04af0b27dba2f66d7b28af4633a/tomli-2.5.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49096930c8d886c9bbdab62d2d0d17ce823ddeea522309a190b36245d5b49e01", size = 294428, upload-time = "2026-10-07T12:23:28.132Z" }, + { url = "https://files.pythonhosted.org/packages/96/b2/faeeb5d8769ea3832021d73e892c8391eae7b4b4f8b55a789127bd8b18a9/tomli-2.5.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8ade5023067f99fe72b88accd30d0ea05a158e9e32a11f124e731ea9695313f", size = 304909, upload-time = "2026-10-07T12:23:29.381Z" }, + { url = "https://files.pythonhosted.org/packages/f6/52/f094c09e73fb654b621716d019acb5d29bdfd1be01df80c281d552bda48d/tomli-2.5.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:b69564772b5c8f22ea5f498dff08cfa825045b4d4c4400529000bdf818aa3b2a", size = 293220, upload-time = "2026-10-07T12:23:30.608Z" }, + { url = "https://files.pythonhosted.org/packages/86/f5/0c30541078ca4b505ce3bd76ed931facbfec524dd018535d691d1af0a6d2/tomli-2.5.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:8ff3a2ca028c7eee0c777f9a092038d0a594a9fa04e215f929a22c329e2cb142", size = 305705, upload-time = "2026-10-07T12:23:32.181Z" }, + { url = "https://files.pythonhosted.org/packages/05/74/590e7d19d6a118fc5cc5704ff358e21d95b8573f6b9443b1519f29ca8825/tomli-2.5.0-cp315-cp315t-win32.whl", hash = "sha256:62fc1bc8eb03e3a9cadfca713d65614ed8e09d974a283295ffe3a831976b4dc5", size = 108432, upload-time = "2026-10-07T12:23:33.496Z" }, + { url = "https://files.pythonhosted.org/packages/1c/b8/63a75cfb27a17c38550e44025d3a6e7be64516fd8608a3b75703bf37d81b/tomli-2.5.0-cp315-cp315t-win_amd64.whl", hash = "sha256:f3fcbc57b1791fa6cbe5d8434179d51de12be1a4811469529f47f6e7487a2571", size = 117281, upload-time = "2026-10-07T12:23:34.648Z" }, + { url = "https://files.pythonhosted.org/packages/72/01/e8c1debb2173973372934c68fc8e46170ab60ef23ed4592dff4dec6e8993/tomli-2.5.0-cp315-cp315t-win_arm64.whl", hash = "sha256:d2ba24db8a9376921b5e87b4762b9adb0f3f1deaea68f2b8b0bb2c11efb9c3e7", size = 115069, upload-time = "2026-10-07T12:23:35.77Z" }, + { url = "https://files.pythonhosted.org/packages/60/3f/3e3f8fd0919249b0200c80fbc4f9a1e70be19f9883da71dfb7f8b9ab8aca/tomli-2.5.0-py3-none-any.whl", hash = "sha256:32a7b79ac57a2e83670ce329ccf675798bc5a2094783a63676866b70503f2e2b", size = 14765, upload-time = "2026-10-07T12:23:36.875Z" }, +] + +[[package]] +name = "tomlkit" +version = "0.13.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz", hash = "sha256:430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1", size = 185207, upload-time = "2025-06-05T07:13:44.947Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bd/75/8539d011f6be8e29f339c42e633aae3cb73bffa95dd0f9adec09b9c58e85/tomlkit-0.13.3-py3-none-any.whl", hash = "sha256:c89c649d79ee40629a9fda55f8ace8c6a1b42deb912b2a8fd8d942ddadb606b0", size = 38901, upload-time = "2025-06-05T07:13:43.546Z" }, +] + +[[package]] +name = "truststore" +version = "0.10.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ee/9f/c5201d42a484c061e528825fc8e2d565f5abd50a4ced6fb7d29c4ec99b2b/truststore-0.10.5.tar.gz", hash = "sha256:30d36967ccaded5cbb38d602c433f53600036c79d502f4533a49b60a03bbefcd", size = 28091, upload-time = "2026-10-12T22:27:31.808Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/51/e9/3a7820be2bb0fe53b6bc9c3be26d3d1158004e4c3ab953aa6840b955b1e9/truststore-0.10.5-py3-none-any.whl", hash = "sha256:9aaaedaefaf06d8b206278cf8b5012bc897f485a874503501e12d776df78951c", size = 19017, upload-time = "2026-10-12T22:27:30.377Z" }, ] [[package]] @@ -3191,7 +4917,7 @@ wheels = [ [[package]] name = "twisted" -version = "25.5.0" +version = "26.4.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "attrs" }, @@ -3202,239 +4928,791 @@ dependencies = [ { name = "typing-extensions" }, { name = "zope-interface" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/13/0f/82716ed849bf7ea4984c21385597c949944f0f9b428b5710f79d0afc084d/twisted-25.5.0.tar.gz", hash = "sha256:1deb272358cb6be1e3e8fc6f9c8b36f78eb0fa7c2233d2dbe11ec6fee04ea316", size = 3545725, upload-time = "2025-06-07T09:52:24.858Z" } +sdist = { url = "https://files.pythonhosted.org/packages/db/97/6e9beb1e78247ae6dc34114f27d538cf2cb183c4afcd3609dfdf2b0439c8/twisted-26.4.0.tar.gz", hash = "sha256:dbfd0fe1ee409d0243fdd7a6a6ff14f4948cec1fd78e0376291f805e1501fae9", size = 3575095, upload-time = "2026-05-11T11:24:51.861Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/eb/66/ab7efd8941f0bc7b2bd555b0f0471bff77df4c88e0cc31120c82737fec77/twisted-25.5.0-py3-none-any.whl", hash = "sha256:8559f654d01a54a8c3efe66d533d43f383531ebf8d81d9f9ab4769d91ca15df7", size = 3204767, upload-time = "2025-06-07T09:52:21.428Z" }, + { url = "https://files.pythonhosted.org/packages/a6/57/bcf4e2370dd218c9aa68a9140a65d86729c73f1d529f7e94786c2766fc72/twisted-26.4.0-py3-none-any.whl", hash = "sha256:dc25ea0ebf6511c24f03232ee9f4afa54b291c5d897990e3a39cc4d14a1ef4c0", size = 3230362, upload-time = "2026-05-11T11:24:49.5Z" }, ] [[package]] -name = "types-protobuf" -version = "6.32.1.20250918" +name = "types-aioboto3" +version = "15.5.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/69/5a/bd06c2dbb77ebd4ea764473c9c4c014c7ba94432192cb965a274f8544b9d/types_protobuf-6.32.1.20250918.tar.gz", hash = "sha256:44ce0ae98475909ca72379946ab61a4435eec2a41090821e713c17e8faf5b88f", size = 63780, upload-time = "2025-09-18T02:50:39.391Z" } +dependencies = [ + { name = "botocore-stubs" }, + { name = "types-aiobotocore" }, + { name = "types-s3transfer" }, + { name = "typing-extensions", marker = "python_full_version < '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/56/76/e162ea2ef8d414d4f36f28a6e0b6078ccef3f2f9d5f957859f303995c528/types_aioboto3-15.5.0.tar.gz", hash = "sha256:5769a1c3df7ca1abedf3656ddf0b970c9b0436d0f88cf4686040b55cd2a02925", size = 81059, upload-time = "2025-10-31T01:11:54.445Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/37/5a/8d93d4f4af5dc3dd62aa4f020deae746b34b1d94fb5bee1f776c6b7e9d6c/types_protobuf-6.32.1.20250918-py3-none-any.whl", hash = "sha256:22ba6133d142d11cc34d3788ad6dead2732368ebb0406eaa7790ea6ae46c8d0b", size = 77885, upload-time = "2025-09-18T02:50:38.028Z" }, + { url = "https://files.pythonhosted.org/packages/ec/1d/e187fbe9771dffb5f0801e315ac23a6c383c14d1cbb90da6ca3ad1ea9b06/types_aioboto3-15.5.0-py3-none-any.whl", hash = "sha256:8aed7c9b6fe9b59e6ce74f7a6db7b8a9912a34c8f80ed639fac1fa59d6b20aa1", size = 42521, upload-time = "2025-10-31T01:11:47.832Z" }, +] + +[package.optional-dependencies] +s3 = [ + { name = "types-aiobotocore-s3" }, ] [[package]] -name = "types-requests" -version = "2.32.4.20250913" +name = "types-aiobotocore" +version = "3.9.2" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "urllib3" }, + { name = "botocore-stubs" }, + { name = "typing-extensions", marker = "python_full_version < '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/43/cd/79562ee488be03558881bc2ae402bcfc712d234545b5d7fd7628a20a08e0/types_aiobotocore-3.9.2.tar.gz", hash = "sha256:c7ed080b6dc414cdd4e358f4deeb0eb73dccb1bfd539b2dc7b9422618ab70608", size = 90177, upload-time = "2026-10-01T04:52:56.583Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b9/e2/5ccbf548bbbb370b81fbde75f331ba6bc253633d1f3a04140300637d0322/types_aiobotocore-3.9.2-py3-none-any.whl", hash = "sha256:c20d291feb09c4fd5681d7ce9ea6226ed58f9643f2364c5abc90aa29f188ebea", size = 55589, upload-time = "2026-10-01T04:52:52.341Z" }, +] + +[[package]] +name = "types-aiobotocore-s3" +version = "2.25.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a7/c6/9bb91a44eed1114690edb15d8251f32392e355dfa0a5b8e1c190b4cf89a4/types_aiobotocore_s3-2.25.2.tar.gz", hash = "sha256:678aa425491af19bd6d011d59ecdbbb7ae7e95800efddcf4fd559ab72c94e194", size = 75955, upload-time = "2025-11-12T01:52:06.536Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b4/0a/d0d9faefd7caa8536eb97647c38c711e73ab83341a65119d08c2cb20957d/types_aiobotocore_s3-2.25.2-py3-none-any.whl", hash = "sha256:151301e84bb2f1cbf30f0d1ef791bb75c141cfbfe47b93fd317b7f1ba3eb35e4", size = 83626, upload-time = "2025-11-12T01:52:04.763Z" }, +] + +[[package]] +name = "types-protobuf" +version = "7.35.1.20260906" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e1/6c/e3e5b3e10bc328126a39637c138f9ebfd734bf14342b9f3540039b4ab995/types_protobuf-7.35.1.20260906.tar.gz", hash = "sha256:efd1a3862d4c967dad5512ef8d56b1530ac84f182c41735b94004756518c4998", size = 69895, upload-time = "2026-09-06T06:35:28.308Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/44/4e/f63e826c68f77ef875506d72f225918800346545ee99847bc28f3394f18d/types_protobuf-7.35.1.20260906-py3-none-any.whl", hash = "sha256:5155e48569e0dabff303fdf578db96cd31ea9a4a63b18018a4ceac6b0ae17462", size = 86419, upload-time = "2026-09-06T06:35:27.247Z" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/36/27/489922f4505975b11de2b5ad07b4fe1dca0bca9be81a703f26c5f3acfce5/types_requests-2.32.4.20250913.tar.gz", hash = "sha256:abd6d4f9ce3a9383f269775a9835a4c24e5cd6b9f647d64f88aa4613c33def5d", size = 23113, upload-time = "2025-09-13T02:40:02.309Z" } + +[[package]] +name = "types-s3transfer" +version = "0.19.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/61/29/4df7e8eccfdaac9308e06ae94271eb0e5d2324cbe6df241363c44b70e08c/types_s3transfer-0.19.2.tar.gz", hash = "sha256:2a78a806c09b11fc6d59756402ade26b49b93a85ac6f209a39e2498211c6a41b", size = 13766, upload-time = "2026-10-13T01:42:25.222Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/20/9a227ea57c1285986c4cf78400d0a91615d25b24e257fd9e2969606bdfae/types_requests-2.32.4.20250913-py3-none-any.whl", hash = "sha256:78c9c1fffebbe0fa487a418e0fa5252017e9c60d1a2da394077f1780f655d7e1", size = 20658, upload-time = "2025-09-13T02:40:01.115Z" }, + { url = "https://files.pythonhosted.org/packages/93/02/3fa02c57a65f8721030247866d28c1a6601d7826297e83059c50b7d6ce7e/types_s3transfer-0.19.2-py3-none-any.whl", hash = "sha256:f1167b9a082a49fc55f12700dcbd3a8b540b9e6fec4e1d782ff44f3eef0bdbff", size = 19473, upload-time = "2026-10-13T01:42:23.813Z" }, ] [[package]] name = "typing-extensions" -version = "4.15.0" +version = "4.16.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, ] [[package]] name = "typing-inspection" -version = "0.4.2" +version = "0.4.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a3/26/b09b8010994eccc3c09092e6b34058f36a460eea2d4c3e8b910c695975a0/typing_inspection-0.4.4.tar.gz", hash = "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47", size = 76928, upload-time = "2026-08-12T12:37:25.997Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, + { url = "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", size = 14750, upload-time = "2026-08-12T12:37:24.648Z" }, ] [[package]] name = "urllib3" -version = "2.5.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760", size = 393185, upload-time = "2025-06-18T14:07:41.644Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc", size = 129795, upload-time = "2025-06-18T14:07:40.39Z" }, +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, +] + +[[package]] +name = "uuid-utils" +version = "0.17.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4c/80/cf6934a2030a5f6763f604314c1105f851d90aa1fe344c2692c3b88a9d95/uuid_utils-0.17.1.tar.gz", hash = "sha256:10c51d54ecdf0617640e505eae6d2e6443d8e414d4f9d6e8d43949a450c56e6b", size = 43323, upload-time = "2026-09-08T11:29:35.42Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f8/74/61cc613cf7c94131b2d1d596c4f2c0ec22c804b2852cc740288a1519743f/uuid_utils-0.17.1-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:e698d0ffccf167ece87c864667ab69724685af9e171fc51e57038c9711fd4e0a", size = 562905, upload-time = "2026-09-08T11:27:50.715Z" }, + { url = "https://files.pythonhosted.org/packages/eb/4a/88413c15de714a76e342321d65ff82937a2bdcc35e2987c9462433025101/uuid_utils-0.17.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d9aa5fccd372580d455ab769a60326c789c46027d3d58ff2a895dbc492200b0d", size = 286703, upload-time = "2026-09-08T11:27:52.108Z" }, + { url = "https://files.pythonhosted.org/packages/23/4f/9cfd9f64ceab2b6aeff77cd238b0033baa6364832cc9715d13a8cd49e5ff/uuid_utils-0.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0cb9661bc0883e9278bc2436514298ace83121d14296cc672b2c44d37441cd0", size = 325258, upload-time = "2026-09-08T11:27:53.315Z" }, + { url = "https://files.pythonhosted.org/packages/42/eb/7057247670b903194c2739f98a0f4455f0d4e8cfa13466dde2d1fdba7216/uuid_utils-0.17.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f63557d6e9fe10cb25c1d3e73dbf7cd18c1b1620349b6be6b51ea25fcadf3a1e", size = 333013, upload-time = "2026-09-08T11:27:54.535Z" }, + { url = "https://files.pythonhosted.org/packages/6b/6d/8e26ef16da28274d3ddfe0812a7155dc8d48d0891abd84f2b1a3f905a54a/uuid_utils-0.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b94f1185f64d1fd2fa99ffc0b8264ee5980a862010daf1edf430412044f2aa53", size = 450348, upload-time = "2026-09-08T11:27:55.777Z" }, + { url = "https://files.pythonhosted.org/packages/e6/8d/70d8f78830ca23f40d15f95795a863e7c052f5c1dff2e4a23f51c53dfbdc/uuid_utils-0.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3404d50a60ec74642fd590b9d639d98770022f4b1ff8a4055b3c70742c85f096", size = 327961, upload-time = "2026-09-08T11:27:57.098Z" }, + { url = "https://files.pythonhosted.org/packages/af/f2/62ab19bc908ef6cdb2a07966a408cf8bc2cf981cd7c3c99dc34f443b5ced/uuid_utils-0.17.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:601d03cce6b8ec3734025c7dca9ab276df1ab649ca7b13d76ea03824724f5108", size = 352645, upload-time = "2026-09-08T11:27:58.262Z" }, + { url = "https://files.pythonhosted.org/packages/7f/86/f8e62e055f14b45b6faa784008a038407f9274d36acc41d39b4b8b0f00a1/uuid_utils-0.17.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1a9e8c876a5d6247572e7f8eace39b4de9a91cd1b026e24552ec631c08c91394", size = 503128, upload-time = "2026-09-08T11:27:59.678Z" }, + { url = "https://files.pythonhosted.org/packages/04/57/4bc764249cc0d40568fb3a82a72b41cedf958a169710415148e365f45e1f/uuid_utils-0.17.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:304497d360e9ca5b019254bb25a2ee886b66de884aa08a949c8812fe5bf5327f", size = 608575, upload-time = "2026-09-08T11:28:01.01Z" }, + { url = "https://files.pythonhosted.org/packages/f7/90/947976eeaf48aa6109100af1796931b8c684caf680d0fb4d2498e951c059/uuid_utils-0.17.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7f3deaca1ba34f48da053884c1255c360fb123c4a9bc3815c05a7a8093e0bda5", size = 569118, upload-time = "2026-09-08T11:28:02.321Z" }, + { url = "https://files.pythonhosted.org/packages/a1/fc/18154e589f0c84f85b99aee9406fdf904468190a4f4fe462d86bd85ab960/uuid_utils-0.17.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e22cf24db33a123c8e47a86fe766c770c83dedc6d1196c1172cbba0a0959cac0", size = 533401, upload-time = "2026-09-08T11:28:03.631Z" }, + { url = "https://files.pythonhosted.org/packages/7f/73/ef0bb542317ac03fc4e0e7e2804e316d84fee115c6a3ed41a6efa954b59b/uuid_utils-0.17.1-cp311-cp311-win32.whl", hash = "sha256:738b8fc2062c3dc17f1624af4aa8763bec4172cf295b13ffa3dfad3ddbdb4e0e", size = 172366, upload-time = "2026-09-08T11:28:04.977Z" }, + { url = "https://files.pythonhosted.org/packages/f4/1f/c76187e05e0fdbb3f9fef7436f86326d0f0aa25b42192cddc011997b31a7/uuid_utils-0.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:297c6be22e0dd0f7d372845b171ffee5657581759982413c0a5b01b900c5f592", size = 178735, upload-time = "2026-09-08T11:28:06.215Z" }, + { url = "https://files.pythonhosted.org/packages/92/05/3d846d5423571574a1e6f4bbe16f57f755671d0f334931f893e8a734bbaa/uuid_utils-0.17.1-cp311-cp311-win_arm64.whl", hash = "sha256:1c8124c9b91fa8353d79e4e7bd44ed0f2ae683990c01818199668f7579e236ab", size = 176492, upload-time = "2026-09-08T11:28:07.368Z" }, + { url = "https://files.pythonhosted.org/packages/97/82/a509ef8b3c24b48099a4fba00f9e1b3f38417e0a7bda39cefd4b1e841388/uuid_utils-0.17.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:7558c84414785d6ea54a186a3c68267eb8f33e2a0d792698bd9fa50d62150f77", size = 557142, upload-time = "2026-09-08T11:28:08.586Z" }, + { url = "https://files.pythonhosted.org/packages/27/60/d48897c1bb6562c4b68a90c998f89d4eb8996d01193c930b3f6f04258619/uuid_utils-0.17.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:4f04ba62482858a975d1d38cbb5ade181faae59e8ddc1499eacc9b6b6def3115", size = 287053, upload-time = "2026-09-08T11:28:10.12Z" }, + { url = "https://files.pythonhosted.org/packages/c0/9d/6506e6c4ca08300ad7415c3b76e29bd36b491dec818ea58d9e8bf88031d3/uuid_utils-0.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:66ce3e84067261b2721dde6539427f4eb9286289769332ff07c859a661f87694", size = 320760, upload-time = "2026-09-08T11:28:11.3Z" }, + { url = "https://files.pythonhosted.org/packages/2c/dd/013786821eca0808282b82bb1e66a18a6b70061e1ce2f77fc9be06b88a36/uuid_utils-0.17.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4cdcb565ac4d8a005833e7c389867977e19670f1bee6ee9f8811872b86225274", size = 329130, upload-time = "2026-09-08T11:28:12.522Z" }, + { url = "https://files.pythonhosted.org/packages/60/45/ba376e0a69eb4a0bb2dfba1ad2bafc2e6729971d480701cc778719a4205d/uuid_utils-0.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7a93b046552730b843e9d8784691cf8b0b3d5430dd9d053ade33383ccb2574ff", size = 444047, upload-time = "2026-09-08T11:28:13.938Z" }, + { url = "https://files.pythonhosted.org/packages/02/1e/2abb7d9e3062a7889142818e2a2ae758a54a1c3b6cf8a86877e051b3d1dc/uuid_utils-0.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d45f93f362d39f63ba14bbd9e4e1dd89fbed4de9bbef6bb428a379bd86571da2", size = 323927, upload-time = "2026-09-08T11:28:15.235Z" }, + { url = "https://files.pythonhosted.org/packages/20/00/c6753d6f2dbcd9d78436e291534b5d81f42c1b50c4d3224ddf231095fde2/uuid_utils-0.17.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d847fb9b46b5c208f3b8d5ca6082a4ac819ec2ffe36de3548c489e8fa551bd", size = 345877, upload-time = "2026-09-08T11:28:16.62Z" }, + { url = "https://files.pythonhosted.org/packages/c2/78/6f65d3105a0588b38cdcf338397bcb63c2d88d3581698a316def47e4445e/uuid_utils-0.17.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:71f7ec7a1b54c1f84d6f8fd4e1110a66b3d1b936dbb17cda2927442621fc1e3d", size = 499635, upload-time = "2026-09-08T11:28:17.912Z" }, + { url = "https://files.pythonhosted.org/packages/e9/5b/ff56d55fde9991c332e6df2ac1c560be6dd7e2302ab51180a185cfad830d/uuid_utils-0.17.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:a140db8866a45b1ce40d91164ff48d2722ffc3b2a39bfdb412bd770c7ea88be3", size = 605502, upload-time = "2026-09-08T11:28:19.198Z" }, + { url = "https://files.pythonhosted.org/packages/09/16/d34f26cd4dad48671c7441fcf370076911dd9e7edcb3e5264e11da7fce7d/uuid_utils-0.17.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:7b296b67bf880085daa11ee496d385b941a3bf3e3d5691db7178d21f18f56f9b", size = 563186, upload-time = "2026-09-08T11:28:20.684Z" }, + { url = "https://files.pythonhosted.org/packages/ff/ef/b9bd9b412865c08e6769044cdda6e0a3db4827c88a4a2612e42e68714ca2/uuid_utils-0.17.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:61378863a5e9410fa6e816364442b9d35cccf94fa83e3f67997d0ff57d901d0e", size = 528667, upload-time = "2026-09-08T11:28:21.984Z" }, + { url = "https://files.pythonhosted.org/packages/e9/b6/981a84e9d0653e2d5fc205ba2b895d80c8e3bdb7138995f4c04b7cce8bd8/uuid_utils-0.17.1-cp312-cp312-win32.whl", hash = "sha256:a550b3963960012ff3266bdb3079abf4cc3f6363201e63a649d5d3cd44fe52cd", size = 169155, upload-time = "2026-09-08T11:28:23.427Z" }, + { url = "https://files.pythonhosted.org/packages/fb/49/85a39cef2de6948364d25f5e1452119e6a70ddb5a910eeac717f02c5eabf/uuid_utils-0.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:3d6ccaebaa3b2ff2e59d11d70c64e97ba572120162a00c25d6f8e5e0c1004b9a", size = 175220, upload-time = "2026-09-08T11:28:24.582Z" }, + { url = "https://files.pythonhosted.org/packages/e0/f6/8c1c11bbf7cfa901c7c9621bcdcbb4bf432c5f20dce27e76a3ea29f0307a/uuid_utils-0.17.1-cp312-cp312-win_arm64.whl", hash = "sha256:3ca89347a01ddac94727578369feacc0969d9fc033b2c17ff7919121ee441e2f", size = 172646, upload-time = "2026-09-08T11:28:25.723Z" }, + { url = "https://files.pythonhosted.org/packages/03/0d/4c2263a05e95dc11a5c9fad78ab9ac5f76a1f5aaabb545a39c6d34d2a07b/uuid_utils-0.17.1-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:cd8043ac6d81b3f3f0dff22247866292c819e0d5e54a5a3ad2223f86f88dbd97", size = 556923, upload-time = "2026-09-08T11:28:26.974Z" }, + { url = "https://files.pythonhosted.org/packages/9e/70/9f619e86af674b8055adb29e6ad95f1d2bdec02b9d7b654d01fb479ea9ac/uuid_utils-0.17.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:586a93993769873c389d38bd9a70c51e228e734e8f78742d959610509635b86b", size = 286572, upload-time = "2026-09-08T11:28:28.265Z" }, + { url = "https://files.pythonhosted.org/packages/1e/d2/bf4c39c283a75a8893d060344b690d5ff13ddd7e65849a74a264bec9a4ee/uuid_utils-0.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55e2cec52e2c78d94277d4c990badd3ce97f5746d05029e63d81fb2433bc9684", size = 321366, upload-time = "2026-09-08T11:28:29.464Z" }, + { url = "https://files.pythonhosted.org/packages/d3/a3/4790fd4d6322aeb935e2222d193407902b2651dbb5eae7817f2f8eb2043e/uuid_utils-0.17.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0721f05b4f10cc7d49d91be65524a3bc6e6a5d88be054cdca05dff487a022091", size = 329210, upload-time = "2026-09-08T11:28:30.738Z" }, + { url = "https://files.pythonhosted.org/packages/66/f9/442d13050fb55c2e4cc81369df349d60f2da8dde84ffb7e330385c576bc3/uuid_utils-0.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de996e58b77d3e6eeee1a209ce93f424a5f021aa8b2879df6d35eda601acc831", size = 441731, upload-time = "2026-09-08T11:28:31.966Z" }, + { url = "https://files.pythonhosted.org/packages/63/96/deded55ce54c5e6a2b7dbb790ab9bf7b5be8c7e8cb22e2355108bd8723cd/uuid_utils-0.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01d9209d6fed20226af0d29b95c5e253a1907b61f1a00153187ac5412f1df9b6", size = 323874, upload-time = "2026-09-08T11:28:33.249Z" }, + { url = "https://files.pythonhosted.org/packages/0f/f8/4b9d64b57bf35e3e99a8e578ed1cbdcdf926816f36bf5e5b53d7ea4c65bb/uuid_utils-0.17.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a4f6b05598d0d29e8851b7668786b7cf105c98887c7ca36dac94c61321d16cb1", size = 346026, upload-time = "2026-09-08T11:28:34.516Z" }, + { url = "https://files.pythonhosted.org/packages/e8/da/8912e887f5eeeb8f44f50f1aac4c16852644b558b1b29846b14463f9b739/uuid_utils-0.17.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f9f9f6835ab3163818156022c627eda60c38c874b369642b249b483384021743", size = 500023, upload-time = "2026-09-08T11:28:35.906Z" }, + { url = "https://files.pythonhosted.org/packages/73/0b/c15c3f5006c3f89818cbe796e73f9a1927867ec6b0c32e80cf30becefa67/uuid_utils-0.17.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:33fa18507488c4dbde9a3969b6483183d934dbf7a7d46aba90bd5d664d4c81ea", size = 605833, upload-time = "2026-09-08T11:28:37.11Z" }, + { url = "https://files.pythonhosted.org/packages/e3/db/1c64eedcc55f1ac01067c208bfe7fa17957521a73ab1701c04a866c33795/uuid_utils-0.17.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fa1a1c9a72ef9757176c069f7bd8014b7f4abf5f9930ec62b883dc864ba28092", size = 563310, upload-time = "2026-09-08T11:28:38.705Z" }, + { url = "https://files.pythonhosted.org/packages/e3/ee/314fc4f908258714e92b0fc50bbf02cb49454db4857e9da42d40b8f3539b/uuid_utils-0.17.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cd347022f67f7fbbd6939181ab076cd17a1d856e09a160eb87e245e692cc5742", size = 528539, upload-time = "2026-09-08T11:28:40.271Z" }, + { url = "https://files.pythonhosted.org/packages/2a/83/0e9e0bdd77bbf1fe5380267c14f197f8ac442ad5172000422f46f05953fa/uuid_utils-0.17.1-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:7e32ff7bd0fe4fdefce1d95f8f673a9b012286a7f40918ed1c08936d565aac4a", size = 98270, upload-time = "2026-09-08T11:28:41.575Z" }, + { url = "https://files.pythonhosted.org/packages/14/af/d2546a514432bb970da5a6550c4587ec8096ea90a2d2ea29aa55a1c35521/uuid_utils-0.17.1-cp313-cp313-win32.whl", hash = "sha256:a0a276738fafcfd63e6a0af944ffb8fb86448fe4cedcf574dd7df1ca13259e22", size = 168846, upload-time = "2026-09-08T11:28:42.669Z" }, + { url = "https://files.pythonhosted.org/packages/e4/84/46d45f14ebdf1ff4d9e6096dea5f31a706d7f71e99e48cde933b47a2e4db/uuid_utils-0.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:1cf7a837c3467f69ba3ef32caa43b1c5f5a462b7d960bcc59083459aed2b4202", size = 175479, upload-time = "2026-09-08T11:28:43.876Z" }, + { url = "https://files.pythonhosted.org/packages/58/42/558d83542ce270fdefe19a18e707e4fce58e64ed9d98658a2da78b9ac2b5/uuid_utils-0.17.1-cp313-cp313-win_arm64.whl", hash = "sha256:7a9537e7afe2cd8851e636789124bcc26ff1d671906c5e56f6e8f293fa477ec2", size = 173287, upload-time = "2026-09-08T11:28:45.133Z" }, + { url = "https://files.pythonhosted.org/packages/3a/ea/c735de118ef5c4a6ada1846699e65b3adcac92044e79b83345f90c792fe5/uuid_utils-0.17.1-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:f974aa1097b0b8245d8f29550eaac3b431c891ba7c76cc4beaa6ec7bf8cd27b6", size = 561135, upload-time = "2026-09-08T11:28:46.387Z" }, + { url = "https://files.pythonhosted.org/packages/38/eb/c16f89b3c48eecef422448b9bde07994762cf21daa3351f4c49eab705d54/uuid_utils-0.17.1-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:9700430eb701f18bd995787228c2202a15d9db335e8bf9c583df7eca5487d5ce", size = 289170, upload-time = "2026-09-08T11:28:47.735Z" }, + { url = "https://files.pythonhosted.org/packages/9e/05/5aec1389045f9e16afc1b8cce6414faeed40d44b3095f74d641c33ea1434/uuid_utils-0.17.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d030ce5d3cca0f2f55509035bcd33d39494c50dabb9d53dc0419ad212eb0fd7f", size = 323150, upload-time = "2026-09-08T11:28:49.064Z" }, + { url = "https://files.pythonhosted.org/packages/d8/56/8ad1da1ac6781f792e6e92cdb65bd242c5f5269e7c77de67edd704db61de/uuid_utils-0.17.1-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d365e0c916bd9a4b0b7f67f3305c6704c4ff44ff9da836faf455b8b5dce0399f", size = 331190, upload-time = "2026-09-08T11:28:50.478Z" }, + { url = "https://files.pythonhosted.org/packages/cb/d7/49300453d84440d6b8f45c95d9fd249f7106f8283296c948842f6fa00fd3/uuid_utils-0.17.1-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e9f5e23998625f6dc005a3a30238b4006424e366cb2966ec465e0287ae2534f0", size = 447676, upload-time = "2026-09-08T11:28:51.646Z" }, + { url = "https://files.pythonhosted.org/packages/9f/8f/db9fe5180418846bbc3273831468cead13e1de4956c73071fd1a4bde6ac0/uuid_utils-0.17.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71eabda671e055415ecfa8859364438a575eda84e6f43a513436977d9377b532", size = 325838, upload-time = "2026-09-08T11:28:53.008Z" }, + { url = "https://files.pythonhosted.org/packages/f9/00/efcac8905b87ffd76323d8e46594a68a0bde2c24c8e71f44ab7d5622dde6/uuid_utils-0.17.1-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ed6821646e37f49683b3e977f856421c08eb9d03418423ac1477e09d2fb5cf62", size = 349881, upload-time = "2026-09-08T11:28:54.479Z" }, + { url = "https://files.pythonhosted.org/packages/7f/3e/37352e939a3995775a6034023bda646aeacf73f238a82e46f012d6a7eee6/uuid_utils-0.17.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:d8abfd2ed04af7df7b586621b11449a061b4b899f8b073e972b7282c89ae8335", size = 502043, upload-time = "2026-09-08T11:28:55.705Z" }, + { url = "https://files.pythonhosted.org/packages/f6/c2/9f7883a730cb0e0fce25487021590a1fd28d2840bf25022b33a81c800da9/uuid_utils-0.17.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:8d31f5725c874a656fa1b7c8feb20b54b01ea70b200a9ff0568672ad3fc80b85", size = 607688, upload-time = "2026-09-08T11:28:57.026Z" }, + { url = "https://files.pythonhosted.org/packages/0b/7f/6b121cfe00742f5884fb313321fddd23a17a2326a01a0e669810eaa36b2d/uuid_utils-0.17.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:2ff6a84cf6a0a28e4a75c7b11f0d52464ddce4b7a0bfcf14c8de2e740299903d", size = 566366, upload-time = "2026-09-08T11:28:58.438Z" }, + { url = "https://files.pythonhosted.org/packages/36/64/e706ba987142e212f5af6a034ed98f9a0ec2543e1fdbb3b29b034271578e/uuid_utils-0.17.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:7970905d66e55f9a52d0e694d306501e8a9468aa99da73867cc1f8eba2817261", size = 531140, upload-time = "2026-09-08T11:28:59.937Z" }, + { url = "https://files.pythonhosted.org/packages/5a/b2/7dfecd82aff24e02a6764ea88dbb7266a061bc7691d0180f01c6b1ea1efe/uuid_utils-0.17.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:b2735d128a3732e528229fc24295530caa75e79d5ea7fb0f8690ef3114d9b262", size = 100062, upload-time = "2026-09-08T11:29:01.323Z" }, + { url = "https://files.pythonhosted.org/packages/2a/8d/4840ac42764185be3fb7f7ae990c3f4bcf0b941a54ad6807e65cc312e9f7/uuid_utils-0.17.1-cp314-cp314-win32.whl", hash = "sha256:cc9da3c0d8208b53c28658340827505af437bff7a52a55fdaa262ccd4c5a5d87", size = 171234, upload-time = "2026-09-08T11:29:02.688Z" }, + { url = "https://files.pythonhosted.org/packages/90/c0/772c08a73cfc8810ff3144ed2e3701242568f83c7031b781d61bdcd74c29/uuid_utils-0.17.1-cp314-cp314-win_amd64.whl", hash = "sha256:eee4a1df744434e10a0d0a679c074e3128b58328b83c99144e363db320e801f4", size = 177462, upload-time = "2026-09-08T11:29:03.81Z" }, + { url = "https://files.pythonhosted.org/packages/f8/e3/9e3eb231cffab2df2029c4b6d015dabb077366d1194a8a0f2d4522d581ee/uuid_utils-0.17.1-cp314-cp314-win_arm64.whl", hash = "sha256:c3955fc653dc78a93ecbd880bc97a0ef8010a9a748e6307f11ad005d45390ce5", size = 174745, upload-time = "2026-09-08T11:29:04.919Z" }, + { url = "https://files.pythonhosted.org/packages/cd/3f/095e8eed10949c6ca1adde77d405268e88eeaf6e23a3968b29e549d0765e/uuid_utils-0.17.1-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:0956a9422e132c8d4a3d808cc3d754fc8e81d34295a3a202b332c9dce064eda9", size = 562178, upload-time = "2026-09-08T11:29:06.231Z" }, + { url = "https://files.pythonhosted.org/packages/bf/ad/5afb5a6fbedbce0bbd358855771c63ff233e7bad898eaaea9f9802fedef9/uuid_utils-0.17.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:691a9c16db041a8d5c55d6414398b0fc97e33aad41ad3aef67a6f3c0661dcde1", size = 289997, upload-time = "2026-09-08T11:29:07.478Z" }, + { url = "https://files.pythonhosted.org/packages/9a/04/78edc758c4dbc84bd5ed8c40b6d7ee0dd879c6ff07320f347e371d84cffc/uuid_utils-0.17.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf419a23bbeafed0fc8efb4ca5b3e0a8ea4ef4866de41c3393f888bfd5f60e15", size = 323144, upload-time = "2026-09-08T11:29:08.856Z" }, + { url = "https://files.pythonhosted.org/packages/d8/c7/8f27ea2c1e244c0edbaac5dc2a5cbbf51e298e54674faef03132f4468a1a/uuid_utils-0.17.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:617acaeb2586e87c9bd0c2e192e4f1d33caacaeb7f3e0cc75972bc38e703e099", size = 330592, upload-time = "2026-09-08T11:29:10.107Z" }, + { url = "https://files.pythonhosted.org/packages/39/af/e7d7b372781627a6ea6ec2a2ee82f98e3fe7de7b6e4b050ae29a66fd64f8/uuid_utils-0.17.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b1fc79cd8a24bc6c553cd6f708f5ca08c4182914bdcc87192e1e468e9858add3", size = 446735, upload-time = "2026-09-08T11:29:11.334Z" }, + { url = "https://files.pythonhosted.org/packages/33/11/a2ef25dc4a3dcae5ddf8a7c2debc0d10719a991e327e43913605fd3b9c90/uuid_utils-0.17.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce2f65e81429fcb145105a10c71bf2c71ac5cc9c8fc6c79ac3c13b9de091b2ef", size = 327402, upload-time = "2026-09-08T11:29:12.745Z" }, + { url = "https://files.pythonhosted.org/packages/4e/4b/61153f07eb7282d71a6ee10e3c05636a7d43cec6784bc6ea79979084e727/uuid_utils-0.17.1-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e9ff97bf48606e5d817a01fdd4a4a8855b91382e384f524a960149da00adab5a", size = 348998, upload-time = "2026-09-08T11:29:13.976Z" }, + { url = "https://files.pythonhosted.org/packages/e0/d2/b40991f80805d2cb3ace8c961752429e2e50d4ce0a3ed941c26a6250e3bd/uuid_utils-0.17.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:87d818e1fffc39476c7934544f54455ea04c6297fcd983598802e81c746338a0", size = 501745, upload-time = "2026-09-08T11:29:15.261Z" }, + { url = "https://files.pythonhosted.org/packages/38/84/f65e1963964b2b6fb7aa687dc819e5a39207dd9ecc7961cef82124fd3cbd/uuid_utils-0.17.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:764e4505821c20f1a45a54e9da076e6a97e4e46947159490aea893dc6b8d77be", size = 607104, upload-time = "2026-09-08T11:29:16.586Z" }, + { url = "https://files.pythonhosted.org/packages/84/3f/07c5ada40f360981ee069dbe6463a13dfa1de7eee73a6cb91f94d610821a/uuid_utils-0.17.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:cddf08ed611c2ad1c791d4133dba2c63db4d294b2111e1db687537943cac25ae", size = 566012, upload-time = "2026-09-08T11:29:18Z" }, + { url = "https://files.pythonhosted.org/packages/52/6d/ede35c5e3e3787d2e9d5d3baddbc00f3f64e3f4522d53508757fbcfd6f47/uuid_utils-0.17.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:bcf40ae13cf31727b84f00b1a505f1d4d10199bfea946c3554ef327702d2acca", size = 532218, upload-time = "2026-09-08T11:29:19.477Z" }, + { url = "https://files.pythonhosted.org/packages/97/a1/318e4bc7f04a505189233ec2409cce9e18cd5f52d06738a9e96f0eac3816/uuid_utils-0.17.1-cp314-cp314t-win32.whl", hash = "sha256:ce2fd8f8bc0026c0fc137cf5cce9de546ff9e0b4008be3eb21b5a06249eafec1", size = 171217, upload-time = "2026-09-08T11:29:20.984Z" }, + { url = "https://files.pythonhosted.org/packages/06/79/11811f97922be44ca900fc89e26b4dae173bd03ffd03672da7b28b023b29/uuid_utils-0.17.1-cp314-cp314t-win_amd64.whl", hash = "sha256:3dd5706a9874799013e82ac567425c535a0a4a7779c8551154915a4ba2fcb1c4", size = 177754, upload-time = "2026-09-08T11:29:22.227Z" }, + { url = "https://files.pythonhosted.org/packages/60/66/f56b2b497286f01ac2f6a1be8f825e871906d6aaf83dd4ad0cd7c8d54013/uuid_utils-0.17.1-cp314-cp314t-win_arm64.whl", hash = "sha256:a3cd9443d0a3b6f631e6352cb9d9c0a9b68d808d71250eb44e7b00265ec382f7", size = 174267, upload-time = "2026-09-08T11:29:23.447Z" }, + { url = "https://files.pythonhosted.org/packages/d8/23/81d75df583e3c7ff432b4f86014ae243fe7baa57d99919dc1292e9424724/uuid_utils-0.17.1-pp311-pypy311_pp73-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:653bf91ec2d1c3b0f10157815ca58b0b572d15ce17ed0823aae08ff0df207fad", size = 566472, upload-time = "2026-09-08T11:29:24.726Z" }, + { url = "https://files.pythonhosted.org/packages/8f/f3/71e7acaecfdbb5edd3cc7e13d0602f4566f16f35412edcc784569ff14733/uuid_utils-0.17.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ea207557393ead4084beb08f0e9c0c944ac2050678714b65ba979fae90cf782e", size = 288766, upload-time = "2026-09-08T11:29:26.252Z" }, + { url = "https://files.pythonhosted.org/packages/52/62/1a94e2cf60ba38ef87f11cae3dd3b2787366229cc9a3f0ffc41fb89c9487/uuid_utils-0.17.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5629c94f65249384314831ca0a95ca5f1dce5bcd5ee79600a5cd31d4f7d0f5f6", size = 326190, upload-time = "2026-09-08T11:29:27.666Z" }, + { url = "https://files.pythonhosted.org/packages/87/81/55b12664f7fb6a69a9d18ec8a8cac1a55fc60e0dca14046d6bb972fae2a8/uuid_utils-0.17.1-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f85fddf2e5c4f7a30ebdc2b26ec585b9d814d807bcf285d248ae451ffee16a03", size = 334399, upload-time = "2026-09-08T11:29:29.023Z" }, + { url = "https://files.pythonhosted.org/packages/8d/64/844e5657be2b43ca2136ef4aa207420c1387e28cdbb90dcb395133ee63ca/uuid_utils-0.17.1-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4adbea226bef0c619b33fa257113e36269a475b2c2049f55b8b83b4c6d507a9a", size = 450440, upload-time = "2026-09-08T11:29:30.334Z" }, + { url = "https://files.pythonhosted.org/packages/87/09/ab493c7598311f9bab4dc762d3483cb35cd78588c4d848c36fcda671f4f9/uuid_utils-0.17.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ed203ff60932fe5b3a38453945bee4aa8dfb387789fd420698f607786ba42b8", size = 328684, upload-time = "2026-09-08T11:29:31.752Z" }, + { url = "https://files.pythonhosted.org/packages/4f/1d/8f2816d50d7a69416270a88f41f6820cde300719bac814989bb13e4c5ae6/uuid_utils-0.17.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:92e8df2bc6a33229c105ea90839d98576fcecc5cc86fdb1dd772ab10367b744b", size = 354290, upload-time = "2026-09-08T11:29:33.067Z" }, + { url = "https://files.pythonhosted.org/packages/18/e4/2bdff71a73c3d5dde6777815c910be7417fbc54f36206d0f7a1fb2f54522/uuid_utils-0.17.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6cca251f83d3ec2988fb7355b52c4b4fd2d96159f6f040e68f51af15fab49540", size = 180288, upload-time = "2026-09-08T11:29:34.24Z" }, ] [[package]] name = "uvicorn" -version = "0.37.0" +version = "0.54.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, { name = "h11" }, - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/71/57/1616c8274c3442d802621abf5deb230771c7a0fec9414cb6763900eb3868/uvicorn-0.37.0.tar.gz", hash = "sha256:4115c8add6d3fd536c8ee77f0e14a7fd2ebba939fed9b02583a97f80648f9e13", size = 80367, upload-time = "2025-09-23T13:33:47.486Z" } +sdist = { url = "https://files.pythonhosted.org/packages/da/34/30e9280707135d2cfc589dfff3cb796bd07a3aeb1a3e415ba09dd89d7bb4/uvicorn-0.54.0.tar.gz", hash = "sha256:a2e33cbfaa0306f8e6b0c13e0cb89d7d7a2da3e62b90c66e18c33d9807b28620", size = 112283, upload-time = "2026-09-25T06:52:37.601Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/0c/b54a4fdd7f90a3af8b02ebc9ce6712c2c208b7926a2f7bad95c33ebbe943/uvicorn-0.54.0-py3-none-any.whl", hash = "sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf", size = 87427, upload-time = "2026-09-25T06:52:35.829Z" }, +] + +[[package]] +name = "watchdog" +version = "6.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282", size = 131220, upload-time = "2024-11-01T14:07:13.037Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/85/cd/584a2ceb5532af99dd09e50919e3615ba99aa127e9850eafe5f31ddfdb9a/uvicorn-0.37.0-py3-none-any.whl", hash = "sha256:913b2b88672343739927ce381ff9e2ad62541f9f8289664fa1d1d3803fa2ce6c", size = 67976, upload-time = "2025-09-23T13:33:45.842Z" }, + { url = "https://files.pythonhosted.org/packages/e0/24/d9be5cd6642a6aa68352ded4b4b10fb0d7889cb7f45814fb92cecd35f101/watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c", size = 96393, upload-time = "2024-11-01T14:06:31.756Z" }, + { url = "https://files.pythonhosted.org/packages/63/7a/6013b0d8dbc56adca7fdd4f0beed381c59f6752341b12fa0886fa7afc78b/watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2", size = 88392, upload-time = "2024-11-01T14:06:32.99Z" }, + { url = "https://files.pythonhosted.org/packages/d1/40/b75381494851556de56281e053700e46bff5b37bf4c7267e858640af5a7f/watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c", size = 89019, upload-time = "2024-11-01T14:06:34.963Z" }, + { url = "https://files.pythonhosted.org/packages/39/ea/3930d07dafc9e286ed356a679aa02d777c06e9bfd1164fa7c19c288a5483/watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948", size = 96471, upload-time = "2024-11-01T14:06:37.745Z" }, + { url = "https://files.pythonhosted.org/packages/12/87/48361531f70b1f87928b045df868a9fd4e253d9ae087fa4cf3f7113be363/watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860", size = 88449, upload-time = "2024-11-01T14:06:39.748Z" }, + { url = "https://files.pythonhosted.org/packages/5b/7e/8f322f5e600812e6f9a31b75d242631068ca8f4ef0582dd3ae6e72daecc8/watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0", size = 89054, upload-time = "2024-11-01T14:06:41.009Z" }, + { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480, upload-time = "2024-11-01T14:06:42.952Z" }, + { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451, upload-time = "2024-11-01T14:06:45.084Z" }, + { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057, upload-time = "2024-11-01T14:06:47.324Z" }, + { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079, upload-time = "2024-11-01T14:06:59.472Z" }, + { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078, upload-time = "2024-11-01T14:07:01.431Z" }, + { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076, upload-time = "2024-11-01T14:07:02.568Z" }, + { url = "https://files.pythonhosted.org/packages/ab/cc/da8422b300e13cb187d2203f20b9253e91058aaf7db65b74142013478e66/watchdog-6.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f", size = 79077, upload-time = "2024-11-01T14:07:03.893Z" }, + { url = "https://files.pythonhosted.org/packages/2c/3b/b8964e04ae1a025c44ba8e4291f86e97fac443bca31de8bd98d3263d2fcf/watchdog-6.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26", size = 79078, upload-time = "2024-11-01T14:07:05.189Z" }, + { url = "https://files.pythonhosted.org/packages/62/ae/a696eb424bedff7407801c257d4b1afda455fe40821a2be430e173660e81/watchdog-6.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c", size = 79077, upload-time = "2024-11-01T14:07:06.376Z" }, + { url = "https://files.pythonhosted.org/packages/b5/e8/dbf020b4d98251a9860752a094d09a65e1b436ad181faf929983f697048f/watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2", size = 79078, upload-time = "2024-11-01T14:07:07.547Z" }, + { url = "https://files.pythonhosted.org/packages/07/f6/d0e5b343768e8bcb4cda79f0f2f55051bf26177ecd5651f84c07567461cf/watchdog-6.0.0-py3-none-win32.whl", hash = "sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a", size = 79065, upload-time = "2024-11-01T14:07:09.525Z" }, + { url = "https://files.pythonhosted.org/packages/db/d9/c495884c6e548fce18a8f40568ff120bc3a4b7b99813081c8ac0c936fa64/watchdog-6.0.0-py3-none-win_amd64.whl", hash = "sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680", size = 79070, upload-time = "2024-11-01T14:07:10.686Z" }, + { url = "https://files.pythonhosted.org/packages/33/e8/e40370e6d74ddba47f002a32919d91310d6074130fe4e17dabcafc15cbf1/watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f", size = 79067, upload-time = "2024-11-01T14:07:11.845Z" }, +] + +[[package]] +name = "wcmatch" +version = "11.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "bracex" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/78/cd/0e028d8b7d906d51acdac537334fbe85f8284f2a8147d48bc9403af77a0d/wcmatch-11.1.tar.gz", hash = "sha256:f2b6f0fad6f5e2571498723fcb3c8facdd0fba0dcc139f31d32f592eb648153e", size = 129091, upload-time = "2026-10-10T13:10:54.573Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/22/c4adda5a3754b7fc9429a544a0673fa6922fdd7808eab09abe18616f6e38/wcmatch-11.1-py3-none-any.whl", hash = "sha256:2863afee97a7dd62e64f7feada864848c1a5e31cb331b3aa530fa1300d2d5d3c", size = 43417, upload-time = "2026-10-10T13:10:52.939Z" }, +] + +[[package]] +name = "websockets" +version = "15.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee", size = 177016, upload-time = "2025-03-05T20:03:41.606Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9f/32/18fcd5919c293a398db67443acd33fde142f283853076049824fc58e6f75/websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431", size = 175423, upload-time = "2025-03-05T20:01:56.276Z" }, + { url = "https://files.pythonhosted.org/packages/76/70/ba1ad96b07869275ef42e2ce21f07a5b0148936688c2baf7e4a1f60d5058/websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57", size = 173082, upload-time = "2025-03-05T20:01:57.563Z" }, + { url = "https://files.pythonhosted.org/packages/86/f2/10b55821dd40eb696ce4704a87d57774696f9451108cff0d2824c97e0f97/websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905", size = 173330, upload-time = "2025-03-05T20:01:59.063Z" }, + { url = "https://files.pythonhosted.org/packages/a5/90/1c37ae8b8a113d3daf1065222b6af61cc44102da95388ac0018fcb7d93d9/websockets-15.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d99e5546bf73dbad5bf3547174cd6cb8ba7273062a23808ffea025ecb1cf8562", size = 182878, upload-time = "2025-03-05T20:02:00.305Z" }, + { url = "https://files.pythonhosted.org/packages/8e/8d/96e8e288b2a41dffafb78e8904ea7367ee4f891dafc2ab8d87e2124cb3d3/websockets-15.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66dd88c918e3287efc22409d426c8f729688d89a0c587c88971a0faa2c2f3792", size = 181883, upload-time = "2025-03-05T20:02:03.148Z" }, + { url = "https://files.pythonhosted.org/packages/93/1f/5d6dbf551766308f6f50f8baf8e9860be6182911e8106da7a7f73785f4c4/websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8dd8327c795b3e3f219760fa603dcae1dcc148172290a8ab15158cf85a953413", size = 182252, upload-time = "2025-03-05T20:02:05.29Z" }, + { url = "https://files.pythonhosted.org/packages/d4/78/2d4fed9123e6620cbf1706c0de8a1632e1a28e7774d94346d7de1bba2ca3/websockets-15.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fdc51055e6ff4adeb88d58a11042ec9a5eae317a0a53d12c062c8a8865909e8", size = 182521, upload-time = "2025-03-05T20:02:07.458Z" }, + { url = "https://files.pythonhosted.org/packages/e7/3b/66d4c1b444dd1a9823c4a81f50231b921bab54eee2f69e70319b4e21f1ca/websockets-15.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:693f0192126df6c2327cce3baa7c06f2a117575e32ab2308f7f8216c29d9e2e3", size = 181958, upload-time = "2025-03-05T20:02:09.842Z" }, + { url = "https://files.pythonhosted.org/packages/08/ff/e9eed2ee5fed6f76fdd6032ca5cd38c57ca9661430bb3d5fb2872dc8703c/websockets-15.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54479983bd5fb469c38f2f5c7e3a24f9a4e70594cd68cd1fa6b9340dadaff7cf", size = 181918, upload-time = "2025-03-05T20:02:11.968Z" }, + { url = "https://files.pythonhosted.org/packages/d8/75/994634a49b7e12532be6a42103597b71098fd25900f7437d6055ed39930a/websockets-15.0.1-cp311-cp311-win32.whl", hash = "sha256:16b6c1b3e57799b9d38427dda63edcbe4926352c47cf88588c0be4ace18dac85", size = 176388, upload-time = "2025-03-05T20:02:13.32Z" }, + { url = "https://files.pythonhosted.org/packages/98/93/e36c73f78400a65f5e236cd376713c34182e6663f6889cd45a4a04d8f203/websockets-15.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:27ccee0071a0e75d22cb35849b1db43f2ecd3e161041ac1ee9d2352ddf72f065", size = 176828, upload-time = "2025-03-05T20:02:14.585Z" }, + { url = "https://files.pythonhosted.org/packages/51/6b/4545a0d843594f5d0771e86463606a3988b5a09ca5123136f8a76580dd63/websockets-15.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3e90baa811a5d73f3ca0bcbf32064d663ed81318ab225ee4f427ad4e26e5aff3", size = 175437, upload-time = "2025-03-05T20:02:16.706Z" }, + { url = "https://files.pythonhosted.org/packages/f4/71/809a0f5f6a06522af902e0f2ea2757f71ead94610010cf570ab5c98e99ed/websockets-15.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:592f1a9fe869c778694f0aa806ba0374e97648ab57936f092fd9d87f8bc03665", size = 173096, upload-time = "2025-03-05T20:02:18.832Z" }, + { url = "https://files.pythonhosted.org/packages/3d/69/1a681dd6f02180916f116894181eab8b2e25b31e484c5d0eae637ec01f7c/websockets-15.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0701bc3cfcb9164d04a14b149fd74be7347a530ad3bbf15ab2c678a2cd3dd9a2", size = 173332, upload-time = "2025-03-05T20:02:20.187Z" }, + { url = "https://files.pythonhosted.org/packages/a6/02/0073b3952f5bce97eafbb35757f8d0d54812b6174ed8dd952aa08429bcc3/websockets-15.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8b56bdcdb4505c8078cb6c7157d9811a85790f2f2b3632c7d1462ab5783d215", size = 183152, upload-time = "2025-03-05T20:02:22.286Z" }, + { url = "https://files.pythonhosted.org/packages/74/45/c205c8480eafd114b428284840da0b1be9ffd0e4f87338dc95dc6ff961a1/websockets-15.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0af68c55afbd5f07986df82831c7bff04846928ea8d1fd7f30052638788bc9b5", size = 182096, upload-time = "2025-03-05T20:02:24.368Z" }, + { url = "https://files.pythonhosted.org/packages/14/8f/aa61f528fba38578ec553c145857a181384c72b98156f858ca5c8e82d9d3/websockets-15.0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dee438fed052b52e4f98f76c5790513235efaa1ef7f3f2192c392cd7c91b65", size = 182523, upload-time = "2025-03-05T20:02:25.669Z" }, + { url = "https://files.pythonhosted.org/packages/ec/6d/0267396610add5bc0d0d3e77f546d4cd287200804fe02323797de77dbce9/websockets-15.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d5f6b181bb38171a8ad1d6aa58a67a6aa9d4b38d0f8c5f496b9e42561dfc62fe", size = 182790, upload-time = "2025-03-05T20:02:26.99Z" }, + { url = "https://files.pythonhosted.org/packages/02/05/c68c5adbf679cf610ae2f74a9b871ae84564462955d991178f95a1ddb7dd/websockets-15.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5d54b09eba2bada6011aea5375542a157637b91029687eb4fdb2dab11059c1b4", size = 182165, upload-time = "2025-03-05T20:02:30.291Z" }, + { url = "https://files.pythonhosted.org/packages/29/93/bb672df7b2f5faac89761cb5fa34f5cec45a4026c383a4b5761c6cea5c16/websockets-15.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be571a8b5afed347da347bfcf27ba12b069d9d7f42cb8c7028b5e98bbb12597", size = 182160, upload-time = "2025-03-05T20:02:31.634Z" }, + { url = "https://files.pythonhosted.org/packages/ff/83/de1f7709376dc3ca9b7eeb4b9a07b4526b14876b6d372a4dc62312bebee0/websockets-15.0.1-cp312-cp312-win32.whl", hash = "sha256:c338ffa0520bdb12fbc527265235639fb76e7bc7faafbb93f6ba80d9c06578a9", size = 176395, upload-time = "2025-03-05T20:02:33.017Z" }, + { url = "https://files.pythonhosted.org/packages/7d/71/abf2ebc3bbfa40f391ce1428c7168fb20582d0ff57019b69ea20fa698043/websockets-15.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcd5cf9e305d7b8338754470cf69cf81f420459dbae8a3b40cee57417f4614a7", size = 176841, upload-time = "2025-03-05T20:02:34.498Z" }, + { url = "https://files.pythonhosted.org/packages/cb/9f/51f0cf64471a9d2b4d0fc6c534f323b664e7095640c34562f5182e5a7195/websockets-15.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ee443ef070bb3b6ed74514f5efaa37a252af57c90eb33b956d35c8e9c10a1931", size = 175440, upload-time = "2025-03-05T20:02:36.695Z" }, + { url = "https://files.pythonhosted.org/packages/8a/05/aa116ec9943c718905997412c5989f7ed671bc0188ee2ba89520e8765d7b/websockets-15.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5a939de6b7b4e18ca683218320fc67ea886038265fd1ed30173f5ce3f8e85675", size = 173098, upload-time = "2025-03-05T20:02:37.985Z" }, + { url = "https://files.pythonhosted.org/packages/ff/0b/33cef55ff24f2d92924923c99926dcce78e7bd922d649467f0eda8368923/websockets-15.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:746ee8dba912cd6fc889a8147168991d50ed70447bf18bcda7039f7d2e3d9151", size = 173329, upload-time = "2025-03-05T20:02:39.298Z" }, + { url = "https://files.pythonhosted.org/packages/31/1d/063b25dcc01faa8fada1469bdf769de3768b7044eac9d41f734fd7b6ad6d/websockets-15.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:595b6c3969023ecf9041b2936ac3827e4623bfa3ccf007575f04c5a6aa318c22", size = 183111, upload-time = "2025-03-05T20:02:40.595Z" }, + { url = "https://files.pythonhosted.org/packages/93/53/9a87ee494a51bf63e4ec9241c1ccc4f7c2f45fff85d5bde2ff74fcb68b9e/websockets-15.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c714d2fc58b5ca3e285461a4cc0c9a66bd0e24c5da9911e30158286c9b5be7f", size = 182054, upload-time = "2025-03-05T20:02:41.926Z" }, + { url = "https://files.pythonhosted.org/packages/ff/b2/83a6ddf56cdcbad4e3d841fcc55d6ba7d19aeb89c50f24dd7e859ec0805f/websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8", size = 182496, upload-time = "2025-03-05T20:02:43.304Z" }, + { url = "https://files.pythonhosted.org/packages/98/41/e7038944ed0abf34c45aa4635ba28136f06052e08fc2168520bb8b25149f/websockets-15.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:229cf1d3ca6c1804400b0a9790dc66528e08a6a1feec0d5040e8b9eb14422375", size = 182829, upload-time = "2025-03-05T20:02:48.812Z" }, + { url = "https://files.pythonhosted.org/packages/e0/17/de15b6158680c7623c6ef0db361da965ab25d813ae54fcfeae2e5b9ef910/websockets-15.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:756c56e867a90fb00177d530dca4b097dd753cde348448a1012ed6c5131f8b7d", size = 182217, upload-time = "2025-03-05T20:02:50.14Z" }, + { url = "https://files.pythonhosted.org/packages/33/2b/1f168cb6041853eef0362fb9554c3824367c5560cbdaad89ac40f8c2edfc/websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4", size = 182195, upload-time = "2025-03-05T20:02:51.561Z" }, + { url = "https://files.pythonhosted.org/packages/86/eb/20b6cdf273913d0ad05a6a14aed4b9a85591c18a987a3d47f20fa13dcc47/websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa", size = 176393, upload-time = "2025-03-05T20:02:53.814Z" }, + { url = "https://files.pythonhosted.org/packages/1b/6c/c65773d6cab416a64d191d6ee8a8b1c68a09970ea6909d16965d26bfed1e/websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561", size = 176837, upload-time = "2025-03-05T20:02:55.237Z" }, + { url = "https://files.pythonhosted.org/packages/fa/a8/5b41e0da817d64113292ab1f8247140aac61cbf6cfd085d6a0fa77f4984f/websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f", size = 169743, upload-time = "2025-03-05T20:03:39.41Z" }, +] + +[[package]] +name = "werkzeug" +version = "3.1.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a4/34/4dd12fc8bb7d61c91467ec3efe415ffa7d5456f799954b40c5bbaeae470e/werkzeug-3.1.9.tar.gz", hash = "sha256:55ca7c70a75689be937aa27f8ff4b018f06ff4838fc73045560bf0f5a1291060", size = 940188, upload-time = "2026-09-27T18:33:41.637Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a1/38/df03f564f43cec2684823f3cccae1a652ee7face1cbaa76fb223096e64d7/werkzeug-3.1.9-py3-none-any.whl", hash = "sha256:6392e50c78460ba618e5b21f08a71f59c99ce99cdc6cf6e3dd7e6ccca8754fab", size = 228700, upload-time = "2026-09-27T18:33:39.685Z" }, +] + +[[package]] +name = "wrapt" +version = "1.17.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz", hash = "sha256:f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0", size = 55547, upload-time = "2025-08-12T05:53:21.714Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/52/db/00e2a219213856074a213503fdac0511203dceefff26e1daa15250cc01a0/wrapt-1.17.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:273a736c4645e63ac582c60a56b0acb529ef07f78e08dc6bfadf6a46b19c0da7", size = 53482, upload-time = "2025-08-12T05:51:45.79Z" }, + { url = "https://files.pythonhosted.org/packages/5e/30/ca3c4a5eba478408572096fe9ce36e6e915994dd26a4e9e98b4f729c06d9/wrapt-1.17.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5531d911795e3f935a9c23eb1c8c03c211661a5060aab167065896bbf62a5f85", size = 38674, upload-time = "2025-08-12T05:51:34.629Z" }, + { url = "https://files.pythonhosted.org/packages/31/25/3e8cc2c46b5329c5957cec959cb76a10718e1a513309c31399a4dad07eb3/wrapt-1.17.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0610b46293c59a3adbae3dee552b648b984176f8562ee0dba099a56cfbe4df1f", size = 38959, upload-time = "2025-08-12T05:51:56.074Z" }, + { url = "https://files.pythonhosted.org/packages/5d/8f/a32a99fc03e4b37e31b57cb9cefc65050ea08147a8ce12f288616b05ef54/wrapt-1.17.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b32888aad8b6e68f83a8fdccbf3165f5469702a7544472bdf41f582970ed3311", size = 82376, upload-time = "2025-08-12T05:52:32.134Z" }, + { url = "https://files.pythonhosted.org/packages/31/57/4930cb8d9d70d59c27ee1332a318c20291749b4fba31f113c2f8ac49a72e/wrapt-1.17.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cccf4f81371f257440c88faed6b74f1053eef90807b77e31ca057b2db74edb1", size = 83604, upload-time = "2025-08-12T05:52:11.663Z" }, + { url = "https://files.pythonhosted.org/packages/a8/f3/1afd48de81d63dd66e01b263a6fbb86e1b5053b419b9b33d13e1f6d0f7d0/wrapt-1.17.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8a210b158a34164de8bb68b0e7780041a903d7b00c87e906fb69928bf7890d5", size = 82782, upload-time = "2025-08-12T05:52:12.626Z" }, + { url = "https://files.pythonhosted.org/packages/1e/d7/4ad5327612173b144998232f98a85bb24b60c352afb73bc48e3e0d2bdc4e/wrapt-1.17.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:79573c24a46ce11aab457b472efd8d125e5a51da2d1d24387666cd85f54c05b2", size = 82076, upload-time = "2025-08-12T05:52:33.168Z" }, + { url = "https://files.pythonhosted.org/packages/bb/59/e0adfc831674a65694f18ea6dc821f9fcb9ec82c2ce7e3d73a88ba2e8718/wrapt-1.17.3-cp311-cp311-win32.whl", hash = "sha256:c31eebe420a9a5d2887b13000b043ff6ca27c452a9a22fa71f35f118e8d4bf89", size = 36457, upload-time = "2025-08-12T05:53:03.936Z" }, + { url = "https://files.pythonhosted.org/packages/83/88/16b7231ba49861b6f75fc309b11012ede4d6b0a9c90969d9e0db8d991aeb/wrapt-1.17.3-cp311-cp311-win_amd64.whl", hash = "sha256:0b1831115c97f0663cb77aa27d381237e73ad4f721391a9bfb2fe8bc25fa6e77", size = 38745, upload-time = "2025-08-12T05:53:02.885Z" }, + { url = "https://files.pythonhosted.org/packages/9a/1e/c4d4f3398ec073012c51d1c8d87f715f56765444e1a4b11e5180577b7e6e/wrapt-1.17.3-cp311-cp311-win_arm64.whl", hash = "sha256:5a7b3c1ee8265eb4c8f1b7d29943f195c00673f5ab60c192eba2d4a7eae5f46a", size = 36806, upload-time = "2025-08-12T05:52:53.368Z" }, + { url = "https://files.pythonhosted.org/packages/9f/41/cad1aba93e752f1f9268c77270da3c469883d56e2798e7df6240dcb2287b/wrapt-1.17.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ab232e7fdb44cdfbf55fc3afa31bcdb0d8980b9b95c38b6405df2acb672af0e0", size = 53998, upload-time = "2025-08-12T05:51:47.138Z" }, + { url = "https://files.pythonhosted.org/packages/60/f8/096a7cc13097a1869fe44efe68dace40d2a16ecb853141394047f0780b96/wrapt-1.17.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:9baa544e6acc91130e926e8c802a17f3b16fbea0fd441b5a60f5cf2cc5c3deba", size = 39020, upload-time = "2025-08-12T05:51:35.906Z" }, + { url = "https://files.pythonhosted.org/packages/33/df/bdf864b8997aab4febb96a9ae5c124f700a5abd9b5e13d2a3214ec4be705/wrapt-1.17.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6b538e31eca1a7ea4605e44f81a48aa24c4632a277431a6ed3f328835901f4fd", size = 39098, upload-time = "2025-08-12T05:51:57.474Z" }, + { url = "https://files.pythonhosted.org/packages/9f/81/5d931d78d0eb732b95dc3ddaeeb71c8bb572fb01356e9133916cd729ecdd/wrapt-1.17.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:042ec3bb8f319c147b1301f2393bc19dba6e176b7da446853406d041c36c7828", size = 88036, upload-time = "2025-08-12T05:52:34.784Z" }, + { url = "https://files.pythonhosted.org/packages/ca/38/2e1785df03b3d72d34fc6252d91d9d12dc27a5c89caef3335a1bbb8908ca/wrapt-1.17.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3af60380ba0b7b5aeb329bc4e402acd25bd877e98b3727b0135cb5c2efdaefe9", size = 88156, upload-time = "2025-08-12T05:52:13.599Z" }, + { url = "https://files.pythonhosted.org/packages/b3/8b/48cdb60fe0603e34e05cffda0b2a4adab81fd43718e11111a4b0100fd7c1/wrapt-1.17.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0b02e424deef65c9f7326d8c19220a2c9040c51dc165cddb732f16198c168396", size = 87102, upload-time = "2025-08-12T05:52:14.56Z" }, + { url = "https://files.pythonhosted.org/packages/3c/51/d81abca783b58f40a154f1b2c56db1d2d9e0d04fa2d4224e357529f57a57/wrapt-1.17.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:74afa28374a3c3a11b3b5e5fca0ae03bef8450d6aa3ab3a1e2c30e3a75d023dc", size = 87732, upload-time = "2025-08-12T05:52:36.165Z" }, + { url = "https://files.pythonhosted.org/packages/9e/b1/43b286ca1392a006d5336412d41663eeef1ad57485f3e52c767376ba7e5a/wrapt-1.17.3-cp312-cp312-win32.whl", hash = "sha256:4da9f45279fff3543c371d5ababc57a0384f70be244de7759c85a7f989cb4ebe", size = 36705, upload-time = "2025-08-12T05:53:07.123Z" }, + { url = "https://files.pythonhosted.org/packages/28/de/49493f962bd3c586ab4b88066e967aa2e0703d6ef2c43aa28cb83bf7b507/wrapt-1.17.3-cp312-cp312-win_amd64.whl", hash = "sha256:e71d5c6ebac14875668a1e90baf2ea0ef5b7ac7918355850c0908ae82bcb297c", size = 38877, upload-time = "2025-08-12T05:53:05.436Z" }, + { url = "https://files.pythonhosted.org/packages/f1/48/0f7102fe9cb1e8a5a77f80d4f0956d62d97034bbe88d33e94699f99d181d/wrapt-1.17.3-cp312-cp312-win_arm64.whl", hash = "sha256:604d076c55e2fdd4c1c03d06dc1a31b95130010517b5019db15365ec4a405fc6", size = 36885, upload-time = "2025-08-12T05:52:54.367Z" }, + { url = "https://files.pythonhosted.org/packages/fc/f6/759ece88472157acb55fc195e5b116e06730f1b651b5b314c66291729193/wrapt-1.17.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a47681378a0439215912ef542c45a783484d4dd82bac412b71e59cf9c0e1cea0", size = 54003, upload-time = "2025-08-12T05:51:48.627Z" }, + { url = "https://files.pythonhosted.org/packages/4f/a9/49940b9dc6d47027dc850c116d79b4155f15c08547d04db0f07121499347/wrapt-1.17.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:54a30837587c6ee3cd1a4d1c2ec5d24e77984d44e2f34547e2323ddb4e22eb77", size = 39025, upload-time = "2025-08-12T05:51:37.156Z" }, + { url = "https://files.pythonhosted.org/packages/45/35/6a08de0f2c96dcdd7fe464d7420ddb9a7655a6561150e5fc4da9356aeaab/wrapt-1.17.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:16ecf15d6af39246fe33e507105d67e4b81d8f8d2c6598ff7e3ca1b8a37213f7", size = 39108, upload-time = "2025-08-12T05:51:58.425Z" }, + { url = "https://files.pythonhosted.org/packages/0c/37/6faf15cfa41bf1f3dba80cd3f5ccc6622dfccb660ab26ed79f0178c7497f/wrapt-1.17.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6fd1ad24dc235e4ab88cda009e19bf347aabb975e44fd5c2fb22a3f6e4141277", size = 88072, upload-time = "2025-08-12T05:52:37.53Z" }, + { url = "https://files.pythonhosted.org/packages/78/f2/efe19ada4a38e4e15b6dff39c3e3f3f73f5decf901f66e6f72fe79623a06/wrapt-1.17.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ed61b7c2d49cee3c027372df5809a59d60cf1b6c2f81ee980a091f3afed6a2d", size = 88214, upload-time = "2025-08-12T05:52:15.886Z" }, + { url = "https://files.pythonhosted.org/packages/40/90/ca86701e9de1622b16e09689fc24b76f69b06bb0150990f6f4e8b0eeb576/wrapt-1.17.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:423ed5420ad5f5529db9ce89eac09c8a2f97da18eb1c870237e84c5a5c2d60aa", size = 87105, upload-time = "2025-08-12T05:52:17.914Z" }, + { url = "https://files.pythonhosted.org/packages/fd/e0/d10bd257c9a3e15cbf5523025252cc14d77468e8ed644aafb2d6f54cb95d/wrapt-1.17.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e01375f275f010fcbf7f643b4279896d04e571889b8a5b3f848423d91bf07050", size = 87766, upload-time = "2025-08-12T05:52:39.243Z" }, + { url = "https://files.pythonhosted.org/packages/e8/cf/7d848740203c7b4b27eb55dbfede11aca974a51c3d894f6cc4b865f42f58/wrapt-1.17.3-cp313-cp313-win32.whl", hash = "sha256:53e5e39ff71b3fc484df8a522c933ea2b7cdd0d5d15ae82e5b23fde87d44cbd8", size = 36711, upload-time = "2025-08-12T05:53:10.074Z" }, + { url = "https://files.pythonhosted.org/packages/57/54/35a84d0a4d23ea675994104e667ceff49227ce473ba6a59ba2c84f250b74/wrapt-1.17.3-cp313-cp313-win_amd64.whl", hash = "sha256:1f0b2f40cf341ee8cc1a97d51ff50dddb9fcc73241b9143ec74b30fc4f44f6cb", size = 38885, upload-time = "2025-08-12T05:53:08.695Z" }, + { url = "https://files.pythonhosted.org/packages/01/77/66e54407c59d7b02a3c4e0af3783168fff8e5d61def52cda8728439d86bc/wrapt-1.17.3-cp313-cp313-win_arm64.whl", hash = "sha256:7425ac3c54430f5fc5e7b6f41d41e704db073309acfc09305816bc6a0b26bb16", size = 36896, upload-time = "2025-08-12T05:52:55.34Z" }, + { url = "https://files.pythonhosted.org/packages/02/a2/cd864b2a14f20d14f4c496fab97802001560f9f41554eef6df201cd7f76c/wrapt-1.17.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cf30f6e3c077c8e6a9a7809c94551203c8843e74ba0c960f4a98cd80d4665d39", size = 54132, upload-time = "2025-08-12T05:51:49.864Z" }, + { url = "https://files.pythonhosted.org/packages/d5/46/d011725b0c89e853dc44cceb738a307cde5d240d023d6d40a82d1b4e1182/wrapt-1.17.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e228514a06843cae89621384cfe3a80418f3c04aadf8a3b14e46a7be704e4235", size = 39091, upload-time = "2025-08-12T05:51:38.935Z" }, + { url = "https://files.pythonhosted.org/packages/2e/9e/3ad852d77c35aae7ddebdbc3b6d35ec8013af7d7dddad0ad911f3d891dae/wrapt-1.17.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:5ea5eb3c0c071862997d6f3e02af1d055f381b1d25b286b9d6644b79db77657c", size = 39172, upload-time = "2025-08-12T05:51:59.365Z" }, + { url = "https://files.pythonhosted.org/packages/c3/f7/c983d2762bcce2326c317c26a6a1e7016f7eb039c27cdf5c4e30f4160f31/wrapt-1.17.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:281262213373b6d5e4bb4353bc36d1ba4084e6d6b5d242863721ef2bf2c2930b", size = 87163, upload-time = "2025-08-12T05:52:40.965Z" }, + { url = "https://files.pythonhosted.org/packages/e4/0f/f673f75d489c7f22d17fe0193e84b41540d962f75fce579cf6873167c29b/wrapt-1.17.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dc4a8d2b25efb6681ecacad42fca8859f88092d8732b170de6a5dddd80a1c8fa", size = 87963, upload-time = "2025-08-12T05:52:20.326Z" }, + { url = "https://files.pythonhosted.org/packages/df/61/515ad6caca68995da2fac7a6af97faab8f78ebe3bf4f761e1b77efbc47b5/wrapt-1.17.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:373342dd05b1d07d752cecbec0c41817231f29f3a89aa8b8843f7b95992ed0c7", size = 86945, upload-time = "2025-08-12T05:52:21.581Z" }, + { url = "https://files.pythonhosted.org/packages/d3/bd/4e70162ce398462a467bc09e768bee112f1412e563620adc353de9055d33/wrapt-1.17.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d40770d7c0fd5cbed9d84b2c3f2e156431a12c9a37dc6284060fb4bec0b7ffd4", size = 86857, upload-time = "2025-08-12T05:52:43.043Z" }, + { url = "https://files.pythonhosted.org/packages/2b/b8/da8560695e9284810b8d3df8a19396a6e40e7518059584a1a394a2b35e0a/wrapt-1.17.3-cp314-cp314-win32.whl", hash = "sha256:fbd3c8319de8e1dc79d346929cd71d523622da527cca14e0c1d257e31c2b8b10", size = 37178, upload-time = "2025-08-12T05:53:12.605Z" }, + { url = "https://files.pythonhosted.org/packages/db/c8/b71eeb192c440d67a5a0449aaee2310a1a1e8eca41676046f99ed2487e9f/wrapt-1.17.3-cp314-cp314-win_amd64.whl", hash = "sha256:e1a4120ae5705f673727d3253de3ed0e016f7cd78dc463db1b31e2463e1f3cf6", size = 39310, upload-time = "2025-08-12T05:53:11.106Z" }, + { url = "https://files.pythonhosted.org/packages/45/20/2cda20fd4865fa40f86f6c46ed37a2a8356a7a2fde0773269311f2af56c7/wrapt-1.17.3-cp314-cp314-win_arm64.whl", hash = "sha256:507553480670cab08a800b9463bdb881b2edeed77dc677b0a5915e6106e91a58", size = 37266, upload-time = "2025-08-12T05:52:56.531Z" }, + { url = "https://files.pythonhosted.org/packages/77/ed/dd5cf21aec36c80443c6f900449260b80e2a65cf963668eaef3b9accce36/wrapt-1.17.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:ed7c635ae45cfbc1a7371f708727bf74690daedc49b4dba310590ca0bd28aa8a", size = 56544, upload-time = "2025-08-12T05:51:51.109Z" }, + { url = "https://files.pythonhosted.org/packages/8d/96/450c651cc753877ad100c7949ab4d2e2ecc4d97157e00fa8f45df682456a/wrapt-1.17.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:249f88ed15503f6492a71f01442abddd73856a0032ae860de6d75ca62eed8067", size = 40283, upload-time = "2025-08-12T05:51:39.912Z" }, + { url = "https://files.pythonhosted.org/packages/d1/86/2fcad95994d9b572db57632acb6f900695a648c3e063f2cd344b3f5c5a37/wrapt-1.17.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a03a38adec8066d5a37bea22f2ba6bbf39fcdefbe2d91419ab864c3fb515454", size = 40366, upload-time = "2025-08-12T05:52:00.693Z" }, + { url = "https://files.pythonhosted.org/packages/64/0e/f4472f2fdde2d4617975144311f8800ef73677a159be7fe61fa50997d6c0/wrapt-1.17.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:5d4478d72eb61c36e5b446e375bbc49ed002430d17cdec3cecb36993398e1a9e", size = 108571, upload-time = "2025-08-12T05:52:44.521Z" }, + { url = "https://files.pythonhosted.org/packages/cc/01/9b85a99996b0a97c8a17484684f206cbb6ba73c1ce6890ac668bcf3838fb/wrapt-1.17.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:223db574bb38637e8230eb14b185565023ab624474df94d2af18f1cdb625216f", size = 113094, upload-time = "2025-08-12T05:52:22.618Z" }, + { url = "https://files.pythonhosted.org/packages/25/02/78926c1efddcc7b3aa0bc3d6b33a822f7d898059f7cd9ace8c8318e559ef/wrapt-1.17.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e405adefb53a435f01efa7ccdec012c016b5a1d3f35459990afc39b6be4d5056", size = 110659, upload-time = "2025-08-12T05:52:24.057Z" }, + { url = "https://files.pythonhosted.org/packages/dc/ee/c414501ad518ac3e6fe184753632fe5e5ecacdcf0effc23f31c1e4f7bfcf/wrapt-1.17.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:88547535b787a6c9ce4086917b6e1d291aa8ed914fdd3a838b3539dc95c12804", size = 106946, upload-time = "2025-08-12T05:52:45.976Z" }, + { url = "https://files.pythonhosted.org/packages/be/44/a1bd64b723d13bb151d6cc91b986146a1952385e0392a78567e12149c7b4/wrapt-1.17.3-cp314-cp314t-win32.whl", hash = "sha256:41b1d2bc74c2cac6f9074df52b2efbef2b30bdfe5f40cb78f8ca22963bc62977", size = 38717, upload-time = "2025-08-12T05:53:15.214Z" }, + { url = "https://files.pythonhosted.org/packages/79/d9/7cfd5a312760ac4dd8bf0184a6ee9e43c33e47f3dadc303032ce012b8fa3/wrapt-1.17.3-cp314-cp314t-win_amd64.whl", hash = "sha256:73d496de46cd2cdbdbcce4ae4bcdb4afb6a11234a1df9c085249d55166b95116", size = 41334, upload-time = "2025-08-12T05:53:14.178Z" }, + { url = "https://files.pythonhosted.org/packages/46/78/10ad9781128ed2f99dbc474f43283b13fea8ba58723e98844367531c18e9/wrapt-1.17.3-cp314-cp314t-win_arm64.whl", hash = "sha256:f38e60678850c42461d4202739f9bf1e3a737c7ad283638251e79cc49effb6b6", size = 38471, upload-time = "2025-08-12T05:52:57.784Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f6/a933bd70f98e9cf3e08167fc5cd7aaaca49147e48411c0bd5ae701bb2194/wrapt-1.17.3-py3-none-any.whl", hash = "sha256:7171ae35d2c33d326ac19dd8facb1e82e5fd04ef8c6c0e394d7af55a55051c22", size = 23591, upload-time = "2025-08-12T05:53:20.674Z" }, +] + +[[package]] +name = "xmltodict" +version = "1.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/19/70/80f3b7c10d2630aa66414bf23d210386700aa390547278c789afa994fd7e/xmltodict-1.0.4.tar.gz", hash = "sha256:6d94c9f834dd9e44514162799d344d815a3a4faec913717a9ecbfa5be1bb8e61", size = 26124, upload-time = "2026-02-22T02:21:22.074Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/34/98a2f52245f4d47be93b580dae5f9861ef58977d73a79eb47c58f1ad1f3a/xmltodict-1.0.4-py3-none-any.whl", hash = "sha256:a4a00d300b0e1c59fc2bfccb53d7b2e88c32f200df138a0dd2229f842497026a", size = 13580, upload-time = "2026-02-22T02:21:21.039Z" }, +] + +[[package]] +name = "xxhash" +version = "4.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/a5/1386f35da1475fcaeef42581deae73417c6d2a6a0b2d2e8914de18844dcd/xxhash-4.0.1.tar.gz", hash = "sha256:d55bf4ef10eb09b8b6866790e083d26d087d84caa3cc0946ba87c3ca7ecaf7b7", size = 101513, upload-time = "2026-08-17T08:24:08.557Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0e/58/bc81e25cceab76ce4b400441e3a43312bf3887fedbb2e5f80cc5a7dd7f75/xxhash-4.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8b4477edc03091f51f5309406d230851c23cf4822029e3bf40b8df53093fff1c", size = 38473, upload-time = "2026-08-17T08:20:34.303Z" }, + { url = "https://files.pythonhosted.org/packages/64/8d/d95e810c9a2930906f1fbd0e38f77554abb8e042a190aa9cbb24da39e9a2/xxhash-4.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:04f9a24de11a6647666d5302fd73d6a5224ce50ddc965fb0bb44cee736e6bd7c", size = 36228, upload-time = "2026-08-17T08:20:36.641Z" }, + { url = "https://files.pythonhosted.org/packages/72/be/ebcded2a32ba664a17a1737a91b6baa298bcda6942acdad81af81660b74c/xxhash-4.0.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:6a8c5ce76b94ba49f3be8a8f2611abc6564210702c72ac9e237ca2bebfd17794", size = 253292, upload-time = "2026-08-17T08:21:27.206Z" }, + { url = "https://files.pythonhosted.org/packages/52/2a/72d31d787d988d1130253bc34d249c553f02c9387e7dda789b6d5aa7963b/xxhash-4.0.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b4c8842fb19d78b5e8c2a52baf4c8357658cc56c62bc822b86ce0f942f28e286", size = 276545, upload-time = "2026-08-17T08:20:26.726Z" }, + { url = "https://files.pythonhosted.org/packages/39/ae/048f3b1f283a340bef3697fe5a9d4f10de1696a379af9af6b2352c24d82a/xxhash-4.0.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a43418e1a90b4809a9caf64aeb8b0696e3e1f300a323acc1e6ee2f93ae319fcf", size = 296295, upload-time = "2026-08-17T08:20:15.759Z" }, + { url = "https://files.pythonhosted.org/packages/8e/43/e9a593c81445c8e8d669402edb8264144624e7e5e2406df7d33e3c164d90/xxhash-4.0.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b3662719007e059abde7eddacf8517142ba076ddc7b30c807260e57d28c3c191", size = 279966, upload-time = "2026-08-17T08:21:22.217Z" }, + { url = "https://files.pythonhosted.org/packages/f9/4c/29da2b166955a300521c0abd498ad4481916c3743949b106192b781f58fc/xxhash-4.0.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:06d7fbd609503c3be5e65cdb6bb2f040d6a98574404e2e1d5c60815c97fff4aa", size = 509850, upload-time = "2026-08-17T08:20:32.731Z" }, + { url = "https://files.pythonhosted.org/packages/40/ff/e39e1900179ce7f0f23e7000d9fc672471a8d05b6b2dc657cb496c8975d0/xxhash-4.0.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:101aa300de6ceef3d9c77569706330d8921fc45dd82bceed2084f1e9f2557a24", size = 261005, upload-time = "2026-08-17T08:20:40.735Z" }, + { url = "https://files.pythonhosted.org/packages/89/79/76ee26720d13219458f4b2ec0b22f539fe2bcb1f83dc22a24be4cda4e285/xxhash-4.0.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e4296fcc790876a8b0f297edc83d3b088457b774d8f67b4636807f8a2ec69a79", size = 339620, upload-time = "2026-08-17T08:20:50.371Z" }, + { url = "https://files.pythonhosted.org/packages/2f/c7/56b53252d64ecb2f3a0d283b41033561b1bec9c268095150153b694c2e52/xxhash-4.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:57d7fa8f23908d173001c21a9e82bfc6ad997d1b6c270fb121812b7ed158891c", size = 272558, upload-time = "2026-08-17T08:21:33.883Z" }, + { url = "https://files.pythonhosted.org/packages/fc/76/83101a2f2ad3eb6b4b5d571e0aa394a576e3e23121707d507d80197ac385/xxhash-4.0.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:85e402dab0f9acd3604539747c6fcc57dc188a18af6ab07eb8189351cd32466c", size = 300417, upload-time = "2026-08-17T08:20:36.183Z" }, + { url = "https://files.pythonhosted.org/packages/34/5d/5be1166ec4fc4bc896e508dc51189a2dad200b373269a430e214fb152693/xxhash-4.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:fb59a0dd61fb2ad481c03fda399d78ce57dab6bb62c2c8fdb446a7ba4754b89a", size = 259286, upload-time = "2026-08-17T08:20:21.51Z" }, + { url = "https://files.pythonhosted.org/packages/77/6c/42f6201f13278787c58a6b3a1cd597b47e8665a7d4f68a3440d001c05a75/xxhash-4.0.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:0b20a06454b34f1531fc677c54efe2ecdec691ef9224f7fa919bf2c1363f7ff1", size = 278230, upload-time = "2026-08-17T08:21:47.62Z" }, + { url = "https://files.pythonhosted.org/packages/7f/37/3cb7f149a5a469c628604c33bec6d79764698b315700a4bbf1c6fb15622b/xxhash-4.0.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:f7db035447a0ac8959aa230c5d36545ecf9f547413eb1711c0ca6f0ba1418925", size = 329846, upload-time = "2026-08-17T08:35:10.922Z" }, + { url = "https://files.pythonhosted.org/packages/8c/ee/934eb1e11f4d0e95f3828825f8da4b6d59e338235d63edc3d929769262d2/xxhash-4.0.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:34ed93e20bfd98d722b902121643791eeb4b1641871e2dc63d0d4c2d93f187df", size = 477285, upload-time = "2026-08-17T08:20:46.297Z" }, + { url = "https://files.pythonhosted.org/packages/e2/0b/77835dcd7aec970db74f5724c94207ada83b3e2f5e1474ab44b9c8fe5ea5/xxhash-4.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f6247f5e23ee94f2557ac9dab738a336f607c6ff476fcf66ca70c3aef5eee15a", size = 257552, upload-time = "2026-08-17T08:20:58.211Z" }, + { url = "https://files.pythonhosted.org/packages/da/6c/a3ce7a1a9c4ec9ad8babba591a996a71c474ff9630c5fb04c8c9d8b995ca/xxhash-4.0.1-cp311-cp311-win32.whl", hash = "sha256:348c8f288dc961d6bbd1985c8152a3ed7a85c95df00e82320f0c5215d922a399", size = 34630, upload-time = "2026-08-17T08:21:53.323Z" }, + { url = "https://files.pythonhosted.org/packages/d9/58/60d2170e8cda0891aab25dcaa74797b420c3c6cde8a5bc8372f17b30c0cf/xxhash-4.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:ac0f291ab6485bd71f33941f9b92771318332a05d505460b41e893a549caadc0", size = 36992, upload-time = "2026-08-17T08:20:41.973Z" }, + { url = "https://files.pythonhosted.org/packages/ac/de/b229a39f9bbbe30cbcf9afaaa8993cb65286715c90a3b058c3769196ae02/xxhash-4.0.1-cp311-cp311-win_arm64.whl", hash = "sha256:72f34834518157a75e7090f328ee7a16c70c804cfc7c694fa069cc888e9fc03e", size = 33289, upload-time = "2026-08-17T08:20:32.176Z" }, + { url = "https://files.pythonhosted.org/packages/26/6c/dc7cffeadd06336cd934947187cd38abb263103bbc552ca0f55fe4ff595a/xxhash-4.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:1ee523f51718e41753f04f7102bb4dc55a18d2ea5cbaceef8ec7ca08571bd428", size = 38444, upload-time = "2026-08-17T08:21:54.332Z" }, + { url = "https://files.pythonhosted.org/packages/75/c9/cf736f6db8c3273af18925061572db0d4357818a9ce425f4b5fb0021918e/xxhash-4.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:515a822c73abbf6a0b7c70976d9662be342835c9d78b8dc7c023411f39c35dbc", size = 36195, upload-time = "2026-08-17T08:35:13.004Z" }, + { url = "https://files.pythonhosted.org/packages/da/a2/ca1929354b6851529d0148f7f335b5e2b0281f83bab3e19f0896dc579796/xxhash-4.0.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f5d031f35962e5483a613214e61f09fe24ab523062c3646d592dc16c4a217451", size = 253113, upload-time = "2026-08-17T08:20:52.152Z" }, + { url = "https://files.pythonhosted.org/packages/de/bb/542005206af59518bc8d78a210f1e0172217bc53beb32f64a5b632e72b6b/xxhash-4.0.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:da0264844a09b538c894e5eff25313d941deb4dedec2131b98418a71a3c9944e", size = 276525, upload-time = "2026-08-17T08:21:01.886Z" }, + { url = "https://files.pythonhosted.org/packages/1b/df/607cff25dcb0f1d35c3b04493f6ad8471edb03fd4eacbdcc5ceddef1f3e9/xxhash-4.0.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1642907941ee4b75aacc3db688af52ea02ca2305ab22af7ee686ed726b332684", size = 297703, upload-time = "2026-08-17T08:21:57.958Z" }, + { url = "https://files.pythonhosted.org/packages/15/ba/9d2275eea0b9d9c6b02921be23f7588356c60df95c763b25f0e045894d43/xxhash-4.0.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4af350bc3f329970c0e3a59af84a8a30998bf8a9167eb50cd48e59baaa1d7bec", size = 280252, upload-time = "2026-08-17T08:20:47.299Z" }, + { url = "https://files.pythonhosted.org/packages/1d/aa/2299d9f6369e550aef2abb64945e39daa34412725aa46a20d99b74d76f67/xxhash-4.0.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8ba782ca3bf1e81492611152b9a0d5264971339e95e34d69de0ac2c926be496d", size = 511041, upload-time = "2026-08-17T08:20:36.771Z" }, + { url = "https://files.pythonhosted.org/packages/83/97/31bd8b8279e6935a0719f6910ced15e9d5a2cd554b253f6027ce1b5a1c2c/xxhash-4.0.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:237b8f63a2a0fcfb1ffc06e21dad23add44e6d354b2b014364a1d41e419a4dee", size = 261812, upload-time = "2026-08-17T08:22:00.469Z" }, + { url = "https://files.pythonhosted.org/packages/2d/c1/d180a2da23c105d8e0b02d54f9f5841013fc81c233010ec781e31f1aee4c/xxhash-4.0.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:81507a68ba84c55241fb61cce1469f473a5da4205fc8ef6f698e5948eea8dd88", size = 339878, upload-time = "2026-08-17T08:35:17.626Z" }, + { url = "https://files.pythonhosted.org/packages/a8/3d/f584cd3172fe934f0f5a0a3917d0d7ce781f74d794fd43bb72be71c3ef6f/xxhash-4.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5f1ea31d61bcd2cd2f3ec4ca80a64187bbd7948f490b63cf0dcbc6e717b4c1e9", size = 272871, upload-time = "2026-08-17T08:20:56.067Z" }, + { url = "https://files.pythonhosted.org/packages/34/50/2c7956b2b551682e00b9aebce9ceb0a991a131d65f9850c09f5f9760be2e/xxhash-4.0.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:06713a5aaf1d0905c5579416c020c02e42b3ceb931e86c7d3b7fb85403dee3f3", size = 301440, upload-time = "2026-08-17T08:21:35.911Z" }, + { url = "https://files.pythonhosted.org/packages/eb/a2/0739f6482184a8026f4b022718f5f815d352059312e80696825433f0a8e7/xxhash-4.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e8cda075b10bb3917b002c74a04f9e02b7d13b5bf732571404d51c52b11c7329", size = 260157, upload-time = "2026-08-17T08:22:01.416Z" }, + { url = "https://files.pythonhosted.org/packages/a1/25/b31a7bcf1d7d116842812e54f9b944843b4236ea4fa85634e8259f342212/xxhash-4.0.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c10b9206753b64aa791b35b201485477525b26fdec5bf86e8364c388a03e2592", size = 278233, upload-time = "2026-08-17T08:21:15.674Z" }, + { url = "https://files.pythonhosted.org/packages/db/e8/5293bae090fc6119dbc5fcf5c4cc0e1536394b52d73b7904d033836c73db/xxhash-4.0.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:f3e1a44af01b6692de0ec6caba5f0bf93ceb36896e02b7fc00952c6ea7ef39e1", size = 330270, upload-time = "2026-08-17T08:20:51.128Z" }, + { url = "https://files.pythonhosted.org/packages/72/9e/e2ab12d40921f3f34c9317637d65e011aeababf8288356ea8d527de2c1d0/xxhash-4.0.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:c6fc415b5568bd9accc7187f1729a99707330c0a67a8b9f93c1149ed573ed75d", size = 478555, upload-time = "2026-08-17T08:22:04.183Z" }, + { url = "https://files.pythonhosted.org/packages/6d/32/c6148d39a49efa95f39b4cf0d41ef35a487f3b30f6fb1fc8fe8d8eab577e/xxhash-4.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:96d8de55029d42251945531f6aa7590c32b48163c66a43bf29d8657d7446a377", size = 258174, upload-time = "2026-08-17T08:35:21.18Z" }, + { url = "https://files.pythonhosted.org/packages/8f/fb/0b04b68d6c5bc71c7a2c344f1287327b67e607f28fbcfd937697caca64b6/xxhash-4.0.1-cp312-cp312-pyemscripten_2024_0_wasm32.whl", hash = "sha256:0163b5d259de23ae9e07b7eabf435ce4704f6f205589a2b154e6af4be985ce1b", size = 20767, upload-time = "2026-08-17T08:21:00.806Z" }, + { url = "https://files.pythonhosted.org/packages/a6/be/476092aba34d1fcd313e1613a3bb3bc692f253d167b54bc90049043b5034/xxhash-4.0.1-cp312-cp312-win32.whl", hash = "sha256:1216f7ba5683f17a89eb7dcb4bc50a0b743dfe1902278d7b3d0786f538118433", size = 34669, upload-time = "2026-08-17T08:21:49.486Z" }, + { url = "https://files.pythonhosted.org/packages/aa/02/f9413d94fae43cec6d1a74c4f12156c6f4a7f5fd50e1d34defebdee3dec9/xxhash-4.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:5c2d525a3afabcd8e3549d85fc7e111fde6bc302d06a1893fe73adb79823415e", size = 37073, upload-time = "2026-08-17T08:22:04.886Z" }, + { url = "https://files.pythonhosted.org/packages/c1/83/6fe93c1b95acf962bc61a246df09dc2dcce895ccfc1080c9f48d0b652b92/xxhash-4.0.1-cp312-cp312-win_arm64.whl", hash = "sha256:86b2b12bec60c678ed8f5cca0258ad93a8928ebddb6ca7732f0875afe1451d1a", size = 33299, upload-time = "2026-08-17T08:35:12.708Z" }, + { url = "https://files.pythonhosted.org/packages/f3/dd/c707286b527722f776e1fb81dd202c45623355ba1a2972337a2a26075b2b/xxhash-4.0.1-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:8c9fe122444e129881afd1d4d1c7ac0d3ce2d91b68c2b40173b6025ff1c31f9a", size = 43639, upload-time = "2026-08-17T08:20:54.945Z" }, + { url = "https://files.pythonhosted.org/packages/1b/3b/bb71639a0f95635f61936a6f2653599c4261b645ddddd8d00f9dfe3613e2/xxhash-4.0.1-cp313-cp313-android_24_x86_64.whl", hash = "sha256:1f3346c5c287ac3c7f38b20380f55e8768230e7252af59fabcf3b87ab21e4256", size = 40657, upload-time = "2026-08-17T08:22:12.616Z" }, + { url = "https://files.pythonhosted.org/packages/3c/91/76f3f5385faa9886a36f21fcc603f40b4c0c40ce622382f133160c48b4d9/xxhash-4.0.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:4e5141543c7f7fe3087500bbb4ac2845cb528a980aa91f8f1e661e2292ff4a5d", size = 34708, upload-time = "2026-08-17T08:35:24.614Z" }, + { url = "https://files.pythonhosted.org/packages/9a/4a/f48f0e3e1b1ab072979fff2a5be899234e28090883e8b519d0b10215d708/xxhash-4.0.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:f09ee747e2a5f876cc5ad56947734811828335e13b403dd8ea1e06d77a9dd48d", size = 35650, upload-time = "2026-08-17T08:21:09.337Z" }, + { url = "https://files.pythonhosted.org/packages/c4/53/b73d7472b196101ad1f57ed0674af3af803ac3e9ec2feadd650a7b262562/xxhash-4.0.1-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:acf52474b2494ef66dc7e0fb6d5e2b50c18313039ad4d275fbf9f9907c804bc5", size = 37958, upload-time = "2026-08-17T08:22:10.616Z" }, + { url = "https://files.pythonhosted.org/packages/d0/f2/024946ad8fa532074af4e4380179da54b7ec9facc8bd0b279ec0fac4e63a/xxhash-4.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1b3cccf75eeb5b01639b2feadb042a8e07889293b7ca72fa2985e7dcb64763cf", size = 38032, upload-time = "2026-08-17T08:22:09.535Z" }, + { url = "https://files.pythonhosted.org/packages/da/e0/934af8d99bb5885711006bec30a691f728edd513d2c40f053f887d8e7577/xxhash-4.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cd878d32f5c6cbce9783f8d6897561fb772211edba9dde49d85672b88ed45276", size = 35895, upload-time = "2026-08-17T08:35:16.53Z" }, + { url = "https://files.pythonhosted.org/packages/20/5f/a8011f6a1558f7ca66d9077bb4f192b1871afcea62fbd5733605d2015755/xxhash-4.0.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:41e579025a6e13a99e6d71e39c9cfc621a0dcdbbf19106325e145fa858f2d794", size = 259464, upload-time = "2026-08-17T08:21:06.72Z" }, + { url = "https://files.pythonhosted.org/packages/ff/89/9665a44397547e7a3d58c0942425a976d58dcfd4b538f33220a312bf6912/xxhash-4.0.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:74379a577a9f3b6afbdedf1b90e5c7764467051977f18a326d7d607336d743bd", size = 283949, upload-time = "2026-08-17T08:22:17.003Z" }, + { url = "https://files.pythonhosted.org/packages/34/2d/78774141266457468f29f3f5803092df4db87d8148ba74e4debd041649db/xxhash-4.0.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:acb31ecdd1a97fab5cd39a84ee9f515e727d319f796fec48703b8339b9998360", size = 303898, upload-time = "2026-08-17T08:35:27.951Z" }, + { url = "https://files.pythonhosted.org/packages/59/48/d78d22de576b42528bff87c14207de50de4f0b888221a50ff7c9d675d670/xxhash-4.0.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5b7875ac1a2edcb691f27642b8b94b904baa6bcecb7d79c72df2228ba8cb5c51", size = 287241, upload-time = "2026-08-17T08:21:13.042Z" }, + { url = "https://files.pythonhosted.org/packages/4c/de/7a1755a59c59fd46176f293bbdd99e399a6537ba9537fc723aa4d1bf6e27/xxhash-4.0.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4751f1d7eecae6b2d2a773630f1a7248f125c9a92a456694d03c15bceffc9d68", size = 519856, upload-time = "2026-08-17T08:22:15.35Z" }, + { url = "https://files.pythonhosted.org/packages/6f/fb/76580c08e916507859b0f335393cb5fdc59452c4402edbc6bcca6e47e7df/xxhash-4.0.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9a51b061d54cda8b83e62c44458bfbf0dabbef9b975dd9649952ba5076b9f349", size = 268572, upload-time = "2026-08-17T08:22:14.533Z" }, + { url = "https://files.pythonhosted.org/packages/d0/2b/1abde3e07b8f2077a38b4fbfaf764115008bfe0ff03bc7756a52c9fd0607/xxhash-4.0.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:74a164e8b63f1e9cf35c9a7809d082b033d1a00e7375d5d814415436e7867e57", size = 344967, upload-time = "2026-08-17T08:35:23.569Z" }, + { url = "https://files.pythonhosted.org/packages/5c/15/80b6ddf0732eef48a8b5fe717398274794392bd6dbe82af38d189d214772/xxhash-4.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4f5e5c6df4b703afcbe9352d238a51efd97c3b91fdc3a2052e40fdacb1e7505f", size = 279956, upload-time = "2026-08-17T08:21:24.97Z" }, + { url = "https://files.pythonhosted.org/packages/77/e0/11cbc43c205bf81fad50d69c7319cd1b1ccc01a66cd4fb8766357126c43d/xxhash-4.0.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:d54b8ae068af532c8cdf56abb9e09a60fbe7b10792444c9c27987bb6d3b450fa", size = 307583, upload-time = "2026-08-17T08:22:22.541Z" }, + { url = "https://files.pythonhosted.org/packages/1c/11/cf0bc07feb2791045b6ac075d4bf64f1a5beedef2f46ae70d7104d63a19f/xxhash-4.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1749f0688020209fe0d357ce1e1cd9ec9c6161ed0405ea949d24581c4c43fa91", size = 265848, upload-time = "2026-08-17T08:35:31.298Z" }, + { url = "https://files.pythonhosted.org/packages/d4/c4/7ada4bea2a2795073dfc42d96842930efbe7a0c1857ef4b522e4e90e5d83/xxhash-4.0.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:94ac8a6b8c47951173f0b67bf862bcb971bf24e493b9fbbdb0e010cbbc7d9f54", size = 284409, upload-time = "2026-08-17T08:21:23.156Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f4/d8ce83dd6b99ccfbdadaf2db968ae40334d2e5f73a0297e593b9ddb3df39/xxhash-4.0.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:a33de7633c948ab2dc144af370a66e7e7af29b425dcd0f7e4f59689fb9391b53", size = 335921, upload-time = "2026-08-17T08:22:21.802Z" }, + { url = "https://files.pythonhosted.org/packages/a6/9f/f47d8724bd8bc45b395b06b7cacea2dae0d00031af1b707184a091161df6/xxhash-4.0.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:247ece770647c0aef080561fa996f9774b4dadce2d0c42eeb98229db7dcf820d", size = 487023, upload-time = "2026-08-17T08:22:19.729Z" }, + { url = "https://files.pythonhosted.org/packages/57/54/2d87098f3371cc1e42dd04d2285ad56bca4c56667bc501bff02d2b9fd6b5/xxhash-4.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a4553d36cc0b7fce1f35ba8a94dfd775aa3ed12f5eab2dc3b46ac75a0706b0bb", size = 264333, upload-time = "2026-08-17T08:35:27.001Z" }, + { url = "https://files.pythonhosted.org/packages/27/b8/93795ca5898ec7d7d0455283ad261c0fc76b4f0c0a69e86233bd7badb0bd/xxhash-4.0.1-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:87aa309a93bd5ec13f14309a305ff4e9bf74c5363fc46c264c0a22edfd5b0670", size = 20581, upload-time = "2026-08-17T08:21:39.207Z" }, + { url = "https://files.pythonhosted.org/packages/b6/96/926f7335a0a1647952c00421e8da877f658094f61336306c7cadc335c94d/xxhash-4.0.1-cp313-cp313-win32.whl", hash = "sha256:cba763d84b06bda2c38d5185dee76f1b9dfdc0789e96e476d9e10005526d0788", size = 34449, upload-time = "2026-08-17T08:22:29.362Z" }, + { url = "https://files.pythonhosted.org/packages/ea/61/8a5aeb811de093bab3434e77eff0e9461624a1a56a6a93d315d080aab2aa/xxhash-4.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:97b94fb29abf21f5f0bde15f7dbdd3a4aa2dc59f37026adc7b4bee8563b84375", size = 36520, upload-time = "2026-08-17T08:35:34.852Z" }, + { url = "https://files.pythonhosted.org/packages/04/14/97f3c74000ca36955e9cb86f6d270dcd5848b5c65afa623453f5cf2d83d6/xxhash-4.0.1-cp313-cp313-win_arm64.whl", hash = "sha256:08ed8da18cd4fd0a6a5d6a444852d8fbd0e565388a74a4937085451b5f1a312a", size = 33428, upload-time = "2026-08-17T08:21:31.713Z" }, + { url = "https://files.pythonhosted.org/packages/81/0e/ea406a02b561d3275232ccfdb3e29df80f7a65414940e3a15721c7bea40f/xxhash-4.0.1-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:af05a3f650220a6c59fa0ad2410249f2d2470a05225807c378fb67458693f8df", size = 43747, upload-time = "2026-08-17T08:22:31.37Z" }, + { url = "https://files.pythonhosted.org/packages/f9/f0/b0c94d61ccf6b5d1f8847b58ef8f923125ac4919ed5bd0eb082750ca7cbd/xxhash-4.0.1-cp314-cp314-android_24_x86_64.whl", hash = "sha256:a6e3653df1a70b8ac4191216324242e4be2bca18c9a7c10934e1bd56dc7ca15e", size = 40749, upload-time = "2026-08-17T08:22:29.431Z" }, + { url = "https://files.pythonhosted.org/packages/2f/c5/8085881a538983be0fd1c865d5df236242fea496044e2c8ca32b9f2ba39c/xxhash-4.0.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:4528cf80ebbbf57d40edfb31521ae265daa6dd636d615b1cf0ac86209579e59d", size = 34734, upload-time = "2026-08-17T08:35:33.68Z" }, + { url = "https://files.pythonhosted.org/packages/d3/94/8803d13c968fc75ca434eea991d29ac5fd8a36b4afc9a6a9803c53933db4/xxhash-4.0.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:90cb2a1c9cc503a054a19612b48ff6e8e47805f618bdb3224a07568aad03a37e", size = 35671, upload-time = "2026-08-17T08:21:48.322Z" }, + { url = "https://files.pythonhosted.org/packages/85/d5/ad91d7f0fd294190d37c08236fe661f5c4e3f83dcd1a121877a2e64681ce/xxhash-4.0.1-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:a949b072ea59c6eca0811ccd9e95133cc50d2afda8d464b5b077c78f78efa269", size = 38094, upload-time = "2026-08-17T08:22:39.763Z" }, + { url = "https://files.pythonhosted.org/packages/89/f4/2b7ebdc1869caca5f02c4cba8379b631050d3c3d4adb9187e4dc1a6b8d3c/xxhash-4.0.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:79a3203aadf39637869dfea1185227d8452844d78b837e54fb1117b4d34ba5c3", size = 38244, upload-time = "2026-08-17T08:35:38.081Z" }, + { url = "https://files.pythonhosted.org/packages/90/9d/f66cf6935f528e575f1ae4d6560d376e7587569747186f4fae8777cadc1b/xxhash-4.0.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:d9f3848ffaf010bdbabdbf4c25641fa258b6227ff27bc74a4d06edef521a4873", size = 35904, upload-time = "2026-08-17T08:21:37.358Z" }, + { url = "https://files.pythonhosted.org/packages/07/29/34569d7b482f0dc060074faafd163c588f915cbc3e3e218f1ffd8a3ad340/xxhash-4.0.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:9283d9dd6b44acad35118e2976fc763a065509e4118debdb61916ec322ed17b9", size = 259595, upload-time = "2026-08-17T08:22:38.153Z" }, + { url = "https://files.pythonhosted.org/packages/ce/d2/a2370acfcd48732cf5c2b87f06cfbf7fa51c0ce0dd736bde42939eb9ebf7/xxhash-4.0.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1c7c642a0f79c3e3cf2965475507574d3d1a50ec71060039d60cb87358667cb2", size = 284279, upload-time = "2026-08-17T08:22:36.396Z" }, + { url = "https://files.pythonhosted.org/packages/08/15/17d33c24e6c4a1c0b9ddc5584f0c25d51d48b34bacde1416a2235a19db4b/xxhash-4.0.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:96dedccfb09a73a25751053a183159b88f4ee75f388df8166040c152ac0531c6", size = 303973, upload-time = "2026-08-17T08:35:39.22Z" }, + { url = "https://files.pythonhosted.org/packages/ec/e0/4ec0d69ad5738729098a61e631b7ed2df22a922b0e03014b597c72bd863d/xxhash-4.0.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81664268dba92e037b740ecf37fa02f1cab4a391f93f28e35792b3341c60648f", size = 287535, upload-time = "2026-08-17T08:21:52.158Z" }, + { url = "https://files.pythonhosted.org/packages/0f/8b/4f9b17e7a9eb71c65548ecddd9c18b84e3c18ca41c4d436ad2a3000d3f7b/xxhash-4.0.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:839f58c5bd9989875be0fd28446dbf32cace2c2cd8bf2f6762acdc38a95cd1aa", size = 519257, upload-time = "2026-08-17T08:22:43.272Z" }, + { url = "https://files.pythonhosted.org/packages/68/35/3276b3e743b8ddbed9c3f71c76d9dd6a75d72aa4e678b1447b635cfd92e0/xxhash-4.0.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ffa44b4c7c5d0ffa31356b4428659516c0e47647825c74079a296b3857b6d99d", size = 268190, upload-time = "2026-08-17T08:35:44.985Z" }, + { url = "https://files.pythonhosted.org/packages/08/d4/f1555de3c96721320930dbb7988c8482d82b85970076aba1a8d40e83ad43/xxhash-4.0.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e681a6fc7e4f715252b9b5acfb30536ec7dd1f75033a32dc617e6fa95af1a3fd", size = 345553, upload-time = "2026-08-17T08:21:41.025Z" }, + { url = "https://files.pythonhosted.org/packages/ac/98/c28908f27007087b61139d290f908dd827ffd40b88af0c43f9e1a1a7ffd5/xxhash-4.0.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c6301d92545c591ad31c3e050aa40a5f8a4c16413f1f9e6f9322c6f0f9d2b736", size = 280499, upload-time = "2026-08-17T08:22:52.236Z" }, + { url = "https://files.pythonhosted.org/packages/a9/76/3ef57622c65816348f8196273485baab4752aae064959901e85cd867e067/xxhash-4.0.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:6efb8f21cc136c79b3e5bb747c8682d37916fb202cdbbc32182de5c4e47f821f", size = 307211, upload-time = "2026-08-17T08:22:40.815Z" }, + { url = "https://files.pythonhosted.org/packages/8a/4c/5804504bbc808968e57d6a50286dd8f8cc06e0ddd6e4ab4b1dc89ae42f35/xxhash-4.0.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:760de77279e9cf9c81d012ce0705cba13afccee9b09c480f17d778c8c5cefae8", size = 265865, upload-time = "2026-08-17T08:35:42.727Z" }, + { url = "https://files.pythonhosted.org/packages/aa/ee/8572fdfd70e7aaaf150af899871c2cc0bb88c3295ca82172a31e04ca5168/xxhash-4.0.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:a16a3fa6936e36bb1414d16a6bd012c9033e5161b68b426805b61d895392437d", size = 284545, upload-time = "2026-08-17T08:21:56.965Z" }, + { url = "https://files.pythonhosted.org/packages/c1/f8/6eadcca0904660c848b466524e82a233d16c9d2d5258433aaf3546142d86/xxhash-4.0.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:9c3c4b9aa9a27196b921197f7daf9e6c1412739df06a99cfa6e923879362eff6", size = 336022, upload-time = "2026-08-17T08:22:46.346Z" }, + { url = "https://files.pythonhosted.org/packages/27/df/4aa107b81602d6d6d09ab5a607c530d2d3a6b28e2e9a59b01875bd877c54/xxhash-4.0.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:863f3d3b44110f7243e86cf994aa5c5d88f2348b6e84ab4402fadadfbf9f7da7", size = 486671, upload-time = "2026-08-17T08:35:49.016Z" }, + { url = "https://files.pythonhosted.org/packages/45/b7/b2bf9b5301e9cd5f2e335fea8da0f5cf209a6594cb1fe77754774ad4a6fd/xxhash-4.0.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:63aa52659bc32bb9bd7cb5caf523b4d14429a477762cfac886132d687c1f80fc", size = 263744, upload-time = "2026-08-17T08:21:56.165Z" }, + { url = "https://files.pythonhosted.org/packages/0b/96/35b1c02177ae26234892c2310fb4822ba62411acccbf425ab8f9fd99354a/xxhash-4.0.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:67e57b834e07ed973cee7b6da1548ff28a56458d77696fd2a5f397f340694848", size = 20563, upload-time = "2026-08-17T08:35:11.924Z" }, + { url = "https://files.pythonhosted.org/packages/51/c2/a06300b165fbd6b0cb4a9742987f2e997a9f447ce3bf7c6ac97b862ce62a/xxhash-4.0.1-cp314-cp314-win32.whl", hash = "sha256:b6c1f9c59bbe593f88a0aad30be4150f15bd57bd64efb95feeabcb8e563f1ecd", size = 35151, upload-time = "2026-08-17T08:22:44.283Z" }, + { url = "https://files.pythonhosted.org/packages/06/96/c5b37296b78f80fc97124c0fee0c7bbd1bdb6f3b18bcd8748bb113b2d8fc/xxhash-4.0.1-cp314-cp314-win_amd64.whl", hash = "sha256:da544672efd9ad76077928a3e6c5d894e52ce82d3bf14002db4a1bf17d1a36a2", size = 37156, upload-time = "2026-08-17T08:35:46.551Z" }, + { url = "https://files.pythonhosted.org/packages/ce/5e/248f9cd169c2fb62236bedfba246d213bce728f74901e99047e3f3c55875/xxhash-4.0.1-cp314-cp314-win_arm64.whl", hash = "sha256:d0d24a4f3fb63852cd09af46ae4b7a4d00cc8b8615a046dca543786e728d1056", size = 34379, upload-time = "2026-08-17T08:21:59.446Z" }, + { url = "https://files.pythonhosted.org/packages/58/c8/db1d37c0da0324d0298f6abd931ca1d4736e049d9f2081230a8421da74d2/xxhash-4.0.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:349775ac30372b344d2338b2a168c0a1312a644194da25b8bec476d55761a128", size = 38656, upload-time = "2026-08-17T08:22:49.119Z" }, + { url = "https://files.pythonhosted.org/packages/c5/8e/e18998ec465fb977bc74272e5bf3c2e886c13b014cbef916cd607802c709/xxhash-4.0.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:43e5f9169e73d0f0db33b5f6b8554bcce69ac278c966daf83d5eb4eb2f13829f", size = 36306, upload-time = "2026-08-17T08:35:52.853Z" }, + { url = "https://files.pythonhosted.org/packages/ef/1a/b83f86f8a987a3cbcb7e005a6824ff64aecae35abc1395a0d44ee16c3319/xxhash-4.0.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:4a252fb862b0ae2590587e625f47a0e03da05cf0205e8830b67b6596c06038b1", size = 273729, upload-time = "2026-08-17T08:21:58.833Z" }, + { url = "https://files.pythonhosted.org/packages/02/4e/2db15aa8508e0cd5b632927a53b98234f24039ea65377e6cf996c06d2d4f/xxhash-4.0.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2df3ca8757dc381e75e90a4d7995a6324f58a923c7145220a7b2c0231f66fddc", size = 301083, upload-time = "2026-08-17T08:35:14.113Z" }, + { url = "https://files.pythonhosted.org/packages/26/94/ed759787ffe802bd8e31cfcdad3755cbeca2dcdafd2f790cd6f25d195199/xxhash-4.0.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:bfed61996d618eb90d6eaae0178002e3466a28b06bfc557a7a3a7266378d8c5a", size = 312745, upload-time = "2026-08-17T08:22:52.232Z" }, + { url = "https://files.pythonhosted.org/packages/45/7a/f64b4a4cc8b51e950709207f55f7f56ae9c5af6631dd31d7fb443312418c/xxhash-4.0.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9761ff4a0ffa583fe850731ad24fe82c88cccb7a2294727db0955f3279a4cb3f", size = 301419, upload-time = "2026-08-17T08:35:50.143Z" }, + { url = "https://files.pythonhosted.org/packages/a0/71/bac313b8de073569b8db3152044a7cfcce87a3fa9698c18fe9f914dee6b1/xxhash-4.0.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:edccc2ec58435a580f96a48a3ccae8cd0a480824119165dd90108718ad81ae6e", size = 534485, upload-time = "2026-08-17T08:22:11.515Z" }, + { url = "https://files.pythonhosted.org/packages/b9/0c/16b5e419f24e59507ee05626d2bb0deafdb03f9f27783bc0785a9849602e/xxhash-4.0.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4741d42d59e4e5fa1a86c17ab9c27dc8ea459c700d91b6742fdb9138d9a516cb", size = 279605, upload-time = "2026-08-17T08:22:52.934Z" }, + { url = "https://files.pythonhosted.org/packages/5f/55/5787dd6e2d8d5b61256a5039f6b18c2193c7c1de4a2fd2413288d0d9c604/xxhash-4.0.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:440c401e146ce64bdb3beb8ff0c84677b6f21307c28a34779071cecee5d4d70c", size = 358924, upload-time = "2026-08-17T08:35:58.164Z" }, + { url = "https://files.pythonhosted.org/packages/f3/68/89be41991f3b0a2e91f940bdf3128852c3ed571cf560d98ad0f67024afe4/xxhash-4.0.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5b7979f71d06ae45a769de0699900a246d8cb632db1e8bfdc79ec019063a503c", size = 295305, upload-time = "2026-08-17T08:22:13.683Z" }, + { url = "https://files.pythonhosted.org/packages/e6/5a/52ff0a0cc361aad393ff9a46ffe3aabbcf9c03d6c8f2612da7d553048276/xxhash-4.0.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:62198213fc3e0c56e567894b318ba45834e007d065f84ba6dc9165d21546fc56", size = 320228, upload-time = "2026-08-17T08:35:18.946Z" }, + { url = "https://files.pythonhosted.org/packages/0f/b5/91c60ff22c7f6cd5f6d7a5bad5a2cdcb4c33987dfa50bf13f0d856279b2e/xxhash-4.0.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:b3bece52127ac20044311ee73567f9f0893b5de64f9028aecc90cc740cfd525a", size = 279414, upload-time = "2026-08-17T08:23:03.212Z" }, + { url = "https://files.pythonhosted.org/packages/b9/94/9685954804d47d0390871a64bec606a0d536406382d71a784df3a5883fb4/xxhash-4.0.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:a865d2d470220e659220fdb59d5b6c4422802d8d6098e1324bc4d12444798914", size = 297594, upload-time = "2026-08-17T08:35:57.881Z" }, + { url = "https://files.pythonhosted.org/packages/89/62/b67ac9412907b7a07a2a0c08c3440b9e4480231a7b3de0767e87011e4564/xxhash-4.0.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:8580aab306888224074c7edeec734de0c3c5ccde65b2da4e6c9a5e28f7c0a1bd", size = 348526, upload-time = "2026-08-17T08:22:18.571Z" }, + { url = "https://files.pythonhosted.org/packages/37/ed/6723cc49a9f567d52d01fd7c1741b0f2e3a13e71d15f7ac49d753a20c115/xxhash-4.0.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:2d52dc7c33c1b83082b707f6b7814dc76d2faaa2ea62bd9c5fab4b36f83c087f", size = 499307, upload-time = "2026-08-17T08:22:56.52Z" }, + { url = "https://files.pythonhosted.org/packages/fd/2e/7b10e101ab988d93b791023be7191d7661271d6ab31ac082276b9091042a/xxhash-4.0.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6a9f98af872355e0c02439e48583958eee00e60b928bb20476460d9d40cb7b4e", size = 274989, upload-time = "2026-08-17T08:36:01.834Z" }, + { url = "https://files.pythonhosted.org/packages/9b/8d/7eabcc8d29cce40621443cff24c07d7306ef574b8956c47ac59f21098005/xxhash-4.0.1-cp314-cp314t-win32.whl", hash = "sha256:a14578102a6081465aec9cf73c76c3cd3f79f0709bdb3b8ae7ab0b54c9d8b089", size = 35482, upload-time = "2026-08-17T08:22:32.336Z" }, + { url = "https://files.pythonhosted.org/packages/ca/89/2a4268e1971f63038b79fb75e3b9c8de942cd77acabbb0c5625352a31940/xxhash-4.0.1-cp314-cp314t-win_amd64.whl", hash = "sha256:c57963970d359a72262f7fe6be88f945e2334d4bc41462b7f08c37b0abf35ca6", size = 37490, upload-time = "2026-08-17T08:35:22.475Z" }, + { url = "https://files.pythonhosted.org/packages/90/7b/950ecab1fe4cf421d0a6211ddd9a0ac82e39e55c45a111ceb90953dc6c9a/xxhash-4.0.1-cp314-cp314t-win_arm64.whl", hash = "sha256:b659fad79c99b0238c7ad7e9d7dbf4eebfea9097c2dba65fa0a4d18a25b29a2f", size = 34596, upload-time = "2026-08-17T08:23:10.001Z" }, + { url = "https://files.pythonhosted.org/packages/c4/03/7dc3b85fac10751613bfedb0e120734e0e8710054abad3f931e9d3843a14/xxhash-4.0.1-cp315-cp315-android_24_arm64_v8a.whl", hash = "sha256:5adf927dca8c47fde7e683fe69efdd81bc865c4db1fb6bb00b391e2b6185207b", size = 43749, upload-time = "2026-08-17T08:36:00.47Z" }, + { url = "https://files.pythonhosted.org/packages/a5/55/bfac071c5b1c6d6a3d48ab1ab96a15e958a1d7061f4afc97804292d87264/xxhash-4.0.1-cp315-cp315-android_24_x86_64.whl", hash = "sha256:c30dd1af66a820820398b26e0d74e7a9aa43cae705924f23ed828cd8e5c26c3d", size = 40758, upload-time = "2026-08-17T08:22:30.209Z" }, + { url = "https://files.pythonhosted.org/packages/79/87/49a260e685d1a74c56a69432a8ee0527ddcbd684a3c51f87edc3b75639c5/xxhash-4.0.1-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:1bc591533fc975614f7e13594daee76af96b8e1fbcf8de76c8773858fa9e7cea", size = 34788, upload-time = "2026-08-17T08:23:09.014Z" }, + { url = "https://files.pythonhosted.org/packages/6c/ef/50d72ed2170dae872e1c0fe333d0908e0a2afbffe74c5c9037d5406a4b89/xxhash-4.0.1-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:567cbc630302a46a8ecfd943b309ccf5372bb3718f1f3762d452df30f033bcf0", size = 35746, upload-time = "2026-08-17T08:36:05.557Z" }, + { url = "https://files.pythonhosted.org/packages/66/f0/969deaa2bab3bfd5ad5b023442124d2255b9961eef6f797ec74eb8683bdf/xxhash-4.0.1-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:e998cb3685b92101ec5de0fb4d9485cf01e50bc418211955c55d98064664cf4c", size = 38098, upload-time = "2026-08-17T08:22:36.906Z" }, + { url = "https://files.pythonhosted.org/packages/86/aa/45ed7d7b8d7b66202a47bf8ff3b77cea28d2ea54dfcdd202b4cfe043e3dc/xxhash-4.0.1-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:c3074db513c81f764053e3da079312ecf85a50d8350c71f4cc0105d9662a9e6c", size = 38251, upload-time = "2026-08-17T08:35:25.774Z" }, + { url = "https://files.pythonhosted.org/packages/f1/9d/45e7520a7856e13800a5dc8cd038d34c6372429465b163af0c5722f16918/xxhash-4.0.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:3088dadbffa33c29e0518578430a7dff2e901a212e487aefa5faaa0dc06dad34", size = 35986, upload-time = "2026-08-17T08:23:25.854Z" }, + { url = "https://files.pythonhosted.org/packages/9e/0e/5ad466e5fea18c9f9bdc5828c0506f62190061b4a1b0e688aa54969d0a9e/xxhash-4.0.1-cp315-cp315-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1b50223d92df94d54e1a31469335a2c74b16692e6c1cb726f1e6949514458706", size = 264609, upload-time = "2026-08-17T08:36:04.229Z" }, + { url = "https://files.pythonhosted.org/packages/aa/cf/8f269f85217e3dbd45e31e25e46cc26f3aff0e159ef05d228b4b982c778c/xxhash-4.0.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:427b62d62d4f967fbb10b82a3813e4875c2a6e7e7634739f17265b650c7f65a6", size = 285910, upload-time = "2026-08-17T08:22:38.589Z" }, + { url = "https://files.pythonhosted.org/packages/ca/30/2fc1a16ee0f9501d074b798ebfae52e24fa602c7117f5c4b81de71eada72/xxhash-4.0.1-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c6370189e8e66b7e608f533b939a9de092ddca6cce084ca0d3d414d2ed5b5d59", size = 306566, upload-time = "2026-08-17T08:23:16.895Z" }, + { url = "https://files.pythonhosted.org/packages/e0/a7/08375cf2b997e1903663fe7525c5973b1987a4f8ad2b8d47463e9143f2ee/xxhash-4.0.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ec1a470c6db94ac4589c203921e89ac1bc13e796a8b1784d8135e1893559cd3b", size = 287978, upload-time = "2026-08-17T08:36:09.296Z" }, + { url = "https://files.pythonhosted.org/packages/b2/e5/90a7b404c11add9e53a497d06236152852490c3b2f21e468d97a58f26afe/xxhash-4.0.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:37f667dee0f867c42894b34e2a6fe26bf195c0ea4683d9d2b713db023f242c3a", size = 520098, upload-time = "2026-08-17T08:22:41.565Z" }, + { url = "https://files.pythonhosted.org/packages/11/02/7fba10b1b17eb46308f09cc0a4ed513d74dff16b1e22a1c439f011c77129/xxhash-4.0.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f18732adcc271741bd651c3e56fa519d8a237d2cccda01fe3afb226bf87f783b", size = 268273, upload-time = "2026-08-17T08:35:29.043Z" }, + { url = "https://files.pythonhosted.org/packages/54/49/c21b228877357a3be43eeeaa22182ad1685796f415390ada475922c084e4/xxhash-4.0.1-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0b42a5a26607e4b2409fea174773a66f2dff9dfdbf2c1a851bb7b804e2c97535", size = 350164, upload-time = "2026-08-17T08:23:29.494Z" }, + { url = "https://files.pythonhosted.org/packages/00/3c/c15bb4aa33d94b78a5553b52e7fa1070565f0199925aeadec3871de20ce9/xxhash-4.0.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:99166cc98637e8bf550cda2aab07f4f1d5f899c45fbd721801aeabcc9d404824", size = 281975, upload-time = "2026-08-17T08:36:08.139Z" }, + { url = "https://files.pythonhosted.org/packages/18/7a/b1d0388315fe7752b7725b68a912667526a1dd48ed492fcc031ac03f4b52/xxhash-4.0.1-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:6cf633df84d80a1668fcf61e330791dae46825e395549e7d34f376411e75088a", size = 307872, upload-time = "2026-08-17T08:22:42.206Z" }, + { url = "https://files.pythonhosted.org/packages/b4/a1/037cb2dd8cf725c9565dfe3712b2915c0e0276a9154913dbfcbcecbeb672/xxhash-4.0.1-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:e259bb7e1e2d8de6b35f430f5c7220b1c0ebf3962d1ba7ec7545980d5931edb8", size = 268241, upload-time = "2026-08-17T08:23:23.997Z" }, + { url = "https://files.pythonhosted.org/packages/c6/a9/67c44422d0ee082169b238ce24bd2796b82d7c21ed953471365df8c508d8/xxhash-4.0.1-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:704381264b36a18b9c62ecbabe2e71d0fc58c77c129c15355c989b10bf05b6b0", size = 284970, upload-time = "2026-08-17T08:36:13.476Z" }, + { url = "https://files.pythonhosted.org/packages/7f/d0/254a5f51c4014cacc77a26f321372338b924f54e89efb730164ee336d850/xxhash-4.0.1-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:e90b4bcf1d9eb1010fdaee7c9209fb667e74c0684f3ba17f9032bd7319da90c9", size = 338074, upload-time = "2026-08-17T08:22:51.166Z" }, + { url = "https://files.pythonhosted.org/packages/64/03/f21c4830118d72ef3a958ce8bf2152f49e0d4cf200907616c9be6caf372a/xxhash-4.0.1-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:a65785e653573fcd1e33062760ab4c3c3440e8e910765018e4b6ed4ad07b54a0", size = 487626, upload-time = "2026-08-17T08:35:32.768Z" }, + { url = "https://files.pythonhosted.org/packages/45/1f/268a689d741d7da649317eb4ce41760140beb4179aaf43a7216fdbe8100c/xxhash-4.0.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:e3996ff9b6f99180357024336bf5749a8ad6476a9a2523e535c5212b995b12a2", size = 263852, upload-time = "2026-08-17T08:23:41.871Z" }, + { url = "https://files.pythonhosted.org/packages/a7/f5/adaf8101cd7f143191a0b390600294d83924b32cb13770fde8803dce27a2/xxhash-4.0.1-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:99054b838b74d8d3995ea0d410976ae967c46207ae22d6ddfc535e809197dab9", size = 20569, upload-time = "2026-08-17T08:36:11.952Z" }, + { url = "https://files.pythonhosted.org/packages/ee/2c/56a5eb8c993420fc07114c08f447a2b66ee996510b4764cb368b9b44c9f0/xxhash-4.0.1-cp315-cp315-win32.whl", hash = "sha256:6c45258a37fc22721395c09927cb982d3e7a83607cab15be7e2416501bd3a330", size = 35145, upload-time = "2026-08-17T08:22:50.038Z" }, + { url = "https://files.pythonhosted.org/packages/67/c7/65f210db43e62157d0fef3b4d4d7b394821e7733c8bb4ece49f91410a725/xxhash-4.0.1-cp315-cp315-win_amd64.whl", hash = "sha256:0ab851b45c70d4992be7cdeeee16f97a0b677408c758c4b1efb1cfe8030bfd37", size = 37161, upload-time = "2026-08-17T08:23:32.438Z" }, + { url = "https://files.pythonhosted.org/packages/33/ae/1a641d1d60ba219756d9ebe907ff0ecf4445adcf4fa96f6e3da57b91d439/xxhash-4.0.1-cp315-cp315-win_arm64.whl", hash = "sha256:a5b21b42a01a343096a1c018d35e9b7aec9c7065dda53ae8da071e37478b2cea", size = 34378, upload-time = "2026-08-17T08:36:15.912Z" }, + { url = "https://files.pythonhosted.org/packages/48/7f/7698b320b251806d1249e513922a626f19027e104c829a611272250350eb/xxhash-4.0.1-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:44ab12e8cd17d4f001769f00ad465208b4bcb897ed29e65f058f74466b57a98f", size = 38610, upload-time = "2026-08-17T08:22:55.203Z" }, + { url = "https://files.pythonhosted.org/packages/c0/3d/436497e775b647b3b3e9a4ffe8c76c59fa4aa7a9fab6447cb59acf1b50ea/xxhash-4.0.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:45e88111ebe331de478ef8d4293efbe88f3cf8b863386c9a2357136b838e1af0", size = 36378, upload-time = "2026-08-17T08:35:36.18Z" }, + { url = "https://files.pythonhosted.org/packages/e3/d8/17a4f8182b9257898aa2a77c2a45f70233eb8e50681a280e8e09d2ee76e9/xxhash-4.0.1-cp315-cp315t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:bf430c587f447a554c53768ad76b9846fe7c5632180ef6f69c4fce8b0552fbd0", size = 273559, upload-time = "2026-08-17T08:23:51.075Z" }, + { url = "https://files.pythonhosted.org/packages/83/28/121bd5a5c5adb88e0da772c7bef61964cf9da92956a7a237c7d24c4351b8/xxhash-4.0.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:adbd48b30e3f82c89fb2b3e6a87cdd28d113b190a5ed0ee2dee286323ee9a621", size = 299133, upload-time = "2026-08-17T08:36:14.731Z" }, + { url = "https://files.pythonhosted.org/packages/11/8f/57c7b6e04642ed738a0d08a31bed7fc63fdacb661d665f98739cc9751b62/xxhash-4.0.1-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e71b34978e77868cbf2d18c5206a4603f9c644dd7181bec5643bd40141d3b8c5", size = 314527, upload-time = "2026-08-17T08:22:54.224Z" }, + { url = "https://files.pythonhosted.org/packages/8e/18/42793917dbab0ea1ff71458aea4875e17a7263f2797b798af048dc81e867/xxhash-4.0.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:488ca5c5e28ef56ec4bbb12f835b3f1cbecc5f3510062e70117bc6594851932a", size = 299199, upload-time = "2026-08-17T08:23:36.864Z" }, + { url = "https://files.pythonhosted.org/packages/37/60/51dc92443923d8e908d5614f1145d8d696450f9d6c8f1abe243c6f2a0222/xxhash-4.0.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:421b94f3ba7067958d02e38960d987756347aa150df06df11aa68ae1af78c619", size = 531967, upload-time = "2026-08-17T08:36:18.66Z" }, + { url = "https://files.pythonhosted.org/packages/88/c5/d0de77de09661fac71742c4155b1cd65e274f7cc277819d702b6c8ff2db5/xxhash-4.0.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f33cf0baa91eccd2cb7b62bf00f10c2264ef578b71dd33a12962e71a36eb4d32", size = 278764, upload-time = "2026-08-17T08:22:58.15Z" }, + { url = "https://files.pythonhosted.org/packages/08/9a/589929c655aba1bfb2c41ee03e50eec1547c39c3042a66bda9c173a9614b/xxhash-4.0.1-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:23a4376b4a3183cb50d4d2a3179f887a7773cc695eb2c908e551bec3221b8c60", size = 359876, upload-time = "2026-08-17T08:35:40.35Z" }, + { url = "https://files.pythonhosted.org/packages/3e/a8/c1d8c94d54d91db2215565f4b4151c1593af3e6d27ac4c00fd1e8d714a02/xxhash-4.0.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:38c3d22129a6958846a3098d68bc8e661704461c0be4793ae28836e4690c8478", size = 293548, upload-time = "2026-08-17T08:23:54.951Z" }, + { url = "https://files.pythonhosted.org/packages/8b/67/85d8abca94508a4dd10561d9dea3e6e68843c6986dd6d9c1b3729c8622e4/xxhash-4.0.1-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:87cbdec1a7dd930079671a60b249f3ca4e773e6fbd0676e21e36fdc9dd0f3b00", size = 318780, upload-time = "2026-08-17T08:36:17.623Z" }, + { url = "https://files.pythonhosted.org/packages/1b/16/2b920ed456b9cdcfc99ddc20c3afe42f9f807ee5850773c12fd891f3c08d/xxhash-4.0.1-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:6cbf4e21ef0890804b5bb9ad25c48f9c127758d7f6c66bef374efcacc63c738a", size = 277582, upload-time = "2026-08-17T08:22:57.156Z" }, + { url = "https://files.pythonhosted.org/packages/fa/cc/5811b5997aebb8452047f5800d32fc50eaa29d0ba08d4e426f84450b9c2f/xxhash-4.0.1-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:c101180495cb4ba3617b279a944345c53a5e73b0c150053d1fa8d8af32de9579", size = 295116, upload-time = "2026-08-17T08:23:40.868Z" }, + { url = "https://files.pythonhosted.org/packages/2d/dc/c2f3f9c2f4d6aadb79f17a9f1c9a7ee82638cc873680da044cf29537d2ee/xxhash-4.0.1-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:c0e6ccc2b19ec8a726b2e26062ac71ea63e15500d6bf85910e42481844fdffc1", size = 347065, upload-time = "2026-08-17T08:36:21.618Z" }, + { url = "https://files.pythonhosted.org/packages/a2/4c/750cc642c92252e10772ec09e1a1d995581ba4c3ceb24f6e2d57c7ce47ca/xxhash-4.0.1-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:8bcba9456242ebf180a04d9443812fd85ffe6bd12bda464dd116fcece8886ff3", size = 497208, upload-time = "2026-08-17T08:23:17.88Z" }, + { url = "https://files.pythonhosted.org/packages/6c/2d/58693cb13d6395f39b6b9bb40c5e0db53a5df7c9fce805aa7e792f64a1a5/xxhash-4.0.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:83b8c2013edb5dc1f9e7268b6496130705bc48d79c86bb8817b3d210b81a5513", size = 274338, upload-time = "2026-08-17T08:35:44.062Z" }, + { url = "https://files.pythonhosted.org/packages/4a/08/9aa9787586d9b3e92d63343ce7dc24f0f445fd9e74ff5d6e85dd82233df5/xxhash-4.0.1-cp315-cp315t-win32.whl", hash = "sha256:aa6ccc7f31018484d652cf52db020003433f3c9fa83189c028bd807d2adde503", size = 35471, upload-time = "2026-08-17T08:24:05.795Z" }, + { url = "https://files.pythonhosted.org/packages/f0/ab/4615789c333bee331ac417885c50105715eeb8244bfc68d2bc37dcfd63ca/xxhash-4.0.1-cp315-cp315t-win_amd64.whl", hash = "sha256:daade8936c4deaaf7b01561324ce438ba4f885d717e9adc62b4d67212ad7d7bd", size = 37488, upload-time = "2026-08-17T08:36:19.929Z" }, + { url = "https://files.pythonhosted.org/packages/fb/81/49f718beb0c55d0411bc4bd90b50a3fbe5863a0e97a2f4d11682ba13d298/xxhash-4.0.1-cp315-cp315t-win_arm64.whl", hash = "sha256:f00330ac7e24769e2032203f2b01794d670916b0c1799fd261340f1af9499875", size = 34590, upload-time = "2026-08-17T08:23:19.597Z" }, + { url = "https://files.pythonhosted.org/packages/86/79/9127ff42a887a348dc4ce3211cf1a962836887adee6f57078132bfba78b4/xxhash-4.0.1-graalpy312-graalpy250_312_native-macosx_10_13_x86_64.whl", hash = "sha256:ff48915bf1871a1f19f74c11834c6329443d306cedc0c05fe7fe617810422a80", size = 31836, upload-time = "2026-08-17T08:36:28.261Z" }, + { url = "https://files.pythonhosted.org/packages/0a/e6/f238693bfdd642adb59c99683964d46d9947fe721ff44d3bd850ae675407/xxhash-4.0.1-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:4a76345f5aceb4ec404918edf9c7f2b5507db864dc0d7455982009ac0890b57b", size = 34453, upload-time = "2026-08-17T08:23:49.795Z" }, + { url = "https://files.pythonhosted.org/packages/40/4b/796ace33cdfb75c91ba6d11615c3bd436355b9f3103e05865bbee9abce57/xxhash-4.0.1-graalpy312-graalpy250_312_native-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:31d86f9e81f3e84e00131ac7c54caf5119ae4ddd82c09c31cff597c813ce1ee2", size = 38488, upload-time = "2026-08-17T08:23:59.901Z" }, + { url = "https://files.pythonhosted.org/packages/ad/23/2d549e5d5d7759eaf9ac2d2d2ab81ff60f1bb2b52cdaae8e5ec5c6524354/xxhash-4.0.1-graalpy312-graalpy250_312_native-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:deca2a30d983d240b8375ec2ee0a4288e72042827fc61df2f7671f8467e4cb2f", size = 38206, upload-time = "2026-08-17T08:36:32.193Z" }, + { url = "https://files.pythonhosted.org/packages/79/98/1ee576b27f78e6107ee4ea8ac03e8a52888dff256e57d560f8282c195563/xxhash-4.0.1-graalpy312-graalpy250_312_native-win_amd64.whl", hash = "sha256:7c343ee174d417a44d0c3355602c0cbbfa52a04d1bbbf1723378c7d2c8f60626", size = 37127, upload-time = "2026-08-17T08:23:42.705Z" }, + { url = "https://files.pythonhosted.org/packages/ea/4f/e0648288a17d0d1084ca4f7bef206097831988fc86af74aa1dff8f1fbd68/xxhash-4.0.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:554f87034635bcec47c5d72447bf3db7e02da1bf493a0ada010db28a76f891c6", size = 36333, upload-time = "2026-08-17T08:23:52.913Z" }, + { url = "https://files.pythonhosted.org/packages/22/15/34b7f72e9b5a8bfd7e6178de9e1e342bc3de9f07111a5ae26c00506d9edf/xxhash-4.0.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:3c2445edafc300cc40feb6a25a8356a971c30cd0bf47b5349c2ad74c508343b1", size = 33519, upload-time = "2026-08-17T08:36:03.04Z" }, + { url = "https://files.pythonhosted.org/packages/06/4b/e0af324ccf701bf84a7a060bef11c915d45d9e3c5b9caf5b94d62ecb040b/xxhash-4.0.1-pp311-pypy311_pp73-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:bdd16718b63aa3ebd68aabb79021a40e47c81374852d41a306b9453141bbcbee", size = 47995, upload-time = "2026-08-17T08:24:14.335Z" }, + { url = "https://files.pythonhosted.org/packages/59/46/cc7130e6ca6b41ab72eb6a03177b933c7c74145545c99a8610ecc208c449/xxhash-4.0.1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b99ebaf9e816ac5069423b1367ee7e8078fbcebcf62545506bb0608d2f4f468", size = 42725, upload-time = "2026-08-17T08:36:34.144Z" }, + { url = "https://files.pythonhosted.org/packages/1c/24/4f26ff9a7dd0998f6d1036bdddef7ce3e78972a74f7fffa7967e7bc3b7e4/xxhash-4.0.1-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f484ed57bb3e4142f9d6439568658c38be5f94b702ba00a1ff32c69783b6c66d", size = 39532, upload-time = "2026-08-17T08:23:57.556Z" }, + { url = "https://files.pythonhosted.org/packages/7d/f3/1ac078fc8fceadcf066469acecacb35d2821cbfaf7d6fc5ac2107c7a314d/xxhash-4.0.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:fac4832b638000106207bc44e44b9616a6a416aaee56c62b01d61f3705e49f58", size = 37252, upload-time = "2026-08-17T08:24:06.652Z" }, ] [[package]] name = "yarl" -version = "1.22.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "idna", marker = "python_full_version < '3.14'" }, - { name = "multidict", marker = "python_full_version < '3.14'" }, - { name = "propcache", marker = "python_full_version < '3.14'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/57/63/0c6ebca57330cd313f6102b16dd57ffaf3ec4c83403dcb45dbd15c6f3ea1/yarl-1.22.0.tar.gz", hash = "sha256:bebf8557577d4401ba8bd9ff33906f1376c877aa78d1fe216ad01b4d6745af71", size = 187169, upload-time = "2025-10-06T14:12:55.963Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/43/a2204825342f37c337f5edb6637040fa14e365b2fcc2346960201d457579/yarl-1.22.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c7bd6683587567e5a49ee6e336e0612bec8329be1b7d4c8af5687dcdeb67ee1e", size = 140517, upload-time = "2025-10-06T14:08:42.494Z" }, - { url = "https://files.pythonhosted.org/packages/44/6f/674f3e6f02266428c56f704cd2501c22f78e8b2eeb23f153117cc86fb28a/yarl-1.22.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5cdac20da754f3a723cceea5b3448e1a2074866406adeb4ef35b469d089adb8f", size = 93495, upload-time = "2025-10-06T14:08:46.2Z" }, - { url = "https://files.pythonhosted.org/packages/b8/12/5b274d8a0f30c07b91b2f02cba69152600b47830fcfb465c108880fcee9c/yarl-1.22.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07a524d84df0c10f41e3ee918846e1974aba4ec017f990dc735aad487a0bdfdf", size = 94400, upload-time = "2025-10-06T14:08:47.855Z" }, - { url = "https://files.pythonhosted.org/packages/e2/7f/df1b6949b1fa1aa9ff6de6e2631876ad4b73c4437822026e85d8acb56bb1/yarl-1.22.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e1b329cb8146d7b736677a2440e422eadd775d1806a81db2d4cded80a48efc1a", size = 347545, upload-time = "2025-10-06T14:08:49.683Z" }, - { url = "https://files.pythonhosted.org/packages/84/09/f92ed93bd6cd77872ab6c3462df45ca45cd058d8f1d0c9b4f54c1704429f/yarl-1.22.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:75976c6945d85dbb9ee6308cd7ff7b1fb9409380c82d6119bd778d8fcfe2931c", size = 319598, upload-time = "2025-10-06T14:08:51.215Z" }, - { url = "https://files.pythonhosted.org/packages/c3/97/ac3f3feae7d522cf7ccec3d340bb0b2b61c56cb9767923df62a135092c6b/yarl-1.22.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:80ddf7a5f8c86cb3eb4bc9028b07bbbf1f08a96c5c0bc1244be5e8fefcb94147", size = 363893, upload-time = "2025-10-06T14:08:53.144Z" }, - { url = "https://files.pythonhosted.org/packages/06/49/f3219097403b9c84a4d079b1d7bda62dd9b86d0d6e4428c02d46ab2c77fc/yarl-1.22.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d332fc2e3c94dad927f2112395772a4e4fedbcf8f80efc21ed7cdfae4d574fdb", size = 371240, upload-time = "2025-10-06T14:08:55.036Z" }, - { url = "https://files.pythonhosted.org/packages/35/9f/06b765d45c0e44e8ecf0fe15c9eacbbde342bb5b7561c46944f107bfb6c3/yarl-1.22.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0cf71bf877efeac18b38d3930594c0948c82b64547c1cf420ba48722fe5509f6", size = 346965, upload-time = "2025-10-06T14:08:56.722Z" }, - { url = "https://files.pythonhosted.org/packages/c5/69/599e7cea8d0fcb1694323b0db0dda317fa3162f7b90166faddecf532166f/yarl-1.22.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:663e1cadaddae26be034a6ab6072449a8426ddb03d500f43daf952b74553bba0", size = 342026, upload-time = "2025-10-06T14:08:58.563Z" }, - { url = "https://files.pythonhosted.org/packages/95/6f/9dfd12c8bc90fea9eab39832ee32ea48f8e53d1256252a77b710c065c89f/yarl-1.22.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:6dcbb0829c671f305be48a7227918cfcd11276c2d637a8033a99a02b67bf9eda", size = 335637, upload-time = "2025-10-06T14:09:00.506Z" }, - { url = "https://files.pythonhosted.org/packages/57/2e/34c5b4eb9b07e16e873db5b182c71e5f06f9b5af388cdaa97736d79dd9a6/yarl-1.22.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:f0d97c18dfd9a9af4490631905a3f131a8e4c9e80a39353919e2cfed8f00aedc", size = 359082, upload-time = "2025-10-06T14:09:01.936Z" }, - { url = "https://files.pythonhosted.org/packages/31/71/fa7e10fb772d273aa1f096ecb8ab8594117822f683bab7d2c5a89914c92a/yarl-1.22.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:437840083abe022c978470b942ff832c3940b2ad3734d424b7eaffcd07f76737", size = 357811, upload-time = "2025-10-06T14:09:03.445Z" }, - { url = "https://files.pythonhosted.org/packages/26/da/11374c04e8e1184a6a03cf9c8f5688d3e5cec83ed6f31ad3481b3207f709/yarl-1.22.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a899cbd98dce6f5d8de1aad31cb712ec0a530abc0a86bd6edaa47c1090138467", size = 351223, upload-time = "2025-10-06T14:09:05.401Z" }, - { url = "https://files.pythonhosted.org/packages/82/8f/e2d01f161b0c034a30410e375e191a5d27608c1f8693bab1a08b089ca096/yarl-1.22.0-cp310-cp310-win32.whl", hash = "sha256:595697f68bd1f0c1c159fcb97b661fc9c3f5db46498043555d04805430e79bea", size = 82118, upload-time = "2025-10-06T14:09:11.148Z" }, - { url = "https://files.pythonhosted.org/packages/62/46/94c76196642dbeae634c7a61ba3da88cd77bed875bf6e4a8bed037505aa6/yarl-1.22.0-cp310-cp310-win_amd64.whl", hash = "sha256:cb95a9b1adaa48e41815a55ae740cfda005758104049a640a398120bf02515ca", size = 86852, upload-time = "2025-10-06T14:09:12.958Z" }, - { url = "https://files.pythonhosted.org/packages/af/af/7df4f179d3b1a6dcb9a4bd2ffbc67642746fcafdb62580e66876ce83fff4/yarl-1.22.0-cp310-cp310-win_arm64.whl", hash = "sha256:b85b982afde6df99ecc996990d4ad7ccbdbb70e2a4ba4de0aecde5922ba98a0b", size = 82012, upload-time = "2025-10-06T14:09:14.664Z" }, - { url = "https://files.pythonhosted.org/packages/4d/27/5ab13fc84c76a0250afd3d26d5936349a35be56ce5785447d6c423b26d92/yarl-1.22.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ab72135b1f2db3fed3997d7e7dc1b80573c67138023852b6efb336a5eae6511", size = 141607, upload-time = "2025-10-06T14:09:16.298Z" }, - { url = "https://files.pythonhosted.org/packages/6a/a1/d065d51d02dc02ce81501d476b9ed2229d9a990818332242a882d5d60340/yarl-1.22.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:669930400e375570189492dc8d8341301578e8493aec04aebc20d4717f899dd6", size = 94027, upload-time = "2025-10-06T14:09:17.786Z" }, - { url = "https://files.pythonhosted.org/packages/c1/da/8da9f6a53f67b5106ffe902c6fa0164e10398d4e150d85838b82f424072a/yarl-1.22.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:792a2af6d58177ef7c19cbf0097aba92ca1b9cb3ffdd9c7470e156c8f9b5e028", size = 94963, upload-time = "2025-10-06T14:09:19.662Z" }, - { url = "https://files.pythonhosted.org/packages/68/fe/2c1f674960c376e29cb0bec1249b117d11738db92a6ccc4a530b972648db/yarl-1.22.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3ea66b1c11c9150f1372f69afb6b8116f2dd7286f38e14ea71a44eee9ec51b9d", size = 368406, upload-time = "2025-10-06T14:09:21.402Z" }, - { url = "https://files.pythonhosted.org/packages/95/26/812a540e1c3c6418fec60e9bbd38e871eaba9545e94fa5eff8f4a8e28e1e/yarl-1.22.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3e2daa88dc91870215961e96a039ec73e4937da13cf77ce17f9cad0c18df3503", size = 336581, upload-time = "2025-10-06T14:09:22.98Z" }, - { url = "https://files.pythonhosted.org/packages/0b/f5/5777b19e26fdf98563985e481f8be3d8a39f8734147a6ebf459d0dab5a6b/yarl-1.22.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ba440ae430c00eee41509353628600212112cd5018d5def7e9b05ea7ac34eb65", size = 388924, upload-time = "2025-10-06T14:09:24.655Z" }, - { url = "https://files.pythonhosted.org/packages/86/08/24bd2477bd59c0bbd994fe1d93b126e0472e4e3df5a96a277b0a55309e89/yarl-1.22.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e6438cc8f23a9c1478633d216b16104a586b9761db62bfacb6425bac0a36679e", size = 392890, upload-time = "2025-10-06T14:09:26.617Z" }, - { url = "https://files.pythonhosted.org/packages/46/00/71b90ed48e895667ecfb1eaab27c1523ee2fa217433ed77a73b13205ca4b/yarl-1.22.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c52a6e78aef5cf47a98ef8e934755abf53953379b7d53e68b15ff4420e6683d", size = 365819, upload-time = "2025-10-06T14:09:28.544Z" }, - { url = "https://files.pythonhosted.org/packages/30/2d/f715501cae832651d3282387c6a9236cd26bd00d0ff1e404b3dc52447884/yarl-1.22.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3b06bcadaac49c70f4c88af4ffcfbe3dc155aab3163e75777818092478bcbbe7", size = 363601, upload-time = "2025-10-06T14:09:30.568Z" }, - { url = "https://files.pythonhosted.org/packages/f8/f9/a678c992d78e394e7126ee0b0e4e71bd2775e4334d00a9278c06a6cce96a/yarl-1.22.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:6944b2dc72c4d7f7052683487e3677456050ff77fcf5e6204e98caf785ad1967", size = 358072, upload-time = "2025-10-06T14:09:32.528Z" }, - { url = "https://files.pythonhosted.org/packages/2c/d1/b49454411a60edb6fefdcad4f8e6dbba7d8019e3a508a1c5836cba6d0781/yarl-1.22.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d5372ca1df0f91a86b047d1277c2aaf1edb32d78bbcefffc81b40ffd18f027ed", size = 385311, upload-time = "2025-10-06T14:09:34.634Z" }, - { url = "https://files.pythonhosted.org/packages/87/e5/40d7a94debb8448c7771a916d1861d6609dddf7958dc381117e7ba36d9e8/yarl-1.22.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:51af598701f5299012b8416486b40fceef8c26fc87dc6d7d1f6fc30609ea0aa6", size = 381094, upload-time = "2025-10-06T14:09:36.268Z" }, - { url = "https://files.pythonhosted.org/packages/35/d8/611cc282502381ad855448643e1ad0538957fc82ae83dfe7762c14069e14/yarl-1.22.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b266bd01fedeffeeac01a79ae181719ff848a5a13ce10075adbefc8f1daee70e", size = 370944, upload-time = "2025-10-06T14:09:37.872Z" }, - { url = "https://files.pythonhosted.org/packages/2d/df/fadd00fb1c90e1a5a8bd731fa3d3de2e165e5a3666a095b04e31b04d9cb6/yarl-1.22.0-cp311-cp311-win32.whl", hash = "sha256:a9b1ba5610a4e20f655258d5a1fdc7ebe3d837bb0e45b581398b99eb98b1f5ca", size = 81804, upload-time = "2025-10-06T14:09:39.359Z" }, - { url = "https://files.pythonhosted.org/packages/b5/f7/149bb6f45f267cb5c074ac40c01c6b3ea6d8a620d34b337f6321928a1b4d/yarl-1.22.0-cp311-cp311-win_amd64.whl", hash = "sha256:078278b9b0b11568937d9509b589ee83ef98ed6d561dfe2020e24a9fd08eaa2b", size = 86858, upload-time = "2025-10-06T14:09:41.068Z" }, - { url = "https://files.pythonhosted.org/packages/2b/13/88b78b93ad3f2f0b78e13bfaaa24d11cbc746e93fe76d8c06bf139615646/yarl-1.22.0-cp311-cp311-win_arm64.whl", hash = "sha256:b6a6f620cfe13ccec221fa312139135166e47ae169f8253f72a0abc0dae94376", size = 81637, upload-time = "2025-10-06T14:09:42.712Z" }, - { url = "https://files.pythonhosted.org/packages/75/ff/46736024fee3429b80a165a732e38e5d5a238721e634ab41b040d49f8738/yarl-1.22.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e340382d1afa5d32b892b3ff062436d592ec3d692aeea3bef3a5cfe11bbf8c6f", size = 142000, upload-time = "2025-10-06T14:09:44.631Z" }, - { url = "https://files.pythonhosted.org/packages/5a/9a/b312ed670df903145598914770eb12de1bac44599549b3360acc96878df8/yarl-1.22.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f1e09112a2c31ffe8d80be1b0988fa6a18c5d5cad92a9ffbb1c04c91bfe52ad2", size = 94338, upload-time = "2025-10-06T14:09:46.372Z" }, - { url = "https://files.pythonhosted.org/packages/ba/f5/0601483296f09c3c65e303d60c070a5c19fcdbc72daa061e96170785bc7d/yarl-1.22.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:939fe60db294c786f6b7c2d2e121576628468f65453d86b0fe36cb52f987bd74", size = 94909, upload-time = "2025-10-06T14:09:48.648Z" }, - { url = "https://files.pythonhosted.org/packages/60/41/9a1fe0b73dbcefce72e46cf149b0e0a67612d60bfc90fb59c2b2efdfbd86/yarl-1.22.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e1651bf8e0398574646744c1885a41198eba53dc8a9312b954073f845c90a8df", size = 372940, upload-time = "2025-10-06T14:09:50.089Z" }, - { url = "https://files.pythonhosted.org/packages/17/7a/795cb6dfee561961c30b800f0ed616b923a2ec6258b5def2a00bf8231334/yarl-1.22.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b8a0588521a26bf92a57a1705b77b8b59044cdceccac7151bd8d229e66b8dedb", size = 345825, upload-time = "2025-10-06T14:09:52.142Z" }, - { url = "https://files.pythonhosted.org/packages/d7/93/a58f4d596d2be2ae7bab1a5846c4d270b894958845753b2c606d666744d3/yarl-1.22.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:42188e6a615c1a75bcaa6e150c3fe8f3e8680471a6b10150c5f7e83f47cc34d2", size = 386705, upload-time = "2025-10-06T14:09:54.128Z" }, - { url = "https://files.pythonhosted.org/packages/61/92/682279d0e099d0e14d7fd2e176bd04f48de1484f56546a3e1313cd6c8e7c/yarl-1.22.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f6d2cb59377d99718913ad9a151030d6f83ef420a2b8f521d94609ecc106ee82", size = 396518, upload-time = "2025-10-06T14:09:55.762Z" }, - { url = "https://files.pythonhosted.org/packages/db/0f/0d52c98b8a885aeda831224b78f3be7ec2e1aa4a62091f9f9188c3c65b56/yarl-1.22.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50678a3b71c751d58d7908edc96d332af328839eea883bb554a43f539101277a", size = 377267, upload-time = "2025-10-06T14:09:57.958Z" }, - { url = "https://files.pythonhosted.org/packages/22/42/d2685e35908cbeaa6532c1fc73e89e7f2efb5d8a7df3959ea8e37177c5a3/yarl-1.22.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1e8fbaa7cec507aa24ea27a01456e8dd4b6fab829059b69844bd348f2d467124", size = 365797, upload-time = "2025-10-06T14:09:59.527Z" }, - { url = "https://files.pythonhosted.org/packages/a2/83/cf8c7bcc6355631762f7d8bdab920ad09b82efa6b722999dfb05afa6cfac/yarl-1.22.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:433885ab5431bc3d3d4f2f9bd15bfa1614c522b0f1405d62c4f926ccd69d04fa", size = 365535, upload-time = "2025-10-06T14:10:01.139Z" }, - { url = "https://files.pythonhosted.org/packages/25/e1/5302ff9b28f0c59cac913b91fe3f16c59a033887e57ce9ca5d41a3a94737/yarl-1.22.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:b790b39c7e9a4192dc2e201a282109ed2985a1ddbd5ac08dc56d0e121400a8f7", size = 382324, upload-time = "2025-10-06T14:10:02.756Z" }, - { url = "https://files.pythonhosted.org/packages/bf/cd/4617eb60f032f19ae3a688dc990d8f0d89ee0ea378b61cac81ede3e52fae/yarl-1.22.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:31f0b53913220599446872d757257be5898019c85e7971599065bc55065dc99d", size = 383803, upload-time = "2025-10-06T14:10:04.552Z" }, - { url = "https://files.pythonhosted.org/packages/59/65/afc6e62bb506a319ea67b694551dab4a7e6fb7bf604e9bd9f3e11d575fec/yarl-1.22.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a49370e8f711daec68d09b821a34e1167792ee2d24d405cbc2387be4f158b520", size = 374220, upload-time = "2025-10-06T14:10:06.489Z" }, - { url = "https://files.pythonhosted.org/packages/e7/3d/68bf18d50dc674b942daec86a9ba922d3113d8399b0e52b9897530442da2/yarl-1.22.0-cp312-cp312-win32.whl", hash = "sha256:70dfd4f241c04bd9239d53b17f11e6ab672b9f1420364af63e8531198e3f5fe8", size = 81589, upload-time = "2025-10-06T14:10:09.254Z" }, - { url = "https://files.pythonhosted.org/packages/c8/9a/6ad1a9b37c2f72874f93e691b2e7ecb6137fb2b899983125db4204e47575/yarl-1.22.0-cp312-cp312-win_amd64.whl", hash = "sha256:8884d8b332a5e9b88e23f60bb166890009429391864c685e17bd73a9eda9105c", size = 87213, upload-time = "2025-10-06T14:10:11.369Z" }, - { url = "https://files.pythonhosted.org/packages/44/c5/c21b562d1680a77634d748e30c653c3ca918beb35555cff24986fff54598/yarl-1.22.0-cp312-cp312-win_arm64.whl", hash = "sha256:ea70f61a47f3cc93bdf8b2f368ed359ef02a01ca6393916bc8ff877427181e74", size = 81330, upload-time = "2025-10-06T14:10:13.112Z" }, - { url = "https://files.pythonhosted.org/packages/ea/f3/d67de7260456ee105dc1d162d43a019ecad6b91e2f51809d6cddaa56690e/yarl-1.22.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8dee9c25c74997f6a750cd317b8ca63545169c098faee42c84aa5e506c819b53", size = 139980, upload-time = "2025-10-06T14:10:14.601Z" }, - { url = "https://files.pythonhosted.org/packages/01/88/04d98af0b47e0ef42597b9b28863b9060bb515524da0a65d5f4db160b2d5/yarl-1.22.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:01e73b85a5434f89fc4fe27dcda2aff08ddf35e4d47bbbea3bdcd25321af538a", size = 93424, upload-time = "2025-10-06T14:10:16.115Z" }, - { url = "https://files.pythonhosted.org/packages/18/91/3274b215fd8442a03975ce6bee5fe6aa57a8326b29b9d3d56234a1dca244/yarl-1.22.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:22965c2af250d20c873cdbee8ff958fb809940aeb2e74ba5f20aaf6b7ac8c70c", size = 93821, upload-time = "2025-10-06T14:10:17.993Z" }, - { url = "https://files.pythonhosted.org/packages/61/3a/caf4e25036db0f2da4ca22a353dfeb3c9d3c95d2761ebe9b14df8fc16eb0/yarl-1.22.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b4f15793aa49793ec8d1c708ab7f9eded1aa72edc5174cae703651555ed1b601", size = 373243, upload-time = "2025-10-06T14:10:19.44Z" }, - { url = "https://files.pythonhosted.org/packages/6e/9e/51a77ac7516e8e7803b06e01f74e78649c24ee1021eca3d6a739cb6ea49c/yarl-1.22.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5542339dcf2747135c5c85f68680353d5cb9ffd741c0f2e8d832d054d41f35a", size = 342361, upload-time = "2025-10-06T14:10:21.124Z" }, - { url = "https://files.pythonhosted.org/packages/d4/f8/33b92454789dde8407f156c00303e9a891f1f51a0330b0fad7c909f87692/yarl-1.22.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5c401e05ad47a75869c3ab3e35137f8468b846770587e70d71e11de797d113df", size = 387036, upload-time = "2025-10-06T14:10:22.902Z" }, - { url = "https://files.pythonhosted.org/packages/d9/9a/c5db84ea024f76838220280f732970aa4ee154015d7f5c1bfb60a267af6f/yarl-1.22.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:243dda95d901c733f5b59214d28b0120893d91777cb8aa043e6ef059d3cddfe2", size = 397671, upload-time = "2025-10-06T14:10:24.523Z" }, - { url = "https://files.pythonhosted.org/packages/11/c9/cd8538dc2e7727095e0c1d867bad1e40c98f37763e6d995c1939f5fdc7b1/yarl-1.22.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bec03d0d388060058f5d291a813f21c011041938a441c593374da6077fe21b1b", size = 377059, upload-time = "2025-10-06T14:10:26.406Z" }, - { url = "https://files.pythonhosted.org/packages/a1/b9/ab437b261702ced75122ed78a876a6dec0a1b0f5e17a4ac7a9a2482d8abe/yarl-1.22.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b0748275abb8c1e1e09301ee3cf90c8a99678a4e92e4373705f2a2570d581273", size = 365356, upload-time = "2025-10-06T14:10:28.461Z" }, - { url = "https://files.pythonhosted.org/packages/b2/9d/8e1ae6d1d008a9567877b08f0ce4077a29974c04c062dabdb923ed98e6fe/yarl-1.22.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:47fdb18187e2a4e18fda2c25c05d8251a9e4a521edaed757fef033e7d8498d9a", size = 361331, upload-time = "2025-10-06T14:10:30.541Z" }, - { url = "https://files.pythonhosted.org/packages/ca/5a/09b7be3905962f145b73beb468cdd53db8aa171cf18c80400a54c5b82846/yarl-1.22.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c7044802eec4524fde550afc28edda0dd5784c4c45f0be151a2d3ba017daca7d", size = 382590, upload-time = "2025-10-06T14:10:33.352Z" }, - { url = "https://files.pythonhosted.org/packages/aa/7f/59ec509abf90eda5048b0bc3e2d7b5099dffdb3e6b127019895ab9d5ef44/yarl-1.22.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:139718f35149ff544caba20fce6e8a2f71f1e39b92c700d8438a0b1d2a631a02", size = 385316, upload-time = "2025-10-06T14:10:35.034Z" }, - { url = "https://files.pythonhosted.org/packages/e5/84/891158426bc8036bfdfd862fabd0e0fa25df4176ec793e447f4b85cf1be4/yarl-1.22.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e1b51bebd221006d3d2f95fbe124b22b247136647ae5dcc8c7acafba66e5ee67", size = 374431, upload-time = "2025-10-06T14:10:37.76Z" }, - { url = "https://files.pythonhosted.org/packages/bb/49/03da1580665baa8bef5e8ed34c6df2c2aca0a2f28bf397ed238cc1bbc6f2/yarl-1.22.0-cp313-cp313-win32.whl", hash = "sha256:d3e32536234a95f513bd374e93d717cf6b2231a791758de6c509e3653f234c95", size = 81555, upload-time = "2025-10-06T14:10:39.649Z" }, - { url = "https://files.pythonhosted.org/packages/9a/ee/450914ae11b419eadd067c6183ae08381cfdfcb9798b90b2b713bbebddda/yarl-1.22.0-cp313-cp313-win_amd64.whl", hash = "sha256:47743b82b76d89a1d20b83e60d5c20314cbd5ba2befc9cda8f28300c4a08ed4d", size = 86965, upload-time = "2025-10-06T14:10:41.313Z" }, - { url = "https://files.pythonhosted.org/packages/98/4d/264a01eae03b6cf629ad69bae94e3b0e5344741e929073678e84bf7a3e3b/yarl-1.22.0-cp313-cp313-win_arm64.whl", hash = "sha256:5d0fcda9608875f7d052eff120c7a5da474a6796fe4d83e152e0e4d42f6d1a9b", size = 81205, upload-time = "2025-10-06T14:10:43.167Z" }, - { url = "https://files.pythonhosted.org/packages/88/fc/6908f062a2f77b5f9f6d69cecb1747260831ff206adcbc5b510aff88df91/yarl-1.22.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:719ae08b6972befcba4310e49edb1161a88cdd331e3a694b84466bd938a6ab10", size = 146209, upload-time = "2025-10-06T14:10:44.643Z" }, - { url = "https://files.pythonhosted.org/packages/65/47/76594ae8eab26210b4867be6f49129861ad33da1f1ebdf7051e98492bf62/yarl-1.22.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:47d8a5c446df1c4db9d21b49619ffdba90e77c89ec6e283f453856c74b50b9e3", size = 95966, upload-time = "2025-10-06T14:10:46.554Z" }, - { url = "https://files.pythonhosted.org/packages/ab/ce/05e9828a49271ba6b5b038b15b3934e996980dd78abdfeb52a04cfb9467e/yarl-1.22.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:cfebc0ac8333520d2d0423cbbe43ae43c8838862ddb898f5ca68565e395516e9", size = 97312, upload-time = "2025-10-06T14:10:48.007Z" }, - { url = "https://files.pythonhosted.org/packages/d1/c5/7dffad5e4f2265b29c9d7ec869c369e4223166e4f9206fc2243ee9eea727/yarl-1.22.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4398557cbf484207df000309235979c79c4356518fd5c99158c7d38203c4da4f", size = 361967, upload-time = "2025-10-06T14:10:49.997Z" }, - { url = "https://files.pythonhosted.org/packages/50/b2/375b933c93a54bff7fc041e1a6ad2c0f6f733ffb0c6e642ce56ee3b39970/yarl-1.22.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2ca6fd72a8cd803be290d42f2dec5cdcd5299eeb93c2d929bf060ad9efaf5de0", size = 323949, upload-time = "2025-10-06T14:10:52.004Z" }, - { url = "https://files.pythonhosted.org/packages/66/50/bfc2a29a1d78644c5a7220ce2f304f38248dc94124a326794e677634b6cf/yarl-1.22.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ca1f59c4e1ab6e72f0a23c13fca5430f889634166be85dbf1013683e49e3278e", size = 361818, upload-time = "2025-10-06T14:10:54.078Z" }, - { url = "https://files.pythonhosted.org/packages/46/96/f3941a46af7d5d0f0498f86d71275696800ddcdd20426298e572b19b91ff/yarl-1.22.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6c5010a52015e7c70f86eb967db0f37f3c8bd503a695a49f8d45700144667708", size = 372626, upload-time = "2025-10-06T14:10:55.767Z" }, - { url = "https://files.pythonhosted.org/packages/c1/42/8b27c83bb875cd89448e42cd627e0fb971fa1675c9ec546393d18826cb50/yarl-1.22.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d7672ecf7557476642c88497c2f8d8542f8e36596e928e9bcba0e42e1e7d71f", size = 341129, upload-time = "2025-10-06T14:10:57.985Z" }, - { url = "https://files.pythonhosted.org/packages/49/36/99ca3122201b382a3cf7cc937b95235b0ac944f7e9f2d5331d50821ed352/yarl-1.22.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:3b7c88eeef021579d600e50363e0b6ee4f7f6f728cd3486b9d0f3ee7b946398d", size = 346776, upload-time = "2025-10-06T14:10:59.633Z" }, - { url = "https://files.pythonhosted.org/packages/85/b4/47328bf996acd01a4c16ef9dcd2f59c969f495073616586f78cd5f2efb99/yarl-1.22.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:f4afb5c34f2c6fecdcc182dfcfc6af6cccf1aa923eed4d6a12e9d96904e1a0d8", size = 334879, upload-time = "2025-10-06T14:11:01.454Z" }, - { url = "https://files.pythonhosted.org/packages/c2/ad/b77d7b3f14a4283bffb8e92c6026496f6de49751c2f97d4352242bba3990/yarl-1.22.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:59c189e3e99a59cf8d83cbb31d4db02d66cda5a1a4374e8a012b51255341abf5", size = 350996, upload-time = "2025-10-06T14:11:03.452Z" }, - { url = "https://files.pythonhosted.org/packages/81/c8/06e1d69295792ba54d556f06686cbd6a7ce39c22307100e3fb4a2c0b0a1d/yarl-1.22.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:5a3bf7f62a289fa90f1990422dc8dff5a458469ea71d1624585ec3a4c8d6960f", size = 356047, upload-time = "2025-10-06T14:11:05.115Z" }, - { url = "https://files.pythonhosted.org/packages/4b/b8/4c0e9e9f597074b208d18cef227d83aac36184bfbc6eab204ea55783dbc5/yarl-1.22.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:de6b9a04c606978fdfe72666fa216ffcf2d1a9f6a381058d4378f8d7b1e5de62", size = 342947, upload-time = "2025-10-06T14:11:08.137Z" }, - { url = "https://files.pythonhosted.org/packages/e0/e5/11f140a58bf4c6ad7aca69a892bff0ee638c31bea4206748fc0df4ebcb3a/yarl-1.22.0-cp313-cp313t-win32.whl", hash = "sha256:1834bb90991cc2999f10f97f5f01317f99b143284766d197e43cd5b45eb18d03", size = 86943, upload-time = "2025-10-06T14:11:10.284Z" }, - { url = "https://files.pythonhosted.org/packages/31/74/8b74bae38ed7fe6793d0c15a0c8207bbb819cf287788459e5ed230996cdd/yarl-1.22.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ff86011bd159a9d2dfc89c34cfd8aff12875980e3bd6a39ff097887520e60249", size = 93715, upload-time = "2025-10-06T14:11:11.739Z" }, - { url = "https://files.pythonhosted.org/packages/69/66/991858aa4b5892d57aef7ee1ba6b4d01ec3b7eb3060795d34090a3ca3278/yarl-1.22.0-cp313-cp313t-win_arm64.whl", hash = "sha256:7861058d0582b847bc4e3a4a4c46828a410bca738673f35a29ba3ca5db0b473b", size = 83857, upload-time = "2025-10-06T14:11:13.586Z" }, - { url = "https://files.pythonhosted.org/packages/46/b3/e20ef504049f1a1c54a814b4b9bed96d1ac0e0610c3b4da178f87209db05/yarl-1.22.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:34b36c2c57124530884d89d50ed2c1478697ad7473efd59cfd479945c95650e4", size = 140520, upload-time = "2025-10-06T14:11:15.465Z" }, - { url = "https://files.pythonhosted.org/packages/e4/04/3532d990fdbab02e5ede063676b5c4260e7f3abea2151099c2aa745acc4c/yarl-1.22.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:0dd9a702591ca2e543631c2a017e4a547e38a5c0f29eece37d9097e04a7ac683", size = 93504, upload-time = "2025-10-06T14:11:17.106Z" }, - { url = "https://files.pythonhosted.org/packages/11/63/ff458113c5c2dac9a9719ac68ee7c947cb621432bcf28c9972b1c0e83938/yarl-1.22.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:594fcab1032e2d2cc3321bb2e51271e7cd2b516c7d9aee780ece81b07ff8244b", size = 94282, upload-time = "2025-10-06T14:11:19.064Z" }, - { url = "https://files.pythonhosted.org/packages/a7/bc/315a56aca762d44a6aaaf7ad253f04d996cb6b27bad34410f82d76ea8038/yarl-1.22.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f3d7a87a78d46a2e3d5b72587ac14b4c16952dd0887dbb051451eceac774411e", size = 372080, upload-time = "2025-10-06T14:11:20.996Z" }, - { url = "https://files.pythonhosted.org/packages/3f/3f/08e9b826ec2e099ea6e7c69a61272f4f6da62cb5b1b63590bb80ca2e4a40/yarl-1.22.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:852863707010316c973162e703bddabec35e8757e67fcb8ad58829de1ebc8590", size = 338696, upload-time = "2025-10-06T14:11:22.847Z" }, - { url = "https://files.pythonhosted.org/packages/e3/9f/90360108e3b32bd76789088e99538febfea24a102380ae73827f62073543/yarl-1.22.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:131a085a53bfe839a477c0845acf21efc77457ba2bcf5899618136d64f3303a2", size = 387121, upload-time = "2025-10-06T14:11:24.889Z" }, - { url = "https://files.pythonhosted.org/packages/98/92/ab8d4657bd5b46a38094cfaea498f18bb70ce6b63508fd7e909bd1f93066/yarl-1.22.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:078a8aefd263f4d4f923a9677b942b445a2be970ca24548a8102689a3a8ab8da", size = 394080, upload-time = "2025-10-06T14:11:27.307Z" }, - { url = "https://files.pythonhosted.org/packages/f5/e7/d8c5a7752fef68205296201f8ec2bf718f5c805a7a7e9880576c67600658/yarl-1.22.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bca03b91c323036913993ff5c738d0842fc9c60c4648e5c8d98331526df89784", size = 372661, upload-time = "2025-10-06T14:11:29.387Z" }, - { url = "https://files.pythonhosted.org/packages/b6/2e/f4d26183c8db0bb82d491b072f3127fb8c381a6206a3a56332714b79b751/yarl-1.22.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:68986a61557d37bb90d3051a45b91fa3d5c516d177dfc6dd6f2f436a07ff2b6b", size = 364645, upload-time = "2025-10-06T14:11:31.423Z" }, - { url = "https://files.pythonhosted.org/packages/80/7c/428e5812e6b87cd00ee8e898328a62c95825bf37c7fa87f0b6bb2ad31304/yarl-1.22.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:4792b262d585ff0dff6bcb787f8492e40698443ec982a3568c2096433660c694", size = 355361, upload-time = "2025-10-06T14:11:33.055Z" }, - { url = "https://files.pythonhosted.org/packages/ec/2a/249405fd26776f8b13c067378ef4d7dd49c9098d1b6457cdd152a99e96a9/yarl-1.22.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:ebd4549b108d732dba1d4ace67614b9545b21ece30937a63a65dd34efa19732d", size = 381451, upload-time = "2025-10-06T14:11:35.136Z" }, - { url = "https://files.pythonhosted.org/packages/67/a8/fb6b1adbe98cf1e2dd9fad71003d3a63a1bc22459c6e15f5714eb9323b93/yarl-1.22.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f87ac53513d22240c7d59203f25cc3beac1e574c6cd681bbfd321987b69f95fd", size = 383814, upload-time = "2025-10-06T14:11:37.094Z" }, - { url = "https://files.pythonhosted.org/packages/d9/f9/3aa2c0e480fb73e872ae2814c43bc1e734740bb0d54e8cb2a95925f98131/yarl-1.22.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:22b029f2881599e2f1b06f8f1db2ee63bd309e2293ba2d566e008ba12778b8da", size = 370799, upload-time = "2025-10-06T14:11:38.83Z" }, - { url = "https://files.pythonhosted.org/packages/50/3c/af9dba3b8b5eeb302f36f16f92791f3ea62e3f47763406abf6d5a4a3333b/yarl-1.22.0-cp314-cp314-win32.whl", hash = "sha256:6a635ea45ba4ea8238463b4f7d0e721bad669f80878b7bfd1f89266e2ae63da2", size = 82990, upload-time = "2025-10-06T14:11:40.624Z" }, - { url = "https://files.pythonhosted.org/packages/ac/30/ac3a0c5bdc1d6efd1b41fa24d4897a4329b3b1e98de9449679dd327af4f0/yarl-1.22.0-cp314-cp314-win_amd64.whl", hash = "sha256:0d6e6885777af0f110b0e5d7e5dda8b704efed3894da26220b7f3d887b839a79", size = 88292, upload-time = "2025-10-06T14:11:42.578Z" }, - { url = "https://files.pythonhosted.org/packages/df/0a/227ab4ff5b998a1b7410abc7b46c9b7a26b0ca9e86c34ba4b8d8bc7c63d5/yarl-1.22.0-cp314-cp314-win_arm64.whl", hash = "sha256:8218f4e98d3c10d683584cb40f0424f4b9fd6e95610232dd75e13743b070ee33", size = 82888, upload-time = "2025-10-06T14:11:44.863Z" }, - { url = "https://files.pythonhosted.org/packages/06/5e/a15eb13db90abd87dfbefb9760c0f3f257ac42a5cac7e75dbc23bed97a9f/yarl-1.22.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:45c2842ff0e0d1b35a6bf1cd6c690939dacb617a70827f715232b2e0494d55d1", size = 146223, upload-time = "2025-10-06T14:11:46.796Z" }, - { url = "https://files.pythonhosted.org/packages/18/82/9665c61910d4d84f41a5bf6837597c89e665fa88aa4941080704645932a9/yarl-1.22.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:d947071e6ebcf2e2bee8fce76e10faca8f7a14808ca36a910263acaacef08eca", size = 95981, upload-time = "2025-10-06T14:11:48.845Z" }, - { url = "https://files.pythonhosted.org/packages/5d/9a/2f65743589809af4d0a6d3aa749343c4b5f4c380cc24a8e94a3c6625a808/yarl-1.22.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:334b8721303e61b00019474cc103bdac3d7b1f65e91f0bfedeec2d56dfe74b53", size = 97303, upload-time = "2025-10-06T14:11:50.897Z" }, - { url = "https://files.pythonhosted.org/packages/b0/ab/5b13d3e157505c43c3b43b5a776cbf7b24a02bc4cccc40314771197e3508/yarl-1.22.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1e7ce67c34138a058fd092f67d07a72b8e31ff0c9236e751957465a24b28910c", size = 361820, upload-time = "2025-10-06T14:11:52.549Z" }, - { url = "https://files.pythonhosted.org/packages/fb/76/242a5ef4677615cf95330cfc1b4610e78184400699bdda0acb897ef5e49a/yarl-1.22.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d77e1b2c6d04711478cb1c4ab90db07f1609ccf06a287d5607fcd90dc9863acf", size = 323203, upload-time = "2025-10-06T14:11:54.225Z" }, - { url = "https://files.pythonhosted.org/packages/8c/96/475509110d3f0153b43d06164cf4195c64d16999e0c7e2d8a099adcd6907/yarl-1.22.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4647674b6150d2cae088fc07de2738a84b8bcedebef29802cf0b0a82ab6face", size = 363173, upload-time = "2025-10-06T14:11:56.069Z" }, - { url = "https://files.pythonhosted.org/packages/c9/66/59db471aecfbd559a1fd48aedd954435558cd98c7d0da8b03cc6c140a32c/yarl-1.22.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:efb07073be061c8f79d03d04139a80ba33cbd390ca8f0297aae9cce6411e4c6b", size = 373562, upload-time = "2025-10-06T14:11:58.783Z" }, - { url = "https://files.pythonhosted.org/packages/03/1f/c5d94abc91557384719da10ff166b916107c1b45e4d0423a88457071dd88/yarl-1.22.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e51ac5435758ba97ad69617e13233da53908beccc6cfcd6c34bbed8dcbede486", size = 339828, upload-time = "2025-10-06T14:12:00.686Z" }, - { url = "https://files.pythonhosted.org/packages/5f/97/aa6a143d3afba17b6465733681c70cf175af89f76ec8d9286e08437a7454/yarl-1.22.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:33e32a0dd0c8205efa8e83d04fc9f19313772b78522d1bdc7d9aed706bfd6138", size = 347551, upload-time = "2025-10-06T14:12:02.628Z" }, - { url = "https://files.pythonhosted.org/packages/43/3c/45a2b6d80195959239a7b2a8810506d4eea5487dce61c2a3393e7fc3c52e/yarl-1.22.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:bf4a21e58b9cde0e401e683ebd00f6ed30a06d14e93f7c8fd059f8b6e8f87b6a", size = 334512, upload-time = "2025-10-06T14:12:04.871Z" }, - { url = "https://files.pythonhosted.org/packages/86/a0/c2ab48d74599c7c84cb104ebd799c5813de252bea0f360ffc29d270c2caa/yarl-1.22.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:e4b582bab49ac33c8deb97e058cd67c2c50dac0dd134874106d9c774fd272529", size = 352400, upload-time = "2025-10-06T14:12:06.624Z" }, - { url = "https://files.pythonhosted.org/packages/32/75/f8919b2eafc929567d3d8411f72bdb1a2109c01caaab4ebfa5f8ffadc15b/yarl-1.22.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:0b5bcc1a9c4839e7e30b7b30dd47fe5e7e44fb7054ec29b5bb8d526aa1041093", size = 357140, upload-time = "2025-10-06T14:12:08.362Z" }, - { url = "https://files.pythonhosted.org/packages/cf/72/6a85bba382f22cf78add705d8c3731748397d986e197e53ecc7835e76de7/yarl-1.22.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c0232bce2170103ec23c454e54a57008a9a72b5d1c3105dc2496750da8cfa47c", size = 341473, upload-time = "2025-10-06T14:12:10.994Z" }, - { url = "https://files.pythonhosted.org/packages/35/18/55e6011f7c044dc80b98893060773cefcfdbf60dfefb8cb2f58b9bacbd83/yarl-1.22.0-cp314-cp314t-win32.whl", hash = "sha256:8009b3173bcd637be650922ac455946197d858b3630b6d8787aa9e5c4564533e", size = 89056, upload-time = "2025-10-06T14:12:13.317Z" }, - { url = "https://files.pythonhosted.org/packages/f9/86/0f0dccb6e59a9e7f122c5afd43568b1d31b8ab7dda5f1b01fb5c7025c9a9/yarl-1.22.0-cp314-cp314t-win_amd64.whl", hash = "sha256:9fb17ea16e972c63d25d4a97f016d235c78dd2344820eb35bc034bc32012ee27", size = 96292, upload-time = "2025-10-06T14:12:15.398Z" }, - { url = "https://files.pythonhosted.org/packages/48/b7/503c98092fb3b344a179579f55814b613c1fbb1c23b3ec14a7b008a66a6e/yarl-1.22.0-cp314-cp314t-win_arm64.whl", hash = "sha256:9f6d73c1436b934e3f01df1e1b21ff765cd1d28c77dfb9ace207f746d4610ee1", size = 85171, upload-time = "2025-10-06T14:12:16.935Z" }, - { url = "https://files.pythonhosted.org/packages/73/ae/b48f95715333080afb75a4504487cbe142cae1268afc482d06692d605ae6/yarl-1.22.0-py3-none-any.whl", hash = "sha256:1380560bdba02b6b6c90de54133c81c9f2a453dee9912fe58c1dcced1edb7cff", size = 46814, upload-time = "2025-10-06T14:12:53.872Z" }, +version = "1.25.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "idna" }, + { name = "multidict" }, + { name = "propcache" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/75/16/e8be8e2fb175bbf41a0680381a319f1199fae256588241a2ac8677eafb49/yarl-1.25.1.tar.gz", hash = "sha256:03dd38de09bc213e9a8b29761eec33ee1d5318dac0e49d8af36e4d27830e23a7", size = 246245, upload-time = "2026-09-15T19:35:02.264Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/83/b3/2cea721d495ca57f8f414aa4867ee263f486b274e07463158cf52f02ba7f/yarl-1.25.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9d693bf4bf534e9ba3ae2780cfd577f5135629f7b5ac653490859d0b77864865", size = 143794, upload-time = "2026-09-15T19:30:26.946Z" }, + { url = "https://files.pythonhosted.org/packages/55/e6/cd145cff8e5cf60b8b3c41fbecfa2a45028a8dec3fbc52bec03595ff3d3b/yarl-1.25.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ab2054c5531af2a9ba7b69b8ec91e4f884420e83a8c5e579b013084cb57e5e5d", size = 103993, upload-time = "2026-09-15T19:30:28.661Z" }, + { url = "https://files.pythonhosted.org/packages/ce/7c/fbb40fe2d53747c40aa36a9e2bd2178a202f942bda0b670f3306d4aefbce/yarl-1.25.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:564fdc7085d2245ab84f88882fdb1d6ac0723124bff6ded35bfb1c00f812630d", size = 104010, upload-time = "2026-09-15T19:30:31.069Z" }, + { url = "https://files.pythonhosted.org/packages/f0/0b/5a516f70641092283f57cf3670bdb75e7327bcc0dcb5038697e4dfbfd569/yarl-1.25.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:acae6b45d1ace09b6ba3876da43b88366ef368f73b988c7f57e14231753d4420", size = 116444, upload-time = "2026-09-15T19:30:32.894Z" }, + { url = "https://files.pythonhosted.org/packages/b6/8a/d1a627f827b0a404ae0f5647cab0534959081cde13b0756a783469fb3b5e/yarl-1.25.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1fb2a01ba8cd9c5d2c5dc1ec35e0fc951d04b4f037541d4ac090c993ce58b3d7", size = 107565, upload-time = "2026-09-15T19:30:35.188Z" }, + { url = "https://files.pythonhosted.org/packages/aa/cf/c8e0aaec886840a6c4480fe44eaec7cd4319f79a563b79321473be79c56f/yarl-1.25.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e92b6bcc741b86d67606c40d3cb9c7cc8e6c737f81e31f4a94efc204456c92e3", size = 125006, upload-time = "2026-09-15T19:30:37.1Z" }, + { url = "https://files.pythonhosted.org/packages/50/26/0cce366d54a93cdc8342965dc7663385e4db161625cc1e8b18e786753d24/yarl-1.25.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:72c34ac7ad4314c19362d5ce27626dcc8429bd30bbf8c179f4234078851f9492", size = 128717, upload-time = "2026-09-15T19:30:38.904Z" }, + { url = "https://files.pythonhosted.org/packages/95/0c/a71501bbc1a674ff72c4d6c2b75f4d9a5af819f5244c3a7558080a8802c5/yarl-1.25.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d5add7b4ca7afeea91d52e4d4e4db3b1fe9885b71f07054560d8c4296b7441a2", size = 117728, upload-time = "2026-09-15T19:30:40.809Z" }, + { url = "https://files.pythonhosted.org/packages/e7/6f/c3267ca01defeed9ed9c4ff9b17bd54915432c405945233265b707475d1c/yarl-1.25.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:def538065f9e4d4cf1ae164bd59aba00dfa84f03923e0de4c3788f252d6bcd17", size = 116224, upload-time = "2026-09-15T19:30:42.818Z" }, + { url = "https://files.pythonhosted.org/packages/8f/69/fad57ee52d648431718ee0f1f68966a99c1352c3924688ffbdcc9d3fe51a/yarl-1.25.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a191bfdb30a79b98e5d175d75285f9fcb78bf0e46ba5efda042e1c72071a0de", size = 116299, upload-time = "2026-09-15T19:30:44.966Z" }, + { url = "https://files.pythonhosted.org/packages/2a/d4/6a8c1e29f33338687ca278cba0a8fbf6525a322c2c02a9a500ccbe041152/yarl-1.25.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:71f42c5b9a948c113bbdebfa544598321431d064ff959d32e99b1feb61d68345", size = 108625, upload-time = "2026-09-15T19:30:46.874Z" }, + { url = "https://files.pythonhosted.org/packages/e8/d2/3a35ae791c9cb6522c106923ff25c3230d999091e5e65511bca23bbd9914/yarl-1.25.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:72849d892954be4d09e569b8b831ac39ce58417fedc767d4308a0fe542018a40", size = 124515, upload-time = "2026-09-15T19:30:49.082Z" }, + { url = "https://files.pythonhosted.org/packages/be/fd/2b022109a6b4af0f7dc371cf7500af380b0d4f034010243e1b0ce218dc93/yarl-1.25.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:efb01a106f971cb3752856bca2318bbdf7f01bd8823779c461586cbe5ffd5258", size = 115711, upload-time = "2026-09-15T19:30:51.208Z" }, + { url = "https://files.pythonhosted.org/packages/18/59/f7586271136c3ddb0126bbfe661844699369b76b555fe38c4efe86870b2e/yarl-1.25.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a1daf47cd95a7c3a63456336bc5aaa8c86dd3a47d07ed3d0e76132ae4666a5a1", size = 122751, upload-time = "2026-09-15T19:30:53.535Z" }, + { url = "https://files.pythonhosted.org/packages/a0/0b/07f7a2d881f7e16c385b47fc1753382600847cad305dcc7fa0c25828acf8/yarl-1.25.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9489e6abf47ba37f332075a91444c7cfedb03e6ce99fbb2f116bfe1ce810da3b", size = 117983, upload-time = "2026-09-15T19:30:55.277Z" }, + { url = "https://files.pythonhosted.org/packages/aa/9d/8cdceec66a9b940700cb45931741403f045b162afd79bcb93c41cadd0972/yarl-1.25.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7306dee25b8a0e737363f347362b875094b4dc4e367311470656ae420fdbf8e", size = 102894, upload-time = "2026-09-15T19:30:57.606Z" }, + { url = "https://files.pythonhosted.org/packages/17/f1/7ec357db1d3ad2863542d71e8fe64a126bbec17b134cd7d30951196809a5/yarl-1.25.1-cp311-cp311-win_arm64.whl", hash = "sha256:abb1384477f5901d436b5d2e5465954de46ea6098f59163d243660b5c4461d35", size = 98609, upload-time = "2026-09-15T19:30:59.705Z" }, + { url = "https://files.pythonhosted.org/packages/75/b3/cd32ac66ae622b854c2df0ac52106dda220d361b65a64fde7d5b3684aa3f/yarl-1.25.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:94d7aa6debf92a1dd14cb5280b083a764169a13cfb23a452111160274ed989f4", size = 144798, upload-time = "2026-09-15T19:31:01.821Z" }, + { url = "https://files.pythonhosted.org/packages/61/fb/a2c52a8007c2051ba74662afb112ecf3d00346af4c25e33df9d80fd14fb8/yarl-1.25.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:83d4a37e4b95da4d8bda930d6d35b75b4cdadbacbb4980cae290ea3100b5d51d", size = 104583, upload-time = "2026-09-15T19:31:04.05Z" }, + { url = "https://files.pythonhosted.org/packages/be/dd/ee38aec8e09fdf957e50d4085453fbe202f56c6c3b4cf07b81cdb4f09ee9/yarl-1.25.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e029648f9c951db30e98a7d7ec90835db88ec4b32820efe2a9bdc2287e032eb6", size = 104325, upload-time = "2026-09-15T19:31:06.338Z" }, + { url = "https://files.pythonhosted.org/packages/1e/b3/058dbfb1857b484c9cf9cc135659f50b85ce66e03c99e44dc2f7b6161f55/yarl-1.25.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4d781294bb815ecb5ea57ff6bbf8038e0a31a95fdf3e1788f66e0dc100d64b58", size = 115358, upload-time = "2026-09-15T19:31:08.593Z" }, + { url = "https://files.pythonhosted.org/packages/db/39/29693446cf0cf6b15a0e2f75a5d40f93c56819b05b0622196f45e95b5cc0/yarl-1.25.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e12c538e00e7c1b286a07061046b90e8124e6a9793efae2c70db6a4aad07faad", size = 107658, upload-time = "2026-09-15T19:31:10.802Z" }, + { url = "https://files.pythonhosted.org/packages/86/b3/3c4dd7e1af43b931fba95e0a722737f2ea94a6d199c802585282831d7abd/yarl-1.25.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7e4de3ac4adbad3d0bc7c6f4360a7dbff5de2f15e3b723be3198074e17fd9c40", size = 122660, upload-time = "2026-09-15T19:31:12.84Z" }, + { url = "https://files.pythonhosted.org/packages/bd/b5/1b60dbc3cfc9c5712b15148c206748f2bc93953ffdbe25ea75b63dfc89c9/yarl-1.25.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:419f392a1da624877975709e3864dfe833af6cc7671b39318086d456e288380c", size = 126506, upload-time = "2026-09-15T19:31:15.088Z" }, + { url = "https://files.pythonhosted.org/packages/bc/7b/ca212cbe170ac8b96e45317ecbcf9c3c3ecf0cdec98d5b088a9c4088929b/yarl-1.25.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6f117789d22dce188e5754e8bc65b7e6ebf8cb73963b9fa761f672a5883769d", size = 117050, upload-time = "2026-09-15T19:31:17.241Z" }, + { url = "https://files.pythonhosted.org/packages/cb/c3/72b4938cdbe619ad71ac156182faef4908846b84dc3ca4dbb4c4e6f84014/yarl-1.25.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:80e47012e730da131c9f059c80936783f9659aae22dc31c03c0595590d11ed54", size = 114174, upload-time = "2026-09-15T19:31:19.294Z" }, + { url = "https://files.pythonhosted.org/packages/e8/43/268717870f9ba0cc9701a95181587f6dc8c5f387aab4aeecc83158f38a79/yarl-1.25.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e80f557716fd765439577131e526b8942ffc2c07bdbc5e39fa62f660ba1e963f", size = 114944, upload-time = "2026-09-15T19:31:21.414Z" }, + { url = "https://files.pythonhosted.org/packages/da/84/baa5bf504d51fe062c4bcaf62936da97fffb43285978d0b39984824231fd/yarl-1.25.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f61964f235a43738bfac50da46fc4254943a7eea3051aeb0b6fc7c992c29fadc", size = 108263, upload-time = "2026-09-15T19:31:23.388Z" }, + { url = "https://files.pythonhosted.org/packages/a4/28/779a2ed9e0152a601a27039bed9aead3f0b79797a67e2c44bfa444622dd8/yarl-1.25.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e546fe1d4a93ebc2910f0d768baff19faa09843ab3f2036a67ed6e69fae4419d", size = 122184, upload-time = "2026-09-15T19:31:25.343Z" }, + { url = "https://files.pythonhosted.org/packages/f8/1f/118e9e5b8f07694d63fd3222e801d7782270003f1a222aa798df3f8d5933/yarl-1.25.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:cce0727fd5ac04d372fa9bbfde9febc2bcf209aadfcf0468e45dec72719895d1", size = 114001, upload-time = "2026-09-15T19:31:27.465Z" }, + { url = "https://files.pythonhosted.org/packages/0f/ae/a4cf1cf372313734b17996d4007f9f73596e7a178b9485802e5494ecf484/yarl-1.25.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af4ea5b37403ef4e30f3927eaed540db942bde01d8d3ff083527c0704d1c9c68", size = 120565, upload-time = "2026-09-15T19:31:29.47Z" }, + { url = "https://files.pythonhosted.org/packages/05/79/ad94f93ca731bc9e44d321833ab96b82a4f9f5f63cf773f81a4aeea5ecc1/yarl-1.25.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:68782fdb4027b8d1eee25ec35e9a6db05e863b899eb0310b3a33b6c3fef55707", size = 117060, upload-time = "2026-09-15T19:31:31.367Z" }, + { url = "https://files.pythonhosted.org/packages/bb/cc/51a7b4abf4ac593b8e7eb3794b28e5a35ae26eed8bc04787628d215af82f/yarl-1.25.1-cp312-cp312-win_amd64.whl", hash = "sha256:7d575b54cb3863ef9bc290ea4b009999d55dc237326131e4853cf33e888fee03", size = 102593, upload-time = "2026-09-15T19:31:33.329Z" }, + { url = "https://files.pythonhosted.org/packages/9d/21/0941a6b93a58b59a1ec75e5333bf06929b671309c43c0cd201c172d9c39f/yarl-1.25.1-cp312-cp312-win_arm64.whl", hash = "sha256:bc3ac7bf569f6b64dad04dd7808c7872dae8a97df657856eac05e9b7e3614a85", size = 97697, upload-time = "2026-09-15T19:31:35.855Z" }, + { url = "https://files.pythonhosted.org/packages/7b/ed/2f3129bbcc9a5c8ba12cc2b29d8060a3bab9c8043c456cfd4b5ca3188890/yarl-1.25.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:25868beca8b6765f8f7d0e11fe6dd7c66dd4b0793b9500286d20cc92352126a5", size = 143623, upload-time = "2026-09-15T19:31:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/17/e1/f1bc3390fdca352826676b531d0712736f156919090206700421d46b2c37/yarl-1.25.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:10b2fd95332f0d716d5eee3c9fb2ce8eada19082de7fee83d32e37992fd75c26", size = 104011, upload-time = "2026-09-15T19:31:40.25Z" }, + { url = "https://files.pythonhosted.org/packages/a8/aa/50acc5c3e5da04172ae3c281c75405af4d2ca911e16120ab0563f4dffb66/yarl-1.25.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0f12afda4eea8c8994a76d4df1875c765194f5fbe8a9d197929ea303caee29ec", size = 103677, upload-time = "2026-09-15T19:31:42.46Z" }, + { url = "https://files.pythonhosted.org/packages/30/d2/7d1e0ab9f8390e1fbcede5a6dbf70d23c96ad09b8c5567f3a514d1ddb0e2/yarl-1.25.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:14b79a30a93a3ce2e8832603fd0ab780ada281b0ba5110b519a634f2d7d7d1fc", size = 115392, upload-time = "2026-09-15T19:31:44.371Z" }, + { url = "https://files.pythonhosted.org/packages/71/e1/5ba1e3a2a22139213655e760919038e8ed7e2d4a99826d0bbddb3beb96e5/yarl-1.25.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4bd6340d20ae2c7ca719b87b426e808e90743b676d05d4c26c4fb5ca71f41184", size = 107493, upload-time = "2026-09-15T19:31:46.273Z" }, + { url = "https://files.pythonhosted.org/packages/f5/53/780653d5e0f73831f467cf13548912e5eec97f21dc49fc8daf21da027df4/yarl-1.25.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:126a2533570c554719ca40a1288fdee1700b6bc82e7131aa69fa85252d92e651", size = 122537, upload-time = "2026-09-15T19:31:48.654Z" }, + { url = "https://files.pythonhosted.org/packages/03/92/d54fa70236c6036271c9c9c09fd978df5cbe3ef49ef6c46e9b833476d215/yarl-1.25.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a3faadac7d812ddac258feb57b9846b60c1b437c4f4b9ad42595c6f6fe4390df", size = 126170, upload-time = "2026-09-15T19:31:50.872Z" }, + { url = "https://files.pythonhosted.org/packages/0e/b7/a82a49bf88340b837ef6972b508a1604ae377b9e6904b46b10cf5f1cf925/yarl-1.25.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:be80550d9bfe83d9b62398a37081a90434e6df2d978ec345c3d2820de6beddab", size = 117012, upload-time = "2026-09-15T19:31:53.189Z" }, + { url = "https://files.pythonhosted.org/packages/ef/78/5d684b411e3f3602464ee9b538db48205038f8605872985f61efb809ced0/yarl-1.25.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e07595c7d6f4db270ceede356a1bd1c07a34f1c26f958d1ed0cd7b48e0d2bba3", size = 114950, upload-time = "2026-09-15T19:31:55.694Z" }, + { url = "https://files.pythonhosted.org/packages/2f/11/51d82b852c64f7fad0fc7a7ff3031517204887e874c722bbca839c0b23ac/yarl-1.25.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:eb96ed1ae6c7d072d60840c0434aef07a2df611812810807fbc54263a6053e9a", size = 115428, upload-time = "2026-09-15T19:31:57.966Z" }, + { url = "https://files.pythonhosted.org/packages/e4/49/9d1978049bf646b9ea918313926453c6901b71c92f097467777d47d36a88/yarl-1.25.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3feb99222553a8cbedfa52c2f59dd84c3f50d5b582c728d522caf8d72769a54b", size = 108428, upload-time = "2026-09-15T19:32:00.048Z" }, + { url = "https://files.pythonhosted.org/packages/43/35/7b8f1ebb45d7ec3dda7d1909bf44f458de41ef91e2937f107733582a5166/yarl-1.25.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a2ed0ba415ccdf08f14bf544cb78346d0f76086707ffee24921a2c84dbf1305a", size = 121961, upload-time = "2026-09-15T19:32:02.436Z" }, + { url = "https://files.pythonhosted.org/packages/63/d6/d8b689ab7ca26edeb85f6ff28812aac7a25376eefc1780e303a7bfbaceff/yarl-1.25.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:2b49375d22299b0a834c2bca72f39aaecc270d96fb24c30424899676f487b22a", size = 114961, upload-time = "2026-09-15T19:32:04.456Z" }, + { url = "https://files.pythonhosted.org/packages/cf/d5/1a1798ea4dc6b7ee3260010a27907ebc697c95dae99817d817ed446d24aa/yarl-1.25.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ef74070ac553c59eb4f04258722066d6c6135b7baa03b2e9f2da65c096e96d98", size = 120036, upload-time = "2026-09-15T19:32:06.5Z" }, + { url = "https://files.pythonhosted.org/packages/91/8d/b1b35ed7903da6669b1d367cb2c09436acd4ff508029b4f39a0c0c2058fc/yarl-1.25.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0a66db89ea473abeac4b70523cafd94db3772380e565f9d28af7a179b7af71fa", size = 117276, upload-time = "2026-09-15T19:32:09.401Z" }, + { url = "https://files.pythonhosted.org/packages/3a/8f/4db01cef62caff0d7a4593ed694fb8a41a27a11158cab80d290221f13e57/yarl-1.25.1-cp313-cp313-win_amd64.whl", hash = "sha256:1f51020b2eb8a003c84925638ec63c21a750a4bddd3a22ec8eac6a742dadf1b9", size = 101945, upload-time = "2026-09-15T19:32:11.545Z" }, + { url = "https://files.pythonhosted.org/packages/c0/5e/3ce00497c5c0babb74d4130c10c3828ccd215b4819d12020c42429f991ac/yarl-1.25.1-cp313-cp313-win_arm64.whl", hash = "sha256:b10dd0557ba422715b5206b3743192135a6022acca8baec51aa127d0a75db8fe", size = 97270, upload-time = "2026-09-15T19:32:14.127Z" }, + { url = "https://files.pythonhosted.org/packages/80/cf/54023edfab7aa773b860503db0c56e962ccab0922803ee97988c176ea090/yarl-1.25.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:a9ca696eb02e5c02a8afd872ada510eba9b7fe6e68b9572c2e9a9b1941e31e2e", size = 143975, upload-time = "2026-09-15T19:32:16.416Z" }, + { url = "https://files.pythonhosted.org/packages/d7/a8/e6c1be0e6761d0f2d10bbf33a3e1e02b99dc83874d92945d7b461a72481e/yarl-1.25.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a5877f2255aab518ebe528289037699201d5dc5f045f2396cb30aa02db22f57f", size = 104018, upload-time = "2026-09-15T19:32:18.364Z" }, + { url = "https://files.pythonhosted.org/packages/6e/bb/dda344765ffd3430afe1a1c66c866a57fae67786537d4f14607df6505ac1/yarl-1.25.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7a5c3115595995779ee21f2567035793911c3802a43c74f3fbb0314929ec67ac", size = 104156, upload-time = "2026-09-15T19:32:20.459Z" }, + { url = "https://files.pythonhosted.org/packages/e5/5f/ed1538bcd06009fe990d6d283dd7667f639e62a81e35c6d8c6ef6c08fb3c/yarl-1.25.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77e5099b99b37f3cf79c246998ca9f7313a78054cd1809ec46bc1afad47e1c4c", size = 116025, upload-time = "2026-09-15T19:32:22.766Z" }, + { url = "https://files.pythonhosted.org/packages/a2/af/2185daf56b99830d3356ecfada46faaa49945de6626e842b7728088d4980/yarl-1.25.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6efaf45df6a849cef613a03a94c845647456662f85438c886bb67a9c027c8c2c", size = 106985, upload-time = "2026-09-15T19:32:24.749Z" }, + { url = "https://files.pythonhosted.org/packages/c1/65/bc1ae564fb4b04a30b6a8f250e787772581c57e4c3d5cf07ac3359de3103/yarl-1.25.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d5f90e44653c4e0f78501ed9bb7d3fce835a8d62b7c6ed0cb16557534087e743", size = 123030, upload-time = "2026-09-15T19:32:27.084Z" }, + { url = "https://files.pythonhosted.org/packages/6a/3e/e2afcde10d74e53b3fa889960991efb3019beda2b1682a01de720a302056/yarl-1.25.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:632da579b2d879f6bad20f2cfa35ded1efe2f4f77f8abb26a6234a5b236acd2f", size = 126765, upload-time = "2026-09-15T19:32:29.332Z" }, + { url = "https://files.pythonhosted.org/packages/a2/be/415b00c0fe5a0615b062a456b26623d7ec91c2bee20faea1a14045aa0469/yarl-1.25.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:30eec96e8a91bd588ce897c9543f6d5d8d34b28fbcba28a4dedf20ebeae9fe57", size = 117199, upload-time = "2026-09-15T19:32:31.49Z" }, + { url = "https://files.pythonhosted.org/packages/97/27/3d8c63ddd3e8bcfd033748ab93876678ce59bacd66e4cb1ed851c9c5b37e/yarl-1.25.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:12b6bc4906e11f5e1a1cdcb12296e7afbd366c783cc8073403cd2fb74334e453", size = 115187, upload-time = "2026-09-15T19:32:34.137Z" }, + { url = "https://files.pythonhosted.org/packages/39/b7/7a81d0be1a502a26a0d4326c6f2ecb736c824f570ea1c6529f2b0b227b50/yarl-1.25.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9d6ed3d17bccce4c05343e1ca8da13bc5c02c812a4e7282ddd05e8769322d3fc", size = 116085, upload-time = "2026-09-15T19:32:36.438Z" }, + { url = "https://files.pythonhosted.org/packages/f0/69/39fff459916aa0fab42215dc47b759586fd80f94aa56dfc4a7c15ba6e0dc/yarl-1.25.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:f38a70074041d3b7e138e452799f5174198bae5bd5ab2000917badf403908c5f", size = 107996, upload-time = "2026-09-15T19:32:38.959Z" }, + { url = "https://files.pythonhosted.org/packages/c0/39/80b9a55a3335590451d9ecf3eb593a8c635351f4c905ef056d7e8a8fd9e7/yarl-1.25.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:4ca89e4e21854ed27ec753297dde84b16c9f8e53b14a4866fb44457d643c19f8", size = 122549, upload-time = "2026-09-15T19:32:41.151Z" }, + { url = "https://files.pythonhosted.org/packages/42/7d/a179c6757818bb59372a4adafd09f7f26a3b4a0f04c3ae404b544c0b0c82/yarl-1.25.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:1ab7618921a93767387a4b83776f751588f5b5ae9bb5bc96620e2e2e00bca868", size = 115107, upload-time = "2026-09-15T19:32:43.072Z" }, + { url = "https://files.pythonhosted.org/packages/32/2b/a773ac867e4ab53a98ed98e5cefe3bae31e6f550252ca9d1de266f1a40c5/yarl-1.25.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:0ae12ff2b805fa02c4dab838005caef735e39986322698c48588d3beacb65c62", size = 120666, upload-time = "2026-09-15T19:32:45.061Z" }, + { url = "https://files.pythonhosted.org/packages/bc/41/52be6505e85b0f76b4f85b01b5de7e06a0512201abc2c95e14e099549174/yarl-1.25.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:90c30ed53546da833c700115c0064c22120d1b1560f474699fd31f22dd668233", size = 117505, upload-time = "2026-09-15T19:32:47.177Z" }, + { url = "https://files.pythonhosted.org/packages/f5/01/349c0386caedbbe488d519f252df54efac8a1459282d466c474bdd84a620/yarl-1.25.1-cp314-cp314-win_amd64.whl", hash = "sha256:acfa7e22aa6c6e7a5996a41d275bfa01efa7ea56ab890590280e9063e2cf5c1b", size = 103446, upload-time = "2026-09-15T19:32:49.615Z" }, + { url = "https://files.pythonhosted.org/packages/5c/f0/8ec63180f77912f0dc4e5a42760cb8c08d20da1d5ace3578a01b84d1f3d8/yarl-1.25.1-cp314-cp314-win_arm64.whl", hash = "sha256:8e7d98cdbb6d71e726f7d525952867096053d1f290dd4e3c50d7d313a136f414", size = 99159, upload-time = "2026-09-15T19:32:51.686Z" }, + { url = "https://files.pythonhosted.org/packages/47/7d/92d2220d6886b70ab1ed8579533ac2af2dfac716d5d929001daff7986df9/yarl-1.25.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:d21f0fa80a02d05299207eeaafef345d812ace96d5306e4ef265e1d419a615fa", size = 150071, upload-time = "2026-09-15T19:32:53.911Z" }, + { url = "https://files.pythonhosted.org/packages/64/fc/b245e448124bcda9340df38e3553fa222b50260fca027a84095e9bd8642d/yarl-1.25.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:17c9877a89fb6e2bca6f9087eb24cd7fb434653946ef5075e470d23d49b52287", size = 106780, upload-time = "2026-09-15T19:32:56.443Z" }, + { url = "https://files.pythonhosted.org/packages/51/e2/9a6ce2e334ebf218a30335ae76fb1696459430d42f733b8cb0d7d65b84d3/yarl-1.25.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:29273edf1530e397bd07cb784db1fbe0d2590b77569f2e24679a9c0a2d763b94", size = 107361, upload-time = "2026-09-15T19:32:58.827Z" }, + { url = "https://files.pythonhosted.org/packages/ed/70/66e8c76b569b450d16e190f15071c916c3df70b0e33927e415ac497cf0c2/yarl-1.25.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b7abffdf37af1cec6a2ad69b827aa84320db5894791bc8ed932dc93fb274b7e9", size = 114396, upload-time = "2026-09-15T19:33:02.24Z" }, + { url = "https://files.pythonhosted.org/packages/73/23/0d82838a05c57fdc05bc8b66e8c92dcc0df15e27463a5f163142d521c682/yarl-1.25.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2239a02249d9326655419e0168a28ca9008938eaab31dc29fc875c217927a6c0", size = 104882, upload-time = "2026-09-15T19:33:04.494Z" }, + { url = "https://files.pythonhosted.org/packages/86/d4/ea08615c4edaa6049a13a2f1128944d068d1893abda7d708d4d7ea01599a/yarl-1.25.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:664ec6a520b74a1df2810666eb67695fcb77fa663e6ea0a25aaf2e529cb24dfa", size = 119485, upload-time = "2026-09-15T19:33:06.583Z" }, + { url = "https://files.pythonhosted.org/packages/1a/82/0898bdce9b1ae403b308b9c733d0d24af4a3464270c2c081f457b16c3e0d/yarl-1.25.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4f1c91f5a5980a937ff8e238e98e6897e1ad74a4b1e2c0d68c73b5ffbb3f5c0b", size = 122490, upload-time = "2026-09-15T19:33:08.653Z" }, + { url = "https://files.pythonhosted.org/packages/d1/38/97d79b81c342b78246cfedb74809e68841f3198d21653e10d3232bd9c622/yarl-1.25.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7c88edaec8c349ad4c5ad4c486a3defcc4b80ceb2f074436ffa0a87caf5e76a6", size = 115336, upload-time = "2026-09-15T19:33:11.056Z" }, + { url = "https://files.pythonhosted.org/packages/8e/9d/2577896554cd310dc470adb6da0b7dd0b435cb63e2565204a7ac240e504c/yarl-1.25.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:35dcbea443fafb3eece757ad4e514560ddeb6c34cfae1582c620d7b293d7feee", size = 111825, upload-time = "2026-09-15T19:33:13.204Z" }, + { url = "https://files.pythonhosted.org/packages/29/6b/7ac49d8ba84a5c4bd73415a4c949d22c749cb3762579b3d50e48019a78aa/yarl-1.25.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:882569ff613758cac762a457a5d72d6e211b28d4bcfea89d1d71ea942b02eac0", size = 114655, upload-time = "2026-09-15T19:33:15.553Z" }, + { url = "https://files.pythonhosted.org/packages/e5/18/e5942a16723f5b72f9b1297fd5a85a54f6300cd15c0dcb5005b90cd89156/yarl-1.25.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:d0f1489233a254bb3643d2f05de7d59019254d81daeca6b9162fe9edef57e0c7", size = 106395, upload-time = "2026-09-15T19:33:17.599Z" }, + { url = "https://files.pythonhosted.org/packages/7b/2d/549fa46240781513ebc47ae7eb418df428a163a2a3d644cc9cbb3ecb7846/yarl-1.25.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:f41753a76f4f63927d03a0d8ba8f5ce0f2083bec29a8cfaccc55371b1564b96b", size = 119277, upload-time = "2026-09-15T19:33:19.973Z" }, + { url = "https://files.pythonhosted.org/packages/76/16/4763f78dcdc0b3b9fb3842b04afe72b9320857c6a69300c62a0eab03d119/yarl-1.25.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:8fb0eb4955adf0579001581f2f71a126e8781ba61bcd120f127b0401163c6c2d", size = 112504, upload-time = "2026-09-15T19:33:22.464Z" }, + { url = "https://files.pythonhosted.org/packages/ae/b4/974e3edfe0d188393ce1cb9de400111c63fe61f4eb3b772a500d84c970d1/yarl-1.25.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:a1e32763e641a1566507d90a8d3b19bfc3cc04a9d4e5ae3e32189874ed4b58a3", size = 116243, upload-time = "2026-09-15T19:33:24.788Z" }, + { url = "https://files.pythonhosted.org/packages/b0/aa/157b940428da80c104ca09666a740e51c94963df65d5b112e06b52e4d7a8/yarl-1.25.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:65b5b2066651b7432d389e9799d979c703bcc6ef44266bb8153ef54e91e4aab3", size = 115822, upload-time = "2026-09-15T19:33:26.886Z" }, + { url = "https://files.pythonhosted.org/packages/7e/af/19fbdce41412e1b96825544cc52cd7029d3724655d0988237972f078bd29/yarl-1.25.1-cp314-cp314t-win_amd64.whl", hash = "sha256:734f6e5400352ac4254456003d462866c684703570929cff7a7bde015d0cb371", size = 107386, upload-time = "2026-09-15T19:33:29.009Z" }, + { url = "https://files.pythonhosted.org/packages/2a/99/f6431c8968e89be608d74b28ae2d024521b2953f27dd44e0dece5e04f67a/yarl-1.25.1-cp314-cp314t-win_arm64.whl", hash = "sha256:287e99ff5aa4dc1c7630bfc683ded6f106d756c99dec432a2d7f197a784f51c6", size = 102094, upload-time = "2026-09-15T19:33:31.151Z" }, + { url = "https://files.pythonhosted.org/packages/c7/3b/4f51eab40c2eabea6c3d5b121dff4b8988dc35087732ffede12d2be8b8dd/yarl-1.25.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:9b1bdaae98bc016825dd3c9d8ee1832f829b3341f9cc6ebd1a1b0a7fef7367cc", size = 143875, upload-time = "2026-09-15T19:33:33.52Z" }, + { url = "https://files.pythonhosted.org/packages/41/05/bbd58fc063f5f299a883f810760b265ca26c8167c91cb9a494d0fe2387e1/yarl-1.25.1-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:e7011b8fb8c4054bf0c12e5edc6cd83778b0028e99ce59b18586ed036f92cfdc", size = 104028, upload-time = "2026-09-15T19:33:36.22Z" }, + { url = "https://files.pythonhosted.org/packages/12/ee/2fba0aecb52e7020e189f684148783aa0b9cfa3b3bfb0b400646eef70ad4/yarl-1.25.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:f074e8d4aa0a5798920ddb6de3d08b228c614ff3724c3e8bd7577f4bafea867b", size = 104041, upload-time = "2026-09-15T19:33:38.86Z" }, + { url = "https://files.pythonhosted.org/packages/38/35/884beab53ed88c7247d1671972b5ef116f7351fe0c7e6de8c3558372cb16/yarl-1.25.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7d42e7e3ca399555578b4d617e3a6ecf13371b3743a115995fa010c7bf341459", size = 116018, upload-time = "2026-09-15T19:33:44.265Z" }, + { url = "https://files.pythonhosted.org/packages/e2/cc/1a91b685afb55cc18608443ace95280e96e263a97565811732b6788d3269/yarl-1.25.1-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:aa4ed3dd308548f9e707d9caaf005d2d7f8c1e7868f858dfeb47fe76e16b391d", size = 107033, upload-time = "2026-09-15T19:33:46.45Z" }, + { url = "https://files.pythonhosted.org/packages/c5/c1/58b379fcb1d68d907b7fcf75200c44321896509b2a6a74abbb4b19d864d2/yarl-1.25.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:42a66563d8cc056ee32e6191e05097a7b2b3bc302e0bc3133daf8710eb18bd26", size = 123257, upload-time = "2026-09-15T19:33:48.631Z" }, + { url = "https://files.pythonhosted.org/packages/d7/2d/1fe96cf5c2aeab10095e48f38585cf5a8451fb7253234822398e52aa5336/yarl-1.25.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:98d370568f393215d605304cdb77b3d5539bd192c75b623c7304c42c8d6d8273", size = 126745, upload-time = "2026-09-15T19:33:50.999Z" }, + { url = "https://files.pythonhosted.org/packages/ad/60/8674394ce43f4dadae573a1d6f451716438e9eab7d7fe8d643c673a32d85/yarl-1.25.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23bf5b403c879a54964e0feac7285688e04bb220074878d737d331522da0a5bf", size = 117255, upload-time = "2026-09-15T19:33:53.456Z" }, + { url = "https://files.pythonhosted.org/packages/2f/72/0faa30e02605d56127d42bb987dcc97da3863b7bf70b9bfbf5f739c05e30/yarl-1.25.1-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d45673badd08456d0340e9364eddafe1c53a9d2896424294de4d7dd71ad3ee57", size = 115166, upload-time = "2026-09-15T19:33:55.669Z" }, + { url = "https://files.pythonhosted.org/packages/8c/90/9a46eac564c437e128285c5c1d7bb385d268394e9209d84f6bf4a14471ef/yarl-1.25.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:0136d640dfa9b0523853e411430a99f8a91eca85774c6420285a33b755bc6de3", size = 116082, upload-time = "2026-09-15T19:33:57.78Z" }, + { url = "https://files.pythonhosted.org/packages/ad/38/4b1a686a3758878f93d2f1ea943f5a165f3555769cd16e761cfd0efdca17/yarl-1.25.1-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:59ba3a6e1aa8cfe5adf4bd270fd965db21955401b7ca6f1696010c55ed4daec2", size = 108048, upload-time = "2026-09-15T19:34:00.25Z" }, + { url = "https://files.pythonhosted.org/packages/da/14/f348eb967f31a58348612a2b93bd8a2ab664548e2b5e879cac7f592f7201/yarl-1.25.1-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:87796fedc3ba97ec14fab55acb48584276e6c1e4c1e89c422bda62c838e754a9", size = 122775, upload-time = "2026-09-15T19:34:02.455Z" }, + { url = "https://files.pythonhosted.org/packages/ab/e9/4f7b79700f88cb9e8bb66f8b54f9bce1844c013a2c39fdc47112e9334c95/yarl-1.25.1-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:bd0912757081f89b107d6c00b2ff8a194401b0b87eadcf4481de2b865a8fd44f", size = 115096, upload-time = "2026-09-15T19:34:05.283Z" }, + { url = "https://files.pythonhosted.org/packages/cf/37/f9cb020331997d3eb887bd28d5410ecfd3d80bf163c23d7cec490d78dade/yarl-1.25.1-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:b51c159a9794633f5e0db7ecec7b2b6e3734eca1f5d17dc989ff3552a43ff78b", size = 120655, upload-time = "2026-09-15T19:34:07.382Z" }, + { url = "https://files.pythonhosted.org/packages/12/83/52fceb22891a41f168db7ec22fd1d81e06b6a0b8d9f70921bd3e785defd0/yarl-1.25.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:319e070a01db9920fb63761843f96a104c8e2b9427266731810dc1e22595b17c", size = 117488, upload-time = "2026-09-15T19:34:09.988Z" }, + { url = "https://files.pythonhosted.org/packages/f5/5c/ce6c4ff1247fcbe4b33d462c23a097106d909b173fde7042bc52290466e2/yarl-1.25.1-cp315-cp315-win_amd64.whl", hash = "sha256:a2059a2d891bd156bc5184e7ab7a56e78a84dfcfdeac8c501b552533ad1c36ee", size = 103434, upload-time = "2026-09-15T19:34:12.56Z" }, + { url = "https://files.pythonhosted.org/packages/3c/a1/766a906b0704fb26d52b19dc22bed48a8ba0544203b70dcf44da350e8194/yarl-1.25.1-cp315-cp315-win_arm64.whl", hash = "sha256:a78b50b4f7918a3de71105d5c0b93bbc57bb8339a4d03a9dfd449f9068e76f3d", size = 99155, upload-time = "2026-09-15T19:34:15.132Z" }, + { url = "https://files.pythonhosted.org/packages/bd/d3/a1d09b32cb6ab14f66b44939f5b4255b8b9e747aef3974af1d5d80ccc2fd/yarl-1.25.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:b5402a340723fa7da00b5cff987ddab61276be6d11251ea71ae02bcac54890d8", size = 149284, upload-time = "2026-09-15T19:34:17.452Z" }, + { url = "https://files.pythonhosted.org/packages/7f/3b/fe554d879692650bca70bfbc0df124e82e4d2bb7456f698c7756f1279a96/yarl-1.25.1-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:eda19ea5ee88742f47a2340816e6f2d40b53bed3ab5b69794769f36af9f35bb4", size = 106399, upload-time = "2026-09-15T19:34:21.474Z" }, + { url = "https://files.pythonhosted.org/packages/e1/4b/e7af56177ac8d40094c82d7728224c0b8472157d50d362e5fb3b014b2bc8/yarl-1.25.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:75baa6cf9b6d1c52f3e111a130e202fd8cf0a5b3a066c3f73d615e885092e4ec", size = 106968, upload-time = "2026-09-15T19:34:23.619Z" }, + { url = "https://files.pythonhosted.org/packages/da/4f/2df41fd738d46f23ef829ae8b4468d94bb6070038fc6dfab6165ed44fea8/yarl-1.25.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dbcef5a9119ef653653132cccaf999b30a0af6f33bb0a4ba80bec30056868487", size = 114717, upload-time = "2026-09-15T19:34:25.879Z" }, + { url = "https://files.pythonhosted.org/packages/69/ea/002b66df53bbd1aed1c23358ff99c9bdc744fe3f4d2740e1b2fdd7192885/yarl-1.25.1-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7efc9f082dfed77c316edffa9deb52888e1bc6789171887cc1f68e06d65465c8", size = 105198, upload-time = "2026-09-15T19:34:28.204Z" }, + { url = "https://files.pythonhosted.org/packages/b1/7c/95c8bc0c8f97d71e59c94525ad60d76f5c57d3f2820f08137ca8b9f0542a/yarl-1.25.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fe01645169a2112aa1d4ebc3e4c5f029c5c8f97adfc32e5d37c993b39a994d75", size = 120271, upload-time = "2026-09-15T19:34:30.5Z" }, + { url = "https://files.pythonhosted.org/packages/5d/7a/6fe9da56ec77927baa669fd86c39c567ce6205bab53d581082c6744c8ae7/yarl-1.25.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1c557dfd5e3db046053a0bdc72261ade790ebe8e2c7a41b36b0ca1f14cb95f3", size = 123572, upload-time = "2026-09-15T19:34:32.73Z" }, + { url = "https://files.pythonhosted.org/packages/8b/83/35f222d17fa70a14c7c74fdf112ccf5515e0c2a87082b1f9b99f7693bf57/yarl-1.25.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8ce4d6ccafb33d39bd78444612d14938ead674c25702ded2ee9c54a47735d225", size = 115228, upload-time = "2026-09-15T19:34:35.344Z" }, + { url = "https://files.pythonhosted.org/packages/da/6f/fbaaf619423578a7d898d0f226ae47bc1906c293865c416d83c17b828b0e/yarl-1.25.1-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:80a063f8297fc796296f00f100be520f209b23dc98f93ce8eba6ee7122598209", size = 111618, upload-time = "2026-09-15T19:34:37.656Z" }, + { url = "https://files.pythonhosted.org/packages/ba/78/7383278f1b3cf8e0496bd95b3281a7b09b89217b6b428db24c6b99b3deca/yarl-1.25.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:7cb414a73e21a7ab58254926073f2930cb22f5b4314ea4260a687e2b3fd4dce3", size = 114839, upload-time = "2026-09-15T19:34:40.099Z" }, + { url = "https://files.pythonhosted.org/packages/62/49/5506e5b6d29aab91bd845cc9016d88c3d3f81b81bc242b8100bdd5737825/yarl-1.25.1-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:85a18376073f8a39aa07be34f9fc77e2869aa72c55c441efdd2cf79a0407504d", size = 106212, upload-time = "2026-09-15T19:34:42.768Z" }, + { url = "https://files.pythonhosted.org/packages/46/8a/19877c193b7c5929f4b07118c18bbe390f3fadd0f59dd98c0cd12b31fa5c/yarl-1.25.1-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:77716e245c90f058466a05e6a465bb8600f767a8f4b18b4d40f3aff958e5f73c", size = 119985, upload-time = "2026-09-15T19:34:44.976Z" }, + { url = "https://files.pythonhosted.org/packages/4e/6c/0a46fbbf9ecbcbd0cc20d2193394254b9e19817f22c814aab60f99847400/yarl-1.25.1-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:1e80dcf1446e1b080b1932b0d103c464a04112f5bc31f0f983ad418172063cde", size = 112081, upload-time = "2026-09-15T19:34:47.45Z" }, + { url = "https://files.pythonhosted.org/packages/ef/30/93f5d471230c74ccd06255d0842739f86551f937f9e63a5e947853c6244a/yarl-1.25.1-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:bdc8d8b8c22e9e43ac68316b5e6cf083dec537f4ec213cb4aa967b583bc3fa64", size = 116995, upload-time = "2026-09-15T19:34:49.972Z" }, + { url = "https://files.pythonhosted.org/packages/2b/80/c386593035ee3f9c6c6af0847b5578f2830c674794a9d7701b744a3ebd42/yarl-1.25.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:dfbf531053a0935f2e871bcd4753f90313688772ff8c017f5ea402e315a78c1f", size = 115570, upload-time = "2026-09-15T19:34:52.628Z" }, + { url = "https://files.pythonhosted.org/packages/38/02/eef443559563ef8f2e10469387b8b1e97cb5efee95b288a56da60801f7ee/yarl-1.25.1-cp315-cp315t-win_amd64.whl", hash = "sha256:b13b88747769537f3d32e89e3a735da10c0a9e35d7322928c701b5f93d3afffd", size = 106811, upload-time = "2026-09-15T19:34:54.935Z" }, + { url = "https://files.pythonhosted.org/packages/88/91/41e284ca2cf5211e05dae031d126a3668aea88fa759df56e7e35c6ad25ba/yarl-1.25.1-cp315-cp315t-win_arm64.whl", hash = "sha256:783dd1467083f4d3f7722ad6a313f24c173e7571372738fcb7a6e6d1ba48df25", size = 101804, upload-time = "2026-09-15T19:34:57.231Z" }, + { url = "https://files.pythonhosted.org/packages/54/22/318c7980066769c6bcd9221ed2248294f5698811da099013098c670565ed/yarl-1.25.1-py3-none-any.whl", hash = "sha256:681c758b0490f9e96b78e5fa8e8dc6e648e9185bb6eaebe73183c33ea0c445f3", size = 63617, upload-time = "2026-09-15T19:34:59.616Z" }, ] [[package]] name = "zipp" -version = "3.23.0" +version = "4.1.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166", size = 25547, upload-time = "2025-06-08T17:06:39.4Z" } +sdist = { url = "https://files.pythonhosted.org/packages/dc/23/655a1802fe8041302c959774ca7c80b53bc24737ff3ef45cb50ef11bd96c/zipp-4.1.1.tar.gz", hash = "sha256:7ebb7a44c021b29fd8dbd7cce6812d0d7b5b454521f93cc71af6ccd155aaa70b", size = 27649, upload-time = "2026-10-03T17:03:03.452Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2e/54/647ade08bf0db230bfea292f893923872fd20be6ac6f53b2b936ba839d75/zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e", size = 10276, upload-time = "2025-06-08T17:06:38.034Z" }, + { url = "https://files.pythonhosted.org/packages/b5/98/df615823cd9419131ce19fba00de53a663794369e198aade064a244b385d/zipp-4.1.1-py3-none-any.whl", hash = "sha256:8979f52d874162f485ff2981e3891f3a3317b7a3dd43ff1e1775b9304f307a9c", size = 10582, upload-time = "2026-10-03T17:03:02.506Z" }, ] [[package]] name = "zope-interface" -version = "8.0.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/88/3a/7fcf02178b8fad0a51e67e32765cd039ae505d054d744d76b8c2bbcba5ba/zope_interface-8.0.1.tar.gz", hash = "sha256:eba5610d042c3704a48222f7f7c6ab5b243ed26f917e2bc69379456b115e02d1", size = 253746, upload-time = "2025-09-25T05:55:51.285Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/75/e5/ffef169d17b92c6236b3b18b890c0ce73502f3cbd5b6532ff20d412d94a3/zope_interface-8.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fd7195081b8637eeed8d73e4d183b07199a1dc738fb28b3de6666b1b55662570", size = 207364, upload-time = "2025-09-25T05:58:50.262Z" }, - { url = "https://files.pythonhosted.org/packages/35/b6/87aca626c09af829d3a32011599d6e18864bc8daa0ad3a7e258f3d7f8bcf/zope_interface-8.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f7c4bc4021108847bce763673ce70d0716b08dfc2ba9889e7bad46ac2b3bb924", size = 207901, upload-time = "2025-09-25T05:58:51.74Z" }, - { url = "https://files.pythonhosted.org/packages/d8/c1/eec33cc9f847ebeb0bc6234d7d45fe3fc0a6fe8fc5b5e6be0442bd2c684d/zope_interface-8.0.1-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:758803806b962f32c87b31bb18c298b022965ba34fe532163831cc39118c24ab", size = 249358, upload-time = "2025-09-25T05:58:16.979Z" }, - { url = "https://files.pythonhosted.org/packages/58/7d/1e3476a1ef0175559bd8492dc7bb921ad0df5b73861d764b1f824ad5484a/zope_interface-8.0.1-cp310-cp310-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f8e88f35f86bbe8243cad4b2972deef0fdfca0a0723455abbebdc83bbab96b69", size = 254475, upload-time = "2025-09-25T05:58:10.032Z" }, - { url = "https://files.pythonhosted.org/packages/bc/67/ba5ea98ff23f723c5cbe7db7409f2e43c9fe2df1ced67881443c01e64478/zope_interface-8.0.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7844765695937d9b0d83211220b72e2cf6ac81a08608ad2b58f2c094af498d83", size = 254913, upload-time = "2025-09-25T06:26:22.263Z" }, - { url = "https://files.pythonhosted.org/packages/2b/a7/b1b8b6c13fba955c043cdee409953ee85f652b106493e2e931a84f95c1aa/zope_interface-8.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:64fa7b206dd9669f29d5c1241a768bebe8ab1e8a4b63ee16491f041e058c09d0", size = 211753, upload-time = "2025-09-25T05:59:00.561Z" }, - { url = "https://files.pythonhosted.org/packages/f2/2f/c10c739bcb9b072090c97c2e08533777497190daa19d190d72b4cce9c7cb/zope_interface-8.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4bd01022d2e1bce4a4a4ed9549edb25393c92e607d7daa6deff843f1f68b479d", size = 207903, upload-time = "2025-09-25T05:58:21.671Z" }, - { url = "https://files.pythonhosted.org/packages/b5/e1/9845ac3697f108d9a1af6912170c59a23732090bbfb35955fe77e5544955/zope_interface-8.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:29be8db8b712d94f1c05e24ea230a879271d787205ba1c9a6100d1d81f06c69a", size = 208345, upload-time = "2025-09-25T05:58:24.217Z" }, - { url = "https://files.pythonhosted.org/packages/f2/49/6573bc8b841cfab18e80c8e8259f1abdbbf716140011370de30231be79ad/zope_interface-8.0.1-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:51ae1b856565b30455b7879fdf0a56a88763b401d3f814fa9f9542d7410dbd7e", size = 255027, upload-time = "2025-09-25T05:58:19.975Z" }, - { url = "https://files.pythonhosted.org/packages/e2/fd/908b0fd4b1ab6e412dfac9bd2b606f2893ef9ba3dd36d643f5e5b94c57b3/zope_interface-8.0.1-cp311-cp311-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:d2e7596149cb1acd1d4d41b9f8fe2ffc0e9e29e2e91d026311814181d0d9efaf", size = 259800, upload-time = "2025-09-25T05:58:11.487Z" }, - { url = "https://files.pythonhosted.org/packages/dc/78/8419a2b4e88410520ed4b7f93bbd25a6d4ae66c4e2b131320f2b90f43077/zope_interface-8.0.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b2737c11c34fb9128816759864752d007ec4f987b571c934c30723ed881a7a4f", size = 260978, upload-time = "2025-09-25T06:26:24.483Z" }, - { url = "https://files.pythonhosted.org/packages/e5/90/caf68152c292f1810e2bd3acd2177badf08a740aa8a348714617d6c9ad0b/zope_interface-8.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:cf66e4bf731aa7e0ced855bb3670e8cda772f6515a475c6a107bad5cb6604103", size = 212155, upload-time = "2025-09-25T05:59:40.318Z" }, - { url = "https://files.pythonhosted.org/packages/dc/a6/0f08713ddda834c428ebf97b2a7fd8dea50c0100065a8955924dbd94dae8/zope_interface-8.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:115f27c1cc95ce7a517d960ef381beedb0a7ce9489645e80b9ab3cbf8a78799c", size = 208609, upload-time = "2025-09-25T05:58:53.698Z" }, - { url = "https://files.pythonhosted.org/packages/e9/5e/d423045f54dc81e0991ec655041e7a0eccf6b2642535839dd364b35f4d7f/zope_interface-8.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:af655c573b84e3cb6a4f6fd3fbe04e4dc91c63c6b6f99019b3713ef964e589bc", size = 208797, upload-time = "2025-09-25T05:58:56.258Z" }, - { url = "https://files.pythonhosted.org/packages/c6/43/39d4bb3f7a80ebd261446792493cfa4e198badd47107224f5b6fe1997ad9/zope_interface-8.0.1-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:23f82ef9b2d5370750cc1bf883c3b94c33d098ce08557922a3fbc7ff3b63dfe1", size = 259242, upload-time = "2025-09-25T05:58:21.602Z" }, - { url = "https://files.pythonhosted.org/packages/da/29/49effcff64ef30731e35520a152a9dfcafec86cf114b4c2aff942e8264ba/zope_interface-8.0.1-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:35a1565d5244997f2e629c5c68715b3d9d9036e8df23c4068b08d9316dcb2822", size = 264696, upload-time = "2025-09-25T05:58:13.351Z" }, - { url = "https://files.pythonhosted.org/packages/c7/39/b947673ec9a258eeaa20208dd2f6127d9fbb3e5071272a674ebe02063a78/zope_interface-8.0.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:029ea1db7e855a475bf88d9910baab4e94d007a054810e9007ac037a91c67c6f", size = 264229, upload-time = "2025-09-25T06:26:26.226Z" }, - { url = "https://files.pythonhosted.org/packages/8f/ee/eed6efd1fc3788d1bef7a814e0592d8173b7fe601c699b935009df035fc2/zope_interface-8.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0beb3e7f7dc153944076fcaf717a935f68d39efa9fce96ec97bafcc0c2ea6cab", size = 212270, upload-time = "2025-09-25T05:58:53.584Z" }, - { url = "https://files.pythonhosted.org/packages/5f/dc/3c12fca01c910c793d636ffe9c0984e0646abaf804e44552070228ed0ede/zope_interface-8.0.1-cp313-cp313-macosx_10_9_x86_64.whl", hash = "sha256:c7cc027fc5c61c5d69e5080c30b66382f454f43dc379c463a38e78a9c6bab71a", size = 208992, upload-time = "2025-09-25T05:58:40.712Z" }, - { url = "https://files.pythonhosted.org/packages/46/71/6127b7282a3e380ca927ab2b40778a9c97935a4a57a2656dadc312db5f30/zope_interface-8.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:fcf9097ff3003b7662299f1c25145e15260ec2a27f9a9e69461a585d79ca8552", size = 209051, upload-time = "2025-09-25T05:58:42.182Z" }, - { url = "https://files.pythonhosted.org/packages/56/86/4387a9f951ee18b0e41fda77da77d59c33e59f04660578e2bad688703e64/zope_interface-8.0.1-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:6d965347dd1fb9e9a53aa852d4ded46b41ca670d517fd54e733a6b6a4d0561c2", size = 259223, upload-time = "2025-09-25T05:58:23.191Z" }, - { url = "https://files.pythonhosted.org/packages/61/08/ce60a114466abc067c68ed41e2550c655f551468ae17b4b17ea360090146/zope_interface-8.0.1-cp313-cp313-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9a3b8bb77a4b89427a87d1e9eb969ab05e38e6b4a338a9de10f6df23c33ec3c2", size = 264690, upload-time = "2025-09-25T05:58:15.052Z" }, - { url = "https://files.pythonhosted.org/packages/36/9a/62a9ba3a919594605a07c34eee3068659bbd648e2fa0c4a86d876810b674/zope_interface-8.0.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:87e6b089002c43231fb9afec89268391bcc7a3b66e76e269ffde19a8112fb8d5", size = 264201, upload-time = "2025-09-25T06:26:27.797Z" }, - { url = "https://files.pythonhosted.org/packages/da/06/8fe88bd7edef60566d21ef5caca1034e10f6b87441ea85de4bbf9ea74768/zope_interface-8.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:64a43f5280aa770cbafd0307cb3d1ff430e2a1001774e8ceb40787abe4bb6658", size = 212273, upload-time = "2025-09-25T06:00:25.398Z" }, +version = "8.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/26/39/a8481b926e42c44a6fcc670904f8251469ec42edbff1ba066719ca1e7fb4/zope_interface-8.6.tar.gz", hash = "sha256:b40ef9b4873afb5d0dec02b8d2dfde1cf18c72337b60c99cb735961e0bac05c0", size = 257973, upload-time = "2026-08-20T11:18:08.717Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/df/b0/5715b7635e5e25dd26ae32453e784cab59401078aeb3e401027675068583/zope_interface-8.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dd25d6da3b3c8216080a0eefb3c01719913782690427fb9ba2ddad98ed8970f4", size = 211445, upload-time = "2026-08-20T11:17:03.377Z" }, + { url = "https://files.pythonhosted.org/packages/a2/9b/60a71a998fd819a7b9ed24c3544f862280f222828f421561e28885dcecc5/zope_interface-8.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ebb513c9e47702525897148e38271f7b6bf12c61bd084cdddfd0e03b542f8100", size = 211839, upload-time = "2026-08-20T11:17:05.05Z" }, + { url = "https://files.pythonhosted.org/packages/85/55/3092a23c3bdbcc9402ad74e69dae3fa49cc9f12bceef35079c98449bc60e/zope_interface-8.6-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:919510e0d470c189cb84164b953f81e8a513aa2593fdc9e4982340838cd1099b", size = 260720, upload-time = "2026-08-20T11:17:06.755Z" }, + { url = "https://files.pythonhosted.org/packages/41/7d/d3abda21695ee441f2278f226b4b22ecb604cf0d96efb3d39507415abdcb/zope_interface-8.6-cp311-cp311-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a43e669d68fd8c10fe315812f7e1d262c6c00e9667f29f799a3771f9a3b5b41d", size = 265288, upload-time = "2026-08-20T11:17:08.858Z" }, + { url = "https://files.pythonhosted.org/packages/21/00/27467685e40d5ee01f542c8b0b33682b07af363419f4c64cbb61b8bf48d5/zope_interface-8.6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:826f99c38f4bfcf7165885a0c59f03c6c25e0df8cdb0544f882cda61616fe845", size = 266373, upload-time = "2026-08-20T11:17:10.786Z" }, + { url = "https://files.pythonhosted.org/packages/bd/7b/ee35b4a5ee56ff609868291404b3ac30814417912fd8cbf4bbdcf1da8280/zope_interface-8.6-cp311-cp311-win_amd64.whl", hash = "sha256:d97c96c79c389d1031c86f8e797b94db4fe647dfbfebdbe48247c1899dc930bb", size = 214544, upload-time = "2026-08-20T11:17:12.793Z" }, + { url = "https://files.pythonhosted.org/packages/6c/ea/f63bedc8f3331fbd8d74971201bdb0be41ebbeda800aee08e9afcf41f46b/zope_interface-8.6-cp311-cp311-win_arm64.whl", hash = "sha256:ec5a5c01a54fc06b69da71164c9bba8cc71fde79bdd1b835bb734f96bca693f2", size = 213497, upload-time = "2026-08-20T11:17:14.541Z" }, + { url = "https://files.pythonhosted.org/packages/be/0a/33bcf5c825c749205c832e82d14224ff38011d20dd9dbf7a0ffe51a589ae/zope_interface-8.6-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:192bb756a8f62395b4fe47cbb853c171f20389d5226fbfa97128bb2f76abad8d", size = 212192, upload-time = "2026-08-20T11:17:16.522Z" }, + { url = "https://files.pythonhosted.org/packages/17/4f/41bde1796fa8cbb32f50facd261dd4124daa850c29666270e85e2bb8e91a/zope_interface-8.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a38b221cc649a2daacaff9d629a2ba9c4a8967669d253f9a6a597f46d46732f0", size = 212337, upload-time = "2026-08-20T11:17:18.305Z" }, + { url = "https://files.pythonhosted.org/packages/98/e1/b2d78ecb8aec59114111ed8c25894c0421afecc5e89b36fc356e2b07a607/zope_interface-8.6-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:780a66db884c0e2b0e6b34b4900f86916945a7c03d3be40ec845b051fcc052cd", size = 265308, upload-time = "2026-08-20T11:17:20.02Z" }, + { url = "https://files.pythonhosted.org/packages/dc/5a/126eeee4da016f5cca4db2297496069d5f1ba901fb53ebf104f9c087a113/zope_interface-8.6-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9217b1123f6aeec9ddf1789bffd83da3123546d551c164a99f862a5d1f5ac0f8", size = 270703, upload-time = "2026-08-20T11:17:22.016Z" }, + { url = "https://files.pythonhosted.org/packages/05/89/7767a6f9b0bb41a4d3777e8f93bfeb1b9a23ea643f83ce96163d9d672c8b/zope_interface-8.6-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:28b68c24131545c1d13fd2178bbd065e67f09db885d8426adf1fbdf2b6b66372", size = 270292, upload-time = "2026-08-20T11:17:23.905Z" }, + { url = "https://files.pythonhosted.org/packages/1e/66/bd63f493284f492003ebc494e9706abe389fdab45d6d6dd09a21012a7077/zope_interface-8.6-cp312-cp312-win_amd64.whl", hash = "sha256:64ed939d725876071823505b1c90074a86847a6e9be8617cec7ba759e0b86a7e", size = 214371, upload-time = "2026-08-20T11:17:25.606Z" }, + { url = "https://files.pythonhosted.org/packages/1c/03/64069137ef7da70ec796ad9a90ba23796fded06c4e7d06ae600a3141f3cc/zope_interface-8.6-cp312-cp312-win_arm64.whl", hash = "sha256:b08808d1196810f76928ad13d37dae18d92b1c9485c113628f41dbd6351413de", size = 213578, upload-time = "2026-08-20T11:17:27.396Z" }, + { url = "https://files.pythonhosted.org/packages/30/01/860c4879f072968375ec82fabaa5d83256e6ad8d3dce9527b00931e54b10/zope_interface-8.6-cp313-cp313-macosx_10_9_x86_64.whl", hash = "sha256:add6e226c6568de6d0ea9f6abe6353072387afcf5f817610ea266495d0c1ee72", size = 212548, upload-time = "2026-08-20T11:17:29.161Z" }, + { url = "https://files.pythonhosted.org/packages/38/09/d4b7c46c020394c830e749c6c4ca6a2ca0b6defed6f4c2eeeb97116c7343/zope_interface-8.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:47030c08e39d690299e02973ac845d0f534121b3618efa9ce9599a512a1c97fa", size = 212536, upload-time = "2026-08-20T11:17:30.922Z" }, + { url = "https://files.pythonhosted.org/packages/4c/2d/5b4dbbe618b816f626f2a640fcd9911a461e3733a608c4043a8cc79c12b3/zope_interface-8.6-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:c2bf932006229788d6bb41963dfc0345cba6ee24141a39316bd52a283a7d115f", size = 265203, upload-time = "2026-08-20T11:17:33.059Z" }, + { url = "https://files.pythonhosted.org/packages/79/96/c02befafb8e5d3c92898aa02fffca94d164830013fd0a50c4a652a728712/zope_interface-8.6-cp313-cp313-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:09522cdc6a77376bc36988b531db3b568c8cb0b6ca7286d8316aab283888770f", size = 270637, upload-time = "2026-08-20T11:17:35.167Z" }, + { url = "https://files.pythonhosted.org/packages/fa/c4/d61b18724597ca62c1a3a753370fff7b76f43c01b44e9a13c18e2300eaf0/zope_interface-8.6-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:edf1bd7ed576319241b2b314eaa549cee3e3e0f81f46911086b387d03a303ad3", size = 270456, upload-time = "2026-08-20T11:17:37.146Z" }, + { url = "https://files.pythonhosted.org/packages/0c/7a/96f177daba3f9d9d69d42659ae6c602c76b1d725e7dddff08ed49d9d02af/zope_interface-8.6-cp313-cp313-win_amd64.whl", hash = "sha256:00fd6a6da085beb90cdcdce6ed6e6973edf338d1ea63a807e213b1eb7013833d", size = 214763, upload-time = "2026-08-20T11:17:39.064Z" }, + { url = "https://files.pythonhosted.org/packages/d0/34/ce4a0ff71a1a93bd403c511307d70d32ae876e657d96063985f6672c92ec/zope_interface-8.6-cp313-cp313-win_arm64.whl", hash = "sha256:105da41198a1990b18d566bd30656a19064d4c313e4c0dd8f0dd9714026e47f1", size = 213621, upload-time = "2026-08-20T11:17:40.805Z" }, + { url = "https://files.pythonhosted.org/packages/3d/28/8ec94b15ebde2da2ebe643aac3c4238a55c2e95b746049721b50908ecafe/zope_interface-8.6-cp314-cp314-macosx_10_9_x86_64.whl", hash = "sha256:449727fc79f0b1317ec190632e13699b732d3f4704ea90c8e1339bb78e451bee", size = 212628, upload-time = "2026-08-20T11:17:42.566Z" }, + { url = "https://files.pythonhosted.org/packages/85/47/f06d4dbbc1464d9d4520b9c047d4a0f0062264eeb2c0b7fd1bec79a9327d/zope_interface-8.6-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:81793c9b12816ac7f8b71b366be36b7025fcf7205ec4a236642b15a82cb027ef", size = 212627, upload-time = "2026-08-20T11:17:44.571Z" }, + { url = "https://files.pythonhosted.org/packages/1c/56/01f84b4e966a32088e9076b1e7b2afa310f52bf9b9a077d2958cf66e81aa/zope_interface-8.6-cp314-cp314-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:a91eb220d9ae6aa6d746d6dac5b4db35b1417903301b3315ba3275b19570be0b", size = 266840, upload-time = "2026-08-20T11:17:46.366Z" }, + { url = "https://files.pythonhosted.org/packages/c6/40/2a644e32cd6f0516e7df1fc0c58e544a8cc11ba06b0d55d308519b02459d/zope_interface-8.6-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:3f7f6da49911ffe75ae3f7a9a45619f205420cc6578aff02f8ca29ed1de10f14", size = 270145, upload-time = "2026-08-20T11:17:48.195Z" }, + { url = "https://files.pythonhosted.org/packages/1e/18/02ebd81feff11a2766159fcb49c5b773fef5ae4414c38fb19114aad9e961/zope_interface-8.6-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ef15a2f6258f809334a19c1fcce64648813066ceebe3f3f6077871483fd0f50d", size = 270351, upload-time = "2026-08-20T11:17:50.07Z" }, + { url = "https://files.pythonhosted.org/packages/26/56/0725e960cf581399b7f4136d5951f7d87bc659492e49db1794334f6c5153/zope_interface-8.6-cp314-cp314-win_amd64.whl", hash = "sha256:5ef166337880b0e78138bbd32fcbc5ab1da3337febe8d2a247f3690bcae3ede5", size = 215098, upload-time = "2026-08-20T11:17:52.062Z" }, + { url = "https://files.pythonhosted.org/packages/f1/b3/7f864a6f9d9aebddceaac0a8c5cab0b450090f42fe316e48e6dd0c684478/zope_interface-8.6-cp314-cp314-win_arm64.whl", hash = "sha256:23ae710094fdcfcf715dae7054cd5abfefa4a527c5853d7b76ebb2541499c41a", size = 213759, upload-time = "2026-08-20T11:17:54.157Z" }, + { url = "https://files.pythonhosted.org/packages/19/b8/2f7a65ac046d3bb54e4a0664acfa152021804aa4101cbbec11526740c8af/zope_interface-8.6-cp314-cp314t-macosx_10_9_x86_64.whl", hash = "sha256:a84ac0010f054f3516710804a0c22026b4b0d30085d7666cfc2f30545775bf99", size = 213631, upload-time = "2026-08-20T11:17:56.063Z" }, + { url = "https://files.pythonhosted.org/packages/12/c1/889dc114e9a9e8d59fec53facb71dd26345f60c504ad20fd17121af0449c/zope_interface-8.6-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e36adea8ab93eb4d2076a47d5f4c7d7e1267eb9a4e33202da7ea71439a3bcaef", size = 213713, upload-time = "2026-08-20T11:17:57.998Z" }, + { url = "https://files.pythonhosted.org/packages/a9/96/ac48a6b7cfe972e4a9b0d7ec8b9f36a7956cc95d72029f0013ff096c55af/zope_interface-8.6-cp314-cp314t-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:5dbe120cfcfc8e6aed418f340c3d1ad4072253e17176503e363ddac27fcb2ac6", size = 294916, upload-time = "2026-08-20T11:17:59.952Z" }, + { url = "https://files.pythonhosted.org/packages/a2/54/4df4bb0b1aace2298386375ab2fb752378683b558d2db713e25c40a3e96a/zope_interface-8.6-cp314-cp314t-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:27e6de8e593736210d2a9f1bbf766a5653aa4819c184f864ab9d1f8bd3590a60", size = 300898, upload-time = "2026-08-20T11:18:02.224Z" }, + { url = "https://files.pythonhosted.org/packages/08/9c/0c8c80c1eeb62ac0c3ed1f51ad8cdd6da9373c53247c659c49f0ea29f742/zope_interface-8.6-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:66ab8c5d8820aa378968c16b7a3cb051aca342eafa649c9a363182f572d75ccb", size = 304684, upload-time = "2026-08-20T11:18:04.105Z" }, + { url = "https://files.pythonhosted.org/packages/54/69/3afc11a58b9ea814fdfb9297a8c36d10871c1f0cc06d42c106282109b952/zope_interface-8.6-cp314-cp314t-win_amd64.whl", hash = "sha256:fcc86414ee0e6b77416de81b8dead5900719b3f71b7875d8d1f87ae4e166a11f", size = 215500, upload-time = "2026-08-20T11:18:06.259Z" }, +] + +[[package]] +name = "zstandard" +version = "0.25.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fd/aa/3e0508d5a5dd96529cdc5a97011299056e14c6505b678fd58938792794b1/zstandard-0.25.0.tar.gz", hash = "sha256:7713e1179d162cf5c7906da876ec2ccb9c3a9dcbdffef0cc7f70c3667a205f0b", size = 711513, upload-time = "2025-09-14T22:15:54.002Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/83/c3ca27c363d104980f1c9cee1101cc8ba724ac8c28a033ede6aab89585b1/zstandard-0.25.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:933b65d7680ea337180733cf9e87293cc5500cc0eb3fc8769f4d3c88d724ec5c", size = 795254, upload-time = "2025-09-14T22:16:26.137Z" }, + { url = "https://files.pythonhosted.org/packages/ac/4d/e66465c5411a7cf4866aeadc7d108081d8ceba9bc7abe6b14aa21c671ec3/zstandard-0.25.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a3f79487c687b1fc69f19e487cd949bf3aae653d181dfb5fde3bf6d18894706f", size = 640559, upload-time = "2025-09-14T22:16:27.973Z" }, + { url = "https://files.pythonhosted.org/packages/12/56/354fe655905f290d3b147b33fe946b0f27e791e4b50a5f004c802cb3eb7b/zstandard-0.25.0-cp311-cp311-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl", hash = "sha256:0bbc9a0c65ce0eea3c34a691e3c4b6889f5f3909ba4822ab385fab9057099431", size = 5348020, upload-time = "2025-09-14T22:16:29.523Z" }, + { url = "https://files.pythonhosted.org/packages/3b/13/2b7ed68bd85e69a2069bcc72141d378f22cae5a0f3b353a2c8f50ef30c1b/zstandard-0.25.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:01582723b3ccd6939ab7b3a78622c573799d5d8737b534b86d0e06ac18dbde4a", size = 5058126, upload-time = "2025-09-14T22:16:31.811Z" }, + { url = "https://files.pythonhosted.org/packages/c9/dd/fdaf0674f4b10d92cb120ccff58bbb6626bf8368f00ebfd2a41ba4a0dc99/zstandard-0.25.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5f1ad7bf88535edcf30038f6919abe087f606f62c00a87d7e33e7fc57cb69fcc", size = 5405390, upload-time = "2025-09-14T22:16:33.486Z" }, + { url = "https://files.pythonhosted.org/packages/0f/67/354d1555575bc2490435f90d67ca4dd65238ff2f119f30f72d5cde09c2ad/zstandard-0.25.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:06acb75eebeedb77b69048031282737717a63e71e4ae3f77cc0c3b9508320df6", size = 5452914, upload-time = "2025-09-14T22:16:35.277Z" }, + { url = "https://files.pythonhosted.org/packages/bb/1f/e9cfd801a3f9190bf3e759c422bbfd2247db9d7f3d54a56ecde70137791a/zstandard-0.25.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9300d02ea7c6506f00e627e287e0492a5eb0371ec1670ae852fefffa6164b072", size = 5559635, upload-time = "2025-09-14T22:16:37.141Z" }, + { url = "https://files.pythonhosted.org/packages/21/88/5ba550f797ca953a52d708c8e4f380959e7e3280af029e38fbf47b55916e/zstandard-0.25.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bfd06b1c5584b657a2892a6014c2f4c20e0db0208c159148fa78c65f7e0b0277", size = 5048277, upload-time = "2025-09-14T22:16:38.807Z" }, + { url = "https://files.pythonhosted.org/packages/46/c0/ca3e533b4fa03112facbe7fbe7779cb1ebec215688e5df576fe5429172e0/zstandard-0.25.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f373da2c1757bb7f1acaf09369cdc1d51d84131e50d5fa9863982fd626466313", size = 5574377, upload-time = "2025-09-14T22:16:40.523Z" }, + { url = "https://files.pythonhosted.org/packages/12/9b/3fb626390113f272abd0799fd677ea33d5fc3ec185e62e6be534493c4b60/zstandard-0.25.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6c0e5a65158a7946e7a7affa6418878ef97ab66636f13353b8502d7ea03c8097", size = 4961493, upload-time = "2025-09-14T22:16:43.3Z" }, + { url = "https://files.pythonhosted.org/packages/cb/d3/23094a6b6a4b1343b27ae68249daa17ae0651fcfec9ed4de09d14b940285/zstandard-0.25.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:c8e167d5adf59476fa3e37bee730890e389410c354771a62e3c076c86f9f7778", size = 5269018, upload-time = "2025-09-14T22:16:45.292Z" }, + { url = "https://files.pythonhosted.org/packages/8c/a7/bb5a0c1c0f3f4b5e9d5b55198e39de91e04ba7c205cc46fcb0f95f0383c1/zstandard-0.25.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:98750a309eb2f020da61e727de7d7ba3c57c97cf6213f6f6277bb7fb42a8e065", size = 5443672, upload-time = "2025-09-14T22:16:47.076Z" }, + { url = "https://files.pythonhosted.org/packages/27/22/503347aa08d073993f25109c36c8d9f029c7d5949198050962cb568dfa5e/zstandard-0.25.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:22a086cff1b6ceca18a8dd6096ec631e430e93a8e70a9ca5efa7561a00f826fa", size = 5822753, upload-time = "2025-09-14T22:16:49.316Z" }, + { url = "https://files.pythonhosted.org/packages/e2/be/94267dc6ee64f0f8ba2b2ae7c7a2df934a816baaa7291db9e1aa77394c3c/zstandard-0.25.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:72d35d7aa0bba323965da807a462b0966c91608ef3a48ba761678cb20ce5d8b7", size = 5366047, upload-time = "2025-09-14T22:16:51.328Z" }, + { url = "https://files.pythonhosted.org/packages/7b/a3/732893eab0a3a7aecff8b99052fecf9f605cf0fb5fb6d0290e36beee47a4/zstandard-0.25.0-cp311-cp311-win32.whl", hash = "sha256:f5aeea11ded7320a84dcdd62a3d95b5186834224a9e55b92ccae35d21a8b63d4", size = 436484, upload-time = "2025-09-14T22:16:55.005Z" }, + { url = "https://files.pythonhosted.org/packages/43/a3/c6155f5c1cce691cb80dfd38627046e50af3ee9ddc5d0b45b9b063bfb8c9/zstandard-0.25.0-cp311-cp311-win_amd64.whl", hash = "sha256:daab68faadb847063d0c56f361a289c4f268706b598afbf9ad113cbe5c38b6b2", size = 506183, upload-time = "2025-09-14T22:16:52.753Z" }, + { url = "https://files.pythonhosted.org/packages/8c/3e/8945ab86a0820cc0e0cdbf38086a92868a9172020fdab8a03ac19662b0e5/zstandard-0.25.0-cp311-cp311-win_arm64.whl", hash = "sha256:22a06c5df3751bb7dc67406f5374734ccee8ed37fc5981bf1ad7041831fa1137", size = 462533, upload-time = "2025-09-14T22:16:53.878Z" }, + { url = "https://files.pythonhosted.org/packages/82/fc/f26eb6ef91ae723a03e16eddb198abcfce2bc5a42e224d44cc8b6765e57e/zstandard-0.25.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7b3c3a3ab9daa3eed242d6ecceead93aebbb8f5f84318d82cee643e019c4b73b", size = 795738, upload-time = "2025-09-14T22:16:56.237Z" }, + { url = "https://files.pythonhosted.org/packages/aa/1c/d920d64b22f8dd028a8b90e2d756e431a5d86194caa78e3819c7bf53b4b3/zstandard-0.25.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:913cbd31a400febff93b564a23e17c3ed2d56c064006f54efec210d586171c00", size = 640436, upload-time = "2025-09-14T22:16:57.774Z" }, + { url = "https://files.pythonhosted.org/packages/53/6c/288c3f0bd9fcfe9ca41e2c2fbfd17b2097f6af57b62a81161941f09afa76/zstandard-0.25.0-cp312-cp312-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl", hash = "sha256:011d388c76b11a0c165374ce660ce2c8efa8e5d87f34996aa80f9c0816698b64", size = 5343019, upload-time = "2025-09-14T22:16:59.302Z" }, + { url = "https://files.pythonhosted.org/packages/1e/15/efef5a2f204a64bdb5571e6161d49f7ef0fffdbca953a615efbec045f60f/zstandard-0.25.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6dffecc361d079bb48d7caef5d673c88c8988d3d33fb74ab95b7ee6da42652ea", size = 5063012, upload-time = "2025-09-14T22:17:01.156Z" }, + { url = "https://files.pythonhosted.org/packages/b7/37/a6ce629ffdb43959e92e87ebdaeebb5ac81c944b6a75c9c47e300f85abdf/zstandard-0.25.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:7149623bba7fdf7e7f24312953bcf73cae103db8cae49f8154dd1eadc8a29ecb", size = 5394148, upload-time = "2025-09-14T22:17:03.091Z" }, + { url = "https://files.pythonhosted.org/packages/e3/79/2bf870b3abeb5c070fe2d670a5a8d1057a8270f125ef7676d29ea900f496/zstandard-0.25.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:6a573a35693e03cf1d67799fd01b50ff578515a8aeadd4595d2a7fa9f3ec002a", size = 5451652, upload-time = "2025-09-14T22:17:04.979Z" }, + { url = "https://files.pythonhosted.org/packages/53/60/7be26e610767316c028a2cbedb9a3beabdbe33e2182c373f71a1c0b88f36/zstandard-0.25.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5a56ba0db2d244117ed744dfa8f6f5b366e14148e00de44723413b2f3938a902", size = 5546993, upload-time = "2025-09-14T22:17:06.781Z" }, + { url = "https://files.pythonhosted.org/packages/85/c7/3483ad9ff0662623f3648479b0380d2de5510abf00990468c286c6b04017/zstandard-0.25.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:10ef2a79ab8e2974e2075fb984e5b9806c64134810fac21576f0668e7ea19f8f", size = 5046806, upload-time = "2025-09-14T22:17:08.415Z" }, + { url = "https://files.pythonhosted.org/packages/08/b3/206883dd25b8d1591a1caa44b54c2aad84badccf2f1de9e2d60a446f9a25/zstandard-0.25.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:aaf21ba8fb76d102b696781bddaa0954b782536446083ae3fdaa6f16b25a1c4b", size = 5576659, upload-time = "2025-09-14T22:17:10.164Z" }, + { url = "https://files.pythonhosted.org/packages/9d/31/76c0779101453e6c117b0ff22565865c54f48f8bd807df2b00c2c404b8e0/zstandard-0.25.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1869da9571d5e94a85a5e8d57e4e8807b175c9e4a6294e3b66fa4efb074d90f6", size = 4953933, upload-time = "2025-09-14T22:17:11.857Z" }, + { url = "https://files.pythonhosted.org/packages/18/e1/97680c664a1bf9a247a280a053d98e251424af51f1b196c6d52f117c9720/zstandard-0.25.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:809c5bcb2c67cd0ed81e9229d227d4ca28f82d0f778fc5fea624a9def3963f91", size = 5268008, upload-time = "2025-09-14T22:17:13.627Z" }, + { url = "https://files.pythonhosted.org/packages/1e/73/316e4010de585ac798e154e88fd81bb16afc5c5cb1a72eeb16dd37e8024a/zstandard-0.25.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f27662e4f7dbf9f9c12391cb37b4c4c3cb90ffbd3b1fb9284dadbbb8935fa708", size = 5433517, upload-time = "2025-09-14T22:17:16.103Z" }, + { url = "https://files.pythonhosted.org/packages/5b/60/dd0f8cfa8129c5a0ce3ea6b7f70be5b33d2618013a161e1ff26c2b39787c/zstandard-0.25.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:99c0c846e6e61718715a3c9437ccc625de26593fea60189567f0118dc9db7512", size = 5814292, upload-time = "2025-09-14T22:17:17.827Z" }, + { url = "https://files.pythonhosted.org/packages/fc/5f/75aafd4b9d11b5407b641b8e41a57864097663699f23e9ad4dbb91dc6bfe/zstandard-0.25.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:474d2596a2dbc241a556e965fb76002c1ce655445e4e3bf38e5477d413165ffa", size = 5360237, upload-time = "2025-09-14T22:17:19.954Z" }, + { url = "https://files.pythonhosted.org/packages/ff/8d/0309daffea4fcac7981021dbf21cdb2e3427a9e76bafbcdbdf5392ff99a4/zstandard-0.25.0-cp312-cp312-win32.whl", hash = "sha256:23ebc8f17a03133b4426bcc04aabd68f8236eb78c3760f12783385171b0fd8bd", size = 436922, upload-time = "2025-09-14T22:17:24.398Z" }, + { url = "https://files.pythonhosted.org/packages/79/3b/fa54d9015f945330510cb5d0b0501e8253c127cca7ebe8ba46a965df18c5/zstandard-0.25.0-cp312-cp312-win_amd64.whl", hash = "sha256:ffef5a74088f1e09947aecf91011136665152e0b4b359c42be3373897fb39b01", size = 506276, upload-time = "2025-09-14T22:17:21.429Z" }, + { url = "https://files.pythonhosted.org/packages/ea/6b/8b51697e5319b1f9ac71087b0af9a40d8a6288ff8025c36486e0c12abcc4/zstandard-0.25.0-cp312-cp312-win_arm64.whl", hash = "sha256:181eb40e0b6a29b3cd2849f825e0fa34397f649170673d385f3598ae17cca2e9", size = 462679, upload-time = "2025-09-14T22:17:23.147Z" }, + { url = "https://files.pythonhosted.org/packages/35/0b/8df9c4ad06af91d39e94fa96cc010a24ac4ef1378d3efab9223cc8593d40/zstandard-0.25.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ec996f12524f88e151c339688c3897194821d7f03081ab35d31d1e12ec975e94", size = 795735, upload-time = "2025-09-14T22:17:26.042Z" }, + { url = "https://files.pythonhosted.org/packages/3f/06/9ae96a3e5dcfd119377ba33d4c42a7d89da1efabd5cb3e366b156c45ff4d/zstandard-0.25.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a1a4ae2dec3993a32247995bdfe367fc3266da832d82f8438c8570f989753de1", size = 640440, upload-time = "2025-09-14T22:17:27.366Z" }, + { url = "https://files.pythonhosted.org/packages/d9/14/933d27204c2bd404229c69f445862454dcc101cd69ef8c6068f15aaec12c/zstandard-0.25.0-cp313-cp313-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl", hash = "sha256:e96594a5537722fdfb79951672a2a63aec5ebfb823e7560586f7484819f2a08f", size = 5343070, upload-time = "2025-09-14T22:17:28.896Z" }, + { url = "https://files.pythonhosted.org/packages/6d/db/ddb11011826ed7db9d0e485d13df79b58586bfdec56e5c84a928a9a78c1c/zstandard-0.25.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:bfc4e20784722098822e3eee42b8e576b379ed72cca4a7cb856ae733e62192ea", size = 5063001, upload-time = "2025-09-14T22:17:31.044Z" }, + { url = "https://files.pythonhosted.org/packages/db/00/87466ea3f99599d02a5238498b87bf84a6348290c19571051839ca943777/zstandard-0.25.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:457ed498fc58cdc12fc48f7950e02740d4f7ae9493dd4ab2168a47c93c31298e", size = 5394120, upload-time = "2025-09-14T22:17:32.711Z" }, + { url = "https://files.pythonhosted.org/packages/2b/95/fc5531d9c618a679a20ff6c29e2b3ef1d1f4ad66c5e161ae6ff847d102a9/zstandard-0.25.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:fd7a5004eb1980d3cefe26b2685bcb0b17989901a70a1040d1ac86f1d898c551", size = 5451230, upload-time = "2025-09-14T22:17:34.41Z" }, + { url = "https://files.pythonhosted.org/packages/63/4b/e3678b4e776db00f9f7b2fe58e547e8928ef32727d7a1ff01dea010f3f13/zstandard-0.25.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8e735494da3db08694d26480f1493ad2cf86e99bdd53e8e9771b2752a5c0246a", size = 5547173, upload-time = "2025-09-14T22:17:36.084Z" }, + { url = "https://files.pythonhosted.org/packages/4e/d5/ba05ed95c6b8ec30bd468dfeab20589f2cf709b5c940483e31d991f2ca58/zstandard-0.25.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3a39c94ad7866160a4a46d772e43311a743c316942037671beb264e395bdd611", size = 5046736, upload-time = "2025-09-14T22:17:37.891Z" }, + { url = "https://files.pythonhosted.org/packages/50/d5/870aa06b3a76c73eced65c044b92286a3c4e00554005ff51962deef28e28/zstandard-0.25.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:172de1f06947577d3a3005416977cce6168f2261284c02080e7ad0185faeced3", size = 5576368, upload-time = "2025-09-14T22:17:40.206Z" }, + { url = "https://files.pythonhosted.org/packages/5d/35/398dc2ffc89d304d59bc12f0fdd931b4ce455bddf7038a0a67733a25f550/zstandard-0.25.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:3c83b0188c852a47cd13ef3bf9209fb0a77fa5374958b8c53aaa699398c6bd7b", size = 4954022, upload-time = "2025-09-14T22:17:41.879Z" }, + { url = "https://files.pythonhosted.org/packages/9a/5c/36ba1e5507d56d2213202ec2b05e8541734af5f2ce378c5d1ceaf4d88dc4/zstandard-0.25.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1673b7199bbe763365b81a4f3252b8e80f44c9e323fc42940dc8843bfeaf9851", size = 5267889, upload-time = "2025-09-14T22:17:43.577Z" }, + { url = "https://files.pythonhosted.org/packages/70/e8/2ec6b6fb7358b2ec0113ae202647ca7c0e9d15b61c005ae5225ad0995df5/zstandard-0.25.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:0be7622c37c183406f3dbf0cba104118eb16a4ea7359eeb5752f0794882fc250", size = 5433952, upload-time = "2025-09-14T22:17:45.271Z" }, + { url = "https://files.pythonhosted.org/packages/7b/01/b5f4d4dbc59ef193e870495c6f1275f5b2928e01ff5a81fecb22a06e22fb/zstandard-0.25.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:5f5e4c2a23ca271c218ac025bd7d635597048b366d6f31f420aaeb715239fc98", size = 5814054, upload-time = "2025-09-14T22:17:47.08Z" }, + { url = "https://files.pythonhosted.org/packages/b2/e5/fbd822d5c6f427cf158316d012c5a12f233473c2f9c5fe5ab1ae5d21f3d8/zstandard-0.25.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4f187a0bb61b35119d1926aee039524d1f93aaf38a9916b8c4b78ac8514a0aaf", size = 5360113, upload-time = "2025-09-14T22:17:48.893Z" }, + { url = "https://files.pythonhosted.org/packages/8e/e0/69a553d2047f9a2c7347caa225bb3a63b6d7704ad74610cb7823baa08ed7/zstandard-0.25.0-cp313-cp313-win32.whl", hash = "sha256:7030defa83eef3e51ff26f0b7bfb229f0204b66fe18e04359ce3474ac33cbc09", size = 436936, upload-time = "2025-09-14T22:17:52.658Z" }, + { url = "https://files.pythonhosted.org/packages/d9/82/b9c06c870f3bd8767c201f1edbdf9e8dc34be5b0fbc5682c4f80fe948475/zstandard-0.25.0-cp313-cp313-win_amd64.whl", hash = "sha256:1f830a0dac88719af0ae43b8b2d6aef487d437036468ef3c2ea59c51f9d55fd5", size = 506232, upload-time = "2025-09-14T22:17:50.402Z" }, + { url = "https://files.pythonhosted.org/packages/d4/57/60c3c01243bb81d381c9916e2a6d9e149ab8627c0c7d7abb2d73384b3c0c/zstandard-0.25.0-cp313-cp313-win_arm64.whl", hash = "sha256:85304a43f4d513f5464ceb938aa02c1e78c2943b29f44a750b48b25ac999a049", size = 462671, upload-time = "2025-09-14T22:17:51.533Z" }, + { url = "https://files.pythonhosted.org/packages/3d/5c/f8923b595b55fe49e30612987ad8bf053aef555c14f05bb659dd5dbe3e8a/zstandard-0.25.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e29f0cf06974c899b2c188ef7f783607dbef36da4c242eb6c82dcd8b512855e3", size = 795887, upload-time = "2025-09-14T22:17:54.198Z" }, + { url = "https://files.pythonhosted.org/packages/8d/09/d0a2a14fc3439c5f874042dca72a79c70a532090b7ba0003be73fee37ae2/zstandard-0.25.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:05df5136bc5a011f33cd25bc9f506e7426c0c9b3f9954f056831ce68f3b6689f", size = 640658, upload-time = "2025-09-14T22:17:55.423Z" }, + { url = "https://files.pythonhosted.org/packages/5d/7c/8b6b71b1ddd517f68ffb55e10834388d4f793c49c6b83effaaa05785b0b4/zstandard-0.25.0-cp314-cp314-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl", hash = "sha256:f604efd28f239cc21b3adb53eb061e2a205dc164be408e553b41ba2ffe0ca15c", size = 5379849, upload-time = "2025-09-14T22:17:57.372Z" }, + { url = "https://files.pythonhosted.org/packages/a4/86/a48e56320d0a17189ab7a42645387334fba2200e904ee47fc5a26c1fd8ca/zstandard-0.25.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:223415140608d0f0da010499eaa8ccdb9af210a543fac54bce15babbcfc78439", size = 5058095, upload-time = "2025-09-14T22:17:59.498Z" }, + { url = "https://files.pythonhosted.org/packages/f8/ad/eb659984ee2c0a779f9d06dbfe45e2dc39d99ff40a319895df2d3d9a48e5/zstandard-0.25.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2e54296a283f3ab5a26fc9b8b5d4978ea0532f37b231644f367aa588930aa043", size = 5551751, upload-time = "2025-09-14T22:18:01.618Z" }, + { url = "https://files.pythonhosted.org/packages/61/b3/b637faea43677eb7bd42ab204dfb7053bd5c4582bfe6b1baefa80ac0c47b/zstandard-0.25.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ca54090275939dc8ec5dea2d2afb400e0f83444b2fc24e07df7fdef677110859", size = 6364818, upload-time = "2025-09-14T22:18:03.769Z" }, + { url = "https://files.pythonhosted.org/packages/31/dc/cc50210e11e465c975462439a492516a73300ab8caa8f5e0902544fd748b/zstandard-0.25.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e09bb6252b6476d8d56100e8147b803befa9a12cea144bbe629dd508800d1ad0", size = 5560402, upload-time = "2025-09-14T22:18:05.954Z" }, + { url = "https://files.pythonhosted.org/packages/c9/ae/56523ae9c142f0c08efd5e868a6da613ae76614eca1305259c3bf6a0ed43/zstandard-0.25.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a9ec8c642d1ec73287ae3e726792dd86c96f5681eb8df274a757bf62b750eae7", size = 4955108, upload-time = "2025-09-14T22:18:07.68Z" }, + { url = "https://files.pythonhosted.org/packages/98/cf/c899f2d6df0840d5e384cf4c4121458c72802e8bda19691f3b16619f51e9/zstandard-0.25.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:a4089a10e598eae6393756b036e0f419e8c1d60f44a831520f9af41c14216cf2", size = 5269248, upload-time = "2025-09-14T22:18:09.753Z" }, + { url = "https://files.pythonhosted.org/packages/1b/c0/59e912a531d91e1c192d3085fc0f6fb2852753c301a812d856d857ea03c6/zstandard-0.25.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:f67e8f1a324a900e75b5e28ffb152bcac9fbed1cc7b43f99cd90f395c4375344", size = 5430330, upload-time = "2025-09-14T22:18:11.966Z" }, + { url = "https://files.pythonhosted.org/packages/a0/1d/7e31db1240de2df22a58e2ea9a93fc6e38cc29353e660c0272b6735d6669/zstandard-0.25.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:9654dbc012d8b06fc3d19cc825af3f7bf8ae242226df5f83936cb39f5fdc846c", size = 5811123, upload-time = "2025-09-14T22:18:13.907Z" }, + { url = "https://files.pythonhosted.org/packages/f6/49/fac46df5ad353d50535e118d6983069df68ca5908d4d65b8c466150a4ff1/zstandard-0.25.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:4203ce3b31aec23012d3a4cf4a2ed64d12fea5269c49aed5e4c3611b938e4088", size = 5359591, upload-time = "2025-09-14T22:18:16.465Z" }, + { url = "https://files.pythonhosted.org/packages/c2/38/f249a2050ad1eea0bb364046153942e34abba95dd5520af199aed86fbb49/zstandard-0.25.0-cp314-cp314-win32.whl", hash = "sha256:da469dc041701583e34de852d8634703550348d5822e66a0c827d39b05365b12", size = 444513, upload-time = "2025-09-14T22:18:20.61Z" }, + { url = "https://files.pythonhosted.org/packages/3a/43/241f9615bcf8ba8903b3f0432da069e857fc4fd1783bd26183db53c4804b/zstandard-0.25.0-cp314-cp314-win_amd64.whl", hash = "sha256:c19bcdd826e95671065f8692b5a4aa95c52dc7a02a4c5a0cac46deb879a017a2", size = 516118, upload-time = "2025-09-14T22:18:17.849Z" }, + { url = "https://files.pythonhosted.org/packages/f0/ef/da163ce2450ed4febf6467d77ccb4cd52c4c30ab45624bad26ca0a27260c/zstandard-0.25.0-cp314-cp314-win_arm64.whl", hash = "sha256:d7541afd73985c630bafcd6338d2518ae96060075f9463d7dc14cfb33514383d", size = 476940, upload-time = "2025-09-14T22:18:19.088Z" }, ]